@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
@@ -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);