react-native-inapp-inspector 2.3.9 → 2.3.11

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 (65) hide show
  1. package/dist/commonjs/components/Inspector/DebuggingTab.d.ts +3 -0
  2. package/dist/commonjs/components/Inspector/DebuggingTab.js +682 -0
  3. package/dist/commonjs/components/Inspector/MainScreen.js +2 -0
  4. package/dist/commonjs/components/Inspector/NetworkDetail.js +2 -1
  5. package/dist/commonjs/components/Inspector/NetworkFilterModal.d.ts +19 -0
  6. package/dist/commonjs/components/Inspector/NetworkFilterModal.js +648 -0
  7. package/dist/commonjs/components/Inspector/NetworkTab.js +89 -147
  8. package/dist/commonjs/components/Inspector/SettingsPanel.js +12 -0
  9. package/dist/commonjs/components/Inspector/TabBar.js +9 -0
  10. package/dist/commonjs/components/LogCard.js +5 -26
  11. package/dist/commonjs/components/NetworkIcons.d.ts +2 -0
  12. package/dist/commonjs/components/NetworkIcons.js +13 -1
  13. package/dist/commonjs/components/QRCodeView.d.ts +9 -0
  14. package/dist/commonjs/components/QRCodeView.js +79 -0
  15. package/dist/commonjs/constants/index.js +3 -0
  16. package/dist/commonjs/constants/version.d.ts +1 -1
  17. package/dist/commonjs/constants/version.js +1 -1
  18. package/dist/commonjs/helpers/qrGenerator.d.ts +2 -0
  19. package/dist/commonjs/helpers/qrGenerator.js +170 -0
  20. package/dist/commonjs/index.js +2 -0
  21. package/dist/commonjs/styles/index.d.ts +11 -0
  22. package/dist/commonjs/styles/index.js +20 -5
  23. package/dist/commonjs/types/enums.d.ts +5 -0
  24. package/dist/commonjs/types/enums.js +5 -0
  25. package/dist/esm/components/Inspector/DebuggingTab.d.ts +3 -0
  26. package/dist/esm/components/Inspector/DebuggingTab.js +642 -0
  27. package/dist/esm/components/Inspector/MainScreen.js +2 -0
  28. package/dist/esm/components/Inspector/NetworkDetail.js +2 -1
  29. package/dist/esm/components/Inspector/NetworkFilterModal.d.ts +19 -0
  30. package/dist/esm/components/Inspector/NetworkFilterModal.js +607 -0
  31. package/dist/esm/components/Inspector/NetworkTab.js +91 -149
  32. package/dist/esm/components/Inspector/SettingsPanel.js +13 -1
  33. package/dist/esm/components/Inspector/TabBar.js +10 -1
  34. package/dist/esm/components/LogCard.js +5 -26
  35. package/dist/esm/components/NetworkIcons.d.ts +2 -0
  36. package/dist/esm/components/NetworkIcons.js +10 -0
  37. package/dist/esm/components/QRCodeView.d.ts +9 -0
  38. package/dist/esm/components/QRCodeView.js +42 -0
  39. package/dist/esm/constants/index.js +3 -0
  40. package/dist/esm/constants/version.d.ts +1 -1
  41. package/dist/esm/constants/version.js +1 -1
  42. package/dist/esm/helpers/qrGenerator.d.ts +2 -0
  43. package/dist/esm/helpers/qrGenerator.js +167 -0
  44. package/dist/esm/index.js +2 -0
  45. package/dist/esm/styles/index.d.ts +11 -0
  46. package/dist/esm/styles/index.js +20 -5
  47. package/dist/esm/types/enums.d.ts +5 -0
  48. package/dist/esm/types/enums.js +5 -0
  49. package/package.json +2 -2
  50. package/src/components/Inspector/DebuggingTab.tsx +755 -0
  51. package/src/components/Inspector/MainScreen.tsx +2 -0
  52. package/src/components/Inspector/NetworkDetail.tsx +2 -1
  53. package/src/components/Inspector/NetworkFilterModal.tsx +710 -0
  54. package/src/components/Inspector/NetworkTab.tsx +127 -204
  55. package/src/components/Inspector/SettingsPanel.tsx +20 -0
  56. package/src/components/Inspector/TabBar.tsx +11 -0
  57. package/src/components/LogCard.tsx +5 -30
  58. package/src/components/NetworkIcons.tsx +66 -0
  59. package/src/components/QRCodeView.tsx +71 -0
  60. package/src/constants/index.ts +3 -0
  61. package/src/constants/version.ts +1 -1
  62. package/src/helpers/qrGenerator.ts +184 -0
  63. package/src/index.tsx +2 -0
  64. package/src/styles/index.ts +20 -5
  65. package/src/types/enums.ts +5 -0
