@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.
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +5 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/live-activity/src/index.d.ts +4 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +2 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/bookings-v2/src/extensions.d.ts +52 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/bookings-v2/src/index.d.ts +180 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/ecom/src/extensions.d.ts +16 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/display.d.ts +24 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/live-activity.mjs +3 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-bookings.mjs +4 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-ecom.mjs +14 -0
- package/dist/cli.mjs +3585 -2540
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/himi-json-output.md +46 -4
- package/guides/iap-products.md +68 -9
- package/guides/one-app-to-himi-app.md +80 -5
- package/guides/qa-builds.md +2 -2
- package/guides/widgets.md +5 -3
- package/package.json +2 -2
- package/templates/beauty-salon/dev/index.ts +4442 -1532
- package/templates/beauty-salon/himalaya.content.json +1 -1
- package/templates/beauty-salon/tier5-src/_shared/himi-store-collection.ts +6 -3
- package/templates/beauty-salon/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/beauty-salon/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/beauty-salon/tier5-src/himi-booking-service/index.ts +514 -117
- package/templates/beauty-salon/tier5-src/himi-branded-lite-cart/index.ts +256 -19
- package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +196 -34
- package/templates/beauty-salon/tier5-src/himi-store-saved/index.ts +21 -5
- package/templates/beauty-salon/tier5-src/himi-store-shop/index.ts +14 -2
- package/templates/beauty-salon/tokens.json +21 -0
- package/templates/branded-lite/dev/index.ts +4427 -1510
- package/templates/branded-lite/himalaya.content.json +1 -1
- package/templates/branded-lite/tier5-src/_shared/himi-store-collection.ts +6 -3
- package/templates/branded-lite/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/branded-lite/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/branded-lite/tier5-src/himi-booking-service/index.ts +514 -117
- package/templates/branded-lite/tier5-src/himi-branded-lite-cart/index.ts +256 -19
- package/templates/branded-lite/tier5-src/himi-store-product/index.ts +196 -34
- package/templates/branded-lite/tier5-src/himi-store-saved/index.ts +21 -5
- package/templates/branded-lite/tier5-src/himi-store-shop/index.ts +14 -2
- package/templates/branded-lite/tokens.json +9 -0
- package/templates/community-club/dev/index.ts +1 -1
- package/templates/community-club/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/community-club/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/community-club/tokens.json +21 -0
- package/templates/events-meetups/dev/index.ts +1 -1
- package/templates/events-meetups/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/events-meetups/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/events-meetups/tokens.json +21 -0
- package/templates/gym-fitness/dev/index.ts +4439 -1529
- package/templates/gym-fitness/himalaya.content.json +1 -1
- package/templates/gym-fitness/tier5-src/_shared/himi-store-collection.ts +6 -3
- package/templates/gym-fitness/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/gym-fitness/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/gym-fitness/tier5-src/himi-booking-service/index.ts +514 -117
- package/templates/gym-fitness/tier5-src/himi-branded-lite-cart/index.ts +256 -19
- package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +196 -34
- package/templates/gym-fitness/tier5-src/himi-store-saved/index.ts +21 -5
- package/templates/gym-fitness/tier5-src/himi-store-shop/index.ts +14 -2
- package/templates/gym-fitness/tokens.json +21 -0
- package/templates/nonprofit-cause/dev/index.ts +1 -1
- package/templates/nonprofit-cause/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/nonprofit-cause/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/nonprofit-cause/tokens.json +21 -0
- package/templates/podcast-creator/dev/index.ts +1 -1
- package/templates/podcast-creator/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/podcast-creator/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/podcast-creator/tokens.json +21 -0
- package/templates/portfolio-creative/dev/index.ts +2569 -1013
- package/templates/portfolio-creative/himalaya.content.json +1 -1
- package/templates/portfolio-creative/tier5-src/_shared/himi-store-collection.ts +6 -3
- package/templates/portfolio-creative/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/portfolio-creative/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-cart/index.ts +256 -19
- package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +196 -34
- package/templates/portfolio-creative/tier5-src/himi-store-saved/index.ts +21 -5
- package/templates/portfolio-creative/tier5-src/himi-store-shop/index.ts +14 -2
- package/templates/portfolio-creative/tokens.json +21 -0
- package/templates/restaurant/dev/index.ts +1 -1
- package/templates/restaurant/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/restaurant/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/restaurant/tokens.json +21 -0
- package/templates/retail-store/dev/index.ts +2541 -985
- package/templates/retail-store/himalaya.content.json +1 -1
- package/templates/retail-store/tier5-src/_shared/himi-store-collection.ts +6 -3
- package/templates/retail-store/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/retail-store/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/retail-store/tier5-src/himi-branded-lite-cart/index.ts +256 -19
- package/templates/retail-store/tier5-src/himi-store-product/index.ts +196 -34
- package/templates/retail-store/tier5-src/himi-store-saved/index.ts +21 -5
- package/templates/retail-store/tier5-src/himi-store-shop/index.ts +14 -2
- package/templates/retail-store/tokens.json +21 -0
- package/templates/yoga-studio/dev/index.ts +1618 -264
- package/templates/yoga-studio/tier5-src/_shared/himi-store-saved.ts +7 -1
- package/templates/yoga-studio/tier5-src/_shared/wix-service-price.ts +18 -0
- package/templates/yoga-studio/tier5-src/himi-booking-service/index.ts +514 -117
- package/templates/yoga-studio/tokens.json +21 -0
|
@@ -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": 28,
|
|
114
120
|
"weight": 400,
|
|
@@ -145,6 +151,12 @@
|
|
|
145
151
|
"line": 1.4,
|
|
146
152
|
"letterSpacing": 0.25
|
|
147
153
|
},
|
|
154
|
+
"footnoteRegular": {
|
|
155
|
+
"size": 14,
|
|
156
|
+
"weight": 400,
|
|
157
|
+
"line": 1.4,
|
|
158
|
+
"letterSpacing": 1
|
|
159
|
+
},
|
|
148
160
|
"caption": {
|
|
149
161
|
"size": 12,
|
|
150
162
|
"weight": 500,
|
|
@@ -164,6 +176,15 @@
|
|
|
164
176
|
"letterSpacing": 0
|
|
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": 8,
|
|
169
190
|
"md": 12,
|
|
@@ -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
|
-
|
|
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": 26,
|
|
114
120
|
"weight": 400,
|
|
@@ -151,6 +157,12 @@
|
|
|
151
157
|
"letterSpacing": 0.6,
|
|
152
158
|
"family": "Wix Madefor Text"
|
|
153
159
|
},
|
|
160
|
+
"footnoteRegular": {
|
|
161
|
+
"size": 14,
|
|
162
|
+
"weight": 400,
|
|
163
|
+
"line": 1.4,
|
|
164
|
+
"letterSpacing": 1
|
|
165
|
+
},
|
|
154
166
|
"caption": {
|
|
155
167
|
"size": 12,
|
|
156
168
|
"weight": 400,
|
|
@@ -173,6 +185,15 @@
|
|
|
173
185
|
"family": "Wix Madefor Display"
|
|
174
186
|
}
|
|
175
187
|
},
|
|
188
|
+
"controls": {
|
|
189
|
+
"button": {
|
|
190
|
+
"variants": {
|
|
191
|
+
"tertiary": {
|
|
192
|
+
"label": "textPrimary"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
},
|
|
176
197
|
"radius": {
|
|
177
198
|
"sm": 10,
|
|
178
199
|
"md": 14,
|