kira-kit 0.2.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.
Files changed (71) hide show
  1. package/README.md +132 -43
  2. package/dist/index.mjs +2544 -0
  3. package/package.json +38 -17
  4. package/templates/monorepo/components.json +23 -0
  5. package/templates/monorepo/package.json +13 -0
  6. package/templates/monorepo/packages/app/index.html +13 -0
  7. package/templates/monorepo/packages/app/package.json +27 -0
  8. package/templates/monorepo/packages/app/src/App.tsx +21 -0
  9. package/templates/monorepo/packages/app/src/index.css +3 -0
  10. package/templates/monorepo/packages/app/src/main.tsx +10 -0
  11. package/templates/monorepo/packages/app/tsconfig.json +8 -0
  12. package/templates/monorepo/packages/app/vite.config.ts +10 -0
  13. package/templates/monorepo/packages/ui/package.json +32 -0
  14. package/templates/monorepo/packages/ui/src/components/ui/welcome.tsx +52 -0
  15. package/templates/monorepo/packages/ui/src/index.css +123 -0
  16. package/templates/monorepo/packages/ui/src/index.ts +3 -0
  17. package/templates/monorepo/packages/ui/src/lib/utils.ts +1 -0
  18. package/templates/monorepo/packages/ui/tsconfig.json +7 -0
  19. package/templates/monorepo/tsconfig.json +23 -0
  20. package/templates/next/app/globals.css +124 -0
  21. package/templates/next/app/layout.tsx +18 -0
  22. package/templates/next/app/page.tsx +9 -0
  23. package/templates/next/components/ui/welcome.tsx +62 -0
  24. package/templates/next/components.json +23 -0
  25. package/templates/next/lib/utils.ts +1 -0
  26. package/templates/next/next-env.d.ts +2 -0
  27. package/templates/next/next.config.ts +5 -0
  28. package/templates/next/package.json +28 -0
  29. package/templates/next/postcss.config.mjs +7 -0
  30. package/templates/next/tsconfig.json +24 -0
  31. package/templates/tanstack-start/README.md +16 -0
  32. package/templates/tanstack-start/components.json +23 -0
  33. package/templates/tanstack-start/package.json +30 -0
  34. package/templates/tanstack-start/src/components/ui/welcome.tsx +52 -0
  35. package/templates/tanstack-start/src/index.css +123 -0
  36. package/templates/tanstack-start/src/lib/utils.ts +1 -0
  37. package/templates/tanstack-start/src/router.tsx +15 -0
  38. package/templates/tanstack-start/src/routes/__root.tsx +41 -0
  39. package/templates/tanstack-start/src/routes/index.tsx +26 -0
  40. package/{tsconfig.json → templates/tanstack-start/tsconfig.json} +6 -7
  41. package/templates/tanstack-start/vite.config.ts +11 -0
  42. package/templates/vite/components.json +23 -0
  43. package/templates/vite/index.html +16 -0
  44. package/templates/vite/package.json +28 -0
  45. package/templates/vite/src/App.tsx +9 -0
  46. package/templates/vite/src/components/ui/welcome.tsx +60 -0
  47. package/templates/vite/src/index.css +124 -0
  48. package/templates/vite/src/lib/utils.ts +1 -0
  49. package/templates/vite/src/main.tsx +10 -0
  50. package/templates/vite/tsconfig.json +29 -0
  51. package/templates/vite/tsconfig.node.json +22 -0
  52. package/templates/vite/vite.config.ts +13 -0
  53. package/bin/kira-kit.js +0 -27329
  54. package/bun.lock +0 -247
  55. package/src/commands/add.ts +0 -146
  56. package/src/commands/build.ts +0 -212
  57. package/src/commands/init.ts +0 -164
  58. package/src/commands/list.ts +0 -31
  59. package/src/index.ts +0 -118
  60. package/src/lib/build-config.ts +0 -81
  61. package/src/lib/config.ts +0 -109
  62. package/src/lib/deps.ts +0 -135
  63. package/src/lib/file.ts +0 -64
  64. package/src/lib/logger.ts +0 -102
  65. package/src/lib/registry.ts +0 -81
  66. package/src/lib/templates.ts +0 -123
  67. package/src/lib/theme-generator.ts +0 -246
  68. package/src/prompts/base-color.ts +0 -20
  69. package/src/prompts/primary-color.ts +0 -23
  70. package/src/prompts/project-type.ts +0 -71
  71. package/src/types.ts +0 -61
