@wix/himalaya-cli 0.1616.0 → 0.1618.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 (73) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +15 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +28 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/index.d.ts +2 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/one-app-section.d.ts +39 -0
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/one-app-visibility.d.ts +22 -0
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +1 -0
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +151 -24
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +8 -0
  9. package/dist/cli.mjs +1042 -389
  10. package/dist/preview-assets.generated.bin +0 -0
  11. package/guides/component-reference.json +10 -1
  12. package/guides/component-reference.md +25 -2
  13. package/guides/designing-himi-screens.md +3 -1
  14. package/guides/hhp.md +3 -1
  15. package/guides/himi-json-output.md +11 -1
  16. package/guides/index.json +1 -1
  17. package/guides/one-app-section-mappings.md +32 -0
  18. package/guides/one-app-to-himi-app.md +133 -9
  19. package/guides/tier-5-add-a-screen.md +1 -1
  20. package/package.json +2 -2
  21. package/templates/beauty-salon/dev/index.ts +37 -18
  22. package/templates/beauty-salon/tier5-src/_shared/sign-in-sheet.ts +18 -0
  23. package/templates/beauty-salon/tier5-src/himi-booking-service/index.ts +8 -3
  24. package/templates/beauty-salon/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
  25. package/templates/beauty-salon/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
  26. package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +8 -2
  27. package/templates/branded-lite/dev/index.ts +95 -47
  28. package/templates/branded-lite/tier5-src/_shared/sign-in-sheet.ts +18 -0
  29. package/templates/branded-lite/tier5-src/himi-booking-service/index.ts +8 -3
  30. package/templates/branded-lite/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
  31. package/templates/branded-lite/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
  32. package/templates/branded-lite/tier5-src/himi-branded-lite-program/index.ts +7 -2
  33. package/templates/branded-lite/tier5-src/himi-store-account/index.ts +8 -2
  34. package/templates/community-club/dev/index.ts +27 -13
  35. package/templates/community-club/tier5-src/_shared/sign-in-sheet.ts +18 -0
  36. package/templates/community-club/tier5-src/himi-store-account/index.ts +8 -2
  37. package/templates/events-meetups/dev/index.ts +25 -12
  38. package/templates/events-meetups/tier5-src/_shared/sign-in-sheet.ts +18 -0
  39. package/templates/events-meetups/tier5-src/himi-store-account/index.ts +8 -2
  40. package/templates/gym-fitness/dev/index.ts +41 -20
  41. package/templates/gym-fitness/tier5-src/_shared/sign-in-sheet.ts +18 -0
  42. package/templates/gym-fitness/tier5-src/himi-booking-service/index.ts +8 -3
  43. package/templates/gym-fitness/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
  44. package/templates/gym-fitness/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
  45. package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +8 -2
  46. package/templates/nonprofit-cause/dev/index.ts +31 -15
  47. package/templates/nonprofit-cause/tier5-src/_shared/sign-in-sheet.ts +18 -0
  48. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
  49. package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +8 -2
  50. package/templates/podcast-creator/dev/index.ts +29 -14
  51. package/templates/podcast-creator/tier5-src/_shared/sign-in-sheet.ts +18 -0
  52. package/templates/podcast-creator/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
  53. package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +8 -2
  54. package/templates/portfolio-creative/dev/index.ts +31 -15
  55. package/templates/portfolio-creative/tier5-src/_shared/sign-in-sheet.ts +18 -0
  56. package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +8 -2
  57. package/templates/restaurant/dev/index.ts +27 -13
  58. package/templates/restaurant/tier5-src/_shared/sign-in-sheet.ts +18 -0
  59. package/templates/restaurant/tier5-src/himi-store-account/index.ts +8 -2
  60. package/templates/retail-store/dev/index.ts +25 -12
  61. package/templates/retail-store/tier5-src/_shared/sign-in-sheet.ts +18 -0
  62. package/templates/retail-store/tier5-src/himi-store-account/index.ts +8 -2
  63. package/templates/salon-spa/tier5-src/_shared/sign-in-sheet.ts +18 -0
  64. package/templates/salon-spa/tier5-src/himi-booking-service/index.ts +8 -3
  65. package/templates/salon-spa/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
  66. package/templates/salon-spa/tier5-src/himi-store-account/index.ts +8 -2
  67. package/templates/yoga-studio/dev/index.ts +37 -18
  68. package/templates/yoga-studio/tier5-src/_shared/sign-in-sheet.ts +18 -0
  69. package/templates/yoga-studio/tier5-src/himi-booking-service/index.ts +8 -3
  70. package/templates/yoga-studio/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
  71. package/templates/yoga-studio/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
  72. package/templates/yoga-studio/tier5-src/himi-branded-lite-program/index.ts +7 -2
  73. package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +8 -2
