@ateam-ai-mobile/expo 0.1.9 → 0.1.11
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/bootstrap.js +34 -18
- package/dist/bootstrap.js.map +1 -1
- package/dist/bootstrap.mjs +19 -1
- package/dist/bootstrap.mjs.map +1 -1
- package/expo-module.config.json +12 -3
- package/ios/AdaAudioModule.swift +78 -0
- package/ios/AdaVisionModule.swift +3 -0
- package/package.json +4 -4
- package/src/audio/index.ts +23 -0
- package/src/bootstrap.ts +5 -1
package/dist/bootstrap.js
CHANGED
|
@@ -179,6 +179,21 @@ var import_core2 = require("@ateam-ai-mobile/core");
|
|
|
179
179
|
var import_plugin_runtime3 = require("@ateam-ai-mobile/plugin-runtime");
|
|
180
180
|
var import_ui2 = require("@ateam-ai-mobile/ui");
|
|
181
181
|
|
|
182
|
+
// src/audio/index.ts
|
|
183
|
+
var import_expo_modules_core = require("expo-modules-core");
|
|
184
|
+
var native = (0, import_expo_modules_core.requireOptionalNativeModule)("AdaAudio");
|
|
185
|
+
function createCallAudioProvider() {
|
|
186
|
+
if (!native) return null;
|
|
187
|
+
return {
|
|
188
|
+
beginCall: () => {
|
|
189
|
+
native.beginVoiceCall();
|
|
190
|
+
},
|
|
191
|
+
endCall: () => {
|
|
192
|
+
native.endVoiceCall();
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
|
|
182
197
|
// src/index.ts
|
|
183
198
|
var ExpoWebBrowser = __toESM(require("expo-web-browser"));
|
|
184
199
|
var ExpoLinking = __toESM(require("expo-linking"));
|
|
@@ -1837,7 +1852,7 @@ var SQLite = __toESM(require("expo-sqlite"));
|
|
|
1837
1852
|
var import_async_storage6 = __toESM(require("@react-native-async-storage/async-storage"));
|
|
1838
1853
|
|
|
1839
1854
|
// src/vision/index.ts
|
|
1840
|
-
var
|
|
1855
|
+
var import_expo_modules_core2 = require("expo-modules-core");
|
|
1841
1856
|
var import_expo = require("expo");
|
|
1842
1857
|
var CameraPreview = (() => {
|
|
1843
1858
|
try {
|
|
@@ -1846,33 +1861,33 @@ var CameraPreview = (() => {
|
|
|
1846
1861
|
return null;
|
|
1847
1862
|
}
|
|
1848
1863
|
})();
|
|
1849
|
-
var
|
|
1864
|
+
var native2 = (0, import_expo_modules_core2.requireOptionalNativeModule)("AdaVision");
|
|
1850
1865
|
function isSupported() {
|
|
1851
1866
|
try {
|
|
1852
|
-
return
|
|
1867
|
+
return native2?.isSupported() ?? false;
|
|
1853
1868
|
} catch {
|
|
1854
1869
|
return false;
|
|
1855
1870
|
}
|
|
1856
1871
|
}
|
|
1857
1872
|
function qualityById(id) {
|
|
1858
|
-
return
|
|
1873
|
+
return native2?.qualityById?.(id) ?? null;
|
|
1859
1874
|
}
|
|
1860
1875
|
async function readText(id, languages) {
|
|
1861
|
-
if (!
|
|
1862
|
-
return
|
|
1876
|
+
if (!native2) throw new Error("ada-vision native module not present in this build");
|
|
1877
|
+
return native2.readText(id, languages ?? null);
|
|
1863
1878
|
}
|
|
1864
1879
|
async function describe(id, maxLabels = 5) {
|
|
1865
|
-
if (!
|
|
1866
|
-
return
|
|
1880
|
+
if (!native2) throw new Error("ada-vision native module not present in this build");
|
|
1881
|
+
return native2.describe(id, maxLabels);
|
|
1867
1882
|
}
|
|
1868
1883
|
async function detectObjects(id, maxItems = 10, minConfidence = 0.25) {
|
|
1869
|
-
if (!
|
|
1870
|
-
return
|
|
1884
|
+
if (!native2) throw new Error("ada-vision native module not present in this build");
|
|
1885
|
+
return native2.detectObjects(id, maxItems, minConfidence);
|
|
1871
1886
|
}
|
|
1872
1887
|
|
|
1873
1888
|
// src/maps/index.ts
|
|
1874
1889
|
var import_react_native3 = require("react-native");
|
|
1875
|
-
var
|
|
1890
|
+
var import_expo_modules_core3 = require("expo-modules-core");
|
|
1876
1891
|
var ExpoLocation2 = __toESM(require("expo-location"));
|
|
1877
1892
|
|
|
1878
1893
|
// src/args.ts
|
|
@@ -2025,26 +2040,26 @@ function mapsFailure(verb, err) {
|
|
|
2025
2040
|
}
|
|
2026
2041
|
|
|
2027
2042
|
// src/maps/index.ts
|
|
2028
|
-
var
|
|
2043
|
+
var native3 = (0, import_expo_modules_core3.requireOptionalNativeModule)("AdaMaps");
|
|
2029
2044
|
function missingReason() {
|
|
2030
2045
|
if (import_react_native3.Platform.OS !== "ios") return `iOS (Apple MapKit) \u2014 ${import_react_native3.Platform.OS} has no implementation yet`;
|
|
2031
|
-
if (!
|
|
2046
|
+
if (!native3) return "the app build with the AdaMaps module (this build predates it \u2014 a native rebuild is needed)";
|
|
2032
2047
|
return null;
|
|
2033
2048
|
}
|
|
2034
2049
|
function isSupported2() {
|
|
2035
2050
|
try {
|
|
2036
|
-
return missingReason() === null && (
|
|
2051
|
+
return missingReason() === null && (native3?.isSupported() ?? false);
|
|
2037
2052
|
} catch {
|
|
2038
2053
|
return false;
|
|
2039
2054
|
}
|
|
2040
2055
|
}
|
|
2041
2056
|
async function search(query, near, radiusM, limit) {
|
|
2042
|
-
if (!
|
|
2043
|
-
return near ?
|
|
2057
|
+
if (!native3) throw new Error("ada-maps native module not present in this build");
|
|
2058
|
+
return near ? native3.search(query, near.latitude, near.longitude, true, radiusM, limit) : native3.search(query, 0, 0, false, radiusM, limit);
|
|
2044
2059
|
}
|
|
2045
2060
|
async function route(from, to) {
|
|
2046
|
-
if (!
|
|
2047
|
-
return
|
|
2061
|
+
if (!native3) throw new Error("ada-maps native module not present in this build");
|
|
2062
|
+
return native3.route(from.latitude, from.longitude, to.latitude, to.longitude);
|
|
2048
2063
|
}
|
|
2049
2064
|
async function reverseGeocode(at) {
|
|
2050
2065
|
const [first] = await ExpoLocation2.reverseGeocodeAsync({ latitude: at.latitude, longitude: at.longitude });
|
|
@@ -2963,6 +2978,7 @@ function bootstrapExpoAdas(opts) {
|
|
|
2963
2978
|
const relay = opts.urls.relay;
|
|
2964
2979
|
(0, import_ui2.setPluginWebViewExtraHosts)(() => relay ? [relay()] : []);
|
|
2965
2980
|
(0, import_ui2.setOAuthProvider)(createExpoOAuthProvider({ googleIosClientId: opts.googleIosClientId }));
|
|
2981
|
+
(0, import_ui2.setCallAudioProvider)(createCallAudioProvider());
|
|
2966
2982
|
if (opts.onReachabilityChange) {
|
|
2967
2983
|
const onReach = opts.onReachabilityChange;
|
|
2968
2984
|
(0, import_core2.setAcsReachabilityReporter)({ up: () => onReach(true), down: () => onReach(false) });
|