react-native-xenon 1.0.2 → 1.1.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/README.md +9 -9
- package/lib/commonjs/core/utils.js +32 -9
- package/lib/commonjs/core/utils.js.map +1 -1
- package/lib/commonjs/hooks/useNetworkInterceptor.js +7 -2
- package/lib/commonjs/hooks/useNetworkInterceptor.js.map +1 -1
- package/lib/commonjs/interceptors/FetchInterceptor.js +1 -1
- package/lib/commonjs/interceptors/FetchInterceptor.js.map +1 -1
- package/lib/commonjs/ui/Xenon.js +14 -10
- package/lib/commonjs/ui/Xenon.js.map +1 -1
- package/lib/commonjs/ui/components/bubble/Bubble.js +2 -2
- package/lib/commonjs/ui/components/bubble/Bubble.js.map +1 -1
- package/lib/commonjs/ui/components/common/ShareableText.js +24 -0
- package/lib/commonjs/ui/components/common/ShareableText.js.map +1 -0
- package/lib/commonjs/ui/components/details/NetworkRequestDetails.js +43 -25
- package/lib/commonjs/ui/components/details/NetworkRequestDetails.js.map +1 -1
- package/lib/commonjs/ui/components/headers/NetworkHeader.js +9 -24
- package/lib/commonjs/ui/components/headers/NetworkHeader.js.map +1 -1
- package/lib/commonjs/ui/components/index.js +9 -9
- package/lib/commonjs/ui/components/index.js.map +1 -1
- package/lib/commonjs/ui/components/items/NetworkRequestDetailsItem.js +38 -12
- package/lib/commonjs/ui/components/items/NetworkRequestDetailsItem.js.map +1 -1
- package/lib/module/core/utils.js +32 -9
- package/lib/module/core/utils.js.map +1 -1
- package/lib/module/hooks/useNetworkInterceptor.js +7 -2
- package/lib/module/hooks/useNetworkInterceptor.js.map +1 -1
- package/lib/module/interceptors/FetchInterceptor.js +1 -1
- package/lib/module/interceptors/FetchInterceptor.js.map +1 -1
- package/lib/module/ui/Xenon.js +14 -10
- package/lib/module/ui/Xenon.js.map +1 -1
- package/lib/module/ui/components/bubble/Bubble.js +2 -2
- package/lib/module/ui/components/bubble/Bubble.js.map +1 -1
- package/lib/module/ui/components/common/ShareableText.js +24 -0
- package/lib/module/ui/components/common/ShareableText.js.map +1 -0
- package/lib/module/ui/components/details/NetworkRequestDetails.js +43 -25
- package/lib/module/ui/components/details/NetworkRequestDetails.js.map +1 -1
- package/lib/module/ui/components/headers/NetworkHeader.js +9 -24
- package/lib/module/ui/components/headers/NetworkHeader.js.map +1 -1
- package/lib/module/ui/components/index.js +9 -9
- package/lib/module/ui/components/index.js.map +1 -1
- package/lib/module/ui/components/items/NetworkRequestDetailsItem.js +38 -12
- package/lib/module/ui/components/items/NetworkRequestDetailsItem.js.map +1 -1
- package/lib/typescript/commonjs/src/core/utils.d.ts +4 -2
- package/lib/typescript/commonjs/src/core/utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hooks/useNetworkInterceptor.d.ts +2 -1
- package/lib/typescript/commonjs/src/hooks/useNetworkInterceptor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/Xenon.d.ts +44 -4
- package/lib/typescript/commonjs/src/ui/Xenon.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/common/ShareableText.d.ts +7 -0
- package/lib/typescript/commonjs/src/ui/components/common/ShareableText.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ui/components/details/NetworkRequestDetails.d.ts +2 -2
- package/lib/typescript/commonjs/src/ui/components/details/NetworkRequestDetails.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/headers/NetworkHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/index.d.ts +3 -3
- package/lib/typescript/commonjs/src/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/items/NetworkRequestDetailsItem.d.ts.map +1 -1
- package/lib/typescript/module/src/core/utils.d.ts +4 -2
- package/lib/typescript/module/src/core/utils.d.ts.map +1 -1
- package/lib/typescript/module/src/hooks/useNetworkInterceptor.d.ts +2 -1
- package/lib/typescript/module/src/hooks/useNetworkInterceptor.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/Xenon.d.ts +44 -4
- package/lib/typescript/module/src/ui/Xenon.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/common/ShareableText.d.ts +7 -0
- package/lib/typescript/module/src/ui/components/common/ShareableText.d.ts.map +1 -0
- package/lib/typescript/module/src/ui/components/details/NetworkRequestDetails.d.ts +2 -2
- package/lib/typescript/module/src/ui/components/details/NetworkRequestDetails.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/headers/NetworkHeader.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/index.d.ts +3 -3
- package/lib/typescript/module/src/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/items/NetworkRequestDetailsItem.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/core/utils.ts +32 -8
- package/src/hooks/useNetworkInterceptor.ts +13 -2
- package/src/interceptors/FetchInterceptor.ts +1 -1
- package/src/ui/Xenon.tsx +52 -10
- package/src/ui/components/bubble/Bubble.tsx +2 -2
- package/src/ui/components/common/ShareableText.tsx +21 -0
- package/src/ui/components/details/NetworkRequestDetails.tsx +42 -34
- package/src/ui/components/headers/NetworkHeader.tsx +14 -26
- package/src/ui/components/index.ts +3 -3
- package/src/ui/components/items/NetworkRequestDetailsItem.tsx +45 -18
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_react","require","
|
1
|
+
{"version":3,"names":["_react","require","_contexts","_utils","_colors","_interopRequireDefault","_icons","_types","_Divider","_DebuggerHeaderItem","_HeaderComponents","_jsxRuntime","e","__esModule","default","NetworkHeader","forwardRef","selectedPanel","style","ref","debuggerState","detailsData","setDebuggerState","useContext","MainContext","data","isWS","overviewShown","headersShown","requestShown","responseShown","messagesShown","getNetworkUtils","jsxs","Wrapper","children","jsx","Back","MainButtons","type","TabItem","tab","label","Fragment","content","icons","beautify","isActive","beautified","activeColor","colors","green","onPress","draft","share","NetworkType","WS","shareText","convertToCurl","method","url","requestHeaders","body","_default","exports"],"sourceRoot":"../../../../../src","sources":["ui/components/headers/Networ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B,mBAAA,CAAAK,OAAkB;QACjB8B,OAAO,EAAEC,cAAK,CAACC,QAAS;QACxBC,QAAQ,EAAE1B,WAAW,EAAE2B,UAAW;QAClCC,WAAW,EAAEC,eAAM,CAACC,KAAM;QAC1BC,OAAO,EAAEA,CAAA,KAAM;UACb9B,gBAAgB,CAAC+B,KAAK,IAAI;YACxBA,KAAK,CAAChC,WAAW,CAAE2B,UAAU,GAAG,CAACK,KAAK,CAAChC,WAAW,EAAE2B,UAAU;UAChE,CAAC,CAAC;QACJ;MAAE,CACH,CAAC,eACF,IAAArC,WAAA,CAAAyB,GAAA,EAAC3B,mBAAA,CAAAK,OAAkB;QACjB8B,OAAO,EAAEC,cAAK,CAACS,KAAM;QACrBF,OAAO,EAAE,MAAAA,CAAA,KAAY;UACnB,IAAI3B,IAAI,EAAEc,IAAI,KAAKgB,kBAAW,CAACC,EAAE,EAAE;UACnC,MAAM,IAAAC,gBAAS,EACb,IAAAC,oBAAa,EAACjC,IAAI,CAAEkC,MAAM,EAAElC,IAAI,CAAEmC,GAAG,EAAEnC,IAAI,CAAEoC,cAAc,EAAEpC,IAAI,CAAEqC,IAAI,CACzE,CAAC;QACH;MAAE,CACH,CAAC;IAAA,CACF,CACH;EAAA,CACuB,CAAC;AAE/B,CACF,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAlD,OAAA,GAEaC,aAAa","ignoreList":[]}
|
@@ -9,27 +9,27 @@ Object.defineProperty(exports, "Bubble", {
|
|
9
9
|
return _Bubble.default;
|
10
10
|
}
|
11
11
|
});
|
12
|
-
Object.defineProperty(exports, "
|
12
|
+
Object.defineProperty(exports, "Header", {
|
13
13
|
enumerable: true,
|
14
14
|
get: function () {
|
15
|
-
return
|
15
|
+
return _Header.default;
|
16
16
|
}
|
17
17
|
});
|
18
|
-
Object.defineProperty(exports, "
|
18
|
+
Object.defineProperty(exports, "IndexedStack", {
|
19
19
|
enumerable: true,
|
20
20
|
get: function () {
|
21
|
-
return
|
21
|
+
return _IndexedStack.default;
|
22
22
|
}
|
23
23
|
});
|
24
|
-
Object.defineProperty(exports, "
|
24
|
+
Object.defineProperty(exports, "Panel", {
|
25
25
|
enumerable: true,
|
26
26
|
get: function () {
|
27
|
-
return
|
27
|
+
return _Panel.default;
|
28
28
|
}
|
29
29
|
});
|
30
30
|
var _Bubble = _interopRequireDefault(require("./bubble/Bubble"));
|
31
|
-
var
|
32
|
-
var
|
33
|
-
var
|
31
|
+
var _Header = _interopRequireDefault(require("./headers/Header"));
|
32
|
+
var _Panel = _interopRequireDefault(require("./panels/Panel"));
|
33
|
+
var _IndexedStack = _interopRequireDefault(require("./common/IndexedStack"));
|
34
34
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
35
35
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_Bubble","_interopRequireDefault","require","
|
1
|
+
{"version":3,"names":["_Bubble","_interopRequireDefault","require","_Header","_Panel","_IndexedStack","e","__esModule","default"],"sourceRoot":"../../../../src","sources":["ui/components/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,aAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAAgE,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
|
@@ -6,31 +6,57 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.default = NetworkRequestDetailsItem;
|
7
7
|
var _reactNative = require("react-native");
|
8
8
|
var _colors = _interopRequireDefault(require("../../../theme/colors"));
|
9
|
+
var _utils = require("../../../core/utils");
|
10
|
+
var _ShareableText = _interopRequireDefault(require("../common/ShareableText"));
|
9
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
10
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
11
13
|
function NetworkRequestDetailsItem({
|
12
14
|
label,
|
13
15
|
content
|
14
16
|
}) {
|
15
|
-
|
16
|
-
|
17
|
-
|
17
|
+
const renderContent = () => {
|
18
|
+
switch (true) {
|
19
|
+
case typeof content === 'string':
|
20
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ShareableText.default, {
|
21
|
+
style: styles.text,
|
22
|
+
children: [content, (0, _utils.showNewLine)(!content.endsWith('\n'))]
|
23
|
+
});
|
24
|
+
case Array.isArray(content):
|
25
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
26
|
+
children: content.map(([key, value], index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
27
|
+
style: styles.pairContainer,
|
28
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
29
|
+
style: [styles.label, styles.subLabel],
|
30
|
+
children: [key, ':']
|
31
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ShareableText.default, {
|
32
|
+
style: styles.text,
|
33
|
+
children: [value, (0, _utils.showNewLine)(index === content.length - 1)]
|
34
|
+
})]
|
35
|
+
}, `${key}-${index}`))
|
36
|
+
});
|
37
|
+
}
|
38
|
+
};
|
39
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
40
|
+
style: styles.container,
|
41
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
18
42
|
style: styles.label,
|
19
|
-
children:
|
20
|
-
}),
|
21
|
-
style: [styles.label, styles.subLabel],
|
22
|
-
children: [key, ': ', /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
23
|
-
style: styles.text,
|
24
|
-
children: value
|
25
|
-
}), '\n']
|
26
|
-
}, key)), Array.isArray(content) || content?.endsWith('\n') ? '' : '\n']
|
43
|
+
children: label
|
44
|
+
}), renderContent()]
|
27
45
|
});
|
28
46
|
}
|
29
47
|
const styles = _reactNative.StyleSheet.create({
|
48
|
+
container: {
|
49
|
+
rowGap: 2
|
50
|
+
},
|
51
|
+
pairContainer: {
|
52
|
+
flexDirection: 'row',
|
53
|
+
columnGap: 4
|
54
|
+
},
|
30
55
|
text: {
|
31
56
|
fontSize: 14,
|
32
57
|
fontWeight: 'normal',
|
33
|
-
color: _colors.default.black
|
58
|
+
color: _colors.default.black,
|
59
|
+
flexShrink: 1
|
34
60
|
},
|
35
61
|
label: {
|
36
62
|
fontSize: 16,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_colors","_interopRequireDefault","_jsxRuntime","e","__esModule","default","NetworkRequestDetailsItem","label","content","
|
1
|
+
{"version":3,"names":["_reactNative","require","_colors","_interopRequireDefault","_utils","_ShareableText","_jsxRuntime","e","__esModule","default","NetworkRequestDetailsItem","label","content","renderContent","jsxs","style","styles","text","children","showNewLine","endsWith","Array","isArray","jsx","View","map","key","value","index","pairContainer","Text","subLabel","length","container","StyleSheet","create","rowGap","flexDirection","columnGap","fontSize","fontWeight","color","colors","black","flexShrink"],"sourceRoot":"../../../../../src","sources":["ui/components/items/NetworkRequestDetailsItem.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAF,sBAAA,CAAAF,OAAA;AAAoD,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAE,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAOrC,SAASG,yBAAyBA,CAAC;EAChDC,KAAK;EACLC;AAC8B,CAAC,EAAE;EACjC,MAAMC,aAAa,GAAGA,CAAA,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BAC5B,IAAAZ,WAAA,CAAAiB,GAAA,EAACvB,YAAA,CAAA8B,IAAI;MAACf,KAAK,EAAEC,MAAM,CAACL,KAAM;MAAAO,QAAA,EAAEP;IAAK,CAAO,CAAC,EACxCE,aAAa,CAAC,CAAC;EAAA,CACZ,CAAC;AAEX;AAEA,MAAMG,MAAM,GAAGkB,uBAAU,CAACC,MAAM,CAAC;EAC/BF,SAAS,EAAE;IACTG,MAAM,EAAE;EACV,CAAC;EACDP,aAAa,EAAE;IACbQ,aAAa,EAAE,KAAK;IACpBC,SAAS,EAAE;EACb,CAAC;EACDrB,IAAI,EAAE;IACJsB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,QAAQ;IACpBC,KAAK,EAAEC,eAAM,CAACC,KAAK;IACnBC,UAAU,EAAE;EACd,CAAC;EACDjC,KAAK,EAAE;IACL4B,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,MAAM;IAClBC,KAAK,EAAEC,eAAM,CAACC;EAChB,CAAC;EACDZ,QAAQ,EAAE;IACRQ,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { URL } from 'react-native-url-polyfill';
|
2
2
|
import { type HttpRequest, type LogMessage, type WebSocketRequest } from '../types';
|
3
|
+
export declare const shareText: (text: string) => Promise<void>;
|
3
4
|
export declare const getNetworkUtils: (data?: HttpRequest | WebSocketRequest) => {
|
4
|
-
|
5
|
+
isWS?: undefined;
|
5
6
|
requestUrl?: undefined;
|
6
7
|
overviewShown?: undefined;
|
7
8
|
headersShown?: undefined;
|
@@ -9,7 +10,7 @@ export declare const getNetworkUtils: (data?: HttpRequest | WebSocketRequest) =>
|
|
9
10
|
responseShown?: undefined;
|
10
11
|
messagesShown?: undefined;
|
11
12
|
} | {
|
12
|
-
|
13
|
+
isWS: boolean;
|
13
14
|
requestUrl: URL;
|
14
15
|
overviewShown: boolean;
|
15
16
|
headersShown: boolean;
|
@@ -21,6 +22,7 @@ export declare const getConsoleTypeColor: (type: LogMessage["type"]) => string;
|
|
21
22
|
export declare const getVerticalSafeMargin: (screenHeight: number) => number;
|
22
23
|
export declare const clamp: (value: number, min: number, max: number) => number;
|
23
24
|
export declare const getHttpInterceptorId: () => string;
|
25
|
+
export declare const showNewLine: (when: boolean) => "\n" | "";
|
24
26
|
export declare const keyValueToString: (key: string, value: any, newLine?: "leading" | "trailing" | null) => string;
|
25
27
|
export declare const formatRequestMethod: (method?: string) => string;
|
26
28
|
export declare const formatRequestDuration: (startTime?: number, endTime?: number) => string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/core/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAe,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/core/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAe,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAOjG,eAAO,MAAM,SAAS,SAAgB,MAAM,kBAgB3C,CAAC;AAEF,eAAO,MAAM,eAAe,UAAW,WAAW,GAAG,gBAAgB;;;;;;;;;;;;;;;;CAuBpE,CAAC;AAKF,eAAO,MAAM,mBAAmB,SAAU,UAAU,CAAC,MAAM,CAAC,WAsB3D,CAAC;AAGF,eAAO,MAAM,qBAAqB,iBAAkB,MAAM,WAAqB,CAAC;AAEhF,eAAO,MAAM,KAAK,UAAW,MAAM,OAAO,MAAM,OAAO,MAAM,WACxB,CAAC;AAEtC,eAAO,MAAM,oBAAoB,cAIhC,CAAC;AAIF,eAAO,MAAM,WAAW,SAAU,OAAO,cAAuB,CAAC;AAUjE,eAAO,MAAM,gBAAgB,QACtB,MAAM,SACJ,GAAG,YACD,SAAS,GAAG,UAAU,GAAG,IAAI,KACrC,MACsG,CAAC;AAE1G,eAAO,MAAM,mBAAmB,YAAa,MAAM,WAAoB,CAAC;AAExE,eAAO,MAAM,qBAAqB,eAAgB,MAAM,YAAY,MAAM,WAGzE,CAAC;AAEF,eAAO,MAAM,uBAAuB,gBAAiB,MAAM,WAAiC,CAAC;AAE7F,eAAO,MAAM,gBAAgB,WAAY,GAAG,EAAE,QAE7C,CAAC;AAEF,eAAO,MAAM,QAAQ,SAAU,GAAG,cAAc,OAAO,WAStD,CAAC;AAEF,eAAO,MAAM,aAAa,WAChB,WAAW,CAAC,QAAQ,CAAC,OACxB,WAAW,CAAC,KAAK,CAAC,WACd,WAAW,CAAC,gBAAgB,CAAC,QAChC,WAAW,CAAC,MAAM,CAAC,WAgB1B,CAAC;AAIF,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,QAIrC;AAED,wBAAgB,SAAS,CAAC,CAAC,SAAS;IAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAA;CAAE,EAAE,WAAW,EAAE,CAAC;kBAIvD,GAAG,EAAE;;MAS7B"}
|
@@ -1,7 +1,8 @@
|
|
1
1
|
interface NetworkInterceptorParams {
|
2
2
|
autoEnabled: boolean;
|
3
|
+
includeDomains?: string[];
|
3
4
|
}
|
4
|
-
export default function useNetworkInterceptor({ autoEnabled }: NetworkInterceptorParams): {
|
5
|
+
export default function useNetworkInterceptor({ autoEnabled, includeDomains, }: NetworkInterceptorParams): {
|
5
6
|
isInterceptorEnabled: boolean;
|
6
7
|
enableInterception: () => void;
|
7
8
|
disableInterception: () => void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useNetworkInterceptor.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/useNetworkInterceptor.ts"],"names":[],"mappings":"AAcA,UAAU,wBAAwB;IAChC,WAAW,EAAE,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"useNetworkInterceptor.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/useNetworkInterceptor.ts"],"names":[],"mappings":"AAcA,UAAU,wBAAwB;IAChC,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAUD,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAC5C,WAAW,EACX,cAAc,GACf,EAAE,wBAAwB;;;;;;EA4P1B"}
|
@@ -1,17 +1,57 @@
|
|
1
|
-
import { type ReactNode } from 'react';
|
1
|
+
import { type JSX, type ReactNode } from 'react';
|
2
2
|
declare namespace Xenon {
|
3
3
|
interface Props {
|
4
|
-
|
4
|
+
/**
|
5
|
+
* Determines whether the network inspector is automatically enabled upon initialization.
|
6
|
+
* @default true
|
7
|
+
*/
|
5
8
|
autoInspectNetworkEnabled?: boolean;
|
9
|
+
/**
|
10
|
+
* Determines whether the console inspector is automatically enabled upon initialization.
|
11
|
+
* @default true
|
12
|
+
*/
|
6
13
|
autoInspectConsoleEnabled?: boolean;
|
14
|
+
/**
|
15
|
+
* Defines the size of the interactive bubble used in the UI.
|
16
|
+
* @default 40
|
17
|
+
*/
|
7
18
|
bubbleSize?: number;
|
19
|
+
/**
|
20
|
+
* Defines the opacity level of the bubble when it is idle.
|
21
|
+
* @default 0.5
|
22
|
+
*/
|
8
23
|
idleBubbleOpacity?: number;
|
9
|
-
|
24
|
+
/**
|
25
|
+
* Domains to include in network interception. Defaults to all domains.
|
26
|
+
* @default undefined
|
27
|
+
* @example ['example1.com', 'api.example2.com']
|
28
|
+
*/
|
29
|
+
includeDomains?: string[];
|
30
|
+
}
|
31
|
+
interface WrapperProps extends Props {
|
32
|
+
/**
|
33
|
+
* If true, completely disables the debugger by rendering only the children components without any debugging functionality.
|
34
|
+
* @default false
|
35
|
+
*/
|
36
|
+
disabled?: boolean;
|
37
|
+
children: ReactNode;
|
10
38
|
}
|
39
|
+
/**
|
40
|
+
* Checks whether the debugger is currently visible.
|
41
|
+
* @returns `true` if the debugger is currently visible, otherwise `false`.
|
42
|
+
*/
|
11
43
|
export const isVisible: () => boolean;
|
44
|
+
/**
|
45
|
+
* Makes the debugger visible. If it is already visible, this method has no additional effect.
|
46
|
+
* @returns `void`
|
47
|
+
*/
|
12
48
|
export const show: () => void;
|
49
|
+
/**
|
50
|
+
* Hides the debugger. If it is already hidden, this method has no additional effect.
|
51
|
+
* @returns `void`
|
52
|
+
*/
|
13
53
|
export const hide: () => void;
|
14
|
-
export function Wrapper({ disabled, children, ...props }:
|
54
|
+
export function Wrapper({ disabled, children, ...props }: WrapperProps): JSX.Element;
|
15
55
|
export namespace Wrapper {
|
16
56
|
var displayName: string;
|
17
57
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Xenon.d.ts","sourceRoot":"","sources":["../../../../../src/ui/Xenon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"Xenon.d.ts","sourceRoot":"","sources":["../../../../../src/ui/Xenon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiD,KAAK,GAAG,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAYhG,kBAAU,KAAK,CAAC;IAOd,UAAU,KAAK;QACb;;;WAGG;QACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;QACpC;;;WAGG;QACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;QACpC;;;WAGG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB;;;WAGG;QACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B;;;;WAIG;QACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;KAC3B;IAED,UAAU,YAAa,SAAQ,KAAK;QAClC;;;WAGG;QACH,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,QAAQ,EAAE,SAAS,CAAC;KACrB;IAsBD;;;OAGG;IACH,MAAM,CAAC,MAAM,SAAS,eAA0C,CAAC;IAEjE;;;OAGG;IACH,MAAM,CAAC,MAAM,IAAI,QAAO,IAA2B,CAAC;IAEpD;;;OAGG;IACH,MAAM,CAAC,MAAM,IAAI,QAAO,IAA2B,CAAC;IAkFpD,MAAM,UAAU,OAAO,CAAC,EAAE,QAAgB,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAe3F;IAfD,MAAM,WAAU,OAAO;;;;CAkBxB;AAED,eAAe,KAAK,CAAC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { type TextProps } from 'react-native';
|
2
|
+
interface ShareableTextProps extends TextProps {
|
3
|
+
children: string | string[];
|
4
|
+
}
|
5
|
+
export default function ShareableText({ children, ...props }: ShareableTextProps): import("react/jsx-runtime").JSX.Element;
|
6
|
+
export {};
|
7
|
+
//# sourceMappingURL=ShareableText.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ShareableText.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/common/ShareableText.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpD,UAAU,kBAAmB,SAAQ,SAAS;IAC5C,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,2CAa/E"}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import {
|
1
|
+
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
2
2
|
declare const NetworkRequestDetails: import("react").ForwardRefExoticComponent<{
|
3
3
|
style?: StyleProp<ViewStyle>;
|
4
|
-
} & import("react").RefAttributes<
|
4
|
+
} & import("react").RefAttributes<View>>;
|
5
5
|
export default NetworkRequestDetails;
|
6
6
|
//# sourceMappingURL=NetworkRequestDetails.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NetworkRequestDetails.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/details/NetworkRequestDetails.tsx"],"names":[],"mappings":"AACA,OAAO,
|
1
|
+
{"version":3,"file":"NetworkRequestDetails.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/details/NetworkRequestDetails.tsx"],"names":[],"mappings":"AACA,OAAO,EAA0B,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAmB5F,QAAA,MAAM,qBAAqB;YAA8B,SAAS,CAAC,SAAS,CAAC;wCA8J5E,CAAC;AA0BF,eAAe,qBAAqB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NetworkHeader.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/headers/NetworkHeader.tsx"],"names":[],"mappings":"AACA,OAAO,
|
1
|
+
{"version":3,"file":"NetworkHeader.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/headers/NetworkHeader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE/E,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AASrD,UAAU,kBAAkB;IAC1B,aAAa,EAAE,UAAU,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,QAAA,MAAM,aAAa,2GAqDlB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
export { default as Bubble } from './bubble/Bubble';
|
2
|
-
export { default as
|
3
|
-
export { default as
|
4
|
-
export { default as
|
2
|
+
export { default as Header } from './headers/Header';
|
3
|
+
export { default as Panel } from './panels/Panel';
|
4
|
+
export { default as IndexedStack } from './common/IndexedStack';
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NetworkRequestDetailsItem.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/items/NetworkRequestDetailsItem.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"NetworkRequestDetailsItem.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/items/NetworkRequestDetailsItem.tsx"],"names":[],"mappings":"AAKA,UAAU,8BAA8B;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,EAChD,KAAK,EACL,OAAO,GACR,EAAE,8BAA8B,2CAqChC"}
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { URL } from 'react-native-url-polyfill';
|
2
2
|
import { type HttpRequest, type LogMessage, type WebSocketRequest } from '../types';
|
3
|
+
export declare const shareText: (text: string) => Promise<void>;
|
3
4
|
export declare const getNetworkUtils: (data?: HttpRequest | WebSocketRequest) => {
|
4
|
-
|
5
|
+
isWS?: undefined;
|
5
6
|
requestUrl?: undefined;
|
6
7
|
overviewShown?: undefined;
|
7
8
|
headersShown?: undefined;
|
@@ -9,7 +10,7 @@ export declare const getNetworkUtils: (data?: HttpRequest | WebSocketRequest) =>
|
|
9
10
|
responseShown?: undefined;
|
10
11
|
messagesShown?: undefined;
|
11
12
|
} | {
|
12
|
-
|
13
|
+
isWS: boolean;
|
13
14
|
requestUrl: URL;
|
14
15
|
overviewShown: boolean;
|
15
16
|
headersShown: boolean;
|
@@ -21,6 +22,7 @@ export declare const getConsoleTypeColor: (type: LogMessage["type"]) => string;
|
|
21
22
|
export declare const getVerticalSafeMargin: (screenHeight: number) => number;
|
22
23
|
export declare const clamp: (value: number, min: number, max: number) => number;
|
23
24
|
export declare const getHttpInterceptorId: () => string;
|
25
|
+
export declare const showNewLine: (when: boolean) => "\n" | "";
|
24
26
|
export declare const keyValueToString: (key: string, value: any, newLine?: "leading" | "trailing" | null) => string;
|
25
27
|
export declare const formatRequestMethod: (method?: string) => string;
|
26
28
|
export declare const formatRequestDuration: (startTime?: number, endTime?: number) => string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/core/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAe,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/core/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAe,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAOjG,eAAO,MAAM,SAAS,SAAgB,MAAM,kBA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
|
+
includeDomains?: string[];
|
3
4
|
}
|
4
|
-
export default function useNetworkInterceptor({ autoEnabled }: NetworkInterceptorParams): {
|
5
|
+
export default function useNetworkInterceptor({ autoEnabled, includeDomains, }: NetworkInterceptorParams): {
|
5
6
|
isInterceptorEnabled: boolean;
|
6
7
|
enableInterception: () => void;
|
7
8
|
disableInterception: () => void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useNetworkInterceptor.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/useNetworkInterceptor.ts"],"names":[],"mappings":"AAcA,UAAU,wBAAwB;IAChC,WAAW,EAAE,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"useNetworkInterceptor.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/useNetworkInterceptor.ts"],"names":[],"mappings":"AAcA,UAAU,wBAAwB;IAChC,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAUD,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAC5C,WAAW,EACX,cAAc,GACf,EAAE,wBAAwB;;;;;;EA4P1B"}
|
@@ -1,17 +1,57 @@
|
|
1
|
-
import { type ReactNode } from 'react';
|
1
|
+
import { type JSX, type ReactNode } from 'react';
|
2
2
|
declare namespace Xenon {
|
3
3
|
interface Props {
|
4
|
-
|
4
|
+
/**
|
5
|
+
* Determines whether the network inspector is automatically enabled upon initialization.
|
6
|
+
* @default true
|
7
|
+
*/
|
5
8
|
autoInspectNetworkEnabled?: boolean;
|
9
|
+
/**
|
10
|
+
* Determines whether the console inspector is automatically enabled upon initialization.
|
11
|
+
* @default true
|
12
|
+
*/
|
6
13
|
autoInspectConsoleEnabled?: boolean;
|
14
|
+
/**
|
15
|
+
* Defines the size of the interactive bubble used in the UI.
|
16
|
+
* @default 40
|
17
|
+
*/
|
7
18
|
bubbleSize?: number;
|
19
|
+
/**
|
20
|
+
* Defines the opacity level of the bubble when it is idle.
|
21
|
+
* @default 0.5
|
22
|
+
*/
|
8
23
|
idleBubbleOpacity?: number;
|
9
|
-
|
24
|
+
/**
|
25
|
+
* Domains to include in network interception. Defaults to all domains.
|
26
|
+
* @default undefined
|
27
|
+
* @example ['example1.com', 'api.example2.com']
|
28
|
+
*/
|
29
|
+
includeDomains?: string[];
|
30
|
+
}
|
31
|
+
interface WrapperProps extends Props {
|
32
|
+
/**
|
33
|
+
* If true, completely disables the debugger by rendering only the children components without any debugging functionality.
|
34
|
+
* @default false
|
35
|
+
*/
|
36
|
+
disabled?: boolean;
|
37
|
+
children: ReactNode;
|
10
38
|
}
|
39
|
+
/**
|
40
|
+
* Checks whether the debugger is currently visible.
|
41
|
+
* @returns `true` if the debugger is currently visible, otherwise `false`.
|
42
|
+
*/
|
11
43
|
export const isVisible: () => boolean;
|
44
|
+
/**
|
45
|
+
* Makes the debugger visible. If it is already visible, this method has no additional effect.
|
46
|
+
* @returns `void`
|
47
|
+
*/
|
12
48
|
export const show: () => void;
|
49
|
+
/**
|
50
|
+
* Hides the debugger. If it is already hidden, this method has no additional effect.
|
51
|
+
* @returns `void`
|
52
|
+
*/
|
13
53
|
export const hide: () => void;
|
14
|
-
export function Wrapper({ disabled, children, ...props }:
|
54
|
+
export function Wrapper({ disabled, children, ...props }: WrapperProps): JSX.Element;
|
15
55
|
export namespace Wrapper {
|
16
56
|
var displayName: string;
|
17
57
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Xenon.d.ts","sourceRoot":"","sources":["../../../../../src/ui/Xenon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"Xenon.d.ts","sourceRoot":"","sources":["../../../../../src/ui/Xenon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiD,KAAK,GAAG,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAYhG,kBAAU,KAAK,CAAC;IAOd,UAAU,KAAK;QACb;;;WAGG;QACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;QACpC;;;WAGG;QACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;QACpC;;;WAGG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB;;;WAGG;QACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B;;;;WAIG;QACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;KAC3B;IAED,UAAU,YAAa,SAAQ,KAAK;QAClC;;;WAGG;QACH,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,QAAQ,EAAE,SAAS,CAAC;KACrB;IAsBD;;;OAGG;IACH,MAAM,CAAC,MAAM,SAAS,eAA0C,CAAC;IAEjE;;;OAGG;IACH,MAAM,CAAC,MAAM,IAAI,QAAO,IAA2B,CAAC;IAEpD;;;OAGG;IACH,MAAM,CAAC,MAAM,IAAI,QAAO,IAA2B,CAAC;IAkFpD,MAAM,UAAU,OAAO,CAAC,EAAE,QAAgB,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAe3F;IAfD,MAAM,WAAU,OAAO;;;;CAkBxB;AAED,eAAe,KAAK,CAAC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { type TextProps } from 'react-native';
|
2
|
+
interface ShareableTextProps extends TextProps {
|
3
|
+
children: string | string[];
|
4
|
+
}
|
5
|
+
export default function ShareableText({ children, ...props }: ShareableTextProps): import("react/jsx-runtime").JSX.Element;
|
6
|
+
export {};
|
7
|
+
//# sourceMappingURL=ShareableText.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ShareableText.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/common/ShareableText.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpD,UAAU,kBAAmB,SAAQ,SAAS;IAC5C,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,2CAa/E"}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import {
|
1
|
+
import { View, type StyleProp, type ViewStyle } from 'react-native';
|
2
2
|
declare const NetworkRequestDetails: import("react").ForwardRefExoticComponent<{
|
3
3
|
style?: StyleProp<ViewStyle>;
|
4
|
-
} & import("react").RefAttributes<
|
4
|
+
} & import("react").RefAttributes<View>>;
|
5
5
|
export default NetworkRequestDetails;
|
6
6
|
//# sourceMappingURL=NetworkRequestDetails.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NetworkRequestDetails.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/details/NetworkRequestDetails.tsx"],"names":[],"mappings":"AACA,OAAO,
|
1
|
+
{"version":3,"file":"NetworkRequestDetails.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/details/NetworkRequestDetails.tsx"],"names":[],"mappings":"AACA,OAAO,EAA0B,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAmB5F,QAAA,MAAM,qBAAqB;YAA8B,SAAS,CAAC,SAAS,CAAC;wCA8J5E,CAAC;AA0BF,eAAe,qBAAqB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NetworkHeader.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/headers/NetworkHeader.tsx"],"names":[],"mappings":"AACA,OAAO,
|
1
|
+
{"version":3,"file":"NetworkHeader.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/headers/NetworkHeader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE/E,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AASrD,UAAU,kBAAkB;IAC1B,aAAa,EAAE,UAAU,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,QAAA,MAAM,aAAa,2GAqDlB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
export { default as Bubble } from './bubble/Bubble';
|
2
|
-
export { default as
|
3
|
-
export { default as
|
4
|
-
export { default as
|
2
|
+
export { default as Header } from './headers/Header';
|
3
|
+
export { default as Panel } from './panels/Panel';
|
4
|
+
export { default as IndexedStack } from './common/IndexedStack';
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NetworkRequestDetailsItem.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/items/NetworkRequestDetailsItem.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"NetworkRequestDetailsItem.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/items/NetworkRequestDetailsItem.tsx"],"names":[],"mappings":"AAKA,UAAU,8BAA8B;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,EAChD,KAAK,EACL,OAAO,GACR,EAAE,8BAA8B,2CAqChC"}
|
package/package.json
CHANGED
package/src/core/utils.ts
CHANGED
@@ -1,23 +1,45 @@
|
|
1
1
|
import { URL } from 'react-native-url-polyfill';
|
2
2
|
import { NetworkType, type HttpRequest, type LogMessage, type WebSocketRequest } from '../types';
|
3
3
|
import colors from '../theme/colors';
|
4
|
+
import { Share } from 'react-native';
|
5
|
+
import refs, { DebuggerVisibility } from './refs';
|
6
|
+
|
7
|
+
let isSharing = false;
|
8
|
+
|
9
|
+
export const shareText = async (text: string) => {
|
10
|
+
if (isSharing) return;
|
11
|
+
|
12
|
+
try {
|
13
|
+
isSharing = true;
|
14
|
+
refs.debugger.current?.setCurrentIndex(DebuggerVisibility.Bubble);
|
15
|
+
|
16
|
+
await Share.share({
|
17
|
+
message: text.trim(),
|
18
|
+
});
|
19
|
+
} catch (error) {
|
20
|
+
// Handle error
|
21
|
+
} finally {
|
22
|
+
refs.debugger.current?.setCurrentIndex(DebuggerVisibility.Panel);
|
23
|
+
isSharing = false;
|
24
|
+
}
|
25
|
+
};
|
4
26
|
|
5
27
|
export const getNetworkUtils = (data?: HttpRequest | WebSocketRequest) => {
|
6
28
|
if (!data || !data.url) return {};
|
7
29
|
|
8
|
-
const
|
30
|
+
const isWS = data?.type === NetworkType.WS;
|
9
31
|
const requestUrl = new URL(data.url);
|
10
32
|
|
11
33
|
const overviewShown = !!data.url;
|
12
|
-
const httpHeadersShown =
|
13
|
-
const websocketHeadersShown =
|
34
|
+
const httpHeadersShown = !isWS && (!!data.requestHeaders?.size || !!data.responseHeaders?.size);
|
35
|
+
const websocketHeadersShown = isWS && !!Object.keys(data.options?.headers ?? {}).length;
|
14
36
|
const headersShown = httpHeadersShown || websocketHeadersShown;
|
15
|
-
const requestShown =
|
16
|
-
const responseShown =
|
17
|
-
const messagesShown =
|
37
|
+
const requestShown = !isWS && (!!requestUrl.search || !!data.body);
|
38
|
+
const responseShown = !isWS && !!data.response;
|
39
|
+
const messagesShown = isWS && !!data.messages;
|
18
40
|
|
19
41
|
return {
|
20
|
-
|
42
|
+
isWS,
|
21
43
|
requestUrl,
|
22
44
|
overviewShown,
|
23
45
|
headersShown,
|
@@ -68,6 +90,8 @@ export const getHttpInterceptorId = () => {
|
|
68
90
|
//#endregion
|
69
91
|
|
70
92
|
//#region formatters
|
93
|
+
export const showNewLine = (when: boolean) => (when ? '\n' : '');
|
94
|
+
|
71
95
|
const limitChar = (value: any, limit = 5000) => {
|
72
96
|
const stringValue = typeof value === 'string' ? value : JSON.stringify(value ?? '');
|
73
97
|
|
@@ -81,7 +105,7 @@ export const keyValueToString = (
|
|
81
105
|
value: any,
|
82
106
|
newLine: 'leading' | 'trailing' | null = 'trailing',
|
83
107
|
): string =>
|
84
|
-
`${newLine === 'leading' ? '\n' : ''}${key}: ${limitChar(value)}${newLine === 'trailing'
|
108
|
+
`${newLine === 'leading' ? '\n' : ''}${key}: ${limitChar(value)}${showNewLine(newLine === 'trailing')}`;
|
85
109
|
|
86
110
|
export const formatRequestMethod = (method?: string) => method ?? 'GET';
|
87
111
|
|