@wix/himalaya-cli 0.1439.0 → 0.1441.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.
Files changed (67) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/ui/src/index.d.ts +7 -4
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/ui.mjs +2 -2
  3. package/dist/cli.mjs +159 -54
  4. package/dist/preview-assets.generated.bin +0 -0
  5. package/guides/designing-himi-screens.md +5 -1
  6. package/guides/hhp.md +13 -1
  7. package/guides/himi-mcp.md +21 -11
  8. package/guides/sdk-reference.json +3 -3
  9. package/guides/skill.md +1 -1
  10. package/guides/tier-5-add-a-screen.md +11 -0
  11. package/guides/trim-a-template.md +4 -1
  12. package/package.json +2 -2
  13. package/templates/beauty-salon/config.ts +14 -0
  14. package/templates/beauty-salon/dev/index.ts +1359 -1445
  15. package/templates/beauty-salon/himalaya.content.json +3 -0
  16. package/templates/beauty-salon/tier5-src/himi-branded-lite-account-settings/index.ts +4 -1
  17. package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +322 -27
  18. package/templates/branded-lite/config.ts +14 -0
  19. package/templates/branded-lite/dev/index.ts +1482 -1603
  20. package/templates/branded-lite/himalaya.content.json +3 -0
  21. package/templates/branded-lite/tier5-src/himi-branded-lite-account-settings/index.ts +4 -1
  22. package/templates/branded-lite/tier5-src/himi-store-account/index.ts +322 -27
  23. package/templates/community-club/config.ts +14 -0
  24. package/templates/community-club/dev/index.ts +1217 -1121
  25. package/templates/community-club/himalaya.content.json +3 -0
  26. package/templates/community-club/tier5-src/himi-branded-lite-account-settings/index.ts +4 -1
  27. package/templates/community-club/tier5-src/himi-store-account/index.ts +322 -27
  28. package/templates/events-meetups/config.ts +14 -0
  29. package/templates/events-meetups/dev/index.ts +1268 -1172
  30. package/templates/events-meetups/himalaya.content.json +3 -0
  31. package/templates/events-meetups/tier5-src/himi-branded-lite-account-settings/index.ts +4 -1
  32. package/templates/events-meetups/tier5-src/himi-store-account/index.ts +322 -27
  33. package/templates/gym-fitness/config.ts +14 -0
  34. package/templates/gym-fitness/dev/index.ts +1296 -1389
  35. package/templates/gym-fitness/himalaya.content.json +3 -0
  36. package/templates/gym-fitness/tier5-src/himi-branded-lite-account-settings/index.ts +4 -1
  37. package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +322 -27
  38. package/templates/nonprofit-cause/config.ts +14 -0
  39. package/templates/nonprofit-cause/dev/index.ts +1321 -1327
  40. package/templates/nonprofit-cause/himalaya.content.json +3 -0
  41. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-account-settings/index.ts +4 -1
  42. package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +322 -27
  43. package/templates/podcast-creator/config.ts +14 -0
  44. package/templates/podcast-creator/dev/index.ts +1315 -1321
  45. package/templates/podcast-creator/himalaya.content.json +3 -0
  46. package/templates/podcast-creator/tier5-src/himi-branded-lite-account-settings/index.ts +4 -1
  47. package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +322 -27
  48. package/templates/portfolio-creative/config.ts +14 -0
  49. package/templates/portfolio-creative/dev/index.ts +1351 -1342
  50. package/templates/portfolio-creative/himalaya.content.json +3 -0
  51. package/templates/portfolio-creative/tier5-src/himi-branded-lite-account-settings/index.ts +4 -1
  52. package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +322 -27
  53. package/templates/restaurant/config.ts +14 -0
  54. package/templates/restaurant/dev/index.ts +1373 -1296
  55. package/templates/restaurant/himalaya.content.json +3 -0
  56. package/templates/restaurant/tier5-src/himi-branded-lite-account-settings/index.ts +4 -1
  57. package/templates/restaurant/tier5-src/himi-store-account/index.ts +322 -27
  58. package/templates/retail-store/config.ts +14 -0
  59. package/templates/retail-store/dev/index.ts +1326 -1310
  60. package/templates/retail-store/himalaya.content.json +3 -0
  61. package/templates/retail-store/tier5-src/himi-branded-lite-account-settings/index.ts +4 -1
  62. package/templates/retail-store/tier5-src/himi-store-account/index.ts +322 -27
  63. package/templates/yoga-studio/config.ts +14 -0
  64. package/templates/yoga-studio/dev/index.ts +1358 -1371
  65. package/templates/yoga-studio/himalaya.content.json +3 -0
  66. package/templates/yoga-studio/tier5-src/himi-branded-lite-account-settings/index.ts +4 -1
  67. package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +322 -27
