vibefast-cli 1.3.0 → 1.3.1
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/README.md +30 -95
- package/dist/__tests__/recipes.test.js +8 -9
- package/dist/__tests__/recipes.test.js.map +1 -1
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +271 -125
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/checklist.d.ts.map +1 -1
- package/dist/commands/checklist.js +85 -44
- package/dist/commands/checklist.js.map +1 -1
- package/dist/commands/health.d.ts.map +1 -1
- package/dist/commands/health.js +13 -4
- package/dist/commands/health.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +118 -26
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/migrate.d.ts +3 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/migrate.js +202 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/remove.d.ts.map +1 -1
- package/dist/commands/remove.js +61 -3
- package/dist/commands/remove.js.map +1 -1
- package/dist/core/auth.d.ts.map +1 -1
- package/dist/core/auth.js +20 -18
- package/dist/core/auth.js.map +1 -1
- package/dist/core/codemod.d.ts +33 -0
- package/dist/core/codemod.d.ts.map +1 -1
- package/dist/core/codemod.js +116 -0
- package/dist/core/codemod.js.map +1 -1
- package/dist/core/detect.d.ts.map +1 -1
- package/dist/core/detect.js +24 -7
- package/dist/core/detect.js.map +1 -1
- package/dist/core/journal.d.ts +1 -0
- package/dist/core/journal.d.ts.map +1 -1
- package/dist/core/journal.js.map +1 -1
- package/dist/core/recipes.d.ts.map +1 -1
- package/dist/core/recipes.js +25 -7
- package/dist/core/recipes.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/docs/architecture.md +50 -0
- package/docs/commands.md +78 -0
- package/docs/contributing.md +27 -0
- package/docs/quickstart.md +50 -0
- package/docs/recipes.md +57 -0
- package/docs/troubleshooting.md +31 -0
- package/package.json +2 -2
- package/recipes/0/apps/native/src/components/advanced-ui/timeline/demo.tsx +445 -0
- package/recipes/0/apps/native/src/components/advanced-ui/timeline/timeline-view.tsx +355 -0
- package/recipes/0/apps/native/src/components/advanced-ui/timeline/types.ts +31 -0
- package/recipes/0/recipe.json +18 -0
- package/recipes/animated-chip/apps/native/src/components/advanced-ui/chip/demo.tsx +2 -1
- package/recipes/animated-chip/recipe.json +5 -2
- package/recipes/animated-chip-native@latest.zip +0 -0
- package/recipes/animated-chip@latest.zip +0 -0
- package/recipes/animated-switch/apps/native/src/components/advanced-ui/switch/demo.tsx +1 -1
- package/recipes/animated-switch/recipe.json +5 -2
- package/recipes/animated-switch-native@latest.zip +0 -0
- package/recipes/animated-switch@latest.zip +0 -0
- package/recipes/audio-recorder/apps/native/src/features/audio-recorder/components/audio-recorder.tsx +2 -1
- package/recipes/audio-recorder/apps/native/src/features/audio-recorder/demo/with-recording-list-demo.tsx +2 -2
- package/recipes/audio-recorder/recipe.json +7 -2
- package/recipes/audio-recorder-native@latest.zip +0 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/components/audio-recorder.tsx +2 -1
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/demo/with-recording-list-demo.tsx +2 -1
- package/recipes/audio-recorder-supabase/recipe.json +12 -33
- package/recipes/audio-recorder-supabase-native@latest.zip +0 -0
- package/recipes/audio-recorder-supabase@latest.zip +0 -0
- package/recipes/audio-recorder@latest.zip +0 -0
- package/recipes/charts/apps/native/src/app/charts/index.tsx +3 -0
- package/recipes/charts/apps/native/src/features/charts/components/bar-chart.tsx +3 -1
- package/recipes/charts/apps/native/src/features/charts/components/candlestick-chart.tsx +3 -1
- package/recipes/charts/apps/native/src/features/charts/components/column-chart.tsx +3 -1
- package/recipes/charts/apps/native/src/features/charts/components/doughnut-chart.tsx +3 -1
- package/recipes/charts/apps/native/src/features/charts/components/line-chart.tsx +3 -1
- package/recipes/charts/apps/native/src/features/charts/components/radar-chart.tsx +3 -1
- package/recipes/charts/apps/native/src/features/charts/components/stacked-bar-chart.tsx +3 -1
- package/recipes/charts/recipe.json +13 -4
- package/recipes/charts-native@latest.zip +0 -0
- package/recipes/charts@latest.zip +0 -0
- package/recipes/chatbot/apps/native/src/features/chatbot/components/chat-markdown.tsx +86 -86
- package/recipes/chatbot/apps/native/src/features/chatbot/components/markdown/code-block.tsx +4 -4
- package/recipes/chatbot/recipe.json +3 -40
- package/recipes/chatbot-native@latest.zip +0 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/chat-markdown.tsx +4 -1
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/markdown/code-block.tsx +86 -53
- package/recipes/chatbot-supabase/recipe.json +3 -69
- package/recipes/chatbot-supabase-native@latest.zip +0 -0
- package/recipes/chatbot-supabase@latest.zip +0 -0
- package/recipes/chatbot@latest.zip +0 -0
- package/recipes/glowing-button/recipe.json +6 -2
- package/recipes/glowing-button-native@latest.zip +0 -0
- package/recipes/glowing-button@latest.zip +0 -0
- package/recipes/image-analysis/apps/native/src/app/analysis/[type]/_layout.tsx +5 -0
- package/recipes/image-analysis/apps/native/src/app/analysis/[type]/analysis-options.tsx +50 -0
- package/recipes/image-analysis/apps/native/src/app/analysis/[type]/camera.tsx +2 -0
- package/recipes/image-analysis/apps/native/src/app/analysis/[type]/index.tsx +50 -0
- package/recipes/image-analysis/apps/native/src/app/analysis/[type]/loading.tsx +50 -0
- package/recipes/image-analysis/apps/native/src/app/analysis/[type]/results.tsx +2 -0
- package/recipes/image-analysis/apps/native/src/app/analysis/[type]/trait-details.tsx +3 -0
- package/recipes/image-analysis/apps/native/src/features/image-analyzer/app/analysis-options-screen.tsx +2 -2
- package/recipes/image-analysis/apps/native/src/features/image-analyzer/app/camera.tsx +72 -65
- package/recipes/image-analysis/apps/native/src/features/image-analyzer/app/image-capture-screen.tsx +65 -47
- package/recipes/image-analysis/apps/native/src/features/image-analyzer/app/loading-screen.tsx +43 -2
- package/recipes/image-analysis/apps/native/src/features/image-analyzer/app/loading.tsx +34 -1
- package/recipes/image-analysis/apps/native/src/features/image-analyzer/hooks/use-image-analysis.ts +83 -2
- package/recipes/image-analysis/recipe.json +11 -19
- package/recipes/image-analysis-native@latest.zip +0 -0
- package/recipes/image-analysis-supabase/apps/native/src/app/analysis/[type]/_layout.tsx +5 -0
- package/recipes/image-analysis-supabase/apps/native/src/app/analysis/[type]/analysis-options.tsx +50 -0
- package/recipes/image-analysis-supabase/apps/native/src/app/analysis/[type]/camera.tsx +2 -0
- package/recipes/image-analysis-supabase/apps/native/src/app/analysis/[type]/index.tsx +50 -0
- package/recipes/image-analysis-supabase/apps/native/src/app/analysis/[type]/loading.tsx +50 -0
- package/recipes/image-analysis-supabase/apps/native/src/app/analysis/[type]/results.tsx +2 -0
- package/recipes/image-analysis-supabase/apps/native/src/app/analysis/[type]/trait-details.tsx +3 -0
- package/recipes/image-analysis-supabase/recipe.json +10 -70
- package/recipes/image-analysis-supabase-native@latest.zip +0 -0
- package/recipes/image-analysis-supabase@latest.zip +0 -0
- package/recipes/image-analysis@latest.zip +0 -0
- package/recipes/image-analyzer/apps/native/src/app/(root)/(protected)/image-analyzer/index.tsx +2 -0
- package/recipes/image-generator/apps/native/src/app/image-generator/gallery.tsx +3 -0
- package/recipes/image-generator/apps/native/src/app/image-generator/index.tsx +3 -0
- package/recipes/image-generator/recipe.json +8 -18
- package/recipes/image-generator-native@latest.zip +0 -0
- package/recipes/image-generator-supabase/recipe.json +6 -62
- package/recipes/image-generator-supabase-native@latest.zip +0 -0
- package/recipes/image-generator-supabase@latest.zip +0 -0
- package/recipes/image-generator@latest.zip +0 -0
- package/recipes/ios-widget/recipe.json +18 -119
- package/recipes/ios-widget-native@latest.zip +0 -0
- package/recipes/ios-widget@latest.zip +0 -0
- package/recipes/number-stepper/apps/native/src/components/advanced-ui/stepper/demo.tsx +1 -1
- package/recipes/number-stepper/recipe.json +5 -2
- package/recipes/number-stepper-native@latest.zip +0 -0
- package/recipes/number-stepper@latest.zip +0 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/interactive-onboarding.tsx +11 -18
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/ai-tone-step.tsx +5 -7
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/currency-step.tsx +9 -7
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-ai-step.tsx +8 -7
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-chatbot-step.tsx +6 -5
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-manual-step.tsx +4 -3
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-scan-step.tsx +6 -5
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/main-reason-step.tsx +5 -7
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/notification-step.tsx +7 -6
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/overspend-step.tsx +5 -7
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/personalizing-step.tsx +8 -7
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/rating-step.tsx +6 -5
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/reminder-step.tsx +5 -6
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/safety-step.tsx +5 -4
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/struggle-step.tsx +5 -7
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/welcome-step.tsx +7 -6
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/ui/onboarding-header.tsx +4 -3
- package/recipes/onboarding/recipe.json +9 -6
- package/recipes/onboarding-native@latest.zip +0 -0
- package/recipes/onboarding@latest.zip +0 -0
- package/recipes/payments/apps/native/src/app/paywall/index.tsx +74 -0
- package/recipes/payments/apps/native/src/app/paywall/local.tsx +25 -0
- package/recipes/payments/apps/native/src/app/paywall/remote.tsx +23 -0
- package/recipes/payments/packages/backend/convex/payments.ts +21 -3
- package/recipes/payments/recipe.json +14 -34
- package/recipes/payments-native@latest.zip +0 -0
- package/recipes/payments-supabase/apps/native/src/app/paywall/index.tsx +74 -0
- package/recipes/payments-supabase/apps/native/src/app/paywall/local.tsx +25 -0
- package/recipes/payments-supabase/apps/native/src/app/paywall/remote.tsx +23 -0
- package/recipes/payments-supabase/recipe.json +16 -44
- package/recipes/payments-supabase-native@latest.zip +0 -0
- package/recipes/payments-supabase@latest.zip +0 -0
- package/recipes/payments@latest.zip +0 -0
- package/recipes/posthog/apps/native/src/components/analytics/navigation-tracker.tsx +14 -0
- package/recipes/posthog/apps/native/src/lib/hooks/use-navigation-analytics.ts +44 -0
- package/recipes/posthog/apps/native/src/providers/posthog-provider.tsx +51 -0
- package/recipes/posthog/recipe.json +60 -0
- package/recipes/posthog-native@latest.zip +0 -0
- package/recipes/progress-circle/apps/native/src/components/advanced-ui/progress-bars/progress-circle-page.tsx +1 -1
- package/recipes/progress-circle/recipe.json +5 -2
- package/recipes/progress-circle-native@latest.zip +0 -0
- package/recipes/progress-circle@latest.zip +0 -0
- package/recipes/quiz/apps/native/src/app/quiz/index.tsx +47 -0
- package/recipes/quiz/recipe.json +9 -6
- package/recipes/quiz-native@latest.zip +0 -0
- package/recipes/quiz@latest.zip +0 -0
- package/recipes/screen-kits/apps/native/src/app/screen-kits/_layout.tsx +12 -0
- package/recipes/screen-kits/apps/native/src/app/screen-kits/index.tsx +114 -0
- package/recipes/screen-kits/apps/native/src/features/screen-kits/index.ts +1 -0
- package/recipes/screen-kits/apps/native/src/features/screen-kits/types.ts +28 -0
- package/recipes/screen-kits/recipe.json +26 -0
- package/recipes/screen-kits-duolingo/apps/native/src/app/screen-kits/duolingo/_layout.tsx +12 -0
- package/recipes/screen-kits-duolingo/apps/native/src/app/screen-kits/duolingo/home.tsx +5 -0
- package/recipes/screen-kits-duolingo/apps/native/src/app/screen-kits/duolingo/index.tsx +5 -0
- package/recipes/screen-kits-duolingo/apps/native/src/app/screen-kits/duolingo/lesson-complete.tsx +5 -0
- package/recipes/screen-kits-duolingo/apps/native/src/app/screen-kits/duolingo/lesson-fail.tsx +5 -0
- package/recipes/screen-kits-duolingo/apps/native/src/app/screen-kits/duolingo/lesson.tsx +5 -0
- package/recipes/screen-kits-duolingo/apps/native/src/app/screen-kits/duolingo/skill-tree.tsx +5 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/components/duo-button.tsx +174 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/components/skill-button.tsx +186 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/components/xp-header.tsx +115 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/constants.ts +89 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/index.ts +3 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/screens/home-screen.tsx +225 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/screens/lesson-complete-screen.tsx +485 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/screens/lesson-fail-screen.tsx +105 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/screens/lesson-screen.tsx +384 -0
- package/recipes/screen-kits-duolingo/recipe.json +58 -0
- package/recipes/screen-kits-duolingo-native@latest.zip +0 -0
- package/recipes/screen-kits-finance/apps/native/src/app/screen-kits/finance/_layout.tsx +45 -0
- package/recipes/screen-kits-finance/apps/native/src/app/screen-kits/finance/asset-detail.tsx +3 -0
- package/recipes/screen-kits-finance/apps/native/src/app/screen-kits/finance/notifications.tsx +3 -0
- package/recipes/screen-kits-finance/apps/native/src/app/screen-kits/finance/receive.tsx +3 -0
- package/recipes/screen-kits-finance/apps/native/src/app/screen-kits/finance/send.tsx +3 -0
- package/recipes/screen-kits-finance/apps/native/src/app/screen-kits/finance/swap.tsx +3 -0
- package/recipes/screen-kits-finance/apps/native/src/app/screen-kits/finance/wallet.tsx +3 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/components/ActionButtons.tsx +78 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/components/AssetRow.tsx +94 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/components/BalanceCard.tsx +118 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/constants.ts +85 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/screens/asset-detail.tsx +378 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/screens/notifications.tsx +210 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/screens/receive-modal.tsx +317 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/screens/send-modal.tsx +420 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/screens/swap-modal.tsx +363 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/screens/wallet-dashboard.tsx +281 -0
- package/recipes/screen-kits-finance/recipe.json +46 -0
- package/recipes/screen-kits-finance-native@latest.zip +0 -0
- package/recipes/screen-kits-fitness/apps/native/assets/sounds/timer-beep.wav +0 -0
- package/recipes/screen-kits-fitness/apps/native/src/app/screen-kits/fitness/_layout.tsx +10 -0
- package/recipes/screen-kits-fitness/apps/native/src/app/screen-kits/fitness/index.tsx +6 -0
- package/recipes/screen-kits-fitness/apps/native/src/app/screen-kits/fitness/timer.tsx +3 -0
- package/recipes/screen-kits-fitness/apps/native/src/app/screen-kits/fitness/workout.tsx +3 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/components/timer-components.tsx +500 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/components/timer-settings-modal.tsx +352 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/components/workout-card.tsx +105 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/constants.ts +189 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/hooks/use-timer.ts +307 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/index.ts +1 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/screens/timer-screen.tsx +278 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/screens/workout-dashboard.tsx +350 -0
- package/recipes/screen-kits-fitness/recipe.json +63 -0
- package/recipes/screen-kits-fitness-native@latest.zip +0 -0
- package/recipes/screen-kits-habits/apps/native/src/app/screen-kits/productivity/habits.tsx +1 -0
- package/recipes/screen-kits-habits/apps/native/src/app/screen-kits/productivity/kanban.tsx +1 -0
- package/recipes/screen-kits-habits/apps/native/src/app/screen-kits/productivity/routes.ts +4 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/components/AddTaskModal.tsx +246 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/components/DraggableTaskCard.tsx +92 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/components/KanbanColumn.tsx +238 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/components/TaskCard.tsx +144 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/components/add-habit-modal.tsx +271 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/constants.ts +295 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/kanban-utils.ts +62 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/screens/habit-tracker.tsx +1160 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/screens/kanban-board.tsx +432 -0
- package/recipes/screen-kits-habits/recipe.json +52 -0
- package/recipes/screen-kits-habits-native@latest.zip +0 -0
- package/recipes/screen-kits-native@latest.zip +0 -0
- package/recipes/sentry/apps/native/src/providers/sentry-provider.tsx +64 -0
- package/recipes/sentry/recipe.json +39 -0
- package/recipes/sentry-native@latest.zip +0 -0
- package/recipes/swipe-slider/apps/native/src/components/advanced-ui/sliders/swipe-slider-page.tsx +1 -1
- package/recipes/swipe-slider/recipe.json +5 -2
- package/recipes/swipe-slider-native@latest.zip +0 -0
- package/recipes/swipe-slider@latest.zip +0 -0
- package/recipes/timeline/apps/native/src/components/advanced-ui/timeline/demo.tsx +2 -1
- package/recipes/timeline/recipe.json +5 -2
- package/recipes/timeline-native@latest.zip +0 -0
- package/recipes/timeline@latest.zip +0 -0
- package/recipes/tracker-app/apps/native/src/app/tracker-app/index.tsx +1 -0
- package/recipes/tracker-app/recipe.json +10 -7
- package/recipes/tracker-app-native@latest.zip +0 -0
- package/recipes/tracker-app@latest.zip +0 -0
- package/recipes/upload-all.sh +8 -31
- package/recipes/voice-bot/apps/native/src/app/voice-bot/index.tsx +56 -0
- package/recipes/voice-bot/recipe.json +31 -7
- package/recipes/voice-bot-native@latest.zip +0 -0
- package/recipes/voice-bot@latest.zip +0 -0
- package/recipes/wake-word/apps/native/src/app/{(root)/(protected)/test-wake-word.tsx → test-wake-word.tsx} +43 -4
- package/recipes/wake-word/recipe.json +16 -26
- package/recipes/wake-word-native@latest.zip +0 -0
- package/recipes/wake-word@latest.zip +0 -0
- package/scripts/create-advanced-ui-recipes.sh +46 -19
- package/scripts/create-recipes.mjs +471 -117
- package/scripts/package-recipes.mjs +76 -0
- package/scripts/publish-all.sh +6 -2
- package/CHANGELOG.md +0 -198
- package/docs/archive/AUTO-DETECT-DEPS.md +0 -607
- package/docs/archive/FINAL-PACKAGE-STRATEGY.md +0 -583
- package/docs/archive/FINAL-SIMPLE-PLAN.md +0 -487
- package/docs/archive/FINAL-STATUS.md +0 -144
- package/docs/archive/FLOW-DIAGRAM.md +0 -1629
- package/docs/archive/GOTCHAS-AND-RISKS.md +0 -801
- package/docs/archive/IMPLEMENTATION-PLAN.md +0 -1360
- package/docs/archive/PLAN.md +0 -453
- package/docs/archive/PRODUCTION-READINESS.md +0 -684
- package/docs/archive/PRODUCTION-TEST-RESULTS.md +0 -465
- package/docs/archive/SIMPLIFIED-PLAN.md +0 -578
- package/docs/archive/STATUS.md +0 -199
- package/docs/archive/SUCCESS.md +0 -259
- package/docs/archive/TEST-SUMMARY.md +0 -261
- package/docs/archive/TESTING-CHECKLIST.md +0 -450
- package/docs/archive/USER-MODIFICATIONS.md +0 -448
- package/docs/decisions.md +0 -55
- package/docs/manual-testing.md +0 -91
- package/docs/next-steps.md +0 -12
- package/recipes/README.md +0 -156
- package/recipes/audio-recorder-supabase/packages/backend/src/services/recordings.ts +0 -369
- package/recipes/chatbot/apps/native/src/api-client/chatbot.ts +0 -83
- package/recipes/chatbot/packages/backend/convex/agents.ts +0 -115
- package/recipes/chatbot/packages/backend/convex/tools/index.ts +0 -18
- package/recipes/chatbot/packages/backend/convex/tools/knowledgeRetrieval.ts +0 -97
- package/recipes/chatbot/packages/backend/convex/tools/tavilySearch.ts +0 -83
- package/recipes/chatbot/packages/backend/convex/tools/userProfile.ts +0 -72
- package/recipes/chatbot-supabase/apps/native/src/api-client/supabase/chatbot.ts +0 -515
- package/recipes/chatbot-supabase/packages/backend/src/services/conversations.ts +0 -243
- package/recipes/chatbot-supabase/packages/backend/src/services/messages.ts +0 -327
- package/recipes/image-analysis/apps/native/src/api-client/image-analyzer.ts +0 -62
- package/recipes/image-analysis-supabase/packages/backend/src/services/image-analyses.ts +0 -132
- package/recipes/image-generator/apps/native/src/api-client/image-generator.ts +0 -34
- package/recipes/payments/apps/native/src/api-client/payments.ts +0 -44
- package/recipes/payments-supabase/packages/backend/src/services/payments.ts +0 -201
- package/recipes/posthog.json +0 -47
- package/recipes/revenuecat.json +0 -43
- package/recipes/sentry.json +0 -47
- package/recipes/wake-word/apps/native/assets/vosk-model/README.md +0 -103
- package/recipes/wake-word/apps/native/scripts/download-vosk-model.mjs +0 -127
- /package/recipes/{audio-recorder/apps/native/src/app/(root)/(protected) → audio-recorder-supabase/apps/native/src/app}/audio-recorder/index.tsx +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/AppIntent.swift +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-20x20@1x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-20x20@2x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-20x20@3x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-29x29@1x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-29x29@2x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-29x29@3x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-40x40@1x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-40x40@2x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-40x40@3x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-60x60@2x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-60x60@3x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-76x76@1x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-76x76@2x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-83.5x83.5@2x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/CalorieTrackerWidget.swift +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/HabitTrackerWidget.swift +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Info.plist +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/WidgetLiveActivity.swift +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/expo-target.config.js +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/generated.entitlements +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/index.swift +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/widgets.swift +0 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
2
|
+
import { BlurView } from 'expo-blur';
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
|
+
import {
|
|
5
|
+
KeyboardAvoidingView,
|
|
6
|
+
Modal,
|
|
7
|
+
Platform,
|
|
8
|
+
Pressable,
|
|
9
|
+
ScrollView,
|
|
10
|
+
StyleSheet,
|
|
11
|
+
TextInput,
|
|
12
|
+
TouchableOpacity,
|
|
13
|
+
View,
|
|
14
|
+
} from 'react-native';
|
|
15
|
+
import Animated, { FadeInUp } from 'react-native-reanimated';
|
|
16
|
+
|
|
17
|
+
import { Text } from '@/components/ui';
|
|
18
|
+
import { useThemeConfig } from '@/lib/use-theme-config';
|
|
19
|
+
|
|
20
|
+
interface AddHabitModalProps {
|
|
21
|
+
visible: boolean;
|
|
22
|
+
onClose: () => void;
|
|
23
|
+
onAdd: (habit: { title: string; icon: string; color: string }) => void;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const COLORS = [
|
|
27
|
+
'#EF4444',
|
|
28
|
+
'#F59E0B',
|
|
29
|
+
'#FCD34D',
|
|
30
|
+
'#10B981',
|
|
31
|
+
'#3B82F6',
|
|
32
|
+
'#6366F1',
|
|
33
|
+
'#8B5CF6',
|
|
34
|
+
'#EC4899',
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
const ICONS = [
|
|
38
|
+
'book',
|
|
39
|
+
'nutrition',
|
|
40
|
+
'barbell',
|
|
41
|
+
'code-slash',
|
|
42
|
+
'water',
|
|
43
|
+
'medkit',
|
|
44
|
+
'bed',
|
|
45
|
+
'bicycle',
|
|
46
|
+
'walk',
|
|
47
|
+
'sunny',
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
export function AddHabitModal({ visible, onClose, onAdd }: AddHabitModalProps) {
|
|
51
|
+
const theme = useThemeConfig();
|
|
52
|
+
const [title, setTitle] = useState('');
|
|
53
|
+
const [selectedColor, setSelectedColor] = useState(COLORS[4]);
|
|
54
|
+
const [selectedIcon, setSelectedIcon] = useState(ICONS[0]);
|
|
55
|
+
|
|
56
|
+
const handleSave = () => {
|
|
57
|
+
if (!title.trim()) return;
|
|
58
|
+
onAdd({ title, icon: selectedIcon, color: selectedColor });
|
|
59
|
+
setTitle('');
|
|
60
|
+
onClose();
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<Modal
|
|
65
|
+
visible={visible}
|
|
66
|
+
transparent
|
|
67
|
+
animationType="fade"
|
|
68
|
+
onRequestClose={onClose}
|
|
69
|
+
>
|
|
70
|
+
<BlurView intensity={20} style={StyleSheet.absoluteFill} tint="dark">
|
|
71
|
+
<KeyboardAvoidingView
|
|
72
|
+
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
73
|
+
style={styles.container}
|
|
74
|
+
>
|
|
75
|
+
<Pressable style={styles.backdrop} onPress={onClose} />
|
|
76
|
+
|
|
77
|
+
<Animated.View
|
|
78
|
+
entering={FadeInUp.springify().damping(15)}
|
|
79
|
+
style={[
|
|
80
|
+
styles.modalContent,
|
|
81
|
+
{
|
|
82
|
+
backgroundColor: theme.colors.background,
|
|
83
|
+
borderColor: theme.colors.border,
|
|
84
|
+
},
|
|
85
|
+
]}
|
|
86
|
+
>
|
|
87
|
+
<View style={styles.header}>
|
|
88
|
+
<Text style={[styles.title, { color: theme.colors.foreground }]}>
|
|
89
|
+
New Habit
|
|
90
|
+
</Text>
|
|
91
|
+
<TouchableOpacity onPress={onClose} style={styles.closeButton}>
|
|
92
|
+
<Ionicons
|
|
93
|
+
name="close"
|
|
94
|
+
size={24}
|
|
95
|
+
color={theme.colors.mutedForeground}
|
|
96
|
+
/>
|
|
97
|
+
</TouchableOpacity>
|
|
98
|
+
</View>
|
|
99
|
+
|
|
100
|
+
<ScrollView showsVerticalScrollIndicator={false}>
|
|
101
|
+
<View style={styles.section}>
|
|
102
|
+
<Text
|
|
103
|
+
style={[
|
|
104
|
+
styles.label,
|
|
105
|
+
{ color: theme.colors.mutedForeground },
|
|
106
|
+
]}
|
|
107
|
+
>
|
|
108
|
+
NAME
|
|
109
|
+
</Text>
|
|
110
|
+
<TextInput
|
|
111
|
+
style={[
|
|
112
|
+
styles.input,
|
|
113
|
+
{
|
|
114
|
+
color: theme.colors.foreground,
|
|
115
|
+
backgroundColor: theme.colors.input,
|
|
116
|
+
borderColor: theme.colors.border,
|
|
117
|
+
},
|
|
118
|
+
]}
|
|
119
|
+
placeholder="e.g. Read 30 mins"
|
|
120
|
+
placeholderTextColor={theme.colors.mutedForeground}
|
|
121
|
+
value={title}
|
|
122
|
+
onChangeText={setTitle}
|
|
123
|
+
autoFocus
|
|
124
|
+
/>
|
|
125
|
+
</View>
|
|
126
|
+
|
|
127
|
+
<View style={styles.section}>
|
|
128
|
+
<Text
|
|
129
|
+
style={[
|
|
130
|
+
styles.label,
|
|
131
|
+
{ color: theme.colors.mutedForeground },
|
|
132
|
+
]}
|
|
133
|
+
>
|
|
134
|
+
COLOR
|
|
135
|
+
</Text>
|
|
136
|
+
<View style={styles.grid}>
|
|
137
|
+
{COLORS.map((c) => (
|
|
138
|
+
<TouchableOpacity
|
|
139
|
+
key={c}
|
|
140
|
+
onPress={() => setSelectedColor(c)}
|
|
141
|
+
style={[
|
|
142
|
+
styles.colorOption,
|
|
143
|
+
{ backgroundColor: c },
|
|
144
|
+
selectedColor === c && {
|
|
145
|
+
borderColor: theme.colors.foreground,
|
|
146
|
+
},
|
|
147
|
+
]}
|
|
148
|
+
>
|
|
149
|
+
{selectedColor === c && (
|
|
150
|
+
<Ionicons name="checkmark" size={16} color="white" />
|
|
151
|
+
)}
|
|
152
|
+
</TouchableOpacity>
|
|
153
|
+
))}
|
|
154
|
+
</View>
|
|
155
|
+
</View>
|
|
156
|
+
|
|
157
|
+
<View style={styles.section}>
|
|
158
|
+
<Text
|
|
159
|
+
style={[
|
|
160
|
+
styles.label,
|
|
161
|
+
{ color: theme.colors.mutedForeground },
|
|
162
|
+
]}
|
|
163
|
+
>
|
|
164
|
+
ICON
|
|
165
|
+
</Text>
|
|
166
|
+
<View style={styles.grid}>
|
|
167
|
+
{ICONS.map((icon) => (
|
|
168
|
+
<TouchableOpacity
|
|
169
|
+
key={icon}
|
|
170
|
+
onPress={() => setSelectedIcon(icon)}
|
|
171
|
+
style={[
|
|
172
|
+
styles.iconOption,
|
|
173
|
+
{
|
|
174
|
+
backgroundColor:
|
|
175
|
+
selectedIcon === icon
|
|
176
|
+
? selectedColor
|
|
177
|
+
: theme.colors.muted,
|
|
178
|
+
},
|
|
179
|
+
]}
|
|
180
|
+
>
|
|
181
|
+
<Ionicons
|
|
182
|
+
name={icon as any}
|
|
183
|
+
size={20}
|
|
184
|
+
color={
|
|
185
|
+
selectedIcon === icon
|
|
186
|
+
? '#FFF'
|
|
187
|
+
: theme.colors.mutedForeground
|
|
188
|
+
}
|
|
189
|
+
/>
|
|
190
|
+
</TouchableOpacity>
|
|
191
|
+
))}
|
|
192
|
+
</View>
|
|
193
|
+
</View>
|
|
194
|
+
|
|
195
|
+
<TouchableOpacity
|
|
196
|
+
onPress={handleSave}
|
|
197
|
+
style={[
|
|
198
|
+
styles.saveButton,
|
|
199
|
+
{
|
|
200
|
+
backgroundColor: title.trim()
|
|
201
|
+
? selectedColor
|
|
202
|
+
: theme.colors.muted,
|
|
203
|
+
},
|
|
204
|
+
]}
|
|
205
|
+
disabled={!title.trim()}
|
|
206
|
+
>
|
|
207
|
+
<Text style={styles.saveButtonText}>Create Habit</Text>
|
|
208
|
+
</TouchableOpacity>
|
|
209
|
+
</ScrollView>
|
|
210
|
+
</Animated.View>
|
|
211
|
+
</KeyboardAvoidingView>
|
|
212
|
+
</BlurView>
|
|
213
|
+
</Modal>
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const styles = StyleSheet.create({
|
|
218
|
+
container: { flex: 1, justifyContent: 'flex-end' },
|
|
219
|
+
backdrop: { ...StyleSheet.absoluteFillObject },
|
|
220
|
+
modalContent: {
|
|
221
|
+
borderTopLeftRadius: 32,
|
|
222
|
+
borderTopRightRadius: 32,
|
|
223
|
+
padding: 24,
|
|
224
|
+
paddingBottom: 40,
|
|
225
|
+
borderWidth: 1,
|
|
226
|
+
borderBottomWidth: 0,
|
|
227
|
+
maxHeight: '85%',
|
|
228
|
+
},
|
|
229
|
+
header: {
|
|
230
|
+
flexDirection: 'row',
|
|
231
|
+
justifyContent: 'space-between',
|
|
232
|
+
alignItems: 'center',
|
|
233
|
+
marginBottom: 24,
|
|
234
|
+
},
|
|
235
|
+
title: { fontSize: 24, fontWeight: '800' },
|
|
236
|
+
closeButton: { padding: 4 },
|
|
237
|
+
section: { marginBottom: 24 },
|
|
238
|
+
label: { fontSize: 12, fontWeight: '700', marginBottom: 12, opacity: 0.7 },
|
|
239
|
+
input: {
|
|
240
|
+
height: 56,
|
|
241
|
+
borderRadius: 16,
|
|
242
|
+
paddingHorizontal: 16,
|
|
243
|
+
fontSize: 16,
|
|
244
|
+
borderWidth: 1,
|
|
245
|
+
},
|
|
246
|
+
grid: { flexDirection: 'row', flexWrap: 'wrap', gap: 12 },
|
|
247
|
+
colorOption: {
|
|
248
|
+
width: 40,
|
|
249
|
+
height: 40,
|
|
250
|
+
borderRadius: 20,
|
|
251
|
+
alignItems: 'center',
|
|
252
|
+
justifyContent: 'center',
|
|
253
|
+
borderWidth: 2,
|
|
254
|
+
borderColor: 'transparent',
|
|
255
|
+
},
|
|
256
|
+
iconOption: {
|
|
257
|
+
width: 48,
|
|
258
|
+
height: 48,
|
|
259
|
+
borderRadius: 16,
|
|
260
|
+
alignItems: 'center',
|
|
261
|
+
justifyContent: 'center',
|
|
262
|
+
},
|
|
263
|
+
saveButton: {
|
|
264
|
+
height: 56,
|
|
265
|
+
borderRadius: 16,
|
|
266
|
+
alignItems: 'center',
|
|
267
|
+
justifyContent: 'center',
|
|
268
|
+
marginTop: 8,
|
|
269
|
+
},
|
|
270
|
+
saveButtonText: { color: '#FFF', fontSize: 16, fontWeight: '700' },
|
|
271
|
+
});
|
package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/constants.ts
ADDED
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Priority levels for kanban tasks.
|
|
3
|
+
*/
|
|
4
|
+
export const PRIORITY_LEVELS = {
|
|
5
|
+
low: 'low',
|
|
6
|
+
medium: 'medium',
|
|
7
|
+
high: 'high',
|
|
8
|
+
} as const;
|
|
9
|
+
|
|
10
|
+
export type Priority = (typeof PRIORITY_LEVELS)[keyof typeof PRIORITY_LEVELS];
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Priority configuration with colors.
|
|
14
|
+
*/
|
|
15
|
+
export const PRIORITY_CONFIG: Record<Priority, { label: string; bgLight: string; bgDark: string; textLight: string; textDark: string }> = {
|
|
16
|
+
low: {
|
|
17
|
+
label: 'Low',
|
|
18
|
+
bgLight: '#dbeafe',
|
|
19
|
+
bgDark: '#1e3a5f',
|
|
20
|
+
textLight: '#1d4ed8',
|
|
21
|
+
textDark: '#93c5fd',
|
|
22
|
+
},
|
|
23
|
+
medium: {
|
|
24
|
+
label: 'Medium',
|
|
25
|
+
bgLight: '#fef3c7',
|
|
26
|
+
bgDark: '#78350f',
|
|
27
|
+
textLight: '#b45309',
|
|
28
|
+
textDark: '#fcd34d',
|
|
29
|
+
},
|
|
30
|
+
high: {
|
|
31
|
+
label: 'High',
|
|
32
|
+
bgLight: '#fee2e2',
|
|
33
|
+
bgDark: '#7f1d1d',
|
|
34
|
+
textLight: '#dc2626',
|
|
35
|
+
textDark: '#fca5a5',
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Theme colors for productivity screen kits - semantic approach.
|
|
41
|
+
*/
|
|
42
|
+
export const PRODUCTIVITY_COLORS = {
|
|
43
|
+
// Light theme
|
|
44
|
+
light: {
|
|
45
|
+
background: '#ffffff',
|
|
46
|
+
card: '#ffffff',
|
|
47
|
+
cardBorder: '#e5e7eb',
|
|
48
|
+
text: '#18181b',
|
|
49
|
+
textMuted: '#71717a',
|
|
50
|
+
textSecondary: '#52525b',
|
|
51
|
+
columnBg: '#f4f4f5',
|
|
52
|
+
columnBorder: '#e4e4e7',
|
|
53
|
+
dropzone: '#f0f9ff',
|
|
54
|
+
dropzoneBorder: '#bae6fd',
|
|
55
|
+
accent: '#3b82f6',
|
|
56
|
+
shadow: 'rgba(0, 0, 0, 0.08)',
|
|
57
|
+
},
|
|
58
|
+
// Dark theme
|
|
59
|
+
dark: {
|
|
60
|
+
background: '#0a0a0a',
|
|
61
|
+
card: '#171717',
|
|
62
|
+
cardBorder: '#262626',
|
|
63
|
+
text: '#fafafa',
|
|
64
|
+
textMuted: '#a1a1aa',
|
|
65
|
+
textSecondary: '#d4d4d8',
|
|
66
|
+
columnBg: '#171717',
|
|
67
|
+
columnBorder: '#262626',
|
|
68
|
+
dropzone: '#172554',
|
|
69
|
+
dropzoneBorder: '#1e40af',
|
|
70
|
+
accent: '#60a5fa',
|
|
71
|
+
shadow: 'rgba(0, 0, 0, 0.4)',
|
|
72
|
+
},
|
|
73
|
+
// Status colors (same for both themes)
|
|
74
|
+
todo: '#fbbf24',
|
|
75
|
+
doing: '#22c55e',
|
|
76
|
+
done: '#3b82f6',
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export const MOCK_PROJECTS = [
|
|
80
|
+
{ id: 'p1', title: 'Website Redesign', progress: 0.75 },
|
|
81
|
+
{ id: 'p2', title: 'Mobile App', progress: 0.4 },
|
|
82
|
+
];
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Supported kanban statuses.
|
|
86
|
+
*/
|
|
87
|
+
export const KANBAN_STATUSES = {
|
|
88
|
+
todo: 'todo',
|
|
89
|
+
doing: 'doing',
|
|
90
|
+
done: 'done',
|
|
91
|
+
} as const;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Kanban task status union.
|
|
95
|
+
*/
|
|
96
|
+
export type KanbanStatus = (typeof KANBAN_STATUSES)[keyof typeof KANBAN_STATUSES];
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Kanban task model used in screen kits.
|
|
100
|
+
*/
|
|
101
|
+
export type KanbanTask = {
|
|
102
|
+
id: string;
|
|
103
|
+
title: string;
|
|
104
|
+
tag: string;
|
|
105
|
+
status: KanbanStatus;
|
|
106
|
+
priority: Priority;
|
|
107
|
+
members: string[];
|
|
108
|
+
comments: number;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Kanban column definition for rendering.
|
|
113
|
+
*/
|
|
114
|
+
export type KanbanColumnDefinition = {
|
|
115
|
+
title: string;
|
|
116
|
+
status: KanbanStatus;
|
|
117
|
+
icon: string;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Kanban columns mapped by status.
|
|
122
|
+
*/
|
|
123
|
+
export type KanbanColumns = Record<KanbanStatus, KanbanTask[]>;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Column metadata for the kanban board.
|
|
127
|
+
*/
|
|
128
|
+
export const KANBAN_COLUMNS: KanbanColumnDefinition[] = [
|
|
129
|
+
{ title: 'To Do', status: KANBAN_STATUSES.todo, icon: 'ellipse-outline' },
|
|
130
|
+
{ title: 'In Progress', status: KANBAN_STATUSES.doing, icon: 'time-outline' },
|
|
131
|
+
{ title: 'Done', status: KANBAN_STATUSES.done, icon: 'checkmark-circle-outline' },
|
|
132
|
+
];
|
|
133
|
+
|
|
134
|
+
export const MOCK_TASKS: KanbanTask[] = [
|
|
135
|
+
{
|
|
136
|
+
id: 't1',
|
|
137
|
+
title: 'Design System',
|
|
138
|
+
tag: 'Design',
|
|
139
|
+
status: KANBAN_STATUSES.doing,
|
|
140
|
+
priority: PRIORITY_LEVELS.high,
|
|
141
|
+
members: ['A', 'B'],
|
|
142
|
+
comments: 3,
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
id: 't2',
|
|
146
|
+
title: 'User Research',
|
|
147
|
+
tag: 'Research',
|
|
148
|
+
status: KANBAN_STATUSES.done,
|
|
149
|
+
priority: PRIORITY_LEVELS.medium,
|
|
150
|
+
members: ['C'],
|
|
151
|
+
comments: 5,
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
id: 't3',
|
|
155
|
+
title: 'Authentication',
|
|
156
|
+
tag: 'Backend',
|
|
157
|
+
status: KANBAN_STATUSES.todo,
|
|
158
|
+
priority: PRIORITY_LEVELS.high,
|
|
159
|
+
members: ['A'],
|
|
160
|
+
comments: 0,
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
id: 't4',
|
|
164
|
+
title: 'API Integration',
|
|
165
|
+
tag: 'Frontend',
|
|
166
|
+
status: KANBAN_STATUSES.todo,
|
|
167
|
+
priority: PRIORITY_LEVELS.medium,
|
|
168
|
+
members: ['B', 'D'],
|
|
169
|
+
comments: 8,
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
id: 't5',
|
|
173
|
+
title: 'Accessibility Audit',
|
|
174
|
+
tag: 'QA',
|
|
175
|
+
status: KANBAN_STATUSES.doing,
|
|
176
|
+
priority: PRIORITY_LEVELS.low,
|
|
177
|
+
members: ['C'],
|
|
178
|
+
comments: 2,
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
id: 't6',
|
|
182
|
+
title: 'Performance Review',
|
|
183
|
+
tag: 'DevOps',
|
|
184
|
+
status: KANBAN_STATUSES.todo,
|
|
185
|
+
priority: PRIORITY_LEVELS.low,
|
|
186
|
+
members: ['D'],
|
|
187
|
+
comments: 1,
|
|
188
|
+
},
|
|
189
|
+
];
|
|
190
|
+
|
|
191
|
+
// Heatmap gradient for habit completion (5 levels)
|
|
192
|
+
export const HEATMAP_COLORS = {
|
|
193
|
+
light: {
|
|
194
|
+
empty: '#E5E7EB',
|
|
195
|
+
level1: '#BBF7D0',
|
|
196
|
+
level2: '#86EFAC',
|
|
197
|
+
level3: '#4ADE80',
|
|
198
|
+
level4: '#22C55E',
|
|
199
|
+
},
|
|
200
|
+
dark: {
|
|
201
|
+
empty: '#374151',
|
|
202
|
+
level1: '#14532D',
|
|
203
|
+
level2: '#166534',
|
|
204
|
+
level3: '#15803D',
|
|
205
|
+
level4: '#22C55E',
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
export const STREAK_COLORS = {
|
|
210
|
+
fire: ['#FF6B00', '#FF8C00', '#FFD700'],
|
|
211
|
+
cold: '#6B7280',
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
export type Habit = {
|
|
215
|
+
id: string;
|
|
216
|
+
title: string;
|
|
217
|
+
streak: number;
|
|
218
|
+
bestStreak: number;
|
|
219
|
+
icon: string;
|
|
220
|
+
color: string;
|
|
221
|
+
weeklyData: boolean[];
|
|
222
|
+
monthlyData: number[];
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
const generateMonthlyData = (): number[] => {
|
|
226
|
+
const data: number[] = [];
|
|
227
|
+
for (let i = 0; i < 35; i++) {
|
|
228
|
+
data.push(Math.floor(Math.random() * 5));
|
|
229
|
+
}
|
|
230
|
+
return data;
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
const generateWeeklyData = (completedToday: boolean): boolean[] => {
|
|
234
|
+
const data: boolean[] = [];
|
|
235
|
+
for (let i = 0; i < 6; i++) {
|
|
236
|
+
data.push(Math.random() > 0.3);
|
|
237
|
+
}
|
|
238
|
+
data.push(completedToday);
|
|
239
|
+
return data;
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
export const MOCK_HABITS: Habit[] = [
|
|
243
|
+
{
|
|
244
|
+
id: 'h1',
|
|
245
|
+
title: 'Read 30 mins',
|
|
246
|
+
streak: 12,
|
|
247
|
+
bestStreak: 21,
|
|
248
|
+
icon: 'book',
|
|
249
|
+
color: '#8B5CF6',
|
|
250
|
+
weeklyData: generateWeeklyData(true),
|
|
251
|
+
monthlyData: generateMonthlyData(),
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
id: 'h2',
|
|
255
|
+
title: 'No Sugar',
|
|
256
|
+
streak: 5,
|
|
257
|
+
bestStreak: 14,
|
|
258
|
+
icon: 'nutrition',
|
|
259
|
+
color: '#F59E0B',
|
|
260
|
+
weeklyData: generateWeeklyData(false),
|
|
261
|
+
monthlyData: generateMonthlyData(),
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
id: 'h3',
|
|
265
|
+
title: 'Workout',
|
|
266
|
+
streak: 24,
|
|
267
|
+
bestStreak: 24,
|
|
268
|
+
icon: 'barbell',
|
|
269
|
+
color: '#EF4444',
|
|
270
|
+
weeklyData: generateWeeklyData(true),
|
|
271
|
+
monthlyData: generateMonthlyData(),
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
id: 'h4',
|
|
275
|
+
title: 'Code',
|
|
276
|
+
streak: 105,
|
|
277
|
+
bestStreak: 105,
|
|
278
|
+
icon: 'code-slash',
|
|
279
|
+
color: '#10B981',
|
|
280
|
+
weeklyData: generateWeeklyData(true),
|
|
281
|
+
monthlyData: generateMonthlyData(),
|
|
282
|
+
},
|
|
283
|
+
];
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Tag color configuration
|
|
287
|
+
*/
|
|
288
|
+
export const TAG_COLORS: Record<string, { bgLight: string; bgDark: string; textLight: string; textDark: string }> = {
|
|
289
|
+
Design: { bgLight: '#fae8ff', bgDark: '#581c87', textLight: '#a21caf', textDark: '#e879f9' },
|
|
290
|
+
Research: { bgLight: '#ccfbf1', bgDark: '#134e4a', textLight: '#0d9488', textDark: '#5eead4' },
|
|
291
|
+
Backend: { bgLight: '#fee2e2', bgDark: '#7f1d1d', textLight: '#dc2626', textDark: '#fca5a5' },
|
|
292
|
+
Frontend: { bgLight: '#dbeafe', bgDark: '#1e3a5f', textLight: '#2563eb', textDark: '#93c5fd' },
|
|
293
|
+
QA: { bgLight: '#fef3c7', bgDark: '#78350f', textLight: '#d97706', textDark: '#fcd34d' },
|
|
294
|
+
DevOps: { bgLight: '#d1fae5', bgDark: '#064e3b', textLight: '#059669', textDark: '#6ee7b7' },
|
|
295
|
+
};
|
package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/kanban-utils.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { KANBAN_STATUSES } from './constants';
|
|
2
|
+
import type { KanbanColumns, KanbanStatus, KanbanTask } from './constants';
|
|
3
|
+
|
|
4
|
+
const KANBAN_STATUS_LIST = Object.values(KANBAN_STATUSES) as KanbanStatus[];
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Build a column map from a flat list while preserving input order per column.
|
|
8
|
+
*/
|
|
9
|
+
export const buildKanbanColumns = (tasks: KanbanTask[]): KanbanColumns => {
|
|
10
|
+
return tasks.reduce<KanbanColumns>(
|
|
11
|
+
(acc, task) => {
|
|
12
|
+
acc[task.status].push(task);
|
|
13
|
+
return acc;
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
todo: [],
|
|
17
|
+
doing: [],
|
|
18
|
+
done: [],
|
|
19
|
+
},
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const clampIndex = (value: number, max: number): number => {
|
|
24
|
+
return Math.max(0, Math.min(value, max));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Move a task into a target column at a specific index.
|
|
29
|
+
*/
|
|
30
|
+
export const moveKanbanTask = (
|
|
31
|
+
columns: KanbanColumns,
|
|
32
|
+
taskId: string,
|
|
33
|
+
toStatus: KanbanStatus,
|
|
34
|
+
toIndex: number,
|
|
35
|
+
): KanbanColumns => {
|
|
36
|
+
const nextColumns: KanbanColumns = {
|
|
37
|
+
todo: [...columns.todo],
|
|
38
|
+
doing: [...columns.doing],
|
|
39
|
+
done: [...columns.done],
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
let movedTask: KanbanTask | null = null;
|
|
43
|
+
|
|
44
|
+
KANBAN_STATUS_LIST.forEach((status) => {
|
|
45
|
+
const index = nextColumns[status].findIndex((task) => task.id === taskId);
|
|
46
|
+
if (index === -1) return;
|
|
47
|
+
const [removed] = nextColumns[status].splice(index, 1);
|
|
48
|
+
movedTask = { ...removed, status: toStatus };
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
if (!movedTask) return columns;
|
|
52
|
+
|
|
53
|
+
const targetTasks = nextColumns[toStatus];
|
|
54
|
+
const safeIndex = clampIndex(toIndex, targetTasks.length);
|
|
55
|
+
nextColumns[toStatus] = [
|
|
56
|
+
...targetTasks.slice(0, safeIndex),
|
|
57
|
+
movedTask,
|
|
58
|
+
...targetTasks.slice(safeIndex),
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
return nextColumns;
|
|
62
|
+
};
|