@yamada-ui/cli 0.3.1 → 0.4.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.
@@ -37,6 +37,7 @@ var config = [
37
37
  { key: "sizes", maxScanDepth: 2 },
38
38
  { key: "spaces", flatMap: (value) => [value, `-${value}`] },
39
39
  { key: "zIndices" },
40
+ { key: "animations", omitScanKeys: ["keyframes"] },
40
41
  { key: "gradients" }
41
42
  ];
42
43
  // Annotate the CommonJS export names for ESM import in node:
@@ -20,9 +20,9 @@ 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@7.2.0_@swc+core@1.3.74_ts-node@10.9.1_typescript@5.1.6/node_modules/tsup/assets/cjs_shims.js
23
+ // ../../node_modules/.pnpm/tsup@7.2.0_@swc+core@1.3.83_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/assets/cjs_shims.js
24
24
  var init_cjs_shims = __esm({
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"() {
25
+ "../../node_modules/.pnpm/tsup@7.2.0_@swc+core@1.3.83_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/assets/cjs_shims.js"() {
26
26
  "use strict";
27
27
  }
28
28
  });
@@ -78,6 +78,7 @@ var config = [
78
78
  { key: "sizes", maxScanDepth: 2 },
79
79
  { key: "spaces", flatMap: (value) => [value, `-${value}`] },
80
80
  { key: "zIndices" },
81
+ { key: "animations", omitScanKeys: ["keyframes"] },
81
82
  { key: "gradients" }
82
83
  ];
83
84
 
@@ -100,7 +101,8 @@ var hues = [
100
101
  "600",
101
102
  "700",
102
103
  "800",
103
- "900"
104
+ "900",
105
+ "950"
104
106
  ];