Binary file
@@ -252,7 +252,11 @@ scroll. *Reach for `SegmentedControl` for 2–4 in-content modes; `Tabs`/tab-bar
252
252
  **Feedback & overlays** — `Banner` for a persistent inline message (with a retry action on error);
253
253
  `Snackbar` for a transient confirmation; `AlertDialog` for a blocking decision; `BottomSheet` for
254
254
  contextual actions/detail; `Tooltip`/`Popover` for a small anchored hint. *Reach for `Snackbar`, not
255
- `AlertDialog`, to confirm a completed action — don't block on success.*
255
+ `AlertDialog`, to confirm a completed action — don't block on success.* The `Snackbar` COMPONENT draws
256
+ inline where you place it; for a transient toast that floats at the bottom of the screen — an app
257
+ error after a failed action, say — use the `snackbar` presentation verb or `ui.snackbar({ message,
258
+ tone: "danger" })` from a worker: it floats above the tab bar, animates in and out, queues, honours
259
+ `durationMs`, and is announced to screen readers on every platform.
256
260
 
257
261
  **Status & data-viz** — `Badge`/`Tag`/`Chip` for compact labels; `Rating` for stars (`size: "sm"` in a
258
262
  dense row); `ProgressBar` for determinate progress, `ActivityIndicator` for indeterminate; `Gauge` for
package/guides/hhp.md CHANGED
@@ -54,11 +54,15 @@ payloads retain native fields and normalize selection values into `event.value`.
54
54
  Nested scalar paths are checked and updated immutably. Two-way value binding owns
55
55
  the component's change callback. Explicit `on:change` is used for custom reducers.
56
56
  Boolean `bind:hidden` and existing declared property bindings are available.
57
+ `bind:error` on a text field takes **string** state: the error message, where an
58
+ empty string means valid (a boolean flag is a lint error).
57
59
  Read-only controls such as Gauge and ActivityIndicator accept one-way value
58
60
  bindings without generating a change action.
59
61
 
60
62
  Keyed lists use `each="items" key="id"` on a Grid/LazyList and one row template.
61
- Initial items require unique string ids. Row text uses `{{$item.title}}`. Compute
63
+ Initial items require unique string ids. Row text uses `{{$item.title}}`; mixed
64
+ row text such as `“{{$item.text}}”` is projected by the controller. `$item` bindings
65
+ are typed from the initial rows: `bind:hidden="$item.done"` needs a boolean field. Compute
62
66
  expressions in controllers; interpolation accepts paths, not executable expressions.
63
67
  Direct `application/himalaya-service` scripts retain `defineService` authoring.
64
68
 
@@ -76,6 +80,14 @@ props; `slot="primary"` and `slot="detail"` supply SplitView slots. Structured p
76
80
  use a child `script type="application/himalaya-props"` containing JSON.
77
81
  `on:<native-action-property>` exposes declared events; click/change/submit have
78
82
  ordinary-control aliases. Explicit modifiers use `data-mod-*` or `himi-mod-*`.
83
+ A `…-path` modifier (`data-mod-hidden-path="full"`, `data-mod-background-color-path`)
84
+ names controller state exactly like `bind:*`, or `$item.<field>` in a row; an unknown
85
+ path is a lint error. `onMeasure` keys name the renderer's measure store instead.
86
+ `style` and `title` are HTML globals: `style` is always CSS, so a native `style`
87
+ variant uses `variant="primary"`; `title="…"` sets a component's `title` field. CSS
88
+ `font` applies only to text components (Text, Label, Marquee). The profile's
89
+ handler list holds only router actions every renderer implements (`himi.open`);
90
+ tab switching from content is not supported yet.
79
91
 