@@ -2930,7 +2930,8 @@ const SCREENS = runtimeSetting({
2930
2930
  "params": {
2931
2931
  "screenId": "himi_sign_in",
2932
2932
  "mode": "signin",
2933
- "modal": "1"
2933
+ "modal": "1",
2934
+ "sheetStyle": "page"
2934
2935
  },
2935
2936
  "presentation": "sheet"
2936
2937
  }
@@ -2951,7 +2952,8 @@ const SCREENS = runtimeSetting({
2951
2952
  "params": {
2952
2953
  "screenId": "himi_sign_in",
2953
2954
  "mode": "register",
2954
- "modal": "1"
2955
+ "modal": "1",
2956
+ "sheetStyle": "page"
2955
2957
  },
2956
2958
  "presentation": "sheet"
2957
2959
  }
@@ -4399,6 +4401,7 @@ const SCREENS = runtimeSetting({
4399
4401
  "restorePurchases": "1",
4400
4402
  "signInScreen": "himi_sign_in",
4401
4403
  "signInPresentation": "sheet",
4404
+ "signInSheetStyle": "page",
4402
4405
  "signInReturnTab": "profile",
4403
4406
  "pollIdentity": "1",
4404
4407
  "cartCount": "1",
@@ -4676,7 +4679,8 @@ const SCREENS = runtimeSetting({
4676
4679
  "screenId": "himi_sign_in",
4677
4680
  "mode": "signin",
4678
4681
  "returnScreenId": "himi_account_settings",
4679
- "modal": "1"
4682
+ "modal": "1",
4683
+ "sheetStyle": "page"
4680
4684
  },
4681
4685
  "presentation": "sheet"
4682
4686
  }
@@ -7696,7 +7700,8 @@ const SCREENS = runtimeSetting({
7696
7700
  "params": {
7697
7701
  "screenId": "himi_sign_in",
7698
7702
  "returnScreenId": "himi_notif_settings",
7699
- "modal": "1"
7703
+ "modal": "1",
7704
+ "sheetStyle": "page"
7700
7705
  },
7701
7706
  "presentation": "sheet"
7702
7707
  }
@@ -8091,7 +8096,8 @@ const SCREENS = runtimeSetting({
8091
8096
  "mode": "signin",
8092
8097
  "intent": "profile",
8093
8098
  "returnScreenId": "himi_view_profile",
8094
- "modal": "1"
8099
+ "modal": "1",
8100
+ "sheetStyle": "page"
8095
8101
  },
8096
8102
  "presentation": "sheet"
8097
8103
  }
@@ -17591,7 +17597,8 @@ const SCREENS = runtimeSetting({
17591
17597
  "mode": "signin",
17592
17598
  "intent": "orders",
17593
17599
  "returnScreenId": "himi_orders",
17594
- "modal": "1"
17600
+ "modal": "1",
17601
+ "sheetStyle": "page"
17595
17602
  },
17596
17603
  "presentation": "sheet"
17597
17604
  }
@@ -18328,7 +18335,8 @@ const SCREENS = runtimeSetting({
18328
18335
  "mode": "signin",
18329
18336
  "intent": "addresses",
18330
18337
  "returnScreenId": "himi_addresses",
18331
- "modal": "1"
18338
+ "modal": "1",
18339
+ "sheetStyle": "page"
18332
18340
  },
18333
18341
  "presentation": "sheet"
18334
18342
  }
@@ -19387,7 +19395,8 @@ const SCREENS = runtimeSetting({
19387
19395
  "mode": "signin",
19388
19396
  "intent": "addresses",
19389
19397
  "returnScreenId": "himi_address",
19390
- "modal": "1"
19398
+ "modal": "1",
19399
+ "sheetStyle": "page"
19391
19400
  },
19392
19401
  "presentation": "sheet"
19393
19402
  }
@@ -20060,7 +20069,8 @@ const SCREENS = runtimeSetting({
20060
20069
  "mode": "signin",
20061
20070
  "intent": "wallet",
20062
20071
  "returnScreenId": "himi_wallet",
20063
- "modal": "1"
20072
+ "modal": "1",
20073
+ "sheetStyle": "page"
20064
20074
  },
20065
20075
  "presentation": "sheet"
20066
20076
  }
@@ -20572,7 +20582,8 @@ const SCREENS = runtimeSetting({
20572
20582
  "actionId": "tier5.himiPlaceSummary.load",
20573
20583
  "params": {
20574
20584
  "verticals": "[\"store\",\"bookings\",\"plans\",\"events\",\"blog\"]",
20575
- "signInPresentation": "sheet"
20585
+ "signInPresentation": "sheet",
20586
+ "signInSheetStyle": "page"
20576
20587
  }
20577
20588
  }
20578
20589
  }
@@ -23476,7 +23487,8 @@ const SCREENS = runtimeSetting({
23476
23487
  "screenId": "himi_sign_in",
23477
23488
  "mode": "signin",
23478
23489
  "returnScreenId": "himi_bookings",
23479
- "modal": "1"
23490
+ "modal": "1",
23491
+ "sheetStyle": "page"
23480
23492
  },
23481
23493
  "presentation": "sheet"
23482
23494
  },
@@ -26589,7 +26601,8 @@ const SCREENS = runtimeSetting({
26589
26601
  "actionId": "tier5.himiBrandedAgenda.load",
26590
26602
  "params": {
26591
26603
  "firstWeekday": "0",
26592
- "signInPresentation": "sheet"
26604
+ "signInPresentation": "sheet",
26605
+ "signInSheetStyle": "page"
26593
26606
  }
26594
26607
  }
26595
26608
  }
@@ -29732,7 +29745,8 @@ const SCREENS = runtimeSetting({
29732
29745
  "params": {
29733
29746
  "screenId": "himi_sign_in",
29734
29747
  "mode": "signin",
29735
- "modal": "1"
29748
+ "modal": "1",
29749
+ "sheetStyle": "page"
29736
29750
  },
29737
29751
  "presentation": "sheet"
29738
29752
  }
@@ -30120,7 +30134,8 @@ const SCREENS = runtimeSetting({
30120
30134
  "mode": "signin",
30121
30135
  "intent": "post",
30122
30136
  "returnScreenId": "himi_create_post",
30123
- "modal": "1"
30137
+ "modal": "1",
30138
+ "sheetStyle": "page"
30124
30139
  },
30125
30140
  "presentation": "sheet"
30126
30141
  }
@@ -33899,7 +33914,8 @@ const SCREENS = runtimeSetting({
33899
33914
  "params": {
33900
33915
  "screenId": "himi_sign_in",
33901
33916
  "mode": "signin",
33902
- "modal": "1"
33917
+ "modal": "1",
33918
+ "sheetStyle": "page"
33903
33919
  },
33904
33920
  "presentation": "sheet"
33905
33921
  }
@@ -39265,7 +39281,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
39265
39281
  "screenId": "himi_sign_in",
39266
39282
  "returnScreenId": "himi_order",
39267
39283
  "returnId": "$service:himiBrandedOrder.id",
39268
- "modal": "1"
39284
+ "modal": "1",
39285
+ "sheetStyle": "page"
39269
39286
  },
39270
39287
  "presentation": "sheet"
39271
39288
  }
@@ -43430,7 +43447,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
43430
43447
  "actionId": "tier5.himiBookingService.load",
43431
43448
  "params": {
43432
43449
  "signInScreenId": "himi_sign_in",
43433
- "signInPresentation": "sheet"
43450
+ "signInPresentation": "sheet",
43451
+ "signInSheetStyle": "page"
43434
43452
  }
43435
43453
  }
43436
43454
  }
@@ -46658,7 +46676,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
46658
46676
  "screenId": "himi_sign_in",
46659
46677
  "mode": "signin",
46660
46678
  "intent": "book",
46661
- "modal": "1"
46679
+ "modal": "1",
46680
+ "sheetStyle": "page"
46662
46681
  },
46663
46682
  "presentation": "sheet"
46664
46683
  }
@@ -50041,7 +50060,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
50041
50060
  "screenId": "himi_sign_in",
50042
50061
  "mode": "signin",
50043
50062
  "intent": "rsvp",
50044
- "modal": "1"
50063
+ "modal": "1",
50064
+ "sheetStyle": "page"
50045
50065
  },
