react-native-inapp-inspector 1.1.13 → 1.1.14

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.
@@ -305,6 +305,25 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
305
305
  color: string;
306
306
  fontSize: number;
307
307
  };
308
+ fabGreenDot: {
309
+ position: string;
310
+ top: number;
311
+ right: number;
312
+ width: number;
313
+ height: number;
314
+ borderRadius: number;
315
+ backgroundColor: string;
316
+ borderWidth: number;
317
+ borderColor: string;
318
+ shadowColor: string;
319
+ shadowOffset: {
320
+ width: number;
321
+ height: number;
322
+ };
323
+ shadowOpacity: number;
324
+ shadowRadius: number;
325
+ elevation: number;
326
+ };
308
327
  statBox: {
309
328
  flex: number;
310
329
  alignItems: string;
@@ -1670,15 +1689,22 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
1670
1689
  marginTop: number;
1671
1690
  };
1672
1691
  analyticsCardRow: {};
1673
- analyticsTopEventsCard: {
1674
- marginHorizontal: number;
1675
- marginBottom: number;
1692
+ analyticsIconCircle: {
1693
+ width: number;
1694
+ height: number;
1695
+ borderRadius: number;
1696
+ alignItems: string;
1697
+ justifyContent: string;
1698
+ };
1699
+ analyticsHeaderCard: {
1676
1700
  backgroundColor: string;
1677
1701
  borderRadius: number;
1678
1702
  borderWidth: number;
1679
1703
  borderColor: string;
1680
- paddingHorizontal: number;
1681
- paddingVertical: number;
1704
+ padding: number;
1705
+ marginHorizontal: number;
1706
+ marginTop: number;
1707
+ marginBottom: number;
1682
1708
  shadowColor: string;
1683
1709
  shadowOpacity: number;
1684
1710
  shadowRadius: number;
@@ -1688,61 +1714,94 @@ export declare const getRawStyles: (colors: typeof AppColors) => {
1688
1714
  };
1689
1715
  elevation: number;
1690
1716
  };
1691
- analyticsTopEventsHeaderRow: {
1717
+ analyticsHeaderTop: {
1692
1718
  flexDirection: string;
1693
- alignItems: string;
1694
1719
  justifyContent: string;
1720
+ alignItems: string;
1695
1721
  marginBottom: number;
1696
1722
  };
1697
- analyticsTopEventsTitle: {
1723
+ analyticsHeaderTitle: {
1698
1724
  fontFamily: string;
1699
1725
  fontSize: number;
1700
1726
  color: string;
1701
- letterSpacing: number;
1702
- textTransform: string;
1703
1727
  };
1704
- analyticsTopEventsSubtitle: {
1728
+ statusDot: {
1729
+ width: number;
1730
+ height: number;
1731
+ borderRadius: number;
1732
+ };
1733
+ analyticsHeaderSubtitle: {
1705
1734
  fontFamily: string;
1706
1735
  fontSize: number;
1707
1736
  color: string;
1708
- letterSpacing: number;
1737
+ marginTop: number;
1709
1738
  };
1710
- analyticsTopEventRow: {
1711
- flexDirection: string;
1712
- alignItems: string;
1713
- marginBottom: number;
1714
- gap: number;
1739
+ analyticsHeaderToggle: {
1740
+ paddingVertical: number;
1741
+ paddingHorizontal: number;
1742
+ borderRadius: number;
1743
+ backgroundColor: string;
1744
+ borderWidth: number;
1745
+ borderColor: string;
1715
1746
  };
1716
- analyticsTopEventName: {
1747
+ analyticsHeaderToggleText: {
1717
1748
  fontFamily: string;
1718
1749
  fontSize: number;
1719
1750
  color: string;
1720
- flex: number;
1721
1751
  };
1722
- analyticsTopEventBarWrap: {
1752
+ analyticsStatsRow: {
1753
+ flexDirection: string;
1754
+ gap: number;
1755
+ borderTopWidth: number;
1756
+ borderTopColor: string;
1757
+ paddingTop: number;
1758
+ };
1759
+ analyticsStatBox: {
1723
1760
  flex: number;
1724
- height: number;
1725
1761
  backgroundColor: string;
1726
1762
  borderRadius: number;
1727
- overflow: string;
1763
+ paddingVertical: number;
1764
+ alignItems: string;
1728
1765
  };
1729
- analyticsTopEventBar: {
1730
- height: string;
1731
- borderRadius: number;
1766
+ analyticsStatValue: {
1767
+ fontFamily: string;
1768
+ fontSize: number;
1769
+ color: string;
1732
1770
  };
1733
- analyticsTopEventCount: {
1771
+ analyticsStatLabel: {
1734
1772
  fontFamily: string;
1735
1773
  fontSize: number;
1736
1774
  color: string;
1737
- width: number;
1738
- textAlign: string;
1775
+ marginTop: number;
1739
1776
  };
1740
- analyticsIconCircle: {
1741
- width: number;
1742
- height: number;
1743
- borderRadius: number;
1744
- alignItems: string;
1777
+ analyticsHeaderDetails: {
1778
+ borderTopWidth: number;
1779
+ borderTopColor: string;
1780
+ paddingTop: number;
1781
+ marginTop: number;
1782
+ };
1783
+ detailsGroupTitle: {
1784
+ fontFamily: string;
1785
+ fontSize: number;
1786
+ color: string;
1787
+ marginBottom: number;
1788
+ };
1789
+ detailsRow: {
1790
+ flexDirection: string;
1745
1791
  justifyContent: string;
1792
+ paddingVertical: number;
1793
+ borderBottomWidth: number;
1794
+ borderBottomColor: string;
1795
+ };
1796
+ detailsKey: {
1797
+ fontFamily: string;
1798
+ fontSize: number;
1799
+ color: string;
1800
+ };
1801
+ detailsValue: {
1802
+ fontFamily: string;
1803
+ fontSize: number;
1804
+ color: string;
1746
1805
  };
1747
1806
  };
1748
1807
  declare const styles: any;
@@ -261,6 +261,22 @@ export const getRawStyles = (colors) => ({
261
261
  color: colors.primaryLight,
262
262
  fontSize: 11,
263
263
  },
264
+ fabGreenDot: {
265
+ position: 'absolute',
266
+ top: 2,
267
+ right: 2,
268
+ width: 12,
269
+ height: 12,
270
+ borderRadius: 6,
271
+ backgroundColor: '#00E676',
272
+ borderWidth: 2,
273
+ borderColor: colors.primaryLight,
274
+ shadowColor: '#000000',
275
+ shadowOffset: { width: 0, height: 1 },
276
+ shadowOpacity: 0.2,
277
+ shadowRadius: 1.5,
278
+ elevation: 2,
279
+ },
264
280
  statBox: {
265
281
  flex: 1,
266
282
  alignItems: 'center',
@@ -1525,76 +1541,116 @@ export const getRawStyles = (colors) => ({
1525
1541
  marginTop: 2,
1526
1542
  },
1527
1543
  analyticsCardRow: {},
1528
- analyticsTopEventsCard: {
1529
- marginHorizontal: 16,
1530
- marginBottom: 12,
1544
+ analyticsIconCircle: {
1545
+ width: 24,
1546
+ height: 24,
1547
+ borderRadius: 12,
1548
+ alignItems: 'center',
1549
+ justifyContent: 'center',
1550
+ },
1551
+ analyticsHeaderCard: {
1531
1552
  backgroundColor: colors.primaryLight,
1532
1553
  borderRadius: 12,
1533
1554
  borderWidth: 1,
1534
1555
  borderColor: colors.grayBorderSecondary,
1535
- paddingHorizontal: 16,
1536
- paddingVertical: 12,
1537
- shadowColor: '#000',
1538
- shadowOpacity: 0.04,
1556
+ padding: 14,
1557
+ marginHorizontal: 12,
1558
+ marginTop: 8,
1559
+ marginBottom: 8,
1560
+ shadowColor: '#000000',
1561
+ shadowOpacity: 0.03,
1539
1562
  shadowRadius: 4,
1540
1563
  shadowOffset: { width: 0, height: 1 },
1541
1564
  elevation: 1,
1542
1565
  },
1543
- analyticsTopEventsHeaderRow: {
1566
+ analyticsHeaderTop: {
1544
1567
  flexDirection: 'row',
1545
- alignItems: 'center',
1546
1568
  justifyContent: 'space-between',
1547
- marginBottom: 12,
1569
+ alignItems: 'center',
1570
+ marginBottom: 10,
1548
1571
  },
1549
- analyticsTopEventsTitle: {
1572
+ analyticsHeaderTitle: {
1550
1573
  fontFamily: AppFonts.interBold,
1551
- fontSize: 10,
1552
- color: colors.grayTextWeak,
1553
- letterSpacing: 0.8,
1554
- textTransform: 'uppercase',
1574
+ fontSize: 14,
1575
+ color: colors.primaryBlack,
1576
+ },
1577
+ statusDot: {
1578
+ width: 6,
1579
+ height: 6,
1580
+ borderRadius: 3,
1555
1581
  },
1556
- analyticsTopEventsSubtitle: {
1582
+ analyticsHeaderSubtitle: {
1557
1583
  fontFamily: AppFonts.interMedium,
1558
- fontSize: 9,
1559
- color: colors.grayTextWeak,
1560
- letterSpacing: 0.4,
1584
+ fontSize: 11,
1585
+ color: colors.grayText,
1586
+ marginTop: 2,
1587
+ },
1588
+ analyticsHeaderToggle: {
1589
+ paddingVertical: 4,
1590
+ paddingHorizontal: 8,
1591
+ borderRadius: 4,
1592
+ backgroundColor: colors.grayBackground,
1593
+ borderWidth: 1,
1594
+ borderColor: colors.grayBorderSecondary,
1595
+ },
1596
+ analyticsHeaderToggleText: {
1597
+ fontFamily: AppFonts.interBold,
1598
+ fontSize: 10,
1599
+ color: colors.purple,
1561
1600
  },
1562
- analyticsTopEventRow: {
1601
+ analyticsStatsRow: {
1563
1602
  flexDirection: 'row',
1564
- alignItems: 'center',
1565
- marginBottom: 8,
1566
1603
  gap: 8,
1604
+ borderTopWidth: 1,
1605
+ borderTopColor: colors.dividerColor,
1606
+ paddingTop: 10,
1567
1607
  },
1568
- analyticsTopEventName: {
1569
- fontFamily: AppFonts.interMedium,
1570
- fontSize: 12,
1571
- color: colors.primaryBlack,
1608
+ analyticsStatBox: {
1572
1609
  flex: 1,
1573
- },
1574
- analyticsTopEventBarWrap: {
1575
- flex: 0.8,
1576
- height: 3,
1577
1610
  backgroundColor: colors.grayBackground,
1578
- borderRadius: 2,
1579
- overflow: 'hidden',
1611
+ borderRadius: 6,
1612
+ paddingVertical: 6,
1613
+ alignItems: 'center',
1580
1614
  },
1581
- analyticsTopEventBar: {
1582
- height: '100%',
1583
- borderRadius: 2,
1615
+ analyticsStatValue: {
1616
+ fontFamily: AppFonts.interBold,
1617
+ fontSize: 14,
1618
+ color: colors.primaryBlack,
1584
1619
  },
1585
- analyticsTopEventCount: {
1620
+ analyticsStatLabel: {
1621
+ fontFamily: AppFonts.interRegular,
1622
+ fontSize: 9,
1623
+ color: colors.grayText,
1624
+ marginTop: 1,
1625
+ },
1626
+ analyticsHeaderDetails: {
1627
+ borderTopWidth: 1,
1628
+ borderTopColor: colors.dividerColor,
1629
+ paddingTop: 10,
1630
+ marginTop: 10,
1631
+ },
1632
+ detailsGroupTitle: {
1586
1633
  fontFamily: AppFonts.interBold,
1587
1634
  fontSize: 11,
1588
- color: colors.grayText,
1589
- width: 24,
1590
- textAlign: 'right',
1635
+ color: colors.purple,
1636
+ marginBottom: 6,
1591
1637
  },
1592
- analyticsIconCircle: {
1593
- width: 24,
1594
- height: 24,
1595
- borderRadius: 12,
1596
- alignItems: 'center',
1597
- justifyContent: 'center',
1638
+ detailsRow: {
1639
+ flexDirection: 'row',
1640
+ justifyContent: 'space-between',
1641
+ paddingVertical: 4,
1642
+ borderBottomWidth: 0.5,
1643
+ borderBottomColor: colors.dividerColor,
1644
+ },
1645
+ detailsKey: {
1646
+ fontFamily: AppFonts.interMedium,
1647
+ fontSize: 11,
1648
+ color: colors.primaryBlack,
1649
+ },
1650
+ detailsValue: {
1651
+ fontFamily: AppFonts.interRegular,
1652
+ fontSize: 11,
1653
+ color: colors.grayText,
1598
1654
  },
1599
1655
  });
1600
1656
  const styles = {};
@@ -1,3 +1,30 @@
1
+ import java.net.NetworkInterface
2
+ import java.net.Inet4Address
3
+
4
+ def getLocalIpAddress() {
5
+ def ip = "10.0.2.2"
6
+ try {
7
+ def interfaces = NetworkInterface.getNetworkInterfaces()
8
+ while (interfaces.hasMoreElements()) {
9
+ def iface = interfaces.nextElement()
10
+ if (iface.isLoopback() || !iface.isUp()) continue
11
+ def addresses = iface.getInetAddresses()
12
+ while (addresses.hasMoreElements()) {
13
+ def addr = addresses.nextElement()
14
+ if (addr instanceof Inet4Address) {
15
+ def host = addr.getHostAddress()
16
+ if (host.startsWith("192.168.") || host.startsWith("10.") || host.startsWith("172.")) {
17
+ return host
18
+ }
19
+ }
20
+ }
21
+ }
22
+ } catch (Exception e) {
23
+ // ignore
24
+ }
25
+ return ip
26
+ }
27
+
1
28
  apply plugin: "com.android.application"
2
29
  apply plugin: "org.jetbrains.kotlin.android"
3
30
  apply plugin: "com.facebook.react"
@@ -25,7 +52,7 @@ react {
25
52
 
26
53
  /* Bundling */
27
54
  // A list containing the node command and its flags. Default is just 'node'.
28
- // nodeExecutableAndArgs = ["node"]
55
+ nodeExecutableAndArgs = [rootProject.ext.has("NODE_EXECUTABLE") ? rootProject.ext.get("NODE_EXECUTABLE") : "node"]
29
56
  //
30
57
  // The command to run when bundling. By default is 'bundle'
31
58
  // bundleCommand = "ram-bundle"
@@ -84,6 +111,7 @@ android {
84
111
  targetSdkVersion rootProject.ext.targetSdkVersion
85
112
  versionCode 1
86
113
  versionName "1.0"
114
+ resValue "string", "developer_ip_address", getLocalIpAddress()
87
115
  }
88
116
  signingConfigs {
89
117
  debug {
@@ -23,5 +23,30 @@ class MainApplication : Application(), ReactApplication {
23
23
  override fun onCreate() {
24
24
  super.onCreate()
25
25
  loadReactNative(this)
26
+
27
+ if (BuildConfig.DEBUG) {
28
+ val isEmulator = android.os.Build.FINGERPRINT.startsWith("generic")
29
+ || android.os.Build.FINGERPRINT.startsWith("unknown")
30
+ || android.os.Build.MODEL.contains("google_sdk")
31
+ || android.os.Build.MODEL.contains("Emulator")
32
+ || android.os.Build.MODEL.contains("Android SDK built for x86")
33
+ || android.os.Build.MANUFACTURER.contains("Genymotion")
34
+ || android.os.Build.HARDWARE.contains("goldfish")
35
+ || android.os.Build.HARDWARE.contains("ranchu")
36
+ if (!isEmulator) {
37
+ try {
38
+ val ipResId = resources.getIdentifier("developer_ip_address", "string", packageName)
39
+ if (ipResId != 0) {
40
+ val ip = getString(ipResId)
41
+ if (ip.isNotEmpty() && ip != "10.0.2.2") {
42
+ val preferences = getSharedPreferences("${packageName}_preferences", MODE_PRIVATE)
43
+ preferences.edit().putString("debug_http_host", "$ip:8081").apply()
44
+ }
45
+ }
46
+ } catch (e: Exception) {
47
+ e.printStackTrace()
48
+ }
49
+ }
50
+ }
26
51
  }
27
52
  }
@@ -1,21 +1,48 @@
1
1
  buildscript {
2
2
  ext {
3
- buildToolsVersion = "36.0.0"
3
+ buildToolsVersion = "35.0.0"
4
4
  minSdkVersion = 24
5
- compileSdkVersion = 36
6
- targetSdkVersion = 36
5
+ compileSdkVersion = 35
6
+ targetSdkVersion = 35
7
7
  ndkVersion = "27.1.12297006"
8
8
  kotlinVersion = "2.1.20"
9
+ REACT_NATIVE_NODE_MODULES_DIR = new File(rootDir, "../node_modules/react-native")
10
+
11
+ def findNodeBin = { ->
12
+ def nvmDir = System.getenv("NVM_DIR") ?: (System.getProperty("user.home") + "/.nvm")
13
+ def nvmVersionsDir = new File(nvmDir, "versions/node")
14
+ if (nvmVersionsDir.exists()) {
15
+ def versions = nvmVersionsDir.listFiles()?.findAll { it.isDirectory() }?.sort { it.name }?.reverse()
16
+ for (v in versions) {
17
+ def candidate = new File(v, "bin/node")
18
+ if (candidate.exists() && candidate.canExecute()) {
19
+ return candidate.absolutePath
20
+ }
21
+ }
22
+ }
23
+ return "node"
24
+ }
25
+ NODE_EXECUTABLE = findNodeBin()
9
26
  }
10
27
  repositories {
11
28
  google()
12
29
  mavenCentral()
13
30
  }
14
31
  dependencies {
15
- classpath("com.android.tools.build:gradle")
32
+ classpath("com.android.tools.build:gradle:8.7.3")
16
33
  classpath("com.facebook.react:react-native-gradle-plugin")
17
34
  classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
18
35
  }
19
36
  }
20
37
 
21
38
  apply plugin: "com.facebook.react.rootproject"
39
+
40
+ allprojects {
41
+ configurations.all {
42
+ resolutionStrategy {
43
+ force 'androidx.core:core:1.13.1'
44
+ force 'androidx.core:core-ktx:1.13.1'
45
+ }
46
+ }
47
+ }
48
+
@@ -1,6 +1,6 @@
1
1
  distributionBase=GRADLE_USER_HOME
2
2
  distributionPath=wrapper/dists
3
- distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
3
+ distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
4
4
  networkTimeout=10000
5
5
  validateDistributionUrl=true
6
6
  zipStoreBase=GRADLE_USER_HOME
@@ -42,3 +42,4 @@ hermesEnabled=true
42
42
  # This allows your app to draw behind system bars for an immersive UI.
43
43
  # Note: Only works with ReactActivity and should not be used with custom Activity.
44
44
  edgeToEdgeEnabled=false
45
+
@@ -1,6 +1,25 @@
1
1
  pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
2
2
  plugins { id("com.facebook.react.settings") }
3
- extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
3
+
4
+ def findNodeBinDir() {
5
+ def nvmDir = System.getenv("NVM_DIR") ?: (System.getProperty("user.home") + "/.nvm")
6
+ def nvmVersionsDir = new File(nvmDir, "versions/node")
7
+ if (nvmVersionsDir.exists()) {
8
+ def versions = nvmVersionsDir.listFiles()?.findAll { it.isDirectory() }?.sort { it.name }?.reverse()
9
+ for (v in versions) {
10
+ def candidate = new File(v, "bin/node")
11
+ if (candidate.exists() && candidate.canExecute()) {
12
+ return new File(v, "bin").absolutePath
13
+ }
14
+ }
15
+ }
16
+ return null
17
+ }
18
+
19
+ def nodeBinDir = findNodeBinDir()
20
+ def npxPath = nodeBinDir ? nodeBinDir + "/npx" : "npx"
21
+
22
+ extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand([npxPath, "@react-native-community/cli", "config"]) }
4
23
  rootProject.name = 'example'
5
24
  include ':app'
6
25
  includeBuild('../node_modules/@react-native/gradle-plugin')
@@ -47,7 +47,7 @@
47
47
  }
48
48
  },
49
49
  "..": {
50
- "version": "1.1.11",
50
+ "version": "1.1.13",
51
51
  "dev": true,
52
52
  "license": "MIT",
53
53
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-inapp-inspector",
3
- "version": "1.1.13",
3
+ "version": "1.1.14",
4
4
  "description": "A self-contained network, console, analytics, and webview inspector for React Native applications.",
5
5
  "repository": {
6
6
  "type": "git",