@@ -0,0 +1,167 @@
1
+ export function generateQRMatrix(text, ecc = 'M') {
2
+ try {
3
+ return createQRMatrix(text, ecc);
4
+ }
5
+ catch {
6
+ return createFallbackMatrix(text);
7
+ }
8
+ }
9
+ function createQRMatrix(data, ecc) {
10
+ const length = data.length;
11
+ let version = 1;
12
+ if (length > 14)
13
+ version = 2;
14
+ if (length > 26)
15
+ version = 3;
16
+ if (length > 42)
17
+ version = 4;
18
+ if (length > 62)
19
+ version = 5;
20
+ if (length > 84)
21
+ version = 6;
22
+ if (length > 106)
23
+ version = 7;
24
+ if (length > 122)
25
+ version = 8;
26
+ if (length > 152)
27
+ version = 9;
28
+ if (length > 180)
29
+ version = 10;
30
+ const size = version * 4 + 17;
31
+ const matrix = Array(size)
32
+ .fill(null)
33
+ .map(() => Array(size).fill(null));
34
+ addFinderPattern(matrix, 0, 0);
35
+ addFinderPattern(matrix, size - 7, 0);
36
+ addFinderPattern(matrix, 0, size - 7);
37
+ for (let i = 8; i < size - 8; i++) {
38
+ const val = i % 2 === 0;
39
+ if (matrix[6][i] === null)
40
+ matrix[6][i] = val;
41
+ if (matrix[i][6] === null)
42
+ matrix[i][6] = val;
43
+ }
44
+ if (version >= 2) {
45
+ const pos = getAlignmentPositions(version);
46
+ for (const r of pos) {
47
+ for (const c of pos) {
48
+ if (matrix[r][c] === null) {
49
+ addAlignmentPattern(matrix, r - 2, c - 2);
50
+ }
51
+ }
52
+ }
53
+ }
54
+ const bits = [];
55
+ bits.push(false, true, false, false);
56
+ for (let i = 7; i >= 0; i--) {
57
+ bits.push(((length >> i) & 1) === 1);
58
+ }
59
+ for (let i = 0; i < length; i++) {
60
+ const code = data.charCodeAt(i);
61
+ for (let b = 7; b >= 0; b--) {
62
+ bits.push(((code >> b) & 1) === 1);
63
+ }
64
+ }
65
+ for (let i = 0; i < 4 && bits.length % 8 !== 0; i++) {
66
+ bits.push(false);
67
+ }
68
+ while (bits.length % 8 !== 0) {
69
+ bits.push(false);
70
+ }
71
+ const padBytes = [0xec, 0x11];
72
+ let padIdx = 0;
73
+ const totalDataBits = size * size * 0.6;
74
+ while (bits.length < totalDataBits) {
75
+ const b = padBytes[padIdx % 2];
76
+ padIdx++;
77
+ for (let bit = 7; bit >= 0; bit--) {
78
+ bits.push(((b >> bit) & 1) === 1);
79
+ }
80
+ }
81
+ let bitIdx = 0;
82
+ let upwards = true;
83
+ for (let col = size - 1; col > 0; col -= 2) {
84
+ if (col === 6)
85
+ col--;
86
+ const rows = upwards
87
+ ? Array.from({ length: size }, (_, i) => size - 1 - i)
88
+ : Array.from({ length: size }, (_, i) => i);
89
+ for (const row of rows) {
90
+ for (const c of [col, col - 1]) {
91
+ if (matrix[row][c] === null) {
92
+ const bit = bitIdx < bits.length ? bits[bitIdx++] : false;
93
+ const mask = (row + c) % 2 === 0;
94
+ matrix[row][c] = bit !== mask;
95
+ }
96
+ }
97
+ }
98
+ upwards = !upwards;
99
+ }
100
+ return matrix.map(row => row.map(cell => cell ?? false));
101
+ }
102
+ function addFinderPattern(matrix, row, col) {
103
+ for (let r = -1; r <= 7; r++) {
104
+ for (let c = -1; c <= 7; c++) {
105
+ const mr = row + r;
106
+ const mc = col + c;
107
+ if (mr >= 0 && mr < matrix.length && mc >= 0 && mc < matrix.length) {
108
+ if ((r >= 0 && r <= 6 && (c === 0 || c === 6)) ||
109
+ (c >= 0 && c <= 6 && (r === 0 || r === 6)) ||
110
+ (r >= 2 && r <= 4 && c >= 2 && c <= 4)) {
111
+ matrix[mr][mc] = true;
112
+ }
113
+ else if (r >= 0 && r <= 6 && c >= 0 && c <= 6) {
114
+ matrix[mr][mc] = false;
115
+ }
116
+ else {
117
+ matrix[mr][mc] = false;
118
+ }
119
+ }
120
+ }
121
+ }
122
+ }
123
+ function addAlignmentPattern(matrix, row, col) {
124
+ for (let r = 0; r < 5; r++) {
125
+ for (let c = 0; c < 5; c++) {
126
+ const isOuter = r === 0 || r === 4 || c === 0 || c === 4;
127
+ const isCenter = r === 2 && c === 2;
128
+ matrix[row + r][col + c] = isOuter || isCenter;
129
+ }
130
+ }
131
+ }
132
+ function getAlignmentPositions(version) {
133
+ if (version === 1)
134
+ return [];
135
+ if (version === 2)
136
+ return [6, 18];
137
+ if (version === 3)
138
+ return [6, 22];
139
+ if (version === 4)
140
+ return [6, 26];
141
+ if (version === 5)
142
+ return [6, 30];
143
+ if (version === 6)
144
+ return [6, 34];
145
+ if (version === 7)
146
+ return [6, 22, 38];
147
+ if (version === 8)
148
+ return [6, 24, 42];
149
+ if (version === 9)
150
+ return [6, 26, 46];
151
+ return [6, 28, 50];
152
+ }
153
+ function createFallbackMatrix(text) {
154
+ const size = 25;
155
+ const matrix = Array(size)
156
+ .fill(false)
157
+ .map(() => Array(size).fill(false));
158
+ addFinderPattern(matrix, 0, 0);
159
+ addFinderPattern(matrix, size - 7, 0);
160
+ addFinderPattern(matrix, 0, size - 7);
161
+ for (let i = 0; i < text.length; i++) {
162
+ const r = (i * 3) % (size - 10) + 8;
163
+ const c = (i * 7) % (size - 10) + 8;
164
+ matrix[r][c] = true;
165
+ }
166
+ return matrix;
167
+ }
package/dist/esm/index.js CHANGED
@@ -168,6 +168,7 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, appIcon, env
168
168
  crash: false,
