@wix/himalaya-cli 0.1612.0 → 0.1613.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 +5 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +12 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +4 -2
- package/dist/cli.mjs +609 -104
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/component-reference.json +6 -3
- package/guides/component-reference.md +13 -2
- package/guides/getting-started.md +3 -2
- package/guides/himi-json-output.md +3 -0
- package/guides/himi-skill.md +3 -2
- package/guides/himi-test.md +65 -2
- package/guides/one-app-to-himi-app.md +1 -1
- package/guides/recipe-form-submit.md +9 -0
- package/package.json +2 -2
- package/stdlib/fonts/catalog.json +141 -0
|
@@ -910,6 +910,7 @@ export declare function segmentedControl(props: {
|
|
|
910
910
|
export declare function carousel(props: {
|
|
911
911
|
items: Component[];
|
|
912
912
|
paged?: boolean;
|
|
913
|
+
/** #4673 — `$service:` page index, two-way with onChange (literal or `paged` bound pages). */
|
|
913
914
|
currentIndexPath?: string;
|
|
914
915
|
currentIndex?: number;
|
|
915
916
|
onChange?: ActionShape;
|
|
@@ -925,6 +926,10 @@ export declare function pager(props: {
|
|
|
925
926
|
onChange?: ActionShape;
|
|
926
927
|
showIndicator?: boolean;
|
|
927
928
|
liveWindow?: number;
|
|
929
|
+
/** #4673 — `$service:` page index, two-way with onChange. */
|
|
930
|
+
currentIndexPath?: string;
|
|
931
|
+
/** #4673 — `$service:` array; pages[0] is the page template ($item.* substitution). */
|
|
932
|
+
pagesPath?: string;
|
|
928
933
|
}, opts?: {
|
|
929
934
|
id?: string;
|
|
930
935
|
}): Component;
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts
CHANGED
|
@@ -1278,7 +1278,12 @@ export interface SegmentedControlProps {
|
|
|
1278
1278
|
export interface CarouselProps {
|
|
1279
1279
|
/** Opt-in paging for itemsPath; absent preserves the horizontal card rail. */
|
|
1280
1280
|
paged?: boolean;
|
|
1281
|
-
/**
|
|
1281
|
+
/** #4673 — `$service:` path to the page index, two-way with `onChange`: a CHANGE of the resolved
|
|
1282
|
+
* value animates the carousel there (instantly under reduced motion); a swipe still fires
|
|
1283
|
+
* `onChange` with `args.index`, which the worker writes back. Out of range ⇒ clamped; not an
|
|
1284
|
+
* integer ⇒ ignored; equal to the current page ⇒ nothing; a move the binding made fires no
|
|
1285
|
+
* `onChange`. Drives literal `items` and `paged` bound ones; inside a bound row a substituted
|
|
1286
|
+
* literal places the page like `currentIndex`. A rail (`itemsPath` without `paged`) ignores it. */
|
|
1282
1287
|
currentIndexPath?: string;
|
|
1283
1288
|
items: Component[];
|
|
1284
1289
|
currentIndex?: number;
|
|
@@ -1296,6 +1301,12 @@ export interface PagerProps {
|
|
|
1296
1301
|
showIndicator?: boolean;
|
|
1297
1302
|
/** RFC 0073 §4.5 — as {@link CarouselProps.liveWindow}. */
|
|
1298
1303
|
liveWindow?: number;
|
|
1304
|
+
/** #4673 — as {@link CarouselProps.currentIndexPath}: a worker-driven page, two-way with `onChange`. */
|
|
1305
|
+
currentIndexPath?: string;
|
|
1306
|
+
/** #4673 — `$service:` path to an array: `pages[0]` is the page TEMPLATE, instantiated once per
|
|
1307
|
+
* element with `$item.` substitution (as `Carousel.itemsPath`). Pages are keyed by `$item.id`, so
|
|
1308
|
+
* the page on screen stays on screen when items are inserted before it. */
|
|
1309
|
+
pagesPath?: string;
|
|
1299
1310
|
}
|
|
1300
1311
|
export interface StepIndicatorProps {
|
|
1301
1312
|
steps: string[];
|
|
@@ -14883,6 +14883,7 @@ var propsOf = (c) => {
|
|
|
14883
14883
|
return isRec(p) ? p : {};
|
|
14884
14884
|
};
|
|
14885
14885
|
var hasItemsPath = (props) => typeof props.itemsPath === "string" && props.itemsPath !== "";
|
|
14886
|
+
var hasPagesPath = (props) => typeof props.pagesPath === "string" && /^\$(service|app):/.test(props.pagesPath);
|
|
14886
14887
|
function childComponents(value, path, inTemplate, out) {
|
|
14887
14888
|
if (Array.isArray(value)) {
|
|
14888
14889
|
value.forEach((v, i) => childComponents(v, `${path}[${i}]`, inTemplate, out));
|
|
@@ -14899,9 +14900,10 @@ function childrenOf(c, path, inTemplate) {
|
|
|
14899
14900
|
const props = propsOf(c);
|
|
14900
14901
|
const type = typeOf(c);
|
|
14901
14902
|
const boundList = (type === "LazyList" || type === "Grid" || type === "Carousel") && hasItemsPath(props);
|
|
14903
|
+
const boundPages = type === "Pager" && hasPagesPath(props);
|
|
14902
14904
|
const out = [];
|
|
14903
14905
|
for (const [k, v] of Object.entries(props)) {
|
|
14904
|
-
const templ = inTemplate || /Template$/.test(k) || boundList && k === "items";
|
|
14906
|
+
const templ = inTemplate || /Template$/.test(k) || boundList && k === "items" || boundPages && k === "pages";
|
|
14905
14907
|
childComponents(v, `${path}.body.props.${k}`, templ, out);
|
|
14906
14908
|
}
|
|
14907
14909
|
return out;
|
|
@@ -14949,7 +14951,7 @@ function mountable(c, inTemplate = false) {
|
|
|
14949
14951
|
const pages = type === "Carousel" ? props.items : props.pages;
|
|
14950
14952
|
const perPage = Array.isArray(pages) ? pages.map((p) => isComponent(p) ? mountable(p) : 0) : [];
|
|
14951
14953
|
const window = typeof props.liveWindow === "number" && props.liveWindow > 0 ? Math.floor(props.liveWindow) : 0;
|
|
14952
|
-
const bound = type === "Carousel"
|
|
14954
|
+
const bound = type === "Carousel" ? hasItemsPath(props) : hasPagesPath(props);
|
|
14953
14955
|
if (bound) {
|
|
14954
14956
|
const template = perPage[0] ?? 0;
|
|
14955
14957
|
if (template === 0) return 0;
|