craft-native 0.0.158 → 0.0.161
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/android/templates/CraftNative.kt.template +62 -1
- package/dist/android/templates/CraftNativeCapabilities.kt.template +311 -4
- package/dist/android/templates/MainActivityNative.kt.template +638 -55
- package/dist/api/mobile.d.ts +57 -4
- package/dist/cli.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/ios/src/index.d.ts +2 -0
- package/dist/ios/src/index.js +16 -6
- package/dist/ios/templates/CraftApp.swift +24 -0
- package/dist/ios/templates/CraftHealth.swift +123 -0
- package/dist/ios/templates/CraftHybrid.swift +19 -0
- package/dist/ios/templates/CraftNativeScreen.swift +501 -58
- package/dist/mobile.js +12 -0
- package/package.json +1 -1
package/dist/mobile.js
CHANGED
|
@@ -1348,6 +1348,18 @@ var health = {
|
|
|
1348
1348
|
if (!craft?.health?.getSleepIntervals)
|
|
1349
1349
|
throw new Error("Reading sleep intervals is unavailable");
|
|
1350
1350
|
return craft.health.getSleepIntervals(options);
|
|
1351
|
+
},
|
|
1352
|
+
async saveMindfulSession(session) {
|
|
1353
|
+
const craft = getCraftRoot();
|
|
1354
|
+
if (!craft?.health?.saveMindfulSession)
|
|
1355
|
+
throw new Error("Saving mindful sessions is unavailable");
|
|
1356
|
+
return craft.health.saveMindfulSession(session);
|
|
1357
|
+
},
|
|
1358
|
+
async getMindfulSessions(options = {}) {
|
|
1359
|
+
const craft = getCraftRoot();
|
|
1360
|
+
if (!craft?.health?.getMindfulSessions)
|
|
1361
|
+
throw new Error("Reading mindful sessions is unavailable");
|
|
1362
|
+
return craft.health.getMindfulSessions(options);
|
|
1351
1363
|
}
|
|
1352
1364
|
};
|
|
1353
1365
|
async function updateLiveActivity(idOrState, state) {
|