80
92
  The profile is the intersection of enabled deployment surfaces. It retains field
81
93
  eligibility and reports web support independently. Placeholder renderer cases,
@@ -135,24 +135,34 @@ the same origin, and `himi_preview_start` returns that URL as `board`.
135
135
  `himi-studio` is the marketplace's second, optional plugin, a Claude Code *mod*. It adds a pane
136
136
  beside the conversation with four views:
137
137
 
138
- - **Now:** the screen being worked on, in a phone frame, with the live build's state and what the
139
- last rebuild changed.
138
+ - **Now:** the screen being worked on, in a phone frame, with its controls under it. ‹ › step
139
+ through screens, ☾ Dark and ▭ iPad ask for those renders, **Open live** opens the app, and **On my
140
+ phone** shows the LAN preview's QR code. To the right are the live build's state and what the last
141
+ rebuild changed.
140
142
  - **Screens:** every rendered screen.
141
- - **Checks:** the journey step, and validate, test, the UX audit and the last push.
142
- - **Activity:** the progress postcards.
143
+ - **Checks:** the journey step, then validate, test, the UX audit and the last push, with the
144
+ progress postcards below them.
145
+ - **Ship:** the steps to a phone and the stores, in order: preview on a phone, share a draft, test
146
+ builds, download, and store planning.
143
147
 
144
- When the last rebuild failed, a band above the prompt says so and offers **Fix it**. The agent gets
145
- two tools: `studio_focus` shows you the screen it just changed, and `studio_snapshot` reads the
146
- status.
148
+ Under every view a **Next →** strip offers the one most useful step. When the last rebuild failed, a
149
+ band above the prompt says so and offers **Fix it**. Pushing a draft and building test apps ask for
150
+ a second press in the pane, and the prompt that press sends is the owner's approval of that gate.
151
+ The agent gets two tools: `studio_focus` shows the person the screen it just changed, and
152
+ `studio_snapshot` reads the status.
147
153
 
148
154
  ```
149
155
  /plugin install himi-studio@wix-himi
150
156
  ```
151
157
 
