react-native-inapp-inspector 2.2.9 → 2.3.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/dist/commonjs/components/AppHeaderLogo.js +45 -12
- package/dist/commonjs/components/BrandSquareIcon.js +92 -49
- package/dist/commonjs/components/EmptyState.d.ts +7 -2
- package/dist/commonjs/components/EmptyState.js +11 -5
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +29 -18
- package/dist/commonjs/components/Inspector/ConsoleTab.js +6 -1
- package/dist/commonjs/components/Inspector/CrashDetail.js +43 -9
- package/dist/commonjs/components/Inspector/CrashTab.js +34 -3
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +80 -16
- package/dist/commonjs/components/Inspector/InspectorHeader.js +16 -3
- package/dist/commonjs/components/Inspector/MainScreen.js +7 -11
- package/dist/commonjs/components/Inspector/NetworkDetail.js +3 -2
- package/dist/commonjs/components/Inspector/NetworkTab.js +103 -4
- package/dist/commonjs/components/Inspector/ReduxTab.js +19 -3
- package/dist/commonjs/components/Inspector/SettingsPanel.js +4 -4
- package/dist/commonjs/components/Inspector/StorageTab.js +123 -92
- package/dist/commonjs/components/JsonViewer.js +2 -0
- package/dist/commonjs/components/MetaAccordion.js +15 -3
- package/dist/commonjs/components/SkeletonPlaceholder.d.ts +6 -0
- package/dist/commonjs/components/SkeletonPlaceholder.js +208 -0
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/networkLogger.d.ts +3 -0
- package/dist/commonjs/customHooks/networkLogger.js +10 -1
- package/dist/commonjs/customHooks/storageInspector.d.ts +2 -2
- package/dist/commonjs/customHooks/storageInspector.js +17 -13
- package/dist/commonjs/helpers/index.d.ts +6 -0
- package/dist/commonjs/helpers/index.js +196 -6
- package/dist/commonjs/helpers/searchQueryParser.js +62 -20
- package/dist/commonjs/i18n/index.d.ts +13 -0
- package/dist/commonjs/i18n/index.js +35 -2
- package/dist/commonjs/index.d.ts +3 -0
- package/dist/commonjs/index.js +108 -35
- package/dist/commonjs/styles/AppColors.d.ts +4 -0
- package/dist/commonjs/styles/AppColors.js +11 -1
- package/dist/commonjs/styles/AppFonts.d.ts +11 -0
- package/dist/commonjs/styles/AppFonts.js +11 -1
- package/dist/commonjs/types/interfaces.d.ts +2 -2
- package/dist/esm/components/AppHeaderLogo.js +45 -12
- package/dist/esm/components/BrandSquareIcon.js +92 -49
- package/dist/esm/components/EmptyState.d.ts +7 -2
- package/dist/esm/components/EmptyState.js +11 -5
- package/dist/esm/components/Inspector/AnalyticsTab.js +30 -19
- package/dist/esm/components/Inspector/ConsoleTab.js +6 -1
- package/dist/esm/components/Inspector/CrashDetail.js +43 -9
- package/dist/esm/components/Inspector/CrashTab.js +34 -3
- package/dist/esm/components/Inspector/DeviceInfoTab.js +80 -16
- package/dist/esm/components/Inspector/InspectorHeader.js +17 -4
- package/dist/esm/components/Inspector/MainScreen.js +8 -12
- package/dist/esm/components/Inspector/NetworkDetail.js +3 -2
- package/dist/esm/components/Inspector/NetworkTab.js +103 -4
- package/dist/esm/components/Inspector/ReduxTab.js +19 -3
- package/dist/esm/components/Inspector/SettingsPanel.js +4 -4
- package/dist/esm/components/Inspector/StorageTab.js +124 -93
- package/dist/esm/components/JsonViewer.js +2 -0
- package/dist/esm/components/MetaAccordion.js +15 -3
- package/dist/esm/components/SkeletonPlaceholder.d.ts +6 -0
- package/dist/esm/components/SkeletonPlaceholder.js +173 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/networkLogger.d.ts +3 -0
- package/dist/esm/customHooks/networkLogger.js +8 -0
- package/dist/esm/customHooks/storageInspector.d.ts +2 -2
- package/dist/esm/customHooks/storageInspector.js +17 -13
- package/dist/esm/helpers/index.d.ts +6 -0
- package/dist/esm/helpers/index.js +193 -5
- package/dist/esm/helpers/searchQueryParser.js +62 -20
- package/dist/esm/i18n/index.d.ts +13 -0
- package/dist/esm/i18n/index.js +33 -3
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +97 -37
- package/dist/esm/styles/AppColors.d.ts +4 -0
- package/dist/esm/styles/AppColors.js +9 -0
- package/dist/esm/styles/AppFonts.d.ts +11 -0
- package/dist/esm/styles/AppFonts.js +9 -0
- package/dist/esm/types/interfaces.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/AppHeaderLogo.tsx +46 -12
- package/src/components/BrandSquareIcon.tsx +127 -78
- package/src/components/EmptyState.tsx +27 -5
- package/src/components/Inspector/AnalyticsTab.tsx +48 -27
- package/src/components/Inspector/ConsoleTab.tsx +10 -0
- package/src/components/Inspector/CrashDetail.tsx +65 -9
- package/src/components/Inspector/CrashTab.tsx +41 -3
- package/src/components/Inspector/DeviceInfoTab.tsx +87 -16
- package/src/components/Inspector/InspectorHeader.tsx +24 -4
- package/src/components/Inspector/MainScreen.tsx +7 -11
- package/src/components/Inspector/NetworkDetail.tsx +4 -4
- package/src/components/Inspector/NetworkTab.tsx +129 -4
- package/src/components/Inspector/ReduxTab.tsx +26 -8
- package/src/components/Inspector/SettingsPanel.tsx +4 -4
- package/src/components/Inspector/StorageTab.tsx +191 -117
- package/src/components/JsonViewer.tsx +2 -0
- package/src/components/MetaAccordion.tsx +18 -3
- package/src/components/SkeletonPlaceholder.tsx +206 -0
- package/src/constants/version.ts +1 -1
- package/src/customHooks/networkLogger.ts +15 -0
- package/src/customHooks/storageInspector.ts +18 -14
- package/src/helpers/index.ts +213 -5
- package/src/helpers/searchQueryParser.ts +63 -20
- package/src/i18n/index.ts +38 -3
- package/src/index.tsx +124 -37
- package/src/styles/AppColors.ts +9 -0
- package/src/styles/AppFonts.ts +16 -0
- package/src/types/interfaces.ts +2 -2
package/src/index.tsx
CHANGED
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
import {
|
|
27
27
|
formatDisplayUrl,
|
|
28
28
|
getNavigationInfo,
|
|
29
|
+
getLogPageName,
|
|
29
30
|
deduplicateLogs,
|
|
30
31
|
getDomainColor,
|
|
31
32
|
getEventCategory,
|
|
@@ -55,6 +56,7 @@ import {
|
|
|
55
56
|
subscribeNetworkLogs,
|
|
56
57
|
setNetworkModuleEnabled,
|
|
57
58
|
setMaxNetworkLogsLimit,
|
|
59
|
+
setRouteInfoProvider,
|
|
58
60
|
} from './customHooks/networkLogger';
|
|
59
61
|
|
|
60
62
|
// Console
|
|
@@ -144,14 +146,13 @@ import {toggleGlobalTheme} from './styles';
|
|
|
144
146
|
|
|
145
147
|
const NetworkInspector = ({
|
|
146
148
|
enabled = true,
|
|
147
|
-
isEnabled = true,
|
|
148
149
|
storage,
|
|
149
150
|
navigationRef,
|
|
150
151
|
appIcon,
|
|
151
152
|
environment,
|
|
152
|
-
initialVisible,
|
|
153
|
+
initialVisible = false,
|
|
153
154
|
visible: controlledVisible,
|
|
154
|
-
}: NetworkInspectorProps): React.JSX.Element => {
|
|
155
|
+
}: NetworkInspectorProps): React.JSX.Element | null => {
|
|
155
156
|
// Set custom storage synchronously during render phase
|
|
156
157
|
setCustomStorage(storage || null);
|
|
157
158
|
|
|
@@ -168,7 +169,7 @@ const NetworkInspector = ({
|
|
|
168
169
|
|
|
169
170
|
const [logs, setLogs] = useState<NetworkLog[]>([]);
|
|
170
171
|
const [visible, setVisible] = useState<boolean>(
|
|
171
|
-
|
|
172
|
+
controlledVisible ?? initialVisible ?? false,
|
|
172
173
|
);
|
|
173
174
|
|
|
174
175
|
useEffect(() => {
|
|
@@ -357,8 +358,8 @@ const NetworkInspector = ({
|
|
|
357
358
|
bundle: false,
|
|
358
359
|
performance: false,
|
|
359
360
|
crash: false,
|
|
360
|
-
device:
|
|
361
|
-
storage:
|
|
361
|
+
device: false,
|
|
362
|
+
storage: false,
|
|
362
363
|
});
|
|
363
364
|
|
|
364
365
|
const [maxNetworkLogs, setMaxNetworkLogs] = useState<number>(100);
|
|
@@ -419,8 +420,8 @@ const NetworkInspector = ({
|
|
|
419
420
|
bundle: false,
|
|
420
421
|
performance: false,
|
|
421
422
|
crash: false,
|
|
422
|
-
device:
|
|
423
|
-
storage:
|
|
423
|
+
device: false,
|
|
424
|
+
storage: false,
|
|
424
425
|
});
|
|
425
426
|
setDefaultTab('apis');
|
|
426
427
|
setIsAutoRamLimitEnabled(true);
|
|
@@ -490,6 +491,8 @@ const NetworkInspector = ({
|
|
|
490
491
|
bundle: false,
|
|
491
492
|
performance: false,
|
|
492
493
|
crash: false,
|
|
494
|
+
device: false,
|
|
495
|
+
storage: false,
|
|
493
496
|
},
|
|
494
497
|
...(saved.tabVisibility || {}),
|
|
495
498
|
apis: true,
|
|
@@ -708,12 +711,23 @@ const NetworkInspector = ({
|
|
|
708
711
|
const hasNavigationContext = navigationContext !== undefined;
|
|
709
712
|
|
|
710
713
|
const currentRouteRef = useRef<RouteInfo>({
|
|
711
|
-
path: '
|
|
714
|
+
path: '',
|
|
712
715
|
params: null,
|
|
713
716
|
});
|
|
717
|
+
|
|
718
|
+
useEffect(() => {
|
|
719
|
+
setRouteInfoProvider(() => currentRouteRef.current);
|
|
720
|
+
return () => {
|
|
721
|
+
setRouteInfoProvider(null);
|
|
722
|
+
};
|
|
723
|
+
}, []);
|
|
724
|
+
|
|
714
725
|
useEffect(() => {
|
|
715
726
|
if (navState) {
|
|
716
|
-
|
|
727
|
+
const info = getNavigationInfo(navState);
|
|
728
|
+
if (info?.path) {
|
|
729
|
+
currentRouteRef.current = info;
|
|
730
|
+
}
|
|
717
731
|
}
|
|
718
732
|
}, [navState]);
|
|
719
733
|
|
|
@@ -723,9 +737,22 @@ const NetworkInspector = ({
|
|
|
723
737
|
const updateState = () => {
|
|
724
738
|
try {
|
|
725
739
|
if (typeof navigationRef.isReady === 'function' && navigationRef.isReady()) {
|
|
740
|
+
const currentRoute = typeof navigationRef.getCurrentRoute === 'function'
|
|
741
|
+
? navigationRef.getCurrentRoute()
|
|
742
|
+
: null;
|
|
743
|
+
if (currentRoute?.name) {
|
|
744
|
+
currentRouteRef.current = {
|
|
745
|
+
path: currentRoute.name,
|
|
746
|
+
params: currentRoute.params || null,
|
|
747
|
+
};
|
|
748
|
+
}
|
|
726
749
|
const state = navigationRef.getRootState();
|
|
727
750
|
if (state) {
|
|
728
751
|
setNavState(state);
|
|
752
|
+
const routeInfo = getNavigationInfo(state);
|
|
753
|
+
if (routeInfo?.path) {
|
|
754
|
+
currentRouteRef.current = routeInfo;
|
|
755
|
+
}
|
|
729
756
|
}
|
|
730
757
|
}
|
|
731
758
|
} catch (err) {
|
|
@@ -917,24 +944,29 @@ const NetworkInspector = ({
|
|
|
917
944
|
|
|
918
945
|
// 100% Native Main-Thread Floating Button Lifecycle
|
|
919
946
|
useEffect(() => {
|
|
920
|
-
if (!useNativeFab || !
|
|
947
|
+
if (!useNativeFab || !enabled) {
|
|
921
948
|
if (useNativeFab) {
|
|
922
|
-
hideNativeFloatingButton();
|
|
949
|
+
hideNativeFloatingButton().catch(() => {});
|
|
923
950
|
}
|
|
924
951
|
return;
|
|
925
952
|
}
|
|
926
953
|
|
|
927
954
|
if (visible) {
|
|
928
|
-
hideNativeFloatingButton();
|
|
955
|
+
hideNativeFloatingButton().catch(() => {});
|
|
929
956
|
} else {
|
|
930
|
-
showNativeFloatingButton();
|
|
957
|
+
showNativeFloatingButton().catch(() => {});
|
|
931
958
|
setNativeFloatingButtonBadge(
|
|
932
959
|
logs.length > 0 || analyticsEvents.length > 0,
|
|
933
|
-
);
|
|
960
|
+
).catch(() => {});
|
|
934
961
|
}
|
|
962
|
+
|
|
963
|
+
return () => {
|
|
964
|
+
if (useNativeFab) {
|
|
965
|
+
hideNativeFloatingButton().catch(() => {});
|
|
966
|
+
}
|
|
967
|
+
};
|
|
935
968
|
}, [
|
|
936
969
|
useNativeFab,
|
|
937
|
-
isEnabled,
|
|
938
970
|
enabled,
|
|
939
971
|
visible,
|
|
940
972
|
logs.length,
|
|
@@ -999,21 +1031,12 @@ const NetworkInspector = ({
|
|
|
999
1031
|
if (freshCrashes.length > 0) {
|
|
1000
1032
|
setCrashRecords(freshCrashes);
|
|
1001
1033
|
}
|
|
1002
|
-
}
|
|
1003
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1004
|
-
}, [visible]);
|
|
1005
1034
|
|
|
1006
|
-
|
|
1007
|
-
if (visible) {
|
|
1008
|
-
const task = InteractionManager.runAfterInteractions(() => {
|
|
1035
|
+
const frame = requestAnimationFrame(() => {
|
|
1009
1036
|
setIsReady(true);
|
|
1010
1037
|
});
|
|
1011
|
-
const fallbackTimer = setTimeout(() => {
|
|
1012
|
-
setIsReady(true);
|
|
1013
|
-
}, 350);
|
|
1014
1038
|
return () => {
|
|
1015
|
-
|
|
1016
|
-
clearTimeout(fallbackTimer);
|
|
1039
|
+
cancelAnimationFrame(frame);
|
|
1017
1040
|
};
|
|
1018
1041
|
} else {
|
|
1019
1042
|
setIsReady(false);
|
|
@@ -1077,7 +1100,10 @@ const NetworkInspector = ({
|
|
|
1077
1100
|
if (freshIds.size > 0) {
|
|
1078
1101
|
freshIds.forEach(id => {
|
|
1079
1102
|
if (!logRouteMapRef.current.has(id)) {
|
|
1080
|
-
|
|
1103
|
+
const matchedLog = deduped.find(l => l.id === id);
|
|
1104
|
+
const resolvedRoute =
|
|
1105
|
+
(matchedLog as any)?.routeInfo || currentRouteRef.current;
|
|
1106
|
+
logRouteMapRef.current.set(id, resolvedRoute);
|
|
1081
1107
|
}
|
|
1082
1108
|
});
|
|
1083
1109
|
setNewLogIds(freshIds);
|
|
@@ -1091,6 +1117,13 @@ const NetworkInspector = ({
|
|
|
1091
1117
|
const deduped = deduplicateLogs(raw);
|
|
1092
1118
|
const incoming = new Set(deduped.map(l => l.id));
|
|
1093
1119
|
prevLogIdsRef.current = incoming;
|
|
1120
|
+
deduped.forEach(l => {
|
|
1121
|
+
if (!logRouteMapRef.current.has(l.id)) {
|
|
1122
|
+
const resolvedRoute =
|
|
1123
|
+
(l as any)?.routeInfo || currentRouteRef.current;
|
|
1124
|
+
logRouteMapRef.current.set(l.id, resolvedRoute);
|
|
1125
|
+
}
|
|
1126
|
+
});
|
|
1094
1127
|
setLogs(deduped);
|
|
1095
1128
|
} else {
|
|
1096
1129
|
timeoutId = setTimeout(updateNetworkState, 250);
|
|
@@ -1378,8 +1411,9 @@ const NetworkInspector = ({
|
|
|
1378
1411
|
|
|
1379
1412
|
for (let i = 0; i < filteredLogs.length; i++) {
|
|
1380
1413
|
const log = filteredLogs[i];
|
|
1381
|
-
const routeInfo =
|
|
1382
|
-
|
|
1414
|
+
const routeInfo =
|
|
1415
|
+
logRouteMapRef.current.get(log.id) || (log as any)?.routeInfo;
|
|
1416
|
+
const pageName = getLogPageName(log, routeInfo);
|
|
1383
1417
|
|
|
1384
1418
|
if (
|
|
1385
1419
|
groups.length === 0 ||
|
|
@@ -1680,7 +1714,23 @@ const NetworkInspector = ({
|
|
|
1680
1714
|
log.sourceMethod || '',
|
|
1681
1715
|
].join(' ').toLowerCase();
|
|
1682
1716
|
|
|
1683
|
-
return queryTokens.every(token =>
|
|
1717
|
+
return queryTokens.every(token => {
|
|
1718
|
+
if (token.startsWith('level:') || token.startsWith('is:') || token.startsWith('type:')) {
|
|
1719
|
+
const flag = token.replace(/^(level:|is:|type:)/, '').trim();
|
|
1720
|
+
if (flag === 'error' || flag === 'err') return log.type === 'error';
|
|
1721
|
+
if (flag === 'warn' || flag === 'warning') return log.type === 'warn';
|
|
1722
|
+
if (flag === 'info') return log.type === 'info';
|
|
1723
|
+
if (flag === 'log') return log.sourceMethod === 'log';
|
|
1724
|
+
if (flag === 'analytics') return (log.message || '').toLowerCase().includes('[analytics');
|
|
1725
|
+
}
|
|
1726
|
+
if (token === 'error' || token === 'err') {
|
|
1727
|
+
return log.type === 'error' || searchTarget.includes(token);
|
|
1728
|
+
}
|
|
1729
|
+
if (token === 'warn' || token === 'warning') {
|
|
1730
|
+
return log.type === 'warn' || searchTarget.includes(token);
|
|
1731
|
+
}
|
|
1732
|
+
return searchTarget.includes(token);
|
|
1733
|
+
});
|
|
1684
1734
|
});
|
|
1685
1735
|
}
|
|
1686
1736
|
|
|
@@ -1927,7 +1977,8 @@ const NetworkInspector = ({
|
|
|
1927
1977
|
setVisible,
|
|
1928
1978
|
closeModal,
|
|
1929
1979
|
isReady,
|
|
1930
|
-
|
|
1980
|
+
enabled,
|
|
1981
|
+
isEnabled: enabled,
|
|
1931
1982
|
appIcon,
|
|
1932
1983
|
environment,
|
|
1933
1984
|
modalHeightPercent,
|
|
@@ -2118,16 +2169,29 @@ const NetworkInspector = ({
|
|
|
2118
2169
|
};
|
|
2119
2170
|
|
|
2120
2171
|
const NetworkInspectorWrapper = (props: NetworkInspectorProps) => {
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2172
|
+
const enabled = props?.enabled ?? true;
|
|
2173
|
+
|
|
2174
|
+
useEffect(() => {
|
|
2175
|
+
if (!enabled) {
|
|
2176
|
+
hideNativeFloatingButton().catch(() => {});
|
|
2177
|
+
}
|
|
2178
|
+
return () => {
|
|
2179
|
+
hideNativeFloatingButton().catch(() => {});
|
|
2180
|
+
};
|
|
2181
|
+
}, [enabled]);
|
|
2182
|
+
|
|
2183
|
+
// If enabled is false, return null immediately with 0 overhead
|
|
2184
|
+
if (!enabled) {
|
|
2124
2185
|
return null;
|
|
2125
2186
|
}
|
|
2126
2187
|
|
|
2127
2188
|
return (
|
|
2128
2189
|
<I18nextProvider i18n={i18n}>
|
|
2129
2190
|
<ErrorBoundary fallbackType="inline">
|
|
2130
|
-
<NetworkInspector
|
|
2191
|
+
<NetworkInspector
|
|
2192
|
+
{...props}
|
|
2193
|
+
enabled={enabled}
|
|
2194
|
+
/>
|
|
2131
2195
|
</ErrorBoundary>
|
|
2132
2196
|
</I18nextProvider>
|
|
2133
2197
|
);
|
|
@@ -2331,4 +2395,27 @@ export {
|
|
|
2331
2395
|
CrashDetailSubTab,
|
|
2332
2396
|
CrashFilterType,
|
|
2333
2397
|
BreadcrumbType,
|
|
2334
|
-
} from './types';
|
|
2398
|
+
} from './types';
|
|
2399
|
+
|
|
2400
|
+
export {
|
|
2401
|
+
AppFonts,
|
|
2402
|
+
setAppFonts,
|
|
2403
|
+
type AppFontConfig,
|
|
2404
|
+
} from './styles/AppFonts';
|
|
2405
|
+
|
|
2406
|
+
export {
|
|
2407
|
+
AppColors,
|
|
2408
|
+
setAppColors,
|
|
2409
|
+
getThemeColors,
|
|
2410
|
+
updateAppColorsTheme,
|
|
2411
|
+
} from './styles/AppColors';
|
|
2412
|
+
|
|
2413
|
+
export {
|
|
2414
|
+
t,
|
|
2415
|
+
i18n,
|
|
2416
|
+
useTranslation,
|
|
2417
|
+
setLanguage,
|
|
2418
|
+
addTranslations,
|
|
2419
|
+
setTranslations,
|
|
2420
|
+
I18nextProvider,
|
|
2421
|
+
} from './i18n';
|
package/src/styles/AppColors.ts
CHANGED
|
@@ -405,4 +405,13 @@ export const updateAppColorsTheme = (isDark: boolean) => {
|
|
|
405
405
|
Object.assign(AppColors, getThemeColors(isDark));
|
|
406
406
|
};
|
|
407
407
|
|
|
408
|
+
/**
|
|
409
|
+
* Configure or override specific color tokens used throughout the inspector.
|
|
410
|
+
*/
|
|
411
|
+
export const setAppColors = (customColors: Partial<typeof LightColors>): void => {
|
|
412
|
+
if (!customColors || typeof customColors !== 'object') return;
|
|
413
|
+
Object.assign(AppColors, customColors);
|
|
414
|
+
Object.assign(LightColors, customColors);
|
|
415
|
+
};
|
|
416
|
+
|
|
408
417
|
export default AppColors;
|
package/src/styles/AppFonts.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
export interface AppFontConfig {
|
|
2
|
+
interRegular?: string;
|
|
3
|
+
interMedium?: string;
|
|
4
|
+
interBold?: string;
|
|
5
|
+
Sfprotext?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
1
8
|
export const AppFonts = {
|
|
2
9
|
interRegular: 'Inter-Regular',
|
|
3
10
|
interMedium: 'Inter-Medium',
|
|
@@ -5,4 +12,13 @@ export const AppFonts = {
|
|
|
5
12
|
Sfprotext: 'Inter-Regular',
|
|
6
13
|
};
|
|
7
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Configure or override font families used across all inspector screens.
|
|
17
|
+
* Useful when integrating into apps with custom font setups or system fonts.
|
|
18
|
+
*/
|
|
19
|
+
export const setAppFonts = (customFonts: Partial<typeof AppFonts>): void => {
|
|
20
|
+
if (!customFonts || typeof customFonts !== 'object') return;
|
|
21
|
+
Object.assign(AppFonts, customFonts);
|
|
22
|
+
};
|
|
23
|
+
|
|
8
24
|
export default AppFonts;
|
package/src/types/interfaces.ts
CHANGED
|
@@ -128,6 +128,7 @@ export interface NetworkLog {
|
|
|
128
128
|
/** Client identifier: axios, fetch, xhr, apollo, etc. */
|
|
129
129
|
client?: 'axios' | 'fetch' | 'xhr' | 'apollo' | 'graphql' | string;
|
|
130
130
|
caller?: string;
|
|
131
|
+
routeInfo?: RouteInfo;
|
|
131
132
|
}
|
|
132
133
|
|
|
133
134
|
export interface RouteInfo {
|
|
@@ -185,8 +186,6 @@ export interface PersistedSettings {
|
|
|
185
186
|
|
|
186
187
|
export interface NetworkInspectorProps {
|
|
187
188
|
enabled?: boolean;
|
|
188
|
-
isEnabled?: boolean;
|
|
189
|
-
forceEnable?: boolean;
|
|
190
189
|
storage?: InspectorStorage;
|
|
191
190
|
navigationRef?: any;
|
|
192
191
|
appIcon?: any;
|
|
@@ -205,6 +204,7 @@ export interface InspectorContextValue {
|
|
|
205
204
|
setVisible: React.Dispatch<React.SetStateAction<boolean>>;
|
|
206
205
|
closeModal: () => void;
|
|
207
206
|
isReady: boolean;
|
|
207
|
+
enabled: boolean;
|
|
208
208
|
isEnabled: boolean;
|
|
209
209
|
appIcon?: any;
|
|
210
210
|
environment?: string;
|