@wix/himalaya-cli 0.1949.0 → 0.1950.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/sdk/network/src/index.d.ts +22 -0
- 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/_types/core/ts/src/message-format.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/l10n.mjs +1 -8
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/location.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/motion.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/network.mjs +19 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/photos.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +1 -8
- 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/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{a8cfd0e17359578587e8937e88dedd40b46d533f08b4d2fdac4c47d5bae6f385.bin → bb3ece9e6e814275817059f029f1b2db624dceb90d9e1a53ebae2b45fe6d36e5.bin} +1 -1
- package/dist/browser-plane/sw.js +9 -9
- package/dist/cli.mjs +107 -79
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/release-notes.md +11 -0
- package/guides/sdk-reference.json +28 -0
- package/guides/web-page-sdk-reference.md +1 -1
- package/package.json +2 -2
|
@@ -37,3 +37,25 @@ export declare function status(): Promise<NetworkStatus>;
|
|
|
37
37
|
* ```
|
|
38
38
|
*/
|
|
39
39
|
export declare function subscribe(handler: string): Promise<NetworkStatus>;
|
|
40
|
+
/** One answer from {@link watchNext}: a settled change, a quiet window, or the end of the watch. */
|
|
41
|
+
export type NetworkWatchEvent = {
|
|
42
|
+
event: "change" | "timeout";
|
|
43
|
+
status: NetworkStatus;
|
|
44
|
+
} | {
|
|
45
|
+
event: "ended";
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Start a change watch — the pull twin of {@link subscribe}, for a WebView page, which has no
|
|
49
|
+
* worker to push into. Resolves with the watch id and the status at the moment of starting;
|
|
50
|
+
* loop on {@link watchNext} and call {@link watchStop} when done. Changes are debounced and
|
|
51
|
+
* deduped exactly as `subscribe` does. Returns `null` where the host has no network source.
|
|
52
|
+
*/
|
|
53
|
+
export declare function watchStart(): Promise<{
|
|
54
|
+
watchId: string;
|
|
55
|
+
status: NetworkStatus;
|
|
56
|
+
} | null>;
|
|
57
|
+
/** Park until the next settled change (`change`), the window elapses (`timeout`, with the
|
|
58
|
+
* current status), or the watch is stopped (`ended`). */
|
|
59
|
+
export declare function watchNext(watchId: string, timeoutMs?: number): Promise<NetworkWatchEvent>;
|
|
60
|
+
/** Stop a watch; a parked {@link watchNext} resolves `ended`. */
|
|
61
|
+
export declare function watchStop(watchId: string): Promise<void>;
|
|
@@ -27,7 +27,7 @@ export declare const CAPABILITY_REGISTRY: {
|
|
|
27
27
|
readonly location: readonly ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"];
|
|
28
28
|
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"];
|
|
29
29
|
readonly motion: readonly ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "openStepHistorySetup", "requestPermission", "watchNext", "watchStart", "watchStop"];
|
|
30
|
-
readonly network: readonly ["status", "subscribe"];
|
|
30
|
+
readonly network: readonly ["status", "subscribe", "watchNext", "watchStart", "watchStop"];
|
|
31
31
|
readonly on_device_ai: readonly ["availability", "generateText", "proofreadText", "rewriteText", "summarizeText"];
|
|
32
32
|
readonly open_url: readonly ["canOpen", "open"];
|
|
33
33
|
readonly pdf: readonly ["isAvailable", "open"];
|
|
@@ -10,7 +10,7 @@ export type PluralCategory = "zero" | "one" | "two" | "few" | "many" | "other";
|
|
|
10
10
|
*/
|
|
11
11
|
export declare function pluralCategory(n: number, locale: string): PluralCategory;
|
|
12
12
|
/**
|
|
13
|
-
* The explicit CLDR table
|
|
13
|
+
* The explicit CLDR table every renderer uses (web, Swift and Kotlin ports alike).
|
|
14
14
|
*
|
|
15
15
|
* EXPORTED so a test can compare it against `Intl.PluralRules` directly. Asserting
|
|
16
16
|
* through `pluralCategory` cannot check it: on any engine that has `Intl` the branch
|
|
@@ -42,7 +42,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
42
42
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
43
43
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
44
44
|
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "openStepHistorySetup", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
45
|
-
"network": ["status", "subscribe"],
|
|
45
|
+
"network": ["status", "subscribe", "watchNext", "watchStart", "watchStop"],
|
|
46
46
|
"on_device_ai": ["availability", "generateText", "proofreadText", "rewriteText", "summarizeText"],
|
|
47
47
|
"open_url": ["canOpen", "open"],
|
|
48
48
|
"pdf": ["isAvailable", "open"],
|
|
@@ -42,7 +42,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
42
42
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
43
43
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
44
44
|
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "openStepHistorySetup", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
45
|
-
"network": ["status", "subscribe"],
|
|
45
|
+
"network": ["status", "subscribe", "watchNext", "watchStart", "watchStop"],
|
|
46
46
|
"on_device_ai": ["availability", "generateText", "proofreadText", "rewriteText", "summarizeText"],
|
|
47
47
|
"open_url": ["canOpen", "open"],
|
|
48
48
|
"pdf": ["isAvailable", "open"],
|
|
@@ -42,7 +42,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
42
42
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
43
43
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
44
44
|
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "openStepHistorySetup", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
45
|
-
"network": ["status", "subscribe"],
|
|
45
|
+
"network": ["status", "subscribe", "watchNext", "watchStart", "watchStop"],
|
|
46
46
|
"on_device_ai": ["availability", "generateText", "proofreadText", "rewriteText", "summarizeText"],
|
|
47
47
|
"open_url": ["canOpen", "open"],
|
|
48
48
|
"pdf": ["isAvailable", "open"],
|
|
@@ -42,7 +42,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
42
42
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
43
43
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
44
44
|
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "openStepHistorySetup", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
45
|
-
"network": ["status", "subscribe"],
|
|
45
|
+
"network": ["status", "subscribe", "watchNext", "watchStart", "watchStop"],
|
|
46
46
|
"on_device_ai": ["availability", "generateText", "proofreadText", "rewriteText", "summarizeText"],
|
|
47
47
|
"open_url": ["canOpen", "open"],
|
|
48
48
|
"pdf": ["isAvailable", "open"],
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
// ../../core/ts/src/message-format.ts
|
|
2
2
|
function pluralCategory(n, locale2) {
|
|
3
|
-
|
|
4
|
-
if (typeof Intl !== "undefined" && typeof Intl.PluralRules === "function") {
|
|
5
|
-
try {
|
|
6
|
-
return new Intl.PluralRules(lang).select(n);
|
|
7
|
-
} catch {
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
return pluralCategoryFallback(n, lang);
|
|
3
|
+
return pluralCategoryFallback(n, (locale2 || "en").split(/[-_]/)[0].toLowerCase());
|
|
11
4
|
}
|
|
12
5
|
function pluralCategoryFallback(n, locale2) {
|
|
13
6
|
const lang = (locale2 || "en").split(/[-_]/)[0].toLowerCase();
|
|
@@ -42,7 +42,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
42
42
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
43
43
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
44
44
|
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "openStepHistorySetup", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
45
|
-
"network": ["status", "subscribe"],
|
|
45
|
+
"network": ["status", "subscribe", "watchNext", "watchStart", "watchStop"],
|
|
46
46
|
"on_device_ai": ["availability", "generateText", "proofreadText", "rewriteText", "summarizeText"],
|
|
47
47
|
"open_url": ["canOpen", "open"],
|
|
48
48
|
"pdf": ["isAvailable", "open"],
|
|
@@ -42,7 +42,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
42
42
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
43
43
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
44
44
|
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "openStepHistorySetup", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
45
|
-
"network": ["status", "subscribe"],
|
|
45
|
+
"network": ["status", "subscribe", "watchNext", "watchStart", "watchStop"],
|
|
46
46
|
"on_device_ai": ["availability", "generateText", "proofreadText", "rewriteText", "summarizeText"],
|
|
47
47
|
"open_url": ["canOpen", "open"],
|
|
48
48
|
"pdf": ["isAvailable", "open"],
|
|
@@ -21,8 +21,9 @@ function normalizeNetworkStatus(raw) {
|
|
|
21
21
|
const type = TYPES.includes(r.type) ? r.type : "unknown";
|
|
22
22
|
return {
|
|
23
23
|
online,
|
|
24
|
-
// An offline device has no link, whatever a stale `type` said
|
|
25
|
-
|
|
24
|
+
// An offline device has no link, whatever a stale `type` said — except `unknown`, which is
|
|
25
|
+
// what a host says before its first reading (nothing is known, not "no link").
|
|
26
|
+
type: online ? type === "none" ? "unknown" : type : r.type === "unknown" ? "unknown" : "none",
|
|
26
27
|
expensive: online && (r.expensive === true || r.expensive === "true"),
|
|
27
28
|
constrained: online && (r.constrained === true || r.constrained === "true")
|
|
28
29
|
};
|
|
@@ -37,9 +38,24 @@ async function subscribe(handler) {
|
|
|
37
38
|
}
|
|
38
39
|
return normalizeNetworkStatus(await dispatch("capability.network.subscribe", { onChange: handler }));
|
|
39
40
|
}
|
|
41
|
+
async function watchStart() {
|
|
42
|
+
const r = await dispatch("capability.network.watchStart", {});
|
|
43
|
+
return typeof r?.watchId === "string" ? { watchId: r.watchId, status: normalizeNetworkStatus(r.status) } : null;
|
|
44
|
+
}
|
|
45
|
+
async function watchNext(watchId, timeoutMs = 3e4) {
|
|
46
|
+
const r = await dispatch("capability.network.watchNext", { watchId, timeoutMs });
|
|
47
|
+
if (r?.event === "change" || r?.event === "timeout") return { event: r.event, status: normalizeNetworkStatus(r.status) };
|
|
48
|
+
return { event: "ended" };
|
|
49
|
+
}
|
|
50
|
+
async function watchStop(watchId) {
|
|
51
|
+
await dispatch("capability.network.watchStop", { watchId });
|
|
52
|
+
}
|
|
40
53
|
export {
|
|
41
54
|
normalizeNetworkStatus,
|
|
42
55
|
status,
|
|
43
|
-
subscribe
|
|
56
|
+
subscribe,
|
|
57
|
+
watchNext,
|
|
58
|
+
watchStart,
|
|
59
|
+
watchStop
|
|
44
60
|
};
|
|
45
61
|
//# sourceMappingURL=network.mjs.map
|
|
@@ -42,7 +42,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
42
42
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
43
43
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
44
44
|
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "openStepHistorySetup", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
45
|
-
"network": ["status", "subscribe"],
|
|
45
|
+
"network": ["status", "subscribe", "watchNext", "watchStart", "watchStop"],
|
|
46
46
|
"on_device_ai": ["availability", "generateText", "proofreadText", "rewriteText", "summarizeText"],
|
|
47
47
|
"open_url": ["canOpen", "open"],
|
|
48
48
|
"pdf": ["isAvailable", "open"],
|
|
@@ -7207,14 +7207,7 @@ function createRedirectSession(req = {}, opts) {
|
|
|
7207
7207
|
|
|
7208
7208
|
// ../../core/ts/src/message-format.ts
|
|
7209
7209
|
function pluralCategory(n, locale) {
|
|
7210
|
-
|
|
7211
|
-
if (typeof Intl !== "undefined" && typeof Intl.PluralRules === "function") {
|
|
7212
|
-
try {
|
|
7213
|
-
return new Intl.PluralRules(lang).select(n);
|
|
7214
|
-
} catch {
|
|
7215
|
-
}
|
|
7216
|
-
}
|
|
7217
|
-
return pluralCategoryFallback(n, lang);
|
|
7210
|
+
return pluralCategoryFallback(n, (locale || "en").split(/[-_]/)[0].toLowerCase());
|
|
7218
7211
|
}
|
|
7219
7212
|
function pluralCategoryFallback(n, locale) {
|
|
7220
7213
|
const lang = (locale || "en").split(/[-_]/)[0].toLowerCase();
|
|
@@ -27,7 +27,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
27
27
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
28
28
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
29
29
|
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "openStepHistorySetup", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
30
|
-
"network": ["status", "subscribe"],
|
|
30
|
+
"network": ["status", "subscribe", "watchNext", "watchStart", "watchStop"],
|
|
31
31
|
"on_device_ai": ["availability", "generateText", "proofreadText", "rewriteText", "summarizeText"],
|
|
32
32
|
"open_url": ["canOpen", "open"],
|
|
33
33
|
"pdf": ["isAvailable", "open"],
|
|
@@ -42,7 +42,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
42
42
|
"location": ["backgroundStart", "backgroundStop", "getCurrent", "getPermissionStatus", "regionAdd", "regionClear", "regionList", "regionNext", "regionRemove", "regionSupport", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
43
43
|
"media_playback": ["download", "getCapabilities", "getState", "next", "pause", "pictureInPicture", "play", "presentFullscreen", "previous", "release", "removeDownload", "seek", "seekTo", "setMuted", "setQueue", "setRate", "skip", "status", "stop", "subscribeStatus", "unsubscribeStatus"],
|
|
44
44
|
"motion": ["availability", "getAltitude", "getHeading", "getPermissionStatus", "getStepCount", "openStepHistorySetup", "requestPermission", "watchNext", "watchStart", "watchStop"],
|
|
45
|
-
"network": ["status", "subscribe"],
|
|
45
|
+
"network": ["status", "subscribe", "watchNext", "watchStart", "watchStop"],
|
|
46
46
|
"on_device_ai": ["availability", "generateText", "proofreadText", "rewriteText", "summarizeText"],
|
|
47
47
|
"open_url": ["canOpen", "open"],
|
|
48
48
|
"pdf": ["isAvailable", "open"],
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"files": [
|
|
3
3
|
{
|
|
4
4
|
"name": "sw.js",
|
|
5
|
-
"bytes":
|
|
5
|
+
"bytes": 2834124
|
|
6
6
|
},
|
|
7
7
|
{
|
|
8
8
|
"name": "host.html",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"bytes": 24320
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
"name": "preview-deferred/
|
|
24
|
+
"name": "preview-deferred/bb3ece9e6e814275817059f029f1b2db624dceb90d9e1a53ebae2b45fe6d36e5.bin",
|
|
25
25
|
"bytes": 488215
|
|
26
26
|
},
|
|
27
27
|
{
|
|
@@ -79,10 +79,10 @@
|
|
|
79
79
|
],
|
|
80
80
|
"deferred": [
|
|
81
81
|
{
|
|
82
|
-
"key": "assets/pdf-
|
|
82
|
+
"key": "assets/pdf-BwjYkmJt.js",
|
|
83
83
|
"contentType": "application/javascript; charset=utf-8",
|
|
84
|
-
"sha256": "
|
|
85
|
-
"file": "preview-deferred/
|
|
84
|
+
"sha256": "bb3ece9e6e814275817059f029f1b2db624dceb90d9e1a53ebae2b45fe6d36e5",
|
|
85
|
+
"file": "preview-deferred/bb3ece9e6e814275817059f029f1b2db624dceb90d9e1a53ebae2b45fe6d36e5.bin"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
"key": "assets/pdf.worker.min-BGnVRhRG.js",
|