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