@buoy-gg/shared-ui 7.0.40 → 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/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/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/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/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
|
@@ -3,203 +3,57 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
|
|
6
|
+
exports.FreeAccountPrompt = FreeAccountPrompt;
|
|
7
|
+
Object.defineProperty(exports, "LOGIN_COMMAND", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _AccountSetupContent.LOGIN_COMMAND;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
8
13
|
var _reactNative = require("react-native");
|
|
9
|
-
var
|
|
10
|
-
var _lucideIcons = require("../icons/lucide-icons.js");
|
|
11
|
-
var _index = require("../clipboard/index.js");
|
|
12
|
-
var _openPricing = require("./openPricing.js");
|
|
13
|
-
var _licenseModule = require("./licenseModule.js");
|
|
14
|
-
var _fonts = require("../ui/fonts.js");
|
|
14
|
+
var _AccountSetupContent = require("./AccountSetupContent.js");
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
* The account setup sheet — what a locked manager shows instead of the tools.
|
|
19
|
-
*
|
|
20
|
-
* Deliberately not the Pro modal. The next step is a free account and takes
|
|
21
|
-
* about thirty seconds, so asking for money here would be asking the wrong
|
|
22
|
-
* question at the wrong moment. Pro is still offered, as a secondary action.
|
|
23
|
-
*
|
|
24
|
-
* The command is shown inline and copyable rather than linked, because
|
|
25
|
-
* someone who cannot open the tools needs the fix in front of them, not a link
|
|
26
|
-
* to a page that has a link to a command.
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
/** The one thing a reader has to be able to act on. */
|
|
30
|
-
const LOGIN_COMMAND = exports.LOGIN_COMMAND = "npx buoy login";
|
|
31
|
-
const FreeAccountPrompt = ({
|
|
16
|
+
/** Native presentation of the shared account card. */
|
|
17
|
+
function FreeAccountPrompt({
|
|
32
18
|
visible,
|
|
33
19
|
onClose
|
|
34
|
-
})
|
|
35
|
-
const access = (0, _licenseModule.getUseAccountAccess)()();
|
|
36
|
-
const [copied, setCopied] = (0, _react.useState)(false);
|
|
37
|
-
const resetTimer = (0, _react.useRef)(null);
|
|
38
|
-
(0, _react.useEffect)(() => () => {
|
|
39
|
-
if (resetTimer.current) clearTimeout(resetTimer.current);
|
|
40
|
-
}, []);
|
|
41
|
-
const handleCopy = (0, _react.useCallback)(() => {
|
|
42
|
-
void (0, _index.copyToClipboard)(LOGIN_COMMAND).then(ok => {
|
|
43
|
-
if (!ok) return;
|
|
44
|
-
setCopied(true);
|
|
45
|
-
if (resetTimer.current) clearTimeout(resetTimer.current);
|
|
46
|
-
resetTimer.current = setTimeout(() => setCopied(false), 1500);
|
|
47
|
-
});
|
|
48
|
-
}, []);
|
|
20
|
+
}) {
|
|
49
21
|
if (!visible) return null;
|
|
50
22
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Modal, {
|
|
51
|
-
visible:
|
|
23
|
+
visible: true,
|
|
52
24
|
transparent: true,
|
|
53
25
|
animationType: "fade",
|
|
54
26
|
onRequestClose: onClose,
|
|
55
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
27
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
56
28
|
style: styles.overlay,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
color: _gameUIColors.buoyColors.textMuted
|
|
70
|
-
})
|
|
71
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
72
|
-
style: styles.title,
|
|
73
|
-
children: access.status === "initializing" ? "Checking your account…" : "Sign in to use Buoy"
|
|
74
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
75
|
-
style: styles.subtitle,
|
|
76
|
-
children: "A Free or Pro account is required. Run this command in your project, then reload the app to use your account key."
|
|
77
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
78
|
-
style: styles.command,
|
|
79
|
-
onPress: handleCopy,
|
|
80
|
-
activeOpacity: 0.7,
|
|
81
|
-
accessibilityLabel: `Copy ${LOGIN_COMMAND}`,
|
|
82
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
83
|
-
style: styles.commandText,
|
|
84
|
-
children: LOGIN_COMMAND
|
|
85
|
-
}), copied ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideIcons.Check, {
|
|
86
|
-
size: 14,
|
|
87
|
-
color: _gameUIColors.buoyColors.success
|
|
88
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideIcons.Copy, {
|
|
89
|
-
size: 14,
|
|
90
|
-
color: _gameUIColors.buoyColors.textMuted
|
|
91
|
-
})]
|
|
92
|
-
}), access.status !== "admitted" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
93
|
-
style: styles.secondary,
|
|
94
|
-
onPress: () => {
|
|
95
|
-
void (0, _licenseModule.retryAccountAccess)();
|
|
96
|
-
},
|
|
97
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
98
|
-
style: styles.secondaryText,
|
|
99
|
-
children: "Retry verification"
|
|
100
|
-
})
|
|
101
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
102
|
-
style: styles.reassure,
|
|
103
|
-
children: "Free forever. No card. About thirty seconds."
|
|
104
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
105
|
-
style: styles.secondary,
|
|
106
|
-
onPress: () => (0, _openPricing.openPricing)("https://github.com/Buoy-gg/buoy/issues/new/choose"),
|
|
107
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
108
|
-
style: styles.secondaryText,
|
|
109
|
-
children: "Contact support on GitHub"
|
|
110
|
-
})
|
|
111
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
112
|
-
style: styles.secondary,
|
|
113
|
-
onPress: () => (0, _openPricing.openPricing)("mailto:support@buoy.gg"),
|
|
114
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
115
|
-
style: styles.secondaryText,
|
|
116
|
-
children: "Email support@buoy.gg"
|
|
117
|
-
})
|
|
118
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
119
|
-
style: styles.secondary,
|
|
120
|
-
onPress: () => (0, _openPricing.openPricing)(),
|
|
121
|
-
activeOpacity: 0.8,
|
|
122
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
123
|
-
style: styles.secondaryText,
|
|
124
|
-
children: "Or see Pro"
|
|
125
|
-
})
|
|
126
|
-
})]
|
|
127
|
-
})
|
|
29
|
+
accessibilityViewIsModal: true,
|
|
30
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
31
|
+
style: _reactNative.StyleSheet.absoluteFill,
|
|
32
|
+
onPress: onClose,
|
|
33
|
+
accessible: false
|
|
34
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
|
|
35
|
+
style: styles.frame,
|
|
36
|
+
bounces: false,
|
|
37
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_AccountSetupContent.AccountSetupCard, {
|
|
38
|
+
onClose: onClose
|
|
39
|
+
})
|
|
40
|
+
})]
|
|
128
41
|
})
|
|
129
42
|
});
|
|
130
|
-
}
|
|
131
|
-
exports.FreeAccountPrompt = FreeAccountPrompt;
|
|
43
|
+
}
|
|
132
44
|
const styles = _reactNative.StyleSheet.create({
|
|
133
45
|
overlay: {
|
|
134
46
|
flex: 1,
|
|
135
|
-
backgroundColor: "rgba(0, 0, 0, 0.
|
|
47
|
+
backgroundColor: "rgba(0, 0, 0, 0.65)",
|
|
136
48
|
alignItems: "center",
|
|
137
49
|
justifyContent: "center",
|
|
138
50
|
padding: 20
|
|
139
51
|
},
|
|
140
|
-
|
|
141
|
-
backgroundColor: _gameUIColors.buoyColors.card,
|
|
142
|
-
borderRadius: 16,
|
|
143
|
-
borderWidth: 1,
|
|
144
|
-
borderColor: _gameUIColors.buoyColors.primary + "60",
|
|
145
|
-
padding: 24,
|
|
146
|
-
maxWidth: 340,
|
|
52
|
+
frame: {
|
|
147
53
|
width: "100%",
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
top: 12,
|
|
153
|
-
right: 12,
|
|
154
|
-
padding: 6,
|
|
155
|
-
zIndex: 1
|
|
156
|
-
},
|
|
157
|
-
title: {
|
|
158
|
-
fontSize: 20,
|
|
159
|
-
fontWeight: "700",
|
|
160
|
-
color: _gameUIColors.buoyColors.text,
|
|
161
|
-
textAlign: "center",
|
|
162
|
-
marginBottom: 8
|
|
163
|
-
},
|
|
164
|
-
subtitle: {
|
|
165
|
-
fontSize: 13,
|
|
166
|
-
lineHeight: 19,
|
|
167
|
-
color: _gameUIColors.buoyColors.textMuted,
|
|
168
|
-
textAlign: "center",
|
|
169
|
-
marginBottom: 20
|
|
170
|
-
},
|
|
171
|
-
command: {
|
|
172
|
-
flexDirection: "row",
|
|
173
|
-
alignItems: "center",
|
|
174
|
-
justifyContent: "space-between",
|
|
175
|
-
backgroundColor: _gameUIColors.buoyColors.base,
|
|
176
|
-
borderRadius: 8,
|
|
177
|
-
borderWidth: 1,
|
|
178
|
-
borderColor: _gameUIColors.buoyColors.border,
|
|
179
|
-
paddingHorizontal: 14,
|
|
180
|
-
paddingVertical: 12,
|
|
181
|
-
gap: 10
|
|
182
|
-
},
|
|
183
|
-
commandText: {
|
|
184
|
-
fontSize: 14,
|
|
185
|
-
fontWeight: "600",
|
|
186
|
-
color: _gameUIColors.buoyColors.text,
|
|
187
|
-
fontFamily: _fonts.monoFont
|
|
188
|
-
},
|
|
189
|
-
reassure: {
|
|
190
|
-
fontSize: 12,
|
|
191
|
-
color: _gameUIColors.buoyColors.textMuted,
|
|
192
|
-
textAlign: "center",
|
|
193
|
-
marginTop: 10
|
|
194
|
-
},
|
|
195
|
-
secondary: {
|
|
196
|
-
marginTop: 18,
|
|
197
|
-
paddingVertical: 10,
|
|
198
|
-
alignItems: "center"
|
|
199
|
-
},
|
|
200
|
-
secondaryText: {
|
|
201
|
-
fontSize: 13,
|
|
202
|
-
fontWeight: "600",
|
|
203
|
-
color: _gameUIColors.buoyColors.textMuted
|
|
54
|
+
maxWidth: 368,
|
|
55
|
+
maxHeight: "90%",
|
|
56
|
+
flexGrow: 0,
|
|
57
|
+
borderRadius: 20
|
|
204
58
|
}
|
|
205
59
|
});
|
|
@@ -11,6 +11,8 @@ var _macOSDesignSystemColors = require("../ui/gameUI/constants/macOSDesignSystem
|
|
|
11
11
|
var _openPricing = require("./openPricing.js");
|
|
12
12
|
var _lucideIcons = require("../icons/lucide-icons.js");
|
|
13
13
|
var _fonts = require("../ui/fonts.js");
|
|
14
|
+
var _index = require("../clipboard/index.js");
|
|
15
|
+
var _autoDetectClipboard = require("../clipboard/autoDetectClipboard.js");
|
|
14
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
16
18
|
/**
|
|
@@ -21,14 +23,6 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
21
23
|
* 2. Already have one? Add Buoy.init() to your code
|
|
22
24
|
*/
|
|
23
25
|
|
|
24
|
-
// For clipboard functionality
|
|
25
|
-
let Clipboard = null;
|
|
26
|
-
try {
|
|
27
|
-
Clipboard = require("@react-native-clipboard/clipboard").default;
|
|
28
|
-
} catch {
|
|
29
|
-
// Clipboard not available
|
|
30
|
-
}
|
|
31
|
-
|
|
32
26
|
// Keep these for backwards compatibility but they're no longer used
|
|
33
27
|
|
|
34
28
|
const CODE_SNIPPET = `import { Buoy } from '@buoy-gg/core';
|
|
@@ -45,9 +39,8 @@ const LicenseEntryModal = ({
|
|
|
45
39
|
const handleGetLicense = (0, _react.useCallback)(() => {
|
|
46
40
|
(0, _openPricing.openPricing)(purchaseUrl);
|
|
47
41
|
}, [purchaseUrl]);
|
|
48
|
-
const handleCopyCode = (0, _react.useCallback)(() => {
|
|
49
|
-
if (
|
|
50
|
-
Clipboard.setString(CODE_SNIPPET);
|
|
42
|
+
const handleCopyCode = (0, _react.useCallback)(async () => {
|
|
43
|
+
if (await (0, _index.copyToClipboard)(CODE_SNIPPET)) {
|
|
51
44
|
setCopied(true);
|
|
52
45
|
setTimeout(() => setCopied(false), 2000);
|
|
53
46
|
}
|
|
@@ -182,7 +175,7 @@ const LicenseEntryModal = ({
|
|
|
182
175
|
style: styles.codePunctuation,
|
|
183
176
|
children: "});"
|
|
184
177
|
})]
|
|
185
|
-
}),
|
|
178
|
+
}), (0, _autoDetectClipboard.isClipboardAvailable)() && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
186
179
|
style: styles.copyButton,
|
|
187
180
|
onPress: handleCopyCode,
|
|
188
181
|
activeOpacity: 0.7,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.canInitializeAccount = void 0;
|
|
7
|
+
// A server import must not initialize an account or retain revalidation timers.
|
|
8
|
+
const canInitializeAccount = () => typeof window !== "undefined";
|
|
9
|
+
exports.canInitializeAccount = canInitializeAccount;
|
|
@@ -13,6 +13,7 @@ exports.hasAccountAccess = hasAccountAccess;
|
|
|
13
13
|
exports.retryAccountAccess = retryAccountAccess;
|
|
14
14
|
exports.subscribeAccountAccess = subscribeAccountAccess;
|
|
15
15
|
var licenseModule = _interopRequireWildcard(require("@buoy-gg/license"));
|
|
16
|
+
var _accountRuntime = require("./accountRuntime");
|
|
16
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
17
18
|
/**
|
|
18
19
|
* Centralized access of `@buoy-gg/license`.
|
|
@@ -83,6 +84,7 @@ const LOCKED = {
|
|
|
83
84
|
// Resolve at the boundary, after module initialization. Do not cache an absent
|
|
84
85
|
// manager during a circular import or grant access for older package versions.
|
|
85
86
|
function accountManager() {
|
|
87
|
+
if (!(0, _accountRuntime.canInitializeAccount)()) return null;
|
|
86
88
|
try {
|
|
87
89
|
const manager = licenseModule.LicenseManager;
|
|
88
90
|
void manager?.initialize?.();
|
|
@@ -11,7 +11,7 @@ var _index = require("../../icons/index.js");
|
|
|
11
11
|
var _react = require("react");
|
|
12
12
|
var _CyberpunkSectionButton = require("../../ui/console/CyberpunkSectionButton.js");
|
|
13
13
|
var _devToolsStorageKeys = require("../../storage/devToolsStorageKeys.js");
|
|
14
|
-
var _persistentStorage = require("../../utils/persistentStorage
|
|
14
|
+
var _persistentStorage = require("../../utils/persistentStorage");
|
|
15
15
|
var _macOSDesignSystemColors = require("../../ui/gameUI/constants/macOSDesignSystemColors.js");
|
|
16
16
|
var _gameUIColors = require("../../ui/gameUI/constants/gameUIColors.js");
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.definePersistedSetting = definePersistedSetting;
|
|
7
|
-
var _persistentStorage = require("../utils/persistentStorage
|
|
7
|
+
var _persistentStorage = require("../utils/persistentStorage");
|
|
8
8
|
/**
|
|
9
9
|
* definePersistedSetting — the `load / save / clear` triple every tool wrote
|
|
10
10
|
* for its module-level settings (copy settings, HUD prefs, JS TOP prefs, …).
|
|
@@ -3,203 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
Object.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () {
|
|
16
|
-
return _ignoredPatternsCore.urlMatchesIgnoredPattern;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
exports.useIgnoredPatterns = useIgnoredPatterns;
|
|
20
|
-
var _react = require("react");
|
|
21
|
-
var _persistentStorage = require("../utils/persistentStorage.js");
|
|
22
|
-
var _devToolsStorageKeys = require("../storage/devToolsStorageKeys.js");
|
|
23
|
-
var _ignoredPatternsCore = require("./ignoredPatternsCore.js");
|
|
24
|
-
/**
|
|
25
|
-
* Shared "ignored patterns" store for network-style URL filtering.
|
|
26
|
-
*
|
|
27
|
-
* This is the SINGLE source of truth for the domains/URL patterns that the
|
|
28
|
-
* Network tool (and now the Events tool) hide from their lists. Both tools read
|
|
29
|
-
* and mutate this one singleton, so an ignore toggled in either place is shared
|
|
30
|
-
* everywhere and persisted to the same storage key.
|
|
31
|
-
*
|
|
32
|
-
* Lives in @buoy-gg/shared-ui (a hard dependency of both @buoy-gg/network and
|
|
33
|
-
* @buoy-gg/events) so the filter logic can be shared without @buoy-gg/events
|
|
34
|
-
* having to take a hard dependency on @buoy-gg/network (which is optional).
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
// Pure matching types/helpers live in ignoredPatternsCore.ts (web-shim-safe);
|
|
38
|
-
// re-exported here so the shared-ui barrel surface is unchanged.
|
|
39
|
-
|
|
40
|
-
const DEFAULT_PATTERNS = _ignoredPatternsCore.DEFAULT_IGNORED_PATTERNS;
|
|
41
|
-
|
|
42
|
-
/** Tolerate the legacy `string[]` persisted format and stray junk. */
|
|
43
|
-
function migratePatterns(raw) {
|
|
44
|
-
if (!Array.isArray(raw)) return [];
|
|
45
|
-
const migrated = [];
|
|
46
|
-
for (const entry of raw) {
|
|
47
|
-
if (typeof entry === "string" && entry.trim()) {
|
|
48
|
-
migrated.push({
|
|
49
|
-
value: entry,
|
|
50
|
-
mode: "contains"
|
|
51
|
-
});
|
|
52
|
-
} else if (entry && typeof entry === "object" && typeof entry.value === "string") {
|
|
53
|
-
const e = entry;
|
|
54
|
-
migrated.push({
|
|
55
|
-
value: e.value,
|
|
56
|
-
mode: e.mode === "exact" ? "exact" : "contains"
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return migrated;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/** Always keep the default patterns present (e.g. Buoy's license API). */
|
|
64
|
-
function ensureDefaults(patterns) {
|
|
65
|
-
const result = [...patterns];
|
|
66
|
-
for (const def of DEFAULT_PATTERNS) {
|
|
67
|
-
if (!result.some(p => p.value === def.value)) {
|
|
68
|
-
result.push({
|
|
69
|
-
...def
|
|
70
|
-
});
|
|
6
|
+
var _ignoredPatternsStoreShared = require("./ignoredPatternsStore.shared.js");
|
|
7
|
+
Object.keys(_ignoredPatternsStoreShared).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _ignoredPatternsStoreShared[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _ignoredPatternsStoreShared[key];
|
|
71
14
|
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Singleton store. One instance per JS runtime, so every consumer (Network tool,
|
|
77
|
-
* Events tool, on mobile or on the desktop dashboard) shares the same patterns.
|
|
78
|
-
*/
|
|
79
|
-
class IgnoredPatternsStore {
|
|
80
|
-
patterns = ensureDefaults(DEFAULT_PATTERNS.map(p => ({
|
|
81
|
-
...p
|
|
82
|
-
})));
|
|
83
|
-
listeners = new Set();
|
|
84
|
-
loaded = false;
|
|
85
|
-
loadPromise = null;
|
|
86
|
-
/** Set once a mutation happens so a slow initial load can't clobber it. */
|
|
87
|
-
dirty = false;
|
|
88
|
-
|
|
89
|
-
/** Current patterns (stable reference until a mutation occurs). */
|
|
90
|
-
getPatterns() {
|
|
91
|
-
return this.patterns;
|
|
92
|
-
}
|
|
93
|
-
subscribe(listener) {
|
|
94
|
-
this.listeners.add(listener);
|
|
95
|
-
// Lazily hydrate from storage the first time anyone cares.
|
|
96
|
-
void this.ensureLoaded();
|
|
97
|
-
return () => {
|
|
98
|
-
this.listeners.delete(listener);
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
emit() {
|
|
102
|
-
this.listeners.forEach(l => l());
|
|
103
|
-
}
|
|
104
|
-
ensureLoaded() {
|
|
105
|
-
if (this.loaded) return Promise.resolve();
|
|
106
|
-
if (this.loadPromise) return this.loadPromise;
|
|
107
|
-
this.loadPromise = (async () => {
|
|
108
|
-
try {
|
|
109
|
-
const stored = await _persistentStorage.persistentStorage.getItem(_devToolsStorageKeys.devToolsStorageKeys.network.ignoredDomains());
|
|
110
|
-
// A mutation may have raced this read — never overwrite user intent.
|
|
111
|
-
if (stored && !this.dirty) {
|
|
112
|
-
const migrated = ensureDefaults(migratePatterns(JSON.parse(stored)));
|
|
113
|
-
this.patterns = migrated;
|
|
114
|
-
}
|
|
115
|
-
} catch {
|
|
116
|
-
// Silently fall back to defaults.
|
|
117
|
-
} finally {
|
|
118
|
-
this.loaded = true;
|
|
119
|
-
this.emit();
|
|
120
|
-
}
|
|
121
|
-
})();
|
|
122
|
-
return this.loadPromise;
|
|
123
|
-
}
|
|
124
|
-
persist() {
|
|
125
|
-
_persistentStorage.persistentStorage.setItem(_devToolsStorageKeys.devToolsStorageKeys.network.ignoredDomains(), JSON.stringify(this.patterns)).catch(() => {
|
|
126
|
-
// Silently fail — patterns remain in memory.
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
commit(next) {
|
|
130
|
-
this.dirty = true;
|
|
131
|
-
this.patterns = next;
|
|
132
|
-
this.emit();
|
|
133
|
-
this.persist();
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/** Add a pattern (no-op if its value already exists). */
|
|
137
|
-
add(pattern) {
|
|
138
|
-
const value = pattern.value.trim();
|
|
139
|
-
if (!value) return;
|
|
140
|
-
if (this.patterns.some(p => p.value === value)) return;
|
|
141
|
-
this.commit([...this.patterns, {
|
|
142
|
-
value,
|
|
143
|
-
mode: pattern.mode
|
|
144
|
-
}]);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/** Remove a pattern by value. */
|
|
148
|
-
remove(value) {
|
|
149
|
-
if (!this.patterns.some(p => p.value === value)) return;
|
|
150
|
-
this.commit(this.patterns.filter(p => p.value !== value));
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/** Add as `contains` if absent, otherwise remove (used by detail-view chips). */
|
|
154
|
-
toggle(value) {
|
|
155
|
-
const trimmed = value.trim();
|
|
156
|
-
if (!trimmed) return;
|
|
157
|
-
this.commit(this.patterns.some(p => p.value === trimmed) ? this.patterns.filter(p => p.value !== trimmed) : [...this.patterns, {
|
|
158
|
-
value: trimmed,
|
|
159
|
-
mode: "contains"
|
|
160
|
-
}]);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
/** Flip an existing pattern between `contains` and `exact`. */
|
|
164
|
-
toggleMode(value) {
|
|
165
|
-
if (!this.patterns.some(p => p.value === value)) return;
|
|
166
|
-
this.commit(this.patterns.map(p => p.value === value ? {
|
|
167
|
-
...p,
|
|
168
|
-
mode: p.mode === "contains" ? "exact" : "contains"
|
|
169
|
-
} : p));
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
const ignoredPatternsStore = exports.ignoredPatternsStore = new IgnoredPatternsStore();
|
|
173
|
-
/**
|
|
174
|
-
* Mutations live at module scope so they keep a STABLE identity across
|
|
175
|
-
* renders. They used to be inline arrows in the return object, which handed
|
|
176
|
-
* every consumer a fresh `toggle` on each render and defeated `memo` on
|
|
177
|
-
* anything they were passed down to — measured on the network detail view,
|
|
178
|
-
* where it forced a full re-render of the inspector per step.
|
|
179
|
-
*/
|
|
180
|
-
const addPattern = pattern => ignoredPatternsStore.add(pattern);
|
|
181
|
-
const removePattern = value => ignoredPatternsStore.remove(value);
|
|
182
|
-
const togglePattern = value => ignoredPatternsStore.toggle(value);
|
|
183
|
-
const togglePatternMode = value => ignoredPatternsStore.toggleMode(value);
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Subscribe to the shared ignored-patterns store. All consumers in a runtime
|
|
187
|
-
* see the same patterns and the same mutations.
|
|
188
|
-
*/
|
|
189
|
-
function useIgnoredPatterns() {
|
|
190
|
-
const [patterns, setPatterns] = (0, _react.useState)(() => ignoredPatternsStore.getPatterns());
|
|
191
|
-
(0, _react.useEffect)(() => {
|
|
192
|
-
return ignoredPatternsStore.subscribe(() => {
|
|
193
|
-
setPatterns(ignoredPatternsStore.getPatterns());
|
|
194
|
-
});
|
|
195
|
-
}, []);
|
|
196
|
-
const values = (0, _react.useMemo)(() => new Set(patterns.map(p => p.value)), [patterns]);
|
|
197
|
-
return {
|
|
198
|
-
patterns,
|
|
199
|
-
values,
|
|
200
|
-
add: addPattern,
|
|
201
|
-
remove: removePattern,
|
|
202
|
-
toggle: togglePattern,
|
|
203
|
-
toggleMode: togglePatternMode
|
|
204
|
-
};
|
|
205
|
-
}
|
|
15
|
+
});
|
|
16
|
+
});
|