@wix/himalaya-cli 0.904.0 → 0.906.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 +14 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdui/src/screen-kit.d.ts +7 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/events/src/index.d.ts +39 -21
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +7 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-events.mjs +1 -9
- package/dist/cli.mjs +80 -20
- package/guides/sdk-reference.json +5 -5
- package/package.json +2 -2
- package/templates/beauty-salon/dev/index.ts +179 -262
- package/templates/beauty-salon/tier5-src/himi-branded-lite-home/index.ts +45 -3
- package/templates/branded-lite/dev/index.ts +325 -502
- package/templates/branded-lite/tier5-src/himi-branded-lite-home/index.ts +45 -3
- package/templates/community-club/dev/index.ts +138 -201
- package/templates/community-club/tier5-src/himi-branded-lite-home/index.ts +45 -3
- package/templates/events-meetups/dev/index.ts +133 -191
- package/templates/events-meetups/tier5-src/himi-branded-lite-home/index.ts +45 -3
- package/templates/gym-fitness/dev/index.ts +218 -321
- package/templates/gym-fitness/tier5-src/himi-branded-lite-home/index.ts +45 -3
- package/templates/nonprofit-cause/dev/index.ts +141 -201
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-home/index.ts +45 -3
- package/templates/podcast-creator/dev/index.ts +138 -195
- package/templates/podcast-creator/tier5-src/himi-branded-lite-home/index.ts +45 -3
- package/templates/portfolio-creative/dev/index.ts +171 -249
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-home/index.ts +45 -3
- package/templates/restaurant/dev/index.ts +140 -205
- package/templates/restaurant/tier5-src/himi-branded-lite-home/index.ts +45 -3
- package/templates/retail-store/dev/index.ts +121 -172
- package/templates/retail-store/tier5-src/himi-branded-lite-home/index.ts +45 -3
- package/templates/yoga-studio/dev/index.ts +176 -260
- package/templates/yoga-studio/tier5-src/himi-branded-lite-home/index.ts +45 -3
|
@@ -329,6 +329,20 @@ export declare function button(props: {
|
|
|
329
329
|
id?: string;
|
|
330
330
|
}): Component;
|
|
331
331
|
export declare function withModifiers(c: Component, mods: NonNullable<Component["modifiers"]>): Component;
|
|
332
|
+
/**
|
|
333
|
+
* Stamp a stable node id on an already-built component (invariant 27).
|
|
334
|
+
*
|
|
335
|
+
* The builders take `{ id }` as an option, but a screen is usually assembled as
|
|
336
|
+
* `withModifiers(vstack({ … }), { … })`, where reaching the inner call to name the node
|
|
337
|
+
* means restructuring the expression. `withId` names it from the outside instead.
|
|
338
|
+
*
|
|
339
|
+
* Added for #2738: descriptors had been carrying their node identifier in
|
|
340
|
+
* `modifiers.accessibilityLabel` — the only place that survived to the renderer — so a
|
|
341
|
+
* screen reader announced "himi_branded_home.store" and the tests that address these
|
|
342
|
+
* nodes had nothing else to match on. The id belongs here; the accessible name is then
|
|
343
|
+
* free to be the human text.
|
|
344
|
+
*/
|
|
345
|
+
export declare function withId(c: Component, id: string): Component;
|
|
332
346
|
/** RFC 0024 — conditional visibility. Collapse `c` (zero layout) when `path`
|
|
333
347
|
* resolves truthy. `path` is a `"$item.<field>"` / `"$service:<svc>.<field>"`
|
|
334
348
|
* sentinel; the worker emits the bool (for "show only when X", emit the inverse
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdui/src/screen-kit.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { Component } from "../../dev-server/src/builder.js";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* A shimmer skeleton rectangle of the given height, tagged with a stable NODE id.
|
|
4
|
+
*
|
|
5
|
+
* #2738 — `id` used to be emitted as `accessibilityLabel`, so a screen reader announced
|
|
6
|
+
* "himi_branded_home.hero_skeleton" and read three shimmer boxes aloud during every load.
|
|
7
|
+
* A skeleton is decorative: it carries an id for tests and no accessible name at all.
|
|
8
|
+
*/
|
|
3
9
|
export declare function skRect(height: number, id: string): Component;
|
|
4
10
|
/** Options for the standard empty-state block. */
|
|
5
11
|
export interface EmptyBlockOptions {
|
|
@@ -35,11 +35,14 @@ export interface WixEventLocation {
|
|
|
35
35
|
export interface WixEvent {
|
|
36
36
|
id: string;
|
|
37
37
|
title?: string;
|
|
38
|
-
/** Normally one of `WixEventStatus
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
38
|
+
/** Normally one of `WixEventStatus` — `UPCOMING` (published and scheduled to start),
|
|
39
|
+
* `STARTED`, `ENDED`, `CANCELED`, `DRAFT`. Events v1 called the first of those `SCHEDULED`,
|
|
40
|
+
* and this SDK reads v3, so a row here never carries `SCHEDULED`.
|
|
41
|
+
*
|
|
42
|
+
* Deliberately NOT narrowed to that union: `decodeEvent` fills this from the server's
|
|
43
|
+
* `status` and passes a value it does not recognise straight through, because dropping or
|
|
44
|
+
* rewriting one would lose a real event. A union here would be a claim this SDK cannot
|
|
45
|
+
* enforce. Compare against `WixEventStatus` when you need the set it knows. */
|
|
43
46
|
eventStatus?: string;
|
|
44
47
|
/** EventType: RSVP | TICKETS | EXTERNAL | NO_REGISTRATION */
|
|
45
48
|
eventType?: string;
|
|
@@ -59,9 +62,15 @@ export interface WixGetEventResponse {
|
|
|
59
62
|
}
|
|
60
63
|
export interface WixDeleteEventResponse {
|
|
61
64
|
}
|
|
62
|
-
/** The
|
|
63
|
-
* the `
|
|
64
|
-
*
|
|
65
|
+
/** The event statuses this SDK knows the server stores — the Events **v3** set, because that
|
|
66
|
+
* is the API `queryEvents` and `getEvent` call. `UPCOMING` is a published event that has not
|
|
67
|
+
* started; v1 called that one `SCHEDULED`, and v3 does not use that spelling at all, so a
|
|
68
|
+
* filter copied from v1 docs matches nothing. The one source for `WixEventStatus` below, so
|
|
69
|
+
* the two cannot drift.
|
|
70
|
+
*
|
|
71
|
+
* Known, not exhaustive. The server owns this list and versions it — it has already been
|
|
72
|
+
* renamed once, and v3 declares an `UNKNOWN_EVENT_STATUS` of its own — so nothing here
|
|
73
|
+
* refuses a value that is absent from it. Use it to recognise a status, never to reject one.
|
|
65
74
|
*
|
|
66
75
|
* Exported because `WixEventStatus` is declared in terms of it: the generated SDK reference
|
|
67
76
|
* ships each exported declaration verbatim, and a reader copying a type that names a symbol
|
|
@@ -69,12 +78,11 @@ export interface WixDeleteEventResponse {
|
|
|
69
78
|
*
|
|
70
79
|
* Frozen because `as const` is erased: it makes the TYPE readonly and leaves an ordinary
|
|
71
80
|
* mutable array behind. Unexported that was academic; exported it is not — module bindings
|
|
72
|
-
* share one array object, so a `push` from any untyped caller would edit the
|
|
73
|
-
*
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
* outside the set is refused while the call is being written rather than when it is made. */
|
|
81
|
+
* share one array object, so a `push` from any untyped caller would edit the set every
|
|
82
|
+
* caller in that realm reads. The freeze makes the runtime keep the promise the type makes. */
|
|
83
|
+
export declare const EVENT_STATUSES: readonly ["UPCOMING", "STARTED", "ENDED", "CANCELED", "DRAFT"];
|
|
84
|
+
/** One of the event statuses this SDK knows about. `WixQueryEventsOptions.statuses` accepts
|
|
85
|
+
* these and suggests them as you type, but does not require them — see that field. */
|
|
78
86
|
export type WixEventStatus = (typeof EVENT_STATUSES)[number];
|
|
79
87
|
export interface WixQueryEventsOptions {
|
|
80
88
|
/** Server-side WQL filter/sort for Events v3. Unlike the legacy convenience
|
|
@@ -94,13 +102,23 @@ export interface WixQueryEventsOptions {
|
|
|
94
102
|
limit?: number;
|
|
95
103
|
/** Page offset. */
|
|
96
104
|
offset?: number;
|
|
97
|
-
/** Status filter (e.g. `["
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
|
|
105
|
+
/** Status filter (e.g. `["UPCOMING"]`), matched exactly against each row's `eventStatus`.
|
|
106
|
+
* Omitted → all statuses returned; a value no row carries selects nothing.
|
|
107
|
+
*
|
|
108
|
+
* This route is Events **v3**, whose statuses are `UPCOMING` (published and scheduled to
|
|
109
|
+
* start), `STARTED`, `ENDED`, `CANCELED` and `DRAFT`. Events v1 named the first of those
|
|
110
|
+
* `SCHEDULED`, so a filter copied from v1 docs matches no row a v3 site returns — reach
|
|
111
|
+
* for `UPCOMING` instead.
|
|
112
|
+
*
|
|
113
|
+
* The type suggests `EVENT_STATUSES` without closing on them: the server owns that list and
|
|
114
|
+
* versions it, so a value it adds later must reach the match rather than be refused on the
|
|
115
|
+
* strength of a copy that has fallen behind. A status this SDK does not know is filtered on
|
|
116
|
+
* like any other and selects the rows that carry it — or none, which is the honest answer
|
|
117
|
+
* and one a caller can read.
|
|
118
|
+
*
|
|
119
|
+
* Applied to the fetched page, after paging. To filter server-side instead, use
|
|
120
|
+
* `query.filter`, which is passed through unchanged. */
|
|
121
|
+
statuses?: Array<WixEventStatus | (string & {})>;
|
|
104
122
|
/** Sort property (the Owner list orders by "start"). */
|
|
105
123
|
order?: string;
|
|
106
124
|
/** Free-text title search. */
|
|
@@ -8038,6 +8038,9 @@ function button(props, opts) {
|
|
|
8038
8038
|
function withModifiers(c, mods) {
|
|
8039
8039
|
return { ...c, modifiers: { ...c.modifiers, ...mods } };
|
|
8040
8040
|
}
|
|
8041
|
+
function withId(c, id) {
|
|
8042
|
+
return { ...c, id };
|
|
8043
|
+
}
|
|
8041
8044
|
function hiddenWhen(c, path) {
|
|
8042
8045
|
return withModifiers(c, { hiddenPath: path });
|
|
8043
8046
|
}
|
|
@@ -8455,13 +8458,12 @@ function deriveAppMeta(name, m, platforms = {}) {
|
|
|
8455
8458
|
|
|
8456
8459
|
// ../../core/sdui/src/screen-kit.ts
|
|
8457
8460
|
function skRect(height, id) {
|
|
8458
|
-
return withModifiers(zstack({ alignment: "center", children: [] }), {
|
|
8461
|
+
return withId(withModifiers(zstack({ alignment: "center", children: [] }), {
|
|
8459
8462
|
height,
|
|
8460
8463
|
background: { token: "surfaceSecondary" },
|
|
8461
8464
|
border: { width: 1, color: { token: "border" } },
|
|
8462
|
-
cornerRadius: 8
|
|
8463
|
-
|
|
8464
|
-
});
|
|
8465
|
+
cornerRadius: 8
|
|
8466
|
+
}), id);
|
|
8465
8467
|
}
|
|
8466
8468
|
function emptyBlock(service, titlePath, ctaTitle, ctaScreen, iconName, id, opts = {}) {
|
|
8467
8469
|
const children = [
|
|
@@ -8569,6 +8571,7 @@ export {
|
|
|
8569
8571
|
vstack,
|
|
8570
8572
|
webView,
|
|
8571
8573
|
wheelPicker,
|
|
8574
|
+
withId,
|
|
8572
8575
|
withModifiers,
|
|
8573
8576
|
withTheme,
|
|
8574
8577
|
workerSubtree,
|
|
@@ -242,7 +242,7 @@ function wixCall(method, path, body) {
|
|
|
242
242
|
return globalThis.himalaya.wixApi.call(method, path, body);
|
|
243
243
|
}
|
|
244
244
|
var BASE = "https://manage.wix.com/_api/wix-one-events-server/events-in-clubs";
|
|
245
|
-
var EVENT_STATUSES = Object.freeze(["
|
|
245
|
+
var EVENT_STATUSES = Object.freeze(["UPCOMING", "STARTED", "ENDED", "CANCELED", "DRAFT"]);
|
|
246
246
|
function decodeEvent(raw) {
|
|
247
247
|
if (raw == null) return raw;
|
|
248
248
|
const r = raw;
|
|
@@ -265,14 +265,6 @@ function eventStartMs(e) {
|
|
|
265
265
|
return Number.isNaN(ms) ? Number.POSITIVE_INFINITY : ms;
|
|
266
266
|
}
|
|
267
267
|
async function queryEvents(opts = {}) {
|
|
268
|
-
const unknown = (opts.statuses ?? []).filter((s) => !EVENT_STATUSES.includes(s));
|
|
269
|
-
if (unknown.length > 0) {
|
|
270
|
-
throw new Error(
|
|
271
|
-
// Quoted, so that a value whose defect is invisible unquoted — a stray space, an empty
|
|
272
|
-
// string — reads as the defect it is rather than as a name the reader has to doubt.
|
|
273
|
-
`queryEvents: unknown status ${unknown.map((s) => JSON.stringify(s)).join(", ")} \u2014 statuses must be one of ${EVENT_STATUSES.join(", ")}`
|
|
274
|
-
);
|
|
275
|
-
}
|
|
276
268
|
const limit = opts.limit ?? opts.query?.paging?.limit ?? 50;
|
|
277
269
|
const offset = opts.offset ?? opts.query?.paging?.offset ?? 0;
|
|
278
270
|
const res = await wixCall("POST", "/events/v3/events/query", { query: { ...opts.query, paging: { limit, offset } } });
|