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,363 @@
|
|
|
1
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
2
|
+
import { useRouter } from 'expo-router';
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
|
+
import { StyleSheet, TextInput, TouchableOpacity, View } from 'react-native';
|
|
5
|
+
import Animated, {
|
|
6
|
+
FadeInUp,
|
|
7
|
+
useAnimatedStyle,
|
|
8
|
+
useSharedValue,
|
|
9
|
+
withSpring,
|
|
10
|
+
} from 'react-native-reanimated';
|
|
11
|
+
|
|
12
|
+
import { Text } from '@/components/ui';
|
|
13
|
+
import { FINANCE_COLORS } from '../constants';
|
|
14
|
+
|
|
15
|
+
export default function SwapModal() {
|
|
16
|
+
const router = useRouter();
|
|
17
|
+
const [fromAmount, setFromAmount] = useState('');
|
|
18
|
+
const [payToken, setPayToken] = useState({
|
|
19
|
+
symbol: 'ETH',
|
|
20
|
+
name: 'Ethereum',
|
|
21
|
+
icon: 'E',
|
|
22
|
+
color: '#6366f1',
|
|
23
|
+
});
|
|
24
|
+
const [receiveToken, setReceiveToken] = useState({
|
|
25
|
+
symbol: 'USDC',
|
|
26
|
+
name: 'USD Coin',
|
|
27
|
+
icon: '$',
|
|
28
|
+
color: '#3b82f6',
|
|
29
|
+
});
|
|
30
|
+
const [exchangeRate, setExchangeRate] = useState(1845.2);
|
|
31
|
+
|
|
32
|
+
const rotation = useSharedValue(0);
|
|
33
|
+
|
|
34
|
+
const handleSwapValues = () => {
|
|
35
|
+
rotation.value = withSpring(rotation.value + 180);
|
|
36
|
+
setPayToken(receiveToken);
|
|
37
|
+
setReceiveToken(payToken);
|
|
38
|
+
setExchangeRate(1 / exchangeRate);
|
|
39
|
+
setFromAmount('');
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const formatCurrency = (value: string) => {
|
|
43
|
+
const clean = value.replace(/[^0-9.]/g, '');
|
|
44
|
+
const parts = clean.split('.');
|
|
45
|
+
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
46
|
+
return parts.join('.');
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const handleAmountChange = (text: string) => {
|
|
50
|
+
if ((text.match(/\./g) || []).length > 1) return;
|
|
51
|
+
if (text === '') {
|
|
52
|
+
setFromAmount('');
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
setFromAmount(formatCurrency(text));
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const getFontSize = () => {
|
|
59
|
+
if (fromAmount.length > 10) return 24;
|
|
60
|
+
if (fromAmount.length > 7) return 28;
|
|
61
|
+
return 30;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const rotateStyle = useAnimatedStyle(() => ({
|
|
65
|
+
transform: [{ rotate: `${rotation.value}deg` }],
|
|
66
|
+
}));
|
|
67
|
+
|
|
68
|
+
const numericAmount = parseFloat(fromAmount.replace(/,/g, '') || '0');
|
|
69
|
+
const toAmount = (numericAmount * exchangeRate).toFixed(2);
|
|
70
|
+
const dollarValue = (
|
|
71
|
+
numericAmount * (payToken.symbol === 'ETH' ? 1845 : 1)
|
|
72
|
+
).toLocaleString(undefined, {
|
|
73
|
+
minimumFractionDigits: 2,
|
|
74
|
+
maximumFractionDigits: 2,
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<View style={styles.container}>
|
|
79
|
+
<View style={styles.header}>
|
|
80
|
+
<TouchableOpacity
|
|
81
|
+
onPress={() => router.back()}
|
|
82
|
+
style={styles.headerButton}
|
|
83
|
+
>
|
|
84
|
+
<Ionicons name="close" size={20} color="white" />
|
|
85
|
+
</TouchableOpacity>
|
|
86
|
+
<Text style={styles.headerTitle}>Swap Tokens</Text>
|
|
87
|
+
<TouchableOpacity style={styles.headerButton}>
|
|
88
|
+
<Ionicons name="settings-outline" size={20} color="white" />
|
|
89
|
+
</TouchableOpacity>
|
|
90
|
+
</View>
|
|
91
|
+
|
|
92
|
+
<Animated.View
|
|
93
|
+
entering={FadeInUp.delay(200).springify()}
|
|
94
|
+
style={styles.content}
|
|
95
|
+
>
|
|
96
|
+
{/* From Card */}
|
|
97
|
+
<View style={styles.card}>
|
|
98
|
+
<View style={styles.cardHeader}>
|
|
99
|
+
<Text style={styles.cardLabel}>Pay with</Text>
|
|
100
|
+
<Text style={styles.cardLabel}>Balance: 2.5 ETH</Text>
|
|
101
|
+
</View>
|
|
102
|
+
<View style={styles.cardContent}>
|
|
103
|
+
<View style={styles.tokenSelector}>
|
|
104
|
+
<View
|
|
105
|
+
style={[styles.tokenIcon, { backgroundColor: payToken.color }]}
|
|
106
|
+
>
|
|
107
|
+
<Text style={styles.tokenIconText}>{payToken.icon}</Text>
|
|
108
|
+
</View>
|
|
109
|
+
<Text style={styles.tokenSymbol}>{payToken.symbol}</Text>
|
|
110
|
+
<Ionicons name="chevron-down" size={16} color="#71717a" />
|
|
111
|
+
</View>
|
|
112
|
+
<TextInput
|
|
113
|
+
value={fromAmount}
|
|
114
|
+
onChangeText={handleAmountChange}
|
|
115
|
+
keyboardType="numeric"
|
|
116
|
+
placeholder="0"
|
|
117
|
+
placeholderTextColor="#52525b"
|
|
118
|
+
style={[
|
|
119
|
+
styles.amountInput,
|
|
120
|
+
{
|
|
121
|
+
fontSize: getFontSize(),
|
|
122
|
+
lineHeight: getFontSize() * 1.2,
|
|
123
|
+
},
|
|
124
|
+
]}
|
|
125
|
+
/>
|
|
126
|
+
</View>
|
|
127
|
+
<Text style={styles.cardDollarValue}>$ {dollarValue}</Text>
|
|
128
|
+
</View>
|
|
129
|
+
|
|
130
|
+
{/* Swap Trigger */}
|
|
131
|
+
<View style={styles.swapButtonContainer}>
|
|
132
|
+
<TouchableOpacity activeOpacity={0.9} onPress={handleSwapValues}>
|
|
133
|
+
<Animated.View style={[styles.swapButton, rotateStyle]}>
|
|
134
|
+
<Ionicons
|
|
135
|
+
name="arrow-down"
|
|
136
|
+
size={20}
|
|
137
|
+
color={FINANCE_COLORS.primary}
|
|
138
|
+
/>
|
|
139
|
+
</Animated.View>
|
|
140
|
+
</TouchableOpacity>
|
|
141
|
+
</View>
|
|
142
|
+
|
|
143
|
+
{/* To Card */}
|
|
144
|
+
<View style={styles.card}>
|
|
145
|
+
<View style={styles.cardHeader}>
|
|
146
|
+
<Text style={styles.cardLabel}>Receive</Text>
|
|
147
|
+
<Text style={styles.cardLabel}>Balance: 0 USDC</Text>
|
|
148
|
+
</View>
|
|
149
|
+
<View style={styles.cardContent}>
|
|
150
|
+
<View style={styles.tokenSelector}>
|
|
151
|
+
<View
|
|
152
|
+
style={[
|
|
153
|
+
styles.tokenIcon,
|
|
154
|
+
{ backgroundColor: receiveToken.color },
|
|
155
|
+
]}
|
|
156
|
+
>
|
|
157
|
+
<Text style={styles.tokenIconText}>{receiveToken.icon}</Text>
|
|
158
|
+
</View>
|
|
159
|
+
<Text style={styles.tokenSymbol}>{receiveToken.symbol}</Text>
|
|
160
|
+
<Ionicons name="chevron-down" size={16} color="#71717a" />
|
|
161
|
+
</View>
|
|
162
|
+
<Text
|
|
163
|
+
style={[
|
|
164
|
+
styles.toAmount,
|
|
165
|
+
!fromAmount && styles.toAmountEmpty,
|
|
166
|
+
{ lineHeight: 40 },
|
|
167
|
+
]}
|
|
168
|
+
>
|
|
169
|
+
{fromAmount ? toAmount : '0'}
|
|
170
|
+
</Text>
|
|
171
|
+
</View>
|
|
172
|
+
<Text style={styles.cardDollarValue}>
|
|
173
|
+
$ {fromAmount ? toAmount : '0.00'}
|
|
174
|
+
</Text>
|
|
175
|
+
</View>
|
|
176
|
+
|
|
177
|
+
{/* Info Grid */}
|
|
178
|
+
<View style={styles.infoGrid}>
|
|
179
|
+
<InfoRow
|
|
180
|
+
label="Rate"
|
|
181
|
+
value={`1 ${payToken.symbol} = ${exchangeRate.toFixed(4)} ${receiveToken.symbol}`}
|
|
182
|
+
/>
|
|
183
|
+
<InfoRow label="Network Fee" value="$4.50 (0.002 ETH)" />
|
|
184
|
+
<InfoRow label="Price Impact" value="< 0.01%" color="#10B981" />
|
|
185
|
+
</View>
|
|
186
|
+
</Animated.View>
|
|
187
|
+
|
|
188
|
+
<TouchableOpacity style={styles.swapActionButton}>
|
|
189
|
+
<Text style={styles.swapActionButtonText}>Swipe to Swap</Text>
|
|
190
|
+
</TouchableOpacity>
|
|
191
|
+
</View>
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function InfoRow({
|
|
196
|
+
label,
|
|
197
|
+
value,
|
|
198
|
+
color,
|
|
199
|
+
}: {
|
|
200
|
+
label: string;
|
|
201
|
+
value: string;
|
|
202
|
+
color?: string;
|
|
203
|
+
}) {
|
|
204
|
+
return (
|
|
205
|
+
<View style={styles.infoRow}>
|
|
206
|
+
<Text style={styles.infoLabel}>{label}</Text>
|
|
207
|
+
<Text style={[styles.infoValue, color ? { color } : null]}>{value}</Text>
|
|
208
|
+
</View>
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
const styles = StyleSheet.create({
|
|
213
|
+
container: {
|
|
214
|
+
flex: 1,
|
|
215
|
+
backgroundColor: '#09090b',
|
|
216
|
+
padding: 24,
|
|
217
|
+
paddingTop: 48,
|
|
218
|
+
},
|
|
219
|
+
header: {
|
|
220
|
+
flexDirection: 'row',
|
|
221
|
+
alignItems: 'center',
|
|
222
|
+
justifyContent: 'space-between',
|
|
223
|
+
marginBottom: 32,
|
|
224
|
+
},
|
|
225
|
+
headerButton: {
|
|
226
|
+
width: 40,
|
|
227
|
+
height: 40,
|
|
228
|
+
borderRadius: 20,
|
|
229
|
+
backgroundColor: '#18181b',
|
|
230
|
+
alignItems: 'center',
|
|
231
|
+
justifyContent: 'center',
|
|
232
|
+
},
|
|
233
|
+
headerTitle: {
|
|
234
|
+
color: '#ffffff',
|
|
235
|
+
fontWeight: '700',
|
|
236
|
+
fontSize: 18,
|
|
237
|
+
},
|
|
238
|
+
content: {
|
|
239
|
+
flex: 1,
|
|
240
|
+
},
|
|
241
|
+
card: {
|
|
242
|
+
backgroundColor: '#18181b',
|
|
243
|
+
borderRadius: 24,
|
|
244
|
+
padding: 20,
|
|
245
|
+
borderWidth: 1,
|
|
246
|
+
borderColor: '#27272a',
|
|
247
|
+
},
|
|
248
|
+
cardHeader: {
|
|
249
|
+
flexDirection: 'row',
|
|
250
|
+
justifyContent: 'space-between',
|
|
251
|
+
marginBottom: 16,
|
|
252
|
+
},
|
|
253
|
+
cardLabel: {
|
|
254
|
+
color: '#71717a',
|
|
255
|
+
fontWeight: '500',
|
|
256
|
+
fontSize: 12,
|
|
257
|
+
},
|
|
258
|
+
cardContent: {
|
|
259
|
+
flexDirection: 'row',
|
|
260
|
+
alignItems: 'center',
|
|
261
|
+
justifyContent: 'space-between',
|
|
262
|
+
},
|
|
263
|
+
tokenSelector: {
|
|
264
|
+
flexDirection: 'row',
|
|
265
|
+
alignItems: 'center',
|
|
266
|
+
gap: 8,
|
|
267
|
+
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
268
|
+
paddingLeft: 8,
|
|
269
|
+
paddingRight: 16,
|
|
270
|
+
paddingVertical: 8,
|
|
271
|
+
borderRadius: 20,
|
|
272
|
+
borderWidth: 1,
|
|
273
|
+
borderColor: '#27272a',
|
|
274
|
+
},
|
|
275
|
+
tokenIcon: {
|
|
276
|
+
width: 24,
|
|
277
|
+
height: 24,
|
|
278
|
+
borderRadius: 12,
|
|
279
|
+
alignItems: 'center',
|
|
280
|
+
justifyContent: 'center',
|
|
281
|
+
},
|
|
282
|
+
tokenIconText: {
|
|
283
|
+
color: '#ffffff',
|
|
284
|
+
fontWeight: '700',
|
|
285
|
+
fontSize: 10,
|
|
286
|
+
},
|
|
287
|
+
tokenSymbol: {
|
|
288
|
+
color: '#ffffff',
|
|
289
|
+
fontWeight: '700',
|
|
290
|
+
},
|
|
291
|
+
amountInput: {
|
|
292
|
+
color: '#ffffff',
|
|
293
|
+
fontWeight: '700',
|
|
294
|
+
textAlign: 'right',
|
|
295
|
+
minWidth: 100,
|
|
296
|
+
includeFontPadding: false,
|
|
297
|
+
},
|
|
298
|
+
cardDollarValue: {
|
|
299
|
+
color: '#71717a',
|
|
300
|
+
fontSize: 12,
|
|
301
|
+
textAlign: 'right',
|
|
302
|
+
marginTop: 8,
|
|
303
|
+
},
|
|
304
|
+
toAmount: {
|
|
305
|
+
color: '#ffffff',
|
|
306
|
+
fontSize: 30,
|
|
307
|
+
fontWeight: '700',
|
|
308
|
+
textAlign: 'right',
|
|
309
|
+
lineHeight: 40,
|
|
310
|
+
includeFontPadding: false,
|
|
311
|
+
},
|
|
312
|
+
toAmountEmpty: {
|
|
313
|
+
opacity: 0.5,
|
|
314
|
+
},
|
|
315
|
+
swapButtonContainer: {
|
|
316
|
+
alignItems: 'center',
|
|
317
|
+
marginVertical: -20,
|
|
318
|
+
zIndex: 10,
|
|
319
|
+
},
|
|
320
|
+
swapButton: {
|
|
321
|
+
width: 40,
|
|
322
|
+
height: 40,
|
|
323
|
+
borderRadius: 20,
|
|
324
|
+
borderWidth: 4,
|
|
325
|
+
borderColor: '#09090b',
|
|
326
|
+
backgroundColor: '#27272a',
|
|
327
|
+
alignItems: 'center',
|
|
328
|
+
justifyContent: 'center',
|
|
329
|
+
},
|
|
330
|
+
infoGrid: {
|
|
331
|
+
marginTop: 32,
|
|
332
|
+
gap: 16,
|
|
333
|
+
paddingHorizontal: 8,
|
|
334
|
+
},
|
|
335
|
+
infoRow: {
|
|
336
|
+
flexDirection: 'row',
|
|
337
|
+
justifyContent: 'space-between',
|
|
338
|
+
},
|
|
339
|
+
infoLabel: {
|
|
340
|
+
color: '#71717a',
|
|
341
|
+
fontSize: 14,
|
|
342
|
+
fontWeight: '500',
|
|
343
|
+
},
|
|
344
|
+
infoValue: {
|
|
345
|
+
color: '#d4d4d8',
|
|
346
|
+
fontSize: 14,
|
|
347
|
+
fontWeight: '700',
|
|
348
|
+
},
|
|
349
|
+
swapActionButton: {
|
|
350
|
+
width: '100%',
|
|
351
|
+
height: 64,
|
|
352
|
+
borderRadius: 16,
|
|
353
|
+
alignItems: 'center',
|
|
354
|
+
justifyContent: 'center',
|
|
355
|
+
marginBottom: 24,
|
|
356
|
+
backgroundColor: FINANCE_COLORS.primary,
|
|
357
|
+
},
|
|
358
|
+
swapActionButtonText: {
|
|
359
|
+
color: '#ffffff',
|
|
360
|
+
fontWeight: '700',
|
|
361
|
+
fontSize: 18,
|
|
362
|
+
},
|
|
363
|
+
});
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
2
|
+
import { Stack, useRouter } from 'expo-router';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { StyleSheet, TouchableOpacity, View } from 'react-native';
|
|
5
|
+
import Animated, {
|
|
6
|
+
FadeInUp,
|
|
7
|
+
useAnimatedScrollHandler,
|
|
8
|
+
useSharedValue,
|
|
9
|
+
} from 'react-native-reanimated';
|
|
10
|
+
|
|
11
|
+
import { FocusAwareStatusBar, Text } from '@/components/ui';
|
|
12
|
+
|
|
13
|
+
import { ActionButtons } from '../components/ActionButtons';
|
|
14
|
+
import { AssetRow } from '../components/AssetRow';
|
|
15
|
+
import { BalanceCard } from '../components/BalanceCard';
|
|
16
|
+
import { FINANCE_COLORS, MOCK_ASSETS } from '../constants';
|
|
17
|
+
|
|
18
|
+
export default function WalletDashboard() {
|
|
19
|
+
const router = useRouter();
|
|
20
|
+
const scrollY = useSharedValue(0);
|
|
21
|
+
|
|
22
|
+
const scrollHandler = useAnimatedScrollHandler((event) => {
|
|
23
|
+
scrollY.value = event.contentOffset.y;
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<View style={styles.container}>
|
|
28
|
+
<FocusAwareStatusBar barStyle="light-content" />
|
|
29
|
+
<Stack.Screen options={{ headerShown: false }} />
|
|
30
|
+
|
|
31
|
+
{/* Custom Header */}
|
|
32
|
+
<View style={styles.header}>
|
|
33
|
+
<View style={styles.profileSection}>
|
|
34
|
+
<View style={styles.avatar}>
|
|
35
|
+
<Text style={styles.avatarText}>MZ</Text>
|
|
36
|
+
</View>
|
|
37
|
+
<View>
|
|
38
|
+
<Text style={styles.greetingLabel}>Good Morning</Text>
|
|
39
|
+
<Text style={styles.greetingName}>Muhammad</Text>
|
|
40
|
+
</View>
|
|
41
|
+
</View>
|
|
42
|
+
<TouchableOpacity
|
|
43
|
+
onPress={() =>
|
|
44
|
+
router.push('/(root)/(protected)/screen-kits/finance/notifications')
|
|
45
|
+
}
|
|
46
|
+
style={styles.notificationButton}
|
|
47
|
+
>
|
|
48
|
+
<View style={styles.notificationDot} />
|
|
49
|
+
<Ionicons name="notifications-outline" size={20} color="white" />
|
|
50
|
+
</TouchableOpacity>
|
|
51
|
+
</View>
|
|
52
|
+
|
|
53
|
+
<Animated.ScrollView
|
|
54
|
+
onScroll={scrollHandler}
|
|
55
|
+
scrollEventThrottle={16}
|
|
56
|
+
contentContainerStyle={styles.scrollContent}
|
|
57
|
+
style={styles.scrollView}
|
|
58
|
+
>
|
|
59
|
+
<BalanceCard />
|
|
60
|
+
|
|
61
|
+
<ActionButtons
|
|
62
|
+
onSendBy={() =>
|
|
63
|
+
router.push('/(root)/(protected)/screen-kits/finance/send')
|
|
64
|
+
}
|
|
65
|
+
onReceive={() =>
|
|
66
|
+
router.push('/(root)/(protected)/screen-kits/finance/receive')
|
|
67
|
+
}
|
|
68
|
+
onSwap={() =>
|
|
69
|
+
router.push('/(root)/(protected)/screen-kits/finance/swap')
|
|
70
|
+
}
|
|
71
|
+
onBuy={() =>
|
|
72
|
+
router.push('/(root)/(protected)/screen-kits/finance/asset-detail')
|
|
73
|
+
}
|
|
74
|
+
/>
|
|
75
|
+
|
|
76
|
+
<View style={styles.assetsSection}>
|
|
77
|
+
<View style={styles.assetsSectionHeader}>
|
|
78
|
+
<Text style={styles.assetsSectionTitle}>Your Assets</Text>
|
|
79
|
+
<TouchableOpacity>
|
|
80
|
+
<Text style={styles.seeAllText}>See All</Text>
|
|
81
|
+
</TouchableOpacity>
|
|
82
|
+
</View>
|
|
83
|
+
|
|
84
|
+
<View style={styles.assetsList}>
|
|
85
|
+
{MOCK_ASSETS.map((asset, index) => (
|
|
86
|
+
<Animated.View
|
|
87
|
+
key={asset.id}
|
|
88
|
+
entering={FadeInUp.delay(400 + index * 100).springify()}
|
|
89
|
+
>
|
|
90
|
+
<AssetRow
|
|
91
|
+
asset={asset}
|
|
92
|
+
onPress={() =>
|
|
93
|
+
router.push({
|
|
94
|
+
pathname:
|
|
95
|
+
'/(root)/(protected)/screen-kits/finance/asset-detail',
|
|
96
|
+
params: {
|
|
97
|
+
...asset,
|
|
98
|
+
chartData: JSON.stringify(asset.chartData),
|
|
99
|
+
},
|
|
100
|
+
})
|
|
101
|
+
}
|
|
102
|
+
/>
|
|
103
|
+
</Animated.View>
|
|
104
|
+
))}
|
|
105
|
+
</View>
|
|
106
|
+
</View>
|
|
107
|
+
|
|
108
|
+
{/* Promo / News Card (Horizontal Scroll) */}
|
|
109
|
+
<Text style={styles.marketUpdatesTitle}>Market Updates</Text>
|
|
110
|
+
<Animated.ScrollView
|
|
111
|
+
horizontal
|
|
112
|
+
showsHorizontalScrollIndicator={false}
|
|
113
|
+
style={styles.horizontalScroll}
|
|
114
|
+
contentContainerStyle={styles.horizontalScrollContent}
|
|
115
|
+
>
|
|
116
|
+
{[1, 2, 3].map((i) => (
|
|
117
|
+
<View key={i} style={styles.newsCard}>
|
|
118
|
+
<View style={styles.newsCardHeader}>
|
|
119
|
+
<View style={styles.newsBadge}>
|
|
120
|
+
<Text style={styles.newsBadgeText}>CRYPTO NEWS</Text>
|
|
121
|
+
</View>
|
|
122
|
+
<Text style={styles.newsTime}>2h ago</Text>
|
|
123
|
+
</View>
|
|
124
|
+
<Text style={styles.newsHeadline}>
|
|
125
|
+
Bitcoin surges past $28k following new ETF approval rumors.
|
|
126
|
+
</Text>
|
|
127
|
+
</View>
|
|
128
|
+
))}
|
|
129
|
+
</Animated.ScrollView>
|
|
130
|
+
</Animated.ScrollView>
|
|
131
|
+
</View>
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const styles = StyleSheet.create({
|
|
136
|
+
container: {
|
|
137
|
+
flex: 1,
|
|
138
|
+
backgroundColor: FINANCE_COLORS.background,
|
|
139
|
+
},
|
|
140
|
+
header: {
|
|
141
|
+
flexDirection: 'row',
|
|
142
|
+
alignItems: 'center',
|
|
143
|
+
justifyContent: 'space-between',
|
|
144
|
+
paddingHorizontal: 24,
|
|
145
|
+
paddingTop: 56,
|
|
146
|
+
paddingBottom: 16,
|
|
147
|
+
backgroundColor: 'rgba(9, 9, 11, 0.8)',
|
|
148
|
+
zIndex: 10,
|
|
149
|
+
},
|
|
150
|
+
profileSection: {
|
|
151
|
+
flexDirection: 'row',
|
|
152
|
+
alignItems: 'center',
|
|
153
|
+
gap: 12,
|
|
154
|
+
},
|
|
155
|
+
avatar: {
|
|
156
|
+
width: 40,
|
|
157
|
+
height: 40,
|
|
158
|
+
borderRadius: 20,
|
|
159
|
+
backgroundColor: '#27272a',
|
|
160
|
+
alignItems: 'center',
|
|
161
|
+
justifyContent: 'center',
|
|
162
|
+
borderWidth: 1,
|
|
163
|
+
borderColor: '#3f3f46',
|
|
164
|
+
},
|
|
165
|
+
avatarText: {
|
|
166
|
+
fontWeight: '700',
|
|
167
|
+
fontSize: 18,
|
|
168
|
+
color: '#ffffff',
|
|
169
|
+
},
|
|
170
|
+
greetingLabel: {
|
|
171
|
+
color: '#a1a1aa',
|
|
172
|
+
fontSize: 12,
|
|
173
|
+
textTransform: 'uppercase',
|
|
174
|
+
letterSpacing: 1,
|
|
175
|
+
fontWeight: '700',
|
|
176
|
+
},
|
|
177
|
+
greetingName: {
|
|
178
|
+
color: '#ffffff',
|
|
179
|
+
fontWeight: '700',
|
|
180
|
+
fontSize: 18,
|
|
181
|
+
},
|
|
182
|
+
notificationButton: {
|
|
183
|
+
width: 40,
|
|
184
|
+
height: 40,
|
|
185
|
+
borderRadius: 20,
|
|
186
|
+
backgroundColor: '#18181b',
|
|
187
|
+
alignItems: 'center',
|
|
188
|
+
justifyContent: 'center',
|
|
189
|
+
borderWidth: 1,
|
|
190
|
+
borderColor: '#27272a',
|
|
191
|
+
},
|
|
192
|
+
notificationDot: {
|
|
193
|
+
position: 'absolute',
|
|
194
|
+
top: 8,
|
|
195
|
+
right: 10,
|
|
196
|
+
width: 8,
|
|
197
|
+
height: 8,
|
|
198
|
+
borderRadius: 4,
|
|
199
|
+
backgroundColor: '#ef4444',
|
|
200
|
+
zIndex: 10,
|
|
201
|
+
borderWidth: 1,
|
|
202
|
+
borderColor: '#18181b',
|
|
203
|
+
},
|
|
204
|
+
scrollView: {
|
|
205
|
+
flex: 1,
|
|
206
|
+
paddingHorizontal: 24,
|
|
207
|
+
},
|
|
208
|
+
scrollContent: {
|
|
209
|
+
paddingBottom: 100,
|
|
210
|
+
},
|
|
211
|
+
assetsSection: {
|
|
212
|
+
marginBottom: 24,
|
|
213
|
+
},
|
|
214
|
+
assetsSectionHeader: {
|
|
215
|
+
flexDirection: 'row',
|
|
216
|
+
alignItems: 'center',
|
|
217
|
+
justifyContent: 'space-between',
|
|
218
|
+
marginBottom: 16,
|
|
219
|
+
},
|
|
220
|
+
assetsSectionTitle: {
|
|
221
|
+
fontSize: 20,
|
|
222
|
+
fontWeight: '700',
|
|
223
|
+
color: '#ffffff',
|
|
224
|
+
},
|
|
225
|
+
seeAllText: {
|
|
226
|
+
color: '#71717a',
|
|
227
|
+
fontSize: 14,
|
|
228
|
+
fontWeight: '500',
|
|
229
|
+
},
|
|
230
|
+
assetsList: {
|
|
231
|
+
gap: 8,
|
|
232
|
+
},
|
|
233
|
+
marketUpdatesTitle: {
|
|
234
|
+
fontSize: 20,
|
|
235
|
+
fontWeight: '700',
|
|
236
|
+
color: '#ffffff',
|
|
237
|
+
marginBottom: 16,
|
|
238
|
+
},
|
|
239
|
+
horizontalScroll: {
|
|
240
|
+
marginHorizontal: -24,
|
|
241
|
+
},
|
|
242
|
+
horizontalScrollContent: {
|
|
243
|
+
paddingHorizontal: 24,
|
|
244
|
+
},
|
|
245
|
+
newsCard: {
|
|
246
|
+
width: 256,
|
|
247
|
+
height: 128,
|
|
248
|
+
borderRadius: 16,
|
|
249
|
+
backgroundColor: '#18181b',
|
|
250
|
+
borderWidth: 1,
|
|
251
|
+
borderColor: '#27272a',
|
|
252
|
+
marginRight: 16,
|
|
253
|
+
padding: 16,
|
|
254
|
+
justifyContent: 'space-between',
|
|
255
|
+
},
|
|
256
|
+
newsCardHeader: {
|
|
257
|
+
flexDirection: 'row',
|
|
258
|
+
justifyContent: 'space-between',
|
|
259
|
+
},
|
|
260
|
+
newsBadge: {
|
|
261
|
+
backgroundColor: 'rgba(139, 92, 246, 0.2)',
|
|
262
|
+
paddingHorizontal: 8,
|
|
263
|
+
paddingVertical: 4,
|
|
264
|
+
borderRadius: 6,
|
|
265
|
+
alignSelf: 'flex-start',
|
|
266
|
+
},
|
|
267
|
+
newsBadgeText: {
|
|
268
|
+
color: '#a78bfa',
|
|
269
|
+
fontSize: 10,
|
|
270
|
+
fontWeight: '700',
|
|
271
|
+
},
|
|
272
|
+
newsTime: {
|
|
273
|
+
color: '#71717a',
|
|
274
|
+
fontSize: 12,
|
|
275
|
+
},
|
|
276
|
+
newsHeadline: {
|
|
277
|
+
color: '#ffffff',
|
|
278
|
+
fontWeight: '700',
|
|
279
|
+
lineHeight: 20,
|
|
280
|
+
},
|
|
281
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "screen-kits-finance",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Screen kit: DeFi Wallet (finance dashboard)",
|
|
5
|
+
"copy": [
|
|
6
|
+
{
|
|
7
|
+
"from": "apps/native/src/app/screen-kits/finance",
|
|
8
|
+
"to": "apps/native/src/app/(root)/(protected)/screen-kits/finance"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"from": "apps/native/src/features/screen-kits/finance",
|
|
12
|
+
"to": "apps/native/src/features/screen-kits/finance"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"screenKit": {
|
|
16
|
+
"id": "finance",
|
|
17
|
+
"title": "DeFi Wallet",
|
|
18
|
+
"description": "Crypto dashboard & assets",
|
|
19
|
+
"icon": "🪙",
|
|
20
|
+
"color": "#8b5cf6",
|
|
21
|
+
"screens": [
|
|
22
|
+
{
|
|
23
|
+
"id": "wallet",
|
|
24
|
+
"name": "Wallet Dashboard",
|
|
25
|
+
"description": "Balance overview with interactive charts",
|
|
26
|
+
"route": "/screen-kits/finance/wallet"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"target": "native",
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"expo": [
|
|
33
|
+
"@expo/vector-icons",
|
|
34
|
+
"@gorhom/bottom-sheet",
|
|
35
|
+
"expo-blur",
|
|
36
|
+
"expo-haptics",
|
|
37
|
+
"expo-linear-gradient",
|
|
38
|
+
"lottie-react-native",
|
|
39
|
+
"react-native-css-interop",
|
|
40
|
+
"react-native-gesture-handler",
|
|
41
|
+
"react-native-reanimated",
|
|
42
|
+
"react-native-safe-area-context",
|
|
43
|
+
"react-native-svg"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
Binary file
|