@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
@@ -2381,7 +2381,8 @@ const SCREENS = runtimeSetting({
2381
2381
  "params": {
2382
2382
  "screenId": "himi_sign_in",
2383
2383
  "mode": "signin",
2384
- "modal": "1"
2384
+ "modal": "1",
2385
+ "sheetStyle": "page"
2385
2386
  },
2386
2387
  "presentation": "sheet"
2387
2388
  }
@@ -2402,7 +2403,8 @@ const SCREENS = runtimeSetting({
2402
2403
  "params": {
2403
2404
  "screenId": "himi_sign_in",
2404
2405
  "mode": "register",
2405
- "modal": "1"
2406
+ "modal": "1",
2407
+ "sheetStyle": "page"
2406
2408
  },
2407
2409
  "presentation": "sheet"
2408
2410
  }
@@ -3606,6 +3608,7 @@ const SCREENS = runtimeSetting({
3606
3608
  "restorePurchases": "1",
3607
3609
  "signInScreen": "himi_sign_in",
3608
3610
  "signInPresentation": "sheet",
3611
+ "signInSheetStyle": "page",
3609
3612
  "signInReturnTab": "profile",
3610
3613
  "pollIdentity": "1",
3611
3614
  "copy": "{\"account.subtitle\":\"RSVPs, memberships and saved content in one place.\",\"storeAccount.authBody\":\"Sign in to continue — RSVPs and memberships stay with you.\",\"storeAccount.authBodyRegister\":\"Create a member account to continue — RSVPs and memberships stay with you.\"}"
@@ -3863,7 +3866,8 @@ const SCREENS = runtimeSetting({
3863
3866
  "screenId": "himi_sign_in",
3864
3867
  "mode": "signin",
3865
3868
  "returnScreenId": "himi_account_settings",
3866
- "modal": "1"
3869
+ "modal": "1",
3870
+ "sheetStyle": "page"
3867
3871
  },
3868
3872
  "presentation": "sheet"
3869
3873
  }
@@ -6883,7 +6887,8 @@ const SCREENS = runtimeSetting({
6883
6887
  "params": {
6884
6888
  "screenId": "himi_sign_in",
6885
6889
  "returnScreenId": "himi_notif_settings",
6886
- "modal": "1"
6890
+ "modal": "1",
6891
+ "sheetStyle": "page"
6887
6892
  },
6888
6893
  "presentation": "sheet"
6889
6894
  }
@@ -7278,7 +7283,8 @@ const SCREENS = runtimeSetting({
7278
7283
  "mode": "signin",
7279
7284
  "intent": "profile",
7280
7285
  "returnScreenId": "himi_view_profile",
7281
- "modal": "1"
7286
+ "modal": "1",
7287
+ "sheetStyle": "page"
7282
7288
  },
7283
7289
  "presentation": "sheet"
7284
7290
  }
@@ -8346,7 +8352,8 @@ const SCREENS = runtimeSetting({
8346
8352
  "mode": "signin",
8347
8353
  "intent": "wallet",
8348
8354
  "returnScreenId": "himi_wallet",
8349
- "modal": "1"
8355
+ "modal": "1",
8356
+ "sheetStyle": "page"
8350
8357
  },
8351
8358
  "presentation": "sheet"
8352
8359
  }
@@ -8858,7 +8865,8 @@ const SCREENS = runtimeSetting({
8858
8865
  "actionId": "tier5.himiPlaceSummary.load",
8859
8866
  "params": {
8860
8867
  "verticals": "[\"plans\",\"feed\",\"events\",\"blog\",\"podcasts\"]",
8861
- "signInPresentation": "sheet"
8868
+ "signInPresentation": "sheet",
8869
+ "signInSheetStyle": "page"
8862
8870
  }
8863
8871
  }
8864
8872
  }
@@ -11805,7 +11813,8 @@ const SCREENS = runtimeSetting({
11805
11813
  "params": {
11806
11814
  "screenId": "himi_sign_in",
11807
11815
  "mode": "signin",
11808
- "modal": "1"
11816
+ "modal": "1",
11817
+ "sheetStyle": "page"
11809
11818
  },
11810
11819
  "presentation": "sheet"
11811
11820
  }
@@ -12308,7 +12317,8 @@ const SCREENS = runtimeSetting({
12308
12317
  "mode": "signin",
12309
12318
  "intent": "post",
12310
12319
  "returnScreenId": "himi_feed",
12311
- "modal": "1"
12320
+ "modal": "1",
12321
+ "sheetStyle": "page"
12312
12322
  },
12313
12323
  "presentation": "sheet"
12314
12324
  }
@@ -12928,7 +12938,8 @@ const SCREENS = runtimeSetting({
12928
12938
  "mode": "signin",
12929
12939
  "intent": "post",
12930
12940
  "returnScreenId": "himi_create_post",
12931
- "modal": "1"
12941
+ "modal": "1",
12942
+ "sheetStyle": "page"
12932
12943
  },
12933
12944
  "presentation": "sheet"
12934
12945
  }
@@ -16707,7 +16718,8 @@ const SCREENS = runtimeSetting({
16707
16718
  "params": {
16708
16719
  "screenId": "himi_sign_in",
16709
16720
  "mode": "signin",
16710
- "modal": "1"
16721
+ "modal": "1",
16722
+ "sheetStyle": "page"
16711
16723
  },
16712
16724
  "presentation": "sheet"
16713
16725
  }
@@ -20691,7 +20703,8 @@ const SCREENS = runtimeSetting({
20691
20703
  "actionId": "himi.open",
20692
20704
  "params": {
20693
20705
  "screenId": "himi_sign_in",
20694
- "modal": "1"
20706
+ "modal": "1",
20707
+ "sheetStyle": "page"
20695
20708
  },
20696
20709
  "presentation": "sheet"
20697
20710
  }
@@ -26608,7 +26621,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
26608
26621
  "screenId": "himi_sign_in",
26609
26622
  "mode": "signin",
26610
26623
  "intent": "rsvp",
26611
- "modal": "1"
26624
+ "modal": "1",
26625
+ "sheetStyle": "page"
26612
26626
  },
26613
26627
  "presentation": "sheet"
26614
26628
  }
@@ -26924,7 +26938,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
26924
26938
  "params": {
26925
26939
  "screenId": "himi_sign_in",
26926
26940
  "mode": "signin",
26927
- "modal": "1"
26941
+ "modal": "1",
26942
+ "sheetStyle": "page"
26928
26943
  },
26929
26944
  "presentation": "sheet"
26930
26945
  }
@@ -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);
@@ -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
+ }