@wix/himalaya-cli 0.1277.0 → 0.1279.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 (41) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +14 -0
  2. package/dist/cli.mjs +25 -4
  3. package/guides/component-reference.json +36 -3
  4. package/guides/component-reference.md +20 -2
  5. package/package.json +4 -3
  6. package/templates/beauty-salon/config.ts +2 -1
  7. package/templates/beauty-salon/dev/index.ts +2 -1
  8. package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +12 -4
  9. package/templates/branded-lite/config.ts +13 -2
  10. package/templates/branded-lite/dev/index.ts +520 -170
  11. package/templates/branded-lite/tier5-src/_shared/vod.ts +71 -0
  12. package/templates/branded-lite/tier5-src/himi-branded-lite-video/index.ts +98 -0
  13. package/templates/branded-lite/tier5-src/himi-branded-lite-videos/index.ts +11 -20
  14. package/templates/branded-lite/tier5-src/himi-store-account/index.ts +12 -4
  15. package/templates/community-club/config.ts +2 -1
  16. package/templates/community-club/dev/index.ts +2 -1
  17. package/templates/community-club/tier5-src/himi-store-account/index.ts +12 -4
  18. package/templates/events-meetups/config.ts +2 -1
  19. package/templates/events-meetups/dev/index.ts +2 -1
  20. package/templates/events-meetups/tier5-src/himi-store-account/index.ts +12 -4
  21. package/templates/gym-fitness/config.ts +2 -1
  22. package/templates/gym-fitness/dev/index.ts +2 -1
  23. package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +12 -4
  24. package/templates/nonprofit-cause/config.ts +2 -1
  25. package/templates/nonprofit-cause/dev/index.ts +2 -1
  26. package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +12 -4
  27. package/templates/podcast-creator/config.ts +2 -1
  28. package/templates/podcast-creator/dev/index.ts +2 -1
  29. package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +12 -4
  30. package/templates/portfolio-creative/config.ts +2 -1
  31. package/templates/portfolio-creative/dev/index.ts +2 -1
  32. package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +12 -4
  33. package/templates/restaurant/config.ts +2 -1
  34. package/templates/restaurant/dev/index.ts +2 -1
  35. package/templates/restaurant/tier5-src/himi-store-account/index.ts +12 -4
  36. package/templates/retail-store/config.ts +2 -1
  37. package/templates/retail-store/dev/index.ts +2 -1
  38. package/templates/retail-store/tier5-src/himi-store-account/index.ts +12 -4
  39. package/templates/yoga-studio/config.ts +2 -1
  40. package/templates/yoga-studio/dev/index.ts +2 -1
  41. package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +12 -4
@@ -19,6 +19,7 @@ interface AuthRouteInput {
19
19
  contextName?: string;
20
20
  returnScreenId?: string;
21
21
  returnId?: string;
22
+ returnChannelId?: string;
22
23
  }
23
24
 
24
25
  // The screen's boot input survives refresh; consuming it must survive too.
@@ -37,21 +38,25 @@ function strField(arg: unknown, key: string): string {
37
38
  }
38
39
 
39
40
  /** Mid-flow auth (UX F3): intent + return path from himi.open / himalaya.input. */
40
- function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId"> {
41
+ function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId"> {
41
42
  const route = routeInputConsumed ? {} : routeInput();
42
43
  return {
43
44
  authIntent: strField(arg, "intent") || route.intent || prev.authIntent || "",
44
45
  authContextName: strField(arg, "contextName") || route.contextName || prev.authContextName || "",
45
46
  returnScreenId: strField(arg, "returnScreenId") || route.returnScreenId || prev.returnScreenId || "",
46
47
  returnId: strField(arg, "returnId") || route.returnId || prev.returnId || "",
48
+ returnChannelId: strField(arg, "returnChannelId") || route.returnChannelId || prev.returnChannelId || "",
47
49
  };
48
50
  }
49
51
 
50
52
  /** Where a successful sign-in returns to, or null. Never Account itself — that would
51
53
  * only push a second copy of the screen the member is already on. */
52
- function resumeTarget(s: Pick<S, "returnScreenId" | "returnId">): NavDirective | null {
54
+ function resumeTarget(s: Pick<S, "returnScreenId" | "returnId" | "returnChannelId">): NavDirective | null {
53
55
  if (!s.returnScreenId || s.returnScreenId === "himi_account") return null;
54
- return s.returnId ? { screenId: s.returnScreenId, args: { id: s.returnId } } : { screenId: s.returnScreenId };
56
+ return s.returnId || s.returnChannelId ? {
57
+ screenId: s.returnScreenId,
58
+ args: { ...(s.returnId ? { id: s.returnId } : {}), ...(s.returnChannelId ? { channelId: s.returnChannelId } : {}) },
59
+ } : { screenId: s.returnScreenId };
55
60
  }
56
61
 
57
62
  /** Resume the member-only screen that sent the visitor here, once. The return path is
@@ -61,7 +66,7 @@ function resumeAfterAuth(next: S): S {
61
66
  const target = resumeTarget(next);
62
67
  if (!next.isMember || !target) return next;
63
68
  routeInputConsumed = true;
64
- return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "" }), target);
69
+ return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "", returnChannelId: "" }), target);
65
70
  }
66
71
 
67
72
  // Actions are not serialized: two quick Sign in taps both run against the pre-tap
@@ -165,6 +170,7 @@ interface S {
165
170
  authContextName: string;
166
171
  returnScreenId: string;
167
172
  returnId: string;
173
+ returnChannelId: string;
168
174
  /** Show Continue when an already-signed-in member opens Account with a return path.
169
175
  * A sign-in made here resumes on its own (resumeAfterAuth). */
170
176
  hasReturnPath: boolean;
@@ -364,6 +370,7 @@ const svc = defineService<S, {
364
370
  authContextName: "",
365
371
  returnScreenId: "",
366
372
  returnId: "",
373
+ returnChannelId: "",
367
374
  hasReturnPath: false,
368
375
  noReturnPath: true,
369
376
  returnCta: "Continue",
@@ -475,6 +482,7 @@ const svc = defineService<S, {
475
482
  authContextName: "",
476
483
  returnScreenId: "",
477
484
  returnId: "",
485
+ returnChannelId: "",
478
486
  };
479
487
  return derive(cleared);
480
488
  },
@@ -571,7 +571,7 @@ export default defineApp({
571
571
  "tabId": ""
572
572
  },
573
573
  {
574
- "screenId": "himi_video",
574
+ "screenId": "himi_video_channel",
575
575
  "isPublic": true,
576
576
  "paramKeys": [
577
577
  "id"
@@ -579,6 +579,16 @@ export default defineApp({
579
579
  "parentScreenId": "himi_videos",
580
580
  "tabId": ""
581
581
  },
582
+ {
583
+ "screenId": "himi_video",
584
+ "isPublic": true,
585
+ "paramKeys": [
586
+ "id",
587
+ "channelId"
588
+ ],
589
+ "parentScreenId": "himi_video_channel",
590
+ "tabId": ""
591
+ },
582
592
  {
583
593
  "screenId": "himi_podcasts",
584
594
  "isPublic": true,
@@ -680,7 +690,8 @@ export default defineApp({
680
690
  "intent",
681
691
  "contextName",
682
692
  "returnScreenId",
683
- "returnId"
693
+ "returnId",
694
+ "returnChannelId"
684
695
  ],
685
696
  "parentScreenId": "",
686
697
  "tabId": "profile"