@wix/himalaya-cli 0.1569.0 → 0.1571.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/l10n-strings.d.ts +3 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +8 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/auth-providers/wix/src/index.d.ts +7 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/business-contact-service.d.ts +17 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/business-contact.d.ts +73 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/index.d.ts +3 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/invite-target.d.ts +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/invite.d.ts +148 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/blog-v3/src/extensions.d.ts +6 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/auth.mjs +17 -7
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core/validation.mjs +17 -7
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +17 -7
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +575 -91
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/state.mjs +17 -7
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-auth.mjs +7 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-blog.mjs +1 -0
- package/dist/cli.mjs +1897 -1226
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/base44-app-to-himi-app.md +1 -1
- package/guides/capabilities.md +7 -0
- package/guides/getting-started.md +5 -0
- package/guides/himi-json-output.md +11 -0
- package/guides/himi-skill.md +5 -0
- package/guides/one-app-to-himi-app.md +267 -8
- package/guides/sdk-reference.json +2 -2
- package/guides/skill.md +5 -0
- package/guides/splash-screens.md +10 -1
- package/guides/tier-5-add-a-screen.md +20 -0
- package/guides/trim-a-template.md +5 -0
- package/guides/wix-business-context.md +11 -2
- package/package.json +2 -2
- package/templates/beauty-salon/config.ts +8 -1
- package/templates/beauty-salon/dev/index.ts +244 -1
- package/templates/beauty-salon/himalaya.content.json +3 -0
- package/templates/beauty-salon/tier5-src/_shared/member-read.ts +52 -0
- package/templates/beauty-salon/tier5-src/_shared/program-description.ts +11 -0
- package/templates/beauty-salon/tier5-src/business-contact/index.ts +6 -0
- package/templates/beauty-salon/tier5-src/himi-blog-post/index.ts +35 -12
- package/templates/beauty-salon/tier5-src/himi-branded-lite-home/index.ts +3 -3
- package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +6 -9
- package/templates/beauty-salon-owner/config.ts +1 -1
- package/templates/branded-lite/config.ts +8 -1
- package/templates/branded-lite/dev/index.ts +409 -2
- package/templates/branded-lite/himalaya.content.json +3 -0
- package/templates/branded-lite/tier5-src/_shared/member-read.ts +52 -0
- package/templates/branded-lite/tier5-src/_shared/program-description.ts +11 -0
- package/templates/branded-lite/tier5-src/business-contact/index.ts +6 -0
- package/templates/branded-lite/tier5-src/himi-blog-post/index.ts +35 -12
- package/templates/branded-lite/tier5-src/himi-branded-lite-home/index.ts +3 -3
- package/templates/branded-lite/tier5-src/himi-branded-lite-notifsettings/index.ts +39 -11
- package/templates/branded-lite/tier5-src/himi-branded-lite-program/index.ts +16 -14
- package/templates/branded-lite/tier5-src/himi-branded-lite-programs/index.ts +3 -7
- package/templates/branded-lite/tier5-src/himi-events-my-events/index.ts +76 -42
- package/templates/branded-lite/tier5-src/himi-store-product/index.ts +6 -9
- package/templates/branded-lite/tier5-src/wix-spaces-chat-thread/index.ts +101 -34
- package/templates/branded-lite/tier5-src/wix-spaces-forum-post/index.ts +23 -6
- package/templates/branded-lite/tier5-src/wix-spaces-member-detail/index.ts +26 -11
- package/templates/community-club/config.ts +8 -1
- package/templates/community-club/dev/index.ts +278 -2
- package/templates/community-club/himalaya.content.json +3 -0
- package/templates/community-club/tier5-src/_shared/branded-load-state.ts +106 -0
- package/templates/community-club/tier5-src/_shared/member-read.ts +52 -0
- package/templates/community-club/tier5-src/_shared/program-description.ts +11 -0
- package/templates/community-club/tier5-src/business-contact/index.ts +6 -0
- package/templates/community-club/tier5-src/himi-blog-post/index.ts +35 -12
- package/templates/community-club/tier5-src/himi-branded-lite-home/index.ts +3 -3
- package/templates/community-club/tier5-src/himi-events-my-events/index.ts +76 -42
- package/templates/community-club-owner/config.ts +1 -1
- package/templates/events-meetups/config.ts +8 -1
- package/templates/events-meetups/dev/index.ts +278 -2
- package/templates/events-meetups/himalaya.content.json +3 -0
- package/templates/events-meetups/tier5-src/_shared/branded-load-state.ts +106 -0
- package/templates/events-meetups/tier5-src/_shared/member-read.ts +52 -0
- package/templates/events-meetups/tier5-src/_shared/program-description.ts +11 -0
- package/templates/events-meetups/tier5-src/business-contact/index.ts +6 -0
- package/templates/events-meetups/tier5-src/himi-blog-post/index.ts +35 -12
- package/templates/events-meetups/tier5-src/himi-branded-lite-home/index.ts +3 -3
- package/templates/events-meetups/tier5-src/himi-events-my-events/index.ts +76 -42
- package/templates/events-meetups-owner/config.ts +1 -1
- package/templates/gym-fitness/config.ts +8 -1
- package/templates/gym-fitness/dev/index.ts +278 -2
- package/templates/gym-fitness/himalaya.content.json +3 -0
- package/templates/gym-fitness/tier5-src/_shared/member-read.ts +52 -0
- package/templates/gym-fitness/tier5-src/_shared/program-description.ts +11 -0
- package/templates/gym-fitness/tier5-src/business-contact/index.ts +6 -0
- package/templates/gym-fitness/tier5-src/himi-blog-post/index.ts +35 -12
- package/templates/gym-fitness/tier5-src/himi-branded-lite-home/index.ts +3 -3
- package/templates/gym-fitness/tier5-src/himi-events-my-events/index.ts +76 -42
- package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +6 -9
- package/templates/gym-fitness-owner/config.ts +1 -1
- package/templates/nonprofit-cause/config.ts +8 -1
- package/templates/nonprofit-cause/dev/index.ts +278 -2
- package/templates/nonprofit-cause/himalaya.content.json +3 -0
- package/templates/nonprofit-cause/tier5-src/_shared/branded-load-state.ts +106 -0
- package/templates/nonprofit-cause/tier5-src/_shared/member-read.ts +52 -0
- package/templates/nonprofit-cause/tier5-src/_shared/program-description.ts +11 -0
- package/templates/nonprofit-cause/tier5-src/business-contact/index.ts +6 -0
- package/templates/nonprofit-cause/tier5-src/himi-blog-post/index.ts +35 -12
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-home/index.ts +3 -3
- package/templates/nonprofit-cause/tier5-src/himi-events-my-events/index.ts +76 -42
- package/templates/nonprofit-cause-owner/config.ts +1 -1
- package/templates/owner-lite/config.ts +1 -1
- package/templates/podcast-creator/config.ts +8 -1
- package/templates/podcast-creator/dev/index.ts +278 -2
- package/templates/podcast-creator/himalaya.content.json +3 -0
- package/templates/podcast-creator/tier5-src/_shared/branded-load-state.ts +106 -0
- package/templates/podcast-creator/tier5-src/_shared/member-read.ts +52 -0
- package/templates/podcast-creator/tier5-src/_shared/program-description.ts +11 -0
- package/templates/podcast-creator/tier5-src/business-contact/index.ts +6 -0
- package/templates/podcast-creator/tier5-src/himi-blog-post/index.ts +35 -12
- package/templates/podcast-creator/tier5-src/himi-branded-lite-home/index.ts +3 -3
- package/templates/podcast-creator/tier5-src/himi-events-my-events/index.ts +76 -42
- package/templates/podcast-creator-owner/config.ts +1 -1
- package/templates/portfolio-creative/config.ts +8 -1
- package/templates/portfolio-creative/dev/index.ts +278 -2
- package/templates/portfolio-creative/himalaya.content.json +3 -0
- package/templates/portfolio-creative/tier5-src/_shared/branded-load-state.ts +106 -0
- package/templates/portfolio-creative/tier5-src/_shared/member-read.ts +52 -0
- package/templates/portfolio-creative/tier5-src/_shared/program-description.ts +11 -0
- package/templates/portfolio-creative/tier5-src/business-contact/index.ts +6 -0
- package/templates/portfolio-creative/tier5-src/himi-blog-post/index.ts +35 -12
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-home/index.ts +3 -3
- package/templates/portfolio-creative/tier5-src/himi-events-my-events/index.ts +76 -42
- package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +6 -9
- package/templates/portfolio-creative-owner/config.ts +1 -1
- package/templates/restaurant/config.ts +8 -1
- package/templates/restaurant/dev/index.ts +278 -2
- package/templates/restaurant/himalaya.content.json +3 -0
- package/templates/restaurant/tier5-src/_shared/branded-load-state.ts +106 -0
- package/templates/restaurant/tier5-src/_shared/member-read.ts +52 -0
- package/templates/restaurant/tier5-src/_shared/program-description.ts +11 -0
- package/templates/restaurant/tier5-src/business-contact/index.ts +6 -0
- package/templates/restaurant/tier5-src/himi-blog-post/index.ts +35 -12
- package/templates/restaurant/tier5-src/himi-branded-lite-home/index.ts +3 -3
- package/templates/restaurant/tier5-src/himi-events-my-events/index.ts +76 -42
- package/templates/restaurant-owner/config.ts +1 -1
- package/templates/retail-store/config.ts +8 -1
- package/templates/retail-store/dev/index.ts +244 -1
- package/templates/retail-store/himalaya.content.json +3 -0
- package/templates/retail-store/tier5-src/_shared/branded-load-state.ts +106 -0
- package/templates/retail-store/tier5-src/_shared/member-read.ts +52 -0
- package/templates/retail-store/tier5-src/_shared/program-description.ts +11 -0
- package/templates/retail-store/tier5-src/business-contact/index.ts +6 -0
- package/templates/retail-store/tier5-src/himi-blog-post/index.ts +35 -12
- package/templates/retail-store/tier5-src/himi-branded-lite-home/index.ts +3 -3
- package/templates/retail-store/tier5-src/himi-store-product/index.ts +6 -9
- package/templates/retail-store-owner/config.ts +1 -1
- package/templates/yoga-studio/config.ts +8 -1
- package/templates/yoga-studio/dev/index.ts +306 -2
- package/templates/yoga-studio/himalaya.content.json +3 -0
- package/templates/yoga-studio/tier5-src/_shared/member-read.ts +52 -0
- package/templates/yoga-studio/tier5-src/_shared/program-description.ts +11 -0
- package/templates/yoga-studio/tier5-src/business-contact/index.ts +6 -0
- package/templates/yoga-studio/tier5-src/himi-blog-post/index.ts +35 -12
- package/templates/yoga-studio/tier5-src/himi-branded-lite-home/index.ts +3 -3
- package/templates/yoga-studio/tier5-src/himi-branded-lite-program/index.ts +16 -14
- package/templates/yoga-studio/tier5-src/himi-branded-lite-programs/index.ts +3 -7
- package/templates/yoga-studio/tier5-src/himi-events-my-events/index.ts +76 -42
- package/templates/yoga-studio-owner/config.ts +1 -1
|
@@ -5,6 +5,8 @@ import { queryEvents, type WixEvent } from "@himalaya/wix-events";
|
|
|
5
5
|
import { getAll, upsert, type DbEntity } from "@himalaya/local-db";
|
|
6
6
|
import { confirmedRsvpIds, eventStartMillis, normalizeEvent, type EventRow } from "../_shared/himi-events";
|
|
7
7
|
import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
|
|
8
|
+
import { memberAccess } from "../_shared/member-access.js";
|
|
9
|
+
import { readAccess, assertReadAccess, readAccessDenied, readSignInFlags, NO_READ_SIGN_IN } from "../_shared/member-read.js";
|
|
8
10
|
|
|
9
11
|
// Offline-first (data-offline): My Events is a read-through over the same `events`
|
|
10
12
|
// catalog the list caches — paint the last-synced rows (filtered to this device's
|
|
@@ -27,6 +29,7 @@ async function writeCached(rows: CachedEventRow[]): Promise<void> {
|
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
interface S {
|
|
32
|
+
signInRequired: boolean; noSignIn: boolean; signInScreenId: string;
|
|
30
33
|
status: "loading" | "ready";
|
|
31
34
|
events: EventRow[];
|
|
32
35
|
emptyText: string;
|
|
@@ -98,11 +101,10 @@ function unverifiedEvent(event: CachedEventRow): CachedEventRow {
|
|
|
98
101
|
};
|
|
99
102
|
}
|
|
100
103
|
|
|
101
|
-
/**
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
|
|
105
|
-
async function confirmRsvps(candidates: CachedEventRow[]): Promise<{ events: CachedEventRow[]; verificationUnavailable: boolean }> {
|
|
104
|
+
/** Verify device-local candidates against the current member. Member-only mode
|
|
105
|
+
* requires successful verification; standalone mode retains failed probes as
|
|
106
|
+
* explicitly unverified device-local history. */
|
|
107
|
+
async function confirmRsvps(candidates: CachedEventRow[], memberOnly = false): Promise<{ events: CachedEventRow[]; verificationUnavailable: boolean }> {
|
|
106
108
|
// Raw wixApi chokepoint rather than a generated client: the member RSVP read lives in
|
|
107
109
|
// events **v2**, and `@himalaya/wix-events` is the v1 domain module. Adding a
|
|
108
110
|
// `wix-events-v2` specifier is not an option — the umbrella package deliberately
|
|
@@ -122,7 +124,9 @@ async function confirmRsvps(candidates: CachedEventRow[]): Promise<{ events: Cac
|
|
|
122
124
|
event: held ? { ...event, status: [event.status, copyParam("myEvents.rsvpConfirmed", "RSVP confirmed")].filter(Boolean).join(" · ") } : null,
|
|
123
125
|
verificationUnavailable: false,
|
|
124
126
|
};
|
|
125
|
-
} catch {
|
|
127
|
+
} catch (error) {
|
|
128
|
+
// Device candidates carry no member ownership proof until this read succeeds.
|
|
129
|
+
if (memberOnly) throw error;
|
|
126
130
|
// Fail-open, but never claim backend confirmation while its member-readable
|
|
127
131
|
// probe is unavailable. The device id remains a candidate, explicitly labeled.
|
|
128
132
|
return { event: unverifiedEvent(event), verificationUnavailable: true };
|
|
@@ -134,8 +138,8 @@ async function confirmRsvps(candidates: CachedEventRow[]): Promise<{ events: Cac
|
|
|
134
138
|
};
|
|
135
139
|
}
|
|
136
140
|
|
|
137
|
-
const
|
|
138
|
-
|
|
141
|
+
const INITIAL: S = derive({
|
|
142
|
+
...NO_READ_SIGN_IN, signInScreenId: "himi_account",
|
|
139
143
|
status: "loading",
|
|
140
144
|
events: [],
|
|
141
145
|
emptyText: "",
|
|
@@ -147,45 +151,75 @@ const svc = defineService<S, { load: (s: S, arg?: unknown) => Promise<S> }>("him
|
|
|
147
151
|
isLoading: true,
|
|
148
152
|
notLoading: false,
|
|
149
153
|
noEmpty: true,
|
|
150
|
-
})
|
|
154
|
+
});
|
|
155
|
+
let memberOnlyRequested = false;
|
|
156
|
+
let loadVersion = 0;
|
|
157
|
+
const svc = defineService<S, { prepare: (s: S) => S; load: (s: S, arg?: unknown) => Promise<S | undefined> }>("himiMyEvents", {
|
|
158
|
+
state: INITIAL,
|
|
151
159
|
actions: {
|
|
152
|
-
|
|
160
|
+
prepare: (s) => ({ ...s, ...INITIAL }),
|
|
161
|
+
load: async (s, arg): Promise<S | undefined> => {
|
|
153
162
|
stashCopy(arg);
|
|
154
|
-
const
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
const
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
? derive({ ...s, status: "ready", errored: false, events: cachedEvents, identityLine: identity, verificationUnavailable: cachedEvents.length > 0 })
|
|
161
|
-
: s;
|
|
162
|
-
// 2) Revalidate from Wix and refresh the cache.
|
|
163
|
+
const version = ++loadVersion;
|
|
164
|
+
const options = arg as { memberOnly?: unknown; signInScreenId?: unknown } | undefined;
|
|
165
|
+
if (options?.memberOnly !== undefined) memberOnlyRequested = options.memberOnly === "1";
|
|
166
|
+
const memberOnly = memberOnlyRequested;
|
|
167
|
+
const clean = { ...INITIAL, signInScreenId: options?.signInScreenId === "himi_sign_in" ? "himi_sign_in" : s.signInScreenId };
|
|
168
|
+
await svc.prepare();
|
|
163
169
|
try {
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
//
|
|
169
|
-
//
|
|
170
|
-
//
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
//
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
170
|
+
const member = memberOnly ? await readAccess() : null;
|
|
171
|
+
if (memberOnly && !member?.member.email) throw new Error("Unauthenticated: sign in to see your events");
|
|
172
|
+
const confirmed = new Set(confirmedRsvpIds());
|
|
173
|
+
const identity = await identityLine();
|
|
174
|
+
// 1) Instant paint from the on-device cache (offline-safe; empty on first-ever run).
|
|
175
|
+
// Device-local candidates have no member ownership proof. Branded must
|
|
176
|
+
// verify them online rather than show a previous member's cached RSVP list.
|
|
177
|
+
const cached = memberOnly ? [] : await readCached();
|
|
178
|
+
const cachedEvents = cached.filter((event) => confirmed.has(event.id)).map(displayEventRow);
|
|
179
|
+
const base = cached.length
|
|
180
|
+
? derive({ ...clean, status: "ready", errored: false, events: cachedEvents, identityLine: identity, verificationUnavailable: cachedEvents.length > 0 })
|
|
181
|
+
: clean;
|
|
182
|
+
// 2) Revalidate from Wix and refresh the cache.
|
|
183
|
+
try {
|
|
184
|
+
const res = await queryEvents({ limit: 50 });
|
|
185
|
+
const all = ((res as unknown as { events?: WixEvent[] }).events ?? []).map(cachedEventRow);
|
|
186
|
+
if (member) await assertReadAccess(member);
|
|
187
|
+
if (version !== loadVersion) return undefined;
|
|
188
|
+
await writeCached(all);
|
|
189
|
+
// Phase 3c — make each row AUTHORITATIVE. The device list is only a candidate
|
|
190
|
+
// set: it never forgets, so an RSVP cancelled elsewhere (web, or by the
|
|
191
|
+
// business) would otherwise show here forever. Confirm each candidate against
|
|
192
|
+
// Wix and drop the ones the member no longer holds.
|
|
193
|
+
//
|
|
194
|
+
// Per-event by necessity, not by choice: a member CANNOT enumerate their own
|
|
195
|
+
// RSVPs. Verified live against a real member token — `queryRsvps` (cross-event)
|
|
196
|
+
// 403s "WIX_EVENTS.READ_RSVP permission required", `listOrders` 403s
|
|
197
|
+
// READ_ORDERS, and `/rsvps/current` 400s without an eventId. Only the
|
|
198
|
+
// single-event read is member-readable, so the fan-out below IS the ceiling
|
|
199
|
+
// until those member scopes exist server-side.
|
|
200
|
+
const candidates = all.filter((event) => confirmed.has(event.id)).map(displayEventRow);
|
|
201
|
+
const confirmation = await confirmRsvps(candidates, memberOnly);
|
|
202
|
+
if (member) await assertReadAccess(member);
|
|
203
|
+
if (version !== loadVersion) return undefined;
|
|
204
|
+
return derive({ ...base, status: "ready", errored: false, events: confirmation.events, identityLine: identity, verificationUnavailable: confirmation.verificationUnavailable });
|
|
205
|
+
} catch (error) {
|
|
206
|
+
if (memberOnly && readAccessDenied(error)) throw error;
|
|
207
|
+
if (member) await assertReadAccess(member);
|
|
208
|
+
if (version !== loadVersion) return undefined;
|
|
209
|
+
// Offline / fetch failure: keep the cached rows instead of a blank error state.
|
|
210
|
+
return cached.length
|
|
211
|
+
? base
|
|
212
|
+
: derive({ ...clean, status: "ready", errored: true, events: [], identityLine: identity });
|
|
213
|
+
}
|
|
214
|
+
} catch (error) {
|
|
215
|
+
const failure = memberOnly && !(await memberAccess()).email ? new Error("Unauthenticated: sign in to see your events") : error;
|
|
216
|
+
const flags = await readSignInFlags(failure);
|
|
217
|
+
return version === loadVersion ? derive({ ...clean, ...flags, status: "ready", errored: true, events: [] }) : undefined;
|
|
186
218
|
}
|
|
187
219
|
},
|
|
188
220
|
},
|
|
189
221
|
});
|
|
190
|
-
|
|
222
|
+
// Wait for the descriptor's load action to select member-only or device-local scope.
|
|
223
|
+
// An eager unconfigured read could briefly expose guest KV before Branded opts in.
|
|
224
|
+
svc.prepare();
|
|
191
225
|
export { svc };
|
|
@@ -15,7 +15,7 @@ import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
|
|
|
15
15
|
import { isBridgeUnavailable } from "../_shared/owner-load-error.js";
|
|
16
16
|
import { isProductSaved, toggleSavedProduct } from "../_shared/himi-store-saved.js";
|
|
17
17
|
import { openRichLink } from "../_shared/rich-content-link.js";
|
|
18
|
-
import {
|
|
18
|
+
import { descriptionBody } from "../_shared/rich-body.js";
|
|
19
19
|
|
|
20
20
|
// Offline-first (data-offline): the detail is a public READ-THROUGH — when the live
|
|
21
21
|
// product fetch fails (offline) fall back to the last-synced row the catalog cached
|
|
@@ -85,9 +85,7 @@ function productPolicyBody(product: StoreProduct, kind: "returns" | "shipping"):
|
|
|
85
85
|
});
|
|
86
86
|
if (!section) return "";
|
|
87
87
|
const html = "plainDescription" in section ? section.plainDescription : undefined;
|
|
88
|
-
|
|
89
|
-
if (typeof section.description === "string") return plainText(section.description.replace(/ /gi, " "));
|
|
90
|
-
return richBody(section.description).bodyText;
|
|
88
|
+
return descriptionBody(html || section.description).bodyText;
|
|
91
89
|
}
|
|
92
90
|
|
|
93
91
|
/** The product id `lastProduct` was read for. A pooled screen re-appearing calls
|
|
@@ -170,13 +168,12 @@ function optionsHint(groups: StoreOption[], selection: StoreOptionSelection): st
|
|
|
170
168
|
return copyTemplate("product.optionsChoose", "Choose {options}", { options: missing.join(", ") });
|
|
171
169
|
}
|
|
172
170
|
|
|
173
|
-
/**
|
|
174
|
-
*
|
|
175
|
-
* `description` is an HTML string: stripped text, no document. */
|
|
171
|
+
/** Catalog V3 returns Ricos objects or serialized documents; V1 returns HTML.
|
|
172
|
+
* Keep plainDescription as the independent fallback, never raw document JSON. */
|
|
176
173
|
function productBody(p: StoreProduct): { description: string; descriptionJson: string } {
|
|
177
174
|
const raw = (p as { description?: unknown }).description;
|
|
178
|
-
const html =
|
|
179
|
-
const { bodyJson, bodyText } =
|
|
175
|
+
const html = descriptionBody(p.plainDescription).bodyText;
|
|
176
|
+
const { bodyJson, bodyText } = descriptionBody(raw, html);
|
|
180
177
|
return { description: html || bodyText, descriptionJson: bodyJson };
|
|
181
178
|
}
|
|
182
179
|
|
|
@@ -37,7 +37,7 @@ export default defineApp({
|
|
|
37
37
|
actions: "http://localhost:8190/v1/actions",
|
|
38
38
|
sync: "http://localhost:8190/v1/sync",
|
|
39
39
|
},
|
|
40
|
-
capabilities: ["live_activity","push","share","secure_storage","open_url","local_database","clipboard","ui","speech","camera","photos","file_picker","files","presigned_upload","app_info","biometrics","wix_platform","
|
|
40
|
+
capabilities: ["live_activity","push","share","secure_storage","open_url","local_database","clipboard","ui","speech","camera","photos","file_picker","files","presigned_upload","app_info","biometrics","wix_platform","stream","wix_api"],
|
|
41
41
|
designTokensPath: "./tokens.json",
|
|
42
42
|
// Native fallback; the T5 splash descriptor owns the editable launch appearance.
|
|
43
43
|
splash: {
|
|
@@ -37,7 +37,7 @@ export default defineApp({
|
|
|
37
37
|
actions: "http://localhost:8190/v1/actions",
|
|
38
38
|
sync: "http://localhost:8190/v1/sync",
|
|
39
39
|
},
|
|
40
|
-
capabilities: ["
|
|
40
|
+
capabilities: ["push","share","secure_storage","open_url","calendar","local_database","wix_api","wix_platform","app_info","iap","release_control","clipboard","theme","wix_cashier"],
|
|
41
41
|
cache: {
|
|
42
42
|
"rules": [
|
|
43
43
|
{
|
|
@@ -81,6 +81,13 @@ export default defineApp({
|
|
|
81
81
|
"parentScreenId": "himi_account",
|
|
82
82
|
"tabId": "profile"
|
|
83
83
|
},
|
|
84
|
+
{
|
|
85
|
+
"screenId": "himi_business_contact",
|
|
86
|
+
"isPublic": true,
|
|
87
|
+
"paramKeys": [],
|
|
88
|
+
"parentScreenId": "himi_account",
|
|
89
|
+
"tabId": "profile"
|
|
90
|
+
},
|
|
84
91
|
{
|
|
85
92
|
"screenId": "himi_appearance",
|
|
86
93
|
"isPublic": true,
|
|
@@ -6231,6 +6231,219 @@ const SCREENS = runtimeSetting({
|
|
|
6231
6231
|
"bundleVersion": "0.0.1"
|
|
6232
6232
|
}
|
|
6233
6233
|
},
|
|
6234
|
+
"himi_business_contact": {
|
|
6235
|
+
"screenId": "himi_business_contact",
|
|
6236
|
+
"title": "Business contact",
|
|
6237
|
+
"renderer": "sdui_intent",
|
|
6238
|
+
"schemaVersion": 1,
|
|
6239
|
+
"cacheControl": {
|
|
6240
|
+
"maxAge": 0,
|
|
6241
|
+
"staleWhileRevalidate": 0
|
|
6242
|
+
},
|
|
6243
|
+
"payload": {
|
|
6244
|
+
"id": "himi_business_contact.root",
|
|
6245
|
+
"body": {
|
|
6246
|
+
"package": "himalaya",
|
|
6247
|
+
"type": "VStack",
|
|
6248
|
+
"props": {
|
|
6249
|
+
"spacing": 16,
|
|
6250
|
+
"alignment": "leading",
|
|
6251
|
+
"children": [
|
|
6252
|
+
{
|
|
6253
|
+
"id": "himi_business_contact.section",
|
|
6254
|
+
"body": {
|
|
6255
|
+
"package": "himalaya",
|
|
6256
|
+
"type": "VStack",
|
|
6257
|
+
"props": {
|
|
6258
|
+
"spacing": 12,
|
|
6259
|
+
"alignment": "leading",
|
|
6260
|
+
"children": [
|
|
6261
|
+
{
|
|
6262
|
+
"id": "himi_business_contact.section.directions_copy",
|
|
6263
|
+
"body": {
|
|
6264
|
+
"package": "himalaya",
|
|
6265
|
+
"type": "Text",
|
|
6266
|
+
"props": {
|
|
6267
|
+
"text": "Directions",
|
|
6268
|
+
"style": "body",
|
|
6269
|
+
"collapseWhenEmpty": true
|
|
6270
|
+
}
|
|
6271
|
+
},
|
|
6272
|
+
"modifiers": {
|
|
6273
|
+
"hidden": true
|
|
6274
|
+
}
|
|
6275
|
+
},
|
|
6276
|
+
{
|
|
6277
|
+
"id": "himi_business_contact.section.unavailable",
|
|
6278
|
+
"body": {
|
|
6279
|
+
"package": "himalaya",
|
|
6280
|
+
"type": "Text",
|
|
6281
|
+
"props": {
|
|
6282
|
+
"text": "Contact details unavailable",
|
|
6283
|
+
"style": "body",
|
|
6284
|
+
"collapseWhenEmpty": true
|
|
6285
|
+
}
|
|
6286
|
+
}
|
|
6287
|
+
},
|
|
6288
|
+
{
|
|
6289
|
+
"id": "himi_business_contact.section.member_count",
|
|
6290
|
+
"body": {
|
|
6291
|
+
"package": "himalaya",
|
|
6292
|
+
"type": "FragmentSlot",
|
|
6293
|
+
"props": {
|
|
6294
|
+
"casePath": "$service:businessContact.memberCountCase",
|
|
6295
|
+
"defaultCase": "unavailable",
|
|
6296
|
+
"cases": [
|
|
6297
|
+
{
|
|
6298
|
+
"id": "one",
|
|
6299
|
+
"content": {
|
|
6300
|
+
"id": "himi_business_contact.section.members_one",
|
|
6301
|
+
"body": {
|
|
6302
|
+
"package": "himalaya",
|
|
6303
|
+
"type": "HStack",
|
|
6304
|
+
"props": {
|
|
6305
|
+
"spacing": 4,
|
|
6306
|
+
"alignment": "center",
|
|
6307
|
+
"children": [
|
|
6308
|
+
{
|
|
6309
|
+
"id": "himi_business_contact.section.count_one",
|
|
6310
|
+
"body": {
|
|
6311
|
+
"package": "himalaya",
|
|
6312
|
+
"type": "Text",
|
|
6313
|
+
"props": {
|
|
6314
|
+
"text": "$service:businessContact.memberCount",
|
|
6315
|
+
"style": "footnote",
|
|
6316
|
+
"collapseWhenEmpty": true
|
|
6317
|
+
}
|
|
6318
|
+
}
|
|
6319
|
+
},
|
|
6320
|
+
{
|
|
6321
|
+
"id": "himi_business_contact.section.unit_one",
|
|
6322
|
+
"body": {
|
|
6323
|
+
"package": "himalaya",
|
|
6324
|
+
"type": "Text",
|
|
6325
|
+
"props": {
|
|
6326
|
+
"text": "member",
|
|
6327
|
+
"style": "footnote",
|
|
6328
|
+
"collapseWhenEmpty": true
|
|
6329
|
+
}
|
|
6330
|
+
}
|
|
6331
|
+
}
|
|
6332
|
+
]
|
|
6333
|
+
}
|
|
6334
|
+
}
|
|
6335
|
+
}
|
|
6336
|
+
},
|
|
6337
|
+
{
|
|
6338
|
+
"id": "other",
|
|
6339
|
+
"content": {
|
|
6340
|
+
"id": "himi_business_contact.section.members_other",
|
|
6341
|
+
"body": {
|
|
6342
|
+
"package": "himalaya",
|
|
6343
|
+
"type": "HStack",
|
|
6344
|
+
"props": {
|
|
6345
|
+
"spacing": 4,
|
|
6346
|
+
"alignment": "center",
|
|
6347
|
+
"children": [
|
|
6348
|
+
{
|
|
6349
|
+
"id": "himi_business_contact.section.count_other",
|
|
6350
|
+
"body": {
|
|
6351
|
+
"package": "himalaya",
|
|
6352
|
+
"type": "Text",
|
|
6353
|
+
"props": {
|
|
6354
|
+
"text": "$service:businessContact.memberCount",
|
|
6355
|
+
"style": "footnote",
|
|
6356
|
+
"collapseWhenEmpty": true
|
|
6357
|
+
}
|
|
6358
|
+
}
|
|
6359
|
+
},
|
|
6360
|
+
{
|
|
6361
|
+
"id": "himi_business_contact.section.unit_other",
|
|
6362
|
+
"body": {
|
|
6363
|
+
"package": "himalaya",
|
|
6364
|
+
"type": "Text",
|
|
6365
|
+
"props": {
|
|
6366
|
+
"text": "members",
|
|
6367
|
+
"style": "footnote",
|
|
6368
|
+
"collapseWhenEmpty": true
|
|
6369
|
+
}
|
|
6370
|
+
}
|
|
6371
|
+
}
|
|
6372
|
+
]
|
|
6373
|
+
}
|
|
6374
|
+
}
|
|
6375
|
+
}
|
|
6376
|
+
},
|
|
6377
|
+
{
|
|
6378
|
+
"id": "unavailable",
|
|
6379
|
+
"content": {
|
|
6380
|
+
"id": "himi_business_contact.section.members_unavailable",
|
|
6381
|
+
"body": {
|
|
6382
|
+
"package": "himalaya",
|
|
6383
|
+
"type": "Text",
|
|
6384
|
+
"props": {
|
|
6385
|
+
"text": "Member count unavailable",
|
|
6386
|
+
"style": "footnote",
|
|
6387
|
+
"collapseWhenEmpty": true
|
|
6388
|
+
}
|
|
6389
|
+
}
|
|
6390
|
+
}
|
|
6391
|
+
}
|
|
6392
|
+
]
|
|
6393
|
+
}
|
|
6394
|
+
},
|
|
6395
|
+
"modifiers": {
|
|
6396
|
+
"hidden": true
|
|
6397
|
+
}
|
|
6398
|
+
},
|
|
6399
|
+
{
|
|
6400
|
+
"id": "himi_business_contact.section.feedback",
|
|
6401
|
+
"body": {
|
|
6402
|
+
"package": "himalaya",
|
|
6403
|
+
"type": "Text",
|
|
6404
|
+
"props": {
|
|
6405
|
+
"text": "$service:businessContact.message",
|
|
6406
|
+
"style": "footnote",
|
|
6407
|
+
"collapseWhenEmpty": true
|
|
6408
|
+
}
|
|
6409
|
+
}
|
|
6410
|
+
}
|
|
6411
|
+
]
|
|
6412
|
+
}
|
|
6413
|
+
}
|
|
6414
|
+
}
|
|
6415
|
+
]
|
|
6416
|
+
}
|
|
6417
|
+
},
|
|
6418
|
+
"modifiers": {
|
|
6419
|
+
"background": {
|
|
6420
|
+
"token": "surfacePrimary"
|
|
6421
|
+
},
|
|
6422
|
+
"padding": {
|
|
6423
|
+
"leading": 20,
|
|
6424
|
+
"trailing": 20,
|
|
6425
|
+
"top": 18,
|
|
6426
|
+
"bottom": 28
|
|
6427
|
+
},
|
|
6428
|
+
"onAppear": {
|
|
6429
|
+
"actionId": "tier5.businessContact.load",
|
|
6430
|
+
"args": {
|
|
6431
|
+
"showMemberCount": false
|
|
6432
|
+
}
|
|
6433
|
+
}
|
|
6434
|
+
}
|
|
6435
|
+
},
|
|
6436
|
+
"logicBundle": {
|
|
6437
|
+
"url": "http://localhost:8190/v1/bundles/business-contact?integrity=",
|
|
6438
|
+
"integrity": "",
|
|
6439
|
+
"contentType": "application/javascript+ts-bundle",
|
|
6440
|
+
"declaredCapabilities": [
|
|
6441
|
+
"open_url"
|
|
6442
|
+
],
|
|
6443
|
+
"minBinaryVersion": "0.1.0",
|
|
6444
|
+
"bundleVersion": "0.0.1"
|
|
6445
|
+
}
|
|
6446
|
+
},
|
|
6234
6447
|
"himi_appearance": {
|
|
6235
6448
|
"screenId": "himi_appearance",
|
|
6236
6449
|
"renderer": "sdui_intent",
|
|
@@ -15628,6 +15841,9 @@ const SCREENS = runtimeSetting({
|
|
|
15628
15841
|
"style": "body",
|
|
15629
15842
|
"color": "textSecondary"
|
|
15630
15843
|
}
|
|
15844
|
+
},
|
|
15845
|
+
"modifiers": {
|
|
15846
|
+
"hiddenPath": "$service:himiMyEvents.signInRequired"
|
|
15631
15847
|
}
|
|
15632
15848
|
},
|
|
15633
15849
|
{
|
|
@@ -15642,6 +15858,32 @@ const SCREENS = runtimeSetting({
|
|
|
15642
15858
|
"actionId": "tier5.himiMyEvents.load"
|
|
15643
15859
|
}
|
|
15644
15860
|
}
|
|
15861
|
+
},
|
|
15862
|
+
"modifiers": {
|
|
15863
|
+
"hiddenPath": "$service:himiMyEvents.signInRequired"
|
|
15864
|
+
}
|
|
15865
|
+
},
|
|
15866
|
+
{
|
|
15867
|
+
"id": "himi_my_events.retry.sign_in",
|
|
15868
|
+
"body": {
|
|
15869
|
+
"package": "himalaya",
|
|
15870
|
+
"type": "Button",
|
|
15871
|
+
"props": {
|
|
15872
|
+
"title": "Sign in",
|
|
15873
|
+
"style": "primary",
|
|
15874
|
+
"action": {
|
|
15875
|
+
"actionId": "himi.open",
|
|
15876
|
+
"params": {
|
|
15877
|
+
"screenId": "himi_sign_in",
|
|
15878
|
+
"mode": "signin",
|
|
15879
|
+
"modal": "1"
|
|
15880
|
+
},
|
|
15881
|
+
"presentation": "sheet"
|
|
15882
|
+
}
|
|
15883
|
+
}
|
|
15884
|
+
},
|
|
15885
|
+
"modifiers": {
|
|
15886
|
+
"hiddenPath": "$service:himiMyEvents.noSignIn"
|
|
15645
15887
|
}
|
|
15646
15888
|
}
|
|
15647
15889
|
]
|
|
@@ -16072,7 +16314,11 @@ const SCREENS = runtimeSetting({
|
|
|
16072
16314
|
"bottom": 24
|
|
16073
16315
|
},
|
|
16074
16316
|
"onAppear": {
|
|
16075
|
-
"actionId": "tier5.himiMyEvents.load"
|
|
16317
|
+
"actionId": "tier5.himiMyEvents.load",
|
|
16318
|
+
"params": {
|
|
16319
|
+
"signInScreenId": "himi_sign_in",
|
|
16320
|
+
"memberOnly": "1"
|
|
16321
|
+
}
|
|
16076
16322
|
}
|
|
16077
16323
|
}
|
|
16078
16324
|
},
|
|
@@ -25279,6 +25525,9 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
25279
25525
|
"style": "body",
|
|
25280
25526
|
"color": "textSecondary"
|
|
25281
25527
|
}
|
|
25528
|
+
},
|
|
25529
|
+
"modifiers": {
|
|
25530
|
+
"hiddenPath": "$service:himiBlogPost.signInRequired"
|
|
25282
25531
|
}
|
|
25283
25532
|
},
|
|
25284
25533
|
{
|
|
@@ -25293,6 +25542,32 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
25293
25542
|
"actionId": "tier5.himiBlogPost.retry"
|
|
25294
25543
|
}
|
|
25295
25544
|
}
|
|
25545
|
+
},
|
|
25546
|
+
"modifiers": {
|
|
25547
|
+
"hiddenPath": "$service:himiBlogPost.signInRequired"
|
|
25548
|
+
}
|
|
25549
|
+
},
|
|
25550
|
+
{
|
|
25551
|
+
"id": "himi_blog_post.retry.sign_in",
|
|
25552
|
+
"body": {
|
|
25553
|
+
"package": "himalaya",
|
|
25554
|
+
"type": "Button",
|
|
25555
|
+
"props": {
|
|
25556
|
+
"title": "Sign in",
|
|
25557
|
+
"style": "primary",
|
|
25558
|
+
"action": {
|
|
25559
|
+
"actionId": "himi.open",
|
|
25560
|
+
"params": {
|
|
25561
|
+
"screenId": "himi_sign_in",
|
|
25562
|
+
"mode": "signin",
|
|
25563
|
+
"modal": "1"
|
|
25564
|
+
},
|
|
25565
|
+
"presentation": "sheet"
|
|
25566
|
+
}
|
|
25567
|
+
}
|
|
25568
|
+
},
|
|
25569
|
+
"modifiers": {
|
|
25570
|
+
"hiddenPath": "$service:himiBlogPost.noSignIn"
|
|
25296
25571
|
}
|
|
25297
25572
|
}
|
|
25298
25573
|
]
|
|
@@ -25997,7 +26272,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
25997
26272
|
"onAppear": {
|
|
25998
26273
|
"actionId": "tier5.himiBlogPost.load",
|
|
25999
26274
|
"params": {
|
|
26000
|
-
"id": "__HIMI_ID__"
|
|
26275
|
+
"id": "__HIMI_ID__",
|
|
26276
|
+
"signInScreenId": "himi_sign_in"
|
|
26001
26277
|
}
|
|
26002
26278
|
}
|
|
26003
26279
|
}
|