@wix/himalaya-cli 0.1029.0 → 0.1030.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/cli.mjs +55 -27
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/component-reference.json +0 -7
- package/guides/component-reference.md +0 -2
- package/package.json +2 -2
- package/templates/beauty-salon/dev/index.ts +575 -214
- package/templates/beauty-salon/tier5-src/_shared/collection-contract.ts +4 -1
- package/templates/beauty-salon/tier5-src/himi-branded-lite-appearance/index.ts +12 -1
- package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +36 -5
- package/templates/beauty-salon/tier5-src/wix-spaces-app-language/index.ts +4 -2
- package/templates/beauty-salon-owner/tier5-src/_shared/collection-contract.ts +4 -1
- package/templates/branded-lite/dev/index.ts +699 -228
- package/templates/branded-lite/tier5-src/_shared/collection-contract.ts +4 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-appearance/index.ts +12 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-notifsettings/index.ts +11 -6
- package/templates/branded-lite/tier5-src/himi-branded-lite-reviews/index.ts +11 -6
- package/templates/branded-lite/tier5-src/himi-store-product/index.ts +36 -5
- package/templates/branded-lite/tier5-src/wix-spaces-app-language/index.ts +4 -2
- package/templates/community-club/dev/index.ts +451 -204
- package/templates/community-club/tier5-src/_shared/collection-contract.ts +4 -1
- package/templates/community-club/tier5-src/himi-branded-lite-appearance/index.ts +12 -1
- package/templates/community-club/tier5-src/wix-spaces-app-language/index.ts +4 -2
- package/templates/community-club-owner/tier5-src/_shared/collection-contract.ts +4 -1
- package/templates/events-meetups/dev/index.ts +451 -204
- package/templates/events-meetups/tier5-src/_shared/collection-contract.ts +4 -1
- package/templates/events-meetups/tier5-src/himi-branded-lite-appearance/index.ts +12 -1
- package/templates/events-meetups/tier5-src/wix-spaces-app-language/index.ts +4 -2
- package/templates/events-meetups-owner/tier5-src/_shared/collection-contract.ts +4 -1
- package/templates/gym-fitness/dev/index.ts +575 -214
- package/templates/gym-fitness/tier5-src/_shared/collection-contract.ts +4 -1
- package/templates/gym-fitness/tier5-src/himi-branded-lite-appearance/index.ts +12 -1
- package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +36 -5
- package/templates/gym-fitness/tier5-src/wix-spaces-app-language/index.ts +4 -2
- package/templates/gym-fitness-owner/tier5-src/_shared/collection-contract.ts +4 -1
- package/templates/nonprofit-cause/dev/index.ts +451 -204
- package/templates/nonprofit-cause/tier5-src/_shared/collection-contract.ts +4 -1
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-appearance/index.ts +12 -1
- package/templates/nonprofit-cause/tier5-src/wix-spaces-app-language/index.ts +4 -2
- package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-contract.ts +4 -1
- package/templates/owner-lite/tier5-src/_shared/collection-contract.ts +4 -1
- package/templates/podcast-creator/dev/index.ts +451 -204
- package/templates/podcast-creator/tier5-src/_shared/collection-contract.ts +4 -1
- package/templates/podcast-creator/tier5-src/himi-branded-lite-appearance/index.ts +12 -1
- package/templates/podcast-creator/tier5-src/wix-spaces-app-language/index.ts +4 -2
- package/templates/podcast-creator-owner/tier5-src/_shared/collection-contract.ts +4 -1
- package/templates/portfolio-creative/dev/index.ts +575 -214
- package/templates/portfolio-creative/tier5-src/_shared/collection-contract.ts +4 -1
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-appearance/index.ts +12 -1
- package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +36 -5
- package/templates/portfolio-creative/tier5-src/wix-spaces-app-language/index.ts +4 -2
- package/templates/portfolio-creative-owner/tier5-src/_shared/collection-contract.ts +4 -1
- package/templates/restaurant/dev/index.ts +451 -204
- package/templates/restaurant/tier5-src/_shared/collection-contract.ts +4 -1
- package/templates/restaurant/tier5-src/himi-branded-lite-appearance/index.ts +12 -1
- package/templates/restaurant/tier5-src/wix-spaces-app-language/index.ts +4 -2
- package/templates/restaurant-owner/tier5-src/_shared/collection-contract.ts +4 -1
- package/templates/retail-store/dev/index.ts +575 -214
- package/templates/retail-store/tier5-src/_shared/collection-contract.ts +4 -1
- package/templates/retail-store/tier5-src/himi-branded-lite-appearance/index.ts +12 -1
- package/templates/retail-store/tier5-src/himi-store-product/index.ts +36 -5
- package/templates/retail-store/tier5-src/wix-spaces-app-language/index.ts +4 -2
- package/templates/retail-store-owner/tier5-src/_shared/collection-contract.ts +4 -1
- package/templates/yoga-studio/dev/index.ts +451 -204
- package/templates/yoga-studio/tier5-src/_shared/collection-contract.ts +4 -1
- package/templates/yoga-studio/tier5-src/himi-branded-lite-appearance/index.ts +12 -1
- package/templates/yoga-studio/tier5-src/wix-spaces-app-language/index.ts +4 -2
- package/templates/yoga-studio-owner/tier5-src/_shared/collection-contract.ts +4 -1
|
@@ -14,6 +14,9 @@ export interface CollectionConfig {
|
|
|
14
14
|
searchPlaceholder?: string;
|
|
15
15
|
sortLabels?: { default: string; az: string; za: string };
|
|
16
16
|
metadata?: string[];
|
|
17
|
+
/** Numeric 0–5 row field rendered as a Rating (accessible "N out of 5") instead of
|
|
18
|
+
* folding a "★★★★☆" glyph string into the metadata line, so screen readers get a value. */
|
|
19
|
+
rating?: string;
|
|
17
20
|
sectioned?: boolean;
|
|
18
21
|
view: 'list' | 'grid';
|
|
19
22
|
backendQuery?: boolean;
|
|
@@ -58,7 +61,7 @@ export const COLLECTIONS: Record<string, CollectionConfig> = {
|
|
|
58
61
|
himiBrandedCoupons: { rows: 'coupons', title: 'name', subtitle: 'subtitle', view: 'list', primaryVerb: { label: 'Get code' } },
|
|
59
62
|
himiBrandedNotifications: { rows: 'items', title: 'name', subtitle: 'subtitle', image: 'photo', metadata: ['unreadDot'], view: 'list' },
|
|
60
63
|
himiBrandedLoyalty: { rows: 'rewards', title: 'name', subtitle: 'description', view: 'grid', primaryVerb: { label: 'Redeem' } },
|
|
61
|
-
himiBrandedReviews: { rows: 'reviews', title: 'title', subtitle: 'body', metadata: ['author', '
|
|
64
|
+
himiBrandedReviews: { rows: 'reviews', title: 'title', subtitle: 'body', metadata: ['author'], rating: 'rating', view: 'list' },
|
|
62
65
|
himiBrandedPortfolio: { rows: 'projects', title: 'title', subtitle: 'subtitle', image: 'image', view: 'grid', gridImageHeight: 180 },
|
|
63
66
|
himiBrandedInvoices: { rows: 'invoices', title: 'title', subtitle: 'subtitle', view: 'list' },
|
|
64
67
|
himiBrandedBadges: { rows: 'badges', title: 'name', subtitle: 'description', view: 'grid' },
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineService } from "@himalaya/state";
|
|
2
2
|
import {
|
|
3
|
+
ACCENT_IDS,
|
|
3
4
|
ACCENT_KEY,
|
|
4
5
|
ACCENT_META,
|
|
5
6
|
DEFAULT_ACCENT,
|
|
@@ -29,6 +30,10 @@ interface State {
|
|
|
29
30
|
accentHex_sage: string;
|
|
30
31
|
accentHex_plum: string;
|
|
31
32
|
accentHex_ocean: string;
|
|
33
|
+
// Per-accent selection flags for the radio group (`selected_<id>`) and the
|
|
34
|
+
// check mark on the swatch (`notSelected_<id>`, hiddenWhen hides on TRUE). Flat
|
|
35
|
+
// fields for the same reason as the hex ones: the swatches are static nodes.
|
|
36
|
+
[flag: `selected_${string}` | `notSelected_${string}`]: boolean | string;
|
|
32
37
|
}
|
|
33
38
|
|
|
34
39
|
interface StorageLike {
|
|
@@ -50,7 +55,13 @@ function paramValue(arg: unknown, key: string): string {
|
|
|
50
55
|
}
|
|
51
56
|
|
|
52
57
|
function build(pendingAccent: string, brandAccent: string): State {
|
|
58
|
+
const flags: Record<string, boolean> = {};
|
|
59
|
+
for (const id of ACCENT_IDS) {
|
|
60
|
+
flags[`selected_${id}`] = id === pendingAccent;
|
|
61
|
+
flags[`notSelected_${id}`] = id !== pendingAccent;
|
|
62
|
+
}
|
|
53
63
|
return {
|
|
64
|
+
...flags,
|
|
54
65
|
pendingAccent,
|
|
55
66
|
brandAccent,
|
|
56
67
|
accentHex_brand: brandAccent || ACCENT_META.amber.hex,
|
|
@@ -85,7 +96,7 @@ const svc = defineService<State, {
|
|
|
85
96
|
selectAccent: (state, arg) => {
|
|
86
97
|
const id = paramValue(arg, "id");
|
|
87
98
|
if (!isAccentId(id)) return state;
|
|
88
|
-
return
|
|
99
|
+
return build(id, state.brandAccent);
|
|
89
100
|
},
|
|
90
101
|
// Apply: persist the accent; the home worker re-reads it on launch.
|
|
91
102
|
apply: (state) => {
|
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
import { defineService } from "@himalaya/state";
|
|
6
6
|
import { dispatch } from "@himalaya/dispatch";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/** `selected` drives the row's radio; `subtitle` stays for older descriptors. */
|
|
9
|
+
interface Row { id: string; name: string; subtitle: string; selected: boolean }
|
|
9
10
|
interface S { status: "ready"; options: Row[] }
|
|
10
11
|
|
|
11
12
|
/** Locales with catalogs (`tools/l10n/catalog.<tag>.json`) + LocaleStore support. */
|
|
12
|
-
const LOCALE_OPTIONS: Omit<Row, "subtitle">[] = [
|
|
13
|
+
const LOCALE_OPTIONS: Omit<Row, "subtitle" | "selected">[] = [
|
|
13
14
|
{ id: "en", name: "English" },
|
|
14
15
|
{ id: "es", name: "Español" },
|
|
15
16
|
{ id: "he", name: "עברית" },
|
|
@@ -19,6 +20,7 @@ function withSelected(selected: string): Row[] {
|
|
|
19
20
|
return LOCALE_OPTIONS.map((o) => ({
|
|
20
21
|
...o,
|
|
21
22
|
subtitle: o.id === selected ? "Selected" : "",
|
|
23
|
+
selected: o.id === selected,
|
|
22
24
|
}));
|
|
23
25
|
}
|
|
24
26
|
|
|
@@ -14,6 +14,9 @@ export interface CollectionConfig {
|
|
|
14
14
|
searchPlaceholder?: string;
|
|
15
15
|
sortLabels?: { default: string; az: string; za: string };
|
|
16
16
|
metadata?: string[];
|
|
17
|
+
/** Numeric 0–5 row field rendered as a Rating (accessible "N out of 5") instead of
|
|
18
|
+
* folding a "★★★★☆" glyph string into the metadata line, so screen readers get a value. */
|
|
19
|
+
rating?: string;
|
|
17
20
|
sectioned?: boolean;
|
|
18
21
|
view: 'list' | 'grid';
|
|
19
22
|
backendQuery?: boolean;
|
|
@@ -58,7 +61,7 @@ export const COLLECTIONS: Record<string, CollectionConfig> = {
|
|
|
58
61
|
himiBrandedCoupons: { rows: 'coupons', title: 'name', subtitle: 'subtitle', view: 'list', primaryVerb: { label: 'Get code' } },
|
|
59
62
|
himiBrandedNotifications: { rows: 'items', title: 'name', subtitle: 'subtitle', image: 'photo', metadata: ['unreadDot'], view: 'list' },
|
|
60
63
|
himiBrandedLoyalty: { rows: 'rewards', title: 'name', subtitle: 'description', view: 'grid', primaryVerb: { label: 'Redeem' } },
|
|
61
|
-
himiBrandedReviews: { rows: 'reviews', title: 'title', subtitle: 'body', metadata: ['author', '
|
|
64
|
+
himiBrandedReviews: { rows: 'reviews', title: 'title', subtitle: 'body', metadata: ['author'], rating: 'rating', view: 'list' },
|
|
62
65
|
himiBrandedPortfolio: { rows: 'projects', title: 'title', subtitle: 'subtitle', image: 'image', view: 'grid', gridImageHeight: 180 },
|
|
63
66
|
himiBrandedInvoices: { rows: 'invoices', title: 'title', subtitle: 'subtitle', view: 'list' },
|
|
64
67
|
himiBrandedBadges: { rows: 'badges', title: 'name', subtitle: 'description', view: 'grid' },
|