@wix/himalaya-cli 0.1616.0 → 0.1618.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 +15 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +28 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/index.d.ts +2 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/one-app-section.d.ts +39 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/one-app-visibility.d.ts +22 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +151 -24
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +8 -0
- package/dist/cli.mjs +1042 -389
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/component-reference.json +10 -1
- package/guides/component-reference.md +25 -2
- package/guides/designing-himi-screens.md +3 -1
- package/guides/hhp.md +3 -1
- package/guides/himi-json-output.md +11 -1
- package/guides/index.json +1 -1
- package/guides/one-app-section-mappings.md +32 -0
- package/guides/one-app-to-himi-app.md +133 -9
- package/guides/tier-5-add-a-screen.md +1 -1
- package/package.json +2 -2
- package/templates/beauty-salon/dev/index.ts +37 -18
- package/templates/beauty-salon/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/beauty-salon/tier5-src/himi-booking-service/index.ts +8 -3
- package/templates/beauty-salon/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
- package/templates/beauty-salon/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
- package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +8 -2
- package/templates/branded-lite/dev/index.ts +95 -47
- package/templates/branded-lite/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/branded-lite/tier5-src/himi-booking-service/index.ts +8 -3
- package/templates/branded-lite/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
- package/templates/branded-lite/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
- package/templates/branded-lite/tier5-src/himi-branded-lite-program/index.ts +7 -2
- package/templates/branded-lite/tier5-src/himi-store-account/index.ts +8 -2
- package/templates/community-club/dev/index.ts +27 -13
- package/templates/community-club/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/community-club/tier5-src/himi-store-account/index.ts +8 -2
- package/templates/events-meetups/dev/index.ts +25 -12
- package/templates/events-meetups/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/events-meetups/tier5-src/himi-store-account/index.ts +8 -2
- package/templates/gym-fitness/dev/index.ts +41 -20
- package/templates/gym-fitness/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/gym-fitness/tier5-src/himi-booking-service/index.ts +8 -3
- package/templates/gym-fitness/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
- package/templates/gym-fitness/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
- package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +8 -2
- package/templates/nonprofit-cause/dev/index.ts +31 -15
- package/templates/nonprofit-cause/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
- package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +8 -2
- package/templates/podcast-creator/dev/index.ts +29 -14
- package/templates/podcast-creator/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/podcast-creator/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
- package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +8 -2
- package/templates/portfolio-creative/dev/index.ts +31 -15
- package/templates/portfolio-creative/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +8 -2
- package/templates/restaurant/dev/index.ts +27 -13
- package/templates/restaurant/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/restaurant/tier5-src/himi-store-account/index.ts +8 -2
- package/templates/retail-store/dev/index.ts +25 -12
- package/templates/retail-store/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/retail-store/tier5-src/himi-store-account/index.ts +8 -2
- package/templates/salon-spa/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/salon-spa/tier5-src/himi-booking-service/index.ts +8 -3
- package/templates/salon-spa/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
- package/templates/salon-spa/tier5-src/himi-store-account/index.ts +8 -2
- package/templates/yoga-studio/dev/index.ts +37 -18
- package/templates/yoga-studio/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/yoga-studio/tier5-src/himi-booking-service/index.ts +8 -3
- package/templates/yoga-studio/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
- package/templates/yoga-studio/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
- package/templates/yoga-studio/tier5-src/himi-branded-lite-program/index.ts +7 -2
- package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +8 -2
|
@@ -13,6 +13,7 @@ import { defineService, navigate } from "@himalaya/state";
|
|
|
13
13
|
import { listMyPlanOrders, type WixPlanOrder } from "@himalaya/wix-pricing-plans";
|
|
14
14
|
import { fetchMemberBookings, type MemberBookingRow } from "../_shared/member-bookings.js";
|
|
15
15
|
import { memberAccess, assertMemberAccess, memberAccessDenied, type MemberAccess } from "../_shared/member-access.js";
|
|
16
|
+
import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
|
|
16
17
|
import { hostSiteFromInput } from "../_shared/branded-lite-hosted.js";
|
|
17
18
|
import { formatDateMedium } from "../_shared/engine-intl.js";
|
|
18
19
|
import { copyParam, copyTemplate, stashCopy } from "../_shared/himi-copy.js";
|
|
@@ -53,6 +54,7 @@ const SIGN_IN_SCREEN = "himi_sign_in";
|
|
|
53
54
|
|
|
54
55
|
let stashedVerticals: string[] | null = null;
|
|
55
56
|
let signInPresentation: "sheet" | "full_screen" | undefined;
|
|
57
|
+
let signInStyle: "page" | "" = "";
|
|
56
58
|
let generation = 0;
|
|
57
59
|
|
|
58
60
|
function appearVerticals(arg: unknown): string[] {
|
|
@@ -192,7 +194,10 @@ async function read(arg: unknown, again = true): Promise<PlaceSummaryState> {
|
|
|
192
194
|
async function load(_s: PlaceSummaryState, arg?: unknown): Promise<PlaceSummaryState | undefined> {
|
|
193
195
|
stashCopy(arg);
|
|
194
196
|
const presentation = arg && typeof arg === "object" ? (arg as Record<string, unknown>).signInPresentation : undefined;
|
|
195
|
-
if (presentation === "sheet" || presentation === "full_screen")
|
|
197
|
+
if (presentation === "sheet" || presentation === "full_screen") {
|
|
198
|
+
signInPresentation = presentation;
|
|
199
|
+
signInStyle = signInPageStyle((arg as Record<string, unknown>).signInSheetStyle);
|
|
200
|
+
}
|
|
196
201
|
const mine = ++generation;
|
|
197
202
|
const next = await read(arg);
|
|
198
203
|
return mine === generation ? next : undefined;
|
|
@@ -211,7 +216,7 @@ const svc = defineService<PlaceSummaryState, {
|
|
|
211
216
|
if (s.hideCta || !s.ctaScreenId) return s;
|
|
212
217
|
// No return path: the tile is embedded, so the form closes over its host.
|
|
213
218
|
return navigate(s, s.ctaScreenId === SIGN_IN_SCREEN && signInPresentation
|
|
214
|
-
? { screenId: SIGN_IN_SCREEN, presentation: signInPresentation, args: { mode: "signin", modal: "1" } }
|
|
219
|
+
? { screenId: SIGN_IN_SCREEN, presentation: signInPresentation, args: { mode: "signin", modal: "1", ...signInSheetStyle(signInPresentation, signInStyle) } }
|
|
215
220
|
: { screenId: s.ctaScreenId, args: { mode: s.ctaMode } });
|
|
216
221
|
},
|
|
217
222
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { paymentSetupMessage } from "../_shared/payment-setup.js";
|
|
2
2
|
import { dispatch } from "@himalaya/dispatch";
|
|
3
3
|
import { memberAccess, assertMemberAccess } from "../_shared/member-access.js";
|
|
4
|
+
import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
|
|
4
5
|
import { offlineWriteMessage, withOnlineWrites } from "../_shared/online-actions.js";
|
|
5
6
|
// Tier-5 bundle: himi-branded-lite — single online-program detail (design §3.5
|
|
6
7
|
// `programs` vertical, screen full-potential pass).
|
|
@@ -292,6 +293,7 @@ let enrollmentInFlight = false;
|
|
|
292
293
|
// Presentation dedupe only. The host remains the sole authority to resume a join.
|
|
293
294
|
let openedAuthToken = "";
|
|
294
295
|
let signInPresentation: "sheet" | "full_screen" = "sheet";
|
|
296
|
+
let signInStyle: "page" | "" = "";
|
|
295
297
|
const continuationTarget = (id: string) => `program_enrol:${id}`;
|
|
296
298
|
|
|
297
299
|
async function continuation(operation: "begin" | "check" | "consume" | "cancel", id: string, token = "") {
|
|
@@ -309,7 +311,10 @@ const programReference = () => onlineProgramItem({ id: inputId() })?.reference;
|
|
|
309
311
|
async function load(state: State, arg?: unknown): Promise<undefined> {
|
|
310
312
|
stashCopy(arg);
|
|
311
313
|
const presentation = (arg as { signInPresentation?: unknown } | undefined)?.signInPresentation;
|
|
312
|
-
if (presentation === "sheet" || presentation === "full_screen")
|
|
314
|
+
if (presentation === "sheet" || presentation === "full_screen") {
|
|
315
|
+
signInPresentation = presentation;
|
|
316
|
+
signInStyle = signInPageStyle((arg as { signInSheetStyle?: unknown }).signInSheetStyle);
|
|
317
|
+
}
|
|
313
318
|
const id = inputId();
|
|
314
319
|
const seq = ++loadSeq;
|
|
315
320
|
const [found, locale] = await Promise.all([
|
|
@@ -386,7 +391,7 @@ async function enroll(afterAuthAccount = ""): Promise<undefined> {
|
|
|
386
391
|
openedAuthToken = request.token;
|
|
387
392
|
actionMessage = "";
|
|
388
393
|
try {
|
|
389
|
-
await dispatch("himi.open", { screenId: "himi_sign_in", mode: "signin", presentation: signInPresentation, modal: "1", authContinuation: request.token });
|
|
394
|
+
await dispatch("himi.open", { screenId: "himi_sign_in", mode: "signin", presentation: signInPresentation, modal: "1", ...signInSheetStyle(signInPresentation, signInStyle), authContinuation: request.token });
|
|
390
395
|
} catch (error) {
|
|
391
396
|
openedAuthToken = "";
|
|
392
397
|
await continuation("cancel", id, request.token);
|
|
@@ -14,6 +14,7 @@ import { dispatch } from "@himalaya/dispatch";
|
|
|
14
14
|
import { getCurrentCart, searchOrders, type WixOrder } from "@himalaya/wix-ecom";
|
|
15
15
|
import { guestProfile, loadMemberProfile, signedInEmail, strOf, fmtDate, titleCase, type AccountActivityRow } from "../_shared/himi-account";
|
|
16
16
|
import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
|
|
17
|
+
import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
|
|
17
18
|
import { memberAccountRoutes } from "../_shared/member-account-routes.js";
|
|
18
19
|
import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesAppleSalesEnabled, storesProductOrders } from "@himalaya/iap-checkout";
|
|
19
20
|
import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
|
|
@@ -143,7 +144,7 @@ function openSignIn(next: S, args: Record<string, string>, after: { screenId: st
|
|
|
143
144
|
if (after.args?.channelId) back.returnChannelId = after.args.channelId;
|
|
144
145
|
}
|
|
145
146
|
if (!presentation) return navigate(next, { screenId, args: { ...args, ...back } });
|
|
146
|
-
const modalArgs: Record<string, string> = { ...args, modal: "1" };
|
|
147
|
+
const modalArgs: Record<string, string> = { ...args, modal: "1", ...signInSheetStyle(presentation, signInStyleRequested) };
|
|
147
148
|
// With no tab to open it on, a modal has no way to the member screen: it only closes.
|
|
148
149
|
if (after && signInReturnTabRequested) Object.assign(modalArgs, back, { returnTab: signInReturnTabRequested });
|
|
149
150
|
return navigate(next, { screenId, presentation, args: modalArgs });
|
|
@@ -231,6 +232,8 @@ let appliedSeq = 0;
|
|
|
231
232
|
let signInScreenRequested = "";
|
|
232
233
|
/** Account only: how it opens the standalone sign-in screen ("" = push). */
|
|
233
234
|
let signInPresentationRequested: "" | "sheet" | "full_screen" = "";
|
|
235
|
+
/** Account only: `signInSheetStyle`, "page" when the app opens that sheet as a full page. */
|
|
236
|
+
let signInStyleRequested: "page" | "" = "";
|
|
234
237
|
/** Account only: its tab, where a member screen opens after a modal sign-in. */
|
|
235
238
|
let signInReturnTabRequested = "";
|
|
236
239
|
let standaloneRequested = false;
|
|
@@ -268,7 +271,10 @@ function appearConfig(s: S, arg: unknown): AppearConfig {
|
|
|
268
271
|
}
|
|
269
272
|
signInScreenRequested ||= strField(arg, "signInScreen") || s.signInScreen;
|
|
270
273
|
const presentation = strField(arg, "signInPresentation");
|
|
271
|
-
if (presentation === "sheet" || presentation === "full_screen")
|
|
274
|
+
if (presentation === "sheet" || presentation === "full_screen") {
|
|
275
|
+
signInPresentationRequested = presentation;
|
|
276
|
+
signInStyleRequested = signInPageStyle(strField(arg, "signInSheetStyle"));
|
|
277
|
+
}
|
|
272
278
|
signInReturnTabRequested ||= strField(arg, "signInReturnTab");
|
|
273
279
|
// Only the sign-in screen's route carries `mode`, so it marks the form from the boot load on.
|
|
274
280
|
standaloneRequested ||= s.standalone || appearing || (!routeInputConsumed && !!routeInput().mode);
|