@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
@@ -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
+ }
@@ -13,6 +13,7 @@ import { addDays, dayKey, dayLabel, timeLabel } from "@himalaya/time";
13
13
  import { getService, queryServiceAvailability, registerToWaitlist, type WixAvailabilityEntry, type WixService, type WixServiceAddress, type WixServiceBookingPolicy } from "@himalaya/wix-bookings";
14
14
  import { getMyMember } from "@himalaya/wix-members";
15
15
  import { memberAccess, type MemberAccess } from "../_shared/member-access.js";
16
+ import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
16
17
  import { placesIn, sessionControl, sessionOf, type MemberPlace, type Session, type SessionControl } from "../_shared/booking-session.js";
17
18
  import { categoryName, courseDatesText, courseReadWindows, courseSessionsAvailability, courseWindowOpen, serviceDurationText, servicePriceLine, slotStartInstant, type BookingLabel, type ServicePriceLine } from "../_shared/himi-bookings.js";
18
19
  import { formatServiceMoney, serviceCurrency } from "../_shared/wix-service-price.js";
@@ -723,10 +724,14 @@ const sameMember = (a: MemberAccess | undefined, b: MemberAccess | undefined): b
723
724
  * appear (or tap) params — Branded Lite passes `himi_sign_in` as a sheet. */
724
725
  let signInScreenId = "";
725
726
  let signInPresentation: "" | "sheet" | "full_screen" = "";
727
+ let signInStyle: "page" | "" = "";
726
728
  function rememberSignIn(arg: unknown): void {
727
- const a = (arg ?? {}) as { signInScreenId?: unknown; signInPresentation?: unknown };
729
+ const a = (arg ?? {}) as { signInScreenId?: unknown; signInPresentation?: unknown; signInSheetStyle?: unknown };
728
730
  if (typeof a.signInScreenId === "string" && a.signInScreenId.trim()) signInScreenId = a.signInScreenId.trim();
729
- if (a.signInPresentation === "sheet" || a.signInPresentation === "full_screen") signInPresentation = a.signInPresentation;
731
+ if (a.signInPresentation === "sheet" || a.signInPresentation === "full_screen") {
732
+ signInPresentation = a.signInPresentation;
733
+ signInStyle = signInPageStyle(a.signInSheetStyle);
734
+ }
730
735
  }
731
736
 
732
737
  // ---- State -----------------------------------------------------------------------
@@ -1130,7 +1135,7 @@ const svc = defineService<S, {
1130
1135
  // joins the waitlist itself. A sign-in sheet only closes, and this screen loads again.
1131
1136
  if (!signInScreenId) return navigate(s, { screenId: "himi_time", args: { id: s.id, start: s.sessionStart, sessionId: s.sessionId } });
1132
1137
  return navigate(s, signInPresentation
1133
- ? { screenId: signInScreenId, presentation: signInPresentation, args: { mode: "signin", modal: "1" } }
1138
+ ? { screenId: signInScreenId, presentation: signInPresentation, args: { mode: "signin", modal: "1", ...signInSheetStyle(signInPresentation, signInStyle) } }
1134
1139
  : { screenId: signInScreenId, args: { mode: "signin" } });
1135
1140
  }
1136
1141
  const name = await memberName();
@@ -28,6 +28,7 @@ import {
28
28
  queryServices, registerToWaitlist, type WixAvailabilityEntry, type WixBooking, type WixService,
29
29
  } from "@himalaya/wix-bookings";
30
30
  import { getMyMember } from "@himalaya/wix-members";
31
+ import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
31
32
  import { LOADING, loadFailed, type LoadFlags } from "../_shared/branded-load-state.js";
32
33
  import { copyParam, copyTemplate, stashCopy } from "../_shared/himi-copy.js";
33
34
  import { slotStartInstant } from "../_shared/himi-bookings.js";
