@helloleo/plugins 0.2.12 → 0.2.14

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 (145) hide show
  1. package/dist/index.js +3 -2
  2. package/dist/templates/tanstack-start-2026-07-30/components.json +22 -0
  3. package/dist/templates/tanstack-start-2026-07-30/drizzle/0000_tidy_kang.sql +5 -0
  4. package/dist/templates/tanstack-start-2026-07-30/drizzle/meta/0000_snapshot.json +50 -0
  5. package/dist/templates/tanstack-start-2026-07-30/drizzle/meta/_journal.json +13 -0
  6. package/dist/templates/tanstack-start-2026-07-30/drizzle.config.ts +18 -0
  7. package/dist/templates/tanstack-start-2026-07-30/package.json +103 -0
  8. package/dist/templates/tanstack-start-2026-07-30/src/components/error-component.tsx +47 -0
  9. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/accordion.tsx +51 -0
  10. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/alert-dialog.tsx +115 -0
  11. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/alert.tsx +49 -0
  12. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/aspect-ratio.tsx +5 -0
  13. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/avatar.tsx +47 -0
  14. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/badge.tsx +32 -0
  15. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/breadcrumb.tsx +101 -0
  16. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/button.tsx +49 -0
  17. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/calendar.tsx +177 -0
  18. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/card.tsx +55 -0
  19. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/carousel.tsx +240 -0
  20. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/chart.tsx +371 -0
  21. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/checkbox.tsx +26 -0
  22. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/collapsible.tsx +11 -0
  23. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/command.tsx +143 -0
  24. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/context-menu.tsx +187 -0
  25. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/dialog.tsx +104 -0
  26. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/drawer.tsx +98 -0
  27. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/dropdown-menu.tsx +188 -0
  28. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/form.tsx +171 -0
  29. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/hover-card.tsx +27 -0
  30. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/input-otp.tsx +69 -0
  31. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/input.tsx +22 -0
  32. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/label.tsx +21 -0
  33. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/menubar.tsx +229 -0
  34. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/navigation-menu.tsx +120 -0
  35. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/pagination.tsx +98 -0
  36. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/popover.tsx +31 -0
  37. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/progress.tsx +25 -0
  38. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/radio-group.tsx +36 -0
  39. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/resizable.tsx +37 -0
  40. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/scroll-area.tsx +44 -0
  41. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/select.tsx +152 -0
  42. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/separator.tsx +24 -0
  43. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/sheet.tsx +122 -0
  44. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/sidebar.tsx +744 -0
  45. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/skeleton.tsx +7 -0
  46. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/slider.tsx +23 -0
  47. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/sonner.tsx +23 -0
  48. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/switch.tsx +27 -0
  49. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/table.tsx +94 -0
  50. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/tabs.tsx +53 -0
  51. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/textarea.tsx +21 -0
  52. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/toggle-group.tsx +57 -0
  53. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/toggle.tsx +42 -0
  54. package/dist/templates/tanstack-start-2026-07-30/src/components/ui/tooltip.tsx +32 -0
  55. package/dist/templates/tanstack-start-2026-07-30/src/db/index.ts +9 -0
  56. package/dist/templates/tanstack-start-2026-07-30/src/db/schema.ts +18 -0
  57. package/dist/templates/tanstack-start-2026-07-30/src/global.d.ts +3 -0
  58. package/dist/templates/tanstack-start-2026-07-30/src/hooks/use-mobile.tsx +19 -0
  59. package/dist/templates/tanstack-start-2026-07-30/src/lib/kv.ts +37 -0
  60. package/dist/templates/tanstack-start-2026-07-30/src/lib/proxy.ts +82 -0
  61. package/dist/templates/tanstack-start-2026-07-30/src/lib/storage.ts +44 -0
  62. package/dist/templates/tanstack-start-2026-07-30/src/lib/utils.ts +6 -0
  63. package/dist/templates/tanstack-start-2026-07-30/src/routeTree.gen.ts +86 -0
  64. package/dist/templates/tanstack-start-2026-07-30/src/router.tsx +37 -0
  65. package/dist/templates/tanstack-start-2026-07-30/src/routes/README.md +94 -0
  66. package/dist/templates/tanstack-start-2026-07-30/src/routes/__root.tsx +65 -0
  67. package/dist/templates/tanstack-start-2026-07-30/src/routes/api/health.ts +81 -0
  68. package/dist/templates/tanstack-start-2026-07-30/src/routes/index.tsx +33 -0
  69. package/dist/templates/tanstack-start-2026-07-30/src/server.ts +32 -0
  70. package/dist/templates/tanstack-start-2026-07-30/src/styles.css +214 -0
  71. package/dist/templates/tanstack-start-2026-07-30/tsconfig.json +27 -0
  72. package/dist/templates/tanstack-start-2026-07-30/vite.config.ts +17 -0
  73. package/package.json +1 -1
  74. package/src/templates/tanstack-start-2026-07-30/components.json +22 -0
  75. package/src/templates/tanstack-start-2026-07-30/drizzle/0000_tidy_kang.sql +5 -0
  76. package/src/templates/tanstack-start-2026-07-30/drizzle/meta/0000_snapshot.json +50 -0
  77. package/src/templates/tanstack-start-2026-07-30/drizzle/meta/_journal.json +13 -0
  78. package/src/templates/tanstack-start-2026-07-30/drizzle.config.ts +18 -0
  79. package/src/templates/tanstack-start-2026-07-30/package.json +103 -0
  80. package/src/templates/tanstack-start-2026-07-30/src/components/error-component.tsx +47 -0
  81. package/src/templates/tanstack-start-2026-07-30/src/components/ui/accordion.tsx +51 -0
  82. package/src/templates/tanstack-start-2026-07-30/src/components/ui/alert-dialog.tsx +115 -0
  83. package/src/templates/tanstack-start-2026-07-30/src/components/ui/alert.tsx +49 -0
  84. package/src/templates/tanstack-start-2026-07-30/src/components/ui/aspect-ratio.tsx +5 -0
  85. package/src/templates/tanstack-start-2026-07-30/src/components/ui/avatar.tsx +47 -0
  86. package/src/templates/tanstack-start-2026-07-30/src/components/ui/badge.tsx +32 -0
  87. package/src/templates/tanstack-start-2026-07-30/src/components/ui/breadcrumb.tsx +101 -0
  88. package/src/templates/tanstack-start-2026-07-30/src/components/ui/button.tsx +49 -0
  89. package/src/templates/tanstack-start-2026-07-30/src/components/ui/calendar.tsx +177 -0
  90. package/src/templates/tanstack-start-2026-07-30/src/components/ui/card.tsx +55 -0
  91. package/src/templates/tanstack-start-2026-07-30/src/components/ui/carousel.tsx +240 -0
  92. package/src/templates/tanstack-start-2026-07-30/src/components/ui/chart.tsx +371 -0
  93. package/src/templates/tanstack-start-2026-07-30/src/components/ui/checkbox.tsx +26 -0
  94. package/src/templates/tanstack-start-2026-07-30/src/components/ui/collapsible.tsx +11 -0
  95. package/src/templates/tanstack-start-2026-07-30/src/components/ui/command.tsx +143 -0
  96. package/src/templates/tanstack-start-2026-07-30/src/components/ui/context-menu.tsx +187 -0
  97. package/src/templates/tanstack-start-2026-07-30/src/components/ui/dialog.tsx +104 -0
  98. package/src/templates/tanstack-start-2026-07-30/src/components/ui/drawer.tsx +98 -0
  99. package/src/templates/tanstack-start-2026-07-30/src/components/ui/dropdown-menu.tsx +188 -0
  100. package/src/templates/tanstack-start-2026-07-30/src/components/ui/form.tsx +171 -0
  101. package/src/templates/tanstack-start-2026-07-30/src/components/ui/hover-card.tsx +27 -0
  102. package/src/templates/tanstack-start-2026-07-30/src/components/ui/input-otp.tsx +69 -0
  103. package/src/templates/tanstack-start-2026-07-30/src/components/ui/input.tsx +22 -0
  104. package/src/templates/tanstack-start-2026-07-30/src/components/ui/label.tsx +21 -0
  105. package/src/templates/tanstack-start-2026-07-30/src/components/ui/menubar.tsx +229 -0
  106. package/src/templates/tanstack-start-2026-07-30/src/components/ui/navigation-menu.tsx +120 -0
  107. package/src/templates/tanstack-start-2026-07-30/src/components/ui/pagination.tsx +98 -0
  108. package/src/templates/tanstack-start-2026-07-30/src/components/ui/popover.tsx +31 -0
  109. package/src/templates/tanstack-start-2026-07-30/src/components/ui/progress.tsx +25 -0
  110. package/src/templates/tanstack-start-2026-07-30/src/components/ui/radio-group.tsx +36 -0
  111. package/src/templates/tanstack-start-2026-07-30/src/components/ui/resizable.tsx +37 -0
  112. package/src/templates/tanstack-start-2026-07-30/src/components/ui/scroll-area.tsx +44 -0
  113. package/src/templates/tanstack-start-2026-07-30/src/components/ui/select.tsx +152 -0
  114. package/src/templates/tanstack-start-2026-07-30/src/components/ui/separator.tsx +24 -0
  115. package/src/templates/tanstack-start-2026-07-30/src/components/ui/sheet.tsx +122 -0
  116. package/src/templates/tanstack-start-2026-07-30/src/components/ui/sidebar.tsx +744 -0
  117. package/src/templates/tanstack-start-2026-07-30/src/components/ui/skeleton.tsx +7 -0
  118. package/src/templates/tanstack-start-2026-07-30/src/components/ui/slider.tsx +23 -0
  119. package/src/templates/tanstack-start-2026-07-30/src/components/ui/sonner.tsx +23 -0
  120. package/src/templates/tanstack-start-2026-07-30/src/components/ui/switch.tsx +27 -0
  121. package/src/templates/tanstack-start-2026-07-30/src/components/ui/table.tsx +94 -0
  122. package/src/templates/tanstack-start-2026-07-30/src/components/ui/tabs.tsx +53 -0
  123. package/src/templates/tanstack-start-2026-07-30/src/components/ui/textarea.tsx +21 -0
  124. package/src/templates/tanstack-start-2026-07-30/src/components/ui/toggle-group.tsx +57 -0
  125. package/src/templates/tanstack-start-2026-07-30/src/components/ui/toggle.tsx +42 -0
  126. package/src/templates/tanstack-start-2026-07-30/src/components/ui/tooltip.tsx +32 -0
  127. package/src/templates/tanstack-start-2026-07-30/src/db/index.ts +9 -0
  128. package/src/templates/tanstack-start-2026-07-30/src/db/schema.ts +18 -0
  129. package/src/templates/tanstack-start-2026-07-30/src/global.d.ts +3 -0
  130. package/src/templates/tanstack-start-2026-07-30/src/hooks/use-mobile.tsx +19 -0
  131. package/src/templates/tanstack-start-2026-07-30/src/lib/kv.ts +37 -0
  132. package/src/templates/tanstack-start-2026-07-30/src/lib/proxy.ts +82 -0
  133. package/src/templates/tanstack-start-2026-07-30/src/lib/storage.ts +44 -0
  134. package/src/templates/tanstack-start-2026-07-30/src/lib/utils.ts +6 -0
  135. package/src/templates/tanstack-start-2026-07-30/src/routeTree.gen.ts +86 -0
  136. package/src/templates/tanstack-start-2026-07-30/src/router.tsx +37 -0
  137. package/src/templates/tanstack-start-2026-07-30/src/routes/README.md +94 -0
  138. package/src/templates/tanstack-start-2026-07-30/src/routes/__root.tsx +65 -0
  139. package/src/templates/tanstack-start-2026-07-30/src/routes/api/health.ts +81 -0
  140. package/src/templates/tanstack-start-2026-07-30/src/routes/index.tsx +33 -0
  141. package/src/templates/tanstack-start-2026-07-30/src/server.ts +32 -0
  142. package/src/templates/tanstack-start-2026-07-30/src/styles.css +214 -0
  143. package/src/templates/tanstack-start-2026-07-30/tsconfig.json +27 -0
  144. package/src/templates/tanstack-start-2026-07-30/vite.config.ts +17 -0
  145. package/src/tools/scaffold.ts +3 -2
