@wix/himalaya-cli 0.1747.0 → 0.1748.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/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-shell.d.ts +34 -8
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +45 -18
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +36 -14
- package/dist/cli.mjs +2498 -1816
- package/guides/one-app-to-himi-app.md +11 -6
- package/guides/wix-business-context.md +25 -1
- package/guides/wix-site-to-himi-app.md +2 -1
- package/package.json +2 -2
- package/templates/beauty-salon/l10n/fr.json +25 -5
- package/templates/beauty-salon/l10n/he.json +20 -4
- package/templates/beauty-salon/recipes/blog-hero.json +95 -0
- package/templates/beauty-salon/recipes/blog-list-thumb-start.json +177 -147
- package/templates/beauty-salon/recipes/blog-list.json +172 -142
- package/templates/beauty-salon/recipes/events-inline-list.json +30 -5
- package/templates/beauty-salon/recipes/events-inline.json +30 -5
- package/templates/beauty-salon/recipes/faq-list.json +503 -0
- package/templates/beauty-salon/recipes/groups-list.json +196 -0
- package/templates/beauty-salon/recipes/products-carousel.json +141 -0
- package/templates/beauty-salon/recipes/products-grid.json +143 -0
- package/templates/beauty-salon/tier5-src/_shared/blog-list.ts +9 -9
- package/templates/beauty-salon/tier5-src/_shared/events-inline.ts +7 -5
- package/templates/beauty-salon/tier5-src/_shared/faq-list.ts +405 -0
- package/templates/beauty-salon/tier5-src/_shared/groups-section.ts +110 -0
- package/templates/beauty-salon/tier5-src/_shared/member-row-extras.ts +10 -2
- package/templates/beauty-salon/tier5-src/_shared/members-directory.ts +9 -5
- package/templates/beauty-salon/tier5-src/_shared/products-section.ts +76 -0
- package/templates/beauty-salon/tier5-src/_shared/programs-section.ts +2 -2
- package/templates/branded-lite/l10n/fr.json +10 -5
- package/templates/branded-lite/l10n/he.json +8 -4
- package/templates/branded-lite/recipes/blog-hero.json +95 -0
- package/templates/branded-lite/recipes/blog-list-thumb-start.json +177 -147
- package/templates/branded-lite/recipes/blog-list.json +172 -142
- package/templates/branded-lite/recipes/events-inline-list.json +30 -5
- package/templates/branded-lite/recipes/events-inline.json +30 -5
- package/templates/branded-lite/recipes/faq-list.json +503 -0
- package/templates/branded-lite/recipes/groups-list.json +196 -0
- package/templates/branded-lite/recipes/products-carousel.json +141 -0
- package/templates/branded-lite/recipes/products-grid.json +143 -0
- package/templates/branded-lite/tier5-src/_shared/blog-list.ts +9 -9
- package/templates/branded-lite/tier5-src/_shared/events-inline.ts +7 -5
- package/templates/branded-lite/tier5-src/_shared/faq-list.ts +405 -0
- package/templates/branded-lite/tier5-src/_shared/groups-section.ts +110 -0
- package/templates/branded-lite/tier5-src/_shared/member-row-extras.ts +10 -2
- package/templates/branded-lite/tier5-src/_shared/members-directory.ts +9 -5
- package/templates/branded-lite/tier5-src/_shared/products-section.ts +76 -0
- package/templates/branded-lite/tier5-src/_shared/programs-section.ts +2 -2
- package/templates/branded-lite/tier5-src/himi-branded-lite-faq/index.ts +5 -369
- package/templates/brandy/README.md +46 -5
- package/templates/brandy/config.ts +11 -0
- package/templates/brandy/himalaya.template.json +1 -1
- package/templates/community-club/l10n/fr.json +25 -5
- package/templates/community-club/l10n/he.json +20 -4
- package/templates/community-club/recipes/blog-hero.json +95 -0
- package/templates/community-club/recipes/blog-list-thumb-start.json +177 -147
- package/templates/community-club/recipes/blog-list.json +172 -142
- package/templates/community-club/recipes/events-inline-list.json +30 -5
- package/templates/community-club/recipes/events-inline.json +30 -5
- package/templates/community-club/recipes/faq-list.json +503 -0
- package/templates/community-club/recipes/groups-list.json +196 -0
- package/templates/community-club/recipes/products-carousel.json +141 -0
- package/templates/community-club/recipes/products-grid.json +143 -0
- package/templates/community-club/tier5-src/_shared/blog-list.ts +9 -9
- package/templates/community-club/tier5-src/_shared/events-inline.ts +7 -5
- package/templates/community-club/tier5-src/_shared/faq-list.ts +405 -0
- package/templates/community-club/tier5-src/_shared/groups-section.ts +110 -0
- package/templates/community-club/tier5-src/_shared/member-row-extras.ts +10 -2
- package/templates/community-club/tier5-src/_shared/members-directory.ts +9 -5
- package/templates/community-club/tier5-src/_shared/products-section.ts +76 -0
- package/templates/community-club/tier5-src/_shared/programs-section.ts +2 -2
- package/templates/events-meetups/l10n/fr.json +25 -5
- package/templates/events-meetups/l10n/he.json +20 -4
- package/templates/events-meetups/recipes/blog-hero.json +95 -0
- package/templates/events-meetups/recipes/blog-list-thumb-start.json +177 -147
- package/templates/events-meetups/recipes/blog-list.json +172 -142
- package/templates/events-meetups/recipes/events-inline-list.json +30 -5
- package/templates/events-meetups/recipes/events-inline.json +30 -5
- package/templates/events-meetups/recipes/faq-list.json +503 -0
- package/templates/events-meetups/recipes/groups-list.json +196 -0
- package/templates/events-meetups/recipes/products-carousel.json +141 -0
- package/templates/events-meetups/recipes/products-grid.json +143 -0
- package/templates/events-meetups/tier5-src/_shared/blog-list.ts +9 -9
- package/templates/events-meetups/tier5-src/_shared/events-inline.ts +7 -5
- package/templates/events-meetups/tier5-src/_shared/faq-list.ts +405 -0
- package/templates/events-meetups/tier5-src/_shared/groups-section.ts +110 -0
- package/templates/events-meetups/tier5-src/_shared/member-row-extras.ts +10 -2
- package/templates/events-meetups/tier5-src/_shared/members-directory.ts +9 -5
- package/templates/events-meetups/tier5-src/_shared/products-section.ts +76 -0
- package/templates/events-meetups/tier5-src/_shared/programs-section.ts +2 -2
- package/templates/gym-fitness/l10n/fr.json +25 -5
- package/templates/gym-fitness/l10n/he.json +20 -4
- package/templates/gym-fitness/recipes/blog-hero.json +95 -0
- package/templates/gym-fitness/recipes/blog-list-thumb-start.json +177 -147
- package/templates/gym-fitness/recipes/blog-list.json +172 -142
- package/templates/gym-fitness/recipes/events-inline-list.json +30 -5
- package/templates/gym-fitness/recipes/events-inline.json +30 -5
- package/templates/gym-fitness/recipes/faq-list.json +503 -0
- package/templates/gym-fitness/recipes/groups-list.json +196 -0
- package/templates/gym-fitness/recipes/products-carousel.json +141 -0
- package/templates/gym-fitness/recipes/products-grid.json +143 -0
- package/templates/gym-fitness/tier5-src/_shared/blog-list.ts +9 -9
- package/templates/gym-fitness/tier5-src/_shared/events-inline.ts +7 -5
- package/templates/gym-fitness/tier5-src/_shared/faq-list.ts +405 -0
- package/templates/gym-fitness/tier5-src/_shared/groups-section.ts +110 -0
- package/templates/gym-fitness/tier5-src/_shared/member-row-extras.ts +10 -2
- package/templates/gym-fitness/tier5-src/_shared/members-directory.ts +9 -5
- package/templates/gym-fitness/tier5-src/_shared/products-section.ts +76 -0
- package/templates/gym-fitness/tier5-src/_shared/programs-section.ts +2 -2
- package/templates/nonprofit-cause/l10n/fr.json +25 -5
- package/templates/nonprofit-cause/l10n/he.json +20 -4
- package/templates/nonprofit-cause/recipes/blog-hero.json +95 -0
- package/templates/nonprofit-cause/recipes/blog-list-thumb-start.json +177 -147
- package/templates/nonprofit-cause/recipes/blog-list.json +172 -142
- package/templates/nonprofit-cause/recipes/events-inline-list.json +30 -5
- package/templates/nonprofit-cause/recipes/events-inline.json +30 -5
- package/templates/nonprofit-cause/recipes/faq-list.json +503 -0
- package/templates/nonprofit-cause/recipes/groups-list.json +196 -0
- package/templates/nonprofit-cause/recipes/products-carousel.json +141 -0
- package/templates/nonprofit-cause/recipes/products-grid.json +143 -0
- package/templates/nonprofit-cause/tier5-src/_shared/blog-list.ts +9 -9
- package/templates/nonprofit-cause/tier5-src/_shared/events-inline.ts +7 -5
- package/templates/nonprofit-cause/tier5-src/_shared/faq-list.ts +405 -0
- package/templates/nonprofit-cause/tier5-src/_shared/groups-section.ts +110 -0
- package/templates/nonprofit-cause/tier5-src/_shared/member-row-extras.ts +10 -2
- package/templates/nonprofit-cause/tier5-src/_shared/members-directory.ts +9 -5
- package/templates/nonprofit-cause/tier5-src/_shared/products-section.ts +76 -0
- package/templates/nonprofit-cause/tier5-src/_shared/programs-section.ts +2 -2
- package/templates/podcast-creator/l10n/fr.json +35 -5
- package/templates/podcast-creator/l10n/he.json +28 -4
- package/templates/podcast-creator/recipes/blog-hero.json +95 -0
- package/templates/podcast-creator/recipes/blog-list-thumb-start.json +177 -147
- package/templates/podcast-creator/recipes/blog-list.json +172 -142
- package/templates/podcast-creator/recipes/events-inline-list.json +30 -5
- package/templates/podcast-creator/recipes/events-inline.json +30 -5
- package/templates/podcast-creator/recipes/faq-list.json +503 -0
- package/templates/podcast-creator/recipes/groups-list.json +196 -0
- package/templates/podcast-creator/recipes/products-carousel.json +141 -0
- package/templates/podcast-creator/recipes/products-grid.json +143 -0
- package/templates/podcast-creator/tier5-src/_shared/blog-list.ts +9 -9
- package/templates/podcast-creator/tier5-src/_shared/events-inline.ts +7 -5
- package/templates/podcast-creator/tier5-src/_shared/faq-list.ts +405 -0
- package/templates/podcast-creator/tier5-src/_shared/groups-section.ts +110 -0
- package/templates/podcast-creator/tier5-src/_shared/member-row-extras.ts +10 -2
- package/templates/podcast-creator/tier5-src/_shared/members-directory.ts +9 -5
- package/templates/podcast-creator/tier5-src/_shared/products-section.ts +76 -0
- package/templates/podcast-creator/tier5-src/_shared/programs-section.ts +2 -2
- package/templates/portfolio-creative/l10n/fr.json +25 -5
- package/templates/portfolio-creative/l10n/he.json +20 -4
- package/templates/portfolio-creative/recipes/blog-hero.json +95 -0
- package/templates/portfolio-creative/recipes/blog-list-thumb-start.json +177 -147
- package/templates/portfolio-creative/recipes/blog-list.json +172 -142
- package/templates/portfolio-creative/recipes/events-inline-list.json +30 -5
- package/templates/portfolio-creative/recipes/events-inline.json +30 -5
- package/templates/portfolio-creative/recipes/faq-list.json +503 -0
- package/templates/portfolio-creative/recipes/groups-list.json +196 -0
- package/templates/portfolio-creative/recipes/products-carousel.json +141 -0
- package/templates/portfolio-creative/recipes/products-grid.json +143 -0
- package/templates/portfolio-creative/tier5-src/_shared/blog-list.ts +9 -9
- package/templates/portfolio-creative/tier5-src/_shared/events-inline.ts +7 -5
- package/templates/portfolio-creative/tier5-src/_shared/faq-list.ts +405 -0
- package/templates/portfolio-creative/tier5-src/_shared/groups-section.ts +110 -0
- package/templates/portfolio-creative/tier5-src/_shared/member-row-extras.ts +10 -2
- package/templates/portfolio-creative/tier5-src/_shared/members-directory.ts +9 -5
- package/templates/portfolio-creative/tier5-src/_shared/products-section.ts +76 -0
- package/templates/portfolio-creative/tier5-src/_shared/programs-section.ts +2 -2
- package/templates/restaurant/l10n/fr.json +35 -5
- package/templates/restaurant/l10n/he.json +28 -4
- package/templates/restaurant/recipes/blog-hero.json +95 -0
- package/templates/restaurant/recipes/blog-list-thumb-start.json +177 -147
- package/templates/restaurant/recipes/blog-list.json +172 -142
- package/templates/restaurant/recipes/events-inline-list.json +30 -5
- package/templates/restaurant/recipes/events-inline.json +30 -5
- package/templates/restaurant/recipes/faq-list.json +503 -0
- package/templates/restaurant/recipes/groups-list.json +196 -0
- package/templates/restaurant/recipes/products-carousel.json +141 -0
- package/templates/restaurant/recipes/products-grid.json +143 -0
- package/templates/restaurant/tier5-src/_shared/blog-list.ts +9 -9
- package/templates/restaurant/tier5-src/_shared/events-inline.ts +7 -5
- package/templates/restaurant/tier5-src/_shared/faq-list.ts +405 -0
- package/templates/restaurant/tier5-src/_shared/groups-section.ts +110 -0
- package/templates/restaurant/tier5-src/_shared/member-row-extras.ts +10 -2
- package/templates/restaurant/tier5-src/_shared/members-directory.ts +9 -5
- package/templates/restaurant/tier5-src/_shared/products-section.ts +76 -0
- package/templates/restaurant/tier5-src/_shared/programs-section.ts +2 -2
- package/templates/retail-store/l10n/fr.json +25 -5
- package/templates/retail-store/l10n/he.json +20 -4
- package/templates/retail-store/recipes/blog-hero.json +95 -0
- package/templates/retail-store/recipes/blog-list-thumb-start.json +177 -147
- package/templates/retail-store/recipes/blog-list.json +172 -142
- package/templates/retail-store/recipes/events-inline-list.json +30 -5
- package/templates/retail-store/recipes/events-inline.json +30 -5
- package/templates/retail-store/recipes/faq-list.json +503 -0
- package/templates/retail-store/recipes/groups-list.json +196 -0
- package/templates/retail-store/recipes/products-carousel.json +141 -0
- package/templates/retail-store/recipes/products-grid.json +143 -0
- package/templates/retail-store/tier5-src/_shared/blog-list.ts +9 -9
- package/templates/retail-store/tier5-src/_shared/events-inline.ts +7 -5
- package/templates/retail-store/tier5-src/_shared/faq-list.ts +405 -0
- package/templates/retail-store/tier5-src/_shared/groups-section.ts +110 -0
- package/templates/retail-store/tier5-src/_shared/member-row-extras.ts +10 -2
- package/templates/retail-store/tier5-src/_shared/members-directory.ts +9 -5
- package/templates/retail-store/tier5-src/_shared/products-section.ts +76 -0
- package/templates/retail-store/tier5-src/_shared/programs-section.ts +2 -2
- package/templates/yoga-studio/l10n/fr.json +35 -5
- package/templates/yoga-studio/l10n/he.json +28 -4
- package/templates/yoga-studio/recipes/blog-hero.json +95 -0
- package/templates/yoga-studio/recipes/blog-list-thumb-start.json +177 -147
- package/templates/yoga-studio/recipes/blog-list.json +172 -142
- package/templates/yoga-studio/recipes/events-inline-list.json +30 -5
- package/templates/yoga-studio/recipes/events-inline.json +30 -5
- package/templates/yoga-studio/recipes/faq-list.json +503 -0
- package/templates/yoga-studio/recipes/groups-list.json +196 -0
- package/templates/yoga-studio/recipes/products-carousel.json +141 -0
- package/templates/yoga-studio/recipes/products-grid.json +143 -0
- package/templates/yoga-studio/tier5-src/_shared/blog-list.ts +9 -9
- package/templates/yoga-studio/tier5-src/_shared/events-inline.ts +7 -5
- package/templates/yoga-studio/tier5-src/_shared/faq-list.ts +405 -0
- package/templates/yoga-studio/tier5-src/_shared/groups-section.ts +110 -0
- package/templates/yoga-studio/tier5-src/_shared/member-row-extras.ts +10 -2
- package/templates/yoga-studio/tier5-src/_shared/members-directory.ts +9 -5
- package/templates/yoga-studio/tier5-src/_shared/products-section.ts +76 -0
- package/templates/yoga-studio/tier5-src/_shared/programs-section.ts +2 -2
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-shell.d.ts
CHANGED
|
@@ -1,8 +1,29 @@
|
|
|
1
1
|
import type { IconName } from "./icon-catalog.generated.js";
|
|
2
2
|
import type { Component, DrawerItem, LinkableScreen, NavTabItem, ScreenDescriptor, SiteNavConfig, WebViewConfig } from "./schema.js";
|
|
3
|
-
/** Which hosting platform the site runs on. Selects origin allow-lists
|
|
4
|
-
*
|
|
5
|
-
|
|
3
|
+
/** Which hosting platform the site runs on. Selects origin allow-lists and the binary-shipped
|
|
4
|
+
* page adapter:
|
|
5
|
+
* - `"wix"` — a Wix site: its custom domain's `www.` twin is allowed, the Wix chrome hiders (ads,
|
|
6
|
+
* menu) apply, and a member binding turns on the Wix session bridge;
|
|
7
|
+
* - `"base44"` — a Base44 app: the Base44 adapter and session bridge;
|
|
8
|
+
* - `"web"` — any other https website: its own host only, no adapter, no session bridge, nothing
|
|
9
|
+
* Wix-specific, and nothing of the site's chrome hidden unless the owner asks. Visitor-only: a
|
|
10
|
+
* member binding beside it is refused, and so is `menuSource: "runtime"` (there is no Wix menu
|
|
11
|
+
* to read). */
|
|
12
|
+
export type SiteKind = "wix" | "base44" | "web";
|
|
13
|
+
/** The hosts Wix serves a free site on, under a per-site path (`<user>.wixsite.com/<site>`, and the
|
|
14
|
+
* Studio / Editor X equivalents). ONE list for the site shell: {@link siteAllowedOrigins} admits no
|
|
15
|
+
* `www.` twin for any of them, and `himi site analyze` reads a host under one as a Wix site. The same
|
|
16
|
+
* four are the Wix-served hosts of the member-site-page rules (web host `WIX_SERVED_SITE_HOST_SUFFIXES`,
|
|
17
|
+
* core's `HostedMemberSitePage` on iOS / Android); a test pins the web twin equal. */
|
|
18
|
+
export declare const WIX_FREE_SITE_HOST_SUFFIXES: readonly string[];
|
|
19
|
+
/** Whether `host` is a Wix free-site host ({@link WIX_FREE_SITE_HOST_SUFFIXES}). Decided on the host
|
|
20
|
+
* NAME: a `:port` is ignored, as the native `WebViewSiteTrust.boundaries` (hostname and port kept apart)
|
|
21
|
+
* ignores it. */
|
|
22
|
+
export declare function isWixFreeSiteHost(host: string): boolean;
|
|
23
|
+
/** Every {@link SiteKind}, for a parser that validates one. */
|
|
24
|
+
export declare const SITE_KINDS: readonly SiteKind[];
|
|
25
|
+
/** Whether `value` is a {@link SiteKind}. */
|
|
26
|
+
export declare function isSiteKind(value: unknown): value is SiteKind;
|
|
6
27
|
/** Where a page lives in the native chrome. `overflow` pages are routable (deep links,
|
|
7
28
|
* in-site links) but get no tab and no drawer row. */
|
|
8
29
|
export type SitePagePlacement = "tab" | "drawer" | "overflow";
|
|
@@ -26,7 +47,8 @@ export interface SitePage {
|
|
|
26
47
|
webView?: Partial<WebViewConfig>;
|
|
27
48
|
}
|
|
28
49
|
/** What the shell hides from the hosted site so the native chrome is the only chrome.
|
|
29
|
-
* Every flag defaults to `true` (hidden)
|
|
50
|
+
* Every flag defaults to `true` (hidden) for a Wix or Base44 site, and to `false` for a `"web"`
|
|
51
|
+
* site, whose markup the shell knows nothing about (see {@link resolveSiteChrome}). */
|
|
30
52
|
export interface SiteChrome {
|
|
31
53
|
/** The site's own header on inner pages. A tab's root page keeps it, for its logo, cart and
|
|
32
54
|
* member avatar — see {@link hideSiteMenu} for its menu. */
|
|
@@ -120,8 +142,9 @@ export declare function siteHost(origin: string): string;
|
|
|
120
142
|
* • a free site stays inside its own path — `/other-site` on the same `<user>.wixsite.com`
|
|
121
143
|
* host is a different site, and leaves the app;
|
|
122
144
|
* • never a prefix of another host — `https://site.com/` does not admit `site.com.evil.io`.
|
|
123
|
-
* A custom Wix domain also admits its apex / `www.` twin, because Wix redirects between them
|
|
124
|
-
*
|
|
145
|
+
* A custom Wix domain also admits its apex / `www.` twin, because Wix redirects between them; a
|
|
146
|
+
* `"web"` site does not — the twin is a Wix rule, and any other site's `www.` host may be someone
|
|
147
|
+
* else's. Nothing else is admitted for any kind: a Base44 tenant gets its own host only, never every
|
|
125
148
|
* `*.base44.app` tenant — Base44 sign-in is the app's native Account screen, whose session the
|
|
126
149
|
* bridge seeds into this WebView; only browser OAuth will run in the system auth session (RFC 0062 §5
|
|
127
150
|
* item 8), never here.
|
|
@@ -131,8 +154,11 @@ export declare function siteAllowedOrigins(origin: string, kind: SiteKind): stri
|
|
|
131
154
|
export declare function sitePageUrl(origin: string, path: string): string;
|
|
132
155
|
/** `site_<page.id>`. */
|
|
133
156
|
export declare function siteScreenId(page: Pick<SitePage, "id">): string;
|
|
134
|
-
/** Resolved chrome flags
|
|
135
|
-
|
|
157
|
+
/** Resolved chrome flags. An absent flag is `true` for a Wix or Base44 site (the site shell's
|
|
158
|
+
* default, RFC 0062 §6) and `false` for a `"web"` site: the header and footer hiders fall back to
|
|
159
|
+
* the page's first `<header>` / last `<footer>`, which on an arbitrary site may be an article's,
|
|
160
|
+
* so they run only when the owner turns them on. `kind` absent ⇒ the Wix/Base44 default. */
|
|
161
|
+
export declare function resolveSiteChrome(chrome: SiteChrome | undefined, kind?: SiteKind): Required<SiteChrome>;
|
|
136
162
|
/**
|
|
137
163
|
* The WebView behaviour every site tab shares. Derived from the demo app's Site tab
|
|
138
164
|
* (`buildWebViewSiteApp`), which runs a real Wix site this way on both platforms:
|
|
@@ -15114,6 +15114,20 @@ function webViewEmbeddedAppFindings(screens) {
|
|
|
15114
15114
|
}
|
|
15115
15115
|
|
|
15116
15116
|
// ../../core/ts/src/site-shell.ts
|
|
15117
|
+
var WIX_FREE_SITE_HOST_SUFFIXES = ["wixsite.com", "wixstudio.com", "wixstudio.io", "editorx.io"];
|
|
15118
|
+
function isWixFreeSiteHost(host) {
|
|
15119
|
+
const h = host.toLowerCase().replace(/:\d+$/, "");
|
|
15120
|
+
return WIX_FREE_SITE_HOST_SUFFIXES.some((suffix) => h.endsWith(`.${suffix}`));
|
|
15121
|
+
}
|
|
15122
|
+
var SITE_KINDS = ["wix", "base44", "web"];
|
|
15123
|
+
function isSiteKind(value) {
|
|
15124
|
+
return typeof value === "string" && SITE_KINDS.includes(value);
|
|
15125
|
+
}
|
|
15126
|
+
function assertSiteKind(kind) {
|
|
15127
|
+
if (!isSiteKind(kind)) {
|
|
15128
|
+
throw new Error(`site kind ${JSON.stringify(kind)} must be one of ${SITE_KINDS.map((k) => JSON.stringify(k)).join(", ")}`);
|
|
15129
|
+
}
|
|
15130
|
+
}
|
|
15117
15131
|
var SITE_LAYOUTS = ["auto", "tabs", "drawer", "sidebar", "single"];
|
|
15118
15132
|
var SITE_SHELL_MAX_TABS = 4;
|
|
15119
15133
|
var SITE_SCREEN_PREFIX = "site_";
|
|
@@ -15150,12 +15164,12 @@ function siteHost(origin) {
|
|
|
15150
15164
|
return new URL(normalizeSiteOrigin(origin)).host;
|
|
15151
15165
|
}
|
|
15152
15166
|
function siteAllowedOrigins(origin, kind) {
|
|
15167
|
+
assertSiteKind(kind);
|
|
15153
15168
|
const base = new URL(normalizeSiteOrigin(origin));
|
|
15154
15169
|
const host = base.host;
|
|
15155
15170
|
const path = base.pathname.replace(/\/+$/, "");
|
|
15156
15171
|
const hosts = [host];
|
|
15157
|
-
|
|
15158
|
-
if (!isWixFreeHost && kind === "wix") hosts.push(host.startsWith("www.") ? host.slice(4) : `www.${host}`);
|
|
15172
|
+
if (!isWixFreeSiteHost(base.hostname) && kind === "wix") hosts.push(host.startsWith("www.") ? host.slice(4) : `www.${host}`);
|
|
15159
15173
|
return hosts.map((h) => `https://${h}${path}/`);
|
|
15160
15174
|
}
|
|
15161
15175
|
function sitePageUrl(origin, path) {
|
|
@@ -15181,31 +15195,36 @@ function sitePageUrl(origin, path) {
|
|
|
15181
15195
|
function siteScreenId(page) {
|
|
15182
15196
|
return `${SITE_SCREEN_PREFIX}${page.id}`;
|
|
15183
15197
|
}
|
|
15184
|
-
function resolveSiteChrome(chrome) {
|
|
15198
|
+
function resolveSiteChrome(chrome, kind) {
|
|
15199
|
+
const hide = kind !== "web";
|
|
15185
15200
|
return {
|
|
15186
|
-
hideSiteHeader: chrome?.hideSiteHeader ??
|
|
15187
|
-
hideSiteMenu: chrome?.hideSiteMenu ??
|
|
15188
|
-
hideSiteFooter: chrome?.hideSiteFooter ??
|
|
15189
|
-
hideWixAds: chrome?.hideWixAds ??
|
|
15201
|
+
hideSiteHeader: chrome?.hideSiteHeader ?? hide,
|
|
15202
|
+
hideSiteMenu: chrome?.hideSiteMenu ?? hide,
|
|
15203
|
+
hideSiteFooter: chrome?.hideSiteFooter ?? hide,
|
|
15204
|
+
hideWixAds: chrome?.hideWixAds ?? hide
|
|
15190
15205
|
};
|
|
15191
15206
|
}
|
|
15192
15207
|
function siteWebViewPreset(site) {
|
|
15193
|
-
|
|
15208
|
+
assertSiteKind(site?.kind);
|
|
15209
|
+
const chrome = resolveSiteChrome(site.chrome, site.kind);
|
|
15194
15210
|
return {
|
|
15195
15211
|
layout: "inset",
|
|
15196
15212
|
immersive: true,
|
|
15197
15213
|
// Chrome hiding is binary-shipped (RFC 0062): only these flags travel over the air, so an
|
|
15198
15214
|
// owner can flip one without a new build, and no page script is served OTA (invariant 15).
|
|
15215
|
+
// The header and footer hiders fall back to generic `<header>` / `<footer>` elements, so a
|
|
15216
|
+
// `"web"` site may opt into them; they default off there (resolveSiteChrome).
|
|
15199
15217
|
hideHostedSiteHeader: chrome.hideSiteHeader,
|
|
15200
15218
|
hideHostedSiteFooter: chrome.hideSiteFooter,
|
|
15201
|
-
// Wix ads only exist on Wix free sites; a Base44 site never gets the Wix selectors.
|
|
15219
|
+
// Wix ads only exist on Wix free sites; a Base44 or `"web"` site never gets the Wix selectors.
|
|
15202
15220
|
hideWixAds: site.kind === "wix" && chrome.hideWixAds,
|
|
15203
15221
|
// The site's own menu duplicates the native tabs/drawer. Wix markers only, like the ads.
|
|
15204
15222
|
hideHostedSiteMenu: site.kind === "wix" && chrome.hideSiteMenu,
|
|
15205
15223
|
// RFC 0062 §5.8 — a Base44 app is signed in natively and its session carried into the page.
|
|
15206
15224
|
// The host still refuses unless the app declares the `base44` capability. A Wix site bridges
|
|
15207
15225
|
// only when its app signs members in natively (`site.sessionBridge`); the host additionally
|
|
15208
|
-
// needs the app's baked site and its Wix member login installed.
|
|
15226
|
+
// needs the app's baked site and its Wix member login installed. A `"web"` site gets neither:
|
|
15227
|
+
// no adapter, no bridge — it is visitor-only, whatever `sessionBridge` says.
|
|
15209
15228
|
...site.kind === "base44" ? { hostedSiteAdapter: "base44", sessionBridge: true } : {},
|
|
15210
15229
|
...site.kind === "wix" && site.sessionBridge ? { hostedSiteAdapter: "wix", sessionBridge: true } : {},
|
|
15211
15230
|
pullToRefresh: true,
|
|
@@ -15231,6 +15250,11 @@ function siteWebViewPreset(site) {
|
|
|
15231
15250
|
keepAlive: true
|
|
15232
15251
|
};
|
|
15233
15252
|
}
|
|
15253
|
+
function enforceSiteKind(site, config) {
|
|
15254
|
+
if (site.kind !== "web") return config;
|
|
15255
|
+
const { hostedSiteAdapter: _adapter, sessionBridge: _bridge, ...rest } = config;
|
|
15256
|
+
return { ...rest, hideWixAds: false, hideHostedSiteMenu: false };
|
|
15257
|
+
}
|
|
15234
15258
|
function defineSiteTab(site, page) {
|
|
15235
15259
|
assertSitePage(page);
|
|
15236
15260
|
const preset = siteWebViewPreset(site);
|
|
@@ -15243,7 +15267,7 @@ function defineSiteTab(site, page) {
|
|
|
15243
15267
|
schemaVersion: 1,
|
|
15244
15268
|
// Wix serves page HTML `no-cache`; the descriptor itself is cheap to revalidate.
|
|
15245
15269
|
cacheControl: { maxAge: 600, staleWhileRevalidate: 86400 },
|
|
15246
|
-
webViewConfig: { ...preset, ...page.webView ?? {} }
|
|
15270
|
+
webViewConfig: enforceSiteKind(site, { ...preset, ...page.webView ?? {} })
|
|
15247
15271
|
};
|
|
15248
15272
|
}
|
|
15249
15273
|
function defineSitePageScreen(site) {
|
|
@@ -15289,9 +15313,7 @@ function hostOf(url) {
|
|
|
15289
15313
|
}
|
|
15290
15314
|
}
|
|
15291
15315
|
function sitePageNode(site, page, opts) {
|
|
15292
|
-
|
|
15293
|
-
throw new Error(`site kind ${JSON.stringify(site?.kind)} must be "wix" or "base44"`);
|
|
15294
|
-
}
|
|
15316
|
+
assertSiteKind(site?.kind);
|
|
15295
15317
|
if (!page || typeof page.path !== "string") {
|
|
15296
15318
|
throw new Error("a site page node needs a path");
|
|
15297
15319
|
}
|
|
@@ -15300,7 +15322,7 @@ function sitePageNode(site, page, opts) {
|
|
|
15300
15322
|
throw new Error(`site page bridge ${JSON.stringify(page.bridge)} must be "worker" or unset`);
|
|
15301
15323
|
}
|
|
15302
15324
|
const adapter = page.bridge === "worker" && site.kind === "wix" ? { hostedSiteAdapter: "wix" } : {};
|
|
15303
|
-
return primarySiteWebView(url, { ...siteWebViewPreset(site), ...adapter, ...page.webView ?? {} }, opts?.id ?? SITE_PAGE_NODE_ID, page.title, [], page.bridge);
|
|
15325
|
+
return primarySiteWebView(url, enforceSiteKind(site, { ...siteWebViewPreset(site), ...adapter, ...page.webView ?? {} }), opts?.id ?? SITE_PAGE_NODE_ID, page.title, [], page.bridge);
|
|
15304
15326
|
}
|
|
15305
15327
|
function isDesugarableSiteScreen(descriptor) {
|
|
15306
15328
|
return !!descriptor && descriptor.renderer === "webview_native_bridge" && typeof descriptor.url === "string" && descriptor.url !== "" && descriptor.logicBundle === void 0 && descriptor.webViewConfig?.internalLinksAsScreens !== true;
|
|
@@ -15475,9 +15497,7 @@ function assertSitePage(page) {
|
|
|
15475
15497
|
}
|
|
15476
15498
|
function assertSiteShellConfig(site, opts) {
|
|
15477
15499
|
normalizeSiteOrigin(site.origin);
|
|
15478
|
-
|
|
15479
|
-
throw new Error(`site kind ${JSON.stringify(site.kind)} must be "wix" or "base44"`);
|
|
15480
|
-
}
|
|
15500
|
+
assertSiteKind(site.kind);
|
|
15481
15501
|
if (!Array.isArray(site.pages) || site.pages.length === 0) {
|
|
15482
15502
|
throw new Error("a site shell needs at least one page");
|
|
15483
15503
|
}
|
|
@@ -15498,6 +15518,9 @@ function assertSiteShellConfig(site, opts) {
|
|
|
15498
15518
|
if (site.menuSource !== void 0 && site.menuSource !== "contract" && site.menuSource !== "runtime") {
|
|
15499
15519
|
throw new Error(`site menuSource ${JSON.stringify(site.menuSource)} must be "contract" or "runtime"`);
|
|
15500
15520
|
}
|
|
15521
|
+
if (site.kind === "web" && site.menuSource === "runtime") {
|
|
15522
|
+
throw new Error('site menuSource "runtime" is for Wix sites: a "web" site has no Wix menu to read \u2014 list its pages in site.pages and use menuSource "contract"');
|
|
15523
|
+
}
|
|
15501
15524
|
if (opts?.requireTab !== false && !site.pages.some((page) => (page.placement ?? "tab") === "tab")) {
|
|
15502
15525
|
throw new Error('a site shell needs at least one page with placement "tab"');
|
|
15503
15526
|
}
|
|
@@ -15878,6 +15901,7 @@ export {
|
|
|
15878
15901
|
RICH_CONTENT_EDITOR_TOOLS,
|
|
15879
15902
|
RTL_LOCALES,
|
|
15880
15903
|
SIDEBAR_RAIL_WIDTH,
|
|
15904
|
+
SITE_KINDS,
|
|
15881
15905
|
SITE_LAYOUTS,
|
|
15882
15906
|
SITE_MENU_DEFAULT_ICON,
|
|
15883
15907
|
SITE_MENU_DRAWER_ID_PREFIX,
|
|
@@ -15917,6 +15941,7 @@ export {
|
|
|
15917
15941
|
WIDGET_FAMILIES,
|
|
15918
15942
|
WIDGET_VOCABULARY,
|
|
15919
15943
|
WIX_FIELD_TYPES,
|
|
15944
|
+
WIX_FREE_SITE_HOST_SUFFIXES,
|
|
15920
15945
|
WORKER_SUBTREE_CEILINGS,
|
|
15921
15946
|
WORKER_SUBTREE_COMMON_ACTION_PATHS,
|
|
15922
15947
|
WORKER_SUBTREE_SAFE_TYPE_RULES,
|
|
@@ -15977,6 +16002,7 @@ export {
|
|
|
15977
16002
|
isPlayerRequirements,
|
|
15978
16003
|
isRTL,
|
|
15979
16004
|
isReservedAppActionId,
|
|
16005
|
+
isSiteKind,
|
|
15980
16006
|
isSupportedLocale,
|
|
15981
16007
|
isTargeted,
|
|
15982
16008
|
isValid,
|
|
@@ -15985,6 +16011,7 @@ export {
|
|
|
15985
16011
|
isViewTarget,
|
|
15986
16012
|
isWidgetFamilySurface,
|
|
15987
16013
|
isWixAbsoluteCachePrefix,
|
|
16014
|
+
isWixFreeSiteHost,
|
|
15988
16015
|
layoutDirection,
|
|
15989
16016
|
legacyImportProblems,
|
|
15990
16017
|
localeChoiceSource,
|
|
@@ -8354,6 +8354,20 @@ function workerSubtreePolicyErrors(policy) {
|
|
|
8354
8354
|
}
|
|
8355
8355
|
|
|
8356
8356
|
// ../../core/ts/src/site-shell.ts
|
|
8357
|
+
var WIX_FREE_SITE_HOST_SUFFIXES = ["wixsite.com", "wixstudio.com", "wixstudio.io", "editorx.io"];
|
|
8358
|
+
function isWixFreeSiteHost(host) {
|
|
8359
|
+
const h = host.toLowerCase().replace(/:\d+$/, "");
|
|
8360
|
+
return WIX_FREE_SITE_HOST_SUFFIXES.some((suffix) => h.endsWith(`.${suffix}`));
|
|
8361
|
+
}
|
|
8362
|
+
var SITE_KINDS = ["wix", "base44", "web"];
|
|
8363
|
+
function isSiteKind(value) {
|
|
8364
|
+
return typeof value === "string" && SITE_KINDS.includes(value);
|
|
8365
|
+
}
|
|
8366
|
+
function assertSiteKind(kind) {
|
|
8367
|
+
if (!isSiteKind(kind)) {
|
|
8368
|
+
throw new Error(`site kind ${JSON.stringify(kind)} must be one of ${SITE_KINDS.map((k) => JSON.stringify(k)).join(", ")}`);
|
|
8369
|
+
}
|
|
8370
|
+
}
|
|
8357
8371
|
function normalizeSiteOrigin(origin) {
|
|
8358
8372
|
const raw = (typeof origin === "string" ? origin : "").trim();
|
|
8359
8373
|
let url;
|
|
@@ -8375,12 +8389,12 @@ function normalizeSiteOrigin(origin) {
|
|
|
8375
8389
|
return `https://${url.host.toLowerCase()}${path}`;
|
|
8376
8390
|
}
|
|
8377
8391
|
function siteAllowedOrigins(origin, kind) {
|
|
8392
|
+
assertSiteKind(kind);
|
|
8378
8393
|
const base = new URL(normalizeSiteOrigin(origin));
|
|
8379
8394
|
const host = base.host;
|
|
8380
8395
|
const path = base.pathname.replace(/\/+$/, "");
|
|
8381
8396
|
const hosts = [host];
|
|
8382
|
-
|
|
8383
|
-
if (!isWixFreeHost && kind === "wix") hosts.push(host.startsWith("www.") ? host.slice(4) : `www.${host}`);
|
|
8397
|
+
if (!isWixFreeSiteHost(base.hostname) && kind === "wix") hosts.push(host.startsWith("www.") ? host.slice(4) : `www.${host}`);
|
|
8384
8398
|
return hosts.map((h) => `https://${h}${path}/`);
|
|
8385
8399
|
}
|
|
8386
8400
|
function sitePageUrl(origin, path) {
|
|
@@ -8403,31 +8417,36 @@ function sitePageUrl(origin, path) {
|
|
|
8403
8417
|
}
|
|
8404
8418
|
return joined;
|
|
8405
8419
|
}
|
|
8406
|
-
function resolveSiteChrome(chrome) {
|
|
8420
|
+
function resolveSiteChrome(chrome, kind) {
|
|
8421
|
+
const hide = kind !== "web";
|
|
8407
8422
|
return {
|
|
8408
|
-
hideSiteHeader: chrome?.hideSiteHeader ??
|
|
8409
|
-
hideSiteMenu: chrome?.hideSiteMenu ??
|
|
8410
|
-
hideSiteFooter: chrome?.hideSiteFooter ??
|
|
8411
|
-
hideWixAds: chrome?.hideWixAds ??
|
|
8423
|
+
hideSiteHeader: chrome?.hideSiteHeader ?? hide,
|
|
8424
|
+
hideSiteMenu: chrome?.hideSiteMenu ?? hide,
|
|
8425
|
+
hideSiteFooter: chrome?.hideSiteFooter ?? hide,
|
|
8426
|
+
hideWixAds: chrome?.hideWixAds ?? hide
|
|
8412
8427
|
};
|
|
8413
8428
|
}
|
|
8414
8429
|
function siteWebViewPreset(site) {
|
|
8415
|
-
|
|
8430
|
+
assertSiteKind(site?.kind);
|
|
8431
|
+
const chrome = resolveSiteChrome(site.chrome, site.kind);
|
|
8416
8432
|
return {
|
|
8417
8433
|
layout: "inset",
|
|
8418
8434
|
immersive: true,
|
|
8419
8435
|
// Chrome hiding is binary-shipped (RFC 0062): only these flags travel over the air, so an
|
|
8420
8436
|
// owner can flip one without a new build, and no page script is served OTA (invariant 15).
|
|
8437
|
+
// The header and footer hiders fall back to generic `<header>` / `<footer>` elements, so a
|
|
8438
|
+
// `"web"` site may opt into them; they default off there (resolveSiteChrome).
|
|
8421
8439
|
hideHostedSiteHeader: chrome.hideSiteHeader,
|
|
8422
8440
|
hideHostedSiteFooter: chrome.hideSiteFooter,
|
|
8423
|
-
// Wix ads only exist on Wix free sites; a Base44 site never gets the Wix selectors.
|
|
8441
|
+
// Wix ads only exist on Wix free sites; a Base44 or `"web"` site never gets the Wix selectors.
|
|
8424
8442
|
hideWixAds: site.kind === "wix" && chrome.hideWixAds,
|
|
8425
8443
|
// The site's own menu duplicates the native tabs/drawer. Wix markers only, like the ads.
|
|
8426
8444
|
hideHostedSiteMenu: site.kind === "wix" && chrome.hideSiteMenu,
|
|
8427
8445
|
// RFC 0062 §5.8 — a Base44 app is signed in natively and its session carried into the page.
|
|
8428
8446
|
// The host still refuses unless the app declares the `base44` capability. A Wix site bridges
|
|
8429
8447
|
// only when its app signs members in natively (`site.sessionBridge`); the host additionally
|
|
8430
|
-
// needs the app's baked site and its Wix member login installed.
|
|
8448
|
+
// needs the app's baked site and its Wix member login installed. A `"web"` site gets neither:
|
|
8449
|
+
// no adapter, no bridge — it is visitor-only, whatever `sessionBridge` says.
|
|
8431
8450
|
...site.kind === "base44" ? { hostedSiteAdapter: "base44", sessionBridge: true } : {},
|
|
8432
8451
|
...site.kind === "wix" && site.sessionBridge ? { hostedSiteAdapter: "wix", sessionBridge: true } : {},
|
|
8433
8452
|
pullToRefresh: true,
|
|
@@ -8453,6 +8472,11 @@ function siteWebViewPreset(site) {
|
|
|
8453
8472
|
keepAlive: true
|
|
8454
8473
|
};
|
|
8455
8474
|
}
|
|
8475
|
+
function enforceSiteKind(site, config) {
|
|
8476
|
+
if (site.kind !== "web") return config;
|
|
8477
|
+
const { hostedSiteAdapter: _adapter, sessionBridge: _bridge, ...rest } = config;
|
|
8478
|
+
return { ...rest, hideWixAds: false, hideHostedSiteMenu: false };
|
|
8479
|
+
}
|
|
8456
8480
|
var SITE_PAGE_NODE_ID = "site_page_view";
|
|
8457
8481
|
function primarySiteWebView(url, config, id, label2, capabilitiesRequired, bridge) {
|
|
8458
8482
|
return {
|
|
@@ -8481,9 +8505,7 @@ function hostOf(url) {
|
|
|
8481
8505
|
}
|
|
8482
8506
|
}
|
|
8483
8507
|
function sitePageNode(site, page, opts) {
|
|
8484
|
-
|
|
8485
|
-
throw new Error(`site kind ${JSON.stringify(site?.kind)} must be "wix" or "base44"`);
|
|
8486
|
-
}
|
|
8508
|
+
assertSiteKind(site?.kind);
|
|
8487
8509
|
if (!page || typeof page.path !== "string") {
|
|
8488
8510
|
throw new Error("a site page node needs a path");
|
|
8489
8511
|
}
|
|
@@ -8492,7 +8514,7 @@ function sitePageNode(site, page, opts) {
|
|
|
8492
8514
|
throw new Error(`site page bridge ${JSON.stringify(page.bridge)} must be "worker" or unset`);
|
|
8493
8515
|
}
|
|
8494
8516
|
const adapter = page.bridge === "worker" && site.kind === "wix" ? { hostedSiteAdapter: "wix" } : {};
|
|
8495
|
-
return primarySiteWebView(url, { ...siteWebViewPreset(site), ...adapter, ...page.webView ?? {} }, opts?.id ?? SITE_PAGE_NODE_ID, page.title, [], page.bridge);
|
|
8517
|
+
return primarySiteWebView(url, enforceSiteKind(site, { ...siteWebViewPreset(site), ...adapter, ...page.webView ?? {} }), opts?.id ?? SITE_PAGE_NODE_ID, page.title, [], page.bridge);
|
|
8496
8518
|
}
|
|
8497
8519
|
|
|
8498
8520
|
// ../../core/ts/src/rich-content-limits.generated.ts
|