@bamboocss/node 1.34.1 → 1.35.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 +12 -2
- package/dist/index.d.cts +3 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.mjs +12 -2
- package/package.json +12 -12
package/dist/index.cjs
CHANGED
|
@@ -3096,11 +3096,21 @@ var Builder = class {
|
|
|
3096
3096
|
*
|
|
3097
3097
|
* `extract` has to have run first: this reads the encoder rather than filling it.
|
|
3098
3098
|
*/
|
|
3099
|
-
toCss = ({ layerParams = false } = {}) => {
|
|
3099
|
+
toCss = ({ layerParams = false, includeRecipes = true } = {}) => {
|
|
3100
3100
|
const ctx = this.getContextOrThrow();
|
|
3101
3101
|
const sheet = ctx.createSheet();
|
|
3102
|
-
if (layerParams) ctx.appendLayerParams(sheet);
|
|
3102
|
+
if (layerParams) if (includeRecipes) ctx.appendLayerParams(sheet);
|
|
3103
|
+
else {
|
|
3104
|
+
const recipeLayer = ctx.config.layers?.recipes ?? "recipes";
|
|
3105
|
+
sheet.layers.root.prepend(`@layer ${sheet.layers.layerNames.filter((name) => name !== recipeLayer).join(", ")};`);
|
|
3106
|
+
}
|
|
3103
3107
|
ctx.appendBaselineCss(sheet);
|
|
3108
|
+
if (!includeRecipes) {
|
|
3109
|
+
sheet.layers.recipes.removeAll();
|
|
3110
|
+
sheet.layers.recipes_base.removeAll();
|
|
3111
|
+
sheet.layers.recipes_slots.removeAll();
|
|
3112
|
+
sheet.layers.recipes_slots_base.removeAll();
|
|
3113
|
+
}
|
|
3104
3114
|
const reachableVars = pruneTokensForBuild(ctx, sheet, []);
|
|
3105
3115
|
if ((0, _bamboocss_core.prunesPreflight)(ctx.config.preflight)) ctx.prunePreflight(sheet, collectRenderedElements(ctx));
|
|
3106
3116
|
if (ctx.config.prune?.keyframes) ctx.pruneKeyframes(sheet, collectKeyframeReferences(ctx, keyframeNames(ctx)), reachableVars);
|
package/dist/index.d.cts
CHANGED
|
@@ -260,9 +260,11 @@ declare class Builder {
|
|
|
260
260
|
* `extract` has to have run first: this reads the encoder rather than filling it.
|
|
261
261
|
*/
|
|
262
262
|
toCss: ({
|
|
263
|
-
layerParams
|
|
263
|
+
layerParams,
|
|
264
|
+
includeRecipes
|
|
264
265
|
}?: {
|
|
265
266
|
layerParams?: boolean;
|
|
267
|
+
includeRecipes?: boolean;
|
|
266
268
|
}) => string;
|
|
267
269
|
registerDependency: (fn: (dep: Message) => void) => void;
|
|
268
270
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -260,9 +260,11 @@ declare class Builder {
|
|
|
260
260
|
* `extract` has to have run first: this reads the encoder rather than filling it.
|
|
261
261
|
*/
|
|
262
262
|
toCss: ({
|
|
263
|
-
layerParams
|
|
263
|
+
layerParams,
|
|
264
|
+
includeRecipes
|
|
264
265
|
}?: {
|
|
265
266
|
layerParams?: boolean;
|
|
267
|
+
includeRecipes?: boolean;
|
|
266
268
|
}) => string;
|
|
267
269
|
registerDependency: (fn: (dep: Message) => void) => void;
|
|
268
270
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -3082,11 +3082,21 @@ var Builder = class {
|
|
|
3082
3082
|
*
|
|
3083
3083
|
* `extract` has to have run first: this reads the encoder rather than filling it.
|
|
3084
3084
|
*/
|
|
3085
|
-
toCss = ({ layerParams = false } = {}) => {
|
|
3085
|
+
toCss = ({ layerParams = false, includeRecipes = true } = {}) => {
|
|
3086
3086
|
const ctx = this.getContextOrThrow();
|
|
3087
3087
|
const sheet = ctx.createSheet();
|
|
3088
|
-
if (layerParams) ctx.appendLayerParams(sheet);
|
|
3088
|
+
if (layerParams) if (includeRecipes) ctx.appendLayerParams(sheet);
|
|
3089
|
+
else {
|
|
3090
|
+
const recipeLayer = ctx.config.layers?.recipes ?? "recipes";
|
|
3091
|
+
sheet.layers.root.prepend(`@layer ${sheet.layers.layerNames.filter((name) => name !== recipeLayer).join(", ")};`);
|
|
3092
|
+
}
|
|
3089
3093
|
ctx.appendBaselineCss(sheet);
|
|
3094
|
+
if (!includeRecipes) {
|
|
3095
|
+
sheet.layers.recipes.removeAll();
|
|
3096
|
+
sheet.layers.recipes_base.removeAll();
|
|
3097
|
+
sheet.layers.recipes_slots.removeAll();
|
|
3098
|
+
sheet.layers.recipes_slots_base.removeAll();
|
|
3099
|
+
}
|
|
3090
3100
|
const reachableVars = pruneTokensForBuild(ctx, sheet, []);
|
|
3091
3101
|
if (prunesPreflight(ctx.config.preflight)) ctx.prunePreflight(sheet, collectRenderedElements(ctx));
|
|
3092
3102
|
if (ctx.config.prune?.keyframes) ctx.pruneKeyframes(sheet, collectKeyframeReferences(ctx, keyframeNames(ctx)), reachableVars);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bamboocss/node",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.35.0",
|
|
4
4
|
"description": "The core css bamboo library",
|
|
5
5
|
"homepage": "https://bamboocss.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -52,17 +52,17 @@
|
|
|
52
52
|
"postcss": "8.5.26",
|
|
53
53
|
"ts-morph": "28.0.0",
|
|
54
54
|
"ts-pattern": "5.9.0",
|
|
55
|
-
"@bamboocss/config": "1.
|
|
56
|
-
"@bamboocss/core": "1.
|
|
57
|
-
"@bamboocss/generator": "1.
|
|
58
|
-
"@bamboocss/logger": "1.
|
|
59
|
-
"@bamboocss/parser": "1.
|
|
60
|
-
"@bamboocss/plugin-svelte": "1.
|
|
61
|
-
"@bamboocss/plugin-vue": "1.
|
|
62
|
-
"@bamboocss/reporter": "1.
|
|
63
|
-
"@bamboocss/shared": "1.
|
|
64
|
-
"@bamboocss/token-dictionary": "1.
|
|
65
|
-
"@bamboocss/types": "1.
|
|
55
|
+
"@bamboocss/config": "1.35.0",
|
|
56
|
+
"@bamboocss/core": "1.35.0",
|
|
57
|
+
"@bamboocss/generator": "1.35.0",
|
|
58
|
+
"@bamboocss/logger": "1.35.0",
|
|
59
|
+
"@bamboocss/parser": "1.35.0",
|
|
60
|
+
"@bamboocss/plugin-svelte": "1.35.0",
|
|
61
|
+
"@bamboocss/plugin-vue": "1.35.0",
|
|
62
|
+
"@bamboocss/reporter": "1.35.0",
|
|
63
|
+
"@bamboocss/shared": "1.35.0",
|
|
64
|
+
"@bamboocss/token-dictionary": "1.35.0",
|
|
65
|
+
"@bamboocss/types": "1.35.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@types/fs-extra": "11.0.4",
|