@yamada-ui/cli 1.1.1-dev-20240815131426 → 1.1.1-dev-20240816015510
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/index.js
CHANGED
|
@@ -613,7 +613,7 @@ var config = [
|
|
|
613
613
|
];
|
|
614
614
|
|
|
615
615
|
// src/command/tokens/create-theme-typings.ts
|
|
616
|
-
var
|
|
616
|
+
var TONES = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
617
617
|
var printComponent = (components) => `components: { ${Object.entries(components).map(
|
|
618
618
|
([key, unions]) => `${key.match(/^[a-zA-Z0-9\-_]+$/) ? key : `"${key}"`}: { ${print(
|
|
619
619
|
unions
|
|
@@ -663,7 +663,7 @@ var extractTransitions = (theme) => {
|
|
|
663
663
|
var isTone = (value) => {
|
|
664
664
|
if (!isObject(value)) return false;
|
|
665
665
|
const keys = Object.keys(value);
|
|
666
|
-
return
|
|
666
|
+
return TONES.every((key) => keys.includes(key.toString()));
|
|
667
667
|
};
|
|
668
668
|
var extractColorSchemes = (theme) => {
|
|
669
669
|
const { colors, semantics } = theme;
|
|
@@ -680,14 +680,14 @@ var extractColorSchemes = (theme) => {
|
|
|
680
680
|
Object.entries(semantics.colorSchemes).forEach(([key, value]) => {
|
|
681
681
|
if (isTone(value)) {
|
|
682
682
|
results.colorSchemes.push(key);
|
|
683
|
-
results.colorSchemeColors.push(...
|
|
683
|
+
results.colorSchemeColors.push(...TONES.map((tone) => `${key}.${tone}`));
|
|
684
684
|
} else {
|
|
685
685
|
const hasColorScheme = isArray(value) ? value.every(
|
|
686
686
|
(key2) => isString(key2) && Object.keys(colors).includes(key2)
|
|
687
687
|
) : Object.keys(colors).some((key2) => key2 === value);
|
|
688
688
|
if (!hasColorScheme) return;
|
|
689
689
|
results.colorSchemes.push(key);
|
|
690
|
-
results.colorSchemeColors.push(...
|
|
690
|
+
results.colorSchemeColors.push(...TONES.map((tone) => `${key}.${tone}`));
|
|
691
691
|
}
|
|
692
692
|
});
|
|
693
693
|
return results;
|
|
@@ -111,7 +111,7 @@ var config = [
|
|
|
111
111
|
];
|
|
112
112
|
|
|
113
113
|
// src/command/tokens/create-theme-typings.ts
|
|
114
|
-
var
|
|
114
|
+
var TONES = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
115
115
|
var printComponent = (components) => `components: { ${Object.entries(components).map(
|
|
116
116
|
([key, unions]) => `${key.match(/^[a-zA-Z0-9\-_]+$/) ? key : `"${key}"`}: { ${print(
|
|
117
117
|
unions
|
|
@@ -161,7 +161,7 @@ var extractTransitions = (theme) => {
|
|
|
161
161
|
var isTone = (value) => {
|
|
162
162
|
if (!isObject(value)) return false;
|
|
163
163
|
const keys = Object.keys(value);
|
|
164
|
-
return
|
|
164
|
+
return TONES.every((key) => keys.includes(key.toString()));
|
|
165
165
|
};
|
|
166
166
|
var extractColorSchemes = (theme) => {
|
|
167
167
|
const { colors, semantics } = theme;
|
|
@@ -178,14 +178,14 @@ var extractColorSchemes = (theme) => {
|
|
|
178
178
|
Object.entries(semantics.colorSchemes).forEach(([key, value]) => {
|
|
179
179
|
if (isTone(value)) {
|
|
180
180
|
results.colorSchemes.push(key);
|
|
181
|
-
results.colorSchemeColors.push(...
|
|
181
|
+
results.colorSchemeColors.push(...TONES.map((tone) => `${key}.${tone}`));
|
|
182
182
|
} else {
|
|
183
183
|
const hasColorScheme = isArray(value) ? value.every(
|
|
184
184
|
(key2) => isString(key2) && Object.keys(colors).includes(key2)
|
|
185
185
|
) : Object.keys(colors).some((key2) => key2 === value);
|
|
186
186
|
if (!hasColorScheme) return;
|
|
187
187
|
results.colorSchemes.push(key);
|
|
188
|
-
results.colorSchemeColors.push(...
|
|
188
|
+
results.colorSchemeColors.push(...TONES.map((tone) => `${key}.${tone}`));
|
|
189
189
|
}
|
|
190
190
|
});
|
|
191
191
|
return results;
|
|
@@ -609,7 +609,7 @@ var config = [
|
|
|
609
609
|
];
|
|
610
610
|
|
|
611
611
|
// src/command/tokens/create-theme-typings.ts
|
|
612
|
-
var
|
|
612
|
+
var TONES = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
613
613
|
var printComponent = (components) => `components: { ${Object.entries(components).map(
|
|
614
614
|
([key, unions]) => `${key.match(/^[a-zA-Z0-9\-_]+$/) ? key : `"${key}"`}: { ${print(
|
|
615
615
|
unions
|
|
@@ -659,7 +659,7 @@ var extractTransitions = (theme) => {
|
|
|
659
659
|
var isTone = (value) => {
|
|
660
660
|
if (!isObject(value)) return false;
|
|
661
661
|
const keys = Object.keys(value);
|
|
662
|
-
return
|
|
662
|
+
return TONES.every((key) => keys.includes(key.toString()));
|
|
663
663
|
};
|
|
664
664
|
var extractColorSchemes = (theme) => {
|
|
665
665
|
const { colors, semantics } = theme;
|
|
@@ -676,14 +676,14 @@ var extractColorSchemes = (theme) => {
|
|
|
676
676
|
Object.entries(semantics.colorSchemes).forEach(([key, value]) => {
|
|
677
677
|
if (isTone(value)) {
|
|
678
678
|
results.colorSchemes.push(key);
|
|
679
|
-
results.colorSchemeColors.push(...
|
|
679
|
+
results.colorSchemeColors.push(...TONES.map((tone) => `${key}.${tone}`));
|
|
680
680
|
} else {
|
|
681
681
|
const hasColorScheme = isArray(value) ? value.every(
|
|
682
682
|
(key2) => isString(key2) && Object.keys(colors).includes(key2)
|
|
683
683
|
) : Object.keys(colors).some((key2) => key2 === value);
|
|
684
684
|
if (!hasColorScheme) return;
|
|
685
685
|
results.colorSchemes.push(key);
|
|
686
|
-
results.colorSchemeColors.push(...
|
|
686
|
+
results.colorSchemeColors.push(...TONES.map((tone) => `${key}.${tone}`));
|
|
687
687
|
}
|
|
688
688
|
});
|
|
689
689
|
return results;
|
package/dist/index.js
CHANGED
|
@@ -9124,7 +9124,7 @@ var config = [
|
|
|
9124
9124
|
];
|
|
9125
9125
|
|
|
9126
9126
|
// src/command/tokens/create-theme-typings.ts
|
|
9127
|
-
var
|
|
9127
|
+
var TONES = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
9128
9128
|
var printComponent = (components) => `components: { ${Object.entries(components).map(
|
|
9129
9129
|
([key, unions]) => `${key.match(/^[a-zA-Z0-9\-_]+$/) ? key : `"${key}"`}: { ${print(
|
|
9130
9130
|
unions
|
|
@@ -9174,7 +9174,7 @@ var extractTransitions = (theme) => {
|
|
|
9174
9174
|
var isTone = (value) => {
|
|
9175
9175
|
if (!isObject(value)) return false;
|
|
9176
9176
|
const keys = Object.keys(value);
|
|
9177
|
-
return
|
|
9177
|
+
return TONES.every((key) => keys.includes(key.toString()));
|
|
9178
9178
|
};
|
|
9179
9179
|
var extractColorSchemes = (theme) => {
|
|
9180
9180
|
const { colors, semantics } = theme;
|
|
@@ -9191,14 +9191,14 @@ var extractColorSchemes = (theme) => {
|
|
|
9191
9191
|
Object.entries(semantics.colorSchemes).forEach(([key, value]) => {
|
|
9192
9192
|
if (isTone(value)) {
|
|
9193
9193
|
results.colorSchemes.push(key);
|
|
9194
|
-
results.colorSchemeColors.push(...
|
|
9194
|
+
results.colorSchemeColors.push(...TONES.map((tone) => `${key}.${tone}`));
|
|
9195
9195
|
} else {
|
|
9196
9196
|
const hasColorScheme = isArray(value) ? value.every(
|
|
9197
9197
|
(key2) => isString(key2) && Object.keys(colors).includes(key2)
|
|
9198
9198
|
) : Object.keys(colors).some((key2) => key2 === value);
|
|
9199
9199
|
if (!hasColorScheme) return;
|
|
9200
9200
|
results.colorSchemes.push(key);
|
|
9201
|
-
results.colorSchemeColors.push(...
|
|
9201
|
+
results.colorSchemeColors.push(...TONES.map((tone) => `${key}.${tone}`));
|
|
9202
9202
|
}
|
|
9203
9203
|
});
|
|
9204
9204
|
return results;
|