@wix/himalaya-cli 0.1493.0 → 0.1495.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 (97) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +5 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/live-activity/src/index.d.ts +4 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +2 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/bookings-v2/src/extensions.d.ts +52 -2
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/bookings-v2/src/index.d.ts +180 -0
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/ecom/src/extensions.d.ts +16 -0
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/display.d.ts +24 -0
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/live-activity.mjs +3 -1
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +1 -1
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-bookings.mjs +4 -2
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-ecom.mjs +14 -0
  12. package/dist/cli.mjs +3585 -2540
  13. package/dist/preview-assets.generated.bin +0 -0
  14. package/guides/himi-json-output.md +46 -4
  15. package/guides/iap-products.md +68 -9
  16. package/guides/one-app-to-himi-app.md +80 -5
  17. package/guides/qa-builds.md +2 -2
  18. package/guides/widgets.md +5 -3
  19. package/package.json +2 -2
  20. package/templates/beauty-salon/dev/index.ts +4442 -1532
  21. package/templates/beauty-salon/himalaya.content.json +1 -1
  22. package/templates/beauty-salon/tier5-src/_shared/himi-store-collection.ts +6 -3
  23. package/templates/beauty-salon/tier5-src/_shared/himi-store-saved.ts +7 -1
  24. package/templates/beauty-salon/tier5-src/_shared/wix-service-price.ts +18 -0
  25. package/templates/beauty-salon/tier5-src/himi-booking-service/index.ts +514 -117
  26. package/templates/beauty-salon/tier5-src/himi-branded-lite-cart/index.ts +256 -19
  27. package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +196 -34
  28. package/templates/beauty-salon/tier5-src/himi-store-saved/index.ts +21 -5
  29. package/templates/beauty-salon/tier5-src/himi-store-shop/index.ts +14 -2
  30. package/templates/beauty-salon/tokens.json +21 -0
  31. package/templates/branded-lite/dev/index.ts +4427 -1510
  32. package/templates/branded-lite/himalaya.content.json +1 -1
  33. package/templates/branded-lite/tier5-src/_shared/himi-store-collection.ts +6 -3
  34. package/templates/branded-lite/tier5-src/_shared/himi-store-saved.ts +7 -1
  35. package/templates/branded-lite/tier5-src/_shared/wix-service-price.ts +18 -0
  36. package/templates/branded-lite/tier5-src/himi-booking-service/index.ts +514 -117
  37. package/templates/branded-lite/tier5-src/himi-branded-lite-cart/index.ts +256 -19
  38. package/templates/branded-lite/tier5-src/himi-store-product/index.ts +196 -34
  39. package/templates/branded-lite/tier5-src/himi-store-saved/index.ts +21 -5
  40. package/templates/branded-lite/tier5-src/himi-store-shop/index.ts +14 -2
  41. package/templates/branded-lite/tokens.json +9 -0
  42. package/templates/community-club/dev/index.ts +1 -1
  43. package/templates/community-club/tier5-src/_shared/himi-store-saved.ts +7 -1
  44. package/templates/community-club/tier5-src/_shared/wix-service-price.ts +18 -0
  45. package/templates/community-club/tokens.json +21 -0
  46. package/templates/events-meetups/dev/index.ts +1 -1
  47. package/templates/events-meetups/tier5-src/_shared/himi-store-saved.ts +7 -1
  48. package/templates/events-meetups/tier5-src/_shared/wix-service-price.ts +18 -0
  49. package/templates/events-meetups/tokens.json +21 -0
  50. package/templates/gym-fitness/dev/index.ts +4439 -1529
  51. package/templates/gym-fitness/himalaya.content.json +1 -1
  52. package/templates/gym-fitness/tier5-src/_shared/himi-store-collection.ts +6 -3
  53. package/templates/gym-fitness/tier5-src/_shared/himi-store-saved.ts +7 -1
  54. package/templates/gym-fitness/tier5-src/_shared/wix-service-price.ts +18 -0
  55. package/templates/gym-fitness/tier5-src/himi-booking-service/index.ts +514 -117
  56. package/templates/gym-fitness/tier5-src/himi-branded-lite-cart/index.ts +256 -19
  57. package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +196 -34
  58. package/templates/gym-fitness/tier5-src/himi-store-saved/index.ts +21 -5
  59. package/templates/gym-fitness/tier5-src/himi-store-shop/index.ts +14 -2
  60. package/templates/gym-fitness/tokens.json +21 -0
  61. package/templates/nonprofit-cause/dev/index.ts +1 -1
  62. package/templates/nonprofit-cause/tier5-src/_shared/himi-store-saved.ts +7 -1
  63. package/templates/nonprofit-cause/tier5-src/_shared/wix-service-price.ts +18 -0
  64. package/templates/nonprofit-cause/tokens.json +21 -0
  65. package/templates/podcast-creator/dev/index.ts +1 -1
  66. package/templates/podcast-creator/tier5-src/_shared/himi-store-saved.ts +7 -1
  67. package/templates/podcast-creator/tier5-src/_shared/wix-service-price.ts +18 -0
  68. package/templates/podcast-creator/tokens.json +21 -0
  69. package/templates/portfolio-creative/dev/index.ts +2569 -1013
  70. package/templates/portfolio-creative/himalaya.content.json +1 -1
  71. package/templates/portfolio-creative/tier5-src/_shared/himi-store-collection.ts +6 -3
  72. package/templates/portfolio-creative/tier5-src/_shared/himi-store-saved.ts +7 -1
  73. package/templates/portfolio-creative/tier5-src/_shared/wix-service-price.ts +18 -0
  74. package/templates/portfolio-creative/tier5-src/himi-branded-lite-cart/index.ts +256 -19
  75. package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +196 -34
  76. package/templates/portfolio-creative/tier5-src/himi-store-saved/index.ts +21 -5
  77. package/templates/portfolio-creative/tier5-src/himi-store-shop/index.ts +14 -2
  78. package/templates/portfolio-creative/tokens.json +21 -0
  79. package/templates/restaurant/dev/index.ts +1 -1
  80. package/templates/restaurant/tier5-src/_shared/himi-store-saved.ts +7 -1
  81. package/templates/restaurant/tier5-src/_shared/wix-service-price.ts +18 -0
  82. package/templates/restaurant/tokens.json +21 -0
  83. package/templates/retail-store/dev/index.ts +2541 -985
  84. package/templates/retail-store/himalaya.content.json +1 -1
  85. package/templates/retail-store/tier5-src/_shared/himi-store-collection.ts +6 -3
  86. package/templates/retail-store/tier5-src/_shared/himi-store-saved.ts +7 -1
  87. package/templates/retail-store/tier5-src/_shared/wix-service-price.ts +18 -0
  88. package/templates/retail-store/tier5-src/himi-branded-lite-cart/index.ts +256 -19
  89. package/templates/retail-store/tier5-src/himi-store-product/index.ts +196 -34
  90. package/templates/retail-store/tier5-src/himi-store-saved/index.ts +21 -5
  91. package/templates/retail-store/tier5-src/himi-store-shop/index.ts +14 -2
  92. package/templates/retail-store/tokens.json +21 -0
  93. package/templates/yoga-studio/dev/index.ts +1618 -264
  94. package/templates/yoga-studio/tier5-src/_shared/himi-store-saved.ts +7 -1
  95. package/templates/yoga-studio/tier5-src/_shared/wix-service-price.ts +18 -0
  96. package/templates/yoga-studio/tier5-src/himi-booking-service/index.ts +514 -117
  97. package/templates/yoga-studio/tokens.json +21 -0