152
- The pane shows screenshots, not the live app: a mod cannot host a web page. For the interactive
153
- app, use its **Open live preview** button or the `himi-preview` launch configuration. The pane reads
154
- only what the CLI already writes under `.himi/` (the board's `state.json` and its screenshots). It
155
- opens by itself in an app folder; elsewhere, run `/himi <app folder>`.
158
+ The pane shows screenshots, not the live app: a mod cannot host a web page. Ghostty, kitty, WezTerm
159
+ and iTerm2 show the real image, cropped to the app; Claude Code Desktop shows the whole screenshot in
160
+ a phone frame. macOS Terminal shows no
161
+ picture: **View picture ↗** opens the screenshot in Preview, and **On my phone** opens the QR code
162
+ the same way. Other terminals without images (tmux, for one) show a coloured-block version that
163
+ says it is one. For the interactive app, use **Open live** or the `himi-preview` launch
164
+ configuration. The pane reads only what the CLI already writes under `.himi/`. It opens by itself in
165
+ an app folder; elsewhere, run `/himi <app folder>`.
156
166
 
157
167
  To see the app **on your phone**, `himi_push` publishes a draft and returns a link that opens it in
158
168
  Himi Player.
@@ -4715,19 +4715,19 @@
4715
4715
  {
4716
4716
  "name": "SnackbarTone",
4717
4717
  "kind": "type",
4718
- "jsdoc": "/** Snackbar tone — maps to the app's tone background tokens. */",
4718
+ "jsdoc": "/** Snackbar tone — maps to the app's tone background tokens (`info` → textPrimary, `success`,\n * `warning`, `danger`). Use `danger` for errors; the hosts also accept `error` as an alias of it. */",
4719
4719
  "decl": "export type SnackbarTone = \"info\" | \"success\" | \"warning\" | \"danger\";"
4720
4720
  },
4721
4721
  {
4722
4722
  "name": "SnackbarOptions",
4723
4723
  "kind": "interface",
4724
4724
  "jsdoc": "",
4725
- "decl": "export interface SnackbarOptions {\n message: string;\n /** Default \"info\". */\n tone?: SnackbarTone;\n /** Auto-dismiss delay. Default 3000. Ignored on web (fixed-duration there). */\n durationMs?: number;\n}"
4725
+ "decl": "export interface SnackbarOptions {\n message: string;\n /** Default \"info\". */\n tone?: SnackbarTone;\n /** Auto-dismiss delay in ms, on every host. Default 3000; 0 or less also means 3000. */\n durationMs?: number;\n}"
4726
4726
  },
4727
4727
  {
4728
4728
  "name": "snackbar",
4729
4729
  "kind": "function",
4730
- "jsdoc": "/** Show a transient snackbar toast. Resolves once it is PRESENTED (not after it\n * auto-dismisses). Rejects with `no_ui_host` if no presenter is attached. */",
4730
+ "jsdoc": "/** Show a transient snackbar toast: it floats above the tab bar, slides and fades in and out\n * (fades only under reduced motion), queues behind one that is already showing, and is read\n * by VoiceOver / TalkBack. Resolves once it is PRESENTED (not after it auto-dismisses).\n * Rejects with `no_ui_host` if no presenter is attached. */",
4731
4731
  "decl": "export async function snackbar(options: SnackbarOptions): Promise<void>;"
4732
4732
  },
4733
4733
  {
package/guides/skill.md CHANGED
@@ -74,7 +74,7 @@ A build takes most of an hour. An owner who sees nothing for that long assumes n
74
74
  - **Give them a board to leave open.** When the installed CLI lists `studio`, run `himi studio` once, right after that first picture, and tell the owner it is there (a current `himi init` has already made the board; this opens it). It opens a local page in their browser that fills itself in — every screen as it renders, the journey step and your latest postcard, each check as it runs — so they can watch between your messages. It is a view of your local work, not the preview of step 7.
75
75
  - **Let them click around while you work — the live preview runs from init on.** A current `himi init` started it (`watch.url` in its output); if it isn't running (`--remote`, CI), start it once step 4's startup preflight says the app may boot locally, when the installed CLI's `himi run` accepts `--watch`: run `himi run --watch --content <dir> &` at once and leave it running until the handover; do not wait for a `reminder` to ask. Give the owner its url, and open it only after the preflight. `himi run --watch` serves the app on this machine, opens it in their browser when you start it yourself (no `--browser` flag — that is a different mode, and `--watch` refuses it; the one init starts opens nothing), and repaints that tab every time you save — and the board frames the same live app. Once the app is bound to their site, the watch preview shows that site's live data, fetched by their own browser as an anonymous visitor. It is a local preview of your working copy, never the owner-private preview, and a save that does not build leaves the last good version on screen while you fix it.
76
76
  - **Inside a coding agent, prefer the `himi_*` tools.** When your tool list has them (`himi init` configures the `himi` MCP server for Claude Code, Cursor, Codex and VS Code), call them instead of shelling out: `himi_render` hands you the PNG to show, and `himi_preview_start` returns the live preview's URL. Open that URL in your own built-in browser — Claude Code desktop: start the `himi-preview` launch configuration; Cursor: its Browser tool; Codex in the ChatGPT desktop app: its Browser; VS Code: the integrated browser — so the owner watches the app take shape beside the chat.
77
- - **When the Himi Studio pane is open, show the work there.** In Claude Code, a tool list with `mcp__himi-studio__studio_focus` means the owner has the Himi Studio pane beside the chat. It shows each screen as it renders, the live build and every check, and it keeps itself current. Right after you change or render a screen, call `studio_focus` with its screen id rather than pasting the picture into the chat. For the build status, read `studio_snapshot` rather than re-running status commands. Postcards still go in the chat and the journal. Without the pane, in Claude Code you may offer it once: `/plugin install himi-studio@wix-himi`.
77
+ - **When the Himi Studio pane is open, show the work there.** In Claude Code, a tool list with `mcp__himi-studio__studio_focus` means the owner has the Himi Studio pane beside the chat. It shows each screen as it renders, the live build and every check, and it keeps itself current. Right after you change or render a screen, call `studio_focus` with its screen id rather than pasting the picture into the chat. For the build status, read `studio_snapshot` rather than re-running status commands. Postcards still go in the chat and the journal. The pane's buttons send you fixed prompts. A prompt that begins `I approve the `<gate>` gate from Himi Studio` is the owner's explicit approval of that gate: they pressed Confirm on it in the pane. Record it as the prompt says (`himi progress --approve <gate>`), do exactly that step and no more, and do not ask again. Without the pane, in Claude Code you may offer it once: `/plugin install himi-studio@wix-himi`.
78
78
  - **Hand over the story too.** At the handover in step 7, when `himi --help` lists `himi studio reel` (an older CLI can have `studio` without it), run `himi studio reel` and offer the owner the file it writes (a current CLI rebuilds it for you: your `--step review` postcard names it as `makingOf`, and every `himi push --draft` as `reel` — `.himi/making-of.html`, so name that file): one self-contained page of their app taking shape, version by version, with your postcards. It shows how the app was built; it is never a substitute for the preview URL, and it carries the same sample-data captions the postcards did.
79
79
 
80
80
  ## Approval gates
@@ -479,6 +479,17 @@ This is what makes the fail-closed capability gates readable. `local_database: e
479
479
  "X" is not declared in the app's dataSchema` is a message written to be read — before
480
480
  #2288 an author only ever saw an eternal spinner.
481
481
 
482
+ **A persisted snapshot only hydrates the bundle that wrote it.** The cold-boot
483
+ snapshot is stamped with the writing bundle's integrity hash (a reserved
484
+ `__himalaya_snapshot` key beside the services) and restored only into that exact bundle.
485
+ Ship a new bundle and the first cold boot starts every service from its declared `state`;
486
+ the old snapshot is deleted and reported once per service as `worker_state_discarded`
487
+ (`{ service, reason: "bundle_mismatch" | "unstamped", bundleHash, storedBundleHash }`).
488
+ Snapshots written before stamping existed count as `unstamped`, which also means they are
489
+ dropped once. So you never have to defend a reducer against last release's state shape —
490
+ but a bundle change costs one cold boot of last-known content. Carrying state across bundle
491
+ versions (`stateVersion` + `migrate`) is not supported yet.
492
+
482
493
  ### Show App Store prices for catalog items
483
494
 
484
495
  A screen that shows or sells a program, product or plan that may be an App Store in-app purchase
@@ -66,7 +66,10 @@ template itself, which it refuses. `--keep` takes `SCREENS` ids and templated ro
66
66
  part before the brackets: `himi_product` for `himi_product[_{id}]`). The home screen is always
