@wix/himalaya-cli 0.1711.0 → 0.1713.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
@@ -137,7 +137,7 @@ does not include answers `module_not_linked` on device. Some components need one
137
137
  and `himi validate` errors on a screen that uses one the app does not declare.
138
138
  `presigned_upload.putFile` also requires `files` on the calling screen.
139
139
 
140
- App-level capability vocabulary: `camera`, `barcode_scanner`, `biometrics`, `secure_storage`, `share`, `push`, `file_picker`, `files`, `open_url`, `pdf`, `clipboard`, `theme`, `l10n`, `photos`, `presigned_upload`, `ui`, `calendar`, `contacts`, `tasks`, `audio_record`, `audio_record_background`, `calls`, `location`, `location_background`, `motion`, `health`, `media_playback`, `webview`, `browser_auth`, `haptic`, `himi_apps`, `iap`, `keyboard`, `torch`, `network`, `wix_cashier`, `wix_chat`, `live_activity`, `local_database`, `speech`, `speaker_diarization`, `system_intents`, `on_device_ai`, `app_info`, `release_control`, `legacy_import`, `godot`, `base44`, `animation`.
140
+ App-level capability vocabulary: `camera`, `barcode_scanner`, `biometrics`, `secure_storage`, `share`, `push`, `file_picker`, `files`, `open_url`, `pdf`, `clipboard`, `theme`, `l10n`, `photos`, `presigned_upload`, `ui`, `calendar`, `contacts`, `tasks`, `audio_record`, `audio_record_background`, `calls`, `location`, `location_background`, `motion`, `health`, `media_playback`, `webview`, `browser_auth`, `haptic`, `himi_apps`, `iap`, `keyboard`, `torch`, `network`, `wix_cashier`, `wix_chat`, `live_activity`, `local_database`, `speech`, `speaker_diarization`, `system_intents`, `on_device_ai`, `app_info`, `release_control`, `legacy_import`, `godot`, `base44`, `animation`, `video_playback`.
141
141
 
142
142
  ## What `himi validate` checks (7 passes)
143
143
 
@@ -313,7 +313,7 @@ binary carries neither the code nor the store-review footprint of a framework it
313
313
  | live_activity | `live_activity` |
314
314
  | location | `location`, `location_background` |
315
315
  | location_background (iOS) | `location_background` |
316
- | media | `media_playback` |
316
+ | media | `media_playback`, `video_playback` (in-app video, no background audio) |
317
317
  | motion | `motion` |
318
318
  | on_device_ai (iOS) | `on_device_ai` |
319
319
  | push | `push` |
@@ -338,7 +338,7 @@ does not link that module would render a component whose library is not in the b
338
338
 
339
339
  | Component | Needs | Without it |
340
340
  |---|---|---|
341
- | `Video` | `media_playback` | sized placeholder |
341
+ | `Video` | `media_playback`, or `video_playback` (in-app only, no background audio) | sized placeholder |
342
342
  | `MediaPlayer` | `media_playback` | sized placeholder |
343
343
  | `CarBrowse` — the Android Auto media browse tree | `media_playback` | no car media surface |
344
344
  | `Lottie` | `animation` | sized placeholder |
@@ -397,7 +397,7 @@ Concrete patterns lifted from real usage:
397
397
  - **A screen that owns its top bar (search beside back)** — set `topBar: { leading: "none" }` and put the row in `stickyHeader`: `hstack([ iconButton({ icon: "arrow_left", accessibilityLabel: "Back", action: { actionId: "nav.back", presentation: "back" } }), withModifiers(textField({ placeholder: "Search", … }), { weight: 1 }) ])`. With **both** set, every shell draws no bar and no back control of its own (iOS hides the system bar, Android floats no chevron and reserves no band, web hides its bar on every look), so the row is the only top bar. `leading: "none"` without a `stickyHeader` keeps the bar's title and trailing actions but drops the back control (and the hamburger, for that screen). System back — hardware, gesture, edge swipe, browser — still pops. Any other `leading` value keeps today's chrome; demo: `gallery_search_topbar`, linked from the gallery's "Lists & data".
398
398
  - **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.
399
399
  - **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 })`.
400
- - **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.
400
+ - **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.
401
401
  - **Overlay** — `zstack({ alignment: "center", children: [ backdropImage(cornerRadius 12), withModifiers(label, { padding, background: { token: "accentPrimary" }, cornerRadius: 10 }) ] })`.
402
402
  - **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 that stacks on a phone; set `contentMaxWidth` in tokens so wide surfaces keep a readable column instead of running edge-to-edge.
403
403
  - **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()`.
@@ -139,7 +139,7 @@ This is a scoped migration. Other legacy `himi test` failure paths retain their
139
139
 
140
140
  ## `himi ext` codes
141
141
 
142
- `himi ext create` and `himi ext list` (the app's own native extensions). Every refusal is
142
+ `himi ext create`, `himi ext range` and `himi ext list` (the app's own native extensions). Every refusal is
143
143
  `{ ok: false, code, error, ... }` on stderr.
144
144
 
145
145
  | Code | Meaning |
@@ -152,13 +152,24 @@ This is a scoped migration. Other legacy `himi test` failure paths retain their
152
152
  | `extensions_config_opaque` | config.ts `extensions` is not a literal array of names, so it cannot be edited safely. |
153
153
  | `extension_limit` | The app already declares the maximum number of extensions (`limit`). |
154
154
  | `extension_scaffold_failed` | The scaffolded manifest or interface did not load; `error` says why. |
155
+ | `extension_view_invalid` | A `--views` name is not PascalCase letters and digits, or is a core component's name (`view` names it; exit 2). |
156
+ | `proto_range_unavailable` | `himi ext range` could not reserve the app's view-number range (not logged in, or the publishing service refused or did not answer); `hint` says what to do. |
157
+
158
+ `himi ext create --views` reserves the app's view-number range when config.ts still has the
159
+ scaffold's placeholder. Without a login the scaffold still succeeds and reports
160
+ `protoRange: { error, hint }`; `himi ext range` finishes it and prints `{ ok, range, reserved,
161
+ configEdited, fields }`.
155
162
 
156
163
  `himi ext list` exits 0 and reports problems in `findings[]` (`code`, `extension`, `file?`,
157
164
  `line?`, `message`): the manifest and interface codes (`extension_manifest_invalid`,
158
165
  `extension_name_invalid`, `extension_feature_unsupported`, `extension_action_invalid`,
159
166
  `extension_interface_invalid`), `extension_unsafe_file`, `extension_too_large`,
160
- `extension_sources_missing`, `extension_not_found`, `extension_declared_missing` and
161
- `extension_not_declared`.
167
+ `extension_sources_missing`, `extension_not_found`, `extension_declared_missing`,
168
+ `extension_not_declared` and `extension_view_shadows_core`, and coverage gaps in `warnings[]`:
169
+ `extension_range_unreserved`, `extension_single_platform`, `extension_web_unsupported` and
170
+ `extension_macos_unsupported`. `himi validate` reports the same warnings under its `extensions` pass,
171
+ plus `extension_view_undeclared` and `extension_grant_undeclared` (errors) for a descriptor that places
172
+ an `ext.*` view, or lists an `ext:` grant in `capabilitiesRequired`, that no declared extension backs.
162
173
 
163
174
  ## `himi publish-size` codes
164
175
 
@@ -265,6 +265,41 @@ Base44 is accepted only when the same Brandy contract contains a Base44 binding.
265
265
  The package source includes complete `health-page.ts` and `health-worker.ts` examples matching the
266
266
  snippets above.
267
267
 
268
+ ## A site page that talks to its screen's worker
269
+
270
+ A website page can also be a node of a native screen (`sitePage` from `@wix/himalaya/sdui`), with native UI around it.
271
+ Give that node `bridge: "worker"` and the screen a `logicBundle` whose `declaredCapabilities` include
272
+ `"webview"`:
273
+
274
+ ```ts
275
+ screen("site_book", {
276
+ logic_bundle: siteBook, // declares "webview"
277
+ root: vstack({ children: [
278
+ text("$service:site.title"), // native UI following the page
279
+ sitePage(site, { path: "/book-online", bridge: "worker" }),
280
+ ] }),
281
+ });
282
+ ```
283
+
284
+ The page uses this SDK's channel (`himalaya.post`, `himalaya.call`) and the worker answers with
285
+ `@himalaya/webview` (`onPageMessage`, `onPageRequest`, `postToPage`). The device trusts that channel only
286
+ for the app's own site:
287
+
288
+ - The site is the one **baked into the app binary** (its contract's `site` block, the same site the
289
+ native sign-in bridge writes the member session into). A served config can narrow it, never widen it. A
290
+ binary with no baked site — a visitor-only Wix build of Brandy, for example — never trusts the channel.
291
+ - The page's `url` and every `allowedOrigins` entry must be inside that site (`sitePage` sets the site's own
292
+ allow-list). Anything else keeps the strict bridge: the page still talks to the worker, but loses the site
293
+ behaviours below. The validator warns about it (`primary_bridge_not_site_trusted`).
294
+ - The channel works only while the page's top frame is inside the site. Moving from `/book-online` to `/cart`
295
+ keeps it; a page that leaves the site loses it until it comes back; an iframe inside the page never has it.
296
+
297
+ A trusted site page keeps everything a site tab does: off-site links open in the browser after the prompt,
298
+ the native sign-in reaches the page, the site's own `/login` opens the native sign-in, site links land on it,
299
+ and the site's header, menu, footer and ads stay hidden. The page still cannot navigate the app, run an
300
+ action or call a native capability itself: it reaches native code only through the worker's declared
301
+ capabilities, as described above. On web there is no channel for a site page.
302
+
268
303
  ## Demo app regression page
269
304
 
270
305
  The demo app hosts a page that calls every capability its iOS and Android boots already
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1711.0",
3
+ "version": "0.1713.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": "75ffdc562de143cb5782bbc1791093965c374bde446ab0640072c0d6"
84
+ "falconPackageHash": "2ead352533aec548def8131d1e108ecb28a1b6fc14c7995c5b080fbb"
85
85
  }