vibefast-cli 1.1.5 → 1.2.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/CHANGELOG.md +32 -0
- package/README.md +63 -169
- package/dist/commands/add.d.ts +1 -1
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +547 -589
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/checklist.d.ts +1 -1
- package/dist/commands/checklist.d.ts.map +1 -1
- package/dist/commands/checklist.js +40 -39
- package/dist/commands/checklist.js.map +1 -1
- package/dist/commands/doctor.d.ts +1 -1
- package/dist/commands/doctor.js +22 -22
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/env.d.ts +1 -1
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/env.js +58 -53
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/health.d.ts +1 -1
- package/dist/commands/health.d.ts.map +1 -1
- package/dist/commands/health.js +101 -93
- package/dist/commands/health.js.map +1 -1
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +416 -296
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/remove.d.ts +1 -1
- package/dist/commands/remove.d.ts.map +1 -1
- package/dist/commands/remove.js +77 -64
- package/dist/commands/remove.js.map +1 -1
- package/dist/commands/status.d.ts +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +15 -14
- package/dist/commands/status.js.map +1 -1
- package/dist/core/__tests__/detect.test.js +68 -34
- package/dist/core/__tests__/detect.test.js.map +1 -1
- package/dist/core/ast.d.ts +14 -0
- package/dist/core/ast.d.ts.map +1 -0
- package/dist/core/ast.js +239 -0
- package/dist/core/ast.js.map +1 -0
- package/dist/core/codemod.d.ts.map +1 -1
- package/dist/core/codemod.js +62 -44
- package/dist/core/codemod.js.map +1 -1
- package/dist/core/config.d.ts +10 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +51 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/detect.d.ts +8 -2
- package/dist/core/detect.d.ts.map +1 -1
- package/dist/core/detect.js +52 -21
- package/dist/core/detect.js.map +1 -1
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +9 -8
- package/dist/core/errors.js.map +1 -1
- package/dist/core/exec.d.ts +16 -0
- package/dist/core/exec.d.ts.map +1 -0
- package/dist/core/exec.js +48 -0
- package/dist/core/exec.js.map +1 -0
- package/dist/core/manualSteps.d.ts +7 -0
- package/dist/core/manualSteps.d.ts.map +1 -0
- package/dist/core/manualSteps.js +59 -0
- package/dist/core/manualSteps.js.map +1 -0
- package/dist/core/paths.d.ts +3 -1
- package/dist/core/paths.d.ts.map +1 -1
- package/dist/core/paths.js +14 -10
- package/dist/core/paths.js.map +1 -1
- package/dist/core/spinner.d.ts +1 -1
- package/dist/core/spinner.d.ts.map +1 -1
- package/dist/core/spinner.js +38 -8
- package/dist/core/spinner.js.map +1 -1
- package/dist/core/vosk.d.ts.map +1 -1
- package/dist/core/vosk.js +50 -39
- package/dist/core/vosk.js.map +1 -1
- package/docs/manual-testing.md +91 -0
- package/package.json +6 -3
- package/recipes/audio-recorder/apps/native/src/app/audio-recorder/index.tsx +5 -0
- package/recipes/audio-recorder/recipe.json +3 -3
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/components/audio-player.tsx +301 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/components/audio-recorder.tsx +373 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/components/audio-waveform.tsx +270 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/components/index.ts +4 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/components/recording-list.tsx +89 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/demo/audio-player-demo.tsx +66 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/demo/audio-recorder-cloud.tsx +68 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/demo/audio-recorder-interview.tsx +102 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/demo/basic.tsx +27 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/demo/index.ts +5 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/demo/with-recording-list-demo.tsx +82 -0
- package/recipes/audio-recorder-supabase/packages/backend/src/services/recordings.ts +369 -0
- package/recipes/audio-recorder-supabase/packages/backend/supabase/migrations/recordings.sql +70 -0
- package/recipes/audio-recorder-supabase/recipe.json +35 -0
- package/recipes/audio-recorder-supabase@latest.zip +0 -0
- package/recipes/audio-recorder@latest.zip +0 -0
- package/recipes/charts/apps/native/src/features/charts/components/bar-chart.tsx +3 -3
- package/recipes/charts/apps/native/src/features/charts/components/candlestick-chart.tsx +2 -2
- package/recipes/charts/apps/native/src/features/charts/components/chart-card.tsx +5 -5
- package/recipes/charts/apps/native/src/features/charts/components/column-chart.tsx +3 -3
- package/recipes/charts/apps/native/src/features/charts/components/doughnut-chart.tsx +20 -4
- package/recipes/charts/apps/native/src/features/charts/components/line-chart.tsx +7 -6
- package/recipes/charts/apps/native/src/features/charts/components/radar-chart.tsx +6 -4
- package/recipes/charts/apps/native/src/features/charts/components/radial-bar-chart.tsx +1 -1
- package/recipes/charts/apps/native/src/features/charts/components/stacked-bar-chart.tsx +5 -4
- package/recipes/charts/recipe.json +4 -13
- package/recipes/charts@latest.zip +0 -0
- package/recipes/chatbot/apps/native/src/app/chatbot/index.tsx +1 -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 +86 -53
- package/recipes/chatbot/recipe.json +26 -92
- package/recipes/chatbot-supabase/apps/native/src/api-client/supabase/chatbot.ts +515 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/app/index.tsx +257 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/chat-header-buttons.tsx +59 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/chat-input-bar.tsx +485 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/chat-markdown.tsx +575 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/chat-message-bubble.tsx +223 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/chat-settings-modal.tsx +161 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/image-preview-list.tsx +116 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/markdown/code-block.tsx +165 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/markdown/index.ts +10 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/markdown/table-renderer.tsx +129 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/message-error-boundary.tsx +78 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/message-list.tsx +170 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/model-selector.tsx +283 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/report-content-modal.tsx +188 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/suggested-messages.tsx +67 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/constants/models.ts +20 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/constants/report-reasons.ts +9 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-attachment-cache.ts +142 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-chat-config.ts +458 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-chat-handlers.ts +429 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-chatbot-settings.ts +89 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-conversation.ts +90 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-image-picker.ts +122 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-keyboard-coordinator.ts +161 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/hooks/use-smart-scroll-manager.ts +213 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/models/index.ts +86 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/models/models.ts +162 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/models/providers.ts +62 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/models/types.ts +40 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/services/file-uploader.ts +287 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/services/message-handler-service.ts +189 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/types/index.ts +70 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/utils/chat-telemetry.ts +91 -0
- package/recipes/chatbot-supabase/packages/backend/src/services/conversations.ts +243 -0
- package/recipes/chatbot-supabase/packages/backend/src/services/messages.ts +327 -0
- package/recipes/chatbot-supabase/packages/backend/supabase/functions/chat-stream/index.ts +347 -0
- package/recipes/chatbot-supabase/packages/backend/supabase/migrations/chatbot.sql +104 -0
- package/recipes/chatbot-supabase/recipe.json +79 -0
- package/recipes/chatbot-supabase@latest.zip +0 -0
- package/recipes/chatbot.zip +0 -0
- package/recipes/chatbot@latest.zip +0 -0
- package/recipes/image-analysis/packages/backend/convex/imageAnalysis/index.ts +2 -2
- package/recipes/image-analysis/packages/backend/convex/imageAnalysis.ts +0 -1
- package/recipes/image-analysis/recipe.json +15 -55
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/analysis-options-screen.tsx +304 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/camera.tsx +221 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/image-capture-screen.tsx +333 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/loading-screen.tsx +214 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/loading.tsx +191 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/results.tsx +137 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/trait-details.tsx +172 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/use-analysis-data.ts +160 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/app/use-results-screen.ts +151 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/achievement-badge.tsx +77 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/achievement-card.tsx +75 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/achievement-unlocked-modal.tsx +162 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/achievements-section.tsx +44 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/advice-list.tsx +42 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/circular-progress.tsx +233 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/content-card.tsx +38 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/error-state.tsx +42 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/index.ts +9 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/loading-state.tsx +26 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/profile-image.tsx +60 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/results-header.tsx +62 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/score-display.tsx +54 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/share-options-modal.tsx +110 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/components/results/traits-grid.tsx +74 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/config/analysis-config.ts +80 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/config/master-analysis-config.ts +157 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/hooks/index.ts +1 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/hooks/use-analysis.ts +38 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/hooks/use-image-analysis.ts +208 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/services/analysis-service.ts +262 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/services/share-service.ts +176 -0
- package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/services/trait-details-service.ts +289 -0
- package/recipes/image-analysis-supabase/packages/backend/src/services/image-analyses.ts +132 -0
- package/recipes/image-analysis-supabase/packages/backend/supabase/functions/analyze-image/index.ts +312 -0
- package/recipes/image-analysis-supabase/packages/backend/supabase/migrations/image_analysis.sql +42 -0
- package/recipes/image-analysis-supabase/recipe.json +57 -0
- package/recipes/image-analysis-supabase@latest.zip +0 -0
- package/recipes/image-analysis@latest.zip +0 -0
- package/recipes/image-generator/apps/native/src/features/image-generator/app/index.tsx +16 -2
- package/recipes/image-generator/apps/native/src/features/image-generator/components/image-model-selector.tsx +11 -5
- package/recipes/image-generator/apps/native/src/features/image-generator/hooks/use-image-generator.ts +11 -5
- package/recipes/image-generator/packages/backend/convex/imageGeneration/index.ts +2 -2
- package/recipes/image-generator/recipe.json +16 -39
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/app/_layout.tsx +26 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/app/gallery.tsx +217 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/app/index.tsx +251 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/components/gallery-image.tsx +25 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/components/image-detail-modal.tsx +215 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/components/image-model-selector.tsx +216 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/components/image-placeholder.tsx +26 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/hooks/use-image-gallery.ts +71 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/hooks/use-image-generator-settings.ts +152 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/hooks/use-image-generator.ts +103 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/models/models.ts +66 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/services/image-gallery-service.ts +96 -0
- package/recipes/image-generator-supabase/apps/native/src/features/image-generator/services/image-save-service.ts +120 -0
- package/recipes/image-generator-supabase/packages/backend/supabase/functions/generate-image/index.ts +291 -0
- package/recipes/image-generator-supabase/packages/backend/supabase/migrations/image_generator.sql +71 -0
- package/recipes/image-generator-supabase/recipe.json +59 -0
- package/recipes/image-generator-supabase@latest.zip +0 -0
- package/recipes/image-generator@latest.zip +0 -0
- package/recipes/ios-widget/recipe.json +15 -24
- package/recipes/ios-widget@latest.zip +0 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/analytics/index.ts +9 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/components/onboarding-with-analytics.tsx +141 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/components/onboarding.tsx +173 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/config/onboarding-flow-config.ts +189 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/demo-one/app/index.tsx +42 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/demo-one/data.ts +32 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/app/index.tsx +43 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/interactive-onboarding.tsx +222 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/ai-tone-step.tsx +133 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/currency-step.tsx +165 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-ai-step.tsx +199 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-chatbot-step.tsx +154 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-manual-step.tsx +156 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-scan-step.tsx +158 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/main-reason-step.tsx +139 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/notification-step.tsx +129 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/overspend-step.tsx +138 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/personalizing-step.tsx +190 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/rating-step.tsx +98 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/reminder-step.tsx +181 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/safety-step.tsx +110 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/struggle-step.tsx +139 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/welcome-step.tsx +217 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/ui/onboarding-header.tsx +58 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/constants.ts +179 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/hooks/use-onboarding-analytics.ts +323 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/services/onboarding-analytics.ts +432 -0
- package/recipes/onboarding/recipe.json +15 -0
- package/recipes/onboarding@latest.zip +0 -0
- package/recipes/payments/recipe.json +28 -61
- package/recipes/payments-supabase/apps/native/src/features/payments/README.md +200 -0
- package/recipes/payments-supabase/apps/native/src/features/payments/app/local-paywall.tsx +194 -0
- package/recipes/payments-supabase/apps/native/src/features/payments/app/remote-paywall.tsx +79 -0
- package/recipes/payments-supabase/apps/native/src/features/payments/components/payment-initializer.tsx +95 -0
- package/recipes/payments-supabase/apps/native/src/features/payments/components/paywall-error-state.tsx +60 -0
- package/recipes/payments-supabase/apps/native/src/features/payments/components/paywall-local-mode.tsx +116 -0
- package/recipes/payments-supabase/apps/native/src/features/payments/components/paywall-product-card.tsx +133 -0
- package/recipes/payments-supabase/apps/native/src/features/payments/components/paywall-remote-mode.tsx +146 -0
- package/recipes/payments-supabase/apps/native/src/features/payments/hooks/use-entitlement.ts +63 -0
- package/recipes/payments-supabase/apps/native/src/features/payments/index.ts +8 -0
- package/recipes/payments-supabase/apps/native/src/features/payments/services/revenuecat-adapter.ts +407 -0
- package/recipes/payments-supabase/packages/backend/src/services/payments.ts +201 -0
- package/recipes/payments-supabase/packages/backend/supabase/migrations/payments.sql +35 -0
- package/recipes/payments-supabase/recipe.json +51 -0
- package/recipes/payments-supabase@latest.zip +0 -0
- package/recipes/payments@latest.zip +0 -0
- package/recipes/quiz/apps/native/src/features/quiz/index.tsx +1 -2
- package/recipes/quiz/recipe.json +6 -9
- package/recipes/quiz@latest.zip +0 -0
- package/recipes/tracker-app/apps/native/src/features/tracker-app/app/index.tsx +1 -2
- package/recipes/tracker-app/recipe.json +7 -10
- package/recipes/tracker-app@latest.zip +0 -0
- package/recipes/voice-bot/recipe.json +8 -68
- package/recipes/voice-bot.zip +0 -0
- package/recipes/voice-bot@latest.zip +0 -0
- package/recipes/wake-word/recipe.json +10 -9
- package/recipes/wake-word.zip +0 -0
- package/recipes/wake-word@latest.zip +0 -0
- package/recipes/charts/apps/native/src/app/(root)/(protected)/charts/index.tsx +0 -3
- package/recipes/chatbot/packages/backend/convex/lib/rateLimit.ts +0 -100
- package/recipes/chatbot/packages/backend/convex/lib/telemetry.ts +0 -29
- package/recipes/chatbot/packages/backend/convex/ragKnowledge.ts +0 -0
- package/recipes/image-analysis/apps/native/assets/features/image-analyzer/front.jpg +0 -0
- package/recipes/image-analysis/apps/native/assets/features/image-analyzer/side.jpg +0 -0
- package/recipes/image-analysis/apps/native/assets/features/image-analyzer/threeQuarter.jpg +0 -0
- package/recipes/image-analysis/apps/native/src/app/(root)/(protected)/analysis/[type]/_layout.tsx +0 -5
- package/recipes/image-analysis/apps/native/src/app/(root)/(protected)/analysis/[type]/analysis-options.tsx +0 -50
- package/recipes/image-analysis/apps/native/src/app/(root)/(protected)/analysis/[type]/camera.tsx +0 -2
- package/recipes/image-analysis/apps/native/src/app/(root)/(protected)/analysis/[type]/index.tsx +0 -50
- package/recipes/image-analysis/apps/native/src/app/(root)/(protected)/analysis/[type]/loading.tsx +0 -50
- package/recipes/image-analysis/apps/native/src/app/(root)/(protected)/analysis/[type]/results.tsx +0 -2
- package/recipes/image-analysis/apps/native/src/app/(root)/(protected)/analysis/[type]/trait-details.tsx +0 -3
- package/recipes/image-analysis/packages/backend/convex/imageAnalysisFunctions.ts +0 -325
- package/recipes/image-analysis/packages/backend/convex/lib/ai/imageAnalysisAdapter.ts +0 -200
- package/recipes/payments/apps/native/src/app/(root)/(protected)/paywall/index.tsx +0 -74
- package/recipes/payments/apps/native/src/app/(root)/(protected)/paywall/local.tsx +0 -25
- package/recipes/payments/apps/native/src/app/(root)/(protected)/paywall/remote.tsx +0 -23
- package/recipes/quiz/apps/native/src/app/(root)/(protected)/quiz/index.tsx +0 -47
- package/recipes/tracker-app/apps/native/src/app/(root)/(protected)/tracker-app/index.tsx +0 -1
- package/recipes/voice-bot/apps/native/src/app/(root)/(protected)/voice-bot/index.tsx +0 -27
- package/recipes/voice-bot/packages/backend/convex/router.ts +0 -81
- /package/recipes/{chatbot/apps/native/src/app/(root)/(protected) → chatbot-supabase/apps/native/src/app}/chatbot/index.tsx +0 -0
- /package/recipes/{image-generator/apps/native/src/app/(root)/(protected) → image-generator-supabase/apps/native/src/app}/image-generator/gallery.tsx +0 -0
- /package/recipes/{image-generator/apps/native/src/app/(root)/(protected) → image-generator-supabase/apps/native/src/app}/image-generator/index.tsx +0 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, ScrollView } from 'react-native';
|
|
3
|
+
import Animated, { FadeIn, FadeOut, FadeInDown } from 'react-native-reanimated';
|
|
4
|
+
import { Text, Button, Pressable } from '@/components/ui';
|
|
5
|
+
import { useThemeConfig } from '@/lib/use-theme-config';
|
|
6
|
+
import { MaterialCommunityIcons } from '@expo/vector-icons';
|
|
7
|
+
import * as Haptics from 'expo-haptics';
|
|
8
|
+
|
|
9
|
+
interface MainReasonStepProps {
|
|
10
|
+
selectedReason: string | null;
|
|
11
|
+
onSelectReason: (reason: string) => void;
|
|
12
|
+
onNext: () => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const REASONS = [
|
|
16
|
+
{
|
|
17
|
+
id: 'spend_less',
|
|
18
|
+
label: 'Spend less without feeling restricted',
|
|
19
|
+
icon: 'wallet-outline',
|
|
20
|
+
color: '#10B981',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: 'understand',
|
|
24
|
+
label: 'Understand where my money goes',
|
|
25
|
+
icon: 'chart-pie',
|
|
26
|
+
color: '#3B82F6',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: 'habits',
|
|
30
|
+
label: 'Break bad spending habits',
|
|
31
|
+
icon: 'lightning-bolt-outline',
|
|
32
|
+
color: '#F59E0B',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 'save',
|
|
36
|
+
label: 'Save more each month',
|
|
37
|
+
icon: 'piggy-bank-outline',
|
|
38
|
+
color: '#8B5CF6',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: 'track',
|
|
42
|
+
label: 'Just track things and see patterns',
|
|
43
|
+
icon: 'chart-timeline-variant',
|
|
44
|
+
color: '#EC4899',
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
export function MainReasonStep({
|
|
49
|
+
selectedReason,
|
|
50
|
+
onSelectReason,
|
|
51
|
+
onNext,
|
|
52
|
+
}: MainReasonStepProps) {
|
|
53
|
+
const theme = useThemeConfig();
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<Animated.View
|
|
57
|
+
entering={FadeIn}
|
|
58
|
+
exiting={FadeOut}
|
|
59
|
+
className="flex-1 px-6 pt-4"
|
|
60
|
+
>
|
|
61
|
+
<Text className="text-3xl font-bold mb-3">
|
|
62
|
+
What do you want this app to help you with the most?
|
|
63
|
+
</Text>
|
|
64
|
+
<Text className="text-lg text-muted-foreground mb-8">
|
|
65
|
+
We'll tailor your AI coach.
|
|
66
|
+
</Text>
|
|
67
|
+
|
|
68
|
+
<ScrollView className="flex-1" showsVerticalScrollIndicator={false}>
|
|
69
|
+
<View className="gap-3 pb-8">
|
|
70
|
+
{REASONS.map((item, index) => (
|
|
71
|
+
<Animated.View
|
|
72
|
+
entering={FadeInDown.delay(index * 100).duration(400)}
|
|
73
|
+
key={item.id}
|
|
74
|
+
>
|
|
75
|
+
<Pressable
|
|
76
|
+
onPress={() => onSelectReason(item.id)}
|
|
77
|
+
className={`flex-row items-center p-4 rounded-2xl border relative overflow-hidden ${
|
|
78
|
+
selectedReason === item.id
|
|
79
|
+
? 'border-transparent'
|
|
80
|
+
: 'border-border bg-card'
|
|
81
|
+
}`}
|
|
82
|
+
style={
|
|
83
|
+
selectedReason === item.id
|
|
84
|
+
? { borderColor: item.color, borderWidth: 2 }
|
|
85
|
+
: {}
|
|
86
|
+
}
|
|
87
|
+
>
|
|
88
|
+
{selectedReason === item.id && (
|
|
89
|
+
<View
|
|
90
|
+
className="absolute inset-0 opacity-10"
|
|
91
|
+
style={{ backgroundColor: item.color }}
|
|
92
|
+
/>
|
|
93
|
+
)}
|
|
94
|
+
|
|
95
|
+
<View
|
|
96
|
+
className="p-3 rounded-full mr-4"
|
|
97
|
+
style={{ backgroundColor: item.color + '20' }}
|
|
98
|
+
>
|
|
99
|
+
<MaterialCommunityIcons
|
|
100
|
+
name={item.icon as any}
|
|
101
|
+
size={24}
|
|
102
|
+
color={item.color}
|
|
103
|
+
/>
|
|
104
|
+
</View>
|
|
105
|
+
|
|
106
|
+
<Text
|
|
107
|
+
className={`flex-1 font-medium text-base text-foreground`}
|
|
108
|
+
>
|
|
109
|
+
{item.label}
|
|
110
|
+
</Text>
|
|
111
|
+
|
|
112
|
+
{selectedReason === item.id && (
|
|
113
|
+
<MaterialCommunityIcons
|
|
114
|
+
name="check-circle"
|
|
115
|
+
size={24}
|
|
116
|
+
color={item.color}
|
|
117
|
+
/>
|
|
118
|
+
)}
|
|
119
|
+
</Pressable>
|
|
120
|
+
</Animated.View>
|
|
121
|
+
))}
|
|
122
|
+
</View>
|
|
123
|
+
</ScrollView>
|
|
124
|
+
|
|
125
|
+
<View className="pt-4 border-t border-border bg-background">
|
|
126
|
+
<Button
|
|
127
|
+
label="Continue"
|
|
128
|
+
onPress={() => {
|
|
129
|
+
Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Medium);
|
|
130
|
+
onNext();
|
|
131
|
+
}}
|
|
132
|
+
disabled={!selectedReason}
|
|
133
|
+
size="lg"
|
|
134
|
+
className="w-full m-0"
|
|
135
|
+
/>
|
|
136
|
+
</View>
|
|
137
|
+
</Animated.View>
|
|
138
|
+
);
|
|
139
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { View, Alert, Linking } from 'react-native';
|
|
3
|
+
import Animated, { ZoomIn, FadeIn, FadeOut } from 'react-native-reanimated';
|
|
4
|
+
import { Text, Button } from '@/components/ui';
|
|
5
|
+
import { useThemeConfig } from '@/lib/use-theme-config';
|
|
6
|
+
import { MaterialCommunityIcons } from '@expo/vector-icons';
|
|
7
|
+
import * as Notifications from 'expo-notifications';
|
|
8
|
+
import * as Haptics from 'expo-haptics';
|
|
9
|
+
|
|
10
|
+
interface NotificationStepProps {
|
|
11
|
+
onEnable: () => void;
|
|
12
|
+
onSkip: () => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function NotificationStep({ onEnable, onSkip }: NotificationStepProps) {
|
|
16
|
+
const theme = useThemeConfig();
|
|
17
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
18
|
+
|
|
19
|
+
const handleEnable = async () => {
|
|
20
|
+
Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Medium);
|
|
21
|
+
setIsLoading(true);
|
|
22
|
+
try {
|
|
23
|
+
const { status: existingStatus } =
|
|
24
|
+
await Notifications.getPermissionsAsync();
|
|
25
|
+
let finalStatus = existingStatus;
|
|
26
|
+
|
|
27
|
+
if (existingStatus !== 'granted') {
|
|
28
|
+
const { status } = await Notifications.requestPermissionsAsync();
|
|
29
|
+
finalStatus = status;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (finalStatus !== 'granted') {
|
|
33
|
+
Alert.alert(
|
|
34
|
+
'Permission Required',
|
|
35
|
+
'Please enable notifications in settings to receive updates.',
|
|
36
|
+
[
|
|
37
|
+
{ text: 'Cancel', style: 'cancel', onPress: onSkip },
|
|
38
|
+
{ text: 'Settings', onPress: () => Linking.openSettings() },
|
|
39
|
+
],
|
|
40
|
+
);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
onEnable();
|
|
45
|
+
} catch (error) {
|
|
46
|
+
console.error('Error requesting notification permissions:', error);
|
|
47
|
+
onSkip();
|
|
48
|
+
} finally {
|
|
49
|
+
setIsLoading(false);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<Animated.View
|
|
55
|
+
entering={FadeIn}
|
|
56
|
+
exiting={FadeOut}
|
|
57
|
+
className="flex-1 px-6 pt-12 justify-between"
|
|
58
|
+
>
|
|
59
|
+
<View className="items-center">
|
|
60
|
+
<Animated.View
|
|
61
|
+
entering={ZoomIn.springify()}
|
|
62
|
+
className="bg-primary/10 p-8 rounded-full mb-8"
|
|
63
|
+
>
|
|
64
|
+
<MaterialCommunityIcons
|
|
65
|
+
name="bell-ring-outline"
|
|
66
|
+
size={64}
|
|
67
|
+
color={theme.colors.primary}
|
|
68
|
+
/>
|
|
69
|
+
</Animated.View>
|
|
70
|
+
|
|
71
|
+
<Text className="text-3xl font-bold mb-4 text-center">
|
|
72
|
+
Stay on Track
|
|
73
|
+
</Text>
|
|
74
|
+
<Text className="text-lg text-muted-foreground text-center mb-12 px-4">
|
|
75
|
+
Enable notifications to get your daily spending recap and AI alerts
|
|
76
|
+
when you're going off track.
|
|
77
|
+
</Text>
|
|
78
|
+
|
|
79
|
+
<View className="bg-card p-6 rounded-2xl border border-border w-full">
|
|
80
|
+
<View className="flex-row items-center mb-4">
|
|
81
|
+
<MaterialCommunityIcons
|
|
82
|
+
name="check"
|
|
83
|
+
size={20}
|
|
84
|
+
color={theme.colors.primary}
|
|
85
|
+
/>
|
|
86
|
+
<Text className="ml-3 font-medium">Daily evening recap</Text>
|
|
87
|
+
</View>
|
|
88
|
+
<View className="flex-row items-center mb-4">
|
|
89
|
+
<MaterialCommunityIcons
|
|
90
|
+
name="check"
|
|
91
|
+
size={20}
|
|
92
|
+
color={theme.colors.primary}
|
|
93
|
+
/>
|
|
94
|
+
<Text className="ml-3 font-medium">Budget alerts</Text>
|
|
95
|
+
</View>
|
|
96
|
+
<View className="flex-row items-center">
|
|
97
|
+
<MaterialCommunityIcons
|
|
98
|
+
name="check"
|
|
99
|
+
size={20}
|
|
100
|
+
color={theme.colors.primary}
|
|
101
|
+
/>
|
|
102
|
+
<Text className="ml-3 font-medium">Smart challenges</Text>
|
|
103
|
+
</View>
|
|
104
|
+
</View>
|
|
105
|
+
</View>
|
|
106
|
+
|
|
107
|
+
<View className="pt-4 border-t border-border bg-background gap-4">
|
|
108
|
+
<Button
|
|
109
|
+
label={isLoading ? 'Enabling...' : 'Enable Notifications'}
|
|
110
|
+
onPress={handleEnable}
|
|
111
|
+
size="lg"
|
|
112
|
+
disabled={isLoading}
|
|
113
|
+
className="w-full m-0 shadow-lg shadow-primary/20"
|
|
114
|
+
/>
|
|
115
|
+
<Button
|
|
116
|
+
label="Maybe Later"
|
|
117
|
+
variant="ghost"
|
|
118
|
+
onPress={() => {
|
|
119
|
+
Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
|
|
120
|
+
onSkip();
|
|
121
|
+
}}
|
|
122
|
+
size="lg"
|
|
123
|
+
disabled={isLoading}
|
|
124
|
+
className="w-full m-0"
|
|
125
|
+
/>
|
|
126
|
+
</View>
|
|
127
|
+
</Animated.View>
|
|
128
|
+
);
|
|
129
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, ScrollView } from 'react-native';
|
|
3
|
+
import Animated, { FadeIn, FadeOut, FadeInDown } from 'react-native-reanimated';
|
|
4
|
+
import { Text, Button, Pressable } from '@/components/ui';
|
|
5
|
+
import { useThemeConfig } from '@/lib/use-theme-config';
|
|
6
|
+
import { MaterialCommunityIcons } from '@expo/vector-icons';
|
|
7
|
+
import * as Haptics from 'expo-haptics';
|
|
8
|
+
|
|
9
|
+
interface OverspendStepProps {
|
|
10
|
+
selectedCategories: string[];
|
|
11
|
+
onToggleCategory: (category: string) => void;
|
|
12
|
+
onNext: () => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const CATEGORIES = [
|
|
16
|
+
{
|
|
17
|
+
id: 'food',
|
|
18
|
+
label: 'Food & drinks',
|
|
19
|
+
icon: 'food-fork-drink',
|
|
20
|
+
color: '#F59E0B',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: 'groceries',
|
|
24
|
+
label: 'Groceries',
|
|
25
|
+
icon: 'cart-outline',
|
|
26
|
+
color: '#10B981',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: 'shopping',
|
|
30
|
+
label: 'Shopping & clothes',
|
|
31
|
+
icon: 'tshirt-crew-outline',
|
|
32
|
+
color: '#EC4899',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 'transport',
|
|
36
|
+
label: 'Transport & rides',
|
|
37
|
+
icon: 'car-outline',
|
|
38
|
+
color: '#3B82F6',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: 'subs',
|
|
42
|
+
label: 'Subscriptions & digital stuff',
|
|
43
|
+
icon: 'youtube-subscription',
|
|
44
|
+
color: '#8B5CF6',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: 'entertainment',
|
|
48
|
+
label: 'Entertainment / going out',
|
|
49
|
+
icon: 'movie-open-outline',
|
|
50
|
+
color: '#6366F1',
|
|
51
|
+
},
|
|
52
|
+
{ id: 'unsure', label: "I'm not sure", icon: 'help', color: '#9CA3AF' },
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
export function OverspendStep({
|
|
56
|
+
selectedCategories,
|
|
57
|
+
onToggleCategory,
|
|
58
|
+
onNext,
|
|
59
|
+
}: OverspendStepProps) {
|
|
60
|
+
const theme = useThemeConfig();
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<Animated.View
|
|
64
|
+
entering={FadeIn}
|
|
65
|
+
exiting={FadeOut}
|
|
66
|
+
className="flex-1 px-6 pt-4"
|
|
67
|
+
>
|
|
68
|
+
<Text className="text-3xl font-bold mb-3">
|
|
69
|
+
Where do you suspect you overspend?
|
|
70
|
+
</Text>
|
|
71
|
+
<Text className="text-lg text-muted-foreground mb-8">
|
|
72
|
+
Select all that apply.
|
|
73
|
+
</Text>
|
|
74
|
+
|
|
75
|
+
<ScrollView className="flex-1" showsVerticalScrollIndicator={false}>
|
|
76
|
+
<View className="flex-row flex-wrap gap-3 pb-8">
|
|
77
|
+
{CATEGORIES.map((item, index) => {
|
|
78
|
+
const isSelected = selectedCategories.includes(item.id);
|
|
79
|
+
return (
|
|
80
|
+
<Animated.View
|
|
81
|
+
entering={FadeInDown.delay(index * 100).duration(400)}
|
|
82
|
+
key={item.id}
|
|
83
|
+
className="w-[48%]"
|
|
84
|
+
>
|
|
85
|
+
<Pressable
|
|
86
|
+
onPress={() => onToggleCategory(item.id)}
|
|
87
|
+
className={`p-4 rounded-2xl border-2 items-center justify-center h-32 relative overflow-hidden ${
|
|
88
|
+
isSelected ? 'border-transparent' : 'border-border bg-card'
|
|
89
|
+
}`}
|
|
90
|
+
style={isSelected ? { borderColor: item.color } : {}}
|
|
91
|
+
>
|
|
92
|
+
{isSelected && (
|
|
93
|
+
<View
|
|
94
|
+
className="absolute inset-0 opacity-10"
|
|
95
|
+
style={{ backgroundColor: item.color }}
|
|
96
|
+
/>
|
|
97
|
+
)}
|
|
98
|
+
|
|
99
|
+
<MaterialCommunityIcons
|
|
100
|
+
name={item.icon as any}
|
|
101
|
+
size={32}
|
|
102
|
+
color={item.color}
|
|
103
|
+
style={{ marginBottom: 8 }}
|
|
104
|
+
/>
|
|
105
|
+
<Text className={`font-semibold text-center text-foreground`}>
|
|
106
|
+
{item.label}
|
|
107
|
+
</Text>
|
|
108
|
+
{isSelected && (
|
|
109
|
+
<View className="absolute top-2 right-2">
|
|
110
|
+
<MaterialCommunityIcons
|
|
111
|
+
name="check-circle"
|
|
112
|
+
size={16}
|
|
113
|
+
color={item.color}
|
|
114
|
+
/>
|
|
115
|
+
</View>
|
|
116
|
+
)}
|
|
117
|
+
</Pressable>
|
|
118
|
+
</Animated.View>
|
|
119
|
+
);
|
|
120
|
+
})}
|
|
121
|
+
</View>
|
|
122
|
+
</ScrollView>
|
|
123
|
+
|
|
124
|
+
<View className="pt-4 border-t border-border bg-background">
|
|
125
|
+
<Button
|
|
126
|
+
label="Continue"
|
|
127
|
+
onPress={() => {
|
|
128
|
+
Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Medium);
|
|
129
|
+
onNext();
|
|
130
|
+
}}
|
|
131
|
+
disabled={selectedCategories.length === 0}
|
|
132
|
+
size="lg"
|
|
133
|
+
className="w-full m-0"
|
|
134
|
+
/>
|
|
135
|
+
</View>
|
|
136
|
+
</Animated.View>
|
|
137
|
+
);
|
|
138
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { View, Dimensions } from 'react-native';
|
|
3
|
+
import Animated, {
|
|
4
|
+
FadeIn,
|
|
5
|
+
useAnimatedStyle,
|
|
6
|
+
useSharedValue,
|
|
7
|
+
withRepeat,
|
|
8
|
+
withSequence,
|
|
9
|
+
withTiming,
|
|
10
|
+
Easing,
|
|
11
|
+
interpolate,
|
|
12
|
+
} from 'react-native-reanimated';
|
|
13
|
+
import { MaterialCommunityIcons } from '@expo/vector-icons';
|
|
14
|
+
import { Text } from '@/components/ui';
|
|
15
|
+
import { useThemeConfig } from '@/lib/use-theme-config';
|
|
16
|
+
import { LinearGradient } from 'expo-linear-gradient';
|
|
17
|
+
|
|
18
|
+
interface PersonalizingStepProps {
|
|
19
|
+
onComplete: () => void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const STEPS = [
|
|
23
|
+
{
|
|
24
|
+
text: 'Analyzing your preferences...',
|
|
25
|
+
icon: 'chart-box-outline',
|
|
26
|
+
color: '#6366F1',
|
|
27
|
+
},
|
|
28
|
+
{ text: 'Configuring AI Coach...', icon: 'robot', color: '#8B5CF6' },
|
|
29
|
+
{
|
|
30
|
+
text: 'Setting up secure vault...',
|
|
31
|
+
icon: 'shield-check',
|
|
32
|
+
color: '#10B981',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
text: 'Personalizing dashboard...',
|
|
36
|
+
icon: 'view-dashboard-variant',
|
|
37
|
+
color: '#F59E0B',
|
|
38
|
+
},
|
|
39
|
+
{ text: 'Ready for takeoff! 🚀', icon: 'rocket-launch', color: '#EC4899' },
|
|
40
|
+
];
|
|
41
|
+
|
|
42
|
+
const { width } = Dimensions.get('window');
|
|
43
|
+
|
|
44
|
+
export function PersonalizingStep({ onComplete }: PersonalizingStepProps) {
|
|
45
|
+
const theme = useThemeConfig();
|
|
46
|
+
const [currentStep, setCurrentStep] = useState(0);
|
|
47
|
+
|
|
48
|
+
const progress = useSharedValue(0);
|
|
49
|
+
const circleScale = useSharedValue(1);
|
|
50
|
+
const iconOpacity = useSharedValue(1);
|
|
51
|
+
const ringRotation = useSharedValue(0);
|
|
52
|
+
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
// Pulse animation
|
|
55
|
+
circleScale.value = withRepeat(
|
|
56
|
+
withSequence(
|
|
57
|
+
withTiming(1.1, { duration: 1500, easing: Easing.inOut(Easing.ease) }),
|
|
58
|
+
withTiming(1, { duration: 1500, easing: Easing.inOut(Easing.ease) }),
|
|
59
|
+
),
|
|
60
|
+
-1,
|
|
61
|
+
true,
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
// Ring rotation
|
|
65
|
+
ringRotation.value = withRepeat(
|
|
66
|
+
withTiming(360, { duration: 8000, easing: Easing.linear }),
|
|
67
|
+
-1,
|
|
68
|
+
false,
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
// Progress sequence
|
|
72
|
+
const interval = setInterval(() => {
|
|
73
|
+
setCurrentStep((prev) => {
|
|
74
|
+
if (prev < STEPS.length - 1) {
|
|
75
|
+
// Animate icon transition
|
|
76
|
+
iconOpacity.value = 0;
|
|
77
|
+
setTimeout(() => {
|
|
78
|
+
iconOpacity.value = withTiming(1);
|
|
79
|
+
}, 300);
|
|
80
|
+
return prev + 1;
|
|
81
|
+
}
|
|
82
|
+
clearInterval(interval);
|
|
83
|
+
setTimeout(onComplete, 1500);
|
|
84
|
+
return prev;
|
|
85
|
+
});
|
|
86
|
+
}, 2000);
|
|
87
|
+
|
|
88
|
+
return () => clearInterval(interval);
|
|
89
|
+
}, []);
|
|
90
|
+
|
|
91
|
+
useEffect(() => {
|
|
92
|
+
progress.value = withTiming((currentStep + 1) / STEPS.length, {
|
|
93
|
+
duration: 500,
|
|
94
|
+
});
|
|
95
|
+
}, [currentStep]);
|
|
96
|
+
|
|
97
|
+
const animatedRingStyle = useAnimatedStyle(() => ({
|
|
98
|
+
transform: [{ rotate: `${ringRotation.value}deg` }],
|
|
99
|
+
}));
|
|
100
|
+
|
|
101
|
+
const animatedIconStyle = useAnimatedStyle(() => ({
|
|
102
|
+
opacity: iconOpacity.value,
|
|
103
|
+
transform: [{ scale: interpolate(iconOpacity.value, [0, 1], [0.5, 1]) }],
|
|
104
|
+
}));
|
|
105
|
+
|
|
106
|
+
const animatedProgressStyle = useAnimatedStyle(() => ({
|
|
107
|
+
width: `${progress.value * 100}%`,
|
|
108
|
+
backgroundColor: STEPS[currentStep].color,
|
|
109
|
+
}));
|
|
110
|
+
|
|
111
|
+
return (
|
|
112
|
+
<Animated.View
|
|
113
|
+
entering={FadeIn}
|
|
114
|
+
className="flex-1 items-center justify-center px-6 bg-background"
|
|
115
|
+
>
|
|
116
|
+
{/* Background Gradient Mesh (Subtle) */}
|
|
117
|
+
<View className="absolute inset-0 opacity-20">
|
|
118
|
+
<LinearGradient
|
|
119
|
+
colors={[STEPS[currentStep].color + '40', 'transparent']}
|
|
120
|
+
style={{ flex: 1 }}
|
|
121
|
+
start={{ x: 0.5, y: 0 }}
|
|
122
|
+
end={{ x: 0.5, y: 1 }}
|
|
123
|
+
/>
|
|
124
|
+
</View>
|
|
125
|
+
|
|
126
|
+
<View className="items-center justify-center mb-16 relative">
|
|
127
|
+
{/* Outer Rotating Ring */}
|
|
128
|
+
<Animated.View
|
|
129
|
+
className="absolute w-72 h-72 rounded-full border-2 border-dashed border-muted-foreground/20"
|
|
130
|
+
style={animatedRingStyle}
|
|
131
|
+
/>
|
|
132
|
+
|
|
133
|
+
{/* Inner Pulsing Circle */}
|
|
134
|
+
<Animated.View
|
|
135
|
+
style={[
|
|
136
|
+
{
|
|
137
|
+
width: width * 0.5,
|
|
138
|
+
height: width * 0.5,
|
|
139
|
+
borderRadius: width * 0.25,
|
|
140
|
+
alignItems: 'center',
|
|
141
|
+
justifyContent: 'center',
|
|
142
|
+
backgroundColor: theme.colors.card,
|
|
143
|
+
shadowColor: STEPS[currentStep].color,
|
|
144
|
+
shadowOffset: { width: 0, height: 0 },
|
|
145
|
+
shadowOpacity: 0.5,
|
|
146
|
+
shadowRadius: 30,
|
|
147
|
+
elevation: 20,
|
|
148
|
+
borderWidth: 1,
|
|
149
|
+
borderColor: theme.colors.border,
|
|
150
|
+
},
|
|
151
|
+
useAnimatedStyle(() => ({
|
|
152
|
+
transform: [{ scale: circleScale.value }],
|
|
153
|
+
})),
|
|
154
|
+
]}
|
|
155
|
+
>
|
|
156
|
+
<Animated.View style={animatedIconStyle}>
|
|
157
|
+
<MaterialCommunityIcons
|
|
158
|
+
name={STEPS[currentStep].icon as any}
|
|
159
|
+
size={64}
|
|
160
|
+
color={STEPS[currentStep].color}
|
|
161
|
+
/>
|
|
162
|
+
</Animated.View>
|
|
163
|
+
</Animated.View>
|
|
164
|
+
</View>
|
|
165
|
+
|
|
166
|
+
<View className="h-32 items-center justify-center w-full">
|
|
167
|
+
<Animated.Text
|
|
168
|
+
key={currentStep}
|
|
169
|
+
entering={FadeIn.duration(600).springify()}
|
|
170
|
+
className="text-3xl font-bold text-center mb-3"
|
|
171
|
+
style={{ color: theme.colors.foreground }}
|
|
172
|
+
>
|
|
173
|
+
{STEPS[currentStep].text}
|
|
174
|
+
</Animated.Text>
|
|
175
|
+
|
|
176
|
+
<Text className="text-muted-foreground text-center">
|
|
177
|
+
Please wait while we set things up...
|
|
178
|
+
</Text>
|
|
179
|
+
</View>
|
|
180
|
+
|
|
181
|
+
{/* Progress Bar */}
|
|
182
|
+
<View className="w-full h-1.5 bg-muted rounded-full overflow-hidden mt-8 max-w-xs">
|
|
183
|
+
<Animated.View
|
|
184
|
+
className="h-full rounded-full"
|
|
185
|
+
style={animatedProgressStyle}
|
|
186
|
+
/>
|
|
187
|
+
</View>
|
|
188
|
+
</Animated.View>
|
|
189
|
+
);
|
|
190
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import Animated, { FadeInDown, FadeIn, FadeOut } from 'react-native-reanimated';
|
|
4
|
+
import { Text, Button, Pressable } from '@/components/ui';
|
|
5
|
+
import { useThemeConfig } from '@/lib/use-theme-config';
|
|
6
|
+
import { MaterialCommunityIcons } from '@expo/vector-icons';
|
|
7
|
+
import * as StoreReview from 'expo-store-review';
|
|
8
|
+
import * as Haptics from 'expo-haptics';
|
|
9
|
+
|
|
10
|
+
interface RatingStepProps {
|
|
11
|
+
onNext: () => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function RatingStep({ onNext }: RatingStepProps) {
|
|
15
|
+
const theme = useThemeConfig();
|
|
16
|
+
const [rating, setRating] = useState(0);
|
|
17
|
+
|
|
18
|
+
const handleNext = async () => {
|
|
19
|
+
Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Medium);
|
|
20
|
+
if (rating === 5) {
|
|
21
|
+
if (await StoreReview.hasAction()) {
|
|
22
|
+
try {
|
|
23
|
+
await StoreReview.requestReview();
|
|
24
|
+
} catch (error) {
|
|
25
|
+
console.log('Error requesting review:', error);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
onNext();
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<Animated.View
|
|
34
|
+
entering={FadeIn}
|
|
35
|
+
exiting={FadeOut}
|
|
36
|
+
className="flex-1 px-6 pt-12 justify-between"
|
|
37
|
+
>
|
|
38
|
+
<View className="items-center mt-20">
|
|
39
|
+
<Text className="text-3xl font-bold mb-4 text-center">Support Us</Text>
|
|
40
|
+
<Text className="text-lg text-muted-foreground text-center mb-12 px-4">
|
|
41
|
+
Your feedback helps us improve and reach more people.
|
|
42
|
+
</Text>
|
|
43
|
+
|
|
44
|
+
<View className="flex-row justify-center gap-2 mb-12">
|
|
45
|
+
{[1, 2, 3, 4, 5].map((star) => (
|
|
46
|
+
<Pressable
|
|
47
|
+
key={star}
|
|
48
|
+
onPress={() => {
|
|
49
|
+
Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
|
|
50
|
+
setRating(star);
|
|
51
|
+
}}
|
|
52
|
+
>
|
|
53
|
+
<Animated.View
|
|
54
|
+
entering={FadeInDown.delay(star * 100).duration(400)}
|
|
55
|
+
className="p-1"
|
|
56
|
+
>
|
|
57
|
+
<MaterialCommunityIcons
|
|
58
|
+
name={star <= rating ? 'star' : 'star-outline'}
|
|
59
|
+
size={48}
|
|
60
|
+
color={
|
|
61
|
+
star <= rating ? '#FFD700' : theme.colors.mutedForeground
|
|
62
|
+
}
|
|
63
|
+
style={{
|
|
64
|
+
shadowColor: star <= rating ? '#FFD700' : 'transparent',
|
|
65
|
+
shadowOpacity: 0.5,
|
|
66
|
+
shadowRadius: 10,
|
|
67
|
+
shadowOffset: { width: 0, height: 0 },
|
|
68
|
+
}}
|
|
69
|
+
/>
|
|
70
|
+
</Animated.View>
|
|
71
|
+
</Pressable>
|
|
72
|
+
))}
|
|
73
|
+
</View>
|
|
74
|
+
|
|
75
|
+
{rating > 0 && (
|
|
76
|
+
<Animated.View
|
|
77
|
+
entering={FadeInDown.duration(400)}
|
|
78
|
+
className="bg-primary/10 px-6 py-3 rounded-full mb-8"
|
|
79
|
+
>
|
|
80
|
+
<Text className="text-primary font-bold">
|
|
81
|
+
{rating === 5 ? "You're awesome! 🚀" : 'Thanks for feedback! 🙏'}
|
|
82
|
+
</Text>
|
|
83
|
+
</Animated.View>
|
|
84
|
+
)}
|
|
85
|
+
</View>
|
|
86
|
+
|
|
87
|
+
<View className="pt-4 border-t border-border bg-background">
|
|
88
|
+
<Button
|
|
89
|
+
label={rating > 0 ? 'Continue' : 'Skip'}
|
|
90
|
+
onPress={handleNext}
|
|
91
|
+
size="lg"
|
|
92
|
+
className="w-full m-0"
|
|
93
|
+
variant={rating > 0 ? 'default' : 'ghost'}
|
|
94
|
+
/>
|
|
95
|
+
</View>
|
|
96
|
+
</Animated.View>
|
|
97
|
+
);
|
|
98
|
+
}
|