@ateam-ai-mobile/expo 0.1.4 → 0.1.7

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.
Files changed (158) hide show
  1. package/android/build.gradle +16 -0
  2. package/android/src/main/java/expo/modules/adavision/AdaVisionModule.kt +75 -0
  3. package/dist/attachmentCache-DhQTqi2E.d.mts +18 -0
  4. package/dist/attachmentCache-DhQTqi2E.d.ts +18 -0
  5. package/dist/bootstrap.d.mts +95 -0
  6. package/dist/bootstrap.d.ts +95 -0
  7. package/dist/bootstrap.js +2473 -0
  8. package/dist/bootstrap.js.map +1 -0
  9. package/dist/bootstrap.mjs +64 -0
  10. package/dist/bootstrap.mjs.map +1 -0
  11. package/dist/chunk-4BMWVN25.mjs +91 -0
  12. package/dist/chunk-4BMWVN25.mjs.map +1 -0
  13. package/dist/chunk-4XYXJYN5.mjs +1513 -0
  14. package/dist/chunk-4XYXJYN5.mjs.map +1 -0
  15. package/dist/chunk-5HM6UA2K.mjs +571 -0
  16. package/dist/chunk-5HM6UA2K.mjs.map +1 -0
  17. package/dist/chunk-6LXF3JVX.mjs +96 -0
  18. package/dist/chunk-6LXF3JVX.mjs.map +1 -0
  19. package/dist/chunk-FF6ZZZXH.mjs +71 -0
  20. package/dist/chunk-FF6ZZZXH.mjs.map +1 -0
  21. package/dist/chunk-KOXF2FZM.mjs +92 -0
  22. package/dist/chunk-KOXF2FZM.mjs.map +1 -0
  23. package/dist/chunk-L4V7OCJ3.mjs +71 -0
  24. package/dist/chunk-L4V7OCJ3.mjs.map +1 -0
  25. package/dist/chunk-TZXWVYYR.mjs +67 -0
  26. package/dist/chunk-TZXWVYYR.mjs.map +1 -0
  27. package/dist/chunk-VQJPSLHP.mjs +1801 -0
  28. package/dist/chunk-VQJPSLHP.mjs.map +1 -0
  29. package/dist/chunk-WMJKH4XE.mjs +34 -0
  30. package/dist/chunk-WMJKH4XE.mjs.map +1 -0
  31. package/dist/chunk-XQSY6MHP.mjs +213 -0
  32. package/dist/chunk-XQSY6MHP.mjs.map +1 -0
  33. package/dist/createBridge.mjs +2 -0
  34. package/dist/createBridge.mjs.map +1 -1
  35. package/dist/device/createDeviceProvider.d.mts +23 -0
  36. package/dist/device/createDeviceProvider.d.ts +23 -0
  37. package/dist/device/createDeviceProvider.js +967 -0
  38. package/dist/device/createDeviceProvider.js.map +1 -0
  39. package/dist/device/createDeviceProvider.mjs +17 -0
  40. package/dist/device/createDeviceProvider.mjs.map +1 -0
  41. package/dist/device-bridge/collectors/appEngagement.d.mts +10 -0
  42. package/dist/device-bridge/collectors/appEngagement.d.ts +10 -0
  43. package/dist/device-bridge/collectors/appEngagement.js +128 -0
  44. package/dist/device-bridge/collectors/appEngagement.js.map +1 -0
  45. package/dist/device-bridge/collectors/appEngagement.mjs +12 -0
  46. package/dist/device-bridge/collectors/appEngagement.mjs.map +1 -0
  47. package/dist/device-bridge/collectors/health.d.mts +24 -0
  48. package/dist/device-bridge/collectors/health.d.ts +24 -0
  49. package/dist/device-bridge/collectors/health.js +238 -0
  50. package/dist/device-bridge/collectors/health.js.map +1 -0
  51. package/dist/device-bridge/collectors/health.mjs +18 -0
  52. package/dist/device-bridge/collectors/health.mjs.map +1 -0
  53. package/dist/device-bridge/cookies.d.mts +49 -0
  54. package/dist/device-bridge/cookies.d.ts +49 -0
  55. package/dist/device-bridge/cookies.js +90 -0
  56. package/dist/device-bridge/cookies.js.map +1 -0
  57. package/dist/device-bridge/cookies.mjs +14 -0
  58. package/dist/device-bridge/cookies.mjs.map +1 -0
  59. package/dist/device-bridge/index.d.mts +483 -0
  60. package/dist/device-bridge/index.d.ts +483 -0
  61. package/dist/device-bridge/index.js +2084 -0
  62. package/dist/device-bridge/index.js.map +1 -0
  63. package/dist/device-bridge/index.mjs +32 -0
  64. package/dist/device-bridge/index.mjs.map +1 -0
  65. package/dist/device-bridge/nfc.d.mts +30 -0
  66. package/dist/device-bridge/nfc.d.ts +30 -0
  67. package/dist/device-bridge/nfc.js +109 -0
  68. package/dist/device-bridge/nfc.js.map +1 -0
  69. package/dist/device-bridge/nfc.mjs +14 -0
  70. package/dist/device-bridge/nfc.mjs.map +1 -0
  71. package/dist/index.d.mts +493 -18
  72. package/dist/index.d.ts +493 -18
  73. package/dist/index.js +1409 -6
  74. package/dist/index.js.map +1 -1
  75. package/dist/index.mjs +23 -194
  76. package/dist/index.mjs.map +1 -1
  77. package/dist/oauth/expoOAuth.d.mts +18 -0
  78. package/dist/oauth/expoOAuth.d.ts +18 -0
  79. package/dist/oauth/expoOAuth.js +102 -0
  80. package/dist/oauth/expoOAuth.js.map +1 -0
  81. package/dist/oauth/expoOAuth.mjs +8 -0
  82. package/dist/oauth/expoOAuth.mjs.map +1 -0
  83. package/dist/types-BRanJYTn.d.mts +138 -0
  84. package/dist/types-BRanJYTn.d.ts +138 -0
  85. package/dist/vision/index.d.mts +81 -0
  86. package/dist/vision/index.d.ts +81 -0
  87. package/dist/vision/index.js +101 -0
  88. package/dist/vision/index.js.map +1 -0
  89. package/dist/vision/index.mjs +28 -0
  90. package/dist/vision/index.mjs.map +1 -0
  91. package/expo-module.config.json +9 -0
  92. package/ios/AdaVision.podspec +28 -0
  93. package/ios/AdaVisionModule.swift +432 -0
  94. package/ios/Resources/yolov8n-oiv7.mlmodelc/analytics/coremldata.bin +0 -0
  95. package/ios/Resources/yolov8n-oiv7.mlmodelc/coremldata.bin +0 -0
  96. package/ios/Resources/yolov8n-oiv7.mlmodelc/metadata.json +773 -0
  97. package/ios/Resources/yolov8n-oiv7.mlmodelc/model0/analytics/coremldata.bin +0 -0
  98. package/ios/Resources/yolov8n-oiv7.mlmodelc/model0/coremldata.bin +0 -0
  99. package/ios/Resources/yolov8n-oiv7.mlmodelc/model0/model.mil +720 -0
  100. package/ios/Resources/yolov8n-oiv7.mlmodelc/model0/weights/weight.bin +0 -0
  101. package/ios/Resources/yolov8n-oiv7.mlmodelc/model1/coremldata.bin +0 -0
  102. package/package.json +107 -7
  103. package/src/bootstrap.ts +159 -0
  104. package/src/camera/CameraTaskHost.tsx +175 -0
  105. package/src/camera/cameraTasks.ts +129 -0
  106. package/src/device/createDeviceProvider.ts +832 -0
  107. package/src/device-bridge/actions/calendar-actions.ts +217 -0
  108. package/src/device-bridge/actions/dnd.ts +74 -0
  109. package/src/device-bridge/actions/health-actions.ts +58 -0
  110. package/src/device-bridge/actions/index.ts +12 -0
  111. package/src/device-bridge/actions/messaging.ts +74 -0
  112. package/src/device-bridge/actions/navigation.ts +88 -0
  113. package/src/device-bridge/actions/queue-poller.ts +151 -0
  114. package/src/device-bridge/background.ts +137 -0
  115. package/src/device-bridge/biometrics.ts +64 -0
  116. package/src/device-bridge/capabilities.ts +218 -0
  117. package/src/device-bridge/collectors/appEngagement.ts +120 -0
  118. package/src/device-bridge/collectors/battery.ts +83 -0
  119. package/src/device-bridge/collectors/calendar.ts +162 -0
  120. package/src/device-bridge/collectors/camera.ts +27 -0
  121. package/src/device-bridge/collectors/connectivity.ts +60 -0
  122. package/src/device-bridge/collectors/contacts.ts +200 -0
  123. package/src/device-bridge/collectors/health.ts +299 -0
  124. package/src/device-bridge/collectors/index.ts +12 -0
  125. package/src/device-bridge/collectors/location.ts +224 -0
  126. package/src/device-bridge/collectors/mood.ts +141 -0
  127. package/src/device-bridge/collectors/notifications.ts +70 -0
  128. package/src/device-bridge/cookies.ts +89 -0
  129. package/src/device-bridge/dynamic-connector.ts +422 -0
  130. package/src/device-bridge/index.ts +467 -0
  131. package/src/device-bridge/nfc.ts +85 -0
  132. package/src/device-bridge/plugin.ts +71 -0
  133. package/src/device-bridge/relay-client.ts +237 -0
  134. package/src/device-bridge/scanner.ts +42 -0
  135. package/src/device-bridge/sharing.ts +35 -0
  136. package/src/device-bridge/types.ts +326 -0
  137. package/src/device-state/activityClassifier.ts +151 -0
  138. package/src/device-state/activityEngine.ts +252 -0
  139. package/src/device-state/collectors.ts +31 -0
  140. package/src/device-state/domains/activity.ts +93 -0
  141. package/src/device-state/domains/capability.ts +60 -0
  142. package/src/device-state/domains/connectivity.ts +60 -0
  143. package/src/device-state/domains/deviceContext.ts +55 -0
  144. package/src/device-state/domains/interaction.ts +59 -0
  145. package/src/device-state/domains/spatial.ts +283 -0
  146. package/src/device-state/domains/visual.ts +100 -0
  147. package/src/device-state/headingSource.ts +84 -0
  148. package/src/device-state/index.ts +77 -0
  149. package/src/device-state/quality.ts +60 -0
  150. package/src/device-state/replay.ts +220 -0
  151. package/src/device-state/turnDetector.ts +121 -0
  152. package/src/device-state/visualEngine.ts +341 -0
  153. package/src/haptics.ts +4 -0
  154. package/src/index.ts +37 -0
  155. package/src/oauth/expoOAuth.tsx +113 -0
  156. package/src/vision/analysis.js +80 -0
  157. package/src/vision/index.ts +144 -0
  158. package/src/vision/ring.js +35 -0
