@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,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as C}from"./chunk-GF5C5DVX.mjs";var Ie=-40,De=20,Ee=10;function ue(){return window.innerHeight/2}function ge(){return ue()-130}function Q(){return ge()+-40-20-10}import{useState as oe,useRef as R,useCallback as k,useEffect as w,useMemo as Z,Children as ee}from"react";import{useFloatingTools as pe,FloatingToolsProvider as me,useFloatingToolsContext as fe,interleaveWithDividers as be,floatingToolsColors as f,withAlpha as P,getUserStatusConfig as he,getGripIconLayout as we,interpolatePosition as xe,easing as ve,VISIBLE_HANDLE_WIDTH as te,ANIMATION_DURATION as ye}from"@buoy-gg/floating-tools-react/web/floating";import{jsx as d,jsxs as W}from"react/jsx-runtime";var N={getItem:e=>localStorage.getItem(e),setItem:(e,o)=>localStorage.setItem(e,o)},ne="#A0A0A0";function Re({size:e=24,color:o=P(ne,"CC")}){let n=we(e);return d("div",{style:{width:e,height:e,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center"},children:[0,1].map(a=>d("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",marginLeft:n.columnGap/2,marginRight:n.columnGap/2},children:[0,1,2].map(p=>d("div",{style:{width:n.dotSize,height:n.dotSize,borderRadius:n.dotSize/2,backgroundColor:o,marginTop:n.rowGap/2,marginBottom:n.rowGap/2}},p))},a))})}function Te(){return d("div",{style:{width:1,height:12,backgroundColor:P(f.muted,"66"),flexShrink:0}})}var Pe={success:f.success,optional:f.optional,muted:f.muted,secondary:ne};function Oe({userRole:e,onPress:o}){let{isDragging:n}=fe(),a=he(e,Pe),p=u=>{!n&&o&&(u.stopPropagation(),o())};return W("button",{role:"button","aria-label":`User status: ${a.label}`,onClick:p,style:{display:"flex",flexDirection:"row",alignItems:"center",paddingTop:6,paddingBottom:6,paddingLeft:8,paddingRight:8,flexShrink:0,cursor:o&&!n?"pointer":"default",background:"none",border:"none",margin:0},children:[d("div",{style:{width:6,height:6,borderRadius:3,backgroundColor:a.dotColor,marginRight:4}}),d("span",{style:{fontSize:10,fontWeight:500,color:a.textColor,letterSpacing:.3,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',lineHeight:"normal"},children:a.label})]})}function Se(){let e=R(null),[o,n]=oe({x:0,y:0}),a=k((p,u,T)=>{e.current&&cancelAnimationFrame(e.current);let S=performance.now(),l=x=>{let B=x-S,A=Math.min(B/ye,1),I=xe(p,u,A,ve.easeOutCubic);n(I),A<1?e.current=requestAnimationFrame(l):(n(u),T?.())};e.current=requestAnimationFrame(l)},[]);return w(()=>()=>{e.current&&cancelAnimationFrame(e.current)},[]),{position:o,setPosition:n,animateTo:a}}var ie=null;function Ne(){return ie}function We({id:e,revealToken:o,variant:n="bubble",dragFromSurface:a=!1,accessibilityLabel:p="Drag handle",accessory:u,handleAdornment:T,enablePositionPersistence:S=!0,children:l,pushToSide:x=!1,suspendPointerEvents:B=!1,centerOnboarding:A=!1,minimizedStack:I,hasMinimizedStack:$=!1}){let v=R(null),ae=Z(()=>e?{getItem:t=>N.getItem(`@buoy/floating-tool/${e}/${t}`),setItem:(t,r)=>N.setItem(`@buoy/floating-tool/${e}/${t}`,r)}:N,[e]),{state:i,actions:s,isInitialized:g}=pe({screenSize:{width:window.innerWidth,height:window.innerHeight},enablePositionPersistence:S,storage:ae}),{position:y,setPosition:D,animateTo:b}=Se();w(()=>{g&&D(i.position)},[g,i.position,D]),w(()=>{e||(ie={x:y.x,y:y.y})},[y,e]),w(()=>{if(!g)return;let t=()=>{let m=v.current?.getBoundingClientRect();m&&m.width>0&&m.height>0&&s.setBubbleSize({width:m.width,height:m.height})},r=()=>{s.setScreenSize(window.innerWidth,window.innerHeight),t()};t();let h=typeof ResizeObserver<"u"?new ResizeObserver(t):null;return v.current&&h?.observe(v.current),window.addEventListener("resize",r),()=>{h?.disconnect(),window.removeEventListener("resize",r)}},[s,g]),w(()=>{let t=document.createElement("div");t.style.cssText="position:fixed;top:env(safe-area-inset-top);left:env(safe-area-inset-left);visibility:hidden;pointer-events:none",document.body.appendChild(t);let r=t.getBoundingClientRect();document.body.removeChild(t),(r.top>0||r.left>0)&&s.setMinPosition({x:Math.max(r.left,10),y:Math.max(r.top,10)})},[s]);let[X,V]=oe(!1),q=k(t=>{t.stopPropagation(),t.preventDefault(),V(!0),s.handleDragStart({clientX:t.clientX,clientY:t.clientY})},[s]),z=R(!1),le=t=>{t.button!==0||!(t.target instanceof Element)||t.target.closest('button, a, input, select, textarea, [role="button"], [role="switch"], [role="slider"], [role="checkbox"], [role="radio"], [contenteditable="true"], [data-floating-accessory]')||(z.current=!0,q(t))},L=k(t=>{let r=s.handleDragMove({clientX:t.clientX,clientY:t.clientY});r.isDragging&&D(r.position)},[s,D]),F=k(t=>{V(!1);let r=s.handleDragEnd({clientX:t.clientX,clientY:t.clientY}),h=z.current;if(z.current=!1,r.wasTap&&!h){let m=s.toggleHideShow();b(i.position,m.targetPosition,()=>{s.commitPosition(m.targetPosition)})}else r.shouldHide&&b(i.position,r.position,()=>{s.commitPosition(r.position)})},[s,b,i.position]);w(()=>{if(X)return window.addEventListener("pointermove",L),window.addEventListener("pointerup",F),window.addEventListener("pointercancel",F),()=>{window.removeEventListener("pointermove",L),window.removeEventListener("pointerup",F),window.removeEventListener("pointercancel",F)}},[X,L,F]);let E=R(i.position);E.current=i.position;let M=R(i.isHidden);M.current=i.isHidden;let H=R(!1);w(()=>{if(g){if(x&&!H.current){if(M.current)return;H.current=!0;let{targetPosition:t}=s.forceHide();b(E.current,t,()=>{})}else if(!x&&H.current){if(H.current=!1,!M.current)return;let{targetPosition:t}=s.forceShow(),r=v.current?.getBoundingClientRect().width??100,h={x:Math.max(10,Math.min(t.x,window.innerWidth-r-10)),y:t.y};b(E.current,h,()=>{s.commitPosition(h)})}}},[x,g]),w(()=>{if(!A||!g)return;let t=v.current?.getBoundingClientRect().width??100,r=v.current?.getBoundingClientRect().height??32,h=Q(),m={x:(window.innerWidth-t)/2,y:window.innerHeight-h-r};b(E.current,m,()=>{})},[A,g]);let j=R(void 0);w(()=>{if(!(!g||j.current===o)&&(j.current=o,o!==void 0&&o>0&&i.isHidden)){let{targetPosition:t}=s.forceShow();b(i.position,t,()=>s.commitPosition(t))}},[o,g,i.isHidden,i.position,s,b]);let de=Z(()=>n==="strip"?ee.toArray(l):be(ee.toArray(l),t=>d(Te,{},t)),[l,n]);if(!g)return null;let K=Math.max(0,y.y-8),J=Math.max(0,window.innerHeight-y.y-i.bubbleSize.height-8),ce=K>J;return W("div",{ref:v,"data-testid":e??"buoy-floating-tool",role:"toolbar","aria-label":"Floating Tools",onPointerDown:a?le:void 0,style:{position:"fixed",left:y.x,top:y.y,zIndex:9999,display:"flex",flexDirection:"row",alignItems:"center",backgroundColor:f.panel,borderTopLeftRadius:$?0:6,borderTopRightRadius:6,borderBottomLeftRadius:6,borderBottomRightRadius:6,borderWidth:i.isDragging?2:1,borderTopWidth:i.isDragging?2:$?0:1,borderStyle:"solid",borderColor:i.isDragging?f.dragActive:P(f.muted,"66"),boxShadow:i.isDragging?`0 6px 12px ${P(f.dragActive,.36)}`:"0 4px 8px rgba(0, 0, 0, 0.3)",cursor:a?i.isDragging?"grabbing":"grab":void 0,userSelect:"none",touchAction:"none",pointerEvents:B?"none":"auto",...n==="strip"?{borderRadius:C.radius.card,minHeight:48,backgroundColor:C.color.surface,borderColor:i.isDragging?C.color.accentBorderStrong:C.color.separator,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.24)"}:{}},children:[I&&d("div",{style:{position:"absolute",bottom:"100%",left:-1,width:te,overflow:"visible",zIndex:1001},children:I}),W("div",{role:"button","aria-label":p,"data-testid":e?`${e}-grip`:"buoy-floating-grip",tabIndex:0,onPointerDown:q,onKeyDown:t=>{if(t.key!=="Enter"&&t.key!==" ")return;t.preventDefault();let r=s.toggleHideShow();b(i.position,r.targetPosition,()=>s.commitPosition(r.targetPosition))},style:{touchAction:"none",paddingLeft:6,paddingRight:6,paddingTop:6,paddingBottom:6,backgroundColor:P(f.muted,"1A"),display:"flex",alignItems:"center",justifyContent:"center",width:te,boxSizing:"border-box",borderRight:`1px solid ${P(f.muted,"66")}`,cursor:i.isDragging?"grabbing":"grab",...n==="strip"?{minHeight:48,backgroundColor:"transparent",borderRight:"none",flexDirection:"column"}:{}},children:[d(Re,{size:n==="strip"?20:12}),T]}),d(me,{value:{isDragging:i.isDragging,isHidden:i.isHidden},children:d("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:6,paddingRight:8},children:de})}),!i.isHidden&&u&&d("div",{"data-floating-accessory":!0,style:{position:"absolute",...ce?{bottom:"100%"}:{top:"100%"},left:0,width:"100%",maxHeight:Math.max(K,J),overflowY:"auto",zIndex:1002},children:u})]})}var c=[],Ae=0,G=new Set,_=()=>G.forEach(e=>e()),U=()=>c,Y=e=>(G.add(e),()=>{G.delete(e)});function Ye(e){if(!e.id.trim())throw new Error("Floating tools need a non-empty id");let o={...e,revealToken:++Ae};c=c.some(n=>n.id===e.id)?c.map(n=>n.id===e.id?o:n):[...c,o],_()}function re(e){c.some(o=>o.id===e)&&(c=c.filter(o=>o.id!==e),_())}function $e(e,o){if(!e.id.trim())throw new Error("Floating tools need a non-empty id");let n=`@buoy/floating-tool/${e.id}/open`,a=!1,p=!1,u=c.some(l=>l.id===e.id),T=Promise.resolve(),S=Y(()=>{let l=c.some(x=>x.id===e.id);l!==u&&(u=l,p=!0,T=T.then(()=>o.setItem(n,l?"1":"0")).then(()=>{},()=>{}))});return o.getItem(n).then(l=>{a||p||u||l!=="1"||(c=[...c,{...e,revealToken:0}],_())}).catch(()=>{}),()=>{a=!0,S()}}import{Fragment as Fe,useSyncExternalStore as Ce}from"react";import{jsx as se}from"react/jsx-runtime";function Ke(){let e=Ce(Y,U,U);return se("div",{style:{position:"fixed",inset:0,pointerEvents:"none",zIndex:1e4},children:e.map(o=>se(Fe,{children:o.render({id:o.id,revealToken:o.revealToken,dismiss:()=>re(o.id)})},o.id))})}export{Ie as a,De as b,Ee as c,ue as d,ge as e,Q as f,Te as g,Oe as h,Ne as i,We as j,U as k,Y as l,Ye as m,re as n,$e as o,Ke as p};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as t}from"./chunk-GF5C5DVX.mjs";import{Xb as T,Zb as C,md as w}from"./chunk-AIEOQWNG.mjs";import{J as x,a as o,b as a,d as p}from"./chunk-3UTMGIUG.mjs";import{jsx as r,jsxs as i}from"react/jsx-runtime";function k({statusDotColor:s,statusLabel:R,statusSublabel:f,primaryText:D,secondaryText:l,secondaryAccessory:y,expandedContent:m,isExpanded:n,badgeText:c,badgeColor:I,customBadge:d,showChevron:S,bottomRightText:g,isSelected:V,onPress:b,disabled:v,expandedGlowColor:h,testID:L,statusTestID:O,statusSublabelTestID:W,primaryTestID:z,secondaryTestID:H,accessibilityLabel:B,trailingAction:u}){return r(o,{style:[e.rowWrapper,n&&e.rowWrapperExpanded],children:i(o,{style:[e.row,V&&e.selectedRow,n&&[e.expandedRowActive,{borderColor:h||t.color.accent,borderBottomColor:h||t.color.accent,shadowColor:h||t.color.accent}]],children:[i(o,{style:e.headerRow,children:[r(p,{style:e.headerPress,onPress:b,activeOpacity:.8,disabled:v||!b,testID:L,accessibilityLabel:B,accessibilityRole:b?"button":void 0,children:i(o,{style:e.rowContent,children:[i(o,{style:e.statusSection,children:[r(o,{style:[e.statusDot,{backgroundColor:s}]}),i(o,{style:e.statusInfo,children:[r(a,{style:[e.statusLabel,{color:s}],numberOfLines:1,testID:O,children:R}),f?r(a,{style:e.observerText,numberOfLines:1,testID:W,children:f}):null]})]}),i(o,{style:e.querySection,children:[r(a,{style:e.queryHash,numberOfLines:n?void 0:2,testID:z,children:D}),!n&&(l||y)?i(o,{style:e.secondaryRow,children:[l?r(a,{style:e.secondaryText,numberOfLines:1,testID:H,children:l}):null,y]}):null]}),i(o,{style:e.rightSection,children:[(d||c!==void 0||!n&&g)&&i(o,{style:e.badgeContainer,children:[d||(c!==void 0?r(a,{style:[e.statusBadge,{color:I||s}],children:c}):null),!n&&g?r(a,{style:e.bottomRightText,numberOfLines:1,children:g}):null]}),S&&r(o,{style:e.chevronContainer,children:n?r(T,{size:14,color:t.color.textTertiary}):r(C,{size:14,color:t.color.textTertiary})})]})]})}),u?r(o,{style:e.trailingAction,children:u}):null]}),n&&m&&r(o,{style:e.expandedContent,children:m})]})})}var e=x.create({rowWrapper:{position:"relative",marginHorizontal:8,marginVertical:3},rowWrapperExpanded:{marginVertical:12},row:{backgroundColor:"rgba(12, 12, 12, 0.9)",borderRadius:8,borderWidth:1,borderColor:t.color.border,borderBottomWidth:1,borderBottomColor:t.color.separator,padding:12,paddingHorizontal:12,transform:[{scale:1}]},selectedRow:{backgroundColor:t.color.accentSoft,borderColor:t.color.accentBorderStrong,transform:[{scale:1.01}],shadowColor:t.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:8,elevation:2},expandedRowActive:{transform:[{scale:1.02}],borderWidth:2,paddingBottom:16,shadowOffset:{width:0,height:0},shadowOpacity:.8,shadowRadius:20,elevation:10},headerRow:{flexDirection:"row",alignItems:"center"},headerPress:{flex:1,minWidth:0},trailingAction:{marginLeft:8,justifyContent:"center"},rowContent:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},statusSection:{flexDirection:"row",alignItems:"center",gap:8,width:90,minWidth:90},statusDot:{width:8,height:8,borderRadius:4},statusInfo:{flex:1,maxWidth:70},statusLabel:{fontSize:11,fontWeight:"600",lineHeight:14},observerText:{fontSize:10,color:t.color.textTertiary,marginTop:1},querySection:{flex:2,paddingHorizontal:12},queryHash:{fontFamily:w,fontSize:12,color:t.color.text,lineHeight:16},secondaryRow:{flexDirection:"row",alignItems:"center",gap:6,marginTop:1},secondaryText:{fontSize:10,color:t.color.textTertiary,marginTop:1},rightSection:{flexDirection:"row",alignItems:"center",gap:8},badgeContainer:{flexDirection:"column",alignItems:"flex-end",gap:2},statusBadge:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},chevronContainer:{padding:2},expandedContent:{marginTop:8,paddingTop:8,borderTopWidth:1,borderTopColor:t.color.separator,marginLeft:24},bottomRightText:{fontSize:9,color:t.color.textTertiary,fontFamily:w}});export{k as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as t}from"./chunk-GF5C5DVX.mjs";import{Wb as T,Yb as C,ld as w}from"./chunk-I27M4JCS.mjs";import{J as x,a as o,b as a,d as p}from"./chunk-UCKELQSM.mjs";import{jsx as r,jsxs as i}from"react/jsx-runtime";function k({statusDotColor:s,statusLabel:R,statusSublabel:f,primaryText:D,secondaryText:l,secondaryAccessory:y,expandedContent:m,isExpanded:n,badgeText:c,badgeColor:I,customBadge:d,showChevron:S,bottomRightText:g,isSelected:V,onPress:b,disabled:v,expandedGlowColor:h,testID:L,statusTestID:O,statusSublabelTestID:W,primaryTestID:z,secondaryTestID:H,accessibilityLabel:B,trailingAction:u}){return r(o,{style:[e.rowWrapper,n&&e.rowWrapperExpanded],children:i(o,{style:[e.row,V&&e.selectedRow,n&&[e.expandedRowActive,{borderColor:h||t.color.accent,borderBottomColor:h||t.color.accent,shadowColor:h||t.color.accent}]],children:[i(o,{style:e.headerRow,children:[r(p,{style:e.headerPress,onPress:b,activeOpacity:.8,disabled:v||!b,testID:L,accessibilityLabel:B,accessibilityRole:b?"button":void 0,children:i(o,{style:e.rowContent,children:[i(o,{style:e.statusSection,children:[r(o,{style:[e.statusDot,{backgroundColor:s}]}),i(o,{style:e.statusInfo,children:[r(a,{style:[e.statusLabel,{color:s}],numberOfLines:1,testID:O,children:R}),f?r(a,{style:e.observerText,numberOfLines:1,testID:W,children:f}):null]})]}),i(o,{style:e.querySection,children:[r(a,{style:e.queryHash,numberOfLines:n?void 0:2,testID:z,children:D}),!n&&(l||y)?i(o,{style:e.secondaryRow,children:[l?r(a,{style:e.secondaryText,numberOfLines:1,testID:H,children:l}):null,y]}):null]}),i(o,{style:e.rightSection,children:[(d||c!==void 0||!n&&g)&&i(o,{style:e.badgeContainer,children:[d||(c!==void 0?r(a,{style:[e.statusBadge,{color:I||s}],children:c}):null),!n&&g?r(a,{style:e.bottomRightText,numberOfLines:1,children:g}):null]}),S&&r(o,{style:e.chevronContainer,children:n?r(T,{size:14,color:t.color.textTertiary}):r(C,{size:14,color:t.color.textTertiary})})]})]})}),u?r(o,{style:e.trailingAction,children:u}):null]}),n&&m&&r(o,{style:e.expandedContent,children:m})]})})}var e=x.create({rowWrapper:{position:"relative",marginHorizontal:8,marginVertical:3},rowWrapperExpanded:{marginVertical:12},row:{backgroundColor:"rgba(12, 12, 12, 0.9)",borderRadius:8,borderWidth:1,borderColor:t.color.border,borderBottomWidth:1,borderBottomColor:t.color.separator,padding:12,paddingHorizontal:12,transform:[{scale:1}]},selectedRow:{backgroundColor:t.color.accentSoft,borderColor:t.color.accentBorderStrong,transform:[{scale:1.01}],shadowColor:t.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:8,elevation:2},expandedRowActive:{transform:[{scale:1.02}],borderWidth:2,paddingBottom:16,shadowOffset:{width:0,height:0},shadowOpacity:.8,shadowRadius:20,elevation:10},headerRow:{flexDirection:"row",alignItems:"center"},headerPress:{flex:1,minWidth:0},trailingAction:{marginLeft:8,justifyContent:"center"},rowContent:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},statusSection:{flexDirection:"row",alignItems:"center",gap:8,width:90,minWidth:90},statusDot:{width:8,height:8,borderRadius:4},statusInfo:{flex:1,maxWidth:70},statusLabel:{fontSize:11,fontWeight:"600",lineHeight:14},observerText:{fontSize:10,color:t.color.textTertiary,marginTop:1},querySection:{flex:2,paddingHorizontal:12},queryHash:{fontFamily:w,fontSize:12,color:t.color.text,lineHeight:16},secondaryRow:{flexDirection:"row",alignItems:"center",gap:6,marginTop:1},secondaryText:{fontSize:10,color:t.color.textTertiary,marginTop:1},rightSection:{flexDirection:"row",alignItems:"center",gap:8},badgeContainer:{flexDirection:"column",alignItems:"flex-end",gap:2},statusBadge:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},chevronContainer:{padding:2},expandedContent:{marginTop:8,paddingTop:8,borderTopWidth:1,borderTopColor:t.color.separator,marginLeft:24},bottomRightText:{fontSize:9,color:t.color.textTertiary,fontFamily:w}});export{k as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var t={base:"@react_buoy",bubble:{root:()=>`${t.base}_bubble`,settings:()=>`${t.bubble.root()}_settings`,userPreferences:()=>`${t.bubble.root()}_user_preferences`,position:()=>`${t.bubble.root()}_position`},modal:{root:()=>`${t.base}_modal`,state:()=>`${t.modal.root()}_state`,position:()=>`${t.modal.root()}_position`,dimensions:()=>`${t.modal.root()}_dimensions`,hintAcknowledged:()=>`${t.modal.root()}_hint_acknowledged`},custom:o=>{let e=`${t.base}_custom_${o}`;return{root:()=>e,modal:()=>`${e}_modal`,settings:()=>`${e}_settings`,key:s=>`${e}_${s}`}},settings:{root:()=>`${t.base}_settings`,theme:()=>`${t.settings.root()}_theme`,preferences:()=>`${t.settings.root()}_preferences`,wifiEnabled:()=>`${t.settings.root()}_wifi_enabled`,global:()=>`${t.settings.root()}_global`,activeTab:()=>`${t.settings.root()}_active_tab`,modalOpen:()=>`${t.settings.root()}_modal_open`},dial:{root:()=>`${t.base}_dial`,isOpen:()=>`${t.dial.root()}_is_open`,usage:()=>`${t.dial.root()}_usage`},clipboard:{root:()=>`${t.base}_clipboard`,hintAcknowledged:()=>`${t.clipboard.root()}_hint_acknowledged`},env:{root:()=>`${t.base}_env`,modal:()=>`${t.env.root()}_modal`,currentEnv:()=>`${t.env.root()}_current`,overrides:()=>`${t.env.root()}_overrides`},sentry:{root:()=>`${t.base}_sentry`,modal:()=>`${t.sentry.root()}_modal`,filters:()=>`${t.sentry.root()}_filters`,preferences:()=>`${t.sentry.root()}_preferences`},storage:{root:()=>`${t.base}_storage`,modal:()=>`${t.storage.root()}_modal`,eventsModal:()=>`${t.storage.root()}_events_modal`,filters:()=>`${t.storage.root()}_filters`,eventFilters:()=>`${t.storage.root()}_event_filters`,keyFilters:()=>`${t.storage.root()}_key_filters`,pinnedKeys:()=>`${t.storage.root()}_pinned_keys`,preferences:()=>`${t.storage.root()}_preferences`,activeTab:()=>`${t.storage.root()}_active_tab`,isMonitoring:()=>`${t.storage.root()}_is_monitoring`,diffViewerMode:()=>`${t.storage.root()}_diff_viewer_mode`},timeMachine:{root:()=>`${t.base}_time_machine`,diffViewerMode:()=>`${t.timeMachine.root()}_diff_viewer_mode`,armedPoint:()=>`${t.timeMachine.root()}_armed_point`,barReloadMode:()=>`${t.timeMachine.root()}_bar_reload_mode`,disabledSources:()=>`${t.timeMachine.root()}_disabled_sources`},scenarios:{root:()=>`${t.base}_scenarios`,modal:()=>`${t.scenarios.root()}_modal`,library:()=>`${t.scenarios.root()}_library`,active:()=>`${t.scenarios.root()}_active`},reactQuery:{root:()=>`${t.base}_rq`,modal:()=>`${t.reactQuery.root()}_modal`,browserModal:()=>`${t.reactQuery.root()}_browser_modal`,mutationModal:()=>`${t.reactQuery.root()}_mutation_modal`,filters:()=>`${t.reactQuery.root()}_filters`,ignoredPatterns:()=>`${t.reactQuery.root()}_ignored_patterns`,includedPatterns:()=>`${t.reactQuery.root()}_included_patterns`,preferences:()=>`${t.reactQuery.root()}_preferences`},network:{root:()=>`${t.base}_network`,modal:()=>`${t.network.root()}_modal`,copyModal:()=>`${t.network.root()}_copy_modal`,filters:()=>`${t.network.root()}_filters`,ignoredDomains:()=>`${t.network.root()}_ignored_domains`,ignoredUrls:()=>`${t.network.root()}_ignored_urls`,preferences:()=>`${t.network.root()}_preferences`,copyOptions:()=>`${t.network.root()}_copy_options`,saved:()=>`${t.network.root()}_saved`,overrides:()=>`${t.network.root()}_overrides`},routeEvents:{root:()=>`${t.base}_route_events`,modal:()=>`${t.routeEvents.root()}_modal`,eventFilters:()=>`${t.routeEvents.root()}_event_filters`,activeTab:()=>`${t.routeEvents.root()}_active_tab`,isMonitoring:()=>`${t.routeEvents.root()}_is_monitoring`,detailView:()=>`${t.routeEvents.root()}_detail_view`,diffViewerMode:()=>`${t.routeEvents.root()}_diff_viewer_mode`},highlightUpdates:{root:()=>`${t.base}_highlight_updates`,modal:()=>`${t.highlightUpdates.root()}_modal`,isTracking:()=>`${t.highlightUpdates.root()}_is_tracking`,filters:()=>`${t.highlightUpdates.root()}_filters`,settings:()=>`${t.highlightUpdates.root()}_settings`,copySettings:()=>`${t.highlightUpdates.root()}_copy_settings`},benchmark:{root:()=>`${t.base}_benchmark`,modal:()=>`${t.benchmark.root()}_modal`,isRecording:()=>`${t.benchmark.root()}_is_recording`,activeTab:()=>`${t.benchmark.root()}_active_tab`,settings:()=>`${t.benchmark.root()}_settings`,selectedReports:()=>`${t.benchmark.root()}_selected_reports`},debugBorders:{root:()=>`${t.base}_debug_borders`,infoModal:()=>`${t.debugBorders.root()}_info_modal`},events:{root:()=>`${t.base}_events`,modal:()=>`${t.events.root()}_modal`,enabledSources:()=>`${t.events.root()}_enabled_sources`,isCapturing:()=>`${t.events.root()}_is_capturing`,pausedAt:()=>`${t.events.root()}_paused_at`,copySettings:()=>`${t.events.root()}_copy_settings`},sync:{root:()=>`${t.base}_sync`,deviceId:()=>`${t.sync.root()}_device_id`}},l=["@devtools","@dev_tools_","@modal_state_","@react_query_browser_modal","@react_query_modal","@react_query_mutation_modal","@sentry_logs_modal","@floating_rn_better_dev_tools_","@floating_tools_","@apphost_","@bubble_settings_","@env_vars_modal","@storage_modal","@floating_@devtools_","dev_last_route"];function _(o){if(!o)return!1;if(o.startsWith(t.base)||o.startsWith("buoy-")||o.startsWith("@buoy"))return!0;for(let e of l)if(o.startsWith(e))return!0;return!1}var r=new Map;function n(){try{return typeof window>"u"?null:window.localStorage}catch{return null}}var a={async getItem(o){if(r.has(o))return r.get(o)??null;try{return n()?.getItem(o)??null}catch{return null}},async setItem(o,e){r.set(o,e);try{let s=n();s&&(s.setItem(o,e),r.delete(o))}catch{}},async removeItem(o){r.set(o,null);try{let e=n();e&&(e.removeItem(o),r.delete(o))}catch{}},async getAllKeys(){let o=new Set;try{let e=n();if(e)for(let s=0;s<e.length;s++){let i=e.key(s);i?.startsWith(t.base)&&o.add(i)}}catch{}for(let[e,s]of r)e.startsWith(t.base)&&(s===null?o.delete(e):o.add(e));return[...o]},async multiGet(o){return Promise.all(o.map(async e=>[e,await a.getItem(e)]))},async multiRemove(o){await Promise.all(o.map(e=>a.removeItem(e)))},async clear(){await a.multiRemove(await a.getAllKeys())}};async function m(){return n()!==null}async function $(){return n()?"localstorage":"memory"}export{t as a,_ as b,a as c,m as d,$ as e};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var a={color:{bg:"#050505",surface:"#0C0C0C",surfaceElevated:"#161618",border:"#1A1A1C",separator:"rgba(255, 255, 255, 0.08)",glass:"rgba(5, 5, 5, 0.50)",glassElevated:"rgba(255, 255, 255, 0.06)",glassBorder:"rgba(255, 255, 255, 0.07)",fill:"rgba(255, 255, 255, 0.06)",fillSecondary:"rgba(255, 255, 255, 0.08)",fillTertiary:"rgba(255, 255, 255, 0.12)",buttonSurface:"rgba(8, 10, 14, 0.85)",button:"#1C1C1C",buttonPressed:"#2C2C2E",text:"#ECEDEE",textSecondary:"#9BA1A6",textTertiary:"#636366",placeholder:"rgba(255, 255, 255, 0.30)",accent:"#20C997",accentPressed:"#1BAB80",accentSoft:"rgba(32, 201, 151, 0.12)",accentFill:"rgba(32, 201, 151, 0.18)",accentBorder:"rgba(32, 201, 151, 0.20)",accentBorderStrong:"rgba(32, 201, 151, 0.35)",onAccent:"#000000",danger:"#FF3B30",dangerSoft:"rgba(255, 59, 48, 0.10)",warning:"#FF8329",warningSoft:"rgba(255, 131, 41, 0.12)",info:"#1E6DFF",infoSoft:"rgba(30, 109, 255, 0.12)",knob:"#D4D8DC"},radius:{sheet:16,card:14,input:12,row:10,segment:8,badge:6,chip:20,pill:999},gutter:16,labelInset:4,groupGap:24,cardPad:14,rowPadH:16,rowPadV:14,font:{title:17,row:15,body:14,caption:13,label:12,micro:11}},e=.8;export{a,e as b};
|
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
CompactRow
|
|
4
|
+
} from "./chunk-QCD6T6L4.mjs";
|
|
5
|
+
import {
|
|
6
|
+
buoyColors
|
|
7
|
+
} from "./chunk-QPY45R5F.mjs";
|
|
8
|
+
|
|
9
|
+
// src/history/HistoryProvider.tsx
|
|
10
|
+
import {
|
|
11
|
+
createContext,
|
|
12
|
+
useContext,
|
|
13
|
+
useState,
|
|
14
|
+
useCallback,
|
|
15
|
+
useMemo,
|
|
16
|
+
useEffect
|
|
17
|
+
} from "react";
|
|
18
|
+
import { jsx } from "react/jsx-runtime";
|
|
19
|
+
var HistoryContext = createContext(null);
|
|
20
|
+
function HistoryProvider({
|
|
21
|
+
children,
|
|
22
|
+
initialAdapters = []
|
|
23
|
+
}) {
|
|
24
|
+
const [adapterMap, setAdapterMap] = useState(
|
|
25
|
+
() => {
|
|
26
|
+
const map = /* @__PURE__ */ new Map();
|
|
27
|
+
initialAdapters.forEach((reg) => {
|
|
28
|
+
map.set(reg.adapter.id, { ...reg, enabled: reg.enabled ?? true });
|
|
29
|
+
});
|
|
30
|
+
return map;
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
const [selectedAdapterId, setSelectedAdapterId] = useState(null);
|
|
34
|
+
const [refreshKey, setRefreshKey] = useState(0);
|
|
35
|
+
const refresh = useCallback(() => setRefreshKey((k) => k + 1), []);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
const unsubscribes = [];
|
|
38
|
+
adapterMap.forEach((reg) => {
|
|
39
|
+
if (reg.enabled) {
|
|
40
|
+
const unsub = reg.adapter.subscribe(refresh);
|
|
41
|
+
unsubscribes.push(unsub);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
return () => {
|
|
45
|
+
unsubscribes.forEach((unsub) => unsub());
|
|
46
|
+
};
|
|
47
|
+
}, [adapterMap, refresh]);
|
|
48
|
+
const adapters = useMemo(() => {
|
|
49
|
+
return Array.from(adapterMap.values()).filter((reg) => reg.enabled).sort((a, b) => (a.priority ?? 100) - (b.priority ?? 100)).map((reg) => reg.adapter);
|
|
50
|
+
}, [adapterMap, refreshKey]);
|
|
51
|
+
const getAdapter = useCallback(
|
|
52
|
+
(id) => adapterMap.get(id)?.adapter,
|
|
53
|
+
[adapterMap]
|
|
54
|
+
);
|
|
55
|
+
const registerAdapter = useCallback((registration) => {
|
|
56
|
+
setAdapterMap((prev) => {
|
|
57
|
+
const next = new Map(prev);
|
|
58
|
+
next.set(registration.adapter.id, {
|
|
59
|
+
...registration,
|
|
60
|
+
enabled: registration.enabled ?? true
|
|
61
|
+
});
|
|
62
|
+
return next;
|
|
63
|
+
});
|
|
64
|
+
}, []);
|
|
65
|
+
const unregisterAdapter = useCallback((id) => {
|
|
66
|
+
setAdapterMap((prev) => {
|
|
67
|
+
const next = new Map(prev);
|
|
68
|
+
next.delete(id);
|
|
69
|
+
return next;
|
|
70
|
+
});
|
|
71
|
+
}, []);
|
|
72
|
+
const getAllEntries = useCallback(
|
|
73
|
+
(filter) => {
|
|
74
|
+
let entries = [];
|
|
75
|
+
const sourceAdapters = selectedAdapterId && filter?.sources === void 0 ? adapters.filter((a) => a.id === selectedAdapterId) : adapters;
|
|
76
|
+
sourceAdapters.forEach((adapter) => {
|
|
77
|
+
if (filter?.sources && !filter.sources.includes(adapter.id)) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
entries = entries.concat(adapter.getEntries());
|
|
81
|
+
});
|
|
82
|
+
if (filter) {
|
|
83
|
+
entries = applyFilter(entries, filter);
|
|
84
|
+
}
|
|
85
|
+
entries.sort((a, b) => b.timestamp - a.timestamp);
|
|
86
|
+
return entries;
|
|
87
|
+
},
|
|
88
|
+
[adapters, selectedAdapterId, refreshKey]
|
|
89
|
+
);
|
|
90
|
+
const getEntryCounts = useCallback(() => {
|
|
91
|
+
const counts = {};
|
|
92
|
+
adapters.forEach((adapter) => {
|
|
93
|
+
counts[adapter.id] = adapter.getEntryCount();
|
|
94
|
+
});
|
|
95
|
+
return counts;
|
|
96
|
+
}, [adapters, refreshKey]);
|
|
97
|
+
const value = useMemo(
|
|
98
|
+
() => ({
|
|
99
|
+
adapters,
|
|
100
|
+
getAdapter,
|
|
101
|
+
registerAdapter,
|
|
102
|
+
unregisterAdapter,
|
|
103
|
+
getAllEntries,
|
|
104
|
+
getEntryCounts,
|
|
105
|
+
selectedAdapterId,
|
|
106
|
+
setSelectedAdapterId,
|
|
107
|
+
refresh
|
|
108
|
+
}),
|
|
109
|
+
[
|
|
110
|
+
adapters,
|
|
111
|
+
getAdapter,
|
|
112
|
+
registerAdapter,
|
|
113
|
+
unregisterAdapter,
|
|
114
|
+
getAllEntries,
|
|
115
|
+
getEntryCounts,
|
|
116
|
+
selectedAdapterId,
|
|
117
|
+
refresh
|
|
118
|
+
]
|
|
119
|
+
);
|
|
120
|
+
return /* @__PURE__ */ jsx(HistoryContext.Provider, { value, children });
|
|
121
|
+
}
|
|
122
|
+
function useHistoryContext() {
|
|
123
|
+
const context = useContext(HistoryContext);
|
|
124
|
+
if (!context) {
|
|
125
|
+
throw new Error("useHistoryContext must be used within a HistoryProvider");
|
|
126
|
+
}
|
|
127
|
+
return context;
|
|
128
|
+
}
|
|
129
|
+
function useHistoryAdapters() {
|
|
130
|
+
return useHistoryContext().adapters;
|
|
131
|
+
}
|
|
132
|
+
function useHistoryAdapter(id) {
|
|
133
|
+
return useHistoryContext().getAdapter(id);
|
|
134
|
+
}
|
|
135
|
+
function useAllHistoryEntries(filter) {
|
|
136
|
+
const { getAllEntries } = useHistoryContext();
|
|
137
|
+
return getAllEntries(filter);
|
|
138
|
+
}
|
|
139
|
+
function useHistoryEntryCounts() {
|
|
140
|
+
return useHistoryContext().getEntryCounts();
|
|
141
|
+
}
|
|
142
|
+
function applyFilter(entries, filter) {
|
|
143
|
+
return entries.filter((entry) => {
|
|
144
|
+
if (filter.searchText) {
|
|
145
|
+
const search = filter.searchText.toLowerCase();
|
|
146
|
+
if (!entry.label.toLowerCase().includes(search)) {
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (filter.onlyWithChanges && !entry.hasStateChange) {
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
if (filter.onlyErrors && entry.status !== "error") {
|
|
154
|
+
return false;
|
|
155
|
+
}
|
|
156
|
+
if (filter.afterTimestamp && entry.timestamp < filter.afterTimestamp) {
|
|
157
|
+
return false;
|
|
158
|
+
}
|
|
159
|
+
if (filter.beforeTimestamp && entry.timestamp > filter.beforeTimestamp) {
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
162
|
+
if (filter.ignoredPatterns?.length) {
|
|
163
|
+
for (const pattern of filter.ignoredPatterns) {
|
|
164
|
+
if (new RegExp(pattern).test(entry.label)) {
|
|
165
|
+
return false;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
if (filter.includedPatterns?.length) {
|
|
170
|
+
let matched = false;
|
|
171
|
+
for (const pattern of filter.includedPatterns) {
|
|
172
|
+
if (new RegExp(pattern).test(entry.label)) {
|
|
173
|
+
matched = true;
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (!matched) return false;
|
|
178
|
+
}
|
|
179
|
+
return true;
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// src/history/components/HistoryEntryRow.tsx
|
|
184
|
+
import { View, Text, StyleSheet } from "react-native-web";
|
|
185
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
186
|
+
function formatRelativeTime(timestamp) {
|
|
187
|
+
const now = Date.now();
|
|
188
|
+
const diff = now - timestamp;
|
|
189
|
+
if (diff < 1e3) return "just now";
|
|
190
|
+
if (diff < 6e4) return `${Math.floor(diff / 1e3)}s ago`;
|
|
191
|
+
if (diff < 36e5) return `${Math.floor(diff / 6e4)}m ago`;
|
|
192
|
+
return `${Math.floor(diff / 36e5)}h ago`;
|
|
193
|
+
}
|
|
194
|
+
function getStatusColor(entry, adapter) {
|
|
195
|
+
if (adapter?.color) {
|
|
196
|
+
return adapter.color;
|
|
197
|
+
}
|
|
198
|
+
if (entry.status === "error") return buoyColors.error;
|
|
199
|
+
if (entry.status === "pending") return buoyColors.warning;
|
|
200
|
+
if (entry.status === "success") return buoyColors.success;
|
|
201
|
+
if (entry.hasStateChange) return buoyColors.success;
|
|
202
|
+
if (entry.isSkipped) return buoyColors.textMuted;
|
|
203
|
+
if (entry.isInFuture) return buoyColors.textMuted + "80";
|
|
204
|
+
switch (entry.source) {
|
|
205
|
+
case "redux":
|
|
206
|
+
return "#764ABC";
|
|
207
|
+
// Redux purple
|
|
208
|
+
case "zustand":
|
|
209
|
+
return "#443E38";
|
|
210
|
+
// Zustand brown
|
|
211
|
+
case "mmkv":
|
|
212
|
+
return "#4CAF50";
|
|
213
|
+
// Green
|
|
214
|
+
case "async-storage":
|
|
215
|
+
return "#2196F3";
|
|
216
|
+
// Blue
|
|
217
|
+
case "react-query":
|
|
218
|
+
return "#FF4154";
|
|
219
|
+
// React Query red
|
|
220
|
+
case "jotai":
|
|
221
|
+
return "#000000";
|
|
222
|
+
// Black
|
|
223
|
+
case "legend-state":
|
|
224
|
+
return "#7C3AED";
|
|
225
|
+
// Purple
|
|
226
|
+
default:
|
|
227
|
+
return buoyColors.textSecondary;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
function getStatusLabel(entry) {
|
|
231
|
+
if (entry.isSkipped) return "Skipped";
|
|
232
|
+
if (entry.isInFuture) return "Future";
|
|
233
|
+
if (entry.status) {
|
|
234
|
+
return entry.status.charAt(0).toUpperCase() + entry.status.slice(1);
|
|
235
|
+
}
|
|
236
|
+
if (entry.hasStateChange) return "Changed";
|
|
237
|
+
return "Action";
|
|
238
|
+
}
|
|
239
|
+
function getSublabel(entry, adapter) {
|
|
240
|
+
if (adapter?.name) return adapter.name;
|
|
241
|
+
if (entry.category) return entry.category;
|
|
242
|
+
return entry.source;
|
|
243
|
+
}
|
|
244
|
+
function HistoryEntryRow({
|
|
245
|
+
entry,
|
|
246
|
+
adapter,
|
|
247
|
+
isSelected,
|
|
248
|
+
onPress,
|
|
249
|
+
showSource = true,
|
|
250
|
+
showDuration = true
|
|
251
|
+
}) {
|
|
252
|
+
const statusColor = getStatusColor(entry, adapter);
|
|
253
|
+
const statusLabel = getStatusLabel(entry);
|
|
254
|
+
const sublabel = showSource ? getSublabel(entry, adapter) : void 0;
|
|
255
|
+
let bottomRightText = formatRelativeTime(entry.timestamp);
|
|
256
|
+
if (showDuration && entry.duration !== void 0) {
|
|
257
|
+
bottomRightText = `${entry.duration.toFixed(1)}ms \xB7 ${bottomRightText}`;
|
|
258
|
+
}
|
|
259
|
+
const customBadge = entry.hasStateChange ? /* @__PURE__ */ jsx2(View, { style: styles.changeBadge, children: /* @__PURE__ */ jsx2(Text, { style: styles.changeBadgeText, children: "\u26A1" }) }) : void 0;
|
|
260
|
+
return /* @__PURE__ */ jsx2(
|
|
261
|
+
CompactRow,
|
|
262
|
+
{
|
|
263
|
+
statusDotColor: statusColor,
|
|
264
|
+
statusLabel,
|
|
265
|
+
statusSublabel: sublabel,
|
|
266
|
+
primaryText: entry.label,
|
|
267
|
+
bottomRightText,
|
|
268
|
+
customBadge,
|
|
269
|
+
isSelected,
|
|
270
|
+
onPress: onPress ? () => onPress(entry) : void 0,
|
|
271
|
+
showChevron: !!onPress
|
|
272
|
+
}
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
var styles = StyleSheet.create({
|
|
276
|
+
changeBadge: {
|
|
277
|
+
paddingHorizontal: 4
|
|
278
|
+
},
|
|
279
|
+
changeBadgeText: {
|
|
280
|
+
fontSize: 12
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
// src/history/components/HistoryList.tsx
|
|
285
|
+
import { useCallback as useCallback2, useMemo as useMemo2 } from "react";
|
|
286
|
+
import { FlatList, View as View2, Text as Text2, StyleSheet as StyleSheet2 } from "react-native-web";
|
|
287
|
+
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
288
|
+
function HistoryList({
|
|
289
|
+
filter,
|
|
290
|
+
selectedEntryId,
|
|
291
|
+
onSelectEntry,
|
|
292
|
+
showSource = true,
|
|
293
|
+
emptyMessage = "No history entries yet",
|
|
294
|
+
ListHeaderComponent,
|
|
295
|
+
ListFooterComponent
|
|
296
|
+
}) {
|
|
297
|
+
const entries = useAllHistoryEntries(filter);
|
|
298
|
+
const adapters = useHistoryAdapters();
|
|
299
|
+
const adapterMap = useMemo2(() => {
|
|
300
|
+
const map = /* @__PURE__ */ new Map();
|
|
301
|
+
adapters.forEach((adapter) => map.set(adapter.id, adapter));
|
|
302
|
+
return map;
|
|
303
|
+
}, [adapters]);
|
|
304
|
+
const keyExtractor = useCallback2(
|
|
305
|
+
(item) => `${item.source}-${item.id}`,
|
|
306
|
+
[]
|
|
307
|
+
);
|
|
308
|
+
const renderItem = useCallback2(
|
|
309
|
+
({ item }) => {
|
|
310
|
+
const adapter = adapterMap.get(item.source);
|
|
311
|
+
return /* @__PURE__ */ jsx3(
|
|
312
|
+
HistoryEntryRow,
|
|
313
|
+
{
|
|
314
|
+
entry: item,
|
|
315
|
+
adapter,
|
|
316
|
+
isSelected: selectedEntryId === item.id,
|
|
317
|
+
onPress: onSelectEntry,
|
|
318
|
+
showSource
|
|
319
|
+
}
|
|
320
|
+
);
|
|
321
|
+
},
|
|
322
|
+
[adapterMap, selectedEntryId, onSelectEntry, showSource]
|
|
323
|
+
);
|
|
324
|
+
const ListEmptyComponent = useMemo2(
|
|
325
|
+
() => /* @__PURE__ */ jsxs(View2, { style: styles2.emptyContainer, children: [
|
|
326
|
+
/* @__PURE__ */ jsx3(Text2, { style: styles2.emptyText, children: emptyMessage }),
|
|
327
|
+
/* @__PURE__ */ jsx3(Text2, { style: styles2.emptySubtext, children: "Actions will appear here as they happen" })
|
|
328
|
+
] }),
|
|
329
|
+
[emptyMessage]
|
|
330
|
+
);
|
|
331
|
+
return /* @__PURE__ */ jsx3(
|
|
332
|
+
FlatList,
|
|
333
|
+
{
|
|
334
|
+
data: entries,
|
|
335
|
+
keyExtractor,
|
|
336
|
+
renderItem,
|
|
337
|
+
ListEmptyComponent,
|
|
338
|
+
ListHeaderComponent,
|
|
339
|
+
ListFooterComponent,
|
|
340
|
+
contentContainerStyle: styles2.listContent,
|
|
341
|
+
showsVerticalScrollIndicator: false,
|
|
342
|
+
removeClippedSubviews: true,
|
|
343
|
+
maxToRenderPerBatch: 15,
|
|
344
|
+
windowSize: 10,
|
|
345
|
+
initialNumToRender: 15,
|
|
346
|
+
getItemLayout: void 0
|
|
347
|
+
}
|
|
348
|
+
);
|
|
349
|
+
}
|
|
350
|
+
function StandaloneHistoryList({
|
|
351
|
+
entries,
|
|
352
|
+
adapters = [],
|
|
353
|
+
selectedEntryId,
|
|
354
|
+
onSelectEntry,
|
|
355
|
+
showSource = true,
|
|
356
|
+
emptyMessage = "No history entries yet",
|
|
357
|
+
ListHeaderComponent,
|
|
358
|
+
ListFooterComponent
|
|
359
|
+
}) {
|
|
360
|
+
const adapterMap = useMemo2(() => {
|
|
361
|
+
const map = /* @__PURE__ */ new Map();
|
|
362
|
+
adapters.forEach((adapter) => map.set(adapter.id, adapter));
|
|
363
|
+
return map;
|
|
364
|
+
}, [adapters]);
|
|
365
|
+
const keyExtractor = useCallback2(
|
|
366
|
+
(item) => `${item.source}-${item.id}`,
|
|
367
|
+
[]
|
|
368
|
+
);
|
|
369
|
+
const renderItem = useCallback2(
|
|
370
|
+
({ item }) => {
|
|
371
|
+
const adapter = adapterMap.get(item.source);
|
|
372
|
+
return /* @__PURE__ */ jsx3(
|
|
373
|
+
HistoryEntryRow,
|
|
374
|
+
{
|
|
375
|
+
entry: item,
|
|
376
|
+
adapter,
|
|
377
|
+
isSelected: selectedEntryId === item.id,
|
|
378
|
+
onPress: onSelectEntry,
|
|
379
|
+
showSource
|
|
380
|
+
}
|
|
381
|
+
);
|
|
382
|
+
},
|
|
383
|
+
[adapterMap, selectedEntryId, onSelectEntry, showSource]
|
|
384
|
+
);
|
|
385
|
+
const ListEmptyComponent = useMemo2(
|
|
386
|
+
() => /* @__PURE__ */ jsxs(View2, { style: styles2.emptyContainer, children: [
|
|
387
|
+
/* @__PURE__ */ jsx3(Text2, { style: styles2.emptyText, children: emptyMessage }),
|
|
388
|
+
/* @__PURE__ */ jsx3(Text2, { style: styles2.emptySubtext, children: "Actions will appear here as they happen" })
|
|
389
|
+
] }),
|
|
390
|
+
[emptyMessage]
|
|
391
|
+
);
|
|
392
|
+
return /* @__PURE__ */ jsx3(
|
|
393
|
+
FlatList,
|
|
394
|
+
{
|
|
395
|
+
data: entries,
|
|
396
|
+
keyExtractor,
|
|
397
|
+
renderItem,
|
|
398
|
+
ListEmptyComponent,
|
|
399
|
+
ListHeaderComponent,
|
|
400
|
+
ListFooterComponent,
|
|
401
|
+
contentContainerStyle: styles2.listContent,
|
|
402
|
+
showsVerticalScrollIndicator: false,
|
|
403
|
+
removeClippedSubviews: true,
|
|
404
|
+
maxToRenderPerBatch: 15,
|
|
405
|
+
windowSize: 10,
|
|
406
|
+
initialNumToRender: 15
|
|
407
|
+
}
|
|
408
|
+
);
|
|
409
|
+
}
|
|
410
|
+
var styles2 = StyleSheet2.create({
|
|
411
|
+
listContent: {
|
|
412
|
+
flexGrow: 1,
|
|
413
|
+
paddingVertical: 4
|
|
414
|
+
},
|
|
415
|
+
emptyContainer: {
|
|
416
|
+
flex: 1,
|
|
417
|
+
alignItems: "center",
|
|
418
|
+
justifyContent: "center",
|
|
419
|
+
paddingVertical: 60,
|
|
420
|
+
paddingHorizontal: 20
|
|
421
|
+
},
|
|
422
|
+
emptyText: {
|
|
423
|
+
fontSize: 16,
|
|
424
|
+
fontWeight: "600",
|
|
425
|
+
color: buoyColors.text,
|
|
426
|
+
marginBottom: 8
|
|
427
|
+
},
|
|
428
|
+
emptySubtext: {
|
|
429
|
+
fontSize: 13,
|
|
430
|
+
color: buoyColors.textMuted,
|
|
431
|
+
textAlign: "center"
|
|
432
|
+
}
|
|
433
|
+
});
|
|
434
|
+
|
|
435
|
+
export {
|
|
436
|
+
HistoryProvider,
|
|
437
|
+
useHistoryContext,
|
|
438
|
+
useHistoryAdapters,
|
|
439
|
+
useHistoryAdapter,
|
|
440
|
+
useAllHistoryEntries,
|
|
441
|
+
useHistoryEntryCounts,
|
|
442
|
+
HistoryEntryRow,
|
|
443
|
+
HistoryList,
|
|
444
|
+
StandaloneHistoryList
|
|
445
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as B}from"./chunk-QD5EUANU.mjs";import{f as y}from"./chunk-CE5U3CSQ.mjs";import{D as F,R as x,Y as w,x as L}from"./chunk-K4LXMO4D.mjs";import{createContext as O,useContext as U,useState as M,useCallback as b,useMemo as z,useEffect as j}from"react";import{jsx as Z}from"react/jsx-runtime";var $=O(null);function J({children:t,initialAdapters:e=[]}){let[o,n]=M(()=>{let r=new Map;return e.forEach(s=>{r.set(s.adapter.id,{...s,enabled:s.enabled??!0})}),r}),[u,l]=M(null),[c,E]=M(0),d=b(()=>E(r=>r+1),[]);j(()=>{let r=[];return o.forEach(s=>{if(s.enabled){let f=s.adapter.subscribe(d);r.push(f)}}),()=>{r.forEach(s=>s())}},[o,d]);let a=z(()=>Array.from(o.values()).filter(r=>r.enabled).sort((r,s)=>(r.priority??100)-(s.priority??100)).map(r=>r.adapter),[o,c]),m=b(r=>o.get(r)?.adapter,[o]),C=b(r=>{n(s=>{let f=new Map(s);return f.set(r.adapter.id,{...r,enabled:r.enabled??!0}),f})},[]),p=b(r=>{n(s=>{let f=new Map(s);return f.delete(r),f})},[]),i=b(r=>{let s=[];return(u&&r?.sources===void 0?a.filter(A=>A.id===u):a).forEach(A=>{r?.sources&&!r.sources.includes(A.id)||(s=s.concat(A.getEntries()))}),r&&(s=Y(s,r)),s.sort((A,G)=>G.timestamp-A.timestamp),s},[a,u,c]),h=b(()=>{let r={};return a.forEach(s=>{r[s.id]=s.getEntryCount()}),r},[a,c]),q=z(()=>({adapters:a,getAdapter:m,registerAdapter:C,unregisterAdapter:p,getAllEntries:i,getEntryCounts:h,selectedAdapterId:u,setSelectedAdapterId:l,refresh:d}),[a,m,C,p,i,h,u,d]);return Z($.Provider,{value:q,children:t})}function S(){let t=U($);if(!t)throw new Error("useHistoryContext must be used within a HistoryProvider");return t}function I(){return S().adapters}function Q(t){return S().getAdapter(t)}function V(t){let{getAllEntries:e}=S();return e(t)}function X(){return S().getEntryCounts()}function Y(t,e){return t.filter(o=>{if(e.searchText){let n=e.searchText.toLowerCase();if(!o.label.toLowerCase().includes(n))return!1}if(e.onlyWithChanges&&!o.hasStateChange||e.onlyErrors&&o.status!=="error"||e.afterTimestamp&&o.timestamp<e.afterTimestamp||e.beforeTimestamp&&o.timestamp>e.beforeTimestamp)return!1;if(e.ignoredPatterns?.length){for(let n of e.ignoredPatterns)if(new RegExp(n).test(o.label))return!1}if(e.includedPatterns?.length){let n=!1;for(let u of e.includedPatterns)if(new RegExp(u).test(o.label)){n=!0;break}if(!n)return!1}return!0})}import{jsx as k}from"react/jsx-runtime";function _(t){let o=Date.now()-t;return o<1e3?"just now":o<6e4?`${Math.floor(o/1e3)}s ago`:o<36e5?`${Math.floor(o/6e4)}m ago`:`${Math.floor(o/36e5)}h ago`}function tt(t,e){if(e?.color)return e.color;if(t.status==="error")return y.error;if(t.status==="pending")return y.warning;if(t.status==="success")return y.success;if(t.hasStateChange)return y.success;if(t.isSkipped)return y.textMuted;if(t.isInFuture)return y.textMuted+"80";switch(t.source){case"redux":return"#764ABC";case"zustand":return"#443E38";case"mmkv":return"#4CAF50";case"async-storage":return"#2196F3";case"react-query":return"#FF4154";case"jotai":return"#000000";case"legend-state":return"#7C3AED";default:return y.textSecondary}}function et(t){return t.isSkipped?"Skipped":t.isInFuture?"Future":t.status?t.status.charAt(0).toUpperCase()+t.status.slice(1):t.hasStateChange?"Changed":"Action"}function rt(t,e){return e?.name?e.name:t.category?t.category:t.source}function R({entry:t,adapter:e,isSelected:o,onPress:n,showSource:u=!0,showDuration:l=!0}){let c=tt(t,e),E=et(t),d=u?rt(t,e):void 0,a=_(t.timestamp);l&&t.duration!==void 0&&(a=`${t.duration.toFixed(1)}ms \xB7 ${a}`);let m=t.hasStateChange?k(w,{style:D.changeBadge,children:k(x,{style:D.changeBadgeText,children:"\u26A1"})}):void 0;return k(B,{statusDotColor:c,statusLabel:E,statusSublabel:d,primaryText:t.label,bottomRightText:a,customBadge:m,isSelected:o,onPress:n?()=>n(t):void 0,showChevron:!!n})}var D=L.create({changeBadge:{paddingHorizontal:4},changeBadgeText:{fontSize:12}});import{useCallback as T,useMemo as v}from"react";import{jsx as g,jsxs as W}from"react/jsx-runtime";function N({filter:t,selectedEntryId:e,onSelectEntry:o,showSource:n=!0,emptyMessage:u="No history entries yet",ListHeaderComponent:l,ListFooterComponent:c}){let E=V(t),d=I(),a=v(()=>{let i=new Map;return d.forEach(h=>i.set(h.id,h)),i},[d]),m=T(i=>`${i.source}-${i.id}`,[]),C=T(({item:i})=>{let h=a.get(i.source);return g(R,{entry:i,adapter:h,isSelected:e===i.id,onPress:o,showSource:n})},[a,e,o,n]),p=v(()=>W(w,{style:H.emptyContainer,children:[g(x,{style:H.emptyText,children:u}),g(x,{style:H.emptySubtext,children:"Actions will appear here as they happen"})]}),[u]);return g(F,{data:E,keyExtractor:m,renderItem:C,ListEmptyComponent:p,ListHeaderComponent:l,ListFooterComponent:c,contentContainerStyle:H.listContent,showsVerticalScrollIndicator:!1,removeClippedSubviews:!0,maxToRenderPerBatch:15,windowSize:10,initialNumToRender:15,getItemLayout:void 0})}function K({entries:t,adapters:e=[],selectedEntryId:o,onSelectEntry:n,showSource:u=!0,emptyMessage:l="No history entries yet",ListHeaderComponent:c,ListFooterComponent:E}){let d=v(()=>{let p=new Map;return e.forEach(i=>p.set(i.id,i)),p},[e]),a=T(p=>`${p.source}-${p.id}`,[]),m=T(({item:p})=>{let i=d.get(p.source);return g(R,{entry:p,adapter:i,isSelected:o===p.id,onPress:n,showSource:u})},[d,o,n,u]),C=v(()=>W(w,{style:H.emptyContainer,children:[g(x,{style:H.emptyText,children:l}),g(x,{style:H.emptySubtext,children:"Actions will appear here as they happen"})]}),[l]);return g(F,{data:t,keyExtractor:a,renderItem:m,ListEmptyComponent:C,ListHeaderComponent:c,ListFooterComponent:E,contentContainerStyle:H.listContent,showsVerticalScrollIndicator:!1,removeClippedSubviews:!0,maxToRenderPerBatch:15,windowSize:10,initialNumToRender:15})}var H=L.create({listContent:{flexGrow:1,paddingVertical:4},emptyContainer:{flex:1,alignItems:"center",justifyContent:"center",paddingVertical:60,paddingHorizontal:20},emptyText:{fontSize:16,fontWeight:"600",color:y.text,marginBottom:8},emptySubtext:{fontSize:13,color:y.textMuted,textAlign:"center"}});export{J as a,S as b,I as c,Q as d,V as e,X as f,R as g,N as h,K as i};
|