@wix/himalaya-cli 0.1548.0 → 0.1550.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 (45) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +11 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts +54 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +16 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +12 -0
  5. package/dist/cli.mjs +1307 -860
  6. package/dist/preview-assets.generated.bin +0 -0
  7. package/guides/component-reference.json +1 -1
  8. package/guides/component-reference.md +2 -0
  9. package/guides/iap-products.md +6 -3
  10. package/guides/qa-builds.md +31 -0
  11. package/guides/tier-5-add-a-screen.md +53 -0
  12. package/package.json +2 -2
  13. package/templates/beauty-salon/dev/index.ts +15 -2
  14. package/templates/beauty-salon/tier5-src/himi-branded-lite-agenda/index.ts +4 -1
  15. package/templates/beauty-salon-owner/dev/index.ts +36 -1
  16. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-manage/logic.ts +14 -2
  17. package/templates/branded-lite/dev/index.ts +15 -2
  18. package/templates/branded-lite/tier5-src/himi-branded-lite-agenda/index.ts +4 -1
  19. package/templates/community-club-owner/dev/index.ts +36 -1
  20. package/templates/community-club-owner/tier5-src/himi-owner-lite-manage/logic.ts +14 -2
  21. package/templates/events-meetups-owner/dev/index.ts +36 -1
  22. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-manage/logic.ts +14 -2
  23. package/templates/gym-fitness/dev/index.ts +15 -2
  24. package/templates/gym-fitness/tier5-src/himi-branded-lite-agenda/index.ts +4 -1
  25. package/templates/gym-fitness-owner/dev/index.ts +36 -1
  26. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-manage/logic.ts +14 -2
  27. package/templates/nonprofit-cause-owner/dev/index.ts +36 -1
  28. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-manage/logic.ts +14 -2
  29. package/templates/owner-lite/dev/index.ts +36 -1
  30. package/templates/owner-lite/tier5-src/himi-owner-lite-manage/logic.ts +14 -2
  31. package/templates/podcast-creator-owner/dev/index.ts +36 -1
  32. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-manage/logic.ts +14 -2
  33. package/templates/portfolio-creative/dev/index.ts +8 -1
  34. package/templates/portfolio-creative-owner/dev/index.ts +36 -1
  35. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-manage/logic.ts +14 -2
  36. package/templates/restaurant/dev/index.ts +8 -1
  37. package/templates/restaurant-owner/dev/index.ts +36 -1
  38. package/templates/restaurant-owner/tier5-src/himi-owner-lite-manage/logic.ts +14 -2
  39. package/templates/retail-store/dev/index.ts +8 -1
  40. package/templates/retail-store-owner/dev/index.ts +36 -1
  41. package/templates/retail-store-owner/tier5-src/himi-owner-lite-manage/logic.ts +14 -2
  42. package/templates/yoga-studio/dev/index.ts +7 -1
  43. package/templates/yoga-studio/tier5-src/himi-branded-lite-agenda/index.ts +4 -1
  44. package/templates/yoga-studio-owner/dev/index.ts +36 -1
  45. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-manage/logic.ts +14 -2
@@ -41,8 +41,19 @@ export interface LightboxArgs {
41
41
  * today every surface opens the viewer with a fade and a small scale-in. */
42
42
  transitionId?: string;
43
43
  }
