@rozenite/network-activity-plugin 1.0.0-alpha.4 → 1.0.0-alpha.6

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.
Files changed (75) hide show
  1. package/dist/{panel.html → App.html} +3 -3
  2. package/dist/assets/App-CIflVb88.js +24164 -0
  3. package/dist/assets/App-Czu6Vt2P.css +1233 -0
  4. package/dist/react-native.cjs +1 -1
  5. package/dist/react-native.d.ts +1 -90
  6. package/dist/rozenite.config.d.ts +7 -0
  7. package/dist/rozenite.json +1 -1
  8. package/dist/src/react-native/network-inspector.d.ts +8 -0
  9. package/dist/src/react-native/network-requests-registry.d.ts +6 -0
  10. package/dist/src/react-native/useNetworkActivityDevTools.d.ts +2 -0
  11. package/dist/src/react-native/xhr-interceptor.d.ts +38 -0
  12. package/dist/src/shared/client.d.ts +64 -0
  13. package/dist/src/ui/App.d.ts +1 -0
  14. package/dist/src/ui/components/Badge.d.ts +9 -0
  15. package/dist/src/ui/components/Button.d.ts +11 -0
  16. package/dist/src/ui/components/Input.d.ts +3 -0
  17. package/dist/src/ui/components/JsonTree.d.ts +5 -0
  18. package/dist/src/ui/components/RequestList.d.ts +45 -0
  19. package/dist/src/ui/components/ScrollArea.d.ts +4 -0
  20. package/dist/src/ui/components/Separator.d.ts +3 -0
  21. package/dist/src/ui/tabs/CookiesTab.d.ts +8 -0
  22. package/dist/src/ui/tabs/HeadersTab.d.ts +17 -0
  23. package/dist/src/ui/tabs/RequestTab.d.ts +10 -0
  24. package/dist/src/ui/tabs/ResponseTab.d.ts +12 -0
  25. package/dist/src/ui/tabs/TimingTab.d.ts +7 -0
  26. package/dist/src/ui/types.d.ts +23 -0
  27. package/dist/src/ui/utils.d.ts +2 -0
  28. package/dist/src/ui/views/InspectorView.d.ts +5 -0
  29. package/dist/src/ui/views/LoadingView.d.ts +1 -0
  30. package/dist/useNetworkActivityDevTools.cjs +360 -0
  31. package/dist/useNetworkActivityDevTools.js +108 -236
  32. package/package.json +23 -16
  33. package/postcss.config.js +6 -0
  34. package/rozenite.config.ts +1 -1
  35. package/src/react-native/network-inspector.ts +113 -260
  36. package/src/react-native/network-requests-registry.ts +7 -77
  37. package/src/react-native/useNetworkActivityDevTools.ts +1 -1
  38. package/src/react-native/xhr-interceptor.ts +2 -2
  39. package/src/react-native/xml-request.d.ts +11 -1
  40. package/src/shared/client.ts +80 -0
  41. package/src/ui/App.tsx +19 -0
  42. package/src/ui/components/Badge.tsx +36 -0
  43. package/src/ui/components/Button.tsx +56 -0
  44. package/src/ui/components/Input.tsx +22 -0
  45. package/src/ui/components/JsonTree.tsx +37 -0
  46. package/src/ui/components/RequestList.tsx +376 -0
  47. package/src/ui/components/ScrollArea.tsx +48 -0
  48. package/src/ui/components/Separator.tsx +31 -0
  49. package/src/ui/components/Tabs.tsx +55 -0
  50. package/src/ui/globals.css +90 -0
  51. package/src/ui/tabs/CookiesTab.tsx +290 -0
  52. package/src/ui/tabs/HeadersTab.tsx +117 -0
  53. package/src/ui/tabs/RequestTab.tsx +72 -0
  54. package/src/ui/tabs/ResponseTab.tsx +140 -0
  55. package/src/ui/tabs/TimingTab.tsx +71 -0
  56. package/src/ui/types.ts +30 -0
  57. package/src/ui/utils.ts +5 -97
  58. package/src/ui/views/InspectorView.tsx +349 -0
  59. package/src/ui/views/LoadingView.tsx +19 -0
  60. package/tailwind.config.ts +93 -0
  61. package/dist/assets/panel-C0o5JcM0.js +0 -16664
  62. package/dist/assets/panel-DXGMsavf.css +0 -555
  63. package/src/types/client.ts +0 -111
  64. package/src/types/network.ts +0 -32
  65. package/src/ui/components.module.css +0 -158
  66. package/src/ui/components.tsx +0 -241
  67. package/src/ui/network-details.module.css +0 -197
  68. package/src/ui/network-details.tsx +0 -345
  69. package/src/ui/network-list.module.css +0 -128
  70. package/src/ui/network-list.tsx +0 -240
  71. package/src/ui/network-toolbar.module.css +0 -9
  72. package/src/ui/network-toolbar.tsx +0 -34
  73. package/src/ui/panel.module.css +0 -67
  74. package/src/ui/panel.tsx +0 -319
  75. package/src/ui/tanstack-query.tsx +0 -204