@@ -0,0 +1,967 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __esm = (fn, res) => function __init() {
9
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
10
+ };
11
+ var __export = (target, all) => {
12
+ for (var name in all)
13
+ __defProp(target, name, { get: all[name], enumerable: true });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from))
18
+ if (!__hasOwnProp.call(to, key) && key !== except)
19
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
20
+ }
21
+ return to;
22
+ };
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
+ // If the importer is in node compatibility mode or this is not an ESM
25
+ // file that has been converted to a CommonJS file using a Babel-
26
+ // compatible transform (i.e. "__esModule" has not been set), then set
27
+ // "default" to the CommonJS "module.exports" for node compatibility.
28
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
+ mod
30
+ ));
31
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
+
33
+ // src/device-bridge/cookies.ts
34
+ var cookies_exports = {};
35
+ __export(cookies_exports, {
36
+ clearAll: () => clearAll,
37
+ get: () => get,
38
+ set: () => set
39
+ });
40
+ async function get(url, includeHttpOnly = true) {
41
+ const raw = await import_cookies.default.get(url, includeHttpOnly);
42
+ const out = [];
43
+ for (const [name, c] of Object.entries(raw || {})) {
44
+ if (!c || typeof c !== "object") continue;
45
+ const value = typeof c.value === "string" ? c.value : String(c.value ?? "");
46
+ const cookie = { name, value };
47
+ if (c.domain) cookie.domain = String(c.domain);
48
+ if (c.path) cookie.path = String(c.path);
49
+ if (c.expires) {
50
+ const t = Date.parse(c.expires);
51
+ if (!Number.isNaN(t)) cookie.expires = Math.floor(t / 1e3);
52
+ }
53
+ if (typeof c.httpOnly === "boolean") cookie.httpOnly = c.httpOnly;
54
+ if (typeof c.secure === "boolean") cookie.secure = c.secure;
55
+ if (c.sameSite === "Lax" || c.sameSite === "Strict" || c.sameSite === "None") {
56
+ cookie.sameSite = c.sameSite;
57
+ }
58
+ out.push(cookie);
59
+ }
60
+ return out;
61
+ }
62
+ async function clearAll() {
63
+ try {
64
+ await import_cookies.default.clearAll(true);
65
+ return { ok: true };
66
+ } catch (e) {
67
+ return { ok: false, error: String(e?.message || e) };
68
+ }
69
+ }
70
+ async function set(url, cookie) {
71
+ try {
72
+ await import_cookies.default.set(url, {
73
+ name: cookie.name,
74
+ value: cookie.value,
75
+ domain: cookie.domain,
76
+ path: cookie.path || "/",
77
+ httpOnly: cookie.httpOnly,
78
+ secure: cookie.secure
79
+ }, true);
80
+ return { ok: true };
81
+ } catch (e) {
82
+ return { ok: false, error: String(e?.message || e) };
83
+ }
84
+ }
85
+ var import_cookies;
86
+ var init_cookies = __esm({
87
+ "src/device-bridge/cookies.ts"() {
88
+ "use strict";
89
+ import_cookies = __toESM(require("@react-native-cookies/cookies"));
90
+ }
91
+ });
92
+
93
+ // src/device-bridge/nfc.ts
94
+ var nfc_exports = {};
95
+ __export(nfc_exports, {
96
+ isEnabled: () => isEnabled,
97
+ isSupported: () => isSupported2,
98
+ readOnce: () => readOnce
99
+ });
100
+ async function ensureInit() {
101
+ if (_initialized) return true;
102
+ try {
103
+ const supported = await import_react_native_nfc_manager.default.isSupported();
104
+ if (!supported) return false;
105
+ await import_react_native_nfc_manager.default.start();
106
+ _initialized = true;
107
+ return true;
108
+ } catch (e) {
109
+ return false;
110
+ }
111
+ }
112
+ async function isSupported2() {
113
+ try {
114
+ return await import_react_native_nfc_manager.default.isSupported();
115
+ } catch {
116
+ return false;
117
+ }
118
+ }
119
+ async function isEnabled() {
120
+ try {
121
+ return await import_react_native_nfc_manager.default.isEnabled();
122
+ } catch {
123
+ return false;
124
+ }
125
+ }
126
+ async function readOnce(timeoutMs = 3e4) {
127
+ const ready = await ensureInit();
128
+ if (!ready) return { ok: false, error: "nfc_unsupported" };
129
+ try {
130
+ const tag = await Promise.race([
131
+ import_react_native_nfc_manager.default.requestTechnology(import_react_native_nfc_manager.NfcTech.Ndef).then(() => import_react_native_nfc_manager.default.getTag()),
132
+ new Promise((resolve) => setTimeout(() => resolve(null), timeoutMs))
133
+ ]);
134
+ if (!tag) {
135
+ try {
136
+ await import_react_native_nfc_manager.default.cancelTechnologyRequest();
137
+ } catch {
138
+ }
139
+ return { ok: false, error: "timeout" };
140
+ }
141
+ const records = [];
142
+ if (tag.ndefMessage) {
143
+ for (const r of tag.ndefMessage) {
144
+ try {
145
+ const type = String.fromCharCode(...r.type || []);
146
+ const payload = import_react_native_nfc_manager.Ndef.text.decodePayload(r.payload || []);
147
+ records.push({ type, payload: String(payload) });
148
+ } catch {
149
+ }
150
+ }
151
+ }
152
+ const tagId = tag.id ? Array.from(tag.id).map((b) => b.toString(16).padStart(2, "0")).join("") : void 0;
153
+ return { ok: true, tagId, records };
154
+ } catch (e) {
155
+ return { ok: false, error: String(e?.message || e) };
156
+ } finally {
157
+ try {
158
+ await import_react_native_nfc_manager.default.cancelTechnologyRequest();
159
+ } catch {
160
+ }
161
+ }
162
+ }
163
+ var import_react_native_nfc_manager, _initialized;
164
+ var init_nfc = __esm({
165
+ "src/device-bridge/nfc.ts"() {
166
+ "use strict";
167
+ import_react_native_nfc_manager = __toESM(require("react-native-nfc-manager"));
168
+ _initialized = false;
169
+ }
170
+ });
171
+
172
+ // src/device/createDeviceProvider.ts
173
+ var createDeviceProvider_exports = {};
174
+ __export(createDeviceProvider_exports, {
175
+ clearAllPluginData: () => clearAllPluginData,
176
+ createDeviceProvider: () => createDeviceProvider
177
+ });
178
+ module.exports = __toCommonJS(createDeviceProvider_exports);
179
+ var Haptics = __toESM(require("expo-haptics"));
180
+ var ExpoLocation2 = __toESM(require("expo-location"));
181
+ var ImagePicker = __toESM(require("expo-image-picker"));
182
+ var Notifications = __toESM(require("expo-notifications"));
183
+ var DocumentPicker = __toESM(require("expo-document-picker"));
184
+ var FS = __toESM(require("expo-file-system"));
185
+ var SQLite = __toESM(require("expo-sqlite"));
186
+
187
+ // src/camera/cameraTasks.ts
188
+ function cameraError(code, message) {
189
+ const err = new Error(message);
190
+ err.code = code;
191
+ return err;
192
+ }
193
+ var CameraTaskBroker = class {
194
+ constructor() {
195
+ this.task = null;
196
+ this.listeners = /* @__PURE__ */ new Set();
197
+ /** Set by the host while a camera is mounted and ready. */
198
+ this.hostMounted = false;
199
+ }
200
+ current() {
201
+ return this.task;
202
+ }
203
+ subscribe(fn) {
204
+ this.listeners.add(fn);
205
+ return () => this.listeners.delete(fn);
206
+ }
207
+ /**
208
+ * Declare that a `CameraTaskHost` exists.
209
+ *
210
+ * Without it nothing will ever settle the promise, so a request must fail
211
+ * IMMEDIATELY and say why. The alternative is a plugin awaiting forever,
212
+ * which is the worst failure of the set: no error, no timeout, no camera,
213
+ * and a conversation that simply stops.
214
+ */
215
+ setHostMounted(mounted) {
216
+ this.hostMounted = mounted;
217
+ if (!mounted) this.fail(cameraError("UNAVAILABLE", "The camera surface was dismissed before the task completed."));
218
+ this.notify();
219
+ }
220
+ isHostMounted() {
221
+ return this.hostMounted;
222
+ }
223
+ /** Enqueue and hand back the promise the plugin awaits. */
224
+ run(kind, opts) {
225
+ if (!this.hostMounted) {
226
+ return Promise.reject(cameraError(
227
+ "UNAVAILABLE",
228
+ "No camera surface is mounted in this app, so the camera cannot be shown. The host must render <CameraTaskHost /> once, near the app root."
229
+ ));
230
+ }
231
+ if (this.task) {
232
+ return Promise.reject(cameraError(
233
+ "BUSY",
234
+ `The camera is already in use (${this.task.kind}). Only one camera task can run at a time.`
235
+ ));
236
+ }
237
+ return new Promise((resolve, reject) => {
238
+ this.task = { kind, opts, resolve, reject };
239
+ this.notify();
240
+ });
241
+ }
242
+ /** Settle the running task successfully and clear it. */
243
+ complete(value) {
244
+ const t = this.task;
245
+ if (!t) return;
246
+ this.task = null;
247
+ this.notify();
248
+ t.resolve(value);
249
+ }
250
+ /** Settle the running task with a failure and clear it. */
251
+ fail(err) {
252
+ const t = this.task;
253
+ if (!t) return;
254
+ this.task = null;
255
+ this.notify();
256
+ t.reject(err);
257
+ }
258
+ /**
259
+ * The user backed out.
260
+ *
261
+ * A distinct code, because "the user chose not to" is not a malfunction and
262
+ * a guide should say something different about it than about a broken lens.
263
+ */
264
+ cancel() {
265
+ this.fail(cameraError("CANCELLED", "Cancelled \u2014 the camera was dismissed before anything was captured."));
266
+ }
267
+ notify() {
268
+ for (const fn of this.listeners) {
269
+ try {
270
+ fn();
271
+ } catch {
272
+ }
273
+ }
274
+ }
275
+ };
276
+ var cameraTasks = new CameraTaskBroker();
277
+
278
+ // src/device/createDeviceProvider.ts
279
+ var import_async_storage3 = __toESM(require("@react-native-async-storage/async-storage"));
280
+
281
+ // src/vision/index.ts
282
+ var import_expo_modules_core = require("expo-modules-core");
283
+ var import_expo = require("expo");
284
+ var CameraPreview = (() => {
285
+ try {
286
+ return (0, import_expo.requireNativeView)("AdaVision");
287
+ } catch {
288
+ return null;
289
+ }
290
+ })();
291
+ var native = (0, import_expo_modules_core.requireOptionalNativeModule)("AdaVision");
292
+ function isSupported() {
293
+ try {
294
+ return native?.isSupported() ?? false;
295
+ } catch {
296
+ return false;
297
+ }
298
+ }
299
+ function qualityById(id) {
300
+ return native?.qualityById?.(id) ?? null;
301
+ }
302
+ async function readText(id, languages) {
303
+ if (!native) throw new Error("ada-vision native module not present in this build");
304
+ return native.readText(id, languages ?? null);
305
+ }
306
+ async function describe(id, maxLabels = 5) {
307
+ if (!native) throw new Error("ada-vision native module not present in this build");
308
+ return native.describe(id, maxLabels);
309
+ }
310
+ async function detectObjects(id, maxItems = 10, minConfidence = 0.25) {
311
+ if (!native) throw new Error("ada-vision native module not present in this build");
312
+ return native.detectObjects(id, maxItems, minConfidence);
313
+ }
314
+
315
+ // src/device-bridge/actions/messaging.ts
316
+ var SMS = __toESM(require("expo-sms"));
317
+
318
+ // src/device-bridge/actions/calendar-actions.ts
319
+ var ExpoCalendar = __toESM(require("expo-calendar"));
320
+
321
+ // src/device-bridge/actions/navigation.ts
322
+ var Linking = __toESM(require("expo-linking"));
323
+ var import_react_native = require("react-native");
324
+
325
+ // src/device-bridge/collectors/health.ts
326
+ var import_react_native2 = require("react-native");
327
+
328
+ // src/device-bridge/background.ts
329
+ var TaskManager = __toESM(require("expo-task-manager"));
330
+ var BackgroundFetch = __toESM(require("expo-background-fetch"));
331
+
332
+ // src/device-bridge/collectors/calendar.ts
333
+ var ExpoCalendar2 = __toESM(require("expo-calendar"));
334
+
335
+ // src/device-bridge/collectors/contacts.ts
336
+ var ExpoContacts = __toESM(require("expo-contacts"));
337
+ var import_async_storage = __toESM(require("@react-native-async-storage/async-storage"));
338
+
339
+ // src/device-bridge/collectors/location.ts
340
+ var ExpoLocation = __toESM(require("expo-location"));
341
+
342
+ // src/device-bridge/collectors/battery.ts
343
+ var ExpoBattery = __toESM(require("expo-battery"));
344
+
345
+ // src/device-bridge/collectors/connectivity.ts
346
+ var ExpoNetwork = __toESM(require("expo-network"));
347
+
348
+ // src/device-bridge/collectors/notifications.ts
349
+ var ExpoNotifications = __toESM(require("expo-notifications"));
350
+
351
+ // src/device-bridge/collectors/appEngagement.ts
352
+ var import_react_native3 = require("react-native");
353
+ var import_async_storage2 = __toESM(require("@react-native-async-storage/async-storage"));
354
+
355
+ // src/device-bridge/collectors/camera.ts
356
+ var import_expo_camera = require("expo-camera");
357
+
358
+ // src/device-bridge/biometrics.ts
359
+ var biometrics_exports = {};
360
+ __export(biometrics_exports, {
361
+ authenticate: () => authenticate,
362
+ capabilities: () => capabilities
363
+ });
364
+ var LocalAuthentication = __toESM(require("expo-local-authentication"));
365
+ async function capabilities() {
366
+ const [hasHardware, isEnrolled, types] = await Promise.all([
367
+ LocalAuthentication.hasHardwareAsync(),
368
+ LocalAuthentication.isEnrolledAsync(),
369
+ LocalAuthentication.supportedAuthenticationTypesAsync()
370
+ ]);
371
+ const supportedTypes = types.map((t) => {
372
+ if (t === LocalAuthentication.AuthenticationType.FINGERPRINT) return "fingerprint";
373
+ if (t === LocalAuthentication.AuthenticationType.FACIAL_RECOGNITION) return "face";
374
+ if (t === LocalAuthentication.AuthenticationType.IRIS) return "iris";
375
+ return "none";
376
+ }).filter((t) => t !== "none");
377
+ return { hasHardware, isEnrolled, supportedTypes };
378
+ }
379
+ async function authenticate(opts) {
380
+ try {
381
+ const res = await LocalAuthentication.authenticateAsync({
382
+ promptMessage: opts.reason,
383
+ cancelLabel: opts.cancelLabel,
384
+ disableDeviceFallback: opts.fallbackToPasscode === false
385
+ });
386
+ if (res.success) return { success: true };
387
+ return { success: false, error: res.error || "unknown" };
388
+ } catch (e) {
389
+ return { success: false, error: String(e?.message || e) };
390
+ }
391
+ }
392
+
393
+ // src/device-bridge/sharing.ts
394
+ var sharing_exports = {};
395
+ __export(sharing_exports, {
396
+ isAvailable: () => isAvailable,
397
+ shareFile: () => shareFile
398
+ });
399
+ var Sharing = __toESM(require("expo-sharing"));
400
+ async function shareFile(fileUri, opts = {}) {
401
+ try {
402
+ const available = await Sharing.isAvailableAsync();
403
+ if (!available) return { ok: false, error: "sharing_unavailable" };
404
+ await Sharing.shareAsync(fileUri, opts);
405
+ return { ok: true };
406
+ } catch (e) {
407
+ return { ok: false, error: String(e?.message || e) };
408
+ }
409
+ }
410
+ async function isAvailable() {
411
+ return Sharing.isAvailableAsync();
412
+ }
413
+
414
+ // src/device-bridge/scanner.ts
415
+ var scanner_exports = {};
416
+ __export(scanner_exports, {
417
+ CameraView: () => import_expo_camera2.CameraView,
418
+ normalizeResult: () => normalizeResult,
419
+ requestPermissions: () => requestPermissions,
420
+ useCameraPermissions: () => import_expo_camera2.useCameraPermissions
421
+ });
422
+ var import_expo_camera2 = require("expo-camera");
423
+ async function requestPermissions() {
424
+ const { Camera: Camera2 } = await import("expo-camera");
425
+ const { status } = await Camera2.requestCameraPermissionsAsync();
426
+ return { granted: status === "granted", status };
427
+ }
428
+ function normalizeResult(r) {
429
+ return { type: r.type, data: r.data };
430
+ }
431
+
432
+ // src/device/createDeviceProvider.ts
433
+ function getDeviceCookies() {
434
+ try {
435
+ return init_cookies(), __toCommonJS(cookies_exports);
436
+ } catch {
437
+ return null;
438
+ }
439
+ }
440
+ function getDeviceNfc() {
441
+ try {
442
+ return init_nfc(), __toCommonJS(nfc_exports);
443
+ } catch {
444
+ return null;
445
+ }
446
+ }
447
+ var CapabilityUnavailableError = class extends Error {
448
+ constructor(capability, reason) {
449
+ super(reason || `${capability} is not yet implemented. Coming in Phase 2.`);
450
+ this.code = "UNAVAILABLE";
451
+ this.name = "CapabilityUnavailableError";
452
+ }
453
+ };
454
+ function stubApi(capability) {
455
+ return new Proxy({}, {
456
+ get(_target, prop) {
457
+ if (typeof prop === "string") {
458
+ return () => {
459
+ throw new CapabilityUnavailableError(capability);
460
+ };
461
+ }
462
+ }
463
+ });
464
+ }
465
+ function createLocationAPI() {
466
+ const ensurePermission = async () => {
467
+ const existing = await ExpoLocation2.getForegroundPermissionsAsync();
468
+ if (existing.status === "granted") return;
469
+ const asked = await ExpoLocation2.requestForegroundPermissionsAsync();
470
+ if (asked.status !== "granted") {
471
+ throw new Error(
472
+ "Location permission was not granted. Enable it for this app in Settings > Privacy > Location Services."
473
+ );
474
+ }
475
+ };
476
+ return {
477
+ async getCurrent(opts) {
478
+ await ensurePermission();
479
+ const fix = await ExpoLocation2.getCurrentPositionAsync({
480
+ accuracy: opts?.accuracy === "high" ? ExpoLocation2.Accuracy.High : ExpoLocation2.Accuracy.Balanced
481
+ });
482
+ return {
483
+ latitude: fix.coords.latitude,
484
+ longitude: fix.coords.longitude,
485
+ altitude: fix.coords.altitude ?? void 0
486
+ };
487
+ },
488
+ watchPosition(cb) {
489
+ let subscription = null;
490
+ let cancelled = false;
491
+ void (async () => {
492
+ try {
493
+ await ensurePermission();
494
+ if (cancelled) return;
495
+ subscription = await ExpoLocation2.watchPositionAsync(
496
+ { accuracy: ExpoLocation2.Accuracy.Balanced },
497
+ (fix) => cb({ latitude: fix.coords.latitude, longitude: fix.coords.longitude })
498
+ );
499
+ if (cancelled) {
500
+ subscription?.remove();
501
+ subscription = null;
502
+ }
503
+ } catch (err) {
504
+ console.warn("[location] watchPosition failed:", err?.message || String(err));
505
+ }
506
+ })();
507
+ return () => {
508
+ cancelled = true;
509
+ subscription?.remove();
510
+ subscription = null;
511
+ };
512
+ }
513
+ };
514
+ }
515
+ function createCameraAPI() {
516
+ const ensurePermission = async () => {
517
+ const existing = await ImagePicker.getCameraPermissionsAsync();
518
+ if (existing.granted) return;
519
+ const asked = await ImagePicker.requestCameraPermissionsAsync();
520
+ if (!asked.granted) {
521
+ throw new Error(
522
+ "Camera permission was not granted. Enable it for this app in Settings > Privacy > Camera."
523
+ );
524
+ }
525
+ };
526
+ return {
527
+ async takePhoto(opts) {
528
+ await ensurePermission();
529
+ const res = await ImagePicker.launchCameraAsync({
530
+ quality: opts?.quality ?? 0.7,
531
+ cameraType: opts?.facing === "front" ? ImagePicker.CameraType.front : ImagePicker.CameraType.back
532
+ });
533
+ if (res.canceled || !res.assets?.[0]) {
534
+ throw new Error("No photo taken \u2014 the camera was dismissed.");
535
+ }
536
+ const a = res.assets[0];
537
+ return { uri: a.uri, width: a.width, height: a.height };
538
+ },
539
+ async scanBarcode(opts) {
540
+ throw new CapabilityUnavailableError(
541
+ "camera.scanBarcode",
542
+ "Use native.scanner.scanOnce() instead \u2014 scanning needs a mounted camera, which this call cannot provide. Same arguments, and it returns { data, format }." + (opts?.formats?.length ? " Pass your formats through to scanOnce." : "")
543
+ );
544
+ },
545
+ async recordVideo(opts) {
546
+ return cameraTasks.run("record", {
547
+ maxDurationMs: opts?.maxDurationMs,
548
+ withAudio: opts?.withAudio ?? false
549
+ });
550
+ },
551
+ async pickImage(opts) {
552
+ const existing = await ImagePicker.getMediaLibraryPermissionsAsync();
553
+ if (!existing.granted) {
554
+ const asked = await ImagePicker.requestMediaLibraryPermissionsAsync();
555
+ if (!asked.granted) {
556
+ throw new Error(
557
+ "Photo library permission was not granted. Enable it for this app in Settings > Privacy > Photos."
558
+ );
559
+ }
560
+ }
561
+ const res = await ImagePicker.launchImageLibraryAsync({
562
+ allowsMultipleSelection: !!opts?.multiple
563
+ });
564
+ if (res.canceled) return [];
565
+ return (res.assets || []).map((a) => ({ uri: a.uri }));
566
+ }
567
+ };
568
+ }
569
+ var _pluginDbs = /* @__PURE__ */ new Map();
570
+ function openPluginDb(file) {
571
+ const existing = _pluginDbs.get(file);
572
+ if (existing) return existing;
573
+ const opened = SQLite.openDatabaseAsync(file);
574
+ _pluginDbs.set(file, opened);
575
+ return opened;
576
+ }
577
+ function sqlLeadingKeyword(sql) {
578
+ let s = String(sql);
579
+ for (; ; ) {
580
+ const before = s;
581
+ s = s.replace(/^\s+/, "");
582
+ if (s.startsWith("--")) {
583
+ const nl = s.indexOf("\n");
584
+ s = nl === -1 ? "" : s.slice(nl + 1);
585
+ } else if (s.startsWith("/*")) {
586
+ const end = s.indexOf("*/");
587
+ s = end === -1 ? "" : s.slice(end + 2);
588
+ }
589
+ if (s === before) break;
590
+ }
591
+ const m = s.match(/^[A-Za-z]+/);
592
+ return m ? m[0].toUpperCase() : "";
593
+ }
594
+ function createStorageAPI(pluginId) {
595
+ const ns = encodeURIComponent(pluginId);
596
+ const key = (k) => `@plugin:${ns}:${k}`;
597
+ const dbFile = `plugin-storage-${ns}.db`;
598
+ return {
599
+ get: (k) => import_async_storage3.default.getItem(key(k)),
600
+ set: (k, v) => import_async_storage3.default.setItem(key(k), v),
601
+ delete: (k) => import_async_storage3.default.removeItem(key(k)),
602
+ db: {
603
+ async execute(sql, params) {
604
+ const verb = sqlLeadingKeyword(sql);
605
+ if (verb === "ATTACH" || verb === "DETACH" || verb === "VACUUM") {
606
+ throw new CapabilityUnavailableError(
607
+ "storage.db",
608
+ `SQL '${verb}' is not permitted: a plugin's storage is confined to its own database and cannot reach another file.`
609
+ );
610
+ }
611
+ const db = await openPluginDb(dbFile);
612
+ const returnsRows = verb === "SELECT" || verb === "PRAGMA" || verb === "WITH";
613
+ if (returnsRows) {
614
+ const rows = await db.getAllAsync(sql, params ?? []);
615
+ return { rows, changes: 0 };
616
+ }
617
+ const res = await db.runAsync(sql, params ?? []);
618
+ return { rows: [], changes: res.changes ?? 0 };
619
+ }
620
+ }
621
+ };
622
+ }
623
+ async function clearAllPluginData() {
624
+ try {
625
+ const keys = await import_async_storage3.default.getAllKeys();
626
+ const mine = keys.filter((k) => k.startsWith("@plugin:"));
627
+ if (mine.length) await import_async_storage3.default.multiRemove(mine);
628
+ } catch (e) {
629
+ console.warn("[adas] clearAllPluginData: KV clear failed:", e?.message || e);
630
+ }
631
+ try {
632
+ for (const [, p] of _pluginDbs) {
633
+ try {
634
+ const db = await p;
635
+ await db.closeAsync?.();
636
+ } catch {
637
+ }
638
+ }
639
+ _pluginDbs.clear();
640
+ const sqliteDir = new FS.Directory(FS.Paths.document, "SQLite");
641
+ if (sqliteDir.exists) {
642
+ for (const entry of sqliteDir.list()) {
643
+ if (/^plugin-storage-.*\.db$/.test(String(entry.name ?? ""))) {
644
+ try {
645
+ entry.delete();
646
+ } catch {
647
+ }
648
+ }
649
+ }
650
+ }
651
+ } catch (e) {
652
+ console.warn("[adas] clearAllPluginData: SQLite clear failed:", e?.message || e);
653
+ }
654
+ try {
655
+ const dir = new FS.Directory(FS.Paths.document, "plugin-files");
656
+ if (dir.exists) dir.delete();
657
+ } catch (e) {
658
+ console.warn("[adas] clearAllPluginData: file sandbox clear failed:", e?.message || e);
659
+ }
660
+ }
661
+ function createNotificationsAPI() {
662
+ return {
663
+ async schedule({ title, body, trigger }) {
664
+ const perm = await Notifications.getPermissionsAsync();
665
+ if (!perm.granted) {
666
+ const asked = await Notifications.requestPermissionsAsync();
667
+ if (!asked.granted) {
668
+ throw new Error(
669
+ "Notification permission was not granted. Enable it for this app in Settings > Notifications."
670
+ );
671
+ }
672
+ }
673
+ const when = typeof trigger?.seconds === "number" ? { type: "timeInterval", seconds: trigger.seconds, repeats: false } : trigger?.date ? { type: "date", date: new Date(trigger.date) } : null;
674
+ if (!when) {
675
+ throw new Error("schedule() needs trigger.seconds or trigger.date.");
676
+ }
677
+ return Notifications.scheduleNotificationAsync({
678
+ content: { title, body },
679
+ trigger: when
680
+ });
681
+ },
682
+ cancel: (id) => Notifications.cancelScheduledNotificationAsync(id),
683
+ onReceived(cb) {
684
+ const sub = Notifications.addNotificationReceivedListener((n) => {
685
+ cb({
686
+ id: n.request.identifier,
687
+ title: n.request.content.title || "",
688
+ body: n.request.content.body || "",
689
+ data: n.request.content.data
690
+ });
691
+ });
692
+ return () => sub.remove();
693
+ }
694
+ };
695
+ }
696
+ function createFileSystemAPI(pluginId) {
697
+ let _root = null;
698
+ const rootDir = () => _root ?? (_root = new FS.Directory(FS.Paths.document, "plugin-files", pluginId));
699
+ const resolve = (p) => {
700
+ const root = rootDir();
701
+ const file = new FS.File(root, p);
702
+ if (!file.uri.startsWith(root.uri)) {
703
+ throw new CapabilityUnavailableError(
704
+ "fileSystem",
705
+ `Path escapes the plugin's storage area: ${p}. Plugin files live under plugin-files/ and paths cannot traverse out of it.`
706
+ );
707
+ }
708
+ return file;
709
+ };
710
+ return {
711
+ async readFile(path) {
712
+ const file = resolve(path);
713
+ if (!file.exists) {
714
+ throw new CapabilityUnavailableError(
715
+ "fileSystem.readFile",
716
+ `No such file: ${path}. Nothing was read.`
717
+ );
718
+ }
719
+ return file.text();
720
+ },
721
+ async writeFile(path, content) {
722
+ const file = resolve(path);
723
+ const parent = file.parentDirectory;
724
+ if (!parent.exists) parent.create({ intermediates: true });
725
+ if (!file.exists) file.create();
726
+ file.write(content);
727
+ },
728
+ async pickDocument(opts) {
729
+ const res = await DocumentPicker.getDocumentAsync({
730
+ type: opts?.types?.length ? opts.types : "*/*",
731
+ copyToCacheDirectory: true
732
+ });
733
+ if (res.canceled || !res.assets?.[0]) {
734
+ throw new Error("No document chosen \u2014 the picker was dismissed.");
735
+ }
736
+ const a = res.assets[0];
737
+ return { uri: a.uri, name: a.name, size: a.size ?? 0 };
738
+ }
739
+ };
740
+ }
741
+ function createHapticsAPI() {
742
+ return {
743
+ impact(style) {
744
+ const map = {
745
+ light: Haptics.ImpactFeedbackStyle.Light,
746
+ medium: Haptics.ImpactFeedbackStyle.Medium,
747
+ heavy: Haptics.ImpactFeedbackStyle.Heavy
748
+ };
749
+ Haptics.impactAsync(map[style]);
750
+ },
751
+ notification(type) {
752
+ const map = {
753
+ success: Haptics.NotificationFeedbackType.Success,
754
+ warning: Haptics.NotificationFeedbackType.Warning,
755
+ error: Haptics.NotificationFeedbackType.Error
756
+ };
757
+ Haptics.notificationAsync(map[type]);
758
+ },
759
+ // Shorthand for notification('error'). Plugins call this; it was never
760
+ // implemented, and optional chaining meant the failure the user was meant
761
+ // to FEEL simply did not happen.
762
+ error() {
763
+ Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error);
764
+ },
765
+ selection() {
766
+ Haptics.selectionAsync();
767
+ }
768
+ };
769
+ }
770
+ function createConnectivityAPI(reachabilityUrl) {
771
+ let online = true;
772
+ const listeners = /* @__PURE__ */ new Set();
773
+ let interval = null;
774
+ const checkOnline = async () => {
775
+ if (!reachabilityUrl) return true;
776
+ try {
777
+ const res = await fetch(reachabilityUrl, {
778
+ method: "HEAD",
779
+ signal: AbortSignal.timeout(5e3)
780
+ });
781
+ return res.ok;
782
+ } catch {
783
+ return false;
784
+ }
785
+ };
786
+ const startPolling = () => {
787
+ if (!reachabilityUrl) return;
788
+ if (interval) return;
789
+ interval = setInterval(async () => {
790
+ const newState = await checkOnline();
791
+ if (newState !== online) {
792
+ online = newState;
793
+ listeners.forEach((cb) => cb(online));
794
+ }
795
+ }, 3e4);
796
+ };
797
+ return {
798
+ isOnline() {
799
+ return online;
800
+ },
801
+ onChange(cb) {
802
+ listeners.add(cb);
803
+ startPolling();
804
+ return () => {
805
+ listeners.delete(cb);
806
+ if (listeners.size === 0 && interval) {
807
+ clearInterval(interval);
808
+ interval = null;
809
+ }
810
+ };
811
+ }
812
+ };
813
+ }
814
+ function createCookiesAPI() {
815
+ return {
816
+ async get(url) {
817
+ const mod = getDeviceCookies();
818
+ if (!mod) throw new CapabilityUnavailableError("cookies (native module not available \u2014 use a dev build)");
819
+ const list = await mod.get(url, true);
820
+ return list;
821
+ },
822
+ async clear(_url) {
823
+ const mod = getDeviceCookies();
824
+ if (!mod) throw new CapabilityUnavailableError("cookies (native module not available \u2014 use a dev build)");
825
+ const r = await mod.clearAll();
826
+ return { ok: r.ok };
827
+ }
828
+ };
829
+ }
830
+ function createBiometricsAPIv2() {
831
+ return {
832
+ capabilities: () => biometrics_exports.capabilities(),
833
+ authenticate: (opts) => biometrics_exports.authenticate(opts)
834
+ };
835
+ }
836
+ function createSharingAPI() {
837
+ return {
838
+ isAvailable: () => sharing_exports.isAvailable(),
839
+ shareFile: (fileUri, opts) => sharing_exports.shareFile(fileUri, opts)
840
+ };
841
+ }
842
+ function createScannerAPI() {
843
+ return {
844
+ requestPermissions: () => scanner_exports.requestPermissions(),
845
+ // Raises the shared camera surface and settles on the first code read.
846
+ // The plugin mounts nothing — that lifecycle is owned once, by
847
+ // CameraTaskHost, instead of by every plugin that wants to scan.
848
+ scanOnce: (opts) => cameraTasks.run("scan", {
849
+ formats: opts?.formats,
850
+ timeoutMs: opts?.timeoutMs
851
+ })
852
+ };
853
+ }
854
+ function createNfcAPI() {
855
+ return {
856
+ async isSupported() {
857
+ const mod = getDeviceNfc();
858
+ if (!mod) return false;
859
+ return mod.isSupported();
860
+ },
861
+ async isEnabled() {
862
+ const mod = getDeviceNfc();
863
+ if (!mod) return false;
864
+ return mod.isEnabled();
865
+ },
866
+ readOnce(timeoutMs) {
867
+ const mod = getDeviceNfc();
868
+ if (!mod) return Promise.resolve({ ok: false, error: "nfc_unavailable" });
869
+ return mod.readOnce(timeoutMs);
870
+ }
871
+ };
872
+ }
873
+ function createBluetoothAPI() {
874
+ const refuse = (method) => new CapabilityUnavailableError(
875
+ `bluetooth.${method}`,
876
+ "Bluetooth is not implemented in this build \u2014 no BLE native module is installed. The capability is declared so it fails by name rather than silently; nothing was scanned."
877
+ );
878
+ return {
879
+ // These two answer `false` rather than throwing, because "is BLE usable?"
880
+ // is exactly the question a plugin should be allowed to ask before
881
+ // committing to a flow, and `false` is the true answer here.
882
+ async isSupported() {
883
+ return false;
884
+ },
885
+ async isEnabled() {
886
+ return false;
887
+ },
888
+ // scan() THROWS, because there is no honest empty result: an empty device
889
+ // list is a real finding ("nothing is advertising nearby") and returning
890
+ // one would report a scan that never happened.
891
+ async scan() {
892
+ throw refuse("scan");
893
+ }
894
+ };
895
+ }
896
+ function createVisionAPI() {
897
+ return {
898
+ // "Can I see?" — true once the native module is present in the binary. On a
899
+ // build without it, adaVision.isSupported() answers false, and assessQuality
900
+ // below refuses cleanly (no crash), exactly the pre-module behaviour.
901
+ async isSupported() {
902
+ return isSupported();
903
+ },
904
+ // readText: on-device OCR on a published frame (native resolves the id →
905
+ // pixels). [] = looked, found no text (a real finding); throws = could not
906
+ // look (unknown/aged-out id). describe (VNClassifyImage) is the next pass.
907
+ async readText(frameId, opts) {
908
+ return readText(frameId, opts?.languages);
909
+ },
910
+ // describe: on-device labels (VNClassifyImage), not prose — the sentence is
911
+ // the skill's job. [] = looked, recognised nothing.
912
+ async describe(frameId, opts) {
913
+ return describe(frameId, opts?.maxLabels ?? 5);
914
+ },
915
+ // detectObjects: on-device located objects (bundled detector), each with a
916
+ // box — what a guidance loop reads to say WHERE a thing is, not just that the
917
+ // scene contains it. [] = looked, found nothing; throws = could not look.
918
+ async detectObjects(frameId, opts) {
919
+ return detectObjects(frameId, opts?.maxItems ?? 10, opts?.minConfidence ?? 0.25);
920
+ },
921
+ // assessQuality: resolve the frame id to its LOCAL file, measure on-device,
922
+ // and record the result back onto the frame so a later read of
923
+ // VisualFrameRef.quality reflects it. Throwing here means "could not look"
924
+ // (unknown/aged-out id, or no native module) — never a measured verdict.
925
+ async assessQuality(frameId) {
926
+ const q = qualityById(frameId);
927
+ if (!q) {
928
+ throw new CapabilityUnavailableError(
929
+ "vision.assessQuality",
930
+ `No frame for id "${frameId}" \u2014 unknown or aged out of the ring. This is "could not look", not a measurement.`
931
+ );
932
+ }
933
+ return q;
934
+ }
935
+ };
936
+ }
937
+ function createDeviceProvider(config) {
938
+ const connectivity = createConnectivityAPI(config?.reachabilityUrl);
939
+ return {
940
+ camera: createCameraAPI(),
941
+ location: createLocationAPI(),
942
+ // Only the per-plugin storageFor/fileSystemFor are exposed — NO shared
943
+ // `storage`/`fileSystem` bucket. The gate scopes by pluginId and fails
944
+ // closed without one, so a shared instance would be an unreachable
945
+ // (and dangerous) fallback. Each plugin gets its own namespace + db file /
946
+ // sandbox directory, or nothing.
947
+ storageFor: (pluginId) => createStorageAPI(pluginId),
948
+ biometrics: stubApi("biometrics"),
949
+ biometricsV2: createBiometricsAPIv2(),
950
+ notifications: createNotificationsAPI(),
951
+ haptics: createHapticsAPI(),
952
+ connectivity,
953
+ fileSystemFor: (pluginId) => createFileSystemAPI(pluginId),
954
+ cookies: createCookiesAPI(),
955
+ sharing: createSharingAPI(),
956
+ scanner: createScannerAPI(),
957
+ nfc: createNfcAPI(),
958
+ bluetooth: createBluetoothAPI(),
959
+ vision: createVisionAPI()
960
+ };
961
+ }
962
+ // Annotate the CommonJS export names for ESM import in node:
963
+ 0 && (module.exports = {
964
+ clearAllPluginData,
965
+ createDeviceProvider
966
+ });
967
+ //# sourceMappingURL=createDeviceProvider.js.map