@weirdfingers/baseboards 0.9.6 → 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.
- package/dist/index.js +560 -469
- package/dist/index.js.map +1 -1
- package/package.json +2 -5
- package/templates/README.md +0 -122
- package/templates/api/.env.example +0 -65
- package/templates/api/ARTIFACT_RESOLUTION_GUIDE.md +0 -148
- package/templates/api/Dockerfile +0 -32
- package/templates/api/README.md +0 -264
- package/templates/api/alembic/env.py +0 -114
- package/templates/api/alembic/script.py.mako +0 -28
- package/templates/api/alembic/versions/20250101_000000_initial_schema.py +0 -506
- package/templates/api/alembic/versions/20251022_174729_remove_provider_name_from_generations.py +0 -75
- package/templates/api/alembic/versions/20251023_165852_switch_to_declarative_base_and_mapping.py +0 -467
- package/templates/api/alembic/versions/20251202_000000_add_artifact_lineage.py +0 -134
- package/templates/api/alembic/versions/2025925_62735_add_seed_data_for_default_tenant.py +0 -88
- package/templates/api/alembic.ini +0 -36
- package/templates/api/config/generators.yaml +0 -237
- package/templates/api/config/storage_config.yaml +0 -26
- package/templates/api/docs/ADDING_GENERATORS.md +0 -409
- package/templates/api/docs/GENERATORS_API.md +0 -502
- package/templates/api/docs/MIGRATIONS.md +0 -472
- package/templates/api/docs/TESTING_LIVE_APIS.md +0 -417
- package/templates/api/docs/storage_providers.md +0 -337
- package/templates/api/pyproject.toml +0 -205
- package/templates/api/src/boards/__init__.py +0 -10
- package/templates/api/src/boards/api/app.py +0 -172
- package/templates/api/src/boards/api/auth.py +0 -75
- package/templates/api/src/boards/api/endpoints/__init__.py +0 -3
- package/templates/api/src/boards/api/endpoints/jobs.py +0 -76
- package/templates/api/src/boards/api/endpoints/setup.py +0 -505
- package/templates/api/src/boards/api/endpoints/sse.py +0 -129
- package/templates/api/src/boards/api/endpoints/storage.py +0 -155
- package/templates/api/src/boards/api/endpoints/tenant_registration.py +0 -296
- package/templates/api/src/boards/api/endpoints/uploads.py +0 -149
- package/templates/api/src/boards/api/endpoints/webhooks.py +0 -13
- package/templates/api/src/boards/auth/__init__.py +0 -15
- package/templates/api/src/boards/auth/adapters/__init__.py +0 -27
- package/templates/api/src/boards/auth/adapters/auth0.py +0 -220
- package/templates/api/src/boards/auth/adapters/base.py +0 -73
- package/templates/api/src/boards/auth/adapters/clerk.py +0 -172
- package/templates/api/src/boards/auth/adapters/jwt.py +0 -122
- package/templates/api/src/boards/auth/adapters/none.py +0 -102
- package/templates/api/src/boards/auth/adapters/oidc.py +0 -284
- package/templates/api/src/boards/auth/adapters/supabase.py +0 -110
- package/templates/api/src/boards/auth/context.py +0 -35
- package/templates/api/src/boards/auth/factory.py +0 -129
- package/templates/api/src/boards/auth/middleware.py +0 -221
- package/templates/api/src/boards/auth/provisioning.py +0 -129
- package/templates/api/src/boards/auth/tenant_extraction.py +0 -278
- package/templates/api/src/boards/cli.py +0 -354
- package/templates/api/src/boards/config.py +0 -131
- package/templates/api/src/boards/database/__init__.py +0 -7
- package/templates/api/src/boards/database/cli.py +0 -110
- package/templates/api/src/boards/database/connection.py +0 -292
- package/templates/api/src/boards/database/models.py +0 -19
- package/templates/api/src/boards/database/seed_data.py +0 -182
- package/templates/api/src/boards/dbmodels/__init__.py +0 -441
- package/templates/api/src/boards/generators/__init__.py +0 -57
- package/templates/api/src/boards/generators/artifact_resolution.py +0 -405
- package/templates/api/src/boards/generators/artifacts.py +0 -53
- package/templates/api/src/boards/generators/base.py +0 -144
- package/templates/api/src/boards/generators/implementations/__init__.py +0 -14
- package/templates/api/src/boards/generators/implementations/fal/__init__.py +0 -25
- package/templates/api/src/boards/generators/implementations/fal/audio/__init__.py +0 -23
- package/templates/api/src/boards/generators/implementations/fal/audio/beatoven_music_generation.py +0 -171
- package/templates/api/src/boards/generators/implementations/fal/audio/beatoven_sound_effect_generation.py +0 -167
- package/templates/api/src/boards/generators/implementations/fal/audio/chatterbox_text_to_speech.py +0 -176
- package/templates/api/src/boards/generators/implementations/fal/audio/chatterbox_tts_turbo.py +0 -195
- package/templates/api/src/boards/generators/implementations/fal/audio/elevenlabs_sound_effects_v2.py +0 -194
- package/templates/api/src/boards/generators/implementations/fal/audio/elevenlabs_tts_eleven_v3.py +0 -209
- package/templates/api/src/boards/generators/implementations/fal/audio/fal_elevenlabs_tts_turbo_v2_5.py +0 -206
- package/templates/api/src/boards/generators/implementations/fal/audio/fal_minimax_speech_26_hd.py +0 -237
- package/templates/api/src/boards/generators/implementations/fal/audio/minimax_music_v2.py +0 -173
- package/templates/api/src/boards/generators/implementations/fal/audio/minimax_speech_2_6_turbo.py +0 -221
- package/templates/api/src/boards/generators/implementations/fal/image/__init__.py +0 -63
- package/templates/api/src/boards/generators/implementations/fal/image/bytedance_seedream_v45_edit.py +0 -219
- package/templates/api/src/boards/generators/implementations/fal/image/clarity_upscaler.py +0 -220
- package/templates/api/src/boards/generators/implementations/fal/image/crystal_upscaler.py +0 -173
- package/templates/api/src/boards/generators/implementations/fal/image/fal_ideogram_character.py +0 -227
- package/templates/api/src/boards/generators/implementations/fal/image/flux_2.py +0 -203
- package/templates/api/src/boards/generators/implementations/fal/image/flux_2_edit.py +0 -230
- package/templates/api/src/boards/generators/implementations/fal/image/flux_2_pro.py +0 -204
- package/templates/api/src/boards/generators/implementations/fal/image/flux_2_pro_edit.py +0 -221
- package/templates/api/src/boards/generators/implementations/fal/image/flux_pro_kontext.py +0 -216
- package/templates/api/src/boards/generators/implementations/fal/image/flux_pro_ultra.py +0 -197
- package/templates/api/src/boards/generators/implementations/fal/image/gemini_25_flash_image.py +0 -177
- package/templates/api/src/boards/generators/implementations/fal/image/gemini_25_flash_image_edit.py +0 -208
- package/templates/api/src/boards/generators/implementations/fal/image/gpt_image_15_edit.py +0 -216
- package/templates/api/src/boards/generators/implementations/fal/image/gpt_image_1_5.py +0 -177
- package/templates/api/src/boards/generators/implementations/fal/image/gpt_image_1_edit_image.py +0 -182
- package/templates/api/src/boards/generators/implementations/fal/image/gpt_image_1_mini.py +0 -167
- package/templates/api/src/boards/generators/implementations/fal/image/ideogram_character_edit.py +0 -299
- package/templates/api/src/boards/generators/implementations/fal/image/ideogram_v2.py +0 -190
- package/templates/api/src/boards/generators/implementations/fal/image/imagen4_preview.py +0 -191
- package/templates/api/src/boards/generators/implementations/fal/image/imagen4_preview_fast.py +0 -179
- package/templates/api/src/boards/generators/implementations/fal/image/nano_banana.py +0 -183
- package/templates/api/src/boards/generators/implementations/fal/image/nano_banana_edit.py +0 -212
- package/templates/api/src/boards/generators/implementations/fal/image/nano_banana_pro.py +0 -179
- package/templates/api/src/boards/generators/implementations/fal/image/nano_banana_pro_edit.py +0 -226
- package/templates/api/src/boards/generators/implementations/fal/image/qwen_image.py +0 -249
- package/templates/api/src/boards/generators/implementations/fal/image/qwen_image_edit.py +0 -244
- package/templates/api/src/boards/generators/implementations/fal/image/reve_edit.py +0 -178
- package/templates/api/src/boards/generators/implementations/fal/image/reve_text_to_image.py +0 -155
- package/templates/api/src/boards/generators/implementations/fal/image/seedream_v45_text_to_image.py +0 -180
- package/templates/api/src/boards/generators/implementations/fal/utils.py +0 -61
- package/templates/api/src/boards/generators/implementations/fal/video/__init__.py +0 -77
- package/templates/api/src/boards/generators/implementations/fal/video/bytedance_seedance_v1_pro_text_to_video.py +0 -209
- package/templates/api/src/boards/generators/implementations/fal/video/creatify_lipsync.py +0 -161
- package/templates/api/src/boards/generators/implementations/fal/video/fal_bytedance_seedance_v1_pro_image_to_video.py +0 -222
- package/templates/api/src/boards/generators/implementations/fal/video/fal_minimax_hailuo_02_standard_text_to_video.py +0 -152
- package/templates/api/src/boards/generators/implementations/fal/video/fal_pixverse_lipsync.py +0 -197
- package/templates/api/src/boards/generators/implementations/fal/video/fal_sora_2_text_to_video.py +0 -173
- package/templates/api/src/boards/generators/implementations/fal/video/infinitalk.py +0 -221
- package/templates/api/src/boards/generators/implementations/fal/video/kling_video_ai_avatar_v2_pro.py +0 -168
- package/templates/api/src/boards/generators/implementations/fal/video/kling_video_ai_avatar_v2_standard.py +0 -159
- package/templates/api/src/boards/generators/implementations/fal/video/kling_video_v2_5_turbo_pro_image_to_video.py +0 -175
- package/templates/api/src/boards/generators/implementations/fal/video/kling_video_v2_5_turbo_pro_text_to_video.py +0 -168
- package/templates/api/src/boards/generators/implementations/fal/video/minimax_hailuo_2_3_pro_image_to_video.py +0 -153
- package/templates/api/src/boards/generators/implementations/fal/video/sora2_image_to_video.py +0 -172
- package/templates/api/src/boards/generators/implementations/fal/video/sora_2_image_to_video_pro.py +0 -175
- package/templates/api/src/boards/generators/implementations/fal/video/sora_2_text_to_video_pro.py +0 -163
- package/templates/api/src/boards/generators/implementations/fal/video/sync_lipsync_v2.py +0 -167
- package/templates/api/src/boards/generators/implementations/fal/video/sync_lipsync_v2_pro.py +0 -155
- package/templates/api/src/boards/generators/implementations/fal/video/veed_fabric_1_0.py +0 -180
- package/templates/api/src/boards/generators/implementations/fal/video/veed_lipsync.py +0 -174
- package/templates/api/src/boards/generators/implementations/fal/video/veo3.py +0 -194
- package/templates/api/src/boards/generators/implementations/fal/video/veo31.py +0 -190
- package/templates/api/src/boards/generators/implementations/fal/video/veo31_fast.py +0 -190
- package/templates/api/src/boards/generators/implementations/fal/video/veo31_fast_image_to_video.py +0 -191
- package/templates/api/src/boards/generators/implementations/fal/video/veo31_first_last_frame_to_video.py +0 -187
- package/templates/api/src/boards/generators/implementations/fal/video/veo31_image_to_video.py +0 -183
- package/templates/api/src/boards/generators/implementations/fal/video/veo31_reference_to_video.py +0 -172
- package/templates/api/src/boards/generators/implementations/fal/video/wan_25_preview_image_to_video.py +0 -212
- package/templates/api/src/boards/generators/implementations/fal/video/wan_25_preview_text_to_video.py +0 -208
- package/templates/api/src/boards/generators/implementations/fal/video/wan_pro_image_to_video.py +0 -158
- package/templates/api/src/boards/generators/implementations/kie/__init__.py +0 -11
- package/templates/api/src/boards/generators/implementations/kie/base.py +0 -316
- package/templates/api/src/boards/generators/implementations/kie/image/__init__.py +0 -3
- package/templates/api/src/boards/generators/implementations/kie/image/nano_banana_edit.py +0 -190
- package/templates/api/src/boards/generators/implementations/kie/utils.py +0 -98
- package/templates/api/src/boards/generators/implementations/kie/video/__init__.py +0 -8
- package/templates/api/src/boards/generators/implementations/kie/video/veo3.py +0 -161
- package/templates/api/src/boards/generators/implementations/openai/__init__.py +0 -1
- package/templates/api/src/boards/generators/implementations/openai/audio/__init__.py +0 -1
- package/templates/api/src/boards/generators/implementations/openai/audio/whisper.py +0 -69
- package/templates/api/src/boards/generators/implementations/openai/image/__init__.py +0 -1
- package/templates/api/src/boards/generators/implementations/openai/image/dalle3.py +0 -96
- package/templates/api/src/boards/generators/implementations/replicate/__init__.py +0 -1
- package/templates/api/src/boards/generators/implementations/replicate/image/__init__.py +0 -1
- package/templates/api/src/boards/generators/implementations/replicate/image/flux_pro.py +0 -88
- package/templates/api/src/boards/generators/implementations/replicate/video/__init__.py +0 -1
- package/templates/api/src/boards/generators/implementations/replicate/video/lipsync.py +0 -73
- package/templates/api/src/boards/generators/loader.py +0 -253
- package/templates/api/src/boards/generators/registry.py +0 -114
- package/templates/api/src/boards/generators/resolution.py +0 -632
- package/templates/api/src/boards/generators/testmods/class_gen.py +0 -34
- package/templates/api/src/boards/generators/testmods/import_side_effect.py +0 -35
- package/templates/api/src/boards/graphql/__init__.py +0 -7
- package/templates/api/src/boards/graphql/access_control.py +0 -136
- package/templates/api/src/boards/graphql/mutations/root.py +0 -148
- package/templates/api/src/boards/graphql/queries/root.py +0 -116
- package/templates/api/src/boards/graphql/resolvers/__init__.py +0 -8
- package/templates/api/src/boards/graphql/resolvers/auth.py +0 -12
- package/templates/api/src/boards/graphql/resolvers/board.py +0 -1053
- package/templates/api/src/boards/graphql/resolvers/generation.py +0 -666
- package/templates/api/src/boards/graphql/resolvers/generator.py +0 -50
- package/templates/api/src/boards/graphql/resolvers/lineage.py +0 -381
- package/templates/api/src/boards/graphql/resolvers/upload.py +0 -463
- package/templates/api/src/boards/graphql/resolvers/user.py +0 -25
- package/templates/api/src/boards/graphql/schema.py +0 -81
- package/templates/api/src/boards/graphql/types/board.py +0 -102
- package/templates/api/src/boards/graphql/types/generation.py +0 -166
- package/templates/api/src/boards/graphql/types/generator.py +0 -17
- package/templates/api/src/boards/graphql/types/user.py +0 -47
- package/templates/api/src/boards/jobs/repository.py +0 -153
- package/templates/api/src/boards/logging.py +0 -195
- package/templates/api/src/boards/middleware.py +0 -339
- package/templates/api/src/boards/progress/__init__.py +0 -4
- package/templates/api/src/boards/progress/models.py +0 -25
- package/templates/api/src/boards/progress/publisher.py +0 -64
- package/templates/api/src/boards/py.typed +0 -0
- package/templates/api/src/boards/redis_pool.py +0 -118
- package/templates/api/src/boards/storage/__init__.py +0 -52
- package/templates/api/src/boards/storage/base.py +0 -363
- package/templates/api/src/boards/storage/config.py +0 -187
- package/templates/api/src/boards/storage/factory.py +0 -288
- package/templates/api/src/boards/storage/implementations/__init__.py +0 -27
- package/templates/api/src/boards/storage/implementations/gcs.py +0 -340
- package/templates/api/src/boards/storage/implementations/local.py +0 -201
- package/templates/api/src/boards/storage/implementations/s3.py +0 -294
- package/templates/api/src/boards/storage/implementations/supabase.py +0 -218
- package/templates/api/src/boards/tenant_isolation.py +0 -446
- package/templates/api/src/boards/validation.py +0 -262
- package/templates/api/src/boards/workers/__init__.py +0 -1
- package/templates/api/src/boards/workers/actors.py +0 -274
- package/templates/api/src/boards/workers/cli.py +0 -125
- package/templates/api/src/boards/workers/context.py +0 -348
- package/templates/api/src/boards/workers/middleware.py +0 -58
- package/templates/api/src/py.typed +0 -0
- package/templates/compose.web.yaml +0 -35
- package/templates/compose.yaml +0 -116
- package/templates/docker/env.example +0 -23
- package/templates/web/.env.example +0 -28
- package/templates/web/Dockerfile +0 -51
- package/templates/web/components.json +0 -22
- package/templates/web/imageLoader.js +0 -18
- package/templates/web/next-env.d.ts +0 -5
- package/templates/web/next.config.js +0 -36
- package/templates/web/package.json +0 -41
- package/templates/web/postcss.config.mjs +0 -7
- package/templates/web/public/favicon.ico +0 -0
- package/templates/web/src/app/boards/[boardId]/page.tsx +0 -353
- package/templates/web/src/app/globals.css +0 -123
- package/templates/web/src/app/layout.tsx +0 -31
- package/templates/web/src/app/lineage/[generationId]/page.tsx +0 -235
- package/templates/web/src/app/page.tsx +0 -35
- package/templates/web/src/app/providers.tsx +0 -18
- package/templates/web/src/components/boards/ArtifactInputSlots.tsx +0 -206
- package/templates/web/src/components/boards/ArtifactPreview.tsx +0 -466
- package/templates/web/src/components/boards/GenerationGrid.tsx +0 -282
- package/templates/web/src/components/boards/GenerationInput.tsx +0 -370
- package/templates/web/src/components/boards/GeneratorSelector.tsx +0 -272
- package/templates/web/src/components/boards/UploadArtifact.tsx +0 -563
- package/templates/web/src/components/header.tsx +0 -32
- package/templates/web/src/components/theme-provider.tsx +0 -10
- package/templates/web/src/components/theme-toggle.tsx +0 -75
- package/templates/web/src/components/ui/alert-dialog.tsx +0 -157
- package/templates/web/src/components/ui/button.tsx +0 -58
- package/templates/web/src/components/ui/card.tsx +0 -92
- package/templates/web/src/components/ui/dropdown-menu.tsx +0 -200
- package/templates/web/src/components/ui/navigation-menu.tsx +0 -168
- package/templates/web/src/components/ui/toast.tsx +0 -128
- package/templates/web/src/components/ui/toaster.tsx +0 -35
- package/templates/web/src/components/ui/use-toast.ts +0 -187
- package/templates/web/src/hooks/useGeneratorMRU.ts +0 -57
- package/templates/web/src/lib/utils.ts +0 -6
- package/templates/web/tsconfig.json +0 -41
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Custom image loader for Next.js
|
|
3
|
-
* Rewrites NEXT_PUBLIC_API_URL to INTERNAL_API_URL in the image URL query parameter
|
|
4
|
-
* so that when Next.js's server-side image optimizer fetches the image,
|
|
5
|
-
* it uses the internal Docker network URL instead of localhost
|
|
6
|
-
*/
|
|
7
|
-
export default function imageLoader({ src, width, quality }) {
|
|
8
|
-
const publicApiUrl = process.env.NEXT_PUBLIC_API_URL;
|
|
9
|
-
const internalApiUrl = process.env.INTERNAL_API_URL;
|
|
10
|
-
|
|
11
|
-
// If we have an internal API URL and the src uses the public one, rewrite it
|
|
12
|
-
let targetSrc = src;
|
|
13
|
-
if (internalApiUrl && publicApiUrl && src.includes(publicApiUrl)) {
|
|
14
|
-
targetSrc = src.replace(publicApiUrl, internalApiUrl);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return `/_next/image?url=${encodeURIComponent(targetSrc)}&w=${width}&q=${quality || 75}`;
|
|
18
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/** @type {import('next').NextConfig} */
|
|
2
|
-
const nextConfig = {
|
|
3
|
-
output: "standalone",
|
|
4
|
-
reactStrictMode: true,
|
|
5
|
-
transpilePackages: ["@weirdfingers/boards"],
|
|
6
|
-
images: {
|
|
7
|
-
unoptimized: true, // Disable server-side optimization for Docker compatibility
|
|
8
|
-
// Use custom loader when INTERNAL_API_URL is set (Docker environment)
|
|
9
|
-
// This allows server-side image optimization to fetch from internal network
|
|
10
|
-
...(process.env.INTERNAL_API_URL && {
|
|
11
|
-
loader: "custom",
|
|
12
|
-
loaderFile: "./imageLoader.js",
|
|
13
|
-
}),
|
|
14
|
-
remotePatterns: [
|
|
15
|
-
{
|
|
16
|
-
protocol: "http",
|
|
17
|
-
hostname: "localhost",
|
|
18
|
-
port: "8800",
|
|
19
|
-
pathname: "/api/storage/**",
|
|
20
|
-
},
|
|
21
|
-
// Allow internal Docker hostname for image optimization
|
|
22
|
-
...(process.env.INTERNAL_API_URL
|
|
23
|
-
? [
|
|
24
|
-
{
|
|
25
|
-
protocol: "http",
|
|
26
|
-
hostname: "api",
|
|
27
|
-
port: "8800",
|
|
28
|
-
pathname: "/api/storage/**",
|
|
29
|
-
},
|
|
30
|
-
]
|
|
31
|
-
: []),
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
module.exports = nextConfig;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "baseboards",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"scripts": {
|
|
6
|
-
"dev": "next dev -p ${PORT:-3033}",
|
|
7
|
-
"build": "next build",
|
|
8
|
-
"start": "next start -p ${PORT:-3033}",
|
|
9
|
-
"lint": "next lint",
|
|
10
|
-
"typecheck": "tsc --noEmit"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
14
|
-
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
15
|
-
"@radix-ui/react-navigation-menu": "^1.2.14",
|
|
16
|
-
"@radix-ui/react-slot": "^1.2.3",
|
|
17
|
-
"@radix-ui/react-toast": "^1.2.15",
|
|
18
|
-
"@tailwindcss/postcss": "^4.1.13",
|
|
19
|
-
"@weirdfingers/boards": "^0.9.6",
|
|
20
|
-
"class-variance-authority": "^0.7.1",
|
|
21
|
-
"clsx": "^2.0.0",
|
|
22
|
-
"graphql": "^16.11.0",
|
|
23
|
-
"lucide-react": "^0.544.0",
|
|
24
|
-
"next": "14.2.5",
|
|
25
|
-
"next-themes": "^0.4.6",
|
|
26
|
-
"react": "^18.3.1",
|
|
27
|
-
"react-dom": "^18.3.1",
|
|
28
|
-
"tailwind-merge": "^3.3.1"
|
|
29
|
-
},
|
|
30
|
-
"devDependencies": {
|
|
31
|
-
"@types/node": "^20.14.10",
|
|
32
|
-
"@types/react": "^18.3.3",
|
|
33
|
-
"@types/react-dom": "^18.3.0",
|
|
34
|
-
"eslint": "^8.57.0",
|
|
35
|
-
"eslint-config-next": "14.2.5",
|
|
36
|
-
"postcss": "^8.5.6",
|
|
37
|
-
"tailwindcss": "^4.1.13",
|
|
38
|
-
"tw-animate-css": "^1.4.0",
|
|
39
|
-
"typescript": "^5.5.3"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
Binary file
|
|
@@ -1,353 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { useParams } from "next/navigation";
|
|
5
|
-
import {
|
|
6
|
-
useBoard,
|
|
7
|
-
useGenerators,
|
|
8
|
-
useGeneration,
|
|
9
|
-
GeneratorSelectionProvider,
|
|
10
|
-
} from "@weirdfingers/boards";
|
|
11
|
-
import { GenerationGrid } from "@/components/boards/GenerationGrid";
|
|
12
|
-
import { GenerationInput } from "@/components/boards/GenerationInput";
|
|
13
|
-
import { UploadArtifact } from "@/components/boards/UploadArtifact";
|
|
14
|
-
import { Button } from "@/components/ui/button";
|
|
15
|
-
import { Pencil, Check, X } from "lucide-react";
|
|
16
|
-
|
|
17
|
-
export default function BoardPage() {
|
|
18
|
-
const params = useParams();
|
|
19
|
-
const boardId = params.boardId as string;
|
|
20
|
-
|
|
21
|
-
const {
|
|
22
|
-
board,
|
|
23
|
-
error: boardError,
|
|
24
|
-
refresh: refreshBoard,
|
|
25
|
-
updateBoard,
|
|
26
|
-
} = useBoard(boardId);
|
|
27
|
-
|
|
28
|
-
// State for inline title editing
|
|
29
|
-
const [isEditingTitle, setIsEditingTitle] = React.useState(false);
|
|
30
|
-
const [editedTitle, setEditedTitle] = React.useState("");
|
|
31
|
-
const [titleError, setTitleError] = React.useState<string | null>(null);
|
|
32
|
-
const [isUpdatingTitle, setIsUpdatingTitle] = React.useState(false);
|
|
33
|
-
const titleInputRef = React.useRef<HTMLInputElement>(null);
|
|
34
|
-
|
|
35
|
-
// Fetch available generators
|
|
36
|
-
const {
|
|
37
|
-
generators,
|
|
38
|
-
loading: generatorsLoading,
|
|
39
|
-
error: generatorsError,
|
|
40
|
-
} = useGenerators();
|
|
41
|
-
|
|
42
|
-
// Use generation hook for submitting generations and real-time progress
|
|
43
|
-
const { submit, isGenerating, progress } = useGeneration();
|
|
44
|
-
|
|
45
|
-
// Auto-focus input when entering edit mode
|
|
46
|
-
React.useEffect(() => {
|
|
47
|
-
if (isEditingTitle && titleInputRef.current) {
|
|
48
|
-
titleInputRef.current.focus();
|
|
49
|
-
titleInputRef.current.select();
|
|
50
|
-
}
|
|
51
|
-
}, [isEditingTitle]);
|
|
52
|
-
|
|
53
|
-
// Handlers for title editing
|
|
54
|
-
const handleEditTitle = () => {
|
|
55
|
-
if (board) {
|
|
56
|
-
setEditedTitle(board.title);
|
|
57
|
-
setTitleError(null);
|
|
58
|
-
setIsEditingTitle(true);
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
const handleCancelEdit = () => {
|
|
63
|
-
setIsEditingTitle(false);
|
|
64
|
-
setEditedTitle("");
|
|
65
|
-
setTitleError(null);
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
const handleSaveTitle = async () => {
|
|
69
|
-
const trimmedTitle = editedTitle.trim();
|
|
70
|
-
|
|
71
|
-
// Validation
|
|
72
|
-
if (!trimmedTitle) {
|
|
73
|
-
setTitleError("Title cannot be empty");
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
if (trimmedTitle === board?.title) {
|
|
78
|
-
// No changes, just exit edit mode
|
|
79
|
-
handleCancelEdit();
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
setIsUpdatingTitle(true);
|
|
84
|
-
setTitleError(null);
|
|
85
|
-
|
|
86
|
-
try {
|
|
87
|
-
await updateBoard({ title: trimmedTitle });
|
|
88
|
-
setIsEditingTitle(false);
|
|
89
|
-
setEditedTitle("");
|
|
90
|
-
} catch (error) {
|
|
91
|
-
console.error("Failed to update board title:", error);
|
|
92
|
-
setTitleError(
|
|
93
|
-
error instanceof Error ? error.message : "Failed to update title"
|
|
94
|
-
);
|
|
95
|
-
} finally {
|
|
96
|
-
setIsUpdatingTitle(false);
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
const handleTitleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
|
|
101
|
-
if (e.key === "Enter") {
|
|
102
|
-
e.preventDefault();
|
|
103
|
-
handleSaveTitle();
|
|
104
|
-
} else if (e.key === "Escape") {
|
|
105
|
-
e.preventDefault();
|
|
106
|
-
handleCancelEdit();
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
// Refresh board when a generation completes or fails
|
|
111
|
-
// MUST be before conditional returns to satisfy Rules of Hooks
|
|
112
|
-
React.useEffect(() => {
|
|
113
|
-
if (
|
|
114
|
-
progress &&
|
|
115
|
-
(progress.status === "completed" || progress.status === "failed")
|
|
116
|
-
) {
|
|
117
|
-
refreshBoard();
|
|
118
|
-
}
|
|
119
|
-
}, [progress, refreshBoard]);
|
|
120
|
-
|
|
121
|
-
// Merge database generations with live progress for real-time updates
|
|
122
|
-
// MUST be before conditional returns to satisfy Rules of Hooks
|
|
123
|
-
const generations = React.useMemo(() => {
|
|
124
|
-
const dbGenerations = board?.generations || [];
|
|
125
|
-
|
|
126
|
-
// If we have live progress, update the matching generation's status
|
|
127
|
-
if (progress) {
|
|
128
|
-
return dbGenerations.map((gen) => {
|
|
129
|
-
if (gen.id === progress.jobId) {
|
|
130
|
-
// Map SSE status to GraphQL status format (lowercase to UPPERCASE)
|
|
131
|
-
const statusMap: Record<string, string> = {
|
|
132
|
-
queued: "PENDING",
|
|
133
|
-
processing: "PROCESSING",
|
|
134
|
-
completed: "COMPLETED",
|
|
135
|
-
failed: "FAILED",
|
|
136
|
-
cancelled: "CANCELLED",
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
return {
|
|
140
|
-
...gen,
|
|
141
|
-
status: statusMap[progress.status] || gen.status,
|
|
142
|
-
errorMessage:
|
|
143
|
-
progress.status === "failed"
|
|
144
|
-
? progress.message || "Generation failed"
|
|
145
|
-
: gen.errorMessage,
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
return gen;
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
return dbGenerations;
|
|
153
|
-
}, [board?.generations, progress]);
|
|
154
|
-
|
|
155
|
-
// Handle board error
|
|
156
|
-
if (boardError) {
|
|
157
|
-
console.error("[BoardPage] Board error:", boardError);
|
|
158
|
-
return (
|
|
159
|
-
<div className="flex items-center justify-center min-h-screen">
|
|
160
|
-
<div className="bg-destructive/10 border border-destructive/50 rounded-lg p-6 max-w-lg">
|
|
161
|
-
<h2 className="text-destructive text-xl font-semibold mb-2">
|
|
162
|
-
Error Loading Board
|
|
163
|
-
</h2>
|
|
164
|
-
<p className="text-destructive/90">{boardError.message}</p>
|
|
165
|
-
</div>
|
|
166
|
-
</div>
|
|
167
|
-
);
|
|
168
|
-
}
|
|
169
|
-
if (generatorsError) {
|
|
170
|
-
console.error("[BoardPage] Generators error:", generatorsError);
|
|
171
|
-
return (
|
|
172
|
-
<div className="flex items-center justify-center min-h-screen">
|
|
173
|
-
<div className="bg-destructive/10 border border-destructive/50 rounded-lg p-6 max-w-lg">
|
|
174
|
-
<h2 className="text-destructive text-xl font-semibold mb-2">
|
|
175
|
-
Error Loading Generators
|
|
176
|
-
</h2>
|
|
177
|
-
<p className="text-destructive/90">{generatorsError.message}</p>
|
|
178
|
-
</div>
|
|
179
|
-
</div>
|
|
180
|
-
);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
// Handle loading state
|
|
184
|
-
if (!board) {
|
|
185
|
-
return (
|
|
186
|
-
<div className="flex items-center justify-center min-h-screen">
|
|
187
|
-
<div className="animate-spin rounded-full h-12 w-12 border-b-2 border-primary"></div>
|
|
188
|
-
</div>
|
|
189
|
-
);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
// Filter completed generations that can be used as inputs
|
|
193
|
-
const availableArtifacts = generations.filter(
|
|
194
|
-
(gen) => gen.status === "COMPLETED" && gen.storageUrl
|
|
195
|
-
);
|
|
196
|
-
|
|
197
|
-
const handleGenerationSubmit = async (params: {
|
|
198
|
-
generatorName: string;
|
|
199
|
-
prompt: string;
|
|
200
|
-
artifacts: Map<string, unknown>;
|
|
201
|
-
settings: Record<string, unknown>;
|
|
202
|
-
}) => {
|
|
203
|
-
try {
|
|
204
|
-
// Find the selected generator to validate it exists
|
|
205
|
-
const selectedGenerator = generators.find(
|
|
206
|
-
(g) => g.name === params.generatorName
|
|
207
|
-
);
|
|
208
|
-
|
|
209
|
-
if (!selectedGenerator) {
|
|
210
|
-
throw new Error(`Generator ${params.generatorName} not found`);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
// Build inputs object with prompt and artifact references
|
|
214
|
-
const inputs: Record<string, unknown> = {
|
|
215
|
-
prompt: params.prompt,
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
// Add artifact inputs (convert artifact objects to their IDs)
|
|
219
|
-
params.artifacts.forEach((artifact, slotName) => {
|
|
220
|
-
if (artifact && typeof artifact === "object" && "id" in artifact) {
|
|
221
|
-
inputs[slotName] = artifact.id;
|
|
222
|
-
} else if (artifact) {
|
|
223
|
-
inputs[slotName] = artifact;
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
|
|
227
|
-
// Submit generation using the hook
|
|
228
|
-
// Provider is typically encoded in the generator name or use "default"
|
|
229
|
-
await submit({
|
|
230
|
-
boardId,
|
|
231
|
-
model: params.generatorName,
|
|
232
|
-
artifactType: selectedGenerator.artifactType,
|
|
233
|
-
inputs: inputs as { prompt: string; [key: string]: unknown },
|
|
234
|
-
options: params.settings,
|
|
235
|
-
});
|
|
236
|
-
} catch (error) {
|
|
237
|
-
console.error("Failed to create generation:", error);
|
|
238
|
-
}
|
|
239
|
-
};
|
|
240
|
-
|
|
241
|
-
return (
|
|
242
|
-
<GeneratorSelectionProvider>
|
|
243
|
-
<main className="min-h-screen bg-muted/30">
|
|
244
|
-
<div className="container mx-auto px-4 py-6 max-w-7xl">
|
|
245
|
-
{/* Header */}
|
|
246
|
-
<div className="mb-6 flex items-start justify-between">
|
|
247
|
-
<div className="flex-1">
|
|
248
|
-
{isEditingTitle ? (
|
|
249
|
-
<div className="space-y-2">
|
|
250
|
-
<div className="flex items-center gap-2">
|
|
251
|
-
<input
|
|
252
|
-
ref={titleInputRef}
|
|
253
|
-
type="text"
|
|
254
|
-
value={editedTitle}
|
|
255
|
-
onChange={(e) => setEditedTitle(e.target.value)}
|
|
256
|
-
onKeyDown={handleTitleKeyDown}
|
|
257
|
-
disabled={isUpdatingTitle}
|
|
258
|
-
className="text-3xl font-bold text-foreground border-2 border-border rounded px-2 py-1 focus:outline-none focus:border-primary disabled:opacity-50 disabled:cursor-not-allowed flex-1"
|
|
259
|
-
placeholder="Enter board title"
|
|
260
|
-
aria-label="Edit board title"
|
|
261
|
-
aria-invalid={!!titleError}
|
|
262
|
-
/>
|
|
263
|
-
<Button
|
|
264
|
-
onClick={handleSaveTitle}
|
|
265
|
-
disabled={isUpdatingTitle}
|
|
266
|
-
size="icon"
|
|
267
|
-
variant="default"
|
|
268
|
-
aria-label="Save title"
|
|
269
|
-
>
|
|
270
|
-
<Check className="h-4 w-4" />
|
|
271
|
-
</Button>
|
|
272
|
-
<Button
|
|
273
|
-
onClick={handleCancelEdit}
|
|
274
|
-
disabled={isUpdatingTitle}
|
|
275
|
-
size="icon"
|
|
276
|
-
variant="outline"
|
|
277
|
-
aria-label="Cancel editing"
|
|
278
|
-
>
|
|
279
|
-
<X className="h-4 w-4" />
|
|
280
|
-
</Button>
|
|
281
|
-
</div>
|
|
282
|
-
{titleError && (
|
|
283
|
-
<p className="text-sm text-destructive" role="alert">
|
|
284
|
-
{titleError}
|
|
285
|
-
</p>
|
|
286
|
-
)}
|
|
287
|
-
</div>
|
|
288
|
-
) : (
|
|
289
|
-
<div className="flex items-center gap-2">
|
|
290
|
-
<h1 className="text-3xl font-bold text-foreground">
|
|
291
|
-
{board.title}
|
|
292
|
-
</h1>
|
|
293
|
-
<Button
|
|
294
|
-
onClick={handleEditTitle}
|
|
295
|
-
size="icon"
|
|
296
|
-
variant="ghost"
|
|
297
|
-
className="h-8 w-8"
|
|
298
|
-
aria-label="Edit board title"
|
|
299
|
-
>
|
|
300
|
-
<Pencil className="h-4 w-4" />
|
|
301
|
-
</Button>
|
|
302
|
-
</div>
|
|
303
|
-
)}
|
|
304
|
-
{board.description && !isEditingTitle && (
|
|
305
|
-
<p className="text-muted-foreground mt-2">
|
|
306
|
-
{board.description}
|
|
307
|
-
</p>
|
|
308
|
-
)}
|
|
309
|
-
</div>
|
|
310
|
-
<UploadArtifact
|
|
311
|
-
boardId={boardId}
|
|
312
|
-
onUploadComplete={() => {
|
|
313
|
-
refreshBoard();
|
|
314
|
-
}}
|
|
315
|
-
/>
|
|
316
|
-
</div>
|
|
317
|
-
|
|
318
|
-
{/* Generation Grid */}
|
|
319
|
-
<div className="mb-8">
|
|
320
|
-
<GenerationGrid
|
|
321
|
-
generations={generations}
|
|
322
|
-
boardId={boardId}
|
|
323
|
-
onGenerationClick={() => {
|
|
324
|
-
// TODO: Open generation detail modal
|
|
325
|
-
}}
|
|
326
|
-
onRemoveSuccess={refreshBoard}
|
|
327
|
-
/>
|
|
328
|
-
</div>
|
|
329
|
-
|
|
330
|
-
{/* Generation Input */}
|
|
331
|
-
<div id="generation-input" className="sticky bottom-6 z-10">
|
|
332
|
-
{generatorsLoading ? (
|
|
333
|
-
<div className="bg-background rounded-lg shadow-lg p-6 text-center">
|
|
334
|
-
<p className="text-muted-foreground">Loading generators...</p>
|
|
335
|
-
</div>
|
|
336
|
-
) : generators.length === 0 ? (
|
|
337
|
-
<div className="bg-background rounded-lg shadow-lg p-6 text-center">
|
|
338
|
-
<p className="text-muted-foreground">No generators available</p>
|
|
339
|
-
</div>
|
|
340
|
-
) : (
|
|
341
|
-
<GenerationInput
|
|
342
|
-
generators={generators}
|
|
343
|
-
availableArtifacts={availableArtifacts}
|
|
344
|
-
onSubmit={handleGenerationSubmit}
|
|
345
|
-
isGenerating={isGenerating}
|
|
346
|
-
/>
|
|
347
|
-
)}
|
|
348
|
-
</div>
|
|
349
|
-
</div>
|
|
350
|
-
</main>
|
|
351
|
-
</GeneratorSelectionProvider>
|
|
352
|
-
);
|
|
353
|
-
}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
@import "tailwindcss";
|
|
2
|
-
@import "tw-animate-css";
|
|
3
|
-
|
|
4
|
-
@custom-variant dark (&:is(.dark *));
|
|
5
|
-
|
|
6
|
-
@theme inline {
|
|
7
|
-
--radius-sm: calc(var(--radius) - 4px);
|
|
8
|
-
--radius-md: calc(var(--radius) - 2px);
|
|
9
|
-
--radius-lg: var(--radius);
|
|
10
|
-
--radius-xl: calc(var(--radius) + 4px);
|
|
11
|
-
--color-background: var(--background);
|
|
12
|
-
--color-foreground: var(--foreground);
|
|
13
|
-
--color-card: var(--card);
|
|
14
|
-
--color-card-foreground: var(--card-foreground);
|
|
15
|
-
--color-popover: var(--popover);
|
|
16
|
-
--color-popover-foreground: var(--popover-foreground);
|
|
17
|
-
--color-primary: var(--primary);
|
|
18
|
-
--color-primary-foreground: var(--primary-foreground);
|
|
19
|
-
--color-secondary: var(--secondary);
|
|
20
|
-
--color-secondary-foreground: var(--secondary-foreground);
|
|
21
|
-
--color-muted: var(--muted);
|
|
22
|
-
--color-muted-foreground: var(--muted-foreground);
|
|
23
|
-
--color-accent: var(--accent);
|
|
24
|
-
--color-accent-foreground: var(--accent-foreground);
|
|
25
|
-
--color-destructive: var(--destructive);
|
|
26
|
-
--color-success: var(--success);
|
|
27
|
-
--color-border: var(--border);
|
|
28
|
-
--color-input: var(--input);
|
|
29
|
-
--color-ring: var(--ring);
|
|
30
|
-
--color-chart-1: var(--chart-1);
|
|
31
|
-
--color-chart-2: var(--chart-2);
|
|
32
|
-
--color-chart-3: var(--chart-3);
|
|
33
|
-
--color-chart-4: var(--chart-4);
|
|
34
|
-
--color-chart-5: var(--chart-5);
|
|
35
|
-
--color-sidebar: var(--sidebar);
|
|
36
|
-
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
37
|
-
--color-sidebar-primary: var(--sidebar-primary);
|
|
38
|
-
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
39
|
-
--color-sidebar-accent: var(--sidebar-accent);
|
|
40
|
-
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
41
|
-
--color-sidebar-border: var(--sidebar-border);
|
|
42
|
-
--color-sidebar-ring: var(--sidebar-ring);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
:root {
|
|
46
|
-
--radius: 0.625rem;
|
|
47
|
-
--background: oklch(1 0 0);
|
|
48
|
-
--foreground: oklch(0.145 0 0);
|
|
49
|
-
--card: oklch(1 0 0);
|
|
50
|
-
--card-foreground: oklch(0.145 0 0);
|
|
51
|
-
--popover: oklch(1 0 0);
|
|
52
|
-
--popover-foreground: oklch(0.145 0 0);
|
|
53
|
-
--primary: oklch(0.205 0 0);
|
|
54
|
-
--primary-foreground: oklch(0.985 0 0);
|
|
55
|
-
--secondary: oklch(0.97 0 0);
|
|
56
|
-
--secondary-foreground: oklch(0.205 0 0);
|
|
57
|
-
--muted: oklch(0.97 0 0);
|
|
58
|
-
--muted-foreground: oklch(0.556 0 0);
|
|
59
|
-
--accent: oklch(0.97 0 0);
|
|
60
|
-
--accent-foreground: oklch(0.205 0 0);
|
|
61
|
-
--destructive: oklch(0.577 0.245 27.325);
|
|
62
|
-
--success: oklch(0.55 0.15 145);
|
|
63
|
-
--border: oklch(0.922 0 0);
|
|
64
|
-
--input: oklch(0.922 0 0);
|
|
65
|
-
--ring: oklch(0.708 0 0);
|
|
66
|
-
--chart-1: oklch(0.646 0.222 41.116);
|
|
67
|
-
--chart-2: oklch(0.6 0.118 184.704);
|
|
68
|
-
--chart-3: oklch(0.398 0.07 227.392);
|
|
69
|
-
--chart-4: oklch(0.828 0.189 84.429);
|
|
70
|
-
--chart-5: oklch(0.769 0.188 70.08);
|
|
71
|
-
--sidebar: oklch(0.985 0 0);
|
|
72
|
-
--sidebar-foreground: oklch(0.145 0 0);
|
|
73
|
-
--sidebar-primary: oklch(0.205 0 0);
|
|
74
|
-
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
75
|
-
--sidebar-accent: oklch(0.97 0 0);
|
|
76
|
-
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
77
|
-
--sidebar-border: oklch(0.922 0 0);
|
|
78
|
-
--sidebar-ring: oklch(0.708 0 0);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.dark {
|
|
82
|
-
--background: oklch(0.145 0 0);
|
|
83
|
-
--foreground: oklch(0.985 0 0);
|
|
84
|
-
--card: oklch(0.205 0 0);
|
|
85
|
-
--card-foreground: oklch(0.985 0 0);
|
|
86
|
-
--popover: oklch(0.205 0 0);
|
|
87
|
-
--popover-foreground: oklch(0.985 0 0);
|
|
88
|
-
--primary: oklch(0.922 0 0);
|
|
89
|
-
--primary-foreground: oklch(0.205 0 0);
|
|
90
|
-
--secondary: oklch(0.269 0 0);
|
|
91
|
-
--secondary-foreground: oklch(0.985 0 0);
|
|
92
|
-
--muted: oklch(0.269 0 0);
|
|
93
|
-
--muted-foreground: oklch(0.708 0 0);
|
|
94
|
-
--accent: oklch(0.269 0 0);
|
|
95
|
-
--accent-foreground: oklch(0.985 0 0);
|
|
96
|
-
--destructive: oklch(0.704 0.191 22.216);
|
|
97
|
-
--success: oklch(0.70 0.15 145);
|
|
98
|
-
--border: oklch(1 0 0 / 10%);
|
|
99
|
-
--input: oklch(1 0 0 / 15%);
|
|
100
|
-
--ring: oklch(0.556 0 0);
|
|
101
|
-
--chart-1: oklch(0.488 0.243 264.376);
|
|
102
|
-
--chart-2: oklch(0.696 0.17 162.48);
|
|
103
|
-
--chart-3: oklch(0.769 0.188 70.08);
|
|
104
|
-
--chart-4: oklch(0.627 0.265 303.9);
|
|
105
|
-
--chart-5: oklch(0.645 0.246 16.439);
|
|
106
|
-
--sidebar: oklch(0.205 0 0);
|
|
107
|
-
--sidebar-foreground: oklch(0.985 0 0);
|
|
108
|
-
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
109
|
-
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
110
|
-
--sidebar-accent: oklch(0.269 0 0);
|
|
111
|
-
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
112
|
-
--sidebar-border: oklch(1 0 0 / 10%);
|
|
113
|
-
--sidebar-ring: oklch(0.556 0 0);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
@layer base {
|
|
117
|
-
* {
|
|
118
|
-
@apply border-border outline-ring/50;
|
|
119
|
-
}
|
|
120
|
-
body {
|
|
121
|
-
@apply bg-background text-foreground;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./globals.css";
|
|
3
|
-
import { Providers } from "./providers";
|
|
4
|
-
import { Header } from "@/components/header";
|
|
5
|
-
import { Toaster } from "@/components/ui/toaster";
|
|
6
|
-
import { ThemeProvider } from "@/components/theme-provider";
|
|
7
|
-
|
|
8
|
-
export default function RootLayout({
|
|
9
|
-
children,
|
|
10
|
-
}: {
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
}) {
|
|
13
|
-
return (
|
|
14
|
-
<html lang="en" suppressHydrationWarning>
|
|
15
|
-
<body>
|
|
16
|
-
<ThemeProvider
|
|
17
|
-
attribute="class"
|
|
18
|
-
defaultTheme="system"
|
|
19
|
-
enableSystem
|
|
20
|
-
disableTransitionOnChange
|
|
21
|
-
>
|
|
22
|
-
<Providers>
|
|
23
|
-
<Header />
|
|
24
|
-
{children}
|
|
25
|
-
<Toaster />
|
|
26
|
-
</Providers>
|
|
27
|
-
</ThemeProvider>
|
|
28
|
-
</body>
|
|
29
|
-
</html>
|
|
30
|
-
);
|
|
31
|
-
}
|