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,170 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateQRMatrix = generateQRMatrix;
4
+ function generateQRMatrix(text, ecc = 'M') {
5
+ try {
6
+ return createQRMatrix(text, ecc);
7
+ }
8
+ catch {
9
+ return createFallbackMatrix(text);
10
+ }
11
+ }
12
+ function createQRMatrix(data, ecc) {
13
+ const length = data.length;
14
+ let version = 1;
15
+ if (length > 14)
16
+ version = 2;
17
+ if (length > 26)
18
+ version = 3;
19
+ if (length > 42)
20
+ version = 4;
21
+ if (length > 62)
22
+ version = 5;
23
+ if (length > 84)
24
+ version = 6;
25
+ if (length > 106)
26
+ version = 7;
27
+ if (length > 122)
28
+ version = 8;
29
+ if (length > 152)
30
+ version = 9;
31
+ if (length > 180)
32
+ version = 10;
33
+ const size = version * 4 + 17;
34
+ const matrix = Array(size)
35
+ .fill(null)
36
+ .map(() => Array(size).fill(null));
37
+ addFinderPattern(matrix, 0, 0);
38
+ addFinderPattern(matrix, size - 7, 0);
39
+ addFinderPattern(matrix, 0, size - 7);
40
+ for (let i = 8; i < size - 8; i++) {
41
+ const val = i % 2 === 0;
42
+ if (matrix[6][i] === null)
43
+ matrix[6][i] = val;
44
+ if (matrix[i][6] === null)
45
+ matrix[i][6] = val;
46
+ }
47
+ if (version >= 2) {
48
+ const pos = getAlignmentPositions(version);
49
+ for (const r of pos) {
50
+ for (const c of pos) {
51
+ if (matrix[r][c] === null) {
52
+ addAlignmentPattern(matrix, r - 2, c - 2);
53
+ }
54
+ }
55
+ }
56
+ }
57
+ const bits = [];
58
+ bits.push(false, true, false, false);
59
+ for (let i = 7; i >= 0; i--) {
60
+ bits.push(((length >> i) & 1) === 1);
61
+ }
62
+ for (let i = 0; i < length; i++) {
63
+ const code = data.charCodeAt(i);
64
+ for (let b = 7; b >= 0; b--) {
65
+ bits.push(((code >> b) & 1) === 1);
66
+ }
67
+ }
68
+ for (let i = 0; i < 4 && bits.length % 8 !== 0; i++) {
69
+ bits.push(false);
70
+ }
71
+ while (bits.length % 8 !== 0) {
72
+ bits.push(false);
73
+ }
74
+ const padBytes = [0xec, 0x11];
75
+ let padIdx = 0;
76
+ const totalDataBits = size * size * 0.6;
77
+ while (bits.length < totalDataBits) {
78
+ const b = padBytes[padIdx % 2];
79
+ padIdx++;
80
+ for (let bit = 7; bit >= 0; bit--) {
81
+ bits.push(((b >> bit) & 1) === 1);
82
+ }
83
+ }
84
+ let bitIdx = 0;
85
+ let upwards = true;
86
+ for (let col = size - 1; col > 0; col -= 2) {
87
+ if (col === 6)
88
+ col--;
89
+ const rows = upwards
90
+ ? Array.from({ length: size }, (_, i) => size - 1 - i)
91
+ : Array.from({ length: size }, (_, i) => i);
92
+ for (const row of rows) {
93
+ for (const c of [col, col - 1]) {
94
+ if (matrix[row][c] === null) {
95
+ const bit = bitIdx < bits.length ? bits[bitIdx++] : false;
96
+ const mask = (row + c) % 2 === 0;
97
+ matrix[row][c] = bit !== mask;
98
+ }
99
+ }
100
+ }
101
+ upwards = !upwards;
102
+ }
103
+ return matrix.map(row => row.map(cell => cell ?? false));
104
+ }
105
+ function addFinderPattern(matrix, row, col) {
106
+ for (let r = -1; r <= 7; r++) {
107
+ for (let c = -1; c <= 7; c++) {
108
+ const mr = row + r;
109
+ const mc = col + c;
110
+ if (mr >= 0 && mr < matrix.length && mc >= 0 && mc < matrix.length) {
111
+ if ((r >= 0 && r <= 6 && (c === 0 || c === 6)) ||
112
+ (c >= 0 && c <= 6 && (r === 0 || r === 6)) ||
113
+ (r >= 2 && r <= 4 && c >= 2 && c <= 4)) {
114
+ matrix[mr][mc] = true;
115
+ }
116
+ else if (r >= 0 && r <= 6 && c >= 0 && c <= 6) {
117
+ matrix[mr][mc] = false;
118
+ }
119
+ else {
120
+ matrix[mr][mc] = false;
121
+ }
122
+ }
123
+ }
124
+ }
125
+ }
126
+ function addAlignmentPattern(matrix, row, col) {
127
+ for (let r = 0; r < 5; r++) {
128
+ for (let c = 0; c < 5; c++) {
129
+ const isOuter = r === 0 || r === 4 || c === 0 || c === 4;
130
+ const isCenter = r === 2 && c === 2;
131
+ matrix[row + r][col + c] = isOuter || isCenter;
132
+ }
133
+ }
134
+ }
135
+ function getAlignmentPositions(version) {
136
+ if (version === 1)
137
+ return [];
138
+ if (version === 2)
139
+ return [6, 18];
140
+ if (version === 3)
141
+ return [6, 22];
142
+ if (version === 4)
143
+ return [6, 26];
144
+ if (version === 5)
145
+ return [6, 30];
146
+ if (version === 6)
147
+ return [6, 34];
148
+ if (version === 7)
149
+ return [6, 22, 38];
150
+ if (version === 8)
151
+ return [6, 24, 42];
152
+ if (version === 9)
153
+ return [6, 26, 46];
154
+ return [6, 28, 50];
155
+ }
156
+ function createFallbackMatrix(text) {
157
+ const size = 25;
158
+ const matrix = Array(size)
159
+ .fill(false)
160
+ .map(() => Array(size).fill(false));
161
+ addFinderPattern(matrix, 0, 0);
162
+ addFinderPattern(matrix, size - 7, 0);
163
+ addFinderPattern(matrix, 0, size - 7);
164
+ for (let i = 0; i < text.length; i++) {
165
+ const r = (i * 3) % (size - 10) + 8;
166
+ const c = (i * 7) % (size - 10) + 8;
167
+ matrix[r][c] = true;
168
+ }
169
+ return matrix;
170
+ }
@@ -209,6 +209,7 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, appIcon, env
209
209
  crash: false,
