@bamboocss/generator 1.43.0 → 1.44.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/index.cjs CHANGED
@@ -3919,7 +3919,7 @@ var Generator = class extends _bamboocss_core.Context {
3919
3919
  * `keep` carries references this cannot see for itself; see `collectTokenReferences`.
3920
3920
  */
3921
3921
  pruneTokens = (sheet, keep, tokensReachableFromJs = true) => {
3922
- const pruneVars = (this.config.prune?.tokens ?? "reachable") !== "off";
3922
+ const pruneVars = this.config.prune?.tokens !== false;
3923
3923
  const pruneRegistrations = this.config.prune?.propertyRegistrations ?? true;
3924
3924
  const layers = sheet.layers;
3925
3925
  const result = (0, _bamboocss_core.pruneTokenVars)({
@@ -3998,9 +3998,9 @@ var Generator = class extends _bamboocss_core.Context {
3998
3998
  * deletes the `@keyframes` out from under a declaration that ships. Every caller that
3999
3999
  * prunes both hands it over.
4000
4000
  *
4001
- * Omitting it falls back to what `prune.tokens` implies. Under `off` that is `'all'`: no
4001
+ * Omitting it falls back to what `prune.tokens` implies. Under `false` that is `'all'`: no
4002
4002
  * token declaration is removable, so each one ships and keeps the keyframe it names —
4003
- * and `off` is precisely the setting chosen because something outside the stylesheet
4003
+ * and `false` is precisely the setting chosen because something outside the stylesheet
4004
4004
  * reads them. Otherwise it is the css alone, which is what a caller running this pass
4005
4005
  * without the other one is asking for.
4006
4006
  */
@@ -4023,7 +4023,7 @@ var Generator = class extends _bamboocss_core.Context {
4023
4023
  target: layers.tokens,
4024
4024
  keyframeNames,
4025
4025
  keep: new Set([...this.getThemeKeyframeNames(keyframeNames), ...keep ?? []]),
4026
- reachableVars: reachableVars ?? ((this.config.prune?.tokens ?? "reachable") === "off" ? "all" : void 0)
4026
+ reachableVars: reachableVars ?? (this.config.prune?.tokens === false ? "all" : void 0)
4027
4027
  });
4028
4028
  _bamboocss_logger.logger.debug("prune:keyframes", `Removed ${result.removed} unused keyframe(s)`);
4029
4029
  return result;
package/dist/index.d.cts CHANGED
@@ -71,9 +71,9 @@ declare class Generator extends Context {
71
71
  * deletes the `@keyframes` out from under a declaration that ships. Every caller that
72
72
  * prunes both hands it over.
73
73
  *
74
- * Omitting it falls back to what `prune.tokens` implies. Under `off` that is `'all'`: no
74
+ * Omitting it falls back to what `prune.tokens` implies. Under `false` that is `'all'`: no
75
75
  * token declaration is removable, so each one ships and keeps the keyframe it names —
76
- * and `off` is precisely the setting chosen because something outside the stylesheet
76
+ * and `false` is precisely the setting chosen because something outside the stylesheet
77
77
  * reads them. Otherwise it is the css alone, which is what a caller running this pass
78
78
  * without the other one is asking for.
79
79
  */
package/dist/index.d.mts CHANGED
@@ -71,9 +71,9 @@ declare class Generator extends Context {
71
71
  * deletes the `@keyframes` out from under a declaration that ships. Every caller that
72
72
  * prunes both hands it over.
73
73
  *
74
- * Omitting it falls back to what `prune.tokens` implies. Under `off` that is `'all'`: no
74
+ * Omitting it falls back to what `prune.tokens` implies. Under `false` that is `'all'`: no
75
75
  * token declaration is removable, so each one ships and keeps the keyframe it names —
76
- * and `off` is precisely the setting chosen because something outside the stylesheet
76
+ * and `false` is precisely the setting chosen because something outside the stylesheet
77
77
  * reads them. Otherwise it is the css alone, which is what a caller running this pass
78
78
  * without the other one is asking for.
79
79
  */
package/dist/index.mjs CHANGED
@@ -3893,7 +3893,7 @@ var Generator = class extends Context {
3893
3893
  * `keep` carries references this cannot see for itself; see `collectTokenReferences`.
3894
3894
  */
3895
3895
  pruneTokens = (sheet, keep, tokensReachableFromJs = true) => {
3896
- const pruneVars = (this.config.prune?.tokens ?? "reachable") !== "off";
3896
+ const pruneVars = this.config.prune?.tokens !== false;
3897
3897
  const pruneRegistrations = this.config.prune?.propertyRegistrations ?? true;
3898
3898
  const layers = sheet.layers;
3899
3899
  const result = pruneTokenVars({
@@ -3972,9 +3972,9 @@ var Generator = class extends Context {
3972
3972
  * deletes the `@keyframes` out from under a declaration that ships. Every caller that
3973
3973
  * prunes both hands it over.
3974
3974
  *
3975
- * Omitting it falls back to what `prune.tokens` implies. Under `off` that is `'all'`: no
3975
+ * Omitting it falls back to what `prune.tokens` implies. Under `false` that is `'all'`: no
3976
3976
  * token declaration is removable, so each one ships and keeps the keyframe it names —
3977
- * and `off` is precisely the setting chosen because something outside the stylesheet
3977
+ * and `false` is precisely the setting chosen because something outside the stylesheet
3978
3978
  * reads them. Otherwise it is the css alone, which is what a caller running this pass
3979
3979
  * without the other one is asking for.
3980
3980
  */
@@ -3997,7 +3997,7 @@ var Generator = class extends Context {
3997
3997
  target: layers.tokens,
3998
3998
  keyframeNames,
3999
3999
  keep: new Set([...this.getThemeKeyframeNames(keyframeNames), ...keep ?? []]),
4000
- reachableVars: reachableVars ?? ((this.config.prune?.tokens ?? "reachable") === "off" ? "all" : void 0)
4000
+ reachableVars: reachableVars ?? (this.config.prune?.tokens === false ? "all" : void 0)
4001
4001
  });
4002
4002
  logger.debug("prune:keyframes", `Removed ${result.removed} unused keyframe(s)`);
4003
4003
  return result;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bamboocss/generator",
3
- "version": "1.43.0",
3
+ "version": "1.44.0",
4
4
  "description": "The css generator for css bamboo",
5
5
  "homepage": "https://bamboocss.com",
6
6
  "license": "MIT",
@@ -38,12 +38,12 @@
38
38
  "pluralize": "8.0.0",
39
39
  "postcss": "8.5.26",
40
40
  "ts-pattern": "5.9.0",
41
- "@bamboocss/core": "1.43.0",
42
- "@bamboocss/is-valid-prop": "^1.43.0",
43
- "@bamboocss/logger": "1.43.0",
44
- "@bamboocss/shared": "1.43.0",
45
- "@bamboocss/token-dictionary": "1.43.0",
46
- "@bamboocss/types": "1.43.0"
41
+ "@bamboocss/core": "1.44.0",
42
+ "@bamboocss/is-valid-prop": "^1.44.0",
43
+ "@bamboocss/logger": "1.44.0",
44
+ "@bamboocss/shared": "1.44.0",
45
+ "@bamboocss/token-dictionary": "1.44.0",
46
+ "@bamboocss/types": "1.44.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/pluralize": "0.0.33"