vibefast-cli 1.2.1 → 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 +94 -91
- package/dist/__tests__/recipes.test.js.map +1 -1
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +301 -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 -16
- 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 -42
- 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 -37
- 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 -35
- 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 -23
- 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,225 @@
|
|
|
1
|
+
import { Stack, useRouter } from 'expo-router';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Dimensions, ScrollView, StyleSheet, View } from 'react-native';
|
|
4
|
+
import Animated, { FadeIn } from 'react-native-reanimated';
|
|
5
|
+
import Svg, { Path } from 'react-native-svg';
|
|
6
|
+
|
|
7
|
+
import { SafeAreaView, Text } from '@/components/ui';
|
|
8
|
+
|
|
9
|
+
import { MOCK_UNITS } from '../constants';
|
|
10
|
+
import SkillButton from '../components/skill-button';
|
|
11
|
+
import XPHeader from '../components/xp-header';
|
|
12
|
+
|
|
13
|
+
const { width } = Dimensions.get('window');
|
|
14
|
+
|
|
15
|
+
import { useThemeConfig } from '@/lib/use-theme-config';
|
|
16
|
+
|
|
17
|
+
const NODE_SIZE = 72;
|
|
18
|
+
const NODE_SPACING = 20;
|
|
19
|
+
const X_AMPLITUDE = 60;
|
|
20
|
+
|
|
21
|
+
export default function DuolingoHomeScreen() {
|
|
22
|
+
const router = useRouter();
|
|
23
|
+
const theme = useThemeConfig();
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<View
|
|
27
|
+
style={[styles.container, { backgroundColor: theme.colors.background }]}
|
|
28
|
+
>
|
|
29
|
+
<Stack.Screen options={{ headerShown: false }} />
|
|
30
|
+
<XPHeader />
|
|
31
|
+
|
|
32
|
+
<ScrollView
|
|
33
|
+
showsVerticalScrollIndicator={false}
|
|
34
|
+
contentContainerStyle={styles.scrollContent}
|
|
35
|
+
>
|
|
36
|
+
{MOCK_UNITS.map((unit) => {
|
|
37
|
+
let pathD = '';
|
|
38
|
+
|
|
39
|
+
const points = unit.lessons.map((_, i) => {
|
|
40
|
+
const offset = Math.sin((i * Math.PI) / 2) * X_AMPLITUDE;
|
|
41
|
+
const y = i * (NODE_SIZE + NODE_SPACING) + NODE_SIZE / 2;
|
|
42
|
+
const x = width / 2 + offset;
|
|
43
|
+
return { x, y };
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
points.forEach((p, i) => {
|
|
47
|
+
if (i === 0) {
|
|
48
|
+
pathD += `M ${p.x} ${p.y}`;
|
|
49
|
+
} else {
|
|
50
|
+
const prev = points[i - 1];
|
|
51
|
+
const c1y = prev.y + 40;
|
|
52
|
+
const c2y = p.y - 40;
|
|
53
|
+
pathD += ` C ${prev.x} ${c1y} ${p.x} ${c2y} ${p.x} ${p.y}`;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<View key={unit.id} style={styles.unitContainer}>
|
|
59
|
+
{/* Unit Header */}
|
|
60
|
+
<View
|
|
61
|
+
style={[styles.unitHeader, { backgroundColor: unit.color }]}
|
|
62
|
+
>
|
|
63
|
+
<View style={styles.unitHeaderContent}>
|
|
64
|
+
<View style={styles.unitTextContainer}>
|
|
65
|
+
<Text style={styles.unitTitle}>{unit.title}</Text>
|
|
66
|
+
<Text style={styles.unitDescription}>
|
|
67
|
+
{unit.description}
|
|
68
|
+
</Text>
|
|
69
|
+
</View>
|
|
70
|
+
<View style={styles.guideButton}>
|
|
71
|
+
<Text style={styles.guideButtonText}>📖 Guide</Text>
|
|
72
|
+
</View>
|
|
73
|
+
</View>
|
|
74
|
+
<View style={styles.mascotContainer}>
|
|
75
|
+
<Text style={styles.mascotEmoji}>🦉</Text>
|
|
76
|
+
</View>
|
|
77
|
+
</View>
|
|
78
|
+
|
|
79
|
+
{/* Path Container */}
|
|
80
|
+
<View style={styles.pathContainer}>
|
|
81
|
+
{/* The Connector Line */}
|
|
82
|
+
<View
|
|
83
|
+
style={[
|
|
84
|
+
styles.connectorContainer,
|
|
85
|
+
{ height: points[points.length - 1].y },
|
|
86
|
+
]}
|
|
87
|
+
>
|
|
88
|
+
<Svg width={width} height="100%">
|
|
89
|
+
<Path
|
|
90
|
+
d={pathD}
|
|
91
|
+
stroke={theme.colors.border}
|
|
92
|
+
strokeWidth="10"
|
|
93
|
+
strokeLinecap="round"
|
|
94
|
+
fill="none"
|
|
95
|
+
/>
|
|
96
|
+
</Svg>
|
|
97
|
+
</View>
|
|
98
|
+
|
|
99
|
+
{/* The Nodes */}
|
|
100
|
+
{unit.lessons.map((lesson, index) => {
|
|
101
|
+
const offset = Math.sin((index * Math.PI) / 2) * X_AMPLITUDE;
|
|
102
|
+
|
|
103
|
+
return (
|
|
104
|
+
<Animated.View
|
|
105
|
+
key={lesson.id}
|
|
106
|
+
entering={FadeIn.delay(index * 100).duration(500)}
|
|
107
|
+
style={[
|
|
108
|
+
styles.nodeContainer,
|
|
109
|
+
{
|
|
110
|
+
transform: [{ translateX: offset }],
|
|
111
|
+
marginBottom: NODE_SPACING,
|
|
112
|
+
width: NODE_SIZE,
|
|
113
|
+
height: NODE_SIZE,
|
|
114
|
+
},
|
|
115
|
+
]}
|
|
116
|
+
>
|
|
117
|
+
<SkillButton
|
|
118
|
+
icon={lesson.icon}
|
|
119
|
+
status={lesson.status as any}
|
|
120
|
+
type={lesson.type as any}
|
|
121
|
+
stars={lesson.stars}
|
|
122
|
+
color={unit.color}
|
|
123
|
+
onPress={() => {
|
|
124
|
+
if (lesson.status !== 'locked') {
|
|
125
|
+
router.push({
|
|
126
|
+
pathname: '/screen-kits/duolingo/lesson',
|
|
127
|
+
params: { id: lesson.id },
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
}}
|
|
131
|
+
/>
|
|
132
|
+
</Animated.View>
|
|
133
|
+
);
|
|
134
|
+
})}
|
|
135
|
+
</View>
|
|
136
|
+
</View>
|
|
137
|
+
);
|
|
138
|
+
})}
|
|
139
|
+
</ScrollView>
|
|
140
|
+
</View>
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const styles = StyleSheet.create({
|
|
145
|
+
container: {
|
|
146
|
+
flex: 1,
|
|
147
|
+
},
|
|
148
|
+
scrollContent: {
|
|
149
|
+
paddingBottom: 100,
|
|
150
|
+
paddingTop: 100,
|
|
151
|
+
},
|
|
152
|
+
unitContainer: {
|
|
153
|
+
marginBottom: 0,
|
|
154
|
+
},
|
|
155
|
+
unitHeader: {
|
|
156
|
+
paddingHorizontal: 16,
|
|
157
|
+
paddingVertical: 24,
|
|
158
|
+
marginBottom: 32,
|
|
159
|
+
marginHorizontal: 16,
|
|
160
|
+
borderRadius: 16,
|
|
161
|
+
shadowColor: '#000',
|
|
162
|
+
shadowOffset: { width: 0, height: 2 },
|
|
163
|
+
shadowOpacity: 0.1,
|
|
164
|
+
shadowRadius: 4,
|
|
165
|
+
overflow: 'hidden',
|
|
166
|
+
position: 'relative',
|
|
167
|
+
},
|
|
168
|
+
unitHeaderContent: {
|
|
169
|
+
flexDirection: 'row',
|
|
170
|
+
justifyContent: 'space-between',
|
|
171
|
+
alignItems: 'flex-start',
|
|
172
|
+
position: 'relative',
|
|
173
|
+
zIndex: 10,
|
|
174
|
+
},
|
|
175
|
+
unitTextContainer: {
|
|
176
|
+
flex: 1,
|
|
177
|
+
marginRight: 16,
|
|
178
|
+
},
|
|
179
|
+
unitTitle: {
|
|
180
|
+
color: 'rgba(255, 255, 255, 0.9)',
|
|
181
|
+
fontWeight: '700',
|
|
182
|
+
fontSize: 18,
|
|
183
|
+
textTransform: 'uppercase',
|
|
184
|
+
marginBottom: 4,
|
|
185
|
+
},
|
|
186
|
+
unitDescription: {
|
|
187
|
+
color: '#ffffff',
|
|
188
|
+
fontWeight: '900',
|
|
189
|
+
fontSize: 20,
|
|
190
|
+
lineHeight: 24,
|
|
191
|
+
},
|
|
192
|
+
guideButton: {
|
|
193
|
+
backgroundColor: 'rgba(255, 255, 255, 0.2)',
|
|
194
|
+
paddingHorizontal: 12,
|
|
195
|
+
paddingVertical: 8,
|
|
196
|
+
borderRadius: 12,
|
|
197
|
+
borderWidth: 1,
|
|
198
|
+
borderColor: 'rgba(255, 255, 255, 0.1)',
|
|
199
|
+
},
|
|
200
|
+
guideButtonText: {
|
|
201
|
+
color: '#ffffff',
|
|
202
|
+
fontWeight: '700',
|
|
203
|
+
},
|
|
204
|
+
mascotContainer: {
|
|
205
|
+
position: 'absolute',
|
|
206
|
+
bottom: -8,
|
|
207
|
+
right: -8,
|
|
208
|
+
opacity: 0.2,
|
|
209
|
+
transform: [{ rotate: '12deg' }],
|
|
210
|
+
},
|
|
211
|
+
mascotEmoji: {
|
|
212
|
+
fontSize: 80,
|
|
213
|
+
},
|
|
214
|
+
pathContainer: {
|
|
215
|
+
position: 'relative',
|
|
216
|
+
alignItems: 'center',
|
|
217
|
+
},
|
|
218
|
+
connectorContainer: {
|
|
219
|
+
position: 'absolute',
|
|
220
|
+
top: 0,
|
|
221
|
+
left: 0,
|
|
222
|
+
right: 0,
|
|
223
|
+
},
|
|
224
|
+
nodeContainer: {},
|
|
225
|
+
});
|
|
@@ -0,0 +1,485 @@
|
|
|
1
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
2
|
+
import { LinearGradient } from 'expo-linear-gradient';
|
|
3
|
+
import { Stack, useLocalSearchParams, useRouter } from 'expo-router';
|
|
4
|
+
import LottieView from 'lottie-react-native';
|
|
5
|
+
import React, { useEffect, useRef } from 'react';
|
|
6
|
+
import { StyleSheet, TextInput, View, Dimensions } from 'react-native';
|
|
7
|
+
import Animated, {
|
|
8
|
+
FadeInDown,
|
|
9
|
+
FadeInUp,
|
|
10
|
+
SharedValue,
|
|
11
|
+
useAnimatedProps,
|
|
12
|
+
useDerivedValue,
|
|
13
|
+
useSharedValue,
|
|
14
|
+
withDelay,
|
|
15
|
+
withTiming,
|
|
16
|
+
ZoomIn,
|
|
17
|
+
} from 'react-native-reanimated';
|
|
18
|
+
|
|
19
|
+
import { Text } from '@/components/ui';
|
|
20
|
+
import { useThemeConfig } from '@/lib/use-theme-config';
|
|
21
|
+
|
|
22
|
+
import DuoButton from '../components/duo-button';
|
|
23
|
+
import { DUO_COLORS } from '../constants';
|
|
24
|
+
|
|
25
|
+
const AnimatedTextInput = Animated.createAnimatedComponent(TextInput);
|
|
26
|
+
|
|
27
|
+
function ReText({ style, text }: { style?: any; text: SharedValue<string> }) {
|
|
28
|
+
const animatedProps = useAnimatedProps(() => {
|
|
29
|
+
return {
|
|
30
|
+
text: text.value,
|
|
31
|
+
} as any;
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<AnimatedTextInput
|
|
36
|
+
underlineColorAndroid="transparent"
|
|
37
|
+
editable={false}
|
|
38
|
+
defaultValue={text.value}
|
|
39
|
+
caretHidden
|
|
40
|
+
selectionColor="transparent"
|
|
41
|
+
contextMenuHidden
|
|
42
|
+
style={[styles.reText, style]}
|
|
43
|
+
animatedProps={animatedProps}
|
|
44
|
+
/>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function StatPillar({
|
|
49
|
+
label,
|
|
50
|
+
value,
|
|
51
|
+
color,
|
|
52
|
+
edgeColor,
|
|
53
|
+
icon,
|
|
54
|
+
delay = 0,
|
|
55
|
+
}: {
|
|
56
|
+
label: string;
|
|
57
|
+
value: string;
|
|
58
|
+
color: string;
|
|
59
|
+
edgeColor: string;
|
|
60
|
+
icon: any;
|
|
61
|
+
delay?: number;
|
|
62
|
+
}) {
|
|
63
|
+
const theme = useThemeConfig();
|
|
64
|
+
return (
|
|
65
|
+
<Animated.View
|
|
66
|
+
entering={FadeInDown.delay(delay).springify()}
|
|
67
|
+
style={styles.statPillarContainer}
|
|
68
|
+
>
|
|
69
|
+
<View
|
|
70
|
+
style={[
|
|
71
|
+
styles.statPillarBox,
|
|
72
|
+
{
|
|
73
|
+
backgroundColor: color,
|
|
74
|
+
borderBottomColor: edgeColor,
|
|
75
|
+
},
|
|
76
|
+
]}
|
|
77
|
+
>
|
|
78
|
+
<Ionicons name={icon} size={28} color="white" />
|
|
79
|
+
<Text style={styles.statPillarValue}>{value}</Text>
|
|
80
|
+
</View>
|
|
81
|
+
<Text
|
|
82
|
+
style={[
|
|
83
|
+
styles.statPillarLabel,
|
|
84
|
+
{ color: theme.colors.mutedForeground },
|
|
85
|
+
]}
|
|
86
|
+
>
|
|
87
|
+
{label}
|
|
88
|
+
</Text>
|
|
89
|
+
</Animated.View>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export default function LessonCompleteScreen() {
|
|
94
|
+
const router = useRouter();
|
|
95
|
+
const params = useLocalSearchParams();
|
|
96
|
+
const theme = useThemeConfig();
|
|
97
|
+
const confettiRef = useRef<LottieView>(null);
|
|
98
|
+
|
|
99
|
+
const xp = params.xp ? Number(params.xp) : 40;
|
|
100
|
+
const accuracyVal = params.accuracy ? Number(params.accuracy) : 100;
|
|
101
|
+
|
|
102
|
+
const baseXp = Math.floor(xp * 0.75);
|
|
103
|
+
const bonusXp = Math.ceil(xp * 0.25);
|
|
104
|
+
const totalXp = xp;
|
|
105
|
+
const focusMinutes = 5;
|
|
106
|
+
const accuracy = accuracyVal;
|
|
107
|
+
const rating = accuracy >= 90 ? 'Amazing' : accuracy >= 70 ? 'Good' : 'Okay';
|
|
108
|
+
const streakDays = 7;
|
|
109
|
+
const unitProgress = 6;
|
|
110
|
+
const unitTotal = 12;
|
|
111
|
+
const unitCompletion = Math.min(unitProgress / unitTotal, 1);
|
|
112
|
+
const showPerfectBadge = accuracy === 100;
|
|
113
|
+
|
|
114
|
+
const xpValue = useSharedValue(0);
|
|
115
|
+
|
|
116
|
+
useEffect(() => {
|
|
117
|
+
xpValue.value = withDelay(800, withTiming(totalXp, { duration: 1500 }));
|
|
118
|
+
setTimeout(() => {
|
|
119
|
+
confettiRef.current?.play();
|
|
120
|
+
}, 500);
|
|
121
|
+
}, [totalXp, xpValue]);
|
|
122
|
+
|
|
123
|
+
const xpText = useDerivedValue(() => {
|
|
124
|
+
return `${Math.round(xpValue.value)}`;
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
const backgroundGradient = theme.dark
|
|
128
|
+
? (['#0B0F14', '#0E1319', '#111214'] as const)
|
|
129
|
+
: (['#FFFDF6', '#FFFDF6', '#FFFFFF'] as const);
|
|
130
|
+
|
|
131
|
+
const headlineColor = theme.dark ? '#FFE7A3' : DUO_COLORS.goldDark;
|
|
132
|
+
|
|
133
|
+
return (
|
|
134
|
+
<View
|
|
135
|
+
style={[styles.container, { backgroundColor: theme.colors.background }]}
|
|
136
|
+
>
|
|
137
|
+
<Stack.Screen options={{ headerShown: false }} />
|
|
138
|
+
<LinearGradient
|
|
139
|
+
colors={backgroundGradient}
|
|
140
|
+
style={StyleSheet.absoluteFillObject}
|
|
141
|
+
/>
|
|
142
|
+
|
|
143
|
+
{/* Confetti Layer */}
|
|
144
|
+
<View pointerEvents="none" style={styles.confettiLayer}>
|
|
145
|
+
<LottieView
|
|
146
|
+
ref={confettiRef}
|
|
147
|
+
source={{
|
|
148
|
+
uri: 'https://assets9.lottiefiles.com/packages/lf20_u4yrau.json',
|
|
149
|
+
}}
|
|
150
|
+
autoPlay={false}
|
|
151
|
+
loop={false}
|
|
152
|
+
style={styles.lottie}
|
|
153
|
+
resizeMode="cover"
|
|
154
|
+
/>
|
|
155
|
+
</View>
|
|
156
|
+
|
|
157
|
+
<View style={styles.content}>
|
|
158
|
+
{/* Hero Section */}
|
|
159
|
+
<Animated.View
|
|
160
|
+
entering={ZoomIn.duration(600)}
|
|
161
|
+
style={styles.heroSection}
|
|
162
|
+
>
|
|
163
|
+
<View style={styles.trophyContainer}>
|
|
164
|
+
<View
|
|
165
|
+
style={[
|
|
166
|
+
styles.trophyGlow,
|
|
167
|
+
{ backgroundColor: DUO_COLORS.gold + '20' },
|
|
168
|
+
]}
|
|
169
|
+
>
|
|
170
|
+
<Ionicons name="trophy" size={100} color={DUO_COLORS.gold} />
|
|
171
|
+
</View>
|
|
172
|
+
</View>
|
|
173
|
+
|
|
174
|
+
<Text style={[styles.headline, { color: headlineColor }]}>
|
|
175
|
+
{showPerfectBadge ? 'Perfect!' : 'Well done!'}
|
|
176
|
+
</Text>
|
|
177
|
+
<Text
|
|
178
|
+
style={[
|
|
179
|
+
styles.subheadline,
|
|
180
|
+
{ color: theme.colors.mutedForeground },
|
|
181
|
+
]}
|
|
182
|
+
>
|
|
183
|
+
{showPerfectBadge
|
|
184
|
+
? "You didn't make a single mistake!"
|
|
185
|
+
: 'You are making great progress.'}
|
|
186
|
+
</Text>
|
|
187
|
+
</Animated.View>
|
|
188
|
+
|
|
189
|
+
{/* XP Counter Section */}
|
|
190
|
+
<Animated.View
|
|
191
|
+
entering={FadeInUp.delay(400).springify()}
|
|
192
|
+
style={styles.xpSection}
|
|
193
|
+
>
|
|
194
|
+
<View style={styles.xpRow}>
|
|
195
|
+
<ReText
|
|
196
|
+
text={xpText}
|
|
197
|
+
style={{
|
|
198
|
+
color: DUO_COLORS.gold,
|
|
199
|
+
fontSize: 72,
|
|
200
|
+
fontWeight: '900',
|
|
201
|
+
textAlign: 'center',
|
|
202
|
+
}}
|
|
203
|
+
/>
|
|
204
|
+
<Text style={styles.xpLabel}>XP</Text>
|
|
205
|
+
</View>
|
|
206
|
+
<Text
|
|
207
|
+
style={[
|
|
208
|
+
styles.xpBreakdown,
|
|
209
|
+
{ color: theme.colors.mutedForeground },
|
|
210
|
+
]}
|
|
211
|
+
>
|
|
212
|
+
Base {baseXp} + Bonus {bonusXp}
|
|
213
|
+
</Text>
|
|
214
|
+
</Animated.View>
|
|
215
|
+
|
|
216
|
+
{/* 3D Stats Pillars */}
|
|
217
|
+
<View style={styles.statsPillarsRow}>
|
|
218
|
+
<StatPillar
|
|
219
|
+
label="Focus"
|
|
220
|
+
value={`${focusMinutes}m`}
|
|
221
|
+
color={DUO_COLORS.blue}
|
|
222
|
+
edgeColor={DUO_COLORS.blueDark}
|
|
223
|
+
icon="timer"
|
|
224
|
+
delay={600}
|
|
225
|
+
/>
|
|
226
|
+
<StatPillar
|
|
227
|
+
label="Accuracy"
|
|
228
|
+
value={`${accuracy}%`}
|
|
229
|
+
color={DUO_COLORS.green}
|
|
230
|
+
edgeColor={DUO_COLORS.greenDark}
|
|
231
|
+
icon="checkmark-circle"
|
|
232
|
+
delay={700}
|
|
233
|
+
/>
|
|
234
|
+
<StatPillar
|
|
235
|
+
label="Rating"
|
|
236
|
+
value={rating}
|
|
237
|
+
color={DUO_COLORS.red}
|
|
238
|
+
edgeColor={DUO_COLORS.redDark}
|
|
239
|
+
icon="heart"
|
|
240
|
+
delay={800}
|
|
241
|
+
/>
|
|
242
|
+
</View>
|
|
243
|
+
|
|
244
|
+
{/* Progress Bar Section */}
|
|
245
|
+
<Animated.View
|
|
246
|
+
entering={FadeInUp.delay(900).springify()}
|
|
247
|
+
style={styles.progressSection}
|
|
248
|
+
>
|
|
249
|
+
<View
|
|
250
|
+
style={[
|
|
251
|
+
styles.progressCard,
|
|
252
|
+
{
|
|
253
|
+
backgroundColor: theme.dark
|
|
254
|
+
? 'rgba(255,255,255,0.05)'
|
|
255
|
+
: 'rgba(0,0,0,0.03)',
|
|
256
|
+
borderColor: theme.dark
|
|
257
|
+
? 'rgba(255,255,255,0.1)'
|
|
258
|
+
: 'rgba(0,0,0,0.05)',
|
|
259
|
+
},
|
|
260
|
+
]}
|
|
261
|
+
>
|
|
262
|
+
<View style={styles.progressHeader}>
|
|
263
|
+
<View style={styles.streakRow}>
|
|
264
|
+
<Ionicons name="flame" size={20} color={DUO_COLORS.red} />
|
|
265
|
+
<Text
|
|
266
|
+
style={[
|
|
267
|
+
styles.streakText,
|
|
268
|
+
{ color: theme.colors.foreground },
|
|
269
|
+
]}
|
|
270
|
+
>
|
|
271
|
+
{streakDays} DAY STREAK
|
|
272
|
+
</Text>
|
|
273
|
+
</View>
|
|
274
|
+
<Text
|
|
275
|
+
style={[
|
|
276
|
+
styles.progressCount,
|
|
277
|
+
{ color: theme.colors.mutedForeground },
|
|
278
|
+
]}
|
|
279
|
+
>
|
|
280
|
+
{unitProgress}/{unitTotal}
|
|
281
|
+
</Text>
|
|
282
|
+
</View>
|
|
283
|
+
<View
|
|
284
|
+
style={[
|
|
285
|
+
styles.progressTrack,
|
|
286
|
+
{
|
|
287
|
+
backgroundColor: theme.dark
|
|
288
|
+
? 'rgba(255,255,255,0.08)'
|
|
289
|
+
: 'rgba(0,0,0,0.08)',
|
|
290
|
+
},
|
|
291
|
+
]}
|
|
292
|
+
>
|
|
293
|
+
<View
|
|
294
|
+
style={[
|
|
295
|
+
styles.progressFill,
|
|
296
|
+
{
|
|
297
|
+
width: `${Math.round(unitCompletion * 100)}%`,
|
|
298
|
+
backgroundColor: DUO_COLORS.green,
|
|
299
|
+
},
|
|
300
|
+
]}
|
|
301
|
+
/>
|
|
302
|
+
</View>
|
|
303
|
+
</View>
|
|
304
|
+
</Animated.View>
|
|
305
|
+
</View>
|
|
306
|
+
|
|
307
|
+
{/* Footer */}
|
|
308
|
+
<Animated.View entering={FadeInUp.delay(1200)} style={styles.footer}>
|
|
309
|
+
<DuoButton
|
|
310
|
+
label="Continue"
|
|
311
|
+
onPress={() => router.dismissTo('/screen-kits/duolingo')}
|
|
312
|
+
size="lg"
|
|
313
|
+
variant="primary"
|
|
314
|
+
fullWidth
|
|
315
|
+
/>
|
|
316
|
+
</Animated.View>
|
|
317
|
+
</View>
|
|
318
|
+
);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
const styles = StyleSheet.create({
|
|
322
|
+
container: {
|
|
323
|
+
flex: 1,
|
|
324
|
+
},
|
|
325
|
+
confettiLayer: {
|
|
326
|
+
...StyleSheet.absoluteFillObject,
|
|
327
|
+
zIndex: 10,
|
|
328
|
+
elevation: 10,
|
|
329
|
+
},
|
|
330
|
+
lottie: {
|
|
331
|
+
flex: 1,
|
|
332
|
+
},
|
|
333
|
+
content: {
|
|
334
|
+
flex: 1,
|
|
335
|
+
alignItems: 'center',
|
|
336
|
+
justifyContent: 'center',
|
|
337
|
+
paddingHorizontal: 24,
|
|
338
|
+
paddingTop: 100,
|
|
339
|
+
},
|
|
340
|
+
heroSection: {
|
|
341
|
+
alignItems: 'center',
|
|
342
|
+
marginBottom: 20,
|
|
343
|
+
},
|
|
344
|
+
trophyContainer: {
|
|
345
|
+
alignItems: 'center',
|
|
346
|
+
justifyContent: 'center',
|
|
347
|
+
},
|
|
348
|
+
trophyGlow: {
|
|
349
|
+
width: 180,
|
|
350
|
+
height: 180,
|
|
351
|
+
borderWidth: 2,
|
|
352
|
+
borderColor: DUO_COLORS.gold + '40',
|
|
353
|
+
borderRadius: 90,
|
|
354
|
+
alignItems: 'center',
|
|
355
|
+
justifyContent: 'center',
|
|
356
|
+
},
|
|
357
|
+
headline: {
|
|
358
|
+
fontSize: 36,
|
|
359
|
+
fontWeight: '900',
|
|
360
|
+
textAlign: 'center',
|
|
361
|
+
marginTop: 12,
|
|
362
|
+
lineHeight: 48,
|
|
363
|
+
includeFontPadding: false,
|
|
364
|
+
},
|
|
365
|
+
subheadline: {
|
|
366
|
+
fontSize: 18,
|
|
367
|
+
fontWeight: '700',
|
|
368
|
+
textAlign: 'center',
|
|
369
|
+
marginTop: 8,
|
|
370
|
+
lineHeight: 26,
|
|
371
|
+
},
|
|
372
|
+
xpSection: {
|
|
373
|
+
alignItems: 'center',
|
|
374
|
+
marginBottom: 20,
|
|
375
|
+
},
|
|
376
|
+
xpRow: {
|
|
377
|
+
flexDirection: 'row',
|
|
378
|
+
alignItems: 'flex-end',
|
|
379
|
+
},
|
|
380
|
+
xpLabel: {
|
|
381
|
+
fontSize: 36,
|
|
382
|
+
fontWeight: '900',
|
|
383
|
+
marginBottom: 12,
|
|
384
|
+
marginLeft: 8,
|
|
385
|
+
color: DUO_COLORS.gold,
|
|
386
|
+
lineHeight: 48,
|
|
387
|
+
includeFontPadding: false,
|
|
388
|
+
},
|
|
389
|
+
xpBreakdown: {
|
|
390
|
+
fontWeight: '700',
|
|
391
|
+
textTransform: 'uppercase',
|
|
392
|
+
letterSpacing: 2,
|
|
393
|
+
fontSize: 12,
|
|
394
|
+
},
|
|
395
|
+
statsPillarsRow: {
|
|
396
|
+
flexDirection: 'row',
|
|
397
|
+
width: '100%',
|
|
398
|
+
justifyContent: 'space-between',
|
|
399
|
+
marginBottom: 40,
|
|
400
|
+
},
|
|
401
|
+
statPillarContainer: {
|
|
402
|
+
flex: 1,
|
|
403
|
+
alignItems: 'center',
|
|
404
|
+
paddingHorizontal: 4,
|
|
405
|
+
},
|
|
406
|
+
statPillarBox: {
|
|
407
|
+
width: '100%',
|
|
408
|
+
borderRadius: 16,
|
|
409
|
+
alignItems: 'center',
|
|
410
|
+
justifyContent: 'center',
|
|
411
|
+
paddingTop: 16,
|
|
412
|
+
paddingBottom: 12,
|
|
413
|
+
borderBottomWidth: 6,
|
|
414
|
+
minHeight: 100,
|
|
415
|
+
},
|
|
416
|
+
statPillarValue: {
|
|
417
|
+
color: '#ffffff',
|
|
418
|
+
fontWeight: '900',
|
|
419
|
+
fontSize: 20,
|
|
420
|
+
marginTop: 4,
|
|
421
|
+
lineHeight: 28,
|
|
422
|
+
includeFontPadding: false,
|
|
423
|
+
},
|
|
424
|
+
statPillarLabel: {
|
|
425
|
+
fontWeight: '700',
|
|
426
|
+
textTransform: 'uppercase',
|
|
427
|
+
marginTop: 12,
|
|
428
|
+
textAlign: 'center',
|
|
429
|
+
fontSize: 10,
|
|
430
|
+
letterSpacing: 1.5,
|
|
431
|
+
},
|
|
432
|
+
progressSection: {
|
|
433
|
+
width: '100%',
|
|
434
|
+
},
|
|
435
|
+
progressCard: {
|
|
436
|
+
borderRadius: 24,
|
|
437
|
+
paddingHorizontal: 24,
|
|
438
|
+
paddingVertical: 20,
|
|
439
|
+
borderWidth: 2,
|
|
440
|
+
marginBottom: 24,
|
|
441
|
+
},
|
|
442
|
+
progressHeader: {
|
|
443
|
+
flexDirection: 'row',
|
|
444
|
+
alignItems: 'center',
|
|
445
|
+
justifyContent: 'space-between',
|
|
446
|
+
marginBottom: 16,
|
|
447
|
+
},
|
|
448
|
+
streakRow: {
|
|
449
|
+
flexDirection: 'row',
|
|
450
|
+
alignItems: 'center',
|
|
451
|
+
},
|
|
452
|
+
streakText: {
|
|
453
|
+
fontWeight: '900',
|
|
454
|
+
marginLeft: 8,
|
|
455
|
+
fontSize: 18,
|
|
456
|
+
},
|
|
457
|
+
progressCount: {
|
|
458
|
+
fontWeight: '700',
|
|
459
|
+
},
|
|
460
|
+
progressTrack: {
|
|
461
|
+
height: 16,
|
|
462
|
+
borderRadius: 8,
|
|
463
|
+
overflow: 'hidden',
|
|
464
|
+
},
|
|
465
|
+
progressFill: {
|
|
466
|
+
height: '100%',
|
|
467
|
+
borderRadius: 8,
|
|
468
|
+
},
|
|
469
|
+
footer: {
|
|
470
|
+
paddingHorizontal: 20,
|
|
471
|
+
paddingBottom: 40,
|
|
472
|
+
paddingTop: 32,
|
|
473
|
+
borderTopWidth: 1,
|
|
474
|
+
borderTopColor: 'transparent',
|
|
475
|
+
},
|
|
476
|
+
reText: {
|
|
477
|
+
padding: 0,
|
|
478
|
+
textAlign: 'center',
|
|
479
|
+
textAlignVertical: 'center',
|
|
480
|
+
includeFontPadding: false,
|
|
481
|
+
fontVariant: ['tabular-nums'],
|
|
482
|
+
lineHeight: 90,
|
|
483
|
+
minHeight: 90,
|
|
484
|
+
},
|
|
485
|
+
});
|