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,384 @@
|
|
|
1
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
2
|
+
import { Stack, useLocalSearchParams, useRouter } from 'expo-router';
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
|
+
import { StyleSheet, TouchableOpacity, View } from 'react-native';
|
|
5
|
+
import Animated, {
|
|
6
|
+
FadeInDown,
|
|
7
|
+
Layout,
|
|
8
|
+
useAnimatedStyle,
|
|
9
|
+
useSharedValue,
|
|
10
|
+
withTiming,
|
|
11
|
+
ZoomIn,
|
|
12
|
+
} from 'react-native-reanimated';
|
|
13
|
+
import { useColorScheme } from 'react-native-css-interop';
|
|
14
|
+
|
|
15
|
+
import { SafeAreaView, Text } from '@/components/ui';
|
|
16
|
+
import { useThemeConfig } from '@/lib/use-theme-config';
|
|
17
|
+
|
|
18
|
+
import DuoButton from '../components/duo-button';
|
|
19
|
+
import { DUO_COLORS } from '../constants';
|
|
20
|
+
|
|
21
|
+
const QUESTIONS = [
|
|
22
|
+
{
|
|
23
|
+
id: 'q1',
|
|
24
|
+
question: 'Which one of these is "the apple"?',
|
|
25
|
+
correctId: '1',
|
|
26
|
+
options: [
|
|
27
|
+
{ id: '1', label: 'Apple', icon: 'nutrition' as const },
|
|
28
|
+
{ id: '2', label: 'Bread', icon: 'fast-food' as const },
|
|
29
|
+
{ id: '3', label: 'Egg', icon: 'egg' as const },
|
|
30
|
+
{ id: '4', label: 'Milk', icon: 'pint' as const },
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: 'q2',
|
|
35
|
+
question: 'Which one of these is "the bread"?',
|
|
36
|
+
correctId: '2',
|
|
37
|
+
options: [
|
|
38
|
+
{ id: '1', label: 'Egg', icon: 'egg' as const },
|
|
39
|
+
{ id: '2', label: 'Bread', icon: 'fast-food' as const },
|
|
40
|
+
{ id: '3', label: 'Apple', icon: 'nutrition' as const },
|
|
41
|
+
{ id: '4', label: 'Coffee', icon: 'cafe' as const },
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: 'q3',
|
|
46
|
+
question: 'Which one of these is "the milk"?',
|
|
47
|
+
correctId: '3',
|
|
48
|
+
options: [
|
|
49
|
+
{ id: '1', label: 'Apple', icon: 'nutrition' as const },
|
|
50
|
+
{ id: '2', label: 'Water', icon: 'water' as const },
|
|
51
|
+
{ id: '3', label: 'Milk', icon: 'pint' as const },
|
|
52
|
+
{ id: '4', label: 'Coffee', icon: 'cafe' as const },
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
export default function LessonScreen() {
|
|
58
|
+
const router = useRouter();
|
|
59
|
+
const { id } = useLocalSearchParams();
|
|
60
|
+
const theme = useThemeConfig();
|
|
61
|
+
const { colorScheme } = useColorScheme();
|
|
62
|
+
const isDark = colorScheme === 'dark';
|
|
63
|
+
|
|
64
|
+
const [currentIndex, setCurrentIndex] = useState(0);
|
|
65
|
+
const [hearts, setHearts] = useState(5);
|
|
66
|
+
const [selected, setSelected] = useState<string | null>(null);
|
|
67
|
+
const [status, setStatus] = useState<'idle' | 'correct' | 'wrong'>('idle');
|
|
68
|
+
const [correctCount, setCorrectCount] = useState(0);
|
|
69
|
+
|
|
70
|
+
const currentQuestion = QUESTIONS[currentIndex];
|
|
71
|
+
const progress = useSharedValue(0);
|
|
72
|
+
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
const p = currentIndex / QUESTIONS.length;
|
|
75
|
+
progress.value = withTiming(p, { duration: 500 });
|
|
76
|
+
}, [currentIndex]);
|
|
77
|
+
|
|
78
|
+
const progressStyle = useAnimatedStyle(() => ({
|
|
79
|
+
width: `${Math.max(progress.value * 100, 5)}%`,
|
|
80
|
+
}));
|
|
81
|
+
|
|
82
|
+
const handleCheck = () => {
|
|
83
|
+
if (!selected) return;
|
|
84
|
+
|
|
85
|
+
const isCorrect = selected === currentQuestion.correctId;
|
|
86
|
+
|
|
87
|
+
if (isCorrect) {
|
|
88
|
+
setStatus('correct');
|
|
89
|
+
setCorrectCount((prev) => prev + 1);
|
|
90
|
+
} else {
|
|
91
|
+
setStatus('wrong');
|
|
92
|
+
setHearts((prev) => Math.max(0, prev - 1));
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const handleContinue = () => {
|
|
97
|
+
if (status === 'correct') {
|
|
98
|
+
const nextIndex = currentIndex + 1;
|
|
99
|
+
if (nextIndex < QUESTIONS.length) {
|
|
100
|
+
setCurrentIndex(nextIndex);
|
|
101
|
+
setStatus('idle');
|
|
102
|
+
setSelected(null);
|
|
103
|
+
} else {
|
|
104
|
+
const accuracy = Math.round((correctCount / QUESTIONS.length) * 100);
|
|
105
|
+
const xp = correctCount * 10 + (hearts > 0 ? 5 : 0);
|
|
106
|
+
progress.value = withTiming(1, { duration: 500 });
|
|
107
|
+
setTimeout(() => {
|
|
108
|
+
router.push({
|
|
109
|
+
pathname: '/screen-kits/duolingo/lesson-complete',
|
|
110
|
+
params: { xp, accuracy, heartsLeft: hearts },
|
|
111
|
+
});
|
|
112
|
+
}, 500);
|
|
113
|
+
}
|
|
114
|
+
} else {
|
|
115
|
+
if (hearts === 0) {
|
|
116
|
+
router.push('/screen-kits/duolingo/lesson-fail');
|
|
117
|
+
} else {
|
|
118
|
+
const nextIndex = currentIndex + 1;
|
|
119
|
+
if (nextIndex < QUESTIONS.length) {
|
|
120
|
+
setCurrentIndex(nextIndex);
|
|
121
|
+
setStatus('idle');
|
|
122
|
+
setSelected(null);
|
|
123
|
+
} else {
|
|
124
|
+
const accuracy = Math.round((correctCount / QUESTIONS.length) * 100);
|
|
125
|
+
const xp = correctCount * 10;
|
|
126
|
+
router.push({
|
|
127
|
+
pathname: '/screen-kits/duolingo/lesson-complete',
|
|
128
|
+
params: { xp, accuracy, heartsLeft: hearts },
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
return (
|
|
136
|
+
<View
|
|
137
|
+
style={[styles.container, { backgroundColor: theme.colors.background }]}
|
|
138
|
+
>
|
|
139
|
+
<Stack.Screen options={{ headerShown: false }} />
|
|
140
|
+
|
|
141
|
+
{/* Header */}
|
|
142
|
+
<View style={styles.header}>
|
|
143
|
+
<TouchableOpacity onPress={() => router.back()}>
|
|
144
|
+
<Ionicons
|
|
145
|
+
name="close"
|
|
146
|
+
size={28}
|
|
147
|
+
color={theme.colors.mutedForeground}
|
|
148
|
+
/>
|
|
149
|
+
</TouchableOpacity>
|
|
150
|
+
<View
|
|
151
|
+
style={[styles.progressBar, { backgroundColor: theme.colors.muted }]}
|
|
152
|
+
>
|
|
153
|
+
<Animated.View
|
|
154
|
+
style={[
|
|
155
|
+
styles.progressFill,
|
|
156
|
+
{ backgroundColor: DUO_COLORS.green },
|
|
157
|
+
progressStyle,
|
|
158
|
+
]}
|
|
159
|
+
/>
|
|
160
|
+
</View>
|
|
161
|
+
<View style={styles.heartsContainer}>
|
|
162
|
+
<Ionicons name="heart" size={24} color={DUO_COLORS.red} />
|
|
163
|
+
<Text style={styles.heartsText}>5</Text>
|
|
164
|
+
</View>
|
|
165
|
+
</View>
|
|
166
|
+
|
|
167
|
+
<View style={styles.content}>
|
|
168
|
+
<Text style={[styles.questionText, { color: theme.colors.foreground }]}>
|
|
169
|
+
{currentQuestion.question}
|
|
170
|
+
</Text>
|
|
171
|
+
|
|
172
|
+
<View style={styles.optionsGrid}>
|
|
173
|
+
{currentQuestion.options.map((opt, index) => {
|
|
174
|
+
const isSelected = selected === opt.id;
|
|
175
|
+
return (
|
|
176
|
+
<Animated.View
|
|
177
|
+
key={opt.id}
|
|
178
|
+
entering={FadeInDown.delay(index * 100)}
|
|
179
|
+
layout={Layout}
|
|
180
|
+
style={styles.optionWrapper}
|
|
181
|
+
>
|
|
182
|
+
<TouchableOpacity
|
|
183
|
+
activeOpacity={0.9}
|
|
184
|
+
onPress={() => {
|
|
185
|
+
if (status === 'idle') setSelected(opt.id);
|
|
186
|
+
}}
|
|
187
|
+
style={[
|
|
188
|
+
styles.optionButton,
|
|
189
|
+
{
|
|
190
|
+
borderColor: isSelected
|
|
191
|
+
? DUO_COLORS.blue
|
|
192
|
+
: theme.colors.border,
|
|
193
|
+
backgroundColor: isSelected
|
|
194
|
+
? isDark
|
|
195
|
+
? '#082D42'
|
|
196
|
+
: '#DDF4FF'
|
|
197
|
+
: theme.colors.card,
|
|
198
|
+
borderBottomWidth: isSelected ? 2 : 4,
|
|
199
|
+
},
|
|
200
|
+
]}
|
|
201
|
+
>
|
|
202
|
+
<Ionicons
|
|
203
|
+
name={opt.icon}
|
|
204
|
+
size={48}
|
|
205
|
+
color={
|
|
206
|
+
isSelected
|
|
207
|
+
? DUO_COLORS.blue
|
|
208
|
+
: isDark
|
|
209
|
+
? theme.colors.neutral[400]
|
|
210
|
+
: theme.colors.foreground
|
|
211
|
+
}
|
|
212
|
+
/>
|
|
213
|
+
<Text
|
|
214
|
+
style={[
|
|
215
|
+
styles.optionLabel,
|
|
216
|
+
{
|
|
217
|
+
color: isSelected
|
|
218
|
+
? DUO_COLORS.blue
|
|
219
|
+
: theme.colors.foreground,
|
|
220
|
+
fontWeight: isSelected ? '700' : '400',
|
|
221
|
+
},
|
|
222
|
+
]}
|
|
223
|
+
>
|
|
224
|
+
{opt.label}
|
|
225
|
+
</Text>
|
|
226
|
+
</TouchableOpacity>
|
|
227
|
+
</Animated.View>
|
|
228
|
+
);
|
|
229
|
+
})}
|
|
230
|
+
</View>
|
|
231
|
+
</View>
|
|
232
|
+
|
|
233
|
+
{/* Footer */}
|
|
234
|
+
<View
|
|
235
|
+
style={[
|
|
236
|
+
styles.footer,
|
|
237
|
+
status === 'correct'
|
|
238
|
+
? { backgroundColor: isDark ? '#05290B' : '#d7ffb8' }
|
|
239
|
+
: status === 'wrong'
|
|
240
|
+
? { backgroundColor: isDark ? '#3D0808' : '#ffdfe0' }
|
|
241
|
+
: null,
|
|
242
|
+
]}
|
|
243
|
+
>
|
|
244
|
+
{status === 'correct' && (
|
|
245
|
+
<Animated.View
|
|
246
|
+
entering={ZoomIn.springify()}
|
|
247
|
+
style={styles.feedbackRow}
|
|
248
|
+
>
|
|
249
|
+
<Ionicons
|
|
250
|
+
name="checkmark-circle"
|
|
251
|
+
size={32}
|
|
252
|
+
color={DUO_COLORS.green}
|
|
253
|
+
/>
|
|
254
|
+
<Text style={styles.feedbackTextCorrect}>Excellent!</Text>
|
|
255
|
+
</Animated.View>
|
|
256
|
+
)}
|
|
257
|
+
{status === 'wrong' && (
|
|
258
|
+
<Animated.View entering={FadeInDown} style={styles.feedbackRow}>
|
|
259
|
+
<Ionicons name="alert-circle" size={32} color={DUO_COLORS.red} />
|
|
260
|
+
<Text style={styles.feedbackTextWrong}>
|
|
261
|
+
Correct solution:{' '}
|
|
262
|
+
{
|
|
263
|
+
currentQuestion.options.find(
|
|
264
|
+
(o) => o.id === currentQuestion.correctId,
|
|
265
|
+
)?.label
|
|
266
|
+
}
|
|
267
|
+
</Text>
|
|
268
|
+
</Animated.View>
|
|
269
|
+
)}
|
|
270
|
+
|
|
271
|
+
<DuoButton
|
|
272
|
+
label={
|
|
273
|
+
status === 'idle'
|
|
274
|
+
? 'Check'
|
|
275
|
+
: status === 'correct'
|
|
276
|
+
? 'Continue'
|
|
277
|
+
: 'Got it'
|
|
278
|
+
}
|
|
279
|
+
onPress={status === 'idle' ? handleCheck : handleContinue}
|
|
280
|
+
disabled={!selected && status === 'idle'}
|
|
281
|
+
variant={
|
|
282
|
+
status === 'wrong'
|
|
283
|
+
? 'danger'
|
|
284
|
+
: status === 'correct'
|
|
285
|
+
? 'primary'
|
|
286
|
+
: 'primary'
|
|
287
|
+
}
|
|
288
|
+
size="lg"
|
|
289
|
+
fullWidth
|
|
290
|
+
/>
|
|
291
|
+
</View>
|
|
292
|
+
</View>
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
const styles = StyleSheet.create({
|
|
297
|
+
container: {
|
|
298
|
+
flex: 1,
|
|
299
|
+
paddingTop: 60,
|
|
300
|
+
},
|
|
301
|
+
header: {
|
|
302
|
+
paddingHorizontal: 20,
|
|
303
|
+
paddingVertical: 16,
|
|
304
|
+
flexDirection: 'row',
|
|
305
|
+
alignItems: 'center',
|
|
306
|
+
gap: 16,
|
|
307
|
+
},
|
|
308
|
+
progressBar: {
|
|
309
|
+
flex: 1,
|
|
310
|
+
height: 16,
|
|
311
|
+
borderRadius: 8,
|
|
312
|
+
overflow: 'hidden',
|
|
313
|
+
},
|
|
314
|
+
progressFill: {
|
|
315
|
+
height: '100%',
|
|
316
|
+
borderRadius: 8,
|
|
317
|
+
},
|
|
318
|
+
heartsContainer: {
|
|
319
|
+
flexDirection: 'row',
|
|
320
|
+
alignItems: 'center',
|
|
321
|
+
},
|
|
322
|
+
heartsText: {
|
|
323
|
+
marginLeft: 4,
|
|
324
|
+
fontWeight: '700',
|
|
325
|
+
fontSize: 18,
|
|
326
|
+
color: '#ef4444',
|
|
327
|
+
},
|
|
328
|
+
content: {
|
|
329
|
+
flex: 1,
|
|
330
|
+
paddingHorizontal: 20,
|
|
331
|
+
paddingTop: 16,
|
|
332
|
+
},
|
|
333
|
+
questionText: {
|
|
334
|
+
fontSize: 24,
|
|
335
|
+
fontWeight: '700',
|
|
336
|
+
marginBottom: 32,
|
|
337
|
+
},
|
|
338
|
+
optionsGrid: {
|
|
339
|
+
flexDirection: 'row',
|
|
340
|
+
flexWrap: 'wrap',
|
|
341
|
+
gap: 16,
|
|
342
|
+
justifyContent: 'space-between',
|
|
343
|
+
},
|
|
344
|
+
optionWrapper: {
|
|
345
|
+
width: '47%',
|
|
346
|
+
},
|
|
347
|
+
optionButton: {
|
|
348
|
+
borderWidth: 2,
|
|
349
|
+
borderRadius: 16,
|
|
350
|
+
padding: 16,
|
|
351
|
+
alignItems: 'center',
|
|
352
|
+
gap: 16,
|
|
353
|
+
shadowColor: '#000',
|
|
354
|
+
shadowOffset: { width: 0, height: 2 },
|
|
355
|
+
shadowOpacity: 0.05,
|
|
356
|
+
shadowRadius: 4,
|
|
357
|
+
},
|
|
358
|
+
optionLabel: {
|
|
359
|
+
fontSize: 18,
|
|
360
|
+
},
|
|
361
|
+
footer: {
|
|
362
|
+
paddingHorizontal: 20,
|
|
363
|
+
paddingTop: 24,
|
|
364
|
+
paddingBottom: 40,
|
|
365
|
+
borderTopWidth: 1,
|
|
366
|
+
borderColor: 'transparent',
|
|
367
|
+
},
|
|
368
|
+
feedbackRow: {
|
|
369
|
+
marginBottom: 16,
|
|
370
|
+
flexDirection: 'row',
|
|
371
|
+
alignItems: 'center',
|
|
372
|
+
gap: 8,
|
|
373
|
+
},
|
|
374
|
+
feedbackTextCorrect: {
|
|
375
|
+
fontSize: 20,
|
|
376
|
+
fontWeight: '700',
|
|
377
|
+
color: '#15803d',
|
|
378
|
+
},
|
|
379
|
+
feedbackTextWrong: {
|
|
380
|
+
fontSize: 20,
|
|
381
|
+
fontWeight: '700',
|
|
382
|
+
color: '#b91c1c',
|
|
383
|
+
},
|
|
384
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "screen-kits-duolingo",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Screen kit: Lingo Learner (Duolingo-inspired)",
|
|
5
|
+
"copy": [
|
|
6
|
+
{
|
|
7
|
+
"from": "apps/native/src/app/screen-kits/duolingo",
|
|
8
|
+
"to": "apps/native/src/app/(root)/(protected)/screen-kits/duolingo"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"from": "apps/native/src/features/screen-kits/duolingo",
|
|
12
|
+
"to": "apps/native/src/features/screen-kits/duolingo"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"screenKit": {
|
|
16
|
+
"id": "duolingo",
|
|
17
|
+
"title": "Lingo Learner",
|
|
18
|
+
"description": "Gamified language learning experience",
|
|
19
|
+
"icon": "🦉",
|
|
20
|
+
"color": "#58CC02",
|
|
21
|
+
"screens": [
|
|
22
|
+
{
|
|
23
|
+
"id": "home",
|
|
24
|
+
"name": "Home Dashboard",
|
|
25
|
+
"description": "Main learning path with daily streak",
|
|
26
|
+
"route": "/screen-kits/duolingo/home"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "skill-tree",
|
|
30
|
+
"name": "Skill Tree",
|
|
31
|
+
"description": "Vertical progression path",
|
|
32
|
+
"route": "/screen-kits/duolingo/skill-tree"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "lesson",
|
|
36
|
+
"name": "Lesson Practice",
|
|
37
|
+
"description": "Interactive questions with feedback",
|
|
38
|
+
"route": "/screen-kits/duolingo/lesson"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"target": "native",
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"expo": [
|
|
45
|
+
"@expo/vector-icons",
|
|
46
|
+
"@gorhom/bottom-sheet",
|
|
47
|
+
"expo-blur",
|
|
48
|
+
"expo-haptics",
|
|
49
|
+
"expo-linear-gradient",
|
|
50
|
+
"lottie-react-native",
|
|
51
|
+
"react-native-css-interop",
|
|
52
|
+
"react-native-gesture-handler",
|
|
53
|
+
"react-native-reanimated",
|
|
54
|
+
"react-native-safe-area-context",
|
|
55
|
+
"react-native-svg"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Stack } from 'expo-router';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
export default function FinanceLayout() {
|
|
5
|
+
return (
|
|
6
|
+
<Stack screenOptions={{ headerShown: false }}>
|
|
7
|
+
<Stack.Screen name="wallet" />
|
|
8
|
+
<Stack.Screen
|
|
9
|
+
name="send"
|
|
10
|
+
options={{
|
|
11
|
+
presentation: 'modal',
|
|
12
|
+
animation: 'slide_from_bottom',
|
|
13
|
+
}}
|
|
14
|
+
/>
|
|
15
|
+
<Stack.Screen
|
|
16
|
+
name="receive"
|
|
17
|
+
options={{
|
|
18
|
+
presentation: 'modal',
|
|
19
|
+
animation: 'slide_from_bottom',
|
|
20
|
+
}}
|
|
21
|
+
/>
|
|
22
|
+
<Stack.Screen
|
|
23
|
+
name="swap"
|
|
24
|
+
options={{
|
|
25
|
+
presentation: 'modal',
|
|
26
|
+
animation: 'slide_from_bottom',
|
|
27
|
+
}}
|
|
28
|
+
/>
|
|
29
|
+
<Stack.Screen
|
|
30
|
+
name="notifications"
|
|
31
|
+
options={{
|
|
32
|
+
presentation: 'transparentModal',
|
|
33
|
+
animation: 'fade',
|
|
34
|
+
}}
|
|
35
|
+
/>
|
|
36
|
+
<Stack.Screen
|
|
37
|
+
name="asset-detail"
|
|
38
|
+
options={{
|
|
39
|
+
presentation: 'card',
|
|
40
|
+
animation: 'slide_from_right',
|
|
41
|
+
}}
|
|
42
|
+
/>
|
|
43
|
+
</Stack>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { TouchableOpacity, View } from 'react-native';
|
|
4
|
+
|
|
5
|
+
import { Text } from '@/components/ui';
|
|
6
|
+
|
|
7
|
+
import { FINANCE_COLORS } from '../constants';
|
|
8
|
+
|
|
9
|
+
const ACTIONS = [
|
|
10
|
+
{
|
|
11
|
+
id: 'send',
|
|
12
|
+
label: 'Send',
|
|
13
|
+
icon: 'arrow-up',
|
|
14
|
+
color: FINANCE_COLORS.primary,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: 'receive',
|
|
18
|
+
label: 'Receive',
|
|
19
|
+
icon: 'arrow-down',
|
|
20
|
+
color: FINANCE_COLORS.secondary,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: 'swap',
|
|
24
|
+
label: 'Swap',
|
|
25
|
+
icon: 'swap-horizontal',
|
|
26
|
+
color: FINANCE_COLORS.accent,
|
|
27
|
+
},
|
|
28
|
+
{ id: 'buy', label: 'Buy', icon: 'card', color: FINANCE_COLORS.success },
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
interface ActionButtonsProps {
|
|
32
|
+
onSendBy: () => void;
|
|
33
|
+
onReceive: () => void;
|
|
34
|
+
onSwap: () => void;
|
|
35
|
+
onBuy: () => void;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const ActionButtons = ({
|
|
39
|
+
onSendBy,
|
|
40
|
+
onReceive,
|
|
41
|
+
onSwap,
|
|
42
|
+
onBuy,
|
|
43
|
+
}: ActionButtonsProps) => {
|
|
44
|
+
return (
|
|
45
|
+
<View className="flex-row justify-between px-4 mb-8">
|
|
46
|
+
{ACTIONS.map((action) => (
|
|
47
|
+
<View key={action.id} className="items-center gap-2">
|
|
48
|
+
<TouchableOpacity
|
|
49
|
+
onPress={() => {
|
|
50
|
+
if (action.id === 'send') onSendBy();
|
|
51
|
+
if (action.id === 'receive') onReceive();
|
|
52
|
+
if (action.id === 'swap') onSwap();
|
|
53
|
+
if (action.id === 'buy') onBuy();
|
|
54
|
+
}}
|
|
55
|
+
className="w-14 h-14 rounded-full items-center justify-center border border-zinc-800 bg-zinc-900 active:scale-95"
|
|
56
|
+
activeOpacity={0.8}
|
|
57
|
+
style={{
|
|
58
|
+
shadowColor: action.color,
|
|
59
|
+
shadowOffset: { width: 0, height: 4 },
|
|
60
|
+
shadowOpacity: 0.2,
|
|
61
|
+
shadowRadius: 8,
|
|
62
|
+
elevation: 4,
|
|
63
|
+
}}
|
|
64
|
+
>
|
|
65
|
+
<Ionicons
|
|
66
|
+
name={action.icon as any}
|
|
67
|
+
size={24}
|
|
68
|
+
color={action.color}
|
|
69
|
+
/>
|
|
70
|
+
</TouchableOpacity>
|
|
71
|
+
<Text className="text-zinc-400 text-xs font-medium">
|
|
72
|
+
{action.label}
|
|
73
|
+
</Text>
|
|
74
|
+
</View>
|
|
75
|
+
))}
|
|
76
|
+
</View>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { TouchableOpacity, View } from 'react-native';
|
|
4
|
+
import Svg, { Path } from 'react-native-svg';
|
|
5
|
+
|
|
6
|
+
import { Text } from '@/components/ui';
|
|
7
|
+
|
|
8
|
+
import { FINANCE_COLORS } from '../constants';
|
|
9
|
+
|
|
10
|
+
interface AssetRowProps {
|
|
11
|
+
asset: {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
symbol: string;
|
|
15
|
+
amount: number;
|
|
16
|
+
value: number;
|
|
17
|
+
change: number;
|
|
18
|
+
color: string;
|
|
19
|
+
chartData: number[];
|
|
20
|
+
};
|
|
21
|
+
onPress: () => void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const AssetRow = ({ asset, onPress }: AssetRowProps) => {
|
|
25
|
+
const isPositive = asset.change >= 0;
|
|
26
|
+
|
|
27
|
+
// Tiny sparkline path logic (simplified)
|
|
28
|
+
const min = Math.min(...asset.chartData);
|
|
29
|
+
const max = Math.max(...asset.chartData);
|
|
30
|
+
const range = max - min;
|
|
31
|
+
const h = 30; // height
|
|
32
|
+
const w = 60; // width
|
|
33
|
+
const step = w / (asset.chartData.length - 1);
|
|
34
|
+
|
|
35
|
+
const points = asset.chartData
|
|
36
|
+
.map((val, i) => {
|
|
37
|
+
// If range is 0 (flat line), center vertically
|
|
38
|
+
const fraction = range === 0 ? 0.5 : (val - min) / range;
|
|
39
|
+
const y = h - fraction * h;
|
|
40
|
+
return `${i * step},${y}`;
|
|
41
|
+
})
|
|
42
|
+
.join(' ');
|
|
43
|
+
|
|
44
|
+
const d = `M ${points}`;
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<TouchableOpacity
|
|
48
|
+
onPress={onPress}
|
|
49
|
+
className="flex-row items-center justify-between py-4 border-b border-zinc-900 active:bg-zinc-900/50 px-2 rounded-xl"
|
|
50
|
+
>
|
|
51
|
+
<View className="flex-row items-center gap-4">
|
|
52
|
+
{/* Icon Placeholder */}
|
|
53
|
+
<View
|
|
54
|
+
className="w-10 h-10 rounded-full items-center justify-center"
|
|
55
|
+
style={{ backgroundColor: `${asset.color}20` }}
|
|
56
|
+
>
|
|
57
|
+
<Text style={{ color: asset.color }} className="font-bold text-xs">
|
|
58
|
+
{asset.symbol[0]}
|
|
59
|
+
</Text>
|
|
60
|
+
</View>
|
|
61
|
+
<View>
|
|
62
|
+
<Text className="text-white font-bold text-base">{asset.name}</Text>
|
|
63
|
+
<Text className="text-zinc-500 text-xs">
|
|
64
|
+
{asset.amount} {asset.symbol}
|
|
65
|
+
</Text>
|
|
66
|
+
</View>
|
|
67
|
+
</View>
|
|
68
|
+
|
|
69
|
+
{/* Sparkline */}
|
|
70
|
+
<View className="h-8 w-16 justify-center">
|
|
71
|
+
<Svg height={h} width={w}>
|
|
72
|
+
<Path
|
|
73
|
+
d={d}
|
|
74
|
+
stroke={isPositive ? FINANCE_COLORS.success : FINANCE_COLORS.danger}
|
|
75
|
+
strokeWidth={2}
|
|
76
|
+
fill="none"
|
|
77
|
+
/>
|
|
78
|
+
</Svg>
|
|
79
|
+
</View>
|
|
80
|
+
|
|
81
|
+
<View className="items-end">
|
|
82
|
+
<Text className="text-white font-bold text-base">
|
|
83
|
+
${asset.value.toLocaleString()}
|
|
84
|
+
</Text>
|
|
85
|
+
<Text
|
|
86
|
+
className={`text-xs font-medium ${isPositive ? 'text-emerald-500' : 'text-red-500'}`}
|
|
87
|
+
>
|
|
88
|
+
{isPositive ? '+' : ''}
|
|
89
|
+
{asset.change}%
|
|
90
|
+
</Text>
|
|
91
|
+
</View>
|
|
92
|
+
</TouchableOpacity>
|
|
93
|
+
);
|
|
94
|
+
};
|