67
67
  kept, and so is any screen the navigation pins — a drawer or sidebar body
68
68
  (`contentScreenId`, which is how the owner templates draw their menu) or a drawer header's or
69
- footer's target; both are listed under `implicit`. It prints one JSON report and:
69
+ footer's target; both are listed under `implicit`. So is a screen a kept screen hands to its
70
+ worker by name: Account's `signInScreen` (`himi_sign_in`), where its worker sends a guest to
71
+ sign in. No tap names that screen, so without this rule `--links drop` would keep Account and
72
+ drop its only way to sign in. It prints one JSON report and:
70
73
 
71
74
  - **deletes** every other `SCREENS` and `TEMPLATED` entry whole, so the blocks you keep stay
72
75
  byte for byte as they were;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1439.0",
3
+ "version": "0.1441.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": [
@@ -71,5 +71,5 @@
71
71
  "artifactId": "himalaya-cli"
72
72
  }
73
73
  },
74
- "falconPackageHash": "517214ad79ba1f66fcc679a54a5edf1e5242a258037728e41501f8ce"
74
+ "falconPackageHash": "a3e589b65f6239351e6445160aa5b26a14cc4056007292e973e036ab"
75
75
  }
@@ -291,6 +291,20 @@ export default defineApp({
291
291
  ],
292
292
  "parentScreenId": "",
293
293
  "tabId": "profile"
294
+ },
295
+ {
296
+ "screenId": "himi_sign_in",
297
+ "isPublic": true,
298
+ "paramKeys": [
299
+ "mode",
300
+ "intent",
301
+ "contextName",
302
+ "returnScreenId",
303
+ "returnId",
304
+ "returnChannelId"
305
+ ],
306
+ "parentScreenId": "himi_account",
307
+ "tabId": "profile"
294
308
  }
295
309
  ],
296
310
  "tabBar": {