vibefast-cli 1.1.5 → 1.3.0
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/__tests__/recipes.test.js +89 -85
- package/dist/__tests__/recipes.test.js.map +1 -1
- package/dist/commands/add.d.ts +1 -1
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +576 -588
- 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 +52 -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 +106 -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 +90 -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 +86 -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 +72 -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,62 @@
|
|
|
1
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
2
|
+
import { Platform, View } from 'react-native';
|
|
3
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
4
|
+
import Animated, {
|
|
5
|
+
Extrapolation,
|
|
6
|
+
interpolate,
|
|
7
|
+
useAnimatedStyle,
|
|
8
|
+
} from 'react-native-reanimated';
|
|
9
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
10
|
+
|
|
11
|
+
import { Pressable, Text } from '@/components/ui';
|
|
12
|
+
import { useResponsiveSize } from '@/lib/hooks';
|
|
13
|
+
import { useThemeConfig } from '@/lib/use-theme-config';
|
|
14
|
+
|
|
15
|
+
type ResultsHeaderProps = {
|
|
16
|
+
onBack: () => void;
|
|
17
|
+
scrollY: SharedValue<number>;
|
|
18
|
+
title?: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export function ResultsHeader({
|
|
22
|
+
onBack,
|
|
23
|
+
scrollY,
|
|
24
|
+
title = 'Analysis Results',
|
|
25
|
+
}: ResultsHeaderProps) {
|
|
26
|
+
const theme = useThemeConfig();
|
|
27
|
+
const isDarkMode = theme.dark;
|
|
28
|
+
const { isTablet } = useResponsiveSize();
|
|
29
|
+
const insets = useSafeAreaInsets();
|
|
30
|
+
|
|
31
|
+
const headerAnimatedStyle = useAnimatedStyle(() => ({
|
|
32
|
+
opacity: interpolate(scrollY.value, [0, 50], [1, 0], Extrapolation.CLAMP),
|
|
33
|
+
}));
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<Animated.View
|
|
37
|
+
style={[
|
|
38
|
+
{ paddingTop: insets.top + (Platform.OS === 'android' ? 10 : 0) },
|
|
39
|
+
headerAnimatedStyle,
|
|
40
|
+
]}
|
|
41
|
+
className={`absolute inset-x-0 top-0 z-10 flex-row items-center justify-between border-b px-4 pb-2 ${isDarkMode ? 'border-neutral-700/30 bg-neutral-800/80' : 'border-neutral-200/50 bg-neutral-100/80'}`}
|
|
42
|
+
>
|
|
43
|
+
<Pressable
|
|
44
|
+
onPress={onBack}
|
|
45
|
+
hitSlop={8}
|
|
46
|
+
className={`items-center justify-center rounded-full ${isTablet ? 'size-12' : 'size-10'} ${isDarkMode ? 'bg-neutral-700/80' : 'bg-neutral-200/80'}`}
|
|
47
|
+
>
|
|
48
|
+
<Ionicons
|
|
49
|
+
name="chevron-back"
|
|
50
|
+
size={isTablet ? 30 : 24}
|
|
51
|
+
color={isDarkMode ? '#FFFFFF' : '#000000'}
|
|
52
|
+
/>
|
|
53
|
+
</Pressable>
|
|
54
|
+
<Text
|
|
55
|
+
className={`font-bold ${isTablet ? 'text-2xl' : 'text-xl'} ${isDarkMode ? 'text-white' : 'text-neutral-900'}`}
|
|
56
|
+
>
|
|
57
|
+
{title}
|
|
58
|
+
</Text>
|
|
59
|
+
<View className={`${isTablet ? 'w-12' : 'w-10'}`} />
|
|
60
|
+
</Animated.View>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import { Text } from '@/components/ui';
|
|
4
|
+
import { useThemeConfig } from '@/lib/use-theme-config';
|
|
5
|
+
|
|
6
|
+
import { CircularProgress } from './circular-progress';
|
|
7
|
+
|
|
8
|
+
type ScoreDisplayProps = {
|
|
9
|
+
score: number;
|
|
10
|
+
scoreLevel: string;
|
|
11
|
+
scoreColor: string;
|
|
12
|
+
scoreDescription: string;
|
|
13
|
+
size?: number;
|
|
14
|
+
strokeWidth?: number;
|
|
15
|
+
showScore?: boolean;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export function ScoreDisplay({
|
|
19
|
+
score,
|
|
20
|
+
scoreLevel,
|
|
21
|
+
scoreColor,
|
|
22
|
+
scoreDescription,
|
|
23
|
+
size = 140,
|
|
24
|
+
strokeWidth = 16,
|
|
25
|
+
showScore = false,
|
|
26
|
+
}: ScoreDisplayProps) {
|
|
27
|
+
const theme = useThemeConfig();
|
|
28
|
+
const isDarkMode = theme.dark;
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<View className="items-center justify-center">
|
|
32
|
+
<CircularProgress
|
|
33
|
+
value={score}
|
|
34
|
+
size={size}
|
|
35
|
+
strokeWidth={strokeWidth}
|
|
36
|
+
label={showScore ? `${score}/100` : ''}
|
|
37
|
+
isCard={false}
|
|
38
|
+
/>
|
|
39
|
+
|
|
40
|
+
<View className="mt-2 items-center">
|
|
41
|
+
<Text className="text-xl font-bold" style={{ color: scoreColor }}>
|
|
42
|
+
{scoreLevel}
|
|
43
|
+
</Text>
|
|
44
|
+
<Text
|
|
45
|
+
className={`mt-1 text-center text-sm ${
|
|
46
|
+
isDarkMode ? 'text-neutral-400' : 'text-neutral-600'
|
|
47
|
+
}`}
|
|
48
|
+
>
|
|
49
|
+
{scoreDescription}
|
|
50
|
+
</Text>
|
|
51
|
+
</View>
|
|
52
|
+
</View>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { Modal, TouchableOpacity, View } from 'react-native';
|
|
2
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
3
|
+
|
|
4
|
+
import { Button, Text } from '@/components/ui';
|
|
5
|
+
import { useThemeConfig } from '@/lib/use-theme-config';
|
|
6
|
+
|
|
7
|
+
import type {
|
|
8
|
+
AnalysisScores,
|
|
9
|
+
LocalAnalysis,
|
|
10
|
+
} from '../../services/analysis-service';
|
|
11
|
+
import { formatTraitName } from '../../services/analysis-service';
|
|
12
|
+
import { ShareService } from '../../services/share-service';
|
|
13
|
+
|
|
14
|
+
type ShareOptionsModalProps = {
|
|
15
|
+
visible: boolean;
|
|
16
|
+
onClose: () => void;
|
|
17
|
+
analysis: LocalAnalysis;
|
|
18
|
+
extractedScores: AnalysisScores;
|
|
19
|
+
imageUrl?: string | null;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export function ShareOptionsModal({
|
|
23
|
+
visible,
|
|
24
|
+
onClose,
|
|
25
|
+
analysis,
|
|
26
|
+
extractedScores,
|
|
27
|
+
imageUrl,
|
|
28
|
+
}: ShareOptionsModalProps) {
|
|
29
|
+
const theme = useThemeConfig();
|
|
30
|
+
const isDarkMode = theme.dark;
|
|
31
|
+
const insets = useSafeAreaInsets();
|
|
32
|
+
|
|
33
|
+
// Find the highest scoring trait for quick summary
|
|
34
|
+
const topTrait = Object.entries(extractedScores)
|
|
35
|
+
.filter(([key]) => key !== 'overall')
|
|
36
|
+
.reduce(
|
|
37
|
+
(max, [key, score]) =>
|
|
38
|
+
score > max.score ? { name: formatTraitName(key), score } : max,
|
|
39
|
+
{ name: '', score: 0 },
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
const handleFullResults = async () => {
|
|
43
|
+
await ShareService.shareAnalysisResults(
|
|
44
|
+
analysis,
|
|
45
|
+
extractedScores,
|
|
46
|
+
imageUrl,
|
|
47
|
+
);
|
|
48
|
+
onClose();
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const handleQuickSummary = async () => {
|
|
52
|
+
await ShareService.shareQuickSummary(extractedScores.overall, topTrait);
|
|
53
|
+
onClose();
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<Modal
|
|
58
|
+
visible={visible}
|
|
59
|
+
transparent
|
|
60
|
+
animationType="slide"
|
|
61
|
+
onRequestClose={onClose}
|
|
62
|
+
>
|
|
63
|
+
<View className="flex-1 justify-end bg-black/50">
|
|
64
|
+
<TouchableOpacity
|
|
65
|
+
className="flex-1"
|
|
66
|
+
onPress={onClose}
|
|
67
|
+
activeOpacity={1}
|
|
68
|
+
/>
|
|
69
|
+
|
|
70
|
+
<View
|
|
71
|
+
className={`rounded-t-3xl px-6 pt-6 ${
|
|
72
|
+
isDarkMode ? 'bg-neutral-800' : 'bg-white'
|
|
73
|
+
}`}
|
|
74
|
+
style={{ paddingBottom: insets.bottom + 24 }}
|
|
75
|
+
>
|
|
76
|
+
{/* Handle bar */}
|
|
77
|
+
<View
|
|
78
|
+
className={`mx-auto mb-6 h-1 w-12 rounded-full ${
|
|
79
|
+
isDarkMode ? 'bg-neutral-600' : 'bg-neutral-300'
|
|
80
|
+
}`}
|
|
81
|
+
/>
|
|
82
|
+
|
|
83
|
+
<Text
|
|
84
|
+
className={`mb-6 text-center text-xl font-semibold ${
|
|
85
|
+
isDarkMode ? 'text-white' : 'text-neutral-900'
|
|
86
|
+
}`}
|
|
87
|
+
>
|
|
88
|
+
Share Your Results
|
|
89
|
+
</Text>
|
|
90
|
+
|
|
91
|
+
<View className="gap-y-3">
|
|
92
|
+
<Button
|
|
93
|
+
label="📊 Share Full Analysis"
|
|
94
|
+
onPress={handleFullResults}
|
|
95
|
+
variant="default"
|
|
96
|
+
/>
|
|
97
|
+
|
|
98
|
+
<Button
|
|
99
|
+
label="⚡ Share Quick Summary"
|
|
100
|
+
onPress={handleQuickSummary}
|
|
101
|
+
variant="outline"
|
|
102
|
+
/>
|
|
103
|
+
|
|
104
|
+
<Button label="Cancel" onPress={onClose} variant="ghost" />
|
|
105
|
+
</View>
|
|
106
|
+
</View>
|
|
107
|
+
</View>
|
|
108
|
+
</Modal>
|
|
109
|
+
);
|
|
110
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { memo } from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
4
|
+
import Animated, { useAnimatedStyle } from 'react-native-reanimated';
|
|
5
|
+
|
|
6
|
+
import { useResponsiveSize } from '@/lib/hooks';
|
|
7
|
+
|
|
8
|
+
import { CircularProgress } from './circular-progress';
|
|
9
|
+
|
|
10
|
+
type TraitScore = {
|
|
11
|
+
key: string;
|
|
12
|
+
trait: string;
|
|
13
|
+
score: number;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
type TraitsGridProps = {
|
|
17
|
+
overallScore: number;
|
|
18
|
+
traitScores: TraitScore[];
|
|
19
|
+
scale: SharedValue<number>;
|
|
20
|
+
onTraitPress: (trait: string) => void;
|
|
21
|
+
isSubscribed?: boolean;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const TraitsGrid = memo(function TraitsGrid({
|
|
25
|
+
overallScore,
|
|
26
|
+
traitScores,
|
|
27
|
+
scale,
|
|
28
|
+
onTraitPress,
|
|
29
|
+
isSubscribed = false,
|
|
30
|
+
}: TraitsGridProps) {
|
|
31
|
+
const { isTablet } = useResponsiveSize();
|
|
32
|
+
|
|
33
|
+
const scoreAnimatedStyle = useAnimatedStyle(() => ({
|
|
34
|
+
transform: [{ scale: scale.value }],
|
|
35
|
+
}));
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<View className="px-6">
|
|
39
|
+
<View className="m-[3.5px] flex-row flex-wrap">
|
|
40
|
+
<View className={`${isTablet ? 'w-1/3' : 'w-1/2'} p-[3.5px]`}>
|
|
41
|
+
<Animated.View style={scoreAnimatedStyle}>
|
|
42
|
+
<CircularProgress
|
|
43
|
+
value={overallScore}
|
|
44
|
+
size={isTablet ? 130 : 115}
|
|
45
|
+
strokeWidth={isTablet ? 16 : 14}
|
|
46
|
+
label="Overall Score"
|
|
47
|
+
onPress={() => onTraitPress('overall')}
|
|
48
|
+
showViewAdvice
|
|
49
|
+
isCard
|
|
50
|
+
isSubscribed={isSubscribed}
|
|
51
|
+
/>
|
|
52
|
+
</Animated.View>
|
|
53
|
+
</View>
|
|
54
|
+
{traitScores.map(({ key, trait, score }) => (
|
|
55
|
+
<View
|
|
56
|
+
key={key}
|
|
57
|
+
className={`${isTablet ? 'w-1/3' : 'w-1/2'} p-[3.5px]`}
|
|
58
|
+
>
|
|
59
|
+
<CircularProgress
|
|
60
|
+
value={score}
|
|
61
|
+
isSubscribed={isSubscribed}
|
|
62
|
+
size={isTablet ? 130 : 115}
|
|
63
|
+
strokeWidth={isTablet ? 16 : 14}
|
|
64
|
+
label={trait}
|
|
65
|
+
onPress={() => onTraitPress(key)}
|
|
66
|
+
showViewAdvice
|
|
67
|
+
isCard
|
|
68
|
+
/>
|
|
69
|
+
</View>
|
|
70
|
+
))}
|
|
71
|
+
</View>
|
|
72
|
+
</View>
|
|
73
|
+
);
|
|
74
|
+
});
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export type AnalysisGoal = {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
description: string;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export type FeedbackStyle = {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const ANALYSIS_GOALS: AnalysisGoal[] = [
|
|
14
|
+
{
|
|
15
|
+
id: 'comprehensive',
|
|
16
|
+
label: 'Comprehensive Analysis',
|
|
17
|
+
description: 'Complete detailed analysis covering all aspects',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: 'quick_assessment',
|
|
21
|
+
label: 'Quick Assessment',
|
|
22
|
+
description: 'Fast overview with key insights',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: 'specific_features',
|
|
26
|
+
label: 'Specific Features',
|
|
27
|
+
description: 'Focus on particular features or characteristics',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: 'comparison',
|
|
31
|
+
label: 'Comparison Analysis',
|
|
32
|
+
description: 'Compare against standards or references',
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
export const FEEDBACK_STYLES: FeedbackStyle[] = [
|
|
37
|
+
{
|
|
38
|
+
id: 'professional',
|
|
39
|
+
label: 'Professional',
|
|
40
|
+
description: 'Formal, technical analysis with detailed explanations',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 'casual',
|
|
44
|
+
label: 'Casual',
|
|
45
|
+
description: 'Friendly, easy-to-understand language',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: 'scientific',
|
|
49
|
+
label: 'Scientific',
|
|
50
|
+
description: 'Research-based approach with data and references',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: 'creative',
|
|
54
|
+
label: 'Creative',
|
|
55
|
+
description: 'Imaginative perspective with artistic insights',
|
|
56
|
+
},
|
|
57
|
+
];
|
|
58
|
+
|
|
59
|
+
export const PHOTO_STEPS = [
|
|
60
|
+
{
|
|
61
|
+
id: 'front',
|
|
62
|
+
label: 'Front View',
|
|
63
|
+
description: 'Capture a direct front-facing image',
|
|
64
|
+
guideText: '',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: 'side',
|
|
68
|
+
label: 'Side View',
|
|
69
|
+
description: 'Capture a profile view from the side',
|
|
70
|
+
guideText: '',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: 'threeQuarter',
|
|
74
|
+
label: 'Three-Quarter View',
|
|
75
|
+
description: 'Capture an angled view between front and side',
|
|
76
|
+
guideText: '',
|
|
77
|
+
},
|
|
78
|
+
] as const;
|
|
79
|
+
|
|
80
|
+
export type PhotoStep = (typeof PHOTO_STEPS)[number];
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import type { AnalysisGoal, FeedbackStyle } from './analysis-config';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for a complete analysis flow
|
|
5
|
+
*/
|
|
6
|
+
export type AnalysisFlowConfig = {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
icon: string;
|
|
10
|
+
color: string;
|
|
11
|
+
analysisConfigId: string;
|
|
12
|
+
photoSteps: readonly {
|
|
13
|
+
id: string;
|
|
14
|
+
label: string;
|
|
15
|
+
description: string;
|
|
16
|
+
guideImage: any;
|
|
17
|
+
}[];
|
|
18
|
+
skipOptionsScreen?: boolean;
|
|
19
|
+
defaultPreferences?: {
|
|
20
|
+
goal: string;
|
|
21
|
+
feedbackStyle: string;
|
|
22
|
+
};
|
|
23
|
+
availableGoals: readonly AnalysisGoal[];
|
|
24
|
+
availableFeedbackStyles: readonly FeedbackStyle[];
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Master configuration registry for all analysis flows
|
|
29
|
+
*/
|
|
30
|
+
export const MASTER_ANALYSIS_CONFIGS: Record<string, AnalysisFlowConfig> = {
|
|
31
|
+
'face-analysis': {
|
|
32
|
+
id: 'face-analysis',
|
|
33
|
+
name: 'Face Analysis',
|
|
34
|
+
icon: '👤',
|
|
35
|
+
color: '#3B82F6',
|
|
36
|
+
analysisConfigId: 'face_analysis',
|
|
37
|
+
photoSteps: [
|
|
38
|
+
{
|
|
39
|
+
id: 'front',
|
|
40
|
+
label: 'Front View',
|
|
41
|
+
description: 'Capture a direct front-facing image',
|
|
42
|
+
guideImage: require('@assets/features/image-analyzer/front.jpg'),
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: 'side',
|
|
46
|
+
label: 'Side View',
|
|
47
|
+
description: 'Capture a profile view from the side',
|
|
48
|
+
guideImage: require('@assets/features/image-analyzer/side.jpg'),
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: 'threeQuarter',
|
|
52
|
+
label: 'Three-Quarter View',
|
|
53
|
+
description: 'Capture an angled view between front and side',
|
|
54
|
+
guideImage: require('@assets/features/image-analyzer/threeQuarter.jpg'),
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
skipOptionsScreen: false,
|
|
58
|
+
availableGoals: [
|
|
59
|
+
{
|
|
60
|
+
id: 'comprehensive',
|
|
61
|
+
label: 'Comprehensive Analysis',
|
|
62
|
+
description: 'Complete detailed analysis covering all aspects',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: 'quick_assessment',
|
|
66
|
+
label: 'Quick Assessment',
|
|
67
|
+
description: 'Fast overview with key insights',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: 'specific_features',
|
|
71
|
+
label: 'Specific Features',
|
|
72
|
+
description: 'Focus on particular features or characteristics',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: 'comparison',
|
|
76
|
+
label: 'Comparison Analysis',
|
|
77
|
+
description: 'Compare against standards or references',
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
availableFeedbackStyles: [
|
|
81
|
+
{
|
|
82
|
+
id: 'professional',
|
|
83
|
+
label: 'Professional',
|
|
84
|
+
description: 'Formal, technical analysis with detailed explanations',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: 'casual',
|
|
88
|
+
label: 'Casual',
|
|
89
|
+
description: 'Friendly, easy-to-understand language',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: 'scientific',
|
|
93
|
+
label: 'Scientific',
|
|
94
|
+
description: 'Research-based approach with data and references',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: 'creative',
|
|
98
|
+
label: 'Creative',
|
|
99
|
+
description: 'Imaginative perspective with artistic insights',
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
'dashboard-warning-check': {
|
|
104
|
+
id: 'dashboard-warning-check',
|
|
105
|
+
name: 'Dashboard Check',
|
|
106
|
+
icon: '⚠️',
|
|
107
|
+
color: '#F59E0B',
|
|
108
|
+
analysisConfigId: 'dashboard_warning',
|
|
109
|
+
photoSteps: [
|
|
110
|
+
{
|
|
111
|
+
id: 'dashboard',
|
|
112
|
+
label: 'Dashboard Photo',
|
|
113
|
+
description: 'Capture a clear image of your vehicle dashboard',
|
|
114
|
+
guideImage: require('@assets/features/image-analyzer/front.jpg'), // Placeholder - would need actual dashboard guide image
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
skipOptionsScreen: true,
|
|
118
|
+
defaultPreferences: {
|
|
119
|
+
goal: 'identify_warning',
|
|
120
|
+
feedbackStyle: 'direct',
|
|
121
|
+
},
|
|
122
|
+
availableGoals: [],
|
|
123
|
+
availableFeedbackStyles: [],
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Get analysis flow configuration by ID
|
|
129
|
+
*/
|
|
130
|
+
export function getAnalysisFlowConfig(flowId: string): AnalysisFlowConfig {
|
|
131
|
+
const config = MASTER_ANALYSIS_CONFIGS[flowId];
|
|
132
|
+
if (!config) {
|
|
133
|
+
throw new Error(`Unknown analysis flow: ${flowId}`);
|
|
134
|
+
}
|
|
135
|
+
return config;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Safely get analysis flow configuration with fallback
|
|
140
|
+
* Returns null if the flow doesn't exist instead of throwing
|
|
141
|
+
*/
|
|
142
|
+
export function getAnalysisFlowConfigSafe(
|
|
143
|
+
flowId: string,
|
|
144
|
+
): AnalysisFlowConfig | null {
|
|
145
|
+
const config = MASTER_ANALYSIS_CONFIGS[flowId];
|
|
146
|
+
if (!config) {
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
return config;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Get all available analysis flow configurations
|
|
154
|
+
*/
|
|
155
|
+
export function getAllAnalysisFlowConfigs(): AnalysisFlowConfig[] {
|
|
156
|
+
return Object.values(MASTER_ANALYSIS_CONFIGS);
|
|
157
|
+
}
|
package/recipes/image-analysis-supabase/apps/native/src/features/image-analyzer/hooks/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './use-analysis';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useImageAnalysis,
|
|
3
|
+
useUserImageAnalyses,
|
|
4
|
+
} from '@/api-client/supabase/image-analyzer';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Hook to get analysis data from Supabase backend
|
|
8
|
+
*/
|
|
9
|
+
export function useAnalysis(analysisId: string | null) {
|
|
10
|
+
const { data: analysis, isLoading, error } = useImageAnalysis(analysisId);
|
|
11
|
+
|
|
12
|
+
return {
|
|
13
|
+
analysis,
|
|
14
|
+
isLoading,
|
|
15
|
+
error: error ? (error as Error).message : null,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Hook to get all user analyses with optional pagination
|
|
21
|
+
*/
|
|
22
|
+
export function useUserAnalyses(paginationOpts?: {
|
|
23
|
+
limit: number;
|
|
24
|
+
offset: number;
|
|
25
|
+
}) {
|
|
26
|
+
const { data, isLoading } = useUserImageAnalyses({
|
|
27
|
+
limit: paginationOpts?.limit ?? 50,
|
|
28
|
+
});
|
|
29
|
+
const pages = data?.pages ?? [];
|
|
30
|
+
const allAnalyses = pages.flatMap((page) => page?.analyses ?? []);
|
|
31
|
+
|
|
32
|
+
return {
|
|
33
|
+
analyses: allAnalyses,
|
|
34
|
+
isLoading,
|
|
35
|
+
isDone: allAnalyses.length < (paginationOpts?.limit ?? 50),
|
|
36
|
+
continueCursor: null,
|
|
37
|
+
};
|
|
38
|
+
}
|