@lark-apaas/coding-templates 0.1.2 → 0.1.4

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 (262) hide show
  1. package/package.json +2 -3
  2. package/template-html/README.md +1 -1
  3. package/template-vite-react/_gitignore +24 -0
  4. package/template-vite-react/client/index.html +13 -0
  5. package/template-vite-react/client/public/favicon.svg +1 -0
  6. package/template-vite-react/client/public/icons.svg +24 -0
  7. package/template-vite-react/client/src/api/index.ts +7 -0
  8. package/template-vite-react/client/src/app.tsx +17 -0
  9. package/{template-nextjs-static → template-vite-react/client}/src/components/header.tsx +5 -13
  10. package/template-vite-react/client/src/components/layout.tsx +13 -0
  11. package/template-vite-react/client/src/components/theme-provider.tsx +45 -0
  12. package/template-vite-react/client/src/components/ui/accordion.tsx +72 -0
  13. package/template-vite-react/client/src/components/ui/alert-dialog.tsx +187 -0
  14. package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/alert.tsx +15 -10
  15. package/template-vite-react/client/src/components/ui/aspect-ratio.tsx +22 -0
  16. package/template-vite-react/client/src/components/ui/avatar.tsx +109 -0
  17. package/template-vite-react/client/src/components/ui/badge.tsx +52 -0
  18. package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/breadcrumb.tsx +39 -23
  19. package/template-vite-react/client/src/components/ui/button.tsx +58 -0
  20. package/{template-nextjs-static → template-vite-react/client}/src/components/ui/calendar.tsx +43 -37
  21. package/template-vite-react/client/src/components/ui/card.tsx +103 -0
  22. package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/carousel.tsx +8 -7
  23. package/{template-nextjs-static → template-vite-react/client}/src/components/ui/chart.tsx +49 -35
  24. package/template-vite-react/client/src/components/ui/checkbox.tsx +29 -0
  25. package/template-vite-react/client/src/components/ui/collapsible.tsx +19 -0
  26. package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/command.tsx +40 -52
  27. package/template-vite-react/client/src/components/ui/context-menu.tsx +271 -0
  28. package/template-vite-react/client/src/components/ui/dialog.tsx +158 -0
  29. package/{template-nextjs-static → template-vite-react/client}/src/components/ui/drawer.tsx +9 -12
  30. package/template-vite-react/client/src/components/ui/dropdown-menu.tsx +268 -0
  31. package/template-vite-react/client/src/components/ui/hover-card.tsx +49 -0
  32. package/template-vite-react/client/src/components/ui/input-group.tsx +156 -0
  33. package/{template-nextjs-static → template-vite-react/client}/src/components/ui/input-otp.tsx +17 -7
  34. package/template-vite-react/client/src/components/ui/input.tsx +20 -0
  35. package/template-vite-react/client/src/components/ui/label.tsx +18 -0
  36. package/template-vite-react/client/src/components/ui/menubar.tsx +280 -0
  37. package/template-vite-react/client/src/components/ui/navigation-menu.tsx +168 -0
  38. package/{template-nextjs-static → template-vite-react/client}/src/components/ui/pagination.tsx +35 -32
  39. package/template-vite-react/client/src/components/ui/popover.tsx +90 -0
  40. package/template-vite-react/client/src/components/ui/progress.tsx +81 -0
  41. package/template-vite-react/client/src/components/ui/radio-group.tsx +38 -0
  42. package/template-vite-react/client/src/components/ui/resizable.tsx +48 -0
  43. package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/scroll-area.tsx +10 -13
  44. package/template-vite-react/client/src/components/ui/select.tsx +199 -0
  45. package/template-vite-react/client/src/components/ui/separator.tsx +25 -0
  46. package/template-vite-react/client/src/components/ui/sheet.tsx +138 -0
  47. package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/sidebar.tsx +156 -162
  48. package/{template-nextjs-static → template-vite-react/client}/src/components/ui/skeleton.tsx +1 -1
  49. package/template-vite-react/client/src/components/ui/slider.tsx +57 -0
  50. package/template-vite-react/client/src/components/ui/sonner.tsx +49 -0
  51. package/template-vite-react/client/src/components/ui/switch.tsx +30 -0
  52. package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/table.tsx +5 -5
  53. package/template-vite-react/client/src/components/ui/tabs.tsx +80 -0
  54. package/template-vite-react/client/src/components/ui/textarea.tsx +18 -0
  55. package/template-vite-react/client/src/components/ui/toggle-group.tsx +89 -0
  56. package/template-vite-react/client/src/components/ui/toggle.tsx +44 -0
  57. package/template-vite-react/client/src/components/ui/tooltip.tsx +64 -0
  58. package/template-vite-react/client/src/index.css +1 -0
  59. package/template-vite-react/client/src/main.tsx +13 -0
  60. package/template-vite-react/client/src/pages/home/index.tsx +12 -0
  61. package/template-vite-react/client/src/pages/not-found/index.tsx +11 -0
  62. package/template-vite-react/client/src/types/index.ts +1 -0
  63. package/{template-nextjs-static → template-vite-react}/components.json +2 -2
  64. package/template-vite-react/eslint.config.js +23 -0
  65. package/template-vite-react/package.json +58 -0
  66. package/template-vite-react/scripts/build.sh +40 -0
  67. package/template-vite-react/shared/types.ts +1 -0
  68. package/template-vite-react/tsconfig.app.json +33 -0
  69. package/template-vite-react/tsconfig.json +14 -0
  70. package/template-vite-react/tsconfig.node.json +26 -0
  71. package/template-vite-react/vite.config.ts +17 -0
  72. package/template-nextjs-fullstack/README.md +0 -169
  73. package/template-nextjs-fullstack/_env.local.example +0 -1
  74. package/template-nextjs-fullstack/_gitignore +0 -41
  75. package/template-nextjs-fullstack/components.json +0 -25
  76. package/template-nextjs-fullstack/drizzle.config.ts +0 -10
  77. package/template-nextjs-fullstack/eslint.config.js +0 -15
  78. package/template-nextjs-fullstack/next.config.ts +0 -5
  79. package/template-nextjs-fullstack/package.json +0 -85
  80. package/template-nextjs-fullstack/postcss.config.js +0 -8
  81. package/template-nextjs-fullstack/scripts/build.sh +0 -37
  82. package/template-nextjs-fullstack/src/app/favicon.ico +0 -0
  83. package/template-nextjs-fullstack/src/app/globals.css +0 -130
  84. package/template-nextjs-fullstack/src/app/layout.tsx +0 -24
  85. package/template-nextjs-fullstack/src/app/page.tsx +0 -69
  86. package/template-nextjs-fullstack/src/app/todos/actions.ts +0 -37
  87. package/template-nextjs-fullstack/src/app/todos/page.tsx +0 -26
  88. package/template-nextjs-fullstack/src/app/todos/todo-form.tsx +0 -27
  89. package/template-nextjs-fullstack/src/app/todos/todo-list.tsx +0 -44
  90. package/template-nextjs-fullstack/src/components/header.tsx +0 -32
  91. package/template-nextjs-fullstack/src/components/theme-provider.tsx +0 -8
  92. package/template-nextjs-fullstack/src/components/ui/README.md +0 -134
  93. package/template-nextjs-fullstack/src/components/ui/accordion.tsx +0 -66
  94. package/template-nextjs-fullstack/src/components/ui/alert-dialog.tsx +0 -157
  95. package/template-nextjs-fullstack/src/components/ui/aspect-ratio.tsx +0 -11
  96. package/template-nextjs-fullstack/src/components/ui/avatar.tsx +0 -53
  97. package/template-nextjs-fullstack/src/components/ui/badge.tsx +0 -42
  98. package/template-nextjs-fullstack/src/components/ui/button.tsx +0 -69
  99. package/template-nextjs-fullstack/src/components/ui/calendar.tsx +0 -213
  100. package/template-nextjs-fullstack/src/components/ui/card.tsx +0 -82
  101. package/template-nextjs-fullstack/src/components/ui/chart.tsx +0 -357
  102. package/template-nextjs-fullstack/src/components/ui/checkbox.tsx +0 -32
  103. package/template-nextjs-fullstack/src/components/ui/collapsible.tsx +0 -33
  104. package/template-nextjs-fullstack/src/components/ui/context-menu.tsx +0 -324
  105. package/template-nextjs-fullstack/src/components/ui/dialog.tsx +0 -143
  106. package/template-nextjs-fullstack/src/components/ui/drawer.tsx +0 -135
  107. package/template-nextjs-fullstack/src/components/ui/dropdown-menu.tsx +0 -329
  108. package/template-nextjs-fullstack/src/components/ui/hover-card.tsx +0 -44
  109. package/template-nextjs-fullstack/src/components/ui/input-group.tsx +0 -166
  110. package/template-nextjs-fullstack/src/components/ui/input-otp.tsx +0 -77
  111. package/template-nextjs-fullstack/src/components/ui/input.tsx +0 -21
  112. package/template-nextjs-fullstack/src/components/ui/label.tsx +0 -24
  113. package/template-nextjs-fullstack/src/components/ui/menubar.tsx +0 -348
  114. package/template-nextjs-fullstack/src/components/ui/navigation-menu.tsx +0 -168
  115. package/template-nextjs-fullstack/src/components/ui/pagination.tsx +0 -127
  116. package/template-nextjs-fullstack/src/components/ui/popover.tsx +0 -48
  117. package/template-nextjs-fullstack/src/components/ui/progress.tsx +0 -31
  118. package/template-nextjs-fullstack/src/components/ui/radio-group.tsx +0 -45
  119. package/template-nextjs-fullstack/src/components/ui/resizable.tsx +0 -56
  120. package/template-nextjs-fullstack/src/components/ui/select.tsx +0 -243
  121. package/template-nextjs-fullstack/src/components/ui/separator.tsx +0 -28
  122. package/template-nextjs-fullstack/src/components/ui/sheet.tsx +0 -139
  123. package/template-nextjs-fullstack/src/components/ui/skeleton.tsx +0 -13
  124. package/template-nextjs-fullstack/src/components/ui/slider.tsx +0 -87
  125. package/template-nextjs-fullstack/src/components/ui/sonner.tsx +0 -67
  126. package/template-nextjs-fullstack/src/components/ui/switch.tsx +0 -31
  127. package/template-nextjs-fullstack/src/components/ui/tabs.tsx +0 -66
  128. package/template-nextjs-fullstack/src/components/ui/textarea.tsx +0 -18
  129. package/template-nextjs-fullstack/src/components/ui/toggle-group.tsx +0 -83
  130. package/template-nextjs-fullstack/src/components/ui/toggle.tsx +0 -47
  131. package/template-nextjs-fullstack/src/components/ui/tooltip.tsx +0 -61
  132. package/template-nextjs-fullstack/src/db/index.ts +0 -8
  133. package/template-nextjs-fullstack/src/db/schema.ts +0 -11
  134. package/template-nextjs-fullstack/tailwind.config.ts +0 -10
  135. package/template-nextjs-fullstack/tsconfig.json +0 -34
  136. package/template-nextjs-static/README.md +0 -80
  137. package/template-nextjs-static/_gitignore +0 -41
  138. package/template-nextjs-static/eslint.config.js +0 -15
  139. package/template-nextjs-static/next.config.ts +0 -8
  140. package/template-nextjs-static/package.json +0 -77
  141. package/template-nextjs-static/postcss.config.js +0 -8
  142. package/template-nextjs-static/public/favicon.ico +0 -0
  143. package/template-nextjs-static/scripts/build.sh +0 -36
  144. package/template-nextjs-static/src/components/theme-provider.tsx +0 -6
  145. package/template-nextjs-static/src/components/ui/README.md +0 -134
  146. package/template-nextjs-static/src/components/ui/accordion.tsx +0 -66
  147. package/template-nextjs-static/src/components/ui/alert-dialog.tsx +0 -157
  148. package/template-nextjs-static/src/components/ui/alert.tsx +0 -71
  149. package/template-nextjs-static/src/components/ui/aspect-ratio.tsx +0 -11
  150. package/template-nextjs-static/src/components/ui/avatar.tsx +0 -53
  151. package/template-nextjs-static/src/components/ui/badge.tsx +0 -42
  152. package/template-nextjs-static/src/components/ui/breadcrumb.tsx +0 -109
  153. package/template-nextjs-static/src/components/ui/button-group.tsx +0 -83
  154. package/template-nextjs-static/src/components/ui/button.tsx +0 -69
  155. package/template-nextjs-static/src/components/ui/card.tsx +0 -82
  156. package/template-nextjs-static/src/components/ui/carousel.tsx +0 -241
  157. package/template-nextjs-static/src/components/ui/checkbox.tsx +0 -32
  158. package/template-nextjs-static/src/components/ui/collapsible.tsx +0 -33
  159. package/template-nextjs-static/src/components/ui/command.tsx +0 -208
  160. package/template-nextjs-static/src/components/ui/context-menu.tsx +0 -324
  161. package/template-nextjs-static/src/components/ui/dialog.tsx +0 -143
  162. package/template-nextjs-static/src/components/ui/dropdown-menu.tsx +0 -329
  163. package/template-nextjs-static/src/components/ui/empty.tsx +0 -104
  164. package/template-nextjs-static/src/components/ui/field.tsx +0 -248
  165. package/template-nextjs-static/src/components/ui/form.tsx +0 -167
  166. package/template-nextjs-static/src/components/ui/hover-card.tsx +0 -44
  167. package/template-nextjs-static/src/components/ui/icons/file-ae-colorful-icon.tsx +0 -21
  168. package/template-nextjs-static/src/components/ui/icons/file-ai-colorful-icon.tsx +0 -36
  169. package/template-nextjs-static/src/components/ui/icons/file-android-colorful-icon.tsx +0 -33
  170. package/template-nextjs-static/src/components/ui/icons/file-audio-colorful-icon.tsx +0 -21
  171. package/template-nextjs-static/src/components/ui/icons/file-code-colorful-icon.tsx +0 -28
  172. package/template-nextjs-static/src/components/ui/icons/file-csv-colorful-icon.tsx +0 -21
  173. package/template-nextjs-static/src/components/ui/icons/file-eml-colorful-icon.tsx +0 -29
  174. package/template-nextjs-static/src/components/ui/icons/file-ios-colorful-icon.tsx +0 -25
  175. package/template-nextjs-static/src/components/ui/icons/file-keynote-colorful-icon.tsx +0 -29
  176. package/template-nextjs-static/src/components/ui/icons/file-pages-colorful-icon.tsx +0 -29
  177. package/template-nextjs-static/src/components/ui/icons/file-ps-colorful-icon.tsx +0 -21
  178. package/template-nextjs-static/src/components/ui/icons/file-sketch-colorful-icon.tsx +0 -21
  179. package/template-nextjs-static/src/components/ui/icons/file-slide-colorful-icon.tsx +0 -21
  180. package/template-nextjs-static/src/components/ui/icons/file-vcf-colorful-icon.tsx +0 -29
  181. package/template-nextjs-static/src/components/ui/icons/file-wiki-excel-colorful-icon.tsx +0 -23
  182. package/template-nextjs-static/src/components/ui/icons/file-wiki-image-colorful-icon.tsx +0 -27
  183. package/template-nextjs-static/src/components/ui/icons/file-wiki-pdf-colorful-icon.tsx +0 -20
  184. package/template-nextjs-static/src/components/ui/icons/file-wiki-ppt-colorful-icon.tsx +0 -21
  185. package/template-nextjs-static/src/components/ui/icons/file-wiki-text-colorful-icon.tsx +0 -12
  186. package/template-nextjs-static/src/components/ui/icons/file-wiki-unknown-colorful-icon.tsx +0 -14
  187. package/template-nextjs-static/src/components/ui/icons/file-wiki-video-colorful-icon.tsx +0 -23
  188. package/template-nextjs-static/src/components/ui/icons/file-wiki-word-colorful-icon.tsx +0 -38
  189. package/template-nextjs-static/src/components/ui/icons/file-wiki-zip-colorful-icon.tsx +0 -21
  190. package/template-nextjs-static/src/components/ui/image.tsx +0 -183
  191. package/template-nextjs-static/src/components/ui/input-group.tsx +0 -166
  192. package/template-nextjs-static/src/components/ui/input.tsx +0 -21
  193. package/template-nextjs-static/src/components/ui/item.tsx +0 -193
  194. package/template-nextjs-static/src/components/ui/kbd.tsx +0 -28
  195. package/template-nextjs-static/src/components/ui/label.tsx +0 -24
  196. package/template-nextjs-static/src/components/ui/menubar.tsx +0 -348
  197. package/template-nextjs-static/src/components/ui/native-select.tsx +0 -48
  198. package/template-nextjs-static/src/components/ui/navigation-menu.tsx +0 -168
  199. package/template-nextjs-static/src/components/ui/popover.tsx +0 -48
  200. package/template-nextjs-static/src/components/ui/progress.tsx +0 -31
  201. package/template-nextjs-static/src/components/ui/radio-group.tsx +0 -45
  202. package/template-nextjs-static/src/components/ui/resizable.tsx +0 -56
  203. package/template-nextjs-static/src/components/ui/scroll-area.tsx +0 -58
  204. package/template-nextjs-static/src/components/ui/select.tsx +0 -243
  205. package/template-nextjs-static/src/components/ui/separator.tsx +0 -28
  206. package/template-nextjs-static/src/components/ui/sheet.tsx +0 -139
  207. package/template-nextjs-static/src/components/ui/sidebar.tsx +0 -727
  208. package/template-nextjs-static/src/components/ui/slider.tsx +0 -87
  209. package/template-nextjs-static/src/components/ui/sonner.tsx +0 -67
  210. package/template-nextjs-static/src/components/ui/spinner.tsx +0 -16
  211. package/template-nextjs-static/src/components/ui/streamdown.tsx +0 -186
  212. package/template-nextjs-static/src/components/ui/switch.tsx +0 -31
  213. package/template-nextjs-static/src/components/ui/table.tsx +0 -116
  214. package/template-nextjs-static/src/components/ui/tabs.tsx +0 -66
  215. package/template-nextjs-static/src/components/ui/textarea.tsx +0 -18
  216. package/template-nextjs-static/src/components/ui/toggle-group.tsx +0 -83
  217. package/template-nextjs-static/src/components/ui/toggle.tsx +0 -47
  218. package/template-nextjs-static/src/components/ui/tooltip.tsx +0 -61
  219. package/template-nextjs-static/src/hooks/use-mobile.ts +0 -19
  220. package/template-nextjs-static/src/lib/utils.ts +0 -6
  221. package/template-nextjs-static/src/pages/_app.tsx +0 -11
  222. package/template-nextjs-static/src/pages/_document.tsx +0 -13
  223. package/template-nextjs-static/src/pages/hello.tsx +0 -32
  224. package/template-nextjs-static/src/pages/index.tsx +0 -76
  225. package/template-nextjs-static/src/styles/globals.css +0 -143
  226. package/template-nextjs-static/tailwind.config.ts +0 -10
  227. package/template-nextjs-static/tsconfig.json +0 -34
  228. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/button-group.tsx +0 -0
  229. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/empty.tsx +0 -0
  230. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/field.tsx +0 -0
  231. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/form.tsx +0 -0
  232. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-ae-colorful-icon.tsx +0 -0
  233. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-ai-colorful-icon.tsx +0 -0
  234. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-android-colorful-icon.tsx +0 -0
  235. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-audio-colorful-icon.tsx +0 -0
  236. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-code-colorful-icon.tsx +0 -0
  237. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-csv-colorful-icon.tsx +0 -0
  238. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-eml-colorful-icon.tsx +0 -0
  239. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-ios-colorful-icon.tsx +0 -0
  240. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-keynote-colorful-icon.tsx +0 -0
  241. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-pages-colorful-icon.tsx +0 -0
  242. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-ps-colorful-icon.tsx +0 -0
  243. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-sketch-colorful-icon.tsx +0 -0
  244. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-slide-colorful-icon.tsx +0 -0
  245. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-vcf-colorful-icon.tsx +0 -0
  246. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-excel-colorful-icon.tsx +0 -0
  247. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-image-colorful-icon.tsx +0 -0
  248. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-pdf-colorful-icon.tsx +0 -0
  249. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-ppt-colorful-icon.tsx +0 -0
  250. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-text-colorful-icon.tsx +0 -0
  251. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-unknown-colorful-icon.tsx +0 -0
  252. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-video-colorful-icon.tsx +0 -0
  253. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-word-colorful-icon.tsx +0 -0
  254. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/icons/file-wiki-zip-colorful-icon.tsx +0 -0
  255. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/image.tsx +0 -0
  256. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/item.tsx +0 -0
  257. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/kbd.tsx +0 -0
  258. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/native-select.tsx +0 -0
  259. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/spinner.tsx +0 -0
  260. /package/{template-nextjs-fullstack → template-vite-react/client}/src/components/ui/streamdown.tsx +0 -0
  261. /package/{template-nextjs-fullstack → template-vite-react/client}/src/hooks/use-mobile.ts +0 -0
  262. /package/{template-nextjs-fullstack → template-vite-react/client}/src/lib/utils.ts +0 -0
