@wix/himalaya-cli 0.1823.0 → 0.1825.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/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{c79b92a1e079fa690016cbfe1b407af2be8280da71314a65e1077c127b00f4c4.bin → e44b8b1db6e556b34b518a5b036c3444bcc7ade9d9908576ebe14e5ecce16f29.bin} +1 -1
- package/dist/browser-plane/sw.js +7 -7
- package/dist/cli.mjs +1079 -827
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/designing-himi-screens.md +16 -4
- package/package.json +2 -2
|
Binary file
|
|
@@ -33,6 +33,9 @@ they decide what a phone screen looks like, and this guide decides how to compos
|
|
|
33
33
|
never a filled one: a filled button on every row is a wall of primary buttons, and `himi
|
|
34
34
|
validate` warns about it (`repeated_prominent_row_action`). One featured object may be a single
|
|
35
35
|
`Card`.
|
|
36
|
+
- **A row's trailing meta sits at the same height on every row.** A two-part meta (a time and an
|
|
37
|
+
unread count) is a hand-built row with the time on the name line and the badge on the preview
|
|
38
|
+
line, as Messages and Gmail draw it (recipe in §4); a one-part meta is a `ListItem` `trailing`.
|
|
36
39
|
- **When people choose by the photo, the photo leads.** Products, books, a portfolio and projects
|
|
37
40
|
are image tiles, not rows with a small thumbnail: a `Grid` with `columns: 2` (`columnsMedium: 3`,
|
|
38
41
|
`columnsExpanded: 4`) for products and projects, `columns: 3` with `spacing: 2` and no captions
|
|
@@ -57,6 +60,8 @@ they decide what a phone screen looks like, and this guide decides how to compos
|
|
|
57
60
|
- **The step that finishes the task sits in `stickyFooter`** — one primary `Button`, not a button
|
|
58
61
|
inside the last card. It is the screen's only filled button; every other one is `tonal`,
|
|
59
62
|
`secondary` or `tertiary` (`himi validate` warns on two filled buttons: `multiple_prominent_actions`).
|
|
63
|
+
The one exception is a screen that splits into columns on a tablet, where the button moves into
|
|
64
|
+
the column it finishes (see Tablets below).
|
|
60
65
|
- **Every tap target is at least 44 points** (48 dp on Android). A `Button` grows its own hit area;
|
|
61
66
|
an `Icon`, an `Image` or a stack with `modifiers.onTap` does not, so give it `padding` until it
|
|
62
67
|
reaches 44, or use an `iconOnly` `Button` (`himi validate` warns: `touch_target_too_small`).
|
|
@@ -78,10 +83,16 @@ they decide what a phone screen looks like, and this guide decides how to compos
|
|
|
78
83
|
splits from 600 on every platform.
|
|
79
84
|
- A short, bounded screen (a cart, a form, sign-in, settings) splits its parts with the same
|
|
80
85
|
grid: the items beside the order summary, the fields beside the explanation or the art, one
|
|
81
|
-
settings section beside the next.
|
|
82
|
-
|
|
83
|
-
`
|
|
84
|
-
|
|
86
|
+
settings section beside the next. When a screen splits like this, the step that finishes it
|
|
87
|
+
stays with the part it finishes: the summary `card` ends with the total and the primary
|
|
88
|
+
`Button`, and the screen has no `stickyFooter`. A footer bar across both columns is a phone bar
|
|
89
|
+
stretched under the split, far from the summary it belongs to; the summary's own button is how
|
|
90
|
+
a store's cart draws on a tablet. On a phone the grid stacks and that card is the last thing in
|
|
91
|
+
the scroll, which is where the total and the button are expected. Keep `stickyFooter` for a
|
|
92
|
+
screen that is one column on every width. Do not centre a capped column with spacers: on iOS the
|
|
93
|
+
spacers take two thirds of the row and the column gets the rest. A `maxWidth` `vstack`, `card`,
|
|
94
|
+
`hstack` or `zstack` inside a `center` column is centred on iOS, macOS, Android and the web.
|
|
95
|
+
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
96
|
below), with its rows at full width and the time or count in `trailing`, as Mail and Messages
|
|
86
97
|
draw a list on a tablet. That is the wide layout for it, not a stretched phone layout.
|
|
87
98
|
|
|
@@ -431,6 +442,7 @@ Concrete patterns lifted from real usage:
|
|
|
431
442
|
- *Still saving:* give Save an `onLoadingTimeout` next to its `loadingPath`; the shell shows "Still saving…" at 10 s and calls it at 30 s so the worker can show the failed state.
|
|
432
443
|
- *Modes:* `selection: { activePath, countPath, onClose, items }` for bulk actions ("3 selected"), `edit: { activePath, onEdit, onDone, onCancel }` with `dirtyPath` for in-place editing. Bind each `activePath` to a worker bool; the bar swaps itself while it is true.
|
|
433
444
|
- **Cell list** — one `Section` with `inset: true` and a `header`, its children the `ListItem` cells; the cells own their own dividers and padding. A schedule, a service menu and a session list are this shape too, not a `Card` around each item.
|
|
445
|
+
- **Inbox row with a two-part meta** — `ListItem` centres `trailing` on the row, so a time alone sits mid-row while a time-over-badge stack sits higher, and the trailing column jumps from row to row down an inbox. When the meta has two parts (a time and an unread count, a price and a status), build the row yourself with the time on the name line and the badge on the preview line, as Messages and Gmail draw it: `hstack({ alignment: "leading", spacing: 12, children: [avatar, vstack({ spacing: 2, children: [hstack({ children: [name, spacer(), time] }), hstack({ children: [preview, spacer(), badge] })] })] })`, with `maxLines: 1` on the name and the preview. Every row keeps that shape; a row without a badge leaves the slot empty rather than changing layout. A one-part meta (a price, a chevron, a value) is a `ListItem` with it in `trailing`.
|
|
434
446
|
- **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 })`.
|
|
435
447
|
- **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.
|
|
436
448
|
- **Overlay** — `zstack({ alignment: "center", children: [ backdropImage(cornerRadius 12), withModifiers(label, { padding, background: { token: "accentPrimary" }, cornerRadius: 10 }) ] })`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1825.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": "3d4780e708fb2bd30472b34c3e2148c6983c5e459209d85755d35184"
|
|
86
86
|
}
|