105
107
  var printComponent = (components) => `components: { ${Object.entries(components).map(
106
108
  ([key, unions]) => `${key.match(/^[a-zA-Z0-9\-_]+$/) ? key : `"${key}"`}: { ${print(
@@ -111,9 +113,7 @@ var printComponent = (components) => `components: { ${Object.entries(components)
111
113
  var print = (unions) => Object.entries(unions).sort(([a], [b]) => a.localeCompare(b)).map(
112
114
  ([key, union]) => `${key}: ${union.map((value) => `"${value}"`).concat(["(string & {})"]).join(" | ")};`
113
115
  ).join("\n");
114
- var extractComponents = ({
115
- components = {}
116
- }) => Object.entries(components).reduce(
116
+ var extractComponents = ({ components = {} }) => Object.entries(components).reduce(
117
117
  (obj, [key, { sizes, variants }]) => {
118
118
  if (sizes || variants) {
119
119
  obj[key] = {
@@ -166,12 +166,12 @@ var extractColorSchemes = (theme) => {
166
166
  return array;
167
167
  }, []);
168
168
  };
169
- var extractPaths = (target, maxDepth = 3) => {
170
- if (!isObject(target) && !Array.isArray(target) || !maxDepth)
169
+ var extractPaths = (target, maxDepth = 3, omitKeys = []) => {
170
+ if (!isObject(target) && !isArray(target) || !maxDepth)
171
171
  return [];
172
172
  return Object.entries(target).reduce((array, [key, value]) => {
173
- if (isObject(value)) {
174
- extractPaths(value, maxDepth - 1).forEach(
173
+ if (isObject(value) && !Object.keys(value).some((key2) => omitKeys.includes(key2))) {
174
+ extractPaths(value, maxDepth - 1, omitKeys).forEach(
175
175
  (nestedKey) => array.push(`${key}.${nestedKey}`)
176
176
  );
177
177
  } else {
@@ -189,11 +189,17 @@ var extractKeys = (theme, key) => {
189
189
  };
190
190
  var createThemeTypings = async (theme) => {
191
191
  const unions = config.reduce(
192
- (obj, { key, maxScanDepth, filter = () => true, flatMap = (value) => value }) => {
192
+ (obj, {
193
+ key,
194
+ maxScanDepth,
195
+ omitScanKeys,
196
+ filter = () => true,
197
+ flatMap = (value) => value
198
+ }) => {
193
199
  const target = theme[key];
194
200
  obj[key] = [];
195
201
  if (isObject(target) || isArray(target)) {
196
- obj[key] = extractPaths(target, maxScanDepth).filter(filter).flatMap(flatMap);
202
+ obj[key] = extractPaths(target, maxScanDepth, omitScanKeys).filter(filter).flatMap(flatMap);
197
203
  }
198
204
  if (isObject(theme.semantics)) {
199
205
  const semanticKeys = extractKeys(theme.semantics, key).filter(filter).flatMap(flatMap);
@@ -33,9 +33,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  ));
34
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
 
36
- // ../../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
36
+ // ../../node_modules/.pnpm/tsup@7.2.0_@swc+core@1.3.83_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/assets/cjs_shims.js
37
37
  var init_cjs_shims = __esm({
38
- "../../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"() {
38
+ "../../node_modules/.pnpm/tsup@7.2.0_@swc+core@1.3.83_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/assets/cjs_shims.js"() {
39
39
  "use strict";
40
40
  }
41
41
  });
@@ -6462,6 +6462,7 @@ var config = [
6462
6462
  { key: "sizes", maxScanDepth: 2 },
6463
6463
  { key: "spaces", flatMap: (value) => [value, `-${value}`] },
6464
6464
  { key: "zIndices" },
6465
+ { key: "animations", omitScanKeys: ["keyframes"] },
6465
6466
  { key: "gradients" }
6466
6467
  ];
6467
6468
 
@@ -6484,7 +6485,8 @@ var hues = [
6484
6485
  "600",
6485
6486
  "700",
6486
6487
  "800",
6487
- "900"
6488
+ "900",
6489
+ "950"
6488
6490
  ];
6489
6491
  var printComponent = (components) => `components: { ${Object.entries(components).map(
6490
6492
  ([key, unions]) => `${key.match(/^[a-zA-Z0-9\-_]+$/) ? key : `"${key}"`}: { ${print(
@@ -6495,9 +6497,7 @@ var printComponent = (components) => `components: { ${Object.entries(components)
6495
6497
  var print = (unions) => Object.entries(unions).sort(([a], [b]) => a.localeCompare(b)).map(
6496
6498
  ([key, union]) => `${key}: ${union.map((value) => `"${value}"`).concat(["(string & {})"]).join(" | ")};`
6497
6499
  ).join("\n");
6498
- var extractComponents = ({
6499
- components = {}
6500
- }) => Object.entries(components).reduce(
6500
+ var extractComponents = ({ components = {} }) => Object.entries(components).reduce(
6501
6501
  (obj, [key, { sizes, variants }]) => {
6502
6502
  if (sizes || variants) {
6503
6503
  obj[key] = {
@@ -6550,12 +6550,12 @@ var extractColorSchemes = (theme) => {
6550
6550
  return array;
6551
6551
  }, []);
6552
6552
  };
6553
- var extractPaths = (target, maxDepth = 3) => {
6554
- if (!isObject(target) && !Array.isArray(target) || !maxDepth)
6553
+ var extractPaths = (target, maxDepth = 3, omitKeys = []) => {
6554
+ if (!isObject(target) && !isArray(target) || !maxDepth)
6555
6555
  return [];
6556
6556
  return Object.entries(target).reduce((array, [key, value]) => {
6557
- if (isObject(value)) {
6558
- extractPaths(value, maxDepth - 1).forEach(
6557
+ if (isObject(value) && !Object.keys(value).some((key2) => omitKeys.includes(key2))) {
6558
+ extractPaths(value, maxDepth - 1, omitKeys).forEach(
6559
6559
  (nestedKey) => array.push(`${key}.${nestedKey}`)
6560
6560
  );
6561
6561
  } else {
@@ -6573,11 +6573,17 @@ var extractKeys = (theme, key) => {
6573
6573
  };
6574
6574
  var createThemeTypings = async (theme) => {
6575
6575
  const unions = config.reduce(
6576
- (obj, { key, maxScanDepth, filter = () => true, flatMap = (value) => value }) => {
6576
+ (obj, {
6577
+ key,
6578
+ maxScanDepth,
6579
+ omitScanKeys,
6580
+ filter = () => true,
6581
+ flatMap = (value) => value
6582
+ }) => {
6577
6583
  const target = theme[key];
6578
6584
  obj[key] = [];
6579
6585
  if (isObject(target) || isArray(target)) {
6580
- obj[key] = extractPaths(target, maxScanDepth).filter(filter).flatMap(flatMap);
6586
+ obj[key] = extractPaths(target, maxScanDepth, omitScanKeys).filter(filter).flatMap(flatMap);
6581
6587
  }
6582
6588
  if (isObject(theme.semantics)) {
6583
6589
  const semanticKeys = extractKeys(theme.semantics, key).filter(filter).flatMap(flatMap);
package/dist/index.js CHANGED
@@ -33,10 +33,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  ));
34
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
 
36
- // ../../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
36
+ // ../../node_modules/.pnpm/tsup@7.2.0_@swc+core@1.3.83_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/assets/cjs_shims.js
37
37
  var getImportMetaUrl, importMetaUrl;
38
38
  var init_cjs_shims = __esm({
39
- "../../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"() {
39
+ "../../node_modules/.pnpm/tsup@7.2.0_@swc+core@1.3.83_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/assets/cjs_shims.js"() {
40
40
  "use strict";
41
41
  getImportMetaUrl = () => typeof document === "undefined" ? new URL("file:" + __filename).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
42
42
  importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
@@ -18735,7 +18735,7 @@ var import_cli_welcome = __toESM(require("cli-welcome"));
18735
18735
  // package.json
18736
18736
  var package_default = {
18737
18737
  name: "@yamada-ui/cli",
18738
- version: "0.3.1",
18738
+ version: "0.4.0",
18739
18739
  description: "Generate theme tokens for autocomplete",
18740
18740
  keywords: [
18741
18741
  "theme",
@@ -25913,6 +25913,7 @@ var config = [
25913
25913
  { key: "sizes", maxScanDepth: 2 },
25914
25914
  { key: "spaces", flatMap: (value) => [value, `-${value}`] },
25915
25915
  { key: "zIndices" },
25916
+ { key: "animations", omitScanKeys: ["keyframes"] },
25916
25917
  { key: "gradients" }
25917
25918
  ];
25918
25919
 
@@ -25935,7 +25936,8 @@ var hues = [
25935
25936
  "600",
25936
25937
  "700",
25937
25938
  "800",
25938
- "900"
25939
+ "900",
25940
+ "950"
25939
25941
  ];
25940
25942
  var printComponent = (components) => `components: { ${Object.entries(components).map(
25941
25943
  ([key, unions]) => `${key.match(/^[a-zA-Z0-9\-_]+$/) ? key : `"${key}"`}: { ${print(
@@ -25946,9 +25948,7 @@ var printComponent = (components) => `components: { ${Object.entries(components)
25946
25948
  var print = (unions) => Object.entries(unions).sort(([a], [b]) => a.localeCompare(b)).map(
25947
25949
  ([key, union]) => `${key}: ${union.map((value) => `"${value}"`).concat(["(string & {})"]).join(" | ")};`
25948
25950
  ).join("\n");
25949
- var extractComponents = ({
25950
- components = {}
25951
- }) => Object.entries(components).reduce(
25951
+ var extractComponents = ({ components = {} }) => Object.entries(components).reduce(
25952
25952
  (obj, [key, { sizes, variants }]) => {
25953
25953
  if (sizes || variants) {
25954
25954
  obj[key] = {
@@ -26001,12 +26001,12 @@ var extractColorSchemes = (theme) => {
26001
26001
  return array;
26002
26002
  }, []);
26003
26003
  };
26004
- var extractPaths = (target, maxDepth = 3) => {
26005
- if (!isObject(target) && !Array.isArray(target) || !maxDepth)
26004
+ var extractPaths = (target, maxDepth = 3, omitKeys = []) => {
26005
+ if (!isObject(target) && !isArray(target) || !maxDepth)
26006
26006
  return [];
26007
26007
  return Object.entries(target).reduce((array, [key, value]) => {
26008
- if (isObject(value)) {
26009
- extractPaths(value, maxDepth - 1).forEach(
26008
+ if (isObject(value) && !Object.keys(value).some((key2) => omitKeys.includes(key2))) {
26009
+ extractPaths(value, maxDepth - 1, omitKeys).forEach(
26010
26010
  (nestedKey) => array.push(`${key}.${nestedKey}`)
26011
26011
  );
26012
26012
  } else {
@@ -26024,11 +26024,17 @@ var extractKeys = (theme, key) => {
26024
26024
  };
26025
26025
  var createThemeTypings = async (theme) => {
26026
26026
  const unions = config.reduce(
26027
- (obj, { key, maxScanDepth, filter = () => true, flatMap = (value) => value }) => {
26027
+ (obj, {
26028
+ key,
26029
+ maxScanDepth,
26030
+ omitScanKeys,
26031
+ filter = () => true,
26032
+ flatMap = (value) => value
26033
+ }) => {
26028
26034
  const target = theme[key];
26029
26035
  obj[key] = [];
26030
26036
  if (isObject(target) || isArray(target)) {
26031
- obj[key] = extractPaths(target, maxScanDepth).filter(filter).flatMap(flatMap);
26037
+ obj[key] = extractPaths(target, maxScanDepth, omitScanKeys).filter(filter).flatMap(flatMap);
26032
26038
  }
26033
26039
  if (isObject(theme.semantics)) {
26034
26040
  const semanticKeys = extractKeys(theme.semantics, key).filter(filter).flatMap(flatMap);
@@ -39,9 +39,7 @@ var isUndefined = (value) => typeof value === "undefined" && value === void 0;
39
39
  var isNull = (value) => value === null;
40
40
  var isObject = (obj) => obj !== null && (typeof obj === "object" || typeof obj === "function") && !Array.isArray(obj);
41
41
  var isArray = (value) => Array.isArray(value);
42
- function isFunction(value) {
43
- return typeof value === "function";
44
- }
42
+ var isFunction = (value) => typeof value === "function";
45
43
  // Annotate the CommonJS export names for ESM import in node:
46
44
  0 && (module.exports = {
47
45
  isArray,
package/dist/utils/cli.js CHANGED
@@ -33,10 +33,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  ));
34
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
 
36
- // ../../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
36
+ // ../../node_modules/.pnpm/tsup@7.2.0_@swc+core@1.3.83_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/assets/cjs_shims.js
37
37
  var getImportMetaUrl, importMetaUrl;
38
38
  var init_cjs_shims = __esm({
39
- "../../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"() {
39
+ "../../node_modules/.pnpm/tsup@7.2.0_@swc+core@1.3.83_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/assets/cjs_shims.js"() {
40
40
  "use strict";
41
41
  getImportMetaUrl = () => typeof document === "undefined" ? new URL("file:" + __filename).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
42
42
  importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
@@ -12631,7 +12631,7 @@ var import_cli_welcome = __toESM(require("cli-welcome"));
12631
12631
  // package.json
12632
12632
  var package_default = {
12633
12633
  name: "@yamada-ui/cli",
12634
- version: "0.3.1",
12634
+ version: "0.4.0",
12635
12635
  description: "Generate theme tokens for autocomplete",
12636
12636
  keywords: [
12637
12637
  "theme",
@@ -33,10 +33,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  ));
34
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
 
36
- // ../../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
36
+ // ../../node_modules/.pnpm/tsup@7.2.0_@swc+core@1.3.83_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/assets/cjs_shims.js
37
37
  var getImportMetaUrl, importMetaUrl;
38
38
  var init_cjs_shims = __esm({
39
- "../../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"() {
39
+ "../../node_modules/.pnpm/tsup@7.2.0_@swc+core@1.3.83_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/assets/cjs_shims.js"() {
40
40
  "use strict";
41
41
  getImportMetaUrl = () => typeof document === "undefined" ? new URL("file:" + __filename).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
42
42
  importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
@@ -12645,9 +12645,7 @@ var isUndefined = (value) => typeof value === "undefined" && value === void 0;
12645
12645
  var isNull = (value) => value === null;
12646
12646
  var isObject = (obj) => obj !== null && (typeof obj === "object" || typeof obj === "function") && !Array.isArray(obj);
12647
12647
  var isArray = (value) => Array.isArray(value);
12648
- function isFunction(value) {
12649
- return typeof value === "function";
12650
- }
12648
+ var isFunction = (value) => typeof value === "function";
12651
12649
 
12652
12650
  // src/utils/cli.ts
12653
12651
  init_cjs_shims();
@@ -12658,7 +12656,7 @@ var import_cli_welcome = __toESM(require("cli-welcome"));
12658
12656
  // package.json
12659
12657
  var package_default = {
12660
12658
  name: "@yamada-ui/cli",
12661
- version: "0.3.1",
12659
+ version: "0.4.0",
12662
12660
  description: "Generate theme tokens for autocomplete",
12663
12661
  keywords: [
12664
12662
  "theme",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yamada-ui/cli",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "Generate theme tokens for autocomplete",
5
5
  "keywords": [
6
6
  "theme",