@powerhousedao/connect 6.2.3-dev.86 → 6.2.3-dev.87
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-CFi-9FQU.js → AddDriveModal-zMepHdWt.js} +20 -7
- package/dist/AddDriveModal-zMepHdWt.js.map +1 -0
- package/dist/{ClearStorageModal-Bk_ZRn_F.js → ClearStorageModal-DgGxtQaQ.js} +4 -4
- package/dist/{ClearStorageModal-Bk_ZRn_F.js.map → ClearStorageModal-DgGxtQaQ.js.map} +1 -1
- package/dist/{DebugSettingsModal-CUVGp-La.js → DebugSettingsModal-DycU6WFC.js} +4 -4
- package/dist/{DebugSettingsModal-CUVGp-La.js.map → DebugSettingsModal-DycU6WFC.js.map} +1 -1
- package/dist/{InspectorModal-CCY7tds_.js → InspectorModal-CmMSRdJq.js} +8 -8
- package/dist/InspectorModal-CmMSRdJq.js.map +1 -0
- package/dist/app-loader-D9bDKQtj.js +4 -0
- package/dist/{app-loader-CZdPOpRN.js → app-loader-DCXsLWK3.js} +7 -7
- package/dist/{app-loader-CZdPOpRN.js.map → app-loader-DCXsLWK3.js.map} +1 -1
- package/dist/{boot-CO6JTGnT.js → boot-2vu8w50I.js} +4 -4
- package/dist/{boot-CO6JTGnT.js.map → boot-2vu8w50I.js.map} +1 -1
- package/dist/{build-info-92Evldnq.js → build-info-D8mpFlVu.js} +5 -5
- package/dist/{build-info-92Evldnq.js.map → build-info-D8mpFlVu.js.map} +1 -1
- package/dist/{components-CJ6CZXqY.js → components-D2xBHSmq.js} +4 -4
- package/dist/{components-CJ6CZXqY.js.map → components-D2xBHSmq.js.map} +1 -1
- package/dist/{connection-state-Bwm9Agwy.js → connection-state-B6YMctkg.js} +4 -4
- package/dist/{connection-state-Bwm9Agwy.js.map → connection-state-B6YMctkg.js.map} +1 -1
- package/dist/generic.js +1 -1
- package/dist/{load-Bm81uoXN.js → load-Cy5EZy6w.js} +8 -8
- package/dist/{load-Bm81uoXN.js.map → load-Cy5EZy6w.js.map} +1 -1
- package/dist/{load-runtime-config-BI0ubgd7.js → load-runtime-config-Ca1WrxJ2.js} +4 -4
- package/dist/{load-runtime-config-BI0ubgd7.js.map → load-runtime-config-Ca1WrxJ2.js.map} +1 -1
- package/dist/main.js +2 -2
- package/dist/{package-manager-Bp7ArUcU.js → package-manager-CwPe8C9C.js} +6 -6
- package/dist/{package-manager-Bp7ArUcU.js.map → package-manager-CwPe8C9C.js.map} +1 -1
- package/dist/{pglite-major-p4_YefAE.js → pglite-major-pao-ozRo.js} +5 -5
- package/dist/pglite-major-pao-ozRo.js.map +1 -0
- package/dist/{pglite-migrate-core-DBlU6HIc.js → pglite-migrate-core-B6FqmhH8.js} +4 -4
- package/dist/{pglite-migrate-core-DBlU6HIc.js.map → pglite-migrate-core-B6FqmhH8.js.map} +1 -1
- package/dist/{pglite-seed-QPbGbLB_.js → pglite-seed-Ben-06-w.js} +4 -4
- package/dist/{pglite-seed-QPbGbLB_.js.map → pglite-seed-Ben-06-w.js.map} +1 -1
- package/dist/{plugins-B301pfnf.js → plugins-CoowJooW.js} +4 -4
- package/dist/{plugins-B301pfnf.js.map → plugins-CoowJooW.js.map} +1 -1
- package/dist/prerender.js +1 -1
- package/dist/{reactor-Qy6J3tMN.js → reactor-DIt5d6RH.js} +11 -8
- package/dist/{reactor-Qy6J3tMN.js.map → reactor-DIt5d6RH.js.map} +1 -1
- package/dist/reactor.worker.js +2 -2
- package/dist/{settings-4s3upquv.js → settings-cfEqmujq.js} +6 -6
- package/dist/{settings-4s3upquv.js.map → settings-cfEqmujq.js.map} +1 -1
- package/dist/{settings-tabs-BdC65vdm.js → settings-tabs-B4ejM9lL.js} +4 -4
- package/dist/{settings-tabs-BdC65vdm.js.map → settings-tabs-B4ejM9lL.js.map} +1 -1
- package/dist/shell.html +1 -1
- package/dist/start-connect.js +2 -2
- package/dist/{ui-CnruSqg5.js → ui-CyxG0yU5.js} +8 -8
- package/dist/{ui-CnruSqg5.js.map → ui-CyxG0yU5.js.map} +1 -1
- package/package.json +16 -16
- package/dist/AddDriveModal-CFi-9FQU.js.map +0 -1
- package/dist/InspectorModal-CCY7tds_.js.map +0 -1
- package/dist/app-loader-7H-b2RsE.js +0 -4
- package/dist/pglite-major-p4_YefAE.js.map +0 -1
package/dist/shell.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<div data-ph-shell="generic" inert style="display:contents"><!--$--><div class="h-screen overflow-auto bg-background text-foreground"><!--$--><!--$--><div class="flex h-full items-stretch overflow-auto max-sm:has-[>[data-connect-sidebar]]:flex-col-reverse" role="presentation" tabindex="0"><div id="sidebar" data-connect-sidebar="" class="group z-1 flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground max-sm:h-auto max-sm:w-full max-sm:flex-row max-sm:pb-[env(safe-area-inset-bottom)]" style="--sidebar-width:58px"><div class="scrollbar-none flex-1 overflow-auto text-foreground transition-shadow max-sm:flex max-sm:overflow-x-auto max-sm:overflow-y-hidden"><nav aria-label="Drives and pages" class="flex flex-col max-sm:flex-row"></nav></div><div class="shrink-0 flex flex-col items-center gap-3 border-t border-sidebar-border px-2 py-4 max-sm:flex-row max-sm:border-t-0 max-sm:border-l max-sm:py-2 dark:border-none"><button aria-label="Home" type="button" class="cursor-pointer"><!--$--><svg class="text-muted-foreground" style="width:24px;height:24px" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.0306 3.68615C11.2854 3.68614 11.492 3.47932 11.4921 3.2242L11.4921 9.03413e-06C8.29133 0.132881 5.41451 1.52048 3.33928 3.68633L11.0306 3.68615ZM14.2609 8.42821C14.2609 8.68334 14.0543 8.89016 13.7994 8.89016L0.406086 8.89043C0.81778 7.34998 1.52777 5.93103 2.46931 4.70043L13.7995 4.70024C14.0544 4.70023 14.261 4.90707 14.261 5.16221L14.2609 8.42821ZM20.6591 20.3137C18.5847 22.4787 15.7079 23.8663 12.5062 24L12.5063 20.7758C12.5063 20.5207 12.7129 20.3139 12.9678 20.3139L20.6591 20.3137ZM11.4924 23.9992C8.29157 23.8665 5.41401 22.4782 3.33969 20.3133L11.0309 20.3131C11.2858 20.3131 11.4924 20.52 11.4924 20.7751L11.4924 23.9992ZM17.5946 15.5703C17.5947 15.3152 17.8013 15.1083 18.0561 15.1083L23.5923 15.108C23.1806 16.6484 22.4714 18.0666 21.5291 19.298L18.0561 19.2983C17.8012 19.2983 17.5946 19.0914 17.5946 18.8363L17.5946 15.5703ZM8.84765 10.3544C8.85393 10.1039 9.05863 9.90407 9.30899 9.90407L23.8175 9.90396C23.9373 10.584 24 11.2842 24 11.9989C24 12.7136 23.9372 13.4138 23.8174 14.0939L9.31089 14.0933C9.06005 14.0932 8.85517 13.8927 8.84957 13.6416L8.80986 11.8617L8.84765 10.3544ZM16.7389 18.8372C16.7389 19.0923 16.5323 19.2991 16.2774 19.2991L2.46978 19.2992C1.52749 18.0679 0.818373 16.6498 0.406752 15.1093L16.2775 15.1092C16.5324 15.1092 16.739 15.316 16.739 15.5712L16.7389 18.8372ZM0.182552 9.90452L7.3636 9.90412C7.61849 9.90411 7.82511 10.1109 7.82511 10.3661L7.82503 13.6321C7.82503 13.8872 7.61842 14.0941 7.36355 14.0941L0.182447 14.0945C0.062664 13.4144 -1.71661e-05 12.7142 0 11.9995C1.71661e-05 11.2848 0.0627384 10.5846 0.182552 9.90452ZM15.2756 5.16214C15.2757 4.90701 15.4823 4.70019 15.7371 4.70019L21.5294 4.69998C22.4717 5.93135 23.1808 7.34943 23.5924 8.88987L15.7371 8.89013C15.4822 8.89014 15.2756 8.6833 15.2756 8.42816L15.2756 5.16214ZM12.5068 0C15.7076 0.132721 18.5852 1.52098 20.6595 3.68592L12.9682 3.6861C12.7133 3.6861 12.5067 3.47927 12.5067 3.22413L12.5068 0Z" fill="currentColor"></path></svg><!--/$--></button><div class="mt-3 max-sm:mt-0"><button type="button" aria-label="Open Account" class="cursor-pointer" aria-haspopup="dialog" aria-expanded="false" aria-controls="radix-_R_75j9_" data-state="closed"><div class="group/sidebar-footer flex w-full items-baseline justify-start text-sm/10 font-semibold text-foreground cursor-pointer"><span style="display:inline-block;width:42px;height:42px;"></span></div></button></div><a aria-label="Settings" href="/settings/package-manager" class="cursor-pointer rounded-md aria-[current=page]:bg-sidebar-accent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings text-foreground" aria-hidden="true"><path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"></path><circle cx="12" cy="12" r="3"></circle></svg><span class="hidden text-sm/6 font-semibold text-foreground">Settings</span></a></div></div><div class="relative flex flex-1 flex-col overflow-auto" id="content-view" data-scroll-restoration-id="content-view"><div class="relative isolate container mx-auto flex h-full flex-col"><div class="pointer-events-none fixed top-0 z-0 size-full bg-background"><svg width="1858" height="1256" viewBox="0 0 1858 1256" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_4090_11134)"><ellipse opacity="0.3" cx="478.092" cy="523.885" rx="983.498" ry="480.668" transform="rotate(36.3289 478.092 523.885)" fill="url(#paint0_radial_4090_11134)" fill-opacity="0.3"></ellipse><g opacity="0.3"><ellipse cx="1385.68" cy="503.347" rx="759.956" ry="331.584" transform="rotate(36.3289 1385.68 503.347)" fill="url(#paint1_radial_4090_11134)" fill-opacity="0.2" style="mix-blend-mode:screen"></ellipse></g></g><defs><radialGradient id="paint0_radial_4090_11134" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(500.331 508.304) rotate(89.0086) scale(508.666 1077.08)"><stop stop-color="white" stop-opacity="0"></stop><stop stop-color="#FF3FAC"></stop><stop offset="0.363434" stop-color="#9D25FC" stop-opacity="0.41"></stop><stop offset="0.745192" stop-color="#141718" stop-opacity="0"></stop></radialGradient><radialGradient id="paint1_radial_4090_11134" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(1385.68 503.347) rotate(90) scale(331.584 759.956)"><stop stop-color="#0084FF"></stop><stop offset="0.802885" stop-color="#141718" stop-opacity="0"></stop></radialGradient><clipPath id="clip0_4090_11134"><rect width="1858" height="1256" fill="white"></rect></clipPath></defs></svg></div><div class="relative z-10 m-8 flex flex-wrap justify-center gap-4 pt-12
|
|
1
|
+
<div data-ph-shell="generic" inert style="display:contents"><!--$--><div class="h-screen overflow-auto bg-background text-foreground"><!--$--><!--$--><div class="flex h-full items-stretch overflow-auto max-sm:has-[>[data-connect-sidebar]]:flex-col-reverse" role="presentation" tabindex="0"><div id="sidebar" data-connect-sidebar="" class="group z-1 flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground max-sm:h-auto max-sm:w-full max-sm:flex-row max-sm:pb-[env(safe-area-inset-bottom)]" style="--sidebar-width:58px"><div class="scrollbar-none flex-1 overflow-auto text-foreground transition-shadow max-sm:flex max-sm:overflow-x-auto max-sm:overflow-y-hidden"><nav aria-label="Drives and pages" class="flex flex-col max-sm:flex-row"></nav></div><div class="shrink-0 flex flex-col items-center gap-3 border-t border-sidebar-border px-2 py-4 max-sm:flex-row max-sm:border-t-0 max-sm:border-l max-sm:py-2 dark:border-none"><button aria-label="Home" type="button" class="cursor-pointer"><!--$--><svg class="text-muted-foreground" style="width:24px;height:24px" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.0306 3.68615C11.2854 3.68614 11.492 3.47932 11.4921 3.2242L11.4921 9.03413e-06C8.29133 0.132881 5.41451 1.52048 3.33928 3.68633L11.0306 3.68615ZM14.2609 8.42821C14.2609 8.68334 14.0543 8.89016 13.7994 8.89016L0.406086 8.89043C0.81778 7.34998 1.52777 5.93103 2.46931 4.70043L13.7995 4.70024C14.0544 4.70023 14.261 4.90707 14.261 5.16221L14.2609 8.42821ZM20.6591 20.3137C18.5847 22.4787 15.7079 23.8663 12.5062 24L12.5063 20.7758C12.5063 20.5207 12.7129 20.3139 12.9678 20.3139L20.6591 20.3137ZM11.4924 23.9992C8.29157 23.8665 5.41401 22.4782 3.33969 20.3133L11.0309 20.3131C11.2858 20.3131 11.4924 20.52 11.4924 20.7751L11.4924 23.9992ZM17.5946 15.5703C17.5947 15.3152 17.8013 15.1083 18.0561 15.1083L23.5923 15.108C23.1806 16.6484 22.4714 18.0666 21.5291 19.298L18.0561 19.2983C17.8012 19.2983 17.5946 19.0914 17.5946 18.8363L17.5946 15.5703ZM8.84765 10.3544C8.85393 10.1039 9.05863 9.90407 9.30899 9.90407L23.8175 9.90396C23.9373 10.584 24 11.2842 24 11.9989C24 12.7136 23.9372 13.4138 23.8174 14.0939L9.31089 14.0933C9.06005 14.0932 8.85517 13.8927 8.84957 13.6416L8.80986 11.8617L8.84765 10.3544ZM16.7389 18.8372C16.7389 19.0923 16.5323 19.2991 16.2774 19.2991L2.46978 19.2992C1.52749 18.0679 0.818373 16.6498 0.406752 15.1093L16.2775 15.1092C16.5324 15.1092 16.739 15.316 16.739 15.5712L16.7389 18.8372ZM0.182552 9.90452L7.3636 9.90412C7.61849 9.90411 7.82511 10.1109 7.82511 10.3661L7.82503 13.6321C7.82503 13.8872 7.61842 14.0941 7.36355 14.0941L0.182447 14.0945C0.062664 13.4144 -1.71661e-05 12.7142 0 11.9995C1.71661e-05 11.2848 0.0627384 10.5846 0.182552 9.90452ZM15.2756 5.16214C15.2757 4.90701 15.4823 4.70019 15.7371 4.70019L21.5294 4.69998C22.4717 5.93135 23.1808 7.34943 23.5924 8.88987L15.7371 8.89013C15.4822 8.89014 15.2756 8.6833 15.2756 8.42816L15.2756 5.16214ZM12.5068 0C15.7076 0.132721 18.5852 1.52098 20.6595 3.68592L12.9682 3.6861C12.7133 3.6861 12.5067 3.47927 12.5067 3.22413L12.5068 0Z" fill="currentColor"></path></svg><!--/$--></button><div class="mt-3 max-sm:mt-0"><button type="button" aria-label="Open Account" class="cursor-pointer" aria-haspopup="dialog" aria-expanded="false" aria-controls="radix-_R_75j9_" data-state="closed"><div class="group/sidebar-footer flex w-full items-baseline justify-start text-sm/10 font-semibold text-foreground cursor-pointer"><span style="display:inline-block;width:42px;height:42px;"></span></div></button></div><a aria-label="Settings" href="/settings/package-manager" class="cursor-pointer rounded-md aria-[current=page]:bg-sidebar-accent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings text-foreground" aria-hidden="true"><path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"></path><circle cx="12" cy="12" r="3"></circle></svg><span class="hidden text-sm/6 font-semibold text-foreground">Settings</span></a></div></div><div class="relative flex flex-1 flex-col overflow-auto" id="content-view" data-scroll-restoration-id="content-view"><div class="relative isolate container mx-auto flex h-full flex-col"><div class="pointer-events-none fixed top-0 z-0 size-full bg-background"><svg width="1858" height="1256" viewBox="0 0 1858 1256" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_4090_11134)"><ellipse opacity="0.3" cx="478.092" cy="523.885" rx="983.498" ry="480.668" transform="rotate(36.3289 478.092 523.885)" fill="url(#paint0_radial_4090_11134)" fill-opacity="0.3"></ellipse><g opacity="0.3"><ellipse cx="1385.68" cy="503.347" rx="759.956" ry="331.584" transform="rotate(36.3289 1385.68 503.347)" fill="url(#paint1_radial_4090_11134)" fill-opacity="0.2" style="mix-blend-mode:screen"></ellipse></g></g><defs><radialGradient id="paint0_radial_4090_11134" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(500.331 508.304) rotate(89.0086) scale(508.666 1077.08)"><stop stop-color="white" stop-opacity="0"></stop><stop stop-color="#FF3FAC"></stop><stop offset="0.363434" stop-color="#9D25FC" stop-opacity="0.41"></stop><stop offset="0.745192" stop-color="#141718" stop-opacity="0"></stop></radialGradient><radialGradient id="paint1_radial_4090_11134" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(1385.68 503.347) rotate(90) scale(331.584 759.956)"><stop stop-color="#0084FF"></stop><stop offset="0.802885" stop-color="#141718" stop-opacity="0"></stop></radialGradient><clipPath id="clip0_4090_11134"><rect width="1858" height="1256" fill="white"></rect></clipPath></defs></svg></div><div class="relative z-10 m-8 flex flex-wrap justify-center gap-4 pt-12"></div></div></div></div><!--/$--><!--/$--></div><!--/$--><div role="status" aria-label="Starting Connect" class="ph-shell-loader pointer-events-none fixed inset-0 z-10 flex items-center justify-center"><div data-ph-loader-slot="" class="animate-pulse rounded-full bg-background p-4 text-foreground shadow-lg motion-reduce:animate-none"><!--$--><svg style="width:40px;height:40px" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.0306 3.68615C11.2854 3.68614 11.492 3.47932 11.4921 3.2242L11.4921 9.03413e-06C8.29133 0.132881 5.41451 1.52048 3.33928 3.68633L11.0306 3.68615ZM14.2609 8.42821C14.2609 8.68334 14.0543 8.89016 13.7994 8.89016L0.406086 8.89043C0.81778 7.34998 1.52777 5.93103 2.46931 4.70043L13.7995 4.70024C14.0544 4.70023 14.261 4.90707 14.261 5.16221L14.2609 8.42821ZM20.6591 20.3137C18.5847 22.4787 15.7079 23.8663 12.5062 24L12.5063 20.7758C12.5063 20.5207 12.7129 20.3139 12.9678 20.3139L20.6591 20.3137ZM11.4924 23.9992C8.29157 23.8665 5.41401 22.4782 3.33969 20.3133L11.0309 20.3131C11.2858 20.3131 11.4924 20.52 11.4924 20.7751L11.4924 23.9992ZM17.5946 15.5703C17.5947 15.3152 17.8013 15.1083 18.0561 15.1083L23.5923 15.108C23.1806 16.6484 22.4714 18.0666 21.5291 19.298L18.0561 19.2983C17.8012 19.2983 17.5946 19.0914 17.5946 18.8363L17.5946 15.5703ZM8.84765 10.3544C8.85393 10.1039 9.05863 9.90407 9.30899 9.90407L23.8175 9.90396C23.9373 10.584 24 11.2842 24 11.9989C24 12.7136 23.9372 13.4138 23.8174 14.0939L9.31089 14.0933C9.06005 14.0932 8.85517 13.8927 8.84957 13.6416L8.80986 11.8617L8.84765 10.3544ZM16.7389 18.8372C16.7389 19.0923 16.5323 19.2991 16.2774 19.2991L2.46978 19.2992C1.52749 18.0679 0.818373 16.6498 0.406752 15.1093L16.2775 15.1092C16.5324 15.1092 16.739 15.316 16.739 15.5712L16.7389 18.8372ZM0.182552 9.90452L7.3636 9.90412C7.61849 9.90411 7.82511 10.1109 7.82511 10.3661L7.82503 13.6321C7.82503 13.8872 7.61842 14.0941 7.36355 14.0941L0.182447 14.0945C0.062664 13.4144 -1.71661e-05 12.7142 0 11.9995C1.71661e-05 11.2848 0.0627384 10.5846 0.182552 9.90452ZM15.2756 5.16214C15.2757 4.90701 15.4823 4.70019 15.7371 4.70019L21.5294 4.69998C22.4717 5.93135 23.1808 7.34943 23.5924 8.88987L15.7371 8.89013C15.4822 8.89014 15.2756 8.6833 15.2756 8.42816L15.2756 5.16214ZM12.5068 0C15.7076 0.132721 18.5852 1.52098 20.6595 3.68592L12.9682 3.6861C12.7133 3.6861 12.5067 3.47927 12.5067 3.22413L12.5068 0Z" fill="currentColor"></path></svg><!--/$--></div></div></div><script data-ph-shell="generic">(function(){if(!document.documentElement.classList.contains('ph-shell-route'))return;document.querySelectorAll('[data-ph-shell] [aria-current]').forEach(function(e){e.removeAttribute('aria-current');e.classList.remove('active')})})();</script>
|
package/dist/start-connect.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="bd2ed01c-26b1-55fa-bd5b-f1ef0b991a1e")}catch(e){}}();
|
|
3
|
-
import { t as bootConnect } from "./boot-
|
|
3
|
+
import { t as bootConnect } from "./boot-2vu8w50I.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region start-connect.tsx
|
|
6
6
|
const root = await bootConnect();
|
|
7
|
-
const components = root ? await import("./components-
|
|
7
|
+
const components = root ? await import("./components-D2xBHSmq.js") : null;
|
|
8
8
|
function updateLocalPackage(pkg) {
|
|
9
9
|
window.ph?.vetraPackageManager?.updateLocalPackage(pkg);
|
|
10
10
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import { c as Home, d as NodeView, f as DrivePending, m as AppLayout, n as settingsTabRoutes, p as RouteError, r as SettingsPage, s as DriveLayout } from "./settings-tabs-
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="280b81c5-b29f-5a9d-afd2-c3d606cbe306")}catch(e){}}();
|
|
3
|
+
import { c as Home, d as NodeView, f as DrivePending, m as AppLayout, n as settingsTabRoutes, p as RouteError, r as SettingsPage, s as DriveLayout } from "./settings-tabs-B4ejM9lL.js";
|
|
4
4
|
import { lazy } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/generic/modals.ts
|
|
7
|
-
const AddDriveModal = lazy(() => import("./AddDriveModal-
|
|
8
|
-
const ClearStorageModal = lazy(() => import("./ClearStorageModal-
|
|
7
|
+
const AddDriveModal = lazy(() => import("./AddDriveModal-zMepHdWt.js").then((m) => ({ default: m.AddDriveModal })));
|
|
8
|
+
const ClearStorageModal = lazy(() => import("./ClearStorageModal-DgGxtQaQ.js").then((m) => ({ default: m.ClearStorageModal })));
|
|
9
9
|
const CreateDocumentModal = lazy(() => import("./CreateDocumentModal-CiIW3pzx.js").then((m) => ({ default: m.CreateDocumentModal })));
|
|
10
|
-
const DebugSettingsModal = lazy(() => import("./DebugSettingsModal-
|
|
10
|
+
const DebugSettingsModal = lazy(() => import("./DebugSettingsModal-DycU6WFC.js").then((m) => ({ default: m.DebugSettingsModal })));
|
|
11
11
|
const DeleteDriveModal = lazy(() => import("./DeleteDriveModal-1pAIayG_.js").then((m) => ({ default: m.DeleteDriveModal })));
|
|
12
12
|
const DeleteItemModal = lazy(() => import("./DeleteItemModal-BUpqmFxS.js").then((m) => ({ default: m.DeleteItemModal })));
|
|
13
13
|
const DisclaimerModal = lazy(() => import("./DisclaimerModal-TIJXRYLF.js").then((m) => ({ default: m.DisclaimerModal })));
|
|
@@ -30,7 +30,7 @@ const genericModals = {
|
|
|
30
30
|
downloadDocumentWithErrors: DownloadDocumentWithErrorsModal,
|
|
31
31
|
documentVersionUnsupported: DocumentVersionUnsupportedModal,
|
|
32
32
|
confirmDocumentUpgrade: ConfirmDocumentUpgradeModal,
|
|
33
|
-
inspector: lazy(() => import("./InspectorModal-
|
|
33
|
+
inspector: lazy(() => import("./InspectorModal-CmMSRdJq.js").then((m) => ({ default: m.InspectorModal }))),
|
|
34
34
|
upgradeDrive: UpgradeDriveModal,
|
|
35
35
|
driveAuthRequired: lazy(() => import("./DriveAuthRequiredModal-XTcoJKvj.js").then((m) => ({ default: m.DriveAuthRequiredModal }))),
|
|
36
36
|
login: lazy(() => import("./LoginModal-O06ZvWFI.js").then((m) => ({ default: m.LoginModal })))
|
|
@@ -62,5 +62,5 @@ const genericUi = {
|
|
|
62
62
|
//#endregion
|
|
63
63
|
export { genericUi as default };
|
|
64
64
|
|
|
65
|
-
//# sourceMappingURL=ui-
|
|
66
|
-
//# debugId=
|
|
65
|
+
//# sourceMappingURL=ui-CyxG0yU5.js.map
|
|
66
|
+
//# debugId=280b81c5-b29f-5a9d-afd2-c3d606cbe306
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-
|
|
1
|
+
{"version":3,"file":"ui-CyxG0yU5.js","sources":["../src/generic/modals.ts","../src/generic/ui.tsx"],"sourcesContent":["import type { ConnectModals } from \"@powerhousedao/connect-core/router\";\nimport { lazy } from \"react\";\n\nconst AddDriveModal = lazy(() =>\n import(\"./modals/AddDriveModal.js\").then((m) => ({\n default: m.AddDriveModal,\n })),\n);\nconst ClearStorageModal = lazy(() =>\n import(\"./modals/ClearStorageModal.js\").then((m) => ({\n default: m.ClearStorageModal,\n })),\n);\nconst CreateDocumentModal = lazy(() =>\n import(\"./modals/CreateDocumentModal.js\").then((m) => ({\n default: m.CreateDocumentModal,\n })),\n);\nconst DebugSettingsModal = lazy(() =>\n import(\"./modals/DebugSettingsModal.js\").then((m) => ({\n default: m.DebugSettingsModal,\n })),\n);\nconst DeleteDriveModal = lazy(() =>\n import(\"./modals/DeleteDriveModal.js\").then((m) => ({\n default: m.DeleteDriveModal,\n })),\n);\nconst DeleteItemModal = lazy(() =>\n import(\"./modals/DeleteItemModal.js\").then((m) => ({\n default: m.DeleteItemModal,\n })),\n);\nconst DisclaimerModal = lazy(() =>\n import(\"./modals/DisclaimerModal.js\").then((m) => ({\n default: m.DisclaimerModal,\n })),\n);\nconst DriveSettingsModal = lazy(() =>\n import(\"./modals/DriveSettingsModal.js\").then((m) => ({\n default: m.DriveSettingsModal,\n })),\n);\nconst DownloadDocumentWithErrorsModal = lazy(() =>\n import(\"./modals/DownloadDocumentWithErrorsModal.js\").then((m) => ({\n default: m.DownloadDocumentWithErrorsModal,\n })),\n);\nconst DocumentVersionUnsupportedModal = lazy(() =>\n import(\"./modals/DocumentVersionUnsupportedModal.js\").then((m) => ({\n default: m.DocumentVersionUnsupportedModal,\n })),\n);\nconst ConfirmDocumentUpgradeModal = lazy(() =>\n import(\"./modals/ConfirmDocumentUpgradeModal.js\").then((m) => ({\n default: m.ConfirmDocumentUpgradeModal,\n })),\n);\nconst UpgradeDriveModal = lazy(() =>\n import(\"./modals/UpgradeDriveModal.js\").then((m) => ({\n default: m.UpgradeDriveModal,\n })),\n);\nconst InspectorModal = lazy(() =>\n import(\"./modals/InspectorModal/index.js\").then((m) => ({\n default: m.InspectorModal,\n })),\n);\nconst DriveAuthRequiredModal = lazy(() =>\n import(\"./modals/DriveAuthRequiredModal.js\").then((m) => ({\n default: m.DriveAuthRequiredModal,\n })),\n);\nconst LoginModal = lazy(() =>\n import(\"./modals/LoginModal.js\").then((m) => ({\n default: m.LoginModal,\n })),\n);\n\n/** The generic plugin's modals: its chrome's, and core's in its style.\n * \"settings\" is a page; showPHModal navigates to it. */\nexport const genericModals: ConnectModals = {\n addDrive: AddDriveModal,\n clearStorage: ClearStorageModal,\n createDocument: CreateDocumentModal,\n debugSettings: DebugSettingsModal,\n deleteDrive: DeleteDriveModal,\n deleteItem: DeleteItemModal,\n disclaimer: DisclaimerModal,\n driveSettings: DriveSettingsModal,\n downloadDocumentWithErrors: DownloadDocumentWithErrorsModal,\n documentVersionUnsupported: DocumentVersionUnsupportedModal,\n confirmDocumentUpgrade: ConfirmDocumentUpgradeModal,\n inspector: InspectorModal,\n upgradeDrive: UpgradeDriveModal,\n driveAuthRequired: DriveAuthRequiredModal,\n login: LoginModal,\n};\n","// The generic plugin's UI: Connect's sidebar, drives, editors, settings and\n// modals over core's routes. Loaded only while the plugin is active.\nimport type { ConnectPluginUi } from \"@powerhousedao/connect-core/plugins\";\nimport { AppLayout } from \"./layout/app-layout.js\";\nimport { DrivePending, RouteError } from \"./layout/route-views.js\";\nimport { genericModals } from \"./modals.js\";\nimport { DriveLayout, Home, NodeView } from \"./pages/content.js\";\nimport { SettingsPage } from \"./settings/tabs.js\";\nimport { settingsTabRoutes } from \"./settings-tabs.js\";\n\nconst GenericLayout = () => <AppLayout />;\n\nconst genericUi: ConnectPluginUi = {\n routes: {\n \"/_app\": { component: GenericLayout },\n \"/_app/\": { component: Home },\n \"/_app/d/$driveSlug\": {\n component: DriveLayout,\n pendingComponent: DrivePending,\n },\n \"/_app/d/$driveSlug/{-$nodeSlug}\": {\n component: NodeView,\n pendingComponent: DrivePending,\n },\n \"/_app/settings\": { component: SettingsPage },\n // Core's tabs; the package manager and the theme toggle replace them.\n \"/_app/settings/appearance\": { staticData: { settings: undefined } },\n \"/_app/settings/packages\": { staticData: { settings: undefined } },\n },\n addRoutes: settingsTabRoutes,\n modals: genericModals,\n errorComponent: RouteError,\n commonEditors: true,\n};\n\nexport default genericUi;\n"],"names":[],"mappings":";;;;;;AAGA,MAAM,gBAAgB,WACpB,OAAO,8BAA4B,CAAC,MAAM,OAAO,EAC/C,SAAS,EAAE,cACb,EAAE,CACJ;AACA,MAAM,oBAAoB,WACxB,OAAO,kCAAgC,CAAC,MAAM,OAAO,EACnD,SAAS,EAAE,kBACb,EAAE,CACJ;AACA,MAAM,sBAAsB,WAC1B,OAAO,oCAAkC,CAAC,MAAM,OAAO,EACrD,SAAS,EAAE,oBACb,EAAE,CACJ;AACA,MAAM,qBAAqB,WACzB,OAAO,mCAAiC,CAAC,MAAM,OAAO,EACpD,SAAS,EAAE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MAAM,sBAAsB,oBAAC,WAAD,CAAY,CAAA;AAExC,MAAM,YAA6B;CACjC,QAAQ;EACN,SAAS,EAAE,WAAW,cAAc;EACpC,UAAU,EAAE,WAAW,KAAK;EAC5B,sBAAsB;GACpB,WAAW;GACX,kBAAkB;EACpB;EACA,mCAAmC;GACjC,WAAW;GACX,kBAAkB;EACpB;EACA,kBAAkB,EAAE,WAAW,aAAa;EAE5C,6BAA6B,EAAE,YAAY,EAAE,UAAU,KAAA,EAAU,EAAE;EACnE,2BAA2B,EAAE,YAAY,EAAE,UAAU,KAAA,EAAU,EAAE;CACnE;CACA,WAAW;CACX,QAAQ;CACR,gBAAgB;CAChB,eAAe;AACjB","debug_id":"280b81c5-b29f-5a9d-afd2-c3d606cbe306"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/connect",
|
|
3
3
|
"productName": "Powerhouse-Connect",
|
|
4
|
-
"version": "6.2.3-dev.
|
|
4
|
+
"version": "6.2.3-dev.87",
|
|
5
5
|
"description": "Powerhouse Connect",
|
|
6
6
|
"main": "dist/index.html",
|
|
7
7
|
"type": "module",
|
|
@@ -108,27 +108,27 @@
|
|
|
108
108
|
"@openfeature/core": "1.9.1",
|
|
109
109
|
"@openfeature/web-sdk": "1.6.2",
|
|
110
110
|
"@openpanel/web": "^1.4.1",
|
|
111
|
-
"@powerhousedao/config": "6.2.3-dev.
|
|
112
|
-
"@powerhousedao/connect-core": "6.2.3-dev.
|
|
113
|
-
"@powerhousedao/design-system": "6.2.3-dev.
|
|
111
|
+
"@powerhousedao/config": "6.2.3-dev.87",
|
|
112
|
+
"@powerhousedao/connect-core": "6.2.3-dev.87",
|
|
113
|
+
"@powerhousedao/design-system": "6.2.3-dev.87",
|
|
114
114
|
"@powerhousedao/document-engineering": "1.40.5",
|
|
115
|
-
"@powerhousedao/host-core": "6.2.3-dev.
|
|
116
|
-
"@powerhousedao/powerhouse-vetra-packages": "6.2.3-dev.
|
|
117
|
-
"@powerhousedao/reactor": "6.2.3-dev.
|
|
118
|
-
"@powerhousedao/reactor-attachments": "6.2.3-dev.
|
|
119
|
-
"@powerhousedao/reactor-browser": "6.2.3-dev.
|
|
120
|
-
"@powerhousedao/reactor-mcp": "6.2.3-dev.
|
|
121
|
-
"@powerhousedao/reactor-router": "6.2.3-dev.
|
|
122
|
-
"@powerhousedao/shared": "6.2.3-dev.
|
|
123
|
-
"@powerhousedao/vetra": "6.2.3-dev.
|
|
124
|
-
"@powerhousedao/workflow": "6.2.3-dev.
|
|
115
|
+
"@powerhousedao/host-core": "6.2.3-dev.87",
|
|
116
|
+
"@powerhousedao/powerhouse-vetra-packages": "6.2.3-dev.87",
|
|
117
|
+
"@powerhousedao/reactor": "6.2.3-dev.87",
|
|
118
|
+
"@powerhousedao/reactor-attachments": "6.2.3-dev.87",
|
|
119
|
+
"@powerhousedao/reactor-browser": "6.2.3-dev.87",
|
|
120
|
+
"@powerhousedao/reactor-mcp": "6.2.3-dev.87",
|
|
121
|
+
"@powerhousedao/reactor-router": "6.2.3-dev.87",
|
|
122
|
+
"@powerhousedao/shared": "6.2.3-dev.87",
|
|
123
|
+
"@powerhousedao/vetra": "6.2.3-dev.87",
|
|
124
|
+
"@powerhousedao/workflow": "6.2.3-dev.87",
|
|
125
125
|
"@privy-io/react-auth": "3.35.0",
|
|
126
126
|
"@rainbow-me/rainbowkit": "^2.2.11",
|
|
127
|
-
"@renown/sdk": "6.2.3-dev.
|
|
127
|
+
"@renown/sdk": "6.2.3-dev.87",
|
|
128
128
|
"@sentry/react": "^10.17.0",
|
|
129
129
|
"@tailwindcss/node": "4.2.2",
|
|
130
130
|
"@tanstack/react-query": "^5.90.2",
|
|
131
|
-
"document-model": "6.2.3-dev.
|
|
131
|
+
"document-model": "6.2.3-dev.87",
|
|
132
132
|
"i18next": "^25.5.3",
|
|
133
133
|
"kysely": "0.28.16",
|
|
134
134
|
"kysely-pglite-dialect": "1.2.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AddDriveModal-CFi-9FQU.js","sources":["../src/generic/pages/create-drive-app-options.ts","../src/generic/modals/AddDriveModal.tsx"],"sourcesContent":["import type { AppOptions } from \"@powerhousedao/design-system/connect\";\nimport type { DocumentModelLib, EditorModule, Manifest } from \"document-model\";\n\n// Create Drive picker order: installed/custom apps first (rank 0), then the\n// generic explorer, then the vetra drive app last.\nconst DRIVE_APP_RANK: Record<string, number> = {\n GenericDriveExplorer: 1,\n \"vetra-drive-app\": 2,\n};\n\nconst POWERHOUSE_SCOPE = \"@powerhousedao\";\n\n/** Who built a package's apps: its publisher, else its name; Powerhouse for\n * Powerhouse's own packages. */\nexport function appPublisher(manifest: Manifest | undefined) {\n const publisher = manifest?.publisher?.name?.trim();\n const name = manifest?.name.trim();\n if (publisher === POWERHOUSE_SCOPE) return \"Powerhouse\";\n if (publisher) return publisher;\n if (!name || name.startsWith(`${POWERHOUSE_SCOPE}/`)) return \"Powerhouse\";\n return name;\n}\n\nexport function getCreateDriveAppOptions(\n appModules: EditorModule[] | undefined,\n packages: readonly DocumentModelLib[] = [],\n): AppOptions[] {\n if (!appModules?.length) {\n return [];\n }\n\n return appModules\n .map((module) => ({\n id: module.config.id,\n name: module.config.name,\n builtBy: appPublisher(\n packages.find((pkg) => pkg.editors.includes(module))?.manifest,\n ),\n sharingType: \"LOCAL\" as const,\n availableOffline: false,\n }))\n .sort((a, b) => (DRIVE_APP_RANK[a.id] ?? 0) - (DRIVE_APP_RANK[b.id] ?? 0));\n}\n","import { toast } from \"@powerhousedao/connect/services\";\nimport type {\n AddRemoteDriveInput,\n AppOptions,\n} from \"@powerhousedao/design-system/connect\";\nimport { AddDriveModal as ConnectAddLocalDriveModal } from \"@powerhousedao/design-system/connect\";\nimport {\n addDrive,\n addRemoteDrive,\n closePHModal,\n extractDriveSlugFromPath,\n fetchDriveInfo,\n getFullReactorClient,\n getDrives,\n getPHNavigation,\n setSelectedDrive,\n useAppModules,\n usePHModal,\n useVetraPackages,\n waitForDocumentReady,\n getPHStore,\n} from \"@powerhousedao/reactor-browser\";\nimport { t } from \"i18next\";\nimport { getCreateDriveAppOptions } from \"../pages/create-drive-app-options.js\";\n\n// Max wait for a remote drive's initial sync before skipping navigation.\n// Safe to be generous: navigation only fires if the user is still on home.\nconst REMOTE_DRIVE_NAV_TIMEOUT_MS = 30_000;\n\nexport function AddDriveModal() {\n const phModal = usePHModal();\n const open = phModal?.type === \"addDrive\";\n const appModules = useAppModules();\n const packages = useVetraPackages();\n const onAddLocalDrive = async (data: AppOptions) => {\n try {\n const app = appModules?.find((a) => a.config.id === data.id);\n const newDrive = await addDrive(\n {\n id: \"\",\n slug: \"\",\n global: {\n name: data.name,\n icon: null,\n },\n local: {\n availableOffline: data.availableOffline,\n sharingType: data.sharingType.toLowerCase(),\n listeners: [],\n triggers: [],\n },\n },\n app?.config.id,\n );\n\n toast(t(\"notifications.addDriveSuccess\"), {\n type: \"connect-success\",\n });\n\n if (!newDrive) {\n return;\n }\n\n setSelectedDrive(newDrive);\n } catch (e) {\n console.error(e);\n }\n };\n\n const onAddRemoteDrive = async (data: AddRemoteDriveInput) => {\n try {\n const driveId = await addRemoteDrive(data.url, data.id);\n\n toast(t(\"notifications.addDriveSuccess\"), {\n type: \"connect-success\",\n });\n\n // Navigate into the drive if its initial sync lands in time.\n // Not awaited so the modal closes immediately.\n // waiting for the drive and listing drives both need the full reactor client\n const reactorClient = getFullReactorClient();\n // Only a still unselected, un-pinned (home) view gets pulled into the\n // new drive — the user may have navigated elsewhere meanwhile.\n const stillOnHome = () =>\n !getPHStore()?.selectedDriveId &&\n !extractDriveSlugFromPath(getPHNavigation().location().pathname);\n void (async () => {\n try {\n if (!reactorClient) {\n return;\n }\n await waitForDocumentReady(reactorClient, driveId, {\n timeoutMs: REMOTE_DRIVE_NAV_TIMEOUT_MS,\n });\n const drives = await getDrives(reactorClient);\n const drive = drives.find((d) => d.header.id === driveId);\n if (drive && stillOnHome()) {\n setSelectedDrive(drive);\n }\n } catch {\n // sync still in flight — the drive shows up on home once it lands\n }\n })();\n } catch (e) {\n console.error(e);\n }\n };\n async function onAddLocalDriveSubmit(data: AppOptions) {\n await onAddLocalDrive(data);\n closePHModal();\n }\n\n async function onAddRemoteDriveSubmit(data: AddRemoteDriveInput) {\n await onAddRemoteDrive(data);\n closePHModal();\n }\n\n const ready = !!appModules?.length;\n\n return (\n <ConnectAddLocalDriveModal\n open={open && ready}\n onAddLocalDrive={(data) => {\n void onAddLocalDriveSubmit(data);\n }}\n onAddRemoteDrive={(data) => {\n void onAddRemoteDriveSubmit(data);\n }}\n requestPublicDrive={(url: string) => fetchDriveInfo(url)}\n onOpenChange={(status) => {\n if (!status) return closePHModal();\n }}\n appOptions={getCreateDriveAppOptions(appModules, packages)}\n />\n );\n}\n"],"names":["ConnectAddLocalDriveModal"],"mappings":";;;;;;;;AAKA,MAAM,iBAAyC;CAC7C,sBAAsB;CACtB,mBAAmB;AACrB;AAEA,MAAM,mBAAmB;;;AAIzB,SAAgB,aAAa,UAAgC;CAC3D,MAAM,YAAY,UAAU,WAAW,MAAM,KAAK;CAClD,MAAM,OAAO,UAAU,KAAK,KAAK;CACjC,IAAI,cAAc,kBAAkB,OAAO;CAC3C,IAAI,WAAW,OAAO;CACtB,IAAI,CAAC,QAAQ,KAAK,WAAW,GAAG,iBAAiB,EAAE,GAAG,OAAO;CAC7D,OAAO;AACT;AAEA,SAAgB,yBACd,YACA,WAAwC,CAAC,GAC3B;CACd,IAAI,CAAC,YAAY,QACf,OAAO,CAAC;CAGV,OAAO,WACJ,KAAK,YAAY;EAChB,IAAI,OAAO,OAAO;EAClB,MAAM,OAAO,OAAO;EACpB,SAAS,aACP,SAAS,MAAM,QAAQ,IAAI,QAAQ,SAAS,MAAM,CAAC,CAAC,EAAE,QACxD;EACA,aAAa;EACb,kBAAkB;CACpB,EAAE,CAAC,CACF,MAAM,GAAG,OAAO,eAAe,EAAE,OAAO,MAAM,eAAe,EAAE,OAA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GACV,QAAQ,MAAM,CAAC;EACjB;CACF;CACA,eAAe,sBAAsB,MAAkB;EACrD,MAAM,gBAAgB,IAAI;EAC1B,aAAa;CACf;CAEA,eAAe,uBAAuB,MAA2B;EAC/D,MAAM,iBAAiB,IAAI;EAC3B,aAAa;CACf;CAEA,MAAM,QAAQ,CAAC,CAAC,YAAY;CAE5B,OACE,oBAACA,iBAAD;EACE,MAAM,QAAQ;EACd,kBAAkB,SAAS;GACzB,sBAA2B,IAAI;EACjC;EACA,mBAAmB,SAAS;GAC1B,uBAA4B,IAAI;EAClC;EACA,qBAAqB,QAAgB,eAAe,GAAG;EACvD,eAAe,WAAW;GACxB,IAAI,CAAC,QAAQ,OAAO,aAAa;EACnC;EACA,YAAY,yBAAyB,YAAY,QAAQ;CAC1D,CAAA;AAEL","debug_id":"833031f4-ac9a-5f26-8f52-c6488e1a5a9f"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InspectorModal-CCY7tds_.js","sources":["../src/generic/modals/InspectorModal/useCatchUpInspector.ts","../src/generic/modals/InspectorModal/useDbExplorer.ts","../src/generic/modals/InspectorModal/useDebugInspector.ts","../src/generic/modals/InspectorModal/useIntegrityInspector.ts","../src/generic/modals/InspectorModal/useProcessorsInspector.ts","../src/generic/modals/InspectorModal/useQueueInspector.ts","../src/generic/modals/InspectorModal/useRemotesInspector.ts","../src/generic/modals/InspectorModal/useWorkerInspector.ts","../src/generic/modals/InspectorModal/InspectorModal.tsx"],"sourcesContent":["import type {\n CatchUpInspectorProps,\n CatchUpStatus,\n} from \"@powerhousedao/design-system/connect\";\nimport { useReactorClientModule } from \"@powerhousedao/reactor-browser\";\nimport { useCallback, useState } from \"react\";\n\nexport function useCatchUpInspector(): CatchUpInspectorProps | undefined {\n const module = useReactorClientModule();\n const catchUp =\n module?.kind === \"browser\" ? module.reactorModule?.catchUp : undefined;\n const inspector = module?.kind === \"worker\" ? module.inspector : undefined;\n const [status, setStatus] = useState<CatchUpStatus | undefined>();\n\n const onRefresh = useCallback(async (): Promise<void> => {\n if (inspector) {\n setStatus((await inspector.getCatchUpStatus()) as CatchUpStatus);\n return;\n }\n if (catchUp) {\n setStatus(catchUp.status());\n }\n }, [catchUp, inspector]);\n\n const onSweepNow = useCallback(async (): Promise<void> => {\n if (inspector) {\n await inspector.sweepCatchUp();\n return;\n }\n if (catchUp) {\n await catchUp.sweepNow();\n }\n }, [catchUp, inspector]);\n\n if (!catchUp && !inspector) {\n return undefined;\n }\n\n return {\n status,\n onRefresh,\n onSweepNow,\n };\n}\n","import type { PGlite } from \"@electric-sql/pglite\";\nimport {\n getCachedReactorPgMajor,\n loadPgDump,\n resolvePgMajorForRuntime,\n} from \"@powerhousedao/connect/utils\";\nimport type {\n FilterGroup,\n SortOptions,\n} from \"@powerhousedao/design-system/connect\";\nimport type { Database } from \"@powerhousedao/reactor\";\nimport {\n REACTOR_SCHEMA,\n useDatabase,\n usePGlite,\n useReactorClientModule,\n type IQueue,\n} from \"@powerhousedao/reactor-browser\";\nimport type { IInspectorProxy } from \"@powerhousedao/reactor-browser/rpc\";\nimport { Kysely, sql } from \"kysely\";\nimport { PGliteDialect } from \"kysely-pglite-dialect\";\nimport { useCallback, useMemo } from \"react\";\n\nasync function quiesceQueue(queue: IQueue): Promise<void> {\n await new Promise<void>((resolve) => queue.block(() => resolve()));\n}\n\n// The reactor runs with `relaxedDurability: true`, which makes PGlite's\n// `syncToFs()` fire the IDBFS→IndexedDB write and return without awaiting\n// Emscripten's syncfs callback. `close()` also doesn't flush. Calling\n// `FS.syncfs(false, cb)` directly gives us a callback that fires from the\n// IDBFS transaction's `oncomplete` — i.e. after IDB has actually committed.\nasync function syncPgliteToIdb(pglite: {\n readonly Module: {\n readonly FS: {\n syncfs(populate: boolean, cb: (err: Error | null) => void): void;\n };\n };\n}): Promise<void> {\n await new Promise<void>((resolve, reject) => {\n pglite.Module.FS.syncfs(false, (err) => (err ? reject(err) : resolve()));\n });\n}\n\ntype ColumnInfo = {\n readonly name: string;\n readonly dataType: string;\n readonly isNullable: boolean;\n};\n\ntype TableInfo = {\n readonly name: string;\n readonly columns: ColumnInfo[];\n};\n\ntype ColumnRow = {\n table_name: string;\n column_name: string;\n data_type: string;\n is_nullable: string;\n};\n\ntype GetTableRowsOptions = {\n readonly schema?: string;\n readonly limit: number;\n readonly offset: number;\n readonly sort?: SortOptions;\n readonly filters?: FilterGroup;\n};\n\ntype TablePage = {\n readonly columns: string[];\n readonly rows: Record<string, unknown>[];\n readonly total: number | null;\n};\n\nconst PRIORITY_COLUMNS = [\n \"documentType\",\n \"documentId\",\n \"scope\",\n \"branch\",\n \"index\",\n \"skip\",\n] as const;\n\ntype ReactorPgliteAdapter = {\n query: (\n sql: string,\n params?: unknown[],\n ) => Promise<{ rows: unknown[]; affectedRows?: number }>;\n};\n\nfunction createWorkerReactorDatabase(\n inspector: IInspectorProxy,\n): Kysely<Database> {\n const adapter: ReactorPgliteAdapter = {\n query: async (statement, params) => ({\n rows: (await inspector.queryReactorDb(statement, params)) as unknown[],\n }),\n };\n return new Kysely<Database>({\n dialect: new PGliteDialect(adapter as unknown as PGlite),\n });\n}\n\nexport function useDbExplorer() {\n const browserDatabase = useDatabase();\n const pglite = usePGlite();\n const module = useReactorClientModule();\n const reactorClientModule = module?.kind === \"browser\" ? module : undefined;\n const reactor = reactorClientModule?.reactorModule?.reactor;\n const queue = reactorClientModule?.reactorModule?.queue;\n const workerModule = module?.kind === \"worker\" ? module : undefined;\n const workerDatabase = useMemo(\n () =>\n workerModule\n ? createWorkerReactorDatabase(workerModule.inspector)\n : undefined,\n [workerModule],\n );\n const database = browserDatabase ?? workerDatabase;\n\n const getTables = useCallback(async (): Promise<TableInfo[]> => {\n if (!database) return [];\n\n const result = await sql<ColumnRow>`\n SELECT\n c.table_name,\n c.column_name,\n c.data_type,\n c.is_nullable\n FROM information_schema.columns c\n INNER JOIN information_schema.tables t\n ON c.table_name = t.table_name\n AND c.table_schema = t.table_schema\n WHERE c.table_schema = ${REACTOR_SCHEMA}\n AND t.table_type = 'BASE TABLE'\n ORDER BY c.table_name, c.ordinal_position\n `.execute(database);\n\n const tableMap = new Map<string, ColumnInfo[]>();\n for (const row of result.rows) {\n if (!tableMap.has(row.table_name)) {\n tableMap.set(row.table_name, []);\n }\n tableMap.get(row.table_name)!.push({\n name: row.column_name,\n dataType: row.data_type,\n isNullable: row.is_nullable === \"YES\",\n });\n }\n\n return Array.from(tableMap).map(([name, columns]) => {\n const columnNames = columns.map((col) => col.name);\n const orderedColumns = [\n ...PRIORITY_COLUMNS.filter((col) => columnNames.includes(col)).map(\n (col) => columns.find((c) => c.name === col)!,\n ),\n ...columns.filter(\n (col) =>\n !PRIORITY_COLUMNS.includes(\n col.name as (typeof PRIORITY_COLUMNS)[number],\n ),\n ),\n ];\n return {\n name,\n columns: orderedColumns,\n };\n });\n }, [database]);\n\n const getTableRows = useCallback(\n async (table: string, options: GetTableRowsOptions): Promise<TablePage> => {\n if (!database) {\n return { columns: [], rows: [], total: null };\n }\n\n const limit = options.limit;\n const offset = options.offset;\n const sort = options.sort;\n const filters = options.filters;\n const tableRef = sql.raw(`${REACTOR_SCHEMA}.\"${table}\"`);\n\n // Build WHERE clause from filters\n let whereClause = sql``;\n if (filters?.clauses && filters.clauses.length > 0) {\n const conditions: ReturnType<typeof sql>[] = [];\n\n for (let i = 0; i < filters.clauses.length; i++) {\n const clause = filters.clauses[i];\n if (!clause) continue;\n\n const columnRef = sql.raw(`\"${clause.column}\"`);\n\n let condition: ReturnType<typeof sql>;\n\n if (clause.operator === \"IS NULL\") {\n condition = sql`${columnRef} IS NULL`;\n } else if (clause.operator === \"IS NOT NULL\") {\n condition = sql`${columnRef} IS NOT NULL`;\n } else if (\n clause.operator === \"LIKE\" ||\n clause.operator === \"ILIKE\"\n ) {\n const value = clause.value;\n const operator =\n clause.operator === \"LIKE\" ? sql`LIKE` : sql`ILIKE`;\n condition = sql`${columnRef} ${operator} ${value}`;\n } else {\n // For =, !=, >, <, >=, <=\n const operator = sql.raw(clause.operator);\n const value = clause.value;\n\n // Try to parse as number if it looks like a number\n let parsedValue: string | number = value;\n if (value !== \"\" && !isNaN(Number(value)) && value.trim() !== \"\") {\n parsedValue = Number(value);\n }\n\n condition = sql`${columnRef} ${operator} ${parsedValue}`;\n }\n\n conditions.push(condition);\n\n // Add connector if not the last clause\n if (i < filters.clauses.length - 1) {\n const connector = filters.connectors?.[i] ?? \"AND\";\n conditions.push(sql.raw(connector));\n }\n }\n\n // Combine all conditions\n if (conditions.length > 0) {\n whereClause = sql`WHERE ${sql.join(conditions, sql` `)}`;\n }\n }\n\n // Build main query\n let query;\n if (sort) {\n const columnRef = sql.raw(`\"${sort.column}\"`);\n const direction = sort.direction === \"desc\" ? sql`DESC` : sql`ASC`;\n query = sql<Record<string, unknown>>`\n SELECT * FROM ${tableRef}\n ${whereClause}\n ORDER BY ${columnRef} ${direction}\n LIMIT ${limit} OFFSET ${offset}\n `;\n } else {\n query = sql<Record<string, unknown>>`\n SELECT * FROM ${tableRef}\n ${whereClause}\n LIMIT ${limit} OFFSET ${offset}\n `;\n }\n\n const result = await query.execute(database);\n\n // Build count query with same filters\n const countQuery = sql<{ count: string }>`\n SELECT COUNT(*) as count FROM ${tableRef}\n ${whereClause}\n `;\n const countResult = await countQuery.execute(database);\n const total = countResult.rows[0]\n ? parseInt(countResult.rows[0].count, 10)\n : null;\n\n const rawColumns =\n result.rows.length > 0 ? Object.keys(result.rows[0]) : [];\n const columns = [\n ...PRIORITY_COLUMNS.filter((col) => rawColumns.includes(col)),\n ...rawColumns.filter(\n (col) =>\n !PRIORITY_COLUMNS.includes(\n col as (typeof PRIORITY_COLUMNS)[number],\n ),\n ),\n ];\n\n return {\n columns,\n rows: result.rows,\n total,\n };\n },\n [database],\n );\n\n const onExportDb = useCallback(async () => {\n if (!pglite) return;\n\n if (queue) await quiesceQueue(queue);\n\n try {\n const major = resolvePgMajorForRuntime(getCachedReactorPgMajor() ?? null);\n const pgDump = await loadPgDump(major);\n const dump = await pgDump({ pg: pglite });\n const sqlContent = await dump.text();\n\n const blob = new Blob([sqlContent], { type: \"text/sql\" });\n const url = URL.createObjectURL(blob);\n const a = document.createElement(\"a\");\n a.href = url;\n a.download = `database-export-${Date.now()}.sql`;\n a.click();\n URL.revokeObjectURL(url);\n } finally {\n queue?.unblock();\n }\n }, [pglite, queue]);\n\n const onImportDb = useCallback(\n async (sqlContent: string) => {\n if (!pglite) return;\n\n if (queue) await quiesceQueue(queue);\n\n if (reactor) {\n const status = reactor.kill();\n await status.completed;\n }\n\n // drop every user-created schema before restoring\n await pglite.transaction(async (tx) => {\n const schemas = await tx.query<{ nspname: string }>(\n `SELECT nspname FROM pg_namespace\n WHERE nspname NOT IN ('pg_catalog', 'pg_toast', 'information_schema', 'public')\n AND nspname NOT LIKE 'pg_temp_%'\n AND nspname NOT LIKE 'pg_toast_temp_%'`,\n );\n for (const { nspname } of schemas.rows) {\n await tx.exec(`DROP SCHEMA IF EXISTS \"${nspname}\" CASCADE`);\n }\n try {\n await tx.exec(\"SET standard_conforming_strings = off;\");\n } catch {\n // PG17 still accepts this but log if it ever fails.\n }\n await tx.exec(sqlContent);\n await tx.exec(`SET search_path TO ${REACTOR_SCHEMA}`);\n });\n\n // flush IDBFS → IndexedDB synchronously\n await syncPgliteToIdb(pglite);\n\n window.location.reload();\n\n // reload() is asynchronous; without blocking here the DBExplorer caller\n // would continue and call loadTables() against an in-flight shutdown.\n await new Promise(() => {});\n },\n [pglite, queue, reactor],\n );\n\n const getDefaultSort = useCallback(\n (table: string): SortOptions | undefined => {\n if (table === \"Operation\") {\n return { column: \"timestampUtcMs\", direction: \"desc\" };\n }\n return undefined;\n },\n [],\n );\n\n const canModifyDb = !!pglite;\n\n return {\n getTables,\n getTableRows,\n getDefaultSort,\n onExportDb: canModifyDb ? onExportDb : undefined,\n onImportDb: canModifyDb ? onImportDb : undefined,\n };\n}\n","import { clearReactorStorage } from \"@powerhousedao/connect/store\";\nimport {\n getCachedReactorPgMajor,\n PENDING_PG_SEED_KEY,\n subscribeReactorPgMajor,\n} from \"@powerhousedao/connect/utils\";\nimport { useCallback, useSyncExternalStore } from \"react\";\n\nconst SUPPORTED_PG_VERSIONS = [16, 17] as const;\n\nexport function useDebugInspector() {\n const currentPgVersion = useSyncExternalStore(\n subscribeReactorPgMajor,\n getCachedReactorPgMajor,\n () => undefined,\n );\n\n const onResetToPgVersion = useCallback(async (major: number) => {\n console.info(`[debug-inspector] Reset requested: PG${major}`);\n try {\n localStorage.setItem(PENDING_PG_SEED_KEY, String(major));\n console.info(`[debug-inspector] Clearing reactor storage...`);\n await clearReactorStorage();\n console.info(`[debug-inspector] Storage cleared. Reloading...`);\n window.location.reload();\n } catch (err) {\n console.error(\"[debug-inspector] Reset failed:\", err);\n localStorage.removeItem(PENDING_PG_SEED_KEY);\n throw err;\n }\n }, []);\n\n return {\n supportedPgVersions: SUPPORTED_PG_VERSIONS,\n currentPgVersion: currentPgVersion ?? null,\n onResetToPgVersion,\n };\n}\n","import type { IntegrityInspectorProps } from \"@powerhousedao/design-system/connect\";\nimport {\n DocumentIntegrityService,\n useReactorClientModule,\n type RebuildResult,\n type ValidationResult,\n} from \"@powerhousedao/reactor-browser\";\nimport { useCallback, useMemo } from \"react\";\n\nexport function useIntegrityInspector(): IntegrityInspectorProps | undefined {\n const module = useReactorClientModule();\n const reactorModule =\n module?.kind === \"browser\" ? module.reactorModule : undefined;\n const inspector = module?.kind === \"worker\" ? module.inspector : undefined;\n\n const service = useMemo(() => {\n if (!reactorModule) return undefined;\n\n return new DocumentIntegrityService(\n reactorModule.keyframeStore,\n reactorModule.operationStore,\n reactorModule.writeCache,\n reactorModule.documentView,\n reactorModule.documentModelRegistry,\n );\n }, [reactorModule]);\n\n const onValidate = useCallback(\n async (documentId: string, branch?: string): Promise<ValidationResult> => {\n if (inspector) {\n return (await inspector.validateDocument(\n documentId,\n branch,\n )) as ValidationResult;\n }\n if (!service) {\n throw new Error(\"Reactor module not available\");\n }\n return service.validateDocument(documentId, branch);\n },\n [service, inspector],\n );\n\n const onRebuildKeyframes = useCallback(\n async (documentId: string, branch?: string): Promise<RebuildResult> => {\n if (inspector) {\n return (await inspector.rebuildKeyframes(\n documentId,\n branch,\n )) as RebuildResult;\n }\n if (!service) {\n throw new Error(\"Reactor module not available\");\n }\n return service.rebuildKeyframes(documentId, branch);\n },\n [service, inspector],\n );\n\n const onRebuildSnapshots = useCallback(\n async (documentId: string, branch?: string): Promise<RebuildResult> => {\n if (inspector) {\n return (await inspector.rebuildSnapshots(\n documentId,\n branch,\n )) as RebuildResult;\n }\n if (!service) {\n throw new Error(\"Reactor module not available\");\n }\n return service.rebuildSnapshots(documentId, branch);\n },\n [service, inspector],\n );\n\n if (!service && !inspector) {\n return undefined;\n }\n\n return {\n onValidate,\n onRebuildKeyframes,\n onRebuildSnapshots,\n };\n}\n","import type {\n ProcessorInfo,\n ProcessorsInspectorProps,\n} from \"@powerhousedao/design-system/connect\";\nimport { useReactorClientModule } from \"@powerhousedao/reactor-browser\";\nimport { useCallback, useMemo } from \"react\";\n\nexport function useProcessorsInspector(): ProcessorsInspectorProps | undefined {\n const module = useReactorClientModule();\n const processorManager =\n module?.kind === \"browser\"\n ? module.reactorModule?.processorManager\n : undefined;\n const inspector = module?.kind === \"worker\" ? module.inspector : undefined;\n\n const available = useMemo(\n () => processorManager != null || inspector != null,\n [processorManager, inspector],\n );\n\n const getProcessors = useCallback((): Promise<ProcessorInfo[]> => {\n if (inspector) {\n return inspector.getProcessors() as Promise<ProcessorInfo[]>;\n }\n if (!processorManager) {\n return Promise.resolve([]);\n }\n return Promise.resolve(\n processorManager.getAll().map((tracked) => ({\n processorId: tracked.processorId,\n factoryId: tracked.factoryId,\n driveId: tracked.driveId,\n processorIndex: tracked.processorIndex,\n lastOrdinal: tracked.lastOrdinal,\n status: tracked.status,\n lastError: tracked.lastError,\n lastErrorTimestamp: tracked.lastErrorTimestamp,\n })),\n );\n }, [processorManager, inspector]);\n\n const onRetry = useCallback(\n async (processorId: string) => {\n if (inspector) {\n await inspector.retryProcessor(processorId);\n return;\n }\n if (!processorManager) return;\n const tracked = processorManager.get(processorId);\n if (tracked) {\n await tracked.retry();\n }\n },\n [processorManager, inspector],\n );\n\n if (!available) {\n return undefined;\n }\n\n return {\n getProcessors,\n onRetry,\n };\n}\n","import type {\n QueueInspectorProps,\n QueueState,\n} from \"@powerhousedao/design-system/connect\";\nimport {\n InMemoryQueue,\n useReactorClientModule,\n type Job,\n} from \"@powerhousedao/reactor-browser\";\nimport { useCallback, useMemo } from \"react\";\n\nexport function useQueueInspector(): QueueInspectorProps | undefined {\n const module = useReactorClientModule();\n const reactorClientModule = module?.kind === \"browser\" ? module : undefined;\n const inspector = module?.kind === \"worker\" ? module.inspector : undefined;\n const queue = reactorClientModule?.reactorModule?.queue;\n\n const inMemoryQueue = useMemo(() => {\n if (queue instanceof InMemoryQueue) {\n return queue;\n }\n return undefined;\n }, [queue]);\n\n const getQueueState = useCallback((): Promise<QueueState> => {\n if (inspector) {\n return inspector.getQueueState() as Promise<QueueState>;\n }\n if (!inMemoryQueue) {\n return Promise.resolve({\n isPaused: false,\n pendingJobs: [],\n executingJobs: [],\n totalPending: 0,\n totalExecuting: 0,\n });\n }\n\n const pendingJobs = inMemoryQueue.getPendingJobs();\n const executingJobIds = inMemoryQueue.getExecutingJobIds();\n\n const executingJobs: Job[] = [];\n for (const jobIdSet of executingJobIds.values()) {\n for (const jobId of jobIdSet) {\n const job = inMemoryQueue.getJob(jobId);\n if (job) {\n executingJobs.push(job);\n }\n }\n }\n\n return Promise.resolve({\n isPaused: inMemoryQueue.paused,\n pendingJobs,\n executingJobs,\n totalPending: pendingJobs.length,\n totalExecuting: executingJobs.length,\n });\n }, [inMemoryQueue, inspector]);\n\n const onPause = useCallback(async (): Promise<void> => {\n if (inspector) {\n await inspector.pauseQueue();\n return;\n }\n if (inMemoryQueue) {\n inMemoryQueue.pause();\n }\n }, [inMemoryQueue, inspector]);\n\n const onResume = useCallback(async (): Promise<void> => {\n if (inspector) {\n await inspector.resumeQueue();\n return;\n }\n if (inMemoryQueue) {\n await inMemoryQueue.resume();\n }\n }, [inMemoryQueue, inspector]);\n\n if (!inMemoryQueue && !inspector) {\n return undefined;\n }\n\n return {\n getQueueState,\n onPause,\n onResume,\n };\n}\n","import type {\n ConnectionStateSnapshot,\n IPeerAgreement,\n Remote,\n SyncHold,\n} from \"@powerhousedao/reactor-browser\";\nimport {\n addRemoteDrive,\n PollBehavior,\n useConnectionStates,\n useSync,\n} from \"@powerhousedao/reactor-browser\";\nimport { useCallback } from \"react\";\n\nexport function useRemotesInspector(): {\n getRemotes: () => Promise<Remote[]>;\n removeRemote: (name: string) => Promise<void>;\n addRemoteManual: (url: string) => Promise<void>;\n triggerPull: (name: string) => void;\n connectionStates: ReadonlyMap<string, ConnectionStateSnapshot>;\n getAgreement: () => IPeerAgreement;\n getHolds: (remoteName: string) => Promise<SyncHold[]>;\n} {\n const syncManager = useSync();\n if (!syncManager) {\n throw new Error(\"Sync manager not found\");\n }\n\n const connectionStates = useConnectionStates();\n\n const getRemotes = useCallback(() => {\n return Promise.resolve(syncManager.list());\n }, [syncManager]);\n\n const removeRemote = useCallback(\n (name: string) => syncManager.remove(name),\n [syncManager],\n );\n\n const addRemoteManual = useCallback(async (url: string) => {\n await addRemoteDrive(url, undefined, {\n pollBehavior: PollBehavior.Manual,\n });\n }, []);\n\n const triggerPull = useCallback(\n (name: string) => syncManager.triggerPull(name),\n [syncManager],\n );\n\n const getAgreement = useCallback(\n () => syncManager.agreement(),\n [syncManager],\n );\n\n const getHolds = useCallback(\n (remoteName: string) => syncManager.listHolds({ remoteName }),\n [syncManager],\n );\n\n return {\n getAgreement,\n getHolds,\n getRemotes,\n removeRemote,\n addRemoteManual,\n triggerPull,\n connectionStates,\n };\n}\n","import type { WorkerInspectorProps } from \"@powerhousedao/design-system/connect\";\nimport { useReactorClientModule } from \"@powerhousedao/reactor-browser\";\nimport { useMemo } from \"react\";\n\nexport function useWorkerInspector(): WorkerInspectorProps | undefined {\n const module = useReactorClientModule();\n const adminClient =\n module?.kind === \"worker\" ? module.adminClient : undefined;\n\n return useMemo(() => {\n if (!adminClient) {\n return undefined;\n }\n return {\n getInfo: () => adminClient.info(),\n onRestart: () => adminClient.restart(),\n };\n }, [adminClient]);\n}\n","import { InspectorModal as ConnectInspectorModal } from \"@powerhousedao/design-system/connect\";\nimport {\n closePHModal,\n REACTOR_SCHEMA,\n usePHModal,\n} from \"@powerhousedao/reactor-browser\";\nimport { useCatchUpInspector } from \"./useCatchUpInspector.js\";\nimport { useDbExplorer } from \"./useDbExplorer.js\";\nimport { useDebugInspector } from \"./useDebugInspector.js\";\nimport { useIntegrityInspector } from \"./useIntegrityInspector.js\";\nimport { useProcessorsInspector } from \"./useProcessorsInspector.js\";\nimport { useQueueInspector } from \"./useQueueInspector.js\";\nimport { useRemotesInspector } from \"./useRemotesInspector.js\";\nimport { useWorkerInspector } from \"./useWorkerInspector.js\";\n\nconst DEFAULT_PAGE_SIZE = 25;\n\nexport const InspectorModal: React.FC = () => {\n const phModal = usePHModal();\n const open = phModal?.type === \"inspector\";\n\n const { getTables, getTableRows, getDefaultSort, onExportDb, onImportDb } =\n useDbExplorer();\n const {\n getRemotes,\n removeRemote,\n addRemoteManual,\n triggerPull,\n connectionStates,\n getAgreement,\n getHolds,\n } = useRemotesInspector();\n const queueInspectorProps = useQueueInspector();\n const processorsInspectorProps = useProcessorsInspector();\n const integrityInspectorProps = useIntegrityInspector();\n const catchUpInspectorProps = useCatchUpInspector();\n const workerInspectorProps = useWorkerInspector();\n const { currentPgVersion, supportedPgVersions, onResetToPgVersion } =\n useDebugInspector();\n\n return (\n <ConnectInspectorModal\n open={open}\n onOpenChange={(status) => {\n if (!status) closePHModal();\n }}\n dbExplorerProps={{\n schema: REACTOR_SCHEMA,\n getTables,\n getTableRows,\n getDefaultSort,\n pageSize: DEFAULT_PAGE_SIZE,\n onExportDb,\n onImportDb,\n pgVersionControl: {\n currentPgVersion,\n supportedPgVersions,\n onResetToPgVersion,\n },\n }}\n remotesInspectorProps={{\n getRemotes,\n removeRemote,\n addRemoteManual,\n triggerPull,\n connectionStates,\n getAgreement,\n getHolds,\n }}\n queueInspectorProps={queueInspectorProps}\n processorsInspectorProps={processorsInspectorProps}\n integrityInspectorProps={integrityInspectorProps}\n catchUpInspectorProps={catchUpInspectorProps}\n workerInspectorProps={workerInspectorProps}\n />\n );\n};\n"],"names":["ConnectInspectorModal"],"mappings":";;;;;;;;;;;;;AAOA,SAAgB,sBAAyD;CACvE,MAAM,SAAS,uBAAuB;CACtC,MAAM,UACJ,QAAQ,SAAS,YAAY,OAAO,eAAe,UAAU,KAAA;CAC/D,MAAM,YAAY,QAAQ,SAAS,WAAW,OAAO,YAAY,KAAA;CACjE,MAAM,CAAC,QAAQ,aAAa,SAAoC;CAEhE,MAAM,YAAY,YAAY,YAA2B;EACvD,IAAI,WAAW;GACb,UAAW,MAAM,UAAU,iBAAiB,CAAmB;GAC/D;EACF;EACA,IAAI,SACF,UAAU,QAAQ,OAAO,CAAC;CAE9B,GAAG,CAAC,SAAS,SAAS,CAAC;CAEvB,MAAM,aAAa,YAAY,YAA2B;EACxD,IAAI,WAAW;GACb,MAAM,UAAU,aAAa;GAC7B;EACF;EACA,IAAI,SACF,MAAM,QAAQ,SAAS;CAE3B,GAAG,CAAC,SAAS,SAAS,CAAC;CAEvB,IAAI,CAAC,WAAW,CAAC,WACf;CAGF,OAAO;EACL;EACA;EACA;CACF;AACF;;;ACpBA,eAAe,aAAa,OAA8B;CACxD,MAAM,IAAI,SAAe,YAAY,MAAM,YAAY,QAAQ,CAAC,CAAC;AACnE;AAOA,eAAe,gBAAgB,QAMb;CAChB,MAAM,IAAI,SAAe,SAAS,WAAW;EAC3C,OAAO,OAAO,GAAG,OAAO,QAAQ,QAAS,MAAM,OAAO,GAAG,IAAI,QAAQ,CAAE;CACzE,CAAC;AACH;AAkCA,MAAM,mBAAmB;CACvB;CACA;CACA;CACA;CACA;CACA;AACF;AASA,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,YAAY,eAC3D,cAAc;CAChB,MAAM,EACJ,YACA,cACA,iBACA,aACA,kBACA,cACA,aACE,oBAAoB;CACxB,MAAM,sBAAsB,kBAAkB;CAC9C,MAAM,2BAA2B,uBAAuB;CACxD,MAAM,0BAA0B,sBAAsB;CACtD,MAAM,wBAAwB,oBAAoB;CAClD,MAAM,uBAAuB,mBAAmB;CAChD,MAAM,EAAE,kBAAkB,qBAAqB,uBAC7C,kBAAkB;CAEpB,OACE,oBAACA,kBAAD;EACQ;EACN,eAAe,WAAW;GACxB,IAAI,CAAC,QAAQ,aAAa;EAC5B;EACA,iBAAiB;GACf,QAAQ;GACR;GACA;GACA;GACA,UAAU;GACV;GACA;GACA,kBAAkB;IAChB;IACA;IACA;GACF;EACF;EACA,uBAAuB;GACrB;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACqB;EACK;EACD;EACF;EACD;CACvB,CAAA;AAEL","debug_id":"455079d1-1048-5d3c-b303-bb1d43c70186"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { t as AppLoader } from "./app-loader-CZdPOpRN.js";
|
|
2
|
-
export { AppLoader };
|
|
3
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4a7f29e6-2730-5341-9340-1212d7db2bf0")}catch(e){}}();
|
|
4
|
-
//# debugId=4a7f29e6-2730-5341-9340-1212d7db2bf0
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pglite-major-p4_YefAE.js","sources":["../src/utils/stored-documents-refused.ts","../src/utils/pglite-idb.ts","../src/utils/pglite-major.ts"],"sourcesContent":["import { UnsupportedStoredProtocolError } from \"@powerhousedao/reactor\";\n\nexport const STORED_DOCUMENTS_REFUSED = \"StoredDocumentsRefusedError\";\n\n// Only name and message cross the worker boundary, so the message says it all.\nexport class StoredDocumentsRefusedError extends Error {\n constructor(cause: UnsupportedStoredProtocolError) {\n const named = cause.versions\n .map(({ protocol, version }) => `${protocol} ${version}`)\n .join(\", \");\n super(\n `This browser holds ${cause.documents} document(s) that require ${named}, which this version of Connect does not run. ` +\n `Open them with a Connect build that runs ${named}, or set connect.reactor.unsupportedStoredDocuments to \"read-only\" in powerhouse.config.json to open them read-only.`,\n { cause },\n );\n this.name = STORED_DOCUMENTS_REFUSED;\n }\n}\n\n/** Rewrites the reactor's refusal for the boot screen. */\nexport function toStoredDocumentsRefused(error: unknown): unknown {\n return UnsupportedStoredProtocolError.isError(error)\n ? new StoredDocumentsRefusedError(error)\n : error;\n}\n\nexport function isStoredDocumentsRefused(error: unknown): error is Error {\n return error instanceof Error && error.name === STORED_DOCUMENTS_REFUSED;\n}\n","export const IDB_STORE_NAME = \"FILE_DATA\";\nexport const IDB_DB_VERSION = 21;\n\ntype FileDataValue = {\n contents: Uint8Array | number[];\n mode: number;\n timestamp: Date | number;\n};\n\nexport function idbError(\n req: IDBRequest | IDBTransaction,\n context: string,\n): Error {\n const cause = req.error ?? new Error(\"unknown IDB error\");\n return new Error(`${context}: ${cause.message}`, { cause });\n}\n\nexport function indexedDbExists(name: string): Promise<boolean> {\n if (typeof indexedDB.databases === \"function\") {\n return indexedDB\n .databases()\n .then((dbs) => dbs.some((d) => d.name === name))\n .catch(() => true);\n }\n return Promise.resolve(true);\n}\n\nexport function openIdb(\n name: string,\n version: number,\n upgrade?: (db: IDBDatabase) => void,\n): Promise<IDBDatabase> {\n return new Promise((resolve, reject) => {\n const req = indexedDB.open(name, version);\n req.onerror = () => reject(idbError(req, `IDB open failed for ${name}`));\n req.onblocked = () => reject(new Error(`IDB open blocked for ${name}`));\n req.onupgradeneeded = () => upgrade?.(req.result);\n req.onsuccess = () => resolve(req.result);\n });\n}\n\nexport function createFileDataStore(db: IDBDatabase): void {\n if (!db.objectStoreNames.contains(IDB_STORE_NAME)) {\n const store = db.createObjectStore(IDB_STORE_NAME);\n store.createIndex(\"timestamp\", \"timestamp\", { unique: false });\n }\n}\n\nexport async function readPgVersionFile(\n idbName: string,\n): Promise<number | null> {\n if (!(await indexedDbExists(idbName))) return null;\n let db: IDBDatabase;\n try {\n db = await openIdb(idbName, IDB_DB_VERSION, createFileDataStore);\n } catch {\n return null;\n }\n try {\n if (!db.objectStoreNames.contains(IDB_STORE_NAME)) return null;\n const tx = db.transaction(IDB_STORE_NAME, \"readonly\");\n const store = tx.objectStore(IDB_STORE_NAME);\n const value = await new Promise<FileDataValue | null>((resolve, reject) => {\n const req = store.openCursor();\n req.onerror = () =>\n reject(idbError(req, `FILE_DATA cursor failed for ${idbName}`));\n req.onsuccess = () => {\n const cursor = req.result;\n if (!cursor) return resolve(null);\n const key = typeof cursor.key === \"string\" ? cursor.key : \"\";\n if (key.endsWith(\"/PG_VERSION\")) {\n resolve(cursor.value as FileDataValue);\n } else {\n cursor.continue();\n }\n };\n });\n if (!value) return null;\n const bytes =\n value.contents instanceof Uint8Array\n ? value.contents\n : new Uint8Array(value.contents);\n const text = new TextDecoder().decode(bytes).trim();\n const major = parseInt(text, 10);\n return Number.isFinite(major) ? major : null;\n } finally {\n db.close();\n }\n}\n","import type * as CurrentPGliteModuleNs from \"@electric-sql/pglite\";\n\nexport const CURRENT_PG_MAJOR = 17;\nexport const SUPPORTED_PG_MAJORS = [16, 17] as const;\nexport type SupportedPgMajor = (typeof SUPPORTED_PG_MAJORS)[number];\nexport type DetectedMajor = SupportedPgMajor | null;\n\ntype CurrentPGliteModule = typeof CurrentPGliteModuleNs;\n\nexport function coerceMajor(value: number | null): DetectedMajor {\n if (value === null) return null;\n return (SUPPORTED_PG_MAJORS as readonly number[]).includes(value)\n ? (value as SupportedPgMajor)\n : null;\n}\n\nexport function isMigratableMajor(\n value: number | null,\n): value is SupportedPgMajor {\n const major = coerceMajor(value);\n return major !== null && major !== CURRENT_PG_MAJOR;\n}\n\n/**\n * Pick the PGlite major to use for *new* reactor clients: fall back to the\n * current version when there is no existing data dir.\n */\nexport function resolvePgMajorForRuntime(\n detected: DetectedMajor,\n): SupportedPgMajor {\n return detected ?? CURRENT_PG_MAJOR;\n}\n\n/**\n * Loads the PGlite module that matches an on-disk data dir major version.\n *\n * The 0.2.x and 0.3.x modules expose the same runtime interface (PGlite class,\n * `idb://` data-dir support, waitReady, exec/query/transaction, close). The\n * return type is pinned to the current package's module so callers can use it\n * against `kysely-pglite-dialect` which peer-depends on both majors.\n */\nexport async function loadPGliteModule(\n major: SupportedPgMajor,\n): Promise<CurrentPGliteModule> {\n if (major === 16) {\n return (await import(\"pglite-legacy-02\")) as unknown as CurrentPGliteModule;\n }\n if (major === 17) return import(\"@electric-sql/pglite\");\n throw new Error(`Unsupported PGlite major: ${String(major)}`);\n}\n\ntype PgDumpFn = (options: {\n pg: unknown;\n}) => Promise<{ text(): Promise<string> }>;\n\n/**\n * Loads the pg_dump tool for the given PGlite major. pg_dump's VFS layout is\n * version-specific, so using the wrong major against a live PGlite instance\n * fails with Emscripten ENOENT (errno 44).\n */\nexport async function loadPgDump(major: SupportedPgMajor): Promise<PgDumpFn> {\n if (major === 16) {\n const mod = (await import(\"pglite-tools-legacy-02/pg_dump\")) as {\n pgDump: PgDumpFn;\n };\n return mod.pgDump;\n }\n if (major === 17) {\n const mod = (await import(\"@electric-sql/pglite-tools/pg_dump\")) as {\n pgDump: PgDumpFn;\n };\n return mod.pgDump;\n }\n throw new Error(`Unsupported PGlite major: ${String(major)}`);\n}\n"],"names":[],"mappings":";;;;AAEA,MAAa,2BAA2B;AAGxC,IAAa,8BAAb,cAAiD,MAAM;CACrD,YAAY,OAAuC;EACjD,MAAM,QAAQ,MAAM,SACjB,KAAK,EAAE,UAAU,cAAc,GAAG,SAAS,GAAG,SAAS,CAAC,CACxD,KAAK,IAAI;EACZ,MACE,sBAAsB,MAAM,UAAU,4BAA4B,MAAM,yFAC1B,MAAM,uHACpD,EAAE,MAAM,CACV;EACA,KAAK,OAAO;CACd;AACF;;AAGA,S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