ui-thing 0.0.17 → 0.0.19
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/CHANGELOG.md +168 -143
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/comps.ts +1 -1
- package/src/utils/uiConfigPrompt.ts +73 -73
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ui-thing",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"description": "CLI used to add Nuxt 3 components to a project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
"@types/figlet": "^1.5.8",
|
|
62
62
|
"@types/fs-extra": "^11.0.4",
|
|
63
63
|
"@types/lodash": "^4.14.202",
|
|
64
|
-
"@types/node": "^20.10.
|
|
64
|
+
"@types/node": "^20.10.4",
|
|
65
65
|
"@types/prompts": "^2.4.9",
|
|
66
|
-
"@vitest/coverage-v8": "^0.
|
|
66
|
+
"@vitest/coverage-v8": "^1.0.4",
|
|
67
67
|
"magicast": "^0.3.2",
|
|
68
68
|
"tsup": "^8.0.1",
|
|
69
|
-
"typescript": "^5.3.
|
|
70
|
-
"vitest": "^0.
|
|
69
|
+
"typescript": "^5.3.3",
|
|
70
|
+
"vitest": "^1.0.4"
|
|
71
71
|
}
|
|
72
72
|
}
|
package/src/comps.ts
CHANGED
|
@@ -2107,7 +2107,7 @@ export default [
|
|
|
2107
2107
|
fileName: "Toast/Viewport.vue",
|
|
2108
2108
|
dirPath: "components/UI",
|
|
2109
2109
|
fileContent:
|
|
2110
|
-
'<template>\r\n <ToastViewport :class="styles({ class: props.class })" v-bind="reactiveOmit(props, \'class\')">\r\n <slot></slot>\r\n </ToastViewport>\r\n</template>\r\n\r\n<script lang="ts" setup>\r\n import { ToastViewport } from "radix-vue";\r\n import type { ToastViewportProps } from "radix-vue";\r\n\r\n const props = defineProps<\r\n ToastViewportProps & {\r\n /**\r\n * Custom class names to add to the button.\r\n */\r\n class?: any;\r\n }\r\n >();\r\n\r\n const styles = tv({\r\n base: "fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse gap-
|
|
2110
|
+
'<template>\r\n <ToastViewport :class="styles({ class: props.class })" v-bind="reactiveOmit(props, \'class\')">\r\n <slot></slot>\r\n </ToastViewport>\r\n</template>\r\n\r\n<script lang="ts" setup>\r\n import { ToastViewport } from "radix-vue";\r\n import type { ToastViewportProps } from "radix-vue";\r\n\r\n const props = defineProps<\r\n ToastViewportProps & {\r\n /**\r\n * Custom class names to add to the button.\r\n */\r\n class?: any;\r\n }\r\n >();\r\n\r\n const styles = tv({\r\n base: "fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse gap-2 p-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring sm:bottom-auto sm:right-0 sm:flex-col md:max-w-[420px]",\r\n });\r\n</script>\r\n\r\n<style>\r\n [aria-label~="Notifications"] {\r\n display: grid;\r\n }\r\n</style>\r\n',
|
|
2111
2111
|
},
|
|
2112
2112
|
],
|
|
2113
2113
|
utils: [],
|
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
import kleur from "kleur";
|
|
2
|
-
import prompts from "prompts";
|
|
3
|
-
|
|
4
|
-
import { CSS_THEME_OPTIONS } from "./constants";
|
|
5
|
-
|
|
6
|
-
export const initPrompts = async () => {
|
|
7
|
-
const response = await prompts([
|
|
8
|
-
{
|
|
9
|
-
name: "theme",
|
|
10
|
-
type: "autocomplete",
|
|
11
|
-
message: "Which theme do you want to start with?",
|
|
12
|
-
choices: CSS_THEME_OPTIONS,
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
name: "tailwindCSSLocation",
|
|
16
|
-
type: "text",
|
|
17
|
-
message: "Where is your tailwind.css file located?",
|
|
18
|
-
initial: "assets/css/tailwind.css",
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
name: "tailwindConfigLocation",
|
|
22
|
-
type: "text",
|
|
23
|
-
message: "Where is your tailwind.config file located?",
|
|
24
|
-
initial: "tailwind.config.js",
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: "componentsLocation",
|
|
28
|
-
type: "text",
|
|
29
|
-
message: "Where should your components be stored?",
|
|
30
|
-
initial: "components/
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: "composablesLocation",
|
|
34
|
-
type: "text",
|
|
35
|
-
message: "Where should your composables be stored?",
|
|
36
|
-
initial: "composables",
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
name: "utilsLocation",
|
|
40
|
-
type: "text",
|
|
41
|
-
message: "Where should your utils be stored?",
|
|
42
|
-
initial: "utils",
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
name: "force",
|
|
46
|
-
type: "confirm",
|
|
47
|
-
message: "Should we just replace component files if they already exist?",
|
|
48
|
-
initial: true,
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
name: "useDefaultFilename",
|
|
52
|
-
type: "confirm",
|
|
53
|
-
message: "Would you like to use the default filename when adding components?",
|
|
54
|
-
initial: true,
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
name: "packageManager",
|
|
58
|
-
type: "select",
|
|
59
|
-
message: "Which package manager do you use?",
|
|
60
|
-
choices: [
|
|
61
|
-
{ title: "NPM", value: "npm" },
|
|
62
|
-
{ title: "Yarn", value: "yarn" },
|
|
63
|
-
{ title: "PNPM", value: "pnpm" },
|
|
64
|
-
{ title: "Bun", value: "bun" },
|
|
65
|
-
],
|
|
66
|
-
},
|
|
67
|
-
]);
|
|
68
|
-
if (!response || Object.keys(response).length < 9) {
|
|
69
|
-
console.log(kleur.red("Incomplete configuration submitted. Exiting..."));
|
|
70
|
-
return process.exit(0);
|
|
71
|
-
}
|
|
72
|
-
return response;
|
|
73
|
-
};
|
|
1
|
+
import kleur from "kleur";
|
|
2
|
+
import prompts from "prompts";
|
|
3
|
+
|
|
4
|
+
import { CSS_THEME_OPTIONS } from "./constants";
|
|
5
|
+
|
|
6
|
+
export const initPrompts = async () => {
|
|
7
|
+
const response = await prompts([
|
|
8
|
+
{
|
|
9
|
+
name: "theme",
|
|
10
|
+
type: "autocomplete",
|
|
11
|
+
message: "Which theme do you want to start with?",
|
|
12
|
+
choices: CSS_THEME_OPTIONS,
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: "tailwindCSSLocation",
|
|
16
|
+
type: "text",
|
|
17
|
+
message: "Where is your tailwind.css file located?",
|
|
18
|
+
initial: "assets/css/tailwind.css",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: "tailwindConfigLocation",
|
|
22
|
+
type: "text",
|
|
23
|
+
message: "Where is your tailwind.config file located?",
|
|
24
|
+
initial: "tailwind.config.js",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "componentsLocation",
|
|
28
|
+
type: "text",
|
|
29
|
+
message: "Where should your components be stored?",
|
|
30
|
+
initial: "components/Ui",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "composablesLocation",
|
|
34
|
+
type: "text",
|
|
35
|
+
message: "Where should your composables be stored?",
|
|
36
|
+
initial: "composables",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "utilsLocation",
|
|
40
|
+
type: "text",
|
|
41
|
+
message: "Where should your utils be stored?",
|
|
42
|
+
initial: "utils",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "force",
|
|
46
|
+
type: "confirm",
|
|
47
|
+
message: "Should we just replace component files if they already exist?",
|
|
48
|
+
initial: true,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "useDefaultFilename",
|
|
52
|
+
type: "confirm",
|
|
53
|
+
message: "Would you like to use the default filename when adding components?",
|
|
54
|
+
initial: true,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "packageManager",
|
|
58
|
+
type: "select",
|
|
59
|
+
message: "Which package manager do you use?",
|
|
60
|
+
choices: [
|
|
61
|
+
{ title: "NPM", value: "npm" },
|
|
62
|
+
{ title: "Yarn", value: "yarn" },
|
|
63
|
+
{ title: "PNPM", value: "pnpm" },
|
|
64
|
+
{ title: "Bun", value: "bun" },
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
]);
|
|
68
|
+
if (!response || Object.keys(response).length < 9) {
|
|
69
|
+
console.log(kleur.red("Incomplete configuration submitted. Exiting..."));
|
|
70
|
+
return process.exit(0);
|
|
71
|
+
}
|
|
72
|
+
return response;
|
|
73
|
+
};
|