@@ -650,6 +651,7 @@ async function settled(next: S | undefined): Promise<S | undefined> {
650
651
 
651
652
  /** How the app opens its sign-in screen, from the appear params ("" = push). */
652
653
  let signInPresentation: "" | "sheet" | "full_screen" = "";
654
+ let signInStyle: "page" | "" = "";
653
655
  /** The app's sign-in screen (`signInScreenId` appear param): Branded Lite's `himi_sign_in` by
654
656
  * default; an app with no such screen names its own (salon-spa: the Profile tab, `himi_account`). */
655
657
  let signInScreenId = "himi_sign_in";
@@ -680,7 +682,10 @@ const svc = defineService<S, {
680
682
  load: async (s, p) => {
681
683
  stashCopy(p);
682
684
  const presentation = argOf(p, "signInPresentation");
683
- if (presentation === "sheet" || presentation === "full_screen") signInPresentation = presentation;
685
+ if (presentation === "sheet" || presentation === "full_screen") {
686
+ signInPresentation = presentation;
687
+ signInStyle = signInPageStyle(argOf(p, "signInSheetStyle"));
688
+ }
684
689
  const signInScreen = argOf(p, "signInScreenId");
685
690
  if (/^[a-z][a-z0-9_]{0,63}$/.test(signInScreen)) signInScreenId = signInScreen;
686
691
  const fw = Number(argOf(p, "firstWeekday") || s.firstWeekday);
@@ -883,7 +888,7 @@ const svc = defineService<S, {
883
888
  busy = false;
884
889
  // As a modal it only closes, and this screen loads again (its re-appearance reload).
885
890
  return navigate(s, signInPresentation
886
- ? { screenId: signInScreenId, presentation: signInPresentation, args: { mode: "signin", modal: "1" } }
891
+ ? { screenId: signInScreenId, presentation: signInPresentation, args: { mode: "signin", modal: "1", ...signInSheetStyle(signInPresentation, signInStyle) } }
887
892
  : { screenId: signInScreenId, args: { mode: "signin", returnScreenId: "himi_agenda" } });
888
893
  }
889
894
  const name = await memberName();
@@ -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);
@@ -2904,7 +2904,8 @@ const SCREENS = runtimeSetting({
2904
2904
  "params": {
2905
2905
  "screenId": "himi_sign_in",
2906
2906
  "mode": "signin",
2907
- "modal": "1"
2907
+ "modal": "1",
2908
+ "sheetStyle": "page"
2908
2909
  },
2909
2910
  "presentation": "sheet"
2910
2911
  }
@@ -2925,7 +2926,8 @@ const SCREENS = runtimeSetting({
2925
2926
  "params": {
2926
2927
  "screenId": "himi_sign_in",
2927
2928
  "mode": "register",
2928
- "modal": "1"
2929
+ "modal": "1",
2930
+ "sheetStyle": "page"
2929
2931
  },
2930
2932
  "presentation": "sheet"
2931
2933
  }
@@ -4210,6 +4212,7 @@ const SCREENS = runtimeSetting({
4210
4212
  "restorePurchases": "1",
4211
4213
  "signInScreen": "himi_sign_in",
4212
4214
  "signInPresentation": "sheet",
4215
+ "signInSheetStyle": "page",
4213
4216
  "signInReturnTab": "profile",
4214
4217
  "pollIdentity": "1",
4215
4218
  "copy": "{\"account.subtitle\":\"Bookings, RSVPs, memberships, programs and saved content in one place.\",\"storeAccount.authBody\":\"Sign in to continue — bookings, RSVPs, memberships and programs stay with you.\",\"storeAccount.authBodyRegister\":\"Create a member account to continue — bookings, RSVPs, memberships and programs stay with you.\"}"
@@ -4467,7 +4470,8 @@ const SCREENS = runtimeSetting({
4467
4470
  "screenId": "himi_sign_in",
4468
4471
  "mode": "signin",
4469
4472
  "returnScreenId": "himi_account_settings",
4470
- "modal": "1"
4473
+ "modal": "1",
4474
+ "sheetStyle": "page"
4471
4475
  },
4472
4476
  "presentation": "sheet"
4473
4477
  }
@@ -7487,7 +7491,8 @@ const SCREENS = runtimeSetting({
7487
7491
  "params": {
7488
7492
  "screenId": "himi_sign_in",
7489
7493
  "returnScreenId": "himi_notif_settings",
7490
- "modal": "1"
7494
+ "modal": "1",
7495
+ "sheetStyle": "page"
7491
7496
  },
7492
7497
  "presentation": "sheet"
7493
7498
  }
@@ -7882,7 +7887,8 @@ const SCREENS = runtimeSetting({
7882
7887
  "mode": "signin",
7883
7888
  "intent": "profile",
7884
7889
  "returnScreenId": "himi_view_profile",
7885
- "modal": "1"
7890
+ "modal": "1",
7891
+ "sheetStyle": "page"
7886
7892
  },
7887
7893
  "presentation": "sheet"
7888
7894
  }
@@ -8950,7 +8956,8 @@ const SCREENS = runtimeSetting({
8950
8956
  "mode": "signin",
8951
8957
  "intent": "wallet",
8952
8958
  "returnScreenId": "himi_wallet",
8953
- "modal": "1"
8959
+ "modal": "1",
8960
+ "sheetStyle": "page"
8954
8961
  },
8955
8962
  "presentation": "sheet"
8956
8963
  }
@@ -9462,7 +9469,8 @@ const SCREENS = runtimeSetting({
9462
9469
  "actionId": "tier5.himiPlaceSummary.load",
9463
9470
  "params": {
9464
9471
  "verticals": "[\"bookings\",\"programs\",\"plans\",\"events\",\"blog\"]",
9465
- "signInPresentation": "sheet"
9472
+ "signInPresentation": "sheet",
9473
+ "signInSheetStyle": "page"
9466
9474
  }
9467
9475
  }
9468
9476
  }
@@ -12366,7 +12374,8 @@ const SCREENS = runtimeSetting({
12366
12374
  "screenId": "himi_sign_in",
12367
12375
  "mode": "signin",
12368
12376
  "returnScreenId": "himi_bookings",
12369
- "modal": "1"
12377
+ "modal": "1",
12378
+ "sheetStyle": "page"
12370
12379
  },
12371
12380
  "presentation": "sheet"
12372
12381
  },
@@ -15479,7 +15488,8 @@ const SCREENS = runtimeSetting({
15479
15488
  "actionId": "tier5.himiBrandedAgenda.load",
15480
15489
  "params": {
15481
15490
  "firstWeekday": "0",
15482
- "signInPresentation": "sheet"
15491
+ "signInPresentation": "sheet",
15492
+ "signInSheetStyle": "page"
15483
15493
  }
15484
15494
  }
15485
15495
  }
@@ -19074,7 +19084,8 @@ const SCREENS = runtimeSetting({
19074
19084
  "mode": "signin",
19075
19085
  "intent": "programs",
19076
19086
  "returnScreenId": "himi_member_programs",
19077
- "modal": "1"
19087
+ "modal": "1",
19088
+ "sheetStyle": "page"
19078
19089
  },
19079
19090
  "presentation": "sheet"
19080
19091
  }
@@ -22067,7 +22078,8 @@ const SCREENS = runtimeSetting({
22067
22078
  "params": {
22068
22079
  "screenId": "himi_sign_in",
22069
22080
  "mode": "signin",
22070
- "modal": "1"
22081
+ "modal": "1",
22082
+ "sheetStyle": "page"
22071
22083
  },
22072
22084
  "presentation": "sheet"
22073
22085
  }
@@ -22455,7 +22467,8 @@ const SCREENS = runtimeSetting({
22455
22467
  "mode": "signin",
22456
22468
  "intent": "post",
22457
22469
  "returnScreenId": "himi_create_post",
22458
- "modal": "1"
22470
+ "modal": "1",
22471
+ "sheetStyle": "page"
22459
22472
  },
22460
22473
  "presentation": "sheet"
22461
22474
  }
@@ -26234,7 +26247,8 @@ const SCREENS = runtimeSetting({
26234
26247
  "params": {
26235
26248
  "screenId": "himi_sign_in",
26236
26249
  "mode": "signin",
26237
- "modal": "1"
26250
+ "modal": "1",
26251
+ "sheetStyle": "page"
26238
26252
  },
26239
26253
  "presentation": "sheet"
26240
26254
  }
@@ -32241,7 +32255,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
32241
32255
  "actionId": "tier5.himiBookingService.load",
32242
32256
  "params": {
32243
32257
  "signInScreenId": "himi_sign_in",
32244
- "signInPresentation": "sheet"
32258
+ "signInPresentation": "sheet",
32259
+ "signInSheetStyle": "page"
32245
32260
  }
32246
32261
  }
32247
32262
  }
@@ -35469,7 +35484,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
35469
35484
  "screenId": "himi_sign_in",
35470
35485
  "mode": "signin",
35471
35486
  "intent": "book",
35472
- "modal": "1"
35487
+ "modal": "1",
35488
+ "sheetStyle": "page"
35473
35489
  },
35474
35490
  "presentation": "sheet"
35475
35491
  }
@@ -36222,7 +36238,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
36222
36238
  "onAppear": {
36223
36239
  "actionId": "tier5.himiBrandedProgram.load",
36224
36240
  "params": {
36225
- "signInPresentation": "sheet"
36241
+ "signInPresentation": "sheet",
36242
+ "signInSheetStyle": "page"
36226
36243
  }
36227
36244
  }
36228
36245
  }
@@ -39503,7 +39520,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
39503
39520
  "screenId": "himi_sign_in",
39504
39521
  "mode": "signin",
39505
39522
  "intent": "rsvp",
39506
- "modal": "1"
39523
+ "modal": "1",
39524
+ "sheetStyle": "page"
39507
39525
  },
39508
39526
  "presentation": "sheet"
39509
39527
  }
@@ -39819,7 +39837,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
39819
39837
  "params": {
39820
39838
  "screenId": "himi_sign_in",
39821
39839
  "mode": "signin",
39822
- "modal": "1"
39840
+ "modal": "1",
39841
+ "sheetStyle": "page"
39823
39842
  },
39824
39843
  "presentation": "sheet"
39825
39844
  }
@@ -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
+ }
@@ -13,6 +13,7 @@ import { addDays, dayKey, dayLabel, timeLabel } from "@himalaya/time";
13
13
  import { getService, queryServiceAvailability, registerToWaitlist, type WixAvailabilityEntry, type WixService, type WixServiceAddress, type WixServiceBookingPolicy } from "@himalaya/wix-bookings";
