@wix/himalaya-cli 0.1714.0 → 0.1715.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/webview/src/dispatcher.d.ts +4 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/webview/src/index.d.ts +14 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/webview/src/site-events.d.ts +54 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/webview-page/src/capabilities.generated.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/webview-page/src/client.d.ts +24 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/webview-page/src/index.d.ts +7 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/webview-page.mjs +21 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/webview.mjs +208 -1
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{eebfb701744c8f130b659a79b33f563c2a47f5104d624fe7e108a064dce68d1b.bin → beb47fb3bdf1fe461bde8322263c72e10006079380c5551599c470308b4d3e31.bin} +1 -1
- package/dist/browser-plane/sw.js +1 -1
- package/dist/cli.mjs +39 -38
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/release-notes.md +16 -0
- package/guides/sdk-reference.json +29 -1
- package/guides/webview-page-sdk.md +47 -0
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -34080,6 +34080,7 @@ function resolveIdiom(tokens2, ctx = {}) {
|
|
|
34080
34080
|
var IDIOM_CONTEXTS, UNSAFE_KEYS;
|
|
34081
34081
|
var init_idiom = __esm({
|
|
34082
34082
|
"../../core/ts/src/idiom.ts"() {
|
|
34083
|
+
"use strict";
|
|
34083
34084
|
init_define_HHP_CATALOG();
|
|
34084
34085
|
IDIOM_CONTEXTS = {
|
|
34085
34086
|
ios: { native: ["ios"] },
|
|
@@ -236232,51 +236233,51 @@ var init_preview_assets_generated = __esm({
|
|
|
236232
236233
|
init_define_HHP_CATALOG();
|
|
236233
236234
|
init_preview_assets_format();
|
|
236234
236235
|
PREVIEW_ASSET_MANIFEST = [
|
|
236235
|
-
{ key: "assets/DashboardHost-
|
|
236236
|
-
{ key: "assets/DevDrawer-
|
|
236237
|
-
{ key: "assets/IdiomCompare-
|
|
236238
|
-
{ key: "assets/LightboxViewer-
|
|
236239
|
-
{ key: "assets/OfflineReadingBar-
|
|
236240
|
-
{ key: "assets/PhonePreviewControl-
|
|
236241
|
-
{ key: "assets/SchemeCompare-
|
|
236242
|
-
{ key: "assets/WixFrogTelemetrySink-
|
|
236236
|
+
{ key: "assets/DashboardHost-TJVNV-Ez.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2985, sha256: "0784c0aa4c221c035146ae43475f6a256b9da49ee0dffd76d299579b89aae938" },
|
|
236237
|
+
{ key: "assets/DevDrawer-DZOT8K4V.js", contentType: "application/javascript; charset=utf-8", offset: 2993, length: 16783, sha256: "6efc02c7bc22dddda34ae595b426d86b4903e9adc38c161e541be0181c5d4e8e" },
|
|
236238
|
+
{ key: "assets/IdiomCompare-DMOrFCyo.js", contentType: "application/javascript; charset=utf-8", offset: 19776, length: 1926, sha256: "dd1363d3979b981125b31077761d8d47ad56aeb3305d17ce517c27c784d3cf83" },
|
|
236239
|
+
{ key: "assets/LightboxViewer-B2wO1by3.js", contentType: "application/javascript; charset=utf-8", offset: 21702, length: 17382, sha256: "8956d1be7fe0974f8f1bd1222dec79cdf752eb83106811d1b9c952b4c2fa46c8" },
|
|
236240
|
+
{ key: "assets/OfflineReadingBar-iq9cOP1m.js", contentType: "application/javascript; charset=utf-8", offset: 39084, length: 1646, sha256: "c2ea5f4ac81aef30bed983028c53155bb36e2d6579c55f09b1f11c4f2e28797a" },
|
|
236241
|
+
{ key: "assets/PhonePreviewControl-B-U6bkOu.js", contentType: "application/javascript; charset=utf-8", offset: 40730, length: 37851, sha256: "10a88398fe0230849625b6f3165d662b07bb05d1886fae0b953a72b8210146a3" },
|
|
236242
|
+
{ key: "assets/SchemeCompare-YfQzM_Qs.js", contentType: "application/javascript; charset=utf-8", offset: 78581, length: 1858, sha256: "32f885a0f6d53cfb1cdc0ddc4d8a835ac8e473ceedc7130482b194c32f423199" },
|
|
236243
|
+
{ key: "assets/WixFrogTelemetrySink-DbPlFz5b.js", contentType: "application/javascript; charset=utf-8", offset: 80439, length: 3515, sha256: "952f3d8e8c8d605f2dce9f2ef343a92c00ff7be63ae343976432cb955a487ccf" },
|
|
236243
236244
|
{ key: "assets/calendar-ics-BvfIYWjG.js", contentType: "application/javascript; charset=utf-8", offset: 83954, length: 2192, sha256: "1636167041e9829ceccd3544297b86b8475c38bd2f759c4dbc17c813dc6e9254" },
|
|
236244
236245
|
{ key: "assets/catalog-CAoUWITw.js", contentType: "application/javascript; charset=utf-8", offset: 86146, length: 26046, sha256: "4c270ca3051f77d761aef1297125e02339d48493dd2b84a0cacf0faf41aa8cb3" },
|
|
236245
|
-
{ key: "assets/catalogFontFaces-
|
|
236246
|
+
{ key: "assets/catalogFontFaces-nF_oKGXf.js", contentType: "application/javascript; charset=utf-8", offset: 112192, length: 1111, sha256: "b27b02de90dc8a48a6f6da0b26118985cda90c531d20dfb6e080c12393b7c2e4" },
|
|
236246
236247
|
{ key: "assets/contacts-vcard-BcohPQ0m.js", contentType: "application/javascript; charset=utf-8", offset: 113303, length: 2567, sha256: "c4ff75e96cd909bbb9182c5dc78794fcebc65139fbddef2537711d774fb33ad0" },
|
|
236247
|
-
{ key: "assets/files-transfer-
|
|
236248
|
+
{ key: "assets/files-transfer-D4KRpjs-.js", contentType: "application/javascript; charset=utf-8", offset: 115870, length: 6446, sha256: "b950b5e04c8669396726a349a90cb65770f8ad1b605d08ca5699b1b667c86d7f" },
|
|
236248
236249
|
{ key: "assets/frogActionMap-CTMe3Bz1.js", contentType: "application/javascript; charset=utf-8", offset: 122316, length: 1172, sha256: "9f1ce4c70a680dfb902949e1f482c7e47500b69c3350cd091b1b51d674032d53" },
|
|
236249
|
-
{ key: "assets/frogApiRules-
|
|
236250
|
+
{ key: "assets/frogApiRules-Z23RcWv8.js", contentType: "application/javascript; charset=utf-8", offset: 123488, length: 2207, sha256: "343b43947f578e3ce3409b239ad1b0d118803ff53177e7176f6666a8752ffa98" },
|
|
236250
236251
|
{ key: "assets/frogScreenMap-S_IRnz20.js", contentType: "application/javascript; charset=utf-8", offset: 125695, length: 1067, sha256: "22b2f71e1b06df8f1e79b890d47fe42e983d37865c2cc9be753e4121764c91e1" },
|
|
236251
236252
|
{ key: "assets/glassPreviewBrowser-DONaOehd.js", contentType: "application/javascript; charset=utf-8", offset: 126762, length: 6578, sha256: "4402c4cddd2a564e7466cdf1e12a0e0277c0400b288e1e5eda1d23e797599d31" },
|
|
236252
236253
|
{ key: "assets/image-preparation-Cj4gldm6.js", contentType: "application/javascript; charset=utf-8", offset: 133340, length: 2704, sha256: "32944ea587c2f3b84389b66b50a850437560238f1c8d33b6275973ee04eee865" },
|
|
236253
|
-
{ key: "assets/index-
|
|
236254
|
-
{ key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
236255
|
-
{ key: "assets/pdf-
|
|
236256
|
-
{ key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
236257
|
-
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset:
|
|
236258
|
-
{ key: "assets/pdfDocument-
|
|
236259
|
-
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
236260
|
-
{ key: "assets/scrollLinkedRuntime-
|
|
236261
|
-
{ key: "assets/webviewBridgeHost-
|
|
236262
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
236263
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
236264
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
236265
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
236266
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
236267
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
236268
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
236269
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
236270
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
236271
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
236272
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
236273
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
236274
|
-
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
236275
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
236276
|
-
{ key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset:
|
|
236277
|
-
{ key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset:
|
|
236278
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
236279
|
-
{ key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
236254
|
+
{ key: "assets/index-DY-KalQg.js", contentType: "application/javascript; charset=utf-8", offset: 136044, length: 1582484, sha256: "aa19cfe8f5ecd27239221c60722ac0e43b5f7acb2e53bcccf8a23c02be4494ae" },
|
|
236255
|
+
{ key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset: 1718528, length: 7751, sha256: "42a78b508d0f309f6a4a6efbb8669015211b3c26574c5b0929884c4d9d20b806" },
|
|
236256
|
+
{ key: "assets/pdf-BuGHh8Xx.js", contentType: "application/javascript; charset=utf-8", offset: 1726279, length: 488215, sha256: "beb47fb3bdf1fe461bde8322263c72e10006079380c5551599c470308b4d3e31" },
|
|
236257
|
+
{ key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset: 2214494, length: 90, sha256: "521a0e528916d678d7588b2cddf3dadd3bb959a6d62426382f61c77a82017e35" },
|
|
236258
|
+
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 2214584, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
|
|
236259
|
+
{ key: "assets/pdfDocument-Bv2tUd-K.js", contentType: "application/javascript; charset=utf-8", offset: 3531618, length: 3470, sha256: "033b1cf5239f7c2112d3127c2caca6a7442affc785e8787052315b770d2a411e" },
|
|
236260
|
+
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3535088, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
|
|
236261
|
+
{ key: "assets/scrollLinkedRuntime-BwUNLH9d.js", contentType: "application/javascript; charset=utf-8", offset: 3537354, length: 2278, sha256: "f21ff8606ceab910a098a17111981abe24656ec728ad6214ff7a9183e38c3443" },
|
|
236262
|
+
{ key: "assets/webviewBridgeHost-Cr4y7Edr.js", contentType: "application/javascript; charset=utf-8", offset: 3539632, length: 9889, sha256: "4f7e583fd7e892fbc2f53bff9bc19b715c13974e57feb80d4331e52c84b48a67" },
|
|
236263
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3549521, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
236264
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3554131, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
236265
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 4042715, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
236266
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 4133639, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
236267
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 4224623, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
236268
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 4315603, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
236269
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4406475, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
236270
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4497455, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
236271
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4606091, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
236272
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4715175, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
236273
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4824223, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
236274
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4931923, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
236275
|
+
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 5020031, length: 6818, sha256: "835250c3d8004f27c2b67f9b471984351ba6df07b916d97e33b43c691200a18c" },
|
|
236276
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 5026849, length: 4924, sha256: "2a02450960d24b572b85250107abecf1b62df809ad935dfe513a864703bf223d" },
|
|
236277
|
+
{ key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 5031773, length: 11457, sha256: "6cb2b75264fa5fa2b4d28851878a5eab0712900e8b3a6c2370cc661d6d820805" },
|
|
236278
|
+
{ key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset: 5043230, length: 1171, sha256: "9e2c3a0faaf05d5471badf167a4d3bdf1c4e6dd65c432eea6d254158bfd99585" },
|
|
236279
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 5044401, length: 23047, sha256: "20d1459e3f896f344e478e613d0c979a0de02e81a929a45d3a0ef6a53af36441" },
|
|
236280
|
+
{ key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset: 5067448, length: 23064, sha256: "8655cfe9c74212ec5dafecb49d2fdeb48b19f1bd8a710091e3e55631f9b4ab06" }
|
|
236280
236281
|
];
|
|
236281
236282
|
}
|
|
236282
236283
|
});
|
|
Binary file
|
package/guides/release-notes.md
CHANGED
|
@@ -14,6 +14,22 @@ areas, always in the same order, so you can skim for the one you care about.
|
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
+
## 2026-11-14
|
|
18
|
+
|
|
19
|
+
### Logic, data & SDKs
|
|
20
|
+
|
|
21
|
+
- **A worker hears what the website on its screen is doing: the page title, the page path, whether a
|
|
22
|
+
member is signed in to the site, and the Wix cart count.** Subscribe with `onSiteEvent(cb)` from
|
|
23
|
+
`@himalaya/webview` (or read `siteState(instanceId)`) on a screen whose website page is a
|
|
24
|
+
`sitePage(site, { path, bridge: "worker" })` on the site your app is built for, and bind the state to
|
|
25
|
+
native UI: the app-bar title, a cart badge, a "Sign in" row. The app reads the title, path and member
|
|
26
|
+
state itself, so the site needs no edit and the page cannot fake them. On a Wix site the app also reads
|
|
27
|
+
the number on the header cart icon; it is best effort, and `null` means unknown (no cart icon), so hide
|
|
28
|
+
the badge then. Events stop while the page is off your site, and the full state arrives again when it
|
|
29
|
+
comes back. A page that runs `@wix/himalaya/webview-page` (Base44 and others) can add what the app
|
|
30
|
+
cannot see with `himalaya.site.report({ cart, member })`; what the app reads always wins. iOS, macOS and
|
|
31
|
+
Android; nothing arrives on web, where the site is in a cross-origin frame. (#5808)
|
|
32
|
+
|
|
17
33
|
## 2026-11-13
|
|
18
34
|
|
|
19
35
|
### Getting started & the CLI
|
|
@@ -6349,6 +6349,13 @@
|
|
|
6349
6349
|
"decl": "export {\n PAGE_HANDSHAKE_CAPABILITY,\n PAGE_HANDSHAKE_METHOD,\n type ExposedPageCapability,\n type PageCapabilityRequest,\n type PageCapabilityResponse,\n type PageConsoleEvent,\n type PageCtx,\n type PageLifecycleEvent,\n type PageRequestHandler,\n type PageStream,\n} from \"./dispatcher.js\";",
|
|
6350
6350
|
"verificationChecked": true
|
|
6351
6351
|
},
|
|
6352
|
+
{
|
|
6353
|
+
"name": "\"./site-events.js\"",
|
|
6354
|
+
"kind": "reexport",
|
|
6355
|
+
"jsdoc": "",
|
|
6356
|
+
"decl": "export type { SiteEvent, SiteEventName, SiteEventSource, SiteRoute, SiteSnapshot } from \"./site-events.js\";",
|
|
6357
|
+
"verificationChecked": true
|
|
6358
|
+
},
|
|
6352
6359
|
{
|
|
6353
6360
|
"name": "postToPage",
|
|
6354
6361
|
"kind": "function",
|
|
@@ -6398,6 +6405,20 @@
|
|
|
6398
6405
|
"decl": "export function onPageConsole(cb: (e: PageConsoleEvent) => void): () => void;",
|
|
6399
6406
|
"verificationChecked": true
|
|
6400
6407
|
},
|
|
6408
|
+
{
|
|
6409
|
+
"name": "onSiteEvent",
|
|
6410
|
+
"kind": "function",
|
|
6411
|
+
"jsdoc": "/**\n * Observe site events of the screen's SITE-TRUSTED page (a `role: \"primary\"`,\n * `bridge: \"worker\"` site WebView on the site baked into the app): `title`, `route` and `member` from\n * the host, `cart` from the binary's Wix adapter (best effort: `null` is unknown, hide a badge), and\n * whatever the page reports itself with `himalaya.site.report(…)`. Precedence per field: host >\n * adapter > page. Each event carries the merged `state`; the host re-sends a `snapshot` whenever the\n * channel attaches (a mount, a return to the site after leaving it). Without a site-trusted bridge\n * nothing is emitted. Returns an unsubscribe function.\n */",
|
|
6412
|
+
"decl": "export function onSiteEvent(cb: (e: SiteEvent) => void): () => void;",
|
|
6413
|
+
"verificationChecked": true
|
|
6414
|
+
},
|
|
6415
|
+
{
|
|
6416
|
+
"name": "siteState",
|
|
6417
|
+
"kind": "function",
|
|
6418
|
+
"jsdoc": "/** The merged site snapshot of one page instance, or `undefined` before anything was heard from it. */",
|
|
6419
|
+
"decl": "export function siteState(instanceId: string): SiteSnapshot | undefined;",
|
|
6420
|
+
"verificationChecked": true
|
|
6421
|
+
},
|
|
6401
6422
|
{
|
|
6402
6423
|
"name": "exposeCapabilitiesToPage",
|
|
6403
6424
|
"kind": "function",
|
|
@@ -6430,7 +6451,7 @@
|
|
|
6430
6451
|
"name": "\"./client.js\"",
|
|
6431
6452
|
"kind": "reexport",
|
|
6432
6453
|
"jsdoc": "",
|
|
6433
|
-
"decl": "export type {\n PageEventHandler,\n WebViewPageError,\n WebViewPageEvent,\n WebViewPageRequest,\n WebViewPageResponse,\n WebViewPageStreamEnvelope,\n} from \"./client.js\";",
|
|
6454
|
+
"decl": "export type {\n PageEventHandler,\n PageSite,\n SiteReport,\n WebViewPageError,\n WebViewPageEvent,\n WebViewPageRequest,\n WebViewPageResponse,\n WebViewPageStreamEnvelope,\n} from \"./client.js\";",
|
|
6434
6455
|
"verificationChecked": true
|
|
6435
6456
|
},
|
|
6436
6457
|
{
|
|
@@ -6475,6 +6496,13 @@
|
|
|
6475
6496
|
"decl": "export const himalaya = client.merge({}) as HimalayaPageSdk;",
|
|
6476
6497
|
"verificationChecked": true
|
|
6477
6498
|
},
|
|
6499
|
+
{
|
|
6500
|
+
"name": "site",
|
|
6501
|
+
"kind": "const",
|
|
6502
|
+
"jsdoc": "/**\n * Report site facts the host cannot see (Base44 and other sites): `cart`, the\n * website's `member`, and — only where no host reports them — `title` and `route`. Fire-and-forget;\n * the host's own title, route and member always win. Same as `himalaya.site.report(fields)`.\n */",
|
|
6503
|
+
"decl": "export const site = client.site;",
|
|
6504
|
+
"verificationChecked": true
|
|
6505
|
+
},
|
|
6478
6506
|
{
|
|
6479
6507
|
"name": "health",
|
|
6480
6508
|
"kind": "const",
|
|
@@ -300,6 +300,53 @@ and the site's header, menu, footer and ads stay hidden. The page still cannot n
|
|
|
300
300
|
action or call a native capability itself: it reaches native code only through the worker's declared
|
|
301
301
|
capabilities, as described above. On web there is no channel for a site page.
|
|
302
302
|
|
|
303
|
+
### Site events: title, route, member and cart
|
|
304
|
+
|
|
305
|
+
A trusted site page tells its worker what the website is doing, with no edit to the site. The worker
|
|
306
|
+
subscribes with `onSiteEvent` from `@himalaya/webview`:
|
|
307
|
+
|
|
308
|
+
```ts
|
|
309
|
+
import { onSiteEvent, siteState } from "@himalaya/webview";
|
|
310
|
+
|
|
311
|
+
onSiteEvent((e) => {
|
|
312
|
+
// e.event: "title" | "route" | "cart" | "member" | "snapshot"
|
|
313
|
+
// e.source: "host" | "adapter" | "page"; e.state: { title, route, cart, member } (null = unknown)
|
|
314
|
+
void svc.site(e.state);
|
|
315
|
+
});
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
| Event | Payload | Where it comes from |
|
|
319
|
+
|---|---|---|
|
|
320
|
+
| `title` | `{ title }` | the app reads the page's own title |
|
|
321
|
+
| `route` | `{ path, search, sameDocument }` | the app reads the page's own address; `path` is inside the site (`/book-online`), never another site |
|
|
322
|
+
| `member` | `{ signedIn }` | Wix: the app reads the site's member cookie. Base44: the app's own sign-in |
|
|
323
|
+
| `cart` | `{ count }` | Wix only: the app reads the header cart icon. `null` means unknown (no cart icon): hide the badge |
|
|
324
|
+
|
|
325
|
+
- Every event carries the full `state`. When the page comes back onto the site after leaving it, or the
|
|
326
|
+
screen remounts, the worker gets a `snapshot` event, so it never needs to ask. `siteState(instanceId)`
|
|
327
|
+
reads the latest state.
|
|
328
|
+
- Nothing arrives while the page is off the site, and nothing arrives for a page that is not trusted (no
|
|
329
|
+
baked site, or the strict bridge).
|
|
330
|
+
- The Wix cart count is best effort. Wix has no documented way for a site script to read the cart total, so
|
|
331
|
+
the app reads the number on the header cart icon. A site without that icon reports `null`.
|
|
332
|
+
- On web no site events arrive (the site is in a cross-origin frame).
|
|
333
|
+
|
|
334
|
+
Bind the state to native UI: `hostTitle: "$service:shop.pageTitle"` for the app bar, a cart badge on
|
|
335
|
+
`$service:shop.cartCount`, a native "Sign in" row shown when the website's member is signed out.
|
|
336
|
+
|
|
337
|
+
**Other sites (Base44 and any page that runs this SDK).** The title, route and member still come from the app
|
|
338
|
+
with no page code. A page can add what the app cannot see, such as its cart count:
|
|
339
|
+
|
|
340
|
+
```ts
|
|
341
|
+
import { himalaya } from "@wix/himalaya/webview-page";
|
|
342
|
+
|
|
343
|
+
himalaya.site.report({ cart: 3 }); // or { member: true }, { title }, { route: "/path?x=1" }
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
`report` is fire-and-forget and returns `false` outside the app. Per field, what the app reads wins over what
|
|
347
|
+
the page reports: a page can never change the title, route or member the app reported. `site` is reserved, so
|
|
348
|
+
a worker cannot register an `onPageRequest("site", …)` namespace.
|
|
349
|
+
|
|
303
350
|
## Demo app regression page
|
|
304
351
|
|
|
305
352
|
The demo app hosts a page that calls every capability its iOS and Android boots already
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1715.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
|
|
6
6
|
"keywords": [
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"artifactId": "himalaya-cli"
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
|
-
"falconPackageHash": "
|
|
84
|
+
"falconPackageHash": "ede96eb5f67640e0ba7234876a57c778a04f4ee0f475082a64844a7a"
|
|
85
85
|
}
|