@wix/himalaya-cli 0.1804.0 → 0.1806.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 +8 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +14 -0
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{fea87cf4a45bd9c7c2bc067b03e7d7a0ba320b18781d10153457cd5e2747b4b9.bin → 09e39aeb032cda05611bd7c888d3ae818f2fa89fc69705221b2dfcdf5ce5d704.bin} +1 -1
- package/dist/browser-plane/sw.js +8 -8
- package/dist/cli.mjs +148 -62
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/component-reference.json +2 -1
- package/guides/component-reference.md +16 -1
- package/guides/designing-himi-screens.md +10 -8
- package/guides/ios-ux.md +1 -1
- package/package.json +2 -2
|
Binary file
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"itemsPath",
|
|
43
43
|
"scrollToItemPath"
|
|
44
44
|
],
|
|
45
|
-
"propsSource": "export interface LazyListProps {\n items: Component[];\n horizontal?: boolean;\n spacing?: number;\n /** Motion grammar (Batch 1) — staggered entrance: each child's enter\n * transition/appear is delayed by index × staggerMs (ms). 0/absent = no\n * stagger. Gated by reduced motion.\n *\n * Honored on every renderer, on BOTH the static `items` and the service-bound\n * `itemsPath` paths. The delay modulates an ENTRANCE, so it only cascades a row\n * that carries a `transition`/`appear` — a delay on a row with no entrance\n * animates nothing. */\n staggerMs?: number;\n /** List enrichments. */\n onPullToRefresh?: Action;\n pagination?: Pagination;\n stickyHeader?: Component;\n rowSwipeActions?: SwipeActionSet;\n /**\n * Tier-5 service-bound list: a `$service:`-style path to an array in the\n * worker's state (e.g. \"ownerSites.sites\"). When set, `items[0]` is the row\n * TEMPLATE — instantiated once per array element with `$item.<field>`\n * substitution (ServiceBoundList). Requires a serviceProvider at render.\n */\n itemsPath?: string;\n /** Motion grammar (Phase-3, layout animation) — animate item insert/remove/reorder\n * as the list's contents change (needs stable `Component.id`s). Reduced-motion gated. */\n animateItems?: boolean;\n /**\n * #1054 (WS-3 scroll) — bottom-anchored / reversed layout. When true the list\n * lays out from the BOTTOM (item[0] at the bottom, later items stacking upward)\n * and rests scrolled to the bottom — a chat transcript / live caption that\n * pins to the latest without the 180°-rotation hack. Vertical lists only; not\n * combined with a `stickyHeader`.\n */\n reverseLayout?: boolean;\n /**\n * #1054 (WS-3 scroll) — content insets (points): pad the scroll CONTENT at the\n * top/bottom while the scroller still paints edge-to-edge, so rows scroll\n * *under* floating chrome (a translucent header/footer) instead of being\n * clipped. 0/absent ⇒ no inset.\n */\n contentInsetTop?: number;\n contentInsetBottom?: number;\n /**\n * Jump to a row of a bound (`itemsPath`) list: a `$service:` path whose value names a row by\n * its item's `id`. When the value CHANGES to a non-empty one, the row's top is brought to the\n * top of the visible area (the list's scroll, or the screen's when the list sits in it).\n * Only the part before the first \"|\" is the id, so a worker can re-trigger the same row\n * (\"cat:yoga|2\"). Unknown id ⇒ nothing.\n */\n scrollToItemPath?: string;\n /**\n * Fired with args `{ id }` when the bound row at the top of the visible area changes because\n * the user scrolled: on a change only, after the scroll settles, never for a\n * `scrollToItemPath` jump, not on first render. Rows with no `id` are skipped.\n */\n onTopItemChange?: Action;\n /**\n * Horizontal lists only — content insets (points) at the leading / trailing ends of the\n * scroll content, so a carousel can bleed to the screen edge while its first card still\n * starts at the page padding. Mirrors under RTL. Absent ⇒ 0 on every renderer (#5958 dropped\n * the 16 iOS's static `items` strip used to add). A vertical list ignores them.\n */\n contentInsetLeading?: number;\n contentInsetTrailing?: number;\n}"
|
|
45
|
+
"propsSource": "export interface LazyListProps {\n items: Component[];\n horizontal?: boolean;\n spacing?: number;\n /** Motion grammar (Batch 1) — staggered entrance: each child's enter\n * transition/appear is delayed by index × staggerMs (ms). 0/absent = no\n * stagger. Gated by reduced motion.\n *\n * Honored on every renderer, on BOTH the static `items` and the service-bound\n * `itemsPath` paths. The delay modulates an ENTRANCE, so it only cascades a row\n * that carries a `transition`/`appear` — a delay on a row with no entrance\n * animates nothing. */\n staggerMs?: number;\n /** List enrichments. */\n onPullToRefresh?: Action;\n pagination?: Pagination;\n stickyHeader?: Component;\n rowSwipeActions?: SwipeActionSet;\n /**\n * Tier-5 service-bound list: a `$service:`-style path to an array in the\n * worker's state (e.g. \"ownerSites.sites\"). When set, `items[0]` is the row\n * TEMPLATE — instantiated once per array element with `$item.<field>`\n * substitution (ServiceBoundList). Requires a serviceProvider at render.\n */\n itemsPath?: string;\n /** Motion grammar (Phase-3, layout animation) — animate item insert/remove/reorder\n * as the list's contents change (needs stable `Component.id`s). Reduced-motion gated. */\n animateItems?: boolean;\n /**\n * #1054 (WS-3 scroll) — bottom-anchored / reversed layout. When true the list\n * lays out from the BOTTOM (item[0] at the bottom, later items stacking upward)\n * and rests scrolled to the bottom — a chat transcript / live caption that\n * pins to the latest without the 180°-rotation hack. Vertical lists only; not\n * combined with a `stickyHeader`.\n */\n reverseLayout?: boolean;\n /**\n * #1054 (WS-3 scroll) — content insets (points): pad the scroll CONTENT at the\n * top/bottom while the scroller still paints edge-to-edge, so rows scroll\n * *under* floating chrome (a translucent header/footer) instead of being\n * clipped. 0/absent ⇒ no inset.\n */\n contentInsetTop?: number;\n contentInsetBottom?: number;\n /**\n * Jump to a row of a bound (`itemsPath`) list: a `$service:` path whose value names a row by\n * its item's `id`. When the value CHANGES to a non-empty one, the row's top is brought to the\n * top of the visible area (the list's scroll, or the screen's when the list sits in it).\n * Only the part before the first \"|\" is the id, so a worker can re-trigger the same row\n * (\"cat:yoga|2\"). Unknown id ⇒ nothing.\n */\n scrollToItemPath?: string;\n /**\n * Fired with args `{ id }` when the bound row at the top of the visible area changes because\n * the user scrolled: on a change only, after the scroll settles, never for a\n * `scrollToItemPath` jump, not on first render. Rows with no `id` are skipped.\n */\n onTopItemChange?: Action;\n /**\n * Horizontal lists only — content insets (points) at the leading / trailing ends of the\n * scroll content, so a carousel can bleed to the screen edge while its first card still\n * starts at the page padding. Mirrors under RTL. Absent ⇒ 0 on every renderer (#5958 dropped\n * the 16 iOS's static `items` strip used to add). A vertical list ignores them.\n */\n contentInsetLeading?: number;\n contentInsetTrailing?: number;\n /**\n * Vertical lists only — a line BETWEEN rows, never after the last one (Nano's member list: inset\n * dividers, none under the final row). Absent ⇒ no separators. A horizontal list ignores it.\n */\n separator?: ListSeparator;\n}"
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
"name": "Grid",
|
|
@@ -1300,6 +1300,7 @@
|
|
|
1300
1300
|
"TabItem": "export interface TabItem {\n id: string;\n label: string;\n badge?: string;\n}",
|
|
1301
1301
|
"PickerOption": "export interface PickerOption {\n id: string;\n label: string;\n /** #3801 — a colour chip before the label: a colour token name or \"#RRGGBB\". Drawn first. */\n swatch?: string;\n /** #3801 — a small remote thumbnail before the label (drawn when there is no swatch). */\n imageUrl?: string;\n /** #3801 — a leading icon name (drawn when there is no swatch or image). */\n icon?: IconRef;\n /** #3801 — shown but not choosable; never dispatched through `onChange`. */\n disabled?: boolean;\n}",
|
|
1302
1302
|
"PickerFieldStyle": "export interface PickerFieldStyle {\n borderColor?: string;\n borderWidth?: number;\n cornerRadius?: number;\n minHeight?: number;\n padding?: number;\n chevronIcon?: string;\n placeholderColor?: string;\n}",
|
|
1303
|
+
"ListSeparator": "export interface ListSeparator {\n /** Colour token; absent or unknown ⇒ \"border\". */\n color?: TokenRef;\n /** Thickness (pt); absent or < 1 ⇒ 1. */\n thickness?: number;\n /** Inset from the leading edge (pt), so the line starts under the row's text; mirrors under RTL. Absent ⇒ 0. */\n insetLeading?: number;\n}",
|
|
1303
1304
|
"AlertButtonRole": "export type AlertButtonRole = \"default\" | \"cancel\" | \"destructive\";",
|
|
1304
1305
|
"AlertButton": "export interface AlertButton {\n id: string;\n label: string;\n /** `\"cancel\"` (at most one) takes the cancel position and is what scrim/back/Esc dismissal\n * resolves as; `\"destructive\"` draws with the `danger` token. Default `\"default\"`. */\n role?: AlertButtonRole;\n /** Runs on press. */\n action?: Action;\n}",
|
|
1305
1306
|
"GaugeRing": "export interface GaugeRing {\n /** Fraction 0..1 for this ring. */\n value?: number;\n /** `$service:`/`$item.` binding → a live number (overrides `value`). */\n valuePath?: string;\n tint?: TokenName;\n}",
|
|
@@ -321,6 +321,11 @@ export interface LazyListProps {
|
|
|
321
321
|
*/
|
|
322
322
|
contentInsetLeading?: number;
|
|
323
323
|
contentInsetTrailing?: number;
|
|
324
|
+
/**
|
|
325
|
+
* Vertical lists only — a line BETWEEN rows, never after the last one (Nano's member list: inset
|
|
326
|
+
* dividers, none under the final row). Absent ⇒ no separators. A horizontal list ignores it.
|
|
327
|
+
*/
|
|
328
|
+
separator?: ListSeparator;
|
|
324
329
|
}
|
|
325
330
|
```
|
|
326
331
|
|
|
@@ -2611,7 +2616,8 @@ export interface LogicBundleRef {
|
|
|
2611
2616
|
A few props take a typed **object** rather than nested components. Some are arrays of them:
|
|
2612
2617
|
`FilterChips.chips` is a `FilterChip[]`, `SegmentedControl.options` / `Tabs.tabs` are a
|
|
2613
2618
|
`TabItem[]`, `Picker.options` / `WheelPicker.options` are a `PickerOption[]` (and
|
|
2614
|
-
`Picker.field` is a single `PickerFieldStyle`, the drawn field's look
|
|
2619
|
+
`Picker.field` is a single `PickerFieldStyle`, the drawn field's look, and `LazyList.separator` a
|
|
2620
|
+
single `ListSeparator`, the line between rows), and
|
|
2615
2621
|
`Gauge.rings` is a `GaugeRing[]` (concentric rings, drawn outer→inner), and
|
|
2616
2622
|
`RichContentEditor.tools` is a `RichContentEditorTool[]` (a fixed list of toolbar buttons), and
|
|
2617
2623
|
`AlertDialog.buttons` is an `AlertButton[]` (1–3 buttons, at most one `cancel`; it replaces
|
|
@@ -2661,6 +2667,15 @@ export interface PickerFieldStyle {
|
|
|
2661
2667
|
placeholderColor?: string;
|
|
2662
2668
|
}
|
|
2663
2669
|
|
|
2670
|
+
export interface ListSeparator {
|
|
2671
|
+
/** Colour token; absent or unknown ⇒ "border". */
|
|
2672
|
+
color?: TokenRef;
|
|
2673
|
+
/** Thickness (pt); absent or < 1 ⇒ 1. */
|
|
2674
|
+
thickness?: number;
|
|
2675
|
+
/** Inset from the leading edge (pt), so the line starts under the row's text; mirrors under RTL. Absent ⇒ 0. */
|
|
2676
|
+
insetLeading?: number;
|
|
2677
|
+
}
|
|
2678
|
+
|
|
2664
2679
|
export interface GaugeRing {
|
|
2665
2680
|
/** Fraction 0..1 for this ring. */
|
|
2666
2681
|
value?: number;
|
|
@@ -62,8 +62,8 @@ they decide what a phone screen looks like, and this guide decides how to compos
|
|
|
62
62
|
reaches 44, or use an `iconOnly` `Button` (`himi validate` warns: `touch_target_too_small`).
|
|
63
63
|
- **A wide surface gets its own layout, not the phone one stretched.** Do not count on the host
|
|
64
64
|
to narrow the screen: a tablet shows it full bleed at every width, and a `splitView` goes side
|
|
65
|
-
by side from
|
|
66
|
-
|
|
65
|
+
by side only from 840 points, so a tablet in portrait (an 834-point iPad, a 600 to 839dp Android
|
|
66
|
+
tablet) still shows it stacked. From the medium width (600 points: an
|
|
67
67
|
iPad or an Android tablet in portrait), each kind of screen changes shape itself:
|
|
68
68
|
- Photo tiles add columns (`columnsMedium: 3`, `columnsExpanded: 4`).
|
|
69
69
|
- A short, bounded set of rows (a day's schedule, a menu, a few sessions) becomes
|
|
@@ -78,10 +78,12 @@ they decide what a phone screen looks like, and this guide decides how to compos
|
|
|
78
78
|
splits from 600 on every platform.
|
|
79
79
|
- A short, bounded screen (a cart, a form, sign-in, settings) splits its parts with the same
|
|
80
80
|
grid: the items beside the order summary, the fields beside the explanation or the art, one
|
|
81
|
-
settings section beside the next. Do not centre a capped column with spacers
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
settings section beside the next. Do not centre a capped column with spacers: on iOS the
|
|
82
|
+
spacers take two thirds of the row and the column gets the rest. A `maxWidth` `vstack` inside a
|
|
83
|
+
`center` column is centred on iOS, macOS, Android and the web; on the web only a `vstack` is,
|
|
84
|
+
so put a capped card or row inside one. React Native leaves it at the leading edge. A long or paged list (a chat list, a feed) stays the scroll root (see Fast screens
|
|
85
|
+
below), with its rows at full width and the time or count in `trailing`, as Mail and Messages
|
|
86
|
+
draw a list on a tablet. That is the wide layout for it, not a stretched phone layout.
|
|
85
87
|
|
|
86
88
|
Render `--device tablet` (834 points) and `--device desktop` and look for a half of the screen
|
|
87
89
|
with nothing in it, or a row whose price sits a screen's width from its name. Space below
|
|
@@ -432,7 +434,7 @@ Concrete patterns lifted from real usage:
|
|
|
432
434
|
- **Photo tile** — `vstack({ spacing: 6, alignment: "leading", children: [ image({ url, fillWidth: true, aspectRatio: 0.8, contentMode: "fill", placeholder: "surfaceSecondary", contentDescription }) + cornerRadius 8, text(name, "body"), text(price, "callout", { color: "textSecondary" }) ] })` with `modifiers.onTap` on the stack, inside `grid({ columns: 2, columnsMedium: 3, columnsExpanded: 4, spacing: 12 })`. A shelf is the same tile at a fixed `width` (about 110) in `lazyList({ horizontal: true, spacing: 12 })`.
|
|
433
435
|
- **A website page with native UI around it** — `vstack({ children: [ header, sitePage(site, { path: "/book-online" }), stickyBar ] })`, where `site` is the app's `site` block (a `SiteShellConfig`) and `sitePage` comes from `@wix/himalaya/sdui`. It emits a `WebView` with `role: "primary"`, `fill`, its own scrolling, `modifiers.weight: 1` and the site preset as its config (the same URL and behaviour a site-shell tab gets; `webView: { … }` overrides it). `title` becomes the page's accessible name (`modifiers.accessibilityLabel`, which every `WebView` needs); without one the site's host is used. The weight gives the page only the height the header and bar leave. Put it at the screen root or directly in a root `VStack`, `HStack` or `ZStack`, and use one per screen. The validator rejects it inside a `LazyList`, `Pager`, `Carousel` or `CollapsingHeader`, or with its weight removed. A site-shell app already gets this form: `siteScreens(site)` gives each page both forms in one descriptor, the Tier-3 screen every app binary renders plus this tree in `payload`, which a newer binary draws instead. To put native UI around one page of a site-shell app and keep it working on older binaries, use `dualFormSiteScreen(defineSiteTab(site, page), vstack({ children: [ header, sitePage(site, { path: page.path, title: page.title }), stickyBar ] }))`. The page inside must load the same URL, with the same config and the same native capability scope (`capabilitiesRequired`), as the Tier-3 screen; `sitePage` scopes a page to no capability, as a site tab is. The validator checks all three (`dual_form_mismatch`), and the screen can carry no `logicBundle`. Older binaries draw only the Tier-3 page, without the header and bar. `siteScreens(site, { form: "node" })` serves the node form alone, for an app whose binaries all support it, and `desugarSiteScreen(descriptor)` converts one Tier-3 site screen. To let native UI follow the page (a cart badge, the page title), give the screen a `logicBundle` that declares `"webview"` and write `sitePage(site, { path, bridge: "worker" })`: the page talks to the worker through `@wix/himalaya/webview-page`, and the worker answers with `@himalaya/webview` ([webview-page-sdk.md](webview-page-sdk.md#a-site-page-that-talks-to-its-screens-worker)). Such a screen carries a worker, so it is a node-form screen (`sdui_layout`), not a dual-form one.
|
|
434
436
|
- **Overlay** — `zstack({ alignment: "center", children: [ backdropImage(cornerRadius 12), withModifiers(label, { padding, background: { token: "accentPrimary" }, cornerRadius: 10 }) ] })`.
|
|
435
|
-
- **Responsive** — `grid({ columns: 1, columnsMedium: 2, spacing: 12 })` for wide cards, 1-up on phone / 2-up on tablet (photo tiles start at 2 on a phone); `splitView({ primary, detail, primaryMaxWidth: 280 })` for master/detail (side by side from
|
|
437
|
+
- **Responsive** — `grid({ columns: 1, columnsMedium: 2, spacing: 12 })` for wide cards, 1-up on phone / 2-up on tablet (photo tiles start at 2 on a phone); `splitView({ primary, detail, primaryMaxWidth: 280 })` for master/detail (side by side from 840 points on iOS, macOS, Android and the web; React Native splits from 600 and shows only the primary pane below that); `contentMaxWidth` in tokens sets the measure only on the web host and in `himi render`; the native Mac window caps content at 920 points whatever it says, and a tablet applies no cap, so a tablet still needs the layout changes above.
|
|
436
438
|
- **Centered separator, not a flanked divider** — the classic "—— or ——" needs each `divider()` to take equal remaining width, and the HStack row-share only kicks in for controls with an intrinsic fill. **A bare `divider()` inside an HStack is a column separator, not a flanking line**: iOS, macOS, Android, web and React Native all draw it as a thin vertical rule the height of the row that takes no share of the width, which is right for a stats row (`12 | 340 | 87`) and wrong for "—— or ——". For "—— or ——", use a **centered caption**: `hstack({ children: [spacer(), text("or continue with", "caption", { color: "textSecondary" }), spacer()] })`, optionally over a single full-width `divider()`.
|
|
437
439
|
|
|
438
440
|
> **Intrinsic-fill controls grab the row.** `Button` and `TextField` have an intrinsic FILL, so the next four idioms are about NOT letting that surprise you (they were the papercuts every off-repo app hit):
|
|
@@ -757,7 +759,7 @@ one of the first three.
|
|
|
757
759
|
Lists & collections, says what "plain" means); the same list
|
|
758
760
|
as the screen's root, inside a `Card` or a nested stack, or carrying `stickyHeader`,
|
|
759
761
|
`rowSwipeActions`, `staggerMs`, `animateItems`, `reverseLayout`, content insets, negative `spacing`,
|
|
760
|
-
scroll anchors or modifiers, keeps every row it has built. Warning:
|
|
762
|
+
scroll anchors, a `separator` or modifiers, keeps every row it has built. Warning:
|
|
761
763
|
`paged_list_not_at_scroll_root`, for a list with `pagination` in any of those places.
|
|
762
764
|
- **Give every row a stable id.** Each item a worker returns for a list, grid or carousel carries its
|
|
763
765
|
own unique `id`. With one, a row keeps its identity when items are inserted or reordered. Without
|
package/guides/ios-ux.md
CHANGED
|
@@ -45,7 +45,7 @@ Android PNG. That is one descriptor, not a failed render.
|
|
|
45
45
|
| Destructive or blocking decision | An alert, with the destructive button styled as such. | `AlertDialog`, or a `ToolbarItem` with `role: "destructive"`. Confirm or offer undo. | [Alerts](https://developer.apple.com/design/human-interface-guidelines/alerts) |
|
|
46
46
|
| Success | Brief, non-blocking feedback. | `ui.snackbar` from the worker, not an alert. | [Feedback](https://developer.apple.com/design/human-interface-guidelines/feedback) |
|
|
47
47
|
| Search | A search field in the navigation bar. | `topBar.searchable` plus the page's own `SearchField` (or the row that holds it) with `hiddenPath: "$env:topBarSearch"`. The standard app shell draws that field; only a host with a native search handler hides it for the bar. A dedicated search screen when search starts a new task (`himi docs recipe-search`). | [Search fields](https://developer.apple.com/design/human-interface-guidelines/search-fields) |
|
|
48
|
-
| iPad and wide windows | Sidebar or split view for collections; a readable column for reading. | `Grid` `columns: 1, columnsMedium: 2` to put parts side by side from 600 points; `SplitView` (
|
|
48
|
+
| iPad and wide windows | Sidebar or split view for collections; a readable column for reading. | `Grid` `columns: 1, columnsMedium: 2` to put parts side by side from 600 points; `SplitView` only from 840 points (an iPad in landscape; it stacks in portrait). The iPad shell does not apply `contentMaxWidth`, so the screen changes shape itself (`designing-himi-screens`). Render at 834px and record the choice. | [Split views](https://developer.apple.com/design/human-interface-guidelines/split-views) |
|
|
49
49
|
| Type | The system text styles, scaled by Dynamic Type. | Typography tokens from the built-in ramp: `largeTitle`, `title1`–`title3`, `headline`, `body`, `bodyEmphasis`, `callout`, `caption`, `footnote`. No raw sizes. | [Typography](https://developer.apple.com/design/human-interface-guidelines/typography) |
|
|
50
50
|
| Touch targets | At least 44×44 points. | Use `Button`/`ListItem`; do not shrink an icon's hit area below that. | [Accessibility](https://developer.apple.com/design/human-interface-guidelines/accessibility) |
|
|
51
51
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1806.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
|
|
6
6
|
"keywords": [
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"artifactId": "himalaya-cli"
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
"falconPackageHash": "
|
|
85
|
+
"falconPackageHash": "e1a4debf93ec22299dea97df32b7a76d246f37693d3a0373e03e2ec7"
|
|
86
86
|
}
|