14
14
  import { getMyMember } from "@himalaya/wix-members";
15
15
  import { memberAccess, type MemberAccess } from "../_shared/member-access.js";
16
+ import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
16
17
  import { placesIn, sessionControl, sessionOf, type MemberPlace, type Session, type SessionControl } from "../_shared/booking-session.js";
17
18
  import { categoryName, courseDatesText, courseReadWindows, courseSessionsAvailability, courseWindowOpen, serviceDurationText, servicePriceLine, slotStartInstant, type BookingLabel, type ServicePriceLine } from "../_shared/himi-bookings.js";
18
19
  import { formatServiceMoney, serviceCurrency } from "../_shared/wix-service-price.js";
@@ -723,10 +724,14 @@ const sameMember = (a: MemberAccess | undefined, b: MemberAccess | undefined): b
723
724
  * appear (or tap) params — Branded Lite passes `himi_sign_in` as a sheet. */
724
725
  let signInScreenId = "";
725
726
  let signInPresentation: "" | "sheet" | "full_screen" = "";
727
+ let signInStyle: "page" | "" = "";
726
728
  function rememberSignIn(arg: unknown): void {
727
- const a = (arg ?? {}) as { signInScreenId?: unknown; signInPresentation?: unknown };
729
+ const a = (arg ?? {}) as { signInScreenId?: unknown; signInPresentation?: unknown; signInSheetStyle?: unknown };
728
730
  if (typeof a.signInScreenId === "string" && a.signInScreenId.trim()) signInScreenId = a.signInScreenId.trim();
729
- if (a.signInPresentation === "sheet" || a.signInPresentation === "full_screen") signInPresentation = a.signInPresentation;
731
+ if (a.signInPresentation === "sheet" || a.signInPresentation === "full_screen") {
732
+ signInPresentation = a.signInPresentation;
733
+ signInStyle = signInPageStyle(a.signInSheetStyle);
734
+ }
730
735
  }