@@ -0,0 +1,60 @@
1
+ import type { ComponentPropsWithoutRef } from "react";
2
+ import { Button as ButtonPrimitive } from "@base-ui/react/button";
3
+ import { IconSparkles } from "@tabler/icons-react";
4
+ import { cva, type VariantProps } from "class-variance-authority";
5
+ import { cn } from "@/lib/utils";
6
+
7
+ export const welcomeVariants = cva(
8
+ "w-full max-w-lg rounded-xl border bg-card p-8 text-card-foreground shadow-sm",
9
+ {
10
+ variants: {
11
+ variant: {
12
+ default: "border-border",
13
+ accent: "border-primary/20 bg-primary/5",
14
+ },
15
+ },
16
+ defaultVariants: {
17
+ variant: "default",
18
+ },
19
+ },
20
+ );
21
+
22
+ type WelcomeProps = ComponentPropsWithoutRef<"section"> &
23
+ VariantProps<typeof welcomeVariants>;
24
+
25
+ export function Welcome({ className, variant, ...props }: WelcomeProps) {
26
+ return (
27
+ <section
28
+ data-slot="welcome"
29
+ className={cn(welcomeVariants({ variant }), className)}
30
+ {...props}
31
+ >
32
+ <div className="flex items-start gap-4">
33
+ <IconSparkles
34
+ aria-hidden="true"
35
+ className="size-10 shrink-0 rounded-lg bg-primary p-2 text-primary-foreground"
36
+ />
37
+ <div className="space-y-2">
38
+ <h1 className="text-2xl font-semibold tracking-tight">
39
+ Kira Kit is ready
40
+ </h1>
41
+ <p className="text-sm leading-6 text-muted-foreground">
42
+ Your project is configured for Base UI, Tailwind CSS, and the Kira
43
+ Kit registry.
44
+ </p>
45
+ </div>
46
+ </div>
47
+ <div className="mt-6 flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
48
+ <code className="rounded-md bg-muted px-3 py-2 text-xs sm:text-sm">
49
+ shadcn add @kira-kit/button
50
+ </code>
51
+ <ButtonPrimitive
52
+ type="button"
53
+ className="inline-flex h-9 shrink-0 items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"
54
+ >
55
+ Start building
56
+ </ButtonPrimitive>
57
+ </div>
58
+ </section>
59
+ );
60
+ }
@@ -0,0 +1,124 @@
1
+ @import "tailwindcss";
2
+
3
+ @custom-variant dark (&:is(.dark *));
4
+
5
+ :root {
6
+ --radius: 0.625rem;
7
+ --background: oklch(1 0 0);
8
+ --foreground: oklch(0.145 0 0);
9
+ --card: oklch(1 0 0);
10
+ --card-foreground: oklch(0.145 0 0);
11
+ --popover: oklch(1 0 0);
12
+ --popover-foreground: oklch(0.145 0 0);
13
+ --primary: oklch(0.205 0 0);
14
+ --primary-foreground: oklch(0.985 0 0);
15
+ --secondary: oklch(0.97 0 0);
16
+ --secondary-foreground: oklch(0.205 0 0);
17
+ --muted: oklch(0.97 0 0);
18
+ --muted-foreground: oklch(0.556 0 0);
19
+ --accent: oklch(0.97 0 0);
20
+ --accent-foreground: oklch(0.205 0 0);
21
+ --destructive: oklch(0.577 0.245 27.325);
22
+ --destructive-foreground: oklch(0.985 0 0);
23
+ --border: oklch(0.922 0 0);
24
+ --input: oklch(0.922 0 0);
25
+ --ring: oklch(0.708 0 0);
26
+ --chart-1: oklch(0.646 0.222 41.116);
27
+ --chart-2: oklch(0.6 0.118 184.704);
28
+ --chart-3: oklch(0.398 0.07 227.392);
29
+ --chart-4: oklch(0.828 0.189 84.429);
30
+ --chart-5: oklch(0.769 0.188 70.08);
31
+ --sidebar: oklch(0.985 0 0);
32
+ --sidebar-foreground: oklch(0.145 0 0);
33
+ --sidebar-primary: oklch(0.205 0 0);
34
+ --sidebar-primary-foreground: oklch(0.985 0 0);
35
+ --sidebar-accent: oklch(0.97 0 0);
36
+ --sidebar-accent-foreground: oklch(0.205 0 0);
37
+ --sidebar-border: oklch(0.922 0 0);
38
+ --sidebar-ring: oklch(0.708 0 0);
39
+ }
40
+
41
+ .dark {
42
+ --background: oklch(0.145 0 0);
43
+ --foreground: oklch(0.985 0 0);
44
+ --card: oklch(0.205 0 0);
45
+ --card-foreground: oklch(0.985 0 0);
46
+ --popover: oklch(0.205 0 0);
47
+ --popover-foreground: oklch(0.985 0 0);
48
+ --primary: oklch(0.922 0 0);
49
+ --primary-foreground: oklch(0.205 0 0);
50
+ --secondary: oklch(0.269 0 0);
51
+ --secondary-foreground: oklch(0.985 0 0);
52
+ --muted: oklch(0.269 0 0);
53
+ --muted-foreground: oklch(0.708 0 0);
54
+ --accent: oklch(0.269 0 0);
55
+ --accent-foreground: oklch(0.985 0 0);
56
+ --destructive: oklch(0.704 0.191 22.216);
57
+ --destructive-foreground: oklch(0.985 0 0);
58
+ --border: oklch(1 0 0 / 10%);
59
+ --input: oklch(1 0 0 / 15%);
60
+ --ring: oklch(0.556 0 0);
61
+ --chart-1: oklch(0.488 0.243 264.376);
62
+ --chart-2: oklch(0.696 0.17 162.48);
63
+ --chart-3: oklch(0.769 0.188 70.08);
64
+ --chart-4: oklch(0.627 0.265 303.9);
65
+ --chart-5: oklch(0.645 0.246 16.439);
66
+ --sidebar: oklch(0.205 0 0);
67
+ --sidebar-foreground: oklch(0.985 0 0);
68
+ --sidebar-primary: oklch(0.488 0.243 264.376);
69
+ --sidebar-primary-foreground: oklch(0.985 0 0);
70
+ --sidebar-accent: oklch(0.269 0 0);
71
+ --sidebar-accent-foreground: oklch(0.985 0 0);
72
+ --sidebar-border: oklch(1 0 0 / 10%);
73
+ --sidebar-ring: oklch(0.556 0 0);
74
+ }
75
+
76
+ @theme inline {
77
+ --font-sans: ui-sans-serif, system-ui, sans-serif;
78
+ --radius-sm: calc(var(--radius) - 4px);
79
+ --radius-md: calc(var(--radius) - 2px);
80
+ --radius-lg: var(--radius);
81
+ --radius-xl: calc(var(--radius) + 4px);
82
+ --color-background: var(--background);
83
+ --color-foreground: var(--foreground);
84
+ --color-card: var(--card);
85
+ --color-card-foreground: var(--card-foreground);
86
+ --color-popover: var(--popover);
87
+ --color-popover-foreground: var(--popover-foreground);
88
+ --color-primary: var(--primary);
89
+ --color-primary-foreground: var(--primary-foreground);
90
+ --color-secondary: var(--secondary);
91
+ --color-secondary-foreground: var(--secondary-foreground);
92
+ --color-muted: var(--muted);
93
+ --color-muted-foreground: var(--muted-foreground);
94
+ --color-accent: var(--accent);
95
+ --color-accent-foreground: var(--accent-foreground);
96
+ --color-destructive: var(--destructive);
97
+ --color-destructive-foreground: var(--destructive-foreground);
98
+ --color-border: var(--border);
99
+ --color-input: var(--input);
100
+ --color-ring: var(--ring);
101
+ --color-chart-1: var(--chart-1);
102
+ --color-chart-2: var(--chart-2);
103
+ --color-chart-3: var(--chart-3);
104
+ --color-chart-4: var(--chart-4);
105
+ --color-chart-5: var(--chart-5);
106
+ --color-sidebar: var(--sidebar);
107
+ --color-sidebar-foreground: var(--sidebar-foreground);
108
+ --color-sidebar-primary: var(--sidebar-primary);
109
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
110
+ --color-sidebar-accent: var(--sidebar-accent);
111
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
112
+ --color-sidebar-border: var(--sidebar-border);
113
+ --color-sidebar-ring: var(--sidebar-ring);
114
+ }
115
+
116
+ @layer base {
117
+ * {
118
+ @apply border-border outline-ring/50;
119
+ }
120
+
121
+ body {
122
+ @apply bg-background font-sans text-foreground antialiased;
123
+ }
124
+ }
@@ -0,0 +1 @@
1
+ export { cn } from "cn";
@@ -0,0 +1,10 @@
1
+ import { StrictMode } from "react";
2
+ import { createRoot } from "react-dom/client";
3
+ import App from "./App";
4
+ import "./index.css";
5
+
6
+ createRoot(document.getElementById("root")!).render(
7
+ <StrictMode>
8
+ <App />
9
+ </StrictMode>,
10
+ );
@@ -0,0 +1,29 @@
1
+ {
2
+ "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.tsbuildinfo",
4
+ "target": "ES2022",
5
+ "useDefineForClassFields": true,
6
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
7
+ "module": "ESNext",
8
+ "types": ["vite/client"],
9
+ "skipLibCheck": true,
10
+ "moduleResolution": "bundler",
11
+ "allowImportingTsExtensions": true,
12
+ "resolveJsonModule": true,
13
+ "isolatedModules": true,
14
+ "verbatimModuleSyntax": true,
15
+ "moduleDetection": "force",
16
+ "noEmit": true,
17
+ "jsx": "react-jsx",
18
+ "strict": true,
19
+ "noUnusedLocals": true,
20
+ "noUnusedParameters": true,
21
+ "noFallthroughCasesInSwitch": true,
22
+ "baseUrl": ".",
23
+ "paths": {
24
+ "@/*": ["./src/*"]
25
+ }
26
+ },
27
+ "include": ["src"],
28
+ "references": [{ "path": "./tsconfig.node.json" }]
29
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
+ "target": "ES2023",
5
+ "lib": ["ES2023"],
6
+ "module": "ESNext",
7
+ "types": ["node"],
8
+ "skipLibCheck": true,
9
+ "moduleResolution": "bundler",
10
+ "allowImportingTsExtensions": true,
11
+ "resolveJsonModule": true,
12
+ "isolatedModules": true,
13
+ "verbatimModuleSyntax": true,
14
+ "moduleDetection": "force",
15
+ "noEmit": true,
16
+ "strict": true,
17
+ "noUnusedLocals": true,
18
+ "noUnusedParameters": true,
19
+ "noFallthroughCasesInSwitch": true
20
+ },
21
+ "include": ["vite.config.ts"]
22
+ }
@@ -0,0 +1,13 @@
1
+ import { fileURLToPath, URL } from "node:url";
2
+ import tailwindcss from "@tailwindcss/vite";
3
+ import react from "@vitejs/plugin-react";
4
+ import { defineConfig } from "vite";
5
+
6
+ export default defineConfig({
7
+ plugins: [react(), tailwindcss()],
8
+ resolve: {
9
+ alias: {
10
+ "@": fileURLToPath(new URL("./src", import.meta.url)),
11
+ },
12
+ },
13
+ });