@rebasepro/studio 0.0.1-canary.09e5ec5
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/LICENSE +114 -0
- package/README.md +159 -0
- package/dist/ApiExplorer-gMJt5JrS.js +1053 -0
- package/dist/ApiExplorer-gMJt5JrS.js.map +1 -0
- package/dist/AuthSimulationSelector-BF4rkRGp.js +118 -0
- package/dist/AuthSimulationSelector-BF4rkRGp.js.map +1 -0
- package/dist/BranchesView-DcHZtvXo.js +292 -0
- package/dist/BranchesView-DcHZtvXo.js.map +1 -0
- package/dist/CronJobsView-CijCToeK.js +456 -0
- package/dist/CronJobsView-CijCToeK.js.map +1 -0
- package/dist/JSEditor-D8nVp3Lp.js +1308 -0
- package/dist/JSEditor-D8nVp3Lp.js.map +1 -0
- package/dist/MonacoEditor-CMYEjiRf.js +161 -0
- package/dist/MonacoEditor-CMYEjiRf.js.map +1 -0
- package/dist/RLSEditor-DBH09u9v.js +1831 -0
- package/dist/RLSEditor-DBH09u9v.js.map +1 -0
- package/dist/SQLEditor-CkVx9vgr.js +1792 -0
- package/dist/SQLEditor-CkVx9vgr.js.map +1 -0
- package/dist/SchemaVisualizer-BgD5Zb77.js +1069 -0
- package/dist/SchemaVisualizer-BgD5Zb77.js.map +1 -0
- package/dist/StorageView-CTqGFhY9.js +907 -0
- package/dist/StorageView-CTqGFhY9.js.map +1 -0
- package/dist/common/src/collections/CollectionRegistry.d.ts +56 -0
- package/dist/common/src/collections/index.d.ts +1 -0
- package/dist/common/src/data/buildRebaseData.d.ts +14 -0
- package/dist/common/src/index.d.ts +3 -0
- package/dist/common/src/util/builders.d.ts +57 -0
- package/dist/common/src/util/callbacks.d.ts +6 -0
- package/dist/common/src/util/collections.d.ts +11 -0
- package/dist/common/src/util/common.d.ts +2 -0
- package/dist/common/src/util/conditions.d.ts +26 -0
- package/dist/common/src/util/entities.d.ts +58 -0
- package/dist/common/src/util/enums.d.ts +3 -0
- package/dist/common/src/util/index.d.ts +16 -0
- package/dist/common/src/util/navigation_from_path.d.ts +34 -0
- package/dist/common/src/util/navigation_utils.d.ts +20 -0
- package/dist/common/src/util/parent_references_from_path.d.ts +6 -0
- package/dist/common/src/util/paths.d.ts +14 -0
- package/dist/common/src/util/permissions.d.ts +5 -0
- package/dist/common/src/util/references.d.ts +2 -0
- package/dist/common/src/util/relations.d.ts +22 -0
- package/dist/common/src/util/resolutions.d.ts +72 -0
- package/dist/common/src/util/storage.d.ts +24 -0
- package/dist/core/src/components/AIIcon.d.ts +16 -0
- package/dist/core/src/components/ConfirmationDialog.d.ts +9 -0
- package/dist/core/src/components/Debug/UIReferenceView.d.ts +1 -0
- package/dist/core/src/components/Debug/UIStyleGuide.d.ts +1 -0
- package/dist/core/src/components/ErrorTooltip.d.ts +2 -0
- package/dist/core/src/components/ErrorView.d.ts +21 -0
- package/dist/core/src/components/LanguageToggle.d.ts +1 -0
- package/dist/core/src/components/LoginView/LoginView.d.ts +68 -0
- package/dist/core/src/components/LoginView/index.d.ts +2 -0
- package/dist/core/src/components/NotFoundPage.d.ts +1 -0
- package/dist/core/src/components/RebaseAuth.d.ts +10 -0
- package/dist/core/src/components/RebaseLogo.d.ts +7 -0
- package/dist/core/src/components/UnsavedChangesDialog.d.ts +9 -0
- package/dist/core/src/components/UserDisplay.d.ts +7 -0
- package/dist/core/src/components/UserSelectPopover.d.ts +62 -0
- package/dist/core/src/components/UserSettingsView.d.ts +1 -0
- package/dist/core/src/components/common/index.d.ts +6 -0
- package/dist/core/src/components/common/table_height.d.ts +5 -0
- package/dist/core/src/components/common/types.d.ts +63 -0
- package/dist/core/src/components/common/useColumnsIds.d.ts +9 -0
- package/dist/core/src/components/common/useDataTableController.d.ts +45 -0
- package/dist/core/src/components/common/useDebouncedData.d.ts +9 -0
- package/dist/core/src/components/common/useScrollRestoration.d.ts +14 -0
- package/dist/core/src/components/index.d.ts +16 -0
- package/dist/core/src/contexts/AdminModeController.d.ts +4 -0
- package/dist/core/src/contexts/AnalyticsContext.d.ts +3 -0
- package/dist/core/src/contexts/AuthControllerContext.d.ts +3 -0
- package/dist/core/src/contexts/CustomizationControllerContext.d.ts +3 -0
- package/dist/core/src/contexts/DataDriverContext.d.ts +3 -0
- package/dist/core/src/contexts/DatabaseAdminContext.d.ts +3 -0
- package/dist/core/src/contexts/DialogsProvider.d.ts +4 -0
- package/dist/core/src/contexts/EffectiveRoleController.d.ts +4 -0
- package/dist/core/src/contexts/InternalUserManagementContext.d.ts +3 -0
- package/dist/core/src/contexts/ModeController.d.ts +4 -0
- package/dist/core/src/contexts/RebaseClientInstanceContext.d.ts +6 -0
- package/dist/core/src/contexts/RebaseDataContext.d.ts +3 -0
- package/dist/core/src/contexts/SnackbarProvider.d.ts +2 -0
- package/dist/core/src/contexts/StorageSourceContext.d.ts +3 -0
- package/dist/core/src/contexts/UserConfigurationPersistenceContext.d.ts +3 -0
- package/dist/core/src/contexts/index.d.ts +13 -0
- package/dist/core/src/core/PluginLifecycleManager.d.ts +17 -0
- package/dist/core/src/core/PluginProviderStack.d.ts +21 -0
- package/dist/core/src/core/Rebase.d.ts +14 -0
- package/dist/core/src/core/RebaseProps.d.ts +136 -0
- package/dist/core/src/core/RebaseRouter.d.ts +4 -0
- package/dist/core/src/core/RebaseRoutes.d.ts +17 -0
- package/dist/core/src/core/index.d.ts +4 -0
- package/dist/core/src/hooks/ApiConfigContext.d.ts +24 -0
- package/dist/core/src/hooks/data/delete.d.ts +31 -0
- package/dist/core/src/hooks/data/save.d.ts +34 -0
- package/dist/core/src/hooks/data/useCollectionFetch.d.ts +51 -0
- package/dist/core/src/hooks/data/useData.d.ts +13 -0
- package/dist/core/src/hooks/data/useDataOrder.d.ts +12 -0
- package/dist/core/src/hooks/data/useEntityFetch.d.ts +38 -0
- package/dist/core/src/hooks/data/useRelationSelector.d.ts +52 -0
- package/dist/core/src/hooks/data/useUserSelector.d.ts +31 -0
- package/dist/core/src/hooks/index.d.ts +37 -0
- package/dist/core/src/hooks/useAdminModeController.d.ts +19 -0
- package/dist/core/src/hooks/useAnalyticsController.d.ts +5 -0
- package/dist/core/src/hooks/useAuthController.d.ts +11 -0
- package/dist/core/src/hooks/useAuthSubscription.d.ts +2 -0
- package/dist/core/src/hooks/useBackendStorageSource.d.ts +30 -0
- package/dist/core/src/hooks/useBridgeRegistration.d.ts +18 -0
- package/dist/core/src/hooks/useBrowserTitleAndIcon.d.ts +6 -0
- package/dist/core/src/hooks/useBuildAdminModeController.d.ts +6 -0
- package/dist/core/src/hooks/useBuildEffectiveRoleController.d.ts +8 -0
- package/dist/core/src/hooks/useBuildLocalConfigurationPersistence.d.ts +2 -0
- package/dist/core/src/hooks/useBuildModeController.d.ts +6 -0
- package/dist/core/src/hooks/useClipboard.d.ts +57 -0
- package/dist/core/src/hooks/useCollapsedGroups.d.ts +12 -0
- package/dist/core/src/hooks/useCustomizationController.d.ts +11 -0
- package/dist/core/src/hooks/useDialogsController.d.ts +11 -0
- package/dist/core/src/hooks/useEffectiveRoleController.d.ts +7 -0
- package/dist/core/src/hooks/useInternalUserManagementController.d.ts +12 -0
- package/dist/core/src/hooks/useLargeLayout.d.ts +1 -0
- package/dist/core/src/hooks/useModeController.d.ts +19 -0
- package/dist/core/src/hooks/usePermissions.d.ts +12 -0
- package/dist/core/src/hooks/useRebaseClient.d.ts +5 -0
- package/dist/core/src/hooks/useRebaseContext.d.ts +11 -0
- package/dist/core/src/hooks/useRebaseRegistry.d.ts +34 -0
- package/dist/core/src/hooks/useSlot.d.ts +18 -0
- package/dist/core/src/hooks/useSnackbarController.d.ts +20 -0
- package/dist/core/src/hooks/useStorageSource.d.ts +7 -0
- package/dist/core/src/hooks/useStudioBridge.d.ts +91 -0
- package/dist/core/src/hooks/useTranslation.d.ts +17 -0
- package/dist/core/src/hooks/useUnsavedChangesDialog.d.ts +12 -0
- package/dist/core/src/hooks/useUserConfigurationPersistence.d.ts +8 -0
- package/dist/core/src/hooks/useValidateAuthenticator.d.ts +21 -0
- package/dist/core/src/i18n/RebaseI18nProvider.d.ts +33 -0
- package/dist/core/src/index.d.ts +15 -0
- package/dist/core/src/internal/common.d.ts +3 -0
- package/dist/core/src/internal/useRestoreScroll.d.ts +6 -0
- package/dist/core/src/locales/de.d.ts +2 -0
- package/dist/core/src/locales/en.d.ts +10 -0
- package/dist/core/src/locales/es.d.ts +10 -0
- package/dist/core/src/locales/fr.d.ts +2 -0
- package/dist/core/src/locales/hi.d.ts +2 -0
- package/dist/core/src/locales/it.d.ts +2 -0
- package/dist/core/src/locales/pt.d.ts +7 -0
- package/dist/core/src/util/constants.d.ts +1 -0
- package/dist/core/src/util/createFormexStub.d.ts +2 -0
- package/dist/core/src/util/entity_cache.d.ts +27 -0
- package/dist/core/src/util/enums.d.ts +5 -0
- package/dist/core/src/util/icon_list.d.ts +5 -0
- package/dist/core/src/util/icon_synonyms.d.ts +1 -0
- package/dist/core/src/util/icons.d.ts +20 -0
- package/dist/core/src/util/index.d.ts +10 -0
- package/dist/core/src/util/previews.d.ts +4 -0
- package/dist/core/src/util/useStorageUploadController.d.ts +38 -0
- package/dist/core/src/util/useTraceUpdate.d.ts +2 -0
- package/dist/formex/src/Field.d.ts +52 -0
- package/dist/formex/src/Formex.d.ts +7 -0
- package/dist/formex/src/index.d.ts +5 -0
- package/dist/formex/src/types.d.ts +40 -0
- package/dist/formex/src/useCreateFormex.d.ts +14 -0
- package/dist/formex/src/utils.d.ts +16 -0
- package/dist/index.es.js +726 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.umd.js +9647 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/studio/src/components/ApiExplorer/ApiExplorer.d.ts +9 -0
- package/dist/studio/src/components/ApiExplorer/EndpointDetail.d.ts +9 -0
- package/dist/studio/src/components/ApiExplorer/TryItPanel.d.ts +15 -0
- package/dist/studio/src/components/ApiExplorer/parseSpec.d.ts +16 -0
- package/dist/studio/src/components/ApiExplorer/types.d.ts +90 -0
- package/dist/studio/src/components/AuthSimulationSelector.d.ts +11 -0
- package/dist/studio/src/components/Branches/BranchesView.d.ts +1 -0
- package/dist/studio/src/components/CronJobs/CronJobsView.d.ts +1 -0
- package/dist/studio/src/components/JSEditor/JSEditor.d.ts +1 -0
- package/dist/studio/src/components/JSEditor/JSEditorSidebar.d.ts +21 -0
- package/dist/studio/src/components/JSEditor/JSMonacoEditor.d.ts +18 -0
- package/dist/studio/src/components/RLSEditor/PolicyEditor.d.ts +9 -0
- package/dist/studio/src/components/RLSEditor/RLSEditor.d.ts +19 -0
- package/dist/studio/src/components/RLSEditor/index.d.ts +1 -0
- package/dist/studio/src/components/RebaseStudio.d.ts +2 -0
- package/dist/studio/src/components/SQLEditor/ExplainVisualizer.d.ts +24 -0
- package/dist/studio/src/components/SQLEditor/MonacoEditor.d.ts +17 -0
- package/dist/studio/src/components/SQLEditor/SQLEditor.d.ts +11 -0
- package/dist/studio/src/components/SQLEditor/SQLEditorSidebar.d.ts +21 -0
- package/dist/studio/src/components/SQLEditor/SchemaBrowser.d.ts +8 -0
- package/dist/studio/src/components/SchemaVisualizer/RelationEdge.d.ts +3 -0
- package/dist/studio/src/components/SchemaVisualizer/SchemaVisualizer.d.ts +2 -0
- package/dist/studio/src/components/SchemaVisualizer/TableNode.d.ts +3 -0
- package/dist/studio/src/components/SchemaVisualizer/index.d.ts +5 -0
- package/dist/studio/src/components/SchemaVisualizer/schema-visualizer.utils.d.ts +42 -0
- package/dist/studio/src/components/SchemaVisualizer/useSchemaGraph.d.ts +37 -0
- package/dist/studio/src/components/StorageView/StorageView.d.ts +1 -0
- package/dist/studio/src/components/StudioHomePage.d.ts +9 -0
- package/dist/studio/src/index.d.ts +4 -0
- package/dist/studio/src/utils/entities.d.ts +0 -0
- package/dist/studio/src/utils/pgColumnToProperty.d.ts +6 -0
- package/dist/studio/src/utils/sql_utils.d.ts +52 -0
- package/dist/types/src/controllers/analytics_controller.d.ts +7 -0
- package/dist/types/src/controllers/auth.d.ts +119 -0
- package/dist/types/src/controllers/client.d.ts +170 -0
- package/dist/types/src/controllers/collection_registry.d.ts +45 -0
- package/dist/types/src/controllers/customization_controller.d.ts +60 -0
- package/dist/types/src/controllers/data.d.ts +168 -0
- package/dist/types/src/controllers/data_driver.d.ts +160 -0
- package/dist/types/src/controllers/database_admin.d.ts +11 -0
- package/dist/types/src/controllers/dialogs_controller.d.ts +36 -0
- package/dist/types/src/controllers/effective_role.d.ts +4 -0
- package/dist/types/src/controllers/email.d.ts +34 -0
- package/dist/types/src/controllers/index.d.ts +18 -0
- package/dist/types/src/controllers/local_config_persistence.d.ts +20 -0
- package/dist/types/src/controllers/navigation.d.ts +213 -0
- package/dist/types/src/controllers/registry.d.ts +54 -0
- package/dist/types/src/controllers/side_dialogs_controller.d.ts +67 -0
- package/dist/types/src/controllers/side_entity_controller.d.ts +90 -0
- package/dist/types/src/controllers/snackbar.d.ts +24 -0
- package/dist/types/src/controllers/storage.d.ts +171 -0
- package/dist/types/src/index.d.ts +4 -0
- package/dist/types/src/rebase_context.d.ts +105 -0
- package/dist/types/src/types/backend.d.ts +536 -0
- package/dist/types/src/types/builders.d.ts +15 -0
- package/dist/types/src/types/chips.d.ts +5 -0
- package/dist/types/src/types/collections.d.ts +856 -0
- package/dist/types/src/types/cron.d.ts +102 -0
- package/dist/types/src/types/data_source.d.ts +64 -0
- package/dist/types/src/types/entities.d.ts +145 -0
- package/dist/types/src/types/entity_actions.d.ts +98 -0
- package/dist/types/src/types/entity_callbacks.d.ts +173 -0
- package/dist/types/src/types/entity_link_builder.d.ts +7 -0
- package/dist/types/src/types/entity_overrides.d.ts +10 -0
- package/dist/types/src/types/entity_views.d.ts +61 -0
- package/dist/types/src/types/export_import.d.ts +21 -0
- package/dist/types/src/types/index.d.ts +23 -0
- package/dist/types/src/types/locales.d.ts +4 -0
- package/dist/types/src/types/modify_collections.d.ts +5 -0
- package/dist/types/src/types/plugins.d.ts +279 -0
- package/dist/types/src/types/properties.d.ts +1176 -0
- package/dist/types/src/types/property_config.d.ts +70 -0
- package/dist/types/src/types/relations.d.ts +336 -0
- package/dist/types/src/types/slots.d.ts +252 -0
- package/dist/types/src/types/translations.d.ts +870 -0
- package/dist/types/src/types/user_management_delegate.d.ts +121 -0
- package/dist/types/src/types/websockets.d.ts +78 -0
- package/dist/types/src/users/index.d.ts +2 -0
- package/dist/types/src/users/roles.d.ts +22 -0
- package/dist/types/src/users/user.d.ts +46 -0
- package/dist/ui/src/components/Alert.d.ts +12 -0
- package/dist/ui/src/components/Autocomplete.d.ts +21 -0
- package/dist/ui/src/components/Avatar.d.ts +11 -0
- package/dist/ui/src/components/Badge.d.ts +8 -0
- package/dist/ui/src/components/BooleanSwitch.d.ts +14 -0
- package/dist/ui/src/components/BooleanSwitchWithLabel.d.ts +17 -0
- package/dist/ui/src/components/Button.d.ts +14 -0
- package/dist/ui/src/components/Card.d.ts +9 -0
- package/dist/ui/src/components/CenteredView.d.ts +9 -0
- package/dist/ui/src/components/Checkbox.d.ts +13 -0
- package/dist/ui/src/components/Chip.d.ts +26 -0
- package/dist/ui/src/components/CircularProgress.d.ts +5 -0
- package/dist/ui/src/components/CircularProgressCenter.d.ts +11 -0
- package/dist/ui/src/components/Collapse.d.ts +9 -0
- package/dist/ui/src/components/ColorPicker.d.ts +30 -0
- package/dist/ui/src/components/Container.d.ts +8 -0
- package/dist/ui/src/components/DateTimeField.d.ts +24 -0
- package/dist/ui/src/components/DebouncedTextField.d.ts +2 -0
- package/dist/ui/src/components/Dialog.d.ts +39 -0
- package/dist/ui/src/components/DialogActions.d.ts +7 -0
- package/dist/ui/src/components/DialogContent.d.ts +7 -0
- package/dist/ui/src/components/DialogTitle.d.ts +10 -0
- package/dist/ui/src/components/ErrorBoundary.d.ts +11 -0
- package/dist/ui/src/components/ExpandablePanel.d.ts +12 -0
- package/dist/ui/src/components/FileUpload.d.ts +23 -0
- package/dist/ui/src/components/IconButton.d.ts +12 -0
- package/dist/ui/src/components/InfoLabel.d.ts +5 -0
- package/dist/ui/src/components/InputLabel.d.ts +11 -0
- package/dist/ui/src/components/Label.d.ts +7 -0
- package/dist/ui/src/components/LoadingButton.d.ts +7 -0
- package/dist/ui/src/components/Markdown.d.ts +10 -0
- package/dist/ui/src/components/Menu.d.ts +23 -0
- package/dist/ui/src/components/Menubar.d.ts +80 -0
- package/dist/ui/src/components/MultiSelect.d.ts +48 -0
- package/dist/ui/src/components/Paper.d.ts +6 -0
- package/dist/ui/src/components/Popover.d.ts +24 -0
- package/dist/ui/src/components/RadioGroup.d.ts +28 -0
- package/dist/ui/src/components/ResizablePanels.d.ts +18 -0
- package/dist/ui/src/components/SearchBar.d.ts +22 -0
- package/dist/ui/src/components/Select.d.ts +43 -0
- package/dist/ui/src/components/Separator.d.ts +5 -0
- package/dist/ui/src/components/Sheet.d.ts +22 -0
- package/dist/ui/src/components/Skeleton.d.ts +6 -0
- package/dist/ui/src/components/Slider.d.ts +21 -0
- package/dist/ui/src/components/Table.d.ts +34 -0
- package/dist/ui/src/components/Tabs.d.ts +19 -0
- package/dist/ui/src/components/TextField.d.ts +58 -0
- package/dist/ui/src/components/TextareaAutosize.d.ts +43 -0
- package/dist/ui/src/components/ToggleButtonGroup.d.ts +30 -0
- package/dist/ui/src/components/Tooltip.d.ts +19 -0
- package/dist/ui/src/components/Typography.d.ts +36 -0
- package/dist/ui/src/components/VirtualTable/VirtualTable.d.ts +11 -0
- package/dist/ui/src/components/VirtualTable/VirtualTableCell.d.ts +21 -0
- package/dist/ui/src/components/VirtualTable/VirtualTableHeader.d.ts +29 -0
- package/dist/ui/src/components/VirtualTable/VirtualTableHeaderRow.d.ts +2 -0
- package/dist/ui/src/components/VirtualTable/VirtualTableProps.d.ts +243 -0
- package/dist/ui/src/components/VirtualTable/VirtualTableRow.d.ts +3 -0
- package/dist/ui/src/components/VirtualTable/index.d.ts +3 -0
- package/dist/ui/src/components/VirtualTable/types.d.ts +38 -0
- package/dist/ui/src/components/common/SelectInputLabel.d.ts +5 -0
- package/dist/ui/src/components/index.d.ts +53 -0
- package/dist/ui/src/hooks/PortalContainerContext.d.ts +31 -0
- package/dist/ui/src/hooks/index.d.ts +6 -0
- package/dist/ui/src/hooks/useDebounceCallback.d.ts +1 -0
- package/dist/ui/src/hooks/useDebounceValue.d.ts +1 -0
- package/dist/ui/src/hooks/useDebouncedCallback.d.ts +1 -0
- package/dist/ui/src/hooks/useInjectStyles.d.ts +7 -0
- package/dist/ui/src/hooks/useOutsideAlerter.d.ts +5 -0
- package/dist/ui/src/icons/GitHubIcon.d.ts +2 -0
- package/dist/ui/src/icons/HandleIcon.d.ts +1 -0
- package/dist/ui/src/icons/Icon.d.ts +20 -0
- package/dist/ui/src/icons/cool_icon_keys.d.ts +1 -0
- package/dist/ui/src/icons/icon_keys.d.ts +1 -0
- package/dist/ui/src/icons/index.d.ts +6 -0
- package/dist/ui/src/index.d.ts +5 -0
- package/dist/ui/src/styles.d.ts +12 -0
- package/dist/ui/src/util/chip_colors.d.ts +4 -0
- package/dist/ui/src/util/cls.d.ts +2 -0
- package/dist/ui/src/util/debounce.d.ts +10 -0
- package/dist/ui/src/util/hash.d.ts +1 -0
- package/dist/ui/src/util/index.d.ts +4 -0
- package/dist/ui/src/util/key_to_icon_component.d.ts +1 -0
- package/package.json +84 -0
- package/src/components/ApiExplorer/ApiExplorer.tsx +290 -0
- package/src/components/ApiExplorer/EndpointDetail.tsx +271 -0
- package/src/components/ApiExplorer/TryItPanel.tsx +510 -0
- package/src/components/ApiExplorer/parseSpec.ts +104 -0
- package/src/components/ApiExplorer/types.ts +84 -0
- package/src/components/AuthSimulationSelector.tsx +77 -0
- package/src/components/Branches/BranchesView.tsx +370 -0
- package/src/components/CronJobs/CronJobsView.tsx +346 -0
- package/src/components/JSEditor/JSEditor.tsx +1033 -0
- package/src/components/JSEditor/JSEditorSidebar.tsx +340 -0
- package/src/components/JSEditor/JSMonacoEditor.tsx +390 -0
- package/src/components/RLSEditor/PolicyEditor.tsx +444 -0
- package/src/components/RLSEditor/RLSEditor.tsx +692 -0
- package/src/components/RLSEditor/index.ts +1 -0
- package/src/components/RebaseStudio.tsx +121 -0
- package/src/components/SQLEditor/ExplainVisualizer.tsx +128 -0
- package/src/components/SQLEditor/MonacoEditor.tsx +203 -0
- package/src/components/SQLEditor/SQLEditor.tsx +1419 -0
- package/src/components/SQLEditor/SQLEditorSidebar.tsx +174 -0
- package/src/components/SQLEditor/SchemaBrowser.tsx +158 -0
- package/src/components/SchemaVisualizer/RelationEdge.tsx +102 -0
- package/src/components/SchemaVisualizer/SchemaVisualizer.tsx +665 -0
- package/src/components/SchemaVisualizer/TableNode.tsx +257 -0
- package/src/components/SchemaVisualizer/index.ts +5 -0
- package/src/components/SchemaVisualizer/schema-visualizer.utils.ts +140 -0
- package/src/components/SchemaVisualizer/useSchemaGraph.ts +397 -0
- package/src/components/StorageView/StorageView.tsx +1035 -0
- package/src/components/StudioHomePage.tsx +357 -0
- package/src/index.ts +31 -0
- package/src/utils/entities.ts +2 -0
- package/src/utils/pgColumnToProperty.test.ts +401 -0
- package/src/utils/pgColumnToProperty.ts +275 -0
- package/src/utils/sql_utils.test.ts +265 -0
- package/src/utils/sql_utils.ts +291 -0
- package/src/vite-env.d.ts +1 -0
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,726 @@
|
|
|
1
|
+
import { useRebaseContext, useStudioBreadcrumbs, useRestoreScroll, useSlot, IconForView, useRebaseRegistryDispatch } from "@rebasepro/core";
|
|
2
|
+
import { StudioBridgeContext, StudioBridgeProvider, useStudioBreadcrumbs as useStudioBreadcrumbs2, useStudioCollectionRegistry, useStudioNavigationState, useStudioSideEntityController, useStudioUrlController } from "@rebasepro/core";
|
|
3
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
4
|
+
import React, { useEffect, lazy, useMemo, useLayoutEffect, Suspense } from "react";
|
|
5
|
+
import { Typography, Card, cls, iconSize, Container, CircularProgressCenter } from "@rebasepro/ui";
|
|
6
|
+
import { c } from "react-compiler-runtime";
|
|
7
|
+
import { ArrowRightIcon } from "lucide-react";
|
|
8
|
+
import { useNavigate } from "react-router-dom";
|
|
9
|
+
const SECTIONS = [{
|
|
10
|
+
label: "Database",
|
|
11
|
+
dotColor: "bg-emerald-400",
|
|
12
|
+
iconColor: "text-emerald-400",
|
|
13
|
+
tools: [{
|
|
14
|
+
path: "/schema",
|
|
15
|
+
name: "Collections",
|
|
16
|
+
description: "Define and manage your data model and collection schemas",
|
|
17
|
+
icon: "LayoutList"
|
|
18
|
+
}, {
|
|
19
|
+
path: "/schema-visualizer",
|
|
20
|
+
name: "Schema Visualizer",
|
|
21
|
+
description: "Interactive ERD showing tables, columns, and relationships",
|
|
22
|
+
icon: "Network"
|
|
23
|
+
}, {
|
|
24
|
+
path: "/sql",
|
|
25
|
+
name: "SQL Console",
|
|
26
|
+
description: "Execute raw SQL queries directly against your database",
|
|
27
|
+
icon: "terminal"
|
|
28
|
+
}, {
|
|
29
|
+
path: "/branches",
|
|
30
|
+
name: "Branches",
|
|
31
|
+
description: "Create and manage isolated database copies for development",
|
|
32
|
+
icon: "GitBranch"
|
|
33
|
+
}, {
|
|
34
|
+
path: "/rls",
|
|
35
|
+
name: "RLS Policies",
|
|
36
|
+
description: "Configure Row Level Security for fine-grained data access",
|
|
37
|
+
icon: "ShieldCheck"
|
|
38
|
+
}]
|
|
39
|
+
}, {
|
|
40
|
+
label: "Compute",
|
|
41
|
+
dotColor: "bg-blue-400",
|
|
42
|
+
iconColor: "text-blue-400",
|
|
43
|
+
tools: [{
|
|
44
|
+
path: "/js",
|
|
45
|
+
name: "JS Console",
|
|
46
|
+
description: "Run JavaScript with the Rebase SDK in a live sandbox",
|
|
47
|
+
icon: "code"
|
|
48
|
+
}, {
|
|
49
|
+
path: "/cron",
|
|
50
|
+
name: "Cron Jobs",
|
|
51
|
+
description: "Monitor and manage scheduled background tasks",
|
|
52
|
+
icon: "Clock"
|
|
53
|
+
}]
|
|
54
|
+
}, {
|
|
55
|
+
label: "API",
|
|
56
|
+
dotColor: "bg-violet-400",
|
|
57
|
+
iconColor: "text-violet-400",
|
|
58
|
+
tools: [{
|
|
59
|
+
path: "/api",
|
|
60
|
+
name: "API Explorer",
|
|
61
|
+
description: "Interactive API documentation with live request testing",
|
|
62
|
+
icon: "BookOpen"
|
|
63
|
+
}]
|
|
64
|
+
}, {
|
|
65
|
+
label: "Storage",
|
|
66
|
+
dotColor: "bg-amber-400",
|
|
67
|
+
iconColor: "text-amber-400",
|
|
68
|
+
tools: [{
|
|
69
|
+
path: "/storage",
|
|
70
|
+
name: "Storage",
|
|
71
|
+
description: "Browse, upload, and manage files in your storage bucket",
|
|
72
|
+
icon: "HardDrive"
|
|
73
|
+
}]
|
|
74
|
+
}, {
|
|
75
|
+
label: "Access Control",
|
|
76
|
+
dotColor: "bg-rose-400",
|
|
77
|
+
iconColor: "text-rose-400",
|
|
78
|
+
tools: [{
|
|
79
|
+
path: "/users",
|
|
80
|
+
name: "Users",
|
|
81
|
+
description: "Manage developers and assign roles in your workspace",
|
|
82
|
+
icon: "group"
|
|
83
|
+
}, {
|
|
84
|
+
path: "/roles",
|
|
85
|
+
name: "Roles",
|
|
86
|
+
description: "Create and configure fine-grained access permissions",
|
|
87
|
+
icon: "ShieldEllipsis"
|
|
88
|
+
}]
|
|
89
|
+
}];
|
|
90
|
+
function StudioHomePage(t0) {
|
|
91
|
+
const $ = c(29);
|
|
92
|
+
const {
|
|
93
|
+
additionalActions,
|
|
94
|
+
additionalChildrenStart,
|
|
95
|
+
additionalChildrenEnd,
|
|
96
|
+
sections
|
|
97
|
+
} = t0;
|
|
98
|
+
const context = useRebaseContext();
|
|
99
|
+
const breadcrumbs = useStudioBreadcrumbs();
|
|
100
|
+
const navigate = useNavigate();
|
|
101
|
+
let t1;
|
|
102
|
+
if ($[0] !== breadcrumbs) {
|
|
103
|
+
t1 = () => {
|
|
104
|
+
breadcrumbs.set({
|
|
105
|
+
breadcrumbs: []
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
$[0] = breadcrumbs;
|
|
109
|
+
$[1] = t1;
|
|
110
|
+
} else {
|
|
111
|
+
t1 = $[1];
|
|
112
|
+
}
|
|
113
|
+
let t2;
|
|
114
|
+
if ($[2] !== breadcrumbs.set) {
|
|
115
|
+
t2 = [breadcrumbs.set];
|
|
116
|
+
$[2] = breadcrumbs.set;
|
|
117
|
+
$[3] = t2;
|
|
118
|
+
} else {
|
|
119
|
+
t2 = $[3];
|
|
120
|
+
}
|
|
121
|
+
useEffect(t1, t2);
|
|
122
|
+
const {
|
|
123
|
+
containerRef
|
|
124
|
+
} = useRestoreScroll();
|
|
125
|
+
let t3;
|
|
126
|
+
if ($[4] !== context) {
|
|
127
|
+
t3 = {
|
|
128
|
+
context
|
|
129
|
+
};
|
|
130
|
+
$[4] = context;
|
|
131
|
+
$[5] = t3;
|
|
132
|
+
} else {
|
|
133
|
+
t3 = $[5];
|
|
134
|
+
}
|
|
135
|
+
const sectionProps = t3;
|
|
136
|
+
const pluginActions = useSlot("home.actions", sectionProps);
|
|
137
|
+
let t4;
|
|
138
|
+
if ($[6] !== additionalActions || $[7] !== pluginActions) {
|
|
139
|
+
t4 = (additionalActions || pluginActions) && /* @__PURE__ */ jsxs("div", { className: "w-full sticky py-4 transition-all duration-400 ease-in-out top-0 z-10 flex flex-row gap-4 justify-end", children: [
|
|
140
|
+
additionalActions,
|
|
141
|
+
pluginActions
|
|
142
|
+
] });
|
|
143
|
+
$[6] = additionalActions;
|
|
144
|
+
$[7] = pluginActions;
|
|
145
|
+
$[8] = t4;
|
|
146
|
+
} else {
|
|
147
|
+
t4 = $[8];
|
|
148
|
+
}
|
|
149
|
+
let t5;
|
|
150
|
+
if ($[9] !== context || $[10] !== navigate) {
|
|
151
|
+
t5 = SECTIONS.map((section) => /* @__PURE__ */ jsxs("section", { "aria-label": section.label, children: [
|
|
152
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", component: "h2", color: "secondary", className: "py-2 font-medium uppercase text-sm text-surface-600 dark:text-surface-400", children: section.label }),
|
|
153
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3 mt-2", children: section.tools.map((tool) => /* @__PURE__ */ jsx(Card, { onClick: () => {
|
|
154
|
+
navigate(tool.path);
|
|
155
|
+
context.analyticsController?.onAnalyticsEvent?.("home_navigate_to_view", {
|
|
156
|
+
path: tool.path
|
|
157
|
+
});
|
|
158
|
+
}, className: cls("h-full px-4 py-2.5 cursor-pointer transition-all duration-200 ease-in-out", "hover:-translate-y-0.5 hover:shadow-md hover:shadow-primary/5"), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-start h-full", children: [
|
|
159
|
+
/* @__PURE__ */ jsxs("div", { className: "grow w-full", children: [
|
|
160
|
+
/* @__PURE__ */ jsx("div", { className: cls("h-6 flex items-center", section.iconColor), children: /* @__PURE__ */ jsx(IconForView, { collectionOrView: {
|
|
161
|
+
slug: tool.path,
|
|
162
|
+
name: tool.name,
|
|
163
|
+
icon: tool.icon
|
|
164
|
+
}, size: "small" }) }),
|
|
165
|
+
/* @__PURE__ */ jsx(Typography, { gutterBottom: true, variant: "subtitle1", className: "mt-1 font-semibold", component: "h2", children: tool.name }),
|
|
166
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", component: "div", children: tool.description })
|
|
167
|
+
] }),
|
|
168
|
+
/* @__PURE__ */ jsx("div", { style: {
|
|
169
|
+
alignSelf: "flex-end"
|
|
170
|
+
}, children: /* @__PURE__ */ jsx("div", { className: "p-2", children: /* @__PURE__ */ jsx(ArrowRightIcon, { className: "text-primary", size: iconSize.small }) }) })
|
|
171
|
+
] }) }, tool.path)) })
|
|
172
|
+
] }, section.label));
|
|
173
|
+
$[9] = context;
|
|
174
|
+
$[10] = navigate;
|
|
175
|
+
$[11] = t5;
|
|
176
|
+
} else {
|
|
177
|
+
t5 = $[11];
|
|
178
|
+
}
|
|
179
|
+
let t6;
|
|
180
|
+
if ($[12] !== t5) {
|
|
181
|
+
t6 = /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-8 pt-2", children: t5 });
|
|
182
|
+
$[12] = t5;
|
|
183
|
+
$[13] = t6;
|
|
184
|
+
} else {
|
|
185
|
+
t6 = $[13];
|
|
186
|
+
}
|
|
187
|
+
let t7;
|
|
188
|
+
if ($[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
189
|
+
t7 = /* @__PURE__ */ jsx("div", { className: "flex items-center mb-1", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", component: "h2", color: "secondary", className: "py-2 font-medium uppercase text-sm text-surface-600 dark:text-surface-400", children: "Quick Start" }) });
|
|
190
|
+
$[14] = t7;
|
|
191
|
+
} else {
|
|
192
|
+
t7 = $[14];
|
|
193
|
+
}
|
|
194
|
+
let t8;
|
|
195
|
+
if ($[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
196
|
+
t8 = /* @__PURE__ */ jsxs(Typography, { variant: "body2", color: "secondary", className: "mb-4 max-w-2xl", children: [
|
|
197
|
+
"Generate a fully-typed SDK from your collections with",
|
|
198
|
+
" ",
|
|
199
|
+
/* @__PURE__ */ jsx("code", { className: "text-emerald-400 font-mono text-xs bg-emerald-400/10 px-1.5 py-0.5 rounded", children: "npx rebase generate-sdk" }),
|
|
200
|
+
" ",
|
|
201
|
+
"and start querying your data with full TypeScript autocompletion."
|
|
202
|
+
] });
|
|
203
|
+
$[15] = t8;
|
|
204
|
+
} else {
|
|
205
|
+
t8 = $[15];
|
|
206
|
+
}
|
|
207
|
+
let t9;
|
|
208
|
+
if ($[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
209
|
+
t9 = /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-4 py-2.5 border-b border-surface-200/40 dark:border-surface-700/40 bg-surface-50 dark:bg-surface-900/80", children: [
|
|
210
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5", children: [
|
|
211
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-1.5", children: [
|
|
212
|
+
/* @__PURE__ */ jsx("span", { className: "w-2.5 h-2.5 rounded-full bg-red-400/60" }),
|
|
213
|
+
/* @__PURE__ */ jsx("span", { className: "w-2.5 h-2.5 rounded-full bg-amber-400/60" }),
|
|
214
|
+
/* @__PURE__ */ jsx("span", { className: "w-2.5 h-2.5 rounded-full bg-emerald-400/60" })
|
|
215
|
+
] }),
|
|
216
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs font-mono text-surface-400 dark:text-surface-500 ml-1", children: "app.ts" })
|
|
217
|
+
] }),
|
|
218
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs font-mono text-surface-400 dark:text-surface-500", children: "TypeScript" })
|
|
219
|
+
] });
|
|
220
|
+
$[16] = t9;
|
|
221
|
+
} else {
|
|
222
|
+
t9 = $[16];
|
|
223
|
+
}
|
|
224
|
+
let t10;
|
|
225
|
+
if ($[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
226
|
+
t10 = /* @__PURE__ */ jsxs("div", { className: "mt-10 mb-6", children: [
|
|
227
|
+
t7,
|
|
228
|
+
t8,
|
|
229
|
+
/* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-surface-200/40 dark:border-surface-700/40 bg-white dark:bg-surface-950 overflow-hidden", children: [
|
|
230
|
+
t9,
|
|
231
|
+
/* @__PURE__ */ jsx("div", { className: "px-5 py-4 overflow-x-auto text-[13px] leading-6 font-mono", children: /* @__PURE__ */ jsx(SyntaxHighlightedSnippet, {}) })
|
|
232
|
+
] })
|
|
233
|
+
] });
|
|
234
|
+
$[17] = t10;
|
|
235
|
+
} else {
|
|
236
|
+
t10 = $[17];
|
|
237
|
+
}
|
|
238
|
+
let t11;
|
|
239
|
+
if ($[18] !== sections) {
|
|
240
|
+
t11 = sections?.map(_temp);
|
|
241
|
+
$[18] = sections;
|
|
242
|
+
$[19] = t11;
|
|
243
|
+
} else {
|
|
244
|
+
t11 = $[19];
|
|
245
|
+
}
|
|
246
|
+
let t12;
|
|
247
|
+
if ($[20] !== additionalChildrenEnd || $[21] !== additionalChildrenStart || $[22] !== t11 || $[23] !== t4 || $[24] !== t6) {
|
|
248
|
+
t12 = /* @__PURE__ */ jsxs(Container, { maxWidth: "6xl", children: [
|
|
249
|
+
t4,
|
|
250
|
+
additionalChildrenStart,
|
|
251
|
+
t6,
|
|
252
|
+
t10,
|
|
253
|
+
t11,
|
|
254
|
+
additionalChildrenEnd
|
|
255
|
+
] });
|
|
256
|
+
$[20] = additionalChildrenEnd;
|
|
257
|
+
$[21] = additionalChildrenStart;
|
|
258
|
+
$[22] = t11;
|
|
259
|
+
$[23] = t4;
|
|
260
|
+
$[24] = t6;
|
|
261
|
+
$[25] = t12;
|
|
262
|
+
} else {
|
|
263
|
+
t12 = $[25];
|
|
264
|
+
}
|
|
265
|
+
let t13;
|
|
266
|
+
if ($[26] !== containerRef || $[27] !== t12) {
|
|
267
|
+
t13 = /* @__PURE__ */ jsx("div", { ref: containerRef, className: "py-2 overflow-auto h-full w-full", children: t12 });
|
|
268
|
+
$[26] = containerRef;
|
|
269
|
+
$[27] = t12;
|
|
270
|
+
$[28] = t13;
|
|
271
|
+
} else {
|
|
272
|
+
t13 = $[28];
|
|
273
|
+
}
|
|
274
|
+
return t13;
|
|
275
|
+
}
|
|
276
|
+
function _temp(s) {
|
|
277
|
+
return /* @__PURE__ */ jsxs("div", { className: "my-10", children: [
|
|
278
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", component: "h2", color: "secondary", className: "p-4 py-2 rounded font-medium uppercase text-sm text-surface-600 dark:text-surface-400", children: s.title }),
|
|
279
|
+
/* @__PURE__ */ jsx("div", { className: "mt-4", children: s.children })
|
|
280
|
+
] }, s.key);
|
|
281
|
+
}
|
|
282
|
+
function SyntaxHighlightedSnippet() {
|
|
283
|
+
const $ = c(50);
|
|
284
|
+
let t0;
|
|
285
|
+
let t1;
|
|
286
|
+
let t2;
|
|
287
|
+
let t3;
|
|
288
|
+
let t4;
|
|
289
|
+
let t5;
|
|
290
|
+
let t6;
|
|
291
|
+
let t7;
|
|
292
|
+
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
293
|
+
t0 = /* @__PURE__ */ jsx("span", { className: "text-violet-600 dark:text-violet-400", children: "import" });
|
|
294
|
+
t1 = /* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: " { " });
|
|
295
|
+
t2 = /* @__PURE__ */ jsx("span", { className: "text-blue-600 dark:text-blue-400", children: "createRebaseClient" });
|
|
296
|
+
t3 = /* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: " } " });
|
|
297
|
+
t4 = /* @__PURE__ */ jsx("span", { className: "text-violet-600 dark:text-violet-400", children: "from" });
|
|
298
|
+
t5 = /* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: " " });
|
|
299
|
+
t6 = /* @__PURE__ */ jsx("span", { className: "text-emerald-600 dark:text-emerald-400", children: "'@rebasepro/client'" });
|
|
300
|
+
t7 = /* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400", children: ";" });
|
|
301
|
+
$[0] = t0;
|
|
302
|
+
$[1] = t1;
|
|
303
|
+
$[2] = t2;
|
|
304
|
+
$[3] = t3;
|
|
305
|
+
$[4] = t4;
|
|
306
|
+
$[5] = t5;
|
|
307
|
+
$[6] = t6;
|
|
308
|
+
$[7] = t7;
|
|
309
|
+
} else {
|
|
310
|
+
t0 = $[0];
|
|
311
|
+
t1 = $[1];
|
|
312
|
+
t2 = $[2];
|
|
313
|
+
t3 = $[3];
|
|
314
|
+
t4 = $[4];
|
|
315
|
+
t5 = $[5];
|
|
316
|
+
t6 = $[6];
|
|
317
|
+
t7 = $[7];
|
|
318
|
+
}
|
|
319
|
+
let t10;
|
|
320
|
+
let t11;
|
|
321
|
+
let t12;
|
|
322
|
+
let t13;
|
|
323
|
+
let t14;
|
|
324
|
+
let t15;
|
|
325
|
+
let t16;
|
|
326
|
+
let t17;
|
|
327
|
+
let t8;
|
|
328
|
+
let t9;
|
|
329
|
+
if ($[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
330
|
+
t8 = /* @__PURE__ */ jsx("span", { className: "text-violet-600 dark:text-violet-400", children: "import" });
|
|
331
|
+
t9 = /* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: " " });
|
|
332
|
+
t10 = /* @__PURE__ */ jsx("span", { className: "text-violet-600 dark:text-violet-400", children: "type" });
|
|
333
|
+
t11 = /* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: " { " });
|
|
334
|
+
t12 = /* @__PURE__ */ jsx("span", { className: "text-amber-600 dark:text-amber-300", children: "Database" });
|
|
335
|
+
t13 = /* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: " } " });
|
|
336
|
+
t14 = /* @__PURE__ */ jsx("span", { className: "text-violet-600 dark:text-violet-400", children: "from" });
|
|
337
|
+
t15 = /* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: " " });
|
|
338
|
+
t16 = /* @__PURE__ */ jsx("span", { className: "text-emerald-600 dark:text-emerald-400", children: "'./database.types'" });
|
|
339
|
+
t17 = /* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400", children: ";" });
|
|
340
|
+
$[8] = t10;
|
|
341
|
+
$[9] = t11;
|
|
342
|
+
$[10] = t12;
|
|
343
|
+
$[11] = t13;
|
|
344
|
+
$[12] = t14;
|
|
345
|
+
$[13] = t15;
|
|
346
|
+
$[14] = t16;
|
|
347
|
+
$[15] = t17;
|
|
348
|
+
$[16] = t8;
|
|
349
|
+
$[17] = t9;
|
|
350
|
+
} else {
|
|
351
|
+
t10 = $[8];
|
|
352
|
+
t11 = $[9];
|
|
353
|
+
t12 = $[10];
|
|
354
|
+
t13 = $[11];
|
|
355
|
+
t14 = $[12];
|
|
356
|
+
t15 = $[13];
|
|
357
|
+
t16 = $[14];
|
|
358
|
+
t17 = $[15];
|
|
359
|
+
t8 = $[16];
|
|
360
|
+
t9 = $[17];
|
|
361
|
+
}
|
|
362
|
+
let t18;
|
|
363
|
+
let t19;
|
|
364
|
+
let t20;
|
|
365
|
+
let t21;
|
|
366
|
+
let t22;
|
|
367
|
+
let t23;
|
|
368
|
+
let t24;
|
|
369
|
+
let t25;
|
|
370
|
+
if ($[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
371
|
+
t18 = /* @__PURE__ */ jsx("span", { className: "text-violet-600 dark:text-violet-400", children: "const" });
|
|
372
|
+
t19 = /* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: " rebase " });
|
|
373
|
+
t20 = /* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400", children: "= " });
|
|
374
|
+
t21 = /* @__PURE__ */ jsx("span", { className: "text-blue-600 dark:text-blue-400", children: "createRebaseClient" });
|
|
375
|
+
t22 = /* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400", children: "<" });
|
|
376
|
+
t23 = /* @__PURE__ */ jsx("span", { className: "text-amber-600 dark:text-amber-300", children: "Database" });
|
|
377
|
+
t24 = /* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400", children: ">(" });
|
|
378
|
+
t25 = /* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: "{" });
|
|
379
|
+
$[18] = t18;
|
|
380
|
+
$[19] = t19;
|
|
381
|
+
$[20] = t20;
|
|
382
|
+
$[21] = t21;
|
|
383
|
+
$[22] = t22;
|
|
384
|
+
$[23] = t23;
|
|
385
|
+
$[24] = t24;
|
|
386
|
+
$[25] = t25;
|
|
387
|
+
} else {
|
|
388
|
+
t18 = $[18];
|
|
389
|
+
t19 = $[19];
|
|
390
|
+
t20 = $[20];
|
|
391
|
+
t21 = $[21];
|
|
392
|
+
t22 = $[22];
|
|
393
|
+
t23 = $[23];
|
|
394
|
+
t24 = $[24];
|
|
395
|
+
t25 = $[25];
|
|
396
|
+
}
|
|
397
|
+
let t26;
|
|
398
|
+
let t27;
|
|
399
|
+
let t28;
|
|
400
|
+
let t29;
|
|
401
|
+
if ($[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
402
|
+
t26 = /* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: " baseUrl" });
|
|
403
|
+
t27 = /* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400", children: ": " });
|
|
404
|
+
t28 = /* @__PURE__ */ jsx("span", { className: "text-emerald-600 dark:text-emerald-400", children: "'http://localhost:3001'" });
|
|
405
|
+
t29 = /* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400", children: "," });
|
|
406
|
+
$[26] = t26;
|
|
407
|
+
$[27] = t27;
|
|
408
|
+
$[28] = t28;
|
|
409
|
+
$[29] = t29;
|
|
410
|
+
} else {
|
|
411
|
+
t26 = $[26];
|
|
412
|
+
t27 = $[27];
|
|
413
|
+
t28 = $[28];
|
|
414
|
+
t29 = $[29];
|
|
415
|
+
}
|
|
416
|
+
let t30;
|
|
417
|
+
let t31;
|
|
418
|
+
if ($[30] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
419
|
+
t30 = /* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: "}" });
|
|
420
|
+
t31 = /* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400", children: ");" });
|
|
421
|
+
$[30] = t30;
|
|
422
|
+
$[31] = t31;
|
|
423
|
+
} else {
|
|
424
|
+
t30 = $[30];
|
|
425
|
+
t31 = $[31];
|
|
426
|
+
}
|
|
427
|
+
let t32;
|
|
428
|
+
if ($[32] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
429
|
+
t32 = /* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400 italic", children: "// Fully typed — autocompletion for tables and columns" });
|
|
430
|
+
$[32] = t32;
|
|
431
|
+
} else {
|
|
432
|
+
t32 = $[32];
|
|
433
|
+
}
|
|
434
|
+
let t33;
|
|
435
|
+
let t34;
|
|
436
|
+
let t35;
|
|
437
|
+
let t36;
|
|
438
|
+
let t37;
|
|
439
|
+
let t38;
|
|
440
|
+
let t39;
|
|
441
|
+
let t40;
|
|
442
|
+
let t41;
|
|
443
|
+
let t42;
|
|
444
|
+
let t43;
|
|
445
|
+
let t44;
|
|
446
|
+
let t45;
|
|
447
|
+
let t46;
|
|
448
|
+
let t47;
|
|
449
|
+
let t48;
|
|
450
|
+
if ($[33] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
451
|
+
t33 = /* @__PURE__ */ jsx("span", { className: "text-violet-600 dark:text-violet-400", children: "const" });
|
|
452
|
+
t34 = /* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: " { " });
|
|
453
|
+
t35 = /* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: "data" });
|
|
454
|
+
t36 = /* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400", children: ": " });
|
|
455
|
+
t37 = /* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: "users" });
|
|
456
|
+
t38 = /* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: " } " });
|
|
457
|
+
t39 = /* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400", children: "= " });
|
|
458
|
+
t40 = /* @__PURE__ */ jsx("span", { className: "text-violet-600 dark:text-violet-400", children: "await" });
|
|
459
|
+
t41 = /* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: " rebase" });
|
|
460
|
+
t42 = /* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400", children: "." });
|
|
461
|
+
t43 = /* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: "data" });
|
|
462
|
+
t44 = /* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400", children: "." });
|
|
463
|
+
t45 = /* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: "users" });
|
|
464
|
+
t46 = /* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400", children: "." });
|
|
465
|
+
t47 = /* @__PURE__ */ jsx("span", { className: "text-blue-600 dark:text-blue-400", children: "find" });
|
|
466
|
+
t48 = /* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400", children: "();" });
|
|
467
|
+
$[33] = t33;
|
|
468
|
+
$[34] = t34;
|
|
469
|
+
$[35] = t35;
|
|
470
|
+
$[36] = t36;
|
|
471
|
+
$[37] = t37;
|
|
472
|
+
$[38] = t38;
|
|
473
|
+
$[39] = t39;
|
|
474
|
+
$[40] = t40;
|
|
475
|
+
$[41] = t41;
|
|
476
|
+
$[42] = t42;
|
|
477
|
+
$[43] = t43;
|
|
478
|
+
$[44] = t44;
|
|
479
|
+
$[45] = t45;
|
|
480
|
+
$[46] = t46;
|
|
481
|
+
$[47] = t47;
|
|
482
|
+
$[48] = t48;
|
|
483
|
+
} else {
|
|
484
|
+
t33 = $[33];
|
|
485
|
+
t34 = $[34];
|
|
486
|
+
t35 = $[35];
|
|
487
|
+
t36 = $[36];
|
|
488
|
+
t37 = $[37];
|
|
489
|
+
t38 = $[38];
|
|
490
|
+
t39 = $[39];
|
|
491
|
+
t40 = $[40];
|
|
492
|
+
t41 = $[41];
|
|
493
|
+
t42 = $[42];
|
|
494
|
+
t43 = $[43];
|
|
495
|
+
t44 = $[44];
|
|
496
|
+
t45 = $[45];
|
|
497
|
+
t46 = $[46];
|
|
498
|
+
t47 = $[47];
|
|
499
|
+
t48 = $[48];
|
|
500
|
+
}
|
|
501
|
+
let t49;
|
|
502
|
+
if ($[49] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
503
|
+
t49 = /* @__PURE__ */ jsxs("pre", { className: "m-0 whitespace-pre", children: [
|
|
504
|
+
t0,
|
|
505
|
+
t1,
|
|
506
|
+
t2,
|
|
507
|
+
t3,
|
|
508
|
+
t4,
|
|
509
|
+
t5,
|
|
510
|
+
t6,
|
|
511
|
+
t7,
|
|
512
|
+
"\n",
|
|
513
|
+
t8,
|
|
514
|
+
t9,
|
|
515
|
+
t10,
|
|
516
|
+
t11,
|
|
517
|
+
t12,
|
|
518
|
+
t13,
|
|
519
|
+
t14,
|
|
520
|
+
t15,
|
|
521
|
+
t16,
|
|
522
|
+
t17,
|
|
523
|
+
"\n\n",
|
|
524
|
+
t18,
|
|
525
|
+
t19,
|
|
526
|
+
t20,
|
|
527
|
+
t21,
|
|
528
|
+
t22,
|
|
529
|
+
t23,
|
|
530
|
+
t24,
|
|
531
|
+
t25,
|
|
532
|
+
"\n",
|
|
533
|
+
t26,
|
|
534
|
+
t27,
|
|
535
|
+
t28,
|
|
536
|
+
t29,
|
|
537
|
+
"\n",
|
|
538
|
+
t30,
|
|
539
|
+
t31,
|
|
540
|
+
"\n\n",
|
|
541
|
+
t32,
|
|
542
|
+
"\n",
|
|
543
|
+
t33,
|
|
544
|
+
t34,
|
|
545
|
+
t35,
|
|
546
|
+
t36,
|
|
547
|
+
t37,
|
|
548
|
+
t38,
|
|
549
|
+
t39,
|
|
550
|
+
t40,
|
|
551
|
+
t41,
|
|
552
|
+
t42,
|
|
553
|
+
t43,
|
|
554
|
+
t44,
|
|
555
|
+
t45,
|
|
556
|
+
t46,
|
|
557
|
+
t47,
|
|
558
|
+
t48,
|
|
559
|
+
"\n",
|
|
560
|
+
/* @__PURE__ */ jsx("span", { className: "text-violet-600 dark:text-violet-400", children: "const" }),
|
|
561
|
+
/* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: " { " }),
|
|
562
|
+
/* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: "data" }),
|
|
563
|
+
/* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400", children: ": " }),
|
|
564
|
+
/* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: "posts" }),
|
|
565
|
+
/* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: " } " }),
|
|
566
|
+
/* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400", children: "= " }),
|
|
567
|
+
/* @__PURE__ */ jsx("span", { className: "text-violet-600 dark:text-violet-400", children: "await" }),
|
|
568
|
+
/* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: " rebase" }),
|
|
569
|
+
/* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400", children: "." }),
|
|
570
|
+
/* @__PURE__ */ jsx("span", { className: "text-surface-950 dark:text-surface-200", children: "data" }),
|
|
571
|
+
/* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400", children: "." }),
|
|
572
|
+
/* @__PURE__ */ jsx("span", { className: "text-blue-600 dark:text-blue-400", children: "collection" }),
|
|
573
|
+
/* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400", children: "(" }),
|
|
574
|
+
/* @__PURE__ */ jsx("span", { className: "text-emerald-600 dark:text-emerald-400", children: "'posts'" }),
|
|
575
|
+
/* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400", children: ")" }),
|
|
576
|
+
/* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400", children: "." }),
|
|
577
|
+
/* @__PURE__ */ jsx("span", { className: "text-blue-600 dark:text-blue-400", children: "find" }),
|
|
578
|
+
/* @__PURE__ */ jsx("span", { className: "text-surface-500 dark:text-surface-400", children: "();" })
|
|
579
|
+
] });
|
|
580
|
+
$[49] = t49;
|
|
581
|
+
} else {
|
|
582
|
+
t49 = $[49];
|
|
583
|
+
}
|
|
584
|
+
return t49;
|
|
585
|
+
}
|
|
586
|
+
const SQLEditor = lazy(() => import("./SQLEditor-CkVx9vgr.js").then((m) => ({
|
|
587
|
+
default: m.SQLEditor
|
|
588
|
+
})));
|
|
589
|
+
const JSEditor = lazy(() => import("./JSEditor-D8nVp3Lp.js").then((m) => ({
|
|
590
|
+
default: m.JSEditor
|
|
591
|
+
})));
|
|
592
|
+
const RLSEditor = lazy(() => import("./RLSEditor-DBH09u9v.js").then((m) => ({
|
|
593
|
+
default: m.RLSEditor
|
|
594
|
+
})));
|
|
595
|
+
const StorageView = lazy(() => import("./StorageView-CTqGFhY9.js").then((m) => ({
|
|
596
|
+
default: m.StorageView
|
|
597
|
+
})));
|
|
598
|
+
const CronJobsView = lazy(() => import("./CronJobsView-CijCToeK.js").then((m) => ({
|
|
599
|
+
default: m.CronJobsView
|
|
600
|
+
})));
|
|
601
|
+
const SchemaVisualizer = lazy(() => import("./SchemaVisualizer-BgD5Zb77.js").then((m) => ({
|
|
602
|
+
default: m.SchemaVisualizer
|
|
603
|
+
})));
|
|
604
|
+
const BranchesView = lazy(() => import("./BranchesView-DcHZtvXo.js").then((m) => ({
|
|
605
|
+
default: m.BranchesView
|
|
606
|
+
})));
|
|
607
|
+
const ApiExplorer = lazy(() => import("./ApiExplorer-gMJt5JrS.js").then((m) => ({
|
|
608
|
+
default: m.ApiExplorer
|
|
609
|
+
})));
|
|
610
|
+
const DEFAULT_HOME_PAGE = /* @__PURE__ */ jsx(StudioHomePage, {});
|
|
611
|
+
function RebaseStudio({
|
|
612
|
+
tools,
|
|
613
|
+
homePage
|
|
614
|
+
}) {
|
|
615
|
+
const dispatch = useRebaseRegistryDispatch();
|
|
616
|
+
const resolvedHomePage = homePage ?? DEFAULT_HOME_PAGE;
|
|
617
|
+
const devViews = useMemo(() => {
|
|
618
|
+
const views = [];
|
|
619
|
+
const activeTools = tools ?? ["sql", "js", "rls", "storage", "cron", "schema-visualizer", "branches", "api"];
|
|
620
|
+
const suspense = (el) => /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(CircularProgressCenter, {}), children: el });
|
|
621
|
+
if (activeTools.includes("sql")) {
|
|
622
|
+
views.push({
|
|
623
|
+
slug: "sql",
|
|
624
|
+
name: "SQL Console",
|
|
625
|
+
group: "Database",
|
|
626
|
+
icon: "terminal",
|
|
627
|
+
description: "Execute SQL queries",
|
|
628
|
+
view: suspense(/* @__PURE__ */ jsx(SQLEditor, {}))
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
if (activeTools.includes("js")) {
|
|
632
|
+
views.push({
|
|
633
|
+
slug: "js",
|
|
634
|
+
name: "JS Console",
|
|
635
|
+
group: "Compute",
|
|
636
|
+
icon: "code",
|
|
637
|
+
description: "Execute JavaScript",
|
|
638
|
+
view: suspense(/* @__PURE__ */ jsx(JSEditor, {}))
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
if (activeTools.includes("rls")) {
|
|
642
|
+
views.push({
|
|
643
|
+
slug: "rls",
|
|
644
|
+
name: "RLS Policies",
|
|
645
|
+
group: "Database",
|
|
646
|
+
icon: "ShieldCheck",
|
|
647
|
+
description: "Row Level Security",
|
|
648
|
+
view: suspense(/* @__PURE__ */ jsx(RLSEditor, {}))
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
if (activeTools.includes("storage")) {
|
|
652
|
+
views.push({
|
|
653
|
+
slug: "storage",
|
|
654
|
+
name: "Storage",
|
|
655
|
+
group: "Storage",
|
|
656
|
+
icon: "HardDrive",
|
|
657
|
+
description: "Manage storage files",
|
|
658
|
+
view: suspense(/* @__PURE__ */ jsx(StorageView, {}))
|
|
659
|
+
});
|
|
660
|
+
}
|
|
661
|
+
if (activeTools.includes("cron")) {
|
|
662
|
+
views.push({
|
|
663
|
+
slug: "cron",
|
|
664
|
+
name: "Cron Jobs",
|
|
665
|
+
group: "Compute",
|
|
666
|
+
icon: "Clock",
|
|
667
|
+
description: "Manage scheduled tasks",
|
|
668
|
+
view: suspense(/* @__PURE__ */ jsx(CronJobsView, {}))
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
if (activeTools.includes("schema-visualizer")) {
|
|
672
|
+
views.push({
|
|
673
|
+
slug: "schema-visualizer",
|
|
674
|
+
name: "Schema Visualizer",
|
|
675
|
+
group: "Database",
|
|
676
|
+
icon: "Network",
|
|
677
|
+
description: "Interactive database ERD",
|
|
678
|
+
view: suspense(/* @__PURE__ */ jsx(SchemaVisualizer, {}))
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
if (activeTools.includes("branches")) {
|
|
682
|
+
views.push({
|
|
683
|
+
slug: "branches",
|
|
684
|
+
name: "Branches",
|
|
685
|
+
group: "Database",
|
|
686
|
+
icon: "GitBranch",
|
|
687
|
+
description: "Create and manage database branches",
|
|
688
|
+
view: suspense(/* @__PURE__ */ jsx(BranchesView, {}))
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
if (activeTools.includes("api")) {
|
|
692
|
+
views.push({
|
|
693
|
+
slug: "api",
|
|
694
|
+
name: "API Explorer",
|
|
695
|
+
group: "API",
|
|
696
|
+
icon: "BookOpen",
|
|
697
|
+
description: "Interactive API documentation and testing",
|
|
698
|
+
view: suspense(/* @__PURE__ */ jsx(ApiExplorer, {}))
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
return views;
|
|
702
|
+
}, [tools]);
|
|
703
|
+
const homePageRef = React.useRef(resolvedHomePage);
|
|
704
|
+
homePageRef.current = resolvedHomePage;
|
|
705
|
+
useLayoutEffect(() => {
|
|
706
|
+
dispatch.registerStudio({
|
|
707
|
+
tools,
|
|
708
|
+
homePage: homePageRef.current,
|
|
709
|
+
devViews
|
|
710
|
+
});
|
|
711
|
+
return () => dispatch.unregisterStudio();
|
|
712
|
+
}, [dispatch, tools, devViews]);
|
|
713
|
+
return null;
|
|
714
|
+
}
|
|
715
|
+
export {
|
|
716
|
+
RebaseStudio,
|
|
717
|
+
StudioBridgeContext,
|
|
718
|
+
StudioBridgeProvider,
|
|
719
|
+
StudioHomePage,
|
|
720
|
+
useStudioBreadcrumbs2 as useStudioBreadcrumbs,
|
|
721
|
+
useStudioCollectionRegistry,
|
|
722
|
+
useStudioNavigationState,
|
|
723
|
+
useStudioSideEntityController,
|
|
724
|
+
useStudioUrlController
|
|
725
|
+
};
|
|
726
|
+
//# sourceMappingURL=index.es.js.map
|