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