@yamada-ui/cli 0.2.0 → 0.3.1
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/tokens/create-theme-typings.js +29 -6
- package/dist/command/tokens/index.js +210 -398
- package/dist/index.js +7335 -5184
- package/dist/utils/cli.js +4264 -1836
- package/dist/utils/index.js +4264 -1836
- package/package.json +5 -5
|
@@ -20,9 +20,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
20
20
|
};
|
|
21
21
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
22
|
|
|
23
|
-
// ../../node_modules/.pnpm/tsup@
|
|
23
|
+
// ../../node_modules/.pnpm/tsup@7.2.0_@swc+core@1.3.74_ts-node@10.9.1_typescript@5.1.6/node_modules/tsup/assets/cjs_shims.js
|
|
24
24
|
var init_cjs_shims = __esm({
|
|
25
|
-
"../../node_modules/.pnpm/tsup@
|
|
25
|
+
"../../node_modules/.pnpm/tsup@7.2.0_@swc+core@1.3.74_ts-node@10.9.1_typescript@5.1.6/node_modules/tsup/assets/cjs_shims.js"() {
|
|
26
|
+
"use strict";
|
|
26
27
|
}
|
|
27
28
|
});
|
|
28
29
|
|
|
@@ -81,10 +82,30 @@ var config = [
|
|
|
81
82
|
];
|
|
82
83
|
|
|
83
84
|
// src/command/tokens/create-theme-typings.ts
|
|
84
|
-
var defaultColors = [
|
|
85
|
-
|
|
85
|
+
var defaultColors = [
|
|
86
|
+
"brand",
|
|
87
|
+
"primary",
|
|
88
|
+
"secondary",
|
|
89
|
+
"warning",
|
|
90
|
+
"danger",
|
|
91
|
+
"link"
|
|
92
|
+
];
|
|
93
|
+
var hues = [
|
|
94
|
+
"50",
|
|
95
|
+
"100",
|
|
96
|
+
"200",
|
|
97
|
+
"300",
|
|
98
|
+
"400",
|
|
99
|
+
"500",
|
|
100
|
+
"600",
|
|
101
|
+
"700",
|
|
102
|
+
"800",
|
|
103
|
+
"900"
|
|
104
|
+
];
|
|
86
105
|
var printComponent = (components) => `components: { ${Object.entries(components).map(
|
|
87
|
-
([key, unions]) => `${key.match(/^[a-zA-Z0-9\-_]+$/) ? key : `"${key}"`}: { ${print(
|
|
106
|
+
([key, unions]) => `${key.match(/^[a-zA-Z0-9\-_]+$/) ? key : `"${key}"`}: { ${print(
|
|
107
|
+
unions
|
|
108
|
+
)}}`
|
|
88
109
|
).join(`
|
|
89
110
|
`)} }`;
|
|
90
111
|
var print = (unions) => Object.entries(unions).sort(([a], [b]) => a.localeCompare(b)).map(
|
|
@@ -150,7 +171,9 @@ var extractPaths = (target, maxDepth = 3) => {
|
|
|
150
171
|
return [];
|
|
151
172
|
return Object.entries(target).reduce((array, [key, value]) => {
|
|
152
173
|
if (isObject(value)) {
|
|
153
|
-
extractPaths(value, maxDepth - 1).forEach(
|
|
174
|
+
extractPaths(value, maxDepth - 1).forEach(
|
|
175
|
+
(nestedKey) => array.push(`${key}.${nestedKey}`)
|
|
176
|
+
);
|
|
154
177
|
} else {
|
|
155
178
|
array.push(key);
|
|
156
179
|
}
|