169
169
  device: false,
170
170
  storage: false,
171
+ debugging: true,
171
172
  });
172
173
  const [maxNetworkLogs, setMaxNetworkLogs] = useState(100);
173
174
  const [maxAnalyticsEventsLimit, setMaxAnalyticsEventsLimit] = useState(75);
@@ -221,6 +222,7 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, appIcon, env
221
222
  crash: false,
222
223
  device: false,
223
224
  storage: false,
225
+ debugging: true,
224
226
  });
225
227
  setDefaultTab('apis');
226
228
  setIsAutoRamLimitEnabled(true);
@@ -603,6 +603,7 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
603
603
  alignItems: string;
604
604
  justifyContent: string;
605
605
  marginBottom: number;
606
+ minHeight: number;
606
607
  };
607
608
  cardHeaderLeft: {
608
609
  flexDirection: string;
@@ -610,11 +611,13 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
610
611
  flex: number;
611
612
  marginRight: number;
612
613
  gap: number;
614
+ minWidth: number;
613
615
  };
614
616
  cardHeaderRight: {
615
617
  flexDirection: string;
616
618
  alignItems: string;
617
619
  gap: number;
620
+ flexShrink: number;
618
621
  };
619
622
  smallCheckbox: {
620
623
  width: number;
@@ -701,6 +704,7 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
701
704
  flexDirection: string;
702
705
  alignItems: string;
703
706
  flex: number;
707
+ minWidth: number;
704
708
  gap: number;
705
709
  };
