@wix/himalaya-cli 0.1416.0 → 0.1417.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 +2 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +23 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts +160 -36
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +49 -6
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +49 -6
- package/dist/cli.mjs +208 -50
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/component-reference.json +2 -2
- package/guides/component-reference.md +14 -2
- package/guides/headless-loop.md +4 -1
- package/package.json +2 -2
|
@@ -964,6 +964,8 @@ export declare function menu(props: {
|
|
|
964
964
|
itemsPath?: string;
|
|
965
965
|
/** RFC 0058 §4 — focus-trap tri-state; absent takes the Menu's default: modal. */
|
|
966
966
|
modal?: boolean;
|
|
967
|
+
/** Lifted above a `style: "context"` menu while it is open; ignored by the other styles. */
|
|
968
|
+
preview?: Component;
|
|
967
969
|
}, opts?: {
|
|
968
970
|
id?: string;
|
|
969
971
|
}): Component;
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts
CHANGED
|
@@ -22,6 +22,25 @@ export type Value = null | string | number | boolean | Value[] | {
|
|
|
22
22
|
[key: string]: Value;
|
|
23
23
|
};
|
|
24
24
|
export type Presentation = "push" | "sheet" | "replace" | "dismiss" | "back" | "full_screen" | "alert" | "snackbar";
|
|
25
|
+
/** `args` of a `{ actionId: "himi.lightbox" }` action — a full-screen image viewer. A reserved
|
|
26
|
+
* action id, not a `presentation` value: an older binary treats it as an unhandled action
|
|
27
|
+
* instead of failing to decode the screen. */
|
|
28
|
+
export interface LightboxImage {
|
|
29
|
+
url: string;
|
|
30
|
+
/** Spoken name of the image (and its fallback when it fails to load). */
|
|
31
|
+
alt?: string;
|
|
32
|
+
/** Shown under the image. */
|
|
33
|
+
caption?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface LightboxArgs {
|
|
36
|
+
/** The images to page through: a list, or a `$service:` / `$item.` binding to one. A bare url string is accepted per entry. */
|
|
37
|
+
images: (LightboxImage | string)[] | string;
|
|
38
|
+
/** 0-based page the viewer opens on. Default 0. */
|
|
39
|
+
startIndex?: number | string;
|
|
40
|
+
/** The tapped image's `modifiers.transitionId`. Carried for a future zoom from/back to the source:
|
|
41
|
+
* today every surface opens the viewer with a fade and a small scale-in. */
|
|
42
|
+
transitionId?: string;
|
|
43
|
+
}
|
|
25
44
|
export interface Action {
|
|
26
45
|
actionId: string;
|
|
27
46
|
/** Backwards-compatible string-only params. Prefer `args` for typed payloads. */
|
|
@@ -1362,6 +1381,10 @@ export interface MenuProps {
|
|
|
1362
1381
|
* `aria-modal`). TRI-STATE: absent takes the Menu's default — MODAL,
|
|
1363
1382
|
* from the one shared overlay default table — and an explicit `false` opts out. */
|
|
1364
1383
|
modal?: boolean;
|
|
1384
|
+
/** A preview lifted above the menu while a `style: "context"` menu is open (iOS
|
|
1385
|
+
* `.contextMenu(menuItems:preview:)`; Android and web draw it as a card over a scrim).
|
|
1386
|
+
* Absent ⇒ the anchor itself lifts. Ignored by the other styles. */
|
|
1387
|
+
preview?: Component;
|
|
1365
1388
|
}
|
|
1366
1389
|
export interface TooltipProps {
|
|
1367
1390
|
anchor?: Component;
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts
CHANGED
|
@@ -255,31 +255,93 @@ export declare const screenDescriptorSchema: {
|
|
|
255
255
|
readonly enum: readonly ["push", "sheet", "replace", "dismiss", "back", "full_screen", "alert", "snackbar"];
|
|
256
256
|
};
|
|
257
257
|
};
|
|
258
|
-
readonly
|
|
259
|
-
readonly
|
|
260
|
-
readonly
|
|
261
|
-
readonly
|
|
258
|
+
readonly allOf: readonly [{
|
|
259
|
+
readonly if: {
|
|
260
|
+
readonly properties: {
|
|
261
|
+
readonly presentation: {
|
|
262
|
+
readonly const: "sheet";
|
|
263
|
+
};
|
|
262
264
|
};
|
|
265
|
+
readonly required: readonly ["presentation"];
|
|
263
266
|
};
|
|
264
|
-
readonly
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
readonly
|
|
267
|
+
readonly then: {
|
|
268
|
+
readonly properties: {
|
|
269
|
+
readonly args: {
|
|
270
|
+
readonly properties: {
|
|
271
|
+
readonly detents: {
|
|
272
|
+
readonly type: "array";
|
|
273
|
+
readonly items: {
|
|
274
|
+
readonly type: "number";
|
|
275
|
+
readonly exclusiveMinimum: 0;
|
|
276
|
+
readonly maximum: 1;
|
|
277
|
+
};
|
|
278
|
+
readonly minItems: 1;
|
|
276
279
|
};
|
|
277
|
-
readonly minItems: 1;
|
|
278
280
|
};
|
|
279
281
|
};
|
|
280
282
|
};
|
|
281
283
|
};
|
|
282
|
-
}
|
|
284
|
+
}, {
|
|
285
|
+
readonly if: {
|
|
286
|
+
readonly properties: {
|
|
287
|
+
readonly actionId: {
|
|
288
|
+
readonly const: "himi.lightbox";
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
readonly required: readonly ["actionId"];
|
|
292
|
+
};
|
|
293
|
+
readonly then: {
|
|
294
|
+
readonly required: readonly ["args"];
|
|
295
|
+
readonly properties: {
|
|
296
|
+
readonly args: {
|
|
297
|
+
readonly required: readonly ["images"];
|
|
298
|
+
readonly properties: {
|
|
299
|
+
readonly images: {
|
|
300
|
+
readonly anyOf: readonly [{
|
|
301
|
+
readonly type: "string";
|
|
302
|
+
readonly pattern: "^\\$(service:|item\\.)";
|
|
303
|
+
}, {
|
|
304
|
+
readonly type: "array";
|
|
305
|
+
readonly minItems: 1;
|
|
306
|
+
readonly items: {
|
|
307
|
+
readonly anyOf: readonly [{
|
|
308
|
+
readonly type: "string";
|
|
309
|
+
readonly minLength: 1;
|
|
310
|
+
}, {
|
|
311
|
+
readonly type: "object";
|
|
312
|
+
readonly required: readonly ["url"];
|
|
313
|
+
readonly properties: {
|
|
314
|
+
readonly url: {
|
|
315
|
+
readonly type: "string";
|
|
316
|
+
readonly minLength: 1;
|
|
317
|
+
};
|
|
318
|
+
readonly alt: {
|
|
319
|
+
readonly type: "string";
|
|
320
|
+
};
|
|
321
|
+
readonly caption: {
|
|
322
|
+
readonly type: "string";
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
}];
|
|
326
|
+
};
|
|
327
|
+
}];
|
|
328
|
+
};
|
|
329
|
+
readonly startIndex: {
|
|
330
|
+
readonly anyOf: readonly [{
|
|
331
|
+
readonly type: "integer";
|
|
332
|
+
readonly minimum: 0;
|
|
333
|
+
}, {
|
|
334
|
+
readonly type: "string";
|
|
335
|
+
}];
|
|
336
|
+
};
|
|
337
|
+
readonly transitionId: {
|
|
338
|
+
readonly type: "string";
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
}];
|
|
283
345
|
};
|
|
284
346
|
readonly topBarConfig: {
|
|
285
347
|
readonly type: "object";
|
|
@@ -1443,31 +1505,93 @@ export declare const widgetSnapshotSchema: {
|
|
|
1443
1505
|
readonly enum: readonly ["push", "sheet", "replace", "dismiss", "back", "full_screen", "alert", "snackbar"];
|
|
1444
1506
|
};
|
|
1445
1507
|
};
|
|
1446
|
-
readonly
|
|
1447
|
-
readonly
|
|
1448
|
-
readonly
|
|
1449
|
-
readonly
|
|
1508
|
+
readonly allOf: readonly [{
|
|
1509
|
+
readonly if: {
|
|
1510
|
+
readonly properties: {
|
|
1511
|
+
readonly presentation: {
|
|
1512
|
+
readonly const: "sheet";
|
|
1513
|
+
};
|
|
1450
1514
|
};
|
|
1515
|
+
readonly required: readonly ["presentation"];
|
|
1451
1516
|
};
|
|
1452
|
-
readonly
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
readonly
|
|
1517
|
+
readonly then: {
|
|
1518
|
+
readonly properties: {
|
|
1519
|
+
readonly args: {
|
|
1520
|
+
readonly properties: {
|
|
1521
|
+
readonly detents: {
|
|
1522
|
+
readonly type: "array";
|
|
1523
|
+
readonly items: {
|
|
1524
|
+
readonly type: "number";
|
|
1525
|
+
readonly exclusiveMinimum: 0;
|
|
1526
|
+
readonly maximum: 1;
|
|
1527
|
+
};
|
|
1528
|
+
readonly minItems: 1;
|
|
1464
1529
|
};
|
|
1465
|
-
readonly minItems: 1;
|
|
1466
1530
|
};
|
|
1467
1531
|
};
|
|
1468
1532
|
};
|
|
1469
1533
|
};
|
|
1470
|
-
}
|
|
1534
|
+
}, {
|
|
1535
|
+
readonly if: {
|
|
1536
|
+
readonly properties: {
|
|
1537
|
+
readonly actionId: {
|
|
1538
|
+
readonly const: "himi.lightbox";
|
|
1539
|
+
};
|
|
1540
|
+
};
|
|
1541
|
+
readonly required: readonly ["actionId"];
|
|
1542
|
+
};
|
|
1543
|
+
readonly then: {
|
|
1544
|
+
readonly required: readonly ["args"];
|
|
1545
|
+
readonly properties: {
|
|
1546
|
+
readonly args: {
|
|
1547
|
+
readonly required: readonly ["images"];
|
|
1548
|
+
readonly properties: {
|
|
1549
|
+
readonly images: {
|
|
1550
|
+
readonly anyOf: readonly [{
|
|
1551
|
+
readonly type: "string";
|
|
1552
|
+
readonly pattern: "^\\$(service:|item\\.)";
|
|
1553
|
+
}, {
|
|
1554
|
+
readonly type: "array";
|
|
1555
|
+
readonly minItems: 1;
|
|
1556
|
+
readonly items: {
|
|
1557
|
+
readonly anyOf: readonly [{
|
|
1558
|
+
readonly type: "string";
|
|
1559
|
+
readonly minLength: 1;
|
|
1560
|
+
}, {
|
|
1561
|
+
readonly type: "object";
|
|
1562
|
+
readonly required: readonly ["url"];
|
|
1563
|
+
readonly properties: {
|
|
1564
|
+
readonly url: {
|
|
1565
|
+
readonly type: "string";
|
|
1566
|
+
readonly minLength: 1;
|
|
1567
|
+
};
|
|
1568
|
+
readonly alt: {
|
|
1569
|
+
readonly type: "string";
|
|
1570
|
+
};
|
|
1571
|
+
readonly caption: {
|
|
1572
|
+
readonly type: "string";
|
|
1573
|
+
};
|
|
1574
|
+
};
|
|
1575
|
+
}];
|
|
1576
|
+
};
|
|
1577
|
+
}];
|
|
1578
|
+
};
|
|
1579
|
+
readonly startIndex: {
|
|
1580
|
+
readonly anyOf: readonly [{
|
|
1581
|
+
readonly type: "integer";
|
|
1582
|
+
readonly minimum: 0;
|
|
1583
|
+
}, {
|
|
1584
|
+
readonly type: "string";
|
|
1585
|
+
}];
|
|
1586
|
+
};
|
|
1587
|
+
readonly transitionId: {
|
|
1588
|
+
readonly type: "string";
|
|
1589
|
+
};
|
|
1590
|
+
};
|
|
1591
|
+
};
|
|
1592
|
+
};
|
|
1593
|
+
};
|
|
1594
|
+
}];
|
|
1471
1595
|
};
|
|
1472
1596
|
readonly topBarConfig: {
|
|
1473
1597
|
readonly type: "object";
|
|
@@ -8265,16 +8265,59 @@ var screenDescriptorSchema = {
|
|
|
8265
8265
|
// key: every router reads it as numbers, so a string list would silently present the default
|
|
8266
8266
|
// sheet. Only a sheet reads it — on any other action `detents` is opaque payload, like the
|
|
8267
8267
|
// rest of `args`, and must not reject the descriptor.
|
|
8268
|
-
|
|
8269
|
-
|
|
8270
|
-
|
|
8271
|
-
|
|
8268
|
+
allOf: [
|
|
8269
|
+
{
|
|
8270
|
+
if: { properties: { presentation: { const: "sheet" } }, required: ["presentation"] },
|
|
8271
|
+
then: {
|
|
8272
8272
|
properties: {
|
|
8273
|
-
|
|
8273
|
+
args: {
|
|
8274
|
+
properties: {
|
|
8275
|
+
detents: { type: "array", items: { type: "number", exclusiveMinimum: 0, maximum: 1 }, minItems: 1 }
|
|
8276
|
+
}
|
|
8277
|
+
}
|
|
8278
|
+
}
|
|
8279
|
+
}
|
|
8280
|
+
},
|
|
8281
|
+
// A LIGHTBOX (`actionId: "himi.lightbox"`, a reserved id rather than a presentation verb)
|
|
8282
|
+
// has no screenId; its content is `args.images`. Every router drops it without them, so a
|
|
8283
|
+
// lightbox with no images is an authoring error, not a silent no-op.
|
|
8284
|
+
// `images` is a list of {url, alt?, caption?} (or bare urls), or one `$service:` /
|
|
8285
|
+
// `$item.` binding the renderer resolves to that list.
|
|
8286
|
+
{
|
|
8287
|
+
if: { properties: { actionId: { const: "himi.lightbox" } }, required: ["actionId"] },
|
|
8288
|
+
then: {
|
|
8289
|
+
required: ["args"],
|
|
8290
|
+
properties: {
|
|
8291
|
+
args: {
|
|
8292
|
+
required: ["images"],
|
|
8293
|
+
properties: {
|
|
8294
|
+
images: {
|
|
8295
|
+
anyOf: [
|
|
8296
|
+
{ type: "string", pattern: "^\\$(service:|item\\.)" },
|
|
8297
|
+
{
|
|
8298
|
+
type: "array",
|
|
8299
|
+
minItems: 1,
|
|
8300
|
+
items: {
|
|
8301
|
+
anyOf: [
|
|
8302
|
+
{ type: "string", minLength: 1 },
|
|
8303
|
+
{
|
|
8304
|
+
type: "object",
|
|
8305
|
+
required: ["url"],
|
|
8306
|
+
properties: { url: { type: "string", minLength: 1 }, alt: { type: "string" }, caption: { type: "string" } }
|
|
8307
|
+
}
|
|
8308
|
+
]
|
|
8309
|
+
}
|
|
8310
|
+
}
|
|
8311
|
+
]
|
|
8312
|
+
},
|
|
8313
|
+
startIndex: { anyOf: [{ type: "integer", minimum: 0 }, { type: "string" }] },
|
|
8314
|
+
transitionId: { type: "string" }
|
|
8315
|
+
}
|
|
8316
|
+
}
|
|
8274
8317
|
}
|
|
8275
8318
|
}
|
|
8276
8319
|
}
|
|
8277
|
-
|
|
8320
|
+
]
|
|
8278
8321
|
},
|
|
8279
8322
|
// RFC 0010 (top-bar amendment) — shell-owned top bar + its trailing actions.
|
|
8280
8323
|
// `leading`/`style` are free strings (safe-decode; the shell coalesces
|
|
@@ -7135,16 +7135,59 @@ var screenDescriptorSchema = {
|
|
|
7135
7135
|
// key: every router reads it as numbers, so a string list would silently present the default
|
|
7136
7136
|
// sheet. Only a sheet reads it — on any other action `detents` is opaque payload, like the
|
|
7137
7137
|
// rest of `args`, and must not reject the descriptor.
|
|
7138
|
-
|
|
7139
|
-
|
|
7140
|
-
|
|
7141
|
-
|
|
7138
|
+
allOf: [
|
|
7139
|
+
{
|
|
7140
|
+
if: { properties: { presentation: { const: "sheet" } }, required: ["presentation"] },
|
|
7141
|
+
then: {
|
|
7142
7142
|
properties: {
|
|
7143
|
-
|
|
7143
|
+
args: {
|
|
7144
|
+
properties: {
|
|
7145
|
+
detents: { type: "array", items: { type: "number", exclusiveMinimum: 0, maximum: 1 }, minItems: 1 }
|
|
7146
|
+
}
|
|
7147
|
+
}
|
|
7148
|
+
}
|
|
7149
|
+
}
|
|
7150
|
+
},
|
|
7151
|
+
// A LIGHTBOX (`actionId: "himi.lightbox"`, a reserved id rather than a presentation verb)
|
|
7152
|
+
// has no screenId; its content is `args.images`. Every router drops it without them, so a
|
|
7153
|
+
// lightbox with no images is an authoring error, not a silent no-op.
|
|
7154
|
+
// `images` is a list of {url, alt?, caption?} (or bare urls), or one `$service:` /
|
|
7155
|
+
// `$item.` binding the renderer resolves to that list.
|
|
7156
|
+
{
|
|
7157
|
+
if: { properties: { actionId: { const: "himi.lightbox" } }, required: ["actionId"] },
|
|
7158
|
+
then: {
|
|
7159
|
+
required: ["args"],
|
|
7160
|
+
properties: {
|
|
7161
|
+
args: {
|
|
7162
|
+
required: ["images"],
|
|
7163
|
+
properties: {
|
|
7164
|
+
images: {
|
|
7165
|
+
anyOf: [
|
|
7166
|
+
{ type: "string", pattern: "^\\$(service:|item\\.)" },
|
|
7167
|
+
{
|
|
7168
|
+
type: "array",
|
|
7169
|
+
minItems: 1,
|
|
7170
|
+
items: {
|
|
7171
|
+
anyOf: [
|
|
7172
|
+
{ type: "string", minLength: 1 },
|
|
7173
|
+
{
|
|
7174
|
+
type: "object",
|
|
7175
|
+
required: ["url"],
|
|
7176
|
+
properties: { url: { type: "string", minLength: 1 }, alt: { type: "string" }, caption: { type: "string" } }
|
|
7177
|
+
}
|
|
7178
|
+
]
|
|
7179
|
+
}
|
|
7180
|
+
}
|
|
7181
|
+
]
|
|
7182
|
+
},
|
|
7183
|
+
startIndex: { anyOf: [{ type: "integer", minimum: 0 }, { type: "string" }] },
|
|
7184
|
+
transitionId: { type: "string" }
|
|
7185
|
+
}
|
|
7186
|
+
}
|
|
7144
7187
|
}
|
|
7145
7188
|
}
|
|
7146
7189
|
}
|
|
7147
|
-
|
|
7190
|
+
]
|
|
7148
7191
|
},
|
|
7149
7192
|
// RFC 0010 (top-bar amendment) — shell-owned top bar + its trailing actions.
|
|
7150
7193
|
// `leading`/`style` are free strings (safe-decode; the shell coalesces
|