@@ -113,6 +113,12 @@
113
113
  "xl": 24
114
114
  },
115
115
  "typography": {
116
+ "pageTitle": {
117
+ "size": 28,
118
+ "weight": 400,
119
+ "line": 1.25,
120
+ "letterSpacing": 0
121
+ },
116
122
  "title1": {
117
123
  "size": 31,
118
124
  "weight": 700,
@@ -155,6 +161,12 @@
155
161
  "letterSpacing": 0.1,
156
162
  "family": "Wix Madefor Text"
157
163
  },
164
+ "footnoteRegular": {
165
+ "size": 14,
166
+ "weight": 400,
167
+ "line": 1.4,
168
+ "letterSpacing": 1
169
+ },
158
170
  "caption": {
159
171
  "size": 13,
160
172
  "weight": 600,
@@ -177,6 +189,15 @@
177
189
  "family": "Wix Madefor Display"
178
190
  }
179
191
  },
192
+ "controls": {
193
+ "button": {
194
+ "variants": {
195
+ "tertiary": {
196
+ "label": "textPrimary"
197
+ }
198
+ }
199
+ }
200
+ },
180
201
  "radius": {
181
202
  "sm": 18,
182
203
  "md": 24,
@@ -258,7 +258,7 @@ const SCREENS = runtimeSetting({
258
258
  "package": "himalaya",
259
259
  "type": "Text",
260
260
  "props": {
261
- "text": "Products you saved",
261
+ "text": "Wishlist",
262
262
  "style": "bodyEmphasis"
263
263
  }
264
264
  }
@@ -5,6 +5,8 @@ export interface SavedProduct {
5
5
  name: string;
6
6
  price: string;
7
7
  image: string;
8
+ wasPrice?: string;
9
+ swatches?: string[];
8
10
  }
9
11
  type StorageLike = { getItem(key: string): string | null; setItem(key: string, value: string): void };
10
12
  const KEY = "himi-store:saved-products:v1";
@@ -24,7 +26,11 @@ export function readSavedProducts(): SavedProduct[] {
24
26
  if (!value || typeof value !== "object") continue;
25
27
  const row = value as Record<string, unknown>;
26
28
  if (typeof row.id !== "string" || !row.id.trim() || typeof row.name !== "string") continue;
27
- rows.set(row.id, { id: row.id, name: row.name, price: typeof row.price === "string" ? row.price : "", image: typeof row.image === "string" ? row.image : "" });
29
+ const swatches = Array.isArray(row.swatches)
30
+ ? row.swatches.filter((color): color is string => typeof color === "string" && /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(color)).slice(0, 5)
31
+ : [];
32
+ rows.set(row.id, { id: row.id, name: row.name, price: typeof row.price === "string" ? row.price : "", image: typeof row.image === "string" ? row.image : "",
33
+ ...(typeof row.wasPrice === "string" && row.wasPrice ? { wasPrice: row.wasPrice } : {}), ...(swatches.length ? { swatches } : {}) });
28
34
  }
29
35
  return [...rows.values()];
30
36
  }
@@ -99,6 +99,24 @@ export function serviceIsChargeable(service: unknown): boolean {
99
99
  return amount != null && amount > 0;
100
100
  }
101
101
 
102
+ /**
103
+ * Format one Bookings v2 Money value (`{ value, currency }`, `value` a decimal string) — a
104
+ * price, a deposit, a VARIED minimum, a cancellation fee. A whole amount drops its cents
105
+ * ("₪90", not "₪90.00"), as the service screen shows it. "" when it carries no usable
106
+ * amount. The currency comes from the Money itself, then from `fallbackCurrency`.
107
+ */
108
+ export function formatServiceMoney(money: unknown, fallbackCurrency = "USD"): string {
109
+ const m = (money ?? {}) as { value?: unknown; amount?: unknown; currency?: unknown };
110
+ const amount = numberOf(m.value ?? m.amount);
111
+ if (amount == null) return "";
112
+ const currency = stringOf(m.currency) || fallbackCurrency;
113
+ try {
114
+ return formatCurrency(amount, currency, "en", Number.isInteger(amount) ? 0 : undefined);
115
+ } catch {
116
+ return `${amount}`;
117
+ }
118
+ }
119
+
102
120
  /**
103
121
  * Format a Wix Bookings service's price for display, e.g. "₪111" / "$20".
104
122
  *
@@ -109,6 +109,12 @@
109
109
  "xl": 24
110
110
  },
111
111
  "typography": {
112
+ "pageTitle": {
113
+ "size": 28,
114
+ "weight": 400,
115
+ "line": 1.25,
116
+ "letterSpacing": 0
117
+ },
112
118
  "title1": {
113
119
  "size": 32,
114
120
  "weight": 600,
@@ -145,6 +151,12 @@
145
151
  "line": 1.35,
146
152
  "letterSpacing": 0
147
153
  },
154
+ "footnoteRegular": {
155
+ "size": 14,
156
+ "weight": 400,
157
+ "line": 1.4,
158
+ "letterSpacing": 1
159
+ },
148
160
  "caption": {
149
161
  "size": 13,
150
162
  "weight": 500,
@@ -164,6 +176,15 @@
164
176
  "letterSpacing": -0.5
165
177
  }
166
178
  },
179
+ "controls": {
180
+ "button": {
181
+ "variants": {
182
+ "tertiary": {
183
+ "label": "textPrimary"
184
+ }
185
+ }
186
+ }
187
+ },
167
188
  "radius": {
168
189
  "sm": 12,
169
190
  "md": 18,