package/dist/index.js CHANGED
@@ -24901,7 +24901,7 @@ async function renderTemplate(templateId, vars, destDir) {
24901
24901
 
24902
24902
  // src/tools/scaffold.ts
24903
24903
  var SCAFFOLD_TEMPLATES = {
24904
- "tanstack-start": "tanstack-start-2026-06-18",
24904
+ "tanstack-start": "tanstack-start-2026-07-30",
24905
24905
  "tanstack-router": "tanstack-router-2026-06-15"
24906
24906
  };
24907
24907
  var SCAFFOLD_VERSION = SCAFFOLD_TEMPLATES["tanstack-start"];
@@ -24955,7 +24955,8 @@ var scaffold = tool({
24955
24955
  const typeNotes = isStart ? [
24956
24956
  "- This is a TanStack Start project. The server entry is src/server.ts. There is no index.html or client entrypoint.",
24957
24957
  "- For JSON/CRUD APIs, add server routes under src/routes/api/. Read src/routes/api/health.ts first, add routes as needed.",
24958
- "- The database schema lives in src/db/schema.ts. Migrations run automatically."
24958
+ "- The database schema lives in src/db/schema.ts and is the single source of truth. Migration files under drizzle/ are generated and applied automatically. Never create, edit or delete them. Prefer adding new columns/tables over renaming existing ones.",
24959
+ "- Persistence goes through @helloleo/runtime exclusively: database via #/db (see src/db/index.ts), key-value store via #/lib/kv (see src/lib/kv.ts), file storage + presigned browser uploads via #/lib/storage (see src/lib/storage.ts), env/secrets via env from @helloleo/runtime. Read those files before server-side data work. Never install another DB/storage client, never import from cloudflare:workers, all of it is server-side only."
24959
24960
  ] : [
24960
24961
  "- This is a TanStack Router SPA. The client entry is index.html -> src/main.tsx. There is no server: no API routes, no server functions, no database.",
24961
24962
  "- Fetch data from external APIs only. If the app needs its own persistence or server-side code, it should have been scaffolded as tanstack-start."
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "new-york",
4
+ "rsc": false,
5
+ "tsx": true,
6
+ "tailwind": {
7
+ "css": "src/styles.css",
8
+ "baseColor": "slate",
9
+ "cssVariables": true,
10
+ "prefix": ""
11
+ },
12
+ "iconLibrary": "lucide",
13
+ "rtl": false,
14
+ "aliases": {
15
+ "components": "@/components",
16
+ "utils": "@/lib/utils",
17
+ "ui": "@/components/ui",
18
+ "lib": "@/lib",
19
+ "hooks": "@/hooks"
20
+ },
21
+ "registries": {}
22
+ }
@@ -0,0 +1,5 @@
1
+ CREATE TABLE `entries` (
2
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
3
+ `label` text NOT NULL,
4
+ `created_at` integer DEFAULT (unixepoch()) NOT NULL
5
+ );
@@ -0,0 +1,50 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "ec5ce3c5-da3c-496c-942e-72a9a9579093",
5
+ "prevId": "00000000-0000-0000-0000-000000000000",
6
+ "tables": {
7
+ "entries": {
8
+ "name": "entries",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "integer",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": true
16
+ },
17
+ "label": {
18
+ "name": "label",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "created_at": {
25
+ "name": "created_at",
26
+ "type": "integer",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false,
30
+ "default": "(unixepoch())"
31
+ }
32
+ },
33
+ "indexes": {},
34
+ "foreignKeys": {},
35
+ "compositePrimaryKeys": {},
36
+ "uniqueConstraints": {},
37
+ "checkConstraints": {}
38
+ }
39
+ },
40
+ "views": {},
41
+ "enums": {},
42
+ "_meta": {
43
+ "schemas": {},
44
+ "tables": {},
45
+ "columns": {}
46
+ },
47
+ "internal": {
48
+ "indexes": {}
49
+ }
50
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "version": "7",
3
+ "dialect": "sqlite",
4
+ "entries": [
5
+ {
6
+ "idx": 0,
7
+ "version": "6",
8
+ "when": 1785420910012,
9
+ "tag": "0000_tidy_kang",
10
+ "breakpoints": true
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1,18 @@
1
+ import { defineConfig } from 'drizzle-kit'
2
+
3
+ // src/db/schema.ts is the single source of truth for the D1 / libsql schema.
4
+ //
5
+ // Migrations (drizzle/*.sql + drizzle/meta/) are GENERATED from schema.ts by
6
+ // HelloLeo after every schema change and applied automatically -- in dev on
7
+ // server start, in production when you publish. Never edit or delete files
8
+ // under drizzle/ by hand; change schema.ts instead. Prefer adding new
9
+ // columns/tables over renaming existing ones (renames cannot be generated).
10
+
11
+ const devDbPath = process.env.DEV_DB_PATH ?? '.dev.db'
12
+
13
+ export default defineConfig({
14
+ dialect: 'sqlite',
15
+ schema: './src/db/schema.ts',
16
+ out: './drizzle',
17
+ dbCredentials: { url: `file:${devDbPath}` },
18
+ })
@@ -0,0 +1,103 @@
1
+ {
2
+ "name": "{{LEO_SLUG}}",
3
+ "private": true,
4
+ "type": "module",
5
+ "imports": {
6
+ "#/*": "./src/*"
7
+ },
8
+ "scripts": {
9
+ "dev": "drizzle-kit migrate && vite dev",
10
+ "build": "oxlint --fix && vite build",
11
+ "preview": "vite preview",
12
+ "db:generate": "drizzle-kit generate",
13
+ "generate-routes": "tsr generate",
14
+ "typecheck": "tsc --noEmit",
15
+ "lint": "oxlint --fix",
16
+ "test": "vitest run"
17
+ },
18
+ "dependencies": {
19
+ "@helloleo/runtime": "^0.1.4",
20
+ "@hookform/resolvers": "^5.4.0",
21
+ "@radix-ui/react-accordion": "^1.2.15",
22
+ "@radix-ui/react-alert-dialog": "^1.1.18",
23
+ "@radix-ui/react-aspect-ratio": "^1.1.11",
24
+ "@radix-ui/react-avatar": "^1.2.1",
25
+ "@radix-ui/react-checkbox": "^1.3.6",
26
+ "@radix-ui/react-collapsible": "^1.1.15",
27
+ "@radix-ui/react-context-menu": "^2.3.2",
28
+ "@radix-ui/react-dialog": "^1.1.18",
29
+ "@radix-ui/react-dropdown-menu": "^2.1.19",
30
+ "@radix-ui/react-hover-card": "^1.1.18",
31
+ "@radix-ui/react-label": "^2.1.11",
32
+ "@radix-ui/react-menubar": "^1.1.19",
33
+ "@radix-ui/react-navigation-menu": "^1.2.17",
34
+ "@radix-ui/react-popover": "^1.1.18",
35
+ "@radix-ui/react-progress": "^1.1.11",
36
+ "@radix-ui/react-radio-group": "^1.4.2",
37
+ "@radix-ui/react-scroll-area": "^1.2.13",
38
+ "@radix-ui/react-select": "^2.3.2",
39
+ "@radix-ui/react-separator": "^1.1.11",
40
+ "@radix-ui/react-slider": "^1.4.2",
41
+ "@radix-ui/react-slot": "^1.3.0",
42
+ "@radix-ui/react-switch": "^1.3.2",
43
+ "@radix-ui/react-tabs": "^1.1.16",
44
+ "@radix-ui/react-toggle": "^1.1.13",
45
+ "@radix-ui/react-toggle-group": "^1.1.14",
46
+ "@radix-ui/react-tooltip": "^1.2.11",
47
+ "@tailwindcss/vite": "^4.3.2",
48
+ "@tanstack/react-query": "^5.101.2",
49
+ "@tanstack/react-router": "^1.170.17",
50
+ "@tanstack/react-router-with-query": "^1.130.17",
51
+ "@tanstack/react-start": "^1.168.27",
52
+ "class-variance-authority": "^0.7.1",
53
+ "clsx": "^2.1.1",
54
+ "cmdk": "^1.1.1",
55
+ "date-fns": "^4.4.0",
56
+ "drizzle-orm": "^0.45.2",
57
+ "embla-carousel-react": "^8.6.0",
58
+ "input-otp": "^1.4.2",
59
+ "lucide-react": "^1.23.0",
60
+ "react": "^19.2.7",
61
+ "react-day-picker": "^10.0.1",
62
+ "react-dom": "^19.2.7",
63
+ "react-hook-form": "^7.80.0",
64
+ "react-resizable-panels": "^4.12.0",
65
+ "recharts": "^3.9.1",
66
+ "sonner": "^2.0.7",
67
+ "tailwind-merge": "^3.6.0",
68
+ "tailwindcss": "^4.3.2",
69
+ "tw-animate-css": "^1.4.0",
70
+ "vaul": "^1.1.2",
71
+ "zod": "^4.4.3"
72
+ },
73
+ "devDependencies": {
74
+ "@cloudflare/vite-plugin": "^1.43.0",
75
+ "@cloudflare/workers-types": "^5.20260703.1",
76
+ "@helloleo/vite-config": "^0.1.4",
77
+ "@libsql/client": "^0.17.4",
78
+ "@tailwindcss/typography": "^0.5.20",
79
+ "drizzle-kit": "^0.31.10",
80
+ "@tanstack/router-cli": "^1.167.18",
81
+ "@tanstack/router-plugin": "^1.168.19",
82
+ "@testing-library/dom": "^10.4.1",
83
+ "@testing-library/react": "^16.3.2",
84
+ "@types/node": "^26.1.0",
85
+ "@types/react": "^19.2.17",
86
+ "@types/react-dom": "^19.2.3",
87
+ "@vitejs/plugin-react": "^6.0.3",
88
+ "jsdom": "^29.1.1",
89
+ "oxfmt": "^0.57.0",
90
+ "oxlint": "^1.72.0",
91
+ "typescript": "^6.0.3",
92
+ "vite": "^8.1.3",
93
+ "vite-tsconfig-paths": "^6.1.1",
94
+ "vitest": "^4.1.9",
95
+ "wrangler": "^4.107.0"
96
+ },
97
+ "pnpm": {
98
+ "onlyBuiltDependencies": [
99
+ "esbuild",
100
+ "lightningcss"
101
+ ]
102
+ }
103
+ }
@@ -0,0 +1,47 @@
1
+ import { useState } from 'react'
2
+ import { useRouterState } from '@tanstack/react-router'
3
+ import { Button } from '@/components/ui/button'
4
+ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
5
+
6
+ // Rendered by the router's defaultErrorComponent for any uncaught render or
7
+ // loader error. Per-route `errorComponent` options override it. Keep this
8
+ // component free of app dependencies (toasts, auth, etc.) -- it must still
9
+ // render when the rest of the app is broken.
10
+ export function DefaultErrorComponent({ error }: { error: Error }) {
11
+ const pathname = useRouterState({ select: (s) => s.location.pathname })
12
+ const [copied, setCopied] = useState(false)
13
+
14
+ async function copyForLeo() {
15
+ // Blank lines + fenced stack so the report keeps its structure when
16
+ // pasted into a markdown-rendering chat.
17
+ const report = [
18
+ 'My app threw an error, please fix it:',
19
+ `Page: ${pathname}`,
20
+ `Error: ${error.message}`,
21
+ ['Stack:', '```', error.stack ?? '(no stack trace)', '```'].join('\n'),
22
+ ].join('\n\n')
23
+
24
+ await navigator.clipboard.writeText(report)
25
+ setCopied(true)
26
+ setTimeout(() => setCopied(false), 2000)
27
+ }
28
+
29
+ return (
30
+ <div className="min-h-screen flex items-center justify-center bg-background p-4">
31
+ <Card className="w-full max-w-lg">
32
+ <CardHeader>
33
+ <CardTitle>Something went wrong</CardTitle>
34
+ </CardHeader>
35
+ <CardContent className="space-y-4">
36
+ <pre className="text-sm text-destructive whitespace-pre-wrap break-words rounded-md bg-muted p-3">
37
+ {error.message}
38
+ </pre>
39
+ <Button onClick={copyForLeo}>{copied ? 'Copied!' : 'Copy error'}</Button>
40
+ <p className="text-sm text-muted-foreground">
41
+ Paste the copied error to Leo and it will help you fix it.
42
+ </p>
43
+ </CardContent>
44
+ </Card>
45
+ </div>
46
+ )
47
+ }
@@ -0,0 +1,51 @@
1
+ import * as React from "react";
2
+ import * as AccordionPrimitive from "@radix-ui/react-accordion";
3
+ import { ChevronDown } from "lucide-react";
4
+
5
+ import { cn } from "@/lib/utils";
6
+
7
+ const Accordion = AccordionPrimitive.Root;
8
+
9
+ const AccordionItem = React.forwardRef<
10
+ React.ElementRef<typeof AccordionPrimitive.Item>,
11
+ React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
12
+ >(({ className, ...props }, ref) => (
13
+ <AccordionPrimitive.Item ref={ref} className={cn("border-b", className)} {...props} />
14
+ ));
15
+ AccordionItem.displayName = "AccordionItem";
16
+
17
+ const AccordionTrigger = React.forwardRef<
18
+ React.ElementRef<typeof AccordionPrimitive.Trigger>,
19
+ React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
20
+ >(({ className, children, ...props }, ref) => (
21
+ <AccordionPrimitive.Header className="flex">
22
+ <AccordionPrimitive.Trigger
23
+ ref={ref}
24
+ className={cn(
25
+ "flex flex-1 items-center justify-between py-4 text-sm font-medium cursor-pointer transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",
26
+ className,
27
+ )}
28
+ {...props}
29
+ >
30
+ {children}
31
+ <ChevronDown className="h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" />
32
+ </AccordionPrimitive.Trigger>
33
+ </AccordionPrimitive.Header>
34
+ ));
35
+ AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
36
+
37
+ const AccordionContent = React.forwardRef<
38
+ React.ElementRef<typeof AccordionPrimitive.Content>,
39
+ React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
40
+ >(({ className, children, ...props }, ref) => (
41
+ <AccordionPrimitive.Content
42
+ ref={ref}
43
+ className="overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
44
+ {...props}
45
+ >
46
+ <div className={cn("pb-4 pt-0", className)}>{children}</div>
47
+ </AccordionPrimitive.Content>
48
+ ));
49
+ AccordionContent.displayName = AccordionPrimitive.Content.displayName;
50
+
51
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -0,0 +1,115 @@
1
+ import * as React from "react";
2
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
3
+
4
+ import { cn } from "@/lib/utils";
5
+ import { buttonVariants } from "@/components/ui/button";
6
+
7
+ const AlertDialog = AlertDialogPrimitive.Root;
8
+
9
+ const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
10
+
11
+ const AlertDialogPortal = AlertDialogPrimitive.Portal;
12
+
13
+ const AlertDialogOverlay = React.forwardRef<
14
+ React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
15
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
16
+ >(({ className, ...props }, ref) => (
17
+ <AlertDialogPrimitive.Overlay
18
+ className={cn(
19
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
20
+ className,
21
+ )}
22
+ {...props}
23
+ ref={ref}
24
+ />
25
+ ));
26
+ AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
27
+
28
+ const AlertDialogContent = React.forwardRef<
29
+ React.ElementRef<typeof AlertDialogPrimitive.Content>,
30
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>
31
+ >(({ className, ...props }, ref) => (
32
+ <AlertDialogPortal>
33
+ <AlertDialogOverlay />
34
+ <AlertDialogPrimitive.Content
35
+ ref={ref}
36
+ className={cn(
37
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",
38
+ className,
39
+ )}
40
+ {...props}
41
+ />
42
+ </AlertDialogPortal>
43
+ ));
44
+ AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
45
+
46
+ const AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
47
+ <div className={cn("flex flex-col space-y-2 text-center sm:text-left", className)} {...props} />
48
+ );
49
+ AlertDialogHeader.displayName = "AlertDialogHeader";
50
+
51
+ const AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
52
+ <div
53
+ className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)}
54
+ {...props}
55
+ />
56
+ );
57
+ AlertDialogFooter.displayName = "AlertDialogFooter";
58
+
59
+ const AlertDialogTitle = React.forwardRef<
60
+ React.ElementRef<typeof AlertDialogPrimitive.Title>,
61
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
62
+ >(({ className, ...props }, ref) => (
63
+ <AlertDialogPrimitive.Title
64
+ ref={ref}
65
+ className={cn("text-lg font-semibold", className)}
66
+ {...props}
67
+ />
68
+ ));
69
+ AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
70
+
71
+ const AlertDialogDescription = React.forwardRef<
72
+ React.ElementRef<typeof AlertDialogPrimitive.Description>,
73
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
74
+ >(({ className, ...props }, ref) => (
75
+ <AlertDialogPrimitive.Description
76
+ ref={ref}
77
+ className={cn("text-sm text-muted-foreground", className)}
78
+ {...props}
79
+ />
80
+ ));
81
+ AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
82
+
83
+ const AlertDialogAction = React.forwardRef<
84
+ React.ElementRef<typeof AlertDialogPrimitive.Action>,
85
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
86
+ >(({ className, ...props }, ref) => (
87
+ <AlertDialogPrimitive.Action ref={ref} className={cn(buttonVariants(), className)} {...props} />
88
+ ));
89
+ AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
90
+
91
+ const AlertDialogCancel = React.forwardRef<
92
+ React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
93
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>
94
+ >(({ className, ...props }, ref) => (
95
+ <AlertDialogPrimitive.Cancel
96
+ ref={ref}
97
+ className={cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className)}
98
+ {...props}
99
+ />
100
+ ));
101
+ AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
102
+
103
+ export {
104
+ AlertDialog,
105
+ AlertDialogPortal,
106
+ AlertDialogOverlay,
107
+ AlertDialogTrigger,
108
+ AlertDialogContent,
109
+ AlertDialogHeader,
110
+ AlertDialogFooter,
111
+ AlertDialogTitle,
112
+ AlertDialogDescription,
113
+ AlertDialogAction,
114
+ AlertDialogCancel,
115
+ };
@@ -0,0 +1,49 @@
1
+ import * as React from "react";
2
+ import { cva, type VariantProps } from "class-variance-authority";
3
+
4
+ import { cn } from "@/lib/utils";
5
+
6
+ const alertVariants = cva(
7
+ "relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: "bg-background text-foreground",
12
+ destructive:
13
+ "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
14
+ },
15
+ },
16
+ defaultVariants: {
17
+ variant: "default",
18
+ },
19
+ },
20
+ );
21
+
22
+ const Alert = React.forwardRef<
23
+ HTMLDivElement,
24
+ React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
25
+ >(({ className, variant, ...props }, ref) => (
26
+ <div ref={ref} role="alert" className={cn(alertVariants({ variant }), className)} {...props} />
27
+ ));
28
+ Alert.displayName = "Alert";
29
+
30
+ const AlertTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(
31
+ ({ className, ...props }, ref) => (
32
+ <h5
33
+ ref={ref}
34
+ className={cn("mb-1 font-medium leading-none tracking-tight", className)}
35
+ {...props}
36
+ />
37
+ ),
38
+ );
39
+ AlertTitle.displayName = "AlertTitle";
40
+
41
+ const AlertDescription = React.forwardRef<
42
+ HTMLParagraphElement,
43
+ React.HTMLAttributes<HTMLParagraphElement>
44
+ >(({ className, ...props }, ref) => (
45
+ <div ref={ref} className={cn("text-sm [&_p]:leading-relaxed", className)} {...props} />
46
+ ));
47
+ AlertDescription.displayName = "AlertDescription";
48
+
49
+ export { Alert, AlertTitle, AlertDescription };
@@ -0,0 +1,5 @@
1
+ import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
2
+
3
+ const AspectRatio = AspectRatioPrimitive.Root;
4
+
5
+ export { AspectRatio };
@@ -0,0 +1,47 @@
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
5
+
6
+ import { cn } from "@/lib/utils";
7
+
8
+ const Avatar = React.forwardRef<
9
+ React.ElementRef<typeof AvatarPrimitive.Root>,
10
+ React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
11
+ >(({ className, ...props }, ref) => (
12
+ <AvatarPrimitive.Root
13
+ ref={ref}
14
+ className={cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className)}
15
+ {...props}
16
+ />
17
+ ));
18
+ Avatar.displayName = AvatarPrimitive.Root.displayName;
19
+
20
+ const AvatarImage = React.forwardRef<
21
+ React.ElementRef<typeof AvatarPrimitive.Image>,
22
+ React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
23
+ >(({ className, ...props }, ref) => (
24
+ <AvatarPrimitive.Image
25
+ ref={ref}
26
+ className={cn("aspect-square h-full w-full", className)}
27
+ {...props}
28
+ />
29
+ ));
30
+ AvatarImage.displayName = AvatarPrimitive.Image.displayName;
31
+
32
+ const AvatarFallback = React.forwardRef<
33
+ React.ElementRef<typeof AvatarPrimitive.Fallback>,
34
+ React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
35
+ >(({ className, ...props }, ref) => (
36
+ <AvatarPrimitive.Fallback
37
+ ref={ref}
38
+ className={cn(
39
+ "flex h-full w-full items-center justify-center rounded-full bg-muted",
40
+ className,
41
+ )}
42
+ {...props}
43
+ />
44
+ ));
45
+ AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
46
+
47
+ export { Avatar, AvatarImage, AvatarFallback };
@@ -0,0 +1,32 @@
1
+ import * as React from "react";
2
+ import { cva, type VariantProps } from "class-variance-authority";
3
+
4
+ import { cn } from "@/lib/utils";
5
+
6
+ const badgeVariants = cva(
7
+ "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
12
+ secondary:
13
+ "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
14
+ destructive:
15
+ "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
16
+ outline: "text-foreground",
17
+ },
18
+ },
19
+ defaultVariants: {
20
+ variant: "default",
21
+ },
22
+ },
23
+ );
24
+
25
+ export interface BadgeProps
26
+ extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}
27
+
28
+ function Badge({ className, variant, ...props }: BadgeProps) {
29
+ return <div className={cn(badgeVariants({ variant }), className)} {...props} />;
30
+ }
31
+
32
+ export { Badge, badgeVariants };