50046
50066
  "presentation": "sheet"
50047
50067
  }
@@ -50357,7 +50377,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
50357
50377
  "params": {
50358
50378
  "screenId": "himi_sign_in",
50359
50379
  "mode": "signin",
50360
- "modal": "1"
50380
+ "modal": "1",
50381
+ "sheetStyle": "page"
50361
50382
  },
50362
50383
  "presentation": "sheet"
50363
50384
  }
@@ -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
  },
@@ -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);
@@ -2443,7 +2443,8 @@ const SCREENS = runtimeSetting({
2443
2443
  "params": {
2444
2444
  "screenId": "himi_sign_in",
2445
2445
  "mode": "signin",
2446
- "modal": "1"
2446
+ "modal": "1",
2447
+ "sheetStyle": "page"
2447
2448
  },
2448
2449
  "presentation": "sheet"
2449
2450
  }
@@ -2464,7 +2465,8 @@ const SCREENS = runtimeSetting({
2464
2465
  "params": {
2465
2466
  "screenId": "himi_sign_in",
2466
2467
  "mode": "register",
2467
- "modal": "1"
2468
+ "modal": "1",
2469
+ "sheetStyle": "page"
2468
2470
  },
2469
2471
  "presentation": "sheet"
2470
2472
  }
@@ -3668,6 +3670,7 @@ const SCREENS = runtimeSetting({
3668
3670
  "restorePurchases": "1",
3669
3671
  "signInScreen": "himi_sign_in",
3670
3672
  "signInPresentation": "sheet",
3673
+ "signInSheetStyle": "page",
3671
3674
  "signInReturnTab": "profile",
3672
3675
  "pollIdentity": "1",
3673
3676
  "copy": "{\"account.subtitle\":\"RSVPs, memberships, groups and saved content in one place.\",\"storeAccount.authBody\":\"Sign in to continue — RSVPs, memberships and groups stay with you.\",\"storeAccount.authBodyRegister\":\"Create a member account to continue — RSVPs, memberships and groups stay with you.\"}"
@@ -3925,7 +3928,8 @@ const SCREENS = runtimeSetting({
3925
3928
  "screenId": "himi_sign_in",
3926
3929
  "mode": "signin",
3927
3930
  "returnScreenId": "himi_account_settings",
3928
- "modal": "1"
3931
+ "modal": "1",
3932
+ "sheetStyle": "page"
3929
3933
  },
3930
3934
  "presentation": "sheet"
3931
3935
  }
@@ -6945,7 +6949,8 @@ const SCREENS = runtimeSetting({
6945
6949
  "params": {
6946
6950
  "screenId": "himi_sign_in",
6947
6951
  "returnScreenId": "himi_notif_settings",
6948
- "modal": "1"
6952
+ "modal": "1",
6953
+ "sheetStyle": "page"
6949
6954
  },
6950
6955
  "presentation": "sheet"
6951
6956
  }
@@ -7340,7 +7345,8 @@ const SCREENS = runtimeSetting({
7340
7345
  "mode": "signin",
7341
7346
  "intent": "profile",
7342
7347
  "returnScreenId": "himi_view_profile",
7343
- "modal": "1"
7348
+ "modal": "1",
7349
+ "sheetStyle": "page"
7344
7350
  },
7345
7351
  "presentation": "sheet"
7346
7352
  }
@@ -8408,7 +8414,8 @@ const SCREENS = runtimeSetting({
8408
8414
  "mode": "signin",
8409
8415
  "intent": "wallet",
8410
8416
  "returnScreenId": "himi_wallet",
8411
- "modal": "1"
8417
+ "modal": "1",
8418
+ "sheetStyle": "page"
8412
8419
  },
8413
8420
  "presentation": "sheet"
8414
8421
  }
@@ -8920,7 +8927,8 @@ const SCREENS = runtimeSetting({
8920
8927
  "actionId": "tier5.himiPlaceSummary.load",
8921
8928
  "params": {
8922
8929
  "verticals": "[\"plans\",\"feed\",\"events\",\"blog\",\"groups\"]",
8923
- "signInPresentation": "sheet"
8930
+ "signInPresentation": "sheet",
8931
+ "signInSheetStyle": "page"
8924
8932
  }
8925
8933
  }
8926
8934
  }
@@ -11867,7 +11875,8 @@ const SCREENS = runtimeSetting({
11867
11875
  "params": {
11868
11876
  "screenId": "himi_sign_in",
11869
11877
  "mode": "signin",
11870
- "modal": "1"
11878
+ "modal": "1",
11879
+ "sheetStyle": "page"
11871
11880
  },
11872
11881
  "presentation": "sheet"
11873
11882
  }
@@ -12370,7 +12379,8 @@ const SCREENS = runtimeSetting({
12370
12379
  "mode": "signin",
12371
12380
  "intent": "post",
12372
12381
  "returnScreenId": "himi_feed",
12373
- "modal": "1"
12382
+ "modal": "1",
12383
+ "sheetStyle": "page"
12374
12384
  },
12375
12385
  "presentation": "sheet"
12376
12386
  }
@@ -12990,7 +13000,8 @@ const SCREENS = runtimeSetting({
12990
13000
  "mode": "signin",
12991
13001
  "intent": "post",
12992
13002
  "returnScreenId": "himi_create_post",
12993
- "modal": "1"
13003
+ "modal": "1",
13004
+ "sheetStyle": "page"
12994
13005
  },
12995
13006
  "presentation": "sheet"
12996
13007
  }
@@ -16769,7 +16780,8 @@ const SCREENS = runtimeSetting({
16769
16780
  "params": {
16770
16781
  "screenId": "himi_sign_in",
16771
16782
  "mode": "signin",
16772
- "modal": "1"
16783
+ "modal": "1",
16784
+ "sheetStyle": "page"
16773
16785
  },
16774
16786
  "presentation": "sheet"
16775
16787
  }
@@ -23883,7 +23895,8 @@ const SCREENS = runtimeSetting({
23883
23895
  "mode": "signin",
23884
23896
  "intent": "groups",
23885
23897
  "returnScreenId": "himi_my_groups",
23886
- "modal": "1"
23898
+ "modal": "1",
23899
+ "sheetStyle": "page"
23887
23900
  },
23888
23901
  "presentation": "sheet"
23889
23902
  }
@@ -27238,7 +27251,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
27238
27251
  "screenId": "himi_sign_in",
27239
27252
  "mode": "signin",
27240
27253
  "intent": "rsvp",
27241
- "modal": "1"
27254
+ "modal": "1",
27255
+ "sheetStyle": "page"
27242
27256
  },
27243
27257
  "presentation": "sheet"
27244
27258
  }
@@ -27554,7 +27568,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
27554
27568
  "params": {
27555
27569
  "screenId": "himi_sign_in",
27556
27570
  "mode": "signin",
27557
- "modal": "1"
27571
+ "modal": "1",
27572
+ "sheetStyle": "page"
27558
27573
  },
27559
27574
  "presentation": "sheet"
27560
27575
  }
@@ -28832,7 +28847,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
28832
28847
  "contextName": "$service:himiBrandedGroup.name",
28833
28848
  "returnScreenId": "himi_group",
28834
28849
  "returnId": "$service:himiBrandedGroup.id",
28835
- "modal": "1"
28850
+ "modal": "1",
28851
+ "sheetStyle": "page"
28836
28852
  },
28837
28853
  "presentation": "sheet"
28838
28854
  }
@@ -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 { 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
  },
@@ -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);