@bamboocss/types 1.12.3 → 1.13.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.md +1 -0
- package/dist/config.d.ts +40 -0
- package/dist/prop-type.d.ts +8 -0
- package/package.json +4 -4
package/LICENSE.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
3
|
Copyright (c) 2023 Segun Adebayo
|
|
4
|
+
Copyright (c) 2026 Gajus Kuizinas
|
|
4
5
|
|
|
5
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
|
6
7
|
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
package/dist/config.d.ts
CHANGED
|
@@ -349,6 +349,46 @@ interface CssgenOptions {
|
|
|
349
349
|
* @default false
|
|
350
350
|
*/
|
|
351
351
|
minify?: boolean
|
|
352
|
+
/**
|
|
353
|
+
* Whether to drop token css variables that nothing in the generated css can reach.
|
|
354
|
+
*
|
|
355
|
+
* The token layer declares every token in the theme, and an app typically uses a small
|
|
356
|
+
* fraction of them, so this is usually the largest single saving in render-blocking css.
|
|
357
|
+
*
|
|
358
|
+
* It is opt-in because reachability cannot be proven for every reference. `token()` and
|
|
359
|
+
* `token.var()` calls are read out of the source, as is any literal `var(--x)` written
|
|
360
|
+
* by hand. Three things stay invisible: a token named by a path the source does not
|
|
361
|
+
* spell out as a string literal — `token.var(key)` — one referenced only from a
|
|
362
|
+
* stylesheet outside `include`, and one used by a separate package consuming the output
|
|
363
|
+
* as design tokens. Use `staticCss` to keep those.
|
|
364
|
+
*
|
|
365
|
+
* Tokens that javascript receives as a `var()` rather than a literal are always kept, so
|
|
366
|
+
* that `token()` answers correctly for any path at runtime. That covers virtual tokens
|
|
367
|
+
* and any token carrying a condition, and it has one cost worth knowing about: a
|
|
368
|
+
* negative token resolves to `calc(var(--spacing-4) * -1)`, so every token with a
|
|
369
|
+
* negative counterpart pins its own declaration. Spacing scales generate one per entry,
|
|
370
|
+
* which keeps the whole scale whether or not the app uses it — on the default preset
|
|
371
|
+
* that is roughly a third of what survives pruning. There is no opt-out.
|
|
372
|
+
*
|
|
373
|
+
* @default false
|
|
374
|
+
*/
|
|
375
|
+
pruneUnusedTokens?: boolean
|
|
376
|
+
/**
|
|
377
|
+
* Drop `@keyframes` rules nothing can reach.
|
|
378
|
+
*
|
|
379
|
+
* A preset declares every animation it offers and an app uses a handful, so the rest
|
|
380
|
+
* are dead weight in the stylesheet that blocks first paint. Only keyframes the theme
|
|
381
|
+
* declares are ever removed — one emitted by `globalCss` is left alone.
|
|
382
|
+
*
|
|
383
|
+
* A name is kept when any declaration in the generated css names it, and when it
|
|
384
|
+
* appears anywhere under `include`, which covers an animation assembled at runtime or
|
|
385
|
+
* applied through an inline `style` rather than through bamboo. That textual fallback
|
|
386
|
+
* is deliberately over-inclusive: keeping an unused keyframe costs bytes, dropping a
|
|
387
|
+
* used one breaks the animation.
|
|
388
|
+
*
|
|
389
|
+
* @default false
|
|
390
|
+
*/
|
|
391
|
+
pruneUnusedKeyframes?: boolean
|
|
352
392
|
/**
|
|
353
393
|
* The root selector for the css variables.
|
|
354
394
|
* @default ':where(:host, :root)'
|
package/dist/prop-type.d.ts
CHANGED
|
@@ -5,6 +5,14 @@ import type { CssProperties } from './system-types'
|
|
|
5
5
|
* Shadowed export (in CLI): DO NOT REMOVE
|
|
6
6
|
* -----------------------------------------------------------------------------*/
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Empty on purpose, and unreferenced on purpose. A generated project never sees this file:
|
|
10
|
+
* the CLI emits its own `styled-system/types/prop-type.d.ts` declaring `UtilityValues` and a
|
|
11
|
+
* `PropertyValue` resolved against it. This copy is what ships in the `@bamboocss/types`
|
|
12
|
+
* bundle, so nothing in this repo can consume it and knip cannot tell it apart from dead code.
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
8
16
|
export interface PropertyTypes {}
|
|
9
17
|
|
|
10
18
|
export type PropertyValue<K extends string> = K extends keyof PropertyTypes
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bamboocss/types",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.2",
|
|
4
4
|
"description": "The types for css bamboo",
|
|
5
|
-
"homepage": "https://
|
|
5
|
+
"homepage": "https://bamboocss.com",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"author": "
|
|
7
|
+
"author": "Gajus Kuizinas <gajus@gajus.com>",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "git+https://github.com/bamboocss/bamboo.git",
|
|
@@ -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.13.2"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"dev": "tsx scripts/watch.ts",
|