@powerhousedao/connect 6.0.0-dev.104 → 6.0.0-dev.106
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/dist/AddDriveModal-7rTpxYpu.js +84 -0
- package/dist/AddDriveModal-7rTpxYpu.js.map +1 -0
- package/dist/ClearStorageModal-DipDBfNw.js +44 -0
- package/dist/ClearStorageModal-DipDBfNw.js.map +1 -0
- package/dist/CookiesPolicyModal-Gae1QuhA.js +30 -0
- package/dist/CookiesPolicyModal-Gae1QuhA.js.map +1 -0
- package/dist/CreateDocumentModal-5i6rmv3C.js +28 -0
- package/dist/CreateDocumentModal-5i6rmv3C.js.map +1 -0
- package/dist/DebugSettingsModal-BDtsGB5P.js +289 -0
- package/dist/DebugSettingsModal-BDtsGB5P.js.map +1 -0
- package/dist/DeleteDriveModal-BbAx_yXt.js +40 -0
- package/dist/DeleteDriveModal-BbAx_yXt.js.map +1 -0
- package/dist/DeleteItemModal-CkWegLlh.js +39 -0
- package/dist/DeleteItemModal-CkWegLlh.js.map +1 -0
- package/dist/DisclaimerModal-CCnvwoB5.js +21 -0
- package/dist/DisclaimerModal-CCnvwoB5.js.map +1 -0
- package/dist/DriveSettingsModal-DxMjOsLg.js +45 -0
- package/dist/DriveSettingsModal-DxMjOsLg.js.map +1 -0
- package/dist/ExportDocumentWithErrorsModal-hgliF8Gy.js +41 -0
- package/dist/ExportDocumentWithErrorsModal-hgliF8Gy.js.map +1 -0
- package/dist/InspectorModal-C4rE0Y5E.js +302 -0
- package/dist/InspectorModal-C4rE0Y5E.js.map +1 -0
- package/dist/MissingPackageModal-BOeTH4V6.js +33 -0
- package/dist/MissingPackageModal-BOeTH4V6.js.map +1 -0
- package/dist/SettingsModal-DdBhkUvH.js +153 -0
- package/dist/SettingsModal-DdBhkUvH.js.map +1 -0
- package/dist/UpgradeDriveModal-DldcNCaT.js +31 -0
- package/dist/UpgradeDriveModal-DldcNCaT.js.map +1 -0
- package/dist/connect.config-CUbxYkCy.js +140 -0
- package/dist/connect.config-CUbxYkCy.js.map +1 -0
- package/dist/i18n-Ch408v5-.js +125 -0
- package/dist/i18n-Ch408v5-.js.map +1 -0
- package/dist/load-C7EmGD3a.js +105 -0
- package/dist/load-C7EmGD3a.js.map +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +9 -0
- package/dist/main.js.map +1 -0
- package/dist/package-b3lpvc8u.js +110 -0
- package/dist/package-b3lpvc8u.js.map +1 -0
- package/dist/pglite.worker.d.ts +1 -0
- package/dist/pglite.worker.js +15 -0
- package/dist/pglite.worker.js.map +1 -0
- package/dist/reactor-0MsEThFh.js +565 -0
- package/dist/reactor-0MsEThFh.js.map +1 -0
- package/dist/registerServiceWorker-fSbJUcrq.js +76 -0
- package/dist/registerServiceWorker-fSbJUcrq.js.map +1 -0
- package/dist/sidebar-AZ4xvZzG.js +1173 -0
- package/dist/sidebar-AZ4xvZzG.js.map +1 -0
- package/dist/start-connect.d.ts +7 -0
- package/dist/start-connect.d.ts.map +1 -0
- package/dist/start-connect.js +14 -0
- package/dist/start-connect.js.map +1 -0
- package/dist/style.css +872 -12
- package/dist/toast-iD-70hL8.js +16 -0
- package/dist/toast-iD-70hL8.js.map +1 -0
- package/dist/useRegistryPackages-Ctlhv061.js +96 -0
- package/dist/useRegistryPackages-Ctlhv061.js.map +1 -0
- package/package.json +36 -48
- package/dist/bundle.d.ts +0 -2
- package/dist/bundle.d.ts.map +0 -1
- package/dist/bundle.js +0 -48
- package/dist/bundle.js.map +0 -1
- package/dist/cypress/e2e/navigation.cy.d.ts +0 -2
- package/dist/cypress/e2e/navigation.cy.d.ts.map +0 -1
- package/dist/cypress/e2e/navigation.cy.js +0 -221
- package/dist/cypress/e2e/navigation.cy.js.map +0 -1
- package/dist/cypress/e2e/utils/index.d.ts +0 -15
- package/dist/cypress/e2e/utils/index.d.ts.map +0 -1
- package/dist/cypress/e2e/utils/index.js +0 -121
- package/dist/cypress/e2e/utils/index.js.map +0 -1
- package/dist/cypress/support/commands.d.ts +0 -2
- package/dist/cypress/support/commands.d.ts.map +0 -1
- package/dist/cypress/support/commands.js +0 -29
- package/dist/cypress/support/commands.js.map +0 -1
- package/dist/cypress/support/e2e.d.ts +0 -2
- package/dist/cypress/support/e2e.d.ts.map +0 -1
- package/dist/cypress/support/e2e.js +0 -19
- package/dist/cypress/support/e2e.js.map +0 -1
- package/dist/cypress.config.d.ts +0 -3
- package/dist/cypress.config.d.ts.map +0 -1
- package/dist/cypress.config.js +0 -15
- package/dist/cypress.config.js.map +0 -1
- package/dist/package.copy.json +0 -121
- package/dist/scripts/render-skeleton.d.ts +0 -2
- package/dist/scripts/render-skeleton.d.ts.map +0 -1
- package/dist/scripts/render-skeleton.js +0 -11
- package/dist/scripts/render-skeleton.js.map +0 -1
- package/dist/src/components/analytics.d.ts +0 -8
- package/dist/src/components/analytics.d.ts.map +0 -1
- package/dist/src/components/analytics.js +0 -30
- package/dist/src/components/analytics.js.map +0 -1
- package/dist/src/components/app-loader.d.ts +0 -3
- package/dist/src/components/app-loader.d.ts.map +0 -1
- package/dist/src/components/app-loader.js +0 -9
- package/dist/src/components/app-loader.js.map +0 -1
- package/dist/src/components/app-skeleton.d.ts +0 -3
- package/dist/src/components/app-skeleton.d.ts.map +0 -1
- package/dist/src/components/app-skeleton.js +0 -38
- package/dist/src/components/app-skeleton.js.map +0 -1
- package/dist/src/components/app.d.ts +0 -2
- package/dist/src/components/app.d.ts.map +0 -1
- package/dist/src/components/app.js +0 -29
- package/dist/src/components/app.js.map +0 -1
- package/dist/src/components/button.d.ts +0 -3
- package/dist/src/components/button.d.ts.map +0 -1
- package/dist/src/components/button.js +0 -7
- package/dist/src/components/button.js.map +0 -1
- package/dist/src/components/cookie-banner.d.ts +0 -2
- package/dist/src/components/cookie-banner.d.ts.map +0 -1
- package/dist/src/components/cookie-banner.js +0 -48
- package/dist/src/components/cookie-banner.js.map +0 -1
- package/dist/src/components/document-editor-container.d.ts +0 -2
- package/dist/src/components/document-editor-container.d.ts.map +0 -1
- package/dist/src/components/document-editor-container.js +0 -38
- package/dist/src/components/document-editor-container.js.map +0 -1
- package/dist/src/components/dots-loader.d.ts +0 -2
- package/dist/src/components/dots-loader.d.ts.map +0 -1
- package/dist/src/components/dots-loader.js +0 -15
- package/dist/src/components/dots-loader.js.map +0 -1
- package/dist/src/components/drive-editor-container.d.ts +0 -2
- package/dist/src/components/drive-editor-container.d.ts.map +0 -1
- package/dist/src/components/drive-editor-container.js +0 -22
- package/dist/src/components/drive-editor-container.js.map +0 -1
- package/dist/src/components/drive-icon.d.ts +0 -5
- package/dist/src/components/drive-icon.d.ts.map +0 -1
- package/dist/src/components/drive-icon.js +0 -22
- package/dist/src/components/drive-icon.js.map +0 -1
- package/dist/src/components/editor-loader.d.ts +0 -9
- package/dist/src/components/editor-loader.d.ts.map +0 -1
- package/dist/src/components/editor-loader.js +0 -19
- package/dist/src/components/editor-loader.js.map +0 -1
- package/dist/src/components/editors.d.ts +0 -10
- package/dist/src/components/editors.d.ts.map +0 -1
- package/dist/src/components/editors.js +0 -94
- package/dist/src/components/editors.js.map +0 -1
- package/dist/src/components/error-boundary.d.ts +0 -103
- package/dist/src/components/error-boundary.d.ts.map +0 -1
- package/dist/src/components/error-boundary.js +0 -104
- package/dist/src/components/error-boundary.js.map +0 -1
- package/dist/src/components/footer.d.ts +0 -2
- package/dist/src/components/footer.d.ts.map +0 -1
- package/dist/src/components/footer.js +0 -16
- package/dist/src/components/footer.js.map +0 -1
- package/dist/src/components/index.d.ts +0 -20
- package/dist/src/components/index.d.ts.map +0 -1
- package/dist/src/components/index.js +0 -20
- package/dist/src/components/index.js.map +0 -1
- package/dist/src/components/load.d.ts +0 -8
- package/dist/src/components/load.d.ts.map +0 -1
- package/dist/src/components/load.js +0 -15
- package/dist/src/components/load.js.map +0 -1
- package/dist/src/components/modal/modals/AddDriveModal.d.ts +0 -2
- package/dist/src/components/modal/modals/AddDriveModal.d.ts.map +0 -1
- package/dist/src/components/modal/modals/AddDriveModal.js +0 -90
- package/dist/src/components/modal/modals/AddDriveModal.js.map +0 -1
- package/dist/src/components/modal/modals/ClearStorageModal.d.ts +0 -2
- package/dist/src/components/modal/modals/ClearStorageModal.d.ts.map +0 -1
- package/dist/src/components/modal/modals/ClearStorageModal.js +0 -35
- package/dist/src/components/modal/modals/ClearStorageModal.js.map +0 -1
- package/dist/src/components/modal/modals/CookiesPolicyModal.d.ts +0 -2
- package/dist/src/components/modal/modals/CookiesPolicyModal.d.ts.map +0 -1
- package/dist/src/components/modal/modals/CookiesPolicyModal.js +0 -16
- package/dist/src/components/modal/modals/CookiesPolicyModal.js.map +0 -1
- package/dist/src/components/modal/modals/CreateDocumentModal.d.ts +0 -2
- package/dist/src/components/modal/modals/CreateDocumentModal.d.ts.map +0 -1
- package/dist/src/components/modal/modals/CreateDocumentModal.js +0 -24
- package/dist/src/components/modal/modals/CreateDocumentModal.js.map +0 -1
- package/dist/src/components/modal/modals/DebugSettingsModal.d.ts +0 -2
- package/dist/src/components/modal/modals/DebugSettingsModal.d.ts.map +0 -1
- package/dist/src/components/modal/modals/DebugSettingsModal.js +0 -108
- package/dist/src/components/modal/modals/DebugSettingsModal.js.map +0 -1
- package/dist/src/components/modal/modals/DeleteDriveModal.d.ts +0 -2
- package/dist/src/components/modal/modals/DeleteDriveModal.d.ts.map +0 -1
- package/dist/src/components/modal/modals/DeleteDriveModal.js +0 -32
- package/dist/src/components/modal/modals/DeleteDriveModal.js.map +0 -1
- package/dist/src/components/modal/modals/DeleteItemModal.d.ts +0 -3
- package/dist/src/components/modal/modals/DeleteItemModal.d.ts.map +0 -1
- package/dist/src/components/modal/modals/DeleteItemModal.js +0 -33
- package/dist/src/components/modal/modals/DeleteItemModal.js.map +0 -1
- package/dist/src/components/modal/modals/DisclaimerModal.d.ts +0 -3
- package/dist/src/components/modal/modals/DisclaimerModal.d.ts.map +0 -1
- package/dist/src/components/modal/modals/DisclaimerModal.js +0 -12
- package/dist/src/components/modal/modals/DisclaimerModal.js.map +0 -1
- package/dist/src/components/modal/modals/DriveSettingsModal.d.ts +0 -2
- package/dist/src/components/modal/modals/DriveSettingsModal.d.ts.map +0 -1
- package/dist/src/components/modal/modals/DriveSettingsModal.js +0 -33
- package/dist/src/components/modal/modals/DriveSettingsModal.js.map +0 -1
- package/dist/src/components/modal/modals/ExportDocumentWithErrorsModal.d.ts +0 -2
- package/dist/src/components/modal/modals/ExportDocumentWithErrorsModal.d.ts.map +0 -1
- package/dist/src/components/modal/modals/ExportDocumentWithErrorsModal.js +0 -30
- package/dist/src/components/modal/modals/ExportDocumentWithErrorsModal.js.map +0 -1
- package/dist/src/components/modal/modals/InspectorModal/InspectorModal.d.ts +0 -2
- package/dist/src/components/modal/modals/InspectorModal/InspectorModal.d.ts.map +0 -1
- package/dist/src/components/modal/modals/InspectorModal/InspectorModal.js +0 -37
- package/dist/src/components/modal/modals/InspectorModal/InspectorModal.js.map +0 -1
- package/dist/src/components/modal/modals/InspectorModal/index.d.ts +0 -2
- package/dist/src/components/modal/modals/InspectorModal/index.d.ts.map +0 -1
- package/dist/src/components/modal/modals/InspectorModal/index.js +0 -2
- package/dist/src/components/modal/modals/InspectorModal/index.js.map +0 -1
- package/dist/src/components/modal/modals/InspectorModal/useDbExplorer.d.ts +0 -31
- package/dist/src/components/modal/modals/InspectorModal/useDbExplorer.d.ts.map +0 -1
- package/dist/src/components/modal/modals/InspectorModal/useDbExplorer.js +0 -211
- package/dist/src/components/modal/modals/InspectorModal/useDbExplorer.js.map +0 -1
- package/dist/src/components/modal/modals/InspectorModal/useIntegrityInspector.d.ts +0 -3
- package/dist/src/components/modal/modals/InspectorModal/useIntegrityInspector.d.ts.map +0 -1
- package/dist/src/components/modal/modals/InspectorModal/useIntegrityInspector.js +0 -39
- package/dist/src/components/modal/modals/InspectorModal/useIntegrityInspector.js.map +0 -1
- package/dist/src/components/modal/modals/InspectorModal/useProcessorsInspector.d.ts +0 -3
- package/dist/src/components/modal/modals/InspectorModal/useProcessorsInspector.d.ts.map +0 -1
- package/dist/src/components/modal/modals/InspectorModal/useProcessorsInspector.js +0 -38
- package/dist/src/components/modal/modals/InspectorModal/useProcessorsInspector.js.map +0 -1
- package/dist/src/components/modal/modals/InspectorModal/useQueueInspector.d.ts +0 -3
- package/dist/src/components/modal/modals/InspectorModal/useQueueInspector.d.ts.map +0 -1
- package/dist/src/components/modal/modals/InspectorModal/useQueueInspector.js +0 -61
- package/dist/src/components/modal/modals/InspectorModal/useQueueInspector.js.map +0 -1
- package/dist/src/components/modal/modals/InspectorModal/useRemotesInspector.d.ts +0 -7
- package/dist/src/components/modal/modals/InspectorModal/useRemotesInspector.d.ts.map +0 -1
- package/dist/src/components/modal/modals/InspectorModal/useRemotesInspector.js +0 -19
- package/dist/src/components/modal/modals/InspectorModal/useRemotesInspector.js.map +0 -1
- package/dist/src/components/modal/modals/SettingsModal.d.ts +0 -3
- package/dist/src/components/modal/modals/SettingsModal.d.ts.map +0 -1
- package/dist/src/components/modal/modals/SettingsModal.js +0 -48
- package/dist/src/components/modal/modals/SettingsModal.js.map +0 -1
- package/dist/src/components/modal/modals/UpgradeDriveModal.d.ts +0 -3
- package/dist/src/components/modal/modals/UpgradeDriveModal.d.ts.map +0 -1
- package/dist/src/components/modal/modals/UpgradeDriveModal.js +0 -21
- package/dist/src/components/modal/modals/UpgradeDriveModal.js.map +0 -1
- package/dist/src/components/modal/modals/settings/about.d.ts +0 -2
- package/dist/src/components/modal/modals/settings/about.d.ts.map +0 -1
- package/dist/src/components/modal/modals/settings/about.js +0 -10
- package/dist/src/components/modal/modals/settings/about.js.map +0 -1
- package/dist/src/components/modal/modals/settings/danger-zone.d.ts +0 -2
- package/dist/src/components/modal/modals/settings/danger-zone.d.ts.map +0 -1
- package/dist/src/components/modal/modals/settings/danger-zone.js +0 -15
- package/dist/src/components/modal/modals/settings/danger-zone.js.map +0 -1
- package/dist/src/components/modal/modals/settings/default-editor.d.ts +0 -2
- package/dist/src/components/modal/modals/settings/default-editor.d.ts.map +0 -1
- package/dist/src/components/modal/modals/settings/default-editor.js +0 -18
- package/dist/src/components/modal/modals/settings/default-editor.js.map +0 -1
- package/dist/src/components/modal/modals/settings/package-manager.d.ts +0 -3
- package/dist/src/components/modal/modals/settings/package-manager.d.ts.map +0 -1
- package/dist/src/components/modal/modals/settings/package-manager.js +0 -97
- package/dist/src/components/modal/modals/settings/package-manager.js.map +0 -1
- package/dist/src/components/modal/modals-container.d.ts +0 -2
- package/dist/src/components/modal/modals-container.d.ts.map +0 -1
- package/dist/src/components/modal/modals-container.js +0 -70
- package/dist/src/components/modal/modals-container.js.map +0 -1
- package/dist/src/components/package-install-prompt.d.ts +0 -3
- package/dist/src/components/package-install-prompt.d.ts.map +0 -1
- package/dist/src/components/package-install-prompt.js +0 -34
- package/dist/src/components/package-install-prompt.js.map +0 -1
- package/dist/src/components/reload-connect-toast.d.ts +0 -2
- package/dist/src/components/reload-connect-toast.d.ts.map +0 -1
- package/dist/src/components/reload-connect-toast.js +0 -7
- package/dist/src/components/reload-connect-toast.js.map +0 -1
- package/dist/src/components/root.d.ts +0 -2
- package/dist/src/components/root.d.ts.map +0 -1
- package/dist/src/components/root.js +0 -8
- package/dist/src/components/root.js.map +0 -1
- package/dist/src/components/router.d.ts +0 -2
- package/dist/src/components/router.d.ts.map +0 -1
- package/dist/src/components/router.js +0 -41
- package/dist/src/components/router.js.map +0 -1
- package/dist/src/components/search-bar.d.ts +0 -2
- package/dist/src/components/search-bar.d.ts.map +0 -1
- package/dist/src/components/search-bar.js +0 -36
- package/dist/src/components/search-bar.js.map +0 -1
- package/dist/src/components/sidebar.d.ts +0 -2
- package/dist/src/components/sidebar.d.ts.map +0 -1
- package/dist/src/components/sidebar.js +0 -28
- package/dist/src/components/sidebar.js.map +0 -1
- package/dist/src/connect.config.d.ts +0 -117
- package/dist/src/connect.config.d.ts.map +0 -1
- package/dist/src/connect.config.js +0 -149
- package/dist/src/connect.config.js.map +0 -1
- package/dist/src/context/index.d.ts +0 -4
- package/dist/src/context/index.d.ts.map +0 -1
- package/dist/src/context/index.js +0 -4
- package/dist/src/context/index.js.map +0 -1
- package/dist/src/context/processor-manager.d.ts +0 -2
- package/dist/src/context/processor-manager.d.ts.map +0 -1
- package/dist/src/context/processor-manager.js +0 -2
- package/dist/src/context/processor-manager.js.map +0 -1
- package/dist/src/context/processor-manager.old.d.ts +0 -3
- package/dist/src/context/processor-manager.old.d.ts.map +0 -1
- package/dist/src/context/processor-manager.old.js +0 -189
- package/dist/src/context/processor-manager.old.js.map +0 -1
- package/dist/src/context/read-mode.d.ts +0 -2
- package/dist/src/context/read-mode.d.ts.map +0 -1
- package/dist/src/context/read-mode.js +0 -219
- package/dist/src/context/read-mode.js.map +0 -1
- package/dist/src/context/sentry-provider.d.ts +0 -6
- package/dist/src/context/sentry-provider.d.ts.map +0 -1
- package/dist/src/context/sentry-provider.js +0 -6
- package/dist/src/context/sentry-provider.js.map +0 -1
- package/dist/src/feature-flags.d.ts +0 -35
- package/dist/src/feature-flags.d.ts.map +0 -1
- package/dist/src/feature-flags.js +0 -150
- package/dist/src/feature-flags.js.map +0 -1
- package/dist/src/globals.d.ts +0 -9
- package/dist/src/globals.d.ts.map +0 -1
- package/dist/src/globals.js +0 -2
- package/dist/src/globals.js.map +0 -1
- package/dist/src/hmr.d.ts +0 -3
- package/dist/src/hmr.d.ts.map +0 -1
- package/dist/src/hmr.js +0 -2
- package/dist/src/hmr.js.map +0 -1
- package/dist/src/hooks/index.d.ts +0 -10
- package/dist/src/hooks/index.d.ts.map +0 -1
- package/dist/src/hooks/index.js +0 -10
- package/dist/src/hooks/index.js.map +0 -1
- package/dist/src/hooks/use-registry.d.ts +0 -14
- package/dist/src/hooks/use-registry.d.ts.map +0 -1
- package/dist/src/hooks/use-registry.js +0 -126
- package/dist/src/hooks/use-registry.js.map +0 -1
- package/dist/src/hooks/useAcceptedCookies.d.ts +0 -9
- package/dist/src/hooks/useAcceptedCookies.d.ts.map +0 -1
- package/dist/src/hooks/useAcceptedCookies.js +0 -34
- package/dist/src/hooks/useAcceptedCookies.js.map +0 -1
- package/dist/src/hooks/useCheckLatestVersion.d.ts +0 -2
- package/dist/src/hooks/useCheckLatestVersion.d.ts.map +0 -1
- package/dist/src/hooks/useCheckLatestVersion.js +0 -33
- package/dist/src/hooks/useCheckLatestVersion.js.map +0 -1
- package/dist/src/hooks/useClientErrorHandler.d.ts +0 -6
- package/dist/src/hooks/useClientErrorHandler.d.ts.map +0 -1
- package/dist/src/hooks/useClientErrorHandler.js +0 -96
- package/dist/src/hooks/useClientErrorHandler.js.map +0 -1
- package/dist/src/hooks/useCookieBanner.d.ts +0 -5
- package/dist/src/hooks/useCookieBanner.d.ts.map +0 -1
- package/dist/src/hooks/useCookieBanner.js +0 -32
- package/dist/src/hooks/useCookieBanner.js.map +0 -1
- package/dist/src/hooks/useInitSentry.d.ts +0 -2
- package/dist/src/hooks/useInitSentry.d.ts.map +0 -1
- package/dist/src/hooks/useInitSentry.js +0 -80
- package/dist/src/hooks/useInitSentry.js.map +0 -1
- package/dist/src/hooks/useNodeActions.d.ts +0 -6
- package/dist/src/hooks/useNodeActions.d.ts.map +0 -1
- package/dist/src/hooks/useNodeActions.js +0 -35
- package/dist/src/hooks/useNodeActions.js.map +0 -1
- package/dist/src/hooks/useUndoRedoShortcuts.d.ts +0 -8
- package/dist/src/hooks/useUndoRedoShortcuts.d.ts.map +0 -1
- package/dist/src/hooks/useUndoRedoShortcuts.js +0 -26
- package/dist/src/hooks/useUndoRedoShortcuts.js.map +0 -1
- package/dist/src/hooks/useWindowSize.d.ts +0 -5
- package/dist/src/hooks/useWindowSize.d.ts.map +0 -1
- package/dist/src/hooks/useWindowSize.js +0 -21
- package/dist/src/hooks/useWindowSize.js.map +0 -1
- package/dist/src/hooks/utils.d.ts +0 -7
- package/dist/src/hooks/utils.d.ts.map +0 -1
- package/dist/src/hooks/utils.js +0 -46
- package/dist/src/hooks/utils.js.map +0 -1
- package/dist/src/i18n/index.d.ts +0 -4
- package/dist/src/i18n/index.d.ts.map +0 -1
- package/dist/src/i18n/index.js +0 -26
- package/dist/src/i18n/index.js.map +0 -1
- package/dist/src/i18n/locales/en.json +0 -114
- package/dist/src/index.d.ts +0 -2
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -2
- package/dist/src/index.js.map +0 -1
- package/dist/src/main.d.ts +0 -2
- package/dist/src/main.d.ts.map +0 -1
- package/dist/src/main.js +0 -8
- package/dist/src/main.js.map +0 -1
- package/dist/src/pages/content.d.ts +0 -2
- package/dist/src/pages/content.d.ts.map +0 -1
- package/dist/src/pages/content.js +0 -39
- package/dist/src/pages/content.js.map +0 -1
- package/dist/src/pages/demo/atlas-import.d.ts +0 -2
- package/dist/src/pages/demo/atlas-import.d.ts.map +0 -1
- package/dist/src/pages/demo/atlas-import.js +0 -120
- package/dist/src/pages/demo/atlas-import.js.map +0 -1
- package/dist/src/pages/index.d.ts +0 -4
- package/dist/src/pages/index.d.ts.map +0 -1
- package/dist/src/pages/index.js +0 -4
- package/dist/src/pages/index.js.map +0 -1
- package/dist/src/pages/settings.d.ts +0 -4
- package/dist/src/pages/settings.d.ts.map +0 -1
- package/dist/src/pages/settings.js +0 -8
- package/dist/src/pages/settings.js.map +0 -1
- package/dist/src/pglite.db.d.ts +0 -2
- package/dist/src/pglite.db.d.ts.map +0 -1
- package/dist/src/pglite.db.js +0 -19
- package/dist/src/pglite.db.js.map +0 -1
- package/dist/src/pglite.worker.d.ts +0 -2
- package/dist/src/pglite.worker.d.ts.map +0 -1
- package/dist/src/pglite.worker.js +0 -15
- package/dist/src/pglite.worker.js.map +0 -1
- package/dist/src/services/index.d.ts +0 -3
- package/dist/src/services/index.d.ts.map +0 -1
- package/dist/src/services/index.js +0 -3
- package/dist/src/services/index.js.map +0 -1
- package/dist/src/services/logger.d.ts +0 -2
- package/dist/src/services/logger.d.ts.map +0 -1
- package/dist/src/services/logger.js +0 -28
- package/dist/src/services/logger.js.map +0 -1
- package/dist/src/services/toast.d.ts +0 -8
- package/dist/src/services/toast.d.ts.map +0 -1
- package/dist/src/services/toast.js +0 -11
- package/dist/src/services/toast.js.map +0 -1
- package/dist/src/store/document-model.d.ts +0 -3
- package/dist/src/store/document-model.d.ts.map +0 -1
- package/dist/src/store/document-model.js +0 -80
- package/dist/src/store/document-model.js.map +0 -1
- package/dist/src/store/editor.d.ts +0 -4
- package/dist/src/store/editor.d.ts.map +0 -1
- package/dist/src/store/editor.js +0 -28
- package/dist/src/store/editor.js.map +0 -1
- package/dist/src/store/index.d.ts +0 -6
- package/dist/src/store/index.d.ts.map +0 -1
- package/dist/src/store/index.js +0 -6
- package/dist/src/store/index.js.map +0 -1
- package/dist/src/store/processor-host-module.d.ts +0 -3
- package/dist/src/store/processor-host-module.d.ts.map +0 -1
- package/dist/src/store/processor-host-module.js +0 -22
- package/dist/src/store/processor-host-module.js.map +0 -1
- package/dist/src/store/reactor.d.ts +0 -3
- package/dist/src/store/reactor.d.ts.map +0 -1
- package/dist/src/store/reactor.js +0 -171
- package/dist/src/store/reactor.js.map +0 -1
- package/dist/src/store/user.d.ts +0 -2
- package/dist/src/store/user.d.ts.map +0 -1
- package/dist/src/store/user.js +0 -16
- package/dist/src/store/user.js.map +0 -1
- package/dist/src/store/utils.d.ts +0 -2
- package/dist/src/store/utils.d.ts.map +0 -1
- package/dist/src/store/utils.js +0 -59
- package/dist/src/store/utils.js.map +0 -1
- package/dist/src/utils/browser.d.ts +0 -2
- package/dist/src/utils/browser.d.ts.map +0 -1
- package/dist/src/utils/browser.js +0 -9
- package/dist/src/utils/browser.js.map +0 -1
- package/dist/src/utils/document-editor-debug-tools.d.ts +0 -17
- package/dist/src/utils/document-editor-debug-tools.d.ts.map +0 -1
- package/dist/src/utils/document-editor-debug-tools.js +0 -55
- package/dist/src/utils/document-editor-debug-tools.js.map +0 -1
- package/dist/src/utils/drive-preservation.d.ts +0 -19
- package/dist/src/utils/drive-preservation.d.ts.map +0 -1
- package/dist/src/utils/drive-preservation.js +0 -51
- package/dist/src/utils/drive-preservation.js.map +0 -1
- package/dist/src/utils/drive-sections.d.ts +0 -31
- package/dist/src/utils/drive-sections.d.ts.map +0 -1
- package/dist/src/utils/drive-sections.js +0 -63
- package/dist/src/utils/drive-sections.js.map +0 -1
- package/dist/src/utils/index.d.ts +0 -13
- package/dist/src/utils/index.d.ts.map +0 -1
- package/dist/src/utils/index.js +0 -13
- package/dist/src/utils/index.js.map +0 -1
- package/dist/src/utils/join.d.ts +0 -2
- package/dist/src/utils/join.d.ts.map +0 -1
- package/dist/src/utils/join.js +0 -11
- package/dist/src/utils/join.js.map +0 -1
- package/dist/src/utils/openUrl.d.ts +0 -2
- package/dist/src/utils/openUrl.d.ts.map +0 -1
- package/dist/src/utils/openUrl.js +0 -3
- package/dist/src/utils/openUrl.js.map +0 -1
- package/dist/src/utils/package-json.d.ts +0 -3
- package/dist/src/utils/package-json.d.ts.map +0 -1
- package/dist/src/utils/package-json.js +0 -3
- package/dist/src/utils/package-json.js.map +0 -1
- package/dist/src/utils/path.d.ts +0 -4
- package/dist/src/utils/path.d.ts.map +0 -1
- package/dist/src/utils/path.js +0 -17
- package/dist/src/utils/path.js.map +0 -1
- package/dist/src/utils/reactor.d.ts +0 -19
- package/dist/src/utils/reactor.d.ts.map +0 -1
- package/dist/src/utils/reactor.js +0 -70
- package/dist/src/utils/reactor.js.map +0 -1
- package/dist/src/utils/registerServiceWorker.d.ts +0 -12
- package/dist/src/utils/registerServiceWorker.d.ts.map +0 -1
- package/dist/src/utils/registerServiceWorker.js +0 -97
- package/dist/src/utils/registerServiceWorker.js.map +0 -1
- package/dist/src/utils/registry-url.d.ts +0 -2
- package/dist/src/utils/registry-url.d.ts.map +0 -1
- package/dist/src/utils/registry-url.js +0 -39
- package/dist/src/utils/registry-url.js.map +0 -1
- package/dist/src/utils/slug.d.ts +0 -2
- package/dist/src/utils/slug.d.ts.map +0 -1
- package/dist/src/utils/slug.js +0 -4
- package/dist/src/utils/slug.js.map +0 -1
- package/dist/test/utils/signer.test.d.ts +0 -2
- package/dist/test/utils/signer.test.d.ts.map +0 -1
- package/dist/test/utils/signer.test.js +0 -327
- package/dist/test/utils/signer.test.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/vite.config.d.ts +0 -3
- package/dist/vite.config.d.ts.map +0 -1
- package/dist/vite.config.js +0 -34
- package/dist/vite.config.js.map +0 -1
- package/dist/vitest.config.d.ts +0 -3
- package/dist/vitest.config.d.ts.map +0 -1
- package/dist/vitest.config.js +0 -8
- package/dist/vitest.config.js.map +0 -1
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { DriveSettingsModal as ConnectDriveSettingsModal } from "@powerhousedao/design-system/connect";
|
|
3
|
-
import { driveCollectionId } from "@powerhousedao/reactor-browser";
|
|
4
|
-
import { closePHModal, renameDrive, setDriveAvailableOffline, setDriveSharingType, showPHModal, useDriveById, usePHModal, } from "@powerhousedao/reactor-browser";
|
|
5
|
-
import { useSyncList } from "@powerhousedao/reactor-browser/connect";
|
|
6
|
-
import { useMemo } from "react";
|
|
7
|
-
export function DriveSettingsModal() {
|
|
8
|
-
const phModal = usePHModal();
|
|
9
|
-
const open = phModal?.type === "driveSettings";
|
|
10
|
-
const driveId = open ? phModal.driveId : undefined;
|
|
11
|
-
const [drive] = useDriveById(driveId);
|
|
12
|
-
const remotes = useSyncList();
|
|
13
|
-
const isRemoteDrive = useMemo(() => {
|
|
14
|
-
return remotes.some((remote) => remote.collectionId === driveCollectionId("main", drive.header.id));
|
|
15
|
-
}, [remotes, drive]);
|
|
16
|
-
if (!driveId || !drive) {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
async function onRenameDrive(drive, newName) {
|
|
20
|
-
await renameDrive(drive.header.id, newName);
|
|
21
|
-
}
|
|
22
|
-
async function onChangeSharingType(drive, newSharingType) {
|
|
23
|
-
await setDriveSharingType(drive.header.id, newSharingType);
|
|
24
|
-
}
|
|
25
|
-
async function onChangeAvailableOffline(drive, newAvailableOffline) {
|
|
26
|
-
await setDriveAvailableOffline(drive.header.id, newAvailableOffline);
|
|
27
|
-
}
|
|
28
|
-
return (_jsx(ConnectDriveSettingsModal, { drive: drive, sharingType: isRemoteDrive ? "PUBLIC" : "LOCAL", availableOffline: !isRemoteDrive, open: open, onRenameDrive: onRenameDrive, onDeleteDrive: () => showPHModal({ type: "deleteDrive", driveId }), onChangeAvailableOffline: onChangeAvailableOffline, onChangeSharingType: onChangeSharingType, onOpenChange: (status) => {
|
|
29
|
-
if (!status)
|
|
30
|
-
return closePHModal();
|
|
31
|
-
} }));
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=DriveSettingsModal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DriveSettingsModal.js","sourceRoot":"","sources":["../../../../../src/components/modal/modals/DriveSettingsModal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,IAAI,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACvG,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EACL,YAAY,EACZ,WAAW,EACX,wBAAwB,EACxB,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,UAAU,GACX,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAErE,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,MAAM,UAAU,kBAAkB;IAChC,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,IAAI,GAAG,OAAO,EAAE,IAAI,KAAK,eAAe,CAAC;IAC/C,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IACnD,MAAM,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,WAAW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AAC,MAAM;gBAAE,OAAO,YAAY,EAAE,CAAC;QACrC,CAAC,GACD,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExportDocumentWithErrorsModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/modal/modals/ExportDocumentWithErrorsModal.tsx"],"names":[],"mappings":"AASA,wBAAgB,6BAA6B,mDA4C5C"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ConnectConfirmationModal } from "@powerhousedao/design-system/connect";
|
|
3
|
-
import { closePHModal, exportFile, useDocumentById, usePHModal, validateDocument, } from "@powerhousedao/reactor-browser";
|
|
4
|
-
import { useTranslation } from "react-i18next";
|
|
5
|
-
export function ExportDocumentWithErrorsModal() {
|
|
6
|
-
const phModal = usePHModal();
|
|
7
|
-
const open = phModal?.type === "exportDocumentWithErrors";
|
|
8
|
-
const documentId = open ? phModal.documentId : undefined;
|
|
9
|
-
const [document] = useDocumentById(documentId);
|
|
10
|
-
const { t } = useTranslation();
|
|
11
|
-
if (!document) {
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
14
|
-
const validationErrors = validateDocument(document);
|
|
15
|
-
return (_jsx(ConnectConfirmationModal, { header: t("modals.exportDocumentWithErrors.title"), title: t("modals.exportDocumentWithErrors.title"), body: _jsxs("div", { children: [_jsx("p", { children: t("modals.exportDocumentWithErrors.body") }), _jsx("ul", { className: "mt-4 flex list-disc flex-col items-start px-4 text-xs", children: validationErrors.map((error, index) => (_jsx("li", { children: error.message }, index))) })] }), cancelLabel: t("common.cancel"), continueLabel: t("common.export"), onCancel: () => closePHModal(), onContinue: async () => {
|
|
16
|
-
try {
|
|
17
|
-
await exportFile(document);
|
|
18
|
-
}
|
|
19
|
-
catch (error) {
|
|
20
|
-
console.error(error);
|
|
21
|
-
}
|
|
22
|
-
finally {
|
|
23
|
-
closePHModal();
|
|
24
|
-
}
|
|
25
|
-
}, open: open, onOpenChange: (status) => {
|
|
26
|
-
if (!status)
|
|
27
|
-
return closePHModal();
|
|
28
|
-
} }));
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=ExportDocumentWithErrorsModal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExportDocumentWithErrorsModal.js","sourceRoot":"","sources":["../../../../../src/components/modal/modals/ExportDocumentWithErrorsModal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EACL,YAAY,EACZ,UAAU,EACV,eAAe,EACf,UAAU,EACV,gBAAgB,GACjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,MAAM,UAAU,6BAA6B;IAC3C,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,IAAI,GAAG,OAAO,EAAE,IAAI,KAAK,0BAA0B,CAAC;IAC1D,MAAM,UAAU,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;IACzD,MAAM,CAAC,QAAQ,CAAC,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;IAC/C,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAC;IAE/B,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACpD,OAAO,CACL,KAAC,wBAAwB,IACvB,MAAM,EAAE,CAAC,CAAC,uCAAuC,CAAC,EAClD,KAAK,EAAE,CAAC,CAAC,uCAAuC,CAAC,EACjD,IAAI,EACF,0BACE,sBAAI,CAAC,CAAC,sCAAsC,CAAC,GAAK,EAClD,aAAI,SAAS,EAAC,uDAAuD,YAClE,gBAAgB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CACtC,uBAAiB,KAAK,CAAC,OAAO,IAArB,KAAK,CAAsB,CACrC,CAAC,GACC,IACD,EAER,WAAW,EAAE,CAAC,CAAC,eAAe,CAAC,EAC/B,aAAa,EAAE,CAAC,CAAC,eAAe,CAAC,EACjC,QAAQ,EAAE,GAAG,EAAE,CAAC,YAAY,EAAE,EAC9B,UAAU,EAAE,KAAK,IAAI,EAAE;YACrB,IAAI,CAAC;gBACH,MAAM,UAAU,CAAC,QAAQ,CAAC,CAAC;YAC7B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACvB,CAAC;oBAAS,CAAC;gBACT,YAAY,EAAE,CAAC;YACjB,CAAC;QACH,CAAC,EACD,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,CAAC,MAAe,EAAE,EAAE;YAChC,IAAI,CAAC,MAAM;gBAAE,OAAO,YAAY,EAAE,CAAC;QACrC,CAAC,GACD,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InspectorModal.d.ts","sourceRoot":"","sources":["../../../../../../src/components/modal/modals/InspectorModal/InspectorModal.tsx"],"names":[],"mappings":"AAWA,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAqClC,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { InspectorModal as ConnectInspectorModal } from "@powerhousedao/design-system/connect";
|
|
3
|
-
import { REACTOR_SCHEMA } from "@powerhousedao/reactor-browser";
|
|
4
|
-
import { closePHModal, usePHModal } from "@powerhousedao/reactor-browser";
|
|
5
|
-
import { useDbExplorer } from "./useDbExplorer.js";
|
|
6
|
-
import { useIntegrityInspector } from "./useIntegrityInspector.js";
|
|
7
|
-
import { useProcessorsInspector } from "./useProcessorsInspector.js";
|
|
8
|
-
import { useQueueInspector } from "./useQueueInspector.js";
|
|
9
|
-
import { useRemotesInspector } from "./useRemotesInspector.js";
|
|
10
|
-
const DEFAULT_PAGE_SIZE = 25;
|
|
11
|
-
export const InspectorModal = () => {
|
|
12
|
-
const phModal = usePHModal();
|
|
13
|
-
const open = phModal?.type === "inspector";
|
|
14
|
-
const { getTables, getTableRows, getDefaultSort, onExportDb, onImportDb } = useDbExplorer();
|
|
15
|
-
const { getRemotes, removeRemote, connectionStates } = useRemotesInspector();
|
|
16
|
-
const queueInspectorProps = useQueueInspector();
|
|
17
|
-
const processorsInspectorProps = useProcessorsInspector();
|
|
18
|
-
const integrityInspectorProps = useIntegrityInspector();
|
|
19
|
-
return (_jsx(ConnectInspectorModal, { open: open, onOpenChange: (status) => {
|
|
20
|
-
if (!status)
|
|
21
|
-
closePHModal();
|
|
22
|
-
}, dbExplorerProps: {
|
|
23
|
-
schema: REACTOR_SCHEMA,
|
|
24
|
-
getTables,
|
|
25
|
-
getTableRows,
|
|
26
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
27
|
-
getDefaultSort,
|
|
28
|
-
pageSize: DEFAULT_PAGE_SIZE,
|
|
29
|
-
onExportDb,
|
|
30
|
-
onImportDb,
|
|
31
|
-
}, remotesInspectorProps: {
|
|
32
|
-
getRemotes,
|
|
33
|
-
removeRemote,
|
|
34
|
-
connectionStates,
|
|
35
|
-
}, queueInspectorProps: queueInspectorProps, processorsInspectorProps: processorsInspectorProps, integrityInspectorProps: integrityInspectorProps }));
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=InspectorModal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InspectorModal.js","sourceRoot":"","sources":["../../../../../../src/components/modal/modals/InspectorModal/InspectorModal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,IAAI,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC/F,OAAO,EAAE,cAAc,EAA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;SACjB,EACD,mBAAmB,EAAE,mBAAmB,EACxC,wBAAwB,EAAE,wBAAwB,EAClD,uBAAuB,EAAE,uBAAuB,GAChD,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/modal/modals/InspectorModal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/modal/modals/InspectorModal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { FilterGroup, SortOptions } from "@powerhousedao/design-system/connect";
|
|
2
|
-
type ColumnInfo = {
|
|
3
|
-
readonly name: string;
|
|
4
|
-
readonly dataType: string;
|
|
5
|
-
readonly isNullable: boolean;
|
|
6
|
-
};
|
|
7
|
-
type TableInfo = {
|
|
8
|
-
readonly name: string;
|
|
9
|
-
readonly columns: ColumnInfo[];
|
|
10
|
-
};
|
|
11
|
-
type GetTableRowsOptions = {
|
|
12
|
-
readonly schema?: string;
|
|
13
|
-
readonly limit: number;
|
|
14
|
-
readonly offset: number;
|
|
15
|
-
readonly sort?: SortOptions;
|
|
16
|
-
readonly filters?: FilterGroup;
|
|
17
|
-
};
|
|
18
|
-
type TablePage = {
|
|
19
|
-
readonly columns: string[];
|
|
20
|
-
readonly rows: Record<string, unknown>[];
|
|
21
|
-
readonly total: number | null;
|
|
22
|
-
};
|
|
23
|
-
export declare function useDbExplorer(): {
|
|
24
|
-
getTables: () => Promise<TableInfo[]>;
|
|
25
|
-
getTableRows: (table: string, options: GetTableRowsOptions) => Promise<TablePage>;
|
|
26
|
-
getDefaultSort: (table: string) => SortOptions | undefined;
|
|
27
|
-
onExportDb: () => Promise<void>;
|
|
28
|
-
onImportDb: (sqlContent: string) => Promise<void>;
|
|
29
|
-
};
|
|
30
|
-
export {};
|
|
31
|
-
//# sourceMappingURL=useDbExplorer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDbExplorer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/modal/modals/InspectorModal/useDbExplorer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACZ,MAAM,sCAAsC,CAAC;AAM9C,KAAK,UAAU,GAAG;IAChB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF,KAAK,SAAS,GAAG;IACf,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC;CAChC,CAAC;AASF,KAAK,mBAAmB,GAAG;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC;CAChC,CAAC;AAEF,KAAK,SAAS,GAAG;IACf,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B,CAAC;AAWF,wBAAgB,aAAa;qBAIa,OAAO,CAAC,SAAS,EAAE,CAAC;0BAmD5C,MAAM,WAAW,mBAAmB,KAAG,OAAO,CAAC,SAAS,CAAC;4BA0K/D,MAAM,KAAG,WAAW,GAAG,SAAS;;6BAfrB,MAAM;EA+B5B"}
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
import { pgDump } from "@electric-sql/pglite-tools/pg_dump";
|
|
2
|
-
import { REACTOR_SCHEMA } from "@powerhousedao/reactor-browser";
|
|
3
|
-
import { useDatabase, usePGlite } from "@powerhousedao/reactor-browser/connect";
|
|
4
|
-
import { sql } from "kysely";
|
|
5
|
-
import { useCallback } from "react";
|
|
6
|
-
const PRIORITY_COLUMNS = [
|
|
7
|
-
"documentType",
|
|
8
|
-
"documentId",
|
|
9
|
-
"scope",
|
|
10
|
-
"branch",
|
|
11
|
-
"index",
|
|
12
|
-
"skip",
|
|
13
|
-
];
|
|
14
|
-
export function useDbExplorer() {
|
|
15
|
-
const database = useDatabase();
|
|
16
|
-
const pglite = usePGlite();
|
|
17
|
-
const getTables = useCallback(async () => {
|
|
18
|
-
if (!database)
|
|
19
|
-
return [];
|
|
20
|
-
const result = await sql `
|
|
21
|
-
SELECT
|
|
22
|
-
c.table_name,
|
|
23
|
-
c.column_name,
|
|
24
|
-
c.data_type,
|
|
25
|
-
c.is_nullable
|
|
26
|
-
FROM information_schema.columns c
|
|
27
|
-
INNER JOIN information_schema.tables t
|
|
28
|
-
ON c.table_name = t.table_name
|
|
29
|
-
AND c.table_schema = t.table_schema
|
|
30
|
-
WHERE c.table_schema = ${REACTOR_SCHEMA}
|
|
31
|
-
AND t.table_type = 'BASE TABLE'
|
|
32
|
-
ORDER BY c.table_name, c.ordinal_position
|
|
33
|
-
`.execute(database);
|
|
34
|
-
const tableMap = new Map();
|
|
35
|
-
for (const row of result.rows) {
|
|
36
|
-
if (!tableMap.has(row.table_name)) {
|
|
37
|
-
tableMap.set(row.table_name, []);
|
|
38
|
-
}
|
|
39
|
-
tableMap.get(row.table_name).push({
|
|
40
|
-
name: row.column_name,
|
|
41
|
-
dataType: row.data_type,
|
|
42
|
-
isNullable: row.is_nullable === "YES",
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
return Array.from(tableMap).map(([name, columns]) => {
|
|
46
|
-
const columnNames = columns.map((col) => col.name);
|
|
47
|
-
const orderedColumns = [
|
|
48
|
-
...PRIORITY_COLUMNS.filter((col) => columnNames.includes(col)).map((col) => columns.find((c) => c.name === col)),
|
|
49
|
-
...columns.filter((col) => !PRIORITY_COLUMNS.includes(col.name)),
|
|
50
|
-
];
|
|
51
|
-
return {
|
|
52
|
-
name,
|
|
53
|
-
columns: orderedColumns,
|
|
54
|
-
};
|
|
55
|
-
});
|
|
56
|
-
}, [database]);
|
|
57
|
-
const getTableRows = useCallback(async (table, options) => {
|
|
58
|
-
if (!database) {
|
|
59
|
-
return { columns: [], rows: [], total: null };
|
|
60
|
-
}
|
|
61
|
-
const limit = options.limit;
|
|
62
|
-
const offset = options.offset;
|
|
63
|
-
const sort = options.sort;
|
|
64
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
65
|
-
const filters = options.filters;
|
|
66
|
-
const tableRef = sql.raw(`${REACTOR_SCHEMA}."${table}"`);
|
|
67
|
-
// Build WHERE clause from filters
|
|
68
|
-
let whereClause = sql ``;
|
|
69
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
70
|
-
if (filters?.clauses && filters.clauses.length > 0) {
|
|
71
|
-
const conditions = [];
|
|
72
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
73
|
-
for (let i = 0; i < filters.clauses.length; i++) {
|
|
74
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment
|
|
75
|
-
const clause = filters.clauses[i];
|
|
76
|
-
if (!clause)
|
|
77
|
-
continue;
|
|
78
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
79
|
-
const columnRef = sql.raw(`"${clause.column}"`);
|
|
80
|
-
let condition;
|
|
81
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
82
|
-
if (clause.operator === "IS NULL") {
|
|
83
|
-
condition = sql `${columnRef} IS NULL`;
|
|
84
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
85
|
-
}
|
|
86
|
-
else if (clause.operator === "IS NOT NULL") {
|
|
87
|
-
condition = sql `${columnRef} IS NOT NULL`;
|
|
88
|
-
}
|
|
89
|
-
else if (
|
|
90
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
91
|
-
clause.operator === "LIKE" ||
|
|
92
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
93
|
-
clause.operator === "ILIKE") {
|
|
94
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment
|
|
95
|
-
const value = clause.value;
|
|
96
|
-
const operator =
|
|
97
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
98
|
-
clause.operator === "LIKE" ? sql `LIKE` : sql `ILIKE`;
|
|
99
|
-
condition = sql `${columnRef} ${operator} ${value}`;
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
// For =, !=, >, <, >=, <=
|
|
103
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument
|
|
104
|
-
const operator = sql.raw(clause.operator);
|
|
105
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment
|
|
106
|
-
const value = clause.value;
|
|
107
|
-
// Try to parse as number if it looks like a number
|
|
108
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
109
|
-
let parsedValue = value;
|
|
110
|
-
if (value !== "" &&
|
|
111
|
-
!isNaN(Number(value)) &&
|
|
112
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
|
113
|
-
value.trim() !== "") {
|
|
114
|
-
parsedValue = Number(value);
|
|
115
|
-
}
|
|
116
|
-
condition = sql `${columnRef} ${operator} ${parsedValue}`;
|
|
117
|
-
}
|
|
118
|
-
conditions.push(condition);
|
|
119
|
-
// Add connector if not the last clause
|
|
120
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
121
|
-
if (i < filters.clauses.length - 1) {
|
|
122
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment
|
|
123
|
-
const connector = filters.connectors?.[i] ?? "AND";
|
|
124
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
125
|
-
conditions.push(sql.raw(connector));
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
// Combine all conditions
|
|
129
|
-
if (conditions.length > 0) {
|
|
130
|
-
whereClause = sql `WHERE ${sql.join(conditions, sql ` `)}`;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
// Build main query
|
|
134
|
-
let query;
|
|
135
|
-
if (sort) {
|
|
136
|
-
const columnRef = sql.raw(`"${sort.column}"`);
|
|
137
|
-
const direction = sort.direction === "desc" ? sql `DESC` : sql `ASC`;
|
|
138
|
-
query = sql `
|
|
139
|
-
SELECT * FROM ${tableRef}
|
|
140
|
-
${whereClause}
|
|
141
|
-
ORDER BY ${columnRef} ${direction}
|
|
142
|
-
LIMIT ${limit} OFFSET ${offset}
|
|
143
|
-
`;
|
|
144
|
-
}
|
|
145
|
-
else {
|
|
146
|
-
query = sql `
|
|
147
|
-
SELECT * FROM ${tableRef}
|
|
148
|
-
${whereClause}
|
|
149
|
-
LIMIT ${limit} OFFSET ${offset}
|
|
150
|
-
`;
|
|
151
|
-
}
|
|
152
|
-
const result = await query.execute(database);
|
|
153
|
-
// Build count query with same filters
|
|
154
|
-
const countQuery = sql `
|
|
155
|
-
SELECT COUNT(*) as count FROM ${tableRef}
|
|
156
|
-
${whereClause}
|
|
157
|
-
`;
|
|
158
|
-
const countResult = await countQuery.execute(database);
|
|
159
|
-
const total = countResult.rows[0]
|
|
160
|
-
? parseInt(countResult.rows[0].count, 10)
|
|
161
|
-
: null;
|
|
162
|
-
const rawColumns = result.rows.length > 0 ? Object.keys(result.rows[0]) : [];
|
|
163
|
-
const columns = [
|
|
164
|
-
...PRIORITY_COLUMNS.filter((col) => rawColumns.includes(col)),
|
|
165
|
-
...rawColumns.filter((col) => !PRIORITY_COLUMNS.includes(col)),
|
|
166
|
-
];
|
|
167
|
-
return {
|
|
168
|
-
columns,
|
|
169
|
-
rows: result.rows,
|
|
170
|
-
total,
|
|
171
|
-
};
|
|
172
|
-
}, [database]);
|
|
173
|
-
const onExportDb = useCallback(async () => {
|
|
174
|
-
if (!pglite)
|
|
175
|
-
return;
|
|
176
|
-
const dump = await pgDump({ pg: pglite });
|
|
177
|
-
const sqlContent = await dump.text();
|
|
178
|
-
const blob = new Blob([sqlContent], { type: "text/sql" });
|
|
179
|
-
const url = URL.createObjectURL(blob);
|
|
180
|
-
const a = document.createElement("a");
|
|
181
|
-
a.href = url;
|
|
182
|
-
a.download = `database-export-${Date.now()}.sql`;
|
|
183
|
-
a.click();
|
|
184
|
-
URL.revokeObjectURL(url);
|
|
185
|
-
}, [pglite]);
|
|
186
|
-
const onImportDb = useCallback(async (sqlContent) => {
|
|
187
|
-
if (!pglite)
|
|
188
|
-
return;
|
|
189
|
-
// Use explicit transaction to ensure writable transaction context
|
|
190
|
-
await pglite.transaction(async (tx) => {
|
|
191
|
-
await tx.exec(`DROP SCHEMA ${REACTOR_SCHEMA} CASCADE`);
|
|
192
|
-
await tx.exec(`CREATE SCHEMA ${REACTOR_SCHEMA}`);
|
|
193
|
-
await tx.exec(sqlContent);
|
|
194
|
-
await tx.exec(`SET search_path TO ${REACTOR_SCHEMA}`);
|
|
195
|
-
});
|
|
196
|
-
}, [pglite]);
|
|
197
|
-
const getDefaultSort = useCallback((table) => {
|
|
198
|
-
if (table === "Operation") {
|
|
199
|
-
return { column: "timestampUtcMs", direction: "desc" };
|
|
200
|
-
}
|
|
201
|
-
return undefined;
|
|
202
|
-
}, []);
|
|
203
|
-
return {
|
|
204
|
-
getTables,
|
|
205
|
-
getTableRows,
|
|
206
|
-
getDefaultSort,
|
|
207
|
-
onExportDb,
|
|
208
|
-
onImportDb,
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
//# sourceMappingURL=useDbExplorer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDbExplorer.js","sourceRoot":"","sources":["../../../../../../src/components/modal/modals/InspectorModal/useDbExplorer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAK5D,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAkCpC,MAAM,gBAAgB,GAAG;IACvB,cAAc;IACd,YAAY;IACZ,OAAO;IACP,QAAQ;IACR,OAAO;IACP,MAAM;CACE,CAAC;AAEX,MAAM,UAAU,aAAa;IAC3B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,MAAM,SAAS,GAAG,WAAW,CAAC,KAAK,IAA0B,EAAE;QAC7D,IAAI,CAAC,QAAQ;YAAE,OAAO,EAAE,CAAC;QAEzB,MAAM,MAAM,GAAG,MAAM,GAAG,CAAW;;;;;;;;;;+BAUR,cAAc;;;KAGxC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAEpB,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAwB,CAAC;QACjD,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;YAC9B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;gBAClC,QAAQ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,QAAQ,GAAG,mBAAmB,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC;QACjD,CAAC,CAAC,KAAK,EAAE,CAAC;QACV,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,MAAM,UAAU,GAAG,WAAW,CAC5B,KAAK,EAAE,UAAkB,EAAE,EAAE;QAC3B,IAAI,CAAC,MAAM;YAAE,OAAO;QAEpB,kEAAkE;QAClE,MAAM,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE;YACpC,MAAM,EAAE,CAAC,IAAI,CAAC,eAAe,cAAc,UAAU,CAAC,CAAC;YACvD,MAAM,EAAE,CAAC,IAAI,CAAC,iBAAiB,cAAc,EAAE,CAAC,CAAC;YACjD,MAAM,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC1B,MAAM,EAAE,CAAC,IAAI,CAAC,sBAAsB,cAAc,EAAE,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;IACL,CAAC,EACD,CAAC,MAAM,CAAC,CACT,CAAC;IAEF,MAAM,cAAc,GAAG,WAAW,CAChC,CAAC,KAAa,EAA2B,EAAE;QACzC,IAAI,KAAK,KAAK,WAAW,EAAE,CAAC;YAC1B,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;QACzD,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,EACD,EAAE,CACH,CAAC;IAEF,OAAO;QACL,SAAS;QACT,YAAY;QACZ,cAAc;QACd,UAAU;QACV,UAAU;KACX,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useIntegrityInspector.d.ts","sourceRoot":"","sources":["../../../../../../src/components/modal/modals/InspectorModal/useIntegrityInspector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAKpF,wBAAgB,qBAAqB,IAAI,uBAAuB,GAAG,SAAS,CAuD3E"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { DocumentIntegrityService } from "@powerhousedao/reactor-browser";
|
|
2
|
-
import { useReactorClientModule } from "@powerhousedao/reactor-browser/connect";
|
|
3
|
-
import { useCallback, useMemo } from "react";
|
|
4
|
-
export function useIntegrityInspector() {
|
|
5
|
-
const reactorClientModule = useReactorClientModule();
|
|
6
|
-
const reactorModule = reactorClientModule?.reactorModule;
|
|
7
|
-
const service = useMemo(() => {
|
|
8
|
-
if (!reactorModule)
|
|
9
|
-
return undefined;
|
|
10
|
-
return new DocumentIntegrityService(reactorModule.keyframeStore, reactorModule.operationStore, reactorModule.writeCache, reactorModule.documentView, reactorModule.documentModelRegistry);
|
|
11
|
-
}, [reactorModule]);
|
|
12
|
-
const onValidate = useCallback(async (documentId, branch) => {
|
|
13
|
-
if (!service) {
|
|
14
|
-
throw new Error("Reactor module not available");
|
|
15
|
-
}
|
|
16
|
-
return service.validateDocument(documentId, branch);
|
|
17
|
-
}, [service]);
|
|
18
|
-
const onRebuildKeyframes = useCallback(async (documentId, branch) => {
|
|
19
|
-
if (!service) {
|
|
20
|
-
throw new Error("Reactor module not available");
|
|
21
|
-
}
|
|
22
|
-
return service.rebuildKeyframes(documentId, branch);
|
|
23
|
-
}, [service]);
|
|
24
|
-
const onRebuildSnapshots = useCallback(async (documentId, branch) => {
|
|
25
|
-
if (!service) {
|
|
26
|
-
throw new Error("Reactor module not available");
|
|
27
|
-
}
|
|
28
|
-
return service.rebuildSnapshots(documentId, branch);
|
|
29
|
-
}, [service]);
|
|
30
|
-
if (!service) {
|
|
31
|
-
return undefined;
|
|
32
|
-
}
|
|
33
|
-
return {
|
|
34
|
-
onValidate,
|
|
35
|
-
onRebuildKeyframes,
|
|
36
|
-
onRebuildSnapshots,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=useIntegrityInspector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useIntegrityInspector.js","sourceRoot":"","sources":["../../../../../../src/components/modal/modals/InspectorModal/useIntegrityInspector.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE7C,MAAM,UAAU,qBAAqB;IACnC,MAAM,mBAAmB,GAAG,sBAAsB,EAAE,CAAC;IACrD,MAAM,aAAa,GAAG,mBAAmB,EAAE,aAAa,CAAC;IAEzD,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE;QAC3B,IAAI,CAAC,aAAa;YAAE,OAAO,SAAS,CAAC;QAErC,OAAO,IAAI,wBAAwB,CACjC,aAAa,CAAC,aAAa,EAC3B,aAAa,CAAC,cAAc,EAC5B,aAAa,CAAC,UAAU,EACxB,aAAa,CAAC,YAAY,EAC1B,aAAa,CAAC,qBAAqB,CACpC,CAAC;IACJ,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,MAAM,UAAU,GAAG,WAAW,CAC5B,KAAK,EAAE,UAAkB,EAAE,MAAe,EAAE,EAAE;QAC5C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,OAAO,OAAO,CAAC,gBAAgB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;IAEF,MAAM,kBAAkB,GAAG,WAAW,CACpC,KAAK,EAAE,UAAkB,EAAE,MAAe,EAAE,EAAE;QAC5C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,OAAO,OAAO,CAAC,gBAAgB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;IAEF,MAAM,kBAAkB,GAAG,WAAW,CACpC,KAAK,EAAE,UAAkB,EAAE,MAAe,EAAE,EAAE;QAC5C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,OAAO,OAAO,CAAC,gBAAgB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;IAEF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO;QACL,UAAU;QACV,kBAAkB;QAClB,kBAAkB;KACnB,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useProcessorsInspector.d.ts","sourceRoot":"","sources":["../../../../../../src/components/modal/modals/InspectorModal/useProcessorsInspector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAIrF,wBAAgB,sBAAsB,IAAI,wBAAwB,GAAG,SAAS,CA6C7E"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { useReactorClientModule } from "@powerhousedao/reactor-browser/connect";
|
|
2
|
-
import { useCallback, useMemo } from "react";
|
|
3
|
-
export function useProcessorsInspector() {
|
|
4
|
-
const reactorClientModule = useReactorClientModule();
|
|
5
|
-
const processorManager = reactorClientModule?.reactorModule?.processorManager;
|
|
6
|
-
const hasProcessorManager = useMemo(() => processorManager != null, [processorManager]);
|
|
7
|
-
const getProcessors = useCallback(async () => {
|
|
8
|
-
if (!processorManager) {
|
|
9
|
-
return [];
|
|
10
|
-
}
|
|
11
|
-
return processorManager.getAll().map((tracked) => ({
|
|
12
|
-
processorId: tracked.processorId,
|
|
13
|
-
factoryId: tracked.factoryId,
|
|
14
|
-
driveId: tracked.driveId,
|
|
15
|
-
processorIndex: tracked.processorIndex,
|
|
16
|
-
lastOrdinal: tracked.lastOrdinal,
|
|
17
|
-
status: tracked.status,
|
|
18
|
-
lastError: tracked.lastError,
|
|
19
|
-
lastErrorTimestamp: tracked.lastErrorTimestamp,
|
|
20
|
-
}));
|
|
21
|
-
}, [processorManager]);
|
|
22
|
-
const onRetry = useCallback(async (processorId) => {
|
|
23
|
-
if (!processorManager)
|
|
24
|
-
return;
|
|
25
|
-
const tracked = processorManager.get(processorId);
|
|
26
|
-
if (tracked) {
|
|
27
|
-
await tracked.retry();
|
|
28
|
-
}
|
|
29
|
-
}, [processorManager]);
|
|
30
|
-
if (!hasProcessorManager) {
|
|
31
|
-
return undefined;
|
|
32
|
-
}
|
|
33
|
-
return {
|
|
34
|
-
getProcessors,
|
|
35
|
-
onRetry,
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=useProcessorsInspector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useProcessorsInspector.js","sourceRoot":"","sources":["../../../../../../src/components/modal/modals/InspectorModal/useProcessorsInspector.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE7C,MAAM,UAAU,sBAAsB;IACpC,MAAM,mBAAmB,GAAG,sBAAsB,EAAE,CAAC;IACrD,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,aAAa,EAAE,gBAAgB,CAAC;IAE9E,MAAM,mBAAmB,GAAG,OAAO,CACjC,GAAG,EAAE,CAAC,gBAAgB,IAAI,IAAI,EAC9B,CAAC,gBAAgB,CAAC,CACnB,CAAC;IAEF,MAAM,aAAa,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;QAC3C,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtB,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,OAAO,gBAAgB,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YACjD,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,cAAc,EAAE,OAAO,CAAC,cAAc;YACtC,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;SAC/C,CAAC,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEvB,MAAM,OAAO,GAAG,WAAW,CACzB,KAAK,EAAE,WAAmB,EAAE,EAAE;QAC5B,IAAI,CAAC,gBAAgB;YAAE,OAAO;QAC9B,MAAM,OAAO,GAAG,gBAAgB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAClD,IAAI,OAAO,EAAE,CAAC;YACZ,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;QACxB,CAAC;IACH,CAAC,EACD,CAAC,gBAAgB,CAAC,CACnB,CAAC;IAEF,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACzB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO;QACL,aAAa;QACb,OAAO;KACR,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useQueueInspector.d.ts","sourceRoot":"","sources":["../../../../../../src/components/modal/modals/InspectorModal/useQueueInspector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EAEpB,MAAM,sCAAsC,CAAC;AAK9C,wBAAgB,iBAAiB,IAAI,mBAAmB,GAAG,SAAS,CAiEnE"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { InMemoryQueue } from "@powerhousedao/reactor-browser";
|
|
2
|
-
import { useReactorClientModule } from "@powerhousedao/reactor-browser/connect";
|
|
3
|
-
import { useCallback, useMemo } from "react";
|
|
4
|
-
export function useQueueInspector() {
|
|
5
|
-
const reactorClientModule = useReactorClientModule();
|
|
6
|
-
const queue = reactorClientModule?.reactorModule?.queue;
|
|
7
|
-
const inMemoryQueue = useMemo(() => {
|
|
8
|
-
if (queue instanceof InMemoryQueue) {
|
|
9
|
-
return queue;
|
|
10
|
-
}
|
|
11
|
-
return undefined;
|
|
12
|
-
}, [queue]);
|
|
13
|
-
const getQueueState = useCallback(async () => {
|
|
14
|
-
if (!inMemoryQueue) {
|
|
15
|
-
return {
|
|
16
|
-
isPaused: false,
|
|
17
|
-
pendingJobs: [],
|
|
18
|
-
executingJobs: [],
|
|
19
|
-
totalPending: 0,
|
|
20
|
-
totalExecuting: 0,
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
const pendingJobs = inMemoryQueue.getPendingJobs();
|
|
24
|
-
const executingJobIds = inMemoryQueue.getExecutingJobIds();
|
|
25
|
-
const executingJobs = [];
|
|
26
|
-
for (const jobIdSet of executingJobIds.values()) {
|
|
27
|
-
for (const jobId of jobIdSet) {
|
|
28
|
-
const job = inMemoryQueue.getJob(jobId);
|
|
29
|
-
if (job) {
|
|
30
|
-
executingJobs.push(job);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return {
|
|
35
|
-
isPaused: inMemoryQueue.paused,
|
|
36
|
-
pendingJobs,
|
|
37
|
-
executingJobs,
|
|
38
|
-
totalPending: pendingJobs.length,
|
|
39
|
-
totalExecuting: executingJobs.length,
|
|
40
|
-
};
|
|
41
|
-
}, [inMemoryQueue]);
|
|
42
|
-
const onPause = useCallback(async () => {
|
|
43
|
-
if (inMemoryQueue) {
|
|
44
|
-
inMemoryQueue.pause();
|
|
45
|
-
}
|
|
46
|
-
}, [inMemoryQueue]);
|
|
47
|
-
const onResume = useCallback(async () => {
|
|
48
|
-
if (inMemoryQueue) {
|
|
49
|
-
await inMemoryQueue.resume();
|
|
50
|
-
}
|
|
51
|
-
}, [inMemoryQueue]);
|
|
52
|
-
if (!inMemoryQueue) {
|
|
53
|
-
return undefined;
|
|
54
|
-
}
|
|
55
|
-
return {
|
|
56
|
-
getQueueState,
|
|
57
|
-
onPause,
|
|
58
|
-
onResume,
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=useQueueInspector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useQueueInspector.js","sourceRoot":"","sources":["../../../../../../src/components/modal/modals/InspectorModal/useQueueInspector.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAY,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE7C,MAAM,UAAU,iBAAiB;IAC/B,MAAM,mBAAmB,GAAG,sBAAsB,EAAE,CAAC;IACrD,MAAM,KAAK,GAAG,mBAAmB,EAAE,aAAa,EAAE,KAAK,CAAC;IAExD,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,EAAE;QACjC,IAAI,KAAK,YAAY,aAAa,EAAE,CAAC;YACnC,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,MAAM,aAAa,GAAG,WAAW,CAAC,KAAK,IAAyB,EAAE;QAChE,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,OAAO;gBACL,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,EAAE;gBACf,aAAa,EAAE,EAAE;gBACjB,YAAY,EAAE,CAAC;gBACf,cAAc,EAAE,CAAC;aAClB,CAAC;QACJ,CAAC;QAED,MAAM,WAAW,GAAG,a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|
-
export declare function useRemotesInspector(): {
|
|
3
|
-
getRemotes: () => Promise<Remote[]>;
|
|
4
|
-
removeRemote: (name: string) => Promise<void>;
|
|
5
|
-
connectionStates: ReadonlyMap<string, ConnectionStateSnapshot>;
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=useRemotesInspector.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRemotesInspector.d.ts","sourceRoot":"","sources":["../../../../../../src/components/modal/modals/InspectorModal/useRemotesInspector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,MAAM,EACP,MAAM,gCAAgC,CAAC;AAOxC,wBAAgB,mBAAmB,IAAI;IACrC,UAAU,EAAE,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACpC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,gBAAgB,EAAE,WAAW,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;CAChE,CAsBA"}
|