@agent-native/core 0.86.0 → 0.87.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/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +21 -0
- package/corpus/core/docs/content/components.mdx +13 -0
- package/corpus/core/docs/content/creating-templates.mdx +7 -0
- package/corpus/core/docs/content/locales/ar-SA/components.mdx +9 -0
- package/corpus/core/docs/content/locales/ar-SA/creating-templates.mdx +2 -0
- package/corpus/core/docs/content/locales/ar-SA/template-analytics.mdx +6 -0
- package/corpus/core/docs/content/locales/ar-SA/template-clips.mdx +7 -0
- package/corpus/core/docs/content/locales/ar-SA/tracking.mdx +6 -0
- package/corpus/core/docs/content/locales/de-DE/components.mdx +9 -0
- package/corpus/core/docs/content/locales/de-DE/creating-templates.mdx +2 -0
- package/corpus/core/docs/content/locales/de-DE/template-analytics.mdx +6 -0
- package/corpus/core/docs/content/locales/de-DE/template-clips.mdx +7 -0
- package/corpus/core/docs/content/locales/de-DE/tracking.mdx +6 -0
- package/corpus/core/docs/content/locales/es-ES/components.mdx +9 -0
- package/corpus/core/docs/content/locales/es-ES/creating-templates.mdx +2 -0
- package/corpus/core/docs/content/locales/es-ES/template-analytics.mdx +6 -0
- package/corpus/core/docs/content/locales/es-ES/template-clips.mdx +7 -0
- package/corpus/core/docs/content/locales/es-ES/tracking.mdx +6 -0
- package/corpus/core/docs/content/locales/fr-FR/components.mdx +9 -0
- package/corpus/core/docs/content/locales/fr-FR/creating-templates.mdx +2 -0
- package/corpus/core/docs/content/locales/fr-FR/template-analytics.mdx +6 -0
- package/corpus/core/docs/content/locales/fr-FR/template-clips.mdx +7 -0
- package/corpus/core/docs/content/locales/fr-FR/tracking.mdx +6 -0
- package/corpus/core/docs/content/locales/hi-IN/components.mdx +9 -0
- package/corpus/core/docs/content/locales/hi-IN/creating-templates.mdx +2 -0
- package/corpus/core/docs/content/locales/hi-IN/template-analytics.mdx +6 -0
- package/corpus/core/docs/content/locales/hi-IN/template-clips.mdx +7 -0
- package/corpus/core/docs/content/locales/hi-IN/tracking.mdx +6 -0
- package/corpus/core/docs/content/locales/ja-JP/components.mdx +9 -0
- package/corpus/core/docs/content/locales/ja-JP/creating-templates.mdx +2 -0
- package/corpus/core/docs/content/locales/ja-JP/template-analytics.mdx +6 -0
- package/corpus/core/docs/content/locales/ja-JP/template-clips.mdx +7 -0
- package/corpus/core/docs/content/locales/ja-JP/tracking.mdx +6 -0
- package/corpus/core/docs/content/locales/ko-KR/components.mdx +9 -0
- package/corpus/core/docs/content/locales/ko-KR/creating-templates.mdx +2 -0
- package/corpus/core/docs/content/locales/ko-KR/template-analytics.mdx +6 -0
- package/corpus/core/docs/content/locales/ko-KR/template-clips.mdx +7 -0
- package/corpus/core/docs/content/locales/ko-KR/tracking.mdx +6 -0
- package/corpus/core/docs/content/locales/pt-BR/components.mdx +9 -0
- package/corpus/core/docs/content/locales/pt-BR/creating-templates.mdx +2 -0
- package/corpus/core/docs/content/locales/pt-BR/template-analytics.mdx +6 -0
- package/corpus/core/docs/content/locales/pt-BR/template-clips.mdx +7 -0
- package/corpus/core/docs/content/locales/pt-BR/tracking.mdx +6 -0
- package/corpus/core/docs/content/locales/zh-CN/components.mdx +9 -0
- package/corpus/core/docs/content/locales/zh-CN/creating-templates.mdx +2 -0
- package/corpus/core/docs/content/locales/zh-CN/template-analytics.mdx +6 -0
- package/corpus/core/docs/content/locales/zh-CN/template-clips.mdx +7 -0
- package/corpus/core/docs/content/locales/zh-CN/tracking.mdx +6 -0
- package/corpus/core/docs/content/locales/zh-TW/components.mdx +9 -0
- package/corpus/core/docs/content/locales/zh-TW/creating-templates.mdx +2 -0
- package/corpus/core/docs/content/locales/zh-TW/template-analytics.mdx +6 -0
- package/corpus/core/docs/content/locales/zh-TW/template-clips.mdx +7 -0
- package/corpus/core/docs/content/locales/zh-TW/tracking.mdx +6 -0
- package/corpus/core/docs/content/template-analytics.mdx +6 -0
- package/corpus/core/docs/content/template-clips.mdx +7 -0
- package/corpus/core/docs/content/tracking.mdx +6 -0
- package/corpus/core/package.json +9 -1
- package/corpus/core/src/application-state/emitter.ts +37 -5
- package/corpus/core/src/cli/create.ts +55 -3
- package/corpus/core/src/cli/workspacify.ts +10 -4
- package/corpus/core/src/client/AgentPanel.tsx +10 -0
- package/corpus/core/src/client/AssistantChat.tsx +91 -27
- package/corpus/core/src/client/ErrorBoundary.tsx +67 -12
- package/corpus/core/src/client/ErrorReportActions.tsx +69 -0
- package/corpus/core/src/client/FeedbackButton.tsx +8 -4
- package/corpus/core/src/client/components/ui/dialog.tsx +1 -91
- package/corpus/core/src/client/components/ui/dropdown-menu.tsx +1 -191
- package/corpus/core/src/client/components/ui/hover-card.tsx +1 -29
- package/corpus/core/src/client/components/ui/popover.tsx +1 -31
- package/corpus/core/src/client/components/ui/sheet.tsx +1 -96
- package/corpus/core/src/client/components/ui/tooltip.tsx +1 -53
- package/corpus/core/src/client/db-admin/DbAdminPage.tsx +41 -13
- package/corpus/core/src/client/db-admin/SqlEditor.tsx +10 -3
- package/corpus/core/src/client/db-admin/TableEditor.tsx +12 -5
- package/corpus/core/src/client/db-admin/useAgentSync.ts +10 -3
- package/corpus/core/src/client/db-admin/useDbAdmin.ts +65 -16
- package/corpus/core/src/client/error-reporting.ts +100 -0
- package/corpus/core/src/client/index.ts +11 -0
- package/corpus/core/src/client/org/RequireActiveOrg.tsx +12 -0
- package/corpus/core/src/client/visual-style-controls.tsx +615 -2
- package/corpus/core/src/db-admin/index.ts +26 -0
- package/corpus/core/src/db-admin/operations.ts +87 -49
- package/corpus/core/src/localization/default-messages.ts +4 -0
- package/corpus/core/src/secrets/crypto.ts +47 -9
- package/corpus/core/src/server/agent-access.ts +72 -0
- package/corpus/core/src/server/builder-design-systems.ts +328 -9
- package/corpus/core/src/server/h3-helpers.ts +14 -2
- package/corpus/core/src/server/index.ts +34 -0
- package/corpus/core/src/server/request-context.ts +64 -7
- package/corpus/core/src/shared/agent-access.ts +112 -0
- package/corpus/core/src/shared/index.ts +14 -0
- package/corpus/core/src/templates/default/app/root.tsx +47 -0
- package/corpus/templates/analytics/AGENTS.md +10 -4
- package/corpus/templates/analytics/actions/delete-db-admin-connection.ts +19 -0
- package/corpus/templates/analytics/actions/list-db-admin-connections.ts +18 -0
- package/corpus/templates/analytics/actions/navigate.ts +17 -3
- package/corpus/templates/analytics/actions/save-db-admin-connection.ts +33 -0
- package/corpus/templates/analytics/actions/view-screen.ts +11 -3
- package/corpus/templates/analytics/app/components/InlineMetric.tsx +2 -2
- package/corpus/templates/analytics/app/components/dashboard/CumulativeNetChart.tsx +7 -2
- package/corpus/templates/analytics/app/components/dashboard/DataTable.tsx +16 -11
- package/corpus/templates/analytics/app/components/dashboard/DateRangePicker.tsx +2 -1
- package/corpus/templates/analytics/app/components/dashboard/MetricCard.tsx +7 -2
- package/corpus/templates/analytics/app/components/dashboard/RecentActivity.tsx +6 -3
- package/corpus/templates/analytics/app/components/dashboard/RevenueChart.tsx +6 -1
- package/corpus/templates/analytics/app/components/dashboard/RevenueComparisonChart.tsx +7 -2
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +15 -11
- package/corpus/templates/analytics/app/components/dashboard/StatsCard.tsx +7 -1
- package/corpus/templates/analytics/app/components/dashboard/TimeSeriesChart.tsx +7 -2
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +16 -16
- package/corpus/templates/analytics/app/components/layout/HeaderActions.tsx +1 -2
- package/corpus/templates/analytics/app/components/layout/MobileNav.tsx +5 -2
- package/corpus/templates/analytics/app/components/layout/NewAnalysisDialog.tsx +6 -6
- package/corpus/templates/analytics/app/components/layout/NewDashboardDialog.tsx +3 -4
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +12 -9
- package/corpus/templates/analytics/app/components/ui/calendar.tsx +1 -1
- package/corpus/templates/analytics/app/hooks/use-navigation-state.ts +11 -2
- package/corpus/templates/analytics/app/i18n/zh-TW.ts +23 -2
- package/corpus/templates/analytics/app/i18n-data.ts +230 -20
- package/corpus/templates/analytics/app/pages/Agents.tsx +406 -12
- package/corpus/templates/analytics/app/pages/DataDictionary.tsx +21 -21
- package/corpus/templates/analytics/app/pages/DataSources.tsx +28 -28
- package/corpus/templates/analytics/app/pages/NotFound.tsx +1 -2
- package/corpus/templates/analytics/app/pages/Placeholder.tsx +1 -2
- package/corpus/templates/analytics/app/pages/Settings.tsx +16 -16
- package/corpus/templates/analytics/app/pages/adhoc/DashboardSkeleton.tsx +2 -3
- package/corpus/templates/analytics/app/pages/adhoc/_shared/KpiChart.tsx +13 -8
- package/corpus/templates/analytics/app/pages/adhoc/_shared/components/DateRangeInput.tsx +2 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/ChartTypePicker.tsx +4 -2
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/DateRangePicker.tsx +2 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/EventCombobox.tsx +7 -7
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/EventPanel.tsx +1 -2
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/EventRow.tsx +1 -2
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/ExplorerChart.tsx +8 -3
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/FilterBuilder.tsx +4 -5
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/GroupByPicker.tsx +1 -2
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/PropertyCombobox.tsx +7 -7
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/PropertyValueCombobox.tsx +7 -7
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/SqlPreview.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/index.tsx +16 -16
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/ChartCard.tsx +21 -16
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +32 -32
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/DashboardFilterBar.tsx +14 -14
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/EmailReportDialog.tsx +13 -14
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +21 -13
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +28 -23
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/ViewSqlPopover.tsx +12 -12
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/ViewsMenu.tsx +15 -15
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +33 -29
- package/corpus/templates/analytics/app/pages/analyses/AnalysesList.tsx +7 -8
- package/corpus/templates/analytics/app/pages/analyses/AnalysisDetail.tsx +19 -19
- package/corpus/templates/analytics/app/pages/analyses/LegacyFusionAnalysis.tsx +15 -11
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +42 -23
- package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +12 -7
- package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +12 -12
- package/corpus/templates/analytics/app/pages/settings/AlertRulesSettingsCard.tsx +25 -25
- package/corpus/templates/analytics/app/root.tsx +2 -2
- package/corpus/templates/analytics/app/routes/catalog.tsx +8 -8
- package/corpus/templates/analytics/changelog/2026-07-03-connect-other-app-databases-from-analytics.md +6 -0
- package/corpus/templates/analytics/package.json +1 -0
- package/corpus/templates/analytics/server/db/schema.ts +27 -0
- package/corpus/templates/analytics/server/lib/db-admin-connections.ts +458 -0
- package/corpus/templates/analytics/server/lib/session-replay-agent-context.ts +59 -59
- package/corpus/templates/analytics/server/plugins/db.ts +35 -0
- package/corpus/templates/analytics/server/routes/[base]/_agent-native/analytics-db-admin/[...path].ts +1 -0
- package/corpus/templates/analytics/server/routes/_agent-native/analytics-db-admin/[...path].ts +160 -0
- package/corpus/templates/analytics/shared/session-replay-agent-access.ts +14 -3
- package/corpus/templates/assets/app/components/create/RecentDraftsSection.tsx +2 -3
- package/corpus/templates/assets/app/components/generation/GenerationResults.tsx +9 -9
- package/corpus/templates/assets/app/components/layout/Header.tsx +4 -2
- package/corpus/templates/assets/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/assets/app/components/layout/PageShell.tsx +5 -6
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +12 -12
- package/corpus/templates/assets/app/components/library/CreateLibraryDialog.tsx +8 -8
- package/corpus/templates/assets/app/components/library/EditLibraryDialog.tsx +7 -7
- package/corpus/templates/assets/app/components/library/LibraryCard.tsx +8 -8
- package/corpus/templates/assets/app/components/library/LibraryPresetGrid.tsx +2 -3
- package/corpus/templates/assets/app/root.tsx +1 -1
- package/corpus/templates/assets/app/routes/asset.$id.tsx +19 -19
- package/corpus/templates/assets/app/routes/audit.tsx +14 -15
- package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +54 -49
- package/corpus/templates/assets/app/routes/library.tsx +31 -31
- package/corpus/templates/assets/app/routes/settings.tsx +18 -18
- package/corpus/templates/assets/package.json +1 -0
- package/corpus/templates/brain/app/components/brain/CanonicalPreviewSheet.tsx +5 -6
- package/corpus/templates/brain/app/components/brain/Surface.tsx +8 -3
- package/corpus/templates/brain/app/components/layout/Layout.tsx +7 -7
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +6 -6
- package/corpus/templates/brain/app/routes/knowledge.tsx +19 -19
- package/corpus/templates/brain/app/routes/ops.tsx +18 -18
- package/corpus/templates/brain/app/routes/review.tsx +27 -22
- package/corpus/templates/brain/app/routes/search.tsx +20 -20
- package/corpus/templates/brain/app/routes/settings.tsx +22 -22
- package/corpus/templates/brain/app/routes/sources.tsx +23 -23
- package/corpus/templates/brain/package.json +1 -0
- package/corpus/templates/calendar/app/components/ThemeToggle.tsx +5 -5
- package/corpus/templates/calendar/app/components/TimezoneCombobox.tsx +6 -6
- package/corpus/templates/calendar/app/components/booking/BookingConfirmation.tsx +1 -2
- package/corpus/templates/calendar/app/components/booking/BookingForm.tsx +8 -9
- package/corpus/templates/calendar/app/components/booking/DatePicker.tsx +2 -2
- package/corpus/templates/calendar/app/components/booking/TimeSlotPicker.tsx +2 -3
- package/corpus/templates/calendar/app/components/calendar/AddCalendarDialog.tsx +15 -10
- package/corpus/templates/calendar/app/components/calendar/AttendeeAutocomplete.tsx +6 -6
- package/corpus/templates/calendar/app/components/calendar/CreateEventDialog.tsx +27 -27
- package/corpus/templates/calendar/app/components/calendar/DeleteEventDialog.tsx +12 -9
- package/corpus/templates/calendar/app/components/calendar/EventAttendeesSection.tsx +13 -10
- package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +7 -7
- package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +21 -21
- package/corpus/templates/calendar/app/components/calendar/EventDialog.tsx +11 -11
- package/corpus/templates/calendar/app/components/calendar/EventOptionControls.tsx +9 -9
- package/corpus/templates/calendar/app/components/calendar/FindTimePanel.tsx +9 -9
- package/corpus/templates/calendar/app/components/calendar/GoogleConnectBanner.tsx +6 -6
- package/corpus/templates/calendar/app/components/calendar/GoogleSetupWizard.tsx +3 -3
- package/corpus/templates/calendar/app/components/calendar/GoogleSyncButton.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/GuestNotificationDialog.tsx +10 -8
- package/corpus/templates/calendar/app/components/calendar/IntegrationsSidebar.tsx +12 -12
- package/corpus/templates/calendar/app/components/calendar/KeyboardShortcutsHelp.tsx +2 -2
- package/corpus/templates/calendar/app/components/calendar/MonthView.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/PeopleSearchDialog.tsx +6 -6
- package/corpus/templates/calendar/app/components/calendar/WeekView.tsx +6 -6
- package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +2 -2
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +16 -16
- package/corpus/templates/calendar/app/pages/AvailabilitySettings.tsx +11 -11
- package/corpus/templates/calendar/app/pages/BookingLinksPage.tsx +50 -45
- package/corpus/templates/calendar/app/pages/BookingPage.tsx +2 -2
- package/corpus/templates/calendar/app/pages/BookingsList.tsx +12 -12
- package/corpus/templates/calendar/app/pages/CalendarView.tsx +17 -17
- package/corpus/templates/calendar/app/pages/ManageBookingPage.tsx +13 -13
- package/corpus/templates/calendar/app/pages/Settings.tsx +12 -12
- package/corpus/templates/calendar/app/routes/event.tsx +2 -2
- package/corpus/templates/calendar/package.json +1 -0
- package/corpus/templates/chat/app/components/layout/Header.tsx +4 -2
- package/corpus/templates/chat/app/components/layout/Layout.tsx +7 -7
- package/corpus/templates/chat/app/components/layout/Sidebar.tsx +12 -12
- package/corpus/templates/chat/app/routes/database.tsx +1 -2
- package/corpus/templates/chat/app/routes/observability.tsx +1 -1
- package/corpus/templates/chat/app/routes/settings.tsx +5 -5
- package/corpus/templates/chat/package.json +1 -0
- package/corpus/templates/clips/AGENTS.md +5 -0
- package/corpus/templates/clips/actions/create-recording-agent-link.ts +15 -20
- package/corpus/templates/clips/actions/delete-recording-permanent.ts +74 -34
- package/corpus/templates/clips/app/components/capture-install-options.tsx +6 -6
- package/corpus/templates/clips/app/components/editable-recording-title.tsx +2 -2
- package/corpus/templates/clips/app/components/editor/chapters-editor.tsx +7 -7
- package/corpus/templates/clips/app/components/editor/editor-layout.tsx +165 -3
- package/corpus/templates/clips/app/components/editor/editor-toolbar.tsx +101 -57
- package/corpus/templates/clips/app/components/editor/split-button.tsx +4 -5
- package/corpus/templates/clips/app/components/editor/stitch-manager.tsx +9 -9
- package/corpus/templates/clips/app/components/editor/thumbnail-picker.tsx +16 -11
- package/corpus/templates/clips/app/components/editor/timeline.tsx +4 -6
- package/corpus/templates/clips/app/components/editor/transcript-editor.tsx +5 -5
- package/corpus/templates/clips/app/components/editor/trim-handles.tsx +4 -7
- package/corpus/templates/clips/app/components/editor/waveform.tsx +13 -4
- package/corpus/templates/clips/app/components/layout/Header.tsx +4 -2
- package/corpus/templates/clips/app/components/layout/Layout.tsx +2 -3
- package/corpus/templates/clips/app/components/library/bulk-action-toolbar.tsx +4 -4
- package/corpus/templates/clips/app/components/library/create-space-dialog.tsx +8 -8
- package/corpus/templates/clips/app/components/library/empty-state.tsx +1 -2
- package/corpus/templates/clips/app/components/library/folder-tree.tsx +14 -14
- package/corpus/templates/clips/app/components/library/library-grid.tsx +7 -7
- package/corpus/templates/clips/app/components/library/library-layout.tsx +16 -16
- package/corpus/templates/clips/app/components/library/organization-switcher.tsx +11 -11
- package/corpus/templates/clips/app/components/library/recording-card.tsx +16 -12
- package/corpus/templates/clips/app/components/library/search-bar.tsx +5 -5
- package/corpus/templates/clips/app/components/library/sort-menu.tsx +3 -4
- package/corpus/templates/clips/app/components/library/tag-input.tsx +4 -4
- package/corpus/templates/clips/app/components/meetings/attendee-stack.tsx +6 -2
- package/corpus/templates/clips/app/components/meetings/auto-record-prompt.tsx +1 -1
- package/corpus/templates/clips/app/components/meetings/bullet-link.tsx +4 -4
- package/corpus/templates/clips/app/components/meetings/canvas-editor.tsx +5 -5
- package/corpus/templates/clips/app/components/meetings/meeting-card.tsx +3 -3
- package/corpus/templates/clips/app/components/meetings/quick-ask-sidebar.tsx +9 -9
- package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +11 -6
- package/corpus/templates/clips/app/components/meetings/transcript-bubbles.tsx +4 -4
- package/corpus/templates/clips/app/components/player/access-password-prompt.tsx +2 -3
- package/corpus/templates/clips/app/components/player/comments-panel.tsx +14 -14
- package/corpus/templates/clips/app/components/player/delete-recording-menu.tsx +6 -7
- package/corpus/templates/clips/app/components/player/insights-panel.tsx +1 -2
- package/corpus/templates/clips/app/components/player/player-controls.tsx +15 -15
- package/corpus/templates/clips/app/components/player/reactions-tray.tsx +3 -3
- package/corpus/templates/clips/app/components/player/settings-panel.tsx +12 -13
- package/corpus/templates/clips/app/components/player/share-dialog.tsx +20 -11
- package/corpus/templates/clips/app/components/player/sign-in-prompt-dialog.tsx +2 -3
- package/corpus/templates/clips/app/components/player/timestamped-comment-button.tsx +2 -2
- package/corpus/templates/clips/app/components/player/transcript-panel.tsx +7 -7
- package/corpus/templates/clips/app/components/player/video-player.tsx +9 -9
- package/corpus/templates/clips/app/components/recorder/camera-visualizer.tsx +1 -1
- package/corpus/templates/clips/app/components/recorder/microphone-visualizer.tsx +1 -1
- package/corpus/templates/clips/app/components/recorder/pre-record-panel.tsx +21 -21
- package/corpus/templates/clips/app/components/recorder/recording-toolbar.tsx +5 -6
- package/corpus/templates/clips/app/components/recorder/storage-setup-card.tsx +6 -7
- package/corpus/templates/clips/app/components/sharing/share-ui.tsx +10 -10
- package/corpus/templates/clips/app/components/workspace/branding-editor.tsx +9 -5
- package/corpus/templates/clips/app/components/workspace/insights-hub.tsx +19 -9
- package/corpus/templates/clips/app/components/workspace/invite-dialog.tsx +9 -10
- package/corpus/templates/clips/app/components/workspace/members-list.tsx +10 -11
- package/corpus/templates/clips/app/components/workspace/notifications-list.tsx +1 -2
- package/corpus/templates/clips/app/components/workspace/top-creators-table.tsx +2 -3
- package/corpus/templates/clips/app/components/workspace/top-videos-table.tsx +2 -3
- package/corpus/templates/clips/app/hooks/use-desktop-promo.ts +1 -2
- package/corpus/templates/clips/app/root.tsx +10 -10
- package/corpus/templates/clips/app/routes/_app.dictate.tsx +13 -13
- package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +35 -26
- package/corpus/templates/clips/app/routes/_app.meetings._index.tsx +20 -20
- package/corpus/templates/clips/app/routes/_app.notifications.tsx +3 -3
- package/corpus/templates/clips/app/routes/_app.settings._index.tsx +31 -31
- package/corpus/templates/clips/app/routes/_app.settings.organization.tsx +13 -8
- package/corpus/templates/clips/app/routes/_app.spaces._index.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.trash.tsx +10 -10
- package/corpus/templates/clips/app/routes/bug-report.done.tsx +1 -1
- package/corpus/templates/clips/app/routes/bug-report.tsx +11 -11
- package/corpus/templates/clips/app/routes/download.tsx +2 -2
- package/corpus/templates/clips/app/routes/embed.$shareId.tsx +1 -1
- package/corpus/templates/clips/app/routes/invite.$token.tsx +13 -8
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +28 -23
- package/corpus/templates/clips/app/routes/record.tsx +3 -3
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +41 -20
- package/corpus/templates/clips/app/routes/share.meeting.$meetingId.tsx +2 -2
- package/corpus/templates/clips/changelog/2026-07-05-desktop-full-screen-recordings-with-system-audio-now-finaliz.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-05-desktop-recording-shortcut-start-stop.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-05-desktop-recordings-no-longer-fail-when-saved-capture-constra.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-05-permanently-deleted-clips-now-clean-up-s3-media-objects.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-05-timeline-zoom-controls-are-now-visible-in-the-clip-editor-an.md +6 -0
- package/corpus/templates/clips/desktop/src/app.tsx +98 -1
- package/corpus/templates/clips/desktop/src/components/MediaDeviceRow.tsx +3 -2
- package/corpus/templates/clips/desktop/src/lib/media-capture-constraints.ts +121 -0
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +55 -84
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +77 -39
- package/corpus/templates/clips/desktop/src-tauri/src/shortcuts.rs +60 -8
- package/corpus/templates/clips/package.json +1 -0
- package/corpus/templates/clips/server/lib/public-agent-context.ts +17 -12
- package/corpus/templates/clips/server/lib/recording-media-cleanup.ts +110 -0
- package/corpus/templates/clips/server/lib/s3-upload-provider.ts +126 -0
- package/corpus/templates/clips/server/routes/api/public-recording.get.ts +47 -11
- package/corpus/templates/clips/shared/agent-context.ts +23 -21
- package/corpus/templates/content/app/blocks/contentBlockRegistry.tsx +4 -4
- package/corpus/templates/content/app/components/EmptyState.tsx +1 -1
- package/corpus/templates/content/app/components/ThemeToggle.tsx +6 -6
- package/corpus/templates/content/app/components/editor/BubbleToolbar.tsx +5 -5
- package/corpus/templates/content/app/components/editor/CommentsSidebar.tsx +5 -5
- package/corpus/templates/content/app/components/editor/ContentReferencePreview.tsx +1 -1
- package/corpus/templates/content/app/components/editor/DocumentDatabase.tsx +36 -36
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +3 -3
- package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +29 -29
- package/corpus/templates/content/app/components/editor/DocumentToolbar.tsx +23 -23
- package/corpus/templates/content/app/components/editor/EmojiPicker.tsx +4 -5
- package/corpus/templates/content/app/components/editor/LinkHoverPreview.tsx +4 -5
- package/corpus/templates/content/app/components/editor/NotionConflictBanner.tsx +1 -1
- package/corpus/templates/content/app/components/editor/NotionSyncBar.tsx +2 -2
- package/corpus/templates/content/app/components/editor/SlashCommandMenu.tsx +5 -5
- package/corpus/templates/content/app/components/editor/TableHoverControls.tsx +13 -13
- package/corpus/templates/content/app/components/editor/VersionHistoryPanel.tsx +10 -10
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +41 -41
- package/corpus/templates/content/app/components/editor/database/shared.tsx +19 -19
- package/corpus/templates/content/app/components/editor/database-sources/BuilderSourceReviewDialog.tsx +8 -9
- package/corpus/templates/content/app/components/editor/extensions/AudioBlock.tsx +18 -19
- package/corpus/templates/content/app/components/editor/extensions/ImageBlock.tsx +20 -21
- package/corpus/templates/content/app/components/editor/extensions/LocalMdxComponentNode.tsx +8 -8
- package/corpus/templates/content/app/components/editor/extensions/VideoBlock.tsx +18 -19
- package/corpus/templates/content/app/components/layout/Header.tsx +4 -2
- package/corpus/templates/content/app/components/layout/Layout.tsx +3 -3
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +22 -22
- package/corpus/templates/content/app/components/sidebar/DocumentTreeItem.tsx +22 -22
- package/corpus/templates/content/app/components/sidebar/NotionButton.tsx +11 -11
- package/corpus/templates/content/app/root.tsx +13 -5
- package/corpus/templates/content/app/routes/_app._index.tsx +1 -1
- package/corpus/templates/content/app/routes/_app.local-files.tsx +11 -11
- package/corpus/templates/content/app/routes/_app.settings.tsx +3 -3
- package/corpus/templates/content/changelog/2026-07-03-error-screens-now-include-a-feedback-button-with-debug-info.md +6 -0
- package/corpus/templates/content/package.json +1 -0
- package/corpus/templates/design/AGENTS.md +13 -7
- package/corpus/templates/design/actions/get-design-system.ts +21 -0
- package/corpus/templates/design/actions/index-design-system-with-builder.ts +14 -37
- package/corpus/templates/design/app/components/ThemeToggle.tsx +6 -6
- package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +11 -11
- package/corpus/templates/design/app/components/design/DesignEditorSkeleton.tsx +2 -2
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +21 -16
- package/corpus/templates/design/app/components/design/DesignImportPanel.tsx +3 -3
- package/corpus/templates/design/app/components/design/DrawOverlay.tsx +7 -7
- package/corpus/templates/design/app/components/design/EditPanel.tsx +30 -30
- package/corpus/templates/design/app/components/design/FusionAppBanner.tsx +8 -9
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +14 -14
- package/corpus/templates/design/app/components/design/LocalhostWriteConsentDialog.tsx +5 -6
- package/corpus/templates/design/app/components/design/MotionDock.tsx +15 -15
- package/corpus/templates/design/app/components/design/QuestionFlow.tsx +3 -3
- package/corpus/templates/design/app/components/design/ReviewPanel.tsx +3 -3
- package/corpus/templates/design/app/components/design/StatesPanel.tsx +13 -13
- package/corpus/templates/design/app/components/design/TokensPanel.tsx +14 -14
- package/corpus/templates/design/app/components/design/TweaksPanel.tsx +6 -6
- package/corpus/templates/design/app/components/design/code-workbench/ActivityBar.tsx +3 -3
- package/corpus/templates/design/app/components/design/code-workbench/CodeWorkbench.tsx +3 -3
- package/corpus/templates/design/app/components/design/code-workbench/SideBar.tsx +70 -9
- package/corpus/templates/design/app/components/design/code-workbench/editor/EditorTabs.tsx +17 -8
- package/corpus/templates/design/app/components/design/code-workbench/editor/MonacoHost.tsx +2 -3
- package/corpus/templates/design/app/components/design/code-workbench/editor/StatusBar.tsx +1 -1
- package/corpus/templates/design/app/components/design/code-workbench/explorer/ExplorerView.tsx +8 -2
- package/corpus/templates/design/app/components/design/code-workbench/explorer/FileTree.tsx +24 -20
- package/corpus/templates/design/app/components/design/code-workbench/search/SearchView.tsx +6 -6
- package/corpus/templates/design/app/components/design/code-workbench/store.tsx +48 -0
- package/corpus/templates/design/app/components/design/inspector/AlignmentMatrix.tsx +3 -3
- package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +7 -7
- package/corpus/templates/design/app/components/design/inspector/ConstraintsWidget.tsx +3 -3
- package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +18 -18
- package/corpus/templates/design/app/components/design/inspector/ExportSettingsPanel.tsx +6 -6
- package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +6 -6
- package/corpus/templates/design/app/components/design/inspector/InspectorAiActions.tsx +7 -7
- package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +7 -7
- package/corpus/templates/design/app/components/design/inspector/ShaderControls.tsx +14 -14
- package/corpus/templates/design/app/components/design/inspector/ShaderEffectRow.tsx +9 -9
- package/corpus/templates/design/app/components/design/inspector/ShaderFillsPanel.tsx +6 -6
- package/corpus/templates/design/app/components/design-system/DesignSystemCard.tsx +2 -3
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +18 -15
- package/corpus/templates/design/app/components/layout/Header.tsx +4 -2
- package/corpus/templates/design/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +5 -5
- package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +7 -7
- package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +7 -7
- package/corpus/templates/design/app/components/visual-editor/SaveStatusIndicator.tsx +3 -3
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +6 -0
- package/corpus/templates/design/app/i18n/zh-TW.ts +15 -14
- package/corpus/templates/design/app/i18n-data.ts +154 -142
- package/corpus/templates/design/app/pages/DesignEditor.tsx +51 -47
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +40 -22
- package/corpus/templates/design/app/pages/DesignSystems.tsx +32 -32
- package/corpus/templates/design/app/pages/Index.tsx +28 -28
- package/corpus/templates/design/app/pages/NotFound.tsx +1 -2
- package/corpus/templates/design/app/pages/Present.tsx +1 -2
- package/corpus/templates/design/app/pages/VisualEdit.tsx +1 -2
- package/corpus/templates/design/app/root.tsx +1 -1
- package/corpus/templates/design/app/routes/settings.tsx +3 -3
- package/corpus/templates/design/changelog/2026-07-03-design-system-setup-now-indexes-figma-code-and-design-md-sou.md +6 -0
- package/corpus/templates/design/changelog/2026-07-03-the-code-editor-is-easier-to-use-with-top-sidebar-tabs-clear.md +6 -0
- package/corpus/templates/design/package.json +1 -0
- package/corpus/templates/design/server/lib/builder-design-system-proxy.ts +16 -106
- package/corpus/templates/forms/app/components/CloudUpgrade.tsx +10 -10
- package/corpus/templates/forms/app/components/ThemeToggle.tsx +5 -5
- package/corpus/templates/forms/app/components/builder/FieldPropertiesPanel.tsx +10 -11
- package/corpus/templates/forms/app/components/builder/FieldRenderer.tsx +13 -10
- package/corpus/templates/forms/app/components/layout/Header.tsx +4 -2
- package/corpus/templates/forms/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +15 -15
- package/corpus/templates/forms/app/components/ui/calendar.tsx +1 -1
- package/corpus/templates/forms/app/components/ui/command.tsx +1 -1
- package/corpus/templates/forms/app/pages/FormBuilderPage.tsx +24 -24
- package/corpus/templates/forms/app/pages/FormFillPage.tsx +2 -2
- package/corpus/templates/forms/app/pages/FormsListPage.tsx +25 -25
- package/corpus/templates/forms/app/pages/ResponseInsightsPage.tsx +11 -11
- package/corpus/templates/forms/app/pages/ResponsesPage.tsx +4 -4
- package/corpus/templates/forms/app/routes/_app.settings.tsx +5 -5
- package/corpus/templates/forms/app/routes/form-preview.tsx +3 -3
- package/corpus/templates/forms/package.json +1 -0
- package/corpus/templates/macros/app/components/AddExerciseDialog.tsx +1 -1
- package/corpus/templates/macros/app/components/AddMealDialog.tsx +1 -1
- package/corpus/templates/macros/app/components/AddWeightDialog.tsx +1 -1
- package/corpus/templates/macros/app/components/DailyProgress.tsx +7 -7
- package/corpus/templates/macros/app/components/WeeklyCaloriesChart.tsx +1 -2
- package/corpus/templates/macros/app/components/WeightCard.tsx +10 -10
- package/corpus/templates/macros/app/components/WeightTracker.tsx +1 -1
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +11 -7
- package/corpus/templates/macros/app/components/layout/Header.tsx +4 -2
- package/corpus/templates/macros/app/root.tsx +1 -1
- package/corpus/templates/macros/app/routes/_index.tsx +1 -1
- package/corpus/templates/macros/app/routes/analytics.tsx +9 -9
- package/corpus/templates/macros/app/routes/settings.tsx +2 -2
- package/corpus/templates/macros/package.json +1 -0
- package/corpus/templates/mail/app/components/GoogleConnectBanner.tsx +1 -1
- package/corpus/templates/mail/app/components/ThemeToggle.tsx +6 -6
- package/corpus/templates/mail/app/components/agent-engine-picker.tsx +10 -10
- package/corpus/templates/mail/app/components/email/CodeBlockLangPicker.tsx +3 -4
- package/corpus/templates/mail/app/components/email/ComposeBubbleToolbar.tsx +5 -5
- package/corpus/templates/mail/app/components/email/ComposeEditor.tsx +9 -9
- package/corpus/templates/mail/app/components/email/ComposeModal.tsx +18 -18
- package/corpus/templates/mail/app/components/email/EmailList.tsx +17 -17
- package/corpus/templates/mail/app/components/email/EmailListItem.tsx +5 -5
- package/corpus/templates/mail/app/components/email/EmailThread.tsx +6 -6
- package/corpus/templates/mail/app/components/email/InlineReplyComposer.tsx +11 -11
- package/corpus/templates/mail/app/components/email/IntegrationsSidebar.tsx +13 -13
- package/corpus/templates/mail/app/components/email/MobileActionBar.tsx +13 -13
- package/corpus/templates/mail/app/components/email/RecipientInput.tsx +13 -13
- package/corpus/templates/mail/app/components/email/SendLaterButton.tsx +4 -5
- package/corpus/templates/mail/app/components/email/SnoozeModal.tsx +1 -1
- package/corpus/templates/mail/app/components/email/SnoozePopover.tsx +6 -6
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +12 -12
- package/corpus/templates/mail/app/components/layout/SearchBar.tsx +5 -5
- package/corpus/templates/mail/app/components/settings/GmailFiltersSection.tsx +23 -23
- package/corpus/templates/mail/app/components/ui/calendar.tsx +1 -1
- package/corpus/templates/mail/app/components/ui/command.tsx +1 -1
- package/corpus/templates/mail/app/pages/DraftQueuePage.tsx +14 -14
- package/corpus/templates/mail/app/pages/NotFound.tsx +1 -2
- package/corpus/templates/mail/app/pages/SettingsPage.tsx +25 -25
- package/corpus/templates/mail/app/root.tsx +61 -2
- package/corpus/templates/mail/app/routes/_index.tsx +1 -2
- package/corpus/templates/mail/app/routes/email.tsx +2 -2
- package/corpus/templates/mail/changelog/2026-07-03-error-screens-now-include-a-feedback-button-with-debug-info.md +6 -0
- package/corpus/templates/mail/package.json +1 -0
- package/corpus/templates/plan/app/components/layout/Header.tsx +4 -2
- package/corpus/templates/plan/app/components/layout/Layout.tsx +5 -6
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +20 -20
- package/corpus/templates/plan/app/components/plan/CanvasArea.tsx +2 -3
- package/corpus/templates/plan/app/components/plan/DocumentArea.tsx +2 -2
- package/corpus/templates/plan/app/components/plan/GuestModeBanner.tsx +1 -2
- package/corpus/templates/plan/app/components/plan/LocalCodebasePicker.tsx +8 -8
- package/corpus/templates/plan/app/components/plan/PlanContentRenderer.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/PlanImageViewer.tsx +83 -82
- package/corpus/templates/plan/app/components/plan/PlanVisualSurface.tsx +3 -3
- package/corpus/templates/plan/app/components/plan/planBlocks.tsx +4 -4
- package/corpus/templates/plan/app/i18n/ar-SA.ts +3 -0
- package/corpus/templates/plan/app/i18n/de-DE.ts +4 -0
- package/corpus/templates/plan/app/i18n/en-US.ts +4 -0
- package/corpus/templates/plan/app/i18n/es-ES.ts +4 -0
- package/corpus/templates/plan/app/i18n/fr-FR.ts +4 -0
- package/corpus/templates/plan/app/i18n/hi-IN.ts +3 -0
- package/corpus/templates/plan/app/i18n/ja-JP.ts +4 -0
- package/corpus/templates/plan/app/i18n/ko-KR.ts +4 -0
- package/corpus/templates/plan/app/i18n/pt-BR.ts +4 -0
- package/corpus/templates/plan/app/i18n/zh-CN.ts +3 -0
- package/corpus/templates/plan/app/i18n/zh-TW.ts +3 -0
- package/corpus/templates/plan/app/pages/PlansPage.tsx +158 -80
- package/corpus/templates/plan/app/root.tsx +1 -1
- package/corpus/templates/plan/app/routes/_index.tsx +2 -1
- package/corpus/templates/plan/app/routes/local-plans.$slug.tsx +1 -1
- package/corpus/templates/plan/app/routes/plans.$id.tsx +2 -1
- package/corpus/templates/plan/app/routes/plans.tsx +2 -1
- package/corpus/templates/plan/app/routes/recaps.$id.tsx +2 -1
- package/corpus/templates/plan/app/routes/recaps.tsx +2 -1
- package/corpus/templates/plan/app/routes/settings.tsx +5 -5
- package/corpus/templates/plan/changelog/2026-07-03-error-screens-now-include-a-feedback-button-with-debug-info.md +6 -0
- package/corpus/templates/plan/changelog/2026-07-05-images-in-plan-documents-open-reliably-in-the-full-size-prev.md +6 -0
- package/corpus/templates/plan/package.json +1 -0
- package/corpus/templates/slides/AGENTS.md +7 -3
- package/corpus/templates/slides/actions/get-design-system.ts +21 -0
- package/corpus/templates/slides/actions/import-file.ts +15 -7
- package/corpus/templates/slides/actions/index-design-system-with-builder.ts +14 -37
- package/corpus/templates/slides/app/components/ThemeToggle.tsx +6 -6
- package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +5 -5
- package/corpus/templates/slides/app/components/deck/DeckCard.tsx +7 -7
- package/corpus/templates/slides/app/components/deck/ExcalidrawSlide.tsx +1 -2
- package/corpus/templates/slides/app/components/deck/SlideRenderer.tsx +1 -1
- package/corpus/templates/slides/app/components/design-system/DesignSystemCard.tsx +2 -3
- package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +45 -22
- package/corpus/templates/slides/app/components/editor/AnimationsPanel.tsx +7 -7
- package/corpus/templates/slides/app/components/editor/BlockBubbleMenu.tsx +5 -5
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +8 -8
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +15 -17
- package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +9 -10
- package/corpus/templates/slides/app/components/editor/GenerateSlidesDialog.tsx +5 -6
- package/corpus/templates/slides/app/components/editor/HistoryPanel.tsx +12 -12
- package/corpus/templates/slides/app/components/editor/ImageDropPromptPopover.tsx +3 -4
- package/corpus/templates/slides/app/components/editor/ImageSearchPanel.tsx +4 -5
- package/corpus/templates/slides/app/components/editor/ImportButton.tsx +3 -4
- package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +1 -2
- package/corpus/templates/slides/app/components/editor/ShareDialog.tsx +10 -10
- package/corpus/templates/slides/app/components/editor/SlideBubbleMenu.tsx +10 -10
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +169 -160
- package/corpus/templates/slides/app/components/editor/SlideStyleInspector.tsx +20 -17
- package/corpus/templates/slides/app/components/editor/SpeakerNotesPanel.tsx +56 -6
- package/corpus/templates/slides/app/components/editor/TweaksPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/layout/Header.tsx +4 -2
- package/corpus/templates/slides/app/components/layout/Layout.tsx +7 -2
- package/corpus/templates/slides/app/components/layout/Sidebar.tsx +5 -5
- package/corpus/templates/slides/app/components/visual-editor/CanvasCommentPins.tsx +6 -6
- package/corpus/templates/slides/app/components/visual-editor/DrawOverlay.tsx +7 -7
- package/corpus/templates/slides/app/i18n/ar-SA.ts +8 -7
- package/corpus/templates/slides/app/i18n/de-DE.ts +7 -8
- package/corpus/templates/slides/app/i18n/en-US.ts +8 -7
- package/corpus/templates/slides/app/i18n/es-ES.ts +7 -8
- package/corpus/templates/slides/app/i18n/fr-FR.ts +7 -8
- package/corpus/templates/slides/app/i18n/hi-IN.ts +8 -7
- package/corpus/templates/slides/app/i18n/ja-JP.ts +7 -8
- package/corpus/templates/slides/app/i18n/ko-KR.ts +7 -7
- package/corpus/templates/slides/app/i18n/pt-BR.ts +7 -8
- package/corpus/templates/slides/app/i18n/zh-CN.ts +8 -7
- package/corpus/templates/slides/app/i18n/zh-TW.ts +8 -7
- package/corpus/templates/slides/app/lib/canvas-zoom.ts +16 -1
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +6 -6
- package/corpus/templates/slides/app/pages/DesignSystems.tsx +5 -5
- package/corpus/templates/slides/app/pages/Index.tsx +18 -15
- package/corpus/templates/slides/app/root.tsx +3 -3
- package/corpus/templates/slides/app/routes/settings.tsx +5 -5
- package/corpus/templates/slides/changelog/2026-07-03-design-system-setup-now-indexes-figma-code-and-design-md-sou.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-03-slide-editing-now-keeps-thumbnails-speaker-notes-styling-and.md +6 -0
- package/corpus/templates/slides/package.json +1 -0
- package/corpus/templates/slides/server/lib/builder-design-system-proxy.ts +16 -104
- package/dist/application-state/emitter.d.ts +9 -2
- package/dist/application-state/emitter.d.ts.map +1 -1
- package/dist/application-state/emitter.js +25 -3
- package/dist/application-state/emitter.js.map +1 -1
- package/dist/cli/create.d.ts +2 -1
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +52 -4
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/workspacify.d.ts +2 -0
- package/dist/cli/workspacify.d.ts.map +1 -1
- package/dist/cli/workspacify.js +8 -4
- package/dist/cli/workspacify.js.map +1 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +2 -1
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +77 -25
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/ErrorBoundary.d.ts.map +1 -1
- package/dist/client/ErrorBoundary.js +37 -2
- package/dist/client/ErrorBoundary.js.map +1 -1
- package/dist/client/ErrorReportActions.d.ts +13 -0
- package/dist/client/ErrorReportActions.d.ts.map +1 -0
- package/dist/client/ErrorReportActions.js +14 -0
- package/dist/client/ErrorReportActions.js.map +1 -0
- package/dist/client/FeedbackButton.d.ts +3 -1
- package/dist/client/FeedbackButton.d.ts.map +1 -1
- package/dist/client/FeedbackButton.js +6 -5
- package/dist/client/FeedbackButton.js.map +1 -1
- package/dist/client/components/ui/dialog.d.ts +1 -13
- package/dist/client/components/ui/dialog.d.ts.map +1 -1
- package/dist/client/components/ui/dialog.js +1 -20
- package/dist/client/components/ui/dialog.js.map +1 -1
- package/dist/client/components/ui/dropdown-menu.d.ts +1 -27
- package/dist/client/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/client/components/ui/dropdown-menu.js +1 -33
- package/dist/client/components/ui/dropdown-menu.js.map +1 -1
- package/dist/client/components/ui/hover-card.d.ts +1 -6
- package/dist/client/components/ui/hover-card.d.ts.map +1 -1
- package/dist/client/components/ui/hover-card.js +1 -9
- package/dist/client/components/ui/hover-card.js.map +1 -1
- package/dist/client/components/ui/popover.d.ts +1 -7
- package/dist/client/components/ui/popover.d.ts.map +1 -1
- package/dist/client/components/ui/popover.js +1 -10
- package/dist/client/components/ui/popover.js.map +1 -1
- package/dist/client/components/ui/sheet.d.ts +1 -15
- package/dist/client/components/ui/sheet.d.ts.map +1 -1
- package/dist/client/components/ui/sheet.js +1 -22
- package/dist/client/components/ui/sheet.js.map +1 -1
- package/dist/client/components/ui/tooltip.d.ts +1 -8
- package/dist/client/components/ui/tooltip.d.ts.map +1 -1
- package/dist/client/components/ui/tooltip.js +1 -17
- package/dist/client/components/ui/tooltip.js.map +1 -1
- package/dist/client/db-admin/DbAdminPage.d.ts +9 -1
- package/dist/client/db-admin/DbAdminPage.d.ts.map +1 -1
- package/dist/client/db-admin/DbAdminPage.js +17 -13
- package/dist/client/db-admin/DbAdminPage.js.map +1 -1
- package/dist/client/db-admin/SqlEditor.d.ts +3 -1
- package/dist/client/db-admin/SqlEditor.d.ts.map +1 -1
- package/dist/client/db-admin/SqlEditor.js +3 -3
- package/dist/client/db-admin/SqlEditor.js.map +1 -1
- package/dist/client/db-admin/TableEditor.d.ts +3 -1
- package/dist/client/db-admin/TableEditor.d.ts.map +1 -1
- package/dist/client/db-admin/TableEditor.js +6 -6
- package/dist/client/db-admin/TableEditor.js.map +1 -1
- package/dist/client/db-admin/useAgentSync.d.ts +3 -2
- package/dist/client/db-admin/useAgentSync.d.ts.map +1 -1
- package/dist/client/db-admin/useAgentSync.js +8 -4
- package/dist/client/db-admin/useAgentSync.js.map +1 -1
- package/dist/client/db-admin/useDbAdmin.d.ts +11 -7
- package/dist/client/db-admin/useDbAdmin.d.ts.map +1 -1
- package/dist/client/db-admin/useDbAdmin.js +45 -20
- package/dist/client/db-admin/useDbAdmin.js.map +1 -1
- package/dist/client/error-reporting.d.ts +19 -0
- package/dist/client/error-reporting.d.ts.map +1 -0
- package/dist/client/error-reporting.js +71 -0
- package/dist/client/error-reporting.js.map +1 -0
- package/dist/client/index.d.ts +3 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +3 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/org/RequireActiveOrg.d.ts.map +1 -1
- package/dist/client/org/RequireActiveOrg.js +2 -1
- package/dist/client/org/RequireActiveOrg.js.map +1 -1
- package/dist/client/visual-style-controls.d.ts +11 -0
- package/dist/client/visual-style-controls.d.ts.map +1 -1
- package/dist/client/visual-style-controls.js +350 -1
- package/dist/client/visual-style-controls.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/db-admin/index.d.ts +3 -0
- package/dist/db-admin/index.d.ts.map +1 -0
- package/dist/db-admin/index.js +2 -0
- package/dist/db-admin/index.js.map +1 -0
- package/dist/db-admin/operations.d.ts +26 -5
- package/dist/db-admin/operations.d.ts.map +1 -1
- package/dist/db-admin/operations.js +66 -55
- package/dist/db-admin/operations.js.map +1 -1
- package/dist/localization/default-messages.d.ts +3 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +3 -0
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/secrets/crypto.d.ts.map +1 -1
- package/dist/secrets/crypto.js +37 -4
- package/dist/secrets/crypto.js.map +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/agent-access.d.ts +16 -0
- package/dist/server/agent-access.d.ts.map +1 -0
- package/dist/server/agent-access.js +25 -0
- package/dist/server/agent-access.js.map +1 -0
- package/dist/server/builder-design-systems.d.ts +61 -0
- package/dist/server/builder-design-systems.d.ts.map +1 -1
- package/dist/server/builder-design-systems.js +219 -14
- package/dist/server/builder-design-systems.js.map +1 -1
- package/dist/server/h3-helpers.d.ts.map +1 -1
- package/dist/server/h3-helpers.js +12 -2
- package/dist/server/h3-helpers.js.map +1 -1
- package/dist/server/index.d.ts +2 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +2 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/request-context.d.ts +17 -0
- package/dist/server/request-context.d.ts.map +1 -1
- package/dist/server/request-context.js +46 -6
- package/dist/server/request-context.js.map +1 -1
- package/dist/shared/agent-access.d.ts +29 -0
- package/dist/shared/agent-access.d.ts.map +1 -0
- package/dist/shared/agent-access.js +57 -0
- package/dist/shared/agent-access.js.map +1 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +1 -0
- package/dist/shared/index.js.map +1 -1
- package/dist/templates/default/app/root.tsx +47 -0
- package/docs/content/components.mdx +13 -0
- package/docs/content/creating-templates.mdx +7 -0
- package/docs/content/locales/ar-SA/components.mdx +9 -0
- package/docs/content/locales/ar-SA/creating-templates.mdx +2 -0
- package/docs/content/locales/ar-SA/template-analytics.mdx +6 -0
- package/docs/content/locales/ar-SA/template-clips.mdx +7 -0
- package/docs/content/locales/ar-SA/tracking.mdx +6 -0
- package/docs/content/locales/de-DE/components.mdx +9 -0
- package/docs/content/locales/de-DE/creating-templates.mdx +2 -0
- package/docs/content/locales/de-DE/template-analytics.mdx +6 -0
- package/docs/content/locales/de-DE/template-clips.mdx +7 -0
- package/docs/content/locales/de-DE/tracking.mdx +6 -0
- package/docs/content/locales/es-ES/components.mdx +9 -0
- package/docs/content/locales/es-ES/creating-templates.mdx +2 -0
- package/docs/content/locales/es-ES/template-analytics.mdx +6 -0
- package/docs/content/locales/es-ES/template-clips.mdx +7 -0
- package/docs/content/locales/es-ES/tracking.mdx +6 -0
- package/docs/content/locales/fr-FR/components.mdx +9 -0
- package/docs/content/locales/fr-FR/creating-templates.mdx +2 -0
- package/docs/content/locales/fr-FR/template-analytics.mdx +6 -0
- package/docs/content/locales/fr-FR/template-clips.mdx +7 -0
- package/docs/content/locales/fr-FR/tracking.mdx +6 -0
- package/docs/content/locales/hi-IN/components.mdx +9 -0
- package/docs/content/locales/hi-IN/creating-templates.mdx +2 -0
- package/docs/content/locales/hi-IN/template-analytics.mdx +6 -0
- package/docs/content/locales/hi-IN/template-clips.mdx +7 -0
- package/docs/content/locales/hi-IN/tracking.mdx +6 -0
- package/docs/content/locales/ja-JP/components.mdx +9 -0
- package/docs/content/locales/ja-JP/creating-templates.mdx +2 -0
- package/docs/content/locales/ja-JP/template-analytics.mdx +6 -0
- package/docs/content/locales/ja-JP/template-clips.mdx +7 -0
- package/docs/content/locales/ja-JP/tracking.mdx +6 -0
- package/docs/content/locales/ko-KR/components.mdx +9 -0
- package/docs/content/locales/ko-KR/creating-templates.mdx +2 -0
- package/docs/content/locales/ko-KR/template-analytics.mdx +6 -0
- package/docs/content/locales/ko-KR/template-clips.mdx +7 -0
- package/docs/content/locales/ko-KR/tracking.mdx +6 -0
- package/docs/content/locales/pt-BR/components.mdx +9 -0
- package/docs/content/locales/pt-BR/creating-templates.mdx +2 -0
- package/docs/content/locales/pt-BR/template-analytics.mdx +6 -0
- package/docs/content/locales/pt-BR/template-clips.mdx +7 -0
- package/docs/content/locales/pt-BR/tracking.mdx +6 -0
- package/docs/content/locales/zh-CN/components.mdx +9 -0
- package/docs/content/locales/zh-CN/creating-templates.mdx +2 -0
- package/docs/content/locales/zh-CN/template-analytics.mdx +6 -0
- package/docs/content/locales/zh-CN/template-clips.mdx +7 -0
- package/docs/content/locales/zh-CN/tracking.mdx +6 -0
- package/docs/content/locales/zh-TW/components.mdx +9 -0
- package/docs/content/locales/zh-TW/creating-templates.mdx +2 -0
- package/docs/content/locales/zh-TW/template-analytics.mdx +6 -0
- package/docs/content/locales/zh-TW/template-clips.mdx +7 -0
- package/docs/content/locales/zh-TW/tracking.mdx +6 -0
- package/docs/content/template-analytics.mdx +6 -0
- package/docs/content/template-clips.mdx +7 -0
- package/docs/content/tracking.mdx +6 -0
- package/package.json +10 -2
- package/src/templates/default/app/root.tsx +47 -0
- package/corpus/templates/analytics/app/components/ui/accordion.tsx +0 -56
- package/corpus/templates/analytics/app/components/ui/alert-dialog.tsx +0 -139
- package/corpus/templates/analytics/app/components/ui/alert.tsx +0 -59
- package/corpus/templates/analytics/app/components/ui/aspect-ratio.tsx +0 -5
- package/corpus/templates/analytics/app/components/ui/avatar.tsx +0 -48
- package/corpus/templates/analytics/app/components/ui/badge.tsx +0 -37
- package/corpus/templates/analytics/app/components/ui/breadcrumb.tsx +0 -115
- package/corpus/templates/analytics/app/components/ui/button.tsx +0 -57
- package/corpus/templates/analytics/app/components/ui/card.tsx +0 -86
- package/corpus/templates/analytics/app/components/ui/carousel.tsx +0 -260
- package/corpus/templates/analytics/app/components/ui/checkbox.tsx +0 -28
- package/corpus/templates/analytics/app/components/ui/collapsible.tsx +0 -9
- package/corpus/templates/analytics/app/components/ui/command.tsx +0 -154
- package/corpus/templates/analytics/app/components/ui/context-menu.tsx +0 -202
- package/corpus/templates/analytics/app/components/ui/date-picker.tsx +0 -68
- package/corpus/templates/analytics/app/components/ui/dialog.tsx +0 -130
- package/corpus/templates/analytics/app/components/ui/drawer.tsx +0 -116
- package/corpus/templates/analytics/app/components/ui/dropdown-menu.tsx +0 -212
- package/corpus/templates/analytics/app/components/ui/form.tsx +0 -177
- package/corpus/templates/analytics/app/components/ui/hover-card.tsx +0 -27
- package/corpus/templates/analytics/app/components/ui/input-otp.tsx +0 -69
- package/corpus/templates/analytics/app/components/ui/input.tsx +0 -22
- package/corpus/templates/analytics/app/components/ui/label.tsx +0 -24
- package/corpus/templates/analytics/app/components/ui/menubar.tsx +0 -234
- package/corpus/templates/analytics/app/components/ui/navigation-menu.tsx +0 -128
- package/corpus/templates/analytics/app/components/ui/pagination.tsx +0 -121
- package/corpus/templates/analytics/app/components/ui/popover.tsx +0 -44
- package/corpus/templates/analytics/app/components/ui/progress.tsx +0 -26
- package/corpus/templates/analytics/app/components/ui/radio-group.tsx +0 -42
- package/corpus/templates/analytics/app/components/ui/resizable.tsx +0 -43
- package/corpus/templates/analytics/app/components/ui/scroll-area.tsx +0 -46
- package/corpus/templates/analytics/app/components/ui/select.tsx +0 -158
- package/corpus/templates/analytics/app/components/ui/separator.tsx +0 -29
- package/corpus/templates/analytics/app/components/ui/sheet.tsx +0 -160
- package/corpus/templates/analytics/app/components/ui/sidebar.tsx +0 -782
- package/corpus/templates/analytics/app/components/ui/skeleton.tsx +0 -15
- package/corpus/templates/analytics/app/components/ui/slider.tsx +0 -26
- package/corpus/templates/analytics/app/components/ui/sonner.tsx +0 -58
- package/corpus/templates/analytics/app/components/ui/spinner.tsx +0 -17
- package/corpus/templates/analytics/app/components/ui/switch.tsx +0 -27
- package/corpus/templates/analytics/app/components/ui/table.tsx +0 -117
- package/corpus/templates/analytics/app/components/ui/tabs.tsx +0 -53
- package/corpus/templates/analytics/app/components/ui/textarea.tsx +0 -23
- package/corpus/templates/analytics/app/components/ui/toast.tsx +0 -127
- package/corpus/templates/analytics/app/components/ui/toaster.tsx +0 -33
- package/corpus/templates/analytics/app/components/ui/toggle-group.tsx +0 -59
- package/corpus/templates/analytics/app/components/ui/toggle.tsx +0 -43
- package/corpus/templates/analytics/app/components/ui/tooltip.tsx +0 -30
- package/corpus/templates/analytics/app/components/ui/use-toast.ts +0 -3
- package/corpus/templates/analytics/app/hooks/use-mobile.tsx +0 -21
- package/corpus/templates/analytics/app/hooks/use-toast.ts +0 -188
- package/corpus/templates/assets/app/components/layout/HeaderActions.tsx +0 -84
- package/corpus/templates/assets/app/components/ui/alert-dialog.tsx +0 -139
- package/corpus/templates/assets/app/components/ui/alert.tsx +0 -59
- package/corpus/templates/assets/app/components/ui/avatar.tsx +0 -48
- package/corpus/templates/assets/app/components/ui/badge.tsx +0 -37
- package/corpus/templates/assets/app/components/ui/breadcrumb.tsx +0 -115
- package/corpus/templates/assets/app/components/ui/button.tsx +0 -57
- package/corpus/templates/assets/app/components/ui/card.tsx +0 -86
- package/corpus/templates/assets/app/components/ui/checkbox.tsx +0 -28
- package/corpus/templates/assets/app/components/ui/dialog.tsx +0 -130
- package/corpus/templates/assets/app/components/ui/dropdown-menu.tsx +0 -212
- package/corpus/templates/assets/app/components/ui/hover-card.tsx +0 -27
- package/corpus/templates/assets/app/components/ui/input.tsx +0 -22
- package/corpus/templates/assets/app/components/ui/label.tsx +0 -24
- package/corpus/templates/assets/app/components/ui/pagination.tsx +0 -121
- package/corpus/templates/assets/app/components/ui/popover.tsx +0 -44
- package/corpus/templates/assets/app/components/ui/progress.tsx +0 -26
- package/corpus/templates/assets/app/components/ui/scroll-area.tsx +0 -46
- package/corpus/templates/assets/app/components/ui/select.tsx +0 -158
- package/corpus/templates/assets/app/components/ui/separator.tsx +0 -29
- package/corpus/templates/assets/app/components/ui/sheet.tsx +0 -160
- package/corpus/templates/assets/app/components/ui/skeleton.tsx +0 -15
- package/corpus/templates/assets/app/components/ui/slider.tsx +0 -26
- package/corpus/templates/assets/app/components/ui/sonner.tsx +0 -58
- package/corpus/templates/assets/app/components/ui/spinner.tsx +0 -17
- package/corpus/templates/assets/app/components/ui/table.tsx +0 -117
- package/corpus/templates/assets/app/components/ui/tabs.tsx +0 -53
- package/corpus/templates/assets/app/components/ui/tooltip.tsx +0 -30
- package/corpus/templates/brain/app/components/ui/badge.tsx +0 -37
- package/corpus/templates/brain/app/components/ui/button.tsx +0 -57
- package/corpus/templates/brain/app/components/ui/card.tsx +0 -86
- package/corpus/templates/brain/app/components/ui/input.tsx +0 -22
- package/corpus/templates/brain/app/components/ui/label.tsx +0 -24
- package/corpus/templates/brain/app/components/ui/progress.tsx +0 -26
- package/corpus/templates/brain/app/components/ui/select.tsx +0 -158
- package/corpus/templates/brain/app/components/ui/separator.tsx +0 -29
- package/corpus/templates/brain/app/components/ui/sheet.tsx +0 -160
- package/corpus/templates/brain/app/components/ui/skeleton.tsx +0 -15
- package/corpus/templates/brain/app/components/ui/sonner.tsx +0 -58
- package/corpus/templates/brain/app/components/ui/switch.tsx +0 -27
- package/corpus/templates/brain/app/components/ui/table.tsx +0 -117
- package/corpus/templates/brain/app/components/ui/textarea.tsx +0 -23
- package/corpus/templates/brain/app/components/ui/tooltip.tsx +0 -30
- package/corpus/templates/calendar/app/components/ui/accordion.tsx +0 -56
- package/corpus/templates/calendar/app/components/ui/alert-dialog.tsx +0 -139
- package/corpus/templates/calendar/app/components/ui/alert.tsx +0 -59
- package/corpus/templates/calendar/app/components/ui/aspect-ratio.tsx +0 -5
- package/corpus/templates/calendar/app/components/ui/avatar.tsx +0 -48
- package/corpus/templates/calendar/app/components/ui/badge.tsx +0 -37
- package/corpus/templates/calendar/app/components/ui/breadcrumb.tsx +0 -115
- package/corpus/templates/calendar/app/components/ui/button.tsx +0 -57
- package/corpus/templates/calendar/app/components/ui/calendar.tsx +0 -68
- package/corpus/templates/calendar/app/components/ui/card.tsx +0 -86
- package/corpus/templates/calendar/app/components/ui/carousel.tsx +0 -260
- package/corpus/templates/calendar/app/components/ui/chart.tsx +0 -375
- package/corpus/templates/calendar/app/components/ui/checkbox.tsx +0 -28
- package/corpus/templates/calendar/app/components/ui/collapsible.tsx +0 -9
- package/corpus/templates/calendar/app/components/ui/command.tsx +0 -154
- package/corpus/templates/calendar/app/components/ui/context-menu.tsx +0 -202
- package/corpus/templates/calendar/app/components/ui/dialog.tsx +0 -130
- package/corpus/templates/calendar/app/components/ui/drawer.tsx +0 -116
- package/corpus/templates/calendar/app/components/ui/dropdown-menu.tsx +0 -212
- package/corpus/templates/calendar/app/components/ui/form.tsx +0 -177
- package/corpus/templates/calendar/app/components/ui/hover-card.tsx +0 -27
- package/corpus/templates/calendar/app/components/ui/input-otp.tsx +0 -69
- package/corpus/templates/calendar/app/components/ui/input.tsx +0 -22
- package/corpus/templates/calendar/app/components/ui/label.tsx +0 -24
- package/corpus/templates/calendar/app/components/ui/menubar.tsx +0 -234
- package/corpus/templates/calendar/app/components/ui/navigation-menu.tsx +0 -128
- package/corpus/templates/calendar/app/components/ui/pagination.tsx +0 -121
- package/corpus/templates/calendar/app/components/ui/popover.tsx +0 -44
- package/corpus/templates/calendar/app/components/ui/progress.tsx +0 -26
- package/corpus/templates/calendar/app/components/ui/radio-group.tsx +0 -42
- package/corpus/templates/calendar/app/components/ui/resizable.tsx +0 -43
- package/corpus/templates/calendar/app/components/ui/scroll-area.tsx +0 -46
- package/corpus/templates/calendar/app/components/ui/select.tsx +0 -158
- package/corpus/templates/calendar/app/components/ui/separator.tsx +0 -29
- package/corpus/templates/calendar/app/components/ui/sheet.tsx +0 -160
- package/corpus/templates/calendar/app/components/ui/sidebar.tsx +0 -782
- package/corpus/templates/calendar/app/components/ui/skeleton.tsx +0 -15
- package/corpus/templates/calendar/app/components/ui/slider.tsx +0 -26
- package/corpus/templates/calendar/app/components/ui/spinner.tsx +0 -17
- package/corpus/templates/calendar/app/components/ui/switch.tsx +0 -27
- package/corpus/templates/calendar/app/components/ui/table.tsx +0 -117
- package/corpus/templates/calendar/app/components/ui/tabs.tsx +0 -53
- package/corpus/templates/calendar/app/components/ui/textarea.tsx +0 -23
- package/corpus/templates/calendar/app/components/ui/toast.tsx +0 -127
- package/corpus/templates/calendar/app/components/ui/toaster.tsx +0 -33
- package/corpus/templates/calendar/app/components/ui/toggle-group.tsx +0 -59
- package/corpus/templates/calendar/app/components/ui/toggle.tsx +0 -43
- package/corpus/templates/calendar/app/components/ui/tooltip.tsx +0 -30
- package/corpus/templates/calendar/app/components/ui/use-toast.ts +0 -3
- package/corpus/templates/calendar/app/hooks/use-mobile.tsx +0 -21
- package/corpus/templates/calendar/app/hooks/use-toast.ts +0 -188
- package/corpus/templates/chat/app/components/layout/HeaderActions.tsx +0 -84
- package/corpus/templates/chat/app/components/ui/accordion.tsx +0 -56
- package/corpus/templates/chat/app/components/ui/alert-dialog.tsx +0 -139
- package/corpus/templates/chat/app/components/ui/alert.tsx +0 -59
- package/corpus/templates/chat/app/components/ui/aspect-ratio.tsx +0 -5
- package/corpus/templates/chat/app/components/ui/avatar.tsx +0 -48
- package/corpus/templates/chat/app/components/ui/badge.tsx +0 -37
- package/corpus/templates/chat/app/components/ui/breadcrumb.tsx +0 -115
- package/corpus/templates/chat/app/components/ui/button.tsx +0 -57
- package/corpus/templates/chat/app/components/ui/calendar.tsx +0 -68
- package/corpus/templates/chat/app/components/ui/card.tsx +0 -86
- package/corpus/templates/chat/app/components/ui/carousel.tsx +0 -260
- package/corpus/templates/chat/app/components/ui/chart.tsx +0 -375
- package/corpus/templates/chat/app/components/ui/checkbox.tsx +0 -28
- package/corpus/templates/chat/app/components/ui/collapsible.tsx +0 -9
- package/corpus/templates/chat/app/components/ui/command.tsx +0 -154
- package/corpus/templates/chat/app/components/ui/context-menu.tsx +0 -202
- package/corpus/templates/chat/app/components/ui/dialog.tsx +0 -130
- package/corpus/templates/chat/app/components/ui/drawer.tsx +0 -116
- package/corpus/templates/chat/app/components/ui/dropdown-menu.tsx +0 -212
- package/corpus/templates/chat/app/components/ui/form.tsx +0 -177
- package/corpus/templates/chat/app/components/ui/hover-card.tsx +0 -27
- package/corpus/templates/chat/app/components/ui/input-otp.tsx +0 -69
- package/corpus/templates/chat/app/components/ui/input.tsx +0 -22
- package/corpus/templates/chat/app/components/ui/label.tsx +0 -24
- package/corpus/templates/chat/app/components/ui/menubar.tsx +0 -234
- package/corpus/templates/chat/app/components/ui/navigation-menu.tsx +0 -128
- package/corpus/templates/chat/app/components/ui/pagination.tsx +0 -121
- package/corpus/templates/chat/app/components/ui/popover.tsx +0 -44
- package/corpus/templates/chat/app/components/ui/progress.tsx +0 -26
- package/corpus/templates/chat/app/components/ui/radio-group.tsx +0 -42
- package/corpus/templates/chat/app/components/ui/resizable.tsx +0 -43
- package/corpus/templates/chat/app/components/ui/scroll-area.tsx +0 -46
- package/corpus/templates/chat/app/components/ui/select.tsx +0 -158
- package/corpus/templates/chat/app/components/ui/separator.tsx +0 -29
- package/corpus/templates/chat/app/components/ui/sheet.tsx +0 -160
- package/corpus/templates/chat/app/components/ui/sidebar.tsx +0 -782
- package/corpus/templates/chat/app/components/ui/skeleton.tsx +0 -15
- package/corpus/templates/chat/app/components/ui/slider.tsx +0 -26
- package/corpus/templates/chat/app/components/ui/sonner.tsx +0 -58
- package/corpus/templates/chat/app/components/ui/spinner.tsx +0 -17
- package/corpus/templates/chat/app/components/ui/switch.tsx +0 -27
- package/corpus/templates/chat/app/components/ui/table.tsx +0 -117
- package/corpus/templates/chat/app/components/ui/tabs.tsx +0 -53
- package/corpus/templates/chat/app/components/ui/textarea.tsx +0 -23
- package/corpus/templates/chat/app/components/ui/toast.tsx +0 -127
- package/corpus/templates/chat/app/components/ui/toaster.tsx +0 -33
- package/corpus/templates/chat/app/components/ui/toggle-group.tsx +0 -59
- package/corpus/templates/chat/app/components/ui/toggle.tsx +0 -43
- package/corpus/templates/chat/app/components/ui/tooltip.tsx +0 -30
- package/corpus/templates/chat/app/components/ui/use-toast.ts +0 -3
- package/corpus/templates/chat/app/hooks/use-mobile.tsx +0 -21
- package/corpus/templates/chat/app/hooks/use-toast.ts +0 -188
- package/corpus/templates/clips/app/components/layout/HeaderActions.tsx +0 -84
- package/corpus/templates/clips/app/components/ui/accordion.tsx +0 -56
- package/corpus/templates/clips/app/components/ui/alert-dialog.tsx +0 -139
- package/corpus/templates/clips/app/components/ui/alert.tsx +0 -59
- package/corpus/templates/clips/app/components/ui/aspect-ratio.tsx +0 -5
- package/corpus/templates/clips/app/components/ui/avatar.tsx +0 -48
- package/corpus/templates/clips/app/components/ui/badge.tsx +0 -37
- package/corpus/templates/clips/app/components/ui/breadcrumb.tsx +0 -115
- package/corpus/templates/clips/app/components/ui/button.tsx +0 -57
- package/corpus/templates/clips/app/components/ui/calendar.tsx +0 -68
- package/corpus/templates/clips/app/components/ui/card.tsx +0 -86
- package/corpus/templates/clips/app/components/ui/carousel.tsx +0 -260
- package/corpus/templates/clips/app/components/ui/chart.tsx +0 -375
- package/corpus/templates/clips/app/components/ui/checkbox.tsx +0 -28
- package/corpus/templates/clips/app/components/ui/collapsible.tsx +0 -9
- package/corpus/templates/clips/app/components/ui/command.tsx +0 -154
- package/corpus/templates/clips/app/components/ui/context-menu.tsx +0 -202
- package/corpus/templates/clips/app/components/ui/dialog.tsx +0 -130
- package/corpus/templates/clips/app/components/ui/drawer.tsx +0 -116
- package/corpus/templates/clips/app/components/ui/dropdown-menu.tsx +0 -212
- package/corpus/templates/clips/app/components/ui/form.tsx +0 -177
- package/corpus/templates/clips/app/components/ui/hover-card.tsx +0 -27
- package/corpus/templates/clips/app/components/ui/input-otp.tsx +0 -69
- package/corpus/templates/clips/app/components/ui/input.tsx +0 -22
- package/corpus/templates/clips/app/components/ui/label.tsx +0 -24
- package/corpus/templates/clips/app/components/ui/menubar.tsx +0 -234
- package/corpus/templates/clips/app/components/ui/navigation-menu.tsx +0 -128
- package/corpus/templates/clips/app/components/ui/pagination.tsx +0 -121
- package/corpus/templates/clips/app/components/ui/popover.tsx +0 -44
- package/corpus/templates/clips/app/components/ui/progress.tsx +0 -26
- package/corpus/templates/clips/app/components/ui/radio-group.tsx +0 -42
- package/corpus/templates/clips/app/components/ui/resizable.tsx +0 -43
- package/corpus/templates/clips/app/components/ui/scroll-area.tsx +0 -46
- package/corpus/templates/clips/app/components/ui/select.tsx +0 -158
- package/corpus/templates/clips/app/components/ui/separator.tsx +0 -29
- package/corpus/templates/clips/app/components/ui/sheet.tsx +0 -160
- package/corpus/templates/clips/app/components/ui/sidebar.tsx +0 -782
- package/corpus/templates/clips/app/components/ui/skeleton.tsx +0 -15
- package/corpus/templates/clips/app/components/ui/slider.tsx +0 -26
- package/corpus/templates/clips/app/components/ui/sonner.tsx +0 -58
- package/corpus/templates/clips/app/components/ui/spinner.tsx +0 -17
- package/corpus/templates/clips/app/components/ui/switch.tsx +0 -27
- package/corpus/templates/clips/app/components/ui/table.tsx +0 -117
- package/corpus/templates/clips/app/components/ui/tabs.tsx +0 -53
- package/corpus/templates/clips/app/components/ui/textarea.tsx +0 -23
- package/corpus/templates/clips/app/components/ui/toast.tsx +0 -127
- package/corpus/templates/clips/app/components/ui/toaster.tsx +0 -33
- package/corpus/templates/clips/app/components/ui/toggle-group.tsx +0 -59
- package/corpus/templates/clips/app/components/ui/toggle.tsx +0 -43
- package/corpus/templates/clips/app/components/ui/tooltip.tsx +0 -30
- package/corpus/templates/clips/app/components/ui/use-toast.ts +0 -3
- package/corpus/templates/clips/app/hooks/use-mobile.tsx +0 -21
- package/corpus/templates/clips/app/hooks/use-toast.ts +0 -188
- package/corpus/templates/content/app/components/layout/HeaderActions.tsx +0 -84
- package/corpus/templates/content/app/components/ui/alert-dialog.tsx +0 -139
- package/corpus/templates/content/app/components/ui/button.tsx +0 -57
- package/corpus/templates/content/app/components/ui/dialog.tsx +0 -130
- package/corpus/templates/content/app/components/ui/dropdown-menu.tsx +0 -212
- package/corpus/templates/content/app/components/ui/input.tsx +0 -22
- package/corpus/templates/content/app/components/ui/label.tsx +0 -24
- package/corpus/templates/content/app/components/ui/popover.tsx +0 -44
- package/corpus/templates/content/app/components/ui/separator.tsx +0 -29
- package/corpus/templates/content/app/components/ui/sheet.tsx +0 -160
- package/corpus/templates/content/app/components/ui/skeleton.tsx +0 -15
- package/corpus/templates/content/app/components/ui/sonner.tsx +0 -58
- package/corpus/templates/content/app/components/ui/spinner.tsx +0 -17
- package/corpus/templates/content/app/components/ui/table.tsx +0 -117
- package/corpus/templates/content/app/components/ui/toast.tsx +0 -127
- package/corpus/templates/content/app/components/ui/toaster.tsx +0 -33
- package/corpus/templates/content/app/components/ui/toggle.tsx +0 -43
- package/corpus/templates/content/app/components/ui/tooltip.tsx +0 -30
- package/corpus/templates/content/app/components/ui/use-toast.ts +0 -3
- package/corpus/templates/content/app/hooks/use-mobile.tsx +0 -21
- package/corpus/templates/content/app/hooks/use-toast.ts +0 -188
- package/corpus/templates/design/app/components/layout/HeaderActions.tsx +0 -84
- package/corpus/templates/design/app/components/ui/accordion.tsx +0 -56
- package/corpus/templates/design/app/components/ui/alert-dialog.tsx +0 -139
- package/corpus/templates/design/app/components/ui/alert.tsx +0 -59
- package/corpus/templates/design/app/components/ui/aspect-ratio.tsx +0 -5
- package/corpus/templates/design/app/components/ui/avatar.tsx +0 -48
- package/corpus/templates/design/app/components/ui/badge.tsx +0 -37
- package/corpus/templates/design/app/components/ui/breadcrumb.tsx +0 -115
- package/corpus/templates/design/app/components/ui/button.tsx +0 -57
- package/corpus/templates/design/app/components/ui/calendar.tsx +0 -68
- package/corpus/templates/design/app/components/ui/card.tsx +0 -86
- package/corpus/templates/design/app/components/ui/carousel.tsx +0 -260
- package/corpus/templates/design/app/components/ui/chart.tsx +0 -375
- package/corpus/templates/design/app/components/ui/checkbox.tsx +0 -28
- package/corpus/templates/design/app/components/ui/collapsible.tsx +0 -9
- package/corpus/templates/design/app/components/ui/command.tsx +0 -154
- package/corpus/templates/design/app/components/ui/context-menu.tsx +0 -202
- package/corpus/templates/design/app/components/ui/dialog.tsx +0 -130
- package/corpus/templates/design/app/components/ui/drawer.tsx +0 -116
- package/corpus/templates/design/app/components/ui/dropdown-menu.tsx +0 -212
- package/corpus/templates/design/app/components/ui/form.tsx +0 -177
- package/corpus/templates/design/app/components/ui/hover-card.tsx +0 -27
- package/corpus/templates/design/app/components/ui/input-otp.tsx +0 -69
- package/corpus/templates/design/app/components/ui/input.tsx +0 -22
- package/corpus/templates/design/app/components/ui/label.tsx +0 -24
- package/corpus/templates/design/app/components/ui/menubar.tsx +0 -234
- package/corpus/templates/design/app/components/ui/navigation-menu.tsx +0 -128
- package/corpus/templates/design/app/components/ui/pagination.tsx +0 -121
- package/corpus/templates/design/app/components/ui/popover.tsx +0 -44
- package/corpus/templates/design/app/components/ui/progress.tsx +0 -26
- package/corpus/templates/design/app/components/ui/radio-group.tsx +0 -42
- package/corpus/templates/design/app/components/ui/resizable.tsx +0 -43
- package/corpus/templates/design/app/components/ui/scroll-area.tsx +0 -46
- package/corpus/templates/design/app/components/ui/select.tsx +0 -158
- package/corpus/templates/design/app/components/ui/separator.tsx +0 -29
- package/corpus/templates/design/app/components/ui/sheet.tsx +0 -160
- package/corpus/templates/design/app/components/ui/sidebar.tsx +0 -782
- package/corpus/templates/design/app/components/ui/skeleton.tsx +0 -15
- package/corpus/templates/design/app/components/ui/slider.tsx +0 -26
- package/corpus/templates/design/app/components/ui/sonner.tsx +0 -58
- package/corpus/templates/design/app/components/ui/spinner.tsx +0 -17
- package/corpus/templates/design/app/components/ui/switch.tsx +0 -27
- package/corpus/templates/design/app/components/ui/table.tsx +0 -117
- package/corpus/templates/design/app/components/ui/tabs.tsx +0 -53
- package/corpus/templates/design/app/components/ui/textarea.tsx +0 -23
- package/corpus/templates/design/app/components/ui/toast.tsx +0 -127
- package/corpus/templates/design/app/components/ui/toaster.tsx +0 -33
- package/corpus/templates/design/app/components/ui/toggle-group.tsx +0 -59
- package/corpus/templates/design/app/components/ui/toggle.tsx +0 -43
- package/corpus/templates/design/app/components/ui/tooltip.tsx +0 -30
- package/corpus/templates/design/app/components/ui/use-toast.ts +0 -3
- package/corpus/templates/design/app/hooks/use-mobile.tsx +0 -21
- package/corpus/templates/design/app/hooks/use-toast.ts +0 -188
- package/corpus/templates/forms/app/components/layout/HeaderActions.tsx +0 -84
- package/corpus/templates/forms/app/components/ui/accordion.tsx +0 -56
- package/corpus/templates/forms/app/components/ui/alert-dialog.tsx +0 -139
- package/corpus/templates/forms/app/components/ui/alert.tsx +0 -59
- package/corpus/templates/forms/app/components/ui/aspect-ratio.tsx +0 -5
- package/corpus/templates/forms/app/components/ui/avatar.tsx +0 -48
- package/corpus/templates/forms/app/components/ui/badge.tsx +0 -37
- package/corpus/templates/forms/app/components/ui/breadcrumb.tsx +0 -115
- package/corpus/templates/forms/app/components/ui/button.tsx +0 -57
- package/corpus/templates/forms/app/components/ui/card.tsx +0 -86
- package/corpus/templates/forms/app/components/ui/carousel.tsx +0 -260
- package/corpus/templates/forms/app/components/ui/checkbox.tsx +0 -28
- package/corpus/templates/forms/app/components/ui/collapsible.tsx +0 -9
- package/corpus/templates/forms/app/components/ui/dialog.tsx +0 -130
- package/corpus/templates/forms/app/components/ui/drawer.tsx +0 -116
- package/corpus/templates/forms/app/components/ui/dropdown-menu.tsx +0 -212
- package/corpus/templates/forms/app/components/ui/form.tsx +0 -177
- package/corpus/templates/forms/app/components/ui/hover-card.tsx +0 -27
- package/corpus/templates/forms/app/components/ui/input-otp.tsx +0 -69
- package/corpus/templates/forms/app/components/ui/input.tsx +0 -22
- package/corpus/templates/forms/app/components/ui/label.tsx +0 -24
- package/corpus/templates/forms/app/components/ui/navigation-menu.tsx +0 -128
- package/corpus/templates/forms/app/components/ui/pagination.tsx +0 -121
- package/corpus/templates/forms/app/components/ui/popover.tsx +0 -44
- package/corpus/templates/forms/app/components/ui/progress.tsx +0 -26
- package/corpus/templates/forms/app/components/ui/radio-group.tsx +0 -42
- package/corpus/templates/forms/app/components/ui/resizable.tsx +0 -43
- package/corpus/templates/forms/app/components/ui/scroll-area.tsx +0 -46
- package/corpus/templates/forms/app/components/ui/select.tsx +0 -158
- package/corpus/templates/forms/app/components/ui/separator.tsx +0 -29
- package/corpus/templates/forms/app/components/ui/sheet.tsx +0 -160
- package/corpus/templates/forms/app/components/ui/sidebar.tsx +0 -782
- package/corpus/templates/forms/app/components/ui/skeleton.tsx +0 -15
- package/corpus/templates/forms/app/components/ui/slider.tsx +0 -26
- package/corpus/templates/forms/app/components/ui/sonner.tsx +0 -58
- package/corpus/templates/forms/app/components/ui/spinner.tsx +0 -17
- package/corpus/templates/forms/app/components/ui/switch.tsx +0 -27
- package/corpus/templates/forms/app/components/ui/table.tsx +0 -117
- package/corpus/templates/forms/app/components/ui/tabs.tsx +0 -53
- package/corpus/templates/forms/app/components/ui/textarea.tsx +0 -23
- package/corpus/templates/forms/app/components/ui/toast.tsx +0 -127
- package/corpus/templates/forms/app/components/ui/toaster.tsx +0 -33
- package/corpus/templates/forms/app/components/ui/toggle-group.tsx +0 -59
- package/corpus/templates/forms/app/components/ui/toggle.tsx +0 -43
- package/corpus/templates/forms/app/components/ui/tooltip.tsx +0 -30
- package/corpus/templates/forms/app/hooks/use-mobile.tsx +0 -21
- package/corpus/templates/forms/app/hooks/use-toast.ts +0 -188
- package/corpus/templates/macros/app/components/layout/HeaderActions.tsx +0 -84
- package/corpus/templates/macros/app/components/ui/accordion.tsx +0 -56
- package/corpus/templates/macros/app/components/ui/alert-dialog.tsx +0 -139
- package/corpus/templates/macros/app/components/ui/alert.tsx +0 -59
- package/corpus/templates/macros/app/components/ui/aspect-ratio.tsx +0 -5
- package/corpus/templates/macros/app/components/ui/avatar.tsx +0 -48
- package/corpus/templates/macros/app/components/ui/badge.tsx +0 -37
- package/corpus/templates/macros/app/components/ui/breadcrumb.tsx +0 -115
- package/corpus/templates/macros/app/components/ui/chart.tsx +0 -375
- package/corpus/templates/macros/app/components/ui/checkbox.tsx +0 -28
- package/corpus/templates/macros/app/components/ui/collapsible.tsx +0 -9
- package/corpus/templates/macros/app/components/ui/command.tsx +0 -154
- package/corpus/templates/macros/app/components/ui/context-menu.tsx +0 -202
- package/corpus/templates/macros/app/components/ui/drawer.tsx +0 -116
- package/corpus/templates/macros/app/components/ui/dropdown-menu.tsx +0 -212
- package/corpus/templates/macros/app/components/ui/form.tsx +0 -177
- package/corpus/templates/macros/app/components/ui/hover-card.tsx +0 -27
- package/corpus/templates/macros/app/components/ui/label.tsx +0 -24
- package/corpus/templates/macros/app/components/ui/logo.tsx +0 -36
- package/corpus/templates/macros/app/components/ui/navigation-menu.tsx +0 -128
- package/corpus/templates/macros/app/components/ui/pagination.tsx +0 -121
- package/corpus/templates/macros/app/components/ui/popover.tsx +0 -44
- package/corpus/templates/macros/app/components/ui/radio-group.tsx +0 -42
- package/corpus/templates/macros/app/components/ui/scroll-area.tsx +0 -46
- package/corpus/templates/macros/app/components/ui/select.tsx +0 -158
- package/corpus/templates/macros/app/components/ui/separator.tsx +0 -29
- package/corpus/templates/macros/app/components/ui/sheet.tsx +0 -160
- package/corpus/templates/macros/app/components/ui/skeleton.tsx +0 -15
- package/corpus/templates/macros/app/components/ui/slider.tsx +0 -26
- package/corpus/templates/macros/app/components/ui/sonner.tsx +0 -58
- package/corpus/templates/macros/app/components/ui/switch.tsx +0 -27
- package/corpus/templates/macros/app/components/ui/table.tsx +0 -117
- package/corpus/templates/macros/app/components/ui/toast.tsx +0 -127
- package/corpus/templates/macros/app/components/ui/toggle-group.tsx +0 -59
- package/corpus/templates/macros/app/components/ui/toggle.tsx +0 -43
- package/corpus/templates/macros/app/components/ui/tooltip.tsx +0 -30
- package/corpus/templates/mail/app/components/ui/accordion.tsx +0 -56
- package/corpus/templates/mail/app/components/ui/alert-dialog.tsx +0 -139
- package/corpus/templates/mail/app/components/ui/alert.tsx +0 -59
- package/corpus/templates/mail/app/components/ui/aspect-ratio.tsx +0 -5
- package/corpus/templates/mail/app/components/ui/avatar.tsx +0 -48
- package/corpus/templates/mail/app/components/ui/badge.tsx +0 -37
- package/corpus/templates/mail/app/components/ui/breadcrumb.tsx +0 -115
- package/corpus/templates/mail/app/components/ui/button.tsx +0 -57
- package/corpus/templates/mail/app/components/ui/card.tsx +0 -86
- package/corpus/templates/mail/app/components/ui/carousel.tsx +0 -260
- package/corpus/templates/mail/app/components/ui/checkbox.tsx +0 -28
- package/corpus/templates/mail/app/components/ui/collapsible.tsx +0 -9
- package/corpus/templates/mail/app/components/ui/dialog.tsx +0 -130
- package/corpus/templates/mail/app/components/ui/drawer.tsx +0 -116
- package/corpus/templates/mail/app/components/ui/dropdown-menu.tsx +0 -212
- package/corpus/templates/mail/app/components/ui/form.tsx +0 -177
- package/corpus/templates/mail/app/components/ui/hover-card.tsx +0 -27
- package/corpus/templates/mail/app/components/ui/input-otp.tsx +0 -69
- package/corpus/templates/mail/app/components/ui/label.tsx +0 -24
- package/corpus/templates/mail/app/components/ui/navigation-menu.tsx +0 -128
- package/corpus/templates/mail/app/components/ui/pagination.tsx +0 -121
- package/corpus/templates/mail/app/components/ui/popover.tsx +0 -44
- package/corpus/templates/mail/app/components/ui/progress.tsx +0 -26
- package/corpus/templates/mail/app/components/ui/radio-group.tsx +0 -42
- package/corpus/templates/mail/app/components/ui/resizable.tsx +0 -43
- package/corpus/templates/mail/app/components/ui/scroll-area.tsx +0 -46
- package/corpus/templates/mail/app/components/ui/select.tsx +0 -158
- package/corpus/templates/mail/app/components/ui/separator.tsx +0 -29
- package/corpus/templates/mail/app/components/ui/sheet.tsx +0 -160
- package/corpus/templates/mail/app/components/ui/sidebar.tsx +0 -782
- package/corpus/templates/mail/app/components/ui/skeleton.tsx +0 -15
- package/corpus/templates/mail/app/components/ui/slider.tsx +0 -26
- package/corpus/templates/mail/app/components/ui/spinner.tsx +0 -17
- package/corpus/templates/mail/app/components/ui/switch.tsx +0 -27
- package/corpus/templates/mail/app/components/ui/table.tsx +0 -117
- package/corpus/templates/mail/app/components/ui/tabs.tsx +0 -53
- package/corpus/templates/mail/app/components/ui/toast.tsx +0 -127
- package/corpus/templates/mail/app/components/ui/toaster.tsx +0 -33
- package/corpus/templates/mail/app/components/ui/toggle-group.tsx +0 -59
- package/corpus/templates/mail/app/components/ui/toggle.tsx +0 -43
- package/corpus/templates/mail/app/components/ui/tooltip.tsx +0 -30
- package/corpus/templates/mail/app/hooks/use-toast.ts +0 -188
- package/corpus/templates/plan/app/components/layout/HeaderActions.tsx +0 -84
- package/corpus/templates/plan/app/components/ui/accordion.tsx +0 -56
- package/corpus/templates/plan/app/components/ui/alert-dialog.tsx +0 -139
- package/corpus/templates/plan/app/components/ui/alert.tsx +0 -59
- package/corpus/templates/plan/app/components/ui/aspect-ratio.tsx +0 -5
- package/corpus/templates/plan/app/components/ui/avatar.tsx +0 -48
- package/corpus/templates/plan/app/components/ui/badge.tsx +0 -37
- package/corpus/templates/plan/app/components/ui/breadcrumb.tsx +0 -115
- package/corpus/templates/plan/app/components/ui/button.tsx +0 -57
- package/corpus/templates/plan/app/components/ui/calendar.tsx +0 -68
- package/corpus/templates/plan/app/components/ui/card.tsx +0 -86
- package/corpus/templates/plan/app/components/ui/carousel.tsx +0 -260
- package/corpus/templates/plan/app/components/ui/chart.tsx +0 -375
- package/corpus/templates/plan/app/components/ui/checkbox.tsx +0 -28
- package/corpus/templates/plan/app/components/ui/collapsible.tsx +0 -9
- package/corpus/templates/plan/app/components/ui/command.tsx +0 -154
- package/corpus/templates/plan/app/components/ui/context-menu.tsx +0 -202
- package/corpus/templates/plan/app/components/ui/dialog.tsx +0 -130
- package/corpus/templates/plan/app/components/ui/drawer.tsx +0 -116
- package/corpus/templates/plan/app/components/ui/dropdown-menu.tsx +0 -212
- package/corpus/templates/plan/app/components/ui/form.tsx +0 -177
- package/corpus/templates/plan/app/components/ui/hover-card.tsx +0 -27
- package/corpus/templates/plan/app/components/ui/input-otp.tsx +0 -69
- package/corpus/templates/plan/app/components/ui/input.tsx +0 -22
- package/corpus/templates/plan/app/components/ui/label.tsx +0 -24
- package/corpus/templates/plan/app/components/ui/menubar.tsx +0 -234
- package/corpus/templates/plan/app/components/ui/navigation-menu.tsx +0 -128
- package/corpus/templates/plan/app/components/ui/pagination.tsx +0 -121
- package/corpus/templates/plan/app/components/ui/popover.tsx +0 -44
- package/corpus/templates/plan/app/components/ui/progress.tsx +0 -26
- package/corpus/templates/plan/app/components/ui/radio-group.tsx +0 -42
- package/corpus/templates/plan/app/components/ui/resizable.tsx +0 -43
- package/corpus/templates/plan/app/components/ui/scroll-area.tsx +0 -46
- package/corpus/templates/plan/app/components/ui/select.tsx +0 -158
- package/corpus/templates/plan/app/components/ui/separator.tsx +0 -29
- package/corpus/templates/plan/app/components/ui/sheet.tsx +0 -160
- package/corpus/templates/plan/app/components/ui/sidebar.tsx +0 -782
- package/corpus/templates/plan/app/components/ui/skeleton.tsx +0 -15
- package/corpus/templates/plan/app/components/ui/slider.tsx +0 -26
- package/corpus/templates/plan/app/components/ui/sonner.tsx +0 -58
- package/corpus/templates/plan/app/components/ui/spinner.tsx +0 -17
- package/corpus/templates/plan/app/components/ui/switch.tsx +0 -27
- package/corpus/templates/plan/app/components/ui/table.tsx +0 -117
- package/corpus/templates/plan/app/components/ui/textarea.tsx +0 -23
- package/corpus/templates/plan/app/components/ui/toast.tsx +0 -127
- package/corpus/templates/plan/app/components/ui/toaster.tsx +0 -33
- package/corpus/templates/plan/app/components/ui/toggle-group.tsx +0 -59
- package/corpus/templates/plan/app/components/ui/toggle.tsx +0 -43
- package/corpus/templates/plan/app/components/ui/tooltip.tsx +0 -30
- package/corpus/templates/plan/app/components/ui/use-toast.ts +0 -3
- package/corpus/templates/plan/app/hooks/use-mobile.tsx +0 -21
- package/corpus/templates/plan/app/hooks/use-toast.ts +0 -188
- package/corpus/templates/slides/app/components/layout/HeaderActions.tsx +0 -84
- package/corpus/templates/slides/app/components/ui/accordion.tsx +0 -56
- package/corpus/templates/slides/app/components/ui/alert-dialog.tsx +0 -139
- package/corpus/templates/slides/app/components/ui/alert.tsx +0 -59
- package/corpus/templates/slides/app/components/ui/aspect-ratio.tsx +0 -5
- package/corpus/templates/slides/app/components/ui/avatar.tsx +0 -48
- package/corpus/templates/slides/app/components/ui/badge.tsx +0 -37
- package/corpus/templates/slides/app/components/ui/breadcrumb.tsx +0 -115
- package/corpus/templates/slides/app/components/ui/button.tsx +0 -57
- package/corpus/templates/slides/app/components/ui/calendar.tsx +0 -68
- package/corpus/templates/slides/app/components/ui/card.tsx +0 -86
- package/corpus/templates/slides/app/components/ui/carousel.tsx +0 -260
- package/corpus/templates/slides/app/components/ui/chart.tsx +0 -375
- package/corpus/templates/slides/app/components/ui/checkbox.tsx +0 -28
- package/corpus/templates/slides/app/components/ui/collapsible.tsx +0 -9
- package/corpus/templates/slides/app/components/ui/command.tsx +0 -154
- package/corpus/templates/slides/app/components/ui/context-menu.tsx +0 -202
- package/corpus/templates/slides/app/components/ui/dialog.tsx +0 -130
- package/corpus/templates/slides/app/components/ui/drawer.tsx +0 -116
- package/corpus/templates/slides/app/components/ui/dropdown-menu.tsx +0 -212
- package/corpus/templates/slides/app/components/ui/form.tsx +0 -177
- package/corpus/templates/slides/app/components/ui/hover-card.tsx +0 -27
- package/corpus/templates/slides/app/components/ui/input-otp.tsx +0 -69
- package/corpus/templates/slides/app/components/ui/input.tsx +0 -22
- package/corpus/templates/slides/app/components/ui/label.tsx +0 -24
- package/corpus/templates/slides/app/components/ui/menubar.tsx +0 -234
- package/corpus/templates/slides/app/components/ui/navigation-menu.tsx +0 -128
- package/corpus/templates/slides/app/components/ui/pagination.tsx +0 -121
- package/corpus/templates/slides/app/components/ui/popover.tsx +0 -44
- package/corpus/templates/slides/app/components/ui/progress.tsx +0 -26
- package/corpus/templates/slides/app/components/ui/radio-group.tsx +0 -42
- package/corpus/templates/slides/app/components/ui/resizable.tsx +0 -43
- package/corpus/templates/slides/app/components/ui/scroll-area.tsx +0 -46
- package/corpus/templates/slides/app/components/ui/select.tsx +0 -158
- package/corpus/templates/slides/app/components/ui/separator.tsx +0 -29
- package/corpus/templates/slides/app/components/ui/sheet.tsx +0 -160
- package/corpus/templates/slides/app/components/ui/sidebar.tsx +0 -782
- package/corpus/templates/slides/app/components/ui/skeleton.tsx +0 -15
- package/corpus/templates/slides/app/components/ui/slider.tsx +0 -26
- package/corpus/templates/slides/app/components/ui/sonner.tsx +0 -58
- package/corpus/templates/slides/app/components/ui/spinner.tsx +0 -17
- package/corpus/templates/slides/app/components/ui/switch.tsx +0 -27
- package/corpus/templates/slides/app/components/ui/table.tsx +0 -117
- package/corpus/templates/slides/app/components/ui/tabs.tsx +0 -53
- package/corpus/templates/slides/app/components/ui/textarea.tsx +0 -23
- package/corpus/templates/slides/app/components/ui/toast.tsx +0 -127
- package/corpus/templates/slides/app/components/ui/toaster.tsx +0 -33
- package/corpus/templates/slides/app/components/ui/toggle-group.tsx +0 -59
- package/corpus/templates/slides/app/components/ui/toggle.tsx +0 -43
- package/corpus/templates/slides/app/components/ui/tooltip.tsx +0 -30
- package/corpus/templates/slides/app/components/ui/use-toast.ts +0 -3
- package/corpus/templates/slides/app/hooks/use-mobile.tsx +0 -21
- package/corpus/templates/slides/app/hooks/use-toast.ts +0 -188
|
@@ -1,11 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Database admin operations.
|
|
3
|
+
*
|
|
4
|
+
* Pure, dialect-agnostic, RAW/UNSCOPED helpers backing the Supabase-Studio-like
|
|
5
|
+
* DB admin. These run the FULL database with no per-user `accessFilter`
|
|
6
|
+
* scoping. Callers MUST gate access before invoking them. The built-in core
|
|
7
|
+
* route gates this to dev + localhost; production-reachable surfaces must pass
|
|
8
|
+
* an explicit runtime for the target database and enforce their own admin-only
|
|
9
|
+
* checks before reading or mutating.
|
|
10
|
+
*
|
|
11
|
+
* All access goes through the unified `getDbExec()` client, which uses `?`
|
|
12
|
+
* placeholders (auto-converted to `$1,$2,…` for Postgres) and returns rows
|
|
13
|
+
* keyed by column name. Identifiers are validated against a strict pattern and
|
|
14
|
+
* always double-quoted; values are ALWAYS parameterized — never interpolated.
|
|
15
|
+
*/
|
|
16
|
+
import { type DbExec, type Dialect } from "../db/client.js";
|
|
1
17
|
import type { DbAdminDialect, DbAdminMutation, DbAdminMutationResult, DbAdminQueryResult, DbAdminRowsRequest, DbAdminRowsResult, DbAdminTableSchema, DbAdminTableSummary } from "./types.js";
|
|
2
|
-
export
|
|
18
|
+
export interface DbAdminRuntime {
|
|
19
|
+
db?: DbExec;
|
|
20
|
+
dialect?: Dialect;
|
|
21
|
+
notifyChange?: () => Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
export declare function listTables(runtime?: DbAdminRuntime): Promise<{
|
|
3
24
|
dialect: DbAdminDialect;
|
|
4
25
|
tables: DbAdminTableSummary[];
|
|
5
26
|
}>;
|
|
6
|
-
export declare function getTableSchema(table: string): Promise<DbAdminTableSchema>;
|
|
7
|
-
export declare function getRows(table: string, req: DbAdminRowsRequest): Promise<DbAdminRowsResult>;
|
|
8
|
-
export declare function applyMutations(table: string, m: DbAdminMutation): Promise<DbAdminMutationResult>;
|
|
27
|
+
export declare function getTableSchema(table: string, runtime?: DbAdminRuntime): Promise<DbAdminTableSchema>;
|
|
28
|
+
export declare function getRows(table: string, req: DbAdminRowsRequest, runtime?: DbAdminRuntime): Promise<DbAdminRowsResult>;
|
|
29
|
+
export declare function applyMutations(table: string, m: DbAdminMutation, runtime?: DbAdminRuntime): Promise<DbAdminMutationResult>;
|
|
9
30
|
/** Error thrown when a destructive statement is run without confirmation. */
|
|
10
31
|
export declare class DbAdminConfirmRequiredError extends Error {
|
|
11
32
|
readonly needsConfirm = true;
|
|
@@ -13,5 +34,5 @@ export declare class DbAdminConfirmRequiredError extends Error {
|
|
|
13
34
|
}
|
|
14
35
|
export declare function runSql(sql: string, params: unknown[] | undefined, opts?: {
|
|
15
36
|
confirmDestructive?: boolean;
|
|
16
|
-
}): Promise<DbAdminQueryResult>;
|
|
37
|
+
}, runtime?: DbAdminRuntime): Promise<DbAdminQueryResult>;
|
|
17
38
|
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/db-admin/operations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/db-admin/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAGL,KAAK,MAAM,EACX,KAAK,OAAO,EACb,MAAM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uC7B"}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Database admin operations.
|
|
3
3
|
*
|
|
4
4
|
* Pure, dialect-agnostic, RAW/UNSCOPED helpers backing the Supabase-Studio-like
|
|
5
5
|
* DB admin. These run the FULL database with no per-user `accessFilter`
|
|
6
|
-
* scoping
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* scoping. Callers MUST gate access before invoking them. The built-in core
|
|
7
|
+
* route gates this to dev + localhost; production-reachable surfaces must pass
|
|
8
|
+
* an explicit runtime for the target database and enforce their own admin-only
|
|
9
|
+
* checks before reading or mutating.
|
|
9
10
|
*
|
|
10
11
|
* All access goes through the unified `getDbExec()` client, which uses `?`
|
|
11
12
|
* placeholders (auto-converted to `$1,$2,…` for Postgres) and returns rows
|
|
12
13
|
* keyed by column name. Identifiers are validated against a strict pattern and
|
|
13
14
|
* always double-quoted; values are ALWAYS parameterized — never interpolated.
|
|
14
15
|
*/
|
|
15
|
-
import { getDbExec, getDialect,
|
|
16
|
+
import { getDbExec, getDialect, } from "../db/client.js";
|
|
16
17
|
import { notifyActionChange } from "../server/action-change.js";
|
|
17
18
|
// ---------------------------------------------------------------------------
|
|
18
19
|
// Identifier validation + quoting
|
|
@@ -29,13 +30,23 @@ function assertIdent(name, kind = "identifier") {
|
|
|
29
30
|
function quoteIdent(name) {
|
|
30
31
|
return `"${assertIdent(name)}"`;
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
-
return
|
|
33
|
+
function db(runtime) {
|
|
34
|
+
return runtime?.db ?? getDbExec();
|
|
35
|
+
}
|
|
36
|
+
function dialect(runtime) {
|
|
37
|
+
return (runtime?.dialect ?? getDialect());
|
|
38
|
+
}
|
|
39
|
+
function isPostgresRuntime(runtime) {
|
|
40
|
+
return dialect(runtime) === "postgres";
|
|
34
41
|
}
|
|
35
42
|
// ---------------------------------------------------------------------------
|
|
36
43
|
// Notify the UI after a real mutation so polling refetches.
|
|
37
44
|
// ---------------------------------------------------------------------------
|
|
38
|
-
async function notifyDbAdminChange() {
|
|
45
|
+
async function notifyDbAdminChange(runtime) {
|
|
46
|
+
if (runtime?.notifyChange) {
|
|
47
|
+
await runtime.notifyChange();
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
39
50
|
// The UI keys on useChangeVersions(["db-admin","action"]). notifyActionChange
|
|
40
51
|
// records a "db-admin" change AND a marker; the action route layer's generic
|
|
41
52
|
// "action" source is covered by passing the db-admin action name through the
|
|
@@ -45,11 +56,11 @@ async function notifyDbAdminChange() {
|
|
|
45
56
|
// ---------------------------------------------------------------------------
|
|
46
57
|
// listTables
|
|
47
58
|
// ---------------------------------------------------------------------------
|
|
48
|
-
export async function listTables() {
|
|
49
|
-
const
|
|
59
|
+
export async function listTables(runtime) {
|
|
60
|
+
const client = db(runtime);
|
|
50
61
|
const summaries = [];
|
|
51
|
-
if (
|
|
52
|
-
const res = await
|
|
62
|
+
if (isPostgresRuntime(runtime)) {
|
|
63
|
+
const res = await client.execute(`SELECT table_name AS name, table_type AS type
|
|
53
64
|
FROM information_schema.tables
|
|
54
65
|
WHERE table_schema = 'public'
|
|
55
66
|
AND table_type IN ('BASE TABLE', 'VIEW')
|
|
@@ -60,12 +71,12 @@ export async function listTables() {
|
|
|
60
71
|
summaries.push({
|
|
61
72
|
name,
|
|
62
73
|
type,
|
|
63
|
-
rowCount: type === "view" ? null : await safeRowCount(name),
|
|
74
|
+
rowCount: type === "view" ? null : await safeRowCount(name, runtime),
|
|
64
75
|
});
|
|
65
76
|
}
|
|
66
77
|
}
|
|
67
78
|
else {
|
|
68
|
-
const res = await
|
|
79
|
+
const res = await client.execute(`SELECT name, type FROM sqlite_master
|
|
69
80
|
WHERE type IN ('table', 'view')
|
|
70
81
|
AND name NOT LIKE 'sqlite_%'
|
|
71
82
|
ORDER BY name`);
|
|
@@ -75,16 +86,16 @@ export async function listTables() {
|
|
|
75
86
|
summaries.push({
|
|
76
87
|
name,
|
|
77
88
|
type,
|
|
78
|
-
rowCount: type === "view" ? null : await safeRowCount(name),
|
|
89
|
+
rowCount: type === "view" ? null : await safeRowCount(name, runtime),
|
|
79
90
|
});
|
|
80
91
|
}
|
|
81
92
|
}
|
|
82
|
-
return { dialect: dialect(), tables: summaries };
|
|
93
|
+
return { dialect: dialect(runtime), tables: summaries };
|
|
83
94
|
}
|
|
84
|
-
async function safeRowCount(table) {
|
|
95
|
+
async function safeRowCount(table, runtime) {
|
|
85
96
|
try {
|
|
86
|
-
const
|
|
87
|
-
const res = await
|
|
97
|
+
const client = db(runtime);
|
|
98
|
+
const res = await client.execute(`SELECT COUNT(*) AS c FROM ${quoteIdent(table)}`);
|
|
88
99
|
const c = res.rows[0]?.c;
|
|
89
100
|
const n = Number(c);
|
|
90
101
|
return Number.isFinite(n) ? n : null;
|
|
@@ -96,21 +107,21 @@ async function safeRowCount(table) {
|
|
|
96
107
|
// ---------------------------------------------------------------------------
|
|
97
108
|
// getTableSchema
|
|
98
109
|
// ---------------------------------------------------------------------------
|
|
99
|
-
export async function getTableSchema(table) {
|
|
110
|
+
export async function getTableSchema(table, runtime) {
|
|
100
111
|
assertIdent(table, "table name");
|
|
101
|
-
return
|
|
102
|
-
? getTableSchemaPostgres(table)
|
|
103
|
-
: getTableSchemaSqlite(table);
|
|
112
|
+
return isPostgresRuntime(runtime)
|
|
113
|
+
? getTableSchemaPostgres(table, runtime)
|
|
114
|
+
: getTableSchemaSqlite(table, runtime);
|
|
104
115
|
}
|
|
105
|
-
async function getTableSchemaPostgres(table) {
|
|
106
|
-
const
|
|
107
|
-
const typeRes = await
|
|
116
|
+
async function getTableSchemaPostgres(table, runtime) {
|
|
117
|
+
const client = db(runtime);
|
|
118
|
+
const typeRes = await client.execute({
|
|
108
119
|
sql: `SELECT table_type AS type FROM information_schema.tables
|
|
109
120
|
WHERE table_schema = 'public' AND table_name = ?`,
|
|
110
121
|
args: [table],
|
|
111
122
|
});
|
|
112
123
|
const type = typeRes.rows[0]?.type === "VIEW" ? "view" : "table";
|
|
113
|
-
const colRes = await
|
|
124
|
+
const colRes = await client.execute({
|
|
114
125
|
sql: `SELECT
|
|
115
126
|
column_name AS name,
|
|
116
127
|
data_type AS type,
|
|
@@ -121,7 +132,7 @@ async function getTableSchemaPostgres(table) {
|
|
|
121
132
|
ORDER BY ordinal_position`,
|
|
122
133
|
args: [table],
|
|
123
134
|
});
|
|
124
|
-
const pkRes = await
|
|
135
|
+
const pkRes = await client.execute({
|
|
125
136
|
sql: `SELECT kcu.column_name AS col
|
|
126
137
|
FROM information_schema.table_constraints tc
|
|
127
138
|
JOIN information_schema.key_column_usage kcu
|
|
@@ -135,7 +146,7 @@ async function getTableSchemaPostgres(table) {
|
|
|
135
146
|
});
|
|
136
147
|
const primaryKey = pkRes.rows.map((r) => String(r.col));
|
|
137
148
|
const pkSet = new Set(primaryKey);
|
|
138
|
-
const fkRes = await
|
|
149
|
+
const fkRes = await client.execute({
|
|
139
150
|
sql: `SELECT
|
|
140
151
|
kcu.column_name AS col,
|
|
141
152
|
ccu.table_name AS ref_table,
|
|
@@ -157,7 +168,7 @@ async function getTableSchemaPostgres(table) {
|
|
|
157
168
|
refTable: String(r.ref_table),
|
|
158
169
|
refColumn: String(r.ref_col),
|
|
159
170
|
}));
|
|
160
|
-
const idxRes = await
|
|
171
|
+
const idxRes = await client.execute({
|
|
161
172
|
sql: `SELECT indexname AS name, indexdef AS def
|
|
162
173
|
FROM pg_indexes
|
|
163
174
|
WHERE schemaname = 'public' AND tablename = ?`,
|
|
@@ -200,17 +211,17 @@ async function getTableSchemaPostgres(table) {
|
|
|
200
211
|
primaryKey,
|
|
201
212
|
foreignKeys,
|
|
202
213
|
indexes,
|
|
203
|
-
rowCount: type === "view" ? null : await safeRowCount(table),
|
|
214
|
+
rowCount: type === "view" ? null : await safeRowCount(table, runtime),
|
|
204
215
|
};
|
|
205
216
|
}
|
|
206
|
-
async function getTableSchemaSqlite(table) {
|
|
207
|
-
const
|
|
208
|
-
const typeRes = await
|
|
217
|
+
async function getTableSchemaSqlite(table, runtime) {
|
|
218
|
+
const client = db(runtime);
|
|
219
|
+
const typeRes = await client.execute({
|
|
209
220
|
sql: `SELECT type FROM sqlite_master WHERE name = ? AND type IN ('table','view')`,
|
|
210
221
|
args: [table],
|
|
211
222
|
});
|
|
212
223
|
const type = typeRes.rows[0]?.type === "view" ? "view" : "table";
|
|
213
|
-
const colRes = await
|
|
224
|
+
const colRes = await client.execute(`PRAGMA table_info(${quoteIdent(table)})`);
|
|
214
225
|
const columns = colRes.rows.map((r) => {
|
|
215
226
|
const name = String(r.name);
|
|
216
227
|
const dflt = r.dflt_value;
|
|
@@ -234,19 +245,19 @@ async function getTableSchemaSqlite(table) {
|
|
|
234
245
|
pkCol.autoIncrement = true;
|
|
235
246
|
}
|
|
236
247
|
}
|
|
237
|
-
const fkRes = await
|
|
248
|
+
const fkRes = await client.execute(`PRAGMA foreign_key_list(${quoteIdent(table)})`);
|
|
238
249
|
const foreignKeys = fkRes.rows.map((r) => ({
|
|
239
250
|
column: String(r.from),
|
|
240
251
|
refTable: String(r.table),
|
|
241
252
|
refColumn: String(r.to),
|
|
242
253
|
}));
|
|
243
|
-
const idxListRes = await
|
|
254
|
+
const idxListRes = await client.execute(`PRAGMA index_list(${quoteIdent(table)})`);
|
|
244
255
|
const indexes = [];
|
|
245
256
|
for (const idx of idxListRes.rows) {
|
|
246
257
|
const idxName = String(idx.name);
|
|
247
258
|
if (idxName.startsWith("sqlite_"))
|
|
248
259
|
continue;
|
|
249
|
-
const infoRes = await
|
|
260
|
+
const infoRes = await client.execute(`PRAGMA index_info(${quoteIdent(idxName)})`);
|
|
250
261
|
indexes.push({
|
|
251
262
|
name: idxName,
|
|
252
263
|
unique: Number(idx.unique) === 1,
|
|
@@ -262,7 +273,7 @@ async function getTableSchemaSqlite(table) {
|
|
|
262
273
|
primaryKey,
|
|
263
274
|
foreignKeys,
|
|
264
275
|
indexes,
|
|
265
|
-
rowCount: type === "view" ? null : await safeRowCount(table),
|
|
276
|
+
rowCount: type === "view" ? null : await safeRowCount(table, runtime),
|
|
266
277
|
};
|
|
267
278
|
}
|
|
268
279
|
// ---------------------------------------------------------------------------
|
|
@@ -291,7 +302,7 @@ const OP_SQL = {
|
|
|
291
302
|
like: "LIKE",
|
|
292
303
|
};
|
|
293
304
|
/** Build a parameterized WHERE clause + args from filters. */
|
|
294
|
-
function buildWhere(filters) {
|
|
305
|
+
function buildWhere(filters, runtime) {
|
|
295
306
|
if (!filters || filters.length === 0)
|
|
296
307
|
return { clause: "", args: [] };
|
|
297
308
|
const parts = [];
|
|
@@ -322,7 +333,7 @@ function buildWhere(filters) {
|
|
|
322
333
|
case "ilike": {
|
|
323
334
|
// SQLite LIKE is case-insensitive for ASCII by default; Postgres has
|
|
324
335
|
// a dedicated ILIKE operator.
|
|
325
|
-
if (
|
|
336
|
+
if (isPostgresRuntime(runtime)) {
|
|
326
337
|
parts.push(`${col} ILIKE ?`);
|
|
327
338
|
}
|
|
328
339
|
else {
|
|
@@ -349,22 +360,22 @@ function buildOrderBy(sort) {
|
|
|
349
360
|
});
|
|
350
361
|
return ` ORDER BY ${parts.join(", ")}`;
|
|
351
362
|
}
|
|
352
|
-
export async function getRows(table, req) {
|
|
363
|
+
export async function getRows(table, req, runtime) {
|
|
353
364
|
assertIdent(table, "table name");
|
|
354
|
-
const
|
|
355
|
-
const schema = await getTableSchema(table);
|
|
365
|
+
const client = db(runtime);
|
|
366
|
+
const schema = await getTableSchema(table, runtime);
|
|
356
367
|
const page = Math.max(1, Math.floor(req.page) || 1);
|
|
357
368
|
const pageSize = Math.min(1000, Math.max(1, Math.floor(req.pageSize) || 50));
|
|
358
369
|
const offset = (page - 1) * pageSize;
|
|
359
|
-
const where = buildWhere(req.filters);
|
|
370
|
+
const where = buildWhere(req.filters, runtime);
|
|
360
371
|
const orderBy = buildOrderBy(req.sort);
|
|
361
372
|
const quoted = quoteIdent(table);
|
|
362
|
-
const countRes = await
|
|
373
|
+
const countRes = await client.execute({
|
|
363
374
|
sql: `SELECT COUNT(*) AS c FROM ${quoted}${where.clause}`,
|
|
364
375
|
args: where.args,
|
|
365
376
|
});
|
|
366
377
|
const total = Number(countRes.rows[0]?.c ?? 0) || 0;
|
|
367
|
-
const rowsRes = await
|
|
378
|
+
const rowsRes = await client.execute({
|
|
368
379
|
sql: `SELECT * FROM ${quoted}${where.clause}${orderBy} LIMIT ? OFFSET ?`,
|
|
369
380
|
args: [...where.args, pageSize, offset],
|
|
370
381
|
});
|
|
@@ -418,7 +429,7 @@ function buildDelete(table, where) {
|
|
|
418
429
|
const sql = `DELETE FROM ${quoteIdent(table)} WHERE ${whereSql}`;
|
|
419
430
|
return { sql, args: whereCols.map((c) => where[c]) };
|
|
420
431
|
}
|
|
421
|
-
export async function applyMutations(table, m) {
|
|
432
|
+
export async function applyMutations(table, m, runtime) {
|
|
422
433
|
assertIdent(table, "table name");
|
|
423
434
|
const statements = [];
|
|
424
435
|
for (const row of m.inserts ?? [])
|
|
@@ -443,12 +454,12 @@ export async function applyMutations(table, m) {
|
|
|
443
454
|
// sequentially. A failure mid-batch surfaces as a thrown error with the
|
|
444
455
|
// counts accumulated so far; callers should treat a partial batch as a
|
|
445
456
|
// failure and re-run with a corrected payload.
|
|
446
|
-
const
|
|
457
|
+
const client = db(runtime);
|
|
447
458
|
const insertCount = m.inserts?.length ?? 0;
|
|
448
459
|
const updateCount = m.updates?.length ?? 0;
|
|
449
460
|
let executed = 0;
|
|
450
461
|
for (const stmt of statements) {
|
|
451
|
-
const res = await
|
|
462
|
+
const res = await client.execute({ sql: stmt.sql, args: stmt.args });
|
|
452
463
|
if (executed < insertCount) {
|
|
453
464
|
result.inserted += 1;
|
|
454
465
|
}
|
|
@@ -461,7 +472,7 @@ export async function applyMutations(table, m) {
|
|
|
461
472
|
executed += 1;
|
|
462
473
|
}
|
|
463
474
|
if (statements.length > 0)
|
|
464
|
-
await notifyDbAdminChange();
|
|
475
|
+
await notifyDbAdminChange(runtime);
|
|
465
476
|
return result;
|
|
466
477
|
}
|
|
467
478
|
// ---------------------------------------------------------------------------
|
|
@@ -508,7 +519,7 @@ function isBareSelectWithoutLimit(sql) {
|
|
|
508
519
|
return false;
|
|
509
520
|
return true;
|
|
510
521
|
}
|
|
511
|
-
export async function runSql(sql, params, opts = {}) {
|
|
522
|
+
export async function runSql(sql, params, opts = {}, runtime) {
|
|
512
523
|
if (typeof sql !== "string" || !sql.trim()) {
|
|
513
524
|
throw new Error("SQL is required");
|
|
514
525
|
}
|
|
@@ -521,16 +532,16 @@ export async function runSql(sql, params, opts = {}) {
|
|
|
521
532
|
if (isBareSelectWithoutLimit(finalSql)) {
|
|
522
533
|
finalSql = `${finalSql} LIMIT 100`;
|
|
523
534
|
}
|
|
524
|
-
const
|
|
535
|
+
const client = db(runtime);
|
|
525
536
|
const started = Date.now();
|
|
526
|
-
const res = await
|
|
537
|
+
const res = await client.execute(params && params.length > 0 ? { sql: finalSql, args: params } : finalSql);
|
|
527
538
|
const durationMs = Date.now() - started;
|
|
528
539
|
const rows = (res.rows ?? []);
|
|
529
540
|
const columns = rows.length > 0 && rows[0] && typeof rows[0] === "object"
|
|
530
541
|
? Object.keys(rows[0])
|
|
531
542
|
: [];
|
|
532
543
|
if (isMutatingSql(finalSql))
|
|
533
|
-
await notifyDbAdminChange();
|
|
544
|
+
await notifyDbAdminChange(runtime);
|
|
534
545
|
return {
|
|
535
546
|
columns,
|
|
536
547
|
rows,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../src/db-admin/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAgBhE,8EAA8E;AAC9E,kCAAkC;AAClC,8EAA8E;AAE9E,MAAM,QAAQ,GAAG,0BAA0B,CAAC;AAE5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I,IAAI,CAAC,CAAC,CAAC,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ;QACvD,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,CAAC,CAAC,EAAE,CAAC;IAET,IAAI,aAAa,CAAC,QAAQ,CAAC;QAAE,MAAM,mBAAmB,EAAE,CAAC;IAEzD,OAAO;QACL,OAAO;QACP,IAAI;QACJ,YAAY,EAAE,GAAG,CAAC,YAAY,IAAI,CAAC;QACnC,UAAU;KACX,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Dev-mode database admin operations.\n *\n * Pure, dialect-agnostic, RAW/UNSCOPED helpers backing the Supabase-Studio-like\n * DB admin. These run the FULL database with no per-user `accessFilter`\n * scoping — they are a developer tool, gated to dev + localhost at the route\n * and agent-tool layers. Do NOT call these from any production-reachable\n * surface.\n *\n * All access goes through the unified `getDbExec()` client, which uses `?`\n * placeholders (auto-converted to `$1,$2,…` for Postgres) and returns rows\n * keyed by column name. Identifiers are validated against a strict pattern and\n * always double-quoted; values are ALWAYS parameterized — never interpolated.\n */\nimport { getDbExec, getDialect, isPostgres } from \"../db/client.js\";\nimport { notifyActionChange } from \"../server/action-change.js\";\nimport type {\n DbAdminColumn,\n DbAdminDialect,\n DbAdminFilter,\n DbAdminForeignKey,\n DbAdminIndex,\n DbAdminMutation,\n DbAdminMutationResult,\n DbAdminQueryResult,\n DbAdminRowsRequest,\n DbAdminRowsResult,\n DbAdminTableSchema,\n DbAdminTableSummary,\n} from \"./types.js\";\n\n// ---------------------------------------------------------------------------\n// Identifier validation + quoting\n// ---------------------------------------------------------------------------\n\nconst IDENT_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;\n\n/** Throw on any identifier that isn't a plain `[A-Za-z_][A-Za-z0-9_]*`. */\nfunction assertIdent(name: string, kind = \"identifier\"): string {\n if (typeof name !== \"string\" || !IDENT_RE.test(name)) {\n throw new Error(`Invalid ${kind}: ${JSON.stringify(name)}`);\n }\n return name;\n}\n\n/** Double-quote an already-validated identifier (valid in PG and SQLite). */\nfunction quoteIdent(name: string): string {\n return `\"${assertIdent(name)}\"`;\n}\n\nfunction dialect(): DbAdminDialect {\n return getDialect();\n}\n\n// ---------------------------------------------------------------------------\n// Notify the UI after a real mutation so polling refetches.\n// ---------------------------------------------------------------------------\n\nasync function notifyDbAdminChange(): Promise<void> {\n // The UI keys on useChangeVersions([\"db-admin\",\"action\"]). notifyActionChange\n // records a \"db-admin\" change AND a marker; the action route layer's generic\n // \"action\" source is covered by passing the db-admin action name through the\n // same primitive that the action surface uses.\n await notifyActionChange({ actionName: \"db-admin\" }).catch(() => {});\n}\n\n// ---------------------------------------------------------------------------\n// listTables\n// ---------------------------------------------------------------------------\n\nexport async function listTables(): Promise<{\n dialect: DbAdminDialect;\n tables: DbAdminTableSummary[];\n}> {\n const db = getDbExec();\n const summaries: DbAdminTableSummary[] = [];\n\n if (isPostgres()) {\n const res = await db.execute(\n `SELECT table_name AS name, table_type AS type\n FROM information_schema.tables\n WHERE table_schema = 'public'\n AND table_type IN ('BASE TABLE', 'VIEW')\n ORDER BY table_name`,\n );\n for (const row of res.rows) {\n const name = String((row as any).name);\n const type = (row as any).type === \"VIEW\" ? \"view\" : \"table\";\n summaries.push({\n name,\n type,\n rowCount: type === \"view\" ? null : await safeRowCount(name),\n });\n }\n } else {\n const res = await db.execute(\n `SELECT name, type FROM sqlite_master\n WHERE type IN ('table', 'view')\n AND name NOT LIKE 'sqlite_%'\n ORDER BY name`,\n );\n for (const row of res.rows) {\n const name = String((row as any).name);\n const type = (row as any).type === \"view\" ? \"view\" : \"table\";\n summaries.push({\n name,\n type,\n rowCount: type === \"view\" ? null : await safeRowCount(name),\n });\n }\n }\n\n return { dialect: dialect(), tables: summaries };\n}\n\nasync function safeRowCount(table: string): Promise<number | null> {\n try {\n const db = getDbExec();\n const res = await db.execute(\n `SELECT COUNT(*) AS c FROM ${quoteIdent(table)}`,\n );\n const c = (res.rows[0] as any)?.c;\n const n = Number(c);\n return Number.isFinite(n) ? n : null;\n } catch {\n return null;\n }\n}\n\n// ---------------------------------------------------------------------------\n// getTableSchema\n// ---------------------------------------------------------------------------\n\nexport async function getTableSchema(\n table: string,\n): Promise<DbAdminTableSchema> {\n assertIdent(table, \"table name\");\n return isPostgres()\n ? getTableSchemaPostgres(table)\n : getTableSchemaSqlite(table);\n}\n\nasync function getTableSchemaPostgres(\n table: string,\n): Promise<DbAdminTableSchema> {\n const db = getDbExec();\n\n const typeRes = await db.execute({\n sql: `SELECT table_type AS type FROM information_schema.tables\n WHERE table_schema = 'public' AND table_name = ?`,\n args: [table],\n });\n const type = (typeRes.rows[0] as any)?.type === \"VIEW\" ? \"view\" : \"table\";\n\n const colRes = await db.execute({\n sql: `SELECT\n column_name AS name,\n data_type AS type,\n CASE WHEN is_nullable = 'NO' THEN 0 ELSE 1 END AS nullable,\n column_default AS dflt\n FROM information_schema.columns\n WHERE table_schema = 'public' AND table_name = ?\n ORDER BY ordinal_position`,\n args: [table],\n });\n\n const pkRes = await db.execute({\n sql: `SELECT kcu.column_name AS col\n FROM information_schema.table_constraints tc\n JOIN information_schema.key_column_usage kcu\n ON tc.constraint_name = kcu.constraint_name\n AND tc.table_schema = kcu.table_schema\n WHERE tc.table_name = ?\n AND tc.table_schema = 'public'\n AND tc.constraint_type = 'PRIMARY KEY'\n ORDER BY kcu.ordinal_position`,\n args: [table],\n });\n const primaryKey = pkRes.rows.map((r) => String((r as any).col));\n const pkSet = new Set(primaryKey);\n\n const fkRes = await db.execute({\n sql: `SELECT\n kcu.column_name AS col,\n ccu.table_name AS ref_table,\n ccu.column_name AS ref_col\n FROM information_schema.table_constraints tc\n JOIN information_schema.key_column_usage kcu\n ON tc.constraint_name = kcu.constraint_name\n AND tc.table_schema = kcu.table_schema\n JOIN information_schema.constraint_column_usage ccu\n ON tc.constraint_name = ccu.constraint_name\n AND tc.table_schema = ccu.table_schema\n WHERE tc.table_name = ?\n AND tc.table_schema = 'public'\n AND tc.constraint_type = 'FOREIGN KEY'`,\n args: [table],\n });\n const foreignKeys: DbAdminForeignKey[] = fkRes.rows.map((r) => ({\n column: String((r as any).col),\n refTable: String((r as any).ref_table),\n refColumn: String((r as any).ref_col),\n }));\n\n const idxRes = await db.execute({\n sql: `SELECT indexname AS name, indexdef AS def\n FROM pg_indexes\n WHERE schemaname = 'public' AND tablename = ?`,\n args: [table],\n });\n const indexes: DbAdminIndex[] = idxRes.rows.map((r) => {\n const def = String((r as any).def ?? \"\");\n const colMatch = def.match(/\\(([^)]+)\\)/);\n const columns = colMatch\n ? colMatch[1]\n .split(\",\")\n .map((c) => c.trim().replace(/^\"|\"$/g, \"\"))\n .filter(Boolean)\n : [];\n return {\n name: String((r as any).name),\n unique: /\\bUNIQUE\\b/i.test(def),\n columns,\n };\n });\n\n const columns: DbAdminColumn[] = colRes.rows.map((r) => {\n const name = String((r as any).name);\n const dflt = (r as any).dflt;\n const defaultValue = dflt == null ? null : String(dflt);\n return {\n name,\n type: String((r as any).type ?? \"ANY\"),\n nullable: Number((r as any).nullable) === 1,\n pk: pkSet.has(name),\n defaultValue,\n // Postgres serial/identity columns default to a sequence call.\n autoIncrement:\n defaultValue != null &&\n (/nextval\\(/i.test(defaultValue) || /identity/i.test(defaultValue)),\n };\n });\n\n return {\n name: table,\n type,\n columns,\n primaryKey,\n foreignKeys,\n indexes,\n rowCount: type === \"view\" ? null : await safeRowCount(table),\n };\n}\n\nasync function getTableSchemaSqlite(\n table: string,\n): Promise<DbAdminTableSchema> {\n const db = getDbExec();\n\n const typeRes = await db.execute({\n sql: `SELECT type FROM sqlite_master WHERE name = ? AND type IN ('table','view')`,\n args: [table],\n });\n const type = (typeRes.rows[0] as any)?.type === \"view\" ? \"view\" : \"table\";\n\n const colRes = await db.execute(`PRAGMA table_info(${quoteIdent(table)})`);\n const columns: DbAdminColumn[] = colRes.rows.map((r) => {\n const name = String((r as any).name);\n const dflt = (r as any).dflt_value;\n return {\n name,\n type: String((r as any).type ?? \"ANY\") || \"ANY\",\n nullable: Number((r as any).notnull) === 0,\n pk: Number((r as any).pk) > 0,\n defaultValue: dflt == null ? null : String(dflt),\n };\n });\n\n // PK order follows the pk index from table_info (1-based, 0 = not pk).\n const primaryKey = colRes.rows\n .filter((r) => Number((r as any).pk) > 0)\n .sort((a, b) => Number((a as any).pk) - Number((b as any).pk))\n .map((r) => String((r as any).name));\n\n // INTEGER PRIMARY KEY in SQLite is an alias for the rowid (autoincrementing).\n if (primaryKey.length === 1) {\n const pkCol = columns.find((c) => c.name === primaryKey[0]);\n if (pkCol && /^integer$/i.test(pkCol.type)) {\n pkCol.autoIncrement = true;\n }\n }\n\n const fkRes = await db.execute(\n `PRAGMA foreign_key_list(${quoteIdent(table)})`,\n );\n const foreignKeys: DbAdminForeignKey[] = fkRes.rows.map((r) => ({\n column: String((r as any).from),\n refTable: String((r as any).table),\n refColumn: String((r as any).to),\n }));\n\n const idxListRes = await db.execute(\n `PRAGMA index_list(${quoteIdent(table)})`,\n );\n const indexes: DbAdminIndex[] = [];\n for (const idx of idxListRes.rows) {\n const idxName = String((idx as any).name);\n if (idxName.startsWith(\"sqlite_\")) continue;\n const infoRes = await db.execute(\n `PRAGMA index_info(${quoteIdent(idxName)})`,\n );\n indexes.push({\n name: idxName,\n unique: Number((idx as any).unique) === 1,\n columns: infoRes.rows\n .map((c) => (c as any).name)\n .filter((n): n is string => typeof n === \"string\"),\n });\n }\n\n return {\n name: table,\n type,\n columns,\n primaryKey,\n foreignKeys,\n indexes,\n rowCount: type === \"view\" ? null : await safeRowCount(table),\n };\n}\n\n// ---------------------------------------------------------------------------\n// getRows\n// ---------------------------------------------------------------------------\n\nconst SAFE_OPS = new Set([\n \"eq\",\n \"neq\",\n \"lt\",\n \"lte\",\n \"gt\",\n \"gte\",\n \"like\",\n \"ilike\",\n \"in\",\n \"is_null\",\n \"not_null\",\n]);\n\nconst OP_SQL: Record<string, string> = {\n eq: \"=\",\n neq: \"<>\",\n lt: \"<\",\n lte: \"<=\",\n gt: \">\",\n gte: \">=\",\n like: \"LIKE\",\n};\n\n/** Build a parameterized WHERE clause + args from filters. */\nfunction buildWhere(filters: DbAdminFilter[] | undefined): {\n clause: string;\n args: unknown[];\n} {\n if (!filters || filters.length === 0) return { clause: \"\", args: [] };\n const parts: string[] = [];\n const args: unknown[] = [];\n for (const f of filters) {\n const col = quoteIdent(f.column);\n if (!SAFE_OPS.has(f.op)) {\n throw new Error(`Invalid filter op: ${JSON.stringify(f.op)}`);\n }\n switch (f.op) {\n case \"is_null\":\n parts.push(`${col} IS NULL`);\n break;\n case \"not_null\":\n parts.push(`${col} IS NOT NULL`);\n break;\n case \"in\": {\n const values = Array.isArray(f.value) ? f.value : [f.value];\n if (values.length === 0) {\n // `col IN ()` is invalid SQL; an empty set matches nothing.\n parts.push(`1 = 0`);\n break;\n }\n parts.push(`${col} IN (${values.map(() => \"?\").join(\", \")})`);\n args.push(...values);\n break;\n }\n case \"ilike\": {\n // SQLite LIKE is case-insensitive for ASCII by default; Postgres has\n // a dedicated ILIKE operator.\n if (isPostgres()) {\n parts.push(`${col} ILIKE ?`);\n } else {\n parts.push(`${col} LIKE ?`);\n }\n args.push(f.value);\n break;\n }\n default: {\n parts.push(`${col} ${OP_SQL[f.op]} ?`);\n args.push(f.value);\n break;\n }\n }\n }\n return { clause: parts.length ? ` WHERE ${parts.join(\" AND \")}` : \"\", args };\n}\n\nfunction buildOrderBy(sort: DbAdminRowsRequest[\"sort\"]): string {\n if (!sort || sort.length === 0) return \"\";\n const parts = sort.map((s) => {\n const dir = s.dir === \"desc\" ? \"DESC\" : \"ASC\";\n return `${quoteIdent(s.column)} ${dir}`;\n });\n return ` ORDER BY ${parts.join(\", \")}`;\n}\n\nexport async function getRows(\n table: string,\n req: DbAdminRowsRequest,\n): Promise<DbAdminRowsResult> {\n assertIdent(table, \"table name\");\n const db = getDbExec();\n const schema = await getTableSchema(table);\n\n const page = Math.max(1, Math.floor(req.page) || 1);\n const pageSize = Math.min(1000, Math.max(1, Math.floor(req.pageSize) || 50));\n const offset = (page - 1) * pageSize;\n\n const where = buildWhere(req.filters);\n const orderBy = buildOrderBy(req.sort);\n const quoted = quoteIdent(table);\n\n const countRes = await db.execute({\n sql: `SELECT COUNT(*) AS c FROM ${quoted}${where.clause}`,\n args: where.args,\n });\n const total = Number((countRes.rows[0] as any)?.c ?? 0) || 0;\n\n const rowsRes = await db.execute({\n sql: `SELECT * FROM ${quoted}${where.clause}${orderBy} LIMIT ? OFFSET ?`,\n args: [...where.args, pageSize, offset],\n });\n\n return {\n columns: schema.columns,\n rows: rowsRes.rows as Record<string, unknown>[],\n total,\n page,\n pageSize,\n };\n}\n\n// ---------------------------------------------------------------------------\n// applyMutations\n// ---------------------------------------------------------------------------\n\nfunction buildInsert(\n table: string,\n row: Record<string, unknown>,\n): { sql: string; args: unknown[] } {\n const cols = Object.keys(row);\n if (cols.length === 0) {\n throw new Error(\"Cannot insert an empty row\");\n }\n cols.forEach((c) => assertIdent(c, \"column name\"));\n const sql = `INSERT INTO ${quoteIdent(table)} (${cols\n .map(quoteIdent)\n .join(\", \")}) VALUES (${cols.map(() => \"?\").join(\", \")})`;\n return { sql, args: cols.map((c) => row[c]) };\n}\n\nfunction buildUpdate(\n table: string,\n set: Record<string, unknown>,\n where: Record<string, unknown>,\n): { sql: string; args: unknown[] } {\n const setCols = Object.keys(set);\n const whereCols = Object.keys(where);\n if (setCols.length === 0) throw new Error(\"Update requires a non-empty set\");\n if (whereCols.length === 0) {\n throw new Error(\"Update requires a non-empty where clause\");\n }\n setCols.forEach((c) => assertIdent(c, \"column name\"));\n whereCols.forEach((c) => assertIdent(c, \"column name\"));\n const setSql = setCols.map((c) => `${quoteIdent(c)} = ?`).join(\", \");\n const whereSql = whereCols.map((c) => `${quoteIdent(c)} = ?`).join(\" AND \");\n const sql = `UPDATE ${quoteIdent(table)} SET ${setSql} WHERE ${whereSql}`;\n return {\n sql,\n args: [...setCols.map((c) => set[c]), ...whereCols.map((c) => where[c])],\n };\n}\n\nfunction buildDelete(\n table: string,\n where: Record<string, unknown>,\n): { sql: string; args: unknown[] } {\n const whereCols = Object.keys(where);\n if (whereCols.length === 0) {\n throw new Error(\"Delete requires a non-empty where clause\");\n }\n whereCols.forEach((c) => assertIdent(c, \"column name\"));\n const whereSql = whereCols.map((c) => `${quoteIdent(c)} = ?`).join(\" AND \");\n const sql = `DELETE FROM ${quoteIdent(table)} WHERE ${whereSql}`;\n return { sql, args: whereCols.map((c) => where[c]) };\n}\n\nexport async function applyMutations(\n table: string,\n m: DbAdminMutation,\n): Promise<DbAdminMutationResult> {\n assertIdent(table, \"table name\");\n\n const statements: { sql: string; args: unknown[] }[] = [];\n for (const row of m.inserts ?? []) statements.push(buildInsert(table, row));\n for (const u of m.updates ?? []) {\n statements.push(buildUpdate(table, u.set, u.where));\n }\n for (const where of m.deletes ?? []) {\n statements.push(buildDelete(table, where));\n }\n\n const result: DbAdminMutationResult = {\n sql: statements.map((s) => s.sql),\n inserted: 0,\n updated: 0,\n deleted: 0,\n };\n\n if (m.dryRun) {\n // dryRun returns the SQL strings WITHOUT executing.\n return result;\n }\n\n // getDbExec() does not expose a transaction handle, so statements run\n // sequentially. A failure mid-batch surfaces as a thrown error with the\n // counts accumulated so far; callers should treat a partial batch as a\n // failure and re-run with a corrected payload.\n const db = getDbExec();\n const insertCount = m.inserts?.length ?? 0;\n const updateCount = m.updates?.length ?? 0;\n\n let executed = 0;\n for (const stmt of statements) {\n const res = await db.execute({ sql: stmt.sql, args: stmt.args });\n if (executed < insertCount) {\n result.inserted += 1;\n } else if (executed < insertCount + updateCount) {\n result.updated += res.rowsAffected || 0;\n } else {\n result.deleted += res.rowsAffected || 0;\n }\n executed += 1;\n }\n\n if (statements.length > 0) await notifyDbAdminChange();\n return result;\n}\n\n// ---------------------------------------------------------------------------\n// runSql\n// ---------------------------------------------------------------------------\n\n/** Error thrown when a destructive statement is run without confirmation. */\nexport class DbAdminConfirmRequiredError extends Error {\n readonly needsConfirm = true;\n constructor(message: string) {\n super(message);\n this.name = \"DbAdminConfirmRequiredError\";\n }\n}\n\n/** Strip `--` line comments and `/* *\\/` block comments from SQL. */\nfunction stripComments(sql: string): string {\n return sql.replace(/\\/\\*[\\s\\S]*?\\*\\//g, \" \").replace(/--[^\\n\\r]*/g, \" \");\n}\n\nfunction isMutatingSql(sql: string): boolean {\n const head = stripComments(sql).trim().toLowerCase();\n return /^(insert|update|delete|replace|create|alter|drop|truncate|merge|pragma\\s+\\w+\\s*=)/.test(\n head,\n );\n}\n\n/** Detect destructive ops on comment-stripped SQL. */\nfunction isDestructiveSql(sql: string): boolean {\n const cleaned = stripComments(sql).trim();\n const lower = cleaned.toLowerCase();\n if (/^drop\\b/.test(lower)) return true;\n if (/^truncate\\b/.test(lower)) return true;\n if (/^delete\\b/.test(lower) && !/\\bwhere\\b/.test(lower)) return true;\n if (/^update\\b/.test(lower) && !/\\bwhere\\b/.test(lower)) return true;\n return false;\n}\n\n/** A leading SELECT (or CTE that ends in SELECT) with no LIMIT clause. */\nfunction isBareSelectWithoutLimit(sql: string): boolean {\n const cleaned = stripComments(sql).trim();\n const lower = cleaned.toLowerCase();\n const isSelect = /^(select|with)\\b/.test(lower);\n if (!isSelect) return false;\n if (/\\blimit\\b/.test(lower)) return false;\n return true;\n}\n\nexport async function runSql(\n sql: string,\n params: unknown[] | undefined,\n opts: { confirmDestructive?: boolean } = {},\n): Promise<DbAdminQueryResult> {\n if (typeof sql !== \"string\" || !sql.trim()) {\n throw new Error(\"SQL is required\");\n }\n\n if (isDestructiveSql(sql) && !opts.confirmDestructive) {\n throw new DbAdminConfirmRequiredError(\n \"This statement is destructive (DROP / TRUNCATE / unscoped DELETE or UPDATE). Re-run with confirmDestructive: true to proceed.\",\n );\n }\n\n // Guardrail: auto-append LIMIT 100 to a bare SELECT so an accidental\n // full-table scan can't dump a huge result set.\n let finalSql = sql.trim().replace(/;\\s*$/, \"\");\n if (isBareSelectWithoutLimit(finalSql)) {\n finalSql = `${finalSql} LIMIT 100`;\n }\n\n const db = getDbExec();\n const started = Date.now();\n const res = await db.execute(\n params && params.length > 0 ? { sql: finalSql, args: params } : finalSql,\n );\n const durationMs = Date.now() - started;\n\n const rows = (res.rows ?? []) as Record<string, unknown>[];\n const columns =\n rows.length > 0 && rows[0] && typeof rows[0] === \"object\"\n ? Object.keys(rows[0])\n : [];\n\n if (isMutatingSql(finalSql)) await notifyDbAdminChange();\n\n return {\n columns,\n rows,\n rowsAffected: res.rowsAffected ?? 0,\n durationMs,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../src/db-admin/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EACL,SAAS,EACT,UAAU,GAGX,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAgBhE,8EAA8E;AAC9E,kCAAkC;AAClC,8EAA8E;AAE9E,MAAM,QAAQ,GAAG,0BAA0B,CAAC;AAQ5C,2EAA2E;AAC3E,SAAS,WAAW,CAAC,IAAY,EAAE,IAAI,GAAG,YAAY;IACpD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACrD,MAAM,IAAI,KAAK,CAAC,WAAW,IAAI,KAAK,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9D,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,6EAA6E;AAC7E,SAAS,UAAU,CAAC,IAAY;IAC9B,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC;AAClC,CAAC;AAED,SAAS,EAAE,CAAC,OAAwB;IAClC,OAAO,OAAO,EAAE,EAAE,IAAI,SAAS,EAAE,CAAC;AACpC,CAAC;AAED,SAAS,OAAO,CAAC,OAAwB;IACvC,OAAO,CAAC,OAAO,EAAE,OAAO,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O,CAAC;IAExC,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAA8B,CAAC;IAC3D,MAAM,OAAO,GACX,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ;QACvD,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,CAAC,CAAC,EAAE,CAAC;IAET,IAAI,aAAa,CAAC,QAAQ,CAAC;QAAE,MAAM,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAEhE,OAAO;QACL,OAAO;QACP,IAAI;QACJ,YAAY,EAAE,GAAG,CAAC,YAAY,IAAI,CAAC;QACnC,UAAU;KACX,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Database admin operations.\n *\n * Pure, dialect-agnostic, RAW/UNSCOPED helpers backing the Supabase-Studio-like\n * DB admin. These run the FULL database with no per-user `accessFilter`\n * scoping. Callers MUST gate access before invoking them. The built-in core\n * route gates this to dev + localhost; production-reachable surfaces must pass\n * an explicit runtime for the target database and enforce their own admin-only\n * checks before reading or mutating.\n *\n * All access goes through the unified `getDbExec()` client, which uses `?`\n * placeholders (auto-converted to `$1,$2,…` for Postgres) and returns rows\n * keyed by column name. Identifiers are validated against a strict pattern and\n * always double-quoted; values are ALWAYS parameterized — never interpolated.\n */\nimport {\n getDbExec,\n getDialect,\n type DbExec,\n type Dialect,\n} from \"../db/client.js\";\nimport { notifyActionChange } from \"../server/action-change.js\";\nimport type {\n DbAdminColumn,\n DbAdminDialect,\n DbAdminFilter,\n DbAdminForeignKey,\n DbAdminIndex,\n DbAdminMutation,\n DbAdminMutationResult,\n DbAdminQueryResult,\n DbAdminRowsRequest,\n DbAdminRowsResult,\n DbAdminTableSchema,\n DbAdminTableSummary,\n} from \"./types.js\";\n\n// ---------------------------------------------------------------------------\n// Identifier validation + quoting\n// ---------------------------------------------------------------------------\n\nconst IDENT_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;\n\nexport interface DbAdminRuntime {\n db?: DbExec;\n dialect?: Dialect;\n notifyChange?: () => Promise<void>;\n}\n\n/** Throw on any identifier that isn't a plain `[A-Za-z_][A-Za-z0-9_]*`. */\nfunction assertIdent(name: string, kind = \"identifier\"): string {\n if (typeof name !== \"string\" || !IDENT_RE.test(name)) {\n throw new Error(`Invalid ${kind}: ${JSON.stringify(name)}`);\n }\n return name;\n}\n\n/** Double-quote an already-validated identifier (valid in PG and SQLite). */\nfunction quoteIdent(name: string): string {\n return `\"${assertIdent(name)}\"`;\n}\n\nfunction db(runtime?: DbAdminRuntime): DbExec {\n return runtime?.db ?? getDbExec();\n}\n\nfunction dialect(runtime?: DbAdminRuntime): DbAdminDialect {\n return (runtime?.dialect ?? getDialect()) as DbAdminDialect;\n}\n\nfunction isPostgresRuntime(runtime?: DbAdminRuntime): boolean {\n return dialect(runtime) === \"postgres\";\n}\n\n// ---------------------------------------------------------------------------\n// Notify the UI after a real mutation so polling refetches.\n// ---------------------------------------------------------------------------\n\nasync function notifyDbAdminChange(runtime?: DbAdminRuntime): Promise<void> {\n if (runtime?.notifyChange) {\n await runtime.notifyChange();\n return;\n }\n // The UI keys on useChangeVersions([\"db-admin\",\"action\"]). notifyActionChange\n // records a \"db-admin\" change AND a marker; the action route layer's generic\n // \"action\" source is covered by passing the db-admin action name through the\n // same primitive that the action surface uses.\n await notifyActionChange({ actionName: \"db-admin\" }).catch(() => {});\n}\n\n// ---------------------------------------------------------------------------\n// listTables\n// ---------------------------------------------------------------------------\n\nexport async function listTables(runtime?: DbAdminRuntime): Promise<{\n dialect: DbAdminDialect;\n tables: DbAdminTableSummary[];\n}> {\n const client = db(runtime);\n const summaries: DbAdminTableSummary[] = [];\n\n if (isPostgresRuntime(runtime)) {\n const res = await client.execute(\n `SELECT table_name AS name, table_type AS type\n FROM information_schema.tables\n WHERE table_schema = 'public'\n AND table_type IN ('BASE TABLE', 'VIEW')\n ORDER BY table_name`,\n );\n for (const row of res.rows) {\n const name = String((row as any).name);\n const type = (row as any).type === \"VIEW\" ? \"view\" : \"table\";\n summaries.push({\n name,\n type,\n rowCount: type === \"view\" ? null : await safeRowCount(name, runtime),\n });\n }\n } else {\n const res = await client.execute(\n `SELECT name, type FROM sqlite_master\n WHERE type IN ('table', 'view')\n AND name NOT LIKE 'sqlite_%'\n ORDER BY name`,\n );\n for (const row of res.rows) {\n const name = String((row as any).name);\n const type = (row as any).type === \"view\" ? \"view\" : \"table\";\n summaries.push({\n name,\n type,\n rowCount: type === \"view\" ? null : await safeRowCount(name, runtime),\n });\n }\n }\n\n return { dialect: dialect(runtime), tables: summaries };\n}\n\nasync function safeRowCount(\n table: string,\n runtime?: DbAdminRuntime,\n): Promise<number | null> {\n try {\n const client = db(runtime);\n const res = await client.execute(\n `SELECT COUNT(*) AS c FROM ${quoteIdent(table)}`,\n );\n const c = (res.rows[0] as any)?.c;\n const n = Number(c);\n return Number.isFinite(n) ? n : null;\n } catch {\n return null;\n }\n}\n\n// ---------------------------------------------------------------------------\n// getTableSchema\n// ---------------------------------------------------------------------------\n\nexport async function getTableSchema(\n table: string,\n runtime?: DbAdminRuntime,\n): Promise<DbAdminTableSchema> {\n assertIdent(table, \"table name\");\n return isPostgresRuntime(runtime)\n ? getTableSchemaPostgres(table, runtime)\n : getTableSchemaSqlite(table, runtime);\n}\n\nasync function getTableSchemaPostgres(\n table: string,\n runtime?: DbAdminRuntime,\n): Promise<DbAdminTableSchema> {\n const client = db(runtime);\n\n const typeRes = await client.execute({\n sql: `SELECT table_type AS type FROM information_schema.tables\n WHERE table_schema = 'public' AND table_name = ?`,\n args: [table],\n });\n const type = (typeRes.rows[0] as any)?.type === \"VIEW\" ? \"view\" : \"table\";\n\n const colRes = await client.execute({\n sql: `SELECT\n column_name AS name,\n data_type AS type,\n CASE WHEN is_nullable = 'NO' THEN 0 ELSE 1 END AS nullable,\n column_default AS dflt\n FROM information_schema.columns\n WHERE table_schema = 'public' AND table_name = ?\n ORDER BY ordinal_position`,\n args: [table],\n });\n\n const pkRes = await client.execute({\n sql: `SELECT kcu.column_name AS col\n FROM information_schema.table_constraints tc\n JOIN information_schema.key_column_usage kcu\n ON tc.constraint_name = kcu.constraint_name\n AND tc.table_schema = kcu.table_schema\n WHERE tc.table_name = ?\n AND tc.table_schema = 'public'\n AND tc.constraint_type = 'PRIMARY KEY'\n ORDER BY kcu.ordinal_position`,\n args: [table],\n });\n const primaryKey = pkRes.rows.map((r) => String((r as any).col));\n const pkSet = new Set(primaryKey);\n\n const fkRes = await client.execute({\n sql: `SELECT\n kcu.column_name AS col,\n ccu.table_name AS ref_table,\n ccu.column_name AS ref_col\n FROM information_schema.table_constraints tc\n JOIN information_schema.key_column_usage kcu\n ON tc.constraint_name = kcu.constraint_name\n AND tc.table_schema = kcu.table_schema\n JOIN information_schema.constraint_column_usage ccu\n ON tc.constraint_name = ccu.constraint_name\n AND tc.table_schema = ccu.table_schema\n WHERE tc.table_name = ?\n AND tc.table_schema = 'public'\n AND tc.constraint_type = 'FOREIGN KEY'`,\n args: [table],\n });\n const foreignKeys: DbAdminForeignKey[] = fkRes.rows.map((r) => ({\n column: String((r as any).col),\n refTable: String((r as any).ref_table),\n refColumn: String((r as any).ref_col),\n }));\n\n const idxRes = await client.execute({\n sql: `SELECT indexname AS name, indexdef AS def\n FROM pg_indexes\n WHERE schemaname = 'public' AND tablename = ?`,\n args: [table],\n });\n const indexes: DbAdminIndex[] = idxRes.rows.map((r) => {\n const def = String((r as any).def ?? \"\");\n const colMatch = def.match(/\\(([^)]+)\\)/);\n const columns = colMatch\n ? colMatch[1]\n .split(\",\")\n .map((c) => c.trim().replace(/^\"|\"$/g, \"\"))\n .filter(Boolean)\n : [];\n return {\n name: String((r as any).name),\n unique: /\\bUNIQUE\\b/i.test(def),\n columns,\n };\n });\n\n const columns: DbAdminColumn[] = colRes.rows.map((r) => {\n const name = String((r as any).name);\n const dflt = (r as any).dflt;\n const defaultValue = dflt == null ? null : String(dflt);\n return {\n name,\n type: String((r as any).type ?? \"ANY\"),\n nullable: Number((r as any).nullable) === 1,\n pk: pkSet.has(name),\n defaultValue,\n // Postgres serial/identity columns default to a sequence call.\n autoIncrement:\n defaultValue != null &&\n (/nextval\\(/i.test(defaultValue) || /identity/i.test(defaultValue)),\n };\n });\n\n return {\n name: table,\n type,\n columns,\n primaryKey,\n foreignKeys,\n indexes,\n rowCount: type === \"view\" ? null : await safeRowCount(table, runtime),\n };\n}\n\nasync function getTableSchemaSqlite(\n table: string,\n runtime?: DbAdminRuntime,\n): Promise<DbAdminTableSchema> {\n const client = db(runtime);\n\n const typeRes = await client.execute({\n sql: `SELECT type FROM sqlite_master WHERE name = ? AND type IN ('table','view')`,\n args: [table],\n });\n const type = (typeRes.rows[0] as any)?.type === \"view\" ? \"view\" : \"table\";\n\n const colRes = await client.execute(\n `PRAGMA table_info(${quoteIdent(table)})`,\n );\n const columns: DbAdminColumn[] = colRes.rows.map((r) => {\n const name = String((r as any).name);\n const dflt = (r as any).dflt_value;\n return {\n name,\n type: String((r as any).type ?? \"ANY\") || \"ANY\",\n nullable: Number((r as any).notnull) === 0,\n pk: Number((r as any).pk) > 0,\n defaultValue: dflt == null ? null : String(dflt),\n };\n });\n\n // PK order follows the pk index from table_info (1-based, 0 = not pk).\n const primaryKey = colRes.rows\n .filter((r) => Number((r as any).pk) > 0)\n .sort((a, b) => Number((a as any).pk) - Number((b as any).pk))\n .map((r) => String((r as any).name));\n\n // INTEGER PRIMARY KEY in SQLite is an alias for the rowid (autoincrementing).\n if (primaryKey.length === 1) {\n const pkCol = columns.find((c) => c.name === primaryKey[0]);\n if (pkCol && /^integer$/i.test(pkCol.type)) {\n pkCol.autoIncrement = true;\n }\n }\n\n const fkRes = await client.execute(\n `PRAGMA foreign_key_list(${quoteIdent(table)})`,\n );\n const foreignKeys: DbAdminForeignKey[] = fkRes.rows.map((r) => ({\n column: String((r as any).from),\n refTable: String((r as any).table),\n refColumn: String((r as any).to),\n }));\n\n const idxListRes = await client.execute(\n `PRAGMA index_list(${quoteIdent(table)})`,\n );\n const indexes: DbAdminIndex[] = [];\n for (const idx of idxListRes.rows) {\n const idxName = String((idx as any).name);\n if (idxName.startsWith(\"sqlite_\")) continue;\n const infoRes = await client.execute(\n `PRAGMA index_info(${quoteIdent(idxName)})`,\n );\n indexes.push({\n name: idxName,\n unique: Number((idx as any).unique) === 1,\n columns: infoRes.rows\n .map((c) => (c as any).name)\n .filter((n): n is string => typeof n === \"string\"),\n });\n }\n\n return {\n name: table,\n type,\n columns,\n primaryKey,\n foreignKeys,\n indexes,\n rowCount: type === \"view\" ? null : await safeRowCount(table, runtime),\n };\n}\n\n// ---------------------------------------------------------------------------\n// getRows\n// ---------------------------------------------------------------------------\n\nconst SAFE_OPS = new Set([\n \"eq\",\n \"neq\",\n \"lt\",\n \"lte\",\n \"gt\",\n \"gte\",\n \"like\",\n \"ilike\",\n \"in\",\n \"is_null\",\n \"not_null\",\n]);\n\nconst OP_SQL: Record<string, string> = {\n eq: \"=\",\n neq: \"<>\",\n lt: \"<\",\n lte: \"<=\",\n gt: \">\",\n gte: \">=\",\n like: \"LIKE\",\n};\n\n/** Build a parameterized WHERE clause + args from filters. */\nfunction buildWhere(\n filters: DbAdminFilter[] | undefined,\n runtime?: DbAdminRuntime,\n): {\n clause: string;\n args: unknown[];\n} {\n if (!filters || filters.length === 0) return { clause: \"\", args: [] };\n const parts: string[] = [];\n const args: unknown[] = [];\n for (const f of filters) {\n const col = quoteIdent(f.column);\n if (!SAFE_OPS.has(f.op)) {\n throw new Error(`Invalid filter op: ${JSON.stringify(f.op)}`);\n }\n switch (f.op) {\n case \"is_null\":\n parts.push(`${col} IS NULL`);\n break;\n case \"not_null\":\n parts.push(`${col} IS NOT NULL`);\n break;\n case \"in\": {\n const values = Array.isArray(f.value) ? f.value : [f.value];\n if (values.length === 0) {\n // `col IN ()` is invalid SQL; an empty set matches nothing.\n parts.push(`1 = 0`);\n break;\n }\n parts.push(`${col} IN (${values.map(() => \"?\").join(\", \")})`);\n args.push(...values);\n break;\n }\n case \"ilike\": {\n // SQLite LIKE is case-insensitive for ASCII by default; Postgres has\n // a dedicated ILIKE operator.\n if (isPostgresRuntime(runtime)) {\n parts.push(`${col} ILIKE ?`);\n } else {\n parts.push(`${col} LIKE ?`);\n }\n args.push(f.value);\n break;\n }\n default: {\n parts.push(`${col} ${OP_SQL[f.op]} ?`);\n args.push(f.value);\n break;\n }\n }\n }\n return { clause: parts.length ? ` WHERE ${parts.join(\" AND \")}` : \"\", args };\n}\n\nfunction buildOrderBy(sort: DbAdminRowsRequest[\"sort\"]): string {\n if (!sort || sort.length === 0) return \"\";\n const parts = sort.map((s) => {\n const dir = s.dir === \"desc\" ? \"DESC\" : \"ASC\";\n return `${quoteIdent(s.column)} ${dir}`;\n });\n return ` ORDER BY ${parts.join(\", \")}`;\n}\n\nexport async function getRows(\n table: string,\n req: DbAdminRowsRequest,\n runtime?: DbAdminRuntime,\n): Promise<DbAdminRowsResult> {\n assertIdent(table, \"table name\");\n const client = db(runtime);\n const schema = await getTableSchema(table, runtime);\n\n const page = Math.max(1, Math.floor(req.page) || 1);\n const pageSize = Math.min(1000, Math.max(1, Math.floor(req.pageSize) || 50));\n const offset = (page - 1) * pageSize;\n\n const where = buildWhere(req.filters, runtime);\n const orderBy = buildOrderBy(req.sort);\n const quoted = quoteIdent(table);\n\n const countRes = await client.execute({\n sql: `SELECT COUNT(*) AS c FROM ${quoted}${where.clause}`,\n args: where.args,\n });\n const total = Number((countRes.rows[0] as any)?.c ?? 0) || 0;\n\n const rowsRes = await client.execute({\n sql: `SELECT * FROM ${quoted}${where.clause}${orderBy} LIMIT ? OFFSET ?`,\n args: [...where.args, pageSize, offset],\n });\n\n return {\n columns: schema.columns,\n rows: rowsRes.rows as Record<string, unknown>[],\n total,\n page,\n pageSize,\n };\n}\n\n// ---------------------------------------------------------------------------\n// applyMutations\n// ---------------------------------------------------------------------------\n\nfunction buildInsert(\n table: string,\n row: Record<string, unknown>,\n): { sql: string; args: unknown[] } {\n const cols = Object.keys(row);\n if (cols.length === 0) {\n throw new Error(\"Cannot insert an empty row\");\n }\n cols.forEach((c) => assertIdent(c, \"column name\"));\n const sql = `INSERT INTO ${quoteIdent(table)} (${cols\n .map(quoteIdent)\n .join(\", \")}) VALUES (${cols.map(() => \"?\").join(\", \")})`;\n return { sql, args: cols.map((c) => row[c]) };\n}\n\nfunction buildUpdate(\n table: string,\n set: Record<string, unknown>,\n where: Record<string, unknown>,\n): { sql: string; args: unknown[] } {\n const setCols = Object.keys(set);\n const whereCols = Object.keys(where);\n if (setCols.length === 0) throw new Error(\"Update requires a non-empty set\");\n if (whereCols.length === 0) {\n throw new Error(\"Update requires a non-empty where clause\");\n }\n setCols.forEach((c) => assertIdent(c, \"column name\"));\n whereCols.forEach((c) => assertIdent(c, \"column name\"));\n const setSql = setCols.map((c) => `${quoteIdent(c)} = ?`).join(\", \");\n const whereSql = whereCols.map((c) => `${quoteIdent(c)} = ?`).join(\" AND \");\n const sql = `UPDATE ${quoteIdent(table)} SET ${setSql} WHERE ${whereSql}`;\n return {\n sql,\n args: [...setCols.map((c) => set[c]), ...whereCols.map((c) => where[c])],\n };\n}\n\nfunction buildDelete(\n table: string,\n where: Record<string, unknown>,\n): { sql: string; args: unknown[] } {\n const whereCols = Object.keys(where);\n if (whereCols.length === 0) {\n throw new Error(\"Delete requires a non-empty where clause\");\n }\n whereCols.forEach((c) => assertIdent(c, \"column name\"));\n const whereSql = whereCols.map((c) => `${quoteIdent(c)} = ?`).join(\" AND \");\n const sql = `DELETE FROM ${quoteIdent(table)} WHERE ${whereSql}`;\n return { sql, args: whereCols.map((c) => where[c]) };\n}\n\nexport async function applyMutations(\n table: string,\n m: DbAdminMutation,\n runtime?: DbAdminRuntime,\n): Promise<DbAdminMutationResult> {\n assertIdent(table, \"table name\");\n\n const statements: { sql: string; args: unknown[] }[] = [];\n for (const row of m.inserts ?? []) statements.push(buildInsert(table, row));\n for (const u of m.updates ?? []) {\n statements.push(buildUpdate(table, u.set, u.where));\n }\n for (const where of m.deletes ?? []) {\n statements.push(buildDelete(table, where));\n }\n\n const result: DbAdminMutationResult = {\n sql: statements.map((s) => s.sql),\n inserted: 0,\n updated: 0,\n deleted: 0,\n };\n\n if (m.dryRun) {\n // dryRun returns the SQL strings WITHOUT executing.\n return result;\n }\n\n // getDbExec() does not expose a transaction handle, so statements run\n // sequentially. A failure mid-batch surfaces as a thrown error with the\n // counts accumulated so far; callers should treat a partial batch as a\n // failure and re-run with a corrected payload.\n const client = db(runtime);\n const insertCount = m.inserts?.length ?? 0;\n const updateCount = m.updates?.length ?? 0;\n\n let executed = 0;\n for (const stmt of statements) {\n const res = await client.execute({ sql: stmt.sql, args: stmt.args });\n if (executed < insertCount) {\n result.inserted += 1;\n } else if (executed < insertCount + updateCount) {\n result.updated += res.rowsAffected || 0;\n } else {\n result.deleted += res.rowsAffected || 0;\n }\n executed += 1;\n }\n\n if (statements.length > 0) await notifyDbAdminChange(runtime);\n return result;\n}\n\n// ---------------------------------------------------------------------------\n// runSql\n// ---------------------------------------------------------------------------\n\n/** Error thrown when a destructive statement is run without confirmation. */\nexport class DbAdminConfirmRequiredError extends Error {\n readonly needsConfirm = true;\n constructor(message: string) {\n super(message);\n this.name = \"DbAdminConfirmRequiredError\";\n }\n}\n\n/** Strip `--` line comments and `/* *\\/` block comments from SQL. */\nfunction stripComments(sql: string): string {\n return sql.replace(/\\/\\*[\\s\\S]*?\\*\\//g, \" \").replace(/--[^\\n\\r]*/g, \" \");\n}\n\nfunction isMutatingSql(sql: string): boolean {\n const head = stripComments(sql).trim().toLowerCase();\n return /^(insert|update|delete|replace|create|alter|drop|truncate|merge|pragma\\s+\\w+\\s*=)/.test(\n head,\n );\n}\n\n/** Detect destructive ops on comment-stripped SQL. */\nfunction isDestructiveSql(sql: string): boolean {\n const cleaned = stripComments(sql).trim();\n const lower = cleaned.toLowerCase();\n if (/^drop\\b/.test(lower)) return true;\n if (/^truncate\\b/.test(lower)) return true;\n if (/^delete\\b/.test(lower) && !/\\bwhere\\b/.test(lower)) return true;\n if (/^update\\b/.test(lower) && !/\\bwhere\\b/.test(lower)) return true;\n return false;\n}\n\n/** A leading SELECT (or CTE that ends in SELECT) with no LIMIT clause. */\nfunction isBareSelectWithoutLimit(sql: string): boolean {\n const cleaned = stripComments(sql).trim();\n const lower = cleaned.toLowerCase();\n const isSelect = /^(select|with)\\b/.test(lower);\n if (!isSelect) return false;\n if (/\\blimit\\b/.test(lower)) return false;\n return true;\n}\n\nexport async function runSql(\n sql: string,\n params: unknown[] | undefined,\n opts: { confirmDestructive?: boolean } = {},\n runtime?: DbAdminRuntime,\n): Promise<DbAdminQueryResult> {\n if (typeof sql !== \"string\" || !sql.trim()) {\n throw new Error(\"SQL is required\");\n }\n\n if (isDestructiveSql(sql) && !opts.confirmDestructive) {\n throw new DbAdminConfirmRequiredError(\n \"This statement is destructive (DROP / TRUNCATE / unscoped DELETE or UPDATE). Re-run with confirmDestructive: true to proceed.\",\n );\n }\n\n // Guardrail: auto-append LIMIT 100 to a bare SELECT so an accidental\n // full-table scan can't dump a huge result set.\n let finalSql = sql.trim().replace(/;\\s*$/, \"\");\n if (isBareSelectWithoutLimit(finalSql)) {\n finalSql = `${finalSql} LIMIT 100`;\n }\n\n const client = db(runtime);\n const started = Date.now();\n const res = await client.execute(\n params && params.length > 0 ? { sql: finalSql, args: params } : finalSql,\n );\n const durationMs = Date.now() - started;\n\n const rows = (res.rows ?? []) as Record<string, unknown>[];\n const columns =\n rows.length > 0 && rows[0] && typeof rows[0] === \"object\"\n ? Object.keys(rows[0])\n : [];\n\n if (isMutatingSql(finalSql)) await notifyDbAdminChange(runtime);\n\n return {\n columns,\n rows,\n rowsAffected: res.rowsAffected ?? 0,\n durationMs,\n };\n}\n"]}
|
|
@@ -322,6 +322,9 @@ declare const messages: {
|
|
|
322
322
|
loadErrorTitle: string;
|
|
323
323
|
loadErrorFallback: string;
|
|
324
324
|
tryAgain: string;
|
|
325
|
+
sendFeedback: string;
|
|
326
|
+
feedbackPlaceholder: string;
|
|
327
|
+
openGitHubIssue: string;
|
|
325
328
|
yourOrganization: string;
|
|
326
329
|
joinYourTeam: string;
|
|
327
330
|
openToDomainEmails: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-messages.d.ts","sourceRoot":"","sources":["../../src/localization/default-messages.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,QAAQ;IACZ,IAAI;QACF,aAAa;QACb,mBAAmB;QACnB,KAAK;QACL,KAAK;QACL,eAAe;QACf,aAAa;QACb,SAAS;QACT,eAAe;QACf,UAAU;QACV,gBAAgB;;IAElB,QAAQ;QACN,KAAK;QACL,WAAW;QACX,aAAa;QACb,mBAAmB;QAEnB,aAAa;QACb,UAAU;QACV,gBAAgB;QAEhB,iBAAiB;QACjB,cAAc;QACd,oBAAoB;QACpB,gBAAgB;QAChB,oBAAoB;QACpB,QAAQ;;IAEV,QAAQ;QACN,GAAG;YACD,IAAI;YACJ,QAAQ;YACR,IAAI;YACJ,OAAO;YACP,KAAK;YACL,YAAY;YACZ,MAAM;YACN,SAAS;YACT,SAAS;YACT,YAAY;YACZ,UAAU;YACV,SAAS;YACT,KAAK;YACL,MAAM;YACN,WAAW;YACX,QAAQ;YACR,IAAI;YACJ,UAAU;YACV,UAAU;YACV,qBAAqB;;QAEvB,OAAO;YACL,qBAAqB;YACrB,qBAAqB;YACrB,uBAAuB;YACvB,KAAK;YACL,OAAO;YACP,eAAe;YACf,UAAU;YACV,YAAY;YACZ,WAAW;YACX,SAAS;YACT,cAAc;YAEd,kBAAkB;YAClB,oBAAoB;YACpB,kBAAkB;;QAEpB,KAAK;YACH,eAAe;YAEf,4BAA4B;YAE5B,eAAe;YACf,aAAa;YACb,WAAW;YACX,WAAW;YACX,SAAS;YACT,SAAS;YACT,iBAAiB;YACjB,kBAAkB;YAClB,IAAI;YACJ,IAAI;YACJ,UAAU;YACV,cAAc;YACd,oBAAoB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AAW;QACX,YAAY;QACZ,UAAU;;IAEZ,KAAK;QACH,YAAY;QACZ,cAAc;QACd,aAAa;QACb,eAAe;QAEf,WAAW;QACX,MAAM;;CAET,CAAC;eAEa,QAAQ"}
|
|
1
|
+
{"version":3,"file":"default-messages.d.ts","sourceRoot":"","sources":["../../src/localization/default-messages.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,QAAQ;IACZ,IAAI;QACF,aAAa;QACb,mBAAmB;QACnB,KAAK;QACL,KAAK;QACL,eAAe;QACf,aAAa;QACb,SAAS;QACT,eAAe;QACf,UAAU;QACV,gBAAgB;;IAElB,QAAQ;QACN,KAAK;QACL,WAAW;QACX,aAAa;QACb,mBAAmB;QAEnB,aAAa;QACb,UAAU;QACV,gBAAgB;QAEhB,iBAAiB;QACjB,cAAc;QACd,oBAAoB;QACpB,gBAAgB;QAChB,oBAAoB;QACpB,QAAQ;;IAEV,QAAQ;QACN,GAAG;YACD,IAAI;YACJ,QAAQ;YACR,IAAI;YACJ,OAAO;YACP,KAAK;YACL,YAAY;YACZ,MAAM;YACN,SAAS;YACT,SAAS;YACT,YAAY;YACZ,UAAU;YACV,SAAS;YACT,KAAK;YACL,MAAM;YACN,WAAW;YACX,QAAQ;YACR,IAAI;YACJ,UAAU;YACV,UAAU;YACV,qBAAqB;;QAEvB,OAAO;YACL,qBAAqB;YACrB,qBAAqB;YACrB,uBAAuB;YACvB,KAAK;YACL,OAAO;YACP,eAAe;YACf,UAAU;YACV,YAAY;YACZ,WAAW;YACX,SAAS;YACT,cAAc;YAEd,kBAAkB;YAClB,oBAAoB;YACpB,kBAAkB;;QAEpB,KAAK;YACH,eAAe;YAEf,4BAA4B;YAE5B,eAAe;YACf,aAAa;YACb,WAAW;YACX,WAAW;YACX,SAAS;YACT,SAAS;YACT,iBAAiB;YACjB,kBAAkB;YAClB,IAAI;YACJ,IAAI;YACJ,UAAU;YACV,cAAc;YACd,oBAAoB;YACpB,uBAAuB;YAEvB,YAAY;YACZ,uBAAuB;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QACX,YAAY;QACZ,UAAU;;IAEZ,KAAK;QACH,YAAY;QACZ,cAAc;QACd,aAAa;QACb,eAAe;QAEf,WAAW;QACX,MAAM;;CAET,CAAC;eAEa,QAAQ"}
|
|
@@ -327,6 +327,9 @@ const messages = {
|
|
|
327
327
|
loadErrorTitle: "Couldn't load organization",
|
|
328
328
|
loadErrorFallback: "Couldn't load organization.",
|
|
329
329
|
tryAgain: "Try again",
|
|
330
|
+
sendFeedback: "Send feedback",
|
|
331
|
+
feedbackPlaceholder: "Describe what happened before this organization error appeared.",
|
|
332
|
+
openGitHubIssue: "Open GitHub issue",
|
|
330
333
|
yourOrganization: "Your organization",
|
|
331
334
|
joinYourTeam: "Join your team",
|
|
332
335
|
openToDomainEmails: "Open to @{{domain}} emails",
|