@yamada-ui/cli 0.1.0 → 0.1.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Hirotomo Yamada
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # @yamada-ui/cli
2
+
3
+ Generate TypeScript types to provide autocomplete for your custom theme.
4
+
5
+ ## Installation
6
+
7
+ ```sh
8
+ $ pnpm add @yamada-ui/cli
9
+ ```
10
+
11
+ or
12
+
13
+ ```sh
14
+ $ yarn add @yamada-ui/cli
15
+ ```
16
+
17
+ or
18
+
19
+ ```sh
20
+ $ npm install @yamada-ui/cli
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ ```sh
26
+ pnpm yamada-cli token <path/to/your/theme.(js|ts)>
27
+ ```
28
+
29
+ ### Options
30
+
31
+ - `--out <path>` output file to node_modules/@yamada-ui/core/dist/generated-theme.types.d.ts
32
+ - `--watch [path]` Watch directory for changes and rebuild
33
+ - `--help` display help for command
34
+
35
+ ## Contribution
36
+
37
+ Wouldn't you like to contribute? That's amazing! We have prepared a [contribution guide](https://github.com/hirotomoyamada/yamada-ui/blob/main/CONTRIBUTING.md) to assist you.
38
+
39
+ ## Licence
40
+
41
+ This package is licensed under the terms of the
42
+ [MIT license](https://github.com/hirotomoyamada/yamada-ui/blob/main/LICENSE).
@@ -30,7 +30,7 @@ var init_cjs_shims = __esm({
30
30
  var create_theme_typings_exports = {};
31
31
  __export(create_theme_typings_exports, {
32
32
  createThemeTypings: () => createThemeTypings,
33
- extractColorStyles: () => extractColorStyles,
33
+ extractColorSchemes: () => extractColorSchemes,
34
34
  extractComponents: () => extractComponents,
35
35
  extractKeys: () => extractKeys,
36
36
  extractPaths: () => extractPaths,
@@ -134,7 +134,7 @@ var isHue = (value) => {
134
134
  return hues.every((key) => keys.includes(key));
135
135
  };
136
136
  var isDefaultColor = (key) => defaultColors.includes(key);
137
- var extractColorStyles = (theme) => {
137
+ var extractColorSchemes = (theme) => {
138
138
  const { colors } = theme;
139
139
  if (!isObject(colors))
140
140
  return [];
@@ -181,7 +181,7 @@ var createThemeTypings = async (theme) => {
181
181
  );
182
182
  const textStyles = extractKeys(theme, "styles.textStyles");
183
183
  const layerStyles = extractKeys(theme, "styles.layerStyles");
184
- const colorStyles = extractColorStyles(theme);
184
+ const colorSchemes = extractColorSchemes(theme);
185
185
  const { transitionProperty, transitionDuration, transitionEasing } = extractTransitions(theme);
186
186
  const componentTypes = extractComponents(theme);
187
187
  return prettier(
@@ -192,7 +192,7 @@ export interface GeneratedTheme extends UITheme { ${print(
192
192
  ...unions,
193
193
  textStyles,
194
194
  layerStyles,
195
- colorStyles,
195
+ colorSchemes,
196
196
  transitionProperty,
197
197
  transitionDuration,
198
198
  transitionEasing
@@ -203,7 +203,7 @@ export interface GeneratedTheme extends UITheme { ${print(
203
203
  // Annotate the CommonJS export names for ESM import in node:
204
204
  0 && (module.exports = {
205
205
  createThemeTypings,
206
- extractColorStyles,
206
+ extractColorSchemes,
207
207
  extractComponents,
208
208
  extractKeys,
209
209
  extractPaths,
@@ -6729,7 +6729,7 @@ var isHue = (value) => {
6729
6729
  return hues.every((key) => keys.includes(key));
6730
6730
  };
6731
6731
  var isDefaultColor = (key) => defaultColors.includes(key);
6732
- var extractColorStyles = (theme) => {
6732
+ var extractColorSchemes = (theme) => {
6733
6733
  const { colors } = theme;
6734
6734
  if (!isObject(colors))
6735
6735
  return [];
@@ -6776,7 +6776,7 @@ var createThemeTypings = async (theme) => {
6776
6776
  );
6777
6777
  const textStyles = extractKeys(theme, "styles.textStyles");
6778
6778
  const layerStyles = extractKeys(theme, "styles.layerStyles");
6779
- const colorStyles = extractColorStyles(theme);
6779
+ const colorSchemes = extractColorSchemes(theme);
6780
6780
  const { transitionProperty, transitionDuration, transitionEasing } = extractTransitions(theme);
6781
6781
  const componentTypes = extractComponents(theme);
6782
6782
  return prettier(
@@ -6787,7 +6787,7 @@ export interface GeneratedTheme extends UITheme { ${print(
6787
6787
  ...unions,
6788
6788
  textStyles,
6789
6789
  layerStyles,
6790
- colorStyles,
6790
+ colorSchemes,
6791
6791
  transitionProperty,
6792
6792
  transitionDuration,
6793
6793
  transitionEasing
package/dist/index.js CHANGED
@@ -17103,10 +17103,19 @@ var import_cli_welcome = __toESM(require("cli-welcome"));
17103
17103
  // package.json
17104
17104
  var package_default = {
17105
17105
  name: "@yamada-ui/cli",
17106
- version: "0.2.0",
17106
+ version: "0.1.1",
17107
17107
  description: "Generate theme tokens for autocomplete",
17108
- keywords: [],
17109
- author: "hirotomoyamada <hirotomo.yamada@avap.co.jp>",
17108
+ keywords: [
17109
+ "theme",
17110
+ "theming",
17111
+ "typings",
17112
+ "generator",
17113
+ "yamada ui",
17114
+ "yamada",
17115
+ "ui mode",
17116
+ "ui"
17117
+ ],
17118
+ author: "Hirotomo Yamada <hirotomo.yamada@avap.co.jp>",
17110
17119
  license: "MIT",
17111
17120
  main: "dist/index.js",
17112
17121
  files: [
@@ -17120,7 +17129,7 @@ var package_default = {
17120
17129
  repository: {
17121
17130
  type: "git",
17122
17131
  url: "git+https://github.com/hirotomoyamada/yamada-ui",
17123
- directory: "packages/core"
17132
+ directory: "packages/cli"
17124
17133
  },
17125
17134
  bugs: {
17126
17135
  url: "https://github.com/hirotomoyamada/yamada-ui/issues"
@@ -23834,7 +23843,7 @@ var isHue = (value) => {
23834
23843
  return hues.every((key) => keys.includes(key));
23835
23844
  };
23836
23845
  var isDefaultColor = (key) => defaultColors.includes(key);
23837
- var extractColorStyles = (theme) => {
23846
+ var extractColorSchemes = (theme) => {
23838
23847
  const { colors } = theme;
23839
23848
  if (!isObject(colors))
23840
23849
  return [];
@@ -23881,7 +23890,7 @@ var createThemeTypings = async (theme) => {
23881
23890
  );
23882
23891
  const textStyles = extractKeys(theme, "styles.textStyles");
23883
23892
  const layerStyles = extractKeys(theme, "styles.layerStyles");
23884
- const colorStyles = extractColorStyles(theme);
23893
+ const colorSchemes = extractColorSchemes(theme);
23885
23894
  const { transitionProperty, transitionDuration, transitionEasing } = extractTransitions(theme);
23886
23895
  const componentTypes = extractComponents(theme);
23887
23896
  return prettier(
@@ -23892,7 +23901,7 @@ export interface GeneratedTheme extends UITheme { ${print(
23892
23901
  ...unions,
23893
23902
  textStyles,
23894
23903
  layerStyles,
23895
- colorStyles,
23904
+ colorSchemes,
23896
23905
  transitionProperty,
23897
23906
  transitionDuration,
23898
23907
  transitionEasing
@@ -23955,9 +23964,10 @@ var run = async () => {
23955
23964
  }
23956
23965
  });
23957
23966
  import_commander.program.on("--help", () => {
23958
- console.info(`Example call:
23959
-
23960
- $ yamada-cli tokens theme.ts`);
23967
+ console.info(`
23968
+ Example call:
23969
+ $ yamada-cli tokens theme.ts
23970
+ `);
23961
23971
  });
23962
23972
  import_commander.program.parse();
23963
23973
  };
package/dist/utils/cli.js CHANGED
@@ -10699,10 +10699,19 @@ var import_cli_welcome = __toESM(require("cli-welcome"));
10699
10699
  // package.json
10700
10700
  var package_default = {
10701
10701
  name: "@yamada-ui/cli",
10702
- version: "0.2.0",
10702
+ version: "0.1.1",
10703
10703
  description: "Generate theme tokens for autocomplete",
10704
- keywords: [],
10705
- author: "hirotomoyamada <hirotomo.yamada@avap.co.jp>",
10704
+ keywords: [
10705
+ "theme",
10706
+ "theming",
10707
+ "typings",
10708
+ "generator",
10709
+ "yamada ui",
10710
+ "yamada",
10711
+ "ui mode",
10712
+ "ui"
10713
+ ],
10714
+ author: "Hirotomo Yamada <hirotomo.yamada@avap.co.jp>",
10706
10715
  license: "MIT",
10707
10716
  main: "dist/index.js",
10708
10717
  files: [
@@ -10716,7 +10725,7 @@ var package_default = {
10716
10725
  repository: {
10717
10726
  type: "git",
10718
10727
  url: "git+https://github.com/hirotomoyamada/yamada-ui",
10719
- directory: "packages/core"
10728
+ directory: "packages/cli"
10720
10729
  },
10721
10730
  bugs: {
10722
10731
  url: "https://github.com/hirotomoyamada/yamada-ui/issues"
@@ -10726,10 +10726,19 @@ var import_cli_welcome = __toESM(require("cli-welcome"));
10726
10726
  // package.json
10727
10727
  var package_default = {
10728
10728
  name: "@yamada-ui/cli",
10729
- version: "0.2.0",
10729
+ version: "0.1.1",
10730
10730
  description: "Generate theme tokens for autocomplete",
10731
- keywords: [],
10732
- author: "hirotomoyamada <hirotomo.yamada@avap.co.jp>",
10731
+ keywords: [
10732
+ "theme",
10733
+ "theming",
10734
+ "typings",
10735
+ "generator",
10736
+ "yamada ui",
10737
+ "yamada",
10738
+ "ui mode",
10739
+ "ui"
10740
+ ],
10741
+ author: "Hirotomo Yamada <hirotomo.yamada@avap.co.jp>",
10733
10742
  license: "MIT",
10734
10743
  main: "dist/index.js",
10735
10744
  files: [
@@ -10743,7 +10752,7 @@ var package_default = {
10743
10752
  repository: {
10744
10753
  type: "git",
10745
10754
  url: "git+https://github.com/hirotomoyamada/yamada-ui",
10746
- directory: "packages/core"
10755
+ directory: "packages/cli"
10747
10756
  },
10748
10757
  bugs: {
10749
10758
  url: "https://github.com/hirotomoyamada/yamada-ui/issues"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yamada-ui/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Generate theme tokens for autocomplete",
5
5
  "keywords": [
6
6
  "theme",
@@ -34,12 +34,6 @@
34
34
  "bin": {
35
35
  "yamada-cli": "bin/index.js"
36
36
  },
37
- "scripts": {
38
- "clean": "rimraf dist .turbo",
39
- "build": "tsup src --format cjs --clean --shims",
40
- "dev": "pnpm build --watch",
41
- "typecheck": " tsc --noEmit"
42
- },
43
37
  "dependencies": {
44
38
  "bundle-n-require": "^1.0.1",
45
39
  "chokidar": "^3.5.3",
@@ -55,5 +49,11 @@
55
49
  "@types/update-notifier": "6.0.4",
56
50
  "@types/cli-welcome": "^2.2.0",
57
51
  "@types/prettier": "^2.7.2"
52
+ },
53
+ "scripts": {
54
+ "clean": "rimraf dist .turbo",
55
+ "build": "tsup src --format cjs --clean --shims",
56
+ "dev": "pnpm build --watch",
57
+ "typecheck": " tsc --noEmit"
58
58
  }
59
- }
59
+ }