@wix/himalaya-cli 0.1686.0 → 0.1687.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.
Binary file
@@ -25,8 +25,8 @@ in `MOBILE-UX.md`. Per-platform *look* — type face, corner radius, spacing —
25
25
  `material` token overlay (see **Idiom overlay** in `himi docs ios-ux`), not a second screen.
26
26
  The overlay may change type face, radius and spacing; it may not change a brand colour.
27
27
  `himi render --platform android` changes the switch, the segmented button, the section look, and the type face,
28
- and at a phone width (`--device pixel`, or `--width` under 600) draws the status bar, the back arrow on a pushed screen and the Material navigation bar
29
- (`--no-frame` for the bare screen). Today's Android shell draws no top app bar, so the render draws none. The frame does not draw a top-bar logo, a kit tab bar (`tabBar.presentation: "kit"`), custom tab-bar colours, or labels, icons and visibility the app's nav worker sets; judge those on a simulator.
28
+ and at a phone width (`--device pixel`, or `--width` under 600) draws the status bar, the Material top app bar (the back arrow on a pushed screen, the screen's
29
+ `title` beside it) and the Material navigation bar (`--no-frame` for the bare screen). The frame does not draw a top-bar logo, a kit tab bar (`tabBar.presentation: "kit"`), custom tab-bar colours, or labels, icons and visibility the app's nav worker sets; judge those on a simulator.
30
30
  A list or a grid looks the same in the iPhone PNG. That is one descriptor, not a failed render.
31
31
 
32
32
  ## Patterns
@@ -34,7 +34,7 @@ A list or a grid looks the same in the iPhone PNG. That is one descriptor, not a
34
34
  | Decision | Do this on Android | Himi mapping | Android source |
35
35
  | --- | --- | --- | --- |