@@ -0,0 +1,19 @@
1
+ import { Loader2 } from 'lucide-react';
2
+
3
+ export const LoadingView = () => {
4
+ return (
5
+ <div className="h-screen bg-gray-900 text-gray-100 flex flex-col items-center justify-center">
6
+ <div className="flex flex-col items-center gap-4">
7
+ <Loader2 className="h-12 w-12 text-blue-400 animate-spin" />
8
+ <div className="text-center">
9
+ <h2 className="text-xl font-semibold text-gray-200 mb-2">
10
+ Loading Network Inspector
11
+ </h2>
12
+ <p className="text-gray-400 text-sm">
13
+ Initializing network monitoring...
14
+ </p>
15
+ </div>
16
+ </div>
17
+ </div>
18
+ );
19
+ };
@@ -0,0 +1,93 @@
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
+ colors: {
11
+ background: 'hsl(var(--background))',
12
+ foreground: 'hsl(var(--foreground))',
13
+ card: {
14
+ DEFAULT: 'hsl(var(--card))',
15
+ foreground: 'hsl(var(--card-foreground))',
16
+ },
17
+ popover: {
18
+ DEFAULT: 'hsl(var(--popover))',
19
+ foreground: 'hsl(var(--popover-foreground))',
20
+ },
21
+ primary: {
22
+ DEFAULT: 'hsl(var(--primary))',
23
+ foreground: 'hsl(var(--primary-foreground))',
24
+ },
25
+ secondary: {
26
+ DEFAULT: 'hsl(var(--secondary))',
27
+ foreground: 'hsl(var(--secondary-foreground))',
28
+ },
29
+ muted: {
30
+ DEFAULT: 'hsl(var(--muted))',
31
+ foreground: 'hsl(var(--muted-foreground))',
32
+ },
33
+ accent: {
34
+ DEFAULT: 'hsl(var(--accent))',
35
+ foreground: 'hsl(var(--accent-foreground))',
36
+ },
37
+ destructive: {
38
+ DEFAULT: 'hsl(var(--destructive))',
39
+ foreground: 'hsl(var(--destructive-foreground))',
40
+ },
41
+ border: 'hsl(var(--border))',
42
+ input: 'hsl(var(--input))',
43
+ ring: 'hsl(var(--ring))',
44
+ chart: {
45
+ '1': 'hsl(var(--chart-1))',
46
+ '2': 'hsl(var(--chart-2))',
47
+ '3': 'hsl(var(--chart-3))',
48
+ '4': 'hsl(var(--chart-4))',
49
+ '5': 'hsl(var(--chart-5))',
50
+ },
51
+ sidebar: {
52
+ DEFAULT: 'hsl(var(--sidebar-background))',
53
+ foreground: 'hsl(var(--sidebar-foreground))',
54
+ primary: 'hsl(var(--sidebar-primary))',
55
+ 'primary-foreground': 'hsl(var(--sidebar-primary-foreground))',
56
+ accent: 'hsl(var(--sidebar-accent))',
57
+ 'accent-foreground': 'hsl(var(--sidebar-accent-foreground))',
58
+ border: 'hsl(var(--sidebar-border))',
59
+ ring: 'hsl(var(--sidebar-ring))',
60
+ },
61
+ },
62
+ borderRadius: {
63
+ lg: 'var(--radius)',
64
+ md: 'calc(var(--radius) - 2px)',
65
+ sm: 'calc(var(--radius) - 4px)',
66
+ },
67
+ keyframes: {
68
+ 'accordion-down': {
69
+ from: {
70
+ height: '0',
71
+ },
72
+ to: {
73
+ height: 'var(--radix-accordion-content-height)',
74
+ },
75
+ },
76
+ 'accordion-up': {
77
+ from: {
78
+ height: 'var(--radix-accordion-content-height)',
79
+ },
80
+ to: {
81
+ height: '0',
82
+ },
83
+ },
84
+ },
85
+ animation: {
86
+ 'accordion-down': 'accordion-down 0.2s ease-out',
87
+ 'accordion-up': 'accordion-up 0.2s ease-out',
88
+ },
89
+ },
90
+ },
91
+ plugins: [require('tailwindcss-animate')],
92
+ };
93
+ export default config;