@wix/himalaya-cli 0.1744.0 → 0.1745.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/ts/src/icon-catalog.generated.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +21 -0
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{b583b2879dbf6318c5d5bc0aaca78a34b84f76b51a8f79dc824e05521f2a5a7a.bin → d432d189310d8d819b56251c53dd82a9e166a4a73936749f08c355c11083e8e0.bin} +1 -1
- package/dist/browser-plane/sw.js +5 -5
- package/dist/cli.mjs +60 -40
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/android-ux.md +1 -1
- package/guides/designing-himi-screens.md +23 -14
- package/guides/headless-loop.md +1 -1
- package/guides/ios-ux.md +1 -1
- package/package.json +2 -2
- package/templates/beauty-salon/tier5-src/_shared/himi-account.ts +37 -8
- package/templates/branded-lite/tier5-src/_shared/himi-account.ts +37 -8
- package/templates/community-club/tier5-src/_shared/himi-account.ts +37 -8
- package/templates/conference/tier5-src/_shared/himi-account.ts +37 -8
- package/templates/events-meetups/tier5-src/_shared/himi-account.ts +37 -8
- package/templates/gym-fitness/tier5-src/_shared/himi-account.ts +37 -8
- package/templates/nonprofit-cause/tier5-src/_shared/himi-account.ts +37 -8
- package/templates/podcast-creator/tier5-src/_shared/himi-account.ts +37 -8
- package/templates/portfolio-creative/tier5-src/_shared/himi-account.ts +37 -8
- package/templates/restaurant/tier5-src/_shared/himi-account.ts +37 -8
- package/templates/retail-store/tier5-src/_shared/himi-account.ts +37 -8
- package/templates/salon-spa/tier5-src/_shared/himi-account.ts +37 -8
- package/templates/wholesale-store/tier5-src/_shared/himi-account.ts +37 -8
- package/templates/yoga-studio/tier5-src/_shared/himi-account.ts +37 -8
package/dist/cli.mjs
CHANGED
|
@@ -31196,6 +31196,25 @@ var init_icon_catalog_generated = __esm({
|
|
|
31196
31196
|
"license": "Apache-2.0",
|
|
31197
31197
|
"libVersion": "0.45.9"
|
|
31198
31198
|
},
|
|
31199
|
+
"redo": {
|
|
31200
|
+
"category": "editing",
|
|
31201
|
+
"path": [
|
|
31202
|
+
"M9.8 19C8.217 19 6.854 18.467 5.713 17.4C4.571 16.333 4 15.017 4 13.45C4 11.883 4.571 10.567 5.713 9.5C6.854 8.433 8.217 7.9 9.8 7.9L17.15 7.9L14.3 5.05L15.35 4L20 8.65L15.35 13.3L14.3 12.25L17.15 9.4L9.775 9.4C8.608 9.4 7.604 9.788 6.763 10.563C5.921 11.338 5.5 12.3 5.5 13.45C5.5 14.6 5.921 15.563 6.763 16.338C7.604 17.113 8.608 17.5 9.775 17.5L17.525 17.5L17.525 19L9.8 19Z"
|
|
31203
|
+
],
|
|
31204
|
+
"style": "filled",
|
|
31205
|
+
"mirrorsInRTL": true,
|
|
31206
|
+
"ios": {
|
|
31207
|
+
"sf": "arrow.uturn.forward",
|
|
31208
|
+
"match": "exact"
|
|
31209
|
+
},
|
|
31210
|
+
"android": {
|
|
31211
|
+
"material": "Redo",
|
|
31212
|
+
"match": "exact"
|
|
31213
|
+
},
|
|
31214
|
+
"source": "material-symbols/redo",
|
|
31215
|
+
"license": "Apache-2.0",
|
|
31216
|
+
"libVersion": "0.45.9"
|
|
31217
|
+
},
|
|
31199
31218
|
"refresh": {
|
|
31200
31219
|
"category": "status",
|
|
31201
31220
|
"path": [
|
|
@@ -31764,6 +31783,7 @@ var init_icon_catalog_generated = __esm({
|
|
|
31764
31783
|
"prev": "prev",
|
|
31765
31784
|
"skipback": "prev",
|
|
31766
31785
|
"question": "question",
|
|
31786
|
+
"redo": "redo",
|
|
31767
31787
|
"refresh": "refresh",
|
|
31768
31788
|
"repeat": "repeat",
|
|
31769
31789
|
"rss": "rss",
|
|
@@ -31900,6 +31920,7 @@ var init_icon_catalog_generated = __esm({
|
|
|
31900
31920
|
"plus_circle_fill",
|
|
31901
31921
|
"prev",
|
|
31902
31922
|
"question",
|
|
31923
|
+
"redo",
|
|
31903
31924
|
"refresh",
|
|
31904
31925
|
"repeat",
|
|
31905
31926
|
"rss",
|
|
@@ -40753,7 +40774,6 @@ function shouldRevealError(args) {
|
|
|
40753
40774
|
var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE, AUTHORED_PATTERN_LIMIT, authoredPatterns;
|
|
40754
40775
|
var init_validation = __esm({
|
|
40755
40776
|
"../../core/ts/src/validation.ts"() {
|
|
40756
|
-
"use strict";
|
|
40757
40777
|
init_define_HHP_CATALOG();
|
|
40758
40778
|
EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
|
|
40759
40779
|
URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
|
|
@@ -239482,52 +239502,52 @@ var init_preview_assets_generated = __esm({
|
|
|
239482
239502
|
init_define_HHP_CATALOG();
|
|
239483
239503
|
init_preview_assets_format();
|
|
239484
239504
|
PREVIEW_ASSET_MANIFEST = [
|
|
239485
|
-
{ key: "assets/DashboardHost-
|
|
239486
|
-
{ key: "assets/DevDrawer-
|
|
239487
|
-
{ key: "assets/IdiomCompare-
|
|
239488
|
-
{ key: "assets/LightboxViewer-
|
|
239489
|
-
{ key: "assets/OfflineReadingBar-
|
|
239490
|
-
{ key: "assets/PhonePreviewControl-
|
|
239491
|
-
{ key: "assets/SchemeCompare-
|
|
239492
|
-
{ key: "assets/WixFrogTelemetrySink-
|
|
239505
|
+
{ key: "assets/DashboardHost-93gHHXsU.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2985, sha256: "993f5fdc24e1d7feba8654a05d5e60a11d499cd558674310dc363237d7902dec" },
|
|
239506
|
+
{ key: "assets/DevDrawer-BS27qKQ3.js", contentType: "application/javascript; charset=utf-8", offset: 2993, length: 16783, sha256: "7a407775f5cfe0991cd4d7eea2849e29c894b5a6914c4e035a70a929ed68e08f" },
|
|
239507
|
+
{ key: "assets/IdiomCompare-D0_35loe.js", contentType: "application/javascript; charset=utf-8", offset: 19776, length: 1926, sha256: "269cc877cb4cfdf35a9a894e0be2178b95a29f4fdd8a6a07955cce1a200cfc6f" },
|
|
239508
|
+
{ key: "assets/LightboxViewer-RJT2pdPm.js", contentType: "application/javascript; charset=utf-8", offset: 21702, length: 17382, sha256: "f9969cd949306605cdc0e92707243005738afd77cd2a092dc549cc3993c15b80" },
|
|
239509
|
+
{ key: "assets/OfflineReadingBar-CCA63wG9.js", contentType: "application/javascript; charset=utf-8", offset: 39084, length: 1646, sha256: "70532e74b922206c86dbdc38464fca9055e68c219d837bdbace44a28fd79c827" },
|
|
239510
|
+
{ key: "assets/PhonePreviewControl-Dk5P3reV.js", contentType: "application/javascript; charset=utf-8", offset: 40730, length: 37851, sha256: "f2268119d5141ac360869d1d34bce6dc7beb277d345b608e7b4c0d4a81a6b483" },
|
|
239511
|
+
{ key: "assets/SchemeCompare-B6evZHTV.js", contentType: "application/javascript; charset=utf-8", offset: 78581, length: 1858, sha256: "a5061632ea68a261121f399e11f61a244211e0b3d0081c97af8869659c3405af" },
|
|
239512
|
+
{ key: "assets/WixFrogTelemetrySink-CpxHN8Ce.js", contentType: "application/javascript; charset=utf-8", offset: 80439, length: 3515, sha256: "2a268521ffaa483c6d4f9580ff87b11df1b8a5ff27da8a2089c7c31e9c4c7ac8" },
|
|
239493
239513
|
{ key: "assets/calendar-ics-BvfIYWjG.js", contentType: "application/javascript; charset=utf-8", offset: 83954, length: 2192, sha256: "1636167041e9829ceccd3544297b86b8475c38bd2f759c4dbc17c813dc6e9254" },
|
|
239494
239514
|
{ key: "assets/catalog-CAoUWITw.js", contentType: "application/javascript; charset=utf-8", offset: 86146, length: 26046, sha256: "4c270ca3051f77d761aef1297125e02339d48493dd2b84a0cacf0faf41aa8cb3" },
|
|
239495
|
-
{ key: "assets/catalogFontFaces-
|
|
239515
|
+
{ key: "assets/catalogFontFaces-CP98EVlH.js", contentType: "application/javascript; charset=utf-8", offset: 112192, length: 1111, sha256: "3e23072c30252203133888824c6e53ffeebbebed126527f2c5459ccffd4b7118" },
|
|
239496
239516
|
{ key: "assets/contacts-vcard-BcohPQ0m.js", contentType: "application/javascript; charset=utf-8", offset: 113303, length: 2567, sha256: "c4ff75e96cd909bbb9182c5dc78794fcebc65139fbddef2537711d774fb33ad0" },
|
|
239497
|
-
{ key: "assets/files-transfer-
|
|
239517
|
+
{ key: "assets/files-transfer-BjZblmVl.js", contentType: "application/javascript; charset=utf-8", offset: 115870, length: 6446, sha256: "f1011667ba289a4c0ea4b5732a760cb1134c3142b97229bafb560ba9e8ebb118" },
|
|
239498
239518
|
{ key: "assets/frogActionMap-CTMe3Bz1.js", contentType: "application/javascript; charset=utf-8", offset: 122316, length: 1172, sha256: "9f1ce4c70a680dfb902949e1f482c7e47500b69c3350cd091b1b51d674032d53" },
|
|
239499
|
-
{ key: "assets/frogApiRules-
|
|
239519
|
+
{ key: "assets/frogApiRules-CaOcVAVM.js", contentType: "application/javascript; charset=utf-8", offset: 123488, length: 2207, sha256: "4eaad71f30bd733953335324beac24c043c11c39692f33c790f58b624abf5509" },
|
|
239500
239520
|
{ key: "assets/frogScreenMap-S_IRnz20.js", contentType: "application/javascript; charset=utf-8", offset: 125695, length: 1067, sha256: "22b2f71e1b06df8f1e79b890d47fe42e983d37865c2cc9be753e4121764c91e1" },
|
|
239501
239521
|
{ key: "assets/glassPreviewBrowser-DONaOehd.js", contentType: "application/javascript; charset=utf-8", offset: 126762, length: 6578, sha256: "4402c4cddd2a564e7466cdf1e12a0e0277c0400b288e1e5eda1d23e797599d31" },
|
|
239502
239522
|
{ key: "assets/image-preparation-Cj4gldm6.js", contentType: "application/javascript; charset=utf-8", offset: 133340, length: 2704, sha256: "32944ea587c2f3b84389b66b50a850437560238f1c8d33b6275973ee04eee865" },
|
|
239503
|
-
{ key: "assets/index-
|
|
239504
|
-
{ key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
239505
|
-
{ key: "assets/on-device-ml-D5QGvW8P.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
239506
|
-
{ key: "assets/pdf-
|
|
239507
|
-
{ key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
239508
|
-
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset:
|
|
239509
|
-
{ key: "assets/pdfDocument-
|
|
239510
|
-
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
239511
|
-
{ key: "assets/scrollLinkedRuntime-
|
|
239512
|
-
{ key: "assets/webviewBridgeHost-
|
|
239513
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
239514
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
239515
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
239516
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
239517
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
239518
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
239519
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
239520
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
239521
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
239522
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
239523
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
239524
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
239525
|
-
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
239526
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
239527
|
-
{ key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset:
|
|
239528
|
-
{ key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset:
|
|
239529
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
239530
|
-
{ key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
239523
|
+
{ key: "assets/index-BNQqmuBT.js", contentType: "application/javascript; charset=utf-8", offset: 136044, length: 1584325, sha256: "76b37da22f36e7e744ba6ff8d5ac2acbdc1a180b652988438f661fb5d58b1307" },
|
|
239524
|
+
{ key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset: 1720369, length: 7751, sha256: "42a78b508d0f309f6a4a6efbb8669015211b3c26574c5b0929884c4d9d20b806" },
|
|
239525
|
+
{ key: "assets/on-device-ml-D5QGvW8P.js", contentType: "application/javascript; charset=utf-8", offset: 1728120, length: 10531, sha256: "914ea54d973624e7bc82d1847444f26084ac16d69be3051b4b5938b1e35beced" },
|
|
239526
|
+
{ key: "assets/pdf-OgxX4nB8.js", contentType: "application/javascript; charset=utf-8", offset: 1738651, length: 488215, sha256: "d432d189310d8d819b56251c53dd82a9e166a4a73936749f08c355c11083e8e0" },
|
|
239527
|
+
{ key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset: 2226866, length: 90, sha256: "521a0e528916d678d7588b2cddf3dadd3bb959a6d62426382f61c77a82017e35" },
|
|
239528
|
+
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 2226956, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
|
|
239529
|
+
{ key: "assets/pdfDocument-BRzqkxT0.js", contentType: "application/javascript; charset=utf-8", offset: 3543990, length: 3470, sha256: "d7e472130adc927b44be20312e13f309ee3b8ac29131ac6b5524f86bccf1b52d" },
|
|
239530
|
+
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3547460, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
|
|
239531
|
+
{ key: "assets/scrollLinkedRuntime-BqP_Bl-D.js", contentType: "application/javascript; charset=utf-8", offset: 3549726, length: 2278, sha256: "548b99d34a9de7a80cd90a8c469580657eb5607a43f4cf0e8df03a538ecb8038" },
|
|
239532
|
+
{ key: "assets/webviewBridgeHost-yubDxjRC.js", contentType: "application/javascript; charset=utf-8", offset: 3552004, length: 9889, sha256: "abba540cf94b984cd7b21002b5062f4d9055cc233a2cf4ee284f65f5af987ba3" },
|
|
239533
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3561893, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
239534
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3566503, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
239535
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 4055087, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
239536
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 4146011, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
239537
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 4236995, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
239538
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 4327975, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
239539
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4418847, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
239540
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4509827, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
239541
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4618463, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
239542
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4727547, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
239543
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4836595, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
239544
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4944295, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
239545
|
+
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 5032403, length: 6818, sha256: "835250c3d8004f27c2b67f9b471984351ba6df07b916d97e33b43c691200a18c" },
|
|
239546
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 5039221, length: 4924, sha256: "743591f95207555703eecba1c045fb37d97d9f5e2b449f7d9f68ed44421ede36" },
|
|
239547
|
+
{ key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 5044145, length: 11457, sha256: "6cb2b75264fa5fa2b4d28851878a5eab0712900e8b3a6c2370cc661d6d820805" },
|
|
239548
|
+
{ key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset: 5055602, length: 1171, sha256: "9e2c3a0faaf05d5471badf167a4d3bdf1c4e6dd65c432eea6d254158bfd99585" },
|
|
239549
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 5056773, length: 24239, sha256: "42bd04b28606706389a6b3ab79b74f37259ab43bf66580d2d9c69be5980a53fe" },
|
|
239550
|
+
{ key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset: 5081012, length: 24256, sha256: "c14ee20bf56b80e2622177d34824b18f368c66faaffd7ea3aa9b07b60582411c" }
|
|
239531
239551
|
];
|
|
239532
239552
|
}
|
|
239533
239553
|
});
|
|
Binary file
|
package/guides/android-ux.md
CHANGED
|
@@ -46,7 +46,7 @@ A list or a grid looks the same in the iPhone PNG. That is one descriptor, not a
|
|
|
46
46
|
| Destructive or blocking decision | A dialog that names the action. | `AlertDialog`; confirm or offer undo. | [Dialogs](https://m3.material.io/components/dialogs/guidelines) |
|
|
47
47
|
| Success | A snackbar above the navigation bar. | `ui.snackbar` from the worker. | [Snackbar](https://m3.material.io/components/snackbar/guidelines) |
|
|
48
48
|
| Search | A search bar in the top app bar, or a dedicated search screen. | `topBar.searchable` plus the page's own `SearchField` (or the row that holds it) with `hiddenPath: "$env:topBarSearch"`. The standard app shell draws that field; only a host with a native search handler hides it for the bar. A dedicated screen when search starts a new task (`himi docs recipe-search`). | [Search](https://m3.material.io/components/search/guidelines) |
|
|
49
|
-
| Tablets, foldables, wide windows | List and detail side by side from the expanded width class (840dp and wider); a readable column for reading. | `
|
|
49
|
+
| Tablets, foldables, wide windows | List and detail side by side from the expanded width class (840dp and wider); a readable column for reading. | `Grid` `columns: 1, columnsMedium: 2` to put parts side by side from 600dp (a tablet in portrait); `SplitView` only from 840dp. The tablet shell does not apply `contentMaxWidth`, so the screen changes shape itself (`designing-himi-screens`). Render at 834px and 840px or wider, and record the choice. | [Adaptive layouts](https://developer.android.com/design/ui/mobile/guides/layout-and-content/adapt-layout) |
|
|
50
50
|
| Type and shape | The Material type scale and shape scale, following the user's font size. | Typography tokens from the built-in ramp, no raw sizes; a `material` overlay in `tokens.json` `idiom` with `"$system"` (Roboto) and Material radii, turned on by `idiom: { policy: "follow-surface" }` in `config.ts`. | [Typography](https://m3.material.io/styles/typography/applying-type) |
|
|
51
51
|
| Touch targets | At least 48×48dp. | Use `Button`/`ListItem`; do not shrink a hit area. | [Accessibility](https://developer.android.com/design/ui/mobile/guides/foundations/accessibility) |
|
|
52
52
|
| Edge to edge | Content draws under the system bars; nothing important sits behind them. | The shell applies the insets; keep the last row clear of `stickyFooter`. | [Edge-to-edge](https://developer.android.com/design/ui/mobile/guides/layout-and-content/edge-to-edge) |
|
|
@@ -60,23 +60,32 @@ they decide what a phone screen looks like, and this guide decides how to compos
|
|
|
60
60
|
- **Every tap target is at least 44 points** (48 dp on Android). A `Button` grows its own hit area;
|
|
61
61
|
an `Icon`, an `Image` or a stack with `modifiers.onTap` does not, so give it `padding` until it
|
|
62
62
|
reaches 44, or use an `iconOnly` `Button` (`himi validate` warns: `touch_target_too_small`).
|
|
63
|
-
- **A wide surface gets its own layout, not the phone one stretched.**
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
- **A wide surface gets its own layout, not the phone one stretched.** Do not count on the host
|
|
64
|
+
to narrow the screen: a tablet shows it full bleed at every width, and a `splitView` goes side
|
|
65
|
+
by side from 600 points on iOS but only from 840 on Android and the web, so an Android tablet in
|
|
66
|
+
portrait (and the web below 840) still shows it stacked. From the medium width (600 points: an
|
|
67
|
+
iPad or an Android tablet in portrait), each kind of screen changes shape itself:
|
|
66
68
|
- Photo tiles add columns (`columnsMedium: 3`, `columnsExpanded: 4`).
|
|
67
|
-
-
|
|
69
|
+
- A short, bounded set of rows (a day's schedule, a menu, a few sessions) becomes
|
|
68
70
|
`grid({ columns: 1, columnsMedium: 2 })` of the same rows. A grid fills across each row, so
|
|
69
|
-
keep the items in reading order (by time) and they still read in order.
|
|
71
|
+
keep the items in reading order (by time) and they still read in order. A long or paged list
|
|
72
|
+
stays a `lazyList` at the scroll root: on Android a grid inside the screen's scroll is not
|
|
73
|
+
lazy, so every row is built at once.
|
|
70
74
|
- A shelf has more covers than fit at the widest width (eight or more), so its rail never
|
|
71
75
|
ends halfway across the screen. With fewer, it is a grid row instead.
|
|
72
|
-
- A detail screen puts its photos and its information side by side
|
|
73
|
-
`
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
- A detail screen puts its photos and its information side by side with
|
|
77
|
+
`grid({ columns: 1, columnsMedium: 2, items: [photos, info] })`, which stacks on a phone and
|
|
78
|
+
splits from 600 on every platform.
|
|
79
|
+
- A short, bounded screen (a cart, a form, sign-in, settings) splits its parts with the same
|
|
80
|
+
grid: the items beside the order summary, the fields beside the explanation or the art, one
|
|
81
|
+
settings section beside the next. Do not centre a capped column with spacers or a centre
|
|
82
|
+
alignment: the renderers do not agree on either, so it centres on one platform and not on
|
|
83
|
+
another. A long or paged list (a chat list, a feed) stays the scroll root (see Fast screens
|
|
84
|
+
below), with its rows at full width.
|
|
85
|
+
|
|
86
|
+
Render `--device tablet` (834 points) and `--device desktop` and look for a half of the screen
|
|
87
|
+
with nothing in it, or a row whose price sits a screen's width from its name. Space below
|
|
88
|
+
a short list is fine.
|
|
80
89
|
|
|
81
90
|
---
|
|
82
91
|
|
|
@@ -416,7 +425,7 @@ Concrete patterns lifted from real usage:
|
|
|
416
425
|
- **Photo tile** — `vstack({ spacing: 6, alignment: "leading", children: [ image({ url, fillWidth: true, aspectRatio: 0.8, contentMode: "fill", placeholder: "surfaceSecondary", contentDescription }) + cornerRadius 8, text(name, "body"), text(price, "callout", { color: "textSecondary" }) ] })` with `modifiers.onTap` on the stack, inside `grid({ columns: 2, columnsMedium: 3, columnsExpanded: 4, spacing: 12 })`. A shelf is the same tile at a fixed `width` (about 110) in `lazyList({ horizontal: true, spacing: 12 })`.
|
|
417
426
|
- **A website page with native UI around it** — `vstack({ children: [ header, sitePage(site, { path: "/book-online" }), stickyBar ] })`, where `site` is the app's `site` block (a `SiteShellConfig`) and `sitePage` comes from `@wix/himalaya/sdui`. It emits a `WebView` with `role: "primary"`, `fill`, its own scrolling, `modifiers.weight: 1` and the site preset as its config (the same URL and behaviour a site-shell tab gets; `webView: { … }` overrides it). `title` becomes the page's accessible name (`modifiers.accessibilityLabel`, which every `WebView` needs); without one the site's host is used. The weight gives the page only the height the header and bar leave. Put it at the screen root or directly in a root `VStack`, `HStack` or `ZStack`, and use one per screen. The validator rejects it inside a `LazyList`, `Pager`, `Carousel` or `CollapsingHeader`, or with its weight removed. A site-shell app already gets this form: `siteScreens(site)` gives each page both forms in one descriptor, the Tier-3 screen every app binary renders plus this tree in `payload`, which a newer binary draws instead. To put native UI around one page of a site-shell app and keep it working on older binaries, use `dualFormSiteScreen(defineSiteTab(site, page), vstack({ children: [ header, sitePage(site, { path: page.path, title: page.title }), stickyBar ] }))`. The page inside must load the same URL, with the same config and the same native capability scope (`capabilitiesRequired`), as the Tier-3 screen; `sitePage` scopes a page to no capability, as a site tab is. The validator checks all three (`dual_form_mismatch`), and the screen can carry no `logicBundle`. Older binaries draw only the Tier-3 page, without the header and bar. `siteScreens(site, { form: "node" })` serves the node form alone, for an app whose binaries all support it, and `desugarSiteScreen(descriptor)` converts one Tier-3 site screen. To let native UI follow the page (a cart badge, the page title), give the screen a `logicBundle` that declares `"webview"` and write `sitePage(site, { path, bridge: "worker" })`: the page talks to the worker through `@wix/himalaya/webview-page`, and the worker answers with `@himalaya/webview` ([webview-page-sdk.md](webview-page-sdk.md#a-site-page-that-talks-to-its-screens-worker)). Such a screen carries a worker, so it is a node-form screen (`sdui_layout`), not a dual-form one.
|
|
418
427
|
- **Overlay** — `zstack({ alignment: "center", children: [ backdropImage(cornerRadius 12), withModifiers(label, { padding, background: { token: "accentPrimary" }, cornerRadius: 10 }) ] })`.
|
|
419
|
-
- **Responsive** — `grid({ columns: 1, columnsMedium: 2, spacing: 12 })` for wide cards, 1-up on phone / 2-up on tablet (photo tiles start at 2 on a phone); `splitView({ primary, detail, primaryMaxWidth: 280 })` for master/detail
|
|
428
|
+
- **Responsive** — `grid({ columns: 1, columnsMedium: 2, spacing: 12 })` for wide cards, 1-up on phone / 2-up on tablet (photo tiles start at 2 on a phone); `splitView({ primary, detail, primaryMaxWidth: 280 })` for master/detail (side by side from 600 points on iOS, from 840 on Android and the web); `contentMaxWidth` in tokens sets the measure only on the web host and in `himi render`; the native Mac window caps content at 920 points whatever it says, and a tablet applies no cap, so a tablet still needs the layout changes above.
|
|
420
429
|
- **Centered separator, not a flanked divider** — the classic "—— or ——" needs each `divider()` to take equal remaining width, and the HStack row-share only kicks in for controls with an intrinsic fill. **A bare `divider()` inside an HStack is a column separator, not a flanking line**: iOS, macOS, Android, web and React Native all draw it as a thin vertical rule the height of the row that takes no share of the width, which is right for a stats row (`12 | 340 | 87`) and wrong for "—— or ——". For "—— or ——", use a **centered caption**: `hstack({ children: [spacer(), text("or continue with", "caption", { color: "textSecondary" }), spacer()] })`, optionally over a single full-width `divider()`.
|
|
421
430
|
|
|
422
431
|
> **Intrinsic-fill controls grab the row.** `Button` and `TextField` have an intrinsic FILL, so the next four idioms are about NOT letting that surprise you (they were the papercuts every off-repo app hit):
|
package/guides/headless-loop.md
CHANGED
|
@@ -237,7 +237,7 @@ A few flags worth knowing up front (all discoverable via `himi render --help`):
|
|
|
237
237
|
which over-stretches a phone layout.
|
|
238
238
|
- **`himi icons`** lists the valid `Icon.name` vocabulary — an unknown name silently falls back to a
|
|
239
239
|
generic glyph on device (and `validate` warns), so pick from this list rather than guessing SF-Symbol
|
|
240
|
-
names. The full set (aliases included): ai, arrow_down, arrow_left, arrow_right, arrow_up, back, bag, bag_fill, barcode, bell, bell_fill, bell_off, bell_slash, book, bookmark, bookmark_fill, boxes, branch, calendar, camera, cart, cart_fill, chart, chat, check, checklist, checkmark, chevron_down, chevron_left, chevron_right, chevron_up, circle, circle_fill, clock, close, concealed, cookie, copy, dashboard, doc, document, download, edit, ellipsis, error, expand, external_link, eye, eye_slash, filter, folder, forward, fullscreen, gear, gift, globe, grid, grid_fill, grip, heart, heart_fill, help, home, home_fill, house, image, inbox, info, layers, link, list, location, lock, logout, mail, map, menu, message, mic, mic_fill, microphone, microphone_fill, minus, moon, more, more_vertical, music, newspaper, newspaper_fill, next, paper_plane, pause, pencil, people, person, person_fill, phone, photo, pin, play, play_circle, play_circle_fill, plus, plus_circle, plus_circle_fill, prev, question, refresh, repeat, rss, search, send, send_arrow, settings, settings_fill, share, shuffle, skip_back, skip_forward, skip_next, skip_previous, star, star_fill, stop, success, tag, ticket, ticket_fill, trash, tray, undo, user, visible, volume, warning, wifi, xmark.
|
|
240
|
+
names. The full set (aliases included): ai, arrow_down, arrow_left, arrow_right, arrow_up, back, bag, bag_fill, barcode, bell, bell_fill, bell_off, bell_slash, book, bookmark, bookmark_fill, boxes, branch, calendar, camera, cart, cart_fill, chart, chat, check, checklist, checkmark, chevron_down, chevron_left, chevron_right, chevron_up, circle, circle_fill, clock, close, concealed, cookie, copy, dashboard, doc, document, download, edit, ellipsis, error, expand, external_link, eye, eye_slash, filter, folder, forward, fullscreen, gear, gift, globe, grid, grid_fill, grip, heart, heart_fill, help, home, home_fill, house, image, inbox, info, layers, link, list, location, lock, logout, mail, map, menu, message, mic, mic_fill, microphone, microphone_fill, minus, moon, more, more_vertical, music, newspaper, newspaper_fill, next, paper_plane, pause, pencil, people, person, person_fill, phone, photo, pin, play, play_circle, play_circle_fill, plus, plus_circle, plus_circle_fill, prev, question, redo, refresh, repeat, rss, search, send, send_arrow, settings, settings_fill, share, shuffle, skip_back, skip_forward, skip_next, skip_previous, star, star_fill, stop, success, tag, ticket, ticket_fill, trash, tray, undo, user, visible, volume, warning, wifi, xmark.
|
|
241
241
|
|
|
242
242
|
## 4b. Prove it WORKS, not just that it renders (`himi test`, when installed)
|
|
243
243
|
|
package/guides/ios-ux.md
CHANGED
|
@@ -45,7 +45,7 @@ Android PNG. That is one descriptor, not a failed render.
|
|
|
45
45
|
| Destructive or blocking decision | An alert, with the destructive button styled as such. | `AlertDialog`, or a `ToolbarItem` with `role: "destructive"`. Confirm or offer undo. | [Alerts](https://developer.apple.com/design/human-interface-guidelines/alerts) |
|
|
46
46
|
| Success | Brief, non-blocking feedback. | `ui.snackbar` from the worker, not an alert. | [Feedback](https://developer.apple.com/design/human-interface-guidelines/feedback) |
|
|
47
47
|
| Search | A search field in the navigation bar. | `topBar.searchable` plus the page's own `SearchField` (or the row that holds it) with `hiddenPath: "$env:topBarSearch"`. The standard app shell draws that field; only a host with a native search handler hides it for the bar. A dedicated search screen when search starts a new task (`himi docs recipe-search`). | [Search fields](https://developer.apple.com/design/human-interface-guidelines/search-fields) |
|
|
48
|
-
| iPad and wide windows | Sidebar or split view for collections; a readable column for reading. | `
|
|
48
|
+
| iPad and wide windows | Sidebar or split view for collections; a readable column for reading. | `Grid` `columns: 1, columnsMedium: 2` to put parts side by side from 600 points; `SplitView` (side by side from 600 on iOS). The iPad shell does not apply `contentMaxWidth`, so the screen changes shape itself (`designing-himi-screens`). Render at 834px and record the choice. | [Split views](https://developer.apple.com/design/human-interface-guidelines/split-views) |
|
|
49
49
|
| Type | The system text styles, scaled by Dynamic Type. | Typography tokens from the built-in ramp: `largeTitle`, `title1`–`title3`, `headline`, `body`, `bodyEmphasis`, `callout`, `caption`, `footnote`. No raw sizes. | [Typography](https://developer.apple.com/design/human-interface-guidelines/typography) |
|
|
50
50
|
| Touch targets | At least 44×44 points. | Use `Button`/`ListItem`; do not shrink an icon's hit area below that. | [Accessibility](https://developer.apple.com/design/human-interface-guidelines/accessibility) |
|
|
51
51
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1745.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": [
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"artifactId": "himalaya-cli"
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
"falconPackageHash": "
|
|
85
|
+
"falconPackageHash": "a9190c60c960df705fdc96580814b2ea24660ba20b97330c097ab7f0"
|
|
86
86
|
}
|
|
@@ -124,24 +124,53 @@ export function guestProfile(detailLine: string): AccountProfile {
|
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
/** `himi.wix.memberIdentity`: the member's email ("" when none is known) and whether a member is
|
|
128
|
+
* signed in. `signedIn` is true only when the host says so explicitly — native hosts answer it
|
|
129
|
+
* for a member whose email is not known yet (an injected or hosted session before `members/my`
|
|
130
|
+
* answers); hosts that predate it answer the email alone. */
|
|
131
|
+
export async function memberIdentity(): Promise<{ email: string; signedIn: boolean }> {
|
|
128
132
|
try {
|
|
129
133
|
const identity = await dispatch("himi.wix.memberIdentity") as unknown;
|
|
130
|
-
const direct = identity as { email?: unknown } | null;
|
|
131
|
-
const wrapped = identity as { payload?: { email?: unknown } } | null;
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
+
const direct = identity as { email?: unknown; signedIn?: unknown } | null;
|
|
135
|
+
const wrapped = identity as { payload?: { email?: unknown; signedIn?: unknown } } | null;
|
|
136
|
+
const raw = direct?.email ?? wrapped?.payload?.email;
|
|
137
|
+
const email = typeof raw === "string" ? raw : "";
|
|
138
|
+
const signedIn = (direct?.signedIn ?? wrapped?.payload?.signedIn) === true;
|
|
139
|
+
return { email, signedIn: signedIn || !!email };
|
|
134
140
|
} catch {
|
|
135
|
-
return "";
|
|
141
|
+
return { email: "", signedIn: false };
|
|
136
142
|
}
|
|
137
143
|
}
|
|
138
144
|
|
|
145
|
+
export async function signedInEmail(): Promise<string> {
|
|
146
|
+
return (await memberIdentity()).email;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/** A signed-in member nothing names yet: signed in, with a neutral label rather than another
|
|
150
|
+
* member's name or the sign-in form. */
|
|
151
|
+
function neutralMemberProfile(): AccountProfile {
|
|
152
|
+
const name = copyParam("account.member", "Member");
|
|
153
|
+
return {
|
|
154
|
+
isMember: true,
|
|
155
|
+
identityLine: copyParam("account.signedIn", "Signed in"),
|
|
156
|
+
detailLine: name,
|
|
157
|
+
memberName: name,
|
|
158
|
+
memberEmail: "",
|
|
159
|
+
memberImage: "",
|
|
160
|
+
memberInitials: "M",
|
|
161
|
+
hasMemberImage: false,
|
|
162
|
+
noMemberImage: true,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
|
|
139
166
|
export async function loadMemberProfile(guestDetailLine: string): Promise<AccountProfile> {
|
|
140
167
|
// `himi.wix.memberIdentity` is the session source of truth. Visitor-scoped
|
|
141
168
|
// getMyData can still return a site/account nickname (e.g. apptestercoowner)
|
|
142
169
|
// after sign-out or for anonymous — never treat that as a signed-in member.
|
|
143
|
-
const
|
|
144
|
-
if (!
|
|
170
|
+
const identity = await memberIdentity();
|
|
171
|
+
if (!identity.signedIn) return guestProfile(guestDetailLine);
|
|
172
|
+
const storedEmail = identity.email;
|
|
173
|
+
if (!storedEmail) return (await siteMemberProfile("")) ?? neutralMemberProfile();
|
|
145
174
|
try {
|
|
146
175
|
const data = await getMyData();
|
|
147
176
|
return profileFromData(data, storedEmail);
|
|
@@ -124,24 +124,53 @@ export function guestProfile(detailLine: string): AccountProfile {
|
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
/** `himi.wix.memberIdentity`: the member's email ("" when none is known) and whether a member is
|
|
128
|
+
* signed in. `signedIn` is true only when the host says so explicitly — native hosts answer it
|
|
129
|
+
* for a member whose email is not known yet (an injected or hosted session before `members/my`
|
|
130
|
+
* answers); hosts that predate it answer the email alone. */
|
|
131
|
+
export async function memberIdentity(): Promise<{ email: string; signedIn: boolean }> {
|
|
128
132
|
try {
|
|
129
133
|
const identity = await dispatch("himi.wix.memberIdentity") as unknown;
|
|
130
|
-
const direct = identity as { email?: unknown } | null;
|
|
131
|
-
const wrapped = identity as { payload?: { email?: unknown } } | null;
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
+
const direct = identity as { email?: unknown; signedIn?: unknown } | null;
|
|
135
|
+
const wrapped = identity as { payload?: { email?: unknown; signedIn?: unknown } } | null;
|
|
136
|
+
const raw = direct?.email ?? wrapped?.payload?.email;
|
|
137
|
+
const email = typeof raw === "string" ? raw : "";
|
|
138
|
+
const signedIn = (direct?.signedIn ?? wrapped?.payload?.signedIn) === true;
|
|
139
|
+
return { email, signedIn: signedIn || !!email };
|
|
134
140
|
} catch {
|
|
135
|
-
return "";
|
|
141
|
+
return { email: "", signedIn: false };
|
|
136
142
|
}
|
|
137
143
|
}
|
|
138
144
|
|
|
145
|
+
export async function signedInEmail(): Promise<string> {
|
|
146
|
+
return (await memberIdentity()).email;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/** A signed-in member nothing names yet: signed in, with a neutral label rather than another
|
|
150
|
+
* member's name or the sign-in form. */
|
|
151
|
+
function neutralMemberProfile(): AccountProfile {
|
|
152
|
+
const name = copyParam("account.member", "Member");
|
|
153
|
+
return {
|
|
154
|
+
isMember: true,
|
|
155
|
+
identityLine: copyParam("account.signedIn", "Signed in"),
|
|
156
|
+
detailLine: name,
|
|
157
|
+
memberName: name,
|
|
158
|
+
memberEmail: "",
|
|
159
|
+
memberImage: "",
|
|
160
|
+
memberInitials: "M",
|
|
161
|
+
hasMemberImage: false,
|
|
162
|
+
noMemberImage: true,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
|
|
139
166
|
export async function loadMemberProfile(guestDetailLine: string): Promise<AccountProfile> {
|
|
140
167
|
// `himi.wix.memberIdentity` is the session source of truth. Visitor-scoped
|
|
141
168
|
// getMyData can still return a site/account nickname (e.g. apptestercoowner)
|
|
142
169
|
// after sign-out or for anonymous — never treat that as a signed-in member.
|
|
143
|
-
const
|
|
144
|
-
if (!
|
|
170
|
+
const identity = await memberIdentity();
|
|
171
|
+
if (!identity.signedIn) return guestProfile(guestDetailLine);
|
|
172
|
+
const storedEmail = identity.email;
|
|
173
|
+
if (!storedEmail) return (await siteMemberProfile("")) ?? neutralMemberProfile();
|
|
145
174
|
try {
|
|
146
175
|
const data = await getMyData();
|
|
147
176
|
return profileFromData(data, storedEmail);
|
|
@@ -124,24 +124,53 @@ export function guestProfile(detailLine: string): AccountProfile {
|
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
/** `himi.wix.memberIdentity`: the member's email ("" when none is known) and whether a member is
|
|
128
|
+
* signed in. `signedIn` is true only when the host says so explicitly — native hosts answer it
|
|
129
|
+
* for a member whose email is not known yet (an injected or hosted session before `members/my`
|
|
130
|
+
* answers); hosts that predate it answer the email alone. */
|
|
131
|
+
export async function memberIdentity(): Promise<{ email: string; signedIn: boolean }> {
|
|
128
132
|
try {
|
|
129
133
|
const identity = await dispatch("himi.wix.memberIdentity") as unknown;
|
|
130
|
-
const direct = identity as { email?: unknown } | null;
|
|
131
|
-
const wrapped = identity as { payload?: { email?: unknown } } | null;
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
+
const direct = identity as { email?: unknown; signedIn?: unknown } | null;
|
|
135
|
+
const wrapped = identity as { payload?: { email?: unknown; signedIn?: unknown } } | null;
|
|
136
|
+
const raw = direct?.email ?? wrapped?.payload?.email;
|
|
137
|
+
const email = typeof raw === "string" ? raw : "";
|
|
138
|
+
const signedIn = (direct?.signedIn ?? wrapped?.payload?.signedIn) === true;
|
|
139
|
+
return { email, signedIn: signedIn || !!email };
|
|
134
140
|
} catch {
|
|
135
|
-
return "";
|
|
141
|
+
return { email: "", signedIn: false };
|
|
136
142
|
}
|
|
137
143
|
}
|
|
138
144
|
|
|
145
|
+
export async function signedInEmail(): Promise<string> {
|
|
146
|
+
return (await memberIdentity()).email;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/** A signed-in member nothing names yet: signed in, with a neutral label rather than another
|
|
150
|
+
* member's name or the sign-in form. */
|
|
151
|
+
function neutralMemberProfile(): AccountProfile {
|
|
152
|
+
const name = copyParam("account.member", "Member");
|
|
153
|
+
return {
|
|
154
|
+
isMember: true,
|
|
155
|
+
identityLine: copyParam("account.signedIn", "Signed in"),
|
|
156
|
+
detailLine: name,
|
|
157
|
+
memberName: name,
|
|
158
|
+
memberEmail: "",
|
|
159
|
+
memberImage: "",
|
|
160
|
+
memberInitials: "M",
|
|
161
|
+
hasMemberImage: false,
|
|
162
|
+
noMemberImage: true,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
|
|
139
166
|
export async function loadMemberProfile(guestDetailLine: string): Promise<AccountProfile> {
|
|
140
167
|
// `himi.wix.memberIdentity` is the session source of truth. Visitor-scoped
|
|
141
168
|
// getMyData can still return a site/account nickname (e.g. apptestercoowner)
|
|
142
169
|
// after sign-out or for anonymous — never treat that as a signed-in member.
|
|
143
|
-
const
|
|
144
|
-
if (!
|
|
170
|
+
const identity = await memberIdentity();
|
|
171
|
+
if (!identity.signedIn) return guestProfile(guestDetailLine);
|
|
172
|
+
const storedEmail = identity.email;
|
|
173
|
+
if (!storedEmail) return (await siteMemberProfile("")) ?? neutralMemberProfile();
|
|
145
174
|
try {
|
|
146
175
|
const data = await getMyData();
|
|
147
176
|
return profileFromData(data, storedEmail);
|
|
@@ -124,24 +124,53 @@ export function guestProfile(detailLine: string): AccountProfile {
|
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
/** `himi.wix.memberIdentity`: the member's email ("" when none is known) and whether a member is
|
|
128
|
+
* signed in. `signedIn` is true only when the host says so explicitly — native hosts answer it
|
|
129
|
+
* for a member whose email is not known yet (an injected or hosted session before `members/my`
|
|
130
|
+
* answers); hosts that predate it answer the email alone. */
|
|
131
|
+
export async function memberIdentity(): Promise<{ email: string; signedIn: boolean }> {
|
|
128
132
|
try {
|
|
129
133
|
const identity = await dispatch("himi.wix.memberIdentity") as unknown;
|
|
130
|
-
const direct = identity as { email?: unknown } | null;
|
|
131
|
-
const wrapped = identity as { payload?: { email?: unknown } } | null;
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
+
const direct = identity as { email?: unknown; signedIn?: unknown } | null;
|
|
135
|
+
const wrapped = identity as { payload?: { email?: unknown; signedIn?: unknown } } | null;
|
|
136
|
+
const raw = direct?.email ?? wrapped?.payload?.email;
|
|
137
|
+
const email = typeof raw === "string" ? raw : "";
|
|
138
|
+
const signedIn = (direct?.signedIn ?? wrapped?.payload?.signedIn) === true;
|
|
139
|
+
return { email, signedIn: signedIn || !!email };
|
|
134
140
|
} catch {
|
|
135
|
-
return "";
|
|
141
|
+
return { email: "", signedIn: false };
|
|
136
142
|
}
|
|
137
143
|
}
|
|
138
144
|
|
|
145
|
+
export async function signedInEmail(): Promise<string> {
|
|
146
|
+
return (await memberIdentity()).email;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/** A signed-in member nothing names yet: signed in, with a neutral label rather than another
|
|
150
|
+
* member's name or the sign-in form. */
|
|
151
|
+
function neutralMemberProfile(): AccountProfile {
|
|
152
|
+
const name = copyParam("account.member", "Member");
|
|
153
|
+
return {
|
|
154
|
+
isMember: true,
|
|
155
|
+
identityLine: copyParam("account.signedIn", "Signed in"),
|
|
156
|
+
detailLine: name,
|
|
157
|
+
memberName: name,
|
|
158
|
+
memberEmail: "",
|
|
159
|
+
memberImage: "",
|
|
160
|
+
memberInitials: "M",
|
|
161
|
+
hasMemberImage: false,
|
|
162
|
+
noMemberImage: true,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
|
|
139
166
|
export async function loadMemberProfile(guestDetailLine: string): Promise<AccountProfile> {
|
|
140
167
|
// `himi.wix.memberIdentity` is the session source of truth. Visitor-scoped
|
|
141
168
|
// getMyData can still return a site/account nickname (e.g. apptestercoowner)
|
|
142
169
|
// after sign-out or for anonymous — never treat that as a signed-in member.
|
|
143
|
-
const
|
|
144
|
-
if (!
|
|
170
|
+
const identity = await memberIdentity();
|
|
171
|
+
if (!identity.signedIn) return guestProfile(guestDetailLine);
|
|
172
|
+
const storedEmail = identity.email;
|
|
173
|
+
if (!storedEmail) return (await siteMemberProfile("")) ?? neutralMemberProfile();
|
|
145
174
|
try {
|
|
146
175
|
const data = await getMyData();
|
|
147
176
|
return profileFromData(data, storedEmail);
|
|
@@ -124,24 +124,53 @@ export function guestProfile(detailLine: string): AccountProfile {
|
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
/** `himi.wix.memberIdentity`: the member's email ("" when none is known) and whether a member is
|
|
128
|
+
* signed in. `signedIn` is true only when the host says so explicitly — native hosts answer it
|
|
129
|
+
* for a member whose email is not known yet (an injected or hosted session before `members/my`
|
|
130
|
+
* answers); hosts that predate it answer the email alone. */
|
|
131
|
+
export async function memberIdentity(): Promise<{ email: string; signedIn: boolean }> {
|
|
128
132
|
try {
|
|
129
133
|
const identity = await dispatch("himi.wix.memberIdentity") as unknown;
|
|
130
|
-
const direct = identity as { email?: unknown } | null;
|
|
131
|
-
const wrapped = identity as { payload?: { email?: unknown } } | null;
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
+
const direct = identity as { email?: unknown; signedIn?: unknown } | null;
|
|
135
|
+
const wrapped = identity as { payload?: { email?: unknown; signedIn?: unknown } } | null;
|
|
136
|
+
const raw = direct?.email ?? wrapped?.payload?.email;
|
|
137
|
+
const email = typeof raw === "string" ? raw : "";
|
|
138
|
+
const signedIn = (direct?.signedIn ?? wrapped?.payload?.signedIn) === true;
|
|
139
|
+
return { email, signedIn: signedIn || !!email };
|
|
134
140
|
} catch {
|
|
135
|
-
return "";
|
|
141
|
+
return { email: "", signedIn: false };
|
|
136
142
|
}
|
|
137
143
|
}
|
|
138
144
|
|
|
145
|
+
export async function signedInEmail(): Promise<string> {
|
|
146
|
+
return (await memberIdentity()).email;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/** A signed-in member nothing names yet: signed in, with a neutral label rather than another
|
|
150
|
+
* member's name or the sign-in form. */
|
|
151
|
+
function neutralMemberProfile(): AccountProfile {
|
|
152
|
+
const name = copyParam("account.member", "Member");
|
|
153
|
+
return {
|
|
154
|
+
isMember: true,
|
|
155
|
+
identityLine: copyParam("account.signedIn", "Signed in"),
|
|
156
|
+
detailLine: name,
|
|
157
|
+
memberName: name,
|
|
158
|
+
memberEmail: "",
|
|
159
|
+
memberImage: "",
|
|
160
|
+
memberInitials: "M",
|
|
161
|
+
hasMemberImage: false,
|
|
162
|
+
noMemberImage: true,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
|
|
139
166
|
export async function loadMemberProfile(guestDetailLine: string): Promise<AccountProfile> {
|
|
140
167
|
// `himi.wix.memberIdentity` is the session source of truth. Visitor-scoped
|
|
141
168
|
// getMyData can still return a site/account nickname (e.g. apptestercoowner)
|
|
142
169
|
// after sign-out or for anonymous — never treat that as a signed-in member.
|
|
143
|
-
const
|
|
144
|
-
if (!
|
|
170
|
+
const identity = await memberIdentity();
|
|
171
|
+
if (!identity.signedIn) return guestProfile(guestDetailLine);
|
|
172
|
+
const storedEmail = identity.email;
|
|
173
|
+
if (!storedEmail) return (await siteMemberProfile("")) ?? neutralMemberProfile();
|
|
145
174
|
try {
|
|
146
175
|
const data = await getMyData();
|
|
147
176
|
return profileFromData(data, storedEmail);
|