react-native-xenon 1.1.0 → 2.0.0
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/LICENSE +1 -1
- package/lib/module/assets/icons/close.png +0 -0
- package/lib/module/assets/icons/search.png +0 -0
- package/lib/module/contexts/MainContext.js +3 -7
- package/lib/module/contexts/MainContext.js.map +1 -1
- package/lib/module/contexts/index.js +1 -11
- package/lib/module/contexts/index.js.map +1 -1
- package/lib/module/core/constants.js +1 -5
- package/lib/module/core/constants.js.map +1 -1
- package/lib/module/core/refs.js +10 -12
- package/lib/module/core/refs.js.map +1 -1
- package/lib/module/core/utils.js +31 -55
- package/lib/module/core/utils.js.map +1 -1
- package/lib/module/hooks/index.js +2 -18
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/hooks/useConsoleInterceptor.js +10 -14
- package/lib/module/hooks/useConsoleInterceptor.js.map +1 -1
- package/lib/module/hooks/useNetworkInterceptor.js +23 -27
- package/lib/module/hooks/useNetworkInterceptor.js.map +1 -1
- package/lib/module/index.js +1 -11
- package/lib/module/index.js.map +1 -1
- package/lib/module/interceptors/ConsoleInterceptor.js +7 -10
- package/lib/module/interceptors/ConsoleInterceptor.js.map +1 -1
- package/lib/module/interceptors/FetchInterceptor.js +11 -15
- package/lib/module/interceptors/FetchInterceptor.js.map +1 -1
- package/lib/module/interceptors/HttpInterceptor.js +2 -7
- package/lib/module/interceptors/HttpInterceptor.js.map +1 -1
- package/lib/module/interceptors/Interceptor.js +4 -7
- package/lib/module/interceptors/Interceptor.js.map +1 -1
- package/lib/module/interceptors/NetworkInterceptor.js +2 -8
- package/lib/module/interceptors/NetworkInterceptor.js.map +1 -1
- package/lib/module/interceptors/WebSocketInterceptor.js +20 -24
- package/lib/module/interceptors/WebSocketInterceptor.js.map +1 -1
- package/lib/module/interceptors/XHRInterceptor.js +8 -12
- package/lib/module/interceptors/XHRInterceptor.js.map +1 -1
- package/lib/module/interceptors/index.js +4 -32
- package/lib/module/interceptors/index.js.map +1 -1
- package/lib/module/theme/colors.js +1 -5
- package/lib/module/theme/colors.js.map +1 -1
- package/lib/module/theme/icons.js +4 -6
- package/lib/module/theme/icons.js.map +1 -1
- package/lib/module/types/common.js +2 -6
- package/lib/module/types/common.js.map +1 -1
- package/lib/module/types/http.js +1 -3
- package/lib/module/types/index.js +4 -47
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/types/websocket.js +1 -3
- package/lib/module/ui/Xenon.js +54 -58
- package/lib/module/ui/Xenon.js.map +1 -1
- package/lib/module/ui/components/bubble/Bubble.js +28 -35
- package/lib/module/ui/components/bubble/Bubble.js.map +1 -1
- package/lib/module/ui/components/common/Divider.js +7 -12
- package/lib/module/ui/components/common/Divider.js.map +1 -1
- package/lib/module/ui/components/common/Icon.js +6 -11
- package/lib/module/ui/components/common/Icon.js.map +1 -1
- package/lib/module/ui/components/common/IndexedStack.js +8 -12
- package/lib/module/ui/components/common/IndexedStack.js.map +1 -1
- package/lib/module/ui/components/common/SafeArea.js +15 -0
- package/lib/module/ui/components/common/SafeArea.js.map +1 -0
- package/lib/module/ui/components/common/ShareableText.js +6 -10
- package/lib/module/ui/components/common/ShareableText.js.map +1 -1
- package/lib/module/ui/components/common/Touchable.js +6 -12
- package/lib/module/ui/components/common/Touchable.js.map +1 -1
- package/lib/module/ui/components/details/LogMessageDetails.js +19 -21
- package/lib/module/ui/components/details/LogMessageDetails.js.map +1 -1
- package/lib/module/ui/components/details/NetworkRequestDetails.js +42 -47
- package/lib/module/ui/components/details/NetworkRequestDetails.js.map +1 -1
- package/lib/module/ui/components/headers/ConsoleHeader.js +10 -15
- package/lib/module/ui/components/headers/ConsoleHeader.js.map +1 -1
- package/lib/module/ui/components/headers/DebuggerHeader.js +36 -36
- package/lib/module/ui/components/headers/DebuggerHeader.js.map +1 -1
- package/lib/module/ui/components/headers/Header.js +15 -22
- package/lib/module/ui/components/headers/Header.js.map +1 -1
- package/lib/module/ui/components/headers/HeaderComponents.js +32 -39
- package/lib/module/ui/components/headers/HeaderComponents.js.map +1 -1
- package/lib/module/ui/components/headers/NetworkHeader.js +31 -36
- package/lib/module/ui/components/headers/NetworkHeader.js.map +1 -1
- package/lib/module/ui/components/index.js +5 -32
- package/lib/module/ui/components/index.js.map +1 -1
- package/lib/module/ui/components/items/ConsolePanelItem.js +12 -17
- package/lib/module/ui/components/items/ConsolePanelItem.js.map +1 -1
- package/lib/module/ui/components/items/DebuggerHeaderItem.js +14 -19
- package/lib/module/ui/components/items/DebuggerHeaderItem.js.map +1 -1
- package/lib/module/ui/components/items/NetworkPanelItem.js +33 -38
- package/lib/module/ui/components/items/NetworkPanelItem.js.map +1 -1
- package/lib/module/ui/components/items/NetworkRequestDetailsItem.js +18 -23
- package/lib/module/ui/components/items/NetworkRequestDetailsItem.js.map +1 -1
- package/lib/module/ui/components/panels/ConsolePanel.js +30 -26
- package/lib/module/ui/components/panels/ConsolePanel.js.map +1 -1
- package/lib/module/ui/components/panels/NetworkPanel.js +30 -28
- package/lib/module/ui/components/panels/NetworkPanel.js.map +1 -1
- package/lib/module/ui/components/panels/Panel.js +12 -19
- package/lib/module/ui/components/panels/Panel.js.map +1 -1
- package/lib/module/ui/components/search-bar/SearchBar.js +132 -0
- package/lib/module/ui/components/search-bar/SearchBar.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/contexts/MainContext.d.ts.map +1 -0
- package/lib/typescript/src/contexts/index.d.ts.map +1 -0
- package/lib/typescript/src/core/constants.d.ts.map +1 -0
- package/lib/typescript/{commonjs/src → src}/core/refs.d.ts +7 -4
- package/lib/typescript/src/core/refs.d.ts.map +1 -0
- package/lib/typescript/{module/src → src}/core/utils.d.ts +1 -1
- package/lib/typescript/src/core/utils.d.ts.map +1 -0
- package/lib/typescript/src/hooks/index.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useConsoleInterceptor.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useNetworkInterceptor.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/interceptors/ConsoleInterceptor.d.ts.map +1 -0
- package/lib/typescript/src/interceptors/FetchInterceptor.d.ts.map +1 -0
- package/lib/typescript/src/interceptors/HttpInterceptor.d.ts.map +1 -0
- package/lib/typescript/src/interceptors/Interceptor.d.ts.map +1 -0
- package/lib/typescript/src/interceptors/NetworkInterceptor.d.ts.map +1 -0
- package/lib/typescript/src/interceptors/WebSocketInterceptor.d.ts.map +1 -0
- package/lib/typescript/src/interceptors/XHRInterceptor.d.ts.map +1 -0
- package/lib/typescript/src/interceptors/index.d.ts.map +1 -0
- package/lib/typescript/src/theme/colors.d.ts.map +1 -0
- package/lib/typescript/{commonjs/src → src}/theme/icons.d.ts +2 -0
- package/lib/typescript/src/theme/icons.d.ts.map +1 -0
- package/lib/typescript/{commonjs/src → src}/types/common.d.ts +1 -0
- package/lib/typescript/src/types/common.d.ts.map +1 -0
- package/lib/typescript/src/types/console.d.ts.map +1 -0
- package/lib/typescript/src/types/http.d.ts.map +1 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -0
- package/lib/typescript/src/types/websocket.d.ts.map +1 -0
- package/lib/typescript/src/ui/Xenon.d.ts.map +1 -0
- package/lib/typescript/src/ui/components/bubble/Bubble.d.ts.map +1 -0
- package/lib/typescript/src/ui/components/common/Divider.d.ts.map +1 -0
- package/lib/typescript/src/ui/components/common/Icon.d.ts.map +1 -0
- package/lib/typescript/src/ui/components/common/IndexedStack.d.ts.map +1 -0
- package/lib/typescript/src/ui/components/common/SafeArea.d.ts +5 -0
- package/lib/typescript/src/ui/components/common/SafeArea.d.ts.map +1 -0
- package/lib/typescript/src/ui/components/common/ShareableText.d.ts.map +1 -0
- package/lib/typescript/src/ui/components/common/Touchable.d.ts +6 -0
- package/lib/typescript/src/ui/components/common/Touchable.d.ts.map +1 -0
- package/lib/typescript/src/ui/components/details/LogMessageDetails.d.ts.map +1 -0
- package/lib/typescript/src/ui/components/details/NetworkRequestDetails.d.ts.map +1 -0
- package/lib/typescript/src/ui/components/headers/ConsoleHeader.d.ts.map +1 -0
- package/lib/typescript/src/ui/components/headers/DebuggerHeader.d.ts.map +1 -0
- package/lib/typescript/src/ui/components/headers/Header.d.ts.map +1 -0
- package/lib/typescript/{commonjs/src → src}/ui/components/headers/HeaderComponents.d.ts +1 -1
- package/lib/typescript/src/ui/components/headers/HeaderComponents.d.ts.map +1 -0
- package/lib/typescript/src/ui/components/headers/NetworkHeader.d.ts.map +1 -0
- package/lib/typescript/{commonjs/src → src}/ui/components/index.d.ts +2 -1
- package/lib/typescript/src/ui/components/index.d.ts.map +1 -0
- package/lib/typescript/src/ui/components/items/ConsolePanelItem.d.ts.map +1 -0
- package/lib/typescript/src/ui/components/items/DebuggerHeaderItem.d.ts.map +1 -0
- package/lib/typescript/src/ui/components/items/NetworkPanelItem.d.ts.map +1 -0
- package/lib/typescript/src/ui/components/items/NetworkRequestDetailsItem.d.ts.map +1 -0
- package/lib/typescript/src/ui/components/panels/ConsolePanel.d.ts.map +1 -0
- package/lib/typescript/src/ui/components/panels/NetworkPanel.d.ts.map +1 -0
- package/lib/typescript/src/ui/components/panels/Panel.d.ts.map +1 -0
- package/lib/typescript/src/ui/components/search-bar/SearchBar.d.ts +6 -0
- package/lib/typescript/src/ui/components/search-bar/SearchBar.d.ts.map +1 -0
- package/package.json +42 -86
- package/src/assets/icons/close.png +0 -0
- package/src/assets/icons/search.png +0 -0
- package/src/core/refs.ts +3 -0
- package/src/theme/icons.ts +2 -0
- package/src/types/common.ts +1 -0
- package/src/ui/Xenon.tsx +11 -7
- package/src/ui/components/common/SafeArea.tsx +10 -0
- package/src/ui/components/common/Touchable.tsx +4 -14
- package/src/ui/components/details/LogMessageDetails.tsx +3 -0
- package/src/ui/components/headers/ConsoleHeader.tsx +1 -1
- package/src/ui/components/headers/DebuggerHeader.tsx +8 -1
- package/src/ui/components/headers/HeaderComponents.tsx +2 -2
- package/src/ui/components/headers/NetworkHeader.tsx +5 -5
- package/src/ui/components/index.ts +2 -1
- package/src/ui/components/panels/ConsolePanel.tsx +18 -2
- package/src/ui/components/panels/NetworkPanel.tsx +15 -1
- package/src/ui/components/search-bar/SearchBar.tsx +129 -0
- package/lib/commonjs/assets/icons/arrow-left.png +0 -0
- package/lib/commonjs/assets/icons/beautify.png +0 -0
- package/lib/commonjs/assets/icons/bug.png +0 -0
- package/lib/commonjs/assets/icons/delete.png +0 -0
- package/lib/commonjs/assets/icons/hide.png +0 -0
- package/lib/commonjs/assets/icons/move.png +0 -0
- package/lib/commonjs/assets/icons/record.png +0 -0
- package/lib/commonjs/assets/icons/share.png +0 -0
- package/lib/commonjs/contexts/MainContext.js +0 -10
- package/lib/commonjs/contexts/MainContext.js.map +0 -1
- package/lib/commonjs/contexts/index.js +0 -14
- package/lib/commonjs/contexts/index.js.map +0 -1
- package/lib/commonjs/core/constants.js +0 -8
- package/lib/commonjs/core/constants.js.map +0 -1
- package/lib/commonjs/core/global.d.js +0 -2
- package/lib/commonjs/core/global.d.js.map +0 -1
- package/lib/commonjs/core/refs.js +0 -33
- package/lib/commonjs/core/refs.js.map +0 -1
- package/lib/commonjs/core/utils.js +0 -161
- package/lib/commonjs/core/utils.js.map +0 -1
- package/lib/commonjs/hooks/index.js +0 -21
- package/lib/commonjs/hooks/index.js.map +0 -1
- package/lib/commonjs/hooks/useConsoleInterceptor.js +0 -51
- package/lib/commonjs/hooks/useConsoleInterceptor.js.map +0 -1
- package/lib/commonjs/hooks/useNetworkInterceptor.js +0 -176
- package/lib/commonjs/hooks/useNetworkInterceptor.js.map +0 -1
- package/lib/commonjs/index.js +0 -14
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/interceptors/ConsoleInterceptor.js +0 -88
- package/lib/commonjs/interceptors/ConsoleInterceptor.js.map +0 -1
- package/lib/commonjs/interceptors/FetchInterceptor.js +0 -109
- package/lib/commonjs/interceptors/FetchInterceptor.js.map +0 -1
- package/lib/commonjs/interceptors/HttpInterceptor.js +0 -18
- package/lib/commonjs/interceptors/HttpInterceptor.js.map +0 -1
- package/lib/commonjs/interceptors/Interceptor.js +0 -23
- package/lib/commonjs/interceptors/Interceptor.js.map +0 -1
- package/lib/commonjs/interceptors/NetworkInterceptor.js +0 -24
- package/lib/commonjs/interceptors/NetworkInterceptor.js.map +0 -1
- package/lib/commonjs/interceptors/WebSocketInterceptor.js +0 -101
- package/lib/commonjs/interceptors/WebSocketInterceptor.js.map +0 -1
- package/lib/commonjs/interceptors/XHRInterceptor.js +0 -70
- package/lib/commonjs/interceptors/XHRInterceptor.js.map +0 -1
- package/lib/commonjs/interceptors/index.js +0 -35
- package/lib/commonjs/interceptors/index.js.map +0 -1
- package/lib/commonjs/theme/colors.js +0 -20
- package/lib/commonjs/theme/colors.js.map +0 -1
- package/lib/commonjs/theme/icons.js +0 -18
- package/lib/commonjs/theme/icons.js.map +0 -1
- package/lib/commonjs/types/common.js +0 -18
- package/lib/commonjs/types/common.js.map +0 -1
- package/lib/commonjs/types/console.js +0 -2
- package/lib/commonjs/types/console.js.map +0 -1
- package/lib/commonjs/types/http.js +0 -6
- package/lib/commonjs/types/http.js.map +0 -1
- package/lib/commonjs/types/index.js +0 -50
- package/lib/commonjs/types/index.js.map +0 -1
- package/lib/commonjs/types/websocket.js +0 -6
- package/lib/commonjs/types/websocket.js.map +0 -1
- package/lib/commonjs/ui/Xenon.js +0 -145
- package/lib/commonjs/ui/Xenon.js.map +0 -1
- package/lib/commonjs/ui/components/bubble/Bubble.js +0 -126
- package/lib/commonjs/ui/components/bubble/Bubble.js.map +0 -1
- package/lib/commonjs/ui/components/common/Divider.js +0 -21
- package/lib/commonjs/ui/components/common/Divider.js.map +0 -1
- package/lib/commonjs/ui/components/common/Icon.js +0 -25
- package/lib/commonjs/ui/components/common/Icon.js.map +0 -1
- package/lib/commonjs/ui/components/common/IndexedStack.js +0 -46
- package/lib/commonjs/ui/components/common/IndexedStack.js.map +0 -1
- package/lib/commonjs/ui/components/common/ShareableText.js +0 -24
- package/lib/commonjs/ui/components/common/ShareableText.js.map +0 -1
- package/lib/commonjs/ui/components/common/Touchable.js +0 -22
- package/lib/commonjs/ui/components/common/Touchable.js.map +0 -1
- package/lib/commonjs/ui/components/details/LogMessageDetails.js +0 -45
- package/lib/commonjs/ui/components/details/LogMessageDetails.js.map +0 -1
- package/lib/commonjs/ui/components/details/NetworkRequestDetails.js +0 -181
- package/lib/commonjs/ui/components/details/NetworkRequestDetails.js.map +0 -1
- package/lib/commonjs/ui/components/headers/ConsoleHeader.js +0 -30
- package/lib/commonjs/ui/components/headers/ConsoleHeader.js.map +0 -1
- package/lib/commonjs/ui/components/headers/DebuggerHeader.js +0 -76
- package/lib/commonjs/ui/components/headers/DebuggerHeader.js.map +0 -1
- package/lib/commonjs/ui/components/headers/Header.js +0 -34
- package/lib/commonjs/ui/components/headers/Header.js.map +0 -1
- package/lib/commonjs/ui/components/headers/HeaderComponents.js +0 -111
- package/lib/commonjs/ui/components/headers/HeaderComponents.js.map +0 -1
- package/lib/commonjs/ui/components/headers/NetworkHeader.js +0 -82
- package/lib/commonjs/ui/components/headers/NetworkHeader.js.map +0 -1
- package/lib/commonjs/ui/components/index.js +0 -35
- package/lib/commonjs/ui/components/index.js.map +0 -1
- package/lib/commonjs/ui/components/items/ConsolePanelItem.js +0 -41
- package/lib/commonjs/ui/components/items/ConsolePanelItem.js.map +0 -1
- package/lib/commonjs/ui/components/items/DebuggerHeaderItem.js +0 -60
- package/lib/commonjs/ui/components/items/DebuggerHeaderItem.js.map +0 -1
- package/lib/commonjs/ui/components/items/NetworkPanelItem.js +0 -129
- package/lib/commonjs/ui/components/items/NetworkPanelItem.js.map +0 -1
- package/lib/commonjs/ui/components/items/NetworkRequestDetailsItem.js +0 -71
- package/lib/commonjs/ui/components/items/NetworkRequestDetailsItem.js.map +0 -1
- package/lib/commonjs/ui/components/panels/ConsolePanel.js +0 -69
- package/lib/commonjs/ui/components/panels/ConsolePanel.js.map +0 -1
- package/lib/commonjs/ui/components/panels/NetworkPanel.js +0 -69
- package/lib/commonjs/ui/components/panels/NetworkPanel.js.map +0 -1
- package/lib/commonjs/ui/components/panels/Panel.js +0 -25
- package/lib/commonjs/ui/components/panels/Panel.js.map +0 -1
- package/lib/typescript/commonjs/package.json +0 -1
- package/lib/typescript/commonjs/src/contexts/MainContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/contexts/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/core/constants.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/core/refs.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/core/utils.d.ts +0 -40
- package/lib/typescript/commonjs/src/core/utils.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/hooks/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/hooks/useConsoleInterceptor.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/hooks/useNetworkInterceptor.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/interceptors/ConsoleInterceptor.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/interceptors/FetchInterceptor.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/interceptors/HttpInterceptor.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/interceptors/Interceptor.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/interceptors/NetworkInterceptor.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/interceptors/WebSocketInterceptor.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/interceptors/XHRInterceptor.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/interceptors/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/theme/colors.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/theme/icons.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/common.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/console.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/http.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types/websocket.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/Xenon.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/bubble/Bubble.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/common/Divider.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/common/Icon.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/common/IndexedStack.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/common/ShareableText.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/common/Touchable.d.ts +0 -10
- package/lib/typescript/commonjs/src/ui/components/common/Touchable.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/details/LogMessageDetails.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/details/NetworkRequestDetails.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/headers/ConsoleHeader.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/headers/DebuggerHeader.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/headers/Header.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/headers/HeaderComponents.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/headers/NetworkHeader.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/items/ConsolePanelItem.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/items/DebuggerHeaderItem.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/items/NetworkPanelItem.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/items/NetworkRequestDetailsItem.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/panels/ConsolePanel.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/panels/NetworkPanel.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/panels/Panel.d.ts.map +0 -1
- package/lib/typescript/module/src/contexts/MainContext.d.ts +0 -12
- package/lib/typescript/module/src/contexts/MainContext.d.ts.map +0 -1
- package/lib/typescript/module/src/contexts/index.d.ts +0 -2
- package/lib/typescript/module/src/contexts/index.d.ts.map +0 -1
- package/lib/typescript/module/src/core/constants.d.ts +0 -2
- package/lib/typescript/module/src/core/constants.d.ts.map +0 -1
- package/lib/typescript/module/src/core/refs.d.ts +0 -24
- package/lib/typescript/module/src/core/refs.d.ts.map +0 -1
- package/lib/typescript/module/src/core/utils.d.ts.map +0 -1
- package/lib/typescript/module/src/hooks/index.d.ts +0 -3
- package/lib/typescript/module/src/hooks/index.d.ts.map +0 -1
- package/lib/typescript/module/src/hooks/useConsoleInterceptor.d.ts +0 -13
- package/lib/typescript/module/src/hooks/useConsoleInterceptor.d.ts.map +0 -1
- package/lib/typescript/module/src/hooks/useNetworkInterceptor.d.ts +0 -13
- package/lib/typescript/module/src/hooks/useNetworkInterceptor.d.ts.map +0 -1
- package/lib/typescript/module/src/index.d.ts +0 -2
- package/lib/typescript/module/src/index.d.ts.map +0 -1
- package/lib/typescript/module/src/interceptors/ConsoleInterceptor.d.ts +0 -8
- package/lib/typescript/module/src/interceptors/ConsoleInterceptor.d.ts.map +0 -1
- package/lib/typescript/module/src/interceptors/FetchInterceptor.d.ts +0 -6
- package/lib/typescript/module/src/interceptors/FetchInterceptor.d.ts.map +0 -1
- package/lib/typescript/module/src/interceptors/HttpInterceptor.d.ts +0 -6
- package/lib/typescript/module/src/interceptors/HttpInterceptor.d.ts.map +0 -1
- package/lib/typescript/module/src/interceptors/Interceptor.d.ts +0 -10
- package/lib/typescript/module/src/interceptors/Interceptor.d.ts.map +0 -1
- package/lib/typescript/module/src/interceptors/NetworkInterceptor.d.ts +0 -10
- package/lib/typescript/module/src/interceptors/NetworkInterceptor.d.ts.map +0 -1
- package/lib/typescript/module/src/interceptors/WebSocketInterceptor.d.ts +0 -13
- package/lib/typescript/module/src/interceptors/WebSocketInterceptor.d.ts.map +0 -1
- package/lib/typescript/module/src/interceptors/XHRInterceptor.d.ts +0 -6
- package/lib/typescript/module/src/interceptors/XHRInterceptor.d.ts.map +0 -1
- package/lib/typescript/module/src/interceptors/index.d.ts +0 -5
- package/lib/typescript/module/src/interceptors/index.d.ts.map +0 -1
- package/lib/typescript/module/src/theme/colors.d.ts +0 -14
- package/lib/typescript/module/src/theme/colors.d.ts.map +0 -1
- package/lib/typescript/module/src/theme/icons.d.ts +0 -12
- package/lib/typescript/module/src/theme/icons.d.ts.map +0 -1
- package/lib/typescript/module/src/types/common.d.ts +0 -33
- package/lib/typescript/module/src/types/common.d.ts.map +0 -1
- package/lib/typescript/module/src/types/console.d.ts +0 -8
- package/lib/typescript/module/src/types/console.d.ts.map +0 -1
- package/lib/typescript/module/src/types/http.d.ts +0 -21
- package/lib/typescript/module/src/types/http.d.ts.map +0 -1
- package/lib/typescript/module/src/types/index.d.ts +0 -5
- package/lib/typescript/module/src/types/index.d.ts.map +0 -1
- package/lib/typescript/module/src/types/websocket.d.ts +0 -30
- package/lib/typescript/module/src/types/websocket.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/Xenon.d.ts +0 -61
- package/lib/typescript/module/src/ui/Xenon.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/bubble/Bubble.d.ts +0 -11
- package/lib/typescript/module/src/ui/components/bubble/Bubble.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/common/Divider.d.ts +0 -4
- package/lib/typescript/module/src/ui/components/common/Divider.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/common/Icon.d.ts +0 -8
- package/lib/typescript/module/src/ui/components/common/Icon.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/common/IndexedStack.d.ts +0 -13
- package/lib/typescript/module/src/ui/components/common/IndexedStack.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/common/ShareableText.d.ts +0 -7
- package/lib/typescript/module/src/ui/components/common/ShareableText.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/common/Touchable.d.ts +0 -10
- package/lib/typescript/module/src/ui/components/common/Touchable.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/details/LogMessageDetails.d.ts +0 -6
- package/lib/typescript/module/src/ui/components/details/LogMessageDetails.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/details/NetworkRequestDetails.d.ts +0 -6
- package/lib/typescript/module/src/ui/components/details/NetworkRequestDetails.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/headers/ConsoleHeader.d.ts +0 -9
- package/lib/typescript/module/src/ui/components/headers/ConsoleHeader.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/headers/DebuggerHeader.d.ts +0 -10
- package/lib/typescript/module/src/ui/components/headers/DebuggerHeader.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/headers/Header.d.ts +0 -3
- package/lib/typescript/module/src/ui/components/headers/Header.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/headers/HeaderComponents.d.ts +0 -20
- package/lib/typescript/module/src/ui/components/headers/HeaderComponents.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/headers/NetworkHeader.d.ts +0 -9
- package/lib/typescript/module/src/ui/components/headers/NetworkHeader.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/index.d.ts +0 -5
- package/lib/typescript/module/src/ui/components/index.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/items/ConsolePanelItem.d.ts +0 -7
- package/lib/typescript/module/src/ui/components/items/ConsolePanelItem.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/items/DebuggerHeaderItem.d.ts +0 -11
- package/lib/typescript/module/src/ui/components/items/DebuggerHeaderItem.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/items/NetworkPanelItem.d.ts +0 -12
- package/lib/typescript/module/src/ui/components/items/NetworkPanelItem.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/items/NetworkRequestDetailsItem.d.ts +0 -7
- package/lib/typescript/module/src/ui/components/items/NetworkRequestDetailsItem.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/panels/ConsolePanel.d.ts +0 -6
- package/lib/typescript/module/src/ui/components/panels/ConsolePanel.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/panels/NetworkPanel.d.ts +0 -6
- package/lib/typescript/module/src/ui/components/panels/NetworkPanel.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/panels/Panel.d.ts +0 -2
- package/lib/typescript/module/src/ui/components/panels/Panel.d.ts.map +0 -1
- /package/lib/{typescript/module → module}/package.json +0 -0
- /package/lib/typescript/{commonjs/src → src}/contexts/MainContext.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/contexts/index.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/core/constants.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/hooks/index.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/hooks/useConsoleInterceptor.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/hooks/useNetworkInterceptor.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/index.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/interceptors/ConsoleInterceptor.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/interceptors/FetchInterceptor.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/interceptors/HttpInterceptor.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/interceptors/Interceptor.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/interceptors/NetworkInterceptor.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/interceptors/WebSocketInterceptor.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/interceptors/XHRInterceptor.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/interceptors/index.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/theme/colors.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/types/console.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/types/http.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/types/index.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/types/websocket.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/ui/Xenon.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/ui/components/bubble/Bubble.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/ui/components/common/Divider.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/ui/components/common/Icon.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/ui/components/common/IndexedStack.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/ui/components/common/ShareableText.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/ui/components/details/LogMessageDetails.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/ui/components/details/NetworkRequestDetails.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/ui/components/headers/ConsoleHeader.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/ui/components/headers/DebuggerHeader.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/ui/components/headers/Header.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/ui/components/headers/NetworkHeader.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/ui/components/items/ConsolePanelItem.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/ui/components/items/DebuggerHeaderItem.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/ui/components/items/NetworkPanelItem.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/ui/components/items/NetworkRequestDetailsItem.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/ui/components/panels/ConsolePanel.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/ui/components/panels/NetworkPanel.d.ts +0 -0
- /package/lib/typescript/{commonjs/src → src}/ui/components/panels/Panel.d.ts +0 -0
package/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
MIT License
|
2
2
|
|
3
|
-
Copyright (c) 2025
|
3
|
+
Copyright (c) 2025 Purrseus
|
4
4
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
of this software and associated documentation files (the "Software"), to deal
|
6
6
|
in the Software without restriction, including without limitation the rights
|
Binary file
|
Binary file
|
@@ -1,10 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
exports.default = void 0;
|
7
|
-
var _react = require("react");
|
8
|
-
const MainContext = /*#__PURE__*/(0, _react.createContext)(null);
|
9
|
-
var _default = exports.default = MainContext;
|
3
|
+
import { createContext } from 'react';
|
4
|
+
const MainContext = /*#__PURE__*/createContext(null);
|
5
|
+
export default MainContext;
|
10
6
|
//# sourceMappingURL=MainContext.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["createContext","MainContext"],"sourceRoot":"../../../src","sources":["contexts/MainContext.ts"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,OAAO;AAYrC,MAAMC,WAAW,gBAAGD,aAAa,CAA0B,IAAI,CAAC;AAEhE,eAAeC,WAAW","ignoreList":[]}
|
@@ -1,14 +1,4 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
Object.defineProperty(exports, "MainContext", {
|
7
|
-
enumerable: true,
|
8
|
-
get: function () {
|
9
|
-
return _MainContext.default;
|
10
|
-
}
|
11
|
-
});
|
12
|
-
var _MainContext = _interopRequireDefault(require("./MainContext"));
|
13
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
3
|
+
export { default as MainContext } from "./MainContext.js";
|
14
4
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["default","MainContext"],"sourceRoot":"../../../src","sources":["contexts/index.ts"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,WAAW,QAAQ,kBAAe","ignoreList":[]}
|
@@ -1,8 +1,4 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.NETWORK_REQUEST_HEADER = void 0;
|
7
|
-
const NETWORK_REQUEST_HEADER = exports.NETWORK_REQUEST_HEADER = 'X-React-Native-Xenon';
|
3
|
+
export const NETWORK_REQUEST_HEADER = 'X-React-Native-Xenon';
|
8
4
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["NETWORK_REQUEST_HEADER"
|
1
|
+
{"version":3,"names":["NETWORK_REQUEST_HEADER"],"sourceRoot":"../../../src","sources":["core/constants.ts"],"mappings":";;AAAA,OAAO,MAAMA,sBAAsB,GAAG,sBAAsB","ignoreList":[]}
|
package/lib/module/core/refs.js
CHANGED
@@ -1,33 +1,31 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
});
|
6
|
-
exports.default = exports.PanelState = exports.HeaderState = exports.DebuggerVisibility = void 0;
|
7
|
-
var _react = require("react");
|
8
|
-
let DebuggerVisibility = exports.DebuggerVisibility = /*#__PURE__*/function (DebuggerVisibility) {
|
3
|
+
import { createRef } from 'react';
|
4
|
+
export let DebuggerVisibility = /*#__PURE__*/function (DebuggerVisibility) {
|
9
5
|
DebuggerVisibility[DebuggerVisibility["Hidden"] = -1] = "Hidden";
|
10
6
|
DebuggerVisibility[DebuggerVisibility["Bubble"] = 0] = "Bubble";
|
11
7
|
DebuggerVisibility[DebuggerVisibility["Panel"] = 1] = "Panel";
|
8
|
+
DebuggerVisibility[DebuggerVisibility["Search"] = 2] = "Search";
|
12
9
|
return DebuggerVisibility;
|
13
10
|
}({});
|
14
|
-
let PanelState =
|
11
|
+
export let PanelState = /*#__PURE__*/function (PanelState) {
|
15
12
|
PanelState[PanelState["Network"] = 0] = "Network";
|
16
13
|
PanelState[PanelState["Console"] = 1] = "Console";
|
17
14
|
PanelState[PanelState["NetworkDetail"] = 2] = "NetworkDetail";
|
18
15
|
PanelState[PanelState["ConsoleDetail"] = 3] = "ConsoleDetail";
|
19
16
|
return PanelState;
|
20
17
|
}({});
|
21
|
-
let HeaderState =
|
18
|
+
export let HeaderState = /*#__PURE__*/function (HeaderState) {
|
22
19
|
HeaderState[HeaderState["Debugger"] = 0] = "Debugger";
|
23
20
|
HeaderState[HeaderState["Network"] = 1] = "Network";
|
24
21
|
HeaderState[HeaderState["Console"] = 2] = "Console";
|
25
22
|
return HeaderState;
|
26
23
|
}({});
|
27
24
|
const refs = {
|
28
|
-
debugger: /*#__PURE__*/
|
29
|
-
panel: /*#__PURE__*/
|
30
|
-
header: /*#__PURE__*/
|
25
|
+
debugger: /*#__PURE__*/createRef(),
|
26
|
+
panel: /*#__PURE__*/createRef(),
|
27
|
+
header: /*#__PURE__*/createRef(),
|
28
|
+
searchInput: /*#__PURE__*/createRef()
|
31
29
|
};
|
32
|
-
|
30
|
+
export default refs;
|
33
31
|
//# sourceMappingURL=refs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["createRef","DebuggerVisibility","PanelState","HeaderState","refs","debugger","panel","header","searchInput"],"sourceRoot":"../../../src","sources":["core/refs.ts"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,OAAO;AAIjC,WAAYC,kBAAkB,0BAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AAO9B,WAAYC,UAAU,0BAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAOtB,WAAYC,WAAW,0BAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAXA,WAAW,CAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAMvB,MAAMC,IAAI,GAAG;EACXC,QAAQ,eAAEL,SAAS,CAA0C,CAAC;EAC9DM,KAAK,eAAEN,SAAS,CAAkC,CAAC;EACnDO,MAAM,eAAEP,SAAS,CAAmC,CAAC;EACrDQ,WAAW,eAAER,SAAS,CAAY;AACpC,CAAC;AAED,eAAeI,IAAI","ignoreList":[]}
|
package/lib/module/core/utils.js
CHANGED
@@ -1,41 +1,30 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
exports.showNewLine = exports.shareText = exports.keyValueToString = exports.getVerticalSafeMargin = exports.getNetworkUtils = exports.getHttpInterceptorId = exports.getConsoleTypeColor = void 0;
|
9
|
-
exports.singleton = singleton;
|
10
|
-
var _reactNativeUrlPolyfill = require("react-native-url-polyfill");
|
11
|
-
var _types = require("../types");
|
12
|
-
var _colors = _interopRequireDefault(require("../theme/colors"));
|
13
|
-
var _reactNative = require("react-native");
|
14
|
-
var _refs = _interopRequireWildcard(require("./refs"));
|
15
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
16
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
17
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
3
|
+
import { URL } from 'react-native-url-polyfill';
|
4
|
+
import { NetworkType } from "../types/index.js";
|
5
|
+
import colors from "../theme/colors.js";
|
6
|
+
import { Share } from 'react-native';
|
7
|
+
import refs, { DebuggerVisibility } from "./refs.js";
|
18
8
|
let isSharing = false;
|
19
|
-
const shareText = async text => {
|
9
|
+
export const shareText = async text => {
|
20
10
|
if (isSharing) return;
|
21
11
|
try {
|
22
12
|
isSharing = true;
|
23
|
-
|
24
|
-
await
|
13
|
+
refs.debugger.current?.setCurrentIndex(DebuggerVisibility.Bubble);
|
14
|
+
await Share.share({
|
25
15
|
message: text.trim()
|
26
16
|
});
|
27
17
|
} catch (error) {
|
28
18
|
// Handle error
|
29
19
|
} finally {
|
30
|
-
|
20
|
+
refs.debugger.current?.setCurrentIndex(DebuggerVisibility.Panel);
|
31
21
|
isSharing = false;
|
32
22
|
}
|
33
23
|
};
|
34
|
-
|
35
|
-
const getNetworkUtils = data => {
|
24
|
+
export const getNetworkUtils = data => {
|
36
25
|
if (!data || !data.url) return {};
|
37
|
-
const isWS = data?.type ===
|
38
|
-
const requestUrl = new
|
26
|
+
const isWS = data?.type === NetworkType.WS;
|
27
|
+
const requestUrl = new URL(data.url);
|
39
28
|
const overviewShown = !!data.url;
|
40
29
|
const httpHeadersShown = !isWS && (!!data.requestHeaders?.size || !!data.responseHeaders?.size);
|
41
30
|
const websocketHeadersShown = isWS && !!Object.keys(data.options?.headers ?? {}).length;
|
@@ -53,38 +42,34 @@ const getNetworkUtils = data => {
|
|
53
42
|
messagesShown
|
54
43
|
};
|
55
44
|
};
|
56
|
-
exports.getNetworkUtils = getNetworkUtils;
|
57
45
|
const hexToHexAlpha = (hex, opacity) => `${hex}${`${(Math.min(Math.max(opacity, 0), 1) * 255).toString(16)}0`.slice(0, 2)}`;
|
58
|
-
const getConsoleTypeColor = type => {
|
46
|
+
export const getConsoleTypeColor = type => {
|
59
47
|
let color;
|
60
48
|
switch (type) {
|
61
49
|
case 'log':
|
62
|
-
color =
|
50
|
+
color = colors.white;
|
63
51
|
break;
|
64
52
|
case 'info':
|
65
|
-
color =
|
53
|
+
color = colors.blue;
|
66
54
|
break;
|
67
55
|
case 'warn':
|
68
56
|
case 'debug':
|
69
57
|
case 'trace':
|
70
|
-
color =
|
58
|
+
color = colors.yellow;
|
71
59
|
break;
|
72
60
|
case 'error':
|
73
|
-
color =
|
61
|
+
color = colors.red;
|
74
62
|
break;
|
75
63
|
default:
|
76
|
-
color =
|
64
|
+
color = colors.white;
|
77
65
|
}
|
78
66
|
return hexToHexAlpha(color, 0.25);
|
79
67
|
};
|
80
68
|
|
81
69
|
//#region metrics
|
82
|
-
|
83
|
-
const
|
84
|
-
|
85
|
-
const clamp = (value, min, max) => Math.max(min, Math.min(max, value));
|
86
|
-
exports.clamp = clamp;
|
87
|
-
const getHttpInterceptorId = () => {
|
70
|
+
export const getVerticalSafeMargin = screenHeight => screenHeight / 8;
|
71
|
+
export const clamp = (value, min, max) => Math.max(min, Math.min(max, value));
|
72
|
+
export const getHttpInterceptorId = () => {
|
88
73
|
const timestamp = Date.now().toString(36);
|
89
74
|
const randomNum = Math.random().toString(36).substring(2, 10);
|
90
75
|
return timestamp + randomNum;
|
@@ -92,29 +77,22 @@ const getHttpInterceptorId = () => {
|
|
92
77
|
//#endregion
|
93
78
|
|
94
79
|
//#region formatters
|
95
|
-
|
96
|
-
const showNewLine = when => when ? '\n' : '';
|
97
|
-
exports.showNewLine = showNewLine;
|
80
|
+
export const showNewLine = when => when ? '\n' : '';
|
98
81
|
const limitChar = (value, limit = 5000) => {
|
99
82
|
const stringValue = typeof value === 'string' ? value : JSON.stringify(value ?? '');
|
100
83
|
return stringValue.length > limit ? `${stringValue.slice(0, limit)}\n---LIMITED TO ${limit} CHARACTERS---` : stringValue;
|
101
84
|
};
|
102
|
-
const keyValueToString = (key, value, newLine = 'trailing') => `${newLine === 'leading' ? '\n' : ''}${key}: ${limitChar(value)}${showNewLine(newLine === 'trailing')}`;
|
103
|
-
|
104
|
-
const
|
105
|
-
exports.formatRequestMethod = formatRequestMethod;
|
106
|
-
const formatRequestDuration = (startTime, endTime) => {
|
85
|
+
export const keyValueToString = (key, value, newLine = 'trailing') => `${newLine === 'leading' ? '\n' : ''}${key}: ${limitChar(value)}${showNewLine(newLine === 'trailing')}`;
|
86
|
+
export const formatRequestMethod = method => method ?? 'GET';
|
87
|
+
export const formatRequestDuration = (startTime, endTime) => {
|
107
88
|
if (typeof startTime !== 'number' || typeof endTime !== 'number') return 'pending';
|
108
89
|
return `${endTime - startTime}ms`;
|
109
90
|
};
|
110
|
-
|
111
|
-
const
|
112
|
-
exports.formatRequestStatusCode = formatRequestStatusCode;
|
113
|
-
const formatLogMessage = values => {
|
91
|
+
export const formatRequestStatusCode = statusCode => `${statusCode ?? 'pending'}`;
|
92
|
+
export const formatLogMessage = values => {
|
114
93
|
return values.reduce((pre, cur, index) => pre + (!index ? '' : ', ') + limitChar(cur), '');
|
115
94
|
};
|
116
|
-
|
117
|
-
const beautify = (data, beautified) => {
|
95
|
+
export const beautify = (data, beautified) => {
|
118
96
|
if (!data) return '';
|
119
97
|
try {
|
120
98
|
const res = typeof data === 'string' ? JSON.parse(data) : data;
|
@@ -123,8 +101,7 @@ const beautify = (data, beautified) => {
|
|
123
101
|
return limitChar(data);
|
124
102
|
}
|
125
103
|
};
|
126
|
-
|
127
|
-
const convertToCurl = (method, url, headers, body) => {
|
104
|
+
export const convertToCurl = (method, url, headers, body) => {
|
128
105
|
let curlCommand = `curl -X ${method.toUpperCase()} "${url}"`;
|
129
106
|
if (headers) {
|
130
107
|
for (const [key, value] of headers.entries()) {
|
@@ -140,13 +117,12 @@ const convertToCurl = (method, url, headers, body) => {
|
|
140
117
|
//#endregion
|
141
118
|
|
142
119
|
//#region decorators
|
143
|
-
|
144
|
-
function frozen(_target) {
|
120
|
+
export function frozen(_target) {
|
145
121
|
const descriptor = arguments[2];
|
146
122
|
descriptor.configurable = false;
|
147
123
|
descriptor.writable = false;
|
148
124
|
}
|
149
|
-
function singleton(constructor) {
|
125
|
+
export function singleton(constructor) {
|
150
126
|
class Singleton extends constructor {
|
151
127
|
static #instance;
|
152
128
|
constructor(...args) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["URL","NetworkType","colors","Share","refs","DebuggerVisibility","isSharing","shareText","text","debugger","current","setCurrentIndex","Bubble","share","message","trim","error","Panel","getNetworkUtils","data","url","isWS","type","WS","requestUrl","overviewShown","httpHeadersShown","requestHeaders","size","responseHeaders","websocketHeadersShown","Object","keys","options","headers","length","headersShown","requestShown","search","body","responseShown","response","messagesShown","messages","hexToHexAlpha","hex","opacity","Math","min","max","toString","slice","getConsoleTypeColor","color","white","blue","yellow","red","getVerticalSafeMargin","screenHeight","clamp","value","getHttpInterceptorId","timestamp","Date","now","randomNum","random","substring","showNewLine","when","limitChar","limit","stringValue","JSON","stringify","keyValueToString","key","newLine","formatRequestMethod","method","formatRequestDuration","startTime","endTime","formatRequestStatusCode","statusCode","formatLogMessage","values","reduce","pre","cur","index","beautify","beautified","res","parse","convertToCurl","curlCommand","toUpperCase","entries","bodyString","frozen","_target","descriptor","arguments","configurable","writable","singleton","constructor","Singleton","instance","args"],"sourceRoot":"../../../src","sources":["core/utils.ts"],"mappings":";;AAAA,SAASA,GAAG,QAAQ,2BAA2B;AAC/C,SAASC,WAAW,QAAkE,mBAAU;AAChG,OAAOC,MAAM,MAAM,oBAAiB;AACpC,SAASC,KAAK,QAAQ,cAAc;AACpC,OAAOC,IAAI,IAAIC,kBAAkB,QAAQ,WAAQ;AAEjD,IAAIC,SAAS,GAAG,KAAK;AAErB,OAAO,MAAMC,SAAS,GAAG,MAAOC,IAAY,IAAK;EAC/C,IAAIF,SAAS,EAAE;EAEf,IAAI;IACFA,SAAS,GAAG,IAAI;IAChBF,IAAI,CAACK,QAAQ,CAACC,OAAO,EAAEC,eAAe,C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I,CAACC,SAAS,CAACpC,IAAI,CAAC;IACzE0D,WAAW,IAAI,QAAQG,UAAU,GAAG;EACtC;EAEA,OAAOH,WAAW;AACpB,CAAC;AACD;;AAEA;AACA,OAAO,SAASI,MAAMA,CAACC,OAAe,EAAE;EACtC,MAAMC,UAA8B,GAAGC,SAAS,CAAC,CAAC,CAAC;EACnDD,UAAU,CAACE,YAAY,GAAG,KAAK;EAC/BF,UAAU,CAACG,QAAQ,GAAG,KAAK;AAC7B;AAEA,OAAO,SAASC,SAASA,CAAyCC,WAAc,EAAE;EAChF,MAAMC,SAAS,SAASD,WAAW,CAAC;IAClC,OAAO,CAACE,QAAQ;IAEhBF,WAAWA,CAAC,GAAGG,IAAW,EAAE;MAC1B,IAAIF,SAAS,CAAC,CAACC,QAAQ,EAAE,OAAOD,SAAS,CAAC,CAACC,QAAQ;MAEnD,KAAK,CAAC,GAAGC,IAAI,CAAC;MACdF,SAAS,CAAC,CAACC,QAAQ,GAAG,IAAI;IAC5B;EACF;EAEA,OAAOD,SAAS;AAClB;AACA","ignoreList":[]}
|
@@ -1,21 +1,5 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
});
|
6
|
-
Object.defineProperty(exports, "useConsoleInterceptor", {
|
7
|
-
enumerable: true,
|
8
|
-
get: function () {
|
9
|
-
return _useConsoleInterceptor.default;
|
10
|
-
}
|
11
|
-
});
|
12
|
-
Object.defineProperty(exports, "useNetworkInterceptor", {
|
13
|
-
enumerable: true,
|
14
|
-
get: function () {
|
15
|
-
return _useNetworkInterceptor.default;
|
16
|
-
}
|
17
|
-
});
|
18
|
-
var _useConsoleInterceptor = _interopRequireDefault(require("./useConsoleInterceptor"));
|
19
|
-
var _useNetworkInterceptor = _interopRequireDefault(require("./useNetworkInterceptor"));
|
20
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
3
|
+
export { default as useConsoleInterceptor } from "./useConsoleInterceptor.js";
|
4
|
+
export { default as useNetworkInterceptor } from "./useNetworkInterceptor.js";
|
21
5
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["default","useConsoleInterceptor","useNetworkInterceptor"],"sourceRoot":"../../../src","sources":["hooks/index.ts"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,qBAAqB,QAAQ,4BAAyB;AAC1E,SAASD,OAAO,IAAIE,qBAAqB,QAAQ,4BAAyB","ignoreList":[]}
|
@@ -1,23 +1,19 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
}
|
6
|
-
|
7
|
-
|
8
|
-
var _useImmer = require("use-immer");
|
9
|
-
var _interceptors = require("../interceptors");
|
10
|
-
const consoleInterceptor = new _interceptors.ConsoleInterceptor();
|
11
|
-
function useConsoleInterceptor({
|
3
|
+
import { useCallback, useEffect, useState } from 'react';
|
4
|
+
import { useImmer } from 'use-immer';
|
5
|
+
import { ConsoleInterceptor } from "../interceptors/index.js";
|
6
|
+
const consoleInterceptor = new ConsoleInterceptor();
|
7
|
+
export default function useConsoleInterceptor({
|
12
8
|
autoEnabled
|
13
9
|
}) {
|
14
|
-
const [isInterceptorEnabled, setIsInterceptorEnabled] =
|
15
|
-
const [logMessages, setLogMessages] =
|
10
|
+
const [isInterceptorEnabled, setIsInterceptorEnabled] = useState(autoEnabled);
|
11
|
+
const [logMessages, setLogMessages] = useImmer([]);
|
16
12
|
const clearAllLogMessages = () => {
|
17
13
|
setLogMessages([]);
|
18
14
|
};
|
19
15
|
const isEnabled = () => consoleInterceptor.isInterceptorEnabled;
|
20
|
-
const enableInterception =
|
16
|
+
const enableInterception = useCallback(() => {
|
21
17
|
if (isEnabled()) return;
|
22
18
|
consoleInterceptor.set('callback', (type, args) => {
|
23
19
|
setLogMessages(draft => {
|
@@ -29,12 +25,12 @@ function useConsoleInterceptor({
|
|
29
25
|
}).enableInterception();
|
30
26
|
setIsInterceptorEnabled(true);
|
31
27
|
}, [setLogMessages]);
|
32
|
-
const disableInterception =
|
28
|
+
const disableInterception = useCallback(() => {
|
33
29
|
if (!isEnabled()) return;
|
34
30
|
consoleInterceptor.disableInterception();
|
35
31
|
setIsInterceptorEnabled(false);
|
36
32
|
}, []);
|
37
|
-
|
33
|
+
useEffect(() => {
|
38
34
|
if (autoEnabled) {
|
39
35
|
enableInterception();
|
40
36
|
return disableInterception;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["useCallback","useEffect","useState","useImmer","ConsoleInterceptor","consoleInterceptor","useConsoleInterceptor","autoEnabled","isInterceptorEnabled","setIsInterceptorEnabled","logMessages","setLogMessages","clearAllLogMessages","isEnabled","enableInterception","set","type","args","draft","push","values","disableInterception"],"sourceRoot":"../../../src","sources":["hooks/useConsoleInterceptor.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AACxD,SAASC,QAAQ,QAAQ,WAAW;AACpC,SAASC,kBAAkB,QAAQ,0BAAiB;AAOpD,MAAMC,kBAAkB,GAAG,IAAID,kBAAkB,CAAC,CAAC;AAEnD,eAAe,SAASE,qBAAqBA,CAAC;EAAEC;AAAsC,CAAC,EAAE;EACvF,MAAM,CAACC,oBAAoB,EAAEC,uBAAuB,CAAC,GAAGP,QAAQ,CAACK,WAAW,CAAC;EAE7E,MAAM,CAACG,WAAW,EAAEC,cAAc,CAAC,GAAGR,QAAQ,CAAe,EAAE,CAAC;EAEhE,MAAMS,mBAAmB,GAAGA,CAAA,KAAM;IAChCD,cAAc,CAAC,EAAE,CAAC;EACpB,CAAC;EAED,MAAME,SAAS,GAAGA,CAAA,KAAMR,kBAAkB,CAACG,oBAAoB;EAE/D,MAAMM,kBAAkB,GAAGd,WAAW,CAAC,MAAM;IAC3C,IAAIa,SAAS,CAAC,CAAC,EAAE;IAEjBR,kBAAkB,CACfU,GAAG,CAAC,UAAU,EAAE,CAACC,IAAI,EAAEC,IAAI,KAAK;MAC/BN,cAAc,CAACO,KAAK,IAAI;QACtBA,KAAK,CAACC,IAAI,CAAC;UAAEH,IAAI;UAAEI,MAAM,EAAEH;QAAK,CAAC,CAAC;MACpC,CAAC,CAAC;IACJ,CAAC,CAAC,CACDH,kBAAkB,CAAC,CAAC;IAEvBL,uBAAuB,CAAC,IAAI,CAAC;EAC/B,CAAC,EAAE,CAACE,cAAc,CAAC,CAAC;EAEpB,MAAMU,mBAAmB,GAAGrB,WAAW,CAAC,MAAM;IAC5C,IAAI,CAACa,SAAS,CAAC,CAAC,EAAE;IAElBR,kBAAkB,CAACgB,mBAAmB,CAAC,CAAC;IAExCZ,uBAAuB,CAAC,KAAK,CAAC;EAChC,CAAC,EAAE,EAAE,CAAC;EAENR,SAAS,CAAC,MAAM;IACd,IAAIM,WAAW,EAAE;MACfO,kBAAkB,CAAC,CAAC;MACpB,OAAOO,mBAAmB;IAC5B;EACF,CAAC,EAAE,CAACd,WAAW,EAAEc,mBAAmB,EAAEP,kBAAkB,CAAC,CAAC;EAE1D,OAAO;IACLN,oBAAoB;IACpBM,kBAAkB;IAClBO,mBAAmB;IACnBT,mBAAmB;IACnBF;EACF,CAAC;AACH","ignoreList":[]}
|
@@ -1,31 +1,27 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
}
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
var _constants = require("../core/constants");
|
10
|
-
var _interceptors = require("../interceptors");
|
11
|
-
var _types = require("../types");
|
12
|
-
var _utils = require("../core/utils");
|
3
|
+
import { useCallback, useEffect, useState } from 'react';
|
4
|
+
import { useImmer } from 'use-immer';
|
5
|
+
import { NETWORK_REQUEST_HEADER } from "../core/constants.js";
|
6
|
+
import { FetchInterceptor, WebSocketInterceptor, XHRInterceptor } from "../interceptors/index.js";
|
7
|
+
import { NetworkType } from "../types/index.js";
|
8
|
+
import { keyValueToString } from "../core/utils.js";
|
13
9
|
const initRequests = new Map();
|
14
|
-
const xhrInterceptor = new
|
15
|
-
const fetchInterceptor = new
|
16
|
-
const webSocketInterceptor = new
|
17
|
-
function useNetworkInterceptor({
|
10
|
+
const xhrInterceptor = new XHRInterceptor();
|
11
|
+
const fetchInterceptor = new FetchInterceptor();
|
12
|
+
const webSocketInterceptor = new WebSocketInterceptor();
|
13
|
+
export default function useNetworkInterceptor({
|
18
14
|
autoEnabled,
|
19
15
|
includeDomains
|
20
16
|
}) {
|
21
17
|
const joinedIncludeDomains = includeDomains?.join(',') ?? '';
|
22
|
-
const [isInterceptorEnabled, setIsInterceptorEnabled] =
|
23
|
-
const [networkRequests, setNetworkRequests] =
|
18
|
+
const [isInterceptorEnabled, setIsInterceptorEnabled] = useState(autoEnabled);
|
19
|
+
const [networkRequests, setNetworkRequests] = useImmer(initRequests);
|
24
20
|
const isEnabled = () => xhrInterceptor.isInterceptorEnabled && fetchInterceptor.isInterceptorEnabled && webSocketInterceptor.isInterceptorEnabled;
|
25
21
|
const clearAllNetworkRequests = () => {
|
26
22
|
setNetworkRequests(initRequests);
|
27
23
|
};
|
28
|
-
const enableHttpInterceptions =
|
24
|
+
const enableHttpInterceptions = useCallback(() => {
|
29
25
|
const openCallback = (id, type, method, url) => {
|
30
26
|
if (!id) return;
|
31
27
|
const isNotMatchedDomain = !!joinedIncludeDomains.length && !includeDomains?.some(domain => url.includes(domain));
|
@@ -42,9 +38,9 @@ function useNetworkInterceptor({
|
|
42
38
|
if (!id) return;
|
43
39
|
setNetworkRequests(draft => {
|
44
40
|
if (!draft.get(id)) return draft;
|
45
|
-
const currentHeaderLine =
|
46
|
-
const fetchRequestHeaderLineRegex = RegExp(
|
47
|
-
const isFetchInXHR = draft.get(id).type ===
|
41
|
+
const currentHeaderLine = keyValueToString(header, value);
|
42
|
+
const fetchRequestHeaderLineRegex = RegExp(keyValueToString(NETWORK_REQUEST_HEADER, NetworkType.Fetch), 'gi');
|
43
|
+
const isFetchInXHR = draft.get(id).type === NetworkType.XHR && !!currentHeaderLine.match(fetchRequestHeaderLineRegex);
|
48
44
|
if (isFetchInXHR) {
|
49
45
|
draft.delete(id);
|
50
46
|
} else {
|
@@ -86,14 +82,14 @@ function useNetworkInterceptor({
|
|
86
82
|
fetchInterceptor.set('open', openCallback).set('requestHeader', requestHeaderCallback).set('send', sendCallback).set('headerReceived', headerReceivedCallback).set('response', responseCallback).enableInterception();
|
87
83
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
88
84
|
}, [joinedIncludeDomains, setNetworkRequests]);
|
89
|
-
const enableWebSocketInterception =
|
85
|
+
const enableWebSocketInterception = useCallback(() => {
|
90
86
|
const connectCallback = (startTime, url, protocols, options, socketId) => {
|
91
87
|
if (typeof socketId !== 'number') return;
|
92
88
|
setNetworkRequests(draft => {
|
93
89
|
draft.set(`${socketId}`, {
|
94
90
|
startTime,
|
95
91
|
url,
|
96
|
-
type:
|
92
|
+
type: NetworkType.WS,
|
97
93
|
protocols,
|
98
94
|
options
|
99
95
|
});
|
@@ -104,7 +100,7 @@ function useNetworkInterceptor({
|
|
104
100
|
setNetworkRequests(draft => {
|
105
101
|
if (!draft.get(`${socketId}`)) return draft;
|
106
102
|
draft.get(`${socketId}`).messages ??= '';
|
107
|
-
draft.get(`${socketId}`).messages +=
|
103
|
+
draft.get(`${socketId}`).messages += keyValueToString('SENT', data);
|
108
104
|
});
|
109
105
|
};
|
110
106
|
const closeCallback = (code, reason, socketId) => {
|
@@ -127,7 +123,7 @@ function useNetworkInterceptor({
|
|
127
123
|
setNetworkRequests(draft => {
|
128
124
|
if (!draft.get(`${socketId}`)) return draft;
|
129
125
|
draft.get(`${socketId}`).messages ??= '';
|
130
|
-
draft.get(`${socketId}`).messages +=
|
126
|
+
draft.get(`${socketId}`).messages += keyValueToString('RECEIVED', message);
|
131
127
|
});
|
132
128
|
};
|
133
129
|
const onErrorCallback = (socketId, data) => {
|
@@ -146,20 +142,20 @@ function useNetworkInterceptor({
|
|
146
142
|
};
|
147
143
|
webSocketInterceptor.set('connect', connectCallback).set('send', sendCallback).set('close', closeCallback).set('onOpen', onOpenCallback).set('onMessage', onMessageCallback).set('onError', onErrorCallback).set('onClose', onCloseCallback).enableInterception();
|
148
144
|
}, [setNetworkRequests]);
|
149
|
-
const enableInterception =
|
145
|
+
const enableInterception = useCallback(() => {
|
150
146
|
if (isEnabled()) return;
|
151
147
|
enableHttpInterceptions();
|
152
148
|
enableWebSocketInterception();
|
153
149
|
setIsInterceptorEnabled(true);
|
154
150
|
}, [enableHttpInterceptions, enableWebSocketInterception]);
|
155
|
-
const disableInterception =
|
151
|
+
const disableInterception = useCallback(() => {
|
156
152
|
if (!isEnabled()) return;
|
157
153
|
xhrInterceptor.disableInterception();
|
158
154
|
fetchInterceptor.disableInterception();
|
159
155
|
webSocketInterceptor.disableInterception();
|
160
156
|
setIsInterceptorEnabled(false);
|
161
157
|
}, []);
|
162
|
-
|
158
|
+
useEffect(() => {
|
163
159
|
if (autoEnabled) {
|
164
160
|
enableInterception();
|
165
161
|
return disableInterception;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["useCallback","useEffect","useState","useImmer","NETWORK_REQUEST_HEADER","FetchInterceptor","WebSocketInterceptor","XHRInterceptor","NetworkType","keyValueToString","initRequests","Map","xhrInterceptor","fetchInterceptor","webSocketInterceptor","useNetworkInterceptor","autoEnabled","includeDomains","joinedIncludeDomains","join","isInterceptorEnabled","setIsInterceptorEnabled","networkRequests","setNetworkRequests","isEnabled","clearAllNetworkRequests","enableHttpInterceptions","openCallback","id","type","method","url","isNotMatchedDomain","length","some","domain","includes","draft","set","requestHeaderCallback","header","value","get","currentHeaderLine","fetchRequestHeaderLineRegex","RegExp","Fetch","isFetchInXHR","XHR","match","delete","requestHeaders","sendCallback","startTime","data","body","headerReceivedCallback","responseContentType","responseSize","responseHeaders","responseCallback","status","timeout","endTime","response","responseURL","responseType","enableInterception","enableWebSocketInterception","connectCallback","protocols","options","socketId","WS","messages","closeCallback","code","reason","closeReason","onOpenCallback","onMessageCallback","message","onErrorCallback","serverError","onCloseCallback","serverClose","disableInterception"],"sourceRoot":"../../../src","sources":["hooks/useNetworkInterceptor.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AACxD,SAASC,QAAQ,QAAQ,WAAW;AACpC,SAASC,sBAAsB,QAAQ,sBAAmB;AAC1D,SAASC,gBAAgB,EAAEC,oBAAoB,EAAEC,cAAc,QAAQ,0BAAiB;AACxF,SACEC,WAAW,QAMN,mBAAU;AACjB,SAASC,gBAAgB,QAAQ,kBAAe;AAShD,MAAMC,YAAY,GAAG,IAAIC,GAAG,CAAkD,CAAC;AAE/E,MAAMC,cAAc,GAAG,IAAIL,cAAc,CAAC,CAAC;AAC3C,MAAMM,gBAAgB,GAAG,IAAIR,gBAAgB,CAAC,CAAC;AAC/C,MAAMS,oBAAoB,GAAG,IAAIR,oBAAoB,CAAC,CAAC;AAEvD,eAAe,SAASS,qBAAqBA,CAAC;EAC5CC,WAAW;EACXC;AACwB,CAAC,EAAE;EAC3B,MAAMC,oBAAoB,GAAGD,cAAc,EAAEE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE;EAC5D,MAAM,CAACC,oBAAoB,EAAEC,uBAAuB,CAAC,GAAGnB,QAAQ,CAACc,WAAW,CAAC;EAE7E,MAAM,CAACM,eAAe,EAAEC,kBAAkB,CAAC,GAAGpB,QAAQ,CAACO,YAAY,CAAC;EAEpE,MAAMc,SAAS,GAAGA,CAAA,KAChBZ,cAAc,CAACQ,oBAAoB,IACnCP,gBAAgB,CAACO,oBAAoB,IACrCN,oBAAoB,CAACM,oBAAoB;EAE3C,MAAMK,uBAAuB,GAAGA,CAAA,KAAM;IACpCF,kBAAkB,CAACb,YAAY,CAAC;EAClC,CAAC;EAED,MAAMgB,uBAAuB,GAAG1B,WAAW,CAAC,MAAM;IAChD,MAAM2B,YAAkC,GAAGA,CAACC,EAAE,EAAEC,IAAI,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