@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
|
@@ -0,0 +1,655 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
gameUIColors
|
|
4
|
+
} from "./chunk-QPY45R5F.mjs";
|
|
5
|
+
import {
|
|
6
|
+
__DEV__
|
|
7
|
+
} from "./chunk-UGGCYHRH.mjs";
|
|
8
|
+
|
|
9
|
+
// src/utils/typeHelpers.ts
|
|
10
|
+
var getValueType = (value) => {
|
|
11
|
+
if (value === null) return "null";
|
|
12
|
+
if (value === void 0) return "undefined";
|
|
13
|
+
if (Array.isArray(value)) return "array";
|
|
14
|
+
const type = typeof value;
|
|
15
|
+
if (type === "object") {
|
|
16
|
+
if (value instanceof Date) return "date";
|
|
17
|
+
if (value instanceof RegExp) return "regexp";
|
|
18
|
+
if (value instanceof Map) return "map";
|
|
19
|
+
if (value instanceof Set) return "set";
|
|
20
|
+
if (value instanceof Error) return "error";
|
|
21
|
+
return "object";
|
|
22
|
+
}
|
|
23
|
+
return type;
|
|
24
|
+
};
|
|
25
|
+
var isPrimitive = (value) => {
|
|
26
|
+
const type = typeof value;
|
|
27
|
+
return value === null || value === void 0 || type === "string" || type === "number" || type === "boolean" || type === "bigint" || type === "symbol";
|
|
28
|
+
};
|
|
29
|
+
var isJsonSerializable = (value) => {
|
|
30
|
+
try {
|
|
31
|
+
JSON.stringify(value);
|
|
32
|
+
return true;
|
|
33
|
+
} catch {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var isValidJson = (str) => {
|
|
38
|
+
try {
|
|
39
|
+
JSON.parse(str);
|
|
40
|
+
return true;
|
|
41
|
+
} catch {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
var getConstructorName = (value) => {
|
|
46
|
+
if (value === null) return "null";
|
|
47
|
+
if (value === void 0) return "undefined";
|
|
48
|
+
try {
|
|
49
|
+
return value.constructor?.name || typeof value;
|
|
50
|
+
} catch {
|
|
51
|
+
return typeof value;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
var isEmpty = (value) => {
|
|
55
|
+
if (value === null || value === void 0) return true;
|
|
56
|
+
if (typeof value === "string") return value.length === 0;
|
|
57
|
+
if (Array.isArray(value)) return value.length === 0;
|
|
58
|
+
if (typeof value === "object") return Object.keys(value).length === 0;
|
|
59
|
+
return false;
|
|
60
|
+
};
|
|
61
|
+
var getValueSize = (value) => {
|
|
62
|
+
if (Array.isArray(value)) {
|
|
63
|
+
const count = value.length;
|
|
64
|
+
if (count === 0) return "empty array";
|
|
65
|
+
if (count === 1) return "1 item";
|
|
66
|
+
return `${count} items`;
|
|
67
|
+
}
|
|
68
|
+
if (value && typeof value === "object") {
|
|
69
|
+
const keys = Object.keys(value);
|
|
70
|
+
const count = keys.length;
|
|
71
|
+
if (count === 0) return "empty object";
|
|
72
|
+
if (count === 1) return "1 key";
|
|
73
|
+
return `${count} keys`;
|
|
74
|
+
}
|
|
75
|
+
if (typeof value === "string") {
|
|
76
|
+
const length = value.length;
|
|
77
|
+
if (length === 0) return "empty string";
|
|
78
|
+
if (length === 1) return "1 character";
|
|
79
|
+
return `${length} characters`;
|
|
80
|
+
}
|
|
81
|
+
return "";
|
|
82
|
+
};
|
|
83
|
+
var isPlainObject = (value) => {
|
|
84
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) && value.constructor === Object;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
// src/utils/valueFormatting.ts
|
|
88
|
+
var parseValue = (value) => {
|
|
89
|
+
if (value === null || value === void 0) return value;
|
|
90
|
+
if (typeof value === "string") {
|
|
91
|
+
try {
|
|
92
|
+
return JSON.parse(value);
|
|
93
|
+
} catch {
|
|
94
|
+
return value;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return value;
|
|
98
|
+
};
|
|
99
|
+
var formatValue = (value) => {
|
|
100
|
+
if (value === null) return "null";
|
|
101
|
+
if (value === void 0) return "undefined";
|
|
102
|
+
if (typeof value === "string") return `"${value}"`;
|
|
103
|
+
if (typeof value === "boolean") return value ? "true" : "false";
|
|
104
|
+
if (typeof value === "number") return String(value);
|
|
105
|
+
if (typeof value === "function")
|
|
106
|
+
return `[Function: ${value.name || "anonymous"}]`;
|
|
107
|
+
if (typeof value === "object") {
|
|
108
|
+
if (Array.isArray(value)) {
|
|
109
|
+
return `[Array: ${value.length} items]`;
|
|
110
|
+
}
|
|
111
|
+
return `{Object: ${Object.keys(value).length} keys}`;
|
|
112
|
+
}
|
|
113
|
+
return String(value);
|
|
114
|
+
};
|
|
115
|
+
var getTypeColor = (value) => {
|
|
116
|
+
if (value === null) return gameUIColors.dataTypes.null;
|
|
117
|
+
if (value === void 0) return gameUIColors.dataTypes.undefined;
|
|
118
|
+
const type = typeof value;
|
|
119
|
+
switch (type) {
|
|
120
|
+
case "string":
|
|
121
|
+
return gameUIColors.dataTypes.string;
|
|
122
|
+
case "number":
|
|
123
|
+
return gameUIColors.dataTypes.number;
|
|
124
|
+
case "boolean":
|
|
125
|
+
return gameUIColors.dataTypes.boolean;
|
|
126
|
+
case "function":
|
|
127
|
+
return gameUIColors.dataTypes.function;
|
|
128
|
+
case "object":
|
|
129
|
+
return Array.isArray(value) ? gameUIColors.dataTypes.array : gameUIColors.dataTypes.object;
|
|
130
|
+
default:
|
|
131
|
+
return gameUIColors.primary;
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
var truncateText = (text, maxLength) => {
|
|
135
|
+
if (text.length <= maxLength) return text;
|
|
136
|
+
return text.slice(0, maxLength - 3) + "...";
|
|
137
|
+
};
|
|
138
|
+
var flattenObject = (obj, prefix = "") => {
|
|
139
|
+
const flattened = {};
|
|
140
|
+
if (obj === null || obj === void 0) {
|
|
141
|
+
return flattened;
|
|
142
|
+
}
|
|
143
|
+
if (typeof obj !== "object") {
|
|
144
|
+
flattened[prefix || "root"] = obj;
|
|
145
|
+
return flattened;
|
|
146
|
+
}
|
|
147
|
+
if (Array.isArray(obj)) {
|
|
148
|
+
obj.forEach((item, index) => {
|
|
149
|
+
const path = prefix ? `${prefix}[${index}]` : `[${index}]`;
|
|
150
|
+
if (typeof item === "object" && item !== null) {
|
|
151
|
+
Object.assign(flattened, flattenObject(item, path));
|
|
152
|
+
} else {
|
|
153
|
+
flattened[path] = item;
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
} else {
|
|
157
|
+
Object.keys(obj).forEach((key) => {
|
|
158
|
+
const path = prefix ? `${prefix}.${key}` : key;
|
|
159
|
+
const objValue = obj[key];
|
|
160
|
+
if (typeof objValue === "object" && objValue !== null) {
|
|
161
|
+
Object.assign(flattened, flattenObject(objValue, path));
|
|
162
|
+
} else {
|
|
163
|
+
flattened[path] = objValue;
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
return flattened;
|
|
168
|
+
};
|
|
169
|
+
var formatPath = (pathSegments) => {
|
|
170
|
+
if (pathSegments.length === 0) return "root";
|
|
171
|
+
return pathSegments.map((segment, index) => {
|
|
172
|
+
if (typeof segment === "number") {
|
|
173
|
+
return `[${segment}]`;
|
|
174
|
+
}
|
|
175
|
+
return index === 0 ? segment : `.${segment}`;
|
|
176
|
+
}).join("");
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
// src/utils/loadOptionalModule.ts
|
|
180
|
+
var defaultLogger = {
|
|
181
|
+
log: () => {
|
|
182
|
+
},
|
|
183
|
+
// Debug logging removed for production
|
|
184
|
+
warn: () => {
|
|
185
|
+
},
|
|
186
|
+
// Warnings disabled in production
|
|
187
|
+
error: (...args) => {
|
|
188
|
+
console.error("[optional-module]", ...args);
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
var resolvedModules = /* @__PURE__ */ new Map();
|
|
192
|
+
var pendingLoads = /* @__PURE__ */ new Map();
|
|
193
|
+
var warnedKeys = /* @__PURE__ */ new Set();
|
|
194
|
+
async function loadOptionalModule(moduleName, options = {}) {
|
|
195
|
+
if (resolvedModules.has(moduleName)) {
|
|
196
|
+
return resolvedModules.get(moduleName);
|
|
197
|
+
}
|
|
198
|
+
const logger = {
|
|
199
|
+
...defaultLogger,
|
|
200
|
+
...options.logger ?? {}
|
|
201
|
+
};
|
|
202
|
+
if (!pendingLoads.has(moduleName)) {
|
|
203
|
+
pendingLoads.set(
|
|
204
|
+
moduleName,
|
|
205
|
+
(async () => {
|
|
206
|
+
try {
|
|
207
|
+
const mod = await loadModuleWithFallback(moduleName, options);
|
|
208
|
+
const resolved = mod?.default ?? mod;
|
|
209
|
+
resolvedModules.set(moduleName, resolved);
|
|
210
|
+
logger.log("Loaded optional module", moduleName);
|
|
211
|
+
return resolved;
|
|
212
|
+
} catch (error) {
|
|
213
|
+
logger.log("Optional module unavailable", moduleName, error);
|
|
214
|
+
resolvedModules.set(moduleName, null);
|
|
215
|
+
return null;
|
|
216
|
+
}
|
|
217
|
+
})()
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
const loaded = await pendingLoads.get(moduleName);
|
|
221
|
+
pendingLoads.delete(moduleName);
|
|
222
|
+
if (!loaded && options.warnOnceKey && !warnedKeys.has(options.warnOnceKey)) {
|
|
223
|
+
warnedKeys.add(options.warnOnceKey);
|
|
224
|
+
logger.warn(options.warningMessage ?? `Module '${moduleName}' not found.`);
|
|
225
|
+
}
|
|
226
|
+
return loaded;
|
|
227
|
+
}
|
|
228
|
+
var dynamicImportLoader = (() => {
|
|
229
|
+
try {
|
|
230
|
+
return new Function(
|
|
231
|
+
"moduleName",
|
|
232
|
+
"return import(moduleName);"
|
|
233
|
+
);
|
|
234
|
+
} catch {
|
|
235
|
+
return null;
|
|
236
|
+
}
|
|
237
|
+
})();
|
|
238
|
+
var dynamicRequire = (() => {
|
|
239
|
+
try {
|
|
240
|
+
return new Function(
|
|
241
|
+
"return typeof require === 'function' ? require : undefined;"
|
|
242
|
+
)();
|
|
243
|
+
} catch {
|
|
244
|
+
return void 0;
|
|
245
|
+
}
|
|
246
|
+
})();
|
|
247
|
+
async function loadModuleWithFallback(moduleName, options) {
|
|
248
|
+
if (options.loader) {
|
|
249
|
+
return await Promise.resolve(options.loader());
|
|
250
|
+
}
|
|
251
|
+
if (dynamicImportLoader) {
|
|
252
|
+
return dynamicImportLoader(moduleName);
|
|
253
|
+
}
|
|
254
|
+
if (dynamicRequire) {
|
|
255
|
+
return dynamicRequire(moduleName);
|
|
256
|
+
}
|
|
257
|
+
throw new Error(
|
|
258
|
+
`No dynamic loader available for optional module '${moduleName}'.`
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
function getCachedOptionalModule(moduleName) {
|
|
262
|
+
if (!resolvedModules.has(moduleName)) {
|
|
263
|
+
return null;
|
|
264
|
+
}
|
|
265
|
+
return resolvedModules.get(moduleName);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// src/utils/renderCaptureRegistry.ts
|
|
269
|
+
var PROVIDER_KEY = "__buoyRenderCaptureProvider";
|
|
270
|
+
function providerHost() {
|
|
271
|
+
return globalThis;
|
|
272
|
+
}
|
|
273
|
+
function setRenderCaptureProvider(p) {
|
|
274
|
+
providerHost()[PROVIDER_KEY] = p;
|
|
275
|
+
}
|
|
276
|
+
function getRenderCaptureProvider() {
|
|
277
|
+
return providerHost()[PROVIDER_KEY] ?? null;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
// src/utils/stateSnapshotRegistry.ts
|
|
281
|
+
var providers = /* @__PURE__ */ new Map();
|
|
282
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
283
|
+
function notify() {
|
|
284
|
+
listeners.forEach((l) => {
|
|
285
|
+
try {
|
|
286
|
+
l();
|
|
287
|
+
} catch {
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
function registerStateSnapshotProvider(provider) {
|
|
292
|
+
providers.set(provider.id, provider);
|
|
293
|
+
notify();
|
|
294
|
+
return () => {
|
|
295
|
+
if (providers.get(provider.id) === provider) {
|
|
296
|
+
providers.delete(provider.id);
|
|
297
|
+
notify();
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
function getStateSnapshotProviders() {
|
|
302
|
+
return Array.from(providers.values());
|
|
303
|
+
}
|
|
304
|
+
function getStateSnapshotProvider(id) {
|
|
305
|
+
return providers.get(id) ?? null;
|
|
306
|
+
}
|
|
307
|
+
function subscribeToStateSnapshotProviders(listener) {
|
|
308
|
+
listeners.add(listener);
|
|
309
|
+
return () => {
|
|
310
|
+
listeners.delete(listener);
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
// src/utils/reloadPlatform.web.ts
|
|
315
|
+
function loadDevSettings() {
|
|
316
|
+
return null;
|
|
317
|
+
}
|
|
318
|
+
function loadExpoUpdates() {
|
|
319
|
+
return null;
|
|
320
|
+
}
|
|
321
|
+
function loadBrowserReload() {
|
|
322
|
+
return typeof window === "undefined" ? null : () => window.location.reload();
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// src/utils/reloadApp.ts
|
|
326
|
+
function resolveReloadStrategy(strategy = "auto") {
|
|
327
|
+
if (strategy === "browser") return loadBrowserReload() ? "browser" : null;
|
|
328
|
+
if (strategy === "auto" && loadBrowserReload()) return "browser";
|
|
329
|
+
if (strategy === "dev-settings") {
|
|
330
|
+
return loadDevSettings() ? "dev-settings" : null;
|
|
331
|
+
}
|
|
332
|
+
if (strategy === "expo-updates") {
|
|
333
|
+
return loadExpoUpdates() ? "expo-updates" : null;
|
|
334
|
+
}
|
|
335
|
+
if (__DEV__ && loadDevSettings()) return "dev-settings";
|
|
336
|
+
return loadExpoUpdates() ? "expo-updates" : null;
|
|
337
|
+
}
|
|
338
|
+
function unavailableMessage(strategy) {
|
|
339
|
+
if (strategy === "browser") return "[buoy] Browser reload requires a browser window.";
|
|
340
|
+
if (strategy === "dev-settings") {
|
|
341
|
+
return "[buoy] DevSettings.reload() unavailable \u2014 strategy 'dev-settings' requires React Native dev mode.";
|
|
342
|
+
}
|
|
343
|
+
if (strategy === "expo-updates") {
|
|
344
|
+
return "[buoy] expo-updates not installed \u2014 strategy 'expo-updates' requires the host app to add the dependency.";
|
|
345
|
+
}
|
|
346
|
+
return "[buoy] No reload mechanism available. Run in __DEV__ or install expo-updates.";
|
|
347
|
+
}
|
|
348
|
+
async function reloadApp(strategy = "auto", reason = "buoy reload") {
|
|
349
|
+
const resolved = resolveReloadStrategy(strategy);
|
|
350
|
+
if (!resolved) throw new Error(unavailableMessage(strategy));
|
|
351
|
+
if (resolved === "browser") {
|
|
352
|
+
loadBrowserReload()();
|
|
353
|
+
} else if (resolved === "dev-settings") {
|
|
354
|
+
loadDevSettings().reload(reason);
|
|
355
|
+
} else {
|
|
356
|
+
await loadExpoUpdates().reloadAsync();
|
|
357
|
+
}
|
|
358
|
+
return await new Promise(() => {
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
var REMOTE_RELOAD_DELAY_MS = 250;
|
|
362
|
+
function scheduleReloadApp(options) {
|
|
363
|
+
const strategy = options?.strategy ?? "auto";
|
|
364
|
+
const resolved = resolveReloadStrategy(strategy);
|
|
365
|
+
if (!resolved) throw new Error(unavailableMessage(strategy));
|
|
366
|
+
const delayMs = Math.max(0, options?.delayMs ?? REMOTE_RELOAD_DELAY_MS);
|
|
367
|
+
const reason = options?.reason ?? "buoy remote reload";
|
|
368
|
+
setTimeout(() => {
|
|
369
|
+
void reloadApp(resolved, reason).catch(() => {
|
|
370
|
+
});
|
|
371
|
+
}, delayMs);
|
|
372
|
+
return { strategy: resolved, delayMs };
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
// src/utils/devServer.web.ts
|
|
376
|
+
function getDevServerOrigin() {
|
|
377
|
+
return null;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// src/utils/subscribable.ts
|
|
381
|
+
var Subscribable = class {
|
|
382
|
+
constructor() {
|
|
383
|
+
this.listeners = /* @__PURE__ */ new Set();
|
|
384
|
+
this.subscribe = this.subscribe.bind(this);
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Subscribe to updates.
|
|
388
|
+
* @param listener - Callback function to receive updates
|
|
389
|
+
* @returns Unsubscribe function
|
|
390
|
+
*/
|
|
391
|
+
subscribe(listener) {
|
|
392
|
+
this.listeners.add(listener);
|
|
393
|
+
this.onSubscribe();
|
|
394
|
+
return () => {
|
|
395
|
+
this.listeners.delete(listener);
|
|
396
|
+
this.onUnsubscribe();
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Check if there are any active listeners.
|
|
401
|
+
*/
|
|
402
|
+
hasListeners() {
|
|
403
|
+
return this.listeners.size > 0;
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Get the current number of listeners.
|
|
407
|
+
*/
|
|
408
|
+
getListenerCount() {
|
|
409
|
+
return this.listeners.size;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Notify all listeners with given arguments.
|
|
413
|
+
*/
|
|
414
|
+
notify(...args) {
|
|
415
|
+
this.listeners.forEach((listener) => {
|
|
416
|
+
listener(...args);
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Called when a listener is added.
|
|
421
|
+
* Override to start resources when first subscriber joins.
|
|
422
|
+
*
|
|
423
|
+
* @example
|
|
424
|
+
* ```typescript
|
|
425
|
+
* protected onSubscribe(): void {
|
|
426
|
+
* if (this.listeners.size === 1) {
|
|
427
|
+
* this.startCapturing();
|
|
428
|
+
* }
|
|
429
|
+
* }
|
|
430
|
+
* ```
|
|
431
|
+
*/
|
|
432
|
+
onSubscribe() {
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Called when a listener is removed.
|
|
436
|
+
* Override to stop resources when last subscriber leaves.
|
|
437
|
+
*
|
|
438
|
+
* @example
|
|
439
|
+
* ```typescript
|
|
440
|
+
* protected onUnsubscribe(): void {
|
|
441
|
+
* if (this.listeners.size === 0) {
|
|
442
|
+
* this.stopCapturing();
|
|
443
|
+
* }
|
|
444
|
+
* }
|
|
445
|
+
* ```
|
|
446
|
+
*/
|
|
447
|
+
onUnsubscribe() {
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
// src/utils/subscriberCountNotifier.ts
|
|
452
|
+
var SubscriberCountNotifier = class {
|
|
453
|
+
constructor() {
|
|
454
|
+
this.listeners = /* @__PURE__ */ new Set();
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* Subscribe to subscriber count changes.
|
|
458
|
+
* Called whenever any event store's subscriber count changes.
|
|
459
|
+
*/
|
|
460
|
+
subscribe(listener) {
|
|
461
|
+
this.listeners.add(listener);
|
|
462
|
+
return () => {
|
|
463
|
+
this.listeners.delete(listener);
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Notify all listeners that a store's subscriber count changed.
|
|
468
|
+
* Called by event stores in their onSubscribe/onUnsubscribe hooks.
|
|
469
|
+
*/
|
|
470
|
+
notify(sourceId) {
|
|
471
|
+
this.listeners.forEach((listener) => {
|
|
472
|
+
try {
|
|
473
|
+
listener(sourceId);
|
|
474
|
+
} catch {
|
|
475
|
+
}
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
};
|
|
479
|
+
var subscriberCountNotifier = new SubscriberCountNotifier();
|
|
480
|
+
var subscribeToSubscriberCountChanges = (listener) => subscriberCountNotifier.subscribe(listener);
|
|
481
|
+
var notifySubscriberCountChange = (sourceId) => subscriberCountNotifier.notify(sourceId);
|
|
482
|
+
|
|
483
|
+
// src/utils/expoRouterModule.web.ts
|
|
484
|
+
function loadExpoRouter() {
|
|
485
|
+
return null;
|
|
486
|
+
}
|
|
487
|
+
function loadExpoRouterStore() {
|
|
488
|
+
return null;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
// src/utils/safeExpoRouter.ts
|
|
492
|
+
var expoRouter = null;
|
|
493
|
+
var isAvailable = false;
|
|
494
|
+
var checkedAvailability = false;
|
|
495
|
+
function checkExpoRouterAvailability() {
|
|
496
|
+
if (checkedAvailability) return isAvailable;
|
|
497
|
+
try {
|
|
498
|
+
expoRouter = loadExpoRouter();
|
|
499
|
+
isAvailable = expoRouter != null && typeof expoRouter.usePathname === "function" && typeof expoRouter.useSegments === "function";
|
|
500
|
+
} catch (error) {
|
|
501
|
+
isAvailable = false;
|
|
502
|
+
expoRouter = null;
|
|
503
|
+
}
|
|
504
|
+
checkedAvailability = true;
|
|
505
|
+
return isAvailable;
|
|
506
|
+
}
|
|
507
|
+
function noOpUseRouter() {
|
|
508
|
+
return {
|
|
509
|
+
push: () => console.warn("[buoy] expo-router not installed: push() unavailable"),
|
|
510
|
+
replace: () => console.warn("[buoy] expo-router not installed: replace() unavailable"),
|
|
511
|
+
back: () => console.warn("[buoy] expo-router not installed: back() unavailable"),
|
|
512
|
+
canGoBack: () => false,
|
|
513
|
+
setParams: () => console.warn("[buoy] expo-router not installed: setParams() unavailable"),
|
|
514
|
+
navigate: () => console.warn("[buoy] expo-router not installed: navigate() unavailable")
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
function noOpUsePathname() {
|
|
518
|
+
return "/";
|
|
519
|
+
}
|
|
520
|
+
function noOpUseSegments() {
|
|
521
|
+
return [];
|
|
522
|
+
}
|
|
523
|
+
function noOpUseGlobalSearchParams() {
|
|
524
|
+
return {};
|
|
525
|
+
}
|
|
526
|
+
function useSafeRouter() {
|
|
527
|
+
if (!checkExpoRouterAvailability()) {
|
|
528
|
+
return noOpUseRouter();
|
|
529
|
+
}
|
|
530
|
+
try {
|
|
531
|
+
return expoRouter.useRouter();
|
|
532
|
+
} catch (error) {
|
|
533
|
+
console.warn("[buoy] Failed to use expo-router.useRouter:", error);
|
|
534
|
+
return noOpUseRouter();
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
function useSafePathname() {
|
|
538
|
+
if (!checkExpoRouterAvailability()) {
|
|
539
|
+
return noOpUsePathname();
|
|
540
|
+
}
|
|
541
|
+
try {
|
|
542
|
+
return expoRouter.usePathname();
|
|
543
|
+
} catch (error) {
|
|
544
|
+
console.warn("[buoy] Failed to use expo-router.usePathname:", error);
|
|
545
|
+
return noOpUsePathname();
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
function useSafeSegments() {
|
|
549
|
+
if (!checkExpoRouterAvailability()) {
|
|
550
|
+
return noOpUseSegments();
|
|
551
|
+
}
|
|
552
|
+
try {
|
|
553
|
+
return expoRouter.useSegments();
|
|
554
|
+
} catch (error) {
|
|
555
|
+
console.warn("[buoy] Failed to use expo-router.useSegments:", error);
|
|
556
|
+
return noOpUseSegments();
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
function useSafeGlobalSearchParams() {
|
|
560
|
+
if (!checkExpoRouterAvailability()) {
|
|
561
|
+
return noOpUseGlobalSearchParams();
|
|
562
|
+
}
|
|
563
|
+
try {
|
|
564
|
+
return expoRouter.useGlobalSearchParams();
|
|
565
|
+
} catch (error) {
|
|
566
|
+
console.warn("[buoy] Failed to use expo-router.useGlobalSearchParams:", error);
|
|
567
|
+
return noOpUseGlobalSearchParams();
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
function getSafeRouter() {
|
|
571
|
+
if (!checkExpoRouterAvailability()) {
|
|
572
|
+
return null;
|
|
573
|
+
}
|
|
574
|
+
try {
|
|
575
|
+
return expoRouter.router || null;
|
|
576
|
+
} catch (error) {
|
|
577
|
+
return null;
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
var routerStore;
|
|
581
|
+
function getRouterStore() {
|
|
582
|
+
if (routerStore !== void 0) return routerStore;
|
|
583
|
+
try {
|
|
584
|
+
routerStore = loadExpoRouterStore();
|
|
585
|
+
} catch {
|
|
586
|
+
routerStore = null;
|
|
587
|
+
}
|
|
588
|
+
return routerStore;
|
|
589
|
+
}
|
|
590
|
+
function getSafeCurrentPathname() {
|
|
591
|
+
return getSafeCurrentRoute()?.pathname ?? null;
|
|
592
|
+
}
|
|
593
|
+
function getSafeCurrentRoute() {
|
|
594
|
+
if (!checkExpoRouterAvailability()) {
|
|
595
|
+
return null;
|
|
596
|
+
}
|
|
597
|
+
try {
|
|
598
|
+
const info = getRouterStore()?.getRouteInfo?.();
|
|
599
|
+
const pathname = info?.pathname;
|
|
600
|
+
if (typeof pathname !== "string" || pathname.length === 0) return null;
|
|
601
|
+
const withParams = info?.pathnameWithParams;
|
|
602
|
+
return {
|
|
603
|
+
pathname,
|
|
604
|
+
href: typeof withParams === "string" && withParams.length > 0 ? withParams : pathname,
|
|
605
|
+
...Array.isArray(info?.segments) ? { segments: info.segments } : {}
|
|
606
|
+
};
|
|
607
|
+
} catch (error) {
|
|
608
|
+
return null;
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
function isExpoRouterAvailable() {
|
|
612
|
+
return checkExpoRouterAvailability();
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
export {
|
|
616
|
+
Subscribable,
|
|
617
|
+
subscriberCountNotifier,
|
|
618
|
+
subscribeToSubscriberCountChanges,
|
|
619
|
+
notifySubscriberCountChange,
|
|
620
|
+
getValueType,
|
|
621
|
+
isPrimitive,
|
|
622
|
+
isJsonSerializable,
|
|
623
|
+
isValidJson,
|
|
624
|
+
getConstructorName,
|
|
625
|
+
isEmpty,
|
|
626
|
+
getValueSize,
|
|
627
|
+
isPlainObject,
|
|
628
|
+
parseValue,
|
|
629
|
+
formatValue,
|
|
630
|
+
getTypeColor,
|
|
631
|
+
truncateText,
|
|
632
|
+
flattenObject,
|
|
633
|
+
formatPath,
|
|
634
|
+
loadOptionalModule,
|
|
635
|
+
getCachedOptionalModule,
|
|
636
|
+
setRenderCaptureProvider,
|
|
637
|
+
getRenderCaptureProvider,
|
|
638
|
+
registerStateSnapshotProvider,
|
|
639
|
+
getStateSnapshotProviders,
|
|
640
|
+
getStateSnapshotProvider,
|
|
641
|
+
subscribeToStateSnapshotProviders,
|
|
642
|
+
resolveReloadStrategy,
|
|
643
|
+
reloadApp,
|
|
644
|
+
REMOTE_RELOAD_DELAY_MS,
|
|
645
|
+
scheduleReloadApp,
|
|
646
|
+
getDevServerOrigin,
|
|
647
|
+
useSafeRouter,
|
|
648
|
+
useSafePathname,
|
|
649
|
+
useSafeSegments,
|
|
650
|
+
useSafeGlobalSearchParams,
|
|
651
|
+
getSafeRouter,
|
|
652
|
+
getSafeCurrentPathname,
|
|
653
|
+
getSafeCurrentRoute,
|
|
654
|
+
isExpoRouterAvailable
|
|
655
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{Ob as Y,Pb as K,Q as G,Qb as z,R as $,Ub as X,Wb as P,Zb as B,ld as m}from"./chunk-IVCT27JB.mjs";import{d as r}from"./chunk-CE5U3CSQ.mjs";import{J as N,a as c,b as f,d as F,r as T,y as J}from"./chunk-3UTMGIUG.mjs";var ye="[Circular]",q="[...]";function Ge(e,t,o={}){let{depthLimit:l=Number.MAX_SAFE_INTEGER,edgesLimit:p=Number.MAX_SAFE_INTEGER}=o,u=[];function a(i,s,g,n,h,A){if(A+=1,typeof i=="object"&&i!==null){for(let C=0;C<n.length;C++)if(n[C]===i){d(ye,i,s,h);return}if(A>l){d(q,i,s,h);return}if(g+1>p){d(q,i,s,h);return}if(n.push(i),Array.isArray(i)){let C=i;for(let V=0;V<i.length;V++)a(i[V],V,V,n,C,A)}else if(i instanceof Map||i instanceof Set||i instanceof RegExp||i instanceof Date||i instanceof Error){n.pop();return}else{let C=i,V=Object.keys(C);for(let D=0;D<V.length;D++){let H=V[D];a(C[H],H,D,n,C,A)}}n.pop()}}function d(i,s,g,n){if(!n)return;let h=Object.getOwnPropertyDescriptor(n,g);if(h?.get!==void 0)if(h.configurable)Object.defineProperty(n,g,{value:i}),u.push([n,g,s,h]);else return;else n[g]=i,u.push([n,g,s])}let x=(i,s)=>{if(typeof s=="bigint")return`${s.toString()}n`;if(typeof s=="symbol")return s.toString();if(typeof s>"u")return"undefined";if(typeof s=="function")return`[Function: ${s.name||"anonymous"}]`;if(typeof s=="number"){if(s===1/0)return"Infinity";if(s===-1/0)return"-Infinity";if(Number.isNaN(s))return"NaN"}if(s instanceof Error){let g={name:s.name,message:s.message,stack:s.stack};return Object.getOwnPropertyNames(s).forEach(n=>{if(!["name","message","stack"].includes(n))try{let h=s[n];h!==void 0&&(g[n]=h)}catch{}}),g}if(s instanceof Date)return s.toISOString();if(s instanceof RegExp)return s.toString();if(s instanceof Map)try{return{__type:"Map",entries:Array.from(s.entries()).map(([n,h])=>[String(n),h])}}catch{return{__type:"Map",entries:"[Map iteration failed]"}}if(s instanceof Set)try{return{__type:"Set",values:Array.from(s)}}catch{return{__type:"Set",values:"[Set iteration failed]"}}return s};try{return a(e,"",0,[],null,0),JSON.stringify(e,x,t)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;u.length!==0;){let i=u.pop();if(i&&i.length===4){let[s,g,,n]=i;s&&typeof s=="object"&&n&&Object.defineProperty(s,g,n)}else if(i){let[s,g,n]=i;s&&typeof s=="object"&&(typeof g=="string"||typeof g=="number")&&(s[g]=n)}}}}var pe=e=>typeof e>"u",me=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,_=e=>Array.isArray(e),de=e=>typeof e=="boolean"||e===null||typeof e>"u"||typeof e=="number"||typeof e=="string"||typeof e=="symbol",ge=e=>e instanceof Date&&!isNaN(e.valueOf()),te=e=>e instanceof Error,be=e=>e instanceof RegExp,ne=e=>e instanceof Set,re=e=>e instanceof Map,Se=e=>typeof e=="bigint",Z=e=>typeof e=="number"&&isNaN(e),he=e=>e===1/0||e===-1/0,we=e=>e===0&&1/e===-1/0,Te=e=>e instanceof URL,Ie=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),xe={Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray},oe=[{isApplicable:pe,annotation:"undefined",transform:()=>null,untransform:()=>{}},{isApplicable:Se,annotation:"bigint",transform:e=>e.toString(),untransform:e=>typeof BigInt<"u"?BigInt(e):(console.error("BigInt is not supported in this environment"),e)},{isApplicable:ge,annotation:"Date",transform:e=>e.toISOString(),untransform:e=>new Date(e)},{isApplicable:te,annotation:"Error",transform:e=>({name:e.name,message:e.message,stack:e.stack,cause:"cause"in e?e.cause:void 0}),untransform:e=>{let t=new Error(e.message);return t.name=e.name,t.stack=e.stack,e.cause!==void 0&&(t.cause=e.cause),t}},{isApplicable:be,annotation:"regexp",transform:e=>""+e,untransform:e=>{let t=e.slice(1,e.lastIndexOf("/")),o=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,o)}},{isApplicable:ne,annotation:"set",transform:e=>[...e.values()],untransform:e=>new Set(e)},{isApplicable:re,annotation:"map",transform:e=>[...e.entries()],untransform:e=>new Map(e)},{isApplicable:e=>Z(e)||he(e),annotation:"number",transform:e=>Z(e)?"NaN":e>0?"Infinity":"-Infinity",untransform:e=>Number(e)},{isApplicable:we,annotation:"number",transform:()=>"-0",untransform:()=>-0},{isApplicable:Te,annotation:"URL",transform:e=>e.toString(),untransform:e=>new URL(e)},{isApplicable:Ie,annotation:e=>["typed-array",e.constructor.name],transform:e=>[...e],untransform:(e,t)=>{let o=Array.isArray(t)?t[1]:"Uint8Array",l=xe[o];if(!l)throw new Error(`Unknown typed array: ${o}`);return new l(e)}}];function M(e){for(let t of oe)if(t.isApplicable(e)){let o=typeof t.annotation=="function"?t.annotation(e):t.annotation;return{value:t.transform(e),type:o}}}function Q(e,t){for(let o of oe){let l=typeof o.annotation=="function"?Array.isArray(t)?t[0]:t:o.annotation;if(Array.isArray(t)&&Array.isArray(l)?t[0]===l[0]:l===t)return o.untransform(e,t)}throw new Error(`Unknown transformation: ${t}`)}var ee=e=>me(e)||_(e)||re(e)||ne(e)||te(e);function j(e){return e.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function ie(e,t=[],o=[]){let l=de(e);if(!l&&!ee(e)){let i=M(e);return i?{transformedValue:i.value,annotations:{[t.map(String).map(j).join(".")]:i.type}}:{transformedValue:e}}if(!l&&o.indexOf(e)!==-1)return{transformedValue:null};if(!ee(e)){let i=M(e);return i?{transformedValue:i.value,annotations:t.length>0?{[t.map(String).map(j).join(".")]:i.type}:{"":i.type}}:{transformedValue:e}}let p=M(e),u=p?.value??e,a=_(u)?[]:{},d={};if(p){let i=t.length>0?t.map(String).map(j).join("."):"";d[i]=p.type}let x=_(u)?u.map((i,s)=>[s,i]):Object.entries(u);for(let[i,s]of x){let g=String(i);if(g==="__proto__"||g==="constructor"||g==="prototype")throw new Error(`Detected property ${g}. This is a prototype pollution risk, please remove it from your object.`);let n=ie(s,[...t,i],[...o,e]);a[i]=n.transformedValue,n.annotations&&Object.assign(d,n.annotations)}return{transformedValue:a,annotations:Object.keys(d).length>0?d:void 0}}function Ae(e){if(e==="")return[];let t=[],o="";for(let l=0;l<e.length;l++){let p=e.charAt(l);if(p==="\\"){let u=e.charAt(l+1);if(u==="\\"){o+="\\",l++;continue}else if(u==="."){o+=".",l++;continue}}if(p==="."){t.push(o),o="";continue}o+=p}return o&&t.push(o),t}function Ce(e,t,o){if(t.length===0)return;let l=e;for(let p=0;p<t.length-1;p++)l=l[t[p]];l[t[t.length-1]]=o}function Ve(e,t){let o=e;for(let l of t)o=o[l];return o}function ae(e){let t=ie(e),o={json:t.transformedValue};return t.annotations&&(o.meta={values:t.annotations}),o}function se(e){let{json:t,meta:o}=e;if(!o?.values)return t;let l=_(t)?[...t]:{...t},p=Object.entries(o.values).map(([u,a])=>({pathString:u,type:a,path:Ae(u)})).sort((u,a)=>a.path.length-u.path.length);for(let{type:u,path:a}of p)if(a.length===0)l=Q(l,u);else{let d=Ve(l,a),x=Q(d,u);Ce(l,a,x)}return l}var Je=(e,t=!1)=>{let{json:o}=ae(e);return JSON.stringify(o,null,t?2:void 0)},Me=e=>{try{let t=JSON.parse(e);return se({json:t,meta:void 0})}catch{return JSON.parse(e)}};import{jsx as k,jsxs as W}from"react/jsx-runtime";function Re({icon:e,iconColor:t,title:o,count:l,subtitle:p,expanded:u,onToggle:a,children:d,style:x,titleStyle:i}){return W(c,{style:[L.container,x],children:[W(F,{onPress:a,activeOpacity:.7,style:L.headerTouchable,children:[W(c,{style:L.header,children:[W(c,{style:L.headerLeft,children:[k(e,{size:14,color:t}),k(f,{style:[L.title,i],children:o}),k(c,{style:[L.badge,{backgroundColor:t+"20"}],children:k(f,{style:[L.badgeText,{color:t}],children:l})})]}),u?k(B,{size:14,color:r.muted}):k(P,{size:14,color:r.muted})]}),k(f,{style:L.subtitle,children:p})]}),u&&k(T.View,{style:{opacity:1},children:d})]})}var L=N.create({container:{marginBottom:20},headerTouchable:{marginBottom:12},header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:4,paddingHorizontal:4},headerLeft:{flexDirection:"row",alignItems:"center",gap:8,flex:1},title:{fontSize:11,color:r.primary,fontFamily:m,fontWeight:"700",letterSpacing:2,opacity:.9},subtitle:{fontSize:9,color:r.secondary,fontFamily:m,paddingHorizontal:4,marginTop:2,opacity:.7},badge:{paddingHorizontal:8,paddingVertical:2,borderRadius:10},badgeText:{fontSize:10,fontFamily:m,fontWeight:"700"}});var le={position:"absolute",top:0,left:0,right:0,bottom:0};import{jsx as E,jsxs as v}from"react/jsx-runtime";function Oe({alertConfig:e,badgeText:t,animatedStyle:o,style:l,indicatorCount:p=3}){let u=e.icon;return v(T.View,{style:[R.container,{borderColor:e.color+"40"},l,o],children:[E(c,{style:[R.glow,{backgroundColor:e.color+"10"}]}),v(c,{style:R.content,children:[E(c,{style:[R.iconWrapper,{backgroundColor:e.color+"15"}],children:E(u,{size:20,color:e.color})}),v(c,{style:R.textContainer,children:[E(f,{style:[R.label,{color:e.color}],children:e.label}),E(f,{style:R.subtitle,children:e.subtitle})]}),E(c,{style:[R.badge,{backgroundColor:e.color+"20"}],children:E(f,{style:[R.badgeText,{color:e.color}],children:t})})]}),E(c,{style:R.indicators,children:[...Array(p)].map((a,d)=>E(c,{style:[R.indicatorDot,{backgroundColor:e.color,opacity:e.pulse?d===0?1:.5-d*.2:.3-d*.1}]},d))})]})}var R=N.create({container:{backgroundColor:r.panel,borderRadius:12,borderWidth:1,padding:16,marginBottom:16,position:"relative",overflow:"hidden"},glow:{...le,opacity:.5},content:{flexDirection:"row",alignItems:"center",gap:12},iconWrapper:{width:36,height:36,borderRadius:8,justifyContent:"center",alignItems:"center"},textContainer:{flex:1,gap:2},label:{fontSize:13,fontWeight:"700",fontFamily:m,letterSpacing:1.5,textShadowOffset:{width:0,height:0},textShadowRadius:8},subtitle:{fontSize:10,color:r.secondary,fontFamily:m},badge:{paddingHorizontal:8,paddingVertical:4,borderRadius:4},badgeText:{fontSize:9,fontWeight:"700",fontFamily:m,letterSpacing:1},indicators:{position:"absolute",top:8,right:8,flexDirection:"row",gap:3},indicatorDot:{width:4,height:4,borderRadius:2}});import{Fragment as Ue}from"react";import{jsx as S,jsxs as I}from"react/jsx-runtime";function Ee({statsConfig:e,totalCount:t,header:o,bottomStats:l,style:p,hideInactive:u=!0}){return I(c,{style:[y.container,p],children:[o&&I(c,{style:y.header,children:[I(c,{style:y.headerLeft,children:[S(f,{style:y.headerTitle,children:o.title}),S(f,{style:y.headerSubtitle,children:o.subtitle})]}),o.healthPercentage!==void 0&&S(c,{style:y.headerRight,children:I(c,{style:y.statusIndicator,children:[S(c,{style:[y.statusDot,{backgroundColor:o.healthColor||r.success}]}),S(f,{style:[y.statusText,{color:o.healthColor||r.success}],children:o.healthStatus||"OPTIMAL"})]})})]}),o?.healthPercentage!==void 0&&I(c,{style:y.healthSection,children:[S(f,{style:y.healthLabel,children:"SYSTEM HEALTH"}),S(c,{style:y.healthBarWrapper,children:S(c,{style:y.healthBarBg,children:S(T.View,{style:[y.healthBarFill,{width:`${o.healthPercentage}%`,backgroundColor:o.healthColor||r.success}]})})}),I(f,{style:[y.healthPercentage,{color:o.healthColor||r.success}],children:[o.healthPercentage,"%"]})]}),S(c,{style:y.statsGrid,children:e.map(a=>{let d=a.value>0;if(u&&!d)return null;let x=a.icon,i=t?a.value/t*100:0;return I(T.View,{style:[y.statCard,{borderColor:a.color+"30"}],children:[I(c,{style:y.cardContent,children:[S(c,{style:[y.iconBadge,{backgroundColor:a.color+"1A",borderColor:a.color+"33"}],children:S(x,{size:12,color:a.color})}),I(c,{style:y.cardInfo,children:[S(f,{style:y.cardLabel,children:a.label}),S(f,{style:y.cardSubtitle,children:a.subtitle})]}),I(c,{style:y.valueBlock,children:[S(f,{style:[y.statNumber,{color:a.color}],children:a.value.toString().padStart(2,"0")}),t?I(f,{style:y.percentText,children:[Math.round(i),"%"]}):null]})]}),a.showBar!==!1&&t&&S(c,{style:[y.statBar,{backgroundColor:a.color+"10"}],children:S(c,{style:[y.statBarFill,{width:`${i}%`,backgroundColor:a.color}]})})]},a.key)})}),l&&l.length>0&&S(c,{style:y.bottomBar,children:l.map((a,d)=>I(Ue,{children:[I(c,{style:y.bottomStat,children:[S(f,{style:y.bottomStatLabel,children:a.label}),S(f,{style:[y.bottomStatValue,a.color&&{color:a.color}],children:a.value})]}),d<l.length-1&&S(c,{style:y.bottomDivider})]},a.label))})]})}var y=N.create({container:{backgroundColor:r.panel,borderRadius:12,padding:12,marginBottom:12,borderWidth:1,borderColor:r.border+"40",overflow:"hidden",position:"relative"},header:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8,paddingBottom:8,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.1)"},headerLeft:{gap:1},headerRight:{alignItems:"flex-end"},headerTitle:{fontSize:11,fontWeight:"700",color:r.primary,fontFamily:m,letterSpacing:1.5},headerSubtitle:{fontSize:8,color:r.secondary,fontFamily:m,opacity:.7},statusIndicator:{flexDirection:"row",alignItems:"center",gap:4},statusDot:{width:5,height:5,borderRadius:2.5},statusText:{fontSize:9,fontWeight:"600",fontFamily:m,letterSpacing:.5},healthSection:{flexDirection:"row",alignItems:"center",marginBottom:10,gap:8},healthLabel:{fontSize:8,color:r.secondary,fontFamily:m,letterSpacing:.5},healthBarWrapper:{flex:1},healthBarBg:{height:4,backgroundColor:"rgba(128, 128, 128, 0.1)",borderRadius:2,overflow:"hidden"},healthBarFill:{height:"100%",borderRadius:2},healthPercentage:{fontSize:11,fontWeight:"700",fontFamily:m},statsGrid:{gap:6,marginBottom:8},statCard:{backgroundColor:r.blackTint2,borderRadius:8,borderWidth:1,borderColor:r.border,padding:10,marginBottom:4},cardContent:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:4},cardInfo:{flex:1},cardLabel:{fontSize:11,fontWeight:"700",fontFamily:m,letterSpacing:.5,color:r.primary},cardSubtitle:{fontSize:8,color:r.secondary,fontFamily:m,opacity:.7},statNumber:{fontSize:16,fontWeight:"700",fontFamily:m,minWidth:28},valueBlock:{alignItems:"flex-end"},percentText:{fontSize:9,color:r.secondary,fontFamily:m},statBar:{height:3,borderRadius:1.5,overflow:"hidden"},statBarFill:{height:"100%",borderRadius:1.5},bottomBar:{flexDirection:"row",alignItems:"center",paddingTop:8,borderTopWidth:1,borderTopColor:r.border+"40"},bottomStat:{flex:1,alignItems:"center"},bottomStatLabel:{fontSize:7,color:r.muted,fontFamily:m,letterSpacing:.5,marginBottom:1},bottomStatValue:{fontSize:11,fontWeight:"700",color:r.primary,fontFamily:m},bottomDivider:{width:1,height:16,backgroundColor:r.border+"40"},iconBadge:{width:24,height:24,borderRadius:6,borderWidth:1,alignItems:"center",justifyContent:"center"}});import{useState as Ne,useCallback as Le}from"react";import{jsx as w,jsxs as O}from"react/jsx-runtime";function ke({issues:e,onIssueClick:t,hintText:o="Tap any issue to view details",style:l,expandable:p=!0,statusLabels:u={missing:"Not found",wrong_type:"Type error",wrong_value:"Invalid value"}}){let[a,d]=Ne(new Set),x=Le(n=>{p&&d(h=>{let A=new Set(h);return A.has(n)?A.delete(n):A.add(n),A})},[p]),i=n=>n==="missing"?r.warning:r.info,s=n=>n==="missing"?G:z,g=n=>{switch(n.status){case"missing":return`\u2022 ${u.missing}`;case"wrong_type":return`\u2022 ${u.wrong_type}${n.expectedType?`: Expected ${n.expectedType}`:""}`;case"wrong_value":return`\u2022 ${u.wrong_value}${n.value?`: ${String(n.value).substring(0,20)}`:""}`;default:return""}};return e.length===0?null:O(c,{style:[b.container,l],children:[e.map((n,h)=>{let A=i(n.status),C=s(n.status),V=a.has(n.key),D=V?B:P;return O(c,{children:[O(F,{onPress:()=>{p&&x(n.key),t?.(n)},style:b.issueRow,activeOpacity:.7,children:[w(C,{size:14,color:A}),O(c,{style:b.issueContent,children:[w(f,{style:[b.issueKey,{color:r.primary}],children:n.key}),w(f,{style:b.issueDesc,children:g(n)})]}),p&&w(D,{size:12,color:r.muted})]}),p&&V&&O(T.View,{style:b.issueDetails,children:[O(c,{style:b.detailRow,children:[w(f,{style:b.detailLabel,children:"Status:"}),O(f,{style:[b.detailValue,{color:r.primary,fontWeight:"600"}],children:[n.status==="missing"&&"MISSING",n.status==="wrong_type"&&"TYPE ERROR",n.status==="wrong_value"&&"INVALID VALUE"]})]}),n.value!==void 0&&n.status!=="missing"&&O(c,{style:b.detailRow,children:[w(f,{style:b.detailLabel,children:"Current:"}),w(f,{style:[b.detailValue,{color:r.warning}],children:`"${String(n.value)}"`})]}),n.expectedType&&n.status==="wrong_type"&&O(c,{style:b.detailRow,children:[w(f,{style:b.detailLabel,children:"Expected:"}),w(f,{style:[b.detailValue,{color:r.success}],children:n.expectedType})]}),n.expectedValue&&n.status==="wrong_value"&&O(c,{style:b.detailRow,children:[w(f,{style:b.detailLabel,children:"Expected:"}),w(f,{style:[b.detailValue,{color:r.success}],children:`"${n.expectedValue}"`})]}),n.description&&w(c,{style:b.descSection,children:w(f,{style:b.descText,children:n.description})}),n.fixSuggestion&&O(c,{style:b.fixSection,children:[w(f,{style:b.fixLabel,children:"HOW TO FIX"}),w(f,{style:b.fixText,children:n.fixSuggestion})]})]})]},`${n.key}-${h}`)}),o&&w(f,{style:b.hint,children:o})]})}var b=N.create({container:{backgroundColor:r.panel,borderRadius:8,padding:8,borderWidth:1,borderColor:r.warning+"33"},issueRow:{flexDirection:"row",alignItems:"center",paddingVertical:8,paddingHorizontal:8,borderRadius:6,marginBottom:4},issueContent:{flex:1,marginLeft:8,flexDirection:"row",alignItems:"center",gap:8},issueKey:{fontSize:11,fontWeight:"600",fontFamily:m},issueDesc:{fontSize:10,color:r.secondary,fontFamily:m,flex:1},hint:{fontSize:9,color:r.muted,fontFamily:m,textAlign:"center",marginTop:8,paddingTop:8,borderTopWidth:1,borderTopColor:r.primary+"0D"},issueDetails:{marginTop:8,marginLeft:22,marginRight:8,paddingLeft:12,paddingRight:8,paddingTop:8,paddingBottom:8,backgroundColor:r.background+"4D",borderLeftWidth:2,borderLeftColor:r.primary+"1A",borderRadius:4},detailRow:{flexDirection:"row",marginTop:8,alignItems:"flex-start"},detailLabel:{fontSize:10,color:r.secondary,fontFamily:m,fontWeight:"600",width:70},detailValue:{fontSize:11,color:r.primary,fontFamily:m,flex:1,lineHeight:16},fixSection:{marginTop:12,padding:10,backgroundColor:r.info+"14",borderRadius:6,borderWidth:1,borderColor:r.info+"33"},fixLabel:{fontSize:10,color:r.info,fontFamily:m,fontWeight:"700",marginBottom:6,letterSpacing:.5},fixText:{fontSize:11,color:r.primary,fontFamily:m,lineHeight:18,backgroundColor:r.background+"66",padding:8,borderRadius:4,overflow:"hidden"},descSection:{marginTop:10,paddingTop:10,borderTopWidth:1,borderTopColor:r.primary+"0D"},descText:{fontSize:10,color:r.secondary,fontFamily:m,marginTop:4,lineHeight:14}});import{useMemo as ce,useEffect as De,useRef as ue}from"react";var fe={OPTIMAL:{icon:X,color:r.success,label:"CONFIG OK",subtitle:"All requirements met",pulse:!1},WARNING:{icon:z,color:r.warning,label:"CONFIG WARNING",subtitle:"Check values and types",pulse:!1},ERROR:{icon:K,color:r.error,label:"CONFIG ERROR",subtitle:"Missing required data",pulse:!1},CRITICAL:{icon:G,color:r.critical,label:"CONFIG FAILURE",subtitle:"Multiple critical issues",pulse:!1},LOADING:{icon:Y,color:r.info,label:"LOADING",subtitle:"Reading configuration...",pulse:!0},EMPTY:{icon:$,color:r.muted,label:"NO DATA",subtitle:"No configuration found",pulse:!1}};function Fe(e,t){let o=ce(()=>({...fe,...t}),[t]),l=ce(()=>e.totalCount===0?"EMPTY":e.missingCount>2||e.wrongTypeCount>2?"CRITICAL":e.missingCount>0?"ERROR":e.wrongValueCount>0||e.wrongTypeCount>0?"WARNING":"OPTIMAL",[e]),p=o[l],u=ue(new T.Value(1)).current,a=ue(new T.Value(1)).current;return De(()=>{u.setValue(0),a.setValue(.95),T.parallel([T.timing(u,{toValue:1,duration:300,useNativeDriver:!0}),T.timing(a,{toValue:1,duration:300,easing:J.out(J.ease),useNativeDriver:!0})]).start()},[l,u,a]),{alertState:l,alertConfig:p,alertAnimatedStyle:{transform:[{scale:a}],opacity:u},alertOpacity:u,alertScale:a}}export{Ge as a,ae as b,se as c,Je as d,Me as e,Re as f,le as g,Oe as h,Ee as i,ke as j,fe as k,Fe as l};
|