@digilogiclabs/create-saas-app 1.5.0 → 1.5.2

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 (302) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/cli/commands/add.d.ts +6 -0
  3. package/dist/cli/commands/add.d.ts.map +1 -0
  4. package/dist/cli/commands/add.js +39 -0
  5. package/dist/cli/commands/add.js.map +1 -0
  6. package/dist/cli/commands/create.d.ts +28 -0
  7. package/dist/cli/commands/create.d.ts.map +1 -0
  8. package/dist/cli/commands/create.js +130 -0
  9. package/dist/cli/commands/create.js.map +1 -0
  10. package/dist/cli/commands/index.d.ts +4 -0
  11. package/dist/cli/commands/index.d.ts.map +1 -0
  12. package/dist/cli/commands/index.js +20 -0
  13. package/dist/cli/commands/index.js.map +1 -0
  14. package/dist/cli/commands/update.d.ts +6 -0
  15. package/dist/cli/commands/update.d.ts.map +1 -0
  16. package/dist/cli/commands/update.js +68 -0
  17. package/dist/cli/commands/update.js.map +1 -0
  18. package/dist/{index.d.ts → cli/index.d.ts} +2 -3
  19. package/dist/cli/index.d.ts.map +1 -0
  20. package/dist/cli/index.js +59 -0
  21. package/dist/cli/index.js.map +1 -0
  22. package/dist/cli/prompts/index.d.ts +2 -0
  23. package/dist/cli/prompts/index.d.ts.map +1 -0
  24. package/dist/cli/prompts/index.js +18 -0
  25. package/dist/cli/prompts/index.js.map +1 -0
  26. package/dist/cli/prompts/project-setup.d.ts +5 -0
  27. package/dist/cli/prompts/project-setup.d.ts.map +1 -0
  28. package/dist/cli/prompts/project-setup.js +251 -0
  29. package/dist/cli/prompts/project-setup.js.map +1 -0
  30. package/dist/cli/utils/git.d.ts +9 -0
  31. package/dist/cli/utils/git.d.ts.map +1 -0
  32. package/dist/cli/utils/git.js +77 -0
  33. package/dist/cli/utils/git.js.map +1 -0
  34. package/dist/cli/utils/index.d.ts +5 -0
  35. package/dist/cli/utils/index.d.ts.map +1 -0
  36. package/dist/cli/utils/index.js +21 -0
  37. package/dist/cli/utils/index.js.map +1 -0
  38. package/dist/cli/utils/logger.d.ts +16 -0
  39. package/dist/cli/utils/logger.d.ts.map +1 -0
  40. package/dist/cli/utils/logger.js +55 -0
  41. package/dist/cli/utils/logger.js.map +1 -0
  42. package/dist/cli/utils/package-manager.d.ts +8 -0
  43. package/dist/cli/utils/package-manager.d.ts.map +1 -0
  44. package/dist/cli/utils/package-manager.js +92 -0
  45. package/dist/cli/utils/package-manager.js.map +1 -0
  46. package/dist/cli/utils/spinner.d.ts +7 -0
  47. package/dist/cli/utils/spinner.d.ts.map +1 -0
  48. package/dist/cli/utils/spinner.js +48 -0
  49. package/dist/cli/utils/spinner.js.map +1 -0
  50. package/dist/cli/validators/dependencies.d.ts +15 -0
  51. package/dist/cli/validators/dependencies.d.ts.map +1 -0
  52. package/dist/cli/validators/dependencies.js +108 -0
  53. package/dist/cli/validators/dependencies.js.map +1 -0
  54. package/dist/cli/validators/index.d.ts +3 -0
  55. package/dist/cli/validators/index.d.ts.map +1 -0
  56. package/dist/cli/validators/index.js +19 -0
  57. package/dist/cli/validators/index.js.map +1 -0
  58. package/dist/cli/validators/project-name.d.ts +5 -0
  59. package/dist/cli/validators/project-name.d.ts.map +1 -0
  60. package/dist/cli/validators/project-name.js +151 -0
  61. package/dist/cli/validators/project-name.js.map +1 -0
  62. package/dist/generators/file-processor.d.ts +28 -0
  63. package/dist/generators/file-processor.d.ts.map +1 -0
  64. package/dist/generators/file-processor.js +203 -0
  65. package/dist/generators/file-processor.js.map +1 -0
  66. package/dist/generators/index.d.ts +4 -0
  67. package/dist/generators/index.d.ts.map +1 -0
  68. package/dist/generators/index.js +20 -0
  69. package/dist/generators/index.js.map +1 -0
  70. package/dist/generators/package-installer.d.ts +29 -0
  71. package/dist/generators/package-installer.d.ts.map +1 -0
  72. package/dist/generators/package-installer.js +167 -0
  73. package/dist/generators/package-installer.js.map +1 -0
  74. package/dist/generators/template-generator.d.ts +48 -0
  75. package/dist/generators/template-generator.d.ts.map +1 -0
  76. package/dist/generators/template-generator.js +276 -0
  77. package/dist/generators/template-generator.js.map +1 -0
  78. package/dist/index.js +3 -3
  79. package/dist/index.js.map +1 -1
  80. package/package.json +3 -3
  81. package/src/templates/web/base/template/package.json +58 -58
  82. package/src/templates/web/base/template/src/test/setup.ts +78 -78
  83. package/src/templates/web/ui-auth/template/package.json +50 -50
  84. package/src/templates/web/ui-auth/template/src/test/setup.ts +78 -78
  85. package/src/templates/web/ui-auth-payments/template/package-lock.json +12240 -0
  86. package/src/templates/web/ui-auth-payments/template/package.json +52 -52
  87. package/src/templates/web/ui-auth-payments/template/src/components/client/login-form.tsx +1 -1
  88. package/src/templates/web/ui-auth-payments/template/src/components/client/signup-form.tsx +3 -3
  89. package/src/templates/web/ui-auth-payments/template/src/test/setup.ts +78 -78
  90. package/src/templates/web/ui-auth-payments/template/tsconfig.tsbuildinfo +1 -0
  91. package/src/templates/web/ui-auth-payments-audio/template/package-lock.json +12241 -0
  92. package/src/templates/web/ui-auth-payments-audio/template/package.json +53 -52
  93. package/src/templates/web/ui-auth-payments-audio/template/src/app/login/page.tsx +2 -105
  94. package/src/templates/web/ui-auth-payments-audio/template/src/app/signup/page.tsx +2 -124
  95. package/{dist/templates/web/ui-auth-payments → src/templates/web/ui-auth-payments-audio}/template/src/components/client/login-form.tsx +1 -1
  96. package/{dist/templates/web/ui-auth-payments → src/templates/web/ui-auth-payments-audio}/template/src/components/client/signup-form.tsx +3 -3
  97. package/src/templates/web/ui-auth-payments-audio/template/src/lib/actions/index.ts +14 -0
  98. package/src/templates/web/ui-auth-payments-audio/template/src/test/setup.ts +78 -78
  99. package/src/templates/web/ui-auth-payments-audio/template/tsconfig.tsbuildinfo +1 -0
  100. package/src/templates/web/ui-auth-payments-video/template/package.json +53 -52
  101. package/src/templates/web/ui-auth-payments-video/template/src/test/setup.ts +78 -78
  102. package/src/templates/web/ui-only/template/package.json +49 -49
  103. package/src/templates/web/ui-only/template/src/test/setup.ts +78 -78
  104. package/src/templates/web/ui-package-test/template/package.json +42 -42
  105. package/dist/templates/mobile/base/template/.env.example +0 -15
  106. package/dist/templates/mobile/base/template/App.tsx +0 -88
  107. package/dist/templates/mobile/base/template/app/(auth)/login.tsx +0 -44
  108. package/dist/templates/mobile/base/template/app/(auth)/signup.tsx +0 -43
  109. package/dist/templates/mobile/base/template/app/checkout.tsx +0 -20
  110. package/dist/templates/mobile/base/template/package.json +0 -38
  111. package/dist/templates/shared/auth/firebase/web/config.ts +0 -23
  112. package/dist/templates/shared/auth/supabase/web/config.ts +0 -8
  113. package/dist/templates/web/base/template/.env.example +0 -15
  114. package/dist/templates/web/base/template/.eslintrc.js +0 -8
  115. package/dist/templates/web/base/template/README.md +0 -68
  116. package/dist/templates/web/base/template/next.config.js +0 -15
  117. package/dist/templates/web/base/template/package.json +0 -58
  118. package/dist/templates/web/base/template/postcss.config.js +0 -7
  119. package/dist/templates/web/base/template/src/app/auth/callback/route.ts +0 -18
  120. package/dist/templates/web/base/template/src/app/checkout/page.tsx +0 -28
  121. package/dist/templates/web/base/template/src/app/error.tsx +0 -97
  122. package/dist/templates/web/base/template/src/app/globals.css +0 -60
  123. package/dist/templates/web/base/template/src/app/layout.tsx +0 -35
  124. package/dist/templates/web/base/template/src/app/loading.tsx +0 -34
  125. package/dist/templates/web/base/template/src/app/login/page.tsx +0 -39
  126. package/dist/templates/web/base/template/src/app/page.tsx +0 -132
  127. package/dist/templates/web/base/template/src/app/signup/page.tsx +0 -39
  128. package/dist/templates/web/base/template/src/components/__tests__/example.test.tsx +0 -49
  129. package/dist/templates/web/base/template/src/components/providers/app-providers.tsx +0 -33
  130. package/dist/templates/web/base/template/src/components/providers/theme-provider.tsx +0 -94
  131. package/dist/templates/web/base/template/src/components/shared/footer.tsx +0 -36
  132. package/dist/templates/web/base/template/src/components/shared/header.tsx +0 -44
  133. package/dist/templates/web/base/template/src/components/ui/badge.tsx +0 -36
  134. package/dist/templates/web/base/template/src/components/ui/button.tsx +0 -56
  135. package/dist/templates/web/base/template/src/components/ui/card.tsx +0 -71
  136. package/dist/templates/web/base/template/src/components/ui/theme-toggle.tsx +0 -34
  137. package/dist/templates/web/base/template/src/lib/env.ts +0 -46
  138. package/dist/templates/web/base/template/src/lib/utils.ts +0 -140
  139. package/dist/templates/web/base/template/src/test/setup.ts +0 -79
  140. package/dist/templates/web/base/template/tailwind.config.js +0 -77
  141. package/dist/templates/web/base/template/tsconfig.json +0 -33
  142. package/dist/templates/web/base/template/vitest.config.ts +0 -17
  143. package/dist/templates/web/base/template.backup/.env.example +0 -15
  144. package/dist/templates/web/base/template.backup.20250817/.env.example +0 -15
  145. package/dist/templates/web/ui-auth/template/.env.example +0 -15
  146. package/dist/templates/web/ui-auth/template/.eslintrc.js +0 -8
  147. package/dist/templates/web/ui-auth/template/README.md +0 -68
  148. package/dist/templates/web/ui-auth/template/next.config.js +0 -12
  149. package/dist/templates/web/ui-auth/template/package.json +0 -50
  150. package/dist/templates/web/ui-auth/template/postcss.config.js +0 -7
  151. package/dist/templates/web/ui-auth/template/src/app/auth/callback/route.ts +0 -12
  152. package/dist/templates/web/ui-auth/template/src/app/checkout/page.tsx +0 -25
  153. package/dist/templates/web/ui-auth/template/src/app/error.tsx +0 -67
  154. package/dist/templates/web/ui-auth/template/src/app/globals.css +0 -42
  155. package/dist/templates/web/ui-auth/template/src/app/layout.tsx +0 -33
  156. package/dist/templates/web/ui-auth/template/src/app/loading.tsx +0 -20
  157. package/dist/templates/web/ui-auth/template/src/app/login/page.tsx +0 -109
  158. package/dist/templates/web/ui-auth/template/src/app/page.tsx +0 -129
  159. package/dist/templates/web/ui-auth/template/src/app/signup/page.tsx +0 -128
  160. package/dist/templates/web/ui-auth/template/src/components/__tests__/example.test.tsx +0 -49
  161. package/dist/templates/web/ui-auth/template/src/components/providers/app-providers.tsx +0 -29
  162. package/dist/templates/web/ui-auth/template/src/components/providers/theme-provider.tsx +0 -94
  163. package/dist/templates/web/ui-auth/template/src/components/shared/footer.tsx +0 -36
  164. package/dist/templates/web/ui-auth/template/src/components/shared/header.tsx +0 -53
  165. package/dist/templates/web/ui-auth/template/src/components/ui/badge.tsx +0 -36
  166. package/dist/templates/web/ui-auth/template/src/components/ui/theme-toggle.tsx +0 -34
  167. package/dist/templates/web/ui-auth/template/src/lib/env.ts +0 -49
  168. package/dist/templates/web/ui-auth/template/src/lib/utils.ts +0 -140
  169. package/dist/templates/web/ui-auth/template/src/test/setup.ts +0 -79
  170. package/dist/templates/web/ui-auth/template/tailwind.config.js +0 -77
  171. package/dist/templates/web/ui-auth/template/tsconfig.json +0 -33
  172. package/dist/templates/web/ui-auth/template/vitest.config.ts +0 -17
  173. package/dist/templates/web/ui-auth/template.backup/.env.example +0 -15
  174. package/dist/templates/web/ui-auth/template.backup.20250817/.env.example +0 -15
  175. package/dist/templates/web/ui-auth-payments/template/.env.example +0 -15
  176. package/dist/templates/web/ui-auth-payments/template/README.md +0 -165
  177. package/dist/templates/web/ui-auth-payments/template/next.config.js +0 -12
  178. package/dist/templates/web/ui-auth-payments/template/package.json +0 -52
  179. package/dist/templates/web/ui-auth-payments/template/postcss.config.js +0 -7
  180. package/dist/templates/web/ui-auth-payments/template/src/app/auth/callback/route.ts +0 -12
  181. package/dist/templates/web/ui-auth-payments/template/src/app/billing/page.tsx +0 -211
  182. package/dist/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +0 -142
  183. package/dist/templates/web/ui-auth-payments/template/src/app/error.tsx +0 -67
  184. package/dist/templates/web/ui-auth-payments/template/src/app/globals.css +0 -42
  185. package/dist/templates/web/ui-auth-payments/template/src/app/layout.tsx +0 -33
  186. package/dist/templates/web/ui-auth-payments/template/src/app/loading.tsx +0 -20
  187. package/dist/templates/web/ui-auth-payments/template/src/app/login/loading.tsx +0 -38
  188. package/dist/templates/web/ui-auth-payments/template/src/app/login/page.tsx +0 -109
  189. package/dist/templates/web/ui-auth-payments/template/src/app/page.tsx +0 -143
  190. package/dist/templates/web/ui-auth-payments/template/src/app/signup/loading.tsx +0 -50
  191. package/dist/templates/web/ui-auth-payments/template/src/app/signup/page.tsx +0 -128
  192. package/dist/templates/web/ui-auth-payments/template/src/components/__tests__/example.test.tsx +0 -49
  193. package/dist/templates/web/ui-auth-payments/template/src/components/client/newsletter-signup.tsx +0 -68
  194. package/dist/templates/web/ui-auth-payments/template/src/components/providers/app-providers.tsx +0 -32
  195. package/dist/templates/web/ui-auth-payments/template/src/components/providers/theme-provider.tsx +0 -94
  196. package/dist/templates/web/ui-auth-payments/template/src/components/shared/footer.tsx +0 -36
  197. package/dist/templates/web/ui-auth-payments/template/src/components/shared/header.tsx +0 -62
  198. package/dist/templates/web/ui-auth-payments/template/src/components/ui/badge.tsx +0 -36
  199. package/dist/templates/web/ui-auth-payments/template/src/components/ui/theme-toggle.tsx +0 -34
  200. package/dist/templates/web/ui-auth-payments/template/src/lib/actions/index.ts +0 -340
  201. package/dist/templates/web/ui-auth-payments/template/src/lib/auth-server.ts +0 -177
  202. package/dist/templates/web/ui-auth-payments/template/src/lib/env.ts +0 -49
  203. package/dist/templates/web/ui-auth-payments/template/src/lib/utils.ts +0 -140
  204. package/dist/templates/web/ui-auth-payments/template/src/test/setup.ts +0 -79
  205. package/dist/templates/web/ui-auth-payments/template/tailwind.config.js +0 -77
  206. package/dist/templates/web/ui-auth-payments/template/tsconfig.json +0 -33
  207. package/dist/templates/web/ui-auth-payments/template/vitest.config.ts +0 -17
  208. package/dist/templates/web/ui-auth-payments-audio/template/.env.example +0 -15
  209. package/dist/templates/web/ui-auth-payments-audio/template/README.md +0 -187
  210. package/dist/templates/web/ui-auth-payments-audio/template/next.config.js +0 -12
  211. package/dist/templates/web/ui-auth-payments-audio/template/package.json +0 -52
  212. package/dist/templates/web/ui-auth-payments-audio/template/postcss.config.js +0 -7
  213. package/dist/templates/web/ui-auth-payments-audio/template/src/app/auth/callback/route.ts +0 -12
  214. package/dist/templates/web/ui-auth-payments-audio/template/src/app/billing/page.tsx +0 -211
  215. package/dist/templates/web/ui-auth-payments-audio/template/src/app/checkout/page.tsx +0 -142
  216. package/dist/templates/web/ui-auth-payments-audio/template/src/app/error.tsx +0 -67
  217. package/dist/templates/web/ui-auth-payments-audio/template/src/app/globals.css +0 -42
  218. package/dist/templates/web/ui-auth-payments-audio/template/src/app/layout.tsx +0 -35
  219. package/dist/templates/web/ui-auth-payments-audio/template/src/app/loading.tsx +0 -20
  220. package/dist/templates/web/ui-auth-payments-audio/template/src/app/login/page.tsx +0 -109
  221. package/dist/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +0 -181
  222. package/dist/templates/web/ui-auth-payments-audio/template/src/app/signup/page.tsx +0 -128
  223. package/dist/templates/web/ui-auth-payments-audio/template/src/components/__tests__/example.test.tsx +0 -49
  224. package/dist/templates/web/ui-auth-payments-audio/template/src/components/providers/app-providers.tsx +0 -32
  225. package/dist/templates/web/ui-auth-payments-audio/template/src/components/providers/theme-provider.tsx +0 -94
  226. package/dist/templates/web/ui-auth-payments-audio/template/src/components/shared/footer.tsx +0 -36
  227. package/dist/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +0 -62
  228. package/dist/templates/web/ui-auth-payments-audio/template/src/components/ui/badge.tsx +0 -36
  229. package/dist/templates/web/ui-auth-payments-audio/template/src/components/ui/theme-toggle.tsx +0 -34
  230. package/dist/templates/web/ui-auth-payments-audio/template/src/lib/env.ts +0 -49
  231. package/dist/templates/web/ui-auth-payments-audio/template/src/lib/utils.ts +0 -140
  232. package/dist/templates/web/ui-auth-payments-audio/template/src/test/setup.ts +0 -79
  233. package/dist/templates/web/ui-auth-payments-audio/template/tailwind.config.js +0 -77
  234. package/dist/templates/web/ui-auth-payments-audio/template/tsconfig.json +0 -33
  235. package/dist/templates/web/ui-auth-payments-audio/template/vitest.config.ts +0 -17
  236. package/dist/templates/web/ui-auth-payments-video/template/.env.example +0 -15
  237. package/dist/templates/web/ui-auth-payments-video/template/README.md +0 -190
  238. package/dist/templates/web/ui-auth-payments-video/template/next.config.js +0 -12
  239. package/dist/templates/web/ui-auth-payments-video/template/package.json +0 -52
  240. package/dist/templates/web/ui-auth-payments-video/template/postcss.config.js +0 -7
  241. package/dist/templates/web/ui-auth-payments-video/template/src/app/auth/callback/route.ts +0 -12
  242. package/dist/templates/web/ui-auth-payments-video/template/src/app/billing/page.tsx +0 -211
  243. package/dist/templates/web/ui-auth-payments-video/template/src/app/checkout/page.tsx +0 -142
  244. package/dist/templates/web/ui-auth-payments-video/template/src/app/error.tsx +0 -67
  245. package/dist/templates/web/ui-auth-payments-video/template/src/app/globals.css +0 -42
  246. package/dist/templates/web/ui-auth-payments-video/template/src/app/layout.tsx +0 -33
  247. package/dist/templates/web/ui-auth-payments-video/template/src/app/loading.tsx +0 -20
  248. package/dist/templates/web/ui-auth-payments-video/template/src/app/login/page.tsx +0 -109
  249. package/dist/templates/web/ui-auth-payments-video/template/src/app/page.tsx +0 -187
  250. package/dist/templates/web/ui-auth-payments-video/template/src/app/signup/page.tsx +0 -128
  251. package/dist/templates/web/ui-auth-payments-video/template/src/components/__tests__/example.test.tsx +0 -49
  252. package/dist/templates/web/ui-auth-payments-video/template/src/components/providers/app-providers.tsx +0 -32
  253. package/dist/templates/web/ui-auth-payments-video/template/src/components/providers/theme-provider.tsx +0 -94
  254. package/dist/templates/web/ui-auth-payments-video/template/src/components/shared/footer.tsx +0 -36
  255. package/dist/templates/web/ui-auth-payments-video/template/src/components/shared/header.tsx +0 -62
  256. package/dist/templates/web/ui-auth-payments-video/template/src/components/ui/badge.tsx +0 -36
  257. package/dist/templates/web/ui-auth-payments-video/template/src/components/ui/theme-toggle.tsx +0 -34
  258. package/dist/templates/web/ui-auth-payments-video/template/src/lib/env.ts +0 -49
  259. package/dist/templates/web/ui-auth-payments-video/template/src/lib/utils.ts +0 -140
  260. package/dist/templates/web/ui-auth-payments-video/template/src/test/setup.ts +0 -79
  261. package/dist/templates/web/ui-auth-payments-video/template/tailwind.config.js +0 -77
  262. package/dist/templates/web/ui-auth-payments-video/template/tsconfig.json +0 -33
  263. package/dist/templates/web/ui-auth-payments-video/template/vitest.config.ts +0 -17
  264. package/dist/templates/web/ui-only/template/.env.example +0 -15
  265. package/dist/templates/web/ui-only/template/.eslintrc.js +0 -8
  266. package/dist/templates/web/ui-only/template/README.md +0 -68
  267. package/dist/templates/web/ui-only/template/next.config.js +0 -12
  268. package/dist/templates/web/ui-only/template/package.json +0 -49
  269. package/dist/templates/web/ui-only/template/postcss.config.js +0 -7
  270. package/dist/templates/web/ui-only/template/src/app/auth/callback/route.ts +0 -12
  271. package/dist/templates/web/ui-only/template/src/app/checkout/page.tsx +0 -25
  272. package/dist/templates/web/ui-only/template/src/app/error.tsx +0 -67
  273. package/dist/templates/web/ui-only/template/src/app/globals.css +0 -42
  274. package/dist/templates/web/ui-only/template/src/app/layout.tsx +0 -33
  275. package/dist/templates/web/ui-only/template/src/app/loading.tsx +0 -20
  276. package/dist/templates/web/ui-only/template/src/app/login/page.tsx +0 -63
  277. package/dist/templates/web/ui-only/template/src/app/page.tsx +0 -91
  278. package/dist/templates/web/ui-only/template/src/app/signup/page.tsx +0 -79
  279. package/dist/templates/web/ui-only/template/src/components/__tests__/example.test.tsx +0 -49
  280. package/dist/templates/web/ui-only/template/src/components/providers/app-providers.tsx +0 -26
  281. package/dist/templates/web/ui-only/template/src/components/providers/theme-provider.tsx +0 -94
  282. package/dist/templates/web/ui-only/template/src/components/shared/footer.tsx +0 -36
  283. package/dist/templates/web/ui-only/template/src/components/shared/header.tsx +0 -53
  284. package/dist/templates/web/ui-only/template/src/components/ui/badge.tsx +0 -36
  285. package/dist/templates/web/ui-only/template/src/components/ui/theme-toggle.tsx +0 -34
  286. package/dist/templates/web/ui-only/template/src/lib/env.ts +0 -49
  287. package/dist/templates/web/ui-only/template/src/lib/utils.ts +0 -140
  288. package/dist/templates/web/ui-only/template/src/test/setup.ts +0 -79
  289. package/dist/templates/web/ui-only/template/tailwind.config.js +0 -77
  290. package/dist/templates/web/ui-only/template/tsconfig.json +0 -33
  291. package/dist/templates/web/ui-only/template/vitest.config.ts +0 -17
  292. package/dist/templates/web/ui-only/template.backup/.env.example +0 -15
  293. package/dist/templates/web/ui-only/template.backup.20250817/.env.example +0 -15
  294. package/dist/templates/web/ui-package-test/template/package.json +0 -42
  295. package/dist/templates/web/ui-package-test/template/src/app/page.tsx +0 -106
  296. package/dist/templates/web/ui-package-test/template/tsconfig.json +0 -41
  297. /package/{dist/templates/web/ui-auth-payments → src/templates/web/ui-auth-payments-audio}/template/middleware.ts +0 -0
  298. /package/{dist/templates/web/ui-auth-payments → src/templates/web/ui-auth-payments-audio}/template/src/app/dashboard/layout.tsx +0 -0
  299. /package/{dist/templates/web/ui-auth-payments → src/templates/web/ui-auth-payments-audio}/template/src/app/dashboard/page.tsx +0 -0
  300. /package/{dist/templates/web/ui-auth-payments → src/templates/web/ui-auth-payments-audio}/template/src/components/client/auth-status.tsx +0 -0
  301. /package/{dist/templates/web/ui-auth-payments → src/templates/web/ui-auth-payments-audio}/template/src/lib/actions/auth.ts +0 -0
  302. /package/{dist/templates/web/base → src/templates/web/ui-auth-payments-audio}/template/src/lib/auth-server.ts +0 -0
@@ -1,187 +0,0 @@
1
- 'use client'
2
-
3
- import { Button, Card, VideoPlayer } from '@digilogiclabs/saas-factory-ui'
4
- import { ArrowRight, Zap, Shield, Rocket, CheckCircle, LogOut, User, Video } from 'lucide-react'
5
- import { useAuth } from '@digilogiclabs/saas-factory-auth'
6
- import Link from 'next/link'
7
-
8
- export default function Home() {
9
- const { user, signOut, loading } = useAuth()
10
-
11
- const handleSignOut = async () => {
12
- try {
13
- await signOut()
14
- } catch (err) {
15
- console.error('Sign out error:', err)
16
- }
17
- }
18
-
19
- return (
20
- <main className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800">
21
- <div className="container mx-auto px-4 py-16">
22
- {/* Auth Status Bar */}
23
- <div className="flex justify-end mb-8">
24
- {loading ? (
25
- <div className="text-sm text-gray-600">Loading...</div>
26
- ) : user ? (
27
- <div className="flex items-center gap-4">
28
- <div className="flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300">
29
- <User className="w-4 h-4" />
30
- Welcome, {user.email}
31
- </div>
32
- <Button variant="outline" size="sm" onClick={handleSignOut}>
33
- <LogOut className="w-4 h-4 mr-2" />
34
- Sign Out
35
- </Button>
36
- </div>
37
- ) : (
38
- <div className="flex gap-2">
39
- <Link href="/login">
40
- <Button variant="outline" size="sm">Sign In</Button>
41
- </Link>
42
- <Link href="/signup">
43
- <Button size="sm">Sign Up</Button>
44
- </Link>
45
- </div>
46
- )}
47
- </div>
48
-
49
- {/* Hero Section */}
50
- <div className="text-center mb-16">
51
- <div className="inline-flex items-center px-4 py-2 rounded-full text-sm font-medium bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 mb-6">
52
- <CheckCircle className="w-4 h-4 mr-2" />
53
- Video Player App - UI Package v0.11.1 + Auth v1.0.0 + Payments Integrated Successfully
54
- </div>
55
- <h1 className="text-4xl md:text-6xl font-bold text-gray-900 dark:text-white mb-6">
56
- Welcome to{' '}
57
- <span className="text-blue-600 dark:text-blue-400">{{titleCaseName}}</span>
58
- </h1>
59
- <p className="text-xl text-gray-600 dark:text-gray-300 mb-8 max-w-2xl mx-auto">
60
- {{description}}. This video streaming app template uses SaaS Factory UI package v0.11.1 with video player components, authentication v1.0.0 and payments integration.
61
- </p>
62
- <div className="flex flex-col sm:flex-row gap-4 justify-center">
63
- <Link href="/checkout">
64
- <Button size="lg" className="text-lg px-8">
65
- View Pricing
66
- <ArrowRight className="ml-2 h-5 w-5" />
67
- </Button>
68
- </Link>
69
- <Button variant="outline" size="lg" className="text-lg px-8">
70
- Learn More
71
- </Button>
72
- </div>
73
- </div>
74
-
75
- {/* Video Player Showcase */}
76
- <div className="max-w-4xl mx-auto mb-16">
77
- <Card className="p-8">
78
- <div className="text-center mb-8">
79
- <div className="mx-auto w-16 h-16 bg-red-100 dark:bg-red-900 rounded-full flex items-center justify-center mb-4">
80
- <Video className="h-8 w-8 text-red-600 dark:text-red-400" />
81
- </div>
82
- <h2 className="text-3xl font-bold mb-4">Video Player Component</h2>
83
- <p className="text-gray-600 dark:text-gray-300">
84
- Experience our feature-rich video player with playlist support, quality selection, fullscreen mode, and cross-platform compatibility
85
- </p>
86
- </div>
87
- <VideoPlayer
88
- playlist={[
89
- {
90
- id: '1',
91
- title: 'Sample Video Content',
92
- description: 'Demo video showcasing the video player functionality',
93
- duration: 300,
94
- url: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4',
95
- thumbnail: 'https://via.placeholder.com/640x360?text=Video+1',
96
- qualities: [
97
- { label: '480p', url: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4' },
98
- { label: '720p', url: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4' }
99
- ]
100
- },
101
- {
102
- id: '2',
103
- title: 'Another Great Video',
104
- description: 'Another sample video for the playlist',
105
- duration: 240,
106
- url: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4',
107
- thumbnail: 'https://via.placeholder.com/640x360?text=Video+2',
108
- qualities: [
109
- { label: '480p', url: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4' },
110
- { label: '720p', url: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4' }
111
- ]
112
- }
113
- ]}
114
- className="max-w-4xl mx-auto"
115
- />
116
- </Card>
117
- </div>
118
-
119
- {/* Component Showcase */}
120
- <div className="grid md:grid-cols-4 gap-8 mb-16">
121
- <Card className="text-center p-6">
122
- <div className="mx-auto w-12 h-12 bg-blue-100 dark:bg-blue-900 rounded-lg flex items-center justify-center mb-4">
123
- <Zap className="h-6 w-6 text-blue-600 dark:text-blue-400" />
124
- </div>
125
- <h3 className="text-xl font-semibold mb-2">Video UI Components</h3>
126
- <p className="text-gray-600 dark:text-gray-300">
127
- Video Player, Button, and Card components from @digilogiclabs/saas-factory-ui v0.11.1
128
- </p>
129
- </Card>
130
-
131
- <Card className="text-center p-6">
132
- <div className="mx-auto w-12 h-12 bg-green-100 dark:bg-green-900 rounded-lg flex items-center justify-center mb-4">
133
- <Shield className="h-6 w-6 text-green-600 dark:text-green-400" />
134
- </div>
135
- <h3 className="text-xl font-semibold mb-2">Authentication</h3>
136
- <p className="text-gray-600 dark:text-gray-300">
137
- Secure user authentication with @digilogiclabs/saas-factory-auth
138
- </p>
139
- </Card>
140
-
141
- <Card className="text-center p-6">
142
- <div className="mx-auto w-12 h-12 bg-purple-100 dark:bg-purple-900 rounded-lg flex items-center justify-center mb-4">
143
- <Rocket className="h-6 w-6 text-purple-600 dark:text-purple-400" />
144
- </div>
145
- <h3 className="text-xl font-semibold mb-2">TypeScript Ready</h3>
146
- <p className="text-gray-600 dark:text-gray-300">
147
- Full type safety with enhanced component definitions
148
- </p>
149
- </Card>
150
-
151
- <Card className="text-center p-6">
152
- <div className="mx-auto w-12 h-12 bg-orange-100 dark:bg-orange-900 rounded-lg flex items-center justify-center mb-4">
153
- <svg className="h-6 w-6 text-orange-600 dark:text-orange-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
154
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z" />
155
- </svg>
156
- </div>
157
- <h3 className="text-xl font-semibold mb-2">Payments Integration</h3>
158
- <p className="text-gray-600 dark:text-gray-300">
159
- Complete payment processing with @digilogiclabs/saas-factory-payments
160
- </p>
161
- </Card>
162
- </div>
163
-
164
- {/* Button Variants Showcase */}
165
- <Card className="max-w-4xl mx-auto p-8">
166
- <div className="text-center mb-6">
167
- <h2 className="text-2xl font-bold mb-2">Full SaaS Package Integration</h2>
168
- <p className="text-gray-600 dark:text-gray-300">
169
- Complete integration of UI, Auth, and Payments packages
170
- </p>
171
- </div>
172
- <div className="flex flex-wrap justify-center gap-4 mb-6">
173
- <Button>Default Button</Button>
174
- <Button variant="secondary">Secondary Button</Button>
175
- <Button variant="outline">Outline Button</Button>
176
- <Button disabled>Disabled Button</Button>
177
- </div>
178
- <div className="text-center">
179
- <p className="text-sm text-gray-500">
180
- All components from @digilogiclabs/saas-factory-ui v0.11.1 + auth v1.0.0 + payments
181
- </p>
182
- </div>
183
- </Card>
184
- </div>
185
- </main>
186
- )
187
- }
@@ -1,128 +0,0 @@
1
- 'use client';
2
-
3
- import React, { useState } from 'react';
4
- import { Button, Card, Input, Label } from '@digilogiclabs/saas-factory-ui';
5
- import { useAuth } from '@digilogiclabs/saas-factory-auth';
6
- import { useRouter } from 'next/navigation';
7
-
8
- export default function SignupPage() {
9
- const [email, setEmail] = useState('');
10
- const [password, setPassword] = useState('');
11
- const [confirmPassword, setConfirmPassword] = useState('');
12
- const { signUp, signInWithOAuth, loading, error, user } = useAuth();
13
- const router = useRouter();
14
-
15
- // Redirect if already logged in
16
- React.useEffect(() => {
17
- if (user) {
18
- router.push('/');
19
- }
20
- }, [user, router]);
21
-
22
- const handleSignup = async (e: React.FormEvent) => {
23
- e.preventDefault();
24
-
25
- if (password !== confirmPassword) {
26
- alert('Passwords do not match');
27
- return;
28
- }
29
-
30
- try {
31
- await signUp(email, password);
32
- router.push('/');
33
- } catch (err) {
34
- console.error('Signup error:', err);
35
- }
36
- };
37
-
38
- const handleGoogleSignup = async () => {
39
- try {
40
- await signInWithOAuth('google', window.location.origin);
41
- } catch (err) {
42
- console.error('Google signup error:', err);
43
- }
44
- };
45
-
46
- if (loading) {
47
- return (
48
- <div className="flex items-center justify-center min-h-screen bg-gray-100">
49
- <div>Loading...</div>
50
- </div>
51
- );
52
- }
53
-
54
- return (
55
- <div className="flex items-center justify-center min-h-screen bg-gray-100">
56
- <Card className="w-full max-w-md p-8">
57
- <h1 className="text-2xl font-bold text-center mb-6">Sign Up</h1>
58
-
59
- {error && (
60
- <div className="mb-4 p-3 bg-red-100 border border-red-400 text-red-700 rounded">
61
- {error.message}
62
- </div>
63
- )}
64
-
65
- <form onSubmit={handleSignup} className="space-y-4">
66
- <div>
67
- <Label htmlFor="email">Email</Label>
68
- <Input
69
- id="email"
70
- type="email"
71
- value={email}
72
- onChange={(e) => setEmail(e.target.value)}
73
- placeholder="Enter your email"
74
- required
75
- disabled={loading}
76
- />
77
- </div>
78
- <div>
79
- <Label htmlFor="password">Password</Label>
80
- <Input
81
- id="password"
82
- type="password"
83
- value={password}
84
- onChange={(e) => setPassword(e.target.value)}
85
- placeholder="Enter your password"
86
- required
87
- disabled={loading}
88
- />
89
- </div>
90
- <div>
91
- <Label htmlFor="confirmPassword">Confirm Password</Label>
92
- <Input
93
- id="confirmPassword"
94
- type="password"
95
- value={confirmPassword}
96
- onChange={(e) => setConfirmPassword(e.target.value)}
97
- placeholder="Confirm your password"
98
- required
99
- disabled={loading}
100
- />
101
- </div>
102
- <Button type="submit" className="w-full" disabled={loading}>
103
- {loading ? 'Signing Up...' : 'Sign Up'}
104
- </Button>
105
- <Button
106
- type="button"
107
- variant="outline"
108
- className="w-full"
109
- onClick={handleGoogleSignup}
110
- disabled={loading}
111
- >
112
- Sign up with Google
113
- </Button>
114
- </form>
115
-
116
- <div className="mt-4 text-center">
117
- <p className="text-sm text-gray-600">
118
- Already have an account?{' '}
119
- <a href="/login" className="text-blue-600 hover:underline">
120
- Sign in
121
- </a>
122
- </p>
123
- </div>
124
- </Card>
125
- </div>
126
- );
127
- }
128
-
@@ -1,49 +0,0 @@
1
- /**
2
- * Example test file demonstrating testing patterns for SaaS Factory components
3
- *
4
- * This is optional and serves as a reference for testing your components.
5
- * You can delete this file if you don't need example tests.
6
- */
7
-
8
- import { render, screen } from '@testing-library/react'
9
- import { Button } from '@digilogiclabs/saas-factory-ui'
10
-
11
- // Example: Testing UI components
12
- describe('UI Components', () => {
13
- it('renders button with correct text', () => {
14
- render(<Button>Click me</Button>)
15
- expect(screen.getByRole('button', { name: /click me/i })).toBeInTheDocument()
16
- })
17
-
18
- it('button can be disabled', () => {
19
- render(<Button disabled>Disabled button</Button>)
20
- expect(screen.getByRole('button')).toBeDisabled()
21
- })
22
- })
23
-
24
- // Example: Testing custom components
25
- function MockComponent({ title }: { title: string }) {
26
- return <h1>{title}</h1>
27
- }
28
-
29
- describe('Custom Components', () => {
30
- it('renders with correct title', () => {
31
- render(<MockComponent title="Test Title" />)
32
- expect(screen.getByRole('heading', { level: 1 })).toHaveTextContent('Test Title')
33
- })
34
- })
35
-
36
- // Example: Testing utilities
37
- function formatCurrency(amount: number): string {
38
- return new Intl.NumberFormat('en-US', {
39
- style: 'currency',
40
- currency: 'USD',
41
- }).format(amount)
42
- }
43
-
44
- describe('Utilities', () => {
45
- it('formats currency correctly', () => {
46
- expect(formatCurrency(1000)).toBe('$1,000.00')
47
- expect(formatCurrency(0)).toBe('$0.00')
48
- })
49
- })
@@ -1,32 +0,0 @@
1
- 'use client'
2
-
3
- import React from 'react'
4
- import { ThemeProvider } from 'next-themes'
5
- import { AuthProvider } from '@digilogiclabs/saas-factory-auth'
6
- import { PaymentsProvider } from '@digilogiclabs/saas-factory-payments'
7
- import { AppThemeProvider } from './theme-provider'
8
-
9
- interface AppProvidersProps {
10
- children: React.ReactNode
11
- }
12
-
13
- export function AppProviders({ children }: AppProvidersProps) {
14
- return (
15
- <ThemeProvider
16
- attribute="class"
17
- defaultTheme="{{defaultTheme}}"
18
- enableSystem
19
- disableTransitionOnChange
20
- storageKey="{{packageName}}-theme"
21
- >
22
- <AuthProvider>
23
- <PaymentsProvider>
24
- <AppThemeProvider themeColor="{{themeColor}}">
25
- {children}
26
- </AppThemeProvider>
27
- </PaymentsProvider>
28
- </AuthProvider>
29
- </ThemeProvider>
30
- )
31
- }
32
-
@@ -1,94 +0,0 @@
1
- 'use client'
2
-
3
- import React, { createContext, useContext, useEffect } from 'react'
4
-
5
- interface ThemeContextType {
6
- themeColor: string
7
- }
8
-
9
- const ThemeContext = createContext<ThemeContextType | undefined>(undefined)
10
-
11
- interface AppThemeProviderProps {
12
- children: React.ReactNode
13
- themeColor: string
14
- }
15
-
16
- const THEME_COLORS = {
17
- blue: {
18
- primary: '221.2 83.2% 53.3%',
19
- primaryForeground: '210 40% 98%',
20
- secondary: '210 40% 96%',
21
- accent: '210 40% 96%',
22
- ring: '221.2 83.2% 53.3%',
23
- },
24
- green: {
25
- primary: '142.1 76.2% 36.3%',
26
- primaryForeground: '355.7 100% 97.3%',
27
- secondary: '138.5 76.2% 96.7%',
28
- accent: '138.5 76.2% 96.7%',
29
- ring: '142.1 76.2% 36.3%',
30
- },
31
- purple: {
32
- primary: '262.1 83.3% 57.8%',
33
- primaryForeground: '210 40% 98%',
34
- secondary: '270 3.18% 96.5%',
35
- accent: '270 3.18% 96.5%',
36
- ring: '262.1 83.3% 57.8%',
37
- },
38
- orange: {
39
- primary: '24.6 95% 53.1%',
40
- primaryForeground: '60 9.1% 97.8%',
41
- secondary: '60 4.8% 95.9%',
42
- accent: '60 4.8% 95.9%',
43
- ring: '24.6 95% 53.1%',
44
- },
45
- red: {
46
- primary: '0 72.2% 50.6%',
47
- primaryForeground: '0 85.7% 97.3%',
48
- secondary: '0 0% 96.3%',
49
- accent: '0 0% 96.3%',
50
- ring: '0 72.2% 50.6%',
51
- },
52
- slate: {
53
- primary: '215 27.9% 16.9%',
54
- primaryForeground: '0 0% 98%',
55
- secondary: '210 40% 96%',
56
- accent: '210 40% 96%',
57
- ring: '215 27.9% 16.9%',
58
- },
59
- }
60
-
61
- export function AppThemeProvider({ children, themeColor }: AppThemeProviderProps) {
62
- useEffect(() => {
63
- const colorScheme = THEME_COLORS[themeColor as keyof typeof THEME_COLORS] || THEME_COLORS.blue
64
-
65
- // Apply theme colors to CSS custom properties
66
- const root = document.documentElement
67
- root.style.setProperty('--primary', colorScheme.primary)
68
- root.style.setProperty('--primary-foreground', colorScheme.primaryForeground)
69
- root.style.setProperty('--secondary', colorScheme.secondary)
70
- root.style.setProperty('--accent', colorScheme.accent)
71
- root.style.setProperty('--ring', colorScheme.ring)
72
-
73
- // Store theme color preference
74
- localStorage.setItem('{{packageName}}-theme-color', themeColor)
75
- }, [themeColor])
76
-
77
- const contextValue: ThemeContextType = {
78
- themeColor,
79
- }
80
-
81
- return (
82
- <ThemeContext.Provider value={contextValue}>
83
- {children}
84
- </ThemeContext.Provider>
85
- )
86
- }
87
-
88
- export function useAppTheme() {
89
- const context = useContext(ThemeContext)
90
- if (context === undefined) {
91
- throw new Error('useAppTheme must be used within a AppThemeProvider')
92
- }
93
- return context
94
- }
@@ -1,36 +0,0 @@
1
- 'use client'
2
-
3
- import React from 'react'
4
-
5
- interface FooterProps {
6
- className?: string
7
- }
8
-
9
- export function Footer({ className = '' }: FooterProps) {
10
- return (
11
- <footer className={`border-t bg-background py-4 ${className}`}>
12
- <div className="container mx-auto px-4">
13
- <div className="flex flex-col sm:flex-row justify-between items-center gap-4 text-sm text-muted-foreground">
14
- <div className="flex items-center gap-2">
15
- <span>&copy; {new Date().getFullYear()} {{titleCaseName}}</span>
16
- </div>
17
-
18
- <div className="flex items-center gap-2 text-xs">
19
- <span>Generated with</span>
20
- <a
21
- href="https://docs.digilogiclabs.com"
22
- target="_blank"
23
- rel="noopener noreferrer"
24
- className="hover:text-foreground transition-colors"
25
- >
26
- Digi Logic Labs
27
- </a>
28
- <span className="text-muted-foreground/60">
29
- • UI v{{uiVersion}} • Auth v{{authVersion}} • Payments v{{paymentsVersion}} • Video v{{videoVersion}} • {{generatedDate}}
30
- </span>
31
- </div>
32
- </div>
33
- </div>
34
- </footer>
35
- )
36
- }
@@ -1,62 +0,0 @@
1
- 'use client';
2
-
3
- import React from 'react';
4
- import Link from 'next/link';
5
- import { LogOut, CreditCard } from 'lucide-react';
6
- import { useAuth } from '@digilogiclabs/saas-factory-auth';
7
- import { ThemeToggle } from '../ui/theme-toggle';
8
-
9
- export function Header() {
10
- const { user, signOut } = useAuth();
11
-
12
- const handleSignOut = async () => {
13
- try {
14
- await signOut();
15
- } catch (error) {
16
- console.error('Sign out error:', error);
17
- }
18
- };
19
-
20
- return (
21
- <header className="bg-white dark:bg-gray-800 shadow-md">
22
- <div className="container mx-auto px-4 py-4 flex justify-between items-center">
23
- <Link href="/" className="text-2xl font-bold text-gray-900 dark:text-white">
24
- {{titleCaseName}}
25
- </Link>
26
- <nav className="flex items-center gap-4">
27
- <ThemeToggle />
28
- {user ? (
29
- <>
30
- <Link href="/dashboard" className="text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">
31
- Dashboard
32
- </Link>
33
- <Link href="/billing" className="flex items-center gap-2 text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">
34
- <CreditCard className="h-4 w-4" />
35
- Billing
36
- </Link>
37
- <button
38
- onClick={handleSignOut}
39
- className="p-2 text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white"
40
- >
41
- <LogOut className="h-5 w-5" />
42
- </button>
43
- </>
44
- ) : (
45
- <>
46
- <Link href="/login" className="text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">
47
- Login
48
- </Link>
49
- <Link
50
- href="/signup"
51
- className="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"
52
- >
53
- Sign Up
54
- </Link>
55
- </>
56
- )}
57
- </nav>
58
- </div>
59
- </header>
60
- );
61
- }
62
-
@@ -1,36 +0,0 @@
1
- import * as React from "react"
2
- import { cva, type VariantProps } from "class-variance-authority"
3
- import { cn } from "@/lib/utils"
4
-
5
- const badgeVariants = cva(
6
- "inline-flex items-center rounded-full 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",
7
- {
8
- variants: {
9
- variant: {
10
- default:
11
- "border-transparent bg-primary text-primary-foreground 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 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>,
27
- VariantProps<typeof badgeVariants> {}
28
-
29
- function Badge({ className, variant, ...props }: BadgeProps) {
30
- return (
31
- <div className={cn(badgeVariants({ variant }), className)} {...props} />
32
- )
33
- }
34
-
35
- export { Badge, badgeVariants }
36
-
@@ -1,34 +0,0 @@
1
- 'use client'
2
-
3
- import * as React from "react"
4
- import { Moon, Sun } from "lucide-react"
5
- import { useTheme } from "next-themes"
6
-
7
- import { Button } from "@digilogiclabs/saas-factory-ui"
8
-
9
- export function ThemeToggle() {
10
- const { theme, setTheme } = useTheme()
11
-
12
- const toggleTheme = () => {
13
- if (theme === 'light') {
14
- setTheme('dark')
15
- } else if (theme === 'dark') {
16
- setTheme('system')
17
- } else {
18
- setTheme('light')
19
- }
20
- }
21
-
22
- return (
23
- <Button
24
- variant="outline"
25
- size="icon"
26
- onClick={toggleTheme}
27
- className="h-9 w-9"
28
- >
29
- <Sun className="h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
30
- <Moon className="absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
31
- <span className="sr-only">Toggle theme</span>
32
- </Button>
33
- )
34
- }