@dynamic-labs/react-native-extension 4.92.4 → 4.93.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/android/EmbeddedWebViewController.kt +19 -2
- package/android/dynamic/embeddedwebview/EmbeddedWebViewController.kt +19 -2
- package/android/embeddedwebview/EmbeddedWebViewController.kt +19 -2
- package/android/java/xyz/dynamic/embeddedwebview/EmbeddedWebViewController.kt +19 -2
- package/android/main/java/xyz/dynamic/embeddedwebview/EmbeddedWebViewController.kt +19 -2
- package/android/src/main/java/xyz/dynamic/embeddedwebview/EmbeddedWebViewController.kt +19 -2
- package/android/xyz/dynamic/embeddedwebview/EmbeddedWebViewController.kt +19 -2
- package/index.cjs +252 -796
- package/index.js +251 -797
- package/ios/EmbeddedWebViewController.swift +7 -6
- package/package.json +6 -6
- package/src/ReactNativeExtension/ReactNativeExtension.d.ts +11 -2
- package/src/components/WebView/EmbeddedWebView/EmbeddedWebView.d.ts +6 -19
- package/src/components/WebView/WebView.d.ts +17 -6
- package/src/errors/WebViewFailedToLoadError.d.ts +1 -86
- package/src/components/WebView/EmbeddedWebView/embeddedWebViewPhaseTimers/embeddedWebViewPhaseTimers.d.ts +0 -66
- package/src/components/WebView/EmbeddedWebView/embeddedWebViewPhaseTimers/index.d.ts +0 -1
- package/src/components/WebView/constants.d.ts +0 -3
- package/src/components/WebView/successLog/emitSuccessLog.d.ts +0 -35
- package/src/components/WebView/successLog/index.d.ts +0 -3
- package/src/components/WebView/useWebViewLoadingTimeout/index.d.ts +0 -1
- package/src/components/WebView/useWebViewLoadingTimeout/useWebViewLoadingTimeout.d.ts +0 -4
- package/src/components/WebView/useWebViewPhaseTimers/index.d.ts +0 -1
- package/src/components/WebView/useWebViewPhaseTimers/useWebViewPhaseTimers.d.ts +0 -46
- package/src/components/WebView/useWebViewRecoveryTimeout/index.d.ts +0 -1
- package/src/components/WebView/useWebViewRecoveryTimeout/useWebViewRecoveryTimeout.d.ts +0 -12
- package/src/components/WebView/useWebViewSuccessLog/index.d.ts +0 -1
- package/src/components/WebView/useWebViewSuccessLog/useWebViewSuccessLog.d.ts +0 -28
- package/src/components/WebView/utils/assignEnvironmentIdToUrl/assignEnvironmentIdToUrl.d.ts +0 -1
- package/src/components/WebView/utils/assignEnvironmentIdToUrl/index.d.ts +0 -1
- package/src/components/WebView/utils/assignStartTimeToUrl/assignStartTimeToUrl.d.ts +0 -1
- package/src/components/WebView/utils/assignStartTimeToUrl/index.d.ts +0 -1
- package/src/components/WebView/utils/hasClearStateInUrl/hasClearStateInUrl.d.ts +0 -1
- package/src/components/WebView/utils/hasClearStateInUrl/index.d.ts +0 -1
- package/src/components/WebView/utils/increaseRetryToUrl/increaseRetryToUrl.d.ts +0 -1
- package/src/components/WebView/utils/increaseRetryToUrl/index.d.ts +0 -1
- package/src/components/WebView/utils/setClearStateToUrl/index.d.ts +0 -1
- package/src/components/WebView/utils/setClearStateToUrl/setClearStateToUrl.d.ts +0 -1
- package/src/components/WebView/webViewPhaseTimerCore/index.d.ts +0 -2
- package/src/components/WebView/webViewPhaseTimerCore/webViewPhaseTimerCore.d.ts +0 -123
|
@@ -113,7 +113,24 @@ object EmbeddedWebViewController {
|
|
|
113
113
|
)
|
|
114
114
|
return@runOnMain
|
|
115
115
|
}
|
|
116
|
-
val webView = ensureWebView()
|
|
116
|
+
val webView = ensureWebView()
|
|
117
|
+
if (webView == null) {
|
|
118
|
+
// ensureWebView() needs appContext.currentActivity to host the
|
|
119
|
+
// overlay; during early startup or backgrounding there may be none
|
|
120
|
+
// yet. Surface the failure instead of silently dropping the load —
|
|
121
|
+
// the JS retry engine treats this domain as transient and retries,
|
|
122
|
+
// by which point an activity usually exists.
|
|
123
|
+
emitLoadError(
|
|
124
|
+
url = url,
|
|
125
|
+
code = 0,
|
|
126
|
+
// The event-domain constant trips FireHog's generic high-entropy
|
|
127
|
+
// string detector; it is a public event name, not a secret.
|
|
128
|
+
domain = "EmbeddedWebViewNoActivity", // firehog:ignore
|
|
129
|
+
description = "No current activity available to host the embedded webview",
|
|
130
|
+
isProvisional = true,
|
|
131
|
+
)
|
|
132
|
+
return@runOnMain
|
|
133
|
+
}
|
|
117
134
|
// Pre-approve the origin so the first `shouldOverrideUrlLoading` call
|
|
118
135
|
// can skip the JS round-trip. On cold boot the JS thread may be too
|
|
119
136
|
// congested to respond within the navigation-decision timeout, silently
|
|
@@ -370,7 +387,7 @@ object EmbeddedWebViewController {
|
|
|
370
387
|
pendingNavigationUrls[id] = url
|
|
371
388
|
|
|
372
389
|
val timeout = Runnable {
|
|
373
|
-
//
|
|
390
|
+
// Default-cancel on timeout: drop the stashed URL and surface as a load
|
|
374
391
|
// error so JS sees the timeout (matches iOS's cancellation semantics
|
|
375
392
|
// but adds an explicit signal — iOS gets WebKitErrorDomain 102, which
|
|
376
393
|
// is filtered out, so neither side emits a network error).
|
|
@@ -113,7 +113,24 @@ object EmbeddedWebViewController {
|
|
|
113
113
|
)
|
|
114
114
|
return@runOnMain
|
|
115
115
|
}
|
|
116
|
-
val webView = ensureWebView()
|
|
116
|
+
val webView = ensureWebView()
|
|
117
|
+
if (webView == null) {
|
|
118
|
+
// ensureWebView() needs appContext.currentActivity to host the
|
|
119
|
+
// overlay; during early startup or backgrounding there may be none
|
|
120
|
+
// yet. Surface the failure instead of silently dropping the load —
|
|
121
|
+
// the JS retry engine treats this domain as transient and retries,
|
|
122
|
+
// by which point an activity usually exists.
|
|
123
|
+
emitLoadError(
|
|
124
|
+
url = url,
|
|
125
|
+
code = 0,
|
|
126
|
+
// The event-domain constant trips FireHog's generic high-entropy
|
|
127
|
+
// string detector; it is a public event name, not a secret.
|
|
128
|
+
domain = "EmbeddedWebViewNoActivity", // firehog:ignore
|
|
129
|
+
description = "No current activity available to host the embedded webview",
|
|
130
|
+
isProvisional = true,
|
|
131
|
+
)
|
|
132
|
+
return@runOnMain
|
|
133
|
+
}
|
|
117
134
|
// Pre-approve the origin so the first `shouldOverrideUrlLoading` call
|
|
118
135
|
// can skip the JS round-trip. On cold boot the JS thread may be too
|
|
119
136
|
// congested to respond within the navigation-decision timeout, silently
|
|
@@ -370,7 +387,7 @@ object EmbeddedWebViewController {
|
|
|
370
387
|
pendingNavigationUrls[id] = url
|
|
371
388
|
|
|
372
389
|
val timeout = Runnable {
|
|
373
|
-
//
|
|
390
|
+
// Default-cancel on timeout: drop the stashed URL and surface as a load
|
|
374
391
|
// error so JS sees the timeout (matches iOS's cancellation semantics
|
|
375
392
|
// but adds an explicit signal — iOS gets WebKitErrorDomain 102, which
|
|
376
393
|
// is filtered out, so neither side emits a network error).
|
|
@@ -113,7 +113,24 @@ object EmbeddedWebViewController {
|
|
|
113
113
|
)
|
|
114
114
|
return@runOnMain
|
|
115
115
|
}
|
|
116
|
-
val webView = ensureWebView()
|
|
116
|
+
val webView = ensureWebView()
|
|
117
|
+
if (webView == null) {
|
|
118
|
+
// ensureWebView() needs appContext.currentActivity to host the
|
|
119
|
+
// overlay; during early startup or backgrounding there may be none
|
|
120
|
+
// yet. Surface the failure instead of silently dropping the load —
|
|
121
|
+
// the JS retry engine treats this domain as transient and retries,
|
|
122
|
+
// by which point an activity usually exists.
|
|
123
|
+
emitLoadError(
|
|
124
|
+
url = url,
|
|
125
|
+
code = 0,
|
|
126
|
+
// The event-domain constant trips FireHog's generic high-entropy
|
|
127
|
+
// string detector; it is a public event name, not a secret.
|
|
128
|
+
domain = "EmbeddedWebViewNoActivity", // firehog:ignore
|
|
129
|
+
description = "No current activity available to host the embedded webview",
|
|
130
|
+
isProvisional = true,
|
|
131
|
+
)
|
|
132
|
+
return@runOnMain
|
|
133
|
+
}
|
|
117
134
|
// Pre-approve the origin so the first `shouldOverrideUrlLoading` call
|
|
118
135
|
// can skip the JS round-trip. On cold boot the JS thread may be too
|
|
119
136
|
// congested to respond within the navigation-decision timeout, silently
|
|
@@ -370,7 +387,7 @@ object EmbeddedWebViewController {
|
|
|
370
387
|
pendingNavigationUrls[id] = url
|
|
371
388
|
|
|
372
389
|
val timeout = Runnable {
|
|
373
|
-
//
|
|
390
|
+
// Default-cancel on timeout: drop the stashed URL and surface as a load
|
|
374
391
|
// error so JS sees the timeout (matches iOS's cancellation semantics
|
|
375
392
|
// but adds an explicit signal — iOS gets WebKitErrorDomain 102, which
|
|
376
393
|
// is filtered out, so neither side emits a network error).
|
|
@@ -113,7 +113,24 @@ object EmbeddedWebViewController {
|
|
|
113
113
|
)
|
|
114
114
|
return@runOnMain
|
|
115
115
|
}
|
|
116
|
-
val webView = ensureWebView()
|
|
116
|
+
val webView = ensureWebView()
|
|
117
|
+
if (webView == null) {
|
|
118
|
+
// ensureWebView() needs appContext.currentActivity to host the
|
|
119
|
+
// overlay; during early startup or backgrounding there may be none
|
|
120
|
+
// yet. Surface the failure instead of silently dropping the load —
|
|
121
|
+
// the JS retry engine treats this domain as transient and retries,
|
|
122
|
+
// by which point an activity usually exists.
|
|
123
|
+
emitLoadError(
|
|
124
|
+
url = url,
|
|
125
|
+
code = 0,
|
|
126
|
+
// The event-domain constant trips FireHog's generic high-entropy
|
|
127
|
+
// string detector; it is a public event name, not a secret.
|
|
128
|
+
domain = "EmbeddedWebViewNoActivity", // firehog:ignore
|
|
129
|
+
description = "No current activity available to host the embedded webview",
|
|
130
|
+
isProvisional = true,
|
|
131
|
+
)
|
|
132
|
+
return@runOnMain
|
|
133
|
+
}
|
|
117
134
|
// Pre-approve the origin so the first `shouldOverrideUrlLoading` call
|
|
118
135
|
// can skip the JS round-trip. On cold boot the JS thread may be too
|
|
119
136
|
// congested to respond within the navigation-decision timeout, silently
|
|
@@ -370,7 +387,7 @@ object EmbeddedWebViewController {
|
|
|
370
387
|
pendingNavigationUrls[id] = url
|
|
371
388
|
|
|
372
389
|
val timeout = Runnable {
|
|
373
|
-
//
|
|
390
|
+
// Default-cancel on timeout: drop the stashed URL and surface as a load
|
|
374
391
|
// error so JS sees the timeout (matches iOS's cancellation semantics
|
|
375
392
|
// but adds an explicit signal — iOS gets WebKitErrorDomain 102, which
|
|
376
393
|
// is filtered out, so neither side emits a network error).
|
|
@@ -113,7 +113,24 @@ object EmbeddedWebViewController {
|
|
|
113
113
|
)
|
|
114
114
|
return@runOnMain
|
|
115
115
|
}
|
|
116
|
-
val webView = ensureWebView()
|
|
116
|
+
val webView = ensureWebView()
|
|
117
|
+
if (webView == null) {
|
|
118
|
+
// ensureWebView() needs appContext.currentActivity to host the
|
|
119
|
+
// overlay; during early startup or backgrounding there may be none
|
|
120
|
+
// yet. Surface the failure instead of silently dropping the load —
|
|
121
|
+
// the JS retry engine treats this domain as transient and retries,
|
|
122
|
+
// by which point an activity usually exists.
|
|
123
|
+
emitLoadError(
|
|
124
|
+
url = url,
|
|
125
|
+
code = 0,
|
|
126
|
+
// The event-domain constant trips FireHog's generic high-entropy
|
|
127
|
+
// string detector; it is a public event name, not a secret.
|
|
128
|
+
domain = "EmbeddedWebViewNoActivity", // firehog:ignore
|
|
129
|
+
description = "No current activity available to host the embedded webview",
|
|
130
|
+
isProvisional = true,
|
|
131
|
+
)
|
|
132
|
+
return@runOnMain
|
|
133
|
+
}
|
|
117
134
|
// Pre-approve the origin so the first `shouldOverrideUrlLoading` call
|
|
118
135
|
// can skip the JS round-trip. On cold boot the JS thread may be too
|
|
119
136
|
// congested to respond within the navigation-decision timeout, silently
|
|
@@ -370,7 +387,7 @@ object EmbeddedWebViewController {
|
|
|
370
387
|
pendingNavigationUrls[id] = url
|
|
371
388
|
|
|
372
389
|
val timeout = Runnable {
|
|
373
|
-
//
|
|
390
|
+
// Default-cancel on timeout: drop the stashed URL and surface as a load
|
|
374
391
|
// error so JS sees the timeout (matches iOS's cancellation semantics
|
|
375
392
|
// but adds an explicit signal — iOS gets WebKitErrorDomain 102, which
|
|
376
393
|
// is filtered out, so neither side emits a network error).
|
|
@@ -113,7 +113,24 @@ object EmbeddedWebViewController {
|
|
|
113
113
|
)
|
|
114
114
|
return@runOnMain
|
|
115
115
|
}
|
|
116
|
-
val webView = ensureWebView()
|
|
116
|
+
val webView = ensureWebView()
|
|
117
|
+
if (webView == null) {
|
|
118
|
+
// ensureWebView() needs appContext.currentActivity to host the
|
|
119
|
+
// overlay; during early startup or backgrounding there may be none
|
|
120
|
+
// yet. Surface the failure instead of silently dropping the load —
|
|
121
|
+
// the JS retry engine treats this domain as transient and retries,
|
|
122
|
+
// by which point an activity usually exists.
|
|
123
|
+
emitLoadError(
|
|
124
|
+
url = url,
|
|
125
|
+
code = 0,
|
|
126
|
+
// The event-domain constant trips FireHog's generic high-entropy
|
|
127
|
+
// string detector; it is a public event name, not a secret.
|
|
128
|
+
domain = "EmbeddedWebViewNoActivity", // firehog:ignore
|
|
129
|
+
description = "No current activity available to host the embedded webview",
|
|
130
|
+
isProvisional = true,
|
|
131
|
+
)
|
|
132
|
+
return@runOnMain
|
|
133
|
+
}
|
|
117
134
|
// Pre-approve the origin so the first `shouldOverrideUrlLoading` call
|
|
118
135
|
// can skip the JS round-trip. On cold boot the JS thread may be too
|
|
119
136
|
// congested to respond within the navigation-decision timeout, silently
|
|
@@ -370,7 +387,7 @@ object EmbeddedWebViewController {
|
|
|
370
387
|
pendingNavigationUrls[id] = url
|
|
371
388
|
|
|
372
389
|
val timeout = Runnable {
|
|
373
|
-
//
|
|
390
|
+
// Default-cancel on timeout: drop the stashed URL and surface as a load
|
|
374
391
|
// error so JS sees the timeout (matches iOS's cancellation semantics
|
|
375
392
|
// but adds an explicit signal — iOS gets WebKitErrorDomain 102, which
|
|
376
393
|
// is filtered out, so neither side emits a network error).
|
|
@@ -113,7 +113,24 @@ object EmbeddedWebViewController {
|
|
|
113
113
|
)
|
|
114
114
|
return@runOnMain
|
|
115
115
|
}
|
|
116
|
-
val webView = ensureWebView()
|
|
116
|
+
val webView = ensureWebView()
|
|
117
|
+
if (webView == null) {
|
|
118
|
+
// ensureWebView() needs appContext.currentActivity to host the
|
|
119
|
+
// overlay; during early startup or backgrounding there may be none
|
|
120
|
+
// yet. Surface the failure instead of silently dropping the load —
|
|
121
|
+
// the JS retry engine treats this domain as transient and retries,
|
|
122
|
+
// by which point an activity usually exists.
|
|
123
|
+
emitLoadError(
|
|
124
|
+
url = url,
|
|
125
|
+
code = 0,
|
|
126
|
+
// The event-domain constant trips FireHog's generic high-entropy
|
|
127
|
+
// string detector; it is a public event name, not a secret.
|
|
128
|
+
domain = "EmbeddedWebViewNoActivity", // firehog:ignore
|
|
129
|
+
description = "No current activity available to host the embedded webview",
|
|
130
|
+
isProvisional = true,
|
|
131
|
+
)
|
|
132
|
+
return@runOnMain
|
|
133
|
+
}
|
|
117
134
|
// Pre-approve the origin so the first `shouldOverrideUrlLoading` call
|
|
118
135
|
// can skip the JS round-trip. On cold boot the JS thread may be too
|
|
119
136
|
// congested to respond within the navigation-decision timeout, silently
|
|
@@ -370,7 +387,7 @@ object EmbeddedWebViewController {
|
|
|
370
387
|
pendingNavigationUrls[id] = url
|
|
371
388
|
|
|
372
389
|
val timeout = Runnable {
|
|
373
|
-
//
|
|
390
|
+
// Default-cancel on timeout: drop the stashed URL and surface as a load
|
|
374
391
|
// error so JS sees the timeout (matches iOS's cancellation semantics
|
|
375
392
|
// but adds an explicit signal — iOS gets WebKitErrorDomain 102, which
|
|
376
393
|
// is filtered out, so neither side emits a network error).
|