706
710
  slugTag: {
@@ -713,6 +717,7 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
713
717
  paddingVertical: number;
714
718
  borderRadius: number;
715
719
  marginTop: number;
720
+ flexShrink: number;
716
721
  };
717
722
  slugText: {
718
723
  fontFamily: string;
@@ -725,17 +730,20 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
725
730
  flexDirection: string;
726
731
  alignItems: string;
727
732
  gap: number;
733
+ flexShrink: number;
728
734
  };
729
735
  cardFooterRow: {
730
736
  flexDirection: string;
731
737
  alignItems: string;
732
738
  justifyContent: string;
733
739
  marginTop: number;
740
+ minHeight: number;
734
741
  };
735
742
  cardDateRow: {
736
743
  flexDirection: string;
737
744
  alignItems: string;
738
745
  gap: number;
746
+ flexShrink: number;
739
747
  };
740
748
  cardDateText: {
741
749
  fontFamily: string;
@@ -747,6 +755,7 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
747
755
  flexDirection: string;
748
756
  alignItems: string;
749
757
  gap: number;
758
+ flexShrink: number;
750
759
  };
751
760
  chip: {
752
761
  flexDirection: string;
@@ -848,11 +857,13 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
848
857
  alignItems: string;
849
858
  justifyContent: string;
850
859
  paddingBottom: number;
860
+ gap: number;
851
861
  };
852
862
  detailInfoRight: {
853
863
  flexDirection: string;
854
864
  alignItems: string;
855
865
  gap: number;
866
+ flexShrink: number;
856
867
  };
