@wix/himalaya-cli 0.1256.0 → 0.1258.0
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/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +2 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/motion/src/index.d.ts +45 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/sdk-types/src/capabilities.generated.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/audio-record.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calendar.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calls.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/contacts.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/location.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/motion.mjs +18 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/photos.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdk-types.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/tasks.mjs +1 -1
- package/dist/cli.mjs +649 -65
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/base44-app-to-himi-app.md +41 -5
- package/guides/component-reference.json +0 -84
- package/guides/component-reference.md +2 -23
- package/guides/sdk-reference.json +15 -3
- package/package.json +2 -2
- package/templates/beauty-salon/tier5-src/_shared/collection-service.ts +7 -0
- package/templates/beauty-salon/tier5-src/_shared/weekly-goal.ts +107 -0
- package/templates/beauty-salon/tier5-src/himi-booking-bookings/index.ts +41 -4
- package/templates/beauty-salon/tier5-src/himi-branded-lite-home/index.ts +31 -7
- package/templates/beauty-salon-owner/tier5-src/_shared/collection-service.ts +7 -0
- package/templates/branded-lite/config.ts +14 -1
- package/templates/branded-lite/dev/index.ts +845 -2
- package/templates/branded-lite/tier5-src/_shared/collection-service.ts +7 -0
- package/templates/branded-lite/tier5-src/_shared/weekly-goal.ts +107 -0
- package/templates/branded-lite/tier5-src/himi-booking-bookings/index.ts +41 -4
- package/templates/branded-lite/tier5-src/himi-branded-lite-home/index.ts +31 -7
- package/templates/branded-lite/tier5-src/himi-branded-lite-steps/index.ts +524 -0
- package/templates/community-club/tier5-src/_shared/collection-service.ts +7 -0
- package/templates/community-club/tier5-src/_shared/weekly-goal.ts +107 -0
- package/templates/community-club/tier5-src/himi-branded-lite-home/index.ts +31 -7
- package/templates/community-club-owner/tier5-src/_shared/collection-service.ts +7 -0
- package/templates/events-meetups/tier5-src/_shared/collection-service.ts +7 -0
- package/templates/events-meetups/tier5-src/_shared/weekly-goal.ts +107 -0
- package/templates/events-meetups/tier5-src/himi-branded-lite-home/index.ts +31 -7
- package/templates/events-meetups-owner/tier5-src/_shared/collection-service.ts +7 -0
- package/templates/gym-fitness/config.ts +14 -1
- package/templates/gym-fitness/dev/index.ts +844 -1
- package/templates/gym-fitness/tier5-src/_shared/collection-service.ts +7 -0
- package/templates/gym-fitness/tier5-src/_shared/weekly-goal.ts +107 -0
- package/templates/gym-fitness/tier5-src/himi-booking-bookings/index.ts +41 -4
- package/templates/gym-fitness/tier5-src/himi-branded-lite-home/index.ts +31 -7
- package/templates/gym-fitness/tier5-src/himi-branded-lite-steps/index.ts +524 -0
- package/templates/gym-fitness-owner/tier5-src/_shared/collection-service.ts +7 -0
- package/templates/nonprofit-cause/tier5-src/_shared/collection-service.ts +7 -0
- package/templates/nonprofit-cause/tier5-src/_shared/weekly-goal.ts +107 -0
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-home/index.ts +31 -7
- package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-service.ts +7 -0
- package/templates/owner-lite/tier5-src/_shared/collection-service.ts +7 -0
- package/templates/podcast-creator/tier5-src/_shared/collection-service.ts +7 -0
- package/templates/podcast-creator/tier5-src/_shared/weekly-goal.ts +107 -0
- package/templates/podcast-creator/tier5-src/himi-branded-lite-home/index.ts +31 -7
- package/templates/podcast-creator-owner/tier5-src/_shared/collection-service.ts +7 -0
- package/templates/portfolio-creative/tier5-src/_shared/collection-service.ts +7 -0
- package/templates/portfolio-creative/tier5-src/_shared/weekly-goal.ts +107 -0
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-home/index.ts +31 -7
- package/templates/portfolio-creative-owner/tier5-src/_shared/collection-service.ts +7 -0
- package/templates/restaurant/tier5-src/_shared/collection-service.ts +7 -0
- package/templates/restaurant/tier5-src/_shared/weekly-goal.ts +107 -0
- package/templates/restaurant/tier5-src/himi-branded-lite-home/index.ts +31 -7
- package/templates/restaurant-owner/tier5-src/_shared/collection-service.ts +7 -0
- package/templates/retail-store/tier5-src/_shared/collection-service.ts +7 -0
- package/templates/retail-store/tier5-src/_shared/weekly-goal.ts +107 -0
- package/templates/retail-store/tier5-src/himi-branded-lite-home/index.ts +31 -7
- package/templates/retail-store-owner/tier5-src/_shared/collection-service.ts +7 -0
- package/templates/yoga-studio/dev/index.ts +90 -1
- package/templates/yoga-studio/tier5-src/_shared/collection-service.ts +7 -0
- package/templates/yoga-studio/tier5-src/_shared/weekly-goal.ts +107 -0
- package/templates/yoga-studio/tier5-src/himi-booking-bookings/index.ts +41 -4
- package/templates/yoga-studio/tier5-src/himi-branded-lite-home/index.ts +31 -7
- package/templates/yoga-studio-owner/tier5-src/_shared/collection-service.ts +7 -0
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/motion/src/index.d.ts
CHANGED
|
@@ -2,6 +2,19 @@ import type { PermissionStatus } from "@wix/himalaya/sdk-types";
|
|
|
2
2
|
export type { PermissionStatus } from "@wix/himalaya/sdk-types";
|
|
3
3
|
/** Which sensor a watch streams. */
|
|
4
4
|
export type MotionSensor = "steps" | "altitude" | "heading";
|
|
5
|
+
/**
|
|
6
|
+
* Whether `getStepCount` can answer a PAST window right now, and if not, what would fix it.
|
|
7
|
+
*
|
|
8
|
+
* available it can — "steps today" is a real daily total.
|
|
9
|
+
* needs_permission `requestPermission()` (or `openStepHistorySetup()`) would unlock it.
|
|
10
|
+
* needs_setup a system component is missing or out of date — on Android, Google Play
|
|
11
|
+
* services. `openStepHistorySetup()` takes the user to update it.
|
|
12
|
+
* denied the user refused; only the system Settings app can undo that.
|
|
13
|
+
* unsupported this device / build cannot answer a past window: web, macOS, a device
|
|
14
|
+
* with no pedometer, an Android app that links no step store, or a phone
|
|
15
|
+
* without Google Play services. Count live through `watch()` instead.
|
|
16
|
+
*/
|
|
17
|
+
export type StepHistoryStatus = "available" | "needs_permission" | "needs_setup" | "denied" | "unsupported";
|
|
5
18
|
/** What this device can actually do. Never assume — a barometer is common but not universal. */
|
|
6
19
|
export interface MotionAvailability {
|
|
7
20
|
/** Pedometer / step counter present (and, on Android, the runtime permission held). */
|
|
@@ -10,6 +23,9 @@ export interface MotionAvailability {
|
|
|
10
23
|
altimeter: boolean;
|
|
11
24
|
/** Magnetometer / compass present. */
|
|
12
25
|
heading: boolean;
|
|
26
|
+
/** Whether `getStepCount` can answer a past window — see {@link StepHistoryStatus}. An
|
|
27
|
+
* unknown or absent value reads as "unsupported", never as "available". */
|
|
28
|
+
stepHistory: StepHistoryStatus;
|
|
13
29
|
}
|
|
14
30
|
export interface StepSample {
|
|
15
31
|
/** Steps in the sampled window (a DELTA, not a lifetime total). */
|
|
@@ -20,6 +36,13 @@ export interface StepSample {
|
|
|
20
36
|
distanceM?: number;
|
|
21
37
|
/** Floors climbed, when the platform reports it (iOS CMPedometer only). */
|
|
22
38
|
floorsAscended?: number;
|
|
39
|
+
/** Android only: the step counter's RUNNING total since the last device restart. The first
|
|
40
|
+
* sample of a stream carries it with `steps: 0`, so a bundle that saves it (with
|
|
41
|
+
* `bootTimeMs`) can add the steps taken while it was not listening — same boot ⇒ the counter
|
|
42
|
+
* is continuous. Absent on iOS (use `getStepCount` there) and web. */
|
|
43
|
+
stepsSinceBoot?: number;
|
|
44
|
+
/** Android only: when that restart was, epoch ms. A different value means the counter reset. */
|
|
45
|
+
bootTimeMs?: number;
|
|
23
46
|
timestamp: number;
|
|
24
47
|
}
|
|
25
48
|
export interface AltitudeSample {
|
|
@@ -55,15 +78,32 @@ export declare function requestPermission(): Promise<PermissionStatus>;
|
|
|
55
78
|
* an elevation-gain readout on a device with no barometer should say so, not show 0 m.
|
|
56
79
|
*/
|
|
57
80
|
export declare function availability(): Promise<MotionAvailability>;
|
|
81
|
+
/**
|
|
82
|
+
* Take the user to whatever would make `stepHistory` "available": on Android, update Google Play
|
|
83
|
+
* services (`needs_setup`) or grant step access (`needs_permission`). Resolves
|
|
84
|
+
* once the user is back in the app, with whether anything was opened. Call `availability()`
|
|
85
|
+
* again afterwards — opening the store is not the same as installing.
|
|
86
|
+
*
|
|
87
|
+
* iOS, macOS and web have nothing to open and resolve false: iOS step history is CoreMotion's,
|
|
88
|
+
* unlocked by `requestPermission()`. Raise this only from a user gesture — it leaves the app.
|
|
89
|
+
*/
|
|
90
|
+
export declare function openStepHistorySetup(): Promise<boolean>;
|
|
58
91
|
/**
|
|
59
92
|
* Steps between two epoch-ms instants — HISTORICAL, so it can answer "how many steps today"
|
|
60
93
|
* even though the app was not running. Backed by CoreMotion's stored pedometer data (iOS,
|
|
61
|
-
* ~7 days).
|
|
94
|
+
* ~7 days) and, on Android, by an opt-in step store.
|
|
62
95
|
*
|
|
63
|
-
* **ANDROID
|
|
64
|
-
* since boot with no
|
|
65
|
-
*
|
|
66
|
-
*
|
|
96
|
+
* **ANDROID ANSWERS FROM A STEP STORE, NEVER FROM THE APP ITSELF.** The platform step counter
|
|
97
|
+
* exposes only a cumulative total since boot with no dates, and an app the user is not using
|
|
98
|
+
* receives no sensor events, so it cannot keep its own midnight baseline. A store that records on
|
|
99
|
+
* its own fills that, and with several the larger answer wins:
|
|
100
|
+
* - Google's Recording API (Play services records the steps, ~10 days on the device, no
|
|
101
|
+
* account), in an app that links the opt-in `:core-runtime-step-recording` module — its
|
|
102
|
+
* history starts at the first grant, so the first day is partial.
|
|
103
|
+
* Health Connect is not a motion store: read it through `@himalaya/health` (the `health`
|
|
104
|
+
* capability), which the runtime gates per bundle.
|
|
105
|
+
* `availability().stepHistory` says whether one can answer. Otherwise this returns null;
|
|
106
|
+
* accumulate live through `watch({ sensor: "steps" })` instead.
|
|
67
107
|
*
|
|
68
108
|
* Returns null when unavailable / not permitted, and 0 for a genuinely still window — the
|
|
69
109
|
* distinction matters, so don't collapse it with `?? 0` before you have branched on it, or a
|
|
@@ -22,7 +22,7 @@ export declare const CAPABILITY_REGISTRY: {
|
|
|
22
22
|
readonly local_database: readonly ["availability", "count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"];
|
|
23
23
|
readonly location: readonly ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"];
|
|
24
24
|
readonly media_playback: readonly ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"];
|
|
25
|
-
readonly motion: readonly ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "requestPermission", "watchNext", "watchStart", "watchStop"];
|
|
25
|
+
readonly motion: readonly ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "openStepHistorySetup", "requestPermission", "watchNext", "watchStart", "watchStop"];
|
|
26
26
|
readonly on_device_ai: readonly ["availability", "generateText"];
|
|
27
27
|
readonly open_url: readonly ["canOpen", "open"];
|
|
28
28
|
readonly pdf: readonly ["isAvailable", "open"];
|
|
@@ -37,7 +37,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
37
37
|
"local_database": ["availability", "count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
38
38
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
39
39
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
40
|
-
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
40
|
+
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "openStepHistorySetup", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
41
41
|
"on_device_ai": ["availability", "generateText"],
|
|
42
42
|
"open_url": ["canOpen", "open"],
|
|
43
43
|
"pdf": ["isAvailable", "open"],
|
|
@@ -37,7 +37,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
37
37
|
"local_database": ["availability", "count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
38
38
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
39
39
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
40
|
-
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
40
|
+
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "openStepHistorySetup", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
41
41
|
"on_device_ai": ["availability", "generateText"],
|
|
42
42
|
"open_url": ["canOpen", "open"],
|
|
43
43
|
"pdf": ["isAvailable", "open"],
|
|
@@ -37,7 +37,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
37
37
|
"local_database": ["availability", "count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
38
38
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
39
39
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
40
|
-
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
40
|
+
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "openStepHistorySetup", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
41
41
|
"on_device_ai": ["availability", "generateText"],
|
|
42
42
|
"open_url": ["canOpen", "open"],
|
|
43
43
|
"pdf": ["isAvailable", "open"],
|
|
@@ -37,7 +37,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
37
37
|
"local_database": ["availability", "count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
38
38
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
39
39
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
40
|
-
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
40
|
+
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "openStepHistorySetup", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
41
41
|
"on_device_ai": ["availability", "generateText"],
|
|
42
42
|
"open_url": ["canOpen", "open"],
|
|
43
43
|
"pdf": ["isAvailable", "open"],
|
|
@@ -37,7 +37,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
37
37
|
"local_database": ["availability", "count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
38
38
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
39
39
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
40
|
-
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
40
|
+
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "openStepHistorySetup", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
41
41
|
"on_device_ai": ["availability", "generateText"],
|
|
42
42
|
"open_url": ["canOpen", "open"],
|
|
43
43
|
"pdf": ["isAvailable", "open"],
|
|
@@ -37,7 +37,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
37
37
|
"local_database": ["availability", "count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
38
38
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
39
39
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
40
|
-
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
40
|
+
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "openStepHistorySetup", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
41
41
|
"on_device_ai": ["availability", "generateText"],
|
|
42
42
|
"open_url": ["canOpen", "open"],
|
|
43
43
|
"pdf": ["isAvailable", "open"],
|
|
@@ -64,6 +64,13 @@ function normalizePermissionStatus(s) {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
// ../../core/sdk/motion/src/index.ts
|
|
67
|
+
var STEP_HISTORY_STATUSES = [
|
|
68
|
+
"available",
|
|
69
|
+
"needs_permission",
|
|
70
|
+
"needs_setup",
|
|
71
|
+
"denied",
|
|
72
|
+
"unsupported"
|
|
73
|
+
];
|
|
67
74
|
async function getPermissionStatus() {
|
|
68
75
|
const r = await dispatch("capability.motion.getPermissionStatus");
|
|
69
76
|
return normalizePermissionStatus(r?.status);
|
|
@@ -77,9 +84,17 @@ async function availability() {
|
|
|
77
84
|
return {
|
|
78
85
|
steps: r?.steps === true,
|
|
79
86
|
altimeter: r?.altimeter === true,
|
|
80
|
-
heading: r?.heading === true
|
|
87
|
+
heading: r?.heading === true,
|
|
88
|
+
stepHistory: normalizeStepHistory(r?.stepHistory)
|
|
81
89
|
};
|
|
82
90
|
}
|
|
91
|
+
function normalizeStepHistory(raw) {
|
|
92
|
+
return STEP_HISTORY_STATUSES.includes(raw) ? raw : "unsupported";
|
|
93
|
+
}
|
|
94
|
+
async function openStepHistorySetup() {
|
|
95
|
+
const r = await dispatch("capability.motion.openStepHistorySetup");
|
|
96
|
+
return r?.opened === true;
|
|
97
|
+
}
|
|
83
98
|
async function getStepCount(fromMs, toMs) {
|
|
84
99
|
const r = await dispatch("capability.motion.getStepCount", { fromMs, toMs });
|
|
85
100
|
return typeof r?.steps === "number" ? r.steps : null;
|
|
@@ -142,6 +157,7 @@ export {
|
|
|
142
157
|
getHeading,
|
|
143
158
|
getPermissionStatus,
|
|
144
159
|
getStepCount,
|
|
160
|
+
openStepHistorySetup,
|
|
145
161
|
requestPermission,
|
|
146
162
|
version,
|
|
147
163
|
watch
|
|
@@ -37,7 +37,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
37
37
|
"local_database": ["availability", "count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
38
38
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
39
39
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
40
|
-
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
40
|
+
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "openStepHistorySetup", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
41
41
|
"on_device_ai": ["availability", "generateText"],
|
|
42
42
|
"open_url": ["canOpen", "open"],
|
|
43
43
|
"pdf": ["isAvailable", "open"],
|
|
@@ -22,7 +22,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
22
22
|
"local_database": ["availability", "count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
23
23
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
24
24
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
25
|
-
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
25
|
+
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "openStepHistorySetup", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
26
26
|
"on_device_ai": ["availability", "generateText"],
|
|
27
27
|
"open_url": ["canOpen", "open"],
|
|
28
28
|
"pdf": ["isAvailable", "open"],
|
|
@@ -37,7 +37,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
37
37
|
"local_database": ["availability", "count", "get", "getAll", "purge", "query", "queueDepth", "queueDrain", "queueEnqueue", "remove", "upsert"],
|
|
38
38
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
39
39
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
40
|
-
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
40
|
+
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "openStepHistorySetup", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
41
41
|
"on_device_ai": ["availability", "generateText"],
|
|
42
42
|
"open_url": ["canOpen", "open"],
|
|
43
43
|
"pdf": ["isAvailable", "open"],
|