@@ -1,67 +0,0 @@
1
- 'use client';
2
-
3
- import * as React from 'react';
4
- import { cn } from '@/lib/utils';
5
- import {
6
- CircleAlertIcon,
7
- CircleCheckIcon,
8
- CircleXIcon,
9
- InfoIcon,
10
- Loader2Icon,
11
- XIcon,
12
- } from 'lucide-react';
13
- import { useTheme } from 'next-themes';
14
- import { Toaster as Sonner, type ToasterProps } from 'sonner';
15
-
16
- function Toaster({ className, style, icons, ...props }: ToasterProps) {
17
- const { theme = 'system' } = useTheme();
18
-
19
- return (
20
- <Sonner
21
- theme={theme as ToasterProps['theme']}
22
- className={cn('toaster group', className)}
23
- position="top-center"
24
- icons={{
25
- success: (
26
- <CircleCheckIcon
27
- fill="currentColor"
28
- className="size-4 text-success [&>:not(circle)]:stroke-(--normal-bg)"
29
- />
30
- ),
31
- info: (
32
- <InfoIcon
33
- fill="currentColor"
34
- className="size-4 text-info [&>:not(circle)]:stroke-(--normal-bg)"
35
- />
36
- ),
37
- warning: (
38
- <CircleAlertIcon
39
- fill="currentColor"
40
- className="size-4 text-warning [&>:not(circle)]:stroke-(--normal-bg)"
41
- />
42
- ),
43
- error: (
44
- <CircleXIcon
45
- fill="currentColor"
46
- className="size-4 text-destructive [&>:not(circle)]:stroke-(--normal-bg)"
47
- />
48
- ),
49
- close: <XIcon className="size-4 text-accent-foreground" />,
50
- loading: <Loader2Icon className="size-4 animate-spin text-primary" />,
51
- ...icons,
52
- }}
53
- style={
54
- {
55
- '--normal-bg': 'var(--popover)',
56
- '--normal-text': 'var(--popover-foreground)',
57
- '--normal-border': 'var(--border)',
58
- '--border-radius': 'var(--radius)',
59
- ...style,
60
- } as React.CSSProperties
61
- }
62
- {...props}
63
- />
64
- );
65
- }
66
-
67
- export { Toaster };
@@ -1,31 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as SwitchPrimitive from "@radix-ui/react-switch"
5
-
6
- import { cn } from "@/lib/utils"
7
-
8
- function Switch({
9
- className,
10
- ...props
11
- }: React.ComponentProps<typeof SwitchPrimitive.Root>) {
12
- return (
13
- <SwitchPrimitive.Root
14
- data-slot="switch"
15
- className={cn(
16
- "peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:data-state:bg-muted",
17
- className
18
- )}
19
- {...props}
20
- >
21
- <SwitchPrimitive.Thumb
22
- data-slot="switch-thumb"
23
- className={cn(
24
- "bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 data-disabled:opacity-60"
25
- )}
26
- />
27
- </SwitchPrimitive.Root>
28
- )
29
- }
30
-
31
- export { Switch }
@@ -1,66 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as TabsPrimitive from "@radix-ui/react-tabs"
5
-
6
- import { cn } from "@/lib/utils"
7
-
8
- function Tabs({
9
- className,
10
- ...props
11
- }: React.ComponentProps<typeof TabsPrimitive.Root>) {
12
- return (
13
- <TabsPrimitive.Root
14
- data-slot="tabs"
15
- className={cn("flex flex-col gap-2", className)}
16
- {...props}
17
- />
18
- )
19
- }
20
-
21
- function TabsList({
22
- className,
23
- ...props
24
- }: React.ComponentProps<typeof TabsPrimitive.List>) {
25
- return (
26
- <TabsPrimitive.List
27
- data-slot="tabs-list"
28
- className={cn(
29
- "bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
30
- className
31
- )}
32
- {...props}
33
- />
34
- )
35
- }
36
-
37
- function TabsTrigger({
38
- className,
39
- ...props
40
- }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {
41
- return (
42
- <TabsPrimitive.Trigger
43
- data-slot="tabs-trigger"
44
- className={cn(
45
- "data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm data-[state=active]:font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:cursor-not-allowed disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
46
- className
47
- )}
48
- {...props}
49
- />
50
- )
51
- }
52
-
53
- function TabsContent({
54
- className,
55
- ...props
56
- }: React.ComponentProps<typeof TabsPrimitive.Content>) {
57
- return (
58
- <TabsPrimitive.Content
59
- data-slot="tabs-content"
60
- className={cn("flex-1 outline-none", className)}
61
- {...props}
62
- />
63
- )
64
- }
65
-
66
- export { Tabs, TabsList, TabsTrigger, TabsContent }
@@ -1,18 +0,0 @@
1
- import * as React from "react"
2
-
3
- import { cn } from "@/lib/utils"
4
-
5
- function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
6
- return (
7
- <textarea
8
- data-slot="textarea"
9
- className={cn(
10
- "border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base transition-[color,box-shadow] outline-none focus-visible:ring-[3px] enabled:hover:border-primary disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
11
- className
12
- )}
13
- {...props}
14
- />
15
- )
16
- }
17
-
18
- export { Textarea }
@@ -1,83 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group"
5
- import { type VariantProps } from "class-variance-authority"
6
-
7
- import { cn } from "@/lib/utils"
8
- import { toggleVariants } from "@/components/ui/toggle"
9
-
10
- const ToggleGroupContext = React.createContext<
11
- VariantProps<typeof toggleVariants> & {
12
- spacing?: number
13
- }
14
- >({
15
- size: "default",
16
- variant: "default",
17
- spacing: 0,
18
- })
19
-
20
- function ToggleGroup({
21
- className,
22
- variant,
23
- size,
24
- spacing = 0,
25
- children,
26
- ...props
27
- }: React.ComponentProps<typeof ToggleGroupPrimitive.Root> &
28
- VariantProps<typeof toggleVariants> & {
29
- spacing?: number
30
- }) {
31
- return (
32
- <ToggleGroupPrimitive.Root
33
- data-slot="toggle-group"
34
- data-variant={variant}
35
- data-size={size}
36
- data-spacing={spacing}
37
- style={{ "--gap": spacing } as React.CSSProperties}
38
- className={cn(
39
- "group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs",
40
- className
41
- )}
42
- {...props}
43
- >
44
- <ToggleGroupContext.Provider value={{ variant, size, spacing }}>
45
- {children}
46
- </ToggleGroupContext.Provider>
47
- </ToggleGroupPrimitive.Root>
48
- )
49
- }
50
-
51
- function ToggleGroupItem({
52
- className,
53
- children,
54
- variant,
55
- size,
56
- ...props
57
- }: React.ComponentProps<typeof ToggleGroupPrimitive.Item> &
58
- VariantProps<typeof toggleVariants>) {
59
- const context = React.useContext(ToggleGroupContext)
60
-
61
- return (
62
- <ToggleGroupPrimitive.Item
63
- data-slot="toggle-group-item"
64
- data-variant={context.variant || variant}
65
- data-size={context.size || size}
66
- data-spacing={context.spacing}
67
- className={cn(
68
- toggleVariants({
69
- variant: context.variant || variant,
70
- size: context.size || size,
71
- }),
72
- "w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10",
73
- "data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l",
74
- className
75
- )}
76
- {...props}
77
- >
78
- {children}
79
- </ToggleGroupPrimitive.Item>
80
- )
81
- }
82
-
83
- export { ToggleGroup, ToggleGroupItem }
@@ -1,47 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as TogglePrimitive from "@radix-ui/react-toggle"
5
- import { cva, type VariantProps } from "class-variance-authority"
6
-
7
- import { cn } from "@/lib/utils"
8
-
9
- const toggleVariants = cva(
10
- "inline-flex items-center justify-center gap-2 rounded-md text-sm font-normal enabled:hover:bg-muted enabled:hover:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
11
- {
12
- variants: {
13
- variant: {
14
- default: "bg-transparent",
15
- outline:
16
- "border border-input bg-transparent enabled:hover:bg-accent enabled:hover:text-accent-foreground",
17
- },
18
- size: {
19
- default: "h-9 px-2 min-w-9",
20
- sm: "h-8 px-1.5 min-w-8",
21
- lg: "h-10 px-2.5 min-w-10",
22
- },
23
- },
24
- defaultVariants: {
25
- variant: "default",
26
- size: "default",
27
- },
28
- }
29
- )
30
-
31
- function Toggle({
32
- className,
33
- variant,
34
- size,
35
- ...props
36
- }: React.ComponentProps<typeof TogglePrimitive.Root> &
37
- VariantProps<typeof toggleVariants>) {
38
- return (
39
- <TogglePrimitive.Root
40
- data-slot="toggle"
41
- className={cn(toggleVariants({ variant, size, className }))}
42
- {...props}
43
- />
44
- )
45
- }
46
-
47
- export { Toggle, toggleVariants }
@@ -1,61 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as TooltipPrimitive from "@radix-ui/react-tooltip"
5
-
6
- import { cn } from "@/lib/utils"
7
-
8
- function TooltipProvider({
9
- delayDuration = 0,
10
- ...props
11
- }: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
12
- return (
13
- <TooltipPrimitive.Provider
14
- data-slot="tooltip-provider"
15
- delayDuration={delayDuration}
16
- {...props}
17
- />
18
- )
19
- }
20
-
21
- function Tooltip({
22
- ...props
23
- }: React.ComponentProps<typeof TooltipPrimitive.Root>) {
24
- return (
25
- <TooltipProvider>
26
- <TooltipPrimitive.Root data-slot="tooltip" {...props} />
27
- </TooltipProvider>
28
- )
29
- }
30
-
31
- function TooltipTrigger({
32
- ...props
33
- }: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
34
- return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />
35
- }
36
-
37
- function TooltipContent({
38
- className,
39
- sideOffset = 0,
40
- children,
41
- ...props
42
- }: React.ComponentProps<typeof TooltipPrimitive.Content>) {
43
- return (
44
- <TooltipPrimitive.Portal>
45
- <TooltipPrimitive.Content
46
- data-slot="tooltip-content"
47
- sideOffset={sideOffset}
48
- className={cn(
49
- "bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance shadow-md",
50
- className
51
- )}
52
- {...props}
53
- >
54
- {children}
55
- <TooltipPrimitive.Arrow className="bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" />
56
- </TooltipPrimitive.Content>
57
- </TooltipPrimitive.Portal>
58
- )
59
- }
60
-
61
- export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
@@ -1,8 +0,0 @@
1
- import { drizzle } from "drizzle-orm/postgres-js";
2
- import postgres from "postgres";
3
- import * as schema from "./schema";
4
-
5
- const connectionString = process.env.DATABASE_URL || "";
6
-
7
- const client = postgres(connectionString);
8
- export const db = drizzle(client, { schema });
@@ -1,11 +0,0 @@
1
- import { pgTable, serial, text, boolean, timestamp } from "drizzle-orm/pg-core";
2
-
3
- export const todos = pgTable("todos", {
4
- id: serial("id").primaryKey(),
5
- title: text("title").notNull(),
6
- completed: boolean("completed").notNull().default(false),
7
- createdAt: timestamp("created_at").defaultNow().notNull(),
8
- });
9
-
10
- export type Todo = typeof todos.$inferSelect;
11
- export type NewTodo = typeof todos.$inferInsert;
@@ -1,10 +0,0 @@
1
- import type { Config } from 'tailwindcss';
2
-
3
- const config: Config = {
4
- content: [
5
- './src/**/*.{ts,tsx,css}',
6
- ],
7
- plugins: [],
8
- };
9
-
10
- export default config;
@@ -1,34 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2017",
4
- "lib": ["dom", "dom.iterable", "esnext"],
5
- "allowJs": true,
6
- "skipLibCheck": true,
7
- "strict": true,
8
- "noEmit": true,
9
- "esModuleInterop": true,
10
- "module": "esnext",
11
- "moduleResolution": "bundler",
12
- "resolveJsonModule": true,
13
- "isolatedModules": true,
14
- "jsx": "react-jsx",
15
- "incremental": true,
16
- "plugins": [
17
- {
18
- "name": "next"
19
- }
20
- ],
21
- "paths": {
22
- "@/*": ["./src/*"]
23
- }
24
- },
25
- "include": [
26
- "next-env.d.ts",
27
- "**/*.ts",
28
- "**/*.tsx",
29
- ".next/types/**/*.ts",
30
- ".next/dev/types/**/*.ts",
31
- "**/*.mts"
32
- ],
33
- "exclude": ["node_modules"]
34
- }
@@ -1,80 +0,0 @@
1
- # Next.js Pages Router 静态导出模板
2
-
3
- 纯前端模板,构建产出静态 HTML + JS/CSS,部署到 Nginx + CDN。
4
-
5
- ## 快速开始
6
-
7
- ```bash
8
- npm install
9
- npm run dev
10
- ```
11
-
12
- 打开 http://localhost:3000 查看效果。
13
-
14
- ## 命令
15
-
16
- | 命令 | 说明 |
17
- |---|---|
18
- | `npm run dev` | 启动开发服务器 |
19
- | `npm run build` | 构建静态导出到 `out/` |
20
- | `npm run lint` | 运行 ESLint |
21
-
22
- ## 构建产出
23
-
24
- ```bash
25
- npm run build
26
- ```
27
-
28
- 产出 `out/` 目录:
29
-
30
- ```
31
- out/
32
- ├── index.html # 首页
33
- ├── hello.html # /hello 路由
34
- ├── 404.html # 404 页面
35
- └── _next/static/ # JS、CSS、字体 → 部署到 CDN
36
- ```
37
-
38
- - 每个路由一个 HTML 文件(构建时预渲染,天然 SEO 友好)
39
- - 无 RSC payload(.txt 文件),产物干净
40
- - `_next/static/` 通过 `assetPrefix` 指向 CDN
41
-
42
- ## 部署
43
-
44
- ```
45
- HTML 文件 → Nginx / 静态服务器
46
- _next/static/ → CDN(通过 assetPrefix 配置)
47
- ```
48
-
49
- 配置 CDN 地址:
50
-
51
- ```ts
52
- // next.config.ts
53
- const nextConfig = {
54
- output: "export",
55
- assetPrefix: "https://cdn.example.com",
56
- };
57
- ```
58
-
59
- ## 技术栈
60
-
61
- - Next.js 16(Pages Router、Static Export)
62
- - React 19、TypeScript 5
63
- - Tailwind CSS 4 + shadcn/ui(new-york 风格、lucide 图标)
64
- - next-themes(暗色模式)
65
- - framer-motion(动画)
66
-
67
- ## 添加新页面
68
-
69
- 在 `src/pages/` 下创建文件即可,文件名即路由:
70
-
71
- ```
72
- src/pages/about.tsx → /about
73
- src/pages/blog.tsx → /blog
74
- ```
75
-
76
- ## 添加 shadcn/ui 组件
77
-
78
- ```bash
79
- npx shadcn@latest add <component-name>
80
- ```
@@ -1,41 +0,0 @@
1
- # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2
-
3
- # dependencies
4
- /node_modules
5
- /.pnp
6
- .pnp.*
7
- .yarn/*
8
- !.yarn/patches
9
- !.yarn/plugins
10
- !.yarn/releases
11
- !.yarn/versions
12
-
13
- # testing
14
- /coverage
15
-
16
- # next.js
17
- /.next/
18
- /out/
19
-
20
- # production
21
- /build
22
-
23
- # misc
24
- .DS_Store
25
- *.pem
26
-
27
- # debug
28
- npm-debug.log*
29
- yarn-debug.log*
30
- yarn-error.log*
31
- .pnpm-debug.log*
32
-
33
- # env files (can opt-in for committing if needed)
34
- .env*
35
-
36
- # vercel
37
- .vercel
38
-
39
- # typescript
40
- *.tsbuildinfo
41
- next-env.d.ts
@@ -1,15 +0,0 @@
1
- const js = require('@eslint/js');
2
- const tseslint = require('typescript-eslint');
3
-
4
- module.exports = tseslint.config(
5
- { ignores: ['.next', 'out', 'node_modules'] },
6
- js.configs.recommended,
7
- ...tseslint.configs.recommended,
8
- {
9
- files: ['src/**/*.{ts,tsx}'],
10
- rules: {
11
- '@typescript-eslint/no-unused-vars': 'warn',
12
- '@typescript-eslint/no-unused-expressions': 'off',
13
- },
14
- },
15
- );
@@ -1,8 +0,0 @@
1
- import type { NextConfig } from "next";
2
-
3
- const nextConfig: NextConfig = {
4
- output: "export",
5
- // assetPrefix: 'https://cdn.example.com', // uncomment for CDN
6
- };
7
-
8
- export default nextConfig;
@@ -1,77 +0,0 @@
1
- {
2
- "name": "{{projectName}}",
3
- "version": "0.1.0",
4
- "private": true,
5
- "mclaw": {
6
- "stack": "nextjs-static",
7
- "stackVersion": "0.1.0"
8
- },
9
- "scripts": {
10
- "dev": "next dev",
11
- "build": "bash scripts/build.sh",
12
- "start": "next start",
13
- "lint": "eslint src"
14
- },
15
- "dependencies": {
16
- "@base-ui/react": "^1.3.0",
17
- "@radix-ui/react-accordion": "^1.2.12",
18
- "@radix-ui/react-alert-dialog": "^1.1.15",
19
- "@radix-ui/react-aspect-ratio": "^1.1.7",
20
- "@radix-ui/react-avatar": "^1.1.10",
21
- "@radix-ui/react-checkbox": "^1.3.3",
22
- "@radix-ui/react-collapsible": "^1.1.12",
23
- "@radix-ui/react-context-menu": "^2.2.16",
24
- "@radix-ui/react-dialog": "^1.1.15",
25
- "@radix-ui/react-dropdown-menu": "^2.1.16",
26
- "@radix-ui/react-hover-card": "^1.1.15",
27
- "@radix-ui/react-label": "^2.1.7",
28
- "@radix-ui/react-menubar": "^1.1.16",
29
- "@radix-ui/react-navigation-menu": "^1.2.14",
30
- "@radix-ui/react-popover": "^1.1.15",
31
- "@radix-ui/react-progress": "^1.1.7",
32
- "@radix-ui/react-radio-group": "^1.3.8",
33
- "@radix-ui/react-scroll-area": "^1.2.10",
34
- "@radix-ui/react-select": "^2.2.6",
35
- "@radix-ui/react-separator": "^1.1.7",
36
- "@radix-ui/react-slider": "^1.3.6",
37
- "@radix-ui/react-slot": "^1.2.3",
38
- "@radix-ui/react-switch": "^1.2.6",
39
- "@radix-ui/react-tabs": "^1.1.13",
40
- "@radix-ui/react-toggle": "^1.1.10",
41
- "@radix-ui/react-toggle-group": "^1.1.11",
42
- "@radix-ui/react-tooltip": "^1.2.8",
43
- "class-variance-authority": "^0.7.1",
44
- "clsx": "^2.1.1",
45
- "cmdk": "^1.1.1",
46
- "embla-carousel-react": "^8.6.0",
47
- "es-toolkit": "^1.43.0",
48
- "framer-motion": "^12.36.0",
49
- "input-otp": "^1.4.2",
50
- "lucide-react": "^0.577.0",
51
- "next": "16.1.6",
52
- "next-themes": "^0.4.6",
53
- "react": "19.2.3",
54
- "react-day-picker": "^9.11.1",
55
- "react-dom": "19.2.3",
56
- "react-hook-form": "^7.65.0",
57
- "react-resizable-panels": "^3.0.6",
58
- "recharts": "^2.15.4",
59
- "shadcn": "^4.0.8",
60
- "sonner": "^2.0.7",
61
- "streamdown": "^1.6.10",
62
- "tailwind-merge": "^3.5.0",
63
- "tw-animate-css": "^1.4.0",
64
- "vaul": "^1.1.2"
65
- },
66
- "devDependencies": {
67
- "@eslint/js": "^9",
68
- "@tailwindcss/postcss": "^4",
69
- "@types/node": "^20",
70
- "@types/react": "^19",
71
- "@types/react-dom": "^19",
72
- "eslint": "^9",
73
- "tailwindcss": "^4",
74
- "typescript": "^5",
75
- "typescript-eslint": "^8"
76
- }
77
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * @type {import('postcss-load-config').Config}
3
- */
4
- module.exports = {
5
- plugins: {
6
- '@tailwindcss/postcss': {},
7
- },
8
- };