857
868
  metaContainer: {
858
869
  backgroundColor: string;
@@ -558,18 +558,21 @@ export const getRawStyles = (colors) => ({
558
558
  alignItems: 'center',
559
559
  justifyContent: 'space-between',
560
560
  marginBottom: 4,
561
+ minHeight: 22,
561
562
  },
562
563
  cardHeaderLeft: {
563
564
  flexDirection: 'row',
564
565
  alignItems: 'center',
565
566
  flex: 1,
566
- marginRight: 8,
567
- gap: 6,
567
+ marginRight: 6,
568
+ gap: 5,
569
+ minWidth: 0,
568
570
  },
569
571
  cardHeaderRight: {
570
572
  flexDirection: 'row',
571
573
  alignItems: 'center',
572
574
  gap: 5,
575
+ flexShrink: 0,
573
576
  },
574
577
  smallCheckbox: {
575
578
  width: 15,
@@ -650,6 +653,7 @@ export const getRawStyles = (colors) => ({
650
653
  flexDirection: 'row',
651
654
  alignItems: 'flex-start',
652
655
  flex: 1,
656
+ minWidth: 0,
653
657
  gap: 6,
654
658
  },
655
659
  slugTag: {
@@ -662,6 +666,7 @@ export const getRawStyles = (colors) => ({
662
666
  paddingVertical: 1.5,
663
667
  borderRadius: 4,
664
668
  marginTop: 1,
669
+ flexShrink: 0,
665
670
  },
666
671
  slugText: {
667
672
  fontFamily: AppFonts.interMedium,
@@ -674,17 +679,20 @@ export const getRawStyles = (colors) => ({
674
679
  flexDirection: 'row',
675
680
  alignItems: 'center',
676
681
  gap: 4,
682
+ flexShrink: 0,
677
683
  },
678
684
  cardFooterRow: {
679
685
  flexDirection: 'row',
680
686
  alignItems: 'center',
681
687
  justifyContent: 'space-between',
682
- marginTop: 2,
688
+ marginTop: 4,
689
+ minHeight: 18,
683
690
  },
684
691
  cardDateRow: {
685
692
  flexDirection: 'row',
686
693
  alignItems: 'center',
687
694
  gap: 3.5,
695
+ flexShrink: 0,
688
696
  },
689
697
  cardDateText: {
690
698
  fontFamily: AppFonts.interRegular,
@@ -696,6 +704,7 @@ export const getRawStyles = (colors) => ({
696
704
  flexDirection: 'row',
697
705
  alignItems: 'center',
698
706
  gap: 5,
707
+ flexShrink: 0,
699
708
  },
700
709
  chip: {
701
710
  flexDirection: 'row',
@@ -787,9 +796,15 @@ export const getRawStyles = (colors) => ({
787
796
  flexDirection: 'row',
788
797
  alignItems: 'center',
789
798
  justifyContent: 'space-between',
790
- paddingBottom: 10,
799
+ paddingBottom: 8,
800
+ gap: 8,
801
+ },
802
+ detailInfoRight: {
803
+ flexDirection: 'row',
804
+ alignItems: 'center',
805
+ gap: 5,
806
+ flexShrink: 0,
791
807
  },
792
- detailInfoRight: { flexDirection: 'row', alignItems: 'center', gap: 6 },
793
808
  metaContainer: {
794
809
  backgroundColor: colors.primaryLight,
795
810
  borderWidth: 1,
@@ -8,6 +8,7 @@ export declare const ActiveTab: {
8
8
  readonly Crash: "crash";
9
9
  readonly Device: "device";
10
10
  readonly Storage: "storage";
11
+ readonly Debugging: "debugging";
11
12
  };
12
13
  export type ActiveTab = (typeof ActiveTab)[keyof typeof ActiveTab];
13
14
  export declare const Method: {
@@ -17,6 +18,9 @@ export declare const Method: {
17
18
  readonly Put: "PUT";
18
19
  readonly Patch: "PATCH";
19
20
  readonly Delete: "DELETE";
21
+ readonly Query: "QUERY";
22
+ readonly Options: "OPTIONS";
23
+ readonly Head: "HEAD";
20
24
  };
21
25
  export type Method = (typeof Method)[keyof typeof Method];
22
26
  export declare const StatusFilter: {
@@ -56,6 +60,7 @@ export declare const SettingsPage: {
56
60
  readonly Crash: "crash";
57
61
  readonly Device: "device";
58
62
  readonly Storage: "storage";
63
+ readonly Debugging: "debugging";
59
64
  };
60
65
  export type SettingsPage = (typeof SettingsPage)[keyof typeof SettingsPage] | null;
61
66
  export declare const SettingsSubTab: {
@@ -8,6 +8,7 @@ export const ActiveTab = {
8
8
  Crash: 'crash',
9
9
  Device: 'device',
10
10
  Storage: 'storage',
11
+ Debugging: 'debugging',
11
12
  };
12
13
  export const Method = {
13
14
  All: 'ALL',
@@ -16,6 +17,9 @@ export const Method = {
16
17
  Put: 'PUT',
17
18
  Patch: 'PATCH',
18
19
  Delete: 'DELETE',
20
+ Query: 'QUERY',
21
+ Options: 'OPTIONS',
22
+ Head: 'HEAD',
19
23
  };
20
24
  export const StatusFilter = {
21
25
  All: 'ALL',
@@ -50,6 +54,7 @@ export const SettingsPage = {
50
54
  Crash: 'crash',
51
55
  Device: 'device',
52
56
  Storage: 'storage',
57
+ Debugging: 'debugging',
53
58
  };
54
59
  export const SettingsSubTab = {
55
60
  Module: 'module',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-inapp-inspector",
3
- "version": "2.3.9",
3
+ "version": "2.3.11",
4
4
  "description": "The zero-config, all-in-one in-app debugger for React Native & Expo. Inspect Network (fetch/axios), Console logs, Stack Traces, Redux State, Firebase Analytics, and JS Bundle size directly on device.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -105,7 +105,7 @@
105
105
  "prepare": "npm run build",
106
106
  "watch": "tsc -w",
107
107
  "prepack": "npm run build",
108
- "publish": "node release.cjs",
108
+ "release": "node release.cjs",
109
109
  "bundle-visualizer": "react-native-bundle-visualizer"
110
110
  },
111
111
  "keywords": [