@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
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Shared "ignored patterns" store for network-style URL filtering.
|
|
5
|
+
*
|
|
6
|
+
* This is the SINGLE source of truth for the domains/URL patterns that the
|
|
7
|
+
* Network tool (and now the Events tool) hide from their lists. Both tools read
|
|
8
|
+
* and mutate this one singleton, so an ignore toggled in either place is shared
|
|
9
|
+
* everywhere and persisted to the same storage key.
|
|
10
|
+
*
|
|
11
|
+
* Lives in @buoy-gg/shared-ui (a hard dependency of both @buoy-gg/network and
|
|
12
|
+
* @buoy-gg/events) so the filter logic can be shared without @buoy-gg/events
|
|
13
|
+
* having to take a hard dependency on @buoy-gg/network (which is optional).
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { useEffect, useMemo, useState } from "react";
|
|
17
|
+
import { persistentStorage } from "../utils/persistentStorage";
|
|
18
|
+
import { devToolsStorageKeys } from "../storage/devToolsStorageKeys.js";
|
|
19
|
+
|
|
20
|
+
// Pure matching types/helpers live in ignoredPatternsCore.ts (web-shim-safe);
|
|
21
|
+
// re-exported here so the shared-ui barrel surface is unchanged.
|
|
22
|
+
import { DEFAULT_IGNORED_PATTERNS } from "./ignoredPatternsCore.js";
|
|
23
|
+
export { urlMatchesIgnoredPattern, isUrlIgnored } from "./ignoredPatternsCore.js";
|
|
24
|
+
const DEFAULT_PATTERNS = DEFAULT_IGNORED_PATTERNS;
|
|
25
|
+
|
|
26
|
+
/** Tolerate the legacy `string[]` persisted format and stray junk. */
|
|
27
|
+
function migratePatterns(raw) {
|
|
28
|
+
if (!Array.isArray(raw)) return [];
|
|
29
|
+
const migrated = [];
|
|
30
|
+
for (const entry of raw) {
|
|
31
|
+
if (typeof entry === "string" && entry.trim()) {
|
|
32
|
+
migrated.push({
|
|
33
|
+
value: entry,
|
|
34
|
+
mode: "contains"
|
|
35
|
+
});
|
|
36
|
+
} else if (entry && typeof entry === "object" && typeof entry.value === "string") {
|
|
37
|
+
const e = entry;
|
|
38
|
+
migrated.push({
|
|
39
|
+
value: e.value,
|
|
40
|
+
mode: e.mode === "exact" ? "exact" : "contains"
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return migrated;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** Always keep the default patterns present (e.g. Buoy's license API). */
|
|
48
|
+
function ensureDefaults(patterns) {
|
|
49
|
+
const result = [...patterns];
|
|
50
|
+
for (const def of DEFAULT_PATTERNS) {
|
|
51
|
+
if (!result.some(p => p.value === def.value)) {
|
|
52
|
+
result.push({
|
|
53
|
+
...def
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return result;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Singleton store. One instance per JS runtime, so every consumer (Network tool,
|
|
61
|
+
* Events tool, on mobile or on the desktop dashboard) shares the same patterns.
|
|
62
|
+
*/
|
|
63
|
+
class IgnoredPatternsStore {
|
|
64
|
+
patterns = ensureDefaults(DEFAULT_PATTERNS.map(p => ({
|
|
65
|
+
...p
|
|
66
|
+
})));
|
|
67
|
+
listeners = new Set();
|
|
68
|
+
loaded = false;
|
|
69
|
+
loadPromise = null;
|
|
70
|
+
/** Set once a mutation happens so a slow initial load can't clobber it. */
|
|
71
|
+
dirty = false;
|
|
72
|
+
|
|
73
|
+
/** Current patterns (stable reference until a mutation occurs). */
|
|
74
|
+
getPatterns() {
|
|
75
|
+
return this.patterns;
|
|
76
|
+
}
|
|
77
|
+
subscribe(listener) {
|
|
78
|
+
this.listeners.add(listener);
|
|
79
|
+
// Lazily hydrate from storage the first time anyone cares.
|
|
80
|
+
void this.ensureLoaded();
|
|
81
|
+
return () => {
|
|
82
|
+
this.listeners.delete(listener);
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
emit() {
|
|
86
|
+
this.listeners.forEach(l => l());
|
|
87
|
+
}
|
|
88
|
+
ensureLoaded() {
|
|
89
|
+
if (this.loaded) return Promise.resolve();
|
|
90
|
+
if (this.loadPromise) return this.loadPromise;
|
|
91
|
+
this.loadPromise = (async () => {
|
|
92
|
+
try {
|
|
93
|
+
const stored = await persistentStorage.getItem(devToolsStorageKeys.network.ignoredDomains());
|
|
94
|
+
// A mutation may have raced this read — never overwrite user intent.
|
|
95
|
+
if (stored && !this.dirty) {
|
|
96
|
+
const migrated = ensureDefaults(migratePatterns(JSON.parse(stored)));
|
|
97
|
+
this.patterns = migrated;
|
|
98
|
+
}
|
|
99
|
+
} catch {
|
|
100
|
+
// Silently fall back to defaults.
|
|
101
|
+
} finally {
|
|
102
|
+
this.loaded = true;
|
|
103
|
+
this.emit();
|
|
104
|
+
}
|
|
105
|
+
})();
|
|
106
|
+
return this.loadPromise;
|
|
107
|
+
}
|
|
108
|
+
persist() {
|
|
109
|
+
persistentStorage.setItem(devToolsStorageKeys.network.ignoredDomains(), JSON.stringify(this.patterns)).catch(() => {
|
|
110
|
+
// Silently fail — patterns remain in memory.
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
commit(next) {
|
|
114
|
+
this.dirty = true;
|
|
115
|
+
this.patterns = next;
|
|
116
|
+
this.emit();
|
|
117
|
+
this.persist();
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/** Add a pattern (no-op if its value already exists). */
|
|
121
|
+
add(pattern) {
|
|
122
|
+
const value = pattern.value.trim();
|
|
123
|
+
if (!value) return;
|
|
124
|
+
if (this.patterns.some(p => p.value === value)) return;
|
|
125
|
+
this.commit([...this.patterns, {
|
|
126
|
+
value,
|
|
127
|
+
mode: pattern.mode
|
|
128
|
+
}]);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** Remove a pattern by value. */
|
|
132
|
+
remove(value) {
|
|
133
|
+
if (!this.patterns.some(p => p.value === value)) return;
|
|
134
|
+
this.commit(this.patterns.filter(p => p.value !== value));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** Add as `contains` if absent, otherwise remove (used by detail-view chips). */
|
|
138
|
+
toggle(value) {
|
|
139
|
+
const trimmed = value.trim();
|
|
140
|
+
if (!trimmed) return;
|
|
141
|
+
this.commit(this.patterns.some(p => p.value === trimmed) ? this.patterns.filter(p => p.value !== trimmed) : [...this.patterns, {
|
|
142
|
+
value: trimmed,
|
|
143
|
+
mode: "contains"
|
|
144
|
+
}]);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/** Flip an existing pattern between `contains` and `exact`. */
|
|
148
|
+
toggleMode(value) {
|
|
149
|
+
if (!this.patterns.some(p => p.value === value)) return;
|
|
150
|
+
this.commit(this.patterns.map(p => p.value === value ? {
|
|
151
|
+
...p,
|
|
152
|
+
mode: p.mode === "contains" ? "exact" : "contains"
|
|
153
|
+
} : p));
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
export const ignoredPatternsStore = new IgnoredPatternsStore();
|
|
157
|
+
/**
|
|
158
|
+
* Mutations live at module scope so they keep a STABLE identity across
|
|
159
|
+
* renders. They used to be inline arrows in the return object, which handed
|
|
160
|
+
* every consumer a fresh `toggle` on each render and defeated `memo` on
|
|
161
|
+
* anything they were passed down to — measured on the network detail view,
|
|
162
|
+
* where it forced a full re-render of the inspector per step.
|
|
163
|
+
*/
|
|
164
|
+
const addPattern = pattern => ignoredPatternsStore.add(pattern);
|
|
165
|
+
const removePattern = value => ignoredPatternsStore.remove(value);
|
|
166
|
+
const togglePattern = value => ignoredPatternsStore.toggle(value);
|
|
167
|
+
const togglePatternMode = value => ignoredPatternsStore.toggleMode(value);
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Subscribe to the shared ignored-patterns store. All consumers in a runtime
|
|
171
|
+
* see the same patterns and the same mutations.
|
|
172
|
+
*/
|
|
173
|
+
export function useIgnoredPatterns() {
|
|
174
|
+
const [patterns, setPatterns] = useState(() => ignoredPatternsStore.getPatterns());
|
|
175
|
+
useEffect(() => {
|
|
176
|
+
return ignoredPatternsStore.subscribe(() => {
|
|
177
|
+
setPatterns(ignoredPatternsStore.getPatterns());
|
|
178
|
+
});
|
|
179
|
+
}, []);
|
|
180
|
+
const values = useMemo(() => new Set(patterns.map(p => p.value)), [patterns]);
|
|
181
|
+
return {
|
|
182
|
+
patterns,
|
|
183
|
+
values,
|
|
184
|
+
add: addPattern,
|
|
185
|
+
remove: removePattern,
|
|
186
|
+
toggle: togglePattern,
|
|
187
|
+
toggleMode: togglePatternMode
|
|
188
|
+
};
|
|
189
|
+
}
|
|
@@ -1,221 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
* ignoredPatternsStore.web — web twin of ignoredPatternsStore.ts (the shared
|
|
5
|
-
* persisted "ignored patterns" singleton for network-style URL filtering).
|
|
6
|
-
*
|
|
7
|
-
* The native store imports shared's RN `persistentStorage` (whose module graph
|
|
8
|
-
* carries guarded expo-file-system / async-storage requires), which is why the
|
|
9
|
-
* web shims never re-exported it. This twin keeps the ENTIRE store class, hook
|
|
10
|
-
* and persistence contract identical — same class shape, same
|
|
11
|
-
* `devToolsStorageKeys.network.ignoredDomains()` storage key, same persisted
|
|
12
|
-
* JSON shape (`IgnoredPattern[]`, with the legacy `string[]` migration) — and
|
|
13
|
-
* swaps only the storage backing: a file-local localStorage adapter that
|
|
14
|
-
* matches the `persistentStorage` API (async getItem/setItem, best-effort,
|
|
15
|
-
* provenance: example-tauri/src/shims/shared-ui.web.ts's adapter — web Buoy
|
|
16
|
-
* chrome persistence lives in webview localStorage).
|
|
17
|
-
*
|
|
18
|
-
* Everything else — pure matching (`ignoredPatternsCore`), the migration +
|
|
19
|
-
* ensure-defaults logic, the dirty-flag load race guard, the module-scope
|
|
20
|
-
* stable mutation identities — is the native code, not a fork of its
|
|
21
|
-
* semantics. Web consumers get the same shared, persisted pattern list the
|
|
22
|
-
* phone has, keyed identically, so a DOM port and a react-native-web port of
|
|
23
|
-
* the same app read/write the same entry.
|
|
24
|
-
*
|
|
25
|
-
* @platform React DOM Web
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
import { useEffect, useMemo, useState } from "react";
|
|
29
|
-
import { devToolsStorageKeys } from "../storage/devToolsStorageKeys.js";
|
|
30
|
-
|
|
31
|
-
// Pure matching types/helpers live in ignoredPatternsCore.ts (web-shim-safe);
|
|
32
|
-
// re-exported here so this module's surface twins the native store's.
|
|
33
|
-
import { DEFAULT_IGNORED_PATTERNS } from "./ignoredPatternsCore.js";
|
|
34
|
-
export { urlMatchesIgnoredPattern, isUrlIgnored } from "./ignoredPatternsCore.js";
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* localStorage-backed implementation of the shared `persistentStorage` API
|
|
38
|
-
* (getItem/setItem returning promises, silent best-effort failure) — the same
|
|
39
|
-
* adapter recipe the web shared-ui shims use for Buoy chrome persistence.
|
|
40
|
-
* Local to this file so the web store pulls zero RN/expo modules.
|
|
41
|
-
*/
|
|
42
|
-
const persistentStorage = {
|
|
43
|
-
async getItem(key) {
|
|
44
|
-
try {
|
|
45
|
-
return window.localStorage.getItem(key);
|
|
46
|
-
} catch {
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
async setItem(key, value) {
|
|
51
|
-
try {
|
|
52
|
-
window.localStorage.setItem(key, value);
|
|
53
|
-
} catch {
|
|
54
|
-
// Ignore quota/availability errors — callers treat this as best-effort.
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
const DEFAULT_PATTERNS = DEFAULT_IGNORED_PATTERNS;
|
|
59
|
-
|
|
60
|
-
/** Tolerate the legacy `string[]` persisted format and stray junk. */
|
|
61
|
-
function migratePatterns(raw) {
|
|
62
|
-
if (!Array.isArray(raw)) return [];
|
|
63
|
-
const migrated = [];
|
|
64
|
-
for (const entry of raw) {
|
|
65
|
-
if (typeof entry === "string" && entry.trim()) {
|
|
66
|
-
migrated.push({
|
|
67
|
-
value: entry,
|
|
68
|
-
mode: "contains"
|
|
69
|
-
});
|
|
70
|
-
} else if (entry && typeof entry === "object" && typeof entry.value === "string") {
|
|
71
|
-
const e = entry;
|
|
72
|
-
migrated.push({
|
|
73
|
-
value: e.value,
|
|
74
|
-
mode: e.mode === "exact" ? "exact" : "contains"
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return migrated;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/** Always keep the default patterns present (e.g. Buoy's license API). */
|
|
82
|
-
function ensureDefaults(patterns) {
|
|
83
|
-
const result = [...patterns];
|
|
84
|
-
for (const def of DEFAULT_PATTERNS) {
|
|
85
|
-
if (!result.some(p => p.value === def.value)) {
|
|
86
|
-
result.push({
|
|
87
|
-
...def
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return result;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Singleton store. One instance per JS runtime, so every consumer (Network
|
|
95
|
-
* tool, Events tool, any web panel) shares the same patterns.
|
|
96
|
-
*/
|
|
97
|
-
class IgnoredPatternsStore {
|
|
98
|
-
patterns = ensureDefaults(DEFAULT_PATTERNS.map(p => ({
|
|
99
|
-
...p
|
|
100
|
-
})));
|
|
101
|
-
listeners = new Set();
|
|
102
|
-
loaded = false;
|
|
103
|
-
loadPromise = null;
|
|
104
|
-
/** Set once a mutation happens so a slow initial load can't clobber it. */
|
|
105
|
-
dirty = false;
|
|
106
|
-
|
|
107
|
-
/** Current patterns (stable reference until a mutation occurs). */
|
|
108
|
-
getPatterns() {
|
|
109
|
-
return this.patterns;
|
|
110
|
-
}
|
|
111
|
-
subscribe(listener) {
|
|
112
|
-
this.listeners.add(listener);
|
|
113
|
-
// Lazily hydrate from storage the first time anyone cares.
|
|
114
|
-
void this.ensureLoaded();
|
|
115
|
-
return () => {
|
|
116
|
-
this.listeners.delete(listener);
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
emit() {
|
|
120
|
-
this.listeners.forEach(l => l());
|
|
121
|
-
}
|
|
122
|
-
ensureLoaded() {
|
|
123
|
-
if (this.loaded) return Promise.resolve();
|
|
124
|
-
if (this.loadPromise) return this.loadPromise;
|
|
125
|
-
this.loadPromise = (async () => {
|
|
126
|
-
try {
|
|
127
|
-
const stored = await persistentStorage.getItem(devToolsStorageKeys.network.ignoredDomains());
|
|
128
|
-
// A mutation may have raced this read — never overwrite user intent.
|
|
129
|
-
if (stored && !this.dirty) {
|
|
130
|
-
const migrated = ensureDefaults(migratePatterns(JSON.parse(stored)));
|
|
131
|
-
this.patterns = migrated;
|
|
132
|
-
}
|
|
133
|
-
} catch {
|
|
134
|
-
// Silently fall back to defaults.
|
|
135
|
-
} finally {
|
|
136
|
-
this.loaded = true;
|
|
137
|
-
this.emit();
|
|
138
|
-
}
|
|
139
|
-
})();
|
|
140
|
-
return this.loadPromise;
|
|
141
|
-
}
|
|
142
|
-
persist() {
|
|
143
|
-
persistentStorage.setItem(devToolsStorageKeys.network.ignoredDomains(), JSON.stringify(this.patterns)).catch(() => {
|
|
144
|
-
// Silently fail — patterns remain in memory.
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
commit(next) {
|
|
148
|
-
this.dirty = true;
|
|
149
|
-
this.patterns = next;
|
|
150
|
-
this.emit();
|
|
151
|
-
this.persist();
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
/** Add a pattern (no-op if its value already exists). */
|
|
155
|
-
add(pattern) {
|
|
156
|
-
const value = pattern.value.trim();
|
|
157
|
-
if (!value) return;
|
|
158
|
-
if (this.patterns.some(p => p.value === value)) return;
|
|
159
|
-
this.commit([...this.patterns, {
|
|
160
|
-
value,
|
|
161
|
-
mode: pattern.mode
|
|
162
|
-
}]);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/** Remove a pattern by value. */
|
|
166
|
-
remove(value) {
|
|
167
|
-
if (!this.patterns.some(p => p.value === value)) return;
|
|
168
|
-
this.commit(this.patterns.filter(p => p.value !== value));
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/** Add as `contains` if absent, otherwise remove (used by detail-view chips). */
|
|
172
|
-
toggle(value) {
|
|
173
|
-
const trimmed = value.trim();
|
|
174
|
-
if (!trimmed) return;
|
|
175
|
-
this.commit(this.patterns.some(p => p.value === trimmed) ? this.patterns.filter(p => p.value !== trimmed) : [...this.patterns, {
|
|
176
|
-
value: trimmed,
|
|
177
|
-
mode: "contains"
|
|
178
|
-
}]);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/** Flip an existing pattern between `contains` and `exact`. */
|
|
182
|
-
toggleMode(value) {
|
|
183
|
-
if (!this.patterns.some(p => p.value === value)) return;
|
|
184
|
-
this.commit(this.patterns.map(p => p.value === value ? {
|
|
185
|
-
...p,
|
|
186
|
-
mode: p.mode === "contains" ? "exact" : "contains"
|
|
187
|
-
} : p));
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
export const ignoredPatternsStore = new IgnoredPatternsStore();
|
|
191
|
-
/**
|
|
192
|
-
* Mutations live at module scope so they keep a STABLE identity across
|
|
193
|
-
* renders (same rationale as native: inline arrows handed every consumer a
|
|
194
|
-
* fresh `toggle` per render and defeated `memo` downstream).
|
|
195
|
-
*/
|
|
196
|
-
const addPattern = pattern => ignoredPatternsStore.add(pattern);
|
|
197
|
-
const removePattern = value => ignoredPatternsStore.remove(value);
|
|
198
|
-
const togglePattern = value => ignoredPatternsStore.toggle(value);
|
|
199
|
-
const togglePatternMode = value => ignoredPatternsStore.toggleMode(value);
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Subscribe to the shared ignored-patterns store. All consumers in a runtime
|
|
203
|
-
* see the same patterns and the same mutations.
|
|
204
|
-
*/
|
|
205
|
-
export function useIgnoredPatterns() {
|
|
206
|
-
const [patterns, setPatterns] = useState(() => ignoredPatternsStore.getPatterns());
|
|
207
|
-
useEffect(() => {
|
|
208
|
-
return ignoredPatternsStore.subscribe(() => {
|
|
209
|
-
setPatterns(ignoredPatternsStore.getPatterns());
|
|
210
|
-
});
|
|
211
|
-
}, []);
|
|
212
|
-
const values = useMemo(() => new Set(patterns.map(p => p.value)), [patterns]);
|
|
213
|
-
return {
|
|
214
|
-
patterns,
|
|
215
|
-
values,
|
|
216
|
-
add: addPattern,
|
|
217
|
-
remove: removePattern,
|
|
218
|
-
toggle: togglePattern,
|
|
219
|
-
toggleMode: togglePatternMode
|
|
220
|
-
};
|
|
221
|
-
}
|
|
3
|
+
export * from "./ignoredPatternsStore.shared.js";
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { useEffect, useState } from "react";
|
|
14
14
|
import { devToolsStorageKeys } from "../../storage/devToolsStorageKeys.js";
|
|
15
|
-
import { persistentStorage } from "../../utils/persistentStorage
|
|
15
|
+
import { persistentStorage } from "../../utils/persistentStorage";
|
|
16
16
|
import { BACKGROUND_PRESETS, DEFAULT_BACKGROUND, presetAt, presetIndex } from "./registry.js";
|
|
17
17
|
// v3: bumped when the default became "off" (backgrounds are opt-in now), so
|
|
18
18
|
// devices that stepped the switcher during the (unreleased) audition rounds
|
|
@@ -99,12 +99,14 @@ export const Wormhole = /*#__PURE__*/memo(function Wormhole({
|
|
|
99
99
|
}]
|
|
100
100
|
}],
|
|
101
101
|
children: /*#__PURE__*/_jsx(Image, {
|
|
102
|
+
testID: "buoy-internal-background",
|
|
102
103
|
source: WORMHOLE_SHEET,
|
|
103
104
|
resizeMode: "stretch",
|
|
104
105
|
fadeDuration: 0,
|
|
105
106
|
style: fill
|
|
106
107
|
})
|
|
107
108
|
}, i)), /*#__PURE__*/_jsx(Image, {
|
|
109
|
+
testID: "buoy-internal-background",
|
|
108
110
|
source: WORMHOLE_CORE,
|
|
109
111
|
resizeMode: "stretch",
|
|
110
112
|
fadeDuration: 0,
|
|
@@ -119,6 +121,7 @@ export const Wormhole = /*#__PURE__*/memo(function Wormhole({
|
|
|
119
121
|
}) : /*#__PURE__*/_jsx(Animated.View, {
|
|
120
122
|
style: [plane, camera],
|
|
121
123
|
children: /*#__PURE__*/_jsx(Image, {
|
|
124
|
+
testID: "buoy-internal-background",
|
|
122
125
|
source: WORMHOLE_STILL,
|
|
123
126
|
resizeMode: "stretch",
|
|
124
127
|
fadeDuration: 0,
|
|
@@ -8,7 +8,7 @@ import { Copy, CheckCircle2, AlertTriangle, Trash2 } from "../../icons/lucide-ic
|
|
|
8
8
|
import { macOSColors } from "../gameUI/constants/macOSDesignSystemColors.js";
|
|
9
9
|
import { ClipboardHintBanner } from "./ClipboardHintBanner.js";
|
|
10
10
|
import { devToolsStorageKeys } from "../../storage/devToolsStorageKeys.js";
|
|
11
|
-
import { persistentStorage } from "../../utils/persistentStorage
|
|
11
|
+
import { persistentStorage } from "../../utils/persistentStorage";
|
|
12
12
|
import { useHintsDisabled } from "../../context/index.js";
|
|
13
13
|
import { ProUpgradeModal } from "../../license/index.js";
|
|
14
14
|
import { useIsPro } from "@buoy-gg/license";
|
|
@@ -13,7 +13,7 @@ import { View, Text, TouchableOpacity, StyleSheet } from "react-native";
|
|
|
13
13
|
import { ChevronLeft, ChevronRight } from "../../icons/lucide-icons.js";
|
|
14
14
|
import { macOSColors } from "../gameUI/constants/macOSDesignSystemColors.js";
|
|
15
15
|
import { night } from "../night/nightTheme.js";
|
|
16
|
-
import { useSafeAreaInsets } from "../../hooks/useSafeAreaInsets
|
|
16
|
+
import { useSafeAreaInsets } from "../../hooks/useSafeAreaInsets";
|
|
17
17
|
import { monoFont } from "../fonts.js";
|
|
18
18
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
19
|
/**
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
|
16
16
|
import { night } from "../night/nightTheme.js";
|
|
17
|
-
import { useSafeAreaInsets } from "../../hooks/useSafeAreaInsets
|
|
17
|
+
import { useSafeAreaInsets } from "../../hooks/useSafeAreaInsets";
|
|
18
18
|
import { monoFont } from "../fonts.js";
|
|
19
19
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
20
|
export function ToolFooter({
|
|
@@ -126,6 +126,7 @@ export function UserStatus({
|
|
|
126
126
|
const handleClick = e => {
|
|
127
127
|
if (!isDragging && onPress) {
|
|
128
128
|
e.stopPropagation();
|
|
129
|
+
e.currentTarget.focus();
|
|
129
130
|
onPress();
|
|
130
131
|
}
|
|
131
132
|
};
|
|
@@ -463,6 +464,8 @@ export function FloatingTool({
|
|
|
463
464
|
const spaceAbove = Math.max(0, animatedPosition.y - 8);
|
|
464
465
|
const spaceBelow = Math.max(0, window.innerHeight - animatedPosition.y - state.bubbleSize.height - 8);
|
|
465
466
|
const accessoryAbove = spaceAbove > spaceBelow;
|
|
467
|
+
// Keep the minimized stack above the handle unless even one row cannot fit.
|
|
468
|
+
const stackAbove = spaceAbove >= 48 || spaceAbove >= spaceBelow;
|
|
466
469
|
return /*#__PURE__*/_jsxs("div", {
|
|
467
470
|
ref: bubbleRef,
|
|
468
471
|
"data-testid": id ?? "buoy-floating-tool",
|
|
@@ -473,7 +476,7 @@ export function FloatingTool({
|
|
|
473
476
|
position: 'fixed',
|
|
474
477
|
left: animatedPosition.x,
|
|
475
478
|
top: animatedPosition.y,
|
|
476
|
-
zIndex: 9999,
|
|
479
|
+
zIndex: pushToSide ? 8999 : 9999,
|
|
477
480
|
display: 'flex',
|
|
478
481
|
flexDirection: 'row',
|
|
479
482
|
alignItems: 'center',
|
|
@@ -507,7 +510,14 @@ export function FloatingTool({
|
|
|
507
510
|
children: [minimizedStack && /*#__PURE__*/_jsx("div", {
|
|
508
511
|
style: {
|
|
509
512
|
position: 'absolute',
|
|
510
|
-
|
|
513
|
+
...(stackAbove ? {
|
|
514
|
+
bottom: '100%'
|
|
515
|
+
} : {
|
|
516
|
+
top: '100%'
|
|
517
|
+
}),
|
|
518
|
+
'--buoy-stack-bottom': stackAbove ? '0px' : 'auto',
|
|
519
|
+
'--buoy-stack-top': stackAbove ? 'auto' : '0px',
|
|
520
|
+
'--buoy-stack-space': `${stackAbove ? spaceAbove : spaceBelow}px`,
|
|
511
521
|
left: -1,
|
|
512
522
|
// align with the bubble border edge
|
|
513
523
|
width: VISIBLE_HANDLE_WIDTH,
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* underline), NightBadge (small status caps).
|
|
21
21
|
*/
|
|
22
22
|
import { Children, useEffect, useRef } from "react";
|
|
23
|
-
import { Animated, StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
|
23
|
+
import { Animated, Platform, StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
|
24
24
|
import { night, NIGHT_LABEL_TRACKING } from "./nightTheme.js";
|
|
25
25
|
|
|
26
26
|
/** Uppercase section label that sits ABOVE a NightCard. */
|
|
@@ -42,8 +42,13 @@ export function NightFootnote({
|
|
|
42
42
|
tone = "tertiary",
|
|
43
43
|
style
|
|
44
44
|
}) {
|
|
45
|
+
// The inset is a marginLeft, and a marginLeft beats a caller's
|
|
46
|
+
// marginHorizontal or margin, so those were silently ignored on the left.
|
|
47
|
+
// A caller that sets either owns the horizontal margins.
|
|
48
|
+
const flat = StyleSheet.flatten(style);
|
|
49
|
+
const ownsMargin = !!flat && (flat.marginHorizontal != null || flat.margin != null);
|
|
45
50
|
return /*#__PURE__*/_jsx(Text, {
|
|
46
|
-
style: [styles.footnote, tone === "secondary" ? styles.footnoteSecondary : null, tone === "warning" ? styles.footnoteWarning : null, tone === "danger" ? styles.footnoteDanger : null, centered ? styles.footnoteCentered : null, style],
|
|
51
|
+
style: [styles.footnote, ownsMargin ? null : styles.footnoteInset, tone === "secondary" ? styles.footnoteSecondary : null, tone === "warning" ? styles.footnoteWarning : null, tone === "danger" ? styles.footnoteDanger : null, centered ? styles.footnoteCentered : null, style],
|
|
47
52
|
children: children
|
|
48
53
|
});
|
|
49
54
|
}
|
|
@@ -118,7 +123,7 @@ export function NightSwitch({
|
|
|
118
123
|
Animated.timing(progress, {
|
|
119
124
|
toValue: value ? 1 : 0,
|
|
120
125
|
duration: 200,
|
|
121
|
-
useNativeDriver:
|
|
126
|
+
useNativeDriver: Platform.OS !== "web"
|
|
122
127
|
}).start();
|
|
123
128
|
}, [value, progress]);
|
|
124
129
|
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
@@ -271,7 +276,9 @@ const styles = StyleSheet.create({
|
|
|
271
276
|
fontSize: night.font.caption,
|
|
272
277
|
fontWeight: "500",
|
|
273
278
|
lineHeight: night.font.caption * 1.4,
|
|
274
|
-
marginTop: 8
|
|
279
|
+
marginTop: 8
|
|
280
|
+
},
|
|
281
|
+
footnoteInset: {
|
|
275
282
|
marginLeft: night.labelInset
|
|
276
283
|
},
|
|
277
284
|
footnoteSecondary: {
|
|
@@ -215,7 +215,7 @@ function useOttoMotionClock(units, tickMs, active, restartKey) {
|
|
|
215
215
|
toValue: units,
|
|
216
216
|
duration: units * tickMs,
|
|
217
217
|
easing: Easing.linear,
|
|
218
|
-
useNativeDriver:
|
|
218
|
+
useNativeDriver: Platform.OS !== "web",
|
|
219
219
|
isInteraction: false
|
|
220
220
|
}), {
|
|
221
221
|
resetBeforeIteration: true
|