44
+ /** RFC 0075 — what the action's `_nav` could ask for, declared beside it: a screen, back/dismiss
45
+ * (`presentation` alone), or a tab switch (`tab`, `reset`, then an optional `screenId` push). */
46
+ export interface ActionNavigation {
47
+ screenId?: string;
48
+ presentation?: "push" | "replace" | "sheet" | "full_screen" | "back" | "dismiss";
49
+ args?: Record<string, string>;
50
+ tab?: string;
51
+ reset?: boolean;
52
+ }
44
53
  export interface Action {
45
54
  actionId: string;
55
+ /** RFC 0075: applied before the worker action; its returned legacy _nav is ignored. */
56
+ nav?: ActionNavigation;
46
57
  /** Backwards-compatible string-only params. Prefer `args` for typed payloads. */
47
58
  params?: Record<string, string>;
48
59
  /** Typed action args; nested objects/arrays preserved end-to-end. With `presentation: "sheet"`,
@@ -259,6 +259,33 @@ export declare const screenDescriptorSchema: {
259
259
  readonly type: "string";
260
260
  readonly minLength: 1;
261
261
  };
262
+ readonly nav: {
263
+ readonly type: "object";
264
+ readonly additionalProperties: false;
265
+ readonly minProperties: 1;
266
+ readonly properties: {
267
+ readonly screenId: {
268
+ readonly type: "string";
269
+ readonly minLength: 1;
270
+ };
271
+ readonly presentation: {
272
+ readonly enum: readonly ["push", "replace", "sheet", "full_screen", "back", "dismiss"];
273
+ };
274
+ readonly args: {
275
+ readonly type: "object";
276
+ readonly additionalProperties: {
277
+ readonly type: "string";
278
+ };
279
+ };
280
+ readonly tab: {
281
+ readonly type: "string";
282
+ readonly minLength: 1;
283
+ };
284
+ readonly reset: {
285
+ readonly const: true;
286
+ };
287
+ };
288
+ };
262
289
  readonly params: {
263
290
  readonly type: "object";
264
291
  readonly additionalProperties: {
@@ -1658,6 +1685,33 @@ export declare const widgetSnapshotSchema: {
1658
1685
  readonly type: "string";
1659
1686
  readonly minLength: 1;
1660
1687
  };
1688
+ readonly nav: {
1689
+ readonly type: "object";
1690
+ readonly additionalProperties: false;
1691
+ readonly minProperties: 1;
1692
+ readonly properties: {
1693
+ readonly screenId: {
1694
+ readonly type: "string";
1695
+ readonly minLength: 1;
1696
+ };
1697
+ readonly presentation: {
1698
+ readonly enum: readonly ["push", "replace", "sheet", "full_screen", "back", "dismiss"];
1699
+ };
1700
+ readonly args: {
1701
+ readonly type: "object";
1702
+ readonly additionalProperties: {
1703
+ readonly type: "string";
1704
+ };
1705
+ };
1706
+ readonly tab: {
1707
+ readonly type: "string";
1708
+ readonly minLength: 1;
1709
+ };
1710
+ readonly reset: {
1711
+ readonly const: true;
1712
+ };
1713
+ };
1714
+ };
1661
1715
  readonly params: {
1662
1716
  readonly type: "object";
1663
1717
  readonly additionalProperties: {
@@ -8553,6 +8553,18 @@ var screenDescriptorSchema = {
8553
8553
  required: ["actionId"],
8554
8554
  properties: {
8555
8555
  actionId: { type: "string", minLength: 1 },
8556
+ nav: {
8557
+ type: "object",
8558
+ additionalProperties: false,
8559
+ minProperties: 1,
8560
+ properties: {
8561
+ screenId: { type: "string", minLength: 1 },
8562
+ presentation: { enum: ["push", "replace", "sheet", "full_screen", "back", "dismiss"] },
8563
+ args: { type: "object", additionalProperties: { type: "string" } },
8564
+ tab: { type: "string", minLength: 1 },
8565
+ reset: { const: true }
8566
+ }
8567
+ },
8556
8568
  params: {
8557
8569
  type: "object",
8558
8570
  additionalProperties: { type: "string" }
@@ -10994,6 +11006,10 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
10994
11006
  return;
10995
11007
  }
10996
11008
  const id = value.actionId;
11009
+ if (value.nav != null) {
11010
+ rejection = "action_not_allowed";
11011
+ return;
11012
+ }
10997
11013
  if (!ACTION_ID.test(id) || !allowedActions.has(id)) {
10998
11014
  rejection = "action_not_allowed";
10999
11015
  return;
@@ -7125,6 +7125,18 @@ var screenDescriptorSchema = {
7125
7125
  required: ["actionId"],
7126
7126
  properties: {
7127
7127
  actionId: { type: "string", minLength: 1 },
7128
+ nav: {
7129
+ type: "object",
7130
+ additionalProperties: false,
7131
+ minProperties: 1,
7132
+ properties: {
7133
+ screenId: { type: "string", minLength: 1 },
7134
+ presentation: { enum: ["push", "replace", "sheet", "full_screen", "back", "dismiss"] },
7135
+ args: { type: "object", additionalProperties: { type: "string" } },
7136
+ tab: { type: "string", minLength: 1 },
7137
+ reset: { const: true }
7138
+ }
7139
+ },
7128
7140
  params: {
7129
7141
  type: "object",
7130
7142
  additionalProperties: { type: "string" }