vibefast-cli 1.2.1 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -95
- package/dist/__tests__/recipes.test.js +94 -91
- package/dist/__tests__/recipes.test.js.map +1 -1
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +301 -125
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/checklist.d.ts.map +1 -1
- package/dist/commands/checklist.js +85 -44
- package/dist/commands/checklist.js.map +1 -1
- package/dist/commands/health.d.ts.map +1 -1
- package/dist/commands/health.js +13 -4
- package/dist/commands/health.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +118 -26
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/migrate.d.ts +3 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/migrate.js +202 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/remove.d.ts.map +1 -1
- package/dist/commands/remove.js +61 -3
- package/dist/commands/remove.js.map +1 -1
- package/dist/core/auth.d.ts.map +1 -1
- package/dist/core/auth.js +20 -18
- package/dist/core/auth.js.map +1 -1
- package/dist/core/codemod.d.ts +33 -0
- package/dist/core/codemod.d.ts.map +1 -1
- package/dist/core/codemod.js +116 -0
- package/dist/core/codemod.js.map +1 -1
- package/dist/core/detect.d.ts.map +1 -1
- package/dist/core/detect.js +24 -7
- package/dist/core/detect.js.map +1 -1
- package/dist/core/journal.d.ts +1 -0
- package/dist/core/journal.d.ts.map +1 -1
- package/dist/core/journal.js.map +1 -1
- package/dist/core/recipes.d.ts.map +1 -1
- package/dist/core/recipes.js +25 -7
- package/dist/core/recipes.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/docs/architecture.md +50 -0
- package/docs/commands.md +78 -0
- package/docs/contributing.md +27 -0
- package/docs/quickstart.md +50 -0
- package/docs/recipes.md +57 -0
- package/docs/troubleshooting.md +31 -0
- package/package.json +2 -2
- package/recipes/0/apps/native/src/components/advanced-ui/timeline/demo.tsx +445 -0
- package/recipes/0/apps/native/src/components/advanced-ui/timeline/timeline-view.tsx +355 -0
- package/recipes/0/apps/native/src/components/advanced-ui/timeline/types.ts +31 -0
- package/recipes/0/recipe.json +18 -0
- package/recipes/animated-chip/apps/native/src/components/advanced-ui/chip/demo.tsx +2 -1
- package/recipes/animated-chip/recipe.json +5 -2
- package/recipes/animated-chip-native@latest.zip +0 -0
- package/recipes/animated-chip@latest.zip +0 -0
- package/recipes/animated-switch/apps/native/src/components/advanced-ui/switch/demo.tsx +1 -1
- package/recipes/animated-switch/recipe.json +5 -2
- package/recipes/animated-switch-native@latest.zip +0 -0
- package/recipes/animated-switch@latest.zip +0 -0
- package/recipes/audio-recorder/apps/native/src/features/audio-recorder/components/audio-recorder.tsx +2 -1
- package/recipes/audio-recorder/apps/native/src/features/audio-recorder/demo/with-recording-list-demo.tsx +2 -2
- package/recipes/audio-recorder/recipe.json +7 -2
- package/recipes/audio-recorder-native@latest.zip +0 -0
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/components/audio-recorder.tsx +2 -1
- package/recipes/audio-recorder-supabase/apps/native/src/features/audio-recorder/demo/with-recording-list-demo.tsx +2 -1
- package/recipes/audio-recorder-supabase/recipe.json +12 -16
- package/recipes/audio-recorder-supabase-native@latest.zip +0 -0
- package/recipes/audio-recorder-supabase@latest.zip +0 -0
- package/recipes/audio-recorder@latest.zip +0 -0
- package/recipes/charts/apps/native/src/app/charts/index.tsx +3 -0
- package/recipes/charts/apps/native/src/features/charts/components/bar-chart.tsx +3 -1
- package/recipes/charts/apps/native/src/features/charts/components/candlestick-chart.tsx +3 -1
- package/recipes/charts/apps/native/src/features/charts/components/column-chart.tsx +3 -1
- package/recipes/charts/apps/native/src/features/charts/components/doughnut-chart.tsx +3 -1
- package/recipes/charts/apps/native/src/features/charts/components/line-chart.tsx +3 -1
- package/recipes/charts/apps/native/src/features/charts/components/radar-chart.tsx +3 -1
- package/recipes/charts/apps/native/src/features/charts/components/stacked-bar-chart.tsx +3 -1
- package/recipes/charts/recipe.json +13 -4
- package/recipes/charts-native@latest.zip +0 -0
- package/recipes/charts@latest.zip +0 -0
- package/recipes/chatbot/apps/native/src/features/chatbot/components/chat-markdown.tsx +86 -86
- package/recipes/chatbot/apps/native/src/features/chatbot/components/markdown/code-block.tsx +4 -4
- package/recipes/chatbot/recipe.json +3 -40
- package/recipes/chatbot-native@latest.zip +0 -0
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/chat-markdown.tsx +4 -1
- package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/markdown/code-block.tsx +86 -53
- package/recipes/chatbot-supabase/recipe.json +3 -42
- package/recipes/chatbot-supabase-native@latest.zip +0 -0
- package/recipes/chatbot-supabase@latest.zip +0 -0
- package/recipes/chatbot@latest.zip +0 -0
- package/recipes/glowing-button/recipe.json +6 -2
- package/recipes/glowing-button-native@latest.zip +0 -0
- package/recipes/glowing-button@latest.zip +0 -0
- package/recipes/image-analysis/apps/native/src/app/analysis/[type]/_layout.tsx +5 -0
- package/recipes/image-analysis/apps/native/src/app/analysis/[type]/analysis-options.tsx +50 -0
- package/recipes/image-analysis/apps/native/src/app/analysis/[type]/camera.tsx +2 -0
- package/recipes/image-analysis/apps/native/src/app/analysis/[type]/index.tsx +50 -0
- package/recipes/image-analysis/apps/native/src/app/analysis/[type]/loading.tsx +50 -0
- package/recipes/image-analysis/apps/native/src/app/analysis/[type]/results.tsx +2 -0
- package/recipes/image-analysis/apps/native/src/app/analysis/[type]/trait-details.tsx +3 -0
- package/recipes/image-analysis/apps/native/src/features/image-analyzer/app/analysis-options-screen.tsx +2 -2
- package/recipes/image-analysis/apps/native/src/features/image-analyzer/app/camera.tsx +72 -65
- package/recipes/image-analysis/apps/native/src/features/image-analyzer/app/image-capture-screen.tsx +65 -47
- package/recipes/image-analysis/apps/native/src/features/image-analyzer/app/loading-screen.tsx +43 -2
- package/recipes/image-analysis/apps/native/src/features/image-analyzer/app/loading.tsx +34 -1
- package/recipes/image-analysis/apps/native/src/features/image-analyzer/hooks/use-image-analysis.ts +83 -2
- package/recipes/image-analysis/recipe.json +11 -19
- package/recipes/image-analysis-native@latest.zip +0 -0
- package/recipes/image-analysis-supabase/apps/native/src/app/analysis/[type]/_layout.tsx +5 -0
- package/recipes/image-analysis-supabase/apps/native/src/app/analysis/[type]/analysis-options.tsx +50 -0
- package/recipes/image-analysis-supabase/apps/native/src/app/analysis/[type]/camera.tsx +2 -0
- package/recipes/image-analysis-supabase/apps/native/src/app/analysis/[type]/index.tsx +50 -0
- package/recipes/image-analysis-supabase/apps/native/src/app/analysis/[type]/loading.tsx +50 -0
- package/recipes/image-analysis-supabase/apps/native/src/app/analysis/[type]/results.tsx +2 -0
- package/recipes/image-analysis-supabase/apps/native/src/app/analysis/[type]/trait-details.tsx +3 -0
- package/recipes/image-analysis-supabase/recipe.json +10 -37
- package/recipes/image-analysis-supabase-native@latest.zip +0 -0
- package/recipes/image-analysis-supabase@latest.zip +0 -0
- package/recipes/image-analysis@latest.zip +0 -0
- package/recipes/image-analyzer/apps/native/src/app/(root)/(protected)/image-analyzer/index.tsx +2 -0
- package/recipes/image-generator/apps/native/src/app/image-generator/gallery.tsx +3 -0
- package/recipes/image-generator/apps/native/src/app/image-generator/index.tsx +3 -0
- package/recipes/image-generator/recipe.json +8 -18
- package/recipes/image-generator-native@latest.zip +0 -0
- package/recipes/image-generator-supabase/recipe.json +6 -35
- package/recipes/image-generator-supabase-native@latest.zip +0 -0
- package/recipes/image-generator-supabase@latest.zip +0 -0
- package/recipes/image-generator@latest.zip +0 -0
- package/recipes/ios-widget/recipe.json +18 -119
- package/recipes/ios-widget-native@latest.zip +0 -0
- package/recipes/ios-widget@latest.zip +0 -0
- package/recipes/number-stepper/apps/native/src/components/advanced-ui/stepper/demo.tsx +1 -1
- package/recipes/number-stepper/recipe.json +5 -2
- package/recipes/number-stepper-native@latest.zip +0 -0
- package/recipes/number-stepper@latest.zip +0 -0
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/interactive-onboarding.tsx +11 -18
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/ai-tone-step.tsx +5 -7
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/currency-step.tsx +9 -7
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-ai-step.tsx +8 -7
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-chatbot-step.tsx +6 -5
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-manual-step.tsx +4 -3
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/feature-scan-step.tsx +6 -5
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/main-reason-step.tsx +5 -7
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/notification-step.tsx +7 -6
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/overspend-step.tsx +5 -7
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/personalizing-step.tsx +8 -7
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/rating-step.tsx +6 -5
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/reminder-step.tsx +5 -6
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/safety-step.tsx +5 -4
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/struggle-step.tsx +5 -7
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/steps/welcome-step.tsx +7 -6
- package/recipes/onboarding/apps/native/src/features/onboarding/expense-tracker/components/ui/onboarding-header.tsx +4 -3
- package/recipes/onboarding/recipe.json +9 -6
- package/recipes/onboarding-native@latest.zip +0 -0
- package/recipes/onboarding@latest.zip +0 -0
- package/recipes/payments/apps/native/src/app/paywall/index.tsx +74 -0
- package/recipes/payments/apps/native/src/app/paywall/local.tsx +25 -0
- package/recipes/payments/apps/native/src/app/paywall/remote.tsx +23 -0
- package/recipes/payments/packages/backend/convex/payments.ts +21 -3
- package/recipes/payments/recipe.json +14 -34
- package/recipes/payments-native@latest.zip +0 -0
- package/recipes/payments-supabase/apps/native/src/app/paywall/index.tsx +74 -0
- package/recipes/payments-supabase/apps/native/src/app/paywall/local.tsx +25 -0
- package/recipes/payments-supabase/apps/native/src/app/paywall/remote.tsx +23 -0
- package/recipes/payments-supabase/recipe.json +16 -23
- package/recipes/payments-supabase-native@latest.zip +0 -0
- package/recipes/payments-supabase@latest.zip +0 -0
- package/recipes/payments@latest.zip +0 -0
- package/recipes/posthog/apps/native/src/components/analytics/navigation-tracker.tsx +14 -0
- package/recipes/posthog/apps/native/src/lib/hooks/use-navigation-analytics.ts +44 -0
- package/recipes/posthog/apps/native/src/providers/posthog-provider.tsx +51 -0
- package/recipes/posthog/recipe.json +60 -0
- package/recipes/posthog-native@latest.zip +0 -0
- package/recipes/progress-circle/apps/native/src/components/advanced-ui/progress-bars/progress-circle-page.tsx +1 -1
- package/recipes/progress-circle/recipe.json +5 -2
- package/recipes/progress-circle-native@latest.zip +0 -0
- package/recipes/progress-circle@latest.zip +0 -0
- package/recipes/quiz/apps/native/src/app/quiz/index.tsx +47 -0
- package/recipes/quiz/recipe.json +9 -6
- package/recipes/quiz-native@latest.zip +0 -0
- package/recipes/quiz@latest.zip +0 -0
- package/recipes/screen-kits/apps/native/src/app/screen-kits/_layout.tsx +12 -0
- package/recipes/screen-kits/apps/native/src/app/screen-kits/index.tsx +114 -0
- package/recipes/screen-kits/apps/native/src/features/screen-kits/index.ts +1 -0
- package/recipes/screen-kits/apps/native/src/features/screen-kits/types.ts +28 -0
- package/recipes/screen-kits/recipe.json +26 -0
- package/recipes/screen-kits-duolingo/apps/native/src/app/screen-kits/duolingo/_layout.tsx +12 -0
- package/recipes/screen-kits-duolingo/apps/native/src/app/screen-kits/duolingo/home.tsx +5 -0
- package/recipes/screen-kits-duolingo/apps/native/src/app/screen-kits/duolingo/index.tsx +5 -0
- package/recipes/screen-kits-duolingo/apps/native/src/app/screen-kits/duolingo/lesson-complete.tsx +5 -0
- package/recipes/screen-kits-duolingo/apps/native/src/app/screen-kits/duolingo/lesson-fail.tsx +5 -0
- package/recipes/screen-kits-duolingo/apps/native/src/app/screen-kits/duolingo/lesson.tsx +5 -0
- package/recipes/screen-kits-duolingo/apps/native/src/app/screen-kits/duolingo/skill-tree.tsx +5 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/components/duo-button.tsx +174 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/components/skill-button.tsx +186 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/components/xp-header.tsx +115 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/constants.ts +89 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/index.ts +3 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/screens/home-screen.tsx +225 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/screens/lesson-complete-screen.tsx +485 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/screens/lesson-fail-screen.tsx +105 -0
- package/recipes/screen-kits-duolingo/apps/native/src/features/screen-kits/duolingo/screens/lesson-screen.tsx +384 -0
- package/recipes/screen-kits-duolingo/recipe.json +58 -0
- package/recipes/screen-kits-duolingo-native@latest.zip +0 -0
- package/recipes/screen-kits-finance/apps/native/src/app/screen-kits/finance/_layout.tsx +45 -0
- package/recipes/screen-kits-finance/apps/native/src/app/screen-kits/finance/asset-detail.tsx +3 -0
- package/recipes/screen-kits-finance/apps/native/src/app/screen-kits/finance/notifications.tsx +3 -0
- package/recipes/screen-kits-finance/apps/native/src/app/screen-kits/finance/receive.tsx +3 -0
- package/recipes/screen-kits-finance/apps/native/src/app/screen-kits/finance/send.tsx +3 -0
- package/recipes/screen-kits-finance/apps/native/src/app/screen-kits/finance/swap.tsx +3 -0
- package/recipes/screen-kits-finance/apps/native/src/app/screen-kits/finance/wallet.tsx +3 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/components/ActionButtons.tsx +78 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/components/AssetRow.tsx +94 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/components/BalanceCard.tsx +118 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/constants.ts +85 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/screens/asset-detail.tsx +378 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/screens/notifications.tsx +210 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/screens/receive-modal.tsx +317 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/screens/send-modal.tsx +420 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/screens/swap-modal.tsx +363 -0
- package/recipes/screen-kits-finance/apps/native/src/features/screen-kits/finance/screens/wallet-dashboard.tsx +281 -0
- package/recipes/screen-kits-finance/recipe.json +46 -0
- package/recipes/screen-kits-finance-native@latest.zip +0 -0
- package/recipes/screen-kits-fitness/apps/native/assets/sounds/timer-beep.wav +0 -0
- package/recipes/screen-kits-fitness/apps/native/src/app/screen-kits/fitness/_layout.tsx +10 -0
- package/recipes/screen-kits-fitness/apps/native/src/app/screen-kits/fitness/index.tsx +6 -0
- package/recipes/screen-kits-fitness/apps/native/src/app/screen-kits/fitness/timer.tsx +3 -0
- package/recipes/screen-kits-fitness/apps/native/src/app/screen-kits/fitness/workout.tsx +3 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/components/timer-components.tsx +500 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/components/timer-settings-modal.tsx +352 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/components/workout-card.tsx +105 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/constants.ts +189 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/hooks/use-timer.ts +307 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/index.ts +1 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/screens/timer-screen.tsx +278 -0
- package/recipes/screen-kits-fitness/apps/native/src/features/screen-kits/fitness/screens/workout-dashboard.tsx +350 -0
- package/recipes/screen-kits-fitness/recipe.json +63 -0
- package/recipes/screen-kits-fitness-native@latest.zip +0 -0
- package/recipes/screen-kits-habits/apps/native/src/app/screen-kits/productivity/habits.tsx +1 -0
- package/recipes/screen-kits-habits/apps/native/src/app/screen-kits/productivity/kanban.tsx +1 -0
- package/recipes/screen-kits-habits/apps/native/src/app/screen-kits/productivity/routes.ts +4 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/components/AddTaskModal.tsx +246 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/components/DraggableTaskCard.tsx +92 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/components/KanbanColumn.tsx +238 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/components/TaskCard.tsx +144 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/components/add-habit-modal.tsx +271 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/constants.ts +295 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/kanban-utils.ts +62 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/screens/habit-tracker.tsx +1160 -0
- package/recipes/screen-kits-habits/apps/native/src/features/screen-kits/productivity/screens/kanban-board.tsx +432 -0
- package/recipes/screen-kits-habits/recipe.json +52 -0
- package/recipes/screen-kits-habits-native@latest.zip +0 -0
- package/recipes/screen-kits-native@latest.zip +0 -0
- package/recipes/sentry/apps/native/src/providers/sentry-provider.tsx +64 -0
- package/recipes/sentry/recipe.json +39 -0
- package/recipes/sentry-native@latest.zip +0 -0
- package/recipes/swipe-slider/apps/native/src/components/advanced-ui/sliders/swipe-slider-page.tsx +1 -1
- package/recipes/swipe-slider/recipe.json +5 -2
- package/recipes/swipe-slider-native@latest.zip +0 -0
- package/recipes/swipe-slider@latest.zip +0 -0
- package/recipes/timeline/apps/native/src/components/advanced-ui/timeline/demo.tsx +2 -1
- package/recipes/timeline/recipe.json +5 -2
- package/recipes/timeline-native@latest.zip +0 -0
- package/recipes/timeline@latest.zip +0 -0
- package/recipes/tracker-app/apps/native/src/app/tracker-app/index.tsx +1 -0
- package/recipes/tracker-app/recipe.json +10 -7
- package/recipes/tracker-app-native@latest.zip +0 -0
- package/recipes/tracker-app@latest.zip +0 -0
- package/recipes/upload-all.sh +8 -31
- package/recipes/voice-bot/apps/native/src/app/voice-bot/index.tsx +56 -0
- package/recipes/voice-bot/recipe.json +31 -7
- package/recipes/voice-bot-native@latest.zip +0 -0
- package/recipes/voice-bot@latest.zip +0 -0
- package/recipes/wake-word/apps/native/src/app/{(root)/(protected)/test-wake-word.tsx → test-wake-word.tsx} +43 -4
- package/recipes/wake-word/recipe.json +16 -26
- package/recipes/wake-word-native@latest.zip +0 -0
- package/recipes/wake-word@latest.zip +0 -0
- package/scripts/create-advanced-ui-recipes.sh +46 -19
- package/scripts/create-recipes.mjs +471 -117
- package/scripts/package-recipes.mjs +76 -0
- package/scripts/publish-all.sh +6 -2
- package/CHANGELOG.md +0 -198
- package/docs/archive/AUTO-DETECT-DEPS.md +0 -607
- package/docs/archive/FINAL-PACKAGE-STRATEGY.md +0 -583
- package/docs/archive/FINAL-SIMPLE-PLAN.md +0 -487
- package/docs/archive/FINAL-STATUS.md +0 -144
- package/docs/archive/FLOW-DIAGRAM.md +0 -1629
- package/docs/archive/GOTCHAS-AND-RISKS.md +0 -801
- package/docs/archive/IMPLEMENTATION-PLAN.md +0 -1360
- package/docs/archive/PLAN.md +0 -453
- package/docs/archive/PRODUCTION-READINESS.md +0 -684
- package/docs/archive/PRODUCTION-TEST-RESULTS.md +0 -465
- package/docs/archive/SIMPLIFIED-PLAN.md +0 -578
- package/docs/archive/STATUS.md +0 -199
- package/docs/archive/SUCCESS.md +0 -259
- package/docs/archive/TEST-SUMMARY.md +0 -261
- package/docs/archive/TESTING-CHECKLIST.md +0 -450
- package/docs/archive/USER-MODIFICATIONS.md +0 -448
- package/docs/decisions.md +0 -55
- package/docs/manual-testing.md +0 -91
- package/docs/next-steps.md +0 -12
- package/recipes/README.md +0 -156
- package/recipes/audio-recorder-supabase/packages/backend/src/services/recordings.ts +0 -369
- package/recipes/chatbot/apps/native/src/api-client/chatbot.ts +0 -83
- package/recipes/chatbot/packages/backend/convex/agents.ts +0 -115
- package/recipes/chatbot/packages/backend/convex/tools/index.ts +0 -18
- package/recipes/chatbot/packages/backend/convex/tools/knowledgeRetrieval.ts +0 -97
- package/recipes/chatbot/packages/backend/convex/tools/tavilySearch.ts +0 -83
- package/recipes/chatbot/packages/backend/convex/tools/userProfile.ts +0 -72
- package/recipes/chatbot-supabase/apps/native/src/api-client/supabase/chatbot.ts +0 -515
- package/recipes/chatbot-supabase/packages/backend/src/services/conversations.ts +0 -243
- package/recipes/chatbot-supabase/packages/backend/src/services/messages.ts +0 -327
- package/recipes/image-analysis/apps/native/src/api-client/image-analyzer.ts +0 -62
- package/recipes/image-analysis-supabase/packages/backend/src/services/image-analyses.ts +0 -132
- package/recipes/image-generator/apps/native/src/api-client/image-generator.ts +0 -34
- package/recipes/payments/apps/native/src/api-client/payments.ts +0 -44
- package/recipes/payments-supabase/packages/backend/src/services/payments.ts +0 -201
- package/recipes/posthog.json +0 -47
- package/recipes/revenuecat.json +0 -43
- package/recipes/sentry.json +0 -47
- package/recipes/wake-word/apps/native/assets/vosk-model/README.md +0 -103
- package/recipes/wake-word/apps/native/scripts/download-vosk-model.mjs +0 -127
- /package/recipes/{audio-recorder/apps/native/src/app/(root)/(protected) → audio-recorder-supabase/apps/native/src/app}/audio-recorder/index.tsx +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/AppIntent.swift +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-20x20@1x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-20x20@2x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-20x20@3x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-29x29@1x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-29x29@2x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-29x29@3x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-40x40@1x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-40x40@2x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-40x40@3x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-60x60@2x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-60x60@3x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-76x76@1x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-76x76@2x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/App-Icon-83.5x83.5@2x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/CalorieTrackerWidget.swift +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/HabitTrackerWidget.swift +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/Info.plist +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/WidgetLiveActivity.swift +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/expo-target.config.js +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/generated.entitlements +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/index.swift +0 -0
- /package/recipes/ios-widget/{targets → apps/native/targets}/widget/widgets.swift +0 -0
|
@@ -32,7 +32,9 @@ type Props = {
|
|
|
32
32
|
|
|
33
33
|
export const RadarChart = ({ data, config = {}, style }: Props) => {
|
|
34
34
|
const hasData = data.length > 0;
|
|
35
|
-
const [containerWidth, setContainerWidth] = useState(
|
|
35
|
+
const [containerWidth, setContainerWidth] = useState(
|
|
36
|
+
() => config.width ?? 300,
|
|
37
|
+
);
|
|
36
38
|
const {
|
|
37
39
|
height = 200,
|
|
38
40
|
showLabels = true,
|
|
@@ -42,7 +42,9 @@ export const StackedBarChart = ({
|
|
|
42
42
|
categories = [],
|
|
43
43
|
horizontal = false,
|
|
44
44
|
}: Props) => {
|
|
45
|
-
const [containerWidth, setContainerWidth] = useState(
|
|
45
|
+
const [containerWidth, setContainerWidth] = useState(
|
|
46
|
+
() => config.width ?? 300,
|
|
47
|
+
);
|
|
46
48
|
const {
|
|
47
49
|
height = 200,
|
|
48
50
|
padding = 20,
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "charts",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
"description": "Beautiful
|
|
4
|
+
"description": "Beautiful data visualization with charts",
|
|
5
5
|
"copy": [
|
|
6
|
+
{
|
|
7
|
+
"from": "apps/native/src/app/charts",
|
|
8
|
+
"to": "apps/native/src/app/(root)/(protected)/charts"
|
|
9
|
+
},
|
|
6
10
|
{
|
|
7
11
|
"from": "apps/native/src/features/charts",
|
|
8
12
|
"to": "apps/native/src/features/charts"
|
|
@@ -12,8 +16,13 @@
|
|
|
12
16
|
"href": "/(root)/(protected)/charts",
|
|
13
17
|
"label": "Charts",
|
|
14
18
|
"icon": "📊",
|
|
15
|
-
"color": "#
|
|
19
|
+
"color": "#6366F1"
|
|
16
20
|
},
|
|
17
21
|
"target": "native",
|
|
18
|
-
"dependencies": {
|
|
19
|
-
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"expo": [
|
|
24
|
+
"@shopify/react-native-skia",
|
|
25
|
+
"react-native-svg"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
* and render rules, but the complex logic has been extracted into separate modules.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
import * as Clipboard from
|
|
23
|
-
import MarkdownIt from
|
|
24
|
-
import React, { useCallback, useEffect, useMemo } from
|
|
22
|
+
import * as Clipboard from 'expo-clipboard';
|
|
23
|
+
import MarkdownIt from 'markdown-it';
|
|
24
|
+
import React, { useCallback, useEffect, useMemo } from 'react';
|
|
25
25
|
import {
|
|
26
26
|
Image,
|
|
27
27
|
type ImageStyle,
|
|
@@ -33,18 +33,18 @@ import {
|
|
|
33
33
|
UIManager,
|
|
34
34
|
View,
|
|
35
35
|
type ViewStyle,
|
|
36
|
-
} from
|
|
37
|
-
import Markdown, { type RenderRules } from
|
|
36
|
+
} from 'react-native';
|
|
37
|
+
import Markdown, { type RenderRules } from 'react-native-markdown-display';
|
|
38
38
|
import {
|
|
39
39
|
atomOneDark,
|
|
40
40
|
github,
|
|
41
|
-
} from
|
|
41
|
+
} from 'react-syntax-highlighter/dist/esm/styles/hljs';
|
|
42
42
|
|
|
43
|
-
import { useToast } from
|
|
44
|
-
import { translate } from
|
|
45
|
-
import { useThemeConfig } from
|
|
43
|
+
import { useToast } from '@/components/ui/utils';
|
|
44
|
+
import { translate } from '@/lib';
|
|
45
|
+
import { useThemeConfig } from '@/lib/use-theme-config';
|
|
46
46
|
|
|
47
|
-
import { CodeBlock, TableRenderer } from
|
|
47
|
+
import { CodeBlock, TableRenderer } from './markdown';
|
|
48
48
|
|
|
49
49
|
const md = new MarkdownIt({
|
|
50
50
|
linkify: true,
|
|
@@ -70,8 +70,8 @@ export const ChatMarkdown = React.memo(function ChatMarkdown({
|
|
|
70
70
|
|
|
71
71
|
useEffect(() => {
|
|
72
72
|
if (
|
|
73
|
-
Platform.OS ===
|
|
74
|
-
typeof UIManager.setLayoutAnimationEnabledExperimental ===
|
|
73
|
+
Platform.OS === 'android' &&
|
|
74
|
+
typeof UIManager.setLayoutAnimationEnabledExperimental === 'function'
|
|
75
75
|
) {
|
|
76
76
|
UIManager.setLayoutAnimationEnabledExperimental(true);
|
|
77
77
|
}
|
|
@@ -88,11 +88,11 @@ export const ChatMarkdown = React.memo(function ChatMarkdown({
|
|
|
88
88
|
const monospaceFontFamily = useMemo(
|
|
89
89
|
() =>
|
|
90
90
|
Platform.select({
|
|
91
|
-
ios:
|
|
92
|
-
android:
|
|
93
|
-
default:
|
|
94
|
-
}) ??
|
|
95
|
-
[]
|
|
91
|
+
ios: 'Menlo-Regular',
|
|
92
|
+
android: 'monospace',
|
|
93
|
+
default: 'Menlo',
|
|
94
|
+
}) ?? 'Menlo',
|
|
95
|
+
[],
|
|
96
96
|
);
|
|
97
97
|
|
|
98
98
|
const columnDividerWidth = StyleSheet.hairlineWidth || 0.5;
|
|
@@ -114,15 +114,15 @@ export const ChatMarkdown = React.memo(function ChatMarkdown({
|
|
|
114
114
|
paragraph: { marginBottom: 10, color: textColor },
|
|
115
115
|
link: {
|
|
116
116
|
color: linkColor,
|
|
117
|
-
textDecorationLine:
|
|
118
|
-
fontWeight:
|
|
117
|
+
textDecorationLine: 'underline' as TextStyle['textDecorationLine'],
|
|
118
|
+
fontWeight: '500' as TextStyle['fontWeight'],
|
|
119
119
|
},
|
|
120
120
|
strong: {
|
|
121
|
-
fontWeight:
|
|
121
|
+
fontWeight: '600' as TextStyle['fontWeight'],
|
|
122
122
|
color: textColor,
|
|
123
123
|
},
|
|
124
124
|
em: {
|
|
125
|
-
fontStyle:
|
|
125
|
+
fontStyle: 'italic' as TextStyle['fontStyle'],
|
|
126
126
|
color: textColor,
|
|
127
127
|
},
|
|
128
128
|
code_inline: {
|
|
@@ -155,7 +155,7 @@ export const ChatMarkdown = React.memo(function ChatMarkdown({
|
|
|
155
155
|
},
|
|
156
156
|
list_item: { marginBottom: 6, color: textColor },
|
|
157
157
|
table: {
|
|
158
|
-
minWidth:
|
|
158
|
+
minWidth: '100%',
|
|
159
159
|
backgroundColor: theme.colors.background,
|
|
160
160
|
},
|
|
161
161
|
thead: {
|
|
@@ -165,7 +165,7 @@ export const ChatMarkdown = React.memo(function ChatMarkdown({
|
|
|
165
165
|
tr: {
|
|
166
166
|
borderBottomWidth: StyleSheet.hairlineWidth,
|
|
167
167
|
borderColor,
|
|
168
|
-
flexDirection:
|
|
168
|
+
flexDirection: 'row',
|
|
169
169
|
},
|
|
170
170
|
th: {
|
|
171
171
|
flexGrow: 0,
|
|
@@ -188,42 +188,42 @@ export const ChatMarkdown = React.memo(function ChatMarkdown({
|
|
|
188
188
|
},
|
|
189
189
|
heading1: {
|
|
190
190
|
fontSize: 28,
|
|
191
|
-
fontWeight:
|
|
191
|
+
fontWeight: '700',
|
|
192
192
|
color: textColor,
|
|
193
193
|
marginTop: 18,
|
|
194
194
|
marginBottom: 12,
|
|
195
195
|
},
|
|
196
196
|
heading2: {
|
|
197
197
|
fontSize: 22,
|
|
198
|
-
fontWeight:
|
|
198
|
+
fontWeight: '700',
|
|
199
199
|
color: textColor,
|
|
200
200
|
marginTop: 16,
|
|
201
201
|
marginBottom: 10,
|
|
202
202
|
},
|
|
203
203
|
heading3: {
|
|
204
204
|
fontSize: 19,
|
|
205
|
-
fontWeight:
|
|
205
|
+
fontWeight: '600',
|
|
206
206
|
color: textColor,
|
|
207
207
|
marginTop: 14,
|
|
208
208
|
marginBottom: 8,
|
|
209
209
|
},
|
|
210
210
|
heading4: {
|
|
211
211
|
fontSize: 17,
|
|
212
|
-
fontWeight:
|
|
212
|
+
fontWeight: '600',
|
|
213
213
|
color: textColor,
|
|
214
214
|
marginTop: 12,
|
|
215
215
|
marginBottom: 8,
|
|
216
216
|
},
|
|
217
217
|
heading5: {
|
|
218
218
|
fontSize: 16,
|
|
219
|
-
fontWeight:
|
|
219
|
+
fontWeight: '600',
|
|
220
220
|
color: textColor,
|
|
221
221
|
marginTop: 10,
|
|
222
222
|
marginBottom: 6,
|
|
223
223
|
},
|
|
224
224
|
heading6: {
|
|
225
225
|
fontSize: 15,
|
|
226
|
-
fontWeight:
|
|
226
|
+
fontWeight: '600' as TextStyle['fontWeight'],
|
|
227
227
|
color: textColor,
|
|
228
228
|
marginTop: 8,
|
|
229
229
|
marginBottom: 6,
|
|
@@ -236,10 +236,10 @@ export const ChatMarkdown = React.memo(function ChatMarkdown({
|
|
|
236
236
|
imageWrapper: {
|
|
237
237
|
marginVertical: 8,
|
|
238
238
|
borderRadius: 14,
|
|
239
|
-
overflow:
|
|
239
|
+
overflow: 'hidden',
|
|
240
240
|
},
|
|
241
241
|
image: {
|
|
242
|
-
width:
|
|
242
|
+
width: '100%',
|
|
243
243
|
aspectRatio: 16 / 9,
|
|
244
244
|
backgroundColor: codeBg,
|
|
245
245
|
},
|
|
@@ -247,7 +247,7 @@ export const ChatMarkdown = React.memo(function ChatMarkdown({
|
|
|
247
247
|
marginTop: 6,
|
|
248
248
|
fontSize: 13,
|
|
249
249
|
color: subtleText,
|
|
250
|
-
textAlign:
|
|
250
|
+
textAlign: 'center',
|
|
251
251
|
},
|
|
252
252
|
};
|
|
253
253
|
|
|
@@ -270,7 +270,7 @@ export const ChatMarkdown = React.memo(function ChatMarkdown({
|
|
|
270
270
|
...baseTheme,
|
|
271
271
|
hljs: {
|
|
272
272
|
...baseTheme.hljs,
|
|
273
|
-
background:
|
|
273
|
+
background: 'transparent',
|
|
274
274
|
color: codeFg,
|
|
275
275
|
},
|
|
276
276
|
};
|
|
@@ -279,27 +279,27 @@ export const ChatMarkdown = React.memo(function ChatMarkdown({
|
|
|
279
279
|
const codeContentStyle = useMemo(
|
|
280
280
|
() =>
|
|
281
281
|
({
|
|
282
|
-
backgroundColor:
|
|
282
|
+
backgroundColor: 'transparent',
|
|
283
283
|
padding: 0,
|
|
284
284
|
margin: 0,
|
|
285
|
-
} satisfies ViewStyle
|
|
286
|
-
[]
|
|
285
|
+
}) satisfies ViewStyle,
|
|
286
|
+
[],
|
|
287
287
|
);
|
|
288
288
|
|
|
289
289
|
const tableScrollViewStyle = useMemo(
|
|
290
290
|
() =>
|
|
291
291
|
({
|
|
292
292
|
marginVertical: 0,
|
|
293
|
-
} satisfies ViewStyle
|
|
294
|
-
[]
|
|
293
|
+
}) satisfies ViewStyle,
|
|
294
|
+
[],
|
|
295
295
|
);
|
|
296
296
|
|
|
297
297
|
const tableScrollContentStyle = useMemo(
|
|
298
298
|
() =>
|
|
299
299
|
({
|
|
300
300
|
flexGrow: 1,
|
|
301
|
-
} satisfies ViewStyle
|
|
302
|
-
[]
|
|
301
|
+
}) satisfies ViewStyle,
|
|
302
|
+
[],
|
|
303
303
|
);
|
|
304
304
|
|
|
305
305
|
const tableOuterStyle = useMemo(
|
|
@@ -308,84 +308,84 @@ export const ChatMarkdown = React.memo(function ChatMarkdown({
|
|
|
308
308
|
borderWidth: 1,
|
|
309
309
|
borderColor,
|
|
310
310
|
borderRadius: 10,
|
|
311
|
-
overflow:
|
|
311
|
+
overflow: 'hidden',
|
|
312
312
|
marginVertical: 12,
|
|
313
313
|
backgroundColor: theme.colors.background,
|
|
314
|
-
} satisfies ViewStyle
|
|
315
|
-
[borderColor, theme.colors.background]
|
|
314
|
+
}) satisfies ViewStyle,
|
|
315
|
+
[borderColor, theme.colors.background],
|
|
316
316
|
);
|
|
317
317
|
|
|
318
318
|
const codeActionsContainerStyle = useMemo(
|
|
319
319
|
() =>
|
|
320
320
|
({
|
|
321
|
-
position:
|
|
321
|
+
position: 'absolute',
|
|
322
322
|
top: 12,
|
|
323
323
|
right: 12,
|
|
324
|
-
flexDirection:
|
|
325
|
-
alignItems:
|
|
326
|
-
justifyContent:
|
|
327
|
-
} satisfies ViewStyle
|
|
328
|
-
[]
|
|
324
|
+
flexDirection: 'row',
|
|
325
|
+
alignItems: 'center',
|
|
326
|
+
justifyContent: 'flex-end',
|
|
327
|
+
}) satisfies ViewStyle,
|
|
328
|
+
[],
|
|
329
329
|
);
|
|
330
330
|
|
|
331
331
|
const codeActionButtonBaseStyle = useMemo(
|
|
332
332
|
() =>
|
|
333
333
|
({
|
|
334
|
-
alignItems:
|
|
335
|
-
justifyContent:
|
|
334
|
+
alignItems: 'center',
|
|
335
|
+
justifyContent: 'center',
|
|
336
336
|
borderRadius: 999,
|
|
337
337
|
borderWidth: 1,
|
|
338
338
|
borderColor,
|
|
339
339
|
paddingHorizontal: 12,
|
|
340
340
|
paddingVertical: 8,
|
|
341
341
|
backgroundColor: isDarkMode
|
|
342
|
-
?
|
|
343
|
-
:
|
|
344
|
-
} satisfies ViewStyle
|
|
345
|
-
[borderColor, isDarkMode]
|
|
342
|
+
? 'rgba(15, 15, 15, 0.9)'
|
|
343
|
+
: 'rgba(255, 255, 255, 0.92)',
|
|
344
|
+
}) satisfies ViewStyle,
|
|
345
|
+
[borderColor, isDarkMode],
|
|
346
346
|
);
|
|
347
347
|
|
|
348
348
|
const codeToggleButtonSpacingStyle = useMemo(
|
|
349
349
|
() =>
|
|
350
350
|
({
|
|
351
351
|
marginLeft: 16,
|
|
352
|
-
} satisfies ViewStyle
|
|
353
|
-
[]
|
|
352
|
+
}) satisfies ViewStyle,
|
|
353
|
+
[],
|
|
354
354
|
);
|
|
355
355
|
|
|
356
356
|
const codeContentContainerStyle = useMemo(
|
|
357
357
|
() =>
|
|
358
358
|
({
|
|
359
|
-
overflow:
|
|
359
|
+
overflow: 'hidden',
|
|
360
360
|
marginTop: 24,
|
|
361
|
-
} satisfies ViewStyle
|
|
362
|
-
[]
|
|
361
|
+
}) satisfies ViewStyle,
|
|
362
|
+
[],
|
|
363
363
|
);
|
|
364
364
|
|
|
365
365
|
const copyCodeToClipboard = useCallback(
|
|
366
366
|
async (code: string) => {
|
|
367
367
|
try {
|
|
368
368
|
if (!code.trim()) {
|
|
369
|
-
toast.warning(translate(
|
|
369
|
+
toast.warning(translate('chatbot.empty_message'), {
|
|
370
370
|
duration: 2000,
|
|
371
371
|
});
|
|
372
372
|
return;
|
|
373
373
|
}
|
|
374
374
|
|
|
375
375
|
await Clipboard.setStringAsync(code);
|
|
376
|
-
toast.success(translate(
|
|
376
|
+
toast.success(translate('chatbot.copy_code_success'), {
|
|
377
377
|
duration: 2000,
|
|
378
378
|
});
|
|
379
379
|
} catch (error) {
|
|
380
|
-
console.error(
|
|
381
|
-
error: error instanceof Error ? error.message :
|
|
380
|
+
console.error('[CHATBOT_FRONTEND] Copy code failed:', {
|
|
381
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
382
382
|
});
|
|
383
|
-
toast.error(translate(
|
|
383
|
+
toast.error(translate('chatbot.copy_code_failed'), {
|
|
384
384
|
duration: 3000,
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
387
|
},
|
|
388
|
-
[toast]
|
|
388
|
+
[toast],
|
|
389
389
|
);
|
|
390
390
|
|
|
391
391
|
// Memoize CodeBlock wrapper to pass all required props
|
|
@@ -393,7 +393,7 @@ export const ChatMarkdown = React.memo(function ChatMarkdown({
|
|
|
393
393
|
(
|
|
394
394
|
containerStyle: ViewStyle | TextStyle | ImageStyle,
|
|
395
395
|
content: string,
|
|
396
|
-
language: string
|
|
396
|
+
language: string,
|
|
397
397
|
) => {
|
|
398
398
|
return (
|
|
399
399
|
<CodeBlock
|
|
@@ -422,7 +422,7 @@ export const ChatMarkdown = React.memo(function ChatMarkdown({
|
|
|
422
422
|
codeToggleButtonSpacingStyle,
|
|
423
423
|
codeContentContainerStyle,
|
|
424
424
|
copyCodeToClipboard,
|
|
425
|
-
]
|
|
425
|
+
],
|
|
426
426
|
);
|
|
427
427
|
|
|
428
428
|
const handleLinkPress = useCallback((url: string) => {
|
|
@@ -443,25 +443,25 @@ export const ChatMarkdown = React.memo(function ChatMarkdown({
|
|
|
443
443
|
_children: React.ReactNode[],
|
|
444
444
|
_parent: any[],
|
|
445
445
|
styles: Record<string, any>,
|
|
446
|
-
_inheritedStyles: Record<string, any> = {}
|
|
446
|
+
_inheritedStyles: Record<string, any> = {},
|
|
447
447
|
) => {
|
|
448
|
-
const rawContent = typeof node.content ===
|
|
449
|
-
const trimmed = rawContent.replace(/\n+$/u,
|
|
448
|
+
const rawContent = typeof node.content === 'string' ? node.content : '';
|
|
449
|
+
const trimmed = rawContent.replace(/\n+$/u, '');
|
|
450
450
|
const content = trimmed.length > 0 ? trimmed : rawContent;
|
|
451
451
|
|
|
452
452
|
const info = node.attributes?.info;
|
|
453
453
|
const className = node.attributes?.class;
|
|
454
454
|
const languageFromInfo =
|
|
455
|
-
typeof info ===
|
|
455
|
+
typeof info === 'string' && info.trim().length > 0
|
|
456
456
|
? info.trim().split(/\s+/u)[0]
|
|
457
457
|
: undefined;
|
|
458
458
|
const languageFromClass =
|
|
459
|
-
typeof className ===
|
|
460
|
-
? className.match(/language-([\w-]+)/u)?.[1] ??
|
|
461
|
-
className.match(/lang-([\w-]+)/u)?.[1]
|
|
459
|
+
typeof className === 'string'
|
|
460
|
+
? (className.match(/language-([\w-]+)/u)?.[1] ??
|
|
461
|
+
className.match(/lang-([\w-]+)/u)?.[1])
|
|
462
462
|
: undefined;
|
|
463
|
-
const language = (languageFromInfo ?? languageFromClass ??
|
|
464
|
-
.replace(/^language-/u,
|
|
463
|
+
const language = (languageFromInfo ?? languageFromClass ?? '')
|
|
464
|
+
.replace(/^language-/u, '')
|
|
465
465
|
.toLowerCase();
|
|
466
466
|
|
|
467
467
|
const containerStyle =
|
|
@@ -476,7 +476,7 @@ export const ChatMarkdown = React.memo(function ChatMarkdown({
|
|
|
476
476
|
|
|
477
477
|
return {
|
|
478
478
|
code: (node, _children, _parent, styles) => {
|
|
479
|
-
const content = node.content ||
|
|
479
|
+
const content = node.content || '';
|
|
480
480
|
return (
|
|
481
481
|
<Text key={node.key} style={styles.code_inline}>
|
|
482
482
|
{content}
|
|
@@ -501,21 +501,21 @@ export const ChatMarkdown = React.memo(function ChatMarkdown({
|
|
|
501
501
|
},
|
|
502
502
|
link: (node, children, _parent, styles) => {
|
|
503
503
|
const href =
|
|
504
|
-
typeof node.attributes?.href ===
|
|
504
|
+
typeof node.attributes?.href === 'string' ? node.attributes.href : '';
|
|
505
505
|
const titleAttr =
|
|
506
|
-
typeof node.attributes?.title ===
|
|
506
|
+
typeof node.attributes?.title === 'string'
|
|
507
507
|
? node.attributes.title.trim()
|
|
508
|
-
:
|
|
508
|
+
: '';
|
|
509
509
|
const fallbackLabel =
|
|
510
|
-
typeof node.content ===
|
|
510
|
+
typeof node.content === 'string' && node.content.trim().length > 0
|
|
511
511
|
? node.content.trim()
|
|
512
512
|
: href;
|
|
513
513
|
const linkLabel =
|
|
514
514
|
titleAttr.length > 0
|
|
515
515
|
? titleAttr
|
|
516
516
|
: children && children.length > 0
|
|
517
|
-
|
|
518
|
-
|
|
517
|
+
? children
|
|
518
|
+
: fallbackLabel;
|
|
519
519
|
|
|
520
520
|
return (
|
|
521
521
|
<Text
|
|
@@ -537,7 +537,7 @@ export const ChatMarkdown = React.memo(function ChatMarkdown({
|
|
|
537
537
|
return null;
|
|
538
538
|
}
|
|
539
539
|
|
|
540
|
-
const alt = node.attributes?.alt ??
|
|
540
|
+
const alt = node.attributes?.alt ?? '';
|
|
541
541
|
const caption = alt.trim().length > 0 ? alt : undefined;
|
|
542
542
|
|
|
543
543
|
return (
|
|
@@ -547,7 +547,7 @@ export const ChatMarkdown = React.memo(function ChatMarkdown({
|
|
|
547
547
|
style={styles.image}
|
|
548
548
|
resizeMode="cover"
|
|
549
549
|
accessible
|
|
550
|
-
accessibilityLabel={caption ??
|
|
550
|
+
accessibilityLabel={caption ?? 'Markdown image'}
|
|
551
551
|
/>
|
|
552
552
|
{caption ? (
|
|
553
553
|
<Text style={styles.image_caption}>{caption}</Text>
|
|
@@ -11,12 +11,12 @@ import {
|
|
|
11
11
|
type ViewStyle,
|
|
12
12
|
} from 'react-native';
|
|
13
13
|
import { Light as SyntaxHighlighter } from 'react-syntax-highlighter';
|
|
14
|
-
import js from 'react-syntax-highlighter/dist/esm/languages/hljs/javascript';
|
|
15
|
-
import ts from 'react-syntax-highlighter/dist/esm/languages/hljs/typescript';
|
|
16
|
-
import python from 'react-syntax-highlighter/dist/esm/languages/hljs/python';
|
|
17
|
-
import json from 'react-syntax-highlighter/dist/esm/languages/hljs/json';
|
|
18
14
|
import bash from 'react-syntax-highlighter/dist/esm/languages/hljs/bash';
|
|
19
15
|
import css from 'react-syntax-highlighter/dist/esm/languages/hljs/css';
|
|
16
|
+
import js from 'react-syntax-highlighter/dist/esm/languages/hljs/javascript';
|
|
17
|
+
import json from 'react-syntax-highlighter/dist/esm/languages/hljs/json';
|
|
18
|
+
import python from 'react-syntax-highlighter/dist/esm/languages/hljs/python';
|
|
19
|
+
import ts from 'react-syntax-highlighter/dist/esm/languages/hljs/typescript';
|
|
20
20
|
import xml from 'react-syntax-highlighter/dist/esm/languages/hljs/xml';
|
|
21
21
|
|
|
22
22
|
import { translate } from '@/lib';
|
|
@@ -12,12 +12,8 @@
|
|
|
12
12
|
"to": "apps/native/src/features/chatbot"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
|
-
"from": "
|
|
16
|
-
"to": "
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"from": "packages/backend/convex/agents.ts",
|
|
20
|
-
"to": "packages/backend/convex/agents.ts"
|
|
15
|
+
"from": "packages/backend/convex/chatbot",
|
|
16
|
+
"to": "packages/backend/convex/chatbot"
|
|
21
17
|
},
|
|
22
18
|
{
|
|
23
19
|
"from": "packages/backend/convex/chatbotAgent.ts",
|
|
@@ -26,21 +22,8 @@
|
|
|
26
22
|
{
|
|
27
23
|
"from": "packages/backend/convex/chatbotHistory.ts",
|
|
28
24
|
"to": "packages/backend/convex/chatbotHistory.ts"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"from": "packages/backend/convex/tools",
|
|
32
|
-
"to": "packages/backend/convex/tools"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"from": "packages/backend/convex/chatbot",
|
|
36
|
-
"to": "packages/backend/convex/chatbot"
|
|
37
25
|
}
|
|
38
26
|
],
|
|
39
|
-
"configuration": {
|
|
40
|
-
"apiClient": {
|
|
41
|
-
"exports": ["export { type ChatbotApi, chatbotApi } from './chatbot';"]
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
27
|
"nav": {
|
|
45
28
|
"href": "/(root)/(protected)/chatbot",
|
|
46
29
|
"label": "AI Chatbot",
|
|
@@ -58,25 +41,5 @@
|
|
|
58
41
|
"react-native-reanimated",
|
|
59
42
|
"react-native-safe-area-context"
|
|
60
43
|
]
|
|
61
|
-
}
|
|
62
|
-
"env": [
|
|
63
|
-
{
|
|
64
|
-
"key": "OPENAI_API_KEY",
|
|
65
|
-
"description": "OpenAI API key for chat completions",
|
|
66
|
-
"example": "sk-...",
|
|
67
|
-
"link": "https://platform.openai.com/api-keys",
|
|
68
|
-
"file": "packages/backend/.env.local",
|
|
69
|
-
"required": true
|
|
70
|
-
}
|
|
71
|
-
],
|
|
72
|
-
"manualSteps": [
|
|
73
|
-
{
|
|
74
|
-
"title": "Configure Convex Environment Variables",
|
|
75
|
-
"description": "Run: npx convex env set OPENAI_API_KEY sk-your-key\\nOr set it in the Convex dashboard"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"title": "Deploy Convex Schema",
|
|
79
|
-
"description": "Run: npx convex dev\\nThis will sync the schema with Convex"
|
|
80
|
-
}
|
|
81
|
-
]
|
|
44
|
+
}
|
|
82
45
|
}
|
|
Binary file
|
package/recipes/chatbot-supabase/apps/native/src/features/chatbot/components/chat-markdown.tsx
CHANGED
|
@@ -35,7 +35,10 @@ import {
|
|
|
35
35
|
type ViewStyle,
|
|
36
36
|
} from 'react-native';
|
|
37
37
|
import Markdown, { type RenderRules } from 'react-native-markdown-display';
|
|
38
|
-
import {
|
|
38
|
+
import {
|
|
39
|
+
atomOneDark,
|
|
40
|
+
github,
|
|
41
|
+
} from 'react-syntax-highlighter/dist/esm/styles/hljs';
|
|
39
42
|
|
|
40
43
|
import { useToast } from '@/components/ui/utils';
|
|
41
44
|
import { translate } from '@/lib';
|