@absolutejs/absolute 0.20.0-beta.95 → 0.20.0-beta.97
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/CHANGELOG.md +8 -1
- package/changelog.json +12 -1
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/cli/{compile-qg75ewma.js → compile-9y36k8z1.js} +2 -2
- package/dist/cli/{dev-sm9px53g.js → dev-r8dztrp8.js} +1 -1
- package/dist/cli/{expoProject-h38entbj.js → expoProject-ceey4cfg.js} +1 -1
- package/dist/cli/{index-d8va9b7v.js → index-0bcf7pdw.js} +1 -1
- package/dist/cli/{index-51yyq29s.js → index-fdycyj4v.js} +1 -1
- package/dist/cli/{index-0t1cxstr.js → index-qd6mqgsc.js} +68 -3
- package/dist/cli/index.js +5 -5
- package/dist/cli/{mobile-dev4mjsa.js → mobile-31ypggwx.js} +3 -3
- package/dist/cli/{start-0ddnh0y4.js → start-10dfrjvd.js} +3 -3
- package/dist/mobile/index.js +69 -4
- package/dist/mobile/index.js.map +4 -4
- package/dist/mobile/remoteMacAgentEntry.js +148 -83
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,14 @@ This file is generated by `absolute-changelog` from the entries in
|
|
|
6
6
|
`changelog/`. Edit an entry, not this file — and add new ones under
|
|
7
7
|
`changelog/unreleased/`.
|
|
8
8
|
|
|
9
|
-
## 0.20.0-beta.
|
|
9
|
+
## 0.20.0-beta.97 — 2026-09-15
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **Expo Android picker recovery distinguishes explicit cancellation from delayed successful results**
|
|
14
|
+
Generated Expo shells forward a trusted, request-correlated native cancellation signal to the provider-neutral device lifecycle, while the installed API 36 gate covers camera and multi-photo success, cancellation, stale-result suppression, exactly-once delivery, and native-path redaction.
|
|
15
|
+
|
|
16
|
+
## 0.20.0-beta.96 — 2026-09-15
|
|
10
17
|
|
|
11
18
|
### Added
|
|
12
19
|
|
package/changelog.json
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
"contract": 1,
|
|
3
3
|
"name": "@absolutejs/absolute",
|
|
4
4
|
"releases": [
|
|
5
|
+
{
|
|
6
|
+
"changes": [
|
|
7
|
+
{
|
|
8
|
+
"detail": "Generated Expo shells forward a trusted, request-correlated native cancellation signal to the provider-neutral device lifecycle, while the installed API 36 gate covers camera and multi-photo success, cancellation, stale-result suppression, exactly-once delivery, and native-path redaction.",
|
|
9
|
+
"kind": "fixed",
|
|
10
|
+
"summary": "Expo Android picker recovery distinguishes explicit cancellation from delayed successful results"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"date": "2026-09-15",
|
|
14
|
+
"version": "0.20.0-beta.97"
|
|
15
|
+
},
|
|
5
16
|
{
|
|
6
17
|
"changes": [
|
|
7
18
|
{
|
|
@@ -20,7 +31,7 @@
|
|
|
20
31
|
}
|
|
21
32
|
],
|
|
22
33
|
"date": "2026-09-15",
|
|
23
|
-
"version": "0.20.0-beta.
|
|
34
|
+
"version": "0.20.0-beta.96"
|
|
24
35
|
},
|
|
25
36
|
{
|
|
26
37
|
"changes": [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-VPql4f/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-VPql4f/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -48,7 +48,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
|
|
|
48
48
|
getWarningController()?.maybeWarn(primitiveName);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
// .angular-partial-tmp-
|
|
51
|
+
// .angular-partial-tmp-VPql4f/src/core/streamingSlotRegistry.ts
|
|
52
52
|
var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
|
|
53
53
|
var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
|
|
54
54
|
var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
createIslandRegistryDefinitionPlugin,
|
|
16
16
|
finalizeAbsoluteMobileCompatibilityBuild,
|
|
17
17
|
resolveServerBundleExternals
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-0bcf7pdw.js";
|
|
19
19
|
import {
|
|
20
20
|
loadIslandRegistryBuildInfo
|
|
21
21
|
} from "./index-bzs19w3r.js";
|
|
@@ -36,7 +36,7 @@ import"./index-w5vswatm.js";
|
|
|
36
36
|
import {
|
|
37
37
|
normalizeAbsoluteMobileConfig
|
|
38
38
|
} from "./index-rd2hbttb.js";
|
|
39
|
-
import"./index-
|
|
39
|
+
import"./index-qd6mqgsc.js";
|
|
40
40
|
import {
|
|
41
41
|
ABSOLUTE_NATIVE_AUTH_CLIENTS_ENV,
|
|
42
42
|
installAbsoluteMobileAuthEnvironment
|
|
@@ -1286,7 +1286,7 @@ var loadAbsoluteMobileDevModules = async () => {
|
|
|
1286
1286
|
expoNativeWatcher
|
|
1287
1287
|
] = await Promise.all([
|
|
1288
1288
|
import("./config-vy04mqce.js"),
|
|
1289
|
-
import("./expoProject-
|
|
1289
|
+
import("./expoProject-ceey4cfg.js"),
|
|
1290
1290
|
import("./expoDevController-a0jk8d43.js"),
|
|
1291
1291
|
import("./nativeAuth-zx4tsb1f.js"),
|
|
1292
1292
|
import("./androidEmulatorController-nybhzc6c.js"),
|
|
@@ -1441,7 +1441,10 @@ var androidManifest2 = `${XML_HEADER2}<manifest xmlns:android="http://schemas.an
|
|
|
1441
1441
|
`;
|
|
1442
1442
|
var androidModule2 = `${HEADER2}package expo.modules.absoluteactivityresultrecovery
|
|
1443
1443
|
|
|
1444
|
+
import android.app.Activity
|
|
1445
|
+
import android.content.Context
|
|
1444
1446
|
import android.content.Intent
|
|
1447
|
+
import android.provider.MediaStore
|
|
1445
1448
|
import android.util.Log
|
|
1446
1449
|
import expo.modules.kotlin.modules.Module
|
|
1447
1450
|
import expo.modules.kotlin.modules.ModuleDefinition
|
|
@@ -1457,16 +1460,58 @@ object AbsoluteActivityResultRecoveryState {
|
|
|
1457
1460
|
var applicationRuntimeReady = false
|
|
1458
1461
|
|
|
1459
1462
|
private val pendingActivityResults = ArrayDeque<AbsolutePendingActivityResult>()
|
|
1463
|
+
private var pendingCancellations = 0
|
|
1464
|
+
|
|
1465
|
+
private const val preferencesName = "absolutejs.activity-result-recovery"
|
|
1466
|
+
private const val pickerRequestCodeKey = "picker-request-code"
|
|
1467
|
+
|
|
1468
|
+
@Synchronized
|
|
1469
|
+
fun registerPickerRequest(context: Context, requestCode: Int, intent: Intent) {
|
|
1470
|
+
val action = intent.action
|
|
1471
|
+
val isPicker = action == MediaStore.ACTION_IMAGE_CAPTURE ||
|
|
1472
|
+
action == MediaStore.ACTION_VIDEO_CAPTURE ||
|
|
1473
|
+
action == MediaStore.ACTION_PICK_IMAGES ||
|
|
1474
|
+
action == Intent.ACTION_PICK ||
|
|
1475
|
+
action == Intent.ACTION_GET_CONTENT ||
|
|
1476
|
+
action == Intent.ACTION_OPEN_DOCUMENT ||
|
|
1477
|
+
action?.endsWith(".PICK") == true ||
|
|
1478
|
+
intent.type?.startsWith("image/") == true ||
|
|
1479
|
+
intent.hasExtra(MediaStore.EXTRA_OUTPUT)
|
|
1480
|
+
if (!isPicker) return
|
|
1481
|
+
context.getSharedPreferences(preferencesName, Context.MODE_PRIVATE)
|
|
1482
|
+
.edit()
|
|
1483
|
+
.putInt(pickerRequestCodeKey, requestCode)
|
|
1484
|
+
.apply()
|
|
1485
|
+
}
|
|
1460
1486
|
|
|
1461
1487
|
@Synchronized
|
|
1462
|
-
fun
|
|
1488
|
+
fun consumePickerCancellation(context: Context, requestCode: Int, resultCode: Int): Boolean {
|
|
1489
|
+
val preferences = context.getSharedPreferences(preferencesName, Context.MODE_PRIVATE)
|
|
1490
|
+
val pickerRequestCode = preferences.getInt(pickerRequestCodeKey, Int.MIN_VALUE)
|
|
1491
|
+
if (pickerRequestCode != requestCode) return false
|
|
1492
|
+
preferences.edit().remove(pickerRequestCodeKey).apply()
|
|
1493
|
+
return resultCode == Activity.RESULT_CANCELED
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
@Synchronized
|
|
1497
|
+
fun enqueueActivityResult(requestCode: Int, resultCode: Int, data: Intent?, pickerCancelled: Boolean) {
|
|
1463
1498
|
if (pendingActivityResults.size == 8) pendingActivityResults.removeFirst()
|
|
1464
1499
|
pendingActivityResults.addLast(
|
|
1465
1500
|
AbsolutePendingActivityResult(requestCode, resultCode, data?.let(::Intent))
|
|
1466
1501
|
)
|
|
1502
|
+
if (pickerCancelled && pendingCancellations < 8) {
|
|
1503
|
+
pendingCancellations += 1
|
|
1504
|
+
}
|
|
1467
1505
|
Log.d("AbsoluteJS", "Queued early Android activity result; pending=" + pendingActivityResults.size)
|
|
1468
1506
|
}
|
|
1469
1507
|
|
|
1508
|
+
@Synchronized
|
|
1509
|
+
fun takePendingCancellation(): Boolean {
|
|
1510
|
+
if (pendingCancellations == 0) return false
|
|
1511
|
+
pendingCancellations -= 1
|
|
1512
|
+
return true
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1470
1515
|
@Synchronized
|
|
1471
1516
|
fun hasPendingActivityResults() = pendingActivityResults.isNotEmpty()
|
|
1472
1517
|
|
|
@@ -1487,6 +1532,10 @@ class AbsoluteActivityResultRecoveryModule : Module() {
|
|
|
1487
1532
|
AbsoluteActivityResultRecoveryState.applicationRuntimeReady = true
|
|
1488
1533
|
Log.d("AbsoluteJS", "Expo application runtime ready for Android activity results")
|
|
1489
1534
|
}
|
|
1535
|
+
|
|
1536
|
+
Function("takePendingCancellation") {
|
|
1537
|
+
AbsoluteActivityResultRecoveryState.takePendingCancellation()
|
|
1538
|
+
}
|
|
1490
1539
|
}
|
|
1491
1540
|
}
|
|
1492
1541
|
`;
|
|
@@ -1494,6 +1543,7 @@ var runtime = `${HEADER2}import { requireNativeModule } from 'expo-modules-core'
|
|
|
1494
1543
|
|
|
1495
1544
|
type AbsoluteActivityResultRecoveryNative = {
|
|
1496
1545
|
markApplicationRuntimeReady(): void;
|
|
1546
|
+
takePendingCancellation(): boolean;
|
|
1497
1547
|
};
|
|
1498
1548
|
|
|
1499
1549
|
const native = requireNativeModule<AbsoluteActivityResultRecoveryNative>(
|
|
@@ -1502,6 +1552,9 @@ const native = requireNativeModule<AbsoluteActivityResultRecoveryNative>(
|
|
|
1502
1552
|
|
|
1503
1553
|
export const markAbsoluteApplicationRuntimeReady = () =>
|
|
1504
1554
|
native.markApplicationRuntimeReady();
|
|
1555
|
+
|
|
1556
|
+
export const takeAbsoluteActivityResultCancellation = () =>
|
|
1557
|
+
native.takePendingCancellation();
|
|
1505
1558
|
`;
|
|
1506
1559
|
var absoluteExpoActivityResultRecoveryFiles = (project) => new Map([
|
|
1507
1560
|
[
|
|
@@ -1614,7 +1667,7 @@ var packageDependencies = (plan) => Object.fromEntries(plan.requiredPackages.map
|
|
|
1614
1667
|
var expoPackage = (auth, sync, devices, updates) => ({
|
|
1615
1668
|
dependencies: {
|
|
1616
1669
|
"@absolutejs/devices": "0.7.0",
|
|
1617
|
-
"@absolutejs/devices-expo": "0.0.
|
|
1670
|
+
"@absolutejs/devices-expo": "0.0.11",
|
|
1618
1671
|
...auth ? {
|
|
1619
1672
|
"@absolutejs/auth": ABSOLUTE_EXPO_AUTH_CORE_VERSION,
|
|
1620
1673
|
[ABSOLUTE_EXPO_AUTH_PACKAGE]: ABSOLUTE_EXPO_AUTH_VERSION
|
|
@@ -1860,6 +1913,7 @@ const withAbsoluteActivityResultRecovery = config => withMainActivity(config, va
|
|
|
1860
1913
|
'import android.os.Bundle',
|
|
1861
1914
|
'import android.os.Handler',
|
|
1862
1915
|
'import android.os.Looper',
|
|
1916
|
+
'import android.util.Log',
|
|
1863
1917
|
'import expo.modules.absoluteactivityresultrecovery.AbsoluteActivityResultRecoveryState'
|
|
1864
1918
|
].join('\\n'));
|
|
1865
1919
|
source = source.replace(CLASS_ANCHOR, \`\${CLASS_ANCHOR}
|
|
@@ -1881,12 +1935,19 @@ const withAbsoluteActivityResultRecovery = config => withMainActivity(config, va
|
|
|
1881
1935
|
}
|
|
1882
1936
|
}
|
|
1883
1937
|
|
|
1938
|
+
@Suppress("DEPRECATION")
|
|
1939
|
+
override fun startActivityForResult(intent: Intent, requestCode: Int, options: Bundle?) {
|
|
1940
|
+
AbsoluteActivityResultRecoveryState.registerPickerRequest(applicationContext, requestCode, intent)
|
|
1941
|
+
super.startActivityForResult(intent, requestCode, options)
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1884
1944
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
|
1945
|
+
val pickerCancelled = AbsoluteActivityResultRecoveryState.consumePickerCancellation(applicationContext, requestCode, resultCode)
|
|
1885
1946
|
if (AbsoluteActivityResultRecoveryState.applicationRuntimeReady) {
|
|
1886
1947
|
super.onActivityResult(requestCode, resultCode, data)
|
|
1887
1948
|
return
|
|
1888
1949
|
}
|
|
1889
|
-
AbsoluteActivityResultRecoveryState.enqueueActivityResult(requestCode, resultCode, data)
|
|
1950
|
+
AbsoluteActivityResultRecoveryState.enqueueActivityResult(requestCode, resultCode, data, pickerCancelled)
|
|
1890
1951
|
absoluteActivityResultHandler.removeCallbacks(absoluteReplayActivityResults)
|
|
1891
1952
|
absoluteActivityResultHandler.postDelayed(absoluteReplayActivityResults, 250)
|
|
1892
1953
|
}
|
|
@@ -1902,7 +1963,9 @@ const withAbsoluteActivityResultRecovery = config => withMainActivity(config, va
|
|
|
1902
1963
|
|
|
1903
1964
|
override fun onDestroy() {
|
|
1904
1965
|
absoluteActivityResultHandler.removeCallbacks(absoluteReplayActivityResults)
|
|
1966
|
+
AbsoluteActivityResultRecoveryState.applicationRuntimeReady = false
|
|
1905
1967
|
super.onDestroy()
|
|
1968
|
+
Log.d("AbsoluteJS", "Expo activity-result recovery activity destroyed")
|
|
1906
1969
|
}
|
|
1907
1970
|
\`);
|
|
1908
1971
|
value.modResults.contents = source;
|
|
@@ -2126,6 +2189,7 @@ const absoluteExpoPushOptions = {
|
|
|
2126
2189
|
};` : "";
|
|
2127
2190
|
return `${EXPO_GENERATED_HEADER}import { installDeviceAdapter } from '@absolutejs/devices/runtime';
|
|
2128
2191
|
import { createExpoDeviceAdapter } from '@absolutejs/devices-expo';
|
|
2192
|
+
import { takeAbsoluteActivityResultCancellation } from './AbsoluteActivityResultRecovery';
|
|
2129
2193
|
${push ? "import { absoluteExpoAuth } from './AbsoluteAuth';" : ""}
|
|
2130
2194
|
${imports.join(`
|
|
2131
2195
|
`)}
|
|
@@ -2135,6 +2199,7 @@ ${pushSource}
|
|
|
2135
2199
|
export const absoluteExpoDeviceCapabilities = ${JSON.stringify(plan.capabilities)} as const;
|
|
2136
2200
|
export const absoluteExpoDevices = createExpoDeviceAdapter({
|
|
2137
2201
|
storagePrefix: ${JSON.stringify(`absolutejs.${config.appId}.`)},
|
|
2202
|
+
takeActivityResultCancellation: takeAbsoluteActivityResultCancellation,
|
|
2138
2203
|
${entries}
|
|
2139
2204
|
});
|
|
2140
2205
|
installDeviceAdapter(absoluteExpoDevices);
|
package/dist/cli/index.js
CHANGED
|
@@ -58,7 +58,7 @@ if (command === "dev") {
|
|
|
58
58
|
}
|
|
59
59
|
const positionalArgs = stripNamedArgs("--config", "--android-device", "--ios-device").filter((arg) => arg !== "--no-mobile" && arg !== "--eager");
|
|
60
60
|
const serverEntry = positionalArgs[0] ?? DEFAULT_SERVER_ENTRY;
|
|
61
|
-
const { dev } = await import("./dev-
|
|
61
|
+
const { dev } = await import("./dev-r8dztrp8.js");
|
|
62
62
|
await dev(serverEntry, configPath, {
|
|
63
63
|
androidDevice,
|
|
64
64
|
eager: args.includes("--eager"),
|
|
@@ -71,7 +71,7 @@ if (command === "dev") {
|
|
|
71
71
|
const configPath = parseNamedArg("--config");
|
|
72
72
|
const positionalArgs = stripNamedArgs("--outdir", "--config").filter((arg) => arg !== "--prebuilt");
|
|
73
73
|
const serverEntry = positionalArgs[0] ?? DEFAULT_SERVER_ENTRY;
|
|
74
|
-
const { start } = await import("./start-
|
|
74
|
+
const { start } = await import("./start-10dfrjvd.js");
|
|
75
75
|
await start(serverEntry, outdir, configPath, {
|
|
76
76
|
prebuilt: args.includes("--prebuilt")
|
|
77
77
|
});
|
|
@@ -81,7 +81,7 @@ if (command === "dev") {
|
|
|
81
81
|
const configPath = parseNamedArg("--config");
|
|
82
82
|
const positionalArgs = stripNamedArgs("--outdir", "--config");
|
|
83
83
|
const serverEntry = positionalArgs[0] ?? DEFAULT_SERVER_ENTRY;
|
|
84
|
-
const { start } = await import("./start-
|
|
84
|
+
const { start } = await import("./start-10dfrjvd.js");
|
|
85
85
|
await start(serverEntry, outdir, configPath, { prepareOnly: true });
|
|
86
86
|
} else if (command === "build") {
|
|
87
87
|
sendTelemetryEvent("cli:command", { command });
|
|
@@ -197,13 +197,13 @@ if (command === "dev") {
|
|
|
197
197
|
const configPath = parseNamedArg("--config");
|
|
198
198
|
const positionalArgs = stripNamedArgs("--outdir", "--outfile", "--config");
|
|
199
199
|
const serverEntry = positionalArgs[0] ?? DEFAULT_SERVER_ENTRY;
|
|
200
|
-
const { compile } = await import("./compile-
|
|
200
|
+
const { compile } = await import("./compile-9y36k8z1.js");
|
|
201
201
|
await compile(serverEntry, outdir, outfile, configPath);
|
|
202
202
|
} else if (command === "mobile") {
|
|
203
203
|
sendTelemetryEvent("cli:command", {
|
|
204
204
|
command: `mobile:${workspaceCommand ?? "unknown"}`
|
|
205
205
|
});
|
|
206
|
-
const { runMobile } = await import("./mobile-
|
|
206
|
+
const { runMobile } = await import("./mobile-31ypggwx.js");
|
|
207
207
|
try {
|
|
208
208
|
await runMobile(args);
|
|
209
209
|
} catch (error) {
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
} from "./index-zh6hhrwy.js";
|
|
8
8
|
import {
|
|
9
9
|
start
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-fdycyj4v.js";
|
|
11
11
|
import {
|
|
12
12
|
ABSOLUTE_MOBILE_CLIENT_MANIFEST_FORMAT,
|
|
13
13
|
ABSOLUTE_MOBILE_PAGE_PROTOCOL_VERSION,
|
|
14
14
|
resolveAbsoluteMobileRoute
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-0bcf7pdw.js";
|
|
16
16
|
import"./index-bzs19w3r.js";
|
|
17
17
|
import"./index-s2tazax7.js";
|
|
18
18
|
import {
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
syncAbsoluteExpoWebAssets,
|
|
68
68
|
unsignedAbsoluteMobileUpdate,
|
|
69
69
|
writeAbsoluteExpoProject
|
|
70
|
-
} from "./index-
|
|
70
|
+
} from "./index-qd6mqgsc.js";
|
|
71
71
|
import {
|
|
72
72
|
normalizeAbsoluteIosDeviceIdentifier
|
|
73
73
|
} from "./index-j66p8hn5.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
start
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
4
|
+
} from "./index-fdycyj4v.js";
|
|
5
|
+
import"./index-0bcf7pdw.js";
|
|
6
6
|
import"./index-bzs19w3r.js";
|
|
7
7
|
import"./index-s2tazax7.js";
|
|
8
8
|
import"./index-fc9vxw56.js";
|
|
@@ -11,7 +11,7 @@ import"./index-06cmrcdq.js";
|
|
|
11
11
|
import"./index-9kwmb3c0.js";
|
|
12
12
|
import"./index-w5vswatm.js";
|
|
13
13
|
import"./index-rd2hbttb.js";
|
|
14
|
-
import"./index-
|
|
14
|
+
import"./index-qd6mqgsc.js";
|
|
15
15
|
import"./index-ar4gz15x.js";
|
|
16
16
|
import"./index-t84wxk1p.js";
|
|
17
17
|
import"./index-wtfnv3n2.js";
|
package/dist/mobile/index.js
CHANGED
|
@@ -28301,7 +28301,10 @@ var androidManifest2 = `${XML_HEADER2}<manifest xmlns:android="http://schemas.an
|
|
|
28301
28301
|
`;
|
|
28302
28302
|
var androidModule2 = `${HEADER2}package expo.modules.absoluteactivityresultrecovery
|
|
28303
28303
|
|
|
28304
|
+
import android.app.Activity
|
|
28305
|
+
import android.content.Context
|
|
28304
28306
|
import android.content.Intent
|
|
28307
|
+
import android.provider.MediaStore
|
|
28305
28308
|
import android.util.Log
|
|
28306
28309
|
import expo.modules.kotlin.modules.Module
|
|
28307
28310
|
import expo.modules.kotlin.modules.ModuleDefinition
|
|
@@ -28317,16 +28320,58 @@ object AbsoluteActivityResultRecoveryState {
|
|
|
28317
28320
|
var applicationRuntimeReady = false
|
|
28318
28321
|
|
|
28319
28322
|
private val pendingActivityResults = ArrayDeque<AbsolutePendingActivityResult>()
|
|
28323
|
+
private var pendingCancellations = 0
|
|
28324
|
+
|
|
28325
|
+
private const val preferencesName = "absolutejs.activity-result-recovery"
|
|
28326
|
+
private const val pickerRequestCodeKey = "picker-request-code"
|
|
28327
|
+
|
|
28328
|
+
@Synchronized
|
|
28329
|
+
fun registerPickerRequest(context: Context, requestCode: Int, intent: Intent) {
|
|
28330
|
+
val action = intent.action
|
|
28331
|
+
val isPicker = action == MediaStore.ACTION_IMAGE_CAPTURE ||
|
|
28332
|
+
action == MediaStore.ACTION_VIDEO_CAPTURE ||
|
|
28333
|
+
action == MediaStore.ACTION_PICK_IMAGES ||
|
|
28334
|
+
action == Intent.ACTION_PICK ||
|
|
28335
|
+
action == Intent.ACTION_GET_CONTENT ||
|
|
28336
|
+
action == Intent.ACTION_OPEN_DOCUMENT ||
|
|
28337
|
+
action?.endsWith(".PICK") == true ||
|
|
28338
|
+
intent.type?.startsWith("image/") == true ||
|
|
28339
|
+
intent.hasExtra(MediaStore.EXTRA_OUTPUT)
|
|
28340
|
+
if (!isPicker) return
|
|
28341
|
+
context.getSharedPreferences(preferencesName, Context.MODE_PRIVATE)
|
|
28342
|
+
.edit()
|
|
28343
|
+
.putInt(pickerRequestCodeKey, requestCode)
|
|
28344
|
+
.apply()
|
|
28345
|
+
}
|
|
28320
28346
|
|
|
28321
28347
|
@Synchronized
|
|
28322
|
-
fun
|
|
28348
|
+
fun consumePickerCancellation(context: Context, requestCode: Int, resultCode: Int): Boolean {
|
|
28349
|
+
val preferences = context.getSharedPreferences(preferencesName, Context.MODE_PRIVATE)
|
|
28350
|
+
val pickerRequestCode = preferences.getInt(pickerRequestCodeKey, Int.MIN_VALUE)
|
|
28351
|
+
if (pickerRequestCode != requestCode) return false
|
|
28352
|
+
preferences.edit().remove(pickerRequestCodeKey).apply()
|
|
28353
|
+
return resultCode == Activity.RESULT_CANCELED
|
|
28354
|
+
}
|
|
28355
|
+
|
|
28356
|
+
@Synchronized
|
|
28357
|
+
fun enqueueActivityResult(requestCode: Int, resultCode: Int, data: Intent?, pickerCancelled: Boolean) {
|
|
28323
28358
|
if (pendingActivityResults.size == 8) pendingActivityResults.removeFirst()
|
|
28324
28359
|
pendingActivityResults.addLast(
|
|
28325
28360
|
AbsolutePendingActivityResult(requestCode, resultCode, data?.let(::Intent))
|
|
28326
28361
|
)
|
|
28362
|
+
if (pickerCancelled && pendingCancellations < 8) {
|
|
28363
|
+
pendingCancellations += 1
|
|
28364
|
+
}
|
|
28327
28365
|
Log.d("AbsoluteJS", "Queued early Android activity result; pending=" + pendingActivityResults.size)
|
|
28328
28366
|
}
|
|
28329
28367
|
|
|
28368
|
+
@Synchronized
|
|
28369
|
+
fun takePendingCancellation(): Boolean {
|
|
28370
|
+
if (pendingCancellations == 0) return false
|
|
28371
|
+
pendingCancellations -= 1
|
|
28372
|
+
return true
|
|
28373
|
+
}
|
|
28374
|
+
|
|
28330
28375
|
@Synchronized
|
|
28331
28376
|
fun hasPendingActivityResults() = pendingActivityResults.isNotEmpty()
|
|
28332
28377
|
|
|
@@ -28347,6 +28392,10 @@ class AbsoluteActivityResultRecoveryModule : Module() {
|
|
|
28347
28392
|
AbsoluteActivityResultRecoveryState.applicationRuntimeReady = true
|
|
28348
28393
|
Log.d("AbsoluteJS", "Expo application runtime ready for Android activity results")
|
|
28349
28394
|
}
|
|
28395
|
+
|
|
28396
|
+
Function("takePendingCancellation") {
|
|
28397
|
+
AbsoluteActivityResultRecoveryState.takePendingCancellation()
|
|
28398
|
+
}
|
|
28350
28399
|
}
|
|
28351
28400
|
}
|
|
28352
28401
|
`;
|
|
@@ -28354,6 +28403,7 @@ var runtime = `${HEADER2}import { requireNativeModule } from 'expo-modules-core'
|
|
|
28354
28403
|
|
|
28355
28404
|
type AbsoluteActivityResultRecoveryNative = {
|
|
28356
28405
|
markApplicationRuntimeReady(): void;
|
|
28406
|
+
takePendingCancellation(): boolean;
|
|
28357
28407
|
};
|
|
28358
28408
|
|
|
28359
28409
|
const native = requireNativeModule<AbsoluteActivityResultRecoveryNative>(
|
|
@@ -28362,6 +28412,9 @@ const native = requireNativeModule<AbsoluteActivityResultRecoveryNative>(
|
|
|
28362
28412
|
|
|
28363
28413
|
export const markAbsoluteApplicationRuntimeReady = () =>
|
|
28364
28414
|
native.markApplicationRuntimeReady();
|
|
28415
|
+
|
|
28416
|
+
export const takeAbsoluteActivityResultCancellation = () =>
|
|
28417
|
+
native.takePendingCancellation();
|
|
28365
28418
|
`;
|
|
28366
28419
|
var absoluteExpoActivityResultRecoveryFiles = (project) => new Map([
|
|
28367
28420
|
[
|
|
@@ -28474,7 +28527,7 @@ var packageDependencies = (plan) => Object.fromEntries(plan.requiredPackages.map
|
|
|
28474
28527
|
var expoPackage = (auth, sync, devices, updates) => ({
|
|
28475
28528
|
dependencies: {
|
|
28476
28529
|
"@absolutejs/devices": "0.7.0",
|
|
28477
|
-
"@absolutejs/devices-expo": "0.0.
|
|
28530
|
+
"@absolutejs/devices-expo": "0.0.11",
|
|
28478
28531
|
...auth ? {
|
|
28479
28532
|
"@absolutejs/auth": ABSOLUTE_EXPO_AUTH_CORE_VERSION,
|
|
28480
28533
|
[ABSOLUTE_EXPO_AUTH_PACKAGE]: ABSOLUTE_EXPO_AUTH_VERSION
|
|
@@ -28720,6 +28773,7 @@ const withAbsoluteActivityResultRecovery = config => withMainActivity(config, va
|
|
|
28720
28773
|
'import android.os.Bundle',
|
|
28721
28774
|
'import android.os.Handler',
|
|
28722
28775
|
'import android.os.Looper',
|
|
28776
|
+
'import android.util.Log',
|
|
28723
28777
|
'import expo.modules.absoluteactivityresultrecovery.AbsoluteActivityResultRecoveryState'
|
|
28724
28778
|
].join('\\n'));
|
|
28725
28779
|
source = source.replace(CLASS_ANCHOR, \`\${CLASS_ANCHOR}
|
|
@@ -28741,12 +28795,19 @@ const withAbsoluteActivityResultRecovery = config => withMainActivity(config, va
|
|
|
28741
28795
|
}
|
|
28742
28796
|
}
|
|
28743
28797
|
|
|
28798
|
+
@Suppress("DEPRECATION")
|
|
28799
|
+
override fun startActivityForResult(intent: Intent, requestCode: Int, options: Bundle?) {
|
|
28800
|
+
AbsoluteActivityResultRecoveryState.registerPickerRequest(applicationContext, requestCode, intent)
|
|
28801
|
+
super.startActivityForResult(intent, requestCode, options)
|
|
28802
|
+
}
|
|
28803
|
+
|
|
28744
28804
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
|
28805
|
+
val pickerCancelled = AbsoluteActivityResultRecoveryState.consumePickerCancellation(applicationContext, requestCode, resultCode)
|
|
28745
28806
|
if (AbsoluteActivityResultRecoveryState.applicationRuntimeReady) {
|
|
28746
28807
|
super.onActivityResult(requestCode, resultCode, data)
|
|
28747
28808
|
return
|
|
28748
28809
|
}
|
|
28749
|
-
AbsoluteActivityResultRecoveryState.enqueueActivityResult(requestCode, resultCode, data)
|
|
28810
|
+
AbsoluteActivityResultRecoveryState.enqueueActivityResult(requestCode, resultCode, data, pickerCancelled)
|
|
28750
28811
|
absoluteActivityResultHandler.removeCallbacks(absoluteReplayActivityResults)
|
|
28751
28812
|
absoluteActivityResultHandler.postDelayed(absoluteReplayActivityResults, 250)
|
|
28752
28813
|
}
|
|
@@ -28762,7 +28823,9 @@ const withAbsoluteActivityResultRecovery = config => withMainActivity(config, va
|
|
|
28762
28823
|
|
|
28763
28824
|
override fun onDestroy() {
|
|
28764
28825
|
absoluteActivityResultHandler.removeCallbacks(absoluteReplayActivityResults)
|
|
28826
|
+
AbsoluteActivityResultRecoveryState.applicationRuntimeReady = false
|
|
28765
28827
|
super.onDestroy()
|
|
28828
|
+
Log.d("AbsoluteJS", "Expo activity-result recovery activity destroyed")
|
|
28766
28829
|
}
|
|
28767
28830
|
\`);
|
|
28768
28831
|
value.modResults.contents = source;
|
|
@@ -28986,6 +29049,7 @@ const absoluteExpoPushOptions = {
|
|
|
28986
29049
|
};` : "";
|
|
28987
29050
|
return `${EXPO_GENERATED_HEADER}import { installDeviceAdapter } from '@absolutejs/devices/runtime';
|
|
28988
29051
|
import { createExpoDeviceAdapter } from '@absolutejs/devices-expo';
|
|
29052
|
+
import { takeAbsoluteActivityResultCancellation } from './AbsoluteActivityResultRecovery';
|
|
28989
29053
|
${push ? "import { absoluteExpoAuth } from './AbsoluteAuth';" : ""}
|
|
28990
29054
|
${imports.join(`
|
|
28991
29055
|
`)}
|
|
@@ -28995,6 +29059,7 @@ ${pushSource}
|
|
|
28995
29059
|
export const absoluteExpoDeviceCapabilities = ${JSON.stringify(plan.capabilities)} as const;
|
|
28996
29060
|
export const absoluteExpoDevices = createExpoDeviceAdapter({
|
|
28997
29061
|
storagePrefix: ${JSON.stringify(`absolutejs.${config.appId}.`)},
|
|
29062
|
+
takeActivityResultCancellation: takeAbsoluteActivityResultCancellation,
|
|
28998
29063
|
${entries}
|
|
28999
29064
|
});
|
|
29000
29065
|
installDeviceAdapter(absoluteExpoDevices);
|
|
@@ -40931,5 +40996,5 @@ export {
|
|
|
40931
40996
|
writeAbsoluteMobileUpdateRegistry
|
|
40932
40997
|
};
|
|
40933
40998
|
|
|
40934
|
-
//# debugId=
|
|
40999
|
+
//# debugId=CC8C4D11922DDEB264756E2164756E21
|
|
40935
41000
|
//# sourceMappingURL=index.js.map
|