@goliapkg/sentori-react-native 1.0.0-rc.7 → 1.0.0-rc.8
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.
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
package com.sentori
|
|
2
2
|
|
|
3
3
|
import android.app.Activity
|
|
4
|
+
import android.graphics.drawable.BitmapDrawable
|
|
4
5
|
import android.graphics.drawable.ColorDrawable
|
|
5
6
|
import android.graphics.drawable.Drawable
|
|
6
7
|
import android.graphics.drawable.GradientDrawable
|
|
7
8
|
import android.graphics.drawable.LayerDrawable
|
|
9
|
+
import android.graphics.drawable.StateListDrawable
|
|
8
10
|
import android.view.View
|
|
9
11
|
import android.view.ViewGroup
|
|
10
12
|
import android.widget.EditText
|
|
@@ -93,9 +95,18 @@ object SentoriReplayCapture {
|
|
|
93
95
|
totalEmptyResultTicks++
|
|
94
96
|
return null
|
|
95
97
|
}
|
|
96
|
-
|
|
98
|
+
// rc.8 — anchor the walk at android.R.id.content, NOT
|
|
99
|
+
// window.decorView. decorView includes the StatusBarBackground
|
|
100
|
+
// and NavigationBarBackground sibling views the PhoneWindow
|
|
101
|
+
// injects (full display width, positioned in absolute window
|
|
102
|
+
// coords). Insight 2026-05-18 saw those bleed into the
|
|
103
|
+
// wireframe as horizontal grey bars stretching beyond the
|
|
104
|
+
// viewport width. Anchoring at the content FrameLayout drops
|
|
105
|
+
// them while keeping the app's React tree intact.
|
|
106
|
+
val decor = activity.window?.decorView
|
|
107
|
+
val root = decor?.findViewById<View>(android.R.id.content)
|
|
97
108
|
if (root == null) {
|
|
98
|
-
lastDiagPath = "decorView.null"
|
|
109
|
+
lastDiagPath = if (decor == null) "decorView.null" else "contentView.null"
|
|
99
110
|
totalEmptyResultTicks++
|
|
100
111
|
return null
|
|
101
112
|
}
|
|
@@ -217,18 +228,21 @@ object SentoriReplayCapture {
|
|
|
217
228
|
kindEmitted = true
|
|
218
229
|
}
|
|
219
230
|
view.background != null -> {
|
|
220
|
-
|
|
221
|
-
//
|
|
222
|
-
//
|
|
223
|
-
//
|
|
224
|
-
//
|
|
225
|
-
//
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
231
|
+
// rc.8 — backgrounds backed by a BitmapDrawable
|
|
232
|
+
// (a View whose backgroundImage / drawable
|
|
233
|
+
// resource is a raster) emit as `image` kind so
|
|
234
|
+
// the dashboard renders them as a media region,
|
|
235
|
+
// not as a grey rect. Everything else stays
|
|
236
|
+
// `rect` and tries to extract a fill colour.
|
|
237
|
+
val bg = view.background
|
|
238
|
+
if (bg is BitmapDrawable) {
|
|
239
|
+
node.put("kind", "image")
|
|
240
|
+
} else {
|
|
241
|
+
node.put("kind", "rect")
|
|
242
|
+
val color = extractDrawableColor(bg)
|
|
243
|
+
if (color != null && (color shr 24 and 0xff) != 0) {
|
|
244
|
+
node.put("color", colorToHex(color))
|
|
245
|
+
}
|
|
232
246
|
}
|
|
233
247
|
kindEmitted = true
|
|
234
248
|
}
|
|
@@ -283,6 +297,17 @@ object SentoriReplayCapture {
|
|
|
283
297
|
val csl = drawable.color
|
|
284
298
|
csl?.defaultColor
|
|
285
299
|
}
|
|
300
|
+
is StateListDrawable -> {
|
|
301
|
+
// rc.8 — Pressable / TouchableOpacity wrap their child
|
|
302
|
+
// in a StateListDrawable (default state + pressed
|
|
303
|
+
// state). `.current` returns the currently-applied
|
|
304
|
+
// state's drawable, which during a normal capture
|
|
305
|
+
// is the unpressed visual — exactly what we want.
|
|
306
|
+
// AnimatedStateListDrawable extends StateListDrawable
|
|
307
|
+
// so it inherits this branch.
|
|
308
|
+
extractDrawableColor(drawable.current)
|
|
309
|
+
}
|
|
310
|
+
is BitmapDrawable -> null
|
|
286
311
|
is LayerDrawable -> {
|
|
287
312
|
for (i in 0 until drawable.numberOfLayers) {
|
|
288
313
|
val inner = drawable.getDrawable(i)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goliapkg/sentori-react-native",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.8",
|
|
4
4
|
"description": "Sentori SDK for React Native \u2014 JS-layer error capture, native crash handlers (iOS / Android), batched transport, fetch + react-navigation tracing.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://sentori.golia.jp",
|