@buoy-gg/shared-ui 7.0.39 → 7.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/lib/commonjs/JsModal.js +13 -61
- package/lib/commonjs/JsModal.web.js +32 -95
- package/lib/commonjs/clipboard/autoDetectClipboard.js +1 -1
- package/lib/commonjs/clipboard/clipboard-impl.web.js +21 -0
- package/lib/commonjs/dataViewer/tree/TreeDiffViewer.js +4 -2
- package/lib/commonjs/hooks/index.js +1 -1
- package/lib/commonjs/hooks/safe-area-impl.js +1 -1
- package/lib/commonjs/hooks/usePersistedState.js +1 -1
- package/lib/commonjs/hooks/useSafeAreaInsets.web.js +41 -0
- package/lib/commonjs/icons/index.js +14 -0
- package/lib/commonjs/index.js +34 -0
- package/lib/commonjs/license/AccountSetup.js +4 -25
- package/lib/commonjs/license/AccountSetup.web.js +78 -64
- package/lib/commonjs/license/AccountSetupContent.js +482 -0
- package/lib/commonjs/license/FreeAccountPrompt.js +32 -178
- package/lib/commonjs/license/LicenseEntryModal.js +5 -12
- package/lib/commonjs/license/accountRuntime.js +8 -0
- package/lib/commonjs/license/accountRuntime.web.js +9 -0
- package/lib/commonjs/license/licenseModule.js +2 -0
- package/lib/commonjs/settings/components/BubbleSettingsSection.js +1 -1
- package/lib/commonjs/storage/definePersistedSetting.js +1 -1
- package/lib/commonjs/stores/ignoredPatternsCore.js +8 -1
- package/lib/commonjs/stores/ignoredPatternsStore.js +10 -199
- package/lib/commonjs/stores/ignoredPatternsStore.shared.js +205 -0
- package/lib/commonjs/stores/ignoredPatternsStore.web.js +10 -230
- package/lib/commonjs/ui/backgrounds/backgroundStore.js +1 -1
- package/lib/commonjs/ui/backgrounds/variants/wormhole.js +3 -0
- package/lib/commonjs/ui/components/CopyButton.js +1 -1
- package/lib/commonjs/ui/components/EventStepperFooter.js +1 -1
- package/lib/commonjs/ui/components/ToolFooter.js +1 -1
- package/lib/commonjs/ui/floating/FloatingTool.web.js +12 -2
- package/lib/commonjs/ui/night/primitives.js +10 -3
- package/lib/commonjs/ui/otto/OttoSprite.js +1 -1
- package/lib/commonjs/utils/browserAsyncStorage.js +157 -0
- package/lib/commonjs/utils/browserNavigation.js +116 -0
- package/lib/commonjs/utils/devServer.js +8 -4
- package/lib/commonjs/utils/devServer.web.js +10 -0
- package/lib/commonjs/utils/domRuntime.js +143 -0
- package/lib/commonjs/utils/expoRouterModule.js +51 -0
- package/lib/commonjs/utils/expoRouterModule.web.js +14 -0
- package/lib/commonjs/utils/getSafeAreaInsets.web.js +35 -0
- package/lib/commonjs/utils/index.js +111 -4
- package/lib/commonjs/utils/loadToolModule.js +46 -0
- package/lib/commonjs/utils/loadToolModule.web.js +12 -0
- package/lib/commonjs/utils/modalStorage.js +42 -0
- package/lib/commonjs/utils/nativeWeb.js +454 -0
- package/lib/commonjs/utils/persistentStorage.web.js +78 -0
- package/lib/commonjs/utils/reloadApp.js +18 -57
- package/lib/commonjs/utils/reloadPlatform.js +37 -0
- package/lib/commonjs/utils/reloadPlatform.web.js +17 -0
- package/lib/commonjs/utils/safeExpoRouter.js +3 -53
- package/lib/commonjs/utils/safeExpoRouter.web.js +48 -0
- package/lib/commonjs/utils/toolModules.js +25 -0
- package/lib/module/JsModal.js +11 -59
- package/lib/module/JsModal.web.js +28 -91
- package/lib/module/clipboard/autoDetectClipboard.js +2 -2
- package/lib/module/clipboard/clipboard-impl.web.js +14 -0
- package/lib/module/dataViewer/tree/TreeDiffViewer.js +4 -2
- package/lib/module/hooks/index.js +2 -2
- package/lib/module/hooks/safe-area-impl.js +1 -1
- package/lib/module/hooks/usePersistedState.js +1 -1
- package/lib/module/hooks/useSafeAreaInsets.web.js +30 -0
- package/lib/module/icons/index.js +2 -1
- package/lib/module/index.js +3 -0
- package/lib/module/license/AccountSetup.js +5 -26
- package/lib/module/license/AccountSetup.web.js +79 -65
- package/lib/module/license/AccountSetupContent.js +476 -0
- package/lib/module/license/FreeAccountPrompt.js +27 -176
- package/lib/module/license/LicenseEntryModal.js +6 -13
- package/lib/module/license/accountRuntime.js +3 -0
- package/lib/module/license/accountRuntime.web.js +4 -0
- package/lib/module/license/licenseModule.js +2 -0
- package/lib/module/settings/components/BubbleSettingsSection.js +1 -1
- package/lib/module/storage/definePersistedSetting.js +1 -1
- package/lib/module/stores/ignoredPatternsCore.js +8 -1
- package/lib/module/stores/ignoredPatternsStore.js +1 -187
- package/lib/module/stores/ignoredPatternsStore.shared.js +189 -0
- package/lib/module/stores/ignoredPatternsStore.web.js +1 -219
- package/lib/module/ui/backgrounds/backgroundStore.js +1 -1
- package/lib/module/ui/backgrounds/variants/wormhole.js +3 -0
- package/lib/module/ui/components/CopyButton.js +1 -1
- package/lib/module/ui/components/EventStepperFooter.js +1 -1
- package/lib/module/ui/components/ToolFooter.js +1 -1
- package/lib/module/ui/floating/FloatingTool.web.js +12 -2
- package/lib/module/ui/night/primitives.js +11 -4
- package/lib/module/ui/otto/OttoSprite.js +1 -1
- package/lib/module/utils/browserAsyncStorage.js +151 -0
- package/lib/module/utils/browserNavigation.js +108 -0
- package/lib/module/utils/devServer.js +8 -4
- package/lib/module/utils/devServer.web.js +6 -0
- package/lib/module/utils/domRuntime.js +134 -0
- package/lib/module/utils/expoRouterModule.js +46 -0
- package/lib/module/utils/expoRouterModule.web.js +9 -0
- package/lib/module/utils/getSafeAreaInsets.web.js +31 -0
- package/lib/module/utils/index.js +9 -4
- package/lib/module/utils/loadToolModule.js +42 -0
- package/lib/module/utils/loadToolModule.web.js +8 -0
- package/lib/module/utils/modalStorage.js +37 -0
- package/lib/module/utils/nativeWeb.js +107 -0
- package/lib/module/utils/persistentStorage.web.js +72 -0
- package/lib/module/utils/reloadApp.js +13 -51
- package/lib/module/utils/reloadPlatform.js +31 -0
- package/lib/module/utils/reloadPlatform.web.js +11 -0
- package/lib/module/utils/safeExpoRouter.js +3 -53
- package/lib/module/utils/safeExpoRouter.web.js +37 -0
- package/lib/module/utils/toolModules.js +19 -0
- package/lib/typescript/commonjs/JsModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/JsModal.web.d.ts +7 -18
- package/lib/typescript/commonjs/JsModal.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/clipboard/clipboard-impl.web.d.ts +5 -0
- package/lib/typescript/commonjs/clipboard/clipboard-impl.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/commonjs/hooks/useSafeAreaInsets.web.d.ts +6 -0
- package/lib/typescript/commonjs/hooks/useSafeAreaInsets.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/index.d.ts +1 -0
- package/lib/typescript/commonjs/icons/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +2 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/license/AccountSetup.d.ts.map +1 -1
- package/lib/typescript/commonjs/license/AccountSetup.web.d.ts +1 -1
- package/lib/typescript/commonjs/license/AccountSetup.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/license/AccountSetupContent.d.ts +11 -0
- package/lib/typescript/commonjs/license/AccountSetupContent.d.ts.map +1 -0
- package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts +3 -15
- package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts.map +1 -1
- package/lib/typescript/commonjs/license/LicenseEntryModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/license/accountRuntime.d.ts +2 -0
- package/lib/typescript/commonjs/license/accountRuntime.d.ts.map +1 -0
- package/lib/typescript/commonjs/license/accountRuntime.web.d.ts +2 -0
- package/lib/typescript/commonjs/license/accountRuntime.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/license/licenseModule.d.ts +3 -1
- package/lib/typescript/commonjs/license/licenseModule.d.ts.map +1 -1
- package/lib/typescript/commonjs/stores/ignoredPatternsCore.d.ts +5 -1
- package/lib/typescript/commonjs/stores/ignoredPatternsCore.d.ts.map +1 -1
- package/lib/typescript/commonjs/stores/ignoredPatternsStore.d.ts +1 -59
- package/lib/typescript/commonjs/stores/ignoredPatternsStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/stores/ignoredPatternsStore.shared.d.ts +60 -0
- package/lib/typescript/commonjs/stores/ignoredPatternsStore.shared.d.ts.map +1 -0
- package/lib/typescript/commonjs/stores/ignoredPatternsStore.web.d.ts +1 -71
- package/lib/typescript/commonjs/stores/ignoredPatternsStore.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/floating/FloatingTool.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/night/primitives.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/otto/ottoEngine.d.ts +1 -1
- package/lib/typescript/commonjs/utils/browserAsyncStorage.d.ts +25 -0
- package/lib/typescript/commonjs/utils/browserAsyncStorage.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/browserNavigation.d.ts +31 -0
- package/lib/typescript/commonjs/utils/browserNavigation.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/devServer.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/devServer.web.d.ts +2 -0
- package/lib/typescript/commonjs/utils/devServer.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/domRuntime.d.ts +27 -0
- package/lib/typescript/commonjs/utils/domRuntime.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/expoRouterModule.d.ts +3 -0
- package/lib/typescript/commonjs/utils/expoRouterModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/expoRouterModule.web.d.ts +3 -0
- package/lib/typescript/commonjs/utils/expoRouterModule.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/getSafeAreaInsets.web.d.ts +8 -0
- package/lib/typescript/commonjs/utils/getSafeAreaInsets.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/index.d.ts +5 -0
- package/lib/typescript/commonjs/utils/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/loadToolModule.d.ts +3 -0
- package/lib/typescript/commonjs/utils/loadToolModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/loadToolModule.web.d.ts +2 -0
- package/lib/typescript/commonjs/utils/loadToolModule.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/modalStorage.d.ts +21 -0
- package/lib/typescript/commonjs/utils/modalStorage.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/nativeWeb.d.ts +22 -0
- package/lib/typescript/commonjs/utils/nativeWeb.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/persistentStorage.web.d.ts +6 -0
- package/lib/typescript/commonjs/utils/persistentStorage.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/reloadApp.d.ts +7 -25
- package/lib/typescript/commonjs/utils/reloadApp.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/reloadPlatform.d.ts +8 -0
- package/lib/typescript/commonjs/utils/reloadPlatform.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/reloadPlatform.web.d.ts +4 -0
- package/lib/typescript/commonjs/utils/reloadPlatform.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/safeExpoRouter.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/safeExpoRouter.web.d.ts +43 -0
- package/lib/typescript/commonjs/utils/safeExpoRouter.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/toolModules.d.ts +5 -0
- package/lib/typescript/commonjs/utils/toolModules.d.ts.map +1 -0
- package/lib/typescript/module/JsModal.d.ts.map +1 -1
- package/lib/typescript/module/JsModal.web.d.ts +7 -18
- package/lib/typescript/module/JsModal.web.d.ts.map +1 -1
- package/lib/typescript/module/clipboard/clipboard-impl.web.d.ts +5 -0
- package/lib/typescript/module/clipboard/clipboard-impl.web.d.ts.map +1 -0
- package/lib/typescript/module/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/module/hooks/useSafeAreaInsets.web.d.ts +6 -0
- package/lib/typescript/module/hooks/useSafeAreaInsets.web.d.ts.map +1 -0
- package/lib/typescript/module/icons/index.d.ts +1 -0
- package/lib/typescript/module/icons/index.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +2 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/license/AccountSetup.d.ts.map +1 -1
- package/lib/typescript/module/license/AccountSetup.web.d.ts +1 -1
- package/lib/typescript/module/license/AccountSetup.web.d.ts.map +1 -1
- package/lib/typescript/module/license/AccountSetupContent.d.ts +11 -0
- package/lib/typescript/module/license/AccountSetupContent.d.ts.map +1 -0
- package/lib/typescript/module/license/FreeAccountPrompt.d.ts +3 -15
- package/lib/typescript/module/license/FreeAccountPrompt.d.ts.map +1 -1
- package/lib/typescript/module/license/LicenseEntryModal.d.ts.map +1 -1
- package/lib/typescript/module/license/accountRuntime.d.ts +2 -0
- package/lib/typescript/module/license/accountRuntime.d.ts.map +1 -0
- package/lib/typescript/module/license/accountRuntime.web.d.ts +2 -0
- package/lib/typescript/module/license/accountRuntime.web.d.ts.map +1 -0
- package/lib/typescript/module/license/licenseModule.d.ts +3 -1
- package/lib/typescript/module/license/licenseModule.d.ts.map +1 -1
- package/lib/typescript/module/stores/ignoredPatternsCore.d.ts +5 -1
- package/lib/typescript/module/stores/ignoredPatternsCore.d.ts.map +1 -1
- package/lib/typescript/module/stores/ignoredPatternsStore.d.ts +1 -59
- package/lib/typescript/module/stores/ignoredPatternsStore.d.ts.map +1 -1
- package/lib/typescript/module/stores/ignoredPatternsStore.shared.d.ts +60 -0
- package/lib/typescript/module/stores/ignoredPatternsStore.shared.d.ts.map +1 -0
- package/lib/typescript/module/stores/ignoredPatternsStore.web.d.ts +1 -71
- package/lib/typescript/module/stores/ignoredPatternsStore.web.d.ts.map +1 -1
- package/lib/typescript/module/ui/floating/FloatingTool.web.d.ts.map +1 -1
- package/lib/typescript/module/ui/night/primitives.d.ts.map +1 -1
- package/lib/typescript/module/ui/otto/ottoEngine.d.ts +1 -1
- package/lib/typescript/module/utils/browserAsyncStorage.d.ts +25 -0
- package/lib/typescript/module/utils/browserAsyncStorage.d.ts.map +1 -0
- package/lib/typescript/module/utils/browserNavigation.d.ts +31 -0
- package/lib/typescript/module/utils/browserNavigation.d.ts.map +1 -0
- package/lib/typescript/module/utils/devServer.d.ts.map +1 -1
- package/lib/typescript/module/utils/devServer.web.d.ts +2 -0
- package/lib/typescript/module/utils/devServer.web.d.ts.map +1 -0
- package/lib/typescript/module/utils/domRuntime.d.ts +27 -0
- package/lib/typescript/module/utils/domRuntime.d.ts.map +1 -0
- package/lib/typescript/module/utils/expoRouterModule.d.ts +3 -0
- package/lib/typescript/module/utils/expoRouterModule.d.ts.map +1 -0
- package/lib/typescript/module/utils/expoRouterModule.web.d.ts +3 -0
- package/lib/typescript/module/utils/expoRouterModule.web.d.ts.map +1 -0
- package/lib/typescript/module/utils/getSafeAreaInsets.web.d.ts +8 -0
- package/lib/typescript/module/utils/getSafeAreaInsets.web.d.ts.map +1 -0
- package/lib/typescript/module/utils/index.d.ts +5 -0
- package/lib/typescript/module/utils/index.d.ts.map +1 -1
- package/lib/typescript/module/utils/loadToolModule.d.ts +3 -0
- package/lib/typescript/module/utils/loadToolModule.d.ts.map +1 -0
- package/lib/typescript/module/utils/loadToolModule.web.d.ts +2 -0
- package/lib/typescript/module/utils/loadToolModule.web.d.ts.map +1 -0
- package/lib/typescript/module/utils/modalStorage.d.ts +21 -0
- package/lib/typescript/module/utils/modalStorage.d.ts.map +1 -0
- package/lib/typescript/module/utils/nativeWeb.d.ts +22 -0
- package/lib/typescript/module/utils/nativeWeb.d.ts.map +1 -0
- package/lib/typescript/module/utils/persistentStorage.web.d.ts +6 -0
- package/lib/typescript/module/utils/persistentStorage.web.d.ts.map +1 -0
- package/lib/typescript/module/utils/reloadApp.d.ts +7 -25
- package/lib/typescript/module/utils/reloadApp.d.ts.map +1 -1
- package/lib/typescript/module/utils/reloadPlatform.d.ts +8 -0
- package/lib/typescript/module/utils/reloadPlatform.d.ts.map +1 -0
- package/lib/typescript/module/utils/reloadPlatform.web.d.ts +4 -0
- package/lib/typescript/module/utils/reloadPlatform.web.d.ts.map +1 -0
- package/lib/typescript/module/utils/safeExpoRouter.d.ts.map +1 -1
- package/lib/typescript/module/utils/safeExpoRouter.web.d.ts +43 -0
- package/lib/typescript/module/utils/safeExpoRouter.web.d.ts.map +1 -0
- package/lib/typescript/module/utils/toolModules.d.ts +5 -0
- package/lib/typescript/module/utils/toolModules.d.ts.map +1 -0
- package/lib/web/asyncStorage.mjs +2 -0
- package/lib/web/chunks/chunk-2MHKRRQW.mjs +8 -0
- package/lib/web/chunks/chunk-2Q3SDPH2.mjs +14 -0
- package/lib/web/chunks/chunk-34YQ42KI.mjs +2 -0
- package/lib/web/chunks/chunk-3NNNCQYP.mjs +14 -0
- package/lib/web/chunks/chunk-3UTMGIUG.mjs +2 -0
- package/lib/web/chunks/chunk-46CXXOQB.mjs +2 -0
- package/lib/web/chunks/chunk-475BSDCB.mjs +2 -0
- package/lib/web/chunks/chunk-53J2FMUD.mjs +2 -0
- package/lib/web/chunks/chunk-552W4COI.mjs +2 -0
- package/lib/web/chunks/chunk-56TTTMX4.mjs +6145 -0
- package/lib/web/chunks/chunk-5LOQZINQ.mjs +14 -0
- package/lib/web/chunks/chunk-5NOIO6ZM.mjs +16 -0
- package/lib/web/chunks/chunk-5NZOQR6Q.mjs +2 -0
- package/lib/web/chunks/chunk-6CCRCSA2.mjs +2 -0
- package/lib/web/chunks/chunk-6Q52HRBL.mjs +2 -0
- package/lib/web/chunks/chunk-6TEDFSNM.mjs +655 -0
- package/lib/web/chunks/chunk-7BMRSMHN.mjs +2 -0
- package/lib/web/chunks/chunk-A2SOFE47.mjs +24 -0
- package/lib/web/chunks/chunk-A7KJCK4R.mjs +14 -0
- package/lib/web/chunks/chunk-AEXGGXS7.mjs +2 -0
- package/lib/web/chunks/chunk-AGD7ZT6O.mjs +15 -0
- package/lib/web/chunks/chunk-AIEOQWNG.mjs +2 -0
- package/lib/web/chunks/chunk-ASTM35HG.mjs +16 -0
- package/lib/web/chunks/chunk-AZBMFPMX.mjs +1421 -0
- package/lib/web/chunks/chunk-B2V2UDCU.mjs +16 -0
- package/lib/web/chunks/chunk-BFGKGTAC.mjs +2 -0
- package/lib/web/chunks/chunk-BHW6AFO6.mjs +2 -0
- package/lib/web/chunks/chunk-BWRW3NJ2.mjs +16 -0
- package/lib/web/chunks/chunk-CBM2IZAK.mjs +2 -0
- package/lib/web/chunks/chunk-CDLCFF44.mjs +2 -0
- package/lib/web/chunks/chunk-CE5U3CSQ.mjs +2 -0
- package/lib/web/chunks/chunk-CI5CO7FQ.mjs +2 -0
- package/lib/web/chunks/chunk-CIB4U2YK.mjs +2 -0
- package/lib/web/chunks/chunk-CLLTZQGD.mjs +596 -0
- package/lib/web/chunks/chunk-D5HQLRFW.mjs +655 -0
- package/lib/web/chunks/chunk-DZDTNXXK.mjs +2 -0
- package/lib/web/chunks/chunk-FDOZ6YSS.mjs +2 -0
- package/lib/web/chunks/chunk-FMEWNGQO.mjs +2 -0
- package/lib/web/chunks/chunk-G4DH7GMT.mjs +2 -0
- package/lib/web/chunks/chunk-GBUZCZE4.mjs +2 -0
- package/lib/web/chunks/chunk-GF5C5DVX.mjs +2 -0
- package/lib/web/chunks/chunk-GLMS5ZLJ.mjs +445 -0
- package/lib/web/chunks/chunk-GNGMIA7V.mjs +2 -0
- package/lib/web/chunks/chunk-GTYIS7H7.mjs +15 -0
- package/lib/web/chunks/chunk-HJ36IONA.mjs +15 -0
- package/lib/web/chunks/chunk-HXPTZMAZ.mjs +2 -0
- package/lib/web/chunks/chunk-I27M4JCS.mjs +2 -0
- package/lib/web/chunks/chunk-IVCT27JB.mjs +2 -0
- package/lib/web/chunks/chunk-JG4QSK5B.mjs +2 -0
- package/lib/web/chunks/chunk-JR7BJW6B.mjs +389 -0
- package/lib/web/chunks/chunk-K46ZJUXJ.mjs +90 -0
- package/lib/web/chunks/chunk-K4LXMO4D.mjs +2 -0
- package/lib/web/chunks/chunk-K7CGIEFU.mjs +2 -0
- package/lib/web/chunks/chunk-KBTYK5YE.mjs +662 -0
- package/lib/web/chunks/chunk-KHP6CSSM.mjs +2 -0
- package/lib/web/chunks/chunk-KRDRIW7T.mjs +14 -0
- package/lib/web/chunks/chunk-L2DTKDER.mjs +2 -0
- package/lib/web/chunks/chunk-LFDFDGHY.mjs +655 -0
- package/lib/web/chunks/chunk-LZ7FZZ7R.mjs +2 -0
- package/lib/web/chunks/chunk-MAIUUK4E.mjs +2 -0
- package/lib/web/chunks/chunk-MKJKS3IG.mjs +275 -0
- package/lib/web/chunks/chunk-MRQKVLXG.mjs +2 -0
- package/lib/web/chunks/chunk-NK3OISOL.mjs +14 -0
- package/lib/web/chunks/chunk-NLJDDIXW.mjs +2 -0
- package/lib/web/chunks/chunk-OENR3XFI.mjs +11 -0
- package/lib/web/chunks/chunk-OZB3VKZE.mjs +2 -0
- package/lib/web/chunks/chunk-P64PFJT3.mjs +17618 -0
- package/lib/web/chunks/chunk-PACPGYH7.mjs +2 -0
- package/lib/web/chunks/chunk-PART6HOE.mjs +14 -0
- package/lib/web/chunks/chunk-PMRXUQRH.mjs +2 -0
- package/lib/web/chunks/chunk-PTK5FO6C.mjs +2 -0
- package/lib/web/chunks/chunk-PZ45TQ55.mjs +14 -0
- package/lib/web/chunks/chunk-Q5LN7GET.mjs +17624 -0
- package/lib/web/chunks/chunk-QCD6T6L4.mjs +297 -0
- package/lib/web/chunks/chunk-QD5EUANU.mjs +2 -0
- package/lib/web/chunks/chunk-QJTECJCO.mjs +2 -0
- package/lib/web/chunks/chunk-QPIZURPZ.mjs +2 -0
- package/lib/web/chunks/chunk-QPY45R5F.mjs +274 -0
- package/lib/web/chunks/chunk-R2SGZIG5.mjs +2 -0
- package/lib/web/chunks/chunk-S3GYQYVJ.mjs +16 -0
- package/lib/web/chunks/chunk-SCCXVTDM.mjs +2 -0
- package/lib/web/chunks/chunk-SHJHD646.mjs +2 -0
- package/lib/web/chunks/chunk-TCRVZ55E.mjs +2 -0
- package/lib/web/chunks/chunk-TJ6ZVV2L.mjs +15 -0
- package/lib/web/chunks/chunk-TPSY4RC3.mjs +14 -0
- package/lib/web/chunks/chunk-U5KNX5O6.mjs +17624 -0
- package/lib/web/chunks/chunk-UCKELQSM.mjs +2 -0
- package/lib/web/chunks/chunk-UGGCYHRH.mjs +15 -0
- package/lib/web/chunks/chunk-UNYQJZET.mjs +16 -0
- package/lib/web/chunks/chunk-VE72SWLV.mjs +15 -0
- package/lib/web/chunks/chunk-VKONO6MI.mjs +2 -0
- package/lib/web/chunks/chunk-W4BGMPJO.mjs +2 -0
- package/lib/web/chunks/chunk-WHNEEKLR.mjs +2 -0
- package/lib/web/chunks/chunk-WLGUP3KY.mjs +16 -0
- package/lib/web/chunks/chunk-WY7D4WBZ.mjs +2 -0
- package/lib/web/chunks/chunk-XRNB2MHO.mjs +107 -0
- package/lib/web/chunks/chunk-XXTIAXQY.mjs +2 -0
- package/lib/web/chunks/chunk-XYUAUO57.mjs +2 -0
- package/lib/web/chunks/chunk-YG6DIKQD.mjs +2 -0
- package/lib/web/chunks/chunk-YIZFMU66.mjs +2 -0
- package/lib/web/chunks/chunk-YOGAPOGC.mjs +2 -0
- package/lib/web/chunks/chunk-Z7373DS5.mjs +2 -0
- package/lib/web/chunks/chunk-Z76GRN66.mjs +17627 -0
- package/lib/web/chunks/persistentStorage.web-4FBAOYJ4.mjs +12 -0
- package/lib/web/chunks/persistentStorage.web-7W3Y6Q24.mjs +12 -0
- package/lib/web/chunks/persistentStorage.web-GOWNFMVT.mjs +2 -0
- package/lib/web/chunks/persistentStorage.web-RF47FXIK.mjs +12 -0
- package/lib/web/colors.mjs +2 -0
- package/lib/web/dataViewer.mjs +3 -0
- package/lib/web/floating.mjs +2 -0
- package/lib/web/history.mjs +2 -0
- package/lib/web/hooks.mjs +2 -0
- package/lib/web/index.mjs +15 -0
- package/lib/web/native.mjs +2 -0
- package/lib/web/ui.mjs +2 -0
- package/lib/web/utils.mjs +2 -0
- package/package.json +118 -36
|
@@ -11,7 +11,7 @@ exports.useSafeGlobalSearchParams = useSafeGlobalSearchParams;
|
|
|
11
11
|
exports.useSafePathname = useSafePathname;
|
|
12
12
|
exports.useSafeRouter = useSafeRouter;
|
|
13
13
|
exports.useSafeSegments = useSafeSegments;
|
|
14
|
-
var
|
|
14
|
+
var _expoRouterModule = require("./expoRouterModule");
|
|
15
15
|
/**
|
|
16
16
|
* Safe wrapper for expo-router
|
|
17
17
|
*
|
|
@@ -26,59 +26,10 @@ var _reactNative = require("react-native");
|
|
|
26
26
|
let expoRouter = null;
|
|
27
27
|
let isAvailable = false;
|
|
28
28
|
let checkedAvailability = false;
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Check if the Expo native runtime is available.
|
|
32
|
-
* Handles both old SDKs (NativeModules.ExpoLinking) and new SDKs (54+)
|
|
33
|
-
* where native modules moved to the Expo Modules API.
|
|
34
|
-
*/
|
|
35
|
-
function hasExpoNativeRuntime() {
|
|
36
|
-
// Modern Expo (SDK 50+, both Old and New Architecture): expo-modules-core
|
|
37
|
-
// installs a global `expo` object — the Expo Modules API runtime — via JSI
|
|
38
|
-
// when the native runtime is actually present. This is the most reliable
|
|
39
|
-
// signal and, crucially, the ONLY one of these checks that fires on SDK 54+ /
|
|
40
|
-
// New Architecture dev builds, where the legacy NativeModules entries below
|
|
41
|
-
// are no longer registered (ExpoLinking is gone, NativeUnimoduleProxy isn't
|
|
42
|
-
// on the bridge). It stays absent on bare RN CLI, so there's no false
|
|
43
|
-
// positive there. Without this, navigation-dependent tools (route sitemap,
|
|
44
|
-
// remote navigate, perf-monitor automation) silently no-op on modern builds.
|
|
45
|
-
const expoGlobal = globalThis.expo;
|
|
46
|
-
if (expoGlobal != null && (expoGlobal.modules != null || expoGlobal.EventEmitter != null || expoGlobal.NativeModule != null)) {
|
|
47
|
-
return true;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Check legacy NativeModules bridge (Expo SDK < 54)
|
|
51
|
-
if (_reactNative.NativeModules.ExpoLinking) {
|
|
52
|
-
return true;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// Check for Expo Modules Core native bridge (older SDKs / Old Architecture)
|
|
56
|
-
if (_reactNative.NativeModules.NativeUnimoduleProxy || _reactNative.NativeModules.ExpoModulesCore) {
|
|
57
|
-
return true;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// Check for Expo Go app
|
|
61
|
-
if (_reactNative.NativeModules.ExpoGoModule || _reactNative.NativeModules.ExpoUpdates) {
|
|
62
|
-
return true;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// No Expo native runtime detected (e.g. bare RN CLI).
|
|
66
|
-
// NOTE: We intentionally do NOT try require("expo-modules-core") here because
|
|
67
|
-
// on RN CLI it may be bundled as a transitive dep but the native modules
|
|
68
|
-
// (requireOptionalNativeModule etc.) are undefined, causing crashes.
|
|
69
|
-
return false;
|
|
70
|
-
}
|
|
71
29
|
function checkExpoRouterAvailability() {
|
|
72
30
|
if (checkedAvailability) return isAvailable;
|
|
73
31
|
try {
|
|
74
|
-
|
|
75
|
-
// On RN CLI, expo-router JS may be bundled but native modules aren't registered,
|
|
76
|
-
// so require() succeeds but hooks crash at runtime.
|
|
77
|
-
if (!hasExpoNativeRuntime()) {
|
|
78
|
-
checkedAvailability = true;
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
expoRouter = require("expo-router");
|
|
32
|
+
expoRouter = (0, _expoRouterModule.loadExpoRouter)();
|
|
82
33
|
isAvailable = expoRouter != null && typeof expoRouter.usePathname === "function" && typeof expoRouter.useSegments === "function";
|
|
83
34
|
} catch (error) {
|
|
84
35
|
isAvailable = false;
|
|
@@ -190,8 +141,7 @@ let routerStore;
|
|
|
190
141
|
function getRouterStore() {
|
|
191
142
|
if (routerStore !== undefined) return routerStore;
|
|
192
143
|
try {
|
|
193
|
-
|
|
194
|
-
routerStore = require("expo-router/build/global-state/router-store")?.store ?? null;
|
|
144
|
+
routerStore = (0, _expoRouterModule.loadExpoRouterStore)();
|
|
195
145
|
} catch {
|
|
196
146
|
routerStore = null;
|
|
197
147
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getSafeCurrentPathname = getSafeCurrentPathname;
|
|
7
|
+
exports.getSafeCurrentRoute = getSafeCurrentRoute;
|
|
8
|
+
exports.getSafeRouter = getSafeRouter;
|
|
9
|
+
exports.isExpoRouterAvailable = isExpoRouterAvailable;
|
|
10
|
+
exports.useSafeGlobalSearchParams = useSafeGlobalSearchParams;
|
|
11
|
+
exports.useSafePathname = useSafePathname;
|
|
12
|
+
exports.useSafeRouter = useSafeRouter;
|
|
13
|
+
exports.useSafeSegments = useSafeSegments;
|
|
14
|
+
var _react = require("react");
|
|
15
|
+
var _browserNavigation = require("./browserNavigation.js");
|
|
16
|
+
const subscribe = callback => (0, _browserNavigation.subscribeBrowserNavigation)(callback);
|
|
17
|
+
const currentURL = _browserNavigation.getBrowserRouteURL;
|
|
18
|
+
function useSafeRouter() {
|
|
19
|
+
return _browserNavigation.browserRouter;
|
|
20
|
+
}
|
|
21
|
+
function useSafePathname() {
|
|
22
|
+
(0, _react.useSyncExternalStore)(subscribe, _browserNavigation.getBrowserHref, () => '/');
|
|
23
|
+
return currentURL().pathname;
|
|
24
|
+
}
|
|
25
|
+
function useSafeSegments() {
|
|
26
|
+
return useSafePathname().split('/').filter(Boolean);
|
|
27
|
+
}
|
|
28
|
+
function useSafeGlobalSearchParams() {
|
|
29
|
+
(0, _react.useSyncExternalStore)(subscribe, _browserNavigation.getBrowserHref, () => '/');
|
|
30
|
+
return Object.fromEntries(currentURL().searchParams);
|
|
31
|
+
}
|
|
32
|
+
function getSafeRouter() {
|
|
33
|
+
return typeof window === 'undefined' ? null : _browserNavigation.browserRouter;
|
|
34
|
+
}
|
|
35
|
+
function getSafeCurrentPathname() {
|
|
36
|
+
return currentURL().pathname;
|
|
37
|
+
}
|
|
38
|
+
function getSafeCurrentRoute() {
|
|
39
|
+
const url = currentURL();
|
|
40
|
+
return {
|
|
41
|
+
pathname: url.pathname,
|
|
42
|
+
href: `${url.pathname}${url.search}${url.hash}`,
|
|
43
|
+
segments: url.pathname.split('/').filter(Boolean)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function isExpoRouterAvailable() {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getRegisteredToolModule = getRegisteredToolModule;
|
|
7
|
+
exports.getToolModuleVersion = getToolModuleVersion;
|
|
8
|
+
exports.registerToolModules = registerToolModules;
|
|
9
|
+
const modules = new Map();
|
|
10
|
+
let version = 0;
|
|
11
|
+
function registerToolModules(input) {
|
|
12
|
+
for (const [id, module] of Object.entries(input)) {
|
|
13
|
+
const name = id.startsWith('@buoy-gg/') ? id.replace(/\/web$/, '') : `@buoy-gg/${id}`;
|
|
14
|
+
if (modules.get(name) !== module) {
|
|
15
|
+
modules.set(name, module);
|
|
16
|
+
version++;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function getRegisteredToolModule(name) {
|
|
21
|
+
return modules.get(name) ?? null;
|
|
22
|
+
}
|
|
23
|
+
function getToolModuleVersion() {
|
|
24
|
+
return version;
|
|
25
|
+
}
|
package/lib/module/JsModal.js
CHANGED
|
@@ -17,12 +17,13 @@ import { AccountSetup } from "./license/AccountSetup";
|
|
|
17
17
|
import { useState, useRef, useEffect, useMemo, useCallback, memo, isValidElement, cloneElement } from "react";
|
|
18
18
|
import { View, StyleSheet, TouchableWithoutFeedback, Dimensions, PanResponder, Animated, ScrollView, Text } from "react-native";
|
|
19
19
|
import { absoluteFill } from "./utils/absoluteFill.js";
|
|
20
|
-
import { useSafeAreaInsets } from "./hooks/useSafeAreaInsets
|
|
20
|
+
import { useSafeAreaInsets } from "./hooks/useSafeAreaInsets";
|
|
21
21
|
import { gameUIColors, buoyColors } from "./ui/gameUI/index.js";
|
|
22
22
|
import { DraggableHeader, ModalHintBanner, WindowControls } from "./ui/components/index.js";
|
|
23
23
|
import { ToolBackground } from "./ui/backgrounds/ToolBackground.js";
|
|
24
24
|
import { night } from "./ui/night/nightTheme.js";
|
|
25
|
-
import { persistentStorage } from "./utils/persistentStorage
|
|
25
|
+
import { persistentStorage } from "./utils/persistentStorage";
|
|
26
|
+
import { ModalStorage } from "./utils/modalStorage.js";
|
|
26
27
|
import { devToolsStorageKeys } from "./storage/devToolsStorageKeys.js";
|
|
27
28
|
import { useHintsDisabled } from "./context/index.js";
|
|
28
29
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -62,61 +63,6 @@ const FLOATING_MIN_HEIGHT = 80; // Just a bit more than header height (60px head
|
|
|
62
63
|
*/
|
|
63
64
|
const WINDOW_CONTROLS_BAND = 20;
|
|
64
65
|
|
|
65
|
-
// ============================================================================
|
|
66
|
-
// STORAGE - Modal state persistence with AsyncStorage
|
|
67
|
-
// ============================================================================
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Utility class for persisting modal state to AsyncStorage
|
|
71
|
-
*
|
|
72
|
-
* Handles saving and loading modal state including mode, dimensions,
|
|
73
|
-
* and position with memory caching for performance.
|
|
74
|
-
*/
|
|
75
|
-
class ModalStorage {
|
|
76
|
-
static memoryCache = {};
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Save modal state to AsyncStorage with memory caching
|
|
80
|
-
*
|
|
81
|
-
* @param key - Storage key for the modal state
|
|
82
|
-
* @param value - Modal state to persist
|
|
83
|
-
*/
|
|
84
|
-
static async save(key, value) {
|
|
85
|
-
try {
|
|
86
|
-
this.memoryCache[key] = value;
|
|
87
|
-
await persistentStorage.setItem(key, JSON.stringify(value));
|
|
88
|
-
} catch (error) {
|
|
89
|
-
// Failed to save modal state
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Load modal state from AsyncStorage with memory cache fallback
|
|
95
|
-
*
|
|
96
|
-
* @param key - Storage key for the modal state
|
|
97
|
-
* @returns Persisted modal state or null if not found
|
|
98
|
-
*/
|
|
99
|
-
static async load(key) {
|
|
100
|
-
try {
|
|
101
|
-
// Try memory cache first
|
|
102
|
-
if (this.memoryCache[key]) {
|
|
103
|
-
return this.memoryCache[key];
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// Load from storage (AsyncStorage or memory fallback)
|
|
107
|
-
const stored = await persistentStorage.getItem(key);
|
|
108
|
-
if (stored) {
|
|
109
|
-
const parsed = JSON.parse(stored);
|
|
110
|
-
this.memoryCache[key] = parsed;
|
|
111
|
-
return parsed;
|
|
112
|
-
}
|
|
113
|
-
} catch (error) {
|
|
114
|
-
// Failed to load modal state
|
|
115
|
-
}
|
|
116
|
-
return null;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
66
|
// ============================================================================
|
|
121
67
|
// TYPE DEFINITIONS - Interface contracts for the modal
|
|
122
68
|
// ============================================================================
|
|
@@ -646,6 +592,7 @@ const JsModalComponent = ({
|
|
|
646
592
|
height: currentDimensionsRef.current.height
|
|
647
593
|
}
|
|
648
594
|
};
|
|
595
|
+
if (enablePersistence && persistenceKey) void ModalStorage.saveMinimized(persistenceKey, currentState);
|
|
649
596
|
|
|
650
597
|
// Animate modal shrinking toward target position
|
|
651
598
|
const targetX = minimizeTargetPosition?.x ?? SCREEN.width - 50;
|
|
@@ -686,7 +633,7 @@ const JsModalComponent = ({
|
|
|
686
633
|
onMinimize(currentState);
|
|
687
634
|
});
|
|
688
635
|
}
|
|
689
|
-
}, [mode, onMinimize, minimizeTargetPosition, visibilityProgress, bottomSheetTranslateY, floatingScale, floatingPosition]);
|
|
636
|
+
}, [mode, onMinimize, minimizeTargetPosition, enablePersistence, persistenceKey, visibilityProgress, bottomSheetTranslateY, floatingScale, floatingPosition]);
|
|
690
637
|
const lastMinimizeRequest = useRef(minimizeRequest);
|
|
691
638
|
useEffect(() => {
|
|
692
639
|
if (lastMinimizeRequest.current === minimizeRequest) return;
|
|
@@ -1329,7 +1276,11 @@ const JsModalComponent = ({
|
|
|
1329
1276
|
paddingBottom: footerHeight
|
|
1330
1277
|
},
|
|
1331
1278
|
showsVerticalScrollIndicator: true,
|
|
1332
|
-
nestedScrollEnabled: true
|
|
1279
|
+
nestedScrollEnabled: true
|
|
1280
|
+
// Without this, a tap on a button while the keyboard is up only
|
|
1281
|
+
// dismisses the keyboard: typing a URL and tapping Load did nothing.
|
|
1282
|
+
,
|
|
1283
|
+
keyboardShouldPersistTaps: "handled",
|
|
1333
1284
|
children: children
|
|
1334
1285
|
}), footer ? /*#__PURE__*/_jsx(View, {
|
|
1335
1286
|
style: footerStyles.footerContainer,
|
|
@@ -1443,6 +1394,7 @@ const JsModalComponent = ({
|
|
|
1443
1394
|
},
|
|
1444
1395
|
showsVerticalScrollIndicator: true,
|
|
1445
1396
|
nestedScrollEnabled: true,
|
|
1397
|
+
keyboardShouldPersistTaps: "handled",
|
|
1446
1398
|
children: children
|
|
1447
1399
|
}), footer ? /*#__PURE__*/_jsx(View, {
|
|
1448
1400
|
style: footerStyles.footerContainer,
|
|
@@ -11,7 +11,7 @@ import { AccountSetup } from "./license/AccountSetup";
|
|
|
11
11
|
* native file. Zero react-native imports — header chrome that lives in
|
|
12
12
|
* shared-ui RN components (`WindowControls`, `DraggableHeader`, `ModalHeader`,
|
|
13
13
|
* `ModalHintBanner`) is replicated as DOM with provenance comments, the same
|
|
14
|
-
* way
|
|
14
|
+
* way the browser host supplies DOM positioning.
|
|
15
15
|
*
|
|
16
16
|
* Gesture spec (verbatim from native):
|
|
17
17
|
* - Sheet header drag: steal at |dy| > 3px, absolute finger anchoring
|
|
@@ -26,17 +26,8 @@ import { AccountSetup } from "./license/AccountSetup";
|
|
|
26
26
|
* - Header taps (both modes): taps accumulate within a 500ms window and
|
|
27
27
|
* settle after 300ms — 2 taps toggles mode, ≥3 taps minimizes.
|
|
28
28
|
*
|
|
29
|
-
* Persistence
|
|
30
|
-
* is
|
|
31
|
-
* `@react_buoy…` keys or short keys — no extra derivation happens here
|
|
32
|
-
* either). JSON shape `{ mode, panelHeight, dimensions: {width, height, top,
|
|
33
|
-
* left}, isVisible }`, saved on a 500ms debounce after state loads, with the
|
|
34
|
-
* same in-memory cache in front of storage. Backed by a local
|
|
35
|
-
* localStorage adapter matching the `persistentStorage` API — importing
|
|
36
|
-
* `./utils/persistentStorage` is avoided on purpose: its lazy `require()`
|
|
37
|
-
* probing of expo-file-system/AsyncStorage doesn't survive Vite's ESM graph.
|
|
38
|
-
* The hint-acknowledged flag uses the real `devToolsStorageKeys` helper
|
|
39
|
-
* (zero-dep) so the key matches native exactly.
|
|
29
|
+
* Persistence uses the shared ModalStorage implementation and platform storage.
|
|
30
|
+
* State is saved on a 500ms debounce, with an immediate save on minimize.
|
|
40
31
|
*
|
|
41
32
|
* Intentional deviations from the native file (all logged):
|
|
42
33
|
* - No native-driver springs: rAF drives all animations. The open/close
|
|
@@ -56,14 +47,12 @@ import { AccountSetup } from "./license/AccountSetup";
|
|
|
56
47
|
* WKWebView) doesn't bake in a 0×0 screen.
|
|
57
48
|
* - Safe-area insets come from a one-shot `env(safe-area-inset-*)` probe
|
|
58
49
|
* (same trick as floatingTools.web.tsx) instead of the RN hook.
|
|
59
|
-
* - On restore
|
|
60
|
-
*
|
|
61
|
-
* doesn't pass `initialModalState` back, and without the re-sync the panel
|
|
62
|
-
* would reappear at the minimize target.
|
|
50
|
+
* - On restore, the floating position re-syncs from the saved dimensions.
|
|
51
|
+
* Some tool components do not forward `initialModalState`.
|
|
63
52
|
* - `JsModalProps` is additionally exported (native keeps it private) so web
|
|
64
53
|
* consumers can type wrappers without redeclaring the contract.
|
|
65
|
-
* - `visible={false}`
|
|
66
|
-
*
|
|
54
|
+
* - `visible={false}` hides the content in a `display:none` container.
|
|
55
|
+
* Tool state that must survive shell changes belongs above this component.
|
|
67
56
|
* - The hidden/floating/bottomSheet root branches carry distinct React keys:
|
|
68
57
|
* the rAF animations write opacity/transform straight to the DOM, and DOM
|
|
69
58
|
* reuse across branches (e.g. an async persisted-mode flip mid-entrance)
|
|
@@ -73,6 +62,8 @@ import { AccountSetup } from "./license/AccountSetup";
|
|
|
73
62
|
*/
|
|
74
63
|
|
|
75
64
|
import { useState, useRef, useEffect, useLayoutEffect, useCallback, memo, isValidElement, cloneElement } from "react";
|
|
65
|
+
import { persistentStorage as webPersistentStorage } from "./utils/persistentStorage";
|
|
66
|
+
import { ModalStorage } from "./utils/modalStorage.js";
|
|
76
67
|
import { devToolsStorageKeys } from "./storage/devToolsStorageKeys.js";
|
|
77
68
|
import { useHintsDisabled } from "./context/index.js";
|
|
78
69
|
// RN component, but safe here: every consumer of the web modal (desktop
|
|
@@ -130,59 +121,6 @@ const screenH = () => typeof window !== "undefined" ? window.innerHeight : 0;
|
|
|
130
121
|
// STORAGE — exact native ModalStorage semantics over localStorage
|
|
131
122
|
// ============================================================================
|
|
132
123
|
|
|
133
|
-
/**
|
|
134
|
-
* Local localStorage-backed adapter matching the shared `persistentStorage`
|
|
135
|
-
* API surface JsModal uses (getItem/setItem). Same recipe as the app shims
|
|
136
|
-
* (example-tauri/src/shims/shared-ui.web.ts).
|
|
137
|
-
*/
|
|
138
|
-
const webPersistentStorage = {
|
|
139
|
-
async getItem(key) {
|
|
140
|
-
try {
|
|
141
|
-
return window.localStorage.getItem(key);
|
|
142
|
-
} catch {
|
|
143
|
-
return null;
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
async setItem(key, value) {
|
|
147
|
-
try {
|
|
148
|
-
window.localStorage.setItem(key, value);
|
|
149
|
-
} catch {
|
|
150
|
-
// Best-effort, like native's swallowed save errors.
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
/** Persisted JSON shape — identical to native `PersistedModalState`. */
|
|
156
|
-
|
|
157
|
-
/** Native `ModalStorage` twin: memory cache in front of persistent storage. */
|
|
158
|
-
class ModalStorage {
|
|
159
|
-
static memoryCache = {};
|
|
160
|
-
static async save(key, value) {
|
|
161
|
-
try {
|
|
162
|
-
this.memoryCache[key] = value;
|
|
163
|
-
await webPersistentStorage.setItem(key, JSON.stringify(value));
|
|
164
|
-
} catch {
|
|
165
|
-
// Failed to save modal state
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
static async load(key) {
|
|
169
|
-
try {
|
|
170
|
-
if (this.memoryCache[key]) {
|
|
171
|
-
return this.memoryCache[key];
|
|
172
|
-
}
|
|
173
|
-
const stored = await webPersistentStorage.getItem(key);
|
|
174
|
-
if (stored) {
|
|
175
|
-
const parsed = JSON.parse(stored);
|
|
176
|
-
this.memoryCache[key] = parsed;
|
|
177
|
-
return parsed;
|
|
178
|
-
}
|
|
179
|
-
} catch {
|
|
180
|
-
// Failed to load modal state
|
|
181
|
-
}
|
|
182
|
-
return null;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
124
|
// ============================================================================
|
|
187
125
|
// TYPES — same exported names as native
|
|
188
126
|
// ============================================================================
|
|
@@ -404,8 +342,8 @@ const WC_COLORS = {
|
|
|
404
342
|
minimize: "#FEBC2E",
|
|
405
343
|
toggleMode: "#28C840"
|
|
406
344
|
};
|
|
407
|
-
const WC_BUTTON_SIZE =
|
|
408
|
-
const WC_BUTTON_SPACING =
|
|
345
|
+
const WC_BUTTON_SIZE = 24;
|
|
346
|
+
const WC_BUTTON_SPACING = 2;
|
|
409
347
|
const WC_ICON_SIZE = 8; // native ICON_SIZE
|
|
410
348
|
|
|
411
349
|
const wcDotStyle = bg => ({
|
|
@@ -415,7 +353,7 @@ const wcDotStyle = bg => ({
|
|
|
415
353
|
display: "flex",
|
|
416
354
|
alignItems: "center",
|
|
417
355
|
justifyContent: "center",
|
|
418
|
-
|
|
356
|
+
background: `radial-gradient(circle, ${bg} 6px, transparent 6px)`,
|
|
419
357
|
border: "none",
|
|
420
358
|
padding: 0,
|
|
421
359
|
cursor: "pointer",
|
|
@@ -488,10 +426,10 @@ const DragIndicator = /*#__PURE__*/memo(function DragIndicator({
|
|
|
488
426
|
alignItems: "center",
|
|
489
427
|
position: "relative",
|
|
490
428
|
// native dragIndicatorContainer: paddingVertical 8; custom variant
|
|
491
|
-
//
|
|
429
|
+
// reserves room for the browser window controls
|
|
492
430
|
// so the header row below can run the full width.
|
|
493
431
|
justifyContent: hasCustomContent ? "center" : undefined,
|
|
494
|
-
minHeight: hasCustomContent ?
|
|
432
|
+
minHeight: hasCustomContent ? 32 : undefined,
|
|
495
433
|
paddingTop: hasCustomContent ? 0 : 8,
|
|
496
434
|
paddingBottom: hasCustomContent ? 0 : 8,
|
|
497
435
|
backgroundColor: "transparent"
|
|
@@ -766,6 +704,8 @@ const JsModalComponent = ({
|
|
|
766
704
|
const [insets] = useState(readSafeAreaInsets);
|
|
767
705
|
const [isStateLoaded, setIsStateLoaded] = useState(!enablePersistence);
|
|
768
706
|
const [mode, setMode] = useState(initialMode);
|
|
707
|
+
const onModeChangeRef = useRef(onModeChange);
|
|
708
|
+
onModeChangeRef.current = onModeChange;
|
|
769
709
|
const [isResizing, setIsResizing] = useState(false);
|
|
770
710
|
const [isDragging, setIsDragging] = useState(false);
|
|
771
711
|
const [panelHeight, setPanelHeight] = useState(initialHeight);
|
|
@@ -819,7 +759,7 @@ const JsModalComponent = ({
|
|
|
819
759
|
if (mounted && savedState) {
|
|
820
760
|
if (savedState.mode) {
|
|
821
761
|
setMode(savedState.mode);
|
|
822
|
-
|
|
762
|
+
onModeChangeRef.current?.(savedState.mode);
|
|
823
763
|
}
|
|
824
764
|
if (savedState.panelHeight) {
|
|
825
765
|
setPanelHeight(savedState.panelHeight);
|
|
@@ -843,7 +783,7 @@ const JsModalComponent = ({
|
|
|
843
783
|
mounted = false;
|
|
844
784
|
};
|
|
845
785
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
846
|
-
}, [persistenceKey, enablePersistence
|
|
786
|
+
}, [persistenceKey, enablePersistence]);
|
|
847
787
|
useEffect(() => {
|
|
848
788
|
if (!enablePersistence || !persistenceKey || !isStateLoaded) return;
|
|
849
789
|
const timeoutId = setTimeout(() => {
|
|
@@ -898,12 +838,10 @@ const JsModalComponent = ({
|
|
|
898
838
|
const toggleMode = useCallback(() => {
|
|
899
839
|
setIsDragging(false);
|
|
900
840
|
setIsResizing(false);
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
});
|
|
906
|
-
}, [onModeChange]);
|
|
841
|
+
const newMode = mode === "bottomSheet" ? "floating" : "bottomSheet";
|
|
842
|
+
setMode(newMode);
|
|
843
|
+
onModeChangeRef.current?.(newMode);
|
|
844
|
+
}, [mode]);
|
|
907
845
|
|
|
908
846
|
// Belt-and-suspenders: also clear flags when mode changes (native parity).
|
|
909
847
|
useEffect(() => {
|
|
@@ -924,6 +862,7 @@ const JsModalComponent = ({
|
|
|
924
862
|
height: currentDimensionsRef.current.height
|
|
925
863
|
}
|
|
926
864
|
};
|
|
865
|
+
if (enablePersistence && persistenceKey) void ModalStorage.saveMinimized(persistenceKey, currentState);
|
|
927
866
|
|
|
928
867
|
// native defaults: SCREEN.width - 50 / SCREEN.height - 150
|
|
929
868
|
const targetX = minimizeTargetPosition?.x ?? screenW() - 50;
|
|
@@ -960,7 +899,7 @@ const JsModalComponent = ({
|
|
|
960
899
|
el.style.transform = `translate(${x}px, ${y}px)`;
|
|
961
900
|
}, () => onMinimize(currentState)));
|
|
962
901
|
}
|
|
963
|
-
}, [mode, onMinimize, minimizeTargetPosition, cancelAnims]);
|
|
902
|
+
}, [mode, onMinimize, minimizeTargetPosition, cancelAnims, enablePersistence, persistenceKey]);
|
|
964
903
|
const lastMinimizeRequest = useRef(minimizeRequest);
|
|
965
904
|
useEffect(() => {
|
|
966
905
|
if (lastMinimizeRequest.current === minimizeRequest) return;
|
|
@@ -973,7 +912,7 @@ const JsModalComponent = ({
|
|
|
973
912
|
if (!initialModalState) return;
|
|
974
913
|
if (initialModalState.mode) {
|
|
975
914
|
setMode(initialModalState.mode);
|
|
976
|
-
|
|
915
|
+
onModeChangeRef.current?.(initialModalState.mode);
|
|
977
916
|
}
|
|
978
917
|
if (initialModalState.panelHeight) {
|
|
979
918
|
setPanelHeight(initialModalState.panelHeight);
|
|
@@ -1020,9 +959,7 @@ const JsModalComponent = ({
|
|
|
1020
959
|
} else {
|
|
1021
960
|
const el = floatRef.current;
|
|
1022
961
|
if (!el) return;
|
|
1023
|
-
// Restore
|
|
1024
|
-
// the last committed rect so the panel doesn't reopen at the minimize
|
|
1025
|
-
// target the web AppHost never restores via initialModalState.
|
|
962
|
+
// Restore the saved position after the minimize animation.
|
|
1026
963
|
posRef.current = {
|
|
1027
964
|
x: currentDimensionsRef.current.left,
|
|
1028
965
|
y: currentDimensionsRef.current.top
|
|
@@ -1080,7 +1017,7 @@ const JsModalComponent = ({
|
|
|
1080
1017
|
if (mode !== "bottomSheet") return;
|
|
1081
1018
|
// Ignore clicks on interactive header children (window controls live
|
|
1082
1019
|
// outside the header, but custom content may contain buttons).
|
|
1083
|
-
if (e.target.closest("button")) return;
|
|
1020
|
+
if (e.button !== 0 || e.target.closest('button, a, input, textarea, select, [role="button"], [role="tab"], [role="switch"], [contenteditable="true"], [tabindex]')) return;
|
|
1084
1021
|
const g = sheetGestureRef.current;
|
|
1085
1022
|
g.active = true;
|
|
1086
1023
|
g.resizing = false;
|
|
@@ -1185,7 +1122,7 @@ const JsModalComponent = ({
|
|
|
1185
1122
|
const handleFloatPointerDown = useCallback(e => {
|
|
1186
1123
|
// native: DraggableHeader enabled = mode === "floating" && !isResizing
|
|
1187
1124
|
if (mode !== "floating" || isResizing) return;
|
|
1188
|
-
if (e.target.closest("button")) return;
|
|
1125
|
+
if (e.button !== 0 || e.target.closest('button, a, input, textarea, select, [role="button"], [role="tab"], [role="switch"], [contenteditable="true"], [tabindex]')) return;
|
|
1189
1126
|
const g = dragGestureRef.current;
|
|
1190
1127
|
g.active = true;
|
|
1191
1128
|
g.dragging = false;
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
// Re-export everything from the generated implementation
|
|
22
|
-
export { clipboardFunction, clipboardType, isClipboardAvailable } from "./clipboard-impl
|
|
22
|
+
export { clipboardFunction, clipboardType, isClipboardAvailable } from "./clipboard-impl";
|
|
23
23
|
|
|
24
24
|
// For backwards compatibility, also export these wrapper functions
|
|
25
|
-
import { clipboardFunction, isClipboardAvailable as _isClipboardAvailable } from "./clipboard-impl
|
|
25
|
+
import { clipboardFunction, isClipboardAvailable as _isClipboardAvailable } from "./clipboard-impl";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Attempts to auto-detect and return a clipboard implementation.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export const isClipboardAvailable = () => typeof navigator !== "undefined" && typeof navigator.clipboard?.writeText === "function";
|
|
4
|
+
export const clipboardType = () => isClipboardAvailable() ? "web" : null;
|
|
5
|
+
export const clipboardFunction = async text => {
|
|
6
|
+
try {
|
|
7
|
+
if (!isClipboardAvailable()) return false;
|
|
8
|
+
await navigator.clipboard.writeText(text);
|
|
9
|
+
return true;
|
|
10
|
+
} catch {
|
|
11
|
+
// Clipboard access can be denied even in a secure context.
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
@@ -291,8 +291,10 @@ function stringifyValue(value, compact = true) {
|
|
|
291
291
|
return `"${value}"`;
|
|
292
292
|
}
|
|
293
293
|
if (typeof value === "number") {
|
|
294
|
-
//
|
|
295
|
-
|
|
294
|
+
// The exact value. toLocaleString() added separators (1019 read as
|
|
295
|
+
// "1,019", like a string) and rounded to three decimals, so a diff could
|
|
296
|
+
// show a change that looked like nothing, or hide one that was real.
|
|
297
|
+
return String(value);
|
|
296
298
|
}
|
|
297
299
|
if (typeof value === "boolean") {
|
|
298
300
|
return String(value);
|
|
@@ -4,6 +4,6 @@ export { useFilterManager } from "./useFilterManager.js";
|
|
|
4
4
|
export { usePersistedState, resetPersistedStateCache } from "./usePersistedState.js";
|
|
5
5
|
export { useChangeLog, useSubscribedValue } from "./useChangeLog.js";
|
|
6
6
|
export { useEventStoreEvents } from "./useEventStoreEvents.js";
|
|
7
|
-
export { useSafeAreaInsets } from "./useSafeAreaInsets
|
|
8
|
-
export { getSafeAreaInsets } from "./useSafeAreaInsets
|
|
7
|
+
export { useSafeAreaInsets } from "./useSafeAreaInsets";
|
|
8
|
+
export { getSafeAreaInsets } from "./useSafeAreaInsets";
|
|
9
9
|
export { useDeviceInfo, getDeviceInfo, logDeviceInfo } from "./useDeviceInfo.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
4
|
-
import { persistentStorage } from "../utils/persistentStorage
|
|
4
|
+
import { persistentStorage } from "../utils/persistentStorage";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Per-key cache so remounts (and multiple consumers of the same key) render
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import { getSafeAreaInsets } from "../utils/getSafeAreaInsets.web.js";
|
|
5
|
+
export { getSafeAreaInsets } from "../utils/getSafeAreaInsets.web.js";
|
|
6
|
+
export function useSafeAreaInsets(options = {}) {
|
|
7
|
+
const [insets, setInsets] = useState({
|
|
8
|
+
top: 0,
|
|
9
|
+
bottom: 0,
|
|
10
|
+
left: 0,
|
|
11
|
+
right: 0
|
|
12
|
+
});
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
const update = () => setInsets(getSafeAreaInsets());
|
|
15
|
+
update();
|
|
16
|
+
window.addEventListener("resize", update);
|
|
17
|
+
window.visualViewport?.addEventListener("resize", update);
|
|
18
|
+
return () => {
|
|
19
|
+
window.removeEventListener("resize", update);
|
|
20
|
+
window.visualViewport?.removeEventListener("resize", update);
|
|
21
|
+
};
|
|
22
|
+
}, []);
|
|
23
|
+
return {
|
|
24
|
+
top: Math.max(insets.top, options.minTop ?? 0),
|
|
25
|
+
bottom: Math.max(insets.bottom, options.minBottom ?? 0),
|
|
26
|
+
left: Math.max(insets.left, options.minLeft ?? 0),
|
|
27
|
+
right: Math.max(insets.right, options.minRight ?? 0)
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export const hasNotch = () => getSafeAreaInsets().hasNotch;
|
|
@@ -59,4 +59,5 @@ Trash2Glyph as Trash, UnlockGlyph as Unlock, UploadGlyph as Upload, UserGlyph as
|
|
|
59
59
|
export { SentryIcon, EventsIcon, RoutesIcon, RoutePinIcon, RoutePathIcon, RouteDotIcon, RouteTwoPinsIcon, CameraIcon, HighlightIcon, ReduxIcon, StorageIcon, AskBuoyIcon, HighlighterIcon, QueryIcon, ScenariosIcon } from "@buoy-gg/floating-tools-core";
|
|
60
60
|
// `WifiIcon` here stays the lucide glyph (react-query's online toggle); the BIF wifi ships as
|
|
61
61
|
// `WifiBifIcon`. `BenchmarkIcon` IS the BIF stopwatch since 2026-09-04 (perf-monitor's dial icon).
|
|
62
|
-
export { WifiIcon as WifiBifIcon, BenchmarkIcon, BENCHMARK_ICON_COLOR } from "@buoy-gg/floating-tools-core";
|
|
62
|
+
export { WifiIcon as WifiBifIcon, BenchmarkIcon, BENCHMARK_ICON_COLOR } from "@buoy-gg/floating-tools-core";
|
|
63
|
+
export { NotificationsIcon, NOTIFICATIONS_ICON_COLOR } from "@buoy-gg/floating-tools-core";
|
package/lib/module/index.js
CHANGED
|
@@ -52,6 +52,9 @@ Subscribable,
|
|
|
52
52
|
subscriberCountNotifier, subscribeToSubscriberCountChanges, notifySubscriberCountChange,
|
|
53
53
|
// Safe expo-router wrappers (falls back to no-ops on RN CLI)
|
|
54
54
|
useSafeRouter, useSafePathname, useSafeSegments, useSafeGlobalSearchParams, getSafeRouter, getSafeCurrentPathname, getSafeCurrentRoute, isExpoRouterAvailable } from "./utils/index.js";
|
|
55
|
+
export * from "./utils/toolModules.js";
|
|
56
|
+
export { registerBrowserRouter, browserRouter, subscribeBrowserNavigation } from "./utils/browserNavigation.js";
|
|
57
|
+
|
|
55
58
|
// Time Machine snapshot-provider kit (restore scope, verdict ladder, result shapes)
|
|
56
59
|
export { PREVIEW_ITEM_RENDER_BYTE_LIMIT, createRestoreScope, emptyRestoreResult, failedRestore, skippedRestore, classifyPreviewItem, wontApply, unionKeys } from "./utils/snapshotProviderKit.js";
|
|
57
60
|
|