@yamada-ui/cli 1.0.0 → 1.0.1-dev-20240104145458
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/command/colors/index.js +11 -8
- package/dist/command/tokens/create-theme-typings.js +16 -3
- package/dist/command/tokens/index.js +18 -15
- package/dist/index.js +673 -639
- package/dist/utils/cli.js +469 -438
- package/dist/utils/index.js +664 -630
- package/dist/utils/prettier.js +14 -1
- package/package.json +2 -2
|
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
// ../../node_modules/.pnpm/tsup@8.0.1_@swc+core@1.3.
|
|
33
|
+
// ../../node_modules/.pnpm/registry.npmjs.org+tsup@8.0.1_@swc+core@1.3.101_ts-node@10.9.2_typescript@5.3.3/node_modules/tsup/assets/cjs_shims.js
|
|
34
34
|
var init_cjs_shims = __esm({
|
|
35
|
-
"../../node_modules/.pnpm/tsup@8.0.1_@swc+core@1.3.
|
|
35
|
+
"../../node_modules/.pnpm/registry.npmjs.org+tsup@8.0.1_@swc+core@1.3.101_ts-node@10.9.2_typescript@5.3.3/node_modules/tsup/assets/cjs_shims.js"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
}
|
|
38
38
|
});
|
|
@@ -47,10 +47,10 @@ module.exports = __toCommonJS(colors_exports);
|
|
|
47
47
|
init_cjs_shims();
|
|
48
48
|
var p = __toESM(require("@clack/prompts"));
|
|
49
49
|
|
|
50
|
-
// ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
|
|
50
|
+
// ../../node_modules/.pnpm/registry.npmjs.org+chalk@5.3.0/node_modules/chalk/source/index.js
|
|
51
51
|
init_cjs_shims();
|
|
52
52
|
|
|
53
|
-
// ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
53
|
+
// ../../node_modules/.pnpm/registry.npmjs.org+chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
54
54
|
init_cjs_shims();
|
|
55
55
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
56
56
|
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
@@ -237,7 +237,7 @@ function assembleStyles() {
|
|
|
237
237
|
var ansiStyles = assembleStyles();
|
|
238
238
|
var ansi_styles_default = ansiStyles;
|
|
239
239
|
|
|
240
|
-
// ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
|
|
240
|
+
// ../../node_modules/.pnpm/registry.npmjs.org+chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
|
|
241
241
|
init_cjs_shims();
|
|
242
242
|
var import_node_process = __toESM(require("process"), 1);
|
|
243
243
|
var import_node_os = __toESM(require("os"), 1);
|
|
@@ -364,7 +364,7 @@ var supportsColor = {
|
|
|
364
364
|
};
|
|
365
365
|
var supports_color_default = supportsColor;
|
|
366
366
|
|
|
367
|
-
// ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js
|
|
367
|
+
// ../../node_modules/.pnpm/registry.npmjs.org+chalk@5.3.0/node_modules/chalk/source/utilities.js
|
|
368
368
|
init_cjs_shims();
|
|
369
369
|
function stringReplaceAll(string, substring, replacer) {
|
|
370
370
|
let index = string.indexOf(substring);
|
|
@@ -395,7 +395,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
|
395
395
|
return returnValue;
|
|
396
396
|
}
|
|
397
397
|
|
|
398
|
-
// ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
|
|
398
|
+
// ../../node_modules/.pnpm/registry.npmjs.org+chalk@5.3.0/node_modules/chalk/source/index.js
|
|
399
399
|
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
400
400
|
var GENERATOR = Symbol("GENERATOR");
|
|
401
401
|
var STYLER = Symbol("STYLER");
|
|
@@ -547,9 +547,12 @@ var import_color2k = require("color2k");
|
|
|
547
547
|
|
|
548
548
|
// src/utils/prettier.ts
|
|
549
549
|
init_cjs_shims();
|
|
550
|
+
var import_path = __toESM(require("path"));
|
|
550
551
|
var import_prettier = require("prettier");
|
|
551
552
|
var prettier = async (content, options) => {
|
|
552
|
-
const prettierConfig = await (0, import_prettier.resolveConfig)(
|
|
553
|
+
const prettierConfig = await (0, import_prettier.resolveConfig)(
|
|
554
|
+
import_path.default.join(process.cwd(), ".prettierrc")
|
|
555
|
+
);
|
|
553
556
|
try {
|
|
554
557
|
return (0, import_prettier.format)(content, {
|
|
555
558
|
...prettierConfig,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __esm = (fn, res) => function __init() {
|
|
7
9
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
@@ -18,11 +20,19 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
20
|
}
|
|
19
21
|
return to;
|
|
20
22
|
};
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
24
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
25
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
26
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
27
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
28
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
29
|
+
mod
|
|
30
|
+
));
|
|
21
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
32
|
|
|
23
|
-
// ../../node_modules/.pnpm/tsup@8.0.1_@swc+core@1.3.
|
|
33
|
+
// ../../node_modules/.pnpm/registry.npmjs.org+tsup@8.0.1_@swc+core@1.3.101_ts-node@10.9.2_typescript@5.3.3/node_modules/tsup/assets/cjs_shims.js
|
|
24
34
|
var init_cjs_shims = __esm({
|
|
25
|
-
"../../node_modules/.pnpm/tsup@8.0.1_@swc+core@1.3.
|
|
35
|
+
"../../node_modules/.pnpm/registry.npmjs.org+tsup@8.0.1_@swc+core@1.3.101_ts-node@10.9.2_typescript@5.3.3/node_modules/tsup/assets/cjs_shims.js"() {
|
|
26
36
|
"use strict";
|
|
27
37
|
}
|
|
28
38
|
});
|
|
@@ -50,9 +60,12 @@ var isArray = (value) => Array.isArray(value);
|
|
|
50
60
|
|
|
51
61
|
// src/utils/prettier.ts
|
|
52
62
|
init_cjs_shims();
|
|
63
|
+
var import_path = __toESM(require("path"));
|
|
53
64
|
var import_prettier = require("prettier");
|
|
54
65
|
var prettier = async (content, options) => {
|
|
55
|
-
const prettierConfig = await (0, import_prettier.resolveConfig)(
|
|
66
|
+
const prettierConfig = await (0, import_prettier.resolveConfig)(
|
|
67
|
+
import_path.default.join(process.cwd(), ".prettierrc")
|
|
68
|
+
);
|
|
56
69
|
try {
|
|
57
70
|
return (0, import_prettier.format)(content, {
|
|
58
71
|
...prettierConfig,
|
|
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
// ../../node_modules/.pnpm/tsup@8.0.1_@swc+core@1.3.
|
|
33
|
+
// ../../node_modules/.pnpm/registry.npmjs.org+tsup@8.0.1_@swc+core@1.3.101_ts-node@10.9.2_typescript@5.3.3/node_modules/tsup/assets/cjs_shims.js
|
|
34
34
|
var init_cjs_shims = __esm({
|
|
35
|
-
"../../node_modules/.pnpm/tsup@8.0.1_@swc+core@1.3.
|
|
35
|
+
"../../node_modules/.pnpm/registry.npmjs.org+tsup@8.0.1_@swc+core@1.3.101_ts-node@10.9.2_typescript@5.3.3/node_modules/tsup/assets/cjs_shims.js"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
}
|
|
38
38
|
});
|
|
@@ -46,14 +46,14 @@ __export(tokens_exports, {
|
|
|
46
46
|
module.exports = __toCommonJS(tokens_exports);
|
|
47
47
|
init_cjs_shims();
|
|
48
48
|
var import_promises = require("fs/promises");
|
|
49
|
-
var
|
|
49
|
+
var import_path3 = __toESM(require("path"));
|
|
50
50
|
var p = __toESM(require("@clack/prompts"));
|
|
51
51
|
var import_bundle_n_require = require("bundle-n-require");
|
|
52
52
|
|
|
53
|
-
// ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
|
|
53
|
+
// ../../node_modules/.pnpm/registry.npmjs.org+chalk@5.3.0/node_modules/chalk/source/index.js
|
|
54
54
|
init_cjs_shims();
|
|
55
55
|
|
|
56
|
-
// ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
56
|
+
// ../../node_modules/.pnpm/registry.npmjs.org+chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
57
57
|
init_cjs_shims();
|
|
58
58
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
59
59
|
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
@@ -240,7 +240,7 @@ function assembleStyles() {
|
|
|
240
240
|
var ansiStyles = assembleStyles();
|
|
241
241
|
var ansi_styles_default = ansiStyles;
|
|
242
242
|
|
|
243
|
-
// ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
|
|
243
|
+
// ../../node_modules/.pnpm/registry.npmjs.org+chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
|
|
244
244
|
init_cjs_shims();
|
|
245
245
|
var import_node_process = __toESM(require("process"), 1);
|
|
246
246
|
var import_node_os = __toESM(require("os"), 1);
|
|
@@ -367,7 +367,7 @@ var supportsColor = {
|
|
|
367
367
|
};
|
|
368
368
|
var supports_color_default = supportsColor;
|
|
369
369
|
|
|
370
|
-
// ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js
|
|
370
|
+
// ../../node_modules/.pnpm/registry.npmjs.org+chalk@5.3.0/node_modules/chalk/source/utilities.js
|
|
371
371
|
init_cjs_shims();
|
|
372
372
|
function stringReplaceAll(string, substring, replacer) {
|
|
373
373
|
let index = string.indexOf(substring);
|
|
@@ -398,7 +398,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
|
398
398
|
return returnValue;
|
|
399
399
|
}
|
|
400
400
|
|
|
401
|
-
// ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
|
|
401
|
+
// ../../node_modules/.pnpm/registry.npmjs.org+chalk@5.3.0/node_modules/chalk/source/index.js
|
|
402
402
|
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
403
403
|
var GENERATOR = Symbol("GENERATOR");
|
|
404
404
|
var STYLER = Symbol("STYLER");
|
|
@@ -558,9 +558,12 @@ var isArray = (value) => Array.isArray(value);
|
|
|
558
558
|
|
|
559
559
|
// src/utils/prettier.ts
|
|
560
560
|
init_cjs_shims();
|
|
561
|
+
var import_path = __toESM(require("path"));
|
|
561
562
|
var import_prettier = require("prettier");
|
|
562
563
|
var prettier = async (content, options) => {
|
|
563
|
-
const prettierConfig = await (0, import_prettier.resolveConfig)(
|
|
564
|
+
const prettierConfig = await (0, import_prettier.resolveConfig)(
|
|
565
|
+
import_path.default.join(process.cwd(), ".prettierrc")
|
|
566
|
+
);
|
|
564
567
|
try {
|
|
565
568
|
return (0, import_prettier.format)(content, {
|
|
566
569
|
...prettierConfig,
|
|
@@ -762,7 +765,7 @@ export interface GeneratedTheme extends UITheme { ${print(
|
|
|
762
765
|
|
|
763
766
|
// src/command/tokens/resolve-output-path.ts
|
|
764
767
|
init_cjs_shims();
|
|
765
|
-
var
|
|
768
|
+
var import_path2 = __toESM(require("path"));
|
|
766
769
|
var import_glob = require("glob");
|
|
767
770
|
var themePath = [
|
|
768
771
|
"node_modules",
|
|
@@ -773,8 +776,8 @@ var themePath = [
|
|
|
773
776
|
];
|
|
774
777
|
var resolveThemePath = async () => {
|
|
775
778
|
const paths = [
|
|
776
|
-
|
|
777
|
-
|
|
779
|
+
import_path2.default.join("node_modules", ".pnpm", "@yamada-ui+core@*", ...themePath),
|
|
780
|
+
import_path2.default.join(...themePath)
|
|
778
781
|
];
|
|
779
782
|
const triedPaths = await Promise.all(
|
|
780
783
|
paths.map(async (possiblePath) => {
|
|
@@ -787,11 +790,11 @@ var resolveThemePath = async () => {
|
|
|
787
790
|
const resolvedPath = triedPaths.find(Boolean);
|
|
788
791
|
if (!resolvedPath)
|
|
789
792
|
return;
|
|
790
|
-
return
|
|
793
|
+
return import_path2.default.resolve(process.cwd(), resolvedPath);
|
|
791
794
|
};
|
|
792
795
|
var resolveOutputPath = async (outPath) => {
|
|
793
796
|
if (outPath)
|
|
794
|
-
return
|
|
797
|
+
return import_path2.default.resolve(process.cwd(), outPath);
|
|
795
798
|
const themePath2 = await resolveThemePath();
|
|
796
799
|
if (!themePath2)
|
|
797
800
|
throw new Error(
|
|
@@ -830,7 +833,7 @@ var generateThemeTypings = async ({
|
|
|
830
833
|
};
|
|
831
834
|
var actionTokens = async (themeFile, { out: outFile, watch: watchFile }) => {
|
|
832
835
|
const readFile = async () => {
|
|
833
|
-
const filePath =
|
|
836
|
+
const filePath = import_path3.default.resolve(themeFile);
|
|
834
837
|
const { mod: theme, dependencies } = await (0, import_bundle_n_require.bundleNRequire)(filePath);
|
|
835
838
|
return { theme, dependencies };
|
|
836
839
|
};
|