@wix/himalaya-cli 0.1557.0 → 0.1559.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/ts/src/schema.d.ts +6 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/media/src/index.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/online-programs/src/index.d.ts +14 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-events.mjs +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-media.mjs +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-online-programs.mjs +35 -7
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-rich-content.mjs +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-stores-collections.mjs +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-stores.mjs +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-video.mjs +1 -0
- package/dist/cli.mjs +164 -61
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/getting-started.md +4 -1
- package/guides/himi-json-output.md +8 -0
- package/guides/himi-skill.md +4 -1
- package/guides/one-app-to-himi-app.md +18 -6
- package/guides/sdk-reference.json +8 -8
- package/guides/skill.md +4 -1
- package/guides/splash-screens.md +22 -1
- package/package.json +2 -2
- package/templates/beauty-salon/tier5-src/_shared/himi-media.ts +29 -0
- package/templates/beauty-salon/tier5-src/himi-branded-lite-home/index.ts +3 -4
- package/templates/branded-lite/tier5-src/_shared/himi-media.ts +29 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-group/index.ts +3 -6
- package/templates/branded-lite/tier5-src/himi-branded-lite-groups/index.ts +2 -15
- package/templates/branded-lite/tier5-src/himi-branded-lite-home/index.ts +3 -4
- package/templates/branded-lite/tier5-src/himi-branded-lite-program/index.ts +21 -20
- package/templates/branded-lite/tier5-src/himi-branded-lite-programs/index.ts +1 -9
- package/templates/community-club/tier5-src/_shared/himi-media.ts +29 -0
- package/templates/community-club/tier5-src/himi-branded-lite-group/index.ts +3 -6
- package/templates/community-club/tier5-src/himi-branded-lite-groups/index.ts +2 -15
- package/templates/community-club/tier5-src/himi-branded-lite-home/index.ts +3 -4
- package/templates/events-meetups/tier5-src/_shared/himi-media.ts +29 -0
- package/templates/events-meetups/tier5-src/himi-branded-lite-group/index.ts +3 -6
- package/templates/events-meetups/tier5-src/himi-branded-lite-groups/index.ts +2 -15
- package/templates/events-meetups/tier5-src/himi-branded-lite-home/index.ts +3 -4
- package/templates/gym-fitness/tier5-src/_shared/himi-media.ts +29 -0
- package/templates/gym-fitness/tier5-src/himi-branded-lite-home/index.ts +3 -4
- package/templates/nonprofit-cause/tier5-src/_shared/himi-media.ts +29 -0
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-group/index.ts +3 -6
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-groups/index.ts +2 -15
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-home/index.ts +3 -4
- package/templates/podcast-creator/tier5-src/_shared/himi-media.ts +29 -0
- package/templates/podcast-creator/tier5-src/himi-branded-lite-home/index.ts +3 -4
- package/templates/portfolio-creative/tier5-src/_shared/himi-media.ts +29 -0
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-home/index.ts +3 -4
- package/templates/restaurant/tier5-src/_shared/himi-media.ts +29 -0
- package/templates/restaurant/tier5-src/himi-branded-lite-home/index.ts +3 -4
- package/templates/retail-store/tier5-src/_shared/himi-media.ts +29 -0
- package/templates/retail-store/tier5-src/himi-branded-lite-home/index.ts +3 -4
- package/templates/yoga-studio/tier5-src/_shared/himi-media.ts +29 -0
- package/templates/yoga-studio/tier5-src/himi-branded-lite-home/index.ts +3 -4
- package/templates/yoga-studio/tier5-src/himi-branded-lite-program/index.ts +21 -20
- package/templates/yoga-studio/tier5-src/himi-branded-lite-programs/index.ts +1 -9
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts
CHANGED
|
@@ -3211,12 +3211,14 @@ export interface SplashConfig {
|
|
|
3211
3211
|
/** Hard ceiling on the readiness hold, ms — a stuck boot can never wedge the
|
|
3212
3212
|
* UI. 0 / absent ⇒ 3000. Clamped client-side to [0, 8000]. */
|
|
3213
3213
|
maxHoldMs?: number;
|
|
3214
|
-
/** RFC 0062 — what readiness waits for beyond the seed. Absent / "" ⇒
|
|
3215
|
-
*
|
|
3216
|
-
*
|
|
3214
|
+
/** RFC 0062 — what readiness waits for beyond the seed. Absent / "" ⇒ the first
|
|
3215
|
+
* screen's paint, where the shell mounts its content under the splash (every shell
|
|
3216
|
+
* built on `HimalayaLaunchGate` / `awaitingFirstScreen`), else the seed alone.
|
|
3217
|
+
* "seeded" ⇒ the seed alone, always. "first_content" ⇒ the first WebView page (a
|
|
3218
|
+
* site shell). All still under `maxHoldMs`. Unknown coalesces to "" on device. */
|
|
3217
3219
|
readySignal?: SplashReadySignal;
|
|
3218
3220
|
}
|
|
3219
|
-
export type SplashReadySignal = "" | "first_content";
|
|
3221
|
+
export type SplashReadySignal = "" | "seeded" | "first_content";
|
|
3220
3222
|
export interface DeepLinkPattern {
|
|
3221
3223
|
/** e.g. "wix-owner://blog/post/:id" */
|
|
3222
3224
|
pattern: string;
|
|
@@ -20,7 +20,7 @@ export declare const WIX_DETAIL_IMAGE: WixImageSize;
|
|
|
20
20
|
* measured at 2.4MB versus 220KB for the same 1000px render. JPEG at q85 is ~18x
|
|
21
21
|
* smaller than the original across the amit1 catalog (50.5MB -> 2.7MB).
|
|
22
22
|
*
|
|
23
|
-
* Wix image handles and bare media ids are resolved before sizing. Existing `fit`
|
|
23
|
+
* Wix image handles, relative `media/<id>` paths and bare media ids are resolved before sizing. Existing `fit`
|
|
24
24
|
* and `fill` transforms are rebuilt inside the requested pixel budget — scaled to
|
|
25
25
|
* the transform's OWN aspect ratio, never upscaled — while their framing
|
|
26
26
|
* parameters remain intact. Other transform modes and non-Wix HTTP(S) URLs stay
|
|
@@ -164,7 +164,7 @@ export declare function queryParticipants(programId: string, opts?: {
|
|
|
164
164
|
limit?: number;
|
|
165
165
|
}, readOptions?: WixCallOptions): Promise<WixQueryParticipantsResponse>;
|
|
166
166
|
/** Participant lifecycle state. */
|
|
167
|
-
export type WixParticipantState = "JOINED" | "PAYMENT_PENDING" | "APPROVAL_PENDING" | "COMPLETED" | "INVITED" | "REMOVED" | string;
|
|
167
|
+
export type WixParticipantState = "JOINED" | "PAYMENT_PENDING" | "ENROLLMENT_PENDING" | "APPROVAL_PENDING" | "COMPLETED" | "INVITED" | "REMOVED" | string;
|
|
168
168
|
export interface WixParticipantPaymentPending {
|
|
169
169
|
/** The payable handle for the cashier rail, when the program charges. */
|
|
170
170
|
purchaseFlowId?: string;
|
|
@@ -172,7 +172,7 @@ export interface WixParticipantPaymentPending {
|
|
|
172
172
|
snapshotId?: string;
|
|
173
173
|
}
|
|
174
174
|
/**
|
|
175
|
-
* The
|
|
175
|
+
* The compatibility result joinProgram returns — a DIFFERENT entity from the roster
|
|
176
176
|
* `WixParticipant` above, which is why it gets its own name. This one describes the join
|
|
177
177
|
* outcome (`state`, `paymentPendingOptions`); the roster one describes who the member is
|
|
178
178
|
* and how far they have got (`member`, `progress`, `enrollmentStatus`).
|
|
@@ -195,7 +195,16 @@ export interface WixJoinedParticipant {
|
|
|
195
195
|
export interface WixJoinProgramResponse {
|
|
196
196
|
participant?: WixJoinedParticipant;
|
|
197
197
|
}
|
|
198
|
-
/**
|
|
199
|
-
|
|
200
|
-
|
|
198
|
+
/**
|
|
199
|
+
* Join as the signed-in member through Join Applications. Read the current
|
|
200
|
+
* application first so an existing application is resumed without another create.
|
|
201
|
+
* Approved paid applications prepare
|
|
202
|
+
* SINGLE_PAYMENT and return the Wix Payments order as paymentPendingOptions.orderId.
|
|
203
|
+
* mayPreparePayment rechecks the caller's checkout guard before creating that order.
|
|
204
|
+
* @scope member
|
|
205
|
+
*/
|
|
206
|
+
export declare function joinProgram(programId: string, options?: {
|
|
207
|
+
mayPreparePayment?: () => boolean;
|
|
208
|
+
}): Promise<WixJoinProgramResponse>;
|
|
209
|
+
/** The cashier handle to settle, or "" when no payable order is available. */
|
|
201
210
|
export declare function payableIdOf(participant?: WixJoinedParticipant): string;
|
|
@@ -7976,7 +7976,7 @@ function validateSiteNav(site) {
|
|
|
7976
7976
|
var SPLASH_MIN_VISIBLE_MS_MAX = 2e3;
|
|
7977
7977
|
var SPLASH_MAX_HOLD_MS_MAX = 8e3;
|
|
7978
7978
|
var SPLASH_LAYOUTS = ["centered", "centeredStacked", "logoOnly"];
|
|
7979
|
-
var SPLASH_READY_SIGNALS = ["", "first_content"];
|
|
7979
|
+
var SPLASH_READY_SIGNALS = ["", "seeded", "first_content"];
|
|
7980
7980
|
function validateA11y(a11y) {
|
|
7981
7981
|
if (!a11y || typeof a11y !== "object" || Array.isArray(a11y)) {
|
|
7982
7982
|
throw new Error('defineApp: a11y must be an object like { enforce: "warn" }.');
|
|
@@ -8112,7 +8112,7 @@ function validateSplash(splash, colors, tokensPath) {
|
|
|
8112
8112
|
}
|
|
8113
8113
|
if (splash.readySignal !== void 0 && !SPLASH_READY_SIGNALS.includes(splash.readySignal)) {
|
|
8114
8114
|
throw new Error(
|
|
8115
|
-
`defineApp: splash.readySignal "${splash.readySignal}" is not one of "", "first_content".`
|
|
8115
|
+
`defineApp: splash.readySignal "${splash.readySignal}" is not one of "", "seeded", "first_content".`
|
|
8116
8116
|
);
|
|
8117
8117
|
}
|
|
8118
8118
|
for (const [field, value, max] of [
|
|
@@ -12,6 +12,7 @@ function wixMediaId(reference) {
|
|
|
12
12
|
return WIX_IMAGE.exec(reference)?.[1] ?? (reference.includes("/") || reference.includes(":") ? "" : reference);
|
|
13
13
|
}
|
|
14
14
|
function resolveWixMediaReference(reference) {
|
|
15
|
+
if (/^\/?media\/[^/]/.test(reference)) return `https://static.wixstatic.com/${reference.replace(/^\//, "")}`;
|
|
15
16
|
const mediaId = wixMediaId(reference);
|
|
16
17
|
return mediaId ? `https://static.wixstatic.com/media/${mediaId}` : reference;
|
|
17
18
|
}
|
|
@@ -13,6 +13,7 @@ function wixMediaId(reference) {
|
|
|
13
13
|
return WIX_IMAGE.exec(reference)?.[1] ?? (reference.includes("/") || reference.includes(":") ? "" : reference);
|
|
14
14
|
}
|
|
15
15
|
function resolveWixMediaReference(reference) {
|
|
16
|
+
if (/^\/?media\/[^/]/.test(reference)) return `https://static.wixstatic.com/${reference.replace(/^\//, "")}`;
|
|
16
17
|
const mediaId = wixMediaId(reference);
|
|
17
18
|
return mediaId ? `https://static.wixstatic.com/media/${mediaId}` : reference;
|
|
18
19
|
}
|
|
@@ -29,13 +29,41 @@ function queryParticipants(programId, opts, readOptions) {
|
|
|
29
29
|
};
|
|
30
30
|
return wixCall("POST", "/online-programs/v3/participants/query", { query, fields: ["PROGRESS"] }, readOptions);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
function joinProgramError(code, message) {
|
|
33
|
+
return Object.assign(new Error(`joinProgram: ${message}`), { code });
|
|
34
|
+
}
|
|
35
|
+
var JOIN_APPLICATIONS = "/online-programs/participants/v3/join-applications";
|
|
36
|
+
async function joinProgram(programId, options) {
|
|
37
|
+
if (!programId) throw joinProgramError("program_id_required", "programId is required");
|
|
38
|
+
let response;
|
|
39
|
+
let currentReadSucceeded = false;
|
|
40
|
+
try {
|
|
41
|
+
response = await wixCall("GET", `${JOIN_APPLICATIONS}/current/${encodeURIComponent(programId)}`);
|
|
42
|
+
currentReadSucceeded = true;
|
|
43
|
+
} catch {
|
|
44
|
+
}
|
|
45
|
+
if (!currentReadSucceeded) {
|
|
46
|
+
response = await wixCall("POST", JOIN_APPLICATIONS, { joinApplication: { programId } });
|
|
47
|
+
}
|
|
48
|
+
let application = response?.joinApplication;
|
|
49
|
+
if (!application?.id || application.programId !== programId) throw joinProgramError("invalid_join_application", "invalid join application");
|
|
50
|
+
if (application.status === "APPROVED" && ["PAYMENT_PENDING", "PAYMENT_FAILED", "PAYMENT_CANCELED"].includes(application.paymentStatus ?? "")) {
|
|
51
|
+
if (options?.mayPreparePayment && !options.mayPreparePayment()) throw joinProgramError("payment_preparation_withdrawn", "payment preparation withdrawn");
|
|
52
|
+
const prepared = await wixCall("POST", `${JOIN_APPLICATIONS}/${encodeURIComponent(application.id)}/prepare-payment`, { paymentType: "SINGLE_PAYMENT" });
|
|
53
|
+
if (prepared?.joinApplication?.id !== application.id || prepared.joinApplication.programId !== programId) throw joinProgramError("invalid_prepared_application", "invalid prepared application");
|
|
54
|
+
application = prepared.joinApplication;
|
|
55
|
+
}
|
|
56
|
+
const participant = { programId, memberId: application.memberId };
|
|
57
|
+
if (application.status === "APPROVAL_PENDING") return { participant: { ...participant, state: "APPROVAL_PENDING" } };
|
|
58
|
+
if (application.status !== "APPROVED") throw joinProgramError("join_application_not_approved", "application not approved");
|
|
59
|
+
if (application.paymentStatus === "PENDING_OWNER_APPROVAL") return { participant: { ...participant, state: "ENROLLMENT_PENDING" } };
|
|
60
|
+
if (["NO_PAYMENT_REQUIRED", "PAYMENT_SUCCESSFUL"].includes(application.paymentStatus ?? "")) {
|
|
61
|
+
return { participant: application.participantId ? { ...participant, id: application.participantId, state: "JOINED" } : { ...participant, state: "ENROLLMENT_PENDING" } };
|
|
62
|
+
}
|
|
63
|
+
if (application.paymentStatus === "PAYMENT_IN_PROGRESS" && application.paymentInfo?.paymentOrderId) {
|
|
64
|
+
return { participant: { ...participant, state: "PAYMENT_PENDING", paymentPendingOptions: { orderId: application.paymentInfo.paymentOrderId } } };
|
|
65
|
+
}
|
|
66
|
+
throw joinProgramError("join_application_not_ready", "enrollment or payment is not ready");
|
|
39
67
|
}
|
|
40
68
|
function payableIdOf(participant) {
|
|
41
69
|
const pending = participant?.paymentPendingOptions;
|
|
@@ -13,6 +13,7 @@ function wixMediaId(reference) {
|
|
|
13
13
|
return WIX_IMAGE.exec(reference)?.[1] ?? (reference.includes("/") || reference.includes(":") ? "" : reference);
|
|
14
14
|
}
|
|
15
15
|
function resolveWixMediaReference(reference) {
|
|
16
|
+
if (/^\/?media\/[^/]/.test(reference)) return `https://static.wixstatic.com/${reference.replace(/^\//, "")}`;
|
|
16
17
|
const mediaId = wixMediaId(reference);
|
|
17
18
|
return mediaId ? `https://static.wixstatic.com/media/${mediaId}` : reference;
|
|
18
19
|
}
|
|
@@ -12,6 +12,7 @@ function wixMediaId(reference) {
|
|
|
12
12
|
return WIX_IMAGE.exec(reference)?.[1] ?? (reference.includes("/") || reference.includes(":") ? "" : reference);
|
|
13
13
|
}
|
|
14
14
|
function resolveWixMediaReference(reference) {
|
|
15
|
+
if (/^\/?media\/[^/]/.test(reference)) return `https://static.wixstatic.com/${reference.replace(/^\//, "")}`;
|
|
15
16
|
const mediaId = wixMediaId(reference);
|
|
16
17
|
return mediaId ? `https://static.wixstatic.com/media/${mediaId}` : reference;
|
|
17
18
|
}
|
|
@@ -252,6 +252,7 @@ function wixMediaId(reference) {
|
|
|
252
252
|
return WIX_IMAGE.exec(reference)?.[1] ?? (reference.includes("/") || reference.includes(":") ? "" : reference);
|
|
253
253
|
}
|
|
254
254
|
function resolveWixMediaReference(reference) {
|
|
255
|
+
if (/^\/?media\/[^/]/.test(reference)) return `https://static.wixstatic.com/${reference.replace(/^\//, "")}`;
|
|
255
256
|
const mediaId = wixMediaId(reference);
|
|
256
257
|
return mediaId ? `https://static.wixstatic.com/media/${mediaId}` : reference;
|
|
257
258
|
}
|
|
@@ -12,6 +12,7 @@ function wixMediaId(reference) {
|
|
|
12
12
|
return WIX_IMAGE.exec(reference)?.[1] ?? (reference.includes("/") || reference.includes(":") ? "" : reference);
|
|
13
13
|
}
|
|
14
14
|
function resolveWixMediaReference(reference) {
|
|
15
|
+
if (/^\/?media\/[^/]/.test(reference)) return `https://static.wixstatic.com/${reference.replace(/^\//, "")}`;
|
|
15
16
|
const mediaId = wixMediaId(reference);
|
|
16
17
|
return mediaId ? `https://static.wixstatic.com/media/${mediaId}` : reference;
|
|
17
18
|
}
|
package/dist/cli.mjs
CHANGED
|
@@ -13917,6 +13917,7 @@ function wixMediaId(reference) {
|
|
|
13917
13917
|
return WIX_IMAGE.exec(reference)?.[1] ?? (reference.includes("/") || reference.includes(":") ? "" : reference);
|
|
13918
13918
|
}
|
|
13919
13919
|
function resolveWixMediaReference(reference) {
|
|
13920
|
+
if (/^\/?media\/[^/]/.test(reference)) return `https://static.wixstatic.com/${reference.replace(/^\//, "")}`;
|
|
13920
13921
|
const mediaId = wixMediaId(reference);
|
|
13921
13922
|
return mediaId ? `https://static.wixstatic.com/media/${mediaId}` : reference;
|
|
13922
13923
|
}
|
|
@@ -24610,6 +24611,7 @@ function resolveIdiom(tokens2, ctx = {}) {
|
|
|
24610
24611
|
var IDIOM_CONTEXTS, UNSAFE_KEYS;
|
|
24611
24612
|
var init_idiom = __esm({
|
|
24612
24613
|
"../../core/ts/src/idiom.ts"() {
|
|
24614
|
+
"use strict";
|
|
24613
24615
|
IDIOM_CONTEXTS = {
|
|
24614
24616
|
ios: { native: ["ios"] },
|
|
24615
24617
|
android: { native: ["material"] },
|
|
@@ -33595,6 +33597,34 @@ function useEveryRowForFindAndPrint(on4, showEveryRow) {
|
|
|
33595
33597
|
};
|
|
33596
33598
|
}, [on4]);
|
|
33597
33599
|
}
|
|
33600
|
+
function usePageCycle(ctx, raw) {
|
|
33601
|
+
const bound2 = typeof raw === "string" && isBinding(raw);
|
|
33602
|
+
const provider = ctx.provider;
|
|
33603
|
+
const owner = React3.useRef(null);
|
|
33604
|
+
if (!owner.current) {
|
|
33605
|
+
owner.current = new PageCycle(bound2 ? provider ? cursorString(provider.value(servicePath(raw))) : "" : String(raw ?? ""));
|
|
33606
|
+
}
|
|
33607
|
+
const pages2 = owner.current;
|
|
33608
|
+
React3.useEffect(() => {
|
|
33609
|
+
if (!bound2) {
|
|
33610
|
+
pages2.publish(String(raw ?? ""));
|
|
33611
|
+
return;
|
|
33612
|
+
}
|
|
33613
|
+
if (!provider) {
|
|
33614
|
+
pages2.publish("");
|
|
33615
|
+
return;
|
|
33616
|
+
}
|
|
33617
|
+
return provider.subscribe(servicePath(raw), (v2) => pages2.publish(cursorString(v2)));
|
|
33618
|
+
}, [bound2, raw, provider, pages2]);
|
|
33619
|
+
return pages2;
|
|
33620
|
+
}
|
|
33621
|
+
function usePageCycleId(pages2) {
|
|
33622
|
+
return React3.useSyncExternalStore(
|
|
33623
|
+
React3.useCallback((cb) => pages2.listen(cb), [pages2]),
|
|
33624
|
+
() => pages2.cycle,
|
|
33625
|
+
() => pages2.cycle
|
|
33626
|
+
);
|
|
33627
|
+
}
|
|
33598
33628
|
function templateReadsService(template) {
|
|
33599
33629
|
let reads2 = readsService.get(template);
|
|
33600
33630
|
if (reads2 === void 0) {
|
|
@@ -33619,7 +33649,7 @@ function sameJson(a2, b2) {
|
|
|
33619
33649
|
}
|
|
33620
33650
|
return true;
|
|
33621
33651
|
}
|
|
33622
|
-
var resolveScalarStatic, Bound, BOUND_LIST_WINDOW_START, BOUND_LIST_WINDOW_STEP, BoundListWindowContext, WindowGrowth, BoundList, readsService, BoundRow;
|
|
33652
|
+
var resolveScalarStatic, Bound, BOUND_LIST_WINDOW_START, BOUND_LIST_WINDOW_STEP, BoundListWindowContext, WindowGrowth, PageCycle, PageCycleContext, cursorString, BoundList, readsService, BoundRow;
|
|
33623
33653
|
var init_bindings2 = __esm({
|
|
33624
33654
|
"../../core/web-renderer/src/bindings.tsx"() {
|
|
33625
33655
|
"use strict";
|
|
@@ -33643,7 +33673,7 @@ var init_bindings2 = __esm({
|
|
|
33643
33673
|
BOUND_LIST_WINDOW_START = 30;
|
|
33644
33674
|
BOUND_LIST_WINDOW_STEP = 30;
|
|
33645
33675
|
BoundListWindowContext = React3.createContext(true);
|
|
33646
|
-
WindowGrowth = ({ onNear }) => {
|
|
33676
|
+
WindowGrowth = ({ onNear, style }) => {
|
|
33647
33677
|
const ref = React3.useRef(null);
|
|
33648
33678
|
React3.useEffect(() => {
|
|
33649
33679
|
const el2 = ref.current;
|
|
@@ -33686,9 +33716,38 @@ var init_bindings2 = __esm({
|
|
|
33686
33716
|
resize?.disconnect();
|
|
33687
33717
|
};
|
|
33688
33718
|
}, []);
|
|
33689
|
-
return /* @__PURE__ */ jsx3("div", { ref, style: { height: 1 }, "aria-hidden": "true", "data-testid": "bound-list-window-end" });
|
|
33719
|
+
return /* @__PURE__ */ jsx3("div", { ref, style: { height: 1, ...style }, "aria-hidden": "true", "data-testid": "bound-list-window-end" });
|
|
33690
33720
|
};
|
|
33691
|
-
|
|
33721
|
+
PageCycle = class {
|
|
33722
|
+
cursor;
|
|
33723
|
+
cycle;
|
|
33724
|
+
claimed = -1;
|
|
33725
|
+
listeners = /* @__PURE__ */ new Set();
|
|
33726
|
+
constructor(initial) {
|
|
33727
|
+
this.cursor = initial;
|
|
33728
|
+
this.cycle = initial ? 1 : 0;
|
|
33729
|
+
}
|
|
33730
|
+
publish(next) {
|
|
33731
|
+
if (next === this.cursor) return;
|
|
33732
|
+
this.cursor = next;
|
|
33733
|
+
this.cycle += 1;
|
|
33734
|
+
this.listeners.forEach((l2) => l2());
|
|
33735
|
+
}
|
|
33736
|
+
claim(cycle) {
|
|
33737
|
+
if (cycle !== this.cycle || !this.cursor || this.claimed === cycle) return false;
|
|
33738
|
+
this.claimed = cycle;
|
|
33739
|
+
return true;
|
|
33740
|
+
}
|
|
33741
|
+
listen(listener) {
|
|
33742
|
+
this.listeners.add(listener);
|
|
33743
|
+
return () => {
|
|
33744
|
+
this.listeners.delete(listener);
|
|
33745
|
+
};
|
|
33746
|
+
}
|
|
33747
|
+
};
|
|
33748
|
+
PageCycleContext = React3.createContext(null);
|
|
33749
|
+
cursorString = (v2) => typeof v2 === "string" ? v2 : "";
|
|
33750
|
+
BoundList = ({ ctx, itemsPath, template, renderRow, windowed = false, wrapRows, footer, rowSize = 1, markerStyle, pageCursor }) => {
|
|
33692
33751
|
const local = itemsPath.startsWith("$item.");
|
|
33693
33752
|
const bound2 = useBoundValue(ctx, local ? "" : itemsPath);
|
|
33694
33753
|
const arr2 = local ? ctx.itemScope?.[itemsPath.slice("$item.".length)] : bound2;
|
|
@@ -33697,14 +33756,16 @@ var init_bindings2 = __esm({
|
|
|
33697
33756
|
const on4 = windowed && allowed2 && typeof IntersectionObserver !== "undefined";
|
|
33698
33757
|
const [size, setSize] = React3.useState(BOUND_LIST_WINDOW_START);
|
|
33699
33758
|
useEveryRowForFindAndPrint(on4, () => setSize(Number.POSITIVE_INFINITY));
|
|
33700
|
-
const
|
|
33759
|
+
const pages2 = usePageCycle(ctx, pageCursor);
|
|
33760
|
+
const per = Math.max(1, Math.floor(rowSize));
|
|
33761
|
+
const count2 = on4 ? Math.min(Math.ceil(size / per) * per, items.length) : items.length;
|
|
33701
33762
|
const rows = items.slice(0, count2).map((item, i2) => {
|
|
33702
33763
|
const key3 = item?.id ?? i2;
|
|
33703
33764
|
return /* @__PURE__ */ jsx3(BoundRow, { ctx, template, item, index: i2, renderRow }, String(key3));
|
|
33704
33765
|
});
|
|
33705
33766
|
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
33706
33767
|
wrapRows ? wrapRows(rows) : rows,
|
|
33707
|
-
count2 < items.length ? /* @__PURE__ */ jsx3(WindowGrowth, { onNear: () => setSize((n2) => Math.max(n2, count2) + BOUND_LIST_WINDOW_STEP) }, count2) : footer ?? null
|
|
33768
|
+
count2 < items.length ? /* @__PURE__ */ jsx3(WindowGrowth, { style: markerStyle, onNear: () => setSize((n2) => Math.max(n2, count2) + BOUND_LIST_WINDOW_STEP) }, count2) : footer && pageCursor !== void 0 ? /* @__PURE__ */ jsx3(PageCycleContext.Provider, { value: pages2, children: footer }) : footer ?? null
|
|
33708
33769
|
] });
|
|
33709
33770
|
};
|
|
33710
33771
|
readsService = /* @__PURE__ */ new WeakMap();
|
|
@@ -121598,6 +121659,7 @@ function renderInner(node, ctx) {
|
|
|
121598
121659
|
windowed: !props.horizontal,
|
|
121599
121660
|
wrapRows: boundAnimateItems ? (rows) => /* @__PURE__ */ jsx11("div", { "data-himalaya-animate-items": "1", style: { display: "contents" }, children: rows }) : void 0,
|
|
121600
121661
|
footer: boundPagination ? /* @__PURE__ */ jsx11(LoadMoreSentinel, { ctx, pagination: boundPagination }) : null,
|
|
121662
|
+
pageCursor: boundPagination?.cursor,
|
|
121601
121663
|
renderRow: keptRowRenderer(ctx, props, () => (t2, ic) => {
|
|
121602
121664
|
let row2 = renderNode(t2, asItem(ic));
|
|
121603
121665
|
if (boundStagger > 0 && React14.isValidElement(row2) && (props.horizontal || Number(ic.itemScope?.__index ?? 0) < BOUND_LIST_WINDOW_START)) {
|
|
@@ -122171,7 +122233,7 @@ function reportUnknownComponent(ctx, pkg, type) {
|
|
|
122171
122233
|
function unknownComponentShowsDeveloperLabel(ctx) {
|
|
122172
122234
|
return ctx.debugUnknownComponents ?? ctx.previewSurface != null;
|
|
122173
122235
|
}
|
|
122174
|
-
var rowValue, loadPdfFetch, WebViewBridgeHost2, useIsomorphicLayoutEffect, ResponsiveGrid, SPLIT_EXPANDED_MIN_WIDTH, SPLIT_COLUMN_GAP, ResponsiveSplitView, ABSOLUTE_URL_RE, appearKeyframesInjected, valueSwapKeyframesInjected, NUMERIC_TEXT, shimmerKeyframesInjected, pressStylesInjected, REVEAL_ON_FOCUS_ATTR, FOCUS_RING_CSS, focusStylesInjected, HLIST_CHILD_CSS, hListStylesInjected, listAnimateRuntimeInstalled, transitionKeyframesInjected, countUpRuntimeInjected, MEASURE_PREFIX, measureRuntimeInjected, revealRuntimeInjected, AMBIENT_HOST_STYLE, AmbientMotionBox, vectorAnimStylesInjected, scrollProgressRuntimeInjected, confettiRuntimeInjected, lottieRuntimeInjected, LOTTIE_RUNTIME_ATTRIBUTES, lottieAnims, riveRuntimeInjected, gradientKeyframesInjected, parallaxRuntimeInjected, spinKeyframesInjected, marqueeKeyframesInjected, alignItems, zJustifyItems, hAlignItems, bodyFont, kids2, rowKidCtx, rowKids, staggeredKids, asTextL10n, asFinalTextL10n, asBoundText, useBoundString, InterpolatedTextView, txt, selectFragmentCase, fragmentValueHash, fragmentSlotContent, FragmentSlotNode, RichContentEditorNode, MediaFieldNode, WorkerSubtreeNode, RichContentNode, resolveItemDeep2, resolveRowAction2, resolveSwipeActions, resolveModBindings, resolvedComponentId, directServiceBindings, withRootStyle, ReactiveDirectScalars, HiddenGate, ExitPresence, StatefulSectionNode, KEYBOARD_INPUT_MODES, AUTOCAPITALIZE_VALUES, ENTER_KEY_HINTS, AUTOGROW_CEILING, EditableField, MENU_ANCHOR_CONTROL, MenuNode, MENU_LONG_PRESS_MS, menuOpensOnLongPress, LoadMoreSentinel, FieldErrorNode, FormView, MediaSlotProvider, MEDIA_ITEM_BINDABLE, MediaPlayerView, VideoNode, PdfDocumentCanvas, PdfViewNode, WebViewNode, InteractivePicker, InteractiveDatePicker, InteractiveSearchField, InteractiveStepper, NODE_EXTRAS_TARGET, SYNTHETIC_TAP_ROLE, SYNTHETIC_TABINDEX, INFERRED_DECORATIVE, SELF_RENDERED_LEAF, ROLE_WHEN_NAMED, AUTHORED_ROLE, PENDING_RANGE, RANGE_ROLES, NODE_A11Y_ATTRS, INTERACTIVE_ROLES, ALWAYS_INTERACTIVE_COMPONENT_TYPES, TAP_ACTIVATOR_ATTR, TAP_GROUP_ATTR, NESTED_CONTROL_SELECTOR, VISUALLY_HIDDEN, NAME_SKIP_SELECTOR, activatorNameObservers, ACTIVATOR_STATE_ATTRS, controlNode, ToggleNode, SliderNode, SelectionControlNode, TabsNode, SegmentedControlNode, DisclosureGroupNode, GridNode, SplitViewNode, REVEAL_RELEASE_MS, REVEAL_FADE_MS, REVEAL_BUFFER, revealProgress, countWords, RevealText, TextNode, ImageNode, ANIMATION_LEAF, LottieNode, RiveNode, AvatarNode, IconNode, EMPTY_STATE_SPACING, EmptyStateNode, ERROR_STATE_VARIANTS, ERROR_STATE_SPACING, ErrorStateNode, ButtonNode, OtpInputNode, ProgressBarNode, SnackbarNode, ACTIVITY_DEFAULT_NAME, ACTIVITY_RING_ARC, ActivityIndicatorNode, NATIVELY_TABBABLE, BottomSheetNode, BOTTOM_DRAWER_HOST_STACK_EVENT, ModalBottomSheetNode, BottomDrawerNode, PRESENTED_OVERLAY_ATTR, TooltipNode, PopoverNode, ChipsInputNode, ChipNode, TableNode, GaugeRing, GaugeNode, RATING_METRICS, ratingMetrics, RatingNode, AvatarStripNode, CHART_STROKE_CYCLE, chartStrokeAt, chartBarCenter, ChartNode, donutSliceOpacity, DonutChartNode, ShapeNode, LegendMarker, LegendNode, cellAlign, DataTableNode, voiceNoteState, voiceNoteDelivery, VOICE_NOTE_DEFAULT_BARS, clampBarCount, VoiceNoteNode, TimelineNode, LiveWindowMeasured, LiveWindowPage, PagingNode, WheelPickerNode, ColorPickerNode, FilterChipsNode, TILE_PX, MAX_MERCATOR_LAT, DEFAULT_TILE_MAX_ZOOM, CIRCLE_SEGMENTS, METRES_PER_DEG_LAT, MARKER_HIT_RADIUS, SHAPE_HIT_RADIUS, MapNode, CAROUSEL_SETTLE_MS, scrollCarouselTo, CarouselNode, BannerNode, CollapsingHeaderNode, UnsupportedOnSurface, CALENDAR_DATE_ONLY_RE, CAL_DEFAULT_MAX_DOTS, CAL_AGENDA_INITIAL_DAYS, CAL_AGENDA_PAGE_DAYS, CAL_DEFAULT_SNAP_MINUTES, CAL_UNASSIGNED_LANE_ID, MonthCalendarNode, TimeGridNode, AgendaNode, ARIA_ROLE, initialFocusScheduled, PRESENTED_SCOPE, focusRoots, A11yHintDescription, rowRenderers, renderRailRow, reportedUnknownComponents, UnknownComponentNode, WebRenderer;
|
|
122236
|
+
var rowValue, loadPdfFetch, WebViewBridgeHost2, useIsomorphicLayoutEffect, GridColumnsContext, GridBoundList, GRID_SPAN_ALL, ResponsiveGrid, SPLIT_EXPANDED_MIN_WIDTH, SPLIT_COLUMN_GAP, ResponsiveSplitView, ABSOLUTE_URL_RE, appearKeyframesInjected, valueSwapKeyframesInjected, NUMERIC_TEXT, shimmerKeyframesInjected, pressStylesInjected, REVEAL_ON_FOCUS_ATTR, FOCUS_RING_CSS, focusStylesInjected, HLIST_CHILD_CSS, hListStylesInjected, listAnimateRuntimeInstalled, transitionKeyframesInjected, countUpRuntimeInjected, MEASURE_PREFIX, measureRuntimeInjected, revealRuntimeInjected, AMBIENT_HOST_STYLE, AmbientMotionBox, vectorAnimStylesInjected, scrollProgressRuntimeInjected, confettiRuntimeInjected, lottieRuntimeInjected, LOTTIE_RUNTIME_ATTRIBUTES, lottieAnims, riveRuntimeInjected, gradientKeyframesInjected, parallaxRuntimeInjected, spinKeyframesInjected, marqueeKeyframesInjected, alignItems, zJustifyItems, hAlignItems, bodyFont, kids2, rowKidCtx, rowKids, staggeredKids, asTextL10n, asFinalTextL10n, asBoundText, useBoundString, InterpolatedTextView, txt, selectFragmentCase, fragmentValueHash, fragmentSlotContent, FragmentSlotNode, RichContentEditorNode, MediaFieldNode, WorkerSubtreeNode, RichContentNode, resolveItemDeep2, resolveRowAction2, resolveSwipeActions, resolveModBindings, resolvedComponentId, directServiceBindings, withRootStyle, ReactiveDirectScalars, HiddenGate, ExitPresence, StatefulSectionNode, KEYBOARD_INPUT_MODES, AUTOCAPITALIZE_VALUES, ENTER_KEY_HINTS, AUTOGROW_CEILING, EditableField, MENU_ANCHOR_CONTROL, MenuNode, MENU_LONG_PRESS_MS, menuOpensOnLongPress, LoadMoreSentinel, FieldErrorNode, FormView, MediaSlotProvider, MEDIA_ITEM_BINDABLE, MediaPlayerView, VideoNode, PdfDocumentCanvas, PdfViewNode, WebViewNode, InteractivePicker, InteractiveDatePicker, InteractiveSearchField, InteractiveStepper, NODE_EXTRAS_TARGET, SYNTHETIC_TAP_ROLE, SYNTHETIC_TABINDEX, INFERRED_DECORATIVE, SELF_RENDERED_LEAF, ROLE_WHEN_NAMED, AUTHORED_ROLE, PENDING_RANGE, RANGE_ROLES, NODE_A11Y_ATTRS, INTERACTIVE_ROLES, ALWAYS_INTERACTIVE_COMPONENT_TYPES, TAP_ACTIVATOR_ATTR, TAP_GROUP_ATTR, NESTED_CONTROL_SELECTOR, VISUALLY_HIDDEN, NAME_SKIP_SELECTOR, activatorNameObservers, ACTIVATOR_STATE_ATTRS, controlNode, ToggleNode, SliderNode, SelectionControlNode, TabsNode, SegmentedControlNode, DisclosureGroupNode, GridNode, SplitViewNode, REVEAL_RELEASE_MS, REVEAL_FADE_MS, REVEAL_BUFFER, revealProgress, countWords, RevealText, TextNode, ImageNode, ANIMATION_LEAF, LottieNode, RiveNode, AvatarNode, IconNode, EMPTY_STATE_SPACING, EmptyStateNode, ERROR_STATE_VARIANTS, ERROR_STATE_SPACING, ErrorStateNode, ButtonNode, OtpInputNode, ProgressBarNode, SnackbarNode, ACTIVITY_DEFAULT_NAME, ACTIVITY_RING_ARC, ActivityIndicatorNode, NATIVELY_TABBABLE, BottomSheetNode, BOTTOM_DRAWER_HOST_STACK_EVENT, ModalBottomSheetNode, BottomDrawerNode, PRESENTED_OVERLAY_ATTR, TooltipNode, PopoverNode, ChipsInputNode, ChipNode, TableNode, GaugeRing, GaugeNode, RATING_METRICS, ratingMetrics, RatingNode, AvatarStripNode, CHART_STROKE_CYCLE, chartStrokeAt, chartBarCenter, ChartNode, donutSliceOpacity, DonutChartNode, ShapeNode, LegendMarker, LegendNode, cellAlign, DataTableNode, voiceNoteState, voiceNoteDelivery, VOICE_NOTE_DEFAULT_BARS, clampBarCount, VoiceNoteNode, TimelineNode, LiveWindowMeasured, LiveWindowPage, PagingNode, WheelPickerNode, ColorPickerNode, FilterChipsNode, TILE_PX, MAX_MERCATOR_LAT, DEFAULT_TILE_MAX_ZOOM, CIRCLE_SEGMENTS, METRES_PER_DEG_LAT, MARKER_HIT_RADIUS, SHAPE_HIT_RADIUS, MapNode, CAROUSEL_SETTLE_MS, scrollCarouselTo, CarouselNode, BannerNode, CollapsingHeaderNode, UnsupportedOnSurface, CALENDAR_DATE_ONLY_RE, CAL_DEFAULT_MAX_DOTS, CAL_AGENDA_INITIAL_DAYS, CAL_AGENDA_PAGE_DAYS, CAL_DEFAULT_SNAP_MINUTES, CAL_UNASSIGNED_LANE_ID, MonthCalendarNode, TimeGridNode, AgendaNode, ARIA_ROLE, initialFocusScheduled, PRESENTED_SCOPE, focusRoots, A11yHintDescription, rowRenderers, renderRailRow, reportedUnknownComponents, UnknownComponentNode, WebRenderer;
|
|
122175
122237
|
var init_renderNode = __esm({
|
|
122176
122238
|
"../../core/web-renderer/src/renderNode.tsx"() {
|
|
122177
122239
|
"use strict";
|
|
@@ -122225,6 +122287,12 @@ var init_renderNode = __esm({
|
|
|
122225
122287
|
loadPdfFetch = () => Promise.resolve().then(() => (init_pdfFetch(), pdfFetch_exports));
|
|
122226
122288
|
WebViewBridgeHost2 = React14.lazy(() => Promise.resolve().then(() => (init_webviewBridgeHost(), webviewBridgeHost_exports)));
|
|
122227
122289
|
useIsomorphicLayoutEffect = typeof globalThis.document === "undefined" ? React14.useEffect : React14.useLayoutEffect;
|
|
122290
|
+
GridColumnsContext = React14.createContext(1);
|
|
122291
|
+
GridBoundList = (props) => {
|
|
122292
|
+
const columns = React14.useContext(GridColumnsContext);
|
|
122293
|
+
return /* @__PURE__ */ jsx11(BoundList, { ...props, windowed: true, rowSize: columns, markerStyle: GRID_SPAN_ALL });
|
|
122294
|
+
};
|
|
122295
|
+
GRID_SPAN_ALL = { gridColumn: "1 / -1" };
|
|
122228
122296
|
ResponsiveGrid = ({ base, medium, expanded, initialCols, seedWidth, spacing, extra, children }) => {
|
|
122229
122297
|
const [el2, setEl] = React14.useState(null);
|
|
122230
122298
|
const [cols, setCols] = React14.useState(initialCols);
|
|
@@ -122247,7 +122315,7 @@ var init_renderNode = __esm({
|
|
|
122247
122315
|
"data-testid": "responsive-grid",
|
|
122248
122316
|
"data-cols": cols,
|
|
122249
122317
|
style: { display: "grid", gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))`, gap: spacing, width: "100%", ...extra },
|
|
122250
|
-
children
|
|
122318
|
+
children: /* @__PURE__ */ jsx11(GridColumnsContext.Provider, { value: cols, children })
|
|
122251
122319
|
}
|
|
122252
122320
|
);
|
|
122253
122321
|
};
|
|
@@ -123481,25 +123549,26 @@ var init_renderNode = __esm({
|
|
|
123481
123549
|
MENU_LONG_PRESS_MS = 500;
|
|
123482
123550
|
menuOpensOnLongPress = (style) => style === "context";
|
|
123483
123551
|
LoadMoreSentinel = ({ ctx, pagination, style }) => {
|
|
123484
|
-
const
|
|
123485
|
-
const
|
|
123486
|
-
const
|
|
123487
|
-
const
|
|
123552
|
+
const owned = React14.useContext(PageCycleContext);
|
|
123553
|
+
const own6 = usePageCycle(ctx, owned ? void 0 : pagination?.cursor);
|
|
123554
|
+
const pages2 = owned ?? own6;
|
|
123555
|
+
const cycle = usePageCycleId(pages2);
|
|
123556
|
+
const cursor = pages2.cursor;
|
|
123488
123557
|
const ref = React14.useRef(null);
|
|
123489
|
-
const fired = React14.useRef("");
|
|
123490
123558
|
React14.useEffect(() => {
|
|
123491
|
-
fired.current = "";
|
|
123492
123559
|
const el2 = ref.current;
|
|
123493
123560
|
if (!cursor || !ctx.onAction || !el2 || typeof IntersectionObserver === "undefined") return;
|
|
123561
|
+
let live3 = true;
|
|
123494
123562
|
const io2 = new IntersectionObserver((entries) => {
|
|
123495
|
-
if (entries.
|
|
123496
|
-
|
|
123497
|
-
ctx.onAction?.(pagination.onLoadMore ?? pagination.on_load_more);
|
|
123498
|
-
}
|
|
123563
|
+
if (!live3 || !entries[entries.length - 1]?.isIntersecting) return;
|
|
123564
|
+
if (pages2.claim(cycle)) ctx.onAction?.(pagination.onLoadMore ?? pagination.on_load_more);
|
|
123499
123565
|
});
|
|
123500
123566
|
io2.observe(el2);
|
|
123501
|
-
return () =>
|
|
123502
|
-
|
|
123567
|
+
return () => {
|
|
123568
|
+
live3 = false;
|
|
123569
|
+
io2.disconnect();
|
|
123570
|
+
};
|
|
123571
|
+
}, [pages2, cycle, cursor]);
|
|
123503
123572
|
if (!cursor) return null;
|
|
123504
123573
|
return /* @__PURE__ */ jsx11("div", { ref, style: { height: 1, ...style }, "aria-hidden": "true", "data-testid": "load-more-sentinel" });
|
|
123505
123574
|
};
|
|
@@ -124765,22 +124834,29 @@ var init_renderNode = __esm({
|
|
|
124765
124834
|
const prev = el2.props.style ?? {};
|
|
124766
124835
|
return React14.cloneElement(el2, { style: { ...prev, animationDelay: `${i2 * gridStagger}ms` } });
|
|
124767
124836
|
};
|
|
124768
|
-
const
|
|
124769
|
-
|
|
124837
|
+
const pagination = props.pagination;
|
|
124838
|
+
const sentinel = pagination ? /* @__PURE__ */ jsx11(LoadMoreSentinel, { ctx, pagination, style: GRID_SPAN_ALL }) : null;
|
|
124839
|
+
const bound2 = !!(itemsPath && items[0] && ctx.provider);
|
|
124840
|
+
const inner = bound2 ? /* @__PURE__ */ jsx11(
|
|
124841
|
+
GridBoundList,
|
|
124770
124842
|
{
|
|
124771
124843
|
ctx,
|
|
124772
124844
|
itemsPath,
|
|
124773
124845
|
template: items[0],
|
|
124774
|
-
|
|
124846
|
+
footer: sentinel,
|
|
124847
|
+
pageCursor: pagination?.cursor,
|
|
124848
|
+
renderRow: keptRowRenderer(ctx, props, () => (t2, ic) => {
|
|
124849
|
+
const i2 = Number(ic.itemScope?.__index ?? 0);
|
|
124850
|
+
return i2 < BOUND_LIST_WINDOW_START ? stagger(renderNode(t2, ic), i2) : renderNode(t2, ic);
|
|
124851
|
+
})
|
|
124775
124852
|
}
|
|
124776
124853
|
) : gridStagger > 0 && !itemsPath ? staggeredKids(items, ctx, gridStagger) : kids2(itemsPath ? [] : items, ctx);
|
|
124777
|
-
const pagination = props.pagination;
|
|
124778
124854
|
const refresh = props.onPullToRefresh ?? props.on_pull_to_refresh;
|
|
124779
124855
|
const withRefresh = !!(refresh && ctx.onAction);
|
|
124780
|
-
const cells =
|
|
124856
|
+
const cells = bound2 ? inner : /* @__PURE__ */ jsxs9(Fragment4, { children: [
|
|
124781
124857
|
inner,
|
|
124782
|
-
|
|
124783
|
-
] })
|
|
124858
|
+
sentinel
|
|
124859
|
+
] });
|
|
124784
124860
|
const grid = ResponsiveGrid({
|
|
124785
124861
|
base,
|
|
124786
124862
|
medium,
|
|
@@ -176910,40 +176986,40 @@ var init_preview_assets_generated = __esm({
|
|
|
176910
176986
|
"../../packages/serve/src/preview-assets.generated.ts"() {
|
|
176911
176987
|
init_preview_assets_format();
|
|
176912
176988
|
PREVIEW_ASSET_MANIFEST = [
|
|
176913
|
-
{ key: "assets/DashboardHost-
|
|
176914
|
-
{ key: "assets/DevDrawer-
|
|
176915
|
-
{ key: "assets/IdiomCompare-
|
|
176916
|
-
{ key: "assets/LightboxViewer-
|
|
176917
|
-
{ key: "assets/OfflineReadingBar-
|
|
176918
|
-
{ key: "assets/PhonePreviewControl-
|
|
176919
|
-
{ key: "assets/SchemeCompare-
|
|
176989
|
+
{ key: "assets/DashboardHost-P-DTXyka.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2955, sha256: "751fa298bdeebff9b5bcb3244815dec489ac620466478dd6a66b2cbf435d36c2" },
|
|
176990
|
+
{ key: "assets/DevDrawer-BvkOURkf.js", contentType: "application/javascript; charset=utf-8", offset: 2963, length: 16783, sha256: "5027c2ae9d3991202f8ca271128883bc2a53a7415dd05cab7aebd9c20a0c082d" },
|
|
176991
|
+
{ key: "assets/IdiomCompare-CgQnmqYC.js", contentType: "application/javascript; charset=utf-8", offset: 19746, length: 1926, sha256: "e3a16bfd4b78815d6b2ecbafa34eb30c61c6b70e400bbe9157ef7ed078da990f" },
|
|
176992
|
+
{ key: "assets/LightboxViewer-nP-JeyQS.js", contentType: "application/javascript; charset=utf-8", offset: 21672, length: 8171, sha256: "f4b2aa557b51ff82c7d5cc1977d6951cd65ed854d4c392102ee89b4ac3d53d23" },
|
|
176993
|
+
{ key: "assets/OfflineReadingBar-CHmM4lJ4.js", contentType: "application/javascript; charset=utf-8", offset: 29843, length: 1707, sha256: "c93413c161951086a6c54640bcfa714266d1702e63ca50b191a9229f1a835547" },
|
|
176994
|
+
{ key: "assets/PhonePreviewControl-OZNXmB7E.js", contentType: "application/javascript; charset=utf-8", offset: 31550, length: 37768, sha256: "0ccf6076f21a905b1dcd84217046f9746e150f5ca0f0217f1ff881b488a46eb8" },
|
|
176995
|
+
{ key: "assets/SchemeCompare-DqNe6CeD.js", contentType: "application/javascript; charset=utf-8", offset: 69318, length: 1858, sha256: "32672e694a7596604b8434a4101fe0b009e7a2d48e4e81d953cf949f21469dd2" },
|
|
176920
176996
|
{ key: "assets/glassPreviewBrowser-Bt5ZFmG4.js", contentType: "application/javascript; charset=utf-8", offset: 71176, length: 342, sha256: "20d73f97d38f6d9a0b79e68e24954cd6bbfe66833a6e6aecae00a9102e64cab3" },
|
|
176921
|
-
{ key: "assets/index-
|
|
176922
|
-
{ key: "assets/jsx-runtime-CY_jTiqj.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
176923
|
-
{ key: "assets/pdf-
|
|
176924
|
-
{ key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
176925
|
-
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset:
|
|
176926
|
-
{ key: "assets/pdfDocument-
|
|
176927
|
-
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
176928
|
-
{ key: "assets/webviewBridgeHost-
|
|
176929
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
176930
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
176931
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
176932
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
176933
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
176934
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
176935
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
176936
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
176937
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
176938
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
176939
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
176940
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
176941
|
-
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
176942
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
176943
|
-
{ key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset:
|
|
176944
|
-
{ key: "ios-glass-preview.svg", contentType: "image/svg+xml", offset:
|
|
176945
|
-
{ key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset:
|
|
176946
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
176997
|
+
{ key: "assets/index-CIotJ9MI.js", contentType: "application/javascript; charset=utf-8", offset: 71518, length: 1355673, sha256: "efe7fc42cbeb0fb6a41af848fc953dcef23e99ea73e0a2ad3af76529b549f744" },
|
|
176998
|
+
{ key: "assets/jsx-runtime-CY_jTiqj.js", contentType: "application/javascript; charset=utf-8", offset: 1427191, length: 7624, sha256: "29dfba5b56f79a0b84d6b04d84d87617454baeba03c225f682ab2ab7ae2d5016" },
|
|
176999
|
+
{ key: "assets/pdf-k9naZ0Gk.js", contentType: "application/javascript; charset=utf-8", offset: 1434815, length: 488199, sha256: "d44d0d39e96bab00c281e3c449b5ebd1eb899b64ddbbe5389cf71ef2a414b3bf" },
|
|
177000
|
+
{ key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset: 1923014, length: 73, sha256: "41bcfda4f3c8c0a81c785ea87c69afc8e7d0ed8c333324aee94c273d881bb6aa" },
|
|
177001
|
+
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 1923087, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
|
|
177002
|
+
{ key: "assets/pdfDocument-C-QZTs1Y.js", contentType: "application/javascript; charset=utf-8", offset: 3240121, length: 3453, sha256: "18e4337e10eb8b15910544f06f58e0b7b3d02157d20d6b59df0fc6831bd550e1" },
|
|
177003
|
+
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3243574, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
|
|
177004
|
+
{ key: "assets/webviewBridgeHost-D-12ivN_.js", contentType: "application/javascript; charset=utf-8", offset: 3245840, length: 9888, sha256: "9dad37ccf9538c9a6ab33c5eab52ce7c8905df854e6a80a37c12407a0fed5bda" },
|
|
177005
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3255728, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
177006
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3260338, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
177007
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3748922, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
177008
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3839846, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
177009
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3930830, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
177010
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 4021810, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
177011
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4112682, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
177012
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4203662, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
177013
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4312298, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
177014
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4421382, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
177015
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4530430, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
177016
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4638130, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
177017
|
+
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 4726238, length: 6748, sha256: "4a92459977d7cefa1a6a7e020c3a63509737f083b3f2773557c1a5771665811a" },
|
|
177018
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 4732986, length: 5037, sha256: "353b4230933adcb77cfb99bbbaececd6e59dbc9b40fca5ceda69c7071c258661" },
|
|
177019
|
+
{ key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 4738023, length: 7193, sha256: "a482f4796147c2a3893942e10ab225bd3b6f749f7125fe0330680d4c20ea0212" },
|
|
177020
|
+
{ key: "ios-glass-preview.svg", contentType: "image/svg+xml", offset: 4745216, length: 423, sha256: "b9cd5989d31464a0422f260a332af6be5add0b04de2148944de35158f3b75efc" },
|
|
177021
|
+
{ key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset: 4745639, length: 1171, sha256: "9e2c3a0faaf05d5471badf167a4d3bdf1c4e6dd65c432eea6d254158bfd99585" },
|
|
177022
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4746810, length: 19459, sha256: "760d3263ea56776e60a4808558b32ae20ea2c667c0634573b9fdc5c7694a4f20" }
|
|
176947
177023
|
];
|
|
176948
177024
|
}
|
|
176949
177025
|
});
|
|
@@ -198650,7 +198726,29 @@ __export(cli_exports2, {
|
|
|
198650
198726
|
});
|
|
198651
198727
|
import { closeSync as closeSync8, constants as constants7, lstatSync as lstatSync25, mkdirSync as mkdirSync50, openSync as openSync7, readFileSync as readFileSync125, realpathSync as realpathSync16, writeFileSync as writeFileSync49 } from "node:fs";
|
|
198652
198728
|
import { createHash as createHash52 } from "node:crypto";
|
|
198729
|
+
import { isIP as isIP2 } from "node:net";
|
|
198653
198730
|
import { dirname as dirname58, join as join117, parse as parse3, resolve as resolve82 } from "node:path";
|
|
198731
|
+
function nativeSiteHost(host) {
|
|
198732
|
+
if (isIP2(host.startsWith("[") ? host.slice(1, -1) : host)) return true;
|
|
198733
|
+
const labels = host.replace(/\.$/, "").split(".");
|
|
198734
|
+
return labels.every((label3) => /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i.test(label3)) && (labels.length === 1 || /^[a-z]/i.test(labels.at(-1)));
|
|
198735
|
+
}
|
|
198736
|
+
function migrationSiteUrl(business) {
|
|
198737
|
+
const website = business.website;
|
|
198738
|
+
if (website?.isPublished === false) {
|
|
198739
|
+
throw new OneAppError("source_site_unpublished", "Please publish the source Wix site before migrating: member sign-in and site links need its public URL. Then retry with a new destination; the collected evidence was kept.");
|
|
198740
|
+
}
|
|
198741
|
+
for (const value2 of [website?.publicUrl, website?.url]) {
|
|
198742
|
+
if (typeof value2 !== "string") continue;
|
|
198743
|
+
const siteUrl = value2.trim();
|
|
198744
|
+
try {
|
|
198745
|
+
const parsed = new URL(siteUrl);
|
|
198746
|
+
if (/^https:\/\//i.test(siteUrl) && nativeSiteHost(parsed.hostname) && !parsed.port && !parsed.username && !parsed.password && !parsed.href.includes("?") && !parsed.href.includes("#")) return parsed.href;
|
|
198747
|
+
} catch {
|
|
198748
|
+
}
|
|
198749
|
+
}
|
|
198750
|
+
throw new OneAppError("source_site_url_unavailable", "The source site has no verified public URL usable for sign-in. Verify that the site is published and has an HTTPS public URL with an optional base path, without credentials, a custom port, query or fragment; never substitute a template URL. Then retry with a new destination; the collected evidence was kept.");
|
|
198751
|
+
}
|
|
198654
198752
|
function readOptions(argv, cwd, commandIncluded) {
|
|
198655
198753
|
let cursor = 0;
|
|
198656
198754
|
const skipGlobalSwitches = () => {
|
|
@@ -198874,7 +198972,8 @@ validate-topbar checks authored source top-bar controls against the migrated con
|
|
|
198874
198972
|
authorization: {
|
|
198875
198973
|
origin: "explicit-one-app-migration-request",
|
|
198876
198974
|
scope: { metaSiteId: options.metaSiteId, workspace: options.workspace, target: options.target },
|
|
198877
|
-
allows: ["read-source-configuration", "plan-reconstruction", "generate-local-app", "
|
|
198975
|
+
allows: ["read-source-configuration", "plan-reconstruction", "generate-local-app", "build-and-validate", "publish-hosted-draft"],
|
|
198976
|
+
requiresOwnerAgreement: ["ensure-matching-site-oauth-client"],
|
|
198878
198977
|
excludes: ["activate-release", "native-binary-build", "app-store-submission", "modify-source-app"],
|
|
198879
198978
|
stopFor: "unresolved-behavior-or-capability-blockers"
|
|
198880
198979
|
}
|
|
@@ -198909,6 +199008,8 @@ validate-topbar checks authored source top-bar controls against the migrated con
|
|
|
198909
199008
|
})) {
|
|
198910
199009
|
if (value2 !== void 0 && !artifacts[name]) put(name, sourceJson(value2));
|
|
198911
199010
|
}
|
|
199011
|
+
progress("checking-site-publication");
|
|
199012
|
+
const siteUrl = migrationSiteUrl(collected.businessContext);
|
|
198912
199013
|
progress("normalizing");
|
|
198913
199014
|
put("source-graph.json", sourceJson(buildSourceGraph(collected.rawStructure, collected.enriched)));
|
|
198914
199015
|
put("navigation-plan.json", sourceJson(planNavigation(collected.rawStructure, options.topTabs)));
|
|
@@ -198918,6 +199019,7 @@ validate-topbar checks authored source top-bar controls against the migrated con
|
|
|
198918
199019
|
stage: "collected",
|
|
198919
199020
|
collectedAt: now(),
|
|
198920
199021
|
source: collected.source,
|
|
199022
|
+
siteUrl,
|
|
198921
199023
|
warnings: collected.warnings,
|
|
198922
199024
|
artifacts: { ...artifacts },
|
|
198923
199025
|
sha256: { ...hashes }
|
|
@@ -198928,6 +199030,7 @@ validate-topbar checks authored source top-bar controls against the migrated con
|
|
|
198928
199030
|
workflow: ONE_APP_WORKFLOW,
|
|
198929
199031
|
workspace: options.workspace,
|
|
198930
199032
|
source: collected.source,
|
|
199033
|
+
siteUrl,
|
|
198931
199034
|
artifacts,
|
|
198932
199035
|
warnings: collected.warnings,
|
|
198933
199036
|
next: [
|
|
Binary file
|