react-native-inapp-inspector 2.2.9 → 2.3.0
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/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 +19 -3
- package/dist/commonjs/components/JsonViewer.js +2 -0
- package/dist/commonjs/components/MetaAccordion.js +15 -3
- 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/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 +80 -11
- 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 +1 -0
- 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/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 +19 -3
- package/dist/esm/components/JsonViewer.js +2 -0
- package/dist/esm/components/MetaAccordion.js +15 -3
- 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/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 +68 -12
- 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 +1 -0
- 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/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 +21 -3
- package/src/components/JsonViewer.tsx +2 -0
- package/src/components/MetaAccordion.tsx +18 -3
- package/src/constants/version.ts +1 -1
- package/src/customHooks/networkLogger.ts +15 -0
- 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 +89 -11
- package/src/styles/AppColors.ts +9 -0
- package/src/styles/AppFonts.ts +16 -0
- package/src/types/interfaces.ts +1 -0
package/dist/commonjs/index.js
CHANGED
|
@@ -38,7 +38,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.registerComponentProfile = exports.getHermesMemoryStats = exports.measureAsync = exports.trackHeavyTask = exports.trackNavigationTransition = exports.trackComponentRender = exports.useNavigationProfiler = exports.useComponentProfiler = exports.usePerformanceTracker = exports.registerGAPlugin = exports.getEventCategory = exports.getLastActionForReducer = exports.clearActionHistory = exports.getActionHistory = exports.subscribeReduxState = exports.getReduxState = exports.inspectorReduxMiddleware = exports.connectReduxStore = exports.ErrorBoundary = exports.CrashTab = exports.computeCrashFingerprint = exports.recordUserActionBreadcrumb = exports.recordReduxBreadcrumb = exports.recordNetworkBreadcrumb = exports.recordNavigationBreadcrumb = exports.addCrashBreadcrumb = exports.recordCustomCrash = exports.parseCrashStackTrace = exports.exportCrashReport = exports.simulateTestCrash = exports.clearCrashRecords = exports.getCrashRecords = exports.emitCrashEvent = exports.subscribeCrashEvents = exports.setupGlobalCrashHandler = exports.getCollectionEnabled = exports.getDefaultEventParameters = exports.getCurrentUserId = exports.getCurrentUserProperties = exports.clearAnalyticsEvents = exports.subscribeAnalyticsEvents = exports.logAnalyticsEvent = exports.setupAnalyticsLogger = exports.subscribeConsoleLogs = exports.clearConsoleLogs = exports.setupConsoleLogger = exports.addAxiosInterceptors = exports.subscribeNetworkLogs = exports.clearNetworkLogs = exports.setupNetworkLogger = void 0;
|
|
40
40
|
exports.connectMMKV = exports.connectAsyncStorage = exports.BrandCircleIcon = exports.BrandSquareIcon = exports.prunePerformanceEvents = exports.getMaxPerformanceEventsLimit = exports.setMaxPerformanceEventsLimit = exports.pruneCrashRecords = exports.getMaxCrashLogsLimit = exports.pruneAnalyticsLogs = exports.getMaxAnalyticsLogsLimit = exports.setMaxAnalyticsLogsLimit = exports.pruneReduxHistory = exports.getMaxReduxHistoryLimit = exports.setMaxReduxHistoryLimit = exports.pruneConsoleLogs = exports.getMaxConsoleLogsLimit = exports.setMaxConsoleLogsLimit = exports.pruneNetworkLogs = exports.getMaxNetworkLogsLimit = exports.setMaxNetworkLogsLimit = exports.subscribeMemoryWarning = exports.pruneAllLogs = exports.setupMemoryWarningHandler = exports.isNativeModuleAvailable = exports.setNativeStorageItem = exports.getNativeStorageItem = exports.getNativeFpsMetrics = exports.stopNativeFpsMonitoring = exports.startNativeFpsMonitoring = exports.subscribeNativeDeviceShake = exports.subscribeNativeFloatingButtonPress = exports.setNativeFloatingButtonBadge = exports.hideNativeFloatingButton = exports.showNativeFloatingButton = exports.subscribeNativeCrashes = exports.enableNativeCrashProtection = exports.getNativeDeviceMetrics = exports.InspectCatch = exports.InspectTrackTime = exports.InspectLog = exports.generateFixSnippet = exports.getInitialPerformanceEvents = exports.getInitialRenderProfiles = exports.getPerformanceEvents = exports.subscribePerformanceEvents = exports.clearPerformanceEvents = exports.logPerformanceEvent = exports.getRenderProfiles = exports.subscribeRenderProfiles = void 0;
|
|
41
|
-
exports.BreadcrumbType = exports.CrashFilterType = exports.CrashDetailSubTab = exports.CrashExportFormat = exports.CrashType = exports.PerformanceSubTab = exports.BundleSubTab = exports.DiffResultType = exports.StackFrameType = exports.GAEventCategory = exports.AnalyticsEventSource = exports.ConsoleLogType = exports.LogFilter = exports.SettingsSubTab = exports.SettingsPage = exports.ModalAnimationType = exports.LocalFilter = exports.SortOrder = exports.StatusFilter = exports.Method = exports.ActiveTab = exports.subscribeToStorageChanges = exports.clearStorageDriver = exports.removeStorageEntry = exports.setStorageEntry = exports.fetchStorageEntries = exports.getRegisteredMMKVInstanceIds = exports.isMMKVConnected = exports.isAsyncStorageConnected = void 0;
|
|
41
|
+
exports.I18nextProvider = exports.setTranslations = exports.addTranslations = exports.setLanguage = exports.useTranslation = exports.i18n = exports.t = exports.updateAppColorsTheme = exports.getThemeColors = exports.setAppColors = exports.AppColors = exports.setAppFonts = exports.AppFonts = exports.BreadcrumbType = exports.CrashFilterType = exports.CrashDetailSubTab = exports.CrashExportFormat = exports.CrashType = exports.PerformanceSubTab = exports.BundleSubTab = exports.DiffResultType = exports.StackFrameType = exports.GAEventCategory = exports.AnalyticsEventSource = exports.ConsoleLogType = exports.LogFilter = exports.SettingsSubTab = exports.SettingsPage = exports.ModalAnimationType = exports.LocalFilter = exports.SortOrder = exports.StatusFilter = exports.Method = exports.ActiveTab = exports.subscribeToStorageChanges = exports.clearStorageDriver = exports.removeStorageEntry = exports.setStorageEntry = exports.fetchStorageEntries = exports.getRegisteredMMKVInstanceIds = exports.isMMKVConnected = exports.isAsyncStorageConnected = void 0;
|
|
42
42
|
const react_1 = __importStar(require("react"));
|
|
43
43
|
const react_native_1 = require("react-native");
|
|
44
44
|
const native_1 = require("@react-navigation/native");
|
|
@@ -224,8 +224,8 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
224
224
|
bundle: false,
|
|
225
225
|
performance: false,
|
|
226
226
|
crash: false,
|
|
227
|
-
device:
|
|
228
|
-
storage:
|
|
227
|
+
device: false,
|
|
228
|
+
storage: false,
|
|
229
229
|
});
|
|
230
230
|
const [maxNetworkLogs, setMaxNetworkLogs] = (0, react_1.useState)(100);
|
|
231
231
|
const [maxAnalyticsEventsLimit, setMaxAnalyticsEventsLimit] = (0, react_1.useState)(75);
|
|
@@ -280,8 +280,8 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
280
280
|
bundle: false,
|
|
281
281
|
performance: false,
|
|
282
282
|
crash: false,
|
|
283
|
-
device:
|
|
284
|
-
storage:
|
|
283
|
+
device: false,
|
|
284
|
+
storage: false,
|
|
285
285
|
});
|
|
286
286
|
setDefaultTab('apis');
|
|
287
287
|
setIsAutoRamLimitEnabled(true);
|
|
@@ -355,6 +355,8 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
355
355
|
bundle: false,
|
|
356
356
|
performance: false,
|
|
357
357
|
crash: false,
|
|
358
|
+
device: false,
|
|
359
|
+
storage: false,
|
|
358
360
|
},
|
|
359
361
|
...(saved.tabVisibility || {}),
|
|
360
362
|
apis: true,
|
|
@@ -580,12 +582,21 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
580
582
|
const navigationContext = react_1.default.useContext(native_1.NavigationContext);
|
|
581
583
|
const hasNavigationContext = navigationContext !== undefined;
|
|
582
584
|
const currentRouteRef = (0, react_1.useRef)({
|
|
583
|
-
path: '
|
|
585
|
+
path: '',
|
|
584
586
|
params: null,
|
|
585
587
|
});
|
|
588
|
+
(0, react_1.useEffect)(() => {
|
|
589
|
+
(0, networkLogger_1.setRouteInfoProvider)(() => currentRouteRef.current);
|
|
590
|
+
return () => {
|
|
591
|
+
(0, networkLogger_1.setRouteInfoProvider)(null);
|
|
592
|
+
};
|
|
593
|
+
}, []);
|
|
586
594
|
(0, react_1.useEffect)(() => {
|
|
587
595
|
if (navState) {
|
|
588
|
-
|
|
596
|
+
const info = (0, helpers_1.getNavigationInfo)(navState);
|
|
597
|
+
if (info?.path) {
|
|
598
|
+
currentRouteRef.current = info;
|
|
599
|
+
}
|
|
589
600
|
}
|
|
590
601
|
}, [navState]);
|
|
591
602
|
(0, react_1.useEffect)(() => {
|
|
@@ -594,9 +605,22 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
594
605
|
const updateState = () => {
|
|
595
606
|
try {
|
|
596
607
|
if (typeof navigationRef.isReady === 'function' && navigationRef.isReady()) {
|
|
608
|
+
const currentRoute = typeof navigationRef.getCurrentRoute === 'function'
|
|
609
|
+
? navigationRef.getCurrentRoute()
|
|
610
|
+
: null;
|
|
611
|
+
if (currentRoute?.name) {
|
|
612
|
+
currentRouteRef.current = {
|
|
613
|
+
path: currentRoute.name,
|
|
614
|
+
params: currentRoute.params || null,
|
|
615
|
+
};
|
|
616
|
+
}
|
|
597
617
|
const state = navigationRef.getRootState();
|
|
598
618
|
if (state) {
|
|
599
619
|
setNavState(state);
|
|
620
|
+
const routeInfo = (0, helpers_1.getNavigationInfo)(state);
|
|
621
|
+
if (routeInfo?.path) {
|
|
622
|
+
currentRouteRef.current = routeInfo;
|
|
623
|
+
}
|
|
600
624
|
}
|
|
601
625
|
}
|
|
602
626
|
}
|
|
@@ -908,7 +932,9 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
908
932
|
if (freshIds.size > 0) {
|
|
909
933
|
freshIds.forEach(id => {
|
|
910
934
|
if (!logRouteMapRef.current.has(id)) {
|
|
911
|
-
|
|
935
|
+
const matchedLog = deduped.find(l => l.id === id);
|
|
936
|
+
const resolvedRoute = matchedLog?.routeInfo || currentRouteRef.current;
|
|
937
|
+
logRouteMapRef.current.set(id, resolvedRoute);
|
|
912
938
|
}
|
|
913
939
|
});
|
|
914
940
|
setNewLogIds(freshIds);
|
|
@@ -921,6 +947,12 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
921
947
|
const deduped = (0, helpers_1.deduplicateLogs)(raw);
|
|
922
948
|
const incoming = new Set(deduped.map(l => l.id));
|
|
923
949
|
prevLogIdsRef.current = incoming;
|
|
950
|
+
deduped.forEach(l => {
|
|
951
|
+
if (!logRouteMapRef.current.has(l.id)) {
|
|
952
|
+
const resolvedRoute = l?.routeInfo || currentRouteRef.current;
|
|
953
|
+
logRouteMapRef.current.set(l.id, resolvedRoute);
|
|
954
|
+
}
|
|
955
|
+
});
|
|
924
956
|
setLogs(deduped);
|
|
925
957
|
}
|
|
926
958
|
else {
|
|
@@ -1192,8 +1224,8 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
1192
1224
|
const groups = [];
|
|
1193
1225
|
for (let i = 0; i < filteredLogs.length; i++) {
|
|
1194
1226
|
const log = filteredLogs[i];
|
|
1195
|
-
const routeInfo = logRouteMapRef.current.get(log.id);
|
|
1196
|
-
const pageName =
|
|
1227
|
+
const routeInfo = logRouteMapRef.current.get(log.id) || log?.routeInfo;
|
|
1228
|
+
const pageName = (0, helpers_1.getLogPageName)(log, routeInfo);
|
|
1197
1229
|
if (groups.length === 0 ||
|
|
1198
1230
|
groups[groups.length - 1].pageName !== pageName) {
|
|
1199
1231
|
groups.push({ pageName, color: (0, helpers_1.getDomainColor)(pageName), logs: [] });
|
|
@@ -1446,7 +1478,28 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
1446
1478
|
log.type || '',
|
|
1447
1479
|
log.sourceMethod || '',
|
|
1448
1480
|
].join(' ').toLowerCase();
|
|
1449
|
-
return queryTokens.every(token =>
|
|
1481
|
+
return queryTokens.every(token => {
|
|
1482
|
+
if (token.startsWith('level:') || token.startsWith('is:') || token.startsWith('type:')) {
|
|
1483
|
+
const flag = token.replace(/^(level:|is:|type:)/, '').trim();
|
|
1484
|
+
if (flag === 'error' || flag === 'err')
|
|
1485
|
+
return log.type === 'error';
|
|
1486
|
+
if (flag === 'warn' || flag === 'warning')
|
|
1487
|
+
return log.type === 'warn';
|
|
1488
|
+
if (flag === 'info')
|
|
1489
|
+
return log.type === 'info';
|
|
1490
|
+
if (flag === 'log')
|
|
1491
|
+
return log.sourceMethod === 'log';
|
|
1492
|
+
if (flag === 'analytics')
|
|
1493
|
+
return (log.message || '').toLowerCase().includes('[analytics');
|
|
1494
|
+
}
|
|
1495
|
+
if (token === 'error' || token === 'err') {
|
|
1496
|
+
return log.type === 'error' || searchTarget.includes(token);
|
|
1497
|
+
}
|
|
1498
|
+
if (token === 'warn' || token === 'warning') {
|
|
1499
|
+
return log.type === 'warn' || searchTarget.includes(token);
|
|
1500
|
+
}
|
|
1501
|
+
return searchTarget.includes(token);
|
|
1502
|
+
});
|
|
1450
1503
|
});
|
|
1451
1504
|
}
|
|
1452
1505
|
// #7 — apply sort order (newest/oldest first)
|
|
@@ -1994,3 +2047,19 @@ Object.defineProperty(exports, "CrashExportFormat", { enumerable: true, get: fun
|
|
|
1994
2047
|
Object.defineProperty(exports, "CrashDetailSubTab", { enumerable: true, get: function () { return types_1.CrashDetailSubTab; } });
|
|
1995
2048
|
Object.defineProperty(exports, "CrashFilterType", { enumerable: true, get: function () { return types_1.CrashFilterType; } });
|
|
1996
2049
|
Object.defineProperty(exports, "BreadcrumbType", { enumerable: true, get: function () { return types_1.BreadcrumbType; } });
|
|
2050
|
+
var AppFonts_1 = require("./styles/AppFonts");
|
|
2051
|
+
Object.defineProperty(exports, "AppFonts", { enumerable: true, get: function () { return AppFonts_1.AppFonts; } });
|
|
2052
|
+
Object.defineProperty(exports, "setAppFonts", { enumerable: true, get: function () { return AppFonts_1.setAppFonts; } });
|
|
2053
|
+
var AppColors_1 = require("./styles/AppColors");
|
|
2054
|
+
Object.defineProperty(exports, "AppColors", { enumerable: true, get: function () { return AppColors_1.AppColors; } });
|
|
2055
|
+
Object.defineProperty(exports, "setAppColors", { enumerable: true, get: function () { return AppColors_1.setAppColors; } });
|
|
2056
|
+
Object.defineProperty(exports, "getThemeColors", { enumerable: true, get: function () { return AppColors_1.getThemeColors; } });
|
|
2057
|
+
Object.defineProperty(exports, "updateAppColorsTheme", { enumerable: true, get: function () { return AppColors_1.updateAppColorsTheme; } });
|
|
2058
|
+
var i18n_2 = require("./i18n");
|
|
2059
|
+
Object.defineProperty(exports, "t", { enumerable: true, get: function () { return i18n_2.t; } });
|
|
2060
|
+
Object.defineProperty(exports, "i18n", { enumerable: true, get: function () { return i18n_2.i18n; } });
|
|
2061
|
+
Object.defineProperty(exports, "useTranslation", { enumerable: true, get: function () { return i18n_2.useTranslation; } });
|
|
2062
|
+
Object.defineProperty(exports, "setLanguage", { enumerable: true, get: function () { return i18n_2.setLanguage; } });
|
|
2063
|
+
Object.defineProperty(exports, "addTranslations", { enumerable: true, get: function () { return i18n_2.addTranslations; } });
|
|
2064
|
+
Object.defineProperty(exports, "setTranslations", { enumerable: true, get: function () { return i18n_2.setTranslations; } });
|
|
2065
|
+
Object.defineProperty(exports, "I18nextProvider", { enumerable: true, get: function () { return i18n_2.I18nextProvider; } });
|
|
@@ -344,4 +344,8 @@ export declare const getThemeColors: (isDark: boolean) => {
|
|
|
344
344
|
};
|
|
345
345
|
export declare const AppColors: typeof LightColors;
|
|
346
346
|
export declare const updateAppColorsTheme: (isDark: boolean) => void;
|
|
347
|
+
/**
|
|
348
|
+
* Configure or override specific color tokens used throughout the inspector.
|
|
349
|
+
*/
|
|
350
|
+
export declare const setAppColors: (customColors: Partial<typeof LightColors>) => void;
|
|
347
351
|
export default AppColors;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateAppColorsTheme = exports.AppColors = exports.getThemeColors = void 0;
|
|
3
|
+
exports.setAppColors = exports.updateAppColorsTheme = exports.AppColors = exports.getThemeColors = void 0;
|
|
4
4
|
const LightColors = {
|
|
5
5
|
// ─── Core (Thai Airways Royal Palette) ───
|
|
6
6
|
primaryLight: '#FFFFFF',
|
|
@@ -389,4 +389,14 @@ const updateAppColorsTheme = (isDark) => {
|
|
|
389
389
|
Object.assign(exports.AppColors, (0, exports.getThemeColors)(isDark));
|
|
390
390
|
};
|
|
391
391
|
exports.updateAppColorsTheme = updateAppColorsTheme;
|
|
392
|
+
/**
|
|
393
|
+
* Configure or override specific color tokens used throughout the inspector.
|
|
394
|
+
*/
|
|
395
|
+
const setAppColors = (customColors) => {
|
|
396
|
+
if (!customColors || typeof customColors !== 'object')
|
|
397
|
+
return;
|
|
398
|
+
Object.assign(exports.AppColors, customColors);
|
|
399
|
+
Object.assign(LightColors, customColors);
|
|
400
|
+
};
|
|
401
|
+
exports.setAppColors = setAppColors;
|
|
392
402
|
exports.default = exports.AppColors;
|
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
export interface AppFontConfig {
|
|
2
|
+
interRegular?: string;
|
|
3
|
+
interMedium?: string;
|
|
4
|
+
interBold?: string;
|
|
5
|
+
Sfprotext?: string;
|
|
6
|
+
}
|
|
1
7
|
export declare const AppFonts: {
|
|
2
8
|
interRegular: string;
|
|
3
9
|
interMedium: string;
|
|
4
10
|
interBold: string;
|
|
5
11
|
Sfprotext: string;
|
|
6
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* Configure or override font families used across all inspector screens.
|
|
15
|
+
* Useful when integrating into apps with custom font setups or system fonts.
|
|
16
|
+
*/
|
|
17
|
+
export declare const setAppFonts: (customFonts: Partial<typeof AppFonts>) => void;
|
|
7
18
|
export default AppFonts;
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AppFonts = void 0;
|
|
3
|
+
exports.setAppFonts = exports.AppFonts = void 0;
|
|
4
4
|
exports.AppFonts = {
|
|
5
5
|
interRegular: 'Inter-Regular',
|
|
6
6
|
interMedium: 'Inter-Medium',
|
|
7
7
|
interBold: 'Inter-Bold',
|
|
8
8
|
Sfprotext: 'Inter-Regular',
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Configure or override font families used across all inspector screens.
|
|
12
|
+
* Useful when integrating into apps with custom font setups or system fonts.
|
|
13
|
+
*/
|
|
14
|
+
const setAppFonts = (customFonts) => {
|
|
15
|
+
if (!customFonts || typeof customFonts !== 'object')
|
|
16
|
+
return;
|
|
17
|
+
Object.assign(exports.AppFonts, customFonts);
|
|
18
|
+
};
|
|
19
|
+
exports.setAppFonts = setAppFonts;
|
|
10
20
|
exports.default = exports.AppFonts;
|
|
@@ -106,6 +106,7 @@ export interface NetworkLog {
|
|
|
106
106
|
/** Client identifier: axios, fetch, xhr, apollo, etc. */
|
|
107
107
|
client?: 'axios' | 'fetch' | 'xhr' | 'apollo' | 'graphql' | string;
|
|
108
108
|
caller?: string;
|
|
109
|
+
routeInfo?: RouteInfo;
|
|
109
110
|
}
|
|
110
111
|
export interface RouteInfo {
|
|
111
112
|
path: string;
|
|
@@ -12,15 +12,23 @@ export const AppHeaderLogo = ({ size = 46, customIcon, }) => {
|
|
|
12
12
|
height: size,
|
|
13
13
|
});
|
|
14
14
|
return (<View style={[
|
|
15
|
-
logoStyles.
|
|
16
|
-
{
|
|
15
|
+
logoStyles.svgContainer,
|
|
16
|
+
{
|
|
17
|
+
width: size,
|
|
18
|
+
height: size,
|
|
19
|
+
borderRadius: Math.round(size * 0.23),
|
|
20
|
+
},
|
|
17
21
|
]}>
|
|
18
22
|
{clonedIcon}
|
|
19
23
|
</View>);
|
|
20
24
|
}
|
|
21
25
|
return (<View style={[
|
|
22
|
-
logoStyles.
|
|
23
|
-
{
|
|
26
|
+
logoStyles.imageContainer,
|
|
27
|
+
{
|
|
28
|
+
width: size,
|
|
29
|
+
height: size,
|
|
30
|
+
borderRadius: Math.round(size * 0.23),
|
|
31
|
+
},
|
|
24
32
|
]}>
|
|
25
33
|
<Image source={customIcon} style={logoStyles.image} resizeMode="cover"/>
|
|
26
34
|
</View>);
|
|
@@ -32,33 +40,58 @@ export const AppHeaderLogo = ({ size = 46, customIcon, }) => {
|
|
|
32
40
|
android: { uri: 'ic_launcher' },
|
|
33
41
|
default: { uri: 'AppIcon' },
|
|
34
42
|
});
|
|
35
|
-
return (<View style={[
|
|
43
|
+
return (<View style={[
|
|
44
|
+
logoStyles.imageContainer,
|
|
45
|
+
{
|
|
46
|
+
width: size,
|
|
47
|
+
height: size,
|
|
48
|
+
borderRadius: Math.round(size * 0.23),
|
|
49
|
+
},
|
|
50
|
+
]}>
|
|
36
51
|
<Image source={nativeSource} style={logoStyles.image} resizeMode="cover" onError={() => setLoadError(true)}/>
|
|
37
52
|
</View>);
|
|
38
53
|
}
|
|
39
54
|
// 3. Fallback: Inspector's Signature Owl Brand Logo
|
|
40
55
|
return (<View style={[
|
|
41
|
-
logoStyles.
|
|
42
|
-
{
|
|
56
|
+
logoStyles.svgContainer,
|
|
57
|
+
{
|
|
58
|
+
width: size,
|
|
59
|
+
height: size,
|
|
60
|
+
borderRadius: Math.round(size * 0.23),
|
|
61
|
+
},
|
|
43
62
|
]}>
|
|
44
63
|
<BrandSquareIcon size={size}/>
|
|
45
64
|
</View>);
|
|
46
65
|
};
|
|
47
66
|
const logoStyles = StyleSheet.create({
|
|
48
|
-
|
|
49
|
-
|
|
67
|
+
svgContainer: {
|
|
68
|
+
overflow: 'hidden',
|
|
69
|
+
alignItems: 'center',
|
|
70
|
+
justifyContent: 'center',
|
|
71
|
+
shadowColor: '#000',
|
|
72
|
+
shadowOffset: { width: 0, height: 2 },
|
|
73
|
+
shadowOpacity: 0.25,
|
|
74
|
+
shadowRadius: 3,
|
|
75
|
+
elevation: 3,
|
|
76
|
+
},
|
|
77
|
+
imageContainer: {
|
|
50
78
|
overflow: 'hidden',
|
|
51
79
|
backgroundColor: 'rgba(255, 255, 255, 0.15)',
|
|
52
80
|
borderWidth: 1,
|
|
53
|
-
borderColor: 'rgba(255, 255, 255, 0.
|
|
54
|
-
padding: 2
|
|
81
|
+
borderColor: 'rgba(255, 255, 255, 0.35)',
|
|
82
|
+
padding: 2,
|
|
55
83
|
alignItems: 'center',
|
|
56
84
|
justifyContent: 'center',
|
|
85
|
+
shadowColor: '#000',
|
|
86
|
+
shadowOffset: { width: 0, height: 2 },
|
|
87
|
+
shadowOpacity: 0.25,
|
|
88
|
+
shadowRadius: 3,
|
|
89
|
+
elevation: 3,
|
|
57
90
|
},
|
|
58
91
|
image: {
|
|
59
92
|
width: '100%',
|
|
60
93
|
height: '100%',
|
|
61
|
-
borderRadius:
|
|
94
|
+
borderRadius: 8,
|
|
62
95
|
},
|
|
63
96
|
});
|
|
64
97
|
export default AppHeaderLogo;
|
|
@@ -3,72 +3,115 @@ import Svg, { Circle, Path, G, Defs, LinearGradient, RadialGradient, Stop, Rect,
|
|
|
3
3
|
export const BrandSquareIcon = ({ size = 56 }) => {
|
|
4
4
|
return (<Svg width={size} height={size} viewBox="0 0 256 256" fill="none">
|
|
5
5
|
<Defs>
|
|
6
|
+
{/* App Tile Background - Crisp Royal Deep Violet to Midnight */}
|
|
6
7
|
<LinearGradient id="bs_tile" x1="0" y1="0" x2="256" y2="256" gradientUnits="userSpaceOnUse">
|
|
7
|
-
<Stop offset="0" stopColor="#1E1B4B"/>
|
|
8
|
-
<Stop offset="
|
|
8
|
+
<Stop offset="0%" stopColor="#1E1B4B"/>
|
|
9
|
+
<Stop offset="50%" stopColor="#18182F"/>
|
|
10
|
+
<Stop offset="100%" stopColor="#0B0F19"/>
|
|
9
11
|
</LinearGradient>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<Stop offset="
|
|
12
|
+
|
|
13
|
+
{/* Outer Neon Cyber Border */}
|
|
14
|
+
<LinearGradient id="bs_border" x1="0" y1="0" x2="256" y2="256" gradientUnits="userSpaceOnUse">
|
|
15
|
+
<Stop offset="0%" stopColor="#818CF8" stopOpacity={0.9}/>
|
|
16
|
+
<Stop offset="45%" stopColor="#C084FC" stopOpacity={0.8}/>
|
|
17
|
+
<Stop offset="80%" stopColor="#F472B6" stopOpacity={0.85}/>
|
|
18
|
+
<Stop offset="100%" stopColor="#38BDF8" stopOpacity={0.9}/>
|
|
19
|
+
</LinearGradient>
|
|
20
|
+
|
|
21
|
+
{/* Ambient Top Glow */}
|
|
22
|
+
<RadialGradient id="bs_top_glow" cx="50%" cy="15%" r="65%">
|
|
23
|
+
<Stop offset="0%" stopColor="#818CF8" stopOpacity={0.35}/>
|
|
24
|
+
<Stop offset="60%" stopColor="#A855F7" stopOpacity={0.12}/>
|
|
25
|
+
<Stop offset="100%" stopColor="#1E1B4B" stopOpacity={0}/>
|
|
26
|
+
</RadialGradient>
|
|
27
|
+
|
|
28
|
+
{/* Owl Outer Body Gradient - High Contrast */}
|
|
29
|
+
<LinearGradient id="bs_body" x1="64" y1="40" x2="192" y2="220" gradientUnits="userSpaceOnUse">
|
|
30
|
+
<Stop offset="0%" stopColor="#3730A3"/>
|
|
31
|
+
<Stop offset="50%" stopColor="#2E1065"/>
|
|
32
|
+
<Stop offset="100%" stopColor="#17123A"/>
|
|
14
33
|
</LinearGradient>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
34
|
+
|
|
35
|
+
{/* Neon Cyber Beam Stroke */}
|
|
36
|
+
<LinearGradient id="bs_beam" x1="40" y1="40" x2="220" y2="220" gradientUnits="userSpaceOnUse">
|
|
37
|
+
<Stop offset="0%" stopColor="#67E8F9"/>
|
|
38
|
+
<Stop offset="35%" stopColor="#818CF8"/>
|
|
39
|
+
<Stop offset="70%" stopColor="#C084FC"/>
|
|
40
|
+
<Stop offset="100%" stopColor="#F472B6"/>
|
|
18
41
|
</LinearGradient>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<Stop offset="
|
|
42
|
+
|
|
43
|
+
{/* Eyes Radiant Iris */}
|
|
44
|
+
<RadialGradient id="bs_iris" cx="38%" cy="36%" r="65%">
|
|
45
|
+
<Stop offset="0%" stopColor="#FEF08A"/>
|
|
46
|
+
<Stop offset="40%" stopColor="#FBBF24"/>
|
|
47
|
+
<Stop offset="80%" stopColor="#F59E0B"/>
|
|
48
|
+
<Stop offset="100%" stopColor="#D97706"/>
|
|
23
49
|
</RadialGradient>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
50
|
+
|
|
51
|
+
{/* Beak Gradient */}
|
|
52
|
+
<LinearGradient id="bs_beak" x1="124" y1="120" x2="132" y2="136" gradientUnits="userSpaceOnUse">
|
|
53
|
+
<Stop offset="0%" stopColor="#FDE047"/>
|
|
54
|
+
<Stop offset="100%" stopColor="#EA580C"/>
|
|
27
55
|
</LinearGradient>
|
|
56
|
+
|
|
57
|
+
{/* Diagnostic Lens Glass Flare */}
|
|
58
|
+
<RadialGradient id="bs_lens" cx="40%" cy="35%" r="65%">
|
|
59
|
+
<Stop offset="0%" stopColor="#A5F3FC" stopOpacity={0.4}/>
|
|
60
|
+
<Stop offset="50%" stopColor="#38BDF8" stopOpacity={0.18}/>
|
|
61
|
+
<Stop offset="100%" stopColor="#0284C7" stopOpacity={0.05}/>
|
|
62
|
+
</RadialGradient>
|
|
28
63
|
</Defs>
|
|
29
64
|
|
|
30
|
-
{/* Rounded App Tile
|
|
31
|
-
<Rect x="
|
|
32
|
-
<Rect x="
|
|
65
|
+
{/* ── 1. Rounded App Tile Base (Full Edge-to-Edge) ── */}
|
|
66
|
+
<Rect x="2" y="2" width="252" height="252" rx="58" fill="url(#bs_tile)"/>
|
|
67
|
+
<Rect x="2" y="2" width="252" height="252" rx="58" fill="url(#bs_top_glow)"/>
|
|
68
|
+
<Rect x="2" y="2" width="252" height="252" rx="58" fill="none" stroke="url(#bs_border)" strokeWidth="3.5"/>
|
|
69
|
+
|
|
70
|
+
{/* ── 2. Owl Outer Wings (Layered behind) ── */}
|
|
71
|
+
<Path d="M62 120 C42 152 46 194 76 210 C68 178 66 146 80 120 Z" fill="#1E1B4B" stroke="url(#bs_beam)" strokeWidth="3" strokeOpacity={0.75}/>
|
|
72
|
+
<Path d="M194 120 C214 152 210 194 180 210 C188 178 190 146 176 120 Z" fill="#1E1B4B" stroke="url(#bs_beam)" strokeWidth="3" strokeOpacity={0.75}/>
|
|
33
73
|
|
|
34
|
-
{/* Owl
|
|
35
|
-
<Path d="
|
|
74
|
+
{/* ── 3. Owl Body Contour ── */}
|
|
75
|
+
<Path d="M58 146 C54 98 68 64 88 52 L98 34 L118 56 Q128 50 138 56 L158 34 L168 52 C188 64 202 98 198 146 C202 180 186 208 152 216 C140 220 116 220 104 216 C70 208 54 180 58 146 Z" fill="url(#bs_body)" stroke="url(#bs_beam)" strokeWidth="4.5" strokeLinejoin="round"/>
|
|
36
76
|
|
|
37
|
-
{/*
|
|
38
|
-
<Path d="
|
|
39
|
-
<Path d="
|
|
77
|
+
{/* Inner Ear Highlights */}
|
|
78
|
+
<Path d="M98 42 L112 56 L102 57 Z" fill="#67E8F9" opacity={0.6}/>
|
|
79
|
+
<Path d="M158 42 L144 56 L154 57 Z" fill="#F472B6" opacity={0.6}/>
|
|
40
80
|
|
|
41
|
-
{/*
|
|
42
|
-
<Rect x="
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
<Path d="
|
|
46
|
-
<Path d="
|
|
47
|
-
<Path d="M130 169 L126 185" stroke="#EC4899"/>
|
|
81
|
+
{/* ── 4. Chest Terminal & Code Braces ── */}
|
|
82
|
+
<Rect x="98" y="162" width="60" height="38" rx="10" fill="#050811" stroke="url(#bs_beam)" strokeWidth="2.5"/>
|
|
83
|
+
<G strokeWidth="3" strokeLinecap="round" strokeLinejoin="round" fill="none">
|
|
84
|
+
<Path d="M116 174 L108 181 L116 188" stroke="#38BDF8"/>
|
|
85
|
+
<Path d="M140 174 L148 181 L140 188" stroke="#38BDF8"/>
|
|
86
|
+
<Path d="M131 171 L125 191" stroke="#F43F5E"/>
|
|
48
87
|
</G>
|
|
49
88
|
|
|
50
|
-
{/*
|
|
51
|
-
<Path d="M128
|
|
89
|
+
{/* ── 5. Facial Mask Plate ── */}
|
|
90
|
+
<Path d="M128 88 C152 64 192 72 192 104 C192 132 162 152 128 152 C94 152 64 132 64 104 C64 72 104 64 128 88 Z" fill="#1E1B4B" stroke="url(#bs_beam)" strokeWidth="2.8"/>
|
|
91
|
+
|
|
92
|
+
{/* ── 6. Right Eye (Glowing Owl Eye) ── */}
|
|
93
|
+
<Circle cx="156" cy="106" r="19" fill="url(#bs_iris)" stroke="#0F172A" strokeWidth="2.5"/>
|
|
94
|
+
<Circle cx="156" cy="106" r="9.5" fill="#0B0F19"/>
|
|
95
|
+
<Circle cx="159.5" cy="102.5" r="3.5" fill="#FFFFFF"/>
|
|
96
|
+
<Circle cx="153" cy="109.5" r="1.8" fill="#FFFFFF" opacity={0.85}/>
|
|
52
97
|
|
|
53
|
-
{/*
|
|
54
|
-
|
|
55
|
-
<Circle cx="
|
|
56
|
-
<
|
|
57
|
-
<
|
|
98
|
+
{/* ── 7. Left Eye (Diagnostic Magnifier Lens) ── */}
|
|
99
|
+
{/* Magnifier Glass Glow */}
|
|
100
|
+
<Circle cx="94" cy="104" r="30" fill="url(#bs_lens)" stroke="url(#bs_beam)" strokeWidth="6"/>
|
|
101
|
+
<Line x1="72" y1="126" x2="48" y2="152" stroke="#0B0F19" strokeWidth="13" strokeLinecap="round"/>
|
|
102
|
+
<Line x1="72" y1="126" x2="48" y2="152" stroke="url(#bs_beam)" strokeWidth="8" strokeLinecap="round"/>
|
|
58
103
|
|
|
59
|
-
{/*
|
|
60
|
-
<Circle cx="
|
|
61
|
-
<Circle cx="
|
|
62
|
-
<Circle cx="
|
|
63
|
-
<Circle cx="
|
|
104
|
+
{/* Eye Inside Magnifier */}
|
|
105
|
+
<Circle cx="94" cy="104" r="21" fill="url(#bs_iris)" stroke="#0F172A" strokeWidth="2.5"/>
|
|
106
|
+
<Circle cx="94" cy="104" r="10.5" fill="#0B0F19"/>
|
|
107
|
+
<Circle cx="98" cy="100" r="4" fill="#FFFFFF"/>
|
|
108
|
+
<Circle cx="90.5" cy="107.5" r="2" fill="#FFFFFF" opacity={0.85}/>
|
|
64
109
|
|
|
65
|
-
{/*
|
|
66
|
-
<
|
|
67
|
-
<Line x1="76" y1="124" x2="55" y2="148" stroke="url(#bs_beam)" strokeWidth="7" strokeLinecap="round"/>
|
|
68
|
-
<Circle cx="96" cy="104" r="28" fill="#38BDF8" fillOpacity={0.12} stroke="url(#bs_beam)" strokeWidth="6"/>
|
|
110
|
+
{/* Lens Reflection Highlight */}
|
|
111
|
+
<Path d="M74 94 A26 26 0 0 1 106 78" stroke="#FFFFFF" strokeWidth="3" strokeLinecap="round" opacity={0.65} fill="none"/>
|
|
69
112
|
|
|
70
|
-
{/* Beak */}
|
|
71
|
-
<Path d="M123
|
|
113
|
+
{/* ── 8. Beak ── */}
|
|
114
|
+
<Path d="M123 120 Q128 118 133 120 Q131.5 133 128 137 Q124.5 133 123 120 Z" fill="url(#bs_beak)" stroke="#78350F" strokeWidth="1"/>
|
|
72
115
|
</Svg>);
|
|
73
116
|
};
|
|
74
117
|
export default BrandSquareIcon;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
interface EmptyStateProps {
|
|
3
3
|
isSearch?: boolean;
|
|
4
|
-
|
|
4
|
+
searchQuery?: string;
|
|
5
|
+
customTitle?: string;
|
|
6
|
+
customSub?: string;
|
|
7
|
+
onClearSearch?: () => void;
|
|
8
|
+
}
|
|
9
|
+
declare const EmptyState: React.NamedExoticComponent<EmptyStateProps>;
|
|
5
10
|
export default EmptyState;
|
|
@@ -8,7 +8,7 @@ import { EmptyRadarIcon } from './NetworkIcons';
|
|
|
8
8
|
// Stylesheet
|
|
9
9
|
import { AppColors } from '../styles/AppColors';
|
|
10
10
|
import styles from '../styles';
|
|
11
|
-
const EmptyState = React.memo(function EmptyState({ isSearch }) {
|
|
11
|
+
const EmptyState = React.memo(function EmptyState({ isSearch, searchQuery, customTitle, customSub, onClearSearch, }) {
|
|
12
12
|
const iconPulse = useRef(new Animated.Value(1)).current;
|
|
13
13
|
useEffect(() => {
|
|
14
14
|
const loop = Animated.loop(Animated.sequence([
|
|
@@ -38,13 +38,19 @@ const EmptyState = React.memo(function EmptyState({ isSearch }) {
|
|
|
38
38
|
<EmptyRadarIcon color={AppColors.purple} size={32}/>
|
|
39
39
|
</Animated.View>
|
|
40
40
|
<Text style={styles.emptyTitle}>
|
|
41
|
-
{isSearch ? 'No matching
|
|
41
|
+
{customTitle || (isSearch ? 'No matching results' : 'No network activity')}
|
|
42
42
|
</Text>
|
|
43
43
|
<Text style={styles.emptySub}>
|
|
44
|
-
{
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
{customSub ||
|
|
45
|
+
(isSearch
|
|
46
|
+
? searchQuery
|
|
47
|
+
? `No items matched "${searchQuery}"`
|
|
48
|
+
: 'Try adjusting your filters or search keywords.'
|
|
49
|
+
: 'Listening for incoming API calls...')}
|
|
47
50
|
</Text>
|
|
51
|
+
{isSearch && onClearSearch && (<TouchableScale style={styles.reloadBtn} onPress={onClearSearch}>
|
|
52
|
+
<Text style={styles.reloadBtnText}>Clear Search & Filters</Text>
|
|
53
|
+
</TouchableScale>)}
|
|
48
54
|
{!isSearch && (<TouchableScale style={styles.reloadBtn} onPress={handleReload}>
|
|
49
55
|
<Text style={styles.reloadBtnText}>Reload App</Text>
|
|
50
56
|
</TouchableScale>)}
|