210
210
  device: false,
211
211
  storage: false,
212
+ debugging: true,
212
213
  });
213
214
  const [maxNetworkLogs, setMaxNetworkLogs] = (0, react_1.useState)(100);
214
215
  const [maxAnalyticsEventsLimit, setMaxAnalyticsEventsLimit] = (0, react_1.useState)(75);
@@ -262,6 +263,7 @@ const NetworkInspector = ({ enabled = true, storage, navigationRef, appIcon, env
262
263
  crash: false,
263
264
  device: false,
264
265
  storage: false,
266
+ debugging: true,
265
267
  });
266
268
  setDefaultTab('apis');
267
269
  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;
@@ -594,18 +594,21 @@ const getRawStyles = (colors) => ({
594
594
  alignItems: 'center',
595
595
  justifyContent: 'space-between',
596
596
  marginBottom: 4,
597
+ minHeight: 22,
597
598
  },
598
599
  cardHeaderLeft: {
599
600
  flexDirection: 'row',
600
601
  alignItems: 'center',
601
602
  flex: 1,
602
- marginRight: 8,
603
- gap: 6,
603
+ marginRight: 6,
604
+ gap: 5,
605
+ minWidth: 0,
604
606
  },
605
607
  cardHeaderRight: {
606
608
  flexDirection: 'row',
607
609
  alignItems: 'center',
608
610
  gap: 5,
611
+ flexShrink: 0,
609
612
  },
610
613
  smallCheckbox: {
611
614
  width: 15,
@@ -686,6 +689,7 @@ const getRawStyles = (colors) => ({
686
689
  flexDirection: 'row',
687
690
  alignItems: 'flex-start',
688
691
  flex: 1,
692
+ minWidth: 0,
689
693
  gap: 6,
690
694
  },
691
695
  slugTag: {
@@ -698,6 +702,7 @@ const getRawStyles = (colors) => ({
698
702
  paddingVertical: 1.5,
699
703
  borderRadius: 4,
700
704
  marginTop: 1,
705
+ flexShrink: 0,
701
706
  },
702
707
  slugText: {
703
708
  fontFamily: AppFonts_1.AppFonts.interMedium,
@@ -710,17 +715,20 @@ const getRawStyles = (colors) => ({
710
715
  flexDirection: 'row',
711
716
  alignItems: 'center',
712
717
  gap: 4,
718
+ flexShrink: 0,
713
719
  },
714
720
  cardFooterRow: {
715
721
  flexDirection: 'row',
716
722
  alignItems: 'center',
717
723
  justifyContent: 'space-between',
718
- marginTop: 2,
724
+ marginTop: 4,
725
+ minHeight: 18,
719
726
  },
720
727
  cardDateRow: {
721
728
  flexDirection: 'row',
722
729
  alignItems: 'center',
723
730
  gap: 3.5,
731
+ flexShrink: 0,
724
732
  },
725
733
  cardDateText: {
726
734
  fontFamily: AppFonts_1.AppFonts.interRegular,
@@ -732,6 +740,7 @@ const getRawStyles = (colors) => ({
732
740
  flexDirection: 'row',
733
741
  alignItems: 'center',
734
742
  gap: 5,
743
+ flexShrink: 0,
735
744
  },
736
745
  chip: {
737
746
  flexDirection: 'row',
@@ -823,9 +832,15 @@ const getRawStyles = (colors) => ({
823
832
  flexDirection: 'row',
824
833
  alignItems: 'center',
825
834
  justifyContent: 'space-between',
826
- paddingBottom: 10,
835
+ paddingBottom: 8,
836
+ gap: 8,
837
+ },
838
+ detailInfoRight: {
839
+ flexDirection: 'row',
840
+ alignItems: 'center',
841
+ gap: 5,
842
+ flexShrink: 0,
827
843
  },
828
- detailInfoRight: { flexDirection: 'row', alignItems: 'center', gap: 6 },
829
844
  metaContainer: {
830
845
  backgroundColor: colors.primaryLight,
831
846
  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: {
@@ -11,6 +11,7 @@ exports.ActiveTab = {
11
11
  Crash: 'crash',
12
12
  Device: 'device',
13
13
  Storage: 'storage',
14
+ Debugging: 'debugging',
14
15
  };
15
16
  exports.Method = {
16
17
  All: 'ALL',
@@ -19,6 +20,9 @@ exports.Method = {
19
20
  Put: 'PUT',
20
21
  Patch: 'PATCH',
21
22
  Delete: 'DELETE',
23
+ Query: 'QUERY',
24
+ Options: 'OPTIONS',
25
+ Head: 'HEAD',
22
26
  };
23
27
  exports.StatusFilter = {
24
28
  All: 'ALL',
@@ -53,6 +57,7 @@ exports.SettingsPage = {
53
57
  Crash: 'crash',
54
58
  Device: 'device',
55
59
  Storage: 'storage',
60
+ Debugging: 'debugging',
56
61
  };
57
62
  exports.SettingsSubTab = {
58
63
  Module: 'module',
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const DebuggingTab: React.FC;
3
+ export default DebuggingTab;