@bamboocss/dev 1.30.1 → 1.31.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/cli-default.cjs +12 -23
- package/dist/cli-default.mjs +13 -24
- package/dist/cli-main.cjs +13 -24
- package/dist/cli-main.mjs +14 -25
- package/dist/interactive.cjs +1 -1
- package/dist/interactive.mjs +1 -1
- package/dist/{mcp-init-BvhoBfuw.cjs → mcp-init-B9JiIVNX.cjs} +1 -1
- package/dist/{mcp-init-Cg37FkSz.mjs → mcp-init-pYR-Xb5g.mjs} +1 -1
- package/dist/{package-BOnXC3Wi.cjs → package-BSTVW0IS.cjs} +1 -1
- package/dist/{package-CarQ3yB-.mjs → package-BpQK2nL7.mjs} +1 -1
- package/dist/presets.cjs +23 -25
- package/dist/presets.d.cts +1947 -2
- package/dist/presets.d.mts +1947 -2
- package/dist/presets.mjs +17 -3
- package/dist/types.d.cts +0 -2
- package/dist/types.d.mts +0 -2
- package/package.json +9 -9
package/dist/cli-default.cjs
CHANGED
|
@@ -7627,7 +7627,7 @@ function isLocError(error) {
|
|
|
7627
7627
|
//#endregion
|
|
7628
7628
|
//#region package.json
|
|
7629
7629
|
var name = "@bamboocss/dev";
|
|
7630
|
-
var version = "1.
|
|
7630
|
+
var version = "1.31.0";
|
|
7631
7631
|
//#endregion
|
|
7632
7632
|
//#region src/interactive.ts
|
|
7633
7633
|
const interactive = async () => {
|
|
@@ -7766,7 +7766,7 @@ async function main() {
|
|
|
7766
7766
|
else stream.end();
|
|
7767
7767
|
stopProfiling();
|
|
7768
7768
|
});
|
|
7769
|
-
cli.command("cssgen [globOrType]", "Generate the css from files, or generate the css from the specified type which can be: preflight, tokens, static, global, keyframes").option("--silent", "Don't print any logs").option("-m, --minify", "Minify generated code").option("--clean", "Clean the output before generating").option("-c, --config <path>", "Path to bamboo config file").option("-w, --watch", "Watch files and rebuild").option("--minimal", "Do not include CSS generation for theme tokens, preflight, keyframes, static and global css").option("--
|
|
7769
|
+
cli.command("cssgen [globOrType]", "Generate the css from files, or generate the css from the specified type which can be: preflight, tokens, static, global, keyframes").option("--silent", "Don't print any logs").option("-m, --minify", "Minify generated code").option("--clean", "Clean the output before generating").option("-c, --config <path>", "Path to bamboo config file").option("-w, --watch", "Watch files and rebuild").option("--minimal", "Do not include CSS generation for theme tokens, preflight, keyframes, static and global css").option("--polyfill", "Polyfill CSS @layers at-rules for older browsers.").option("-p, --poll", "Use polling instead of filesystem events when watching").option("-o, --outfile [file]", "Output file for extracted css, default to './styled-system/styles.css'").option("--splitting", "Emit CSS as separate files per layer (reset, global, tokens, utilities) and per recipe").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--cpu-prof", "Generates a `.cpuprofile` to help debug performance issues").option("--logfile <file>", "Outputs logs to a file").action(async (maybeGlob, flags = {}) => {
|
|
7770
7770
|
const { silent, config: configPath, outfile, watch, poll, minimal, splitting, ...rest } = flags;
|
|
7771
7771
|
const cwd = (0, path.resolve)(flags.cwd ?? "");
|
|
7772
7772
|
const stream = (0, _bamboocss_node.setLogStream)({
|
|
@@ -7830,7 +7830,7 @@ async function main() {
|
|
|
7830
7830
|
stopProfiling();
|
|
7831
7831
|
}
|
|
7832
7832
|
});
|
|
7833
|
-
cli.command("[files]", "Include file glob", { ignoreOptionDefaultValue: true }).option("-o, --outdir <dir>", "Output directory", { default: "styled-system" }).option("-m, --minify", "Minify generated code").option("-w, --watch", "Watch files and rebuild").option("-p, --poll", "Use polling instead of filesystem events when watching").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--preflight", "Enable css reset").option("--silent", "Suppress all messages except errors").option("-e, --exclude <files>", "Exclude files", { default: [] }).option("--clean", "Clean output directory").option("--hash", "Hash the generated classnames to make them shorter").option("--
|
|
7833
|
+
cli.command("[files]", "Include file glob", { ignoreOptionDefaultValue: true }).option("-o, --outdir <dir>", "Output directory", { default: "styled-system" }).option("-m, --minify", "Minify generated code").option("-w, --watch", "Watch files and rebuild").option("-p, --poll", "Use polling instead of filesystem events when watching").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--preflight", "Enable css reset").option("--silent", "Suppress all messages except errors").option("-e, --exclude <files>", "Exclude files", { default: [] }).option("--clean", "Clean output directory").option("--hash", "Hash the generated classnames to make them shorter").option("--polyfill", "Polyfill CSS @layers at-rules for older browsers.").option("--emitTokensOnly", "Whether to only emit the `tokens` directory").option("--cpu-prof", "Generates a `.cpuprofile` to help debug performance issues").option("--logfile <file>", "Outputs logs to a file").action(async (files, flags) => {
|
|
7834
7834
|
const { config: configPath, silent, ...rest } = flags;
|
|
7835
7835
|
const cwd = (0, path.resolve)(flags.cwd ?? "");
|
|
7836
7836
|
const stream = (0, _bamboocss_node.setLogStream)({
|
|
@@ -7956,24 +7956,14 @@ async function main() {
|
|
|
7956
7956
|
});
|
|
7957
7957
|
const pkgPath = (0, path.resolve)(cwd, outdir, "package.json");
|
|
7958
7958
|
const exists = ctx.runtime.fs.existsSync(pkgPath);
|
|
7959
|
-
|
|
7960
|
-
|
|
7961
|
-
|
|
7962
|
-
|
|
7963
|
-
|
|
7964
|
-
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
const createEntry = (dir) => ({
|
|
7968
|
-
types: ctx.file.extDts(createDir(dir, "index")),
|
|
7969
|
-
require: ctx.file.ext(createDir(dir, "index")),
|
|
7970
|
-
import: ctx.file.ext(createDir(dir, "index"))
|
|
7971
|
-
});
|
|
7972
|
-
exports.push(["./css", createEntry("css")], ["./tokens", createEntry("tokens")], ["./types", createEntry("types")]);
|
|
7973
|
-
if (!ctx.patterns.isEmpty()) exports.push(["./patterns", createEntry("patterns")]);
|
|
7974
|
-
if (!ctx.recipes.isEmpty()) exports.push(["./recipes", createEntry("recipes")]);
|
|
7975
|
-
if (ctx.config.themes) exports.push(["./themes", createEntry("themes")]);
|
|
7976
|
-
const stylesDir = createDir("styles.css");
|
|
7959
|
+
/**
|
|
7960
|
+
* The same map codegen writes into the outdir, re-derived here with the package's
|
|
7961
|
+
* `base` prefix. Shared rather than restated so the entry list has one definition —
|
|
7962
|
+
* this copy had drifted: it advertised a `require` condition pointing at `.mjs`, for
|
|
7963
|
+
* output that is ESM under every setting, and it listed `./types` as a runtime entry
|
|
7964
|
+
* for a directory holding only declarations.
|
|
7965
|
+
*/
|
|
7966
|
+
const generated = (0, _bamboocss_node.generatePackageExports)(ctx, base);
|
|
7977
7967
|
const identity = {
|
|
7978
7968
|
name: outdir,
|
|
7979
7969
|
description: "This package is auto-generated by Bamboo CSS",
|
|
@@ -8015,8 +8005,7 @@ async function main() {
|
|
|
8015
8005
|
if (isGenerated) delete content.private;
|
|
8016
8006
|
content.exports = {
|
|
8017
8007
|
...content.exports,
|
|
8018
|
-
...
|
|
8019
|
-
"./styles.css": stylesDir
|
|
8008
|
+
...generated
|
|
8020
8009
|
};
|
|
8021
8010
|
await ctx.runtime.fs.writeFile(pkgPath, JSON.stringify(content, null, 2) + "\n");
|
|
8022
8011
|
_bamboocss_logger.logger.info("cli", `Emit package.json to ${pkgPath}`);
|
package/dist/cli-default.mjs
CHANGED
|
@@ -13,7 +13,7 @@ import tty from "node:tty";
|
|
|
13
13
|
import { isMainThread, parentPort } from "worker_threads";
|
|
14
14
|
import { BambooError, compact } from "@bamboocss/shared";
|
|
15
15
|
import { logger } from "@bamboocss/logger";
|
|
16
|
-
import { BambooContext, analyze, buildInfo, codegen, cssgen, debug, generate, loadConfigAndCreateContext, setLogStream, setupConfig, setupGitIgnore, setupPostcss, spec, startProfiling } from "@bamboocss/node";
|
|
16
|
+
import { BambooContext, analyze, buildInfo, codegen, cssgen, debug, generate, generatePackageExports, loadConfigAndCreateContext, setLogStream, setupConfig, setupGitIgnore, setupPostcss, spec, startProfiling } from "@bamboocss/node";
|
|
17
17
|
import { cac } from "cac";
|
|
18
18
|
import * as p from "@clack/prompts";
|
|
19
19
|
//#region \0rolldown/runtime.js
|
|
@@ -7630,7 +7630,7 @@ function isLocError(error) {
|
|
|
7630
7630
|
//#endregion
|
|
7631
7631
|
//#region package.json
|
|
7632
7632
|
var name = "@bamboocss/dev";
|
|
7633
|
-
var version = "1.
|
|
7633
|
+
var version = "1.31.0";
|
|
7634
7634
|
//#endregion
|
|
7635
7635
|
//#region src/interactive.ts
|
|
7636
7636
|
const interactive = async () => {
|
|
@@ -7769,7 +7769,7 @@ async function main() {
|
|
|
7769
7769
|
else stream.end();
|
|
7770
7770
|
stopProfiling();
|
|
7771
7771
|
});
|
|
7772
|
-
cli.command("cssgen [globOrType]", "Generate the css from files, or generate the css from the specified type which can be: preflight, tokens, static, global, keyframes").option("--silent", "Don't print any logs").option("-m, --minify", "Minify generated code").option("--clean", "Clean the output before generating").option("-c, --config <path>", "Path to bamboo config file").option("-w, --watch", "Watch files and rebuild").option("--minimal", "Do not include CSS generation for theme tokens, preflight, keyframes, static and global css").option("--
|
|
7772
|
+
cli.command("cssgen [globOrType]", "Generate the css from files, or generate the css from the specified type which can be: preflight, tokens, static, global, keyframes").option("--silent", "Don't print any logs").option("-m, --minify", "Minify generated code").option("--clean", "Clean the output before generating").option("-c, --config <path>", "Path to bamboo config file").option("-w, --watch", "Watch files and rebuild").option("--minimal", "Do not include CSS generation for theme tokens, preflight, keyframes, static and global css").option("--polyfill", "Polyfill CSS @layers at-rules for older browsers.").option("-p, --poll", "Use polling instead of filesystem events when watching").option("-o, --outfile [file]", "Output file for extracted css, default to './styled-system/styles.css'").option("--splitting", "Emit CSS as separate files per layer (reset, global, tokens, utilities) and per recipe").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--cpu-prof", "Generates a `.cpuprofile` to help debug performance issues").option("--logfile <file>", "Outputs logs to a file").action(async (maybeGlob, flags = {}) => {
|
|
7773
7773
|
const { silent, config: configPath, outfile, watch, poll, minimal, splitting, ...rest } = flags;
|
|
7774
7774
|
const cwd = resolve(flags.cwd ?? "");
|
|
7775
7775
|
const stream = setLogStream({
|
|
@@ -7833,7 +7833,7 @@ async function main() {
|
|
|
7833
7833
|
stopProfiling();
|
|
7834
7834
|
}
|
|
7835
7835
|
});
|
|
7836
|
-
cli.command("[files]", "Include file glob", { ignoreOptionDefaultValue: true }).option("-o, --outdir <dir>", "Output directory", { default: "styled-system" }).option("-m, --minify", "Minify generated code").option("-w, --watch", "Watch files and rebuild").option("-p, --poll", "Use polling instead of filesystem events when watching").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--preflight", "Enable css reset").option("--silent", "Suppress all messages except errors").option("-e, --exclude <files>", "Exclude files", { default: [] }).option("--clean", "Clean output directory").option("--hash", "Hash the generated classnames to make them shorter").option("--
|
|
7836
|
+
cli.command("[files]", "Include file glob", { ignoreOptionDefaultValue: true }).option("-o, --outdir <dir>", "Output directory", { default: "styled-system" }).option("-m, --minify", "Minify generated code").option("-w, --watch", "Watch files and rebuild").option("-p, --poll", "Use polling instead of filesystem events when watching").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--preflight", "Enable css reset").option("--silent", "Suppress all messages except errors").option("-e, --exclude <files>", "Exclude files", { default: [] }).option("--clean", "Clean output directory").option("--hash", "Hash the generated classnames to make them shorter").option("--polyfill", "Polyfill CSS @layers at-rules for older browsers.").option("--emitTokensOnly", "Whether to only emit the `tokens` directory").option("--cpu-prof", "Generates a `.cpuprofile` to help debug performance issues").option("--logfile <file>", "Outputs logs to a file").action(async (files, flags) => {
|
|
7837
7837
|
const { config: configPath, silent, ...rest } = flags;
|
|
7838
7838
|
const cwd = resolve(flags.cwd ?? "");
|
|
7839
7839
|
const stream = setLogStream({
|
|
@@ -7959,24 +7959,14 @@ async function main() {
|
|
|
7959
7959
|
});
|
|
7960
7960
|
const pkgPath = resolve(cwd, outdir, "package.json");
|
|
7961
7961
|
const exists = ctx.runtime.fs.existsSync(pkgPath);
|
|
7962
|
-
|
|
7963
|
-
|
|
7964
|
-
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
|
|
7969
|
-
|
|
7970
|
-
const createEntry = (dir) => ({
|
|
7971
|
-
types: ctx.file.extDts(createDir(dir, "index")),
|
|
7972
|
-
require: ctx.file.ext(createDir(dir, "index")),
|
|
7973
|
-
import: ctx.file.ext(createDir(dir, "index"))
|
|
7974
|
-
});
|
|
7975
|
-
exports.push(["./css", createEntry("css")], ["./tokens", createEntry("tokens")], ["./types", createEntry("types")]);
|
|
7976
|
-
if (!ctx.patterns.isEmpty()) exports.push(["./patterns", createEntry("patterns")]);
|
|
7977
|
-
if (!ctx.recipes.isEmpty()) exports.push(["./recipes", createEntry("recipes")]);
|
|
7978
|
-
if (ctx.config.themes) exports.push(["./themes", createEntry("themes")]);
|
|
7979
|
-
const stylesDir = createDir("styles.css");
|
|
7962
|
+
/**
|
|
7963
|
+
* The same map codegen writes into the outdir, re-derived here with the package's
|
|
7964
|
+
* `base` prefix. Shared rather than restated so the entry list has one definition —
|
|
7965
|
+
* this copy had drifted: it advertised a `require` condition pointing at `.mjs`, for
|
|
7966
|
+
* output that is ESM under every setting, and it listed `./types` as a runtime entry
|
|
7967
|
+
* for a directory holding only declarations.
|
|
7968
|
+
*/
|
|
7969
|
+
const generated = generatePackageExports(ctx, base);
|
|
7980
7970
|
const identity = {
|
|
7981
7971
|
name: outdir,
|
|
7982
7972
|
description: "This package is auto-generated by Bamboo CSS",
|
|
@@ -8018,8 +8008,7 @@ async function main() {
|
|
|
8018
8008
|
if (isGenerated) delete content.private;
|
|
8019
8009
|
content.exports = {
|
|
8020
8010
|
...content.exports,
|
|
8021
|
-
...
|
|
8022
|
-
"./styles.css": stylesDir
|
|
8011
|
+
...generated
|
|
8023
8012
|
};
|
|
8024
8013
|
await ctx.runtime.fs.writeFile(pkgPath, JSON.stringify(content, null, 2) + "\n");
|
|
8025
8014
|
logger.info("cli", `Emit package.json to ${pkgPath}`);
|
package/dist/cli-main.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_package = require("./package-
|
|
2
|
+
const require_package = require("./package-BSTVW0IS.cjs");
|
|
3
3
|
let _bamboocss_logger = require("@bamboocss/logger");
|
|
4
4
|
let _bamboocss_node = require("@bamboocss/node");
|
|
5
5
|
let _bamboocss_shared = require("@bamboocss/shared");
|
|
@@ -144,7 +144,7 @@ async function main() {
|
|
|
144
144
|
else stream.end();
|
|
145
145
|
stopProfiling();
|
|
146
146
|
});
|
|
147
|
-
cli.command("cssgen [globOrType]", "Generate the css from files, or generate the css from the specified type which can be: preflight, tokens, static, global, keyframes").option("--silent", "Don't print any logs").option("-m, --minify", "Minify generated code").option("--clean", "Clean the output before generating").option("-c, --config <path>", "Path to bamboo config file").option("-w, --watch", "Watch files and rebuild").option("--minimal", "Do not include CSS generation for theme tokens, preflight, keyframes, static and global css").option("--
|
|
147
|
+
cli.command("cssgen [globOrType]", "Generate the css from files, or generate the css from the specified type which can be: preflight, tokens, static, global, keyframes").option("--silent", "Don't print any logs").option("-m, --minify", "Minify generated code").option("--clean", "Clean the output before generating").option("-c, --config <path>", "Path to bamboo config file").option("-w, --watch", "Watch files and rebuild").option("--minimal", "Do not include CSS generation for theme tokens, preflight, keyframes, static and global css").option("--polyfill", "Polyfill CSS @layers at-rules for older browsers.").option("-p, --poll", "Use polling instead of filesystem events when watching").option("-o, --outfile [file]", "Output file for extracted css, default to './styled-system/styles.css'").option("--splitting", "Emit CSS as separate files per layer (reset, global, tokens, utilities) and per recipe").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--cpu-prof", "Generates a `.cpuprofile` to help debug performance issues").option("--logfile <file>", "Outputs logs to a file").action(async (maybeGlob, flags = {}) => {
|
|
148
148
|
const { silent, config: configPath, outfile, watch, poll, minimal, splitting, ...rest } = flags;
|
|
149
149
|
const cwd = (0, path.resolve)(flags.cwd ?? "");
|
|
150
150
|
const stream = (0, _bamboocss_node.setLogStream)({
|
|
@@ -208,7 +208,7 @@ async function main() {
|
|
|
208
208
|
stopProfiling();
|
|
209
209
|
}
|
|
210
210
|
});
|
|
211
|
-
cli.command("[files]", "Include file glob", { ignoreOptionDefaultValue: true }).option("-o, --outdir <dir>", "Output directory", { default: "styled-system" }).option("-m, --minify", "Minify generated code").option("-w, --watch", "Watch files and rebuild").option("-p, --poll", "Use polling instead of filesystem events when watching").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--preflight", "Enable css reset").option("--silent", "Suppress all messages except errors").option("-e, --exclude <files>", "Exclude files", { default: [] }).option("--clean", "Clean output directory").option("--hash", "Hash the generated classnames to make them shorter").option("--
|
|
211
|
+
cli.command("[files]", "Include file glob", { ignoreOptionDefaultValue: true }).option("-o, --outdir <dir>", "Output directory", { default: "styled-system" }).option("-m, --minify", "Minify generated code").option("-w, --watch", "Watch files and rebuild").option("-p, --poll", "Use polling instead of filesystem events when watching").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--preflight", "Enable css reset").option("--silent", "Suppress all messages except errors").option("-e, --exclude <files>", "Exclude files", { default: [] }).option("--clean", "Clean output directory").option("--hash", "Hash the generated classnames to make them shorter").option("--polyfill", "Polyfill CSS @layers at-rules for older browsers.").option("--emitTokensOnly", "Whether to only emit the `tokens` directory").option("--cpu-prof", "Generates a `.cpuprofile` to help debug performance issues").option("--logfile <file>", "Outputs logs to a file").action(async (files, flags) => {
|
|
212
212
|
const { config: configPath, silent, ...rest } = flags;
|
|
213
213
|
const cwd = (0, path.resolve)(flags.cwd ?? "");
|
|
214
214
|
const stream = (0, _bamboocss_node.setLogStream)({
|
|
@@ -334,24 +334,14 @@ async function main() {
|
|
|
334
334
|
});
|
|
335
335
|
const pkgPath = (0, path.resolve)(cwd, outdir, "package.json");
|
|
336
336
|
const exists = ctx.runtime.fs.existsSync(pkgPath);
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
const createEntry = (dir) => ({
|
|
346
|
-
types: ctx.file.extDts(createDir(dir, "index")),
|
|
347
|
-
require: ctx.file.ext(createDir(dir, "index")),
|
|
348
|
-
import: ctx.file.ext(createDir(dir, "index"))
|
|
349
|
-
});
|
|
350
|
-
exports.push(["./css", createEntry("css")], ["./tokens", createEntry("tokens")], ["./types", createEntry("types")]);
|
|
351
|
-
if (!ctx.patterns.isEmpty()) exports.push(["./patterns", createEntry("patterns")]);
|
|
352
|
-
if (!ctx.recipes.isEmpty()) exports.push(["./recipes", createEntry("recipes")]);
|
|
353
|
-
if (ctx.config.themes) exports.push(["./themes", createEntry("themes")]);
|
|
354
|
-
const stylesDir = createDir("styles.css");
|
|
337
|
+
/**
|
|
338
|
+
* The same map codegen writes into the outdir, re-derived here with the package's
|
|
339
|
+
* `base` prefix. Shared rather than restated so the entry list has one definition —
|
|
340
|
+
* this copy had drifted: it advertised a `require` condition pointing at `.mjs`, for
|
|
341
|
+
* output that is ESM under every setting, and it listed `./types` as a runtime entry
|
|
342
|
+
* for a directory holding only declarations.
|
|
343
|
+
*/
|
|
344
|
+
const generated = (0, _bamboocss_node.generatePackageExports)(ctx, base);
|
|
355
345
|
const identity = {
|
|
356
346
|
name: outdir,
|
|
357
347
|
description: "This package is auto-generated by Bamboo CSS",
|
|
@@ -393,8 +383,7 @@ async function main() {
|
|
|
393
383
|
if (isGenerated) delete content.private;
|
|
394
384
|
content.exports = {
|
|
395
385
|
...content.exports,
|
|
396
|
-
...
|
|
397
|
-
"./styles.css": stylesDir
|
|
386
|
+
...generated
|
|
398
387
|
};
|
|
399
388
|
await ctx.runtime.fs.writeFile(pkgPath, JSON.stringify(content, null, 2) + "\n");
|
|
400
389
|
_bamboocss_logger.logger.info("cli", `Emit package.json to ${pkgPath}`);
|
|
@@ -412,7 +401,7 @@ async function main() {
|
|
|
412
401
|
process.exitCode = 1;
|
|
413
402
|
});
|
|
414
403
|
cli.command("init-mcp", "Initialize MCP configuration for AI clients").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--client <clients>", "AI clients to configure (claude, cursor, vscode, windsurf, codex)").action(async (mcpInitFlags) => {
|
|
415
|
-
const { initMcpConfig } = await Promise.resolve().then(() => require("./mcp-init-
|
|
404
|
+
const { initMcpConfig } = await Promise.resolve().then(() => require("./mcp-init-B9JiIVNX.cjs"));
|
|
416
405
|
const resolvedCwd = (0, path.resolve)(mcpInitFlags.cwd ?? cwd);
|
|
417
406
|
let clients;
|
|
418
407
|
if (mcpInitFlags.client) clients = (Array.isArray(mcpInitFlags.client) ? mcpInitFlags.client : [mcpInitFlags.client]).flatMap((c) => c.split(",")).map((c) => c.trim());
|
package/dist/cli-main.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as version } from "./package-
|
|
1
|
+
import { t as version } from "./package-BpQK2nL7.mjs";
|
|
2
2
|
import { logger } from "@bamboocss/logger";
|
|
3
|
-
import { BambooContext, analyze, buildInfo, codegen, cssgen, debug, generate, loadConfigAndCreateContext, setLogStream, setupConfig, setupGitIgnore, setupPostcss, spec, startProfiling } from "@bamboocss/node";
|
|
3
|
+
import { BambooContext, analyze, buildInfo, codegen, cssgen, debug, generate, generatePackageExports, loadConfigAndCreateContext, setLogStream, setupConfig, setupGitIgnore, setupPostcss, spec, startProfiling } from "@bamboocss/node";
|
|
4
4
|
import { compact } from "@bamboocss/shared";
|
|
5
5
|
import { cac } from "cac";
|
|
6
6
|
import { join, resolve } from "path";
|
|
@@ -142,7 +142,7 @@ async function main() {
|
|
|
142
142
|
else stream.end();
|
|
143
143
|
stopProfiling();
|
|
144
144
|
});
|
|
145
|
-
cli.command("cssgen [globOrType]", "Generate the css from files, or generate the css from the specified type which can be: preflight, tokens, static, global, keyframes").option("--silent", "Don't print any logs").option("-m, --minify", "Minify generated code").option("--clean", "Clean the output before generating").option("-c, --config <path>", "Path to bamboo config file").option("-w, --watch", "Watch files and rebuild").option("--minimal", "Do not include CSS generation for theme tokens, preflight, keyframes, static and global css").option("--
|
|
145
|
+
cli.command("cssgen [globOrType]", "Generate the css from files, or generate the css from the specified type which can be: preflight, tokens, static, global, keyframes").option("--silent", "Don't print any logs").option("-m, --minify", "Minify generated code").option("--clean", "Clean the output before generating").option("-c, --config <path>", "Path to bamboo config file").option("-w, --watch", "Watch files and rebuild").option("--minimal", "Do not include CSS generation for theme tokens, preflight, keyframes, static and global css").option("--polyfill", "Polyfill CSS @layers at-rules for older browsers.").option("-p, --poll", "Use polling instead of filesystem events when watching").option("-o, --outfile [file]", "Output file for extracted css, default to './styled-system/styles.css'").option("--splitting", "Emit CSS as separate files per layer (reset, global, tokens, utilities) and per recipe").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--cpu-prof", "Generates a `.cpuprofile` to help debug performance issues").option("--logfile <file>", "Outputs logs to a file").action(async (maybeGlob, flags = {}) => {
|
|
146
146
|
const { silent, config: configPath, outfile, watch, poll, minimal, splitting, ...rest } = flags;
|
|
147
147
|
const cwd = resolve(flags.cwd ?? "");
|
|
148
148
|
const stream = setLogStream({
|
|
@@ -206,7 +206,7 @@ async function main() {
|
|
|
206
206
|
stopProfiling();
|
|
207
207
|
}
|
|
208
208
|
});
|
|
209
|
-
cli.command("[files]", "Include file glob", { ignoreOptionDefaultValue: true }).option("-o, --outdir <dir>", "Output directory", { default: "styled-system" }).option("-m, --minify", "Minify generated code").option("-w, --watch", "Watch files and rebuild").option("-p, --poll", "Use polling instead of filesystem events when watching").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--preflight", "Enable css reset").option("--silent", "Suppress all messages except errors").option("-e, --exclude <files>", "Exclude files", { default: [] }).option("--clean", "Clean output directory").option("--hash", "Hash the generated classnames to make them shorter").option("--
|
|
209
|
+
cli.command("[files]", "Include file glob", { ignoreOptionDefaultValue: true }).option("-o, --outdir <dir>", "Output directory", { default: "styled-system" }).option("-m, --minify", "Minify generated code").option("-w, --watch", "Watch files and rebuild").option("-p, --poll", "Use polling instead of filesystem events when watching").option("-c, --config <path>", "Path to bamboo config file").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--preflight", "Enable css reset").option("--silent", "Suppress all messages except errors").option("-e, --exclude <files>", "Exclude files", { default: [] }).option("--clean", "Clean output directory").option("--hash", "Hash the generated classnames to make them shorter").option("--polyfill", "Polyfill CSS @layers at-rules for older browsers.").option("--emitTokensOnly", "Whether to only emit the `tokens` directory").option("--cpu-prof", "Generates a `.cpuprofile` to help debug performance issues").option("--logfile <file>", "Outputs logs to a file").action(async (files, flags) => {
|
|
210
210
|
const { config: configPath, silent, ...rest } = flags;
|
|
211
211
|
const cwd = resolve(flags.cwd ?? "");
|
|
212
212
|
const stream = setLogStream({
|
|
@@ -332,24 +332,14 @@ async function main() {
|
|
|
332
332
|
});
|
|
333
333
|
const pkgPath = resolve(cwd, outdir, "package.json");
|
|
334
334
|
const exists = ctx.runtime.fs.existsSync(pkgPath);
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
const createEntry = (dir) => ({
|
|
344
|
-
types: ctx.file.extDts(createDir(dir, "index")),
|
|
345
|
-
require: ctx.file.ext(createDir(dir, "index")),
|
|
346
|
-
import: ctx.file.ext(createDir(dir, "index"))
|
|
347
|
-
});
|
|
348
|
-
exports.push(["./css", createEntry("css")], ["./tokens", createEntry("tokens")], ["./types", createEntry("types")]);
|
|
349
|
-
if (!ctx.patterns.isEmpty()) exports.push(["./patterns", createEntry("patterns")]);
|
|
350
|
-
if (!ctx.recipes.isEmpty()) exports.push(["./recipes", createEntry("recipes")]);
|
|
351
|
-
if (ctx.config.themes) exports.push(["./themes", createEntry("themes")]);
|
|
352
|
-
const stylesDir = createDir("styles.css");
|
|
335
|
+
/**
|
|
336
|
+
* The same map codegen writes into the outdir, re-derived here with the package's
|
|
337
|
+
* `base` prefix. Shared rather than restated so the entry list has one definition —
|
|
338
|
+
* this copy had drifted: it advertised a `require` condition pointing at `.mjs`, for
|
|
339
|
+
* output that is ESM under every setting, and it listed `./types` as a runtime entry
|
|
340
|
+
* for a directory holding only declarations.
|
|
341
|
+
*/
|
|
342
|
+
const generated = generatePackageExports(ctx, base);
|
|
353
343
|
const identity = {
|
|
354
344
|
name: outdir,
|
|
355
345
|
description: "This package is auto-generated by Bamboo CSS",
|
|
@@ -391,8 +381,7 @@ async function main() {
|
|
|
391
381
|
if (isGenerated) delete content.private;
|
|
392
382
|
content.exports = {
|
|
393
383
|
...content.exports,
|
|
394
|
-
...
|
|
395
|
-
"./styles.css": stylesDir
|
|
384
|
+
...generated
|
|
396
385
|
};
|
|
397
386
|
await ctx.runtime.fs.writeFile(pkgPath, JSON.stringify(content, null, 2) + "\n");
|
|
398
387
|
logger.info("cli", `Emit package.json to ${pkgPath}`);
|
|
@@ -410,7 +399,7 @@ async function main() {
|
|
|
410
399
|
process.exitCode = 1;
|
|
411
400
|
});
|
|
412
401
|
cli.command("init-mcp", "Initialize MCP configuration for AI clients").option("--cwd <cwd>", "Current working directory", { default: cwd }).option("--client <clients>", "AI clients to configure (claude, cursor, vscode, windsurf, codex)").action(async (mcpInitFlags) => {
|
|
413
|
-
const { initMcpConfig } = await import("./mcp-init-
|
|
402
|
+
const { initMcpConfig } = await import("./mcp-init-pYR-Xb5g.mjs");
|
|
414
403
|
const resolvedCwd = resolve(mcpInitFlags.cwd ?? cwd);
|
|
415
404
|
let clients;
|
|
416
405
|
if (mcpInitFlags.client) clients = (Array.isArray(mcpInitFlags.client) ? mcpInitFlags.client : [mcpInitFlags.client]).flatMap((c) => c.split(",")).map((c) => c.trim());
|
package/dist/interactive.cjs
CHANGED
|
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
let _clack_prompts = require("@clack/prompts");
|
|
25
25
|
_clack_prompts = __toESM(_clack_prompts);
|
|
26
26
|
//#region package.json
|
|
27
|
-
var version = "1.
|
|
27
|
+
var version = "1.31.0";
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region src/interactive.ts
|
|
30
30
|
const interactive = async () => {
|
package/dist/interactive.mjs
CHANGED
|
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
}) : target, mod));
|
|
22
22
|
//#endregion
|
|
23
23
|
//#region package.json
|
|
24
|
-
var version = "1.
|
|
24
|
+
var version = "1.31.0";
|
|
25
25
|
//#endregion
|
|
26
26
|
Object.defineProperty(exports, "__toESM", {
|
|
27
27
|
enumerable: true,
|
package/dist/presets.cjs
CHANGED
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
-
key = keys[i];
|
|
11
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
-
get: ((k) => from[k]).bind(null, key),
|
|
13
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
-
value: mod,
|
|
20
|
-
enumerable: true
|
|
21
|
-
}) : target, mod));
|
|
22
|
-
//#endregion
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
23
5
|
let _bamboocss_preset_bamboo = require("@bamboocss/preset-bamboo");
|
|
24
|
-
|
|
6
|
+
let _bamboocss_preset_base = require("@bamboocss/preset-base");
|
|
25
7
|
//#region src/presets.ts
|
|
26
|
-
|
|
8
|
+
/**
|
|
9
|
+
* The presets a config loads when it lists none.
|
|
10
|
+
*
|
|
11
|
+
* `presets` is authoritative, so a config that adds one has to say what it is adding to:
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* import { defaultPresets } from '@bamboocss/dev/presets'
|
|
15
|
+
* export default defineConfig({ presets: [...defaultPresets, myPreset] })
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* Spread it — the array is shared.
|
|
19
|
+
*/
|
|
20
|
+
const defaultPresets = [_bamboocss_preset_base.preset, _bamboocss_preset_bamboo.preset];
|
|
21
|
+
var presets_default = _bamboocss_preset_bamboo.preset;
|
|
27
22
|
//#endregion
|
|
28
|
-
|
|
23
|
+
exports.default = presets_default;
|
|
24
|
+
exports.defaultPresets = defaultPresets;
|
|
25
|
+
exports.presetBamboo = _bamboocss_preset_bamboo.preset;
|
|
26
|
+
exports.presetBase = _bamboocss_preset_base.preset;
|