731
736
 
732
737
  // ---- State -----------------------------------------------------------------------
@@ -1130,7 +1135,7 @@ const svc = defineService<S, {
1130
1135
  // joins the waitlist itself. A sign-in sheet only closes, and this screen loads again.
1131
1136
  if (!signInScreenId) return navigate(s, { screenId: "himi_time", args: { id: s.id, start: s.sessionStart, sessionId: s.sessionId } });
1132
1137
  return navigate(s, signInPresentation
1133
- ? { screenId: signInScreenId, presentation: signInPresentation, args: { mode: "signin", modal: "1" } }
1138
+ ? { screenId: signInScreenId, presentation: signInPresentation, args: { mode: "signin", modal: "1", ...signInSheetStyle(signInPresentation, signInStyle) } }
1134
1139
  : { screenId: signInScreenId, args: { mode: "signin" } });
1135
1140
  }
1136
1141
  const name = await memberName();
@@ -28,6 +28,7 @@ import {
28
28
  queryServices, registerToWaitlist, type WixAvailabilityEntry, type WixBooking, type WixService,
29
29
  } from "@himalaya/wix-bookings";
30
30
  import { getMyMember } from "@himalaya/wix-members";
31
+ import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
31
32
  import { LOADING, loadFailed, type LoadFlags } from "../_shared/branded-load-state.js";
