@absolutejs/absolute 0.20.0-beta.44 → 0.20.0-beta.46
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/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/build.js +143 -124
- package/dist/build.js.map +4 -4
- package/dist/cli/index.js +7679 -7321
- package/dist/index.js +198 -152
- package/dist/index.js.map +6 -6
- package/dist/mobile/browser.js.map +1 -1
- package/dist/mobile/index.js +541 -121
- package/dist/mobile/index.js.map +10 -10
- package/dist/mobile/remoteMacAgentEntry.js +707 -84
- package/dist/mobile/shellExpoAuth.js +20 -41
- package/dist/mobile/shellExpoDevices.js +20 -41
- package/dist/mobile/shellExpoSync.js +104 -0
- package/dist/src/mobile/devDeviceAdapter.d.ts +1 -1
- package/dist/src/mobile/deviceCapabilities.d.ts +4 -2
- package/dist/src/mobile/expoBridge.d.ts +12 -12
- package/dist/src/mobile/nativeAuth.d.ts +3 -0
- package/dist/src/mobile/shellExpoDevices.d.ts +2 -2
- package/dist/src/mobile/shellExpoSync.d.ts +18 -0
- package/package.json +4 -2
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
// src/mobile/shellExpoDevices.ts
|
|
2
|
-
import {
|
|
3
|
-
import { installDeviceAdapter } from "@absolutejs/devices/runtime";
|
|
2
|
+
import { installExpoWebViewDeviceAdapter } from "@absolutejs/devices-expo/bridge";
|
|
4
3
|
var bridge = () => {
|
|
5
4
|
const value = Reflect.get(globalThis, "__absoluteExpoBridge");
|
|
6
5
|
if (typeof value !== "object" || value === null || typeof Reflect.get(value, "request") !== "function") {
|
|
7
6
|
return;
|
|
8
7
|
}
|
|
9
8
|
return {
|
|
9
|
+
on: (event, listener) => {
|
|
10
|
+
const on = Reflect.get(value, "on");
|
|
11
|
+
if (typeof on !== "function")
|
|
12
|
+
return () => {
|
|
13
|
+
return;
|
|
14
|
+
};
|
|
15
|
+
const subscription = Reflect.apply(on, value, [
|
|
16
|
+
event,
|
|
17
|
+
listener
|
|
18
|
+
]);
|
|
19
|
+
if (typeof subscription !== "function")
|
|
20
|
+
return () => {
|
|
21
|
+
return;
|
|
22
|
+
};
|
|
23
|
+
return async () => {
|
|
24
|
+
await Reflect.apply(subscription, undefined, []);
|
|
25
|
+
};
|
|
26
|
+
},
|
|
10
27
|
request: (method, params) => Promise.resolve(Reflect.apply(Reflect.get(value, "request"), value, [
|
|
11
28
|
method,
|
|
12
29
|
params
|
|
@@ -53,45 +70,7 @@ var createAbsoluteExpoBridgeFetch = () => async (input, init) => {
|
|
|
53
70
|
status: result.status
|
|
54
71
|
});
|
|
55
72
|
};
|
|
56
|
-
var installAbsoluteExpoWebDeviceAdapter = () =>
|
|
57
|
-
const web = createWebDeviceAdapter();
|
|
58
|
-
return installDeviceAdapter({
|
|
59
|
-
...web,
|
|
60
|
-
haptics: {
|
|
61
|
-
capability: async () => bridge() ? {
|
|
62
|
-
available: true,
|
|
63
|
-
fidelity: "native",
|
|
64
|
-
native: true
|
|
65
|
-
} : {
|
|
66
|
-
available: false,
|
|
67
|
-
message: "The Expo WebView bridge is unavailable.",
|
|
68
|
-
reason: "unavailable"
|
|
69
|
-
},
|
|
70
|
-
impact: async (style) => {
|
|
71
|
-
await requireBridge().request("devices.haptics.impact", {
|
|
72
|
-
style
|
|
73
|
-
});
|
|
74
|
-
},
|
|
75
|
-
notification: async (style) => {
|
|
76
|
-
await requireBridge().request("devices.haptics.impact", {
|
|
77
|
-
style
|
|
78
|
-
});
|
|
79
|
-
},
|
|
80
|
-
selectionChanged: async () => {
|
|
81
|
-
await requireBridge().request("devices.haptics.impact", {
|
|
82
|
-
style: "selection"
|
|
83
|
-
});
|
|
84
|
-
},
|
|
85
|
-
vibrate: async (durationMs) => {
|
|
86
|
-
await requireBridge().request("devices.haptics.impact", {
|
|
87
|
-
durationMs,
|
|
88
|
-
style: "vibrate"
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
runtime: "expo"
|
|
93
|
-
});
|
|
94
|
-
};
|
|
73
|
+
var installAbsoluteExpoWebDeviceAdapter = (capabilities = []) => installExpoWebViewDeviceAdapter(requireBridge(), capabilities);
|
|
95
74
|
|
|
96
75
|
// src/mobile/shellExpoAuth.ts
|
|
97
76
|
import {
|
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
// src/mobile/shellExpoDevices.ts
|
|
2
|
-
import {
|
|
3
|
-
import { installDeviceAdapter } from "@absolutejs/devices/runtime";
|
|
2
|
+
import { installExpoWebViewDeviceAdapter } from "@absolutejs/devices-expo/bridge";
|
|
4
3
|
var bridge = () => {
|
|
5
4
|
const value = Reflect.get(globalThis, "__absoluteExpoBridge");
|
|
6
5
|
if (typeof value !== "object" || value === null || typeof Reflect.get(value, "request") !== "function") {
|
|
7
6
|
return;
|
|
8
7
|
}
|
|
9
8
|
return {
|
|
9
|
+
on: (event, listener) => {
|
|
10
|
+
const on = Reflect.get(value, "on");
|
|
11
|
+
if (typeof on !== "function")
|
|
12
|
+
return () => {
|
|
13
|
+
return;
|
|
14
|
+
};
|
|
15
|
+
const subscription = Reflect.apply(on, value, [
|
|
16
|
+
event,
|
|
17
|
+
listener
|
|
18
|
+
]);
|
|
19
|
+
if (typeof subscription !== "function")
|
|
20
|
+
return () => {
|
|
21
|
+
return;
|
|
22
|
+
};
|
|
23
|
+
return async () => {
|
|
24
|
+
await Reflect.apply(subscription, undefined, []);
|
|
25
|
+
};
|
|
26
|
+
},
|
|
10
27
|
request: (method, params) => Promise.resolve(Reflect.apply(Reflect.get(value, "request"), value, [
|
|
11
28
|
method,
|
|
12
29
|
params
|
|
@@ -53,45 +70,7 @@ var createAbsoluteExpoBridgeFetch = () => async (input, init) => {
|
|
|
53
70
|
status: result.status
|
|
54
71
|
});
|
|
55
72
|
};
|
|
56
|
-
var installAbsoluteExpoWebDeviceAdapter = () =>
|
|
57
|
-
const web = createWebDeviceAdapter();
|
|
58
|
-
return installDeviceAdapter({
|
|
59
|
-
...web,
|
|
60
|
-
haptics: {
|
|
61
|
-
capability: async () => bridge() ? {
|
|
62
|
-
available: true,
|
|
63
|
-
fidelity: "native",
|
|
64
|
-
native: true
|
|
65
|
-
} : {
|
|
66
|
-
available: false,
|
|
67
|
-
message: "The Expo WebView bridge is unavailable.",
|
|
68
|
-
reason: "unavailable"
|
|
69
|
-
},
|
|
70
|
-
impact: async (style) => {
|
|
71
|
-
await requireBridge().request("devices.haptics.impact", {
|
|
72
|
-
style
|
|
73
|
-
});
|
|
74
|
-
},
|
|
75
|
-
notification: async (style) => {
|
|
76
|
-
await requireBridge().request("devices.haptics.impact", {
|
|
77
|
-
style
|
|
78
|
-
});
|
|
79
|
-
},
|
|
80
|
-
selectionChanged: async () => {
|
|
81
|
-
await requireBridge().request("devices.haptics.impact", {
|
|
82
|
-
style: "selection"
|
|
83
|
-
});
|
|
84
|
-
},
|
|
85
|
-
vibrate: async (durationMs) => {
|
|
86
|
-
await requireBridge().request("devices.haptics.impact", {
|
|
87
|
-
durationMs,
|
|
88
|
-
style: "vibrate"
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
runtime: "expo"
|
|
93
|
-
});
|
|
94
|
-
};
|
|
73
|
+
var installAbsoluteExpoWebDeviceAdapter = (capabilities = []) => installExpoWebViewDeviceAdapter(requireBridge(), capabilities);
|
|
95
74
|
export {
|
|
96
75
|
createAbsoluteExpoBridgeFetch,
|
|
97
76
|
installAbsoluteExpoWebDeviceAdapter
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// src/mobile/shellExpoSync.ts
|
|
2
|
+
import {
|
|
3
|
+
createExpoSyncBridgeLocalStore,
|
|
4
|
+
createExpoSyncBridgeWebSocket
|
|
5
|
+
} from "@absolutejs/sync-expo/client";
|
|
6
|
+
import { installSyncClientRuntimeTransport } from "@absolutejs/sync/client/runtime";
|
|
7
|
+
|
|
8
|
+
// src/mobile/syncRemediation.ts
|
|
9
|
+
import {
|
|
10
|
+
discardSyncRuntimeDeadLetter,
|
|
11
|
+
inspectSyncRuntime,
|
|
12
|
+
rebaseSyncRuntimeDeadLetter,
|
|
13
|
+
retrySyncRuntimeDeadLetter
|
|
14
|
+
} from "@absolutejs/sync/client/runtime";
|
|
15
|
+
var REMEDIATION_REGISTRY = Symbol.for("@absolutejs/mobile-sync-remediation");
|
|
16
|
+
var isRegistry = (value) => typeof value === "object" && value !== null && Array.isArray(Reflect.get(value, "installations"));
|
|
17
|
+
var resolveRegistry = () => {
|
|
18
|
+
const existing = Reflect.get(globalThis, REMEDIATION_REGISTRY);
|
|
19
|
+
if (isRegistry(existing))
|
|
20
|
+
return existing;
|
|
21
|
+
const created = { installations: [] };
|
|
22
|
+
Object.defineProperty(globalThis, REMEDIATION_REGISTRY, {
|
|
23
|
+
configurable: false,
|
|
24
|
+
enumerable: false,
|
|
25
|
+
value: created,
|
|
26
|
+
writable: false
|
|
27
|
+
});
|
|
28
|
+
return created;
|
|
29
|
+
};
|
|
30
|
+
var registry = resolveRegistry();
|
|
31
|
+
var installAbsoluteMobileSyncRemediation = (bridge = {
|
|
32
|
+
discard: discardSyncRuntimeDeadLetter,
|
|
33
|
+
inspect: inspectSyncRuntime,
|
|
34
|
+
rebase: rebaseSyncRuntimeDeadLetter,
|
|
35
|
+
retry: retrySyncRuntimeDeadLetter
|
|
36
|
+
}) => {
|
|
37
|
+
const installation = { bridge };
|
|
38
|
+
registry.installations.push(installation);
|
|
39
|
+
return () => {
|
|
40
|
+
const index = registry.installations.indexOf(installation);
|
|
41
|
+
if (index >= 0)
|
|
42
|
+
registry.installations.splice(index, 1);
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// src/mobile/shellExpoSync.ts
|
|
47
|
+
var requireBridge = () => {
|
|
48
|
+
const value = Reflect.get(globalThis, "__absoluteExpoBridge");
|
|
49
|
+
if (typeof value !== "object" || value === null || typeof Reflect.get(value, "request") !== "function" || typeof Reflect.get(value, "on") !== "function")
|
|
50
|
+
throw new TypeError("The Expo Sync bridge is unavailable.");
|
|
51
|
+
return {
|
|
52
|
+
on: (event, listener) => Reflect.apply(Reflect.get(value, "on"), value, [event, listener]),
|
|
53
|
+
request: (method, params) => Promise.resolve(Reflect.apply(Reflect.get(value, "request"), value, [
|
|
54
|
+
method,
|
|
55
|
+
params
|
|
56
|
+
]))
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
var reportShellStatus = (status) => globalThis.dispatchEvent(new CustomEvent("absolute:sync-status", { detail: status }));
|
|
60
|
+
var installAbsoluteExpoShellSync = (auth, config, options = {}) => {
|
|
61
|
+
const provider = options.provider ?? requireBridge();
|
|
62
|
+
const namespace = auth.principal?.namespace;
|
|
63
|
+
const store = namespace && config ? createExpoSyncBridgeLocalStore({
|
|
64
|
+
provider,
|
|
65
|
+
storageSchema: config.storageSchema
|
|
66
|
+
}) : undefined;
|
|
67
|
+
const WebSocketImpl = createExpoSyncBridgeWebSocket(provider);
|
|
68
|
+
const reportStatus = options.reportStatus ?? reportShellStatus;
|
|
69
|
+
const removeTransport = installSyncClientRuntimeTransport({
|
|
70
|
+
...namespace && store ? { durable: { namespace, store } } : {},
|
|
71
|
+
webSocketImpl: WebSocketImpl,
|
|
72
|
+
registerClient: (client) => {
|
|
73
|
+
const removeStatus = client.subscribeStatus(reportStatus);
|
|
74
|
+
const removeWake = provider.on("sync.wake", () => {
|
|
75
|
+
client.reconnect();
|
|
76
|
+
client.flush({ timeoutMs: 1e4 }).catch(() => {
|
|
77
|
+
return;
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
return () => {
|
|
81
|
+
removeStatus();
|
|
82
|
+
removeWake();
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
const removeRemediation = installAbsoluteMobileSyncRemediation();
|
|
87
|
+
const reload = options.reload ?? (() => globalThis.location.reload());
|
|
88
|
+
const removePrincipalListener = auth.onPrincipalChange((principal) => {
|
|
89
|
+
if (principal?.namespace !== namespace)
|
|
90
|
+
reload();
|
|
91
|
+
});
|
|
92
|
+
let active = true;
|
|
93
|
+
return () => {
|
|
94
|
+
if (!active)
|
|
95
|
+
return;
|
|
96
|
+
active = false;
|
|
97
|
+
removePrincipalListener();
|
|
98
|
+
removeRemediation();
|
|
99
|
+
removeTransport();
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
export {
|
|
103
|
+
installAbsoluteExpoShellSync
|
|
104
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { MobileConfig } from '../../types/build';
|
|
2
|
-
export declare const absoluteNativeDevAdapterSource: (projectRoot: string, mobile: MobileConfig, resolveModule?: (specifier: string) => string, expoAdapterModule?: string, expoAuthModule?: string) => string;
|
|
2
|
+
export declare const absoluteNativeDevAdapterSource: (projectRoot: string, mobile: MobileConfig, resolveModule?: (specifier: string) => string, expoAdapterModule?: string, expoAuthModule?: string, expoSyncModule?: string) => string;
|
|
3
3
|
export declare const buildAbsoluteNativeDevAdapter: (projectRoot: string, mobile: MobileConfig) => Promise<string>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export type AbsoluteDeviceCapabilityProvider = {
|
|
2
2
|
factory: string;
|
|
3
3
|
module: string;
|
|
4
|
+
plugins?: string[];
|
|
4
5
|
native?: {
|
|
5
6
|
android?: {
|
|
6
7
|
permissions: string[];
|
|
@@ -21,6 +22,7 @@ export type AbsoluteDeviceCapabilityPlan = {
|
|
|
21
22
|
providers: Record<string, AbsoluteDeviceCapabilityProvider>;
|
|
22
23
|
requiredPackages: string[];
|
|
23
24
|
};
|
|
25
|
+
export type AbsoluteDeviceProvider = 'capacitor' | 'expo';
|
|
24
26
|
export declare const absoluteDeviceNativeRequirements: (plan: AbsoluteDeviceCapabilityPlan) => {
|
|
25
27
|
androidPermissions: string[];
|
|
26
28
|
iosPrivacyAccessedApis: {
|
|
@@ -31,7 +33,7 @@ export declare const absoluteDeviceNativeRequirements: (plan: AbsoluteDeviceCapa
|
|
|
31
33
|
iosSystemBars: boolean;
|
|
32
34
|
iosUsageDescriptions: AbsoluteIosUsageDescription[];
|
|
33
35
|
};
|
|
34
|
-
export declare const loadAbsoluteDeviceCapabilityProviders: (projectRoot: string) => {
|
|
36
|
+
export declare const loadAbsoluteDeviceCapabilityProviders: (projectRoot: string, provider?: AbsoluteDeviceProvider) => {
|
|
35
37
|
[k: string]: AbsoluteDeviceCapabilityProvider;
|
|
36
38
|
};
|
|
37
39
|
export declare const assertAbsoluteDeviceCapabilityPackages: (projectRoot: string, plan: AbsoluteDeviceCapabilityPlan) => void;
|
|
@@ -43,4 +45,4 @@ export declare const missingAbsoluteDeviceCapabilityPackages: (plan: AbsoluteDev
|
|
|
43
45
|
/** Framework-agnostic capability discovery used by web/PWA builds. This does
|
|
44
46
|
* not load a native provider manifest, so Web Push never requires Capacitor. */
|
|
45
47
|
export declare const projectImportsAbsoluteDeviceCapability: (projectRoot: string, capability: string) => boolean;
|
|
46
|
-
export declare const resolveAbsoluteDeviceCapabilityPlan: (projectRoot: string) => AbsoluteDeviceCapabilityPlan;
|
|
48
|
+
export declare const resolveAbsoluteDeviceCapabilityPlan: (projectRoot: string, provider?: AbsoluteDeviceProvider) => AbsoluteDeviceCapabilityPlan;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const ABSOLUTE_EXPO_BRIDGE_FORMAT:
|
|
1
|
+
export declare const ABSOLUTE_EXPO_BRIDGE_FORMAT: 3;
|
|
2
2
|
export declare const ABSOLUTE_EXPO_BRIDGE_MAX_BYTES: number;
|
|
3
|
-
export declare const ABSOLUTE_EXPO_BRIDGE_METHODS: readonly ["devices.haptics.impact", "http.fetch", "auth.signIn", "auth.signOut", "auth.status"];
|
|
3
|
+
export declare const ABSOLUTE_EXPO_BRIDGE_METHODS: readonly ["devices.platform.getInfo", "devices.lifecycle.getState", "devices.links.getLaunchUrl", "devices.links.openExternal", "devices.network.getStatus", "devices.storage.clear", "devices.storage.get", "devices.storage.keys", "devices.storage.remove", "devices.storage.set", "devices.back.capability", "devices.clipboard.capability", "devices.clipboard.readText", "devices.clipboard.writeText", "devices.share.capability", "devices.share.share", "devices.haptics.capability", "devices.haptics.impact", "devices.haptics.notification", "devices.haptics.selectionChanged", "devices.haptics.vibrate", "devices.keyboard.capability", "devices.keyboard.dismiss", "devices.keyboard.getState", "devices.systemBars.capability", "devices.systemBars.setAppearance", "devices.systemBars.setVisible", "devices.camera.capability", "devices.camera.queryPermission", "devices.camera.requestPermission", "devices.camera.takePhoto", "devices.photos.capability", "devices.photos.pick", "devices.location.capability", "devices.location.current", "devices.location.queryPermission", "devices.location.requestPermission", "devices.location.watch.start", "devices.location.watch.stop", "devices.localNotifications.capability", "devices.localNotifications.queryPermission", "devices.localNotifications.requestPermission", "devices.localNotifications.schedule", "devices.localNotifications.pending", "devices.localNotifications.cancel", "devices.pushNotifications.capability", "devices.pushNotifications.queryPermission", "devices.pushNotifications.requestPermission", "devices.pushNotifications.enable", "devices.pushNotifications.disable", "devices.documents.capability", "devices.documents.pick", "devices.transfer.read", "devices.transfer.close", "devices.upload.begin", "devices.upload.write", "devices.documents.export", "devices.documents.open", "http.fetch", "auth.signIn", "auth.signOut", "auth.status", "sync.store.begin", "sync.store.deleteNamespace", "sync.store.end", "sync.store.schema", "sync.tx.deleteCollection", "sync.tx.deleteMutation", "sync.tx.getCollection", "sync.tx.getInstallationId", "sync.tx.getMutation", "sync.tx.listCollections", "sync.tx.listMutations", "sync.tx.putCollection", "sync.tx.putMutation", "sync.tx.setInstallationId", "sync.socket.close", "sync.socket.open", "sync.socket.sendChunk"];
|
|
4
4
|
export type AbsoluteExpoBridgeMethod = (typeof ABSOLUTE_EXPO_BRIDGE_METHODS)[number];
|
|
5
5
|
export type AbsoluteExpoBridgeRequest = {
|
|
6
6
|
format: typeof ABSOLUTE_EXPO_BRIDGE_FORMAT;
|
|
@@ -23,7 +23,7 @@ export type AbsoluteExpoBridgeResponse = {
|
|
|
23
23
|
export type AbsoluteExpoBridgeEvent = {
|
|
24
24
|
format: typeof ABSOLUTE_EXPO_BRIDGE_FORMAT;
|
|
25
25
|
kind: 'event';
|
|
26
|
-
event: 'ready' | 'navigation' | 'auth.principal';
|
|
26
|
+
event: 'ready' | 'navigation' | 'auth.principal' | 'sync.socket' | 'sync.wake';
|
|
27
27
|
path: string;
|
|
28
28
|
payload?: Record<string, unknown>;
|
|
29
29
|
};
|
|
@@ -33,12 +33,12 @@ export declare const createAbsoluteExpoBridgeError: (id: string, code: string, m
|
|
|
33
33
|
code: string;
|
|
34
34
|
message: string;
|
|
35
35
|
};
|
|
36
|
-
format:
|
|
36
|
+
format: 3;
|
|
37
37
|
id: string;
|
|
38
38
|
kind: "response";
|
|
39
39
|
result?: undefined;
|
|
40
40
|
} | {
|
|
41
|
-
format:
|
|
41
|
+
format: 3;
|
|
42
42
|
id: string;
|
|
43
43
|
kind: "response";
|
|
44
44
|
result: unknown;
|
|
@@ -49,22 +49,22 @@ export declare const createAbsoluteExpoBridgeResponse: (id: string, result: unkn
|
|
|
49
49
|
code: string;
|
|
50
50
|
message: string;
|
|
51
51
|
};
|
|
52
|
-
format:
|
|
52
|
+
format: 3;
|
|
53
53
|
id: string;
|
|
54
54
|
kind: "response";
|
|
55
55
|
result?: undefined;
|
|
56
56
|
} | {
|
|
57
|
-
format:
|
|
57
|
+
format: 3;
|
|
58
58
|
id: string;
|
|
59
59
|
kind: "response";
|
|
60
60
|
result: unknown;
|
|
61
61
|
error?: undefined;
|
|
62
62
|
};
|
|
63
63
|
export declare const parseAbsoluteExpoBridgeMessage: (source: string) => {
|
|
64
|
-
format:
|
|
64
|
+
format: 3;
|
|
65
65
|
id: string;
|
|
66
66
|
kind: "request";
|
|
67
|
-
method: "devices.haptics.impact" | "http.fetch" | "auth.signIn" | "auth.signOut" | "auth.status";
|
|
67
|
+
method: "devices.platform.getInfo" | "devices.lifecycle.getState" | "devices.links.getLaunchUrl" | "devices.links.openExternal" | "devices.network.getStatus" | "devices.storage.clear" | "devices.storage.get" | "devices.storage.keys" | "devices.storage.remove" | "devices.storage.set" | "devices.back.capability" | "devices.clipboard.capability" | "devices.clipboard.readText" | "devices.clipboard.writeText" | "devices.share.capability" | "devices.share.share" | "devices.haptics.capability" | "devices.haptics.impact" | "devices.haptics.notification" | "devices.haptics.selectionChanged" | "devices.haptics.vibrate" | "devices.keyboard.capability" | "devices.keyboard.dismiss" | "devices.keyboard.getState" | "devices.systemBars.capability" | "devices.systemBars.setAppearance" | "devices.systemBars.setVisible" | "devices.camera.capability" | "devices.camera.queryPermission" | "devices.camera.requestPermission" | "devices.camera.takePhoto" | "devices.photos.capability" | "devices.photos.pick" | "devices.location.capability" | "devices.location.current" | "devices.location.queryPermission" | "devices.location.requestPermission" | "devices.location.watch.start" | "devices.location.watch.stop" | "devices.localNotifications.capability" | "devices.localNotifications.queryPermission" | "devices.localNotifications.requestPermission" | "devices.localNotifications.schedule" | "devices.localNotifications.pending" | "devices.localNotifications.cancel" | "devices.pushNotifications.capability" | "devices.pushNotifications.queryPermission" | "devices.pushNotifications.requestPermission" | "devices.pushNotifications.enable" | "devices.pushNotifications.disable" | "devices.documents.capability" | "devices.documents.pick" | "devices.transfer.read" | "devices.transfer.close" | "devices.upload.begin" | "devices.upload.write" | "devices.documents.export" | "devices.documents.open" | "http.fetch" | "auth.signIn" | "auth.signOut" | "auth.status" | "sync.store.begin" | "sync.store.deleteNamespace" | "sync.store.end" | "sync.store.schema" | "sync.tx.deleteCollection" | "sync.tx.deleteMutation" | "sync.tx.getCollection" | "sync.tx.getInstallationId" | "sync.tx.getMutation" | "sync.tx.listCollections" | "sync.tx.listMutations" | "sync.tx.putCollection" | "sync.tx.putMutation" | "sync.tx.setInstallationId" | "sync.socket.close" | "sync.socket.open" | "sync.socket.sendChunk";
|
|
68
68
|
params: Record<string, unknown>;
|
|
69
69
|
path: string;
|
|
70
70
|
} | {
|
|
@@ -72,12 +72,12 @@ export declare const parseAbsoluteExpoBridgeMessage: (source: string) => {
|
|
|
72
72
|
code: string;
|
|
73
73
|
message: string;
|
|
74
74
|
};
|
|
75
|
-
format:
|
|
75
|
+
format: 3;
|
|
76
76
|
id: string;
|
|
77
77
|
kind: "response";
|
|
78
78
|
result?: undefined;
|
|
79
79
|
} | {
|
|
80
|
-
format:
|
|
80
|
+
format: 3;
|
|
81
81
|
id: string;
|
|
82
82
|
kind: "response";
|
|
83
83
|
result: unknown;
|
|
@@ -85,7 +85,7 @@ export declare const parseAbsoluteExpoBridgeMessage: (source: string) => {
|
|
|
85
85
|
} | {
|
|
86
86
|
payload?: Record<string, unknown> | undefined;
|
|
87
87
|
event: string;
|
|
88
|
-
format:
|
|
88
|
+
format: 3;
|
|
89
89
|
kind: "event";
|
|
90
90
|
path: string;
|
|
91
91
|
};
|
|
@@ -3,6 +3,9 @@ export declare const ABSOLUTE_AUTH_PACKAGE: "@absolutejs/auth";
|
|
|
3
3
|
export declare const ABSOLUTE_EXPO_AUTH_CORE_VERSION: "0.75.6";
|
|
4
4
|
export declare const ABSOLUTE_EXPO_AUTH_PACKAGE: "@absolutejs/auth-expo";
|
|
5
5
|
export declare const ABSOLUTE_EXPO_AUTH_VERSION: "0.0.2";
|
|
6
|
+
export declare const ABSOLUTE_EXPO_SYNC_CORE_VERSION: "2.31.0";
|
|
7
|
+
export declare const ABSOLUTE_EXPO_SYNC_PACKAGE: "@absolutejs/sync-expo";
|
|
8
|
+
export declare const ABSOLUTE_EXPO_SYNC_VERSION: "0.0.2";
|
|
6
9
|
export declare const ABSOLUTE_NATIVE_AUTH_CLIENTS_ENV: "ABSOLUTE_AUTH_NATIVE_CLIENTS";
|
|
7
10
|
export declare const ABSOLUTE_NATIVE_AUTH_SCOPES: readonly ["openid", "profile"];
|
|
8
11
|
export declare const ABSOLUTE_SYNC_PACKAGE: "@absolutejs/sync";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/** Installs only capabilities implemented by the versioned Expo WebView bridge. */
|
|
2
1
|
export declare const createAbsoluteExpoBridgeFetch: () => (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
3
|
-
|
|
2
|
+
/** Installs the provider-neutral adapter backed by the generated native host. */
|
|
3
|
+
export declare const installAbsoluteExpoWebDeviceAdapter: (capabilities?: readonly string[]) => () => void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type AbsoluteExpoSyncBridgeProvider } from '@absolutejs/sync-expo/client';
|
|
2
|
+
import type { SyncClientStatus } from '@absolutejs/sync/client';
|
|
3
|
+
import type { AbsoluteMobileShellAuthRuntime } from './shellBootstrap';
|
|
4
|
+
import type { AbsoluteMobileClientManifest } from './transport';
|
|
5
|
+
type ExpoBridge = AbsoluteExpoSyncBridgeProvider & {
|
|
6
|
+
on(event: 'sync.socket' | 'sync.wake', listener: (payload: Record<string, unknown>) => void): () => void;
|
|
7
|
+
};
|
|
8
|
+
export type AbsoluteExpoShellSyncOptions = {
|
|
9
|
+
provider?: ExpoBridge;
|
|
10
|
+
reload?: () => void;
|
|
11
|
+
reportStatus?: (status: SyncClientStatus) => void;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Gives unchanged WebView page clients native-owned SQLite and sockets. Auth
|
|
15
|
+
* namespaces and socket tickets never cross into page-controlled JavaScript.
|
|
16
|
+
*/
|
|
17
|
+
export declare const installAbsoluteExpoShellSync: (auth: AbsoluteMobileShellAuthRuntime, config?: NonNullable<AbsoluteMobileClientManifest["sync"]>, options?: AbsoluteExpoShellSyncOptions) => () => void;
|
|
18
|
+
export {};
|
package/package.json
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"@absolutejs/auth": "0.75.0",
|
|
11
11
|
"@absolutejs/devices": "0.7.0",
|
|
12
12
|
"@absolutejs/devices-capacitor": "0.8.0",
|
|
13
|
+
"@absolutejs/devices-expo": "0.0.2",
|
|
13
14
|
"@absolutejs/http": "0.0.1",
|
|
14
15
|
"@absolutejs/pwa": "0.14.0",
|
|
15
16
|
"@capacitor/browser": "8.0.4",
|
|
@@ -29,8 +30,9 @@
|
|
|
29
30
|
"@absolutejs/dispatch": "0.9.0",
|
|
30
31
|
"@absolutejs/manifest": "0.9.0",
|
|
31
32
|
"@absolutejs/scoped-state": "0.2.2",
|
|
32
|
-
"@absolutejs/sync": "2.
|
|
33
|
+
"@absolutejs/sync": "2.31.0",
|
|
33
34
|
"@absolutejs/sync-capacitor": "0.9.2",
|
|
35
|
+
"@absolutejs/sync-expo": "0.0.2",
|
|
34
36
|
"@angular/animations": "21.2.6",
|
|
35
37
|
"@angular/cdk": "21.2.6",
|
|
36
38
|
"@angular/common": "21.2.6",
|
|
@@ -506,7 +508,7 @@
|
|
|
506
508
|
]
|
|
507
509
|
}
|
|
508
510
|
},
|
|
509
|
-
"version": "0.20.0-beta.
|
|
511
|
+
"version": "0.20.0-beta.46",
|
|
510
512
|
"workspaces": [
|
|
511
513
|
"tests/fixtures/*",
|
|
512
514
|
"tests/fixtures/_packages/*"
|