@wix/himalaya-cli 0.1700.0 → 0.1701.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.
@@ -1,4 +1,4 @@
1
- import { type RichContentEditorTool, type WorkerSubtreePolicy } from "@wix/himalaya/core";
1
+ import { type RichContentEditorTool, type SitePageNodeSpec, type SitePageSite, type WorkerSubtreePolicy } from "@wix/himalaya/core";
2
2
  export type { RichContentEditorTool };
3
3
  export interface Component {
4
4
  id: string;
@@ -1811,6 +1811,25 @@ export declare function webView(props: {
1811
1811
  }, opts?: {
1812
1812
  id?: string;
1813
1813
  }): Component;
1814
+ /**
1815
+ * RFC 0079 §3 — one page of the customer's website as a node of an SDUI screen, with native UI
1816
+ * around it. Not a new component: it emits a `WebView` with `role: "primary"`, `fill: true`,
1817
+ * `scrollEnabled: true` and `modifiers.weight: 1`, whose `url` is `path` joined onto `site.origin`
1818
+ * and whose `config` is the site preset (`siteWebViewPreset(site)`) with `page.webView` merged over
1819
+ * it — the same page a site-shell tab loads. `site` is the app's `site` block (a `SiteShellConfig`).
1820
+ * `title` is the page's accessible name (`modifiers.accessibilityLabel`); absent, the site's host.
1821
+ *
1822
+ * ```ts
1823
+ * vstack({ children: [header, sitePage(site, { path: "/book-online", title: "Book" }), stickyBar] })
1824
+ * ```
1825
+ *
1826
+ * Put it at the screen root or directly in a root VStack / HStack / ZStack, once per screen; the
1827
+ * validator rejects it inside a LazyList, Pager, Carousel or CollapsingHeader (RFC 0079 §9).
1828
+ * The id defaults to `SITE_PAGE_NODE_ID`. Delegates to `sitePageNode` (`@wix/himalaya/core`).
1829
+ */
1830
+ export declare function sitePage(site: SitePageSite, page: SitePageNodeSpec, opts?: {
1831
+ id?: string;
1832
+ }): Component;
1814
1833
  /** One selectable day in a `dateStrip`. Mirrors what @himalaya/time emits. */
1815
1834
  export interface DateStripDay {
1816
1835
  /** Local "YYYY-MM-DD" day key — the value handed to `onSelect`. */
@@ -1,12 +1,14 @@
1
1
  import type { IconName } from "./icon-catalog.generated.js";
2
- import type { DrawerItem, LinkableScreen, NavTabItem, ScreenDescriptor, SiteNavConfig, WebViewConfig } from "./schema.js";
2
+ import type { Component, DrawerItem, LinkableScreen, NavTabItem, ScreenDescriptor, SiteNavConfig, WebViewConfig } from "./schema.js";
3
3
  /** Which hosting platform the site runs on. Selects origin allow-lists (and, once
4
4
  * RFC 0062 phase 2 lands, the binary-shipped page adapter). */
5
5
  export type SiteKind = "wix" | "base44";
6
6
  /** Where a page lives in the native chrome. `overflow` pages are routable (deep links,
7
7
  * in-site links) but get no tab and no drawer row. */
8
8
  export type SitePagePlacement = "tab" | "drawer" | "overflow";
9
- /** One page of the customer's site, as the app presents it. */
9
+ /** One page of the customer's site, as the app presents it — a page SPEC in the `site` block.
10
+ * Not the RFC 0079 `sitePage` builder (`@wix/himalaya/sdui`), which emits a page as an SDUI node
11
+ * ({@link sitePageNode}). */
10
12
  export interface SitePage {
11
13
  /** Stable id — becomes the tab id and the `site_<id>` screen id. `[a-z0-9_]+`. */
12
14
  id: string;
@@ -146,9 +148,76 @@ export declare function defineSiteTab(site: SiteShellConfig, page: SitePage): Sc
146
148
  * routing). Not kept alive: each routed link mounts it fresh, so it never shows the previous
147
149
  * link's page while the new one loads. */
148
150
  export declare function defineSitePageScreen(site: SiteShellConfig): ScreenDescriptor;
151
+ /** The part of a {@link SiteShellConfig} a single site page needs: the preset is resolved against
152
+ * it ({@link siteWebViewPreset}) and the page URL joined onto its origin ({@link sitePageUrl}).
153
+ * A whole `SiteShellConfig` — the `site` block an app's config exports — fits. */
154
+ export type SitePageSite = Pick<SiteShellConfig, "origin" | "kind" | "chrome" | "sessionBridge">;
155
+ /** What {@link sitePageNode} (and the `sitePage` builder) takes: one page of the site, by path. */
156
+ export interface SitePageNodeSpec {
157
+ /** Path relative to the site's base URL — the same rule as {@link SitePage.path}: never a full
158
+ * URL, never outside the site. */
159
+ path: string;
160
+ /** The page's accessible name — what a screen reader announces for the WebView
161
+ * (`modifiers.accessibilityLabel`; RFC 0058 §3.3 requires one on every `WebView`). Copy from the
162
+ * provisioning file, like {@link SitePage.title}. Absent or blank ⇒ the site's host. */
163
+ title?: string;
164
+ /** Overrides merged OVER the site preset, like {@link SitePage.webView}. */
165
+ webView?: Partial<WebViewConfig>;
166
+ }
167
+ /** The component id every site-page node gets unless the author names one. A screen has one
168
+ * primary node (RFC 0079 §9), so a fixed id is unique and stays a stable test id (invariant 27).
169
+ * The node's WebView identity is the host screen's id (§5.1), never this. */
170
+ export declare const SITE_PAGE_NODE_ID = "site_page_view";
171
+ /** How {@link siteScreens} serves a site page: `"t3"` — a Tier-3 screen
172
+ * (`renderer: "webview_native_bridge"`), what every shipped binary renders — or `"node"` — an SDUI
173
+ * screen whose root is the primary WebView node (RFC 0079 §8), for a binary that ships RFC 0079 §5. */
174
+ export type SiteScreenForm = "t3" | "node";
175
+ export declare const SITE_SCREEN_FORMS: readonly SiteScreenForm[];
176
+ /** The renderer a node-form site screen carries: an SDUI screen with a payload and no logic bundle.
177
+ * `sdui_layout`, not `sdui_intent`: the payload is an exact layout (the page, and any native header
178
+ * or footer around it), and `sdui_layout` is what a binary falls back to for a renderer value it
179
+ * does not know, so it is the one every binary can draw (#4496). */
180
+ export declare const SITE_NODE_SCREEN_RENDERER: "sdui_layout";
181
+ /**
182
+ * One page of the site as an SDUI node — the `WebView` a screen puts its website in, with native UI
183
+ * above, below or over it (RFC 0079 §3). The page URL is {@link sitePageUrl}`(site.origin, page.path)`
184
+ * and the config is {@link siteWebViewPreset}`(site)` with `page.webView` merged over it — exactly
185
+ * what {@link defineSiteTab} gives a Tier-3 tab, so a page moves between the two shapes unchanged.
186
+ *
187
+ * Put it at the screen root, or as a direct child of a root `VStack` (header / page / footer),
188
+ * `HStack` or `ZStack`. Never inside a `LazyList`, `Pager`, `Carousel` or `CollapsingHeader`, and
189
+ * at most one per screen: the validator rejects those (RFC 0079 §9).
190
+ */
191
+ export declare function sitePageNode(site: SitePageSite, page: SitePageNodeSpec, opts?: {
192
+ id?: string;
193
+ }): Component;
194
+ /**
195
+ * Whether a screen is a Tier-3 site screen that desugars into the node form (RFC 0079 §8): a
196
+ * `webview_native_bridge` screen with a `url`, no `logicBundle` (a worker-backed T3 screen keeps its
197
+ * own path until §14 Q1) and no `webViewConfig.internalLinksAsScreens` (a hosted-site stack, §14 Q2).
198
+ * Every screen {@link siteScreens} builds desugars.
199
+ */
200
+ export declare function isDesugarableSiteScreen(descriptor: ScreenDescriptor): boolean;
201
+ /**
202
+ * The T3 → node desugar (RFC 0079 §3, §8). A desugarable Tier-3 site screen
203
+ * ({@link isDesugarableSiteScreen}) comes back as an SDUI screen ({@link SITE_NODE_SCREEN_RENDERER})
204
+ * whose `payload` is the primary WebView node: the screen's `url` and `webViewConfig` verbatim, with
205
+ * `role: "primary"`, `fill` and scrolling on, and the screen's `title` (else the page's host) as the
206
+ * node's accessible name. Every other screen field (id, title, cache control, top bar, …) is kept;
207
+ * `url` and `webViewConfig` move into the node. Any other descriptor comes back unchanged — the same
208
+ * object. Pure: the input is never mutated.
209
+ */
210
+ export declare function desugarSiteScreen(descriptor: ScreenDescriptor): ScreenDescriptor;
211
+ /** Options for {@link siteScreens}. */
212
+ export interface SiteScreensOptions {
213
+ /** Absent ⇒ `"t3"`. See {@link SiteScreenForm}. */
214
+ form?: SiteScreenForm;
215
+ }
149
216
  /** Every site page's descriptor plus the {@link SITE_PAGE_SCREEN_ID} fallback, keyed by
150
- * screen id. */
151
- export declare function siteScreens(site: SiteShellConfig): Record<string, ScreenDescriptor>;
217
+ * screen id. `form: "node"` serves each one through {@link desugarSiteScreen}: the same pages, as
218
+ * SDUI screens whose root is the primary WebView node (RFC 0079 §8). The fallback keeps
219
+ * `keepAlive: false` in both forms. */
220
+ export declare function siteScreens(site: SiteShellConfig, opts?: SiteScreensOptions): Record<string, ScreenDescriptor>;
152
221
  /** `NavigationConfig.site` for a site shell (RFC 0062 site routing): the site's origins, one
153
222
  * route per page, and {@link SITE_PAGE_SCREEN_ID} as the fallback. Feed it to
154
223
  * `defineApp({ navigation: { site } })`; every platform resolves links against it. */
@@ -14481,11 +14481,59 @@ function defineSitePageScreen(site) {
14481
14481
  webViewConfig: { ...preset, keepAlive: false }
14482
14482
  };
14483
14483
  }
14484
- function siteScreens(site) {
14484
+ var SITE_PAGE_NODE_ID = "site_page_view";
14485
+ var SITE_SCREEN_FORMS = ["t3", "node"];
14486
+ var SITE_NODE_SCREEN_RENDERER = "sdui_layout";
14487
+ function primarySiteWebView(url, config, id, label2) {
14488
+ return {
14489
+ id,
14490
+ body: {
14491
+ package: "himalaya",
14492
+ type: "WebView",
14493
+ props: { url, role: "primary", fill: true, scrollEnabled: true, ...config ? { config } : {} }
14494
+ },
14495
+ modifiers: { weight: 1, accessibilityLabel: label2?.trim() || hostOf(url) }
14496
+ };
14497
+ }
14498
+ function hostOf(url) {
14499
+ try {
14500
+ return new URL(url).host || url;
14501
+ } catch {
14502
+ return url;
14503
+ }
14504
+ }
14505
+ function sitePageNode(site, page, opts) {
14506
+ if (!site || site.kind !== "wix" && site.kind !== "base44") {
14507
+ throw new Error(`site kind ${JSON.stringify(site?.kind)} must be "wix" or "base44"`);
14508
+ }
14509
+ if (!page || typeof page.path !== "string") {
14510
+ throw new Error("a site page node needs a path");
14511
+ }
14512
+ const url = sitePageUrl(site.origin, page.path);
14513
+ return primarySiteWebView(url, { ...siteWebViewPreset(site), ...page.webView ?? {} }, opts?.id ?? SITE_PAGE_NODE_ID, page.title);
14514
+ }
14515
+ function isDesugarableSiteScreen(descriptor) {
14516
+ return !!descriptor && descriptor.renderer === "webview_native_bridge" && typeof descriptor.url === "string" && descriptor.url !== "" && descriptor.logicBundle === void 0 && descriptor.webViewConfig?.internalLinksAsScreens !== true;
14517
+ }
14518
+ function desugarSiteScreen(descriptor) {
14519
+ if (!isDesugarableSiteScreen(descriptor)) return descriptor;
14520
+ const { url, webViewConfig, ...screen } = descriptor;
14521
+ return {
14522
+ ...screen,
14523
+ renderer: SITE_NODE_SCREEN_RENDERER,
14524
+ payload: primarySiteWebView(url, webViewConfig ? { ...webViewConfig } : void 0, SITE_PAGE_NODE_ID, descriptor.title)
14525
+ };
14526
+ }
14527
+ function siteScreens(site, opts) {
14485
14528
  assertSiteShellConfig(site);
14529
+ const form = opts?.form ?? "t3";
14530
+ if (!SITE_SCREEN_FORMS.includes(form)) {
14531
+ throw new Error(`site screen form ${JSON.stringify(form)} must be one of ${SITE_SCREEN_FORMS.join(", ")}`);
14532
+ }
14533
+ const shape = (d) => form === "node" ? desugarSiteScreen(d) : d;
14486
14534
  return {
14487
- ...Object.fromEntries(site.pages.map((page) => [siteScreenId(page), defineSiteTab(site, page)])),
14488
- [SITE_PAGE_SCREEN_ID]: defineSitePageScreen(site)
14535
+ ...Object.fromEntries(site.pages.map((page) => [siteScreenId(page), shape(defineSiteTab(site, page))])),
14536
+ [SITE_PAGE_SCREEN_ID]: shape(defineSitePageScreen(site))
14489
14537
  };
14490
14538
  }
14491
14539
  function siteRoutePath(path) {
@@ -15376,7 +15424,10 @@ export {
15376
15424
  SITE_MENU_SYSTEM_SEGMENT,
15377
15425
  SITE_MENU_SYSTEM_TITLE,
15378
15426
  SITE_NAV_LINKS_JS,
15427
+ SITE_NODE_SCREEN_RENDERER,
15428
+ SITE_PAGE_NODE_ID,
15379
15429
  SITE_PAGE_SCREEN_ID,
15430
+ SITE_SCREEN_FORMS,
15380
15431
  SITE_SCREEN_PREFIX,
15381
15432
  SITE_SHELL_MAX_TABS,
15382
15433
  SIZE_CLASS_BREAKPOINTS,
@@ -15432,6 +15483,7 @@ export {
15432
15483
  defineApp,
15433
15484
  defineSitePageScreen,
15434
15485
  defineSiteTab,
15486
+ desugarSiteScreen,
15435
15487
  effectiveFieldRule,
15436
15488
  effectiveWebViewInstanceId,
15437
15489
  errorMessageFor,
@@ -15447,6 +15499,7 @@ export {
15447
15499
  impliedKeyboard,
15448
15500
  isComponentAllowed,
15449
15501
  isComponentAllowedForFamily,
15502
+ isDesugarableSiteScreen,
15450
15503
  isInternalEmail,
15451
15504
  isPlayerRequirements,
15452
15505
  isRTL,
@@ -15506,6 +15559,7 @@ export {
15506
15559
  siteNav,
15507
15560
  siteNavConfig,
15508
15561
  siteNavKind,
15562
+ sitePageNode,
15509
15563
  sitePageUrl,
15510
15564
  siteScreenId,
15511
15565
  siteScreens,
@@ -8338,6 +8338,136 @@ function workerSubtreePolicyErrors(policy) {
8338
8338
  return out;
8339
8339
  }
8340
8340
 
8341
+ // ../../core/ts/src/site-shell.ts
8342
+ function normalizeSiteOrigin(origin) {
8343
+ const raw = (typeof origin === "string" ? origin : "").trim();
8344
+ let url;
8345
+ try {
8346
+ url = new URL(raw);
8347
+ } catch {
8348
+ throw new Error(`site origin ${JSON.stringify(origin)} is not a URL`);
8349
+ }
8350
+ if (url.protocol !== "https:") {
8351
+ throw new Error(`site origin ${JSON.stringify(origin)} must be https`);
8352
+ }
8353
+ if (url.username || url.password) {
8354
+ throw new Error(`site origin ${JSON.stringify(origin)} must not carry credentials`);
8355
+ }
8356
+ if (url.search || url.hash) {
8357
+ throw new Error(`site origin ${JSON.stringify(origin)} must not carry a query or fragment`);
8358
+ }
8359
+ const path = url.pathname.replace(/\/+$/, "");
8360
+ return `https://${url.host.toLowerCase()}${path}`;
8361
+ }
8362
+ function siteAllowedOrigins(origin, kind) {
8363
+ const base = new URL(normalizeSiteOrigin(origin));
8364
+ const host = base.host;
8365
+ const path = base.pathname.replace(/\/+$/, "");
8366
+ const hosts = [host];
8367
+ const isWixFreeHost = host.endsWith(".wixsite.com") || host.endsWith(".wixstudio.com");
8368
+ if (!isWixFreeHost && kind === "wix") hosts.push(host.startsWith("www.") ? host.slice(4) : `www.${host}`);
8369
+ return hosts.map((h) => `https://${h}${path}/`);
8370
+ }
8371
+ function sitePageUrl(origin, path) {
8372
+ const base = normalizeSiteOrigin(origin);
8373
+ const raw = (typeof path === "string" ? path : "").trim();
8374
+ if (/^[a-z][a-z0-9+.-]*:/i.test(raw) || raw.startsWith("//")) {
8375
+ throw new Error(`site page path ${JSON.stringify(path)} must be relative to the site`);
8376
+ }
8377
+ if (raw.includes("\\")) {
8378
+ throw new Error(`site page path ${JSON.stringify(path)} must not contain a backslash`);
8379
+ }
8380
+ const trimmed = raw.replace(/^\/+/, "");
8381
+ const joined = trimmed ? `${base}/${trimmed}` : base;
8382
+ const resolved = new URL(joined);
8383
+ const baseUrl = new URL(base);
8384
+ const basePath = baseUrl.pathname.replace(/\/+$/, "");
8385
+ const inside = resolved.pathname === basePath || resolved.pathname === `${basePath}/` || resolved.pathname.startsWith(`${basePath}/`);
8386
+ if (resolved.host !== baseUrl.host || !inside) {
8387
+ throw new Error(`site page path ${JSON.stringify(path)} resolves outside the site`);
8388
+ }
8389
+ return joined;
8390
+ }
8391
+ function resolveSiteChrome(chrome) {
8392
+ return {
8393
+ hideSiteHeader: chrome?.hideSiteHeader ?? true,
8394
+ hideSiteMenu: chrome?.hideSiteMenu ?? true,
8395
+ hideSiteFooter: chrome?.hideSiteFooter ?? true,
8396
+ hideWixAds: chrome?.hideWixAds ?? true
8397
+ };
8398
+ }
8399
+ function siteWebViewPreset(site) {
8400
+ const chrome = resolveSiteChrome(site.chrome);
8401
+ return {
8402
+ layout: "inset",
8403
+ immersive: true,
8404
+ // Chrome hiding is binary-shipped (RFC 0062): only these flags travel over the air, so an
8405
+ // owner can flip one without a new build, and no page script is served OTA (invariant 15).
8406
+ hideHostedSiteHeader: chrome.hideSiteHeader,
8407
+ hideHostedSiteFooter: chrome.hideSiteFooter,
8408
+ // Wix ads only exist on Wix free sites; a Base44 site never gets the Wix selectors.
8409
+ hideWixAds: site.kind === "wix" && chrome.hideWixAds,
8410
+ // The site's own menu duplicates the native tabs/drawer. Wix markers only, like the ads.
8411
+ hideHostedSiteMenu: site.kind === "wix" && chrome.hideSiteMenu,
8412
+ // RFC 0062 §5.8 — a Base44 app is signed in natively and its session carried into the page.
8413
+ // The host still refuses unless the app declares the `base44` capability. A Wix site bridges
8414
+ // only when its app signs members in natively (`site.sessionBridge`); the host additionally
8415
+ // needs the app's baked site and its Wix member login installed.
8416
+ ...site.kind === "base44" ? { hostedSiteAdapter: "base44", sessionBridge: true } : {},
8417
+ ...site.kind === "wix" && site.sessionBridge ? { hostedSiteAdapter: "wix", sessionBridge: true } : {},
8418
+ pullToRefresh: true,
8419
+ showProgressBar: true,
8420
+ syncStatusBarAppearance: true,
8421
+ allowedOrigins: siteAllowedOrigins(site.origin, site.kind),
8422
+ externalLinks: "system_browser",
8423
+ promptBeforeExternalLink: true,
8424
+ // A real external site, not Himalaya screens — its links stay in its WebView.
8425
+ interceptInternalLinks: false,
8426
+ floatingBackButton: { enabled: true },
8427
+ autoReloadOnCrash: true,
8428
+ domStorageEnabled: true,
8429
+ // A live site, not app-bundled content: honor its HTTP caching. The default
8430
+ // (`respectHttpCache` unset) is offline-first — iOS applies that to the top-level page only, but
8431
+ // Android's WebView cache mode governs EVERY request, so a hosted site's API fetches, scripts and
8432
+ // page data came from cache regardless of expiry, cookies or CORS headers: a signed-in member got
8433
+ // the visitor's cached member state back (the site flipped them to its login wall), and a cached
8434
+ // non-CORS response replayed for a CORS fetch left the page blank (#3700).
8435
+ respectHttpCache: true,
8436
+ // Each tab keeps its own warm WebView across tab switches (keyed by screen id on both
8437
+ // platforms; see SITE_SHELL_MAX_TABS for why the tab count stays within the store's cap).
8438
+ keepAlive: true
8439
+ };
8440
+ }
8441
+ var SITE_PAGE_NODE_ID = "site_page_view";
8442
+ function primarySiteWebView(url, config, id, label2) {
8443
+ return {
8444
+ id,
8445
+ body: {
8446
+ package: "himalaya",
8447
+ type: "WebView",
8448
+ props: { url, role: "primary", fill: true, scrollEnabled: true, ...config ? { config } : {} }
8449
+ },
8450
+ modifiers: { weight: 1, accessibilityLabel: label2?.trim() || hostOf(url) }
8451
+ };
8452
+ }
8453
+ function hostOf(url) {
8454
+ try {
8455
+ return new URL(url).host || url;
8456
+ } catch {
8457
+ return url;
8458
+ }
8459
+ }
8460
+ function sitePageNode(site, page, opts) {
8461
+ if (!site || site.kind !== "wix" && site.kind !== "base44") {
8462
+ throw new Error(`site kind ${JSON.stringify(site?.kind)} must be "wix" or "base44"`);
8463
+ }
8464
+ if (!page || typeof page.path !== "string") {
8465
+ throw new Error("a site page node needs a path");
8466
+ }
8467
+ const url = sitePageUrl(site.origin, page.path);
8468
+ return primarySiteWebView(url, { ...siteWebViewPreset(site), ...page.webView ?? {} }, opts?.id ?? SITE_PAGE_NODE_ID, page.title);
8469
+ }
8470
+
8341
8471
  // ../../core/ts/src/rich-content-limits.generated.ts
8342
8472
  var RICH_CONTENT_LIMITS = Object.freeze({ maxBytes: 262144, maxNodes: 5e3, maxDepth: 16 });
8343
8473
 
@@ -9340,6 +9470,9 @@ function webView(props, opts) {
9340
9470
  body: { package: "himalaya", type: "WebView", props }
9341
9471
  };
9342
9472
  }
9473
+ function sitePage(site, page, opts) {
9474
+ return sitePageNode(site, page, opts);
9475
+ }
9343
9476
  function dateStrip(props, opts) {
9344
9477
  const selected = props.selectedPath ?? props.selectedId;
9345
9478
  return filterChips(
@@ -9598,6 +9731,7 @@ export {
9598
9731
  segmentedControl,
9599
9732
  selectionControl,
9600
9733
  shape,
9734
+ sitePage,
9601
9735
  skRect,
9602
9736
  skeleton,
9603
9737
  slider,
package/dist/cli.mjs CHANGED
@@ -16198,6 +16198,7 @@ function webViewOriginAllowed(url, origins) {
16198
16198
  }
16199
16199
  var init_webview_origin = __esm({
16200
16200
  "../../core/ts/src/webview-origin.ts"() {
16201
+ "use strict";
16201
16202
  init_define_HHP_CATALOG();
16202
16203
  }
16203
16204
  });
@@ -31832,7 +31833,6 @@ function resolveIdiom(tokens2, ctx = {}) {
31832
31833
  var IDIOM_CONTEXTS, UNSAFE_KEYS;
31833
31834
  var init_idiom = __esm({
31834
31835
  "../../core/ts/src/idiom.ts"() {
31835
- "use strict";
31836
31836
  init_define_HHP_CATALOG();
31837
31837
  IDIOM_CONTEXTS = {
31838
31838
  ios: { native: ["ios"] },
@@ -370,7 +370,8 @@ a single dial metric. *Use a `Badge` for a count, a `Tag` for a category — the
370
370
  **Media** — `Image` (`fillWidth`, `height`, always `contentDescription`); `Video`/`Lottie`/`Rive` for
371
371
  motion media; `Map` for location; `Avatar` for a person; `QrCode` to share a link, ticket or invite
372
372
  as a code generated on the device (bind `valuePath`; keep the payload short, since a literal over the
373
- level's capacity fails validation); `WebView` only when native can't express it.
373
+ level's capacity fails validation); `WebView` only when native can't express it. For a page of the
374
+ customer's own website, use `sitePage(site, { path })` (see §4), not a hand-built `WebView`.
374
375
  *Fill-width media gets a `cornerRadius` so it doesn't fight the card edges.*
375
376
  Images preview by default: a tap opens one full screen and pages through the screen's other images.
376
377
  Opt out with `modifiers.imagePreview: "off"` on an image or subtree that should not open; use `"view"`
@@ -396,6 +397,7 @@ Concrete patterns lifted from real usage:
396
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".
397
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.
398
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. To serve a whole site-shell app in this form, use `siteScreens(site, { form: "node" })`; `desugarSiteScreen(descriptor)` converts one Tier-3 site screen.
399
401
  - **Overlay** — `zstack({ alignment: "center", children: [ backdropImage(cornerRadius 12), withModifiers(label, { padding, background: { token: "accentPrimary" }, cornerRadius: 10 }) ] })`.
400
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.
401
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()`.
@@ -237,6 +237,8 @@ The map comes from what the analysis already reads without owner credentials, be
237
237
  - **Size:** at most 10 pages, with titles capped at 40 characters.
238
238
  - **Chrome:** the site's own header, footer and Wix ads are hidden (the site shell's default).
239
239
 
240
+ Each page becomes a Tier-3 WebView screen today (`siteScreens(site)` in `@wix/himalaya/core`). A second form of the same pages exists: `siteScreens(site, { form: "node" })` serves each one as an SDUI screen whose root is the page as a primary `WebView` node, and `sitePage(site, { path })` (`@wix/himalaya/sdui`) puts one page on a screen beside native UI. The default stays the Tier-3 form, because an app binary built before site-page nodes would draw the node form as a plain embedded WebView. See [Designing Himi screens → a website page with native UI around it](designing-himi-screens.md#4-layout-idioms-recipes-that-read-well).
241
+
240
242
  The block is validated with the shell's own rules before it is written. Only a site shell ever receives it: the analysis leaves it out for any other `--shell`, and the merge drops it for a shell whose committed contract has no `site`. `--apply --shell brandy` without a `site` block in the overlay is refused, because baking would ship the shell's demo site under the customer's brand.
241
243
 
242
244
  When the analysis recognized at least one vertical, `--apply` also patches the shell's baked home
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1700.0",
3
+ "version": "0.1701.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": "836e3ad41dda397042f6f4d7951a32e520bfaac1758fae01e781ca02"
84
+ "falconPackageHash": "fda19cb089410f3bae29e77e97d4d3448d08182e4d7c25fed03b7754"
85
85
  }