32
33
  import { copyParam, copyTemplate, stashCopy } from "../_shared/himi-copy.js";
33
34
  import { slotStartInstant } from "../_shared/himi-bookings.js";
@@ -650,6 +651,7 @@ async function settled(next: S | undefined): Promise<S | undefined> {
650
651
 
651
652
  /** How the app opens its sign-in screen, from the appear params ("" = push). */
652
653
  let signInPresentation: "" | "sheet" | "full_screen" = "";
654
+ let signInStyle: "page" | "" = "";
653
655
  /** The app's sign-in screen (`signInScreenId` appear param): Branded Lite's `himi_sign_in` by
654
656
  * default; an app with no such screen names its own (salon-spa: the Profile tab, `himi_account`). */
655
657
  let signInScreenId = "himi_sign_in";
@@ -680,7 +682,10 @@ const svc = defineService<S, {
680
682
  load: async (s, p) => {
681
683
  stashCopy(p);
682
684
  const presentation = argOf(p, "signInPresentation");
683
- if (presentation === "sheet" || presentation === "full_screen") signInPresentation = presentation;
685
+ if (presentation === "sheet" || presentation === "full_screen") {
686
+ signInPresentation = presentation;
687
+ signInStyle = signInPageStyle(argOf(p, "signInSheetStyle"));
688
+ }
684
689
  const signInScreen = argOf(p, "signInScreenId");
685
690
  if (/^[a-z][a-z0-9_]{0,63}$/.test(signInScreen)) signInScreenId = signInScreen;
686
691
  const fw = Number(argOf(p, "firstWeekday") || s.firstWeekday);
@@ -883,7 +888,7 @@ const svc = defineService<S, {
883
888
  busy = false;
884
889
  // As a modal it only closes, and this screen loads again (its re-appearance reload).
885
890
  return navigate(s, signInPresentation
886
- ? { screenId: signInScreenId, presentation: signInPresentation, args: { mode: "signin", modal: "1" } }
891
+ ? { screenId: signInScreenId, presentation: signInPresentation, args: { mode: "signin", modal: "1", ...signInSheetStyle(signInPresentation, signInStyle) } }
887
892
  : { screenId: signInScreenId, args: { mode: "signin", returnScreenId: "himi_agenda" } });
888
893
  }
889
894
  const name = await memberName();
@@ -13,6 +13,7 @@ import { defineService, navigate } from "@himalaya/state";
13
13
  import { listMyPlanOrders, type WixPlanOrder } from "@himalaya/wix-pricing-plans";
14
14
  import { fetchMemberBookings, type MemberBookingRow } from "../_shared/member-bookings.js";
15
15
  import { memberAccess, assertMemberAccess, memberAccessDenied, type MemberAccess } from "../_shared/member-access.js";
16
+ import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
16
17
  import { hostSiteFromInput } from "../_shared/branded-lite-hosted.js";
17
18
  import { formatDateMedium } from "../_shared/engine-intl.js";
18
19
  import { copyParam, copyTemplate, stashCopy } from "../_shared/himi-copy.js";
@@ -53,6 +54,7 @@ const SIGN_IN_SCREEN = "himi_sign_in";
53
54
 
54
55
  let stashedVerticals: string[] | null = null;
55
56
  let signInPresentation: "sheet" | "full_screen" | undefined;
57
+ let signInStyle: "page" | "" = "";
56
58
  let generation = 0;
57
59
 
58
60
  function appearVerticals(arg: unknown): string[] {
@@ -192,7 +194,10 @@ async function read(arg: unknown, again = true): Promise<PlaceSummaryState> {
192
194
  async function load(_s: PlaceSummaryState, arg?: unknown): Promise<PlaceSummaryState | undefined> {
193
195
  stashCopy(arg);
194
196
  const presentation = arg && typeof arg === "object" ? (arg as Record<string, unknown>).signInPresentation : undefined;
195
- if (presentation === "sheet" || presentation === "full_screen") signInPresentation = presentation;
197
+ if (presentation === "sheet" || presentation === "full_screen") {
198
+ signInPresentation = presentation;
199
+ signInStyle = signInPageStyle((arg as Record<string, unknown>).signInSheetStyle);
200
+ }
196
201
  const mine = ++generation;
197
202
  const next = await read(arg);
198
203
  return mine === generation ? next : undefined;
@@ -211,7 +216,7 @@ const svc = defineService<PlaceSummaryState, {
211
216
  if (s.hideCta || !s.ctaScreenId) return s;
212
217
  // No return path: the tile is embedded, so the form closes over its host.
213
218
  return navigate(s, s.ctaScreenId === SIGN_IN_SCREEN && signInPresentation
214
- ? { screenId: SIGN_IN_SCREEN, presentation: signInPresentation, args: { mode: "signin", modal: "1" } }
219
+ ? { screenId: SIGN_IN_SCREEN, presentation: signInPresentation, args: { mode: "signin", modal: "1", ...signInSheetStyle(signInPresentation, signInStyle) } }
215
220
  : { screenId: s.ctaScreenId, args: { mode: s.ctaMode } });
216
221
  },
217
222
  },
@@ -1,6 +1,7 @@
1
1
  import { paymentSetupMessage } from "../_shared/payment-setup.js";
2
2
  import { dispatch } from "@himalaya/dispatch";
3
3
  import { memberAccess, assertMemberAccess } from "../_shared/member-access.js";
4
+ import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
4
5
  import { offlineWriteMessage, withOnlineWrites } from "../_shared/online-actions.js";
5
6
  // Tier-5 bundle: himi-branded-lite — single online-program detail (design §3.5
6
7
  // `programs` vertical, screen full-potential pass).
@@ -292,6 +293,7 @@ let enrollmentInFlight = false;
292
293
  // Presentation dedupe only. The host remains the sole authority to resume a join.
293
294
  let openedAuthToken = "";
294
295
  let signInPresentation: "sheet" | "full_screen" = "sheet";
296
+ let signInStyle: "page" | "" = "";
295
297
  const continuationTarget = (id: string) => `program_enrol:${id}`;
296
298
 
297
299
  async function continuation(operation: "begin" | "check" | "consume" | "cancel", id: string, token = "") {
@@ -309,7 +311,10 @@ const programReference = () => onlineProgramItem({ id: inputId() })?.reference;
309
311
  async function load(state: State, arg?: unknown): Promise<undefined> {
310
312
  stashCopy(arg);
311
313
  const presentation = (arg as { signInPresentation?: unknown } | undefined)?.signInPresentation;
312
- if (presentation === "sheet" || presentation === "full_screen") signInPresentation = presentation;
314
+ if (presentation === "sheet" || presentation === "full_screen") {
315
+ signInPresentation = presentation;
316
+ signInStyle = signInPageStyle((arg as { signInSheetStyle?: unknown }).signInSheetStyle);
317
+ }
313
318
  const id = inputId();
314
319
  const seq = ++loadSeq;
315
320
  const [found, locale] = await Promise.all([
@@ -386,7 +391,7 @@ async function enroll(afterAuthAccount = ""): Promise<undefined> {
386
391
  openedAuthToken = request.token;
387
392
  actionMessage = "";
388
393
  try {
389
- await dispatch("himi.open", { screenId: "himi_sign_in", mode: "signin", presentation: signInPresentation, modal: "1", authContinuation: request.token });
394
+ await dispatch("himi.open", { screenId: "himi_sign_in", mode: "signin", presentation: signInPresentation, modal: "1", ...signInSheetStyle(signInPresentation, signInStyle), authContinuation: request.token });
390
395
  } catch (error) {
391
396
  openedAuthToken = "";
392
397
  await continuation("cancel", id, request.token);
@@ -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);