@weirdfingers/baseboards 0.9.5 → 0.9.7

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 (237) hide show
  1. package/dist/index.js +561 -469
  2. package/dist/index.js.map +1 -1
  3. package/package.json +2 -5
  4. package/templates/README.md +0 -122
  5. package/templates/api/.env.example +0 -65
  6. package/templates/api/ARTIFACT_RESOLUTION_GUIDE.md +0 -148
  7. package/templates/api/Dockerfile +0 -32
  8. package/templates/api/README.md +0 -264
  9. package/templates/api/alembic/env.py +0 -114
  10. package/templates/api/alembic/script.py.mako +0 -28
  11. package/templates/api/alembic/versions/20250101_000000_initial_schema.py +0 -506
  12. package/templates/api/alembic/versions/20251022_174729_remove_provider_name_from_generations.py +0 -75
  13. package/templates/api/alembic/versions/20251023_165852_switch_to_declarative_base_and_mapping.py +0 -467
  14. package/templates/api/alembic/versions/20251202_000000_add_artifact_lineage.py +0 -134
  15. package/templates/api/alembic/versions/2025925_62735_add_seed_data_for_default_tenant.py +0 -88
  16. package/templates/api/alembic.ini +0 -36
  17. package/templates/api/config/generators.yaml +0 -237
  18. package/templates/api/config/storage_config.yaml +0 -26
  19. package/templates/api/docs/ADDING_GENERATORS.md +0 -409
  20. package/templates/api/docs/GENERATORS_API.md +0 -502
  21. package/templates/api/docs/MIGRATIONS.md +0 -472
  22. package/templates/api/docs/TESTING_LIVE_APIS.md +0 -417
  23. package/templates/api/docs/storage_providers.md +0 -337
  24. package/templates/api/pyproject.toml +0 -205
  25. package/templates/api/src/boards/__init__.py +0 -10
  26. package/templates/api/src/boards/api/app.py +0 -172
  27. package/templates/api/src/boards/api/auth.py +0 -75
  28. package/templates/api/src/boards/api/endpoints/__init__.py +0 -3
  29. package/templates/api/src/boards/api/endpoints/jobs.py +0 -76
  30. package/templates/api/src/boards/api/endpoints/setup.py +0 -505
  31. package/templates/api/src/boards/api/endpoints/sse.py +0 -129
  32. package/templates/api/src/boards/api/endpoints/storage.py +0 -155
  33. package/templates/api/src/boards/api/endpoints/tenant_registration.py +0 -296
  34. package/templates/api/src/boards/api/endpoints/uploads.py +0 -149
  35. package/templates/api/src/boards/api/endpoints/webhooks.py +0 -13
  36. package/templates/api/src/boards/auth/__init__.py +0 -15
  37. package/templates/api/src/boards/auth/adapters/__init__.py +0 -27
  38. package/templates/api/src/boards/auth/adapters/auth0.py +0 -220
  39. package/templates/api/src/boards/auth/adapters/base.py +0 -73
  40. package/templates/api/src/boards/auth/adapters/clerk.py +0 -172
  41. package/templates/api/src/boards/auth/adapters/jwt.py +0 -122
  42. package/templates/api/src/boards/auth/adapters/none.py +0 -102
  43. package/templates/api/src/boards/auth/adapters/oidc.py +0 -284
  44. package/templates/api/src/boards/auth/adapters/supabase.py +0 -110
  45. package/templates/api/src/boards/auth/context.py +0 -35
  46. package/templates/api/src/boards/auth/factory.py +0 -129
  47. package/templates/api/src/boards/auth/middleware.py +0 -221
  48. package/templates/api/src/boards/auth/provisioning.py +0 -129
  49. package/templates/api/src/boards/auth/tenant_extraction.py +0 -278
  50. package/templates/api/src/boards/cli.py +0 -354
  51. package/templates/api/src/boards/config.py +0 -131
  52. package/templates/api/src/boards/database/__init__.py +0 -7
  53. package/templates/api/src/boards/database/cli.py +0 -110
  54. package/templates/api/src/boards/database/connection.py +0 -292
  55. package/templates/api/src/boards/database/models.py +0 -19
  56. package/templates/api/src/boards/database/seed_data.py +0 -182
  57. package/templates/api/src/boards/dbmodels/__init__.py +0 -441
  58. package/templates/api/src/boards/generators/__init__.py +0 -57
  59. package/templates/api/src/boards/generators/artifact_resolution.py +0 -405
  60. package/templates/api/src/boards/generators/artifacts.py +0 -53
  61. package/templates/api/src/boards/generators/base.py +0 -144
  62. package/templates/api/src/boards/generators/implementations/__init__.py +0 -14
  63. package/templates/api/src/boards/generators/implementations/fal/__init__.py +0 -25
  64. package/templates/api/src/boards/generators/implementations/fal/audio/__init__.py +0 -23
  65. package/templates/api/src/boards/generators/implementations/fal/audio/beatoven_music_generation.py +0 -171
  66. package/templates/api/src/boards/generators/implementations/fal/audio/beatoven_sound_effect_generation.py +0 -167
  67. package/templates/api/src/boards/generators/implementations/fal/audio/chatterbox_text_to_speech.py +0 -176
  68. package/templates/api/src/boards/generators/implementations/fal/audio/chatterbox_tts_turbo.py +0 -195
  69. package/templates/api/src/boards/generators/implementations/fal/audio/elevenlabs_sound_effects_v2.py +0 -194
  70. package/templates/api/src/boards/generators/implementations/fal/audio/elevenlabs_tts_eleven_v3.py +0 -209
  71. package/templates/api/src/boards/generators/implementations/fal/audio/fal_elevenlabs_tts_turbo_v2_5.py +0 -206
  72. package/templates/api/src/boards/generators/implementations/fal/audio/fal_minimax_speech_26_hd.py +0 -237
  73. package/templates/api/src/boards/generators/implementations/fal/audio/minimax_music_v2.py +0 -173
  74. package/templates/api/src/boards/generators/implementations/fal/audio/minimax_speech_2_6_turbo.py +0 -221
  75. package/templates/api/src/boards/generators/implementations/fal/image/__init__.py +0 -63
  76. package/templates/api/src/boards/generators/implementations/fal/image/bytedance_seedream_v45_edit.py +0 -219
  77. package/templates/api/src/boards/generators/implementations/fal/image/clarity_upscaler.py +0 -220
  78. package/templates/api/src/boards/generators/implementations/fal/image/crystal_upscaler.py +0 -173
  79. package/templates/api/src/boards/generators/implementations/fal/image/fal_ideogram_character.py +0 -227
  80. package/templates/api/src/boards/generators/implementations/fal/image/flux_2.py +0 -203
  81. package/templates/api/src/boards/generators/implementations/fal/image/flux_2_edit.py +0 -230
  82. package/templates/api/src/boards/generators/implementations/fal/image/flux_2_pro.py +0 -204
  83. package/templates/api/src/boards/generators/implementations/fal/image/flux_2_pro_edit.py +0 -221
  84. package/templates/api/src/boards/generators/implementations/fal/image/flux_pro_kontext.py +0 -216
  85. package/templates/api/src/boards/generators/implementations/fal/image/flux_pro_ultra.py +0 -197
  86. package/templates/api/src/boards/generators/implementations/fal/image/gemini_25_flash_image.py +0 -177
  87. package/templates/api/src/boards/generators/implementations/fal/image/gemini_25_flash_image_edit.py +0 -208
  88. package/templates/api/src/boards/generators/implementations/fal/image/gpt_image_15_edit.py +0 -216
  89. package/templates/api/src/boards/generators/implementations/fal/image/gpt_image_1_5.py +0 -177
  90. package/templates/api/src/boards/generators/implementations/fal/image/gpt_image_1_edit_image.py +0 -182
  91. package/templates/api/src/boards/generators/implementations/fal/image/gpt_image_1_mini.py +0 -167
  92. package/templates/api/src/boards/generators/implementations/fal/image/ideogram_character_edit.py +0 -299
  93. package/templates/api/src/boards/generators/implementations/fal/image/ideogram_v2.py +0 -190
  94. package/templates/api/src/boards/generators/implementations/fal/image/imagen4_preview.py +0 -191
  95. package/templates/api/src/boards/generators/implementations/fal/image/imagen4_preview_fast.py +0 -179
  96. package/templates/api/src/boards/generators/implementations/fal/image/nano_banana.py +0 -183
  97. package/templates/api/src/boards/generators/implementations/fal/image/nano_banana_edit.py +0 -212
  98. package/templates/api/src/boards/generators/implementations/fal/image/nano_banana_pro.py +0 -179
  99. package/templates/api/src/boards/generators/implementations/fal/image/nano_banana_pro_edit.py +0 -226
  100. package/templates/api/src/boards/generators/implementations/fal/image/qwen_image.py +0 -249
  101. package/templates/api/src/boards/generators/implementations/fal/image/qwen_image_edit.py +0 -244
  102. package/templates/api/src/boards/generators/implementations/fal/image/reve_edit.py +0 -178
  103. package/templates/api/src/boards/generators/implementations/fal/image/reve_text_to_image.py +0 -155
  104. package/templates/api/src/boards/generators/implementations/fal/image/seedream_v45_text_to_image.py +0 -180
  105. package/templates/api/src/boards/generators/implementations/fal/utils.py +0 -61
  106. package/templates/api/src/boards/generators/implementations/fal/video/__init__.py +0 -77
  107. package/templates/api/src/boards/generators/implementations/fal/video/bytedance_seedance_v1_pro_text_to_video.py +0 -209
  108. package/templates/api/src/boards/generators/implementations/fal/video/creatify_lipsync.py +0 -161
  109. package/templates/api/src/boards/generators/implementations/fal/video/fal_bytedance_seedance_v1_pro_image_to_video.py +0 -222
  110. package/templates/api/src/boards/generators/implementations/fal/video/fal_minimax_hailuo_02_standard_text_to_video.py +0 -152
  111. package/templates/api/src/boards/generators/implementations/fal/video/fal_pixverse_lipsync.py +0 -197
  112. package/templates/api/src/boards/generators/implementations/fal/video/fal_sora_2_text_to_video.py +0 -173
  113. package/templates/api/src/boards/generators/implementations/fal/video/infinitalk.py +0 -221
  114. package/templates/api/src/boards/generators/implementations/fal/video/kling_video_ai_avatar_v2_pro.py +0 -168
  115. package/templates/api/src/boards/generators/implementations/fal/video/kling_video_ai_avatar_v2_standard.py +0 -159
  116. package/templates/api/src/boards/generators/implementations/fal/video/kling_video_v2_5_turbo_pro_image_to_video.py +0 -175
  117. package/templates/api/src/boards/generators/implementations/fal/video/kling_video_v2_5_turbo_pro_text_to_video.py +0 -168
  118. package/templates/api/src/boards/generators/implementations/fal/video/minimax_hailuo_2_3_pro_image_to_video.py +0 -153
  119. package/templates/api/src/boards/generators/implementations/fal/video/sora2_image_to_video.py +0 -172
  120. package/templates/api/src/boards/generators/implementations/fal/video/sora_2_image_to_video_pro.py +0 -175
  121. package/templates/api/src/boards/generators/implementations/fal/video/sora_2_text_to_video_pro.py +0 -163
  122. package/templates/api/src/boards/generators/implementations/fal/video/sync_lipsync_v2.py +0 -167
  123. package/templates/api/src/boards/generators/implementations/fal/video/sync_lipsync_v2_pro.py +0 -155
  124. package/templates/api/src/boards/generators/implementations/fal/video/veed_fabric_1_0.py +0 -180
  125. package/templates/api/src/boards/generators/implementations/fal/video/veed_lipsync.py +0 -174
  126. package/templates/api/src/boards/generators/implementations/fal/video/veo3.py +0 -194
  127. package/templates/api/src/boards/generators/implementations/fal/video/veo31.py +0 -190
  128. package/templates/api/src/boards/generators/implementations/fal/video/veo31_fast.py +0 -190
  129. package/templates/api/src/boards/generators/implementations/fal/video/veo31_fast_image_to_video.py +0 -191
  130. package/templates/api/src/boards/generators/implementations/fal/video/veo31_first_last_frame_to_video.py +0 -187
  131. package/templates/api/src/boards/generators/implementations/fal/video/veo31_image_to_video.py +0 -183
  132. package/templates/api/src/boards/generators/implementations/fal/video/veo31_reference_to_video.py +0 -172
  133. package/templates/api/src/boards/generators/implementations/fal/video/wan_25_preview_image_to_video.py +0 -212
  134. package/templates/api/src/boards/generators/implementations/fal/video/wan_25_preview_text_to_video.py +0 -208
  135. package/templates/api/src/boards/generators/implementations/fal/video/wan_pro_image_to_video.py +0 -158
  136. package/templates/api/src/boards/generators/implementations/kie/__init__.py +0 -11
  137. package/templates/api/src/boards/generators/implementations/kie/base.py +0 -316
  138. package/templates/api/src/boards/generators/implementations/kie/image/__init__.py +0 -3
  139. package/templates/api/src/boards/generators/implementations/kie/image/nano_banana_edit.py +0 -190
  140. package/templates/api/src/boards/generators/implementations/kie/utils.py +0 -98
  141. package/templates/api/src/boards/generators/implementations/kie/video/__init__.py +0 -8
  142. package/templates/api/src/boards/generators/implementations/kie/video/veo3.py +0 -161
  143. package/templates/api/src/boards/generators/implementations/openai/__init__.py +0 -1
  144. package/templates/api/src/boards/generators/implementations/openai/audio/__init__.py +0 -1
  145. package/templates/api/src/boards/generators/implementations/openai/audio/whisper.py +0 -69
  146. package/templates/api/src/boards/generators/implementations/openai/image/__init__.py +0 -1
  147. package/templates/api/src/boards/generators/implementations/openai/image/dalle3.py +0 -96
  148. package/templates/api/src/boards/generators/implementations/replicate/__init__.py +0 -1
  149. package/templates/api/src/boards/generators/implementations/replicate/image/__init__.py +0 -1
  150. package/templates/api/src/boards/generators/implementations/replicate/image/flux_pro.py +0 -88
  151. package/templates/api/src/boards/generators/implementations/replicate/video/__init__.py +0 -1
  152. package/templates/api/src/boards/generators/implementations/replicate/video/lipsync.py +0 -73
  153. package/templates/api/src/boards/generators/loader.py +0 -253
  154. package/templates/api/src/boards/generators/registry.py +0 -114
  155. package/templates/api/src/boards/generators/resolution.py +0 -632
  156. package/templates/api/src/boards/generators/testmods/class_gen.py +0 -34
  157. package/templates/api/src/boards/generators/testmods/import_side_effect.py +0 -35
  158. package/templates/api/src/boards/graphql/__init__.py +0 -7
  159. package/templates/api/src/boards/graphql/access_control.py +0 -136
  160. package/templates/api/src/boards/graphql/mutations/root.py +0 -148
  161. package/templates/api/src/boards/graphql/queries/root.py +0 -116
  162. package/templates/api/src/boards/graphql/resolvers/__init__.py +0 -8
  163. package/templates/api/src/boards/graphql/resolvers/auth.py +0 -12
  164. package/templates/api/src/boards/graphql/resolvers/board.py +0 -1053
  165. package/templates/api/src/boards/graphql/resolvers/generation.py +0 -666
  166. package/templates/api/src/boards/graphql/resolvers/generator.py +0 -50
  167. package/templates/api/src/boards/graphql/resolvers/lineage.py +0 -381
  168. package/templates/api/src/boards/graphql/resolvers/upload.py +0 -463
  169. package/templates/api/src/boards/graphql/resolvers/user.py +0 -25
  170. package/templates/api/src/boards/graphql/schema.py +0 -81
  171. package/templates/api/src/boards/graphql/types/board.py +0 -102
  172. package/templates/api/src/boards/graphql/types/generation.py +0 -166
  173. package/templates/api/src/boards/graphql/types/generator.py +0 -17
  174. package/templates/api/src/boards/graphql/types/user.py +0 -47
  175. package/templates/api/src/boards/jobs/repository.py +0 -153
  176. package/templates/api/src/boards/logging.py +0 -195
  177. package/templates/api/src/boards/middleware.py +0 -339
  178. package/templates/api/src/boards/progress/__init__.py +0 -4
  179. package/templates/api/src/boards/progress/models.py +0 -25
  180. package/templates/api/src/boards/progress/publisher.py +0 -64
  181. package/templates/api/src/boards/py.typed +0 -0
  182. package/templates/api/src/boards/redis_pool.py +0 -118
  183. package/templates/api/src/boards/storage/__init__.py +0 -52
  184. package/templates/api/src/boards/storage/base.py +0 -363
  185. package/templates/api/src/boards/storage/config.py +0 -187
  186. package/templates/api/src/boards/storage/factory.py +0 -288
  187. package/templates/api/src/boards/storage/implementations/__init__.py +0 -27
  188. package/templates/api/src/boards/storage/implementations/gcs.py +0 -340
  189. package/templates/api/src/boards/storage/implementations/local.py +0 -201
  190. package/templates/api/src/boards/storage/implementations/s3.py +0 -294
  191. package/templates/api/src/boards/storage/implementations/supabase.py +0 -218
  192. package/templates/api/src/boards/tenant_isolation.py +0 -446
  193. package/templates/api/src/boards/validation.py +0 -262
  194. package/templates/api/src/boards/workers/__init__.py +0 -1
  195. package/templates/api/src/boards/workers/actors.py +0 -274
  196. package/templates/api/src/boards/workers/cli.py +0 -125
  197. package/templates/api/src/boards/workers/context.py +0 -348
  198. package/templates/api/src/boards/workers/middleware.py +0 -58
  199. package/templates/api/src/py.typed +0 -0
  200. package/templates/compose.web.yaml +0 -35
  201. package/templates/compose.yaml +0 -116
  202. package/templates/docker/env.example +0 -23
  203. package/templates/web/.env.example +0 -28
  204. package/templates/web/Dockerfile +0 -51
  205. package/templates/web/components.json +0 -22
  206. package/templates/web/imageLoader.js +0 -18
  207. package/templates/web/next-env.d.ts +0 -5
  208. package/templates/web/next.config.js +0 -36
  209. package/templates/web/package.json +0 -41
  210. package/templates/web/postcss.config.mjs +0 -7
  211. package/templates/web/public/favicon.ico +0 -0
  212. package/templates/web/src/app/boards/[boardId]/page.tsx +0 -353
  213. package/templates/web/src/app/globals.css +0 -123
  214. package/templates/web/src/app/layout.tsx +0 -31
  215. package/templates/web/src/app/lineage/[generationId]/page.tsx +0 -235
  216. package/templates/web/src/app/page.tsx +0 -35
  217. package/templates/web/src/app/providers.tsx +0 -18
  218. package/templates/web/src/components/boards/ArtifactInputSlots.tsx +0 -206
  219. package/templates/web/src/components/boards/ArtifactPreview.tsx +0 -466
  220. package/templates/web/src/components/boards/GenerationGrid.tsx +0 -282
  221. package/templates/web/src/components/boards/GenerationInput.tsx +0 -370
  222. package/templates/web/src/components/boards/GeneratorSelector.tsx +0 -272
  223. package/templates/web/src/components/boards/UploadArtifact.tsx +0 -563
  224. package/templates/web/src/components/header.tsx +0 -32
  225. package/templates/web/src/components/theme-provider.tsx +0 -10
  226. package/templates/web/src/components/theme-toggle.tsx +0 -75
  227. package/templates/web/src/components/ui/alert-dialog.tsx +0 -157
  228. package/templates/web/src/components/ui/button.tsx +0 -58
  229. package/templates/web/src/components/ui/card.tsx +0 -92
  230. package/templates/web/src/components/ui/dropdown-menu.tsx +0 -200
  231. package/templates/web/src/components/ui/navigation-menu.tsx +0 -168
  232. package/templates/web/src/components/ui/toast.tsx +0 -128
  233. package/templates/web/src/components/ui/toaster.tsx +0 -35
  234. package/templates/web/src/components/ui/use-toast.ts +0 -187
  235. package/templates/web/src/hooks/useGeneratorMRU.ts +0 -57
  236. package/templates/web/src/lib/utils.ts +0 -6
  237. package/templates/web/tsconfig.json +0 -41
@@ -1,128 +0,0 @@
1
- import * as React from "react"
2
- import * as ToastPrimitives from "@radix-ui/react-toast"
3
- import { cva, type VariantProps } from "class-variance-authority"
4
-
5
- import { cn } from "@/lib/utils"
6
-
7
- const ToastProvider = ToastPrimitives.Provider
8
-
9
- const ToastViewport = React.forwardRef<
10
- React.ElementRef<typeof ToastPrimitives.Viewport>,
11
- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>
12
- >(({ className, ...props }, ref) => (
13
- <ToastPrimitives.Viewport
14
- ref={ref}
15
- className={cn(
16
- "fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
17
- className
18
- )}
19
- {...props}
20
- />
21
- ))
22
- ToastViewport.displayName = ToastPrimitives.Viewport.displayName
23
-
24
- const toastVariants = cva(
25
- "group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
26
- {
27
- variants: {
28
- variant: {
29
- default: "border bg-background text-foreground",
30
- destructive:
31
- "destructive group border-destructive bg-destructive text-destructive-foreground",
32
- },
33
- },
34
- defaultVariants: {
35
- variant: "default",
36
- },
37
- }
38
- )
39
-
40
- const Toast = React.forwardRef<
41
- React.ElementRef<typeof ToastPrimitives.Root>,
42
- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &
43
- VariantProps<typeof toastVariants>
44
- >(({ className, variant, ...props }, ref) => {
45
- return (
46
- <ToastPrimitives.Root
47
- ref={ref}
48
- className={cn(toastVariants({ variant }), className)}
49
- {...props}
50
- />
51
- )
52
- })
53
- Toast.displayName = ToastPrimitives.Root.displayName
54
-
55
- const ToastAction = React.forwardRef<
56
- React.ElementRef<typeof ToastPrimitives.Action>,
57
- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>
58
- >(({ className, ...props }, ref) => (
59
- <ToastPrimitives.Action
60
- ref={ref}
61
- className={cn(
62
- "inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-muted focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-destructive/40 group-[.destructive]:hover:border-destructive/60 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",
63
- className
64
- )}
65
- {...props}
66
- />
67
- ))
68
- ToastAction.displayName = ToastPrimitives.Action.displayName
69
-
70
- const ToastClose = React.forwardRef<
71
- React.ElementRef<typeof ToastPrimitives.Close>,
72
- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>
73
- >(({ className, ...props }, ref) => (
74
- <ToastPrimitives.Close
75
- ref={ref}
76
- className={cn(
77
- "absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-destructive-foreground/70 group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive group-[.destructive]:focus:ring-offset-destructive",
78
- className
79
- )}
80
- toast-close=""
81
- {...props}
82
- >
83
- <svg className="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
84
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
85
- </svg>
86
- </ToastPrimitives.Close>
87
- ))
88
- ToastClose.displayName = ToastPrimitives.Close.displayName
89
-
90
- const ToastTitle = React.forwardRef<
91
- React.ElementRef<typeof ToastPrimitives.Title>,
92
- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>
93
- >(({ className, ...props }, ref) => (
94
- <ToastPrimitives.Title
95
- ref={ref}
96
- className={cn("text-sm font-semibold", className)}
97
- {...props}
98
- />
99
- ))
100
- ToastTitle.displayName = ToastPrimitives.Title.displayName
101
-
102
- const ToastDescription = React.forwardRef<
103
- React.ElementRef<typeof ToastPrimitives.Description>,
104
- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>
105
- >(({ className, ...props }, ref) => (
106
- <ToastPrimitives.Description
107
- ref={ref}
108
- className={cn("text-sm opacity-90", className)}
109
- {...props}
110
- />
111
- ))
112
- ToastDescription.displayName = ToastPrimitives.Description.displayName
113
-
114
- type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>
115
-
116
- type ToastActionElement = React.ReactElement<typeof ToastAction>
117
-
118
- export {
119
- type ToastProps,
120
- type ToastActionElement,
121
- ToastProvider,
122
- ToastViewport,
123
- Toast,
124
- ToastTitle,
125
- ToastDescription,
126
- ToastClose,
127
- ToastAction,
128
- }
@@ -1,35 +0,0 @@
1
- "use client"
2
-
3
- import {
4
- Toast,
5
- ToastClose,
6
- ToastDescription,
7
- ToastProvider,
8
- ToastTitle,
9
- ToastViewport,
10
- } from "@/components/ui/toast"
11
- import { useToast } from "@/components/ui/use-toast"
12
-
13
- export function Toaster() {
14
- const { toasts } = useToast()
15
-
16
- return (
17
- <ToastProvider>
18
- {toasts.map(function ({ id, title, description, action, ...props }) {
19
- return (
20
- <Toast key={id} {...props}>
21
- <div className="grid gap-1">
22
- {title && <ToastTitle>{title}</ToastTitle>}
23
- {description && (
24
- <ToastDescription>{description}</ToastDescription>
25
- )}
26
- </div>
27
- {action}
28
- <ToastClose />
29
- </Toast>
30
- )
31
- })}
32
- <ToastViewport />
33
- </ToastProvider>
34
- )
35
- }
@@ -1,187 +0,0 @@
1
- import * as React from "react"
2
-
3
- import type { ToastActionElement, ToastProps } from "@/components/ui/toast"
4
-
5
- const TOAST_LIMIT = 5
6
- const TOAST_REMOVE_DELAY = 1000000
7
-
8
- type ToasterToast = ToastProps & {
9
- id: string
10
- title?: React.ReactNode
11
- description?: React.ReactNode
12
- action?: ToastActionElement
13
- }
14
-
15
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
16
- const actionTypes = {
17
- ADD_TOAST: "ADD_TOAST",
18
- UPDATE_TOAST: "UPDATE_TOAST",
19
- DISMISS_TOAST: "DISMISS_TOAST",
20
- REMOVE_TOAST: "REMOVE_TOAST",
21
- } as const
22
-
23
- let count = 0
24
-
25
- function genId() {
26
- count = (count + 1) % Number.MAX_SAFE_INTEGER
27
- return count.toString()
28
- }
29
-
30
- type ActionType = typeof actionTypes
31
-
32
- type Action =
33
- | {
34
- type: ActionType["ADD_TOAST"]
35
- toast: ToasterToast
36
- }
37
- | {
38
- type: ActionType["UPDATE_TOAST"]
39
- toast: Partial<ToasterToast>
40
- }
41
- | {
42
- type: ActionType["DISMISS_TOAST"]
43
- toastId?: ToasterToast["id"]
44
- }
45
- | {
46
- type: ActionType["REMOVE_TOAST"]
47
- toastId?: ToasterToast["id"]
48
- }
49
-
50
- interface State {
51
- toasts: ToasterToast[]
52
- }
53
-
54
- const toastTimeouts = new Map<string, ReturnType<typeof setTimeout>>()
55
-
56
- const addToRemoveQueue = (toastId: string) => {
57
- if (toastTimeouts.has(toastId)) {
58
- return
59
- }
60
-
61
- const timeout = setTimeout(() => {
62
- toastTimeouts.delete(toastId)
63
- dispatch({
64
- type: "REMOVE_TOAST",
65
- toastId: toastId,
66
- })
67
- }, TOAST_REMOVE_DELAY)
68
-
69
- toastTimeouts.set(toastId, timeout)
70
- }
71
-
72
- export const reducer = (state: State, action: Action): State => {
73
- switch (action.type) {
74
- case "ADD_TOAST":
75
- return {
76
- ...state,
77
- toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),
78
- }
79
-
80
- case "UPDATE_TOAST":
81
- return {
82
- ...state,
83
- toasts: state.toasts.map((t) =>
84
- t.id === action.toast.id ? { ...t, ...action.toast } : t
85
- ),
86
- }
87
-
88
- case "DISMISS_TOAST": {
89
- const { toastId } = action
90
-
91
- if (toastId) {
92
- addToRemoveQueue(toastId)
93
- } else {
94
- state.toasts.forEach((toast) => {
95
- addToRemoveQueue(toast.id)
96
- })
97
- }
98
-
99
- return {
100
- ...state,
101
- toasts: state.toasts.map((t) =>
102
- t.id === toastId || toastId === undefined
103
- ? {
104
- ...t,
105
- open: false,
106
- }
107
- : t
108
- ),
109
- }
110
- }
111
- case "REMOVE_TOAST":
112
- if (action.toastId === undefined) {
113
- return {
114
- ...state,
115
- toasts: [],
116
- }
117
- }
118
- return {
119
- ...state,
120
- toasts: state.toasts.filter((t) => t.id !== action.toastId),
121
- }
122
- }
123
- }
124
-
125
- const listeners: Array<(state: State) => void> = []
126
-
127
- let memoryState: State = { toasts: [] }
128
-
129
- function dispatch(action: Action) {
130
- memoryState = reducer(memoryState, action)
131
- listeners.forEach((listener) => {
132
- listener(memoryState)
133
- })
134
- }
135
-
136
- interface Toast extends Omit<ToasterToast, "id"> {}
137
-
138
- function toast({ ...props }: Toast) {
139
- const id = genId()
140
-
141
- const update = (props: ToasterToast) =>
142
- dispatch({
143
- type: "UPDATE_TOAST",
144
- toast: { ...props, id },
145
- })
146
- const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id })
147
-
148
- dispatch({
149
- type: "ADD_TOAST",
150
- toast: {
151
- ...props,
152
- id,
153
- open: true,
154
- onOpenChange: (open) => {
155
- if (!open) dismiss()
156
- },
157
- },
158
- })
159
-
160
- return {
161
- id: id,
162
- dismiss,
163
- update,
164
- }
165
- }
166
-
167
- function useToast() {
168
- const [state, setState] = React.useState<State>(memoryState)
169
-
170
- React.useEffect(() => {
171
- listeners.push(setState)
172
- return () => {
173
- const index = listeners.indexOf(setState)
174
- if (index > -1) {
175
- listeners.splice(index, 1)
176
- }
177
- }
178
- }, [state])
179
-
180
- return {
181
- ...state,
182
- toast,
183
- dismiss: (toastId?: string) => dispatch({ type: "DISMISS_TOAST", toastId }),
184
- }
185
- }
186
-
187
- export { useToast, toast }
@@ -1,57 +0,0 @@
1
- import { useState, useEffect, useCallback } from "react";
2
-
3
- const MRU_STORAGE_KEY = "boards-generator-mru";
4
- const MRU_MAX_SIZE = 3;
5
-
6
- export function useGeneratorMRU() {
7
- const [mruGenerators, setMruGenerators] = useState<string[]>([]);
8
-
9
- // Load MRU from localStorage on mount
10
- useEffect(() => {
11
- try {
12
- if (typeof window === "undefined") return;
13
-
14
- const stored = localStorage.getItem(MRU_STORAGE_KEY);
15
- if (stored) {
16
- const parsed = JSON.parse(stored);
17
- // Robustness check: Ensure it's an array of strings
18
- if (
19
- Array.isArray(parsed) &&
20
- parsed.every((item) => typeof item === "string")
21
- ) {
22
- setMruGenerators(parsed);
23
- }
24
- }
25
- } catch (error) {
26
- console.error("Failed to load MRU generators:", error);
27
- // Fallback to empty list is implicit via initial state
28
- }
29
- }, []);
30
-
31
- const addGeneratorToMRU = useCallback((generatorName: string) => {
32
- setMruGenerators((prev) => {
33
- // Create new list with generator at the front, removing duplicates
34
- const newMru = [
35
- generatorName,
36
- ...prev.filter((name) => name !== generatorName),
37
- ].slice(0, MRU_MAX_SIZE);
38
-
39
- // Persist to localStorage
40
- try {
41
- if (typeof window !== "undefined") {
42
- localStorage.setItem(MRU_STORAGE_KEY, JSON.stringify(newMru));
43
- }
44
- } catch (error) {
45
- console.error("Failed to save MRU generators:", error);
46
- }
47
-
48
- return newMru;
49
- });
50
- }, []);
51
-
52
- return {
53
- mruGenerators,
54
- lastUsedGenerator: mruGenerators.length > 0 ? mruGenerators[0] : undefined,
55
- addGeneratorToMRU,
56
- };
57
- }
@@ -1,6 +0,0 @@
1
- import { clsx, type ClassValue } from "clsx";
2
- import { twMerge } from "tailwind-merge";
3
-
4
- export function cn(...inputs: ClassValue[]) {
5
- return twMerge(clsx(inputs));
6
- }
@@ -1,41 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es5",
4
- "lib": [
5
- "dom",
6
- "dom.iterable",
7
- "esnext"
8
- ],
9
- "allowJs": true,
10
- "skipLibCheck": true,
11
- "strict": true,
12
- "forceConsistentCasingInFileNames": true,
13
- "noEmit": true,
14
- "esModuleInterop": true,
15
- "module": "esnext",
16
- "moduleResolution": "node",
17
- "resolveJsonModule": true,
18
- "isolatedModules": true,
19
- "jsx": "preserve",
20
- "incremental": true,
21
- "plugins": [
22
- {
23
- "name": "next"
24
- }
25
- ],
26
- "paths": {
27
- "@/*": [
28
- "./src/*"
29
- ]
30
- }
31
- },
32
- "include": [
33
- "next-env.d.ts",
34
- "**/*.ts",
35
- "**/*.tsx",
36
- ".next/types/**/*.ts"
37
- ],
38
- "exclude": [
39
- "node_modules"
40
- ]
41
- }