@rozenite/network-activity-plugin 1.0.0-alpha.1 → 1.0.0-alpha.10
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 +3 -5
- package/dist/{panel.html → App.html} +3 -3
- package/dist/assets/App-CA1Fbh0I.js +25364 -0
- package/dist/assets/App-DoHQsY5s.css +1276 -0
- package/dist/event-source.cjs +22 -0
- package/dist/event-source.js +23 -0
- package/dist/react-native.cjs +8 -1
- package/dist/react-native.d.ts +1 -5
- package/dist/react-native.js +6 -171
- package/dist/rozenite.config.d.ts +7 -0
- package/dist/rozenite.json +1 -1
- package/dist/src/react-native/http/network-inspector.d.ts +8 -0
- package/dist/src/react-native/http/network-requests-registry.d.ts +6 -0
- package/dist/src/react-native/http/xhr-interceptor.d.ts +38 -0
- package/dist/src/react-native/sse/event-source.d.ts +2 -0
- package/dist/src/react-native/sse/sse-inspector.d.ts +9 -0
- package/dist/src/react-native/sse/sse-interceptor.d.ts +36 -0
- package/dist/src/react-native/sse/types.d.ts +6 -0
- package/dist/src/react-native/useNetworkActivityDevTools.d.ts +2 -0
- package/dist/src/react-native/utils.d.ts +6 -0
- package/dist/src/react-native/websocket/websocket-inspector.d.ts +9 -0
- package/dist/src/react-native/websocket/websocket-interceptor.d.ts +74 -0
- package/dist/src/shared/client.d.ts +68 -0
- package/dist/src/shared/sse-events.d.ts +35 -0
- package/dist/src/shared/websocket-events.d.ts +60 -0
- package/dist/src/ui/App.d.ts +1 -0
- package/dist/src/ui/components/Badge.d.ts +9 -0
- package/dist/src/ui/components/Button.d.ts +11 -0
- package/dist/src/ui/components/Input.d.ts +3 -0
- package/dist/src/ui/components/JsonTree.d.ts +5 -0
- package/dist/src/ui/components/JsonTreeCopyableItem.d.ts +7 -0
- package/dist/src/ui/components/RequestList.d.ts +25 -0
- package/dist/src/ui/components/ScrollArea.d.ts +4 -0
- package/dist/src/ui/components/Separator.d.ts +3 -0
- package/dist/src/ui/components/SidePanel.d.ts +1 -0
- package/dist/src/ui/components/Toolbar.d.ts +1 -0
- package/dist/src/ui/hooks/useCopyToClipboard.d.ts +4 -0
- package/dist/src/ui/state/derived.d.ts +5 -0
- package/dist/src/ui/state/hooks.d.ts +17 -0
- package/dist/src/ui/state/model.d.ts +98 -0
- package/dist/src/ui/state/store.d.ts +24 -0
- package/dist/src/ui/tabs/CookiesTab.d.ts +5 -0
- package/dist/src/ui/tabs/HeadersTab.d.ts +5 -0
- package/dist/src/ui/tabs/MessagesTab.d.ts +5 -0
- package/dist/src/ui/tabs/RequestTab.d.ts +5 -0
- package/dist/src/ui/tabs/ResponseTab.d.ts +6 -0
- package/dist/src/ui/tabs/SSEMessagesTab.d.ts +5 -0
- package/dist/src/ui/tabs/TimingTab.d.ts +5 -0
- package/dist/src/ui/types.d.ts +26 -0
- package/dist/src/ui/utils/assert.d.ts +1 -0
- package/dist/src/ui/utils/cn.d.ts +2 -0
- package/dist/src/ui/utils/copyToClipboard.d.ts +1 -0
- package/dist/src/ui/utils/getHttpHeaderValue.d.ts +2 -0
- package/dist/src/ui/utils/getId.d.ts +1 -0
- package/dist/src/ui/utils/getStatusColor.d.ts +1 -0
- package/dist/src/ui/views/InspectorView.d.ts +5 -0
- package/dist/src/ui/views/LoadingView.d.ts +1 -0
- package/dist/useNetworkActivityDevTools.cjs +759 -0
- package/dist/useNetworkActivityDevTools.js +757 -0
- package/package.json +31 -10
- package/postcss.config.js +6 -0
- package/project.json +12 -0
- package/react-native.ts +2 -1
- package/rozenite.config.ts +2 -2
- package/src/css-modules.d.ts +1 -1
- package/src/react-native/http/network-inspector.ts +226 -0
- package/src/react-native/http/network-requests-registry.ts +52 -0
- package/src/react-native/http/xhr-interceptor.ts +211 -0
- package/src/react-native/http/xml-request.d.ts +34 -0
- package/src/react-native/sse/event-source.ts +25 -0
- package/src/react-native/sse/sse-inspector.ts +117 -0
- package/src/react-native/sse/sse-interceptor.ts +162 -0
- package/src/react-native/sse/types.ts +9 -0
- package/src/react-native/useNetworkActivityDevTools.ts +73 -210
- package/src/react-native/utils.ts +43 -0
- package/src/react-native/websocket/websocket-inspector.ts +180 -0
- package/src/react-native/websocket/websocket-interceptor.d.ts +4 -0
- package/src/react-native/websocket/websocket-interceptor.ts +166 -0
- package/src/shared/client.ts +86 -0
- package/src/shared/sse-events.ts +44 -0
- package/src/shared/websocket-events.ts +79 -0
- package/src/ui/App.tsx +19 -0
- package/src/ui/components/Badge.tsx +36 -0
- package/src/ui/components/Button.tsx +56 -0
- package/src/ui/components/Input.tsx +22 -0
- package/src/ui/components/JsonTree.tsx +50 -0
- package/src/ui/components/JsonTreeCopyableItem.tsx +33 -0
- package/src/ui/components/RequestList.tsx +295 -0
- package/src/ui/components/ScrollArea.tsx +48 -0
- package/src/ui/components/Separator.tsx +31 -0
- package/src/ui/components/SidePanel.tsx +323 -0
- package/src/ui/components/Tabs.tsx +55 -0
- package/src/ui/components/Toolbar.tsx +45 -0
- package/src/ui/globals.css +90 -0
- package/src/ui/hooks/useCopyToClipboard.ts +28 -0
- package/src/ui/state/derived.ts +112 -0
- package/src/ui/state/hooks.ts +44 -0
- package/src/ui/state/model.ts +129 -0
- package/src/ui/state/store.ts +559 -0
- package/src/ui/tabs/CookiesTab.tsx +279 -0
- package/src/ui/tabs/HeadersTab.tsx +110 -0
- package/src/ui/tabs/MessagesTab.tsx +276 -0
- package/src/ui/tabs/RequestTab.tsx +69 -0
- package/src/ui/tabs/ResponseTab.tsx +138 -0
- package/src/ui/tabs/SSEMessagesTab.tsx +213 -0
- package/src/ui/tabs/TimingTab.tsx +60 -0
- package/src/ui/types.ts +34 -0
- package/src/ui/utils/assert.ts +5 -0
- package/src/ui/utils/cn.ts +6 -0
- package/src/ui/utils/copyToClipboard.ts +3 -0
- package/src/ui/utils/getHttpHeaderValue.ts +14 -0
- package/src/ui/utils/getId.ts +10 -0
- package/src/ui/utils/getStatusColor.ts +15 -0
- package/src/ui/views/InspectorView.tsx +53 -0
- package/src/ui/views/LoadingView.tsx +19 -0
- package/tailwind.config.ts +96 -0
- package/tsconfig.json +13 -6
- package/tsconfig.tsbuildinfo +1 -0
- package/vite.config.ts +13 -1
- package/dist/assets/panel-C5YgUUj5.js +0 -54
- package/dist/assets/panel-NCVczPb1.css +0 -1
- package/src/types/network.ts +0 -153
- package/src/ui/components.module.css +0 -158
- package/src/ui/components.tsx +0 -219
- package/src/ui/network-details.module.css +0 -57
- package/src/ui/network-details.tsx +0 -134
- package/src/ui/network-list.module.css +0 -122
- package/src/ui/network-list.tsx +0 -145
- package/src/ui/network-toolbar.module.css +0 -9
- package/src/ui/network-toolbar.tsx +0 -40
- package/src/ui/panel.module.css +0 -61
- package/src/ui/panel.tsx +0 -201
- package/src/ui/tanstack-query.tsx +0 -197
- package/src/ui/utils.ts +0 -89
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { Config } from 'tailwindcss';
|
|
2
|
+
|
|
3
|
+
// all in fixtures is set to tailwind v3 as interims solutions
|
|
4
|
+
|
|
5
|
+
const config: Config = {
|
|
6
|
+
darkMode: ['class'],
|
|
7
|
+
content: ['./src/ui/**/*.{js,ts,jsx,tsx,mdx}'],
|
|
8
|
+
theme: {
|
|
9
|
+
extend: {
|
|
10
|
+
translate: {
|
|
11
|
+
'0.75': '0.1875rem',
|
|
12
|
+
},
|
|
13
|
+
colors: {
|
|
14
|
+
background: 'hsl(var(--background))',
|
|
15
|
+
foreground: 'hsl(var(--foreground))',
|
|
16
|
+
card: {
|
|
17
|
+
DEFAULT: 'hsl(var(--card))',
|
|
18
|
+
foreground: 'hsl(var(--card-foreground))',
|
|
19
|
+
},
|
|
20
|
+
popover: {
|
|
21
|
+
DEFAULT: 'hsl(var(--popover))',
|
|
22
|
+
foreground: 'hsl(var(--popover-foreground))',
|
|
23
|
+
},
|
|
24
|
+
primary: {
|
|
25
|
+
DEFAULT: 'hsl(var(--primary))',
|
|
26
|
+
foreground: 'hsl(var(--primary-foreground))',
|
|
27
|
+
},
|
|
28
|
+
secondary: {
|
|
29
|
+
DEFAULT: 'hsl(var(--secondary))',
|
|
30
|
+
foreground: 'hsl(var(--secondary-foreground))',
|
|
31
|
+
},
|
|
32
|
+
muted: {
|
|
33
|
+
DEFAULT: 'hsl(var(--muted))',
|
|
34
|
+
foreground: 'hsl(var(--muted-foreground))',
|
|
35
|
+
},
|
|
36
|
+
accent: {
|
|
37
|
+
DEFAULT: 'hsl(var(--accent))',
|
|
38
|
+
foreground: 'hsl(var(--accent-foreground))',
|
|
39
|
+
},
|
|
40
|
+
destructive: {
|
|
41
|
+
DEFAULT: 'hsl(var(--destructive))',
|
|
42
|
+
foreground: 'hsl(var(--destructive-foreground))',
|
|
43
|
+
},
|
|
44
|
+
border: 'hsl(var(--border))',
|
|
45
|
+
input: 'hsl(var(--input))',
|
|
46
|
+
ring: 'hsl(var(--ring))',
|
|
47
|
+
chart: {
|
|
48
|
+
'1': 'hsl(var(--chart-1))',
|
|
49
|
+
'2': 'hsl(var(--chart-2))',
|
|
50
|
+
'3': 'hsl(var(--chart-3))',
|
|
51
|
+
'4': 'hsl(var(--chart-4))',
|
|
52
|
+
'5': 'hsl(var(--chart-5))',
|
|
53
|
+
},
|
|
54
|
+
sidebar: {
|
|
55
|
+
DEFAULT: 'hsl(var(--sidebar-background))',
|
|
56
|
+
foreground: 'hsl(var(--sidebar-foreground))',
|
|
57
|
+
primary: 'hsl(var(--sidebar-primary))',
|
|
58
|
+
'primary-foreground': 'hsl(var(--sidebar-primary-foreground))',
|
|
59
|
+
accent: 'hsl(var(--sidebar-accent))',
|
|
60
|
+
'accent-foreground': 'hsl(var(--sidebar-accent-foreground))',
|
|
61
|
+
border: 'hsl(var(--sidebar-border))',
|
|
62
|
+
ring: 'hsl(var(--sidebar-ring))',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
borderRadius: {
|
|
66
|
+
lg: 'var(--radius)',
|
|
67
|
+
md: 'calc(var(--radius) - 2px)',
|
|
68
|
+
sm: 'calc(var(--radius) - 4px)',
|
|
69
|
+
},
|
|
70
|
+
keyframes: {
|
|
71
|
+
'accordion-down': {
|
|
72
|
+
from: {
|
|
73
|
+
height: '0',
|
|
74
|
+
},
|
|
75
|
+
to: {
|
|
76
|
+
height: 'var(--radix-accordion-content-height)',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
'accordion-up': {
|
|
80
|
+
from: {
|
|
81
|
+
height: 'var(--radix-accordion-content-height)',
|
|
82
|
+
},
|
|
83
|
+
to: {
|
|
84
|
+
height: '0',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
animation: {
|
|
89
|
+
'accordion-down': 'accordion-down 0.2s ease-out',
|
|
90
|
+
'accordion-up': 'accordion-up 0.2s ease-out',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
plugins: [require('tailwindcss-animate')],
|
|
95
|
+
};
|
|
96
|
+
export default config;
|
package/tsconfig.json
CHANGED
|
@@ -16,10 +16,17 @@
|
|
|
16
16
|
"noEmit": true,
|
|
17
17
|
"jsx": "react-jsx"
|
|
18
18
|
},
|
|
19
|
-
"include": [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
"include": ["src/**/*", "react-native.ts", "rozenite.config.ts"],
|
|
20
|
+
"exclude": ["node_modules", "dist", "build"],
|
|
21
|
+
"references": [
|
|
22
|
+
{
|
|
23
|
+
"path": "../plugin-bridge"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"path": "../cli"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"path": "../vite-plugin"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
25
32
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["./src/css-modules.d.ts","./src/react-native/network-inspector.ts","./src/react-native/network-requests-registry.ts","./src/react-native/usenetworkactivitydevtools.ts","./src/react-native/xhr-interceptor.ts","./src/react-native/xml-request.d.ts","./src/types/client.ts","./src/types/network.ts","./src/ui/components.tsx","./src/ui/network-details.tsx","./src/ui/network-list.tsx","./src/ui/network-toolbar.tsx","./src/ui/panel.tsx","./src/ui/tanstack-query.tsx","./src/ui/utils.ts","./react-native.ts","./rozenite.config.ts"],"errors":true,"version":"5.8.3"}
|
package/vite.config.ts
CHANGED
|
@@ -10,8 +10,20 @@ export default defineConfig({
|
|
|
10
10
|
outDir: './dist',
|
|
11
11
|
emptyOutDir: false,
|
|
12
12
|
reportCompressedSize: false,
|
|
13
|
-
minify:
|
|
13
|
+
minify: false,
|
|
14
14
|
sourcemap: false,
|
|
15
|
+
rollupOptions: {
|
|
16
|
+
output: {
|
|
17
|
+
manualChunks: (id) => {
|
|
18
|
+
// Mitigate https://github.com/facebook/metro/issues/836
|
|
19
|
+
if (id.includes('event-source.ts')) {
|
|
20
|
+
return 'event-source';
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return undefined;
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
15
27
|
},
|
|
16
28
|
server: {
|
|
17
29
|
port: 3000,
|