sh-ui-cli 0.85.1 → 0.86.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.
Files changed (49) hide show
  1. package/data/changelog/versions.json +13 -0
  2. package/package.json +1 -1
  3. package/src/constants.js +1 -1
  4. package/src/create/architectures/archSchema.js +1 -1
  5. package/src/create/architectures/flat.js +1 -1
  6. package/src/create/architectures/fsd.js +1 -1
  7. package/src/create/describeTemplate.js +21 -2
  8. package/src/create/generator.js +86 -3
  9. package/src/create/templateManifest.js +49 -0
  10. package/src/mcp.mjs +4 -4
  11. package/templates/vite-standalone/CLAUDE.md +7 -0
  12. package/templates/vite-standalone/README.md +23 -0
  13. package/templates/vite-standalone/_arch/flat/sh-ui.config.json +22 -0
  14. package/templates/vite-standalone/_arch/flat/src/App.tsx +13 -0
  15. package/templates/vite-standalone/_arch/flat/src/components/layouts/RootLayout.tsx +5 -0
  16. package/templates/vite-standalone/_arch/flat/src/components/providers/GlobalProvider/index.tsx +13 -0
  17. package/templates/vite-standalone/_arch/flat/src/components/providers/index.tsx +1 -0
  18. package/templates/vite-standalone/_arch/flat/src/components/providers/theme/ThemeProvider.tsx +59 -0
  19. package/templates/vite-standalone/_arch/flat/src/lib/api/queryClient.ts +12 -0
  20. package/templates/vite-standalone/_arch/flat/src/lib/hooks/useTheme.ts +8 -0
  21. package/templates/vite-standalone/_arch/flat/src/lib/styles/globals.css +35 -0
  22. package/templates/vite-standalone/_arch/flat/src/lib/styles/tokens.css +203 -0
  23. package/templates/vite-standalone/_arch/flat/src/lib/utils/utils.ts +6 -0
  24. package/templates/vite-standalone/_arch/flat/src/main.tsx +10 -0
  25. package/templates/vite-standalone/_arch/flat/tsconfig.app.json +23 -0
  26. package/templates/vite-standalone/_arch/fsd/sh-ui.config.json +22 -0
  27. package/templates/vite-standalone/_arch/fsd/src/App.tsx +13 -0
  28. package/templates/vite-standalone/_arch/fsd/src/app/layouts/RootLayout.tsx +5 -0
  29. package/templates/vite-standalone/_arch/fsd/src/app/providers/GlobalProvider/index.tsx +13 -0
  30. package/templates/vite-standalone/_arch/fsd/src/app/providers/theme/ThemeProvider.tsx +59 -0
  31. package/templates/vite-standalone/_arch/fsd/src/main.tsx +10 -0
  32. package/templates/vite-standalone/_arch/fsd/src/shared/api/queryClient.ts +12 -0
  33. package/templates/vite-standalone/_arch/fsd/src/shared/hooks/useTheme.ts +8 -0
  34. package/templates/vite-standalone/_arch/fsd/src/shared/lib/utils.ts +6 -0
  35. package/templates/vite-standalone/_arch/fsd/src/shared/styles/globals.css +35 -0
  36. package/templates/vite-standalone/_arch/fsd/src/shared/styles/tokens.css +203 -0
  37. package/templates/vite-standalone/_arch/fsd/tsconfig.app.json +22 -0
  38. package/templates/vite-standalone/eslint.config.js +34 -0
  39. package/templates/vite-standalone/gitignore +8 -0
  40. package/templates/vite-standalone/index.html +22 -0
  41. package/templates/vite-standalone/package.json +63 -0
  42. package/templates/vite-standalone/src/App.tsx +5 -0
  43. package/templates/vite-standalone/src/Home.tsx +7 -0
  44. package/templates/vite-standalone/src/main.tsx +9 -0
  45. package/templates/vite-standalone/tsconfig.json +7 -0
  46. package/templates/vite-standalone/tsconfig.node.json +12 -0
  47. package/templates/vite-standalone/vite.config.ts +11 -0
  48. package/templates/vite-standalone/vitest.config.ts +13 -0
  49. package/templates/vite-standalone/vitest.setup.ts +1 -0
@@ -0,0 +1,34 @@
1
+ import js from '@eslint/js';
2
+ import eslintConfigPrettier from 'eslint-config-prettier';
3
+ import onlyWarn from 'eslint-plugin-only-warn';
4
+ import pluginReact from 'eslint-plugin-react';
5
+ import pluginReactHooks from 'eslint-plugin-react-hooks';
6
+ import globals from 'globals';
7
+ import tseslint from 'typescript-eslint';
8
+
9
+ export default [
10
+ { ignores: ['dist/**', 'node_modules/**'] },
11
+ js.configs.recommended,
12
+ eslintConfigPrettier,
13
+ ...tseslint.configs.recommended,
14
+ { plugins: { onlyWarn } },
15
+ {
16
+ rules: {
17
+ '@typescript-eslint/no-unused-vars': [
18
+ 'warn',
19
+ { argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
20
+ ],
21
+ },
22
+ },
23
+ {
24
+ files: ['**/*.{ts,tsx}'],
25
+ plugins: { react: pluginReact, 'react-hooks': pluginReactHooks },
26
+ languageOptions: { globals: { ...globals.browser } },
27
+ settings: { react: { version: 'detect' } },
28
+ rules: {
29
+ ...pluginReact.configs.recommended.rules,
30
+ ...pluginReactHooks.configs.recommended.rules,
31
+ 'react/react-in-jsx-scope': 'off',
32
+ },
33
+ },
34
+ ];
@@ -0,0 +1,8 @@
1
+ node_modules/
2
+ dist/
3
+ .DS_Store
4
+ *.log
5
+ .env.local
6
+ .env.*.local
7
+ .vite/
8
+ coverage/
@@ -0,0 +1,22 @@
1
+ <!doctype html>
2
+ <html lang="ko" suppressHydrationWarning>
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>sh-ui app</title>
8
+ <script>
9
+ // FOUC 차단 — ThemeProvider mount 전에 첫 paint 에 dark class 박기.
10
+ // matrix: 'dark' → .dark, 'light' → (none), 'system'/unset → system pref.
11
+ try {
12
+ var t = localStorage.getItem('theme');
13
+ var d = t === 'dark' || ((!t || t === 'system') && matchMedia('(prefers-color-scheme:dark)').matches);
14
+ if (d) document.documentElement.classList.add('dark');
15
+ } catch (e) {}
16
+ </script>
17
+ </head>
18
+ <body>
19
+ <div id="root"></div>
20
+ <script type="module" src="/src/main.tsx"></script>
21
+ </body>
22
+ </html>
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "my-app",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "private": true,
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "tsc -b && vite build",
9
+ "preview": "vite preview",
10
+ "lint": "eslint .",
11
+ "lint:fix": "eslint . --fix",
12
+ "format": "prettier --write \"**/*.{ts,tsx,md}\"",
13
+ "typecheck": "tsc -b --noEmit",
14
+ "test": "vitest run",
15
+ "test:watch": "vitest"
16
+ },
17
+ "dependencies": {
18
+ "@base-ui/react": "^1.4.1",
19
+ "@tanstack/react-query": "^5.90.21",
20
+ "class-variance-authority": "^0.7.1",
21
+ "clsx": "^2.1.1",
22
+ "lucide-react": "^0.563.0",
23
+ "react": "^19.2.4",
24
+ "react-dom": "^19.2.4",
25
+ "sonner": "^2.0.7",
26
+ "tailwind-merge": "^3.5.0",
27
+ "zod": "^4.3.6"
28
+ },
29
+ "devDependencies": {
30
+ "@eslint/js": "^9.39.2",
31
+ "@tailwindcss/vite": "^4.1.18",
32
+ "@tanstack/react-query-devtools": "^5.91.3",
33
+ "@testing-library/jest-dom": "^6.9.1",
34
+ "@testing-library/react": "^16",
35
+ "@testing-library/user-event": "^14",
36
+ "@types/node": "^25.1.0",
37
+ "@types/react": "^19.2.10",
38
+ "@types/react-dom": "^19.2.3",
39
+ "@typescript-eslint/eslint-plugin": "^8.54.0",
40
+ "@typescript-eslint/parser": "^8.54.0",
41
+ "@vitejs/plugin-react": "^5.0.0",
42
+ "eslint": "^9.39.2",
43
+ "eslint-config-prettier": "^10.1.8",
44
+ "eslint-plugin-boundaries": "^5.4.0",
45
+ "eslint-plugin-check-file": "^3.3.1",
46
+ "eslint-plugin-only-warn": "^1.1.0",
47
+ "eslint-plugin-react": "^7.37.5",
48
+ "eslint-plugin-react-hooks": "^7.0.1",
49
+ "jsdom": "^29.0.0",
50
+ "prettier": "^3.8.1",
51
+ "prettier-plugin-tailwindcss": "^0.6.13",
52
+ "tailwindcss": "^4.1.18",
53
+ "typescript": "^5.9.3",
54
+ "typescript-eslint": "^8.54.0",
55
+ "vite": "^5.4.0",
56
+ "vite-tsconfig-paths": "^5.1.4",
57
+ "vitest": "^4.1.0"
58
+ },
59
+ "packageManager": "pnpm@10.4.1",
60
+ "engines": {
61
+ "node": ">=20"
62
+ }
63
+ }
@@ -0,0 +1,5 @@
1
+ import Home from './Home';
2
+
3
+ export default function App() {
4
+ return <Home />;
5
+ }
@@ -0,0 +1,7 @@
1
+ export default function Home() {
2
+ return (
3
+ <main className="flex min-h-screen flex-col items-center justify-center">
4
+ <h1 className="text-4xl font-bold">Hello World</h1>
5
+ </main>
6
+ );
7
+ }
@@ -0,0 +1,9 @@
1
+ import { StrictMode } from 'react';
2
+ import { createRoot } from 'react-dom/client';
3
+ import App from './App';
4
+
5
+ createRoot(document.getElementById('root')!).render(
6
+ <StrictMode>
7
+ <App />
8
+ </StrictMode>,
9
+ );
@@ -0,0 +1,7 @@
1
+ {
2
+ "files": [],
3
+ "references": [
4
+ { "path": "./tsconfig.app.json" },
5
+ { "path": "./tsconfig.node.json" }
6
+ ]
7
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "skipLibCheck": true,
5
+ "module": "ESNext",
6
+ "moduleResolution": "Bundler",
7
+ "allowSyntheticDefaultImports": true,
8
+ "strict": true,
9
+ "types": ["node"]
10
+ },
11
+ "include": ["vite.config.ts", "vitest.config.ts", "vitest.setup.ts"]
12
+ }
@@ -0,0 +1,11 @@
1
+ import { defineConfig } from 'vite';
2
+ import react from '@vitejs/plugin-react';
3
+ import tailwindcss from '@tailwindcss/vite';
4
+ import tsconfigPaths from 'vite-tsconfig-paths';
5
+
6
+ export default defineConfig({
7
+ plugins: [react(), tailwindcss(), tsconfigPaths()],
8
+ server: {
9
+ port: 5173,
10
+ },
11
+ });
@@ -0,0 +1,13 @@
1
+ import { defineConfig, mergeConfig } from 'vitest/config';
2
+ import viteConfig from './vite.config';
3
+
4
+ export default mergeConfig(
5
+ viteConfig,
6
+ defineConfig({
7
+ test: {
8
+ environment: 'jsdom',
9
+ globals: true,
10
+ setupFiles: ['./vitest.setup.ts'],
11
+ },
12
+ }),
13
+ );
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom/vitest';