@wix/himalaya-cli 0.1615.0 → 0.1617.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.
Files changed (57) hide show
  1. package/dist/cli.mjs +37 -36
  2. package/dist/preview-assets.generated.bin +0 -0
  3. package/guides/tier-5-add-a-screen.md +1 -1
  4. package/package.json +2 -2
  5. package/templates/beauty-salon/dev/index.ts +37 -18
  6. package/templates/beauty-salon/tier5-src/_shared/sign-in-sheet.ts +18 -0
  7. package/templates/beauty-salon/tier5-src/himi-booking-service/index.ts +8 -3
  8. package/templates/beauty-salon/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
  9. package/templates/beauty-salon/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
  10. package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +8 -2
  11. package/templates/branded-lite/dev/index.ts +95 -47
  12. package/templates/branded-lite/tier5-src/_shared/sign-in-sheet.ts +18 -0
  13. package/templates/branded-lite/tier5-src/himi-booking-service/index.ts +8 -3
  14. package/templates/branded-lite/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
  15. package/templates/branded-lite/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
  16. package/templates/branded-lite/tier5-src/himi-branded-lite-program/index.ts +7 -2
  17. package/templates/branded-lite/tier5-src/himi-store-account/index.ts +8 -2
  18. package/templates/community-club/dev/index.ts +27 -13
  19. package/templates/community-club/tier5-src/_shared/sign-in-sheet.ts +18 -0
  20. package/templates/community-club/tier5-src/himi-store-account/index.ts +8 -2
  21. package/templates/events-meetups/dev/index.ts +25 -12
  22. package/templates/events-meetups/tier5-src/_shared/sign-in-sheet.ts +18 -0
  23. package/templates/events-meetups/tier5-src/himi-store-account/index.ts +8 -2
  24. package/templates/gym-fitness/dev/index.ts +41 -20
  25. package/templates/gym-fitness/tier5-src/_shared/sign-in-sheet.ts +18 -0
  26. package/templates/gym-fitness/tier5-src/himi-booking-service/index.ts +8 -3
  27. package/templates/gym-fitness/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
  28. package/templates/gym-fitness/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
  29. package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +8 -2
  30. package/templates/nonprofit-cause/dev/index.ts +31 -15
  31. package/templates/nonprofit-cause/tier5-src/_shared/sign-in-sheet.ts +18 -0
  32. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
  33. package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +8 -2
  34. package/templates/podcast-creator/dev/index.ts +29 -14
  35. package/templates/podcast-creator/tier5-src/_shared/sign-in-sheet.ts +18 -0
  36. package/templates/podcast-creator/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
  37. package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +8 -2
  38. package/templates/portfolio-creative/dev/index.ts +31 -15
  39. package/templates/portfolio-creative/tier5-src/_shared/sign-in-sheet.ts +18 -0
  40. package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +8 -2
  41. package/templates/restaurant/dev/index.ts +27 -13
  42. package/templates/restaurant/tier5-src/_shared/sign-in-sheet.ts +18 -0
  43. package/templates/restaurant/tier5-src/himi-store-account/index.ts +8 -2
  44. package/templates/retail-store/dev/index.ts +25 -12
  45. package/templates/retail-store/tier5-src/_shared/sign-in-sheet.ts +18 -0
  46. package/templates/retail-store/tier5-src/himi-store-account/index.ts +8 -2
  47. package/templates/salon-spa/tier5-src/_shared/sign-in-sheet.ts +18 -0
  48. package/templates/salon-spa/tier5-src/himi-booking-service/index.ts +8 -3
  49. package/templates/salon-spa/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
  50. package/templates/salon-spa/tier5-src/himi-store-account/index.ts +8 -2
  51. package/templates/yoga-studio/dev/index.ts +37 -18
  52. package/templates/yoga-studio/tier5-src/_shared/sign-in-sheet.ts +18 -0
  53. package/templates/yoga-studio/tier5-src/himi-booking-service/index.ts +8 -3
  54. package/templates/yoga-studio/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
  55. package/templates/yoga-studio/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
  56. package/templates/yoga-studio/tier5-src/himi-branded-lite-program/index.ts +7 -2
  57. package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +8 -2
@@ -14,6 +14,7 @@ import { dispatch } from "@himalaya/dispatch";
14
14
  import { getCurrentCart, searchOrders, type WixOrder } from "@himalaya/wix-ecom";
15
15
  import { guestProfile, loadMemberProfile, signedInEmail, strOf, fmtDate, titleCase, type AccountActivityRow } from "../_shared/himi-account";
16
16
  import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
17
+ import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
17
18
  import { memberAccountRoutes } from "../_shared/member-account-routes.js";
18
19
  import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesAppleSalesEnabled, storesProductOrders } from "@himalaya/iap-checkout";
19
20
  import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
@@ -143,7 +144,7 @@ function openSignIn(next: S, args: Record<string, string>, after: { screenId: st
143
144
  if (after.args?.channelId) back.returnChannelId = after.args.channelId;
144
145
  }
145
146
  if (!presentation) return navigate(next, { screenId, args: { ...args, ...back } });
146
- const modalArgs: Record<string, string> = { ...args, modal: "1" };
147
+ const modalArgs: Record<string, string> = { ...args, modal: "1", ...signInSheetStyle(presentation, signInStyleRequested) };
147
148
  // With no tab to open it on, a modal has no way to the member screen: it only closes.
148
149
  if (after && signInReturnTabRequested) Object.assign(modalArgs, back, { returnTab: signInReturnTabRequested });
149
150
  return navigate(next, { screenId, presentation, args: modalArgs });
@@ -231,6 +232,8 @@ let appliedSeq = 0;
231
232
  let signInScreenRequested = "";
232
233
  /** Account only: how it opens the standalone sign-in screen ("" = push). */
233
234
  let signInPresentationRequested: "" | "sheet" | "full_screen" = "";
235
+ /** Account only: `signInSheetStyle`, "page" when the app opens that sheet as a full page. */
236
+ let signInStyleRequested: "page" | "" = "";
234
237
  /** Account only: its tab, where a member screen opens after a modal sign-in. */
235
238
  let signInReturnTabRequested = "";
236
239
  let standaloneRequested = false;
@@ -268,7 +271,10 @@ function appearConfig(s: S, arg: unknown): AppearConfig {
268
271
  }
269
272
  signInScreenRequested ||= strField(arg, "signInScreen") || s.signInScreen;
270
273
  const presentation = strField(arg, "signInPresentation");
271
- if (presentation === "sheet" || presentation === "full_screen") signInPresentationRequested = presentation;
274
+ if (presentation === "sheet" || presentation === "full_screen") {
275
+ signInPresentationRequested = presentation;
276
+ signInStyleRequested = signInPageStyle(strField(arg, "signInSheetStyle"));
277
+ }
272
278
  signInReturnTabRequested ||= strField(arg, "signInReturnTab");
273
279
  // Only the sign-in screen's route carries `mode`, so it marks the form from the boot load on.
274
280
  standaloneRequested ||= s.standalone || appearing || (!routeInputConsumed && !!routeInput().mode);
@@ -2396,7 +2396,8 @@ const SCREENS = runtimeSetting({
2396
2396
  "params": {
2397
2397
  "screenId": "himi_sign_in",
2398
2398
  "mode": "signin",
2399
- "modal": "1"
2399
+ "modal": "1",
2400
+ "sheetStyle": "page"
2400
2401
  },
2401
2402
  "presentation": "sheet"
2402
2403
  }
@@ -2417,7 +2418,8 @@ const SCREENS = runtimeSetting({
2417
2418
  "params": {
2418
2419
  "screenId": "himi_sign_in",
2419
2420
  "mode": "register",
2420
- "modal": "1"
2421
+ "modal": "1",
2422
+ "sheetStyle": "page"
2421
2423
  },
2422
2424
  "presentation": "sheet"
2423
2425
  }
@@ -3703,6 +3705,7 @@ const SCREENS = runtimeSetting({
3703
3705
  "restorePurchases": "1",
3704
3706
  "signInScreen": "himi_sign_in",
3705
3707
  "signInPresentation": "sheet",
3708
+ "signInSheetStyle": "page",
3706
3709
  "signInReturnTab": "profile",
3707
3710
  "pollIdentity": "1",
3708
3711
  "cartCount": "1",
@@ -3980,7 +3983,8 @@ const SCREENS = runtimeSetting({
3980
3983
  "screenId": "himi_sign_in",
3981
3984
  "mode": "signin",
3982
3985
  "returnScreenId": "himi_account_settings",
3983
- "modal": "1"
3986
+ "modal": "1",
3987
+ "sheetStyle": "page"
3984
3988
  },
3985
3989
  "presentation": "sheet"
3986
3990
  }
@@ -7000,7 +7004,8 @@ const SCREENS = runtimeSetting({
7000
7004
  "params": {
7001
7005
  "screenId": "himi_sign_in",
7002
7006
  "returnScreenId": "himi_notif_settings",
7003
- "modal": "1"
7007
+ "modal": "1",
7008
+ "sheetStyle": "page"
7004
7009
  },
7005
7010
  "presentation": "sheet"
7006
7011
  }
@@ -7395,7 +7400,8 @@ const SCREENS = runtimeSetting({
7395
7400
  "mode": "signin",
7396
7401
  "intent": "profile",
7397
7402
  "returnScreenId": "himi_view_profile",
7398
- "modal": "1"
7403
+ "modal": "1",
7404
+ "sheetStyle": "page"
7399
7405
  },
7400
7406
  "presentation": "sheet"
7401
7407
  }
@@ -16895,7 +16901,8 @@ const SCREENS = runtimeSetting({
16895
16901
  "mode": "signin",
16896
16902
  "intent": "orders",
16897
16903
  "returnScreenId": "himi_orders",
16898
- "modal": "1"
16904
+ "modal": "1",
16905
+ "sheetStyle": "page"
16899
16906
  },
16900
16907
  "presentation": "sheet"
16901
16908
  }
@@ -17632,7 +17639,8 @@ const SCREENS = runtimeSetting({
17632
17639
  "mode": "signin",
17633
17640
  "intent": "addresses",
17634
17641
  "returnScreenId": "himi_addresses",
17635
- "modal": "1"
17642
+ "modal": "1",
17643
+ "sheetStyle": "page"
17636
17644
  },
17637
17645
  "presentation": "sheet"
17638
17646
  }
@@ -18691,7 +18699,8 @@ const SCREENS = runtimeSetting({
18691
18699
  "mode": "signin",
18692
18700
  "intent": "addresses",
18693
18701
  "returnScreenId": "himi_address",
18694
- "modal": "1"
18702
+ "modal": "1",
18703
+ "sheetStyle": "page"
18695
18704
  },
18696
18705
  "presentation": "sheet"
18697
18706
  }
@@ -19364,7 +19373,8 @@ const SCREENS = runtimeSetting({
19364
19373
  "mode": "signin",
19365
19374
  "intent": "wallet",
19366
19375
  "returnScreenId": "himi_wallet",
19367
- "modal": "1"
19376
+ "modal": "1",
19377
+ "sheetStyle": "page"
19368
19378
  },
19369
19379
  "presentation": "sheet"
19370
19380
  }
@@ -19864,7 +19874,8 @@ const SCREENS = runtimeSetting({
19864
19874
  "actionId": "himi.open",
19865
19875
  "params": {
19866
19876
  "screenId": "himi_sign_in",
19867
- "modal": "1"
19877
+ "modal": "1",
19878
+ "sheetStyle": "page"
19868
19879
  },
19869
19880
  "presentation": "sheet"
19870
19881
  }
@@ -22469,7 +22480,8 @@ const SCREENS = runtimeSetting({
22469
22480
  "mode": "signin",
22470
22481
  "intent": "post",
22471
22482
  "returnScreenId": "himi_create_post",
22472
- "modal": "1"
22483
+ "modal": "1",
22484
+ "sheetStyle": "page"
22473
22485
  },
22474
22486
  "presentation": "sheet"
22475
22487
  }
@@ -26248,7 +26260,8 @@ const SCREENS = runtimeSetting({
26248
26260
  "params": {
26249
26261
  "screenId": "himi_sign_in",
26250
26262
  "mode": "signin",
26251
- "modal": "1"
26263
+ "modal": "1",
26264
+ "sheetStyle": "page"
26252
26265
  },
26253
26266
  "presentation": "sheet"
26254
26267
  }
@@ -30875,7 +30888,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
30875
30888
  "screenId": "himi_sign_in",
30876
30889
  "returnScreenId": "himi_order",
30877
30890
  "returnId": "$service:himiBrandedOrder.id",
30878
- "modal": "1"
30891
+ "modal": "1",
30892
+ "sheetStyle": "page"
30879
30893
  },
30880
30894
  "presentation": "sheet"
30881
30895
  }
@@ -35944,7 +35958,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
35944
35958
  "screenId": "himi_sign_in",
35945
35959
  "mode": "signin",
35946
35960
  "intent": "rsvp",
35947
- "modal": "1"
35961
+ "modal": "1",
35962
+ "sheetStyle": "page"
35948
35963
  },
35949
35964
  "presentation": "sheet"
35950
35965
  }
@@ -36260,7 +36275,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
36260
36275
  "params": {
36261
36276
  "screenId": "himi_sign_in",
36262
36277
  "mode": "signin",
36263
- "modal": "1"
36278
+ "modal": "1",
36279
+ "sheetStyle": "page"
36264
36280
  },
36265
36281
  "presentation": "sheet"
36266
36282
  }
@@ -0,0 +1,18 @@
1
+ // A sign-in sheet can be a form page rather than a drawer. `sheetStyle: "page"` keeps the iOS sheet
2
+ // and opens a full-screen modal on Android and web, whose sheet is a bottom drawer. A host older
3
+ // than the param ignores it and draws its own sheet.
4
+ //
5
+ // Opt-in per app: the app passes `signInSheetStyle: "page"` beside `signInPresentation`. These
6
+ // workers are shared (Salon & Spa runs them too), and an app that opens its other sign-ins as a
7
+ // plain sheet must not get a page from some of them and a drawer from the rest.
8
+
9
+ /** The app's `signInSheetStyle` param, read beside `signInPresentation`: "page", else "". */
10
+ export function signInPageStyle(value: unknown): "page" | "" {
11
+ return value === "page" ? "page" : "";
12
+ }
13
+
14
+ /** The nav args a sign-in opened with `presentation` adds: `sheetStyle` on a sheet the app asked
15
+ * to open as a page, else none. */
16
+ export function signInSheetStyle(presentation: string | undefined, style: "page" | ""): { sheetStyle?: "page" } {
17
+ return presentation === "sheet" && style === "page" ? { sheetStyle: "page" } : {};
18
+ }
@@ -14,6 +14,7 @@ import { dispatch } from "@himalaya/dispatch";
14
14
  import { getCurrentCart, searchOrders, type WixOrder } from "@himalaya/wix-ecom";
15
15
  import { guestProfile, loadMemberProfile, signedInEmail, strOf, fmtDate, titleCase, type AccountActivityRow } from "../_shared/himi-account";
16
16
  import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
17
+ import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
17
18
  import { memberAccountRoutes } from "../_shared/member-account-routes.js";
18
19
  import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesAppleSalesEnabled, storesProductOrders } from "@himalaya/iap-checkout";
19
20
  import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
@@ -143,7 +144,7 @@ function openSignIn(next: S, args: Record<string, string>, after: { screenId: st
143
144
  if (after.args?.channelId) back.returnChannelId = after.args.channelId;
144
145
  }
145
146
  if (!presentation) return navigate(next, { screenId, args: { ...args, ...back } });
146
- const modalArgs: Record<string, string> = { ...args, modal: "1" };
147
+ const modalArgs: Record<string, string> = { ...args, modal: "1", ...signInSheetStyle(presentation, signInStyleRequested) };
147
148
  // With no tab to open it on, a modal has no way to the member screen: it only closes.
148
149
  if (after && signInReturnTabRequested) Object.assign(modalArgs, back, { returnTab: signInReturnTabRequested });
149
150
  return navigate(next, { screenId, presentation, args: modalArgs });
@@ -231,6 +232,8 @@ let appliedSeq = 0;
231
232
  let signInScreenRequested = "";
232
233
  /** Account only: how it opens the standalone sign-in screen ("" = push). */
233
234
  let signInPresentationRequested: "" | "sheet" | "full_screen" = "";
235
+ /** Account only: `signInSheetStyle`, "page" when the app opens that sheet as a full page. */
236
+ let signInStyleRequested: "page" | "" = "";
234
237
  /** Account only: its tab, where a member screen opens after a modal sign-in. */
235
238
  let signInReturnTabRequested = "";
236
239
  let standaloneRequested = false;
@@ -268,7 +271,10 @@ function appearConfig(s: S, arg: unknown): AppearConfig {
268
271
  }
269
272
  signInScreenRequested ||= strField(arg, "signInScreen") || s.signInScreen;
270
273
  const presentation = strField(arg, "signInPresentation");
271
- if (presentation === "sheet" || presentation === "full_screen") signInPresentationRequested = presentation;
274
+ if (presentation === "sheet" || presentation === "full_screen") {
275
+ signInPresentationRequested = presentation;
276
+ signInStyleRequested = signInPageStyle(strField(arg, "signInSheetStyle"));
277
+ }
272
278
  signInReturnTabRequested ||= strField(arg, "signInReturnTab");
273
279
  // Only the sign-in screen's route carries `mode`, so it marks the form from the boot load on.
274
280
  standaloneRequested ||= s.standalone || appearing || (!routeInputConsumed && !!routeInput().mode);
@@ -2308,7 +2308,8 @@ const SCREENS = runtimeSetting({
2308
2308
  "params": {
2309
2309
  "screenId": "himi_sign_in",
2310
2310
  "mode": "signin",
2311
- "modal": "1"
2311
+ "modal": "1",
2312
+ "sheetStyle": "page"
2312
2313
  },
2313
2314
  "presentation": "sheet"
2314
2315
  }
@@ -2329,7 +2330,8 @@ const SCREENS = runtimeSetting({
2329
2330
  "params": {
2330
2331
  "screenId": "himi_sign_in",
2331
2332
  "mode": "register",
2332
- "modal": "1"
2333
+ "modal": "1",
2334
+ "sheetStyle": "page"
2333
2335
  },
2334
2336
  "presentation": "sheet"
2335
2337
  }
@@ -3615,6 +3617,7 @@ const SCREENS = runtimeSetting({
3615
3617
  "restorePurchases": "1",
3616
3618
  "signInScreen": "himi_sign_in",
3617
3619
  "signInPresentation": "sheet",
3620
+ "signInSheetStyle": "page",
3618
3621
  "signInReturnTab": "profile",
3619
3622
  "pollIdentity": "1",
3620
3623
  "copy": "{\"account.subtitle\":\"Reservations, RSVPs and saved content in one place.\",\"storeAccount.authBody\":\"Sign in to continue — reservations and RSVPs stay with you.\",\"storeAccount.authBodyRegister\":\"Create a member account to continue — reservations and RSVPs stay with you.\"}"
@@ -3872,7 +3875,8 @@ const SCREENS = runtimeSetting({
3872
3875
  "screenId": "himi_sign_in",
3873
3876
  "mode": "signin",
3874
3877
  "returnScreenId": "himi_account_settings",
3875
- "modal": "1"
3878
+ "modal": "1",
3879
+ "sheetStyle": "page"
3876
3880
  },
3877
3881
  "presentation": "sheet"
3878
3882
  }
@@ -6892,7 +6896,8 @@ const SCREENS = runtimeSetting({
6892
6896
  "params": {
6893
6897
  "screenId": "himi_sign_in",
6894
6898
  "returnScreenId": "himi_notif_settings",
6895
- "modal": "1"
6899
+ "modal": "1",
6900
+ "sheetStyle": "page"
6896
6901
  },
6897
6902
  "presentation": "sheet"
6898
6903
  }
@@ -7287,7 +7292,8 @@ const SCREENS = runtimeSetting({
7287
7292
  "mode": "signin",
7288
7293
  "intent": "profile",
7289
7294
  "returnScreenId": "himi_view_profile",
7290
- "modal": "1"
7295
+ "modal": "1",
7296
+ "sheetStyle": "page"
7291
7297
  },
7292
7298
  "presentation": "sheet"
7293
7299
  }
@@ -8396,7 +8402,8 @@ const SCREENS = runtimeSetting({
8396
8402
  "mode": "signin",
8397
8403
  "intent": "addresses",
8398
8404
  "returnScreenId": "himi_addresses",
8399
- "modal": "1"
8405
+ "modal": "1",
8406
+ "sheetStyle": "page"
8400
8407
  },
8401
8408
  "presentation": "sheet"
8402
8409
  }
@@ -9455,7 +9462,8 @@ const SCREENS = runtimeSetting({
9455
9462
  "mode": "signin",
9456
9463
  "intent": "addresses",
9457
9464
  "returnScreenId": "himi_address",
9458
- "modal": "1"
9465
+ "modal": "1",
9466
+ "sheetStyle": "page"
9459
9467
  },
9460
9468
  "presentation": "sheet"
9461
9469
  }
@@ -10128,7 +10136,8 @@ const SCREENS = runtimeSetting({
10128
10136
  "mode": "signin",
10129
10137
  "intent": "wallet",
10130
10138
  "returnScreenId": "himi_wallet",
10131
- "modal": "1"
10139
+ "modal": "1",
10140
+ "sheetStyle": "page"
10132
10141
  },
10133
10142
  "presentation": "sheet"
10134
10143
  }
@@ -13472,7 +13481,8 @@ const SCREENS = runtimeSetting({
13472
13481
  "mode": "signin",
13473
13482
  "intent": "post",
13474
13483
  "returnScreenId": "himi_create_post",
13475
- "modal": "1"
13484
+ "modal": "1",
13485
+ "sheetStyle": "page"
13476
13486
  },
13477
13487
  "presentation": "sheet"
13478
13488
  }
@@ -17251,7 +17261,8 @@ const SCREENS = runtimeSetting({
17251
17261
  "params": {
17252
17262
  "screenId": "himi_sign_in",
17253
17263
  "mode": "signin",
17254
- "modal": "1"
17264
+ "modal": "1",
17265
+ "sheetStyle": "page"
17255
17266
  },
17256
17267
  "presentation": "sheet"
17257
17268
  }
@@ -22144,7 +22155,8 @@ const SCREENS = runtimeSetting({
22144
22155
  "screenId": "himi_sign_in",
22145
22156
  "intent": "food-orders",
22146
22157
  "returnScreenId": "himi_food_orders",
22147
- "modal": "1"
22158
+ "modal": "1",
22159
+ "sheetStyle": "page"
22148
22160
  },
22149
22161
  "presentation": "sheet"
22150
22162
  }
@@ -26611,7 +26623,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
26611
26623
  "screenId": "himi_sign_in",
26612
26624
  "mode": "signin",
26613
26625
  "intent": "rsvp",
26614
- "modal": "1"
26626
+ "modal": "1",
26627
+ "sheetStyle": "page"
26615
26628
  },
26616
26629
  "presentation": "sheet"
26617
26630
  }
@@ -26927,7 +26940,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
26927
26940
  "params": {
26928
26941
  "screenId": "himi_sign_in",
26929
26942
  "mode": "signin",
26930
- "modal": "1"
26943
+ "modal": "1",
26944
+ "sheetStyle": "page"
26931
26945
  },
26932
26946
  "presentation": "sheet"
26933
26947
  }
@@ -0,0 +1,18 @@
1
+ // A sign-in sheet can be a form page rather than a drawer. `sheetStyle: "page"` keeps the iOS sheet
2
+ // and opens a full-screen modal on Android and web, whose sheet is a bottom drawer. A host older
3
+ // than the param ignores it and draws its own sheet.
4
+ //
5
+ // Opt-in per app: the app passes `signInSheetStyle: "page"` beside `signInPresentation`. These
6
+ // workers are shared (Salon & Spa runs them too), and an app that opens its other sign-ins as a
7
+ // plain sheet must not get a page from some of them and a drawer from the rest.
8
+
9
+ /** The app's `signInSheetStyle` param, read beside `signInPresentation`: "page", else "". */
10
+ export function signInPageStyle(value: unknown): "page" | "" {
11
+ return value === "page" ? "page" : "";
12
+ }
13
+
14
+ /** The nav args a sign-in opened with `presentation` adds: `sheetStyle` on a sheet the app asked
15
+ * to open as a page, else none. */
16
+ export function signInSheetStyle(presentation: string | undefined, style: "page" | ""): { sheetStyle?: "page" } {
17
+ return presentation === "sheet" && style === "page" ? { sheetStyle: "page" } : {};
18
+ }
@@ -14,6 +14,7 @@ import { dispatch } from "@himalaya/dispatch";
14
14
  import { getCurrentCart, searchOrders, type WixOrder } from "@himalaya/wix-ecom";
15
15
  import { guestProfile, loadMemberProfile, signedInEmail, strOf, fmtDate, titleCase, type AccountActivityRow } from "../_shared/himi-account";
16
16
  import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
17
+ import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
17
18
  import { memberAccountRoutes } from "../_shared/member-account-routes.js";
18
19
  import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesAppleSalesEnabled, storesProductOrders } from "@himalaya/iap-checkout";
19
20
  import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
@@ -143,7 +144,7 @@ function openSignIn(next: S, args: Record<string, string>, after: { screenId: st
143
144
  if (after.args?.channelId) back.returnChannelId = after.args.channelId;
144
145
  }
145
146
  if (!presentation) return navigate(next, { screenId, args: { ...args, ...back } });
146
- const modalArgs: Record<string, string> = { ...args, modal: "1" };
147
+ const modalArgs: Record<string, string> = { ...args, modal: "1", ...signInSheetStyle(presentation, signInStyleRequested) };
147
148
  // With no tab to open it on, a modal has no way to the member screen: it only closes.
148
149
  if (after && signInReturnTabRequested) Object.assign(modalArgs, back, { returnTab: signInReturnTabRequested });
149
150
  return navigate(next, { screenId, presentation, args: modalArgs });
@@ -231,6 +232,8 @@ let appliedSeq = 0;
231
232
  let signInScreenRequested = "";
232
233
  /** Account only: how it opens the standalone sign-in screen ("" = push). */
233
234
  let signInPresentationRequested: "" | "sheet" | "full_screen" = "";
235
+ /** Account only: `signInSheetStyle`, "page" when the app opens that sheet as a full page. */
236
+ let signInStyleRequested: "page" | "" = "";
234
237
  /** Account only: its tab, where a member screen opens after a modal sign-in. */
235
238
  let signInReturnTabRequested = "";
236
239
  let standaloneRequested = false;
@@ -268,7 +271,10 @@ function appearConfig(s: S, arg: unknown): AppearConfig {
268
271
  }
269
272
  signInScreenRequested ||= strField(arg, "signInScreen") || s.signInScreen;
270
273
  const presentation = strField(arg, "signInPresentation");
271
- if (presentation === "sheet" || presentation === "full_screen") signInPresentationRequested = presentation;
274
+ if (presentation === "sheet" || presentation === "full_screen") {
275
+ signInPresentationRequested = presentation;
276
+ signInStyleRequested = signInPageStyle(strField(arg, "signInSheetStyle"));
277
+ }
272
278
  signInReturnTabRequested ||= strField(arg, "signInReturnTab");
273
279
  // Only the sign-in screen's route carries `mode`, so it marks the form from the boot load on.
274
280
  standaloneRequested ||= s.standalone || appearing || (!routeInputConsumed && !!routeInput().mode);
@@ -1946,7 +1946,8 @@ const SCREENS = runtimeSetting({
1946
1946
  "params": {
1947
1947
  "screenId": "himi_sign_in",
1948
1948
  "mode": "signin",
1949
- "modal": "1"
1949
+ "modal": "1",
1950
+ "sheetStyle": "page"
1950
1951
  },
1951
1952
  "presentation": "sheet"
1952
1953
  }
@@ -1967,7 +1968,8 @@ const SCREENS = runtimeSetting({
1967
1968
  "params": {
1968
1969
  "screenId": "himi_sign_in",
1969
1970
  "mode": "register",
1970
- "modal": "1"
1971
+ "modal": "1",
1972
+ "sheetStyle": "page"
1971
1973
  },
1972
1974
  "presentation": "sheet"
1973
1975
  }
@@ -3172,6 +3174,7 @@ const SCREENS = runtimeSetting({
3172
3174
  "restorePurchases": "1",
3173
3175
  "signInScreen": "himi_sign_in",
3174
3176
  "signInPresentation": "sheet",
3177
+ "signInSheetStyle": "page",
3175
3178
  "signInReturnTab": "profile",
3176
3179
  "pollIdentity": "1",
3177
3180
  "cartCount": "1",
@@ -3449,7 +3452,8 @@ const SCREENS = runtimeSetting({
3449
3452
  "screenId": "himi_sign_in",
3450
3453
  "mode": "signin",
3451
3454
  "returnScreenId": "himi_account_settings",
3452
- "modal": "1"
3455
+ "modal": "1",
3456
+ "sheetStyle": "page"
3453
3457
  },
3454
3458
  "presentation": "sheet"
3455
3459
  }
@@ -6469,7 +6473,8 @@ const SCREENS = runtimeSetting({
6469
6473
  "params": {
6470
6474
  "screenId": "himi_sign_in",
6471
6475
  "returnScreenId": "himi_notif_settings",
6472
- "modal": "1"
6476
+ "modal": "1",
6477
+ "sheetStyle": "page"
6473
6478
  },
6474
6479
  "presentation": "sheet"
6475
6480
  }
@@ -6864,7 +6869,8 @@ const SCREENS = runtimeSetting({
6864
6869
  "mode": "signin",
6865
6870
  "intent": "profile",
6866
6871
  "returnScreenId": "himi_view_profile",
6867
- "modal": "1"
6872
+ "modal": "1",
6873
+ "sheetStyle": "page"
6868
6874
  },
6869
6875
  "presentation": "sheet"
6870
6876
  }
@@ -16375,7 +16381,8 @@ const SCREENS = runtimeSetting({
16375
16381
  "mode": "signin",
16376
16382
  "intent": "orders",
16377
16383
  "returnScreenId": "himi_orders",
16378
- "modal": "1"
16384
+ "modal": "1",
16385
+ "sheetStyle": "page"
16379
16386
  },
16380
16387
  "presentation": "sheet"
16381
16388
  }
@@ -17112,7 +17119,8 @@ const SCREENS = runtimeSetting({
17112
17119
  "mode": "signin",
17113
17120
  "intent": "addresses",
17114
17121
  "returnScreenId": "himi_addresses",
17115
- "modal": "1"
17122
+ "modal": "1",
17123
+ "sheetStyle": "page"
17116
17124
  },
17117
17125
  "presentation": "sheet"
17118
17126
  }
@@ -18171,7 +18179,8 @@ const SCREENS = runtimeSetting({
18171
18179
  "mode": "signin",
18172
18180
  "intent": "addresses",
18173
18181
  "returnScreenId": "himi_address",
18174
- "modal": "1"
18182
+ "modal": "1",
18183
+ "sheetStyle": "page"
18175
18184
  },
18176
18185
  "presentation": "sheet"
18177
18186
  }
@@ -18844,7 +18853,8 @@ const SCREENS = runtimeSetting({
18844
18853
  "mode": "signin",
18845
18854
  "intent": "wallet",
18846
18855
  "returnScreenId": "himi_wallet",
18847
- "modal": "1"
18856
+ "modal": "1",
18857
+ "sheetStyle": "page"
18848
18858
  },
18849
18859
  "presentation": "sheet"
18850
18860
  }
@@ -19068,7 +19078,8 @@ const SCREENS = runtimeSetting({
19068
19078
  "mode": "signin",
19069
19079
  "intent": "post",
19070
19080
  "returnScreenId": "himi_create_post",
19071
- "modal": "1"
19081
+ "modal": "1",
19082
+ "sheetStyle": "page"
19072
19083
  },
19073
19084
  "presentation": "sheet"
19074
19085
  }
@@ -23398,7 +23409,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
23398
23409
  "screenId": "himi_sign_in",
23399
23410
  "returnScreenId": "himi_order",
23400
23411
  "returnId": "$service:himiBrandedOrder.id",
23401
- "modal": "1"
23412
+ "modal": "1",
23413
+ "sheetStyle": "page"
23402
23414
  },
23403
23415
  "presentation": "sheet"
23404
23416
  }
@@ -25337,7 +25349,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
25337
25349
  "params": {
25338
25350
  "screenId": "himi_sign_in",
25339
25351
  "mode": "signin",
25340
- "modal": "1"
25352
+ "modal": "1",
25353
+ "sheetStyle": "page"
25341
25354
  },
25342
25355
  "presentation": "sheet"
25343
25356
  }
@@ -0,0 +1,18 @@
1
+ // A sign-in sheet can be a form page rather than a drawer. `sheetStyle: "page"` keeps the iOS sheet
2
+ // and opens a full-screen modal on Android and web, whose sheet is a bottom drawer. A host older
3
+ // than the param ignores it and draws its own sheet.
4
+ //
5
+ // Opt-in per app: the app passes `signInSheetStyle: "page"` beside `signInPresentation`. These
6
+ // workers are shared (Salon & Spa runs them too), and an app that opens its other sign-ins as a
7
+ // plain sheet must not get a page from some of them and a drawer from the rest.
8
+
9
+ /** The app's `signInSheetStyle` param, read beside `signInPresentation`: "page", else "". */
10
+ export function signInPageStyle(value: unknown): "page" | "" {
11
+ return value === "page" ? "page" : "";
12
+ }
13
+
14
+ /** The nav args a sign-in opened with `presentation` adds: `sheetStyle` on a sheet the app asked
15
+ * to open as a page, else none. */
16
+ export function signInSheetStyle(presentation: string | undefined, style: "page" | ""): { sheetStyle?: "page" } {
17
+ return presentation === "sheet" && style === "page" ? { sheetStyle: "page" } : {};
18
+ }
@@ -14,6 +14,7 @@ import { dispatch } from "@himalaya/dispatch";
14
14
  import { getCurrentCart, searchOrders, type WixOrder } from "@himalaya/wix-ecom";
15
15
  import { guestProfile, loadMemberProfile, signedInEmail, strOf, fmtDate, titleCase, type AccountActivityRow } from "../_shared/himi-account";
16
16
  import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
17
+ import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
17
18
  import { memberAccountRoutes } from "../_shared/member-account-routes.js";
18
19
  import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesAppleSalesEnabled, storesProductOrders } from "@himalaya/iap-checkout";
19
20
  import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
@@ -143,7 +144,7 @@ function openSignIn(next: S, args: Record<string, string>, after: { screenId: st
143
144
  if (after.args?.channelId) back.returnChannelId = after.args.channelId;
144
145
  }
145
146
  if (!presentation) return navigate(next, { screenId, args: { ...args, ...back } });
146
- const modalArgs: Record<string, string> = { ...args, modal: "1" };
147
+ const modalArgs: Record<string, string> = { ...args, modal: "1", ...signInSheetStyle(presentation, signInStyleRequested) };
147
148
  // With no tab to open it on, a modal has no way to the member screen: it only closes.
148
149
  if (after && signInReturnTabRequested) Object.assign(modalArgs, back, { returnTab: signInReturnTabRequested });
149
150
  return navigate(next, { screenId, presentation, args: modalArgs });
@@ -231,6 +232,8 @@ let appliedSeq = 0;
231
232
  let signInScreenRequested = "";
232
233
  /** Account only: how it opens the standalone sign-in screen ("" = push). */
233
234
  let signInPresentationRequested: "" | "sheet" | "full_screen" = "";
235
+ /** Account only: `signInSheetStyle`, "page" when the app opens that sheet as a full page. */
236
+ let signInStyleRequested: "page" | "" = "";
234
237
  /** Account only: its tab, where a member screen opens after a modal sign-in. */
235
238
  let signInReturnTabRequested = "";
236
239
  let standaloneRequested = false;
@@ -268,7 +271,10 @@ function appearConfig(s: S, arg: unknown): AppearConfig {
268
271
  }
269
272
  signInScreenRequested ||= strField(arg, "signInScreen") || s.signInScreen;
270
273
  const presentation = strField(arg, "signInPresentation");
271
- if (presentation === "sheet" || presentation === "full_screen") signInPresentationRequested = presentation;
274
+ if (presentation === "sheet" || presentation === "full_screen") {
275
+ signInPresentationRequested = presentation;
276
+ signInStyleRequested = signInPageStyle(strField(arg, "signInSheetStyle"));
277
+ }
272
278
  signInReturnTabRequested ||= strField(arg, "signInReturnTab");
273
279
  // Only the sign-in screen's route carries `mode`, so it marks the form from the boot load on.
274
280
  standaloneRequested ||= s.standalone || appearing || (!routeInputConsumed && !!routeInput().mode);