36
36
  | Top-level destinations | Navigation bar of three to five destinations on a phone. | `navigation` tabs in `config.ts` (`himi docs app-config`); the shell draws the bar. | [Navigation bar](https://m3.material.io/components/navigation-bar/guidelines) |
37
- | Screen title | Top app bar with the screen title. | Set the screen's `title`. Do not repeat it, or the app name, as Text in the body in any style. Today's Android shell leaves the top-bar title slot empty, so a body title would show twice on iPhone and still not as a bar title here. A group's name is the `Section` `header`. A render with no large heading at the top is correct when `title` is set. `himi render --platform android` draws the Material switch and segmented button. | [Top app bar](https://m3.material.io/components/top-app-bar/guidelines) |
37
+ | Screen title | Top app bar with the screen title. | Set the screen's `title`. Do not repeat it, or the app name, as Text in the body in any style: the shell draws `title` in the top app bar (start-aligned, in titleLarge) on every screen whose bar it owns, so a body title shows twice. A screen with a `stickyHeader`, `leading: "none"`, a bar search or an immersive bar keeps the bar untitled, as iOS does under a sticky header. A group's name is the `Section` `header`. A render with no large heading at the top is correct when `title` is set. `himi render --platform android` draws the Material switch and segmented button. | [Top app bar](https://m3.material.io/components/top-app-bar/guidelines) |
38
38
  | Back | System Back, including the predictive back gesture, closes transient UI before it leaves the screen. | The shell handles Back. Plan the order in `MOBILE-UX.md`: an open sheet, search or selection closes first. | [Predictive back](https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back) |
39
39
  | Completing a flow (Book, Pay, Confirm) | One filled button at the bottom of the content. | `stickyFooter` holding one `Button` with `style: "primary"` and `fullWidth: true`. The same footer serves iPhone. | [Buttons](https://m3.material.io/components/buttons/guidelines) |
40
40
  | Creating, adding, editing, saving | An action in the top app bar. | `topBar.items: [{ id, placement: "trailing", label, icon, onTap, role: "confirm" }]`. It is a top-app-bar action here and a bar button on iPhone. | [Top app bar](https://m3.material.io/components/top-app-bar/guidelines) |
@@ -69,7 +69,7 @@ reduced motion, right-to-left, and permission, offline and error states.
69
69
  Render each primary screen with `--platform android` at a compact width (`--width 360`) and at
70
70
  an expanded width (`--width 840`), in light and with `--scheme dark`. Check: the primary action
71
71
  in the footer or the top bar, no floating button unless the plan chose it, no hand-drawn
72
- controls, no heading and no app name added to stand in for the empty top-bar title, a schedule
72
+ controls, no heading and no app name in the body repeating the top-bar title, a schedule
73
73
  made of `ListItem` rows rather than a `Card` per row, products, books and photos as image tiles
74
74
  with every image filled and none stretched, a rail that shows part of its next item, a horizontal
75
75
  choice row that still shows its last item, and an expanded layout that is either adaptive or recorded as an
@@ -29,7 +29,10 @@ they decide what a phone screen looks like, and this guide decides how to compos
29
29
  - **A collection is rows, not a card per item.** A schedule, a service menu, a session list or a
30
30
  settings group is `ListItem` rows — in a root `LazyList`, or in one `Section` with `inset: true`
31
31
  and a `header`. Time, price, coach or duration go in the row's `subtitle`/`trailing`; a small
32
- action (Book, Full) goes in `trailing`. One featured object may be a single `Card`.
32
+ action (Book, Full) goes in `trailing` as a tinted `Button` (`style: "tonal"`, `size: "sm"`),
33
+ never a filled one: a filled button on every row is a wall of primary buttons, and `himi
34
+ validate` warns about it (`repeated_prominent_row_action`). One featured object may be a single
35
+ `Card`.
33
36
  - **When people choose by the photo, the photo leads.** Products, books, a portfolio and projects
34
37
  are image tiles, not rows with a small thumbnail: a `Grid` with `columns: 2` (`columnsMedium: 3`,
35
38
  `columnsExpanded: 4`) for products and projects, `columns: 3` with `spacing: 2` and no captions
@@ -37,7 +40,12 @@ they decide what a phone screen looks like, and this guide decides how to compos
37
40
  (`fillWidth: true`, a fixed `aspectRatio`, `contentMode: "fill"`, `placeholder`,
38
41
  `contentDescription`) with the name and price as text under it, and the whole tile is the tap
39
42
  target (`modifiers.onTap`). No `Card` and no button on each tile. A collection without photos
40
- stays rows.
43
+ stays rows: a store whose products have no photos is `ListItem` rows with the name as the title
44
+ and the price in `trailing`. Never stand an emoji, an icon or a colour block in for a missing
45
+ photo; a grid of emoji is not a product grid.
46
+ - **A sample photo shows the thing it stands for.** Use the customer's own photos. Until they
47
+ exist, pick a real photo of that subject (a kettle for the kettle, a linen throw for the linen),
48
+ never a random-photo service: a deer on a linen product is worse than no photo at all.
41
49
  - **Choices that may not fit go sideways.** Days and times are a `LazyList` with
42
50
  `horizontal: true`, so the last chip stays reachable at 390 points. Size a rail of covers or
43
51
  cards so part of the next one shows at 390 points (a cover about 110 points wide, a card about
@@ -47,7 +55,11 @@ they decide what a phone screen looks like, and this guide decides how to compos
47
55
  has no padding, the image is its first child, and the name, price and options follow in a
48
56
  `VStack` that carries the 16-point gutter.
49
57
  - **The step that finishes the task sits in `stickyFooter`** — one primary `Button`, not a button
50
- inside the last card.
58
+ inside the last card. It is the screen's only filled button; every other one is `tonal`,
59
+ `secondary` or `tertiary` (`himi validate` warns on two filled buttons: `multiple_prominent_actions`).
60
+ - **Every tap target is at least 44 points** (48 dp on Android). A `Button` grows its own hit area;
61
+ an `Icon`, an `Image` or a stack with `modifiers.onTap` does not, so give it `padding` until it
62
+ reaches 44, or use an `iconOnly` `Button` (`himi validate` warns: `touch_target_too_small`).
51
63
 
52
64
  ---
53
65
 
@@ -396,6 +408,26 @@ Concrete patterns lifted from real usage:
396
408
  - **Fixed vs. fill thumbnails** — a *fixed* thumbnail is a fixed-size box (`frame`/padding) holding an image with `contentMode: "fill"`; a *fill* thumbnail is `fillMaxWidth` with an `aspectRatio` modifier so the height derives from the resolved width (`aspectRatio: 1` = square, `1.777` = 16:9). Don't combine a fixed box with a `fillMaxWidth` image — it over-stretches.
397
409
  - **A bubble that must stop short of the row** — the chat-bubble shape. `width` is wrong (a short "ok" becomes a wide box of trailing whitespace) and so is a weighted gap alone (weights divide the *available* space, so `[gap(1), bubble(3)]` puts EVERY bubble at 75%, short ones included). Use **`maxWidth`**: it CAPS without setting, so a short bubble hugs its text and a long one stops at the cap and wraps. It counts the node's total width (padding + border), beats `fillMaxWidth` and a wider literal `width`, and is in POINTS — pick roughly three quarters of the content width (~270 on a phone). `0`/absent = no cap.
398
410
 
411
+ ### 4a. Product screens — where to start
412
+
413
+ Four shapes cover most product home and detail screens. Start from the one that matches the
414
+ brief, then adapt it; each obeys the phone rules above.
415
+
416
+ - **A schedule, a service menu or a session list** (a studio, a gym, a salon): a root `lazyList`
417
+ of `listItem` rows — `title` is the class or service, `subtitle` the time, coach or duration,
418
+ `trailing` a `button({ title: "Book", style: "tonal", size: "sm" })` or a status `text`. Days
419
+ above it in a `lazyList({ horizontal: true })` of chips. No card per row, no filled button per row.
420
+ - **A store or catalog with photos**: `grid({ columns: 2, columnsMedium: 3, columnsExpanded: 4,
421
+ spacing: 12 })` of photo tiles (the **Photo tile** recipe above), one optional featured `card`
422
+ over it, categories as a horizontal chip rail. The whole tile opens the product.
423
+ - **A store without photos**: the same products as `listItem` rows in one inset `section` — name
424
+ as `title`, price in `trailing`, `accessory: "chevron"` and `onTap` to open it. No emoji grid.
425
+ - **A product, a booking or a checkout detail**: the photo first, edge to edge (a paged `carousel`
426
+ when there are several), then name, price and options (a `segmentedControl` or chip rail for a
427
+ color or size) in a padded `vstack`, and the finishing step as the screen's `stickyFooter`:
428
+ `button({ title: "Add to bag", style: "primary", fullWidth: true })`. It is the screen's only
429
+ filled button.
430
+
399
431
  ### 4b. Web-render layout caveats (the ones that cost the most iterations)
400
432
 
401
433
  These are the four that off-repo authors have hit repeatedly, each costing several
@@ -359,9 +359,13 @@ pull-to-refresh + load-more), a create/edit form `examples/form-submit.*`
359
359
  and the loading/empty/error/ready idiom they all share
360
360
  (`himi docs recipe-four-state` — every recipe that loads or writes data shows a loading state,
361
361
  a classified error state and a recovery action where the user can fix the failure). Then — **before you
362
- design** — read the UX guide (`himi docs designing-himi-screens`) and, for a multi-screen app,
363
- the mobile contract guide (`himi docs mobile-ux`), then follow
364
- *Author a Tier-5 screen*.
362
+ design** — read the UX guide (`himi docs designing-himi-screens`: its phone rules and product
363
+ screen shapes), the platform guides (`himi docs ios-ux`, `himi docs android-ux`) and, for a
364
+ multi-screen app, the mobile contract guide (`himi docs mobile-ux`), then follow
365
+ *Author a Tier-5 screen*. Judge each screen with
366
+ `himi render <screenId> --platform ios --device iphone` and `--platform android --device pixel`,
367
+ which draw the status bar, the navigation bar and the tab bar, and fix every `himi validate`
368
+ design warning (one filled button per screen, tinted row actions, 44-point tap targets).
365
369
 
366
370
  Keep structural choices reviewable: use `FragmentSlot` when a finite set of shipped component
367
371
  trees is selected by worker state. Use the gated `WorkerSubtree` only when structure is genuinely
@@ -382,9 +382,13 @@ pull-to-refresh + load-more), a create/edit form `examples/form-submit.*`
382
382
  and the loading/empty/error/ready idiom they all share
383
383
  (`himi docs recipe-four-state` — every recipe that loads or writes data shows a loading state,
384
384
  a classified error state and a recovery action where the user can fix the failure). Then — **before you
385
- design** — read the UX guide (`himi docs designing-himi-screens`) and, for a multi-screen app,
386
- the mobile contract guide (`himi docs mobile-ux`), then follow
387
- *Author a Tier-5 screen*.
385
+ design** — read the UX guide (`himi docs designing-himi-screens`: its phone rules and product
386
+ screen shapes), the platform guides (`himi docs ios-ux`, `himi docs android-ux`) and, for a
387
+ multi-screen app, the mobile contract guide (`himi docs mobile-ux`), then follow
388
+ *Author a Tier-5 screen*. Judge each screen with
389
+ `himi render <screenId> --platform ios --device iphone` and `--platform android --device pixel`,
390
+ which draw the status bar, the navigation bar and the tab bar, and fix every `himi validate`
391
+ design warning (one filled button per screen, tinted row actions, 44-point tap targets).
388
392
 
389
393
  Keep structural choices reviewable: use `FragmentSlot` when a finite set of shipped component
390
394
  trees is selected by worker state. Use the gated `WorkerSubtree` only when structure is genuinely
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1686.0",
3
+ "version": "0.1687.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": [
@@ -81,5 +81,5 @@
81
81
  "artifactId": "himalaya-cli"
82
82
  }
83
83
  },
84
- "falconPackageHash": "cd576495aab3468fce414d7162feeb3f0b0628c50a49157d7592d632"
84
+ "falconPackageHash": "e061a08ef9ff1a948677e0bc655d65e090a452c105f1920e9fabfc0f"
85
85
  }