react-native-network-lens 0.0.0-stage → 0.1.1
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 +20 -0
- package/README.md +208 -2
- package/lib/module/backHandler.js +31 -0
- package/lib/module/backHandler.js.map +1 -0
- package/lib/module/components/BodyViewer.js +213 -0
- package/lib/module/components/BodyViewer.js.map +1 -0
- package/lib/module/components/CodeList.js +104 -0
- package/lib/module/components/CodeList.js.map +1 -0
- package/lib/module/components/JsonTree/JsonTreeView.js +206 -0
- package/lib/module/components/JsonTree/JsonTreeView.js.map +1 -0
- package/lib/module/components/JsonTree/model.js +196 -0
- package/lib/module/components/JsonTree/model.js.map +1 -0
- package/lib/module/components/NetworkLens.js +110 -0
- package/lib/module/components/NetworkLens.js.map +1 -0
- package/lib/module/components/NetworkLensOverlay.js +158 -0
- package/lib/module/components/NetworkLensOverlay.js.map +1 -0
- package/lib/module/components/RawTextView.js +119 -0
- package/lib/module/components/RawTextView.js.map +1 -0
- package/lib/module/components/RequestDetails/RequestDetails.js +256 -0
- package/lib/module/components/RequestDetails/RequestDetails.js.map +1 -0
- package/lib/module/components/RequestList/FilterBar.js +138 -0
- package/lib/module/components/RequestList/FilterBar.js.map +1 -0
- package/lib/module/components/RequestList/RequestList.js +163 -0
- package/lib/module/components/RequestList/RequestList.js.map +1 -0
- package/lib/module/components/RequestList/RequestRow.js +161 -0
- package/lib/module/components/RequestList/RequestRow.js.map +1 -0
- package/lib/module/components/RequestList/filters.js +57 -0
- package/lib/module/components/RequestList/filters.js.map +1 -0
- package/lib/module/components/ui/ActionSheet.js +94 -0
- package/lib/module/components/ui/ActionSheet.js.map +1 -0
- package/lib/module/components/ui/Button.js +104 -0
- package/lib/module/components/ui/Button.js.map +1 -0
- package/lib/module/components/ui/Pill.js +53 -0
- package/lib/module/components/ui/Pill.js.map +1 -0
- package/lib/module/components/ui/SearchInput.js +77 -0
- package/lib/module/components/ui/SearchInput.js.map +1 -0
- package/lib/module/components/ui/Section.js +147 -0
- package/lib/module/components/ui/Section.js.map +1 -0
- package/lib/module/components/ui/SegmentedControl.js +65 -0
- package/lib/module/components/ui/SegmentedControl.js.map +1 -0
- package/lib/module/components/ui/index.js +9 -0
- package/lib/module/components/ui/index.js.map +1 -0
- package/lib/module/core/Logger.js +230 -0
- package/lib/module/core/Logger.js.map +1 -0
- package/lib/module/core/NetworkRequest.js +155 -0
- package/lib/module/core/NetworkRequest.js.map +1 -0
- package/lib/module/core/XHRInterceptor.js +104 -0
- package/lib/module/core/XHRInterceptor.js.map +1 -0
- package/lib/module/core/har.js +72 -0
- package/lib/module/core/har.js.map +1 -0
- package/lib/module/core/loggerSingleton.js +12 -0
- package/lib/module/core/loggerSingleton.js.map +1 -0
- package/lib/module/hooks.js +42 -0
- package/lib/module/hooks.js.map +1 -0
- package/lib/module/index.js +34 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/theme.js +136 -0
- package/lib/module/theme.js.map +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/utils/body.js +179 -0
- package/lib/module/utils/body.js.map +1 -0
- package/lib/module/utils/debounce.js +18 -0
- package/lib/module/utils/debounce.js.map +1 -0
- package/lib/module/utils/format.js +45 -0
- package/lib/module/utils/format.js.map +1 -0
- package/lib/module/utils/logger.js +6 -0
- package/lib/module/utils/logger.js.map +1 -0
- package/lib/module/utils/search.js +70 -0
- package/lib/module/utils/search.js.map +1 -0
- package/lib/module/utils/url.js +50 -0
- package/lib/module/utils/url.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/backHandler.d.ts +15 -0
- package/lib/typescript/src/backHandler.d.ts.map +1 -0
- package/lib/typescript/src/components/BodyViewer.d.ts +16 -0
- package/lib/typescript/src/components/BodyViewer.d.ts.map +1 -0
- package/lib/typescript/src/components/CodeList.d.ts +21 -0
- package/lib/typescript/src/components/CodeList.d.ts.map +1 -0
- package/lib/typescript/src/components/JsonTree/JsonTreeView.d.ts +21 -0
- package/lib/typescript/src/components/JsonTree/JsonTreeView.d.ts.map +1 -0
- package/lib/typescript/src/components/JsonTree/model.d.ts +53 -0
- package/lib/typescript/src/components/JsonTree/model.d.ts.map +1 -0
- package/lib/typescript/src/components/NetworkLens.d.ts +31 -0
- package/lib/typescript/src/components/NetworkLens.d.ts.map +1 -0
- package/lib/typescript/src/components/NetworkLensOverlay.d.ts +32 -0
- package/lib/typescript/src/components/NetworkLensOverlay.d.ts.map +1 -0
- package/lib/typescript/src/components/RawTextView.d.ts +14 -0
- package/lib/typescript/src/components/RawTextView.d.ts.map +1 -0
- package/lib/typescript/src/components/RequestDetails/RequestDetails.d.ts +9 -0
- package/lib/typescript/src/components/RequestDetails/RequestDetails.d.ts.map +1 -0
- package/lib/typescript/src/components/RequestList/FilterBar.d.ts +12 -0
- package/lib/typescript/src/components/RequestList/FilterBar.d.ts.map +1 -0
- package/lib/typescript/src/components/RequestList/RequestList.d.ts +18 -0
- package/lib/typescript/src/components/RequestList/RequestList.d.ts.map +1 -0
- package/lib/typescript/src/components/RequestList/RequestRow.d.ts +11 -0
- package/lib/typescript/src/components/RequestList/RequestRow.d.ts.map +1 -0
- package/lib/typescript/src/components/RequestList/filters.d.ts +17 -0
- package/lib/typescript/src/components/RequestList/filters.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/ActionSheet.d.ts +15 -0
- package/lib/typescript/src/components/ui/ActionSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Button.d.ts +21 -0
- package/lib/typescript/src/components/ui/Button.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Pill.d.ts +11 -0
- package/lib/typescript/src/components/ui/Pill.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/SearchInput.d.ts +17 -0
- package/lib/typescript/src/components/ui/SearchInput.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Section.d.ts +16 -0
- package/lib/typescript/src/components/ui/Section.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/SegmentedControl.d.ts +14 -0
- package/lib/typescript/src/components/ui/SegmentedControl.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/index.d.ts +7 -0
- package/lib/typescript/src/components/ui/index.d.ts.map +1 -0
- package/lib/typescript/src/core/Logger.d.ts +48 -0
- package/lib/typescript/src/core/Logger.d.ts.map +1 -0
- package/lib/typescript/src/core/NetworkRequest.d.ts +48 -0
- package/lib/typescript/src/core/NetworkRequest.d.ts.map +1 -0
- package/lib/typescript/src/core/XHRInterceptor.d.ts +29 -0
- package/lib/typescript/src/core/XHRInterceptor.d.ts.map +1 -0
- package/lib/typescript/src/core/har.d.ts +65 -0
- package/lib/typescript/src/core/har.d.ts.map +1 -0
- package/lib/typescript/src/core/loggerSingleton.d.ts +9 -0
- package/lib/typescript/src/core/loggerSingleton.d.ts.map +1 -0
- package/lib/typescript/src/hooks.d.ts +11 -0
- package/lib/typescript/src/hooks.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +33 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/theme.d.ts +49 -0
- package/lib/typescript/src/theme.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +80 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/lib/typescript/src/utils/body.d.ts +19 -0
- package/lib/typescript/src/utils/body.d.ts.map +1 -0
- package/lib/typescript/src/utils/debounce.d.ts +4 -0
- package/lib/typescript/src/utils/debounce.d.ts.map +1 -0
- package/lib/typescript/src/utils/format.d.ts +7 -0
- package/lib/typescript/src/utils/format.d.ts.map +1 -0
- package/lib/typescript/src/utils/logger.d.ts +2 -0
- package/lib/typescript/src/utils/logger.d.ts.map +1 -0
- package/lib/typescript/src/utils/search.d.ts +17 -0
- package/lib/typescript/src/utils/search.d.ts.map +1 -0
- package/lib/typescript/src/utils/url.d.ts +15 -0
- package/lib/typescript/src/utils/url.d.ts.map +1 -0
- package/package.json +186 -4
- package/src/backHandler.ts +29 -0
- package/src/components/BodyViewer.tsx +250 -0
- package/src/components/CodeList.tsx +120 -0
- package/src/components/JsonTree/JsonTreeView.tsx +304 -0
- package/src/components/JsonTree/model.ts +266 -0
- package/src/components/NetworkLens.tsx +176 -0
- package/src/components/NetworkLensOverlay.tsx +187 -0
- package/src/components/RawTextView.tsx +163 -0
- package/src/components/RequestDetails/RequestDetails.tsx +315 -0
- package/src/components/RequestList/FilterBar.tsx +168 -0
- package/src/components/RequestList/RequestList.tsx +226 -0
- package/src/components/RequestList/RequestRow.tsx +150 -0
- package/src/components/RequestList/filters.ts +98 -0
- package/src/components/ui/ActionSheet.tsx +109 -0
- package/src/components/ui/Button.tsx +124 -0
- package/src/components/ui/Pill.tsx +53 -0
- package/src/components/ui/SearchInput.tsx +97 -0
- package/src/components/ui/Section.tsx +133 -0
- package/src/components/ui/SegmentedControl.tsx +79 -0
- package/src/components/ui/index.ts +6 -0
- package/src/core/Logger.ts +293 -0
- package/src/core/NetworkRequest.ts +216 -0
- package/src/core/XHRInterceptor.ts +179 -0
- package/src/core/har.ts +71 -0
- package/src/core/loggerSingleton.ts +14 -0
- package/src/hooks.ts +51 -0
- package/src/index.tsx +56 -0
- package/src/theme.ts +174 -0
- package/src/types.ts +83 -0
- package/src/utils/body.ts +194 -0
- package/src/utils/debounce.ts +18 -0
- package/src/utils/format.ts +50 -0
- package/src/utils/logger.ts +3 -0
- package/src/utils/search.ts +72 -0
- package/src/utils/url.ts +59 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["extractHost","url","match","exec","parseQueryString","search","result","trimmed","replace","pair","split","eq","indexOf","rawKey","slice","rawValue","key","safeDecode","value","decodeURIComponent","parseUrl","host","afterHost","length","hashIndex","withoutHash","qIndex","path","query","hasQuery"],"sourceRoot":"../../../src","sources":["utils/url.ts"],"mappings":";;AAAA;AACA;AACA;AACA;;AASA,OAAO,MAAMA,WAAW,GAAIC,GAAW,IAAa;EAClD,MAAMC,KAAK,GAAG,mCAAmC,CAACC,IA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B,WAAW,CAACC,GAAG,CAAC;EAC7B,MAAMqB,SAAS,GAAGD,IAAI,GAAGpB,GAAG,CAACa,KAAK,CAACb,GAAG,CAACW,OAAO,CAACS,IAAI,CAAC,GAAGA,IAAI,CAACE,MAAM,CAAC,GAAGtB,GAAG;EACzE,MAAMuB,SAAS,GAAGF,SAAS,CAACV,OAAO,CAAC,GAAG,CAAC;EACxC,MAAMa,WAAW,GACfD,SAAS,KAAK,CAAC,CAAC,GAAGF,SAAS,GAAGA,SAAS,CAACR,KAAK,CAAC,CAAC,EAAEU,SAAS,CAAC;EAC9D,MAAME,MAAM,GAAGD,WAAW,CAACb,OAAO,CAAC,GAAG,CAAC;EACvC,MAAMe,IAAI,GACR,CAACD,MAAM,KAAK,CAAC,CAAC,GAAGD,WAAW,GAAGA,WAAW,CAACX,KAAK,CAAC,CAAC,EAAEY,MAAM,CAAC,KAAK,GAAG;EACrE,MAAMrB,MAAM,GAAGqB,MAAM,KAAK,CAAC,CAAC,GAAG,EAAE,GAAGD,WAAW,CAACX,KAAK,CAACY,MAAM,GAAG,CAAC,CAAC;EACjE,OAAO;IACLL,IAAI;IACJM,IAAI;IACJC,KAAK,EAAExB,gBAAgB,CAACC,MAAM,CAAC;IAC/BwB,QAAQ,EAAExB,MAAM,CAACkB,MAAM,GAAG;EAC5B,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** @internal */
|
|
2
|
+
export declare const setLensBackHandler: (handler?: () => boolean) => void;
|
|
3
|
+
/** @internal */
|
|
4
|
+
export declare const hasAppBackHandler: () => boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Wrap your screen's back action so the back button first navigates inside the
|
|
7
|
+
* inspector (details -> list) and only then falls back to your own navigation.
|
|
8
|
+
*
|
|
9
|
+
* ```tsx
|
|
10
|
+
* const onBack = getBackHandler(navigation.goBack);
|
|
11
|
+
* <Button title="Back" onPress={onBack} />
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare const getBackHandler: (backHandler: () => unknown) => () => void;
|
|
15
|
+
//# sourceMappingURL=backHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backHandler.d.ts","sourceRoot":"","sources":["../../../src/backHandler.ts"],"names":[],"mappings":"AAGA,gBAAgB;AAChB,eAAO,MAAM,kBAAkB,GAAI,UAAU,MAAM,OAAO,SAEzD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iBAAiB,eAAyB,CAAC;AAOxD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,GAAI,aAAa,MAAM,OAAO,eAGxD,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ParsedBody } from '../types.js';
|
|
2
|
+
interface Props {
|
|
3
|
+
body: ParsedBody | undefined;
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
emptyTitle: string;
|
|
6
|
+
emptySubtitle?: string;
|
|
7
|
+
copyToClipboard?: (text: string) => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Payload viewer used by the Request and Response tabs. Structured bodies can
|
|
11
|
+
* be shown as a collapsible tree or as pretty-printed raw text; both keep lines
|
|
12
|
+
* unwrapped, scroll horizontally and support search with next/previous.
|
|
13
|
+
*/
|
|
14
|
+
declare const BodyViewer: ({ body, loading, emptyTitle, emptySubtitle, copyToClipboard, }: Props) => import("react").JSX.Element;
|
|
15
|
+
export default BodyViewer;
|
|
16
|
+
//# sourceMappingURL=BodyViewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BodyViewer.d.ts","sourceRoot":"","sources":["../../../../src/components/BodyViewer.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAU,CAAC;AAe3C,UAAU,KAAK;IACb,IAAI,EAAE,UAAU,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAeD;;;;GAIG;AACH,QAAA,MAAM,UAAU,GAAI,gEAMjB,KAAK,gCAmLP,CAAC;AAoBF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ListRenderItem } from 'react-native';
|
|
2
|
+
interface Props<T> {
|
|
3
|
+
data: T[];
|
|
4
|
+
renderItem: ListRenderItem<T>;
|
|
5
|
+
keyExtractor: (item: T, index: number) => string;
|
|
6
|
+
/** Estimated width of the widest row, in px. */
|
|
7
|
+
contentWidth: number;
|
|
8
|
+
rowHeight: number;
|
|
9
|
+
/** Row index that should be scrolled into view (e.g. the active search match). */
|
|
10
|
+
activeIndex?: number;
|
|
11
|
+
extraData?: unknown;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A vertical FlatList inside a horizontal ScrollView. Rows are fixed height and
|
|
15
|
+
* never wrap, so long JSON lines stay on one line and can be panned sideways,
|
|
16
|
+
* just like a code editor. We measure the container once and size the inner
|
|
17
|
+
* list explicitly, which keeps both scroll axes stable while rows virtualise.
|
|
18
|
+
*/
|
|
19
|
+
export declare function CodeList<T>({ data, renderItem, keyExtractor, contentWidth, rowHeight, activeIndex, extraData, }: Props<T>): import("react").JSX.Element;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=CodeList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeList.d.ts","sourceRoot":"","sources":["../../../../src/components/CodeList.tsx"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AAGtB,UAAU,KAAK,CAAC,CAAC;IACf,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,UAAU,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAC9B,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACjD,gDAAgD;IAChD,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,kFAAkF;IAClF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,EAC1B,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,WAAW,EACX,SAAS,GACV,EAAE,KAAK,CAAC,CAAC,CAAC,+BA8EV"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface JsonTreeHandle {
|
|
2
|
+
expandAll: () => void;
|
|
3
|
+
collapseAll: () => void;
|
|
4
|
+
}
|
|
5
|
+
interface Props {
|
|
6
|
+
value: unknown;
|
|
7
|
+
/** Search query; matching keys/values are highlighted and auto-expanded. */
|
|
8
|
+
query?: string;
|
|
9
|
+
/** Index into the ordered list of matches that should be focused. */
|
|
10
|
+
activeMatch?: number;
|
|
11
|
+
onMatchCountChange?: (count: number) => void;
|
|
12
|
+
onLongPressNode?: (info: {
|
|
13
|
+
path: string;
|
|
14
|
+
value: unknown;
|
|
15
|
+
}) => void;
|
|
16
|
+
/** How many levels to open initially. @default 1 */
|
|
17
|
+
initialDepth?: number;
|
|
18
|
+
}
|
|
19
|
+
declare const JsonTreeView: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<JsonTreeHandle>>;
|
|
20
|
+
export default JsonTreeView;
|
|
21
|
+
//# sourceMappingURL=JsonTreeView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JsonTreeView.d.ts","sourceRoot":"","sources":["../../../../../src/components/JsonTree/JsonTreeView.tsx"],"names":[],"mappings":"AA2BA,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,UAAU,KAAK;IACb,KAAK,EAAE,OAAO,CAAC;IACf,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IACnE,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAKD,QAAA,MAAM,YAAY,kGAgIjB,CAAC;AAgIF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure helpers that turn a JSON value into a flat list of visible rows, the way
|
|
3
|
+
* a browser devtools console renders objects. Keeping this free of React makes it
|
|
4
|
+
* easy to test and lets the UI virtualise the rows with a FlatList.
|
|
5
|
+
*/
|
|
6
|
+
export type JsonValueType = 'object' | 'array' | 'string' | 'number' | 'boolean' | 'null' | 'undefined';
|
|
7
|
+
export interface JsonRow {
|
|
8
|
+
/** Stable identifier: JSON-pointer-like path, e.g. `$.data.items[2].id` */
|
|
9
|
+
path: string;
|
|
10
|
+
key: string | null;
|
|
11
|
+
depth: number;
|
|
12
|
+
type: JsonValueType;
|
|
13
|
+
value: unknown;
|
|
14
|
+
expandable: boolean;
|
|
15
|
+
expanded: boolean;
|
|
16
|
+
childCount: number;
|
|
17
|
+
}
|
|
18
|
+
export declare const typeOf: (value: unknown) => JsonValueType;
|
|
19
|
+
export declare const isExpandable: (value: unknown) => boolean;
|
|
20
|
+
export declare const childEntries: (value: unknown) => [string, unknown][];
|
|
21
|
+
export declare const childPath: (parent: string, key: string, parentIsArray: boolean) => string;
|
|
22
|
+
export declare const ROOT_PATH = "$";
|
|
23
|
+
/**
|
|
24
|
+
* Walks the value and returns the rows that are currently visible given the set
|
|
25
|
+
* of expanded paths.
|
|
26
|
+
*/
|
|
27
|
+
export declare const flattenJson: (value: unknown, expanded: ReadonlySet<string>) => JsonRow[];
|
|
28
|
+
/** Paths of every expandable node up to (and including) `maxDepth`. */
|
|
29
|
+
export declare const pathsToDepth: (value: unknown, maxDepth: number) => Set<string>;
|
|
30
|
+
export declare const allPaths: (value: unknown) => Set<string>;
|
|
31
|
+
/** Paths of every expandable node in the whole tree below `path` (inclusive). */
|
|
32
|
+
export declare const subtreePaths: (value: unknown, path: string) => Set<string>;
|
|
33
|
+
/** Looks a node up by path, walking from the root. */
|
|
34
|
+
export declare const getAtPath: (root: unknown, path: string) => unknown;
|
|
35
|
+
export interface SearchHit {
|
|
36
|
+
path: string;
|
|
37
|
+
/** Ancestor paths that must be expanded for the hit to be visible. */
|
|
38
|
+
ancestors: string[];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Finds every node whose key or primitive value contains `query` (case-insensitive).
|
|
42
|
+
* Returns hits in document order along with the ancestors to expand.
|
|
43
|
+
*/
|
|
44
|
+
export declare const searchJson: (value: unknown, query: string) => SearchHit[];
|
|
45
|
+
export declare const previewString: (value: string, max?: number) => string;
|
|
46
|
+
/** Short inline summary used for collapsed objects/arrays, like `{id, name, …}`. */
|
|
47
|
+
export declare const collapsedPreview: (value: unknown) => string;
|
|
48
|
+
export declare const inlineValue: (value: unknown) => string;
|
|
49
|
+
/** Rough character count of a row, used to size the horizontal scroll area. */
|
|
50
|
+
export declare const rowCharCount: (row: JsonRow, indentChars: number) => number;
|
|
51
|
+
export declare const MAX_VALUE_CHARS = 400;
|
|
52
|
+
export declare const displayValue: (value: unknown) => string;
|
|
53
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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C,MAAM,CAWrE,CAAC;AAEF,sDAAsD;AACtD,eAAO,MAAM,SAAS,GAAI,MAAM,OAAO,EAAE,MAAM,MAAM,KAAG,OAYvD,CAAC;AAEF,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AASD;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,OAAO,EAAE,OAAO,MAAM,KAAG,SAAS,EA8BnE,CAAC;AAKF,eAAO,MAAM,aAAa,GACxB,OAAO,MAAM,EACb,YAAwB,KACvB,MAAkE,CAAC;AAEtE,oFAAoF;AACpF,eAAO,MAAM,gBAAgB,GAAI,OAAO,OAAO,KAAG,MAiBjD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,OAAO,OAAO,KAAG,MAe5C,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,YAAY,GAAI,KAAK,OAAO,EAAE,aAAa,MAAM,KAAG,MAahE,CAAC;AAEF,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC,eAAO,MAAM,YAAY,GAAI,OAAO,OAAO,KAAG,MAK7C,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type ThemeInput } from '../theme.js';
|
|
3
|
+
export interface NetworkLensProps {
|
|
4
|
+
/**
|
|
5
|
+
* Render nothing when `false`, e.g. `enabled={__DEV__ || featureFlag}`.
|
|
6
|
+
* @default true
|
|
7
|
+
*/
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
/** `'light' | 'dark' | 'auto'` or a partial theme object. @default 'auto' */
|
|
10
|
+
theme?: ThemeInput;
|
|
11
|
+
/** Newest first (`desc`) or oldest first (`asc`). @default 'desc' */
|
|
12
|
+
sort?: 'asc' | 'desc';
|
|
13
|
+
/** Single-line rows. @default false */
|
|
14
|
+
compact?: boolean;
|
|
15
|
+
/** Limit the number of rows rendered. */
|
|
16
|
+
maxRows?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Hook up your clipboard library to get "Copy" buttons, e.g.
|
|
19
|
+
* `copyToClipboard={Clipboard.setString}`.
|
|
20
|
+
*/
|
|
21
|
+
copyToClipboard?: (text: string) => void;
|
|
22
|
+
/** Rendered above the request list's search bar (the overlay uses it for its title bar). */
|
|
23
|
+
header?: ReactNode;
|
|
24
|
+
}
|
|
25
|
+
export interface NetworkLensHandle {
|
|
26
|
+
/** Returns to the list if a request is open. Returns `true` when it handled the action. */
|
|
27
|
+
goBack: () => boolean;
|
|
28
|
+
}
|
|
29
|
+
declare const NetworkLens: import("react").ForwardRefExoticComponent<NetworkLensProps & import("react").RefAttributes<NetworkLensHandle>>;
|
|
30
|
+
export default NetworkLens;
|
|
31
|
+
//# sourceMappingURL=NetworkLens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NetworkLens.d.ts","sourceRoot":"","sources":["../../../../src/components/NetworkLens.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAUf,OAAO,EAA0B,KAAK,UAAU,EAAE,MAAM,aAAU,CAAC;AAKnE,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,qEAAqE;IACrE,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACtB,uCAAuC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,4FAA4F;IAC5F,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,2FAA2F;IAC3F,MAAM,EAAE,MAAM,OAAO,CAAC;CACvB;AAED,QAAA,MAAM,WAAW,gHA2BhB,CAAC;AAiGF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type ThemeInput } from '../theme.js';
|
|
2
|
+
import { type NetworkLensProps } from './NetworkLens.js';
|
|
3
|
+
export interface NetworkLensOverlayProps extends Omit<NetworkLensProps, 'enabled' | 'theme' | 'header'> {
|
|
4
|
+
/**
|
|
5
|
+
* Render nothing when `false`, e.g.
|
|
6
|
+
* `<NetworkLensOverlay enabled={__DEV__ || flags.networkInspector} />`
|
|
7
|
+
* @default true
|
|
8
|
+
*/
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
theme?: ThemeInput;
|
|
11
|
+
/** Corner for the floating button. @default 'bottom-right' */
|
|
12
|
+
position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
13
|
+
/** Distance from the screen edges in px. @default { x: 16, y: 32 } */
|
|
14
|
+
offset?: {
|
|
15
|
+
x?: number;
|
|
16
|
+
y?: number;
|
|
17
|
+
};
|
|
18
|
+
/** Controlled visibility of the inspector sheet. */
|
|
19
|
+
visible?: boolean;
|
|
20
|
+
onVisibleChange?: (visible: boolean) => void;
|
|
21
|
+
/** Hide the floating button when you open the sheet from your own dev menu. */
|
|
22
|
+
hideButton?: boolean;
|
|
23
|
+
/** Title of the inspector sheet. @default 'Network' */
|
|
24
|
+
title?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Drop-in overlay: a floating badge with the number of captured requests that
|
|
28
|
+
* opens the inspector in a modal. Place it once near the root of your app.
|
|
29
|
+
*/
|
|
30
|
+
declare const NetworkLensOverlay: ({ enabled, theme, ...props }: NetworkLensOverlayProps) => import("react").JSX.Element | null;
|
|
31
|
+
export default NetworkLensOverlay;
|
|
32
|
+
//# sourceMappingURL=NetworkLensOverlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NetworkLensOverlay.d.ts","sourceRoot":"","sources":["../../../../src/components/NetworkLensOverlay.tsx"],"names":[],"mappings":"AAYA,OAAO,EAA0B,KAAK,UAAU,EAAE,MAAM,aAAU,CAAC;AACnE,OAAoB,EAElB,KAAK,gBAAgB,EACtB,MAAM,kBAAe,CAAC;AAGvB,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CACnD,gBAAgB,EAChB,SAAS,GAAG,OAAO,GAAG,QAAQ,CAC/B;IACC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,cAAc,GAAG,aAAa,GAAG,WAAW,GAAG,UAAU,CAAC;IACrE,sEAAsE;IACtE,MAAM,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACpC,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,+EAA+E;IAC/E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,QAAA,MAAM,kBAAkB,GAAI,8BAIzB,uBAAuB,uCAOzB,CAAC;AAgIF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
text: string;
|
|
4
|
+
query?: string;
|
|
5
|
+
activeMatch?: number;
|
|
6
|
+
onMatchCountChange?: (count: number) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Renders text one line per row with line numbers, no wrapping and horizontal
|
|
10
|
+
* scrolling, so pretty-printed JSON keeps its indentation structure intact.
|
|
11
|
+
*/
|
|
12
|
+
declare const RawTextView: ({ text, query, activeMatch, onMatchCountChange, }: Props) => React.JSX.Element;
|
|
13
|
+
export default RawTextView;
|
|
14
|
+
//# sourceMappingURL=RawTextView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RawTextView.d.ts","sourceRoot":"","sources":["../../../../src/components/RawTextView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAED;;;GAGG;AACH,QAAA,MAAM,WAAW,GAAI,mDAKlB,KAAK,sBAqDP,CAAC;AAuFF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type NetworkRequest from '../../core/NetworkRequest.js';
|
|
2
|
+
interface Props {
|
|
3
|
+
request: NetworkRequest;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
copyToClipboard?: (text: string) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const RequestDetails: ({ request, onClose, copyToClipboard }: Props) => import("react").JSX.Element;
|
|
8
|
+
export default RequestDetails;
|
|
9
|
+
//# sourceMappingURL=RequestDetails.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestDetails.d.ts","sourceRoot":"","sources":["../../../../../src/components/RequestDetails/RequestDetails.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,cAAc,MAAM,8BAA2B,CAAC;AAqB5D,UAAU,KAAK;IACb,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAWD,QAAA,MAAM,cAAc,GAAI,uCAAuC,KAAK,gCA6HnE,CAAC;AAgJF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type RequestFilter } from './filters.js';
|
|
3
|
+
interface Props {
|
|
4
|
+
filter: RequestFilter;
|
|
5
|
+
onChange: (filter: RequestFilter) => void;
|
|
6
|
+
methods: string[];
|
|
7
|
+
hosts: string[];
|
|
8
|
+
onClear: () => void;
|
|
9
|
+
}
|
|
10
|
+
declare const FilterBar: ({ filter, onChange, methods, hosts, onClear }: Props) => React.JSX.Element;
|
|
11
|
+
export default FilterBar;
|
|
12
|
+
//# sourceMappingURL=FilterBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterBar.d.ts","sourceRoot":"","sources":["../../../../../src/components/RequestList/FilterBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAML,KAAK,aAAa,EACnB,MAAM,cAAW,CAAC;AAEnB,UAAU,KAAK;IACb,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AA0CD,QAAA,MAAM,SAAS,GAAI,+CAA+C,KAAK,sBAwDtE,CAAC;AAiDF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type NetworkRequest from '../../core/NetworkRequest.js';
|
|
3
|
+
import { type ActionItem } from '../ui/index.js';
|
|
4
|
+
interface Props {
|
|
5
|
+
requests: NetworkRequest[];
|
|
6
|
+
sort: 'asc' | 'desc';
|
|
7
|
+
compact: boolean;
|
|
8
|
+
maxRows?: number;
|
|
9
|
+
paused: boolean;
|
|
10
|
+
loggingEnabled: boolean;
|
|
11
|
+
onPressItem: (id: string) => void;
|
|
12
|
+
menuActions: ActionItem[];
|
|
13
|
+
/** Optional row rendered above the search bar (used by the overlay for title + close). */
|
|
14
|
+
header?: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
declare const RequestList: ({ requests, sort, compact, maxRows, paused, loggingEnabled, onPressItem, menuActions, header, }: Props) => import("react").JSX.Element;
|
|
17
|
+
export default RequestList;
|
|
18
|
+
//# sourceMappingURL=RequestList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestList.d.ts","sourceRoot":"","sources":["../../../../../src/components/RequestList/RequestList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvE,OAAO,KAAK,cAAc,MAAM,8BAA2B,CAAC;AAG5D,OAAO,EAKL,KAAK,UAAU,EAChB,MAAM,gBAAO,CAAC;AAYf,UAAU,KAAK;IACb,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,0FAA0F;IAC1F,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAWD,QAAA,MAAM,WAAW,GAAI,iGAUlB,KAAK,gCAyJP,CAAC;AAiBF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { NetworkRequestRow } from '../../types.js';
|
|
3
|
+
interface Props {
|
|
4
|
+
row: NetworkRequestRow;
|
|
5
|
+
compact: boolean;
|
|
6
|
+
onPress: (id: string) => void;
|
|
7
|
+
onLongPress?: (id: string) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: React.MemoExoticComponent<({ row, compact, onPress, onLongPress }: Props) => React.JSX.Element>;
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=RequestRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestRow.d.ts","sourceRoot":"","sources":["../../../../../src/components/RequestList/RequestRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAa,CAAC;AAIrD,UAAU,KAAK;IACb,GAAG,EAAE,iBAAiB,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;2FAE2D,KAAK;AAsGjE,wBAAgD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { NetworkRequestRow, StatusGroup } from '../../types.js';
|
|
2
|
+
export interface RequestFilter {
|
|
3
|
+
methods: Set<string>;
|
|
4
|
+
statusGroups: Set<StatusGroup>;
|
|
5
|
+
hosts: Set<string>;
|
|
6
|
+
}
|
|
7
|
+
export declare const emptyFilter: () => RequestFilter;
|
|
8
|
+
export declare const isFilterActive: (filter: RequestFilter) => boolean;
|
|
9
|
+
export declare const STATUS_GROUPS: StatusGroup[];
|
|
10
|
+
export declare const applyFilter: (rows: NetworkRequestRow[], search: string, filter: RequestFilter) => NetworkRequestRow[];
|
|
11
|
+
export declare const toggleMethod: (filter: RequestFilter, method: string) => RequestFilter;
|
|
12
|
+
export declare const toggleStatusGroup: (filter: RequestFilter, group: StatusGroup) => RequestFilter;
|
|
13
|
+
export declare const toggleHost: (filter: RequestFilter, host: string) => RequestFilter;
|
|
14
|
+
/** Hosts seen in the captured requests, most frequent first. */
|
|
15
|
+
export declare const collectHosts: (rows: NetworkRequestRow[]) => string[];
|
|
16
|
+
export declare const collectMethods: (rows: NetworkRequestRow[]) => string[];
|
|
17
|
+
//# sourceMappingURL=filters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../../../../src/components/RequestList/filters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,gBAAa,CAAC;AAElE,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACrB,YAAY,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;IAC/B,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,QAAO,aAI7B,CAAC;AAEH,eAAO,MAAM,cAAc,GAAI,QAAQ,aAAa,KAAG,OAGhC,CAAC;AAExB,eAAO,MAAM,aAAa,EAAE,WAAW,EAOtC,CAAC;AAEF,eAAO,MAAM,WAAW,GACtB,MAAM,iBAAiB,EAAE,EACzB,QAAQ,MAAM,EACd,QAAQ,aAAa,KACpB,iBAAiB,EAcnB,CAAC;AASF,eAAO,MAAM,YAAY,GACvB,QAAQ,aAAa,EACrB,QAAQ,MAAM,KACb,aAGD,CAAC;AAEH,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,aAAa,EACrB,OAAO,WAAW,KACjB,aAGD,CAAC;AAEH,eAAO,MAAM,UAAU,GACrB,QAAQ,aAAa,EACrB,MAAM,MAAM,KACX,aAGD,CAAC;AAEH,gEAAgE;AAChE,eAAO,MAAM,YAAY,GAAI,MAAM,iBAAiB,EAAE,KAAG,MAAM,EAM9D,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,MAAM,iBAAiB,EAAE,KAAG,MAAM,EAShE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface ActionItem {
|
|
2
|
+
label: string;
|
|
3
|
+
onPress: () => void;
|
|
4
|
+
destructive?: boolean;
|
|
5
|
+
}
|
|
6
|
+
interface Props {
|
|
7
|
+
visible: boolean;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
actions: ActionItem[];
|
|
10
|
+
title?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Cross-platform bottom sheet built on Modal, so no native dependency is needed. */
|
|
13
|
+
export declare const ActionSheet: ({ visible, onClose, actions, title }: Props) => import("react").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=ActionSheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionSheet.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/ActionSheet.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,UAAU,KAAK;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qFAAqF;AACrF,eAAO,MAAM,WAAW,GAAI,sCAAsC,KAAK,gCAwDtE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
|
|
2
|
+
interface TextButtonProps {
|
|
3
|
+
label: string;
|
|
4
|
+
onPress?: () => void;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
active?: boolean;
|
|
7
|
+
style?: StyleProp<ViewStyle>;
|
|
8
|
+
textStyle?: StyleProp<TextStyle>;
|
|
9
|
+
}
|
|
10
|
+
export declare const TextButton: ({ label, onPress, disabled, active, style, textStyle, }: TextButtonProps) => import("react").JSX.Element;
|
|
11
|
+
interface IconButtonProps {
|
|
12
|
+
/** A unicode glyph; the library ships no image assets. */
|
|
13
|
+
glyph: string;
|
|
14
|
+
accessibilityLabel: string;
|
|
15
|
+
onPress?: () => void;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
active?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const IconButton: ({ glyph, accessibilityLabel, onPress, disabled, active, }: IconButtonProps) => import("react").JSX.Element;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAOtB,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAClC;AAED,eAAO,MAAM,UAAU,GAAI,yDAOxB,eAAe,gCA8BjB,CAAC;AAEF,UAAU,eAAe;IACvB,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,UAAU,GAAI,2DAMxB,eAAe,gCAyBjB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
interface Props {
|
|
3
|
+
label: string;
|
|
4
|
+
color: string;
|
|
5
|
+
filled?: boolean;
|
|
6
|
+
small?: boolean;
|
|
7
|
+
style?: StyleProp<ViewStyle>;
|
|
8
|
+
}
|
|
9
|
+
export declare const Pill: ({ label, color, filled, small, style }: Props) => import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=Pill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pill.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/Pill.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,UAAU,KAAK;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,eAAO,MAAM,IAAI,GAAI,wCAAwC,KAAK,gCAqBjE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
interface Props {
|
|
3
|
+
value: string;
|
|
4
|
+
onChangeText: (text: string) => void;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
/** When provided, shows "n/m" and previous/next buttons. */
|
|
7
|
+
matches?: {
|
|
8
|
+
count: number;
|
|
9
|
+
index: number;
|
|
10
|
+
onPrev: () => void;
|
|
11
|
+
onNext: () => void;
|
|
12
|
+
};
|
|
13
|
+
style?: StyleProp<ViewStyle>;
|
|
14
|
+
}
|
|
15
|
+
export declare const SearchInput: ({ value, onChangeText, placeholder, matches, style, }: Props) => import("react").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=SearchInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/SearchInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAItB,UAAU,KAAK;IACb,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4DAA4D;IAC5D,OAAO,CAAC,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,IAAI,CAAC;QACnB,MAAM,EAAE,MAAM,IAAI,CAAC;KACpB,CAAC;IACF,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,eAAO,MAAM,WAAW,GAAI,uDAMzB,KAAK,gCAoDP,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export declare const Section: ({ title, right, children, }: {
|
|
3
|
+
title: string;
|
|
4
|
+
right?: ReactNode;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}) => import("react").JSX.Element;
|
|
7
|
+
export declare const KeyValueList: ({ entries, emptyLabel, mono, }: {
|
|
8
|
+
entries: [string, string][];
|
|
9
|
+
emptyLabel?: string;
|
|
10
|
+
mono?: boolean;
|
|
11
|
+
}) => import("react").JSX.Element;
|
|
12
|
+
export declare const EmptyState: ({ title, subtitle, }: {
|
|
13
|
+
title: string;
|
|
14
|
+
subtitle?: string;
|
|
15
|
+
}) => import("react").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=Section.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/Section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,eAAO,MAAM,OAAO,GAAI,6BAIrB;IACD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;CACrB,gCAeA,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,gCAI1B;IACD,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,gCA0CA,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,sBAGxB;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,gCAcA,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
interface Props<T extends string> {
|
|
3
|
+
options: {
|
|
4
|
+
value: T;
|
|
5
|
+
label: string;
|
|
6
|
+
badge?: boolean;
|
|
7
|
+
}[];
|
|
8
|
+
value: T;
|
|
9
|
+
onChange: (value: T) => void;
|
|
10
|
+
style?: StyleProp<ViewStyle>;
|
|
11
|
+
}
|
|
12
|
+
export declare const SegmentedControl: <T extends string>({ options, value, onChange, style, }: Props<T>) => import("react").JSX.Element;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=SegmentedControl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SegmentedControl.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/SegmentedControl.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAGtB,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;IAC9B,OAAO,EAAE;QAAE,KAAK,EAAE,CAAC,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;IACxD,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,MAAM,EAAE,sCAKhD,KAAK,CAAC,CAAC,CAAC,gCA2CV,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Pill } from './Pill.js';
|
|
2
|
+
export { TextButton, IconButton } from './Button.js';
|
|
3
|
+
export { SegmentedControl } from './SegmentedControl.js';
|
|
4
|
+
export { SearchInput } from './SearchInput.js';
|
|
5
|
+
export { Section, KeyValueList, EmptyState } from './Section.js';
|
|
6
|
+
export { ActionSheet, type ActionItem } from './ActionSheet.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAQ,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAU,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAW,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAe,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import NetworkRequest from './NetworkRequest.js';
|
|
2
|
+
import type { NetworkLensOptions } from '../types.js';
|
|
3
|
+
export declare const DEFAULT_MAX_REQUESTS = 500;
|
|
4
|
+
export declare const DEFAULT_REFRESH_RATE = 50;
|
|
5
|
+
type Listener = () => void;
|
|
6
|
+
/**
|
|
7
|
+
* Central store. Holds the captured requests (newest first) and publishes an
|
|
8
|
+
* immutable snapshot that React reads through `useSyncExternalStore`.
|
|
9
|
+
*/
|
|
10
|
+
export default class Logger {
|
|
11
|
+
private requests;
|
|
12
|
+
private snapshot;
|
|
13
|
+
private byXhrId;
|
|
14
|
+
private listeners;
|
|
15
|
+
private nextId;
|
|
16
|
+
private maxRequests;
|
|
17
|
+
private refreshRate;
|
|
18
|
+
private ignoredHosts?;
|
|
19
|
+
private ignoredUrls?;
|
|
20
|
+
private ignoredPatterns?;
|
|
21
|
+
private paused;
|
|
22
|
+
private dirty;
|
|
23
|
+
private publishDebounced;
|
|
24
|
+
/** True while XMLHttpRequest is being intercepted by this logger. */
|
|
25
|
+
enabled: boolean;
|
|
26
|
+
subscribe: (listener: Listener) => (() => void);
|
|
27
|
+
getSnapshot: () => NetworkRequest[];
|
|
28
|
+
isPaused: () => boolean;
|
|
29
|
+
private emit;
|
|
30
|
+
private publish;
|
|
31
|
+
private schedulePublish;
|
|
32
|
+
private isIgnored;
|
|
33
|
+
private onOpen;
|
|
34
|
+
private get;
|
|
35
|
+
private onRequestHeader;
|
|
36
|
+
private onSend;
|
|
37
|
+
private onHeadersReceived;
|
|
38
|
+
private onResponse;
|
|
39
|
+
private onFailure;
|
|
40
|
+
start: (options?: NetworkLensOptions) => void;
|
|
41
|
+
stop: () => void;
|
|
42
|
+
getRequests: () => NetworkRequest[];
|
|
43
|
+
getRequest: (id: string) => NetworkRequest | undefined;
|
|
44
|
+
clear: () => void;
|
|
45
|
+
setPaused: (paused: boolean) => void;
|
|
46
|
+
}
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=Logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../../../src/core/Logger.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,qBAAkB,CAAC;A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I,CAiBb;IAEF,WAAW,QAAO,cAAc,EAAE,CAAkB;IAEpD,UAAU,GAAI,IAAI,MAAM,KAAG,cAAc,GAAG,SAAS,CACA;IAErD,KAAK,QAAO,IAAI,CAMd;IAEF,SAAS,GAAI,QAAQ,OAAO,KAAG,IAAI,CASjC;CACH"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { FailureReason, Headers, NetworkRequestRow, ParsedBody, RequestMethod, RequestState, StatusGroup } from '../types.js';
|
|
2
|
+
import { type UrlParts } from '../utils/url.js';
|
|
3
|
+
export declare const statusGroupOf: (status: number, state: RequestState) => StatusGroup;
|
|
4
|
+
export default class NetworkRequest {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly type = "XMLHttpRequest";
|
|
7
|
+
readonly method: RequestMethod;
|
|
8
|
+
readonly url: string;
|
|
9
|
+
status: number;
|
|
10
|
+
state: RequestState;
|
|
11
|
+
failureReason?: FailureReason;
|
|
12
|
+
requestHeaders: Headers;
|
|
13
|
+
responseHeaders: Headers;
|
|
14
|
+
dataSent: unknown;
|
|
15
|
+
response: unknown;
|
|
16
|
+
responseType: string;
|
|
17
|
+
responseURL: string;
|
|
18
|
+
responseContentType: string;
|
|
19
|
+
responseSize: number;
|
|
20
|
+
timeout: number;
|
|
21
|
+
startTime: number;
|
|
22
|
+
endTime: number;
|
|
23
|
+
gqlOperation?: string;
|
|
24
|
+
updatedAt: number;
|
|
25
|
+
private urlParts?;
|
|
26
|
+
private requestBodyCache?;
|
|
27
|
+
private responseBodyCache?;
|
|
28
|
+
private responseBodyVersion;
|
|
29
|
+
constructor(id: string, method: RequestMethod, url: string);
|
|
30
|
+
get duration(): number;
|
|
31
|
+
get parsedUrl(): UrlParts;
|
|
32
|
+
get host(): string;
|
|
33
|
+
get path(): string;
|
|
34
|
+
get statusGroup(): StatusGroup;
|
|
35
|
+
get requestContentType(): string | undefined;
|
|
36
|
+
update(values: Partial<NetworkRequest>): void;
|
|
37
|
+
getRequestBody(): ParsedBody;
|
|
38
|
+
/**
|
|
39
|
+
* Resolves the response body. Blob responses are read asynchronously, hence the promise.
|
|
40
|
+
* Result is cached until the response changes.
|
|
41
|
+
*/
|
|
42
|
+
getResponseBody(): Promise<ParsedBody>;
|
|
43
|
+
get curl(): string;
|
|
44
|
+
toRow(): NetworkRequestRow;
|
|
45
|
+
toJSON(): Promise<Record<string, unknown>>;
|
|
46
|
+
}
|
|
47
|
+
export declare const shellQuote: (value: string) => string;
|
|
48
|
+
//# sourceMappingURL=NetworkRequest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NetworkRequest.d.ts","sourceRoot":"","sources":["../../../../src/core/NetworkRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,OAAO,EACP,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,YAAY,EACZ,WAAW,EACZ,MAAM,aAAU,CAAC;AAElB,OAAO,EAAY,KAAK,QAAQ,EAAE,MAAM,iBAAc,CAAC;AAUvD,eAAO,MAAM,aAAa,GACxB,QAAQ,MAAM,EACd,OAAO,YAAY,KAClB,WAQF,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,cAAc;IACjC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,oBAAoB;IACjC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,MAAM,SAAM;IACZ,KAAK,EAAE,YAAY,CAAa;IAChC,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,cAAc,EAAE,OAAO,CAAM;IAC7B,eAAe,EAAE,OAAO,CAAM;IAC9B,QAAQ,EAAE,OAAO,CAAQ;IACzB,QAAQ,EAAE,OAAO,CAAQ;IACzB,YAAY,SAAM;IAClB,WAAW,SAAM;IACjB,mBAAmB,SAAM;IACzB,YAAY,SAAK;IACjB,OAAO,SAAK;IACZ,SAAS,SAAK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