@wix/himalaya-cli 0.1750.0 → 0.1751.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/dev-server/src/builder.d.ts +3 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/himi-package.d.ts +478 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/host-compatibility.d.ts +56 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/icon-catalog.generated.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +4 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-shell.d.ts +154 -7
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts +3 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/index.d.ts +2 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/podcast-service.d.ts +105 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/podcast.d.ts +116 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +326 -13
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +730 -81
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +155 -0
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{b40ea5d0d6251898ff5617139fde8be008dd11e99a70b14c1052093685401700.bin → 21f35a12bd94f4ab97a9a75453c4adcadc438daf024a4b1950d5c356c123bd01.bin} +1 -1
- package/dist/browser-plane/sw.js +7 -7
- package/dist/cli.mjs +34995 -31326
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/component-reference.json +1 -1
- package/guides/component-reference.md +4 -0
- package/guides/designing-himi-screens.md +7 -0
- package/guides/getting-started.md +2 -0
- package/guides/headless-loop.md +1 -1
- package/guides/himi-skill.md +2 -0
- package/guides/index.json +6 -0
- package/guides/qa-builds.md +12 -1
- package/guides/recipe-podcast.md +149 -0
- package/guides/tier-5-add-a-screen.md +16 -2
- package/guides/wix-business-context.md +29 -0
- package/guides/wix-platform-usage.md +7 -2
- package/package.json +10 -10
- package/template-icons/fitness-gym.png +0 -0
- package/templates/beauty-salon/dev/index.ts +1 -1
- package/templates/beauty-salon/l10n/en.json +1 -1
- package/templates/beauty-salon/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/beauty-salon/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/beauty-salon/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
- package/templates/branded-lite/dev/index.ts +101 -1
- package/templates/branded-lite/l10n/en.json +22 -1
- package/templates/branded-lite/l10n/es.json +22 -0
- package/templates/branded-lite/l10n/fr.json +18 -0
- package/templates/branded-lite/l10n/he.json +15 -0
- package/templates/branded-lite/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/branded-lite/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/branded-lite/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
- package/templates/branded-lite/tier5-src/himi-branded-lite-podcasts/index.ts +14 -234
- package/templates/brandy/README.md +33 -0
- package/templates/brandy/config.ts +51 -7
- package/templates/brandy/dev/index.ts +23 -9
- package/templates/community-club/l10n/en.json +1 -1
- package/templates/community-club/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/community-club/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/events-meetups/l10n/en.json +1 -1
- package/templates/events-meetups/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/events-meetups/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/fitness-gym/README.md +53 -0
- package/templates/fitness-gym/config.ts +560 -0
- package/templates/fitness-gym/dev/index.ts +25787 -0
- package/templates/fitness-gym/himalaya.content.json +64 -0
- package/templates/fitness-gym/himalaya.template.json +15 -0
- package/templates/fitness-gym/icon.png +0 -0
- package/templates/fitness-gym/platforms.json +1 -0
- package/templates/fitness-gym/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/fitness-gym/tier5-src/_shared/booking-location.ts +147 -0
- package/templates/fitness-gym/tier5-src/_shared/booking-session.ts +224 -0
- package/templates/fitness-gym/tier5-src/_shared/branded-lite-hosted.ts +280 -0
- package/templates/fitness-gym/tier5-src/_shared/branded-load-state.ts +109 -0
- package/templates/fitness-gym/tier5-src/_shared/business-chat-copy.ts +40 -0
- package/templates/fitness-gym/tier5-src/_shared/business-chat-history.ts +51 -0
- package/templates/fitness-gym/tier5-src/_shared/business-chat-message-model.ts +177 -0
- package/templates/fitness-gym/tier5-src/_shared/business-chat-model.ts +56 -0
- package/templates/fitness-gym/tier5-src/_shared/business-chat-presenter.ts +576 -0
- package/templates/fitness-gym/tier5-src/_shared/business-chat-transport.ts +148 -0
- package/templates/fitness-gym/tier5-src/_shared/collection-contract.ts +228 -0
- package/templates/fitness-gym/tier5-src/_shared/collection-query.ts +193 -0
- package/templates/fitness-gym/tier5-src/_shared/collection-service.ts +400 -0
- package/templates/fitness-gym/tier5-src/_shared/detail-presence.ts +51 -0
- package/templates/fitness-gym/tier5-src/_shared/engine-intl.ts +523 -0
- package/templates/fitness-gym/tier5-src/_shared/himi-account.ts +194 -0
- package/templates/fitness-gym/tier5-src/_shared/himi-booking-saved.ts +88 -0
- package/templates/fitness-gym/tier5-src/_shared/himi-bookings.ts +318 -0
- package/templates/fitness-gym/tier5-src/_shared/himi-copy.ts +116 -0
- package/templates/fitness-gym/tier5-src/_shared/himi-media.ts +29 -0
- package/templates/fitness-gym/tier5-src/_shared/himi-store.ts +7 -0
- package/templates/fitness-gym/tier5-src/_shared/himi-text.ts +24 -0
- package/templates/fitness-gym/tier5-src/_shared/host-events.ts +66 -0
- package/templates/fitness-gym/tier5-src/_shared/hosted-checkout.ts +70 -0
- package/templates/fitness-gym/tier5-src/_shared/iap-attendance-form.ts +106 -0
- package/templates/fitness-gym/tier5-src/_shared/iap-attendance-purchase.ts +216 -0
- package/templates/fitness-gym/tier5-src/_shared/iap-attendance.ts +38 -0
- package/templates/fitness-gym/tier5-src/_shared/iap-worker.ts +127 -0
- package/templates/fitness-gym/tier5-src/_shared/inbox-rooms.ts +68 -0
- package/templates/fitness-gym/tier5-src/_shared/local-preferences.ts +38 -0
- package/templates/fitness-gym/tier5-src/_shared/member-access.ts +63 -0
- package/templates/fitness-gym/tier5-src/_shared/member-account-routes.ts +52 -0
- package/templates/fitness-gym/tier5-src/_shared/member-bookings.ts +107 -0
- package/templates/fitness-gym/tier5-src/_shared/member-screen.ts +99 -0
- package/templates/fitness-gym/tier5-src/_shared/notification-target.ts +141 -0
- package/templates/fitness-gym/tier5-src/_shared/offset-page.ts +10 -0
- package/templates/fitness-gym/tier5-src/_shared/online-actions.ts +76 -0
- package/templates/fitness-gym/tier5-src/_shared/owner-load-error.ts +348 -0
- package/templates/fitness-gym/tier5-src/_shared/payment-setup.ts +6 -0
- package/templates/fitness-gym/tier5-src/_shared/pricing-plan-display.ts +64 -0
- package/templates/fitness-gym/tier5-src/_shared/program-description.ts +11 -0
- package/templates/fitness-gym/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/fitness-gym/tier5-src/_shared/program-standing.ts +46 -0
- package/templates/fitness-gym/tier5-src/_shared/rich-body.ts +78 -0
- package/templates/fitness-gym/tier5-src/_shared/rich-content-link.ts +34 -0
- package/templates/fitness-gym/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/fitness-gym/tier5-src/_shared/staff-name.ts +18 -0
- package/templates/fitness-gym/tier5-src/_shared/weekly-goal.ts +107 -0
- package/templates/fitness-gym/tier5-src/_shared/wix-bi.ts +85 -0
- package/templates/fitness-gym/tier5-src/_shared/wix-member-links.ts +114 -0
- package/templates/fitness-gym/tier5-src/_shared/wix-service-price.ts +146 -0
- package/templates/fitness-gym/tier5-src/business-chat/index.ts +732 -0
- package/templates/fitness-gym/tier5-src/business-contact/index.ts +6 -0
- package/templates/fitness-gym/tier5-src/himi-booking-account/index.ts +267 -0
- package/templates/fitness-gym/tier5-src/himi-booking-bookings/index.ts +468 -0
- package/templates/fitness-gym/tier5-src/himi-booking-service/index.ts +1190 -0
- package/templates/fitness-gym/tier5-src/himi-booking-services/index.ts +791 -0
- package/templates/fitness-gym/tier5-src/himi-booking-time/index.ts +1729 -0
- package/templates/fitness-gym/tier5-src/himi-branded-lite-agenda/index.ts +988 -0
- package/templates/fitness-gym/tier5-src/himi-branded-lite-member-programs/index.ts +656 -0
- package/templates/fitness-gym/tier5-src/himi-branded-lite-notifications/index.ts +256 -0
- package/templates/fitness-gym/tier5-src/himi-branded-lite-plans/index.ts +495 -0
- package/templates/fitness-gym/tier5-src/himi-branded-lite-program/facts.ts +52 -0
- package/templates/fitness-gym/tier5-src/himi-branded-lite-program/index.ts +845 -0
- package/templates/fitness-gym/tier5-src/himi-fitcoach-goal/index.ts +191 -0
- package/templates/fitness-gym/tier5-src/himi-fitcoach-home/index.ts +619 -0
- package/templates/fitness-gym/tier5-src/himi-store-account/index.ts +1007 -0
- package/templates/fitness-gym/tier5-src/wix-spaces-my-subscriptions/index.ts +84 -0
- package/templates/fitness-gym/tier5-src/wix-spaces-subscription-detail/index.ts +139 -0
- package/templates/fitness-gym/tokens.json +414 -0
- package/templates/gym-fitness/dev/index.ts +1 -1
- package/templates/gym-fitness/l10n/en.json +1 -1
- package/templates/gym-fitness/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/gym-fitness/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/gym-fitness/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
- package/templates/medical-services/dev/index.ts +2 -1
- package/templates/medical-services/tier5-src/himi-booking-account/index.ts +16 -1
- package/templates/nonprofit-cause/l10n/en.json +1 -1
- package/templates/nonprofit-cause/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/nonprofit-cause/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/personal-fitness-trainer/dev/index.ts +2 -2
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
- package/templates/podcast-creator/dev/index.ts +100 -0
- package/templates/podcast-creator/l10n/en.json +22 -1
- package/templates/podcast-creator/l10n/es.json +22 -0
- package/templates/podcast-creator/l10n/fr.json +18 -0
- package/templates/podcast-creator/l10n/he.json +15 -0
- package/templates/podcast-creator/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/podcast-creator/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/podcast-creator/tier5-src/himi-branded-lite-podcasts/index.ts +14 -234
- package/templates/portfolio-creative/l10n/en.json +1 -1
- package/templates/portfolio-creative/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/portfolio-creative/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/restaurant/l10n/en.json +1 -1
- package/templates/restaurant/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/restaurant/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/retail-store/l10n/en.json +1 -1
- package/templates/retail-store/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/retail-store/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/salon-spa/dev/index.ts +1 -1
- package/templates/salon-spa/tier5-src/himi-booking-account/index.ts +16 -1
- package/templates/salon-spa/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
- package/templates/yoga-studio/dev/index.ts +1 -1
- package/templates/yoga-studio/l10n/en.json +1 -1
- package/templates/yoga-studio/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/yoga-studio/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/yoga-studio/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-shell.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { Component, DrawerItem, LinkableScreen, NavTabItem, ScreenDescriptor, SiteNavConfig, WebViewConfig } from "./schema.js";
|
|
1
|
+
import { type IconName } from "./icon-catalog.generated.js";
|
|
2
|
+
import type { Component, DrawerItem, LinkableScreen, NavTabItem, ScreenDescriptor, SiteNavConfig, TopBarConfig, WebViewConfig } from "./schema.js";
|
|
3
3
|
/** Which hosting platform the site runs on. Selects origin allow-lists and the binary-shipped
|
|
4
4
|
* page adapter:
|
|
5
5
|
* - `"wix"` — a Wix site: its custom domain's `www.` twin is allowed, the Wix chrome hiders (ads,
|
|
@@ -46,6 +46,9 @@ export interface SitePage {
|
|
|
46
46
|
placement?: SitePagePlacement;
|
|
47
47
|
/** Per-page overrides, merged OVER the shell preset. */
|
|
48
48
|
webView?: Partial<WebViewConfig>;
|
|
49
|
+
/** Whether this page's screen draws its title in the top bar, over {@link SiteShellConfig.pageTitle}:
|
|
50
|
+
* `true` always, `false` never. Absent ⇒ the site's `pageTitle` rule. */
|
|
51
|
+
showTitle?: boolean;
|
|
49
52
|
}
|
|
50
53
|
/** What the shell hides from the hosted site so the native chrome is the only chrome.
|
|
51
54
|
* Every flag defaults to `true` (hidden) for a Wix or Base44 site, and to `false` for a `"web"`
|
|
@@ -102,6 +105,92 @@ export interface SiteShellConfig {
|
|
|
102
105
|
* page's placement and icon, and stays the chrome until a menu has been read. Served OTA in
|
|
103
106
|
* `navigation.site.menuSource`. */
|
|
104
107
|
menuSource?: "contract" | "runtime";
|
|
108
|
+
/** Whether a site page's screen draws its title in the top bar ({@link SitePageTitle}). Absent ⇒
|
|
109
|
+
* `"auto"`. A page's own `showTitle` wins. */
|
|
110
|
+
pageTitle?: SitePageTitle;
|
|
111
|
+
/** The app-wide top bar: up to {@link SITE_TOP_BAR_MAX_ACTIONS} trailing icons, served as
|
|
112
|
+
* `navigation.topBarDefault` ({@link siteTopBarDefault}). Absent ⇒ title and back/menu only. */
|
|
113
|
+
topBar?: SiteTopBar;
|
|
114
|
+
/** The author's own native screens, placed in the chrome beside the site's pages
|
|
115
|
+
* ({@link SiteNativePage}). The screens themselves come from the content package. */
|
|
116
|
+
nativePages?: readonly SiteNativePage[];
|
|
117
|
+
}
|
|
118
|
+
/** When a site page's screen draws its title in the top bar:
|
|
119
|
+
* - `auto` (default): not on a page a tab, rail or drawer row opens, because its nav label already
|
|
120
|
+
* names it. Shown on an `overflow` page and on the {@link SITE_PAGE_SCREEN_ID} screen a link opens,
|
|
121
|
+
* which no nav label names (that screen shows the page's own document title, #5748);
|
|
122
|
+
* - `always`: on every page (the behaviour before this setting);
|
|
123
|
+
* - `never`: on no page.
|
|
124
|
+
* A hidden title is `topBar.titleDisplay: "hidden"`: no title is drawn, and it stays the screen's
|
|
125
|
+
* name for screen readers. */
|
|
126
|
+
export type SitePageTitle = "auto" | "always" | "never";
|
|
127
|
+
export declare const SITE_PAGE_TITLES: readonly SitePageTitle[];
|
|
128
|
+
/** At most three trailing top-bar icons: a phone's bar also holds the title and back/menu. */
|
|
129
|
+
export declare const SITE_TOP_BAR_MAX_ACTIONS = 3;
|
|
130
|
+
/** The native screens a site shell provides itself, beside the author's {@link SiteNativePage}s: the
|
|
131
|
+
* Notifications screen (every site shell) and the Account screen (a Wix or Base44 member binding).
|
|
132
|
+
* A top-bar `{ screen }` target may name these; a shell narrows the list to the ones it actually has
|
|
133
|
+
* with {@link SiteTopBarOptions.nativeScreens}. */
|
|
134
|
+
export declare const SITE_BUILTIN_NATIVE_SCREENS: readonly string[];
|
|
135
|
+
/** Built-in screens that are never a destination of their own — account deletion is reached from the
|
|
136
|
+
* Account screen, never linked. A native page or top-bar target cannot name them. */
|
|
137
|
+
export declare const SITE_PRIVATE_NATIVE_SCREENS: readonly string[];
|
|
138
|
+
/** The `site.topBar` block. */
|
|
139
|
+
export interface SiteTopBar {
|
|
140
|
+
actions?: readonly SiteTopBarAction[];
|
|
141
|
+
}
|
|
142
|
+
/** Where a top-bar icon goes — exactly one of:
|
|
143
|
+
* - `page`: a site page id (any placement, `overflow` included) — opens that page;
|
|
144
|
+
* - `screen`: a native screen — a {@link SiteNativePage.screenId} or a built-in native screen
|
|
145
|
+
* ({@link SITE_BUILTIN_NATIVE_SCREENS});
|
|
146
|
+
* - `url`: an https page OFF the site, opened in the browser after the same "Open in browser?"
|
|
147
|
+
* prompt an off-site link in a site page shows. An on-site URL is refused: declare the page
|
|
148
|
+
* (an `overflow` page if it should have no row) and target it with `page`. */
|
|
149
|
+
export type SiteTopBarTarget = {
|
|
150
|
+
page: string;
|
|
151
|
+
} | {
|
|
152
|
+
screen: string;
|
|
153
|
+
} | {
|
|
154
|
+
url: string;
|
|
155
|
+
};
|
|
156
|
+
/** One trailing top-bar icon. */
|
|
157
|
+
export interface SiteTopBarAction {
|
|
158
|
+
/** Stable id, `[a-z0-9_]+`, unique in the bar — the served action id (telemetry, test id
|
|
159
|
+
* `topbar.action.<id>`, badge key `topBarAction:<id>`). Left out of the bar of the page or screen it opens. */
|
|
160
|
+
id: string;
|
|
161
|
+
/** Design-system icon. Required: the bar draws icons only. */
|
|
162
|
+
icon: IconName;
|
|
163
|
+
/** The accessible name a screen reader speaks for the icon. Copy from the provisioning file. */
|
|
164
|
+
label: string;
|
|
165
|
+
target: SiteTopBarTarget;
|
|
166
|
+
}
|
|
167
|
+
/** One of the author's own native (Tier-5) screens, placed in the site shell's chrome. The contract
|
|
168
|
+
* only PLACES it: the descriptor and its worker come from the content package (`dev/index.ts`). */
|
|
169
|
+
export interface SiteNativePage {
|
|
170
|
+
/** Row id — the tab id, `drawer_<id>` in the drawer. `[a-z0-9_]+`; never a site page's id. */
|
|
171
|
+
id: string;
|
|
172
|
+
/** The content package's screen id. Never `site_*` (the site pages' id space). */
|
|
173
|
+
screenId: string;
|
|
174
|
+
/** Native label (tab / drawer row / rail). */
|
|
175
|
+
title: string;
|
|
176
|
+
/** Absent ⇒ `"grid"`. */
|
|
177
|
+
icon?: IconName;
|
|
178
|
+
/** Absent ⇒ `"tab"`. `overflow`: no row, but linkable (`<scheme>://screen/<screenId>`) and a
|
|
179
|
+
* top-bar target. */
|
|
180
|
+
placement?: SitePagePlacement;
|
|
181
|
+
/** Whether `<scheme>://screen/<screenId>` may open it from OUTSIDE the app (a website link, another
|
|
182
|
+
* app). Absent ⇒ `true` only for a built-in public screen ({@link SITE_BUILTIN_NATIVE_SCREENS}), else
|
|
183
|
+
* `false`: placing a screen never makes it public unless the contract says so. */
|
|
184
|
+
public?: boolean;
|
|
185
|
+
/** An external link while signed out signs the user in first (`requiresAuth`). Implies `public`. Needs a
|
|
186
|
+
* sign-in that gates deep links — today a Wix member binding only: any other shell refuses it
|
|
187
|
+
* ({@link assertSiteNativePagesAuth}), because the link would open the screen signed out. */
|
|
188
|
+
requiresAuth?: boolean;
|
|
189
|
+
/** The site page (or earlier native page) this one follows in the tab bar, drawer and rail.
|
|
190
|
+
* Absent ⇒ after every site page. A native page is never first. Under `menuSource: "runtime"` the
|
|
191
|
+
* device's menu merge regroups the site's rows into one block, so a native page may then sit before
|
|
192
|
+
* or after all of them rather than between two. */
|
|
193
|
+
after?: string;
|
|
105
194
|
}
|
|
106
195
|
/** Members Area pages, by what a notification is about. */
|
|
107
196
|
export interface SiteMemberPages {
|
|
@@ -168,6 +257,10 @@ export declare function resolveSiteChrome(chrome: SiteChrome | undefined, kind?:
|
|
|
168
257
|
* through a prompt, and in-site history gets a floating back button.
|
|
169
258
|
*/
|
|
170
259
|
export declare function siteWebViewPreset(site: Pick<SiteShellConfig, "origin" | "kind" | "chrome" | "sessionBridge">): WebViewConfig;
|
|
260
|
+
/** Whether a site page's screen draws its title in the top bar: the page's `showTitle`, else the site's
|
|
261
|
+
* {@link SitePageTitle} rule. `page` absent is the {@link SITE_PAGE_SCREEN_ID} screen, which a link
|
|
262
|
+
* opens and no nav row names. */
|
|
263
|
+
export declare function sitePageShowsTitle(site: Pick<SiteShellConfig, "pageTitle" | "menuSource">, page?: Pick<SitePage, "placement" | "showTitle">): boolean;
|
|
171
264
|
/** The Tier-3 descriptor for one site page. */
|
|
172
265
|
export declare function defineSiteTab(site: SiteShellConfig, page: SitePage): ScreenDescriptor;
|
|
173
266
|
/** The {@link SITE_PAGE_SCREEN_ID} descriptor. Its `url` is the site's home page — what it
|
|
@@ -278,8 +371,9 @@ export declare function siteScreens(site: SiteShellConfig, opts?: SiteScreensOpt
|
|
|
278
371
|
* `defineApp({ navigation: { site } })`; every platform resolves links against it. */
|
|
279
372
|
export declare function siteNavConfig(site: SiteShellConfig): SiteNavConfig;
|
|
280
373
|
/** `navigation.linkableScreens` for a site shell: every page (tab pages carry their `tabId`, so
|
|
281
|
-
* a link selects the tab)
|
|
282
|
-
|
|
374
|
+
* a link selects the tab), every native page (so a website link to `<scheme>://screen/<screenId>`
|
|
375
|
+
* opens it — its tab when it has one), plus the fallback screen, which lands on the Home tab. */
|
|
376
|
+
export declare function siteLinkableScreens(site: SiteShellConfig, opts?: SiteShellCheckOptions): LinkableScreen[];
|
|
283
377
|
/** Where an incoming site link goes. `url` is the link itself, normalized — the page the
|
|
284
378
|
* screen's WebView loads. */
|
|
285
379
|
export interface SiteLinkTarget {
|
|
@@ -306,13 +400,66 @@ export declare function siteNavKind(site: SiteShellConfig): "responsive" | "sing
|
|
|
306
400
|
/** Sidebar-rail items for a site: EVERY page the drawer lists, under its tab id. The native rail
|
|
307
401
|
* otherwise derives from the (at most four) tabs and suppresses the drawer, so a `drawer`
|
|
308
402
|
* page would be unreachable on a tablet and under `layout: "sidebar"`. */
|
|
309
|
-
export declare function siteSidebar(site: SiteShellConfig): NavTabItem[];
|
|
310
|
-
/** Tab-bar and drawer items for a site. Pages beyond
|
|
311
|
-
* asked for a tab fall into the
|
|
403
|
+
export declare function siteSidebar(site: SiteShellConfig, opts?: SiteShellCheckOptions): NavTabItem[];
|
|
404
|
+
/** Tab-bar and drawer items for a site — its pages and native pages, in chrome order. Pages beyond
|
|
405
|
+
* {@link SITE_SHELL_MAX_TABS} (site and native counted together) that asked for a tab fall into the
|
|
406
|
+
* drawer rather than disappearing. */
|
|
312
407
|
export declare function siteNav(site: SiteShellConfig, opts?: SiteShellCheckOptions): {
|
|
313
408
|
tabs: NavTabItem[];
|
|
314
409
|
drawer: DrawerItem[];
|
|
315
410
|
};
|
|
411
|
+
/**
|
|
412
|
+
* Throws unless every `site.nativePages` screen is one the content package builds. The contract only
|
|
413
|
+
* PLACES a native page — its descriptor and worker are the author's — so the check runs where the
|
|
414
|
+
* screens are known: a site shell's dev module (`dev/index.ts`) calls it with the ids of its screen
|
|
415
|
+
* builders, which `himi build`, `validate`, `render`, `push` and the dev-server all load. The shared
|
|
416
|
+
* contract parser and the dist projection cannot see the content and do not check it.
|
|
417
|
+
*/
|
|
418
|
+
export declare function assertSiteNativePagesBuilt(site: Pick<SiteShellConfig, "nativePages">, screenIds: Iterable<string>): void;
|
|
419
|
+
/**
|
|
420
|
+
* Throws when a native page asks for `requiresAuth` but the shell's sign-in does not feed the native
|
|
421
|
+
* session gate a `requiresAuth` link waits on. Fails closed: with nothing to wait for, the native link
|
|
422
|
+
* gate applies the link at once, so the screen would open signed out. Today only a Wix member binding
|
|
423
|
+
* (the app's `WixConsumerAuthProvider`) feeds that gate; a Base44 sign-in runs on the Account screen's
|
|
424
|
+
* worker, not the app's auth provider. The shell's contract parser calls it, since only the shell knows
|
|
425
|
+
* its binding.
|
|
426
|
+
*/
|
|
427
|
+
export declare function assertSiteNativePagesAuth(site: Pick<SiteShellConfig, "nativePages">, gatedSignIn: boolean): void;
|
|
428
|
+
/**
|
|
429
|
+
* The top bar a native screen needs when a site top-bar icon opens THAT screen: the app-wide icons minus
|
|
430
|
+
* every one whose `{ screen }` target is `screenId`. On the screen itself such an icon would push a
|
|
431
|
+
* second copy of it (or re-select the tab it is on), the same reason a site page's own bar leaves out
|
|
432
|
+
* the icon that opens it. Undefined when no icon targets `screenId`, so the app default still fills the
|
|
433
|
+
* bar. An empty `{}` when that icon was the only one: a screen's bar replaces `topBarDefault`, so the
|
|
434
|
+
* empty bar is what keeps the default's icon off this screen.
|
|
435
|
+
*/
|
|
436
|
+
export declare function siteNativeScreenTopBar(site: SiteShellConfig, screenId: string, opts?: SiteTopBarOptions): TopBarConfig | undefined;
|
|
437
|
+
/**
|
|
438
|
+
* A native screen's descriptor with {@link siteNativeScreenTopBar} applied: unchanged when the screen
|
|
439
|
+
* draws a top bar of its own (the author's bar wins) or no icon targets it. A site shell's dev module
|
|
440
|
+
* maps every non-site screen it builds through this.
|
|
441
|
+
*/
|
|
442
|
+
export declare function withSiteNativeScreenTopBar<T>(site: SiteShellConfig, descriptor: T, opts?: SiteTopBarOptions): T;
|
|
443
|
+
/**
|
|
444
|
+
* A screen builder wrapped with {@link withSiteNativeScreenTopBar}, for a builder that returns its
|
|
445
|
+
* descriptor directly OR as a promise (a dev module allows both): the result is awaited first, so the rule
|
|
446
|
+
* sees the descriptor, never the promise. `null` stays `null`. A sync builder stays sync.
|
|
447
|
+
*/
|
|
448
|
+
export declare function withSiteNativeScreenTopBarBuilder<C, D>(site: SiteShellConfig, build: (ctx: C) => D | null | Promise<D | null>, opts?: SiteTopBarOptions): (ctx: C) => D | null | Promise<D | null>;
|
|
449
|
+
/** Options for {@link siteTopBarDefault}. */
|
|
450
|
+
export interface SiteTopBarOptions extends SiteShellCheckOptions {
|
|
451
|
+
/** The built-in native screens THIS shell serves (Notifications always; Account only with a member
|
|
452
|
+
* binding). A `{ screen }` target must name a native page or one of these. Absent ⇒ any of
|
|
453
|
+
* {@link SITE_BUILTIN_NATIVE_SCREENS}. */
|
|
454
|
+
nativeScreens?: readonly string[];
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* `navigation.topBarDefault` for a site shell: `site.topBar.actions` as trailing icons on every screen
|
|
458
|
+
* that has no top bar of its own (the server fills it in — `applyTopBarDefault`). Each target maps to
|
|
459
|
+
* an existing Action: a page or native screen that is a tab switches to it, any other opens it, and a
|
|
460
|
+
* `url` asks "Open in browser?" first. Undefined when the site declares no actions.
|
|
461
|
+
*/
|
|
462
|
+
export declare function siteTopBarDefault(site: SiteShellConfig, opts?: SiteTopBarOptions): TopBarConfig | undefined;
|
|
316
463
|
/** Options for {@link assertSiteShellConfig} (and the builders that run it). */
|
|
317
464
|
export interface SiteShellCheckOptions {
|
|
318
465
|
/** Absent or `true` ⇒ at least one page must have `placement: "tab"`, as a site shell needs. A
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts
CHANGED
|
@@ -154,6 +154,9 @@ export declare const screenDescriptorSchema: {
|
|
|
154
154
|
readonly tabBarVisibility: {
|
|
155
155
|
readonly type: "string";
|
|
156
156
|
};
|
|
157
|
+
readonly stickyFooterPlacement: {
|
|
158
|
+
readonly type: "string";
|
|
159
|
+
};
|
|
157
160
|
readonly logicBundle: {
|
|
158
161
|
readonly type: "object";
|
|
159
162
|
readonly additionalProperties: false;
|
|
@@ -4,6 +4,8 @@ export * from "./one-app-page.js";
|
|
|
4
4
|
export * from "./one-app-visibility.js";
|
|
5
5
|
export * from "./one-app-section.js";
|
|
6
6
|
export * from "./invite.js";
|
|
7
|
+
export * from "./podcast.js";
|
|
8
|
+
export * from "./podcast-service.js";
|
|
7
9
|
import { entitlement } from "@wix/himalaya/checkout";
|
|
8
10
|
type Node = Record<string, any>;
|
|
9
11
|
/** An action shown by `detailedHeader`. */
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { defineService as defineStateService } from "@wix/himalaya/state";
|
|
2
|
+
import { type MediaPlaybackStatus } from "@wix/himalaya/media-playback";
|
|
3
|
+
import { type PodcastFeedErrorCode } from "./podcast.js";
|
|
4
|
+
/** A small per-user store for the queue and resume positions. The default keeps them for this session only. */
|
|
5
|
+
export interface PodcastPreference<T> {
|
|
6
|
+
read(): T;
|
|
7
|
+
write(value: T): void;
|
|
8
|
+
}
|
|
9
|
+
/** Why playback stopped. Never a feed error, and never a raw player message. */
|
|
10
|
+
export type PodcastPlaybackErrorCode = "no_audio" | "media_failed";
|
|
11
|
+
/** Customer-facing copy the worker computes. Literals; keep developer setup out of them. */
|
|
12
|
+
export interface PodcastMessages {
|
|
13
|
+
notConfigured: string;
|
|
14
|
+
empty: string;
|
|
15
|
+
noPlayable: string;
|
|
16
|
+
feedUnavailable: string;
|
|
17
|
+
invalidFeed: string;
|
|
18
|
+
noAudio: string;
|
|
19
|
+
mediaFailed: string;
|
|
20
|
+
queueEmpty: string;
|
|
21
|
+
play: string;
|
|
22
|
+
pause: string;
|
|
23
|
+
queueOne: string;
|
|
24
|
+
queueMany: string;
|
|
25
|
+
resume: string;
|
|
26
|
+
}
|
|
27
|
+
export interface PodcastServiceOptions {
|
|
28
|
+
/** Service name. Must match `podcastScreen({ service })`. Default "podcast". */
|
|
29
|
+
service?: string;
|
|
30
|
+
/** Episodes to read from the feed (1–100). Default 40. */
|
|
31
|
+
limit?: number;
|
|
32
|
+
/** Override only to decorate the service (Branded Lite's collection chrome). */
|
|
33
|
+
defineService?: typeof defineStateService;
|
|
34
|
+
queue?: PodcastPreference<string[]>;
|
|
35
|
+
progress?: PodcastPreference<Record<string, number>>;
|
|
36
|
+
messages?: Partial<PodcastMessages>;
|
|
37
|
+
/** Resolve worker copy at action time (for hosts that receive a copy pack on load). */
|
|
38
|
+
text?: (key: keyof PodcastMessages, fallback: string) => string;
|
|
39
|
+
/** Excerpt → display text, for a host with its own rich-text normalizer. */
|
|
40
|
+
describe?: (excerpt: unknown) => string;
|
|
41
|
+
}
|
|
42
|
+
interface Row {
|
|
43
|
+
id: string;
|
|
44
|
+
title: string;
|
|
45
|
+
subtitle: string;
|
|
46
|
+
image: string;
|
|
47
|
+
description: string;
|
|
48
|
+
audioUrl: string;
|
|
49
|
+
durationMs: number;
|
|
50
|
+
progressLabel: string;
|
|
51
|
+
}
|
|
52
|
+
export interface PodcastState {
|
|
53
|
+
status: "loading" | "ready" | "error";
|
|
54
|
+
feedState: "unconfigured" | "loading" | "ready" | "empty" | "error";
|
|
55
|
+
feedError: "" | PodcastFeedErrorCode;
|
|
56
|
+
emptyText: string;
|
|
57
|
+
hideFeedRetry: boolean;
|
|
58
|
+
episodes: Row[];
|
|
59
|
+
unplayableCount: number;
|
|
60
|
+
isMock: boolean;
|
|
61
|
+
notMock: boolean;
|
|
62
|
+
mockBanner: string;
|
|
63
|
+
queue: string[];
|
|
64
|
+
queueLabel: string;
|
|
65
|
+
nowId: string;
|
|
66
|
+
nowTitle: string;
|
|
67
|
+
nowSubtitle: string;
|
|
68
|
+
playbackState: string;
|
|
69
|
+
isPlaying: boolean;
|
|
70
|
+
isBuffering: boolean;
|
|
71
|
+
playLabel: string;
|
|
72
|
+
playIcon: string;
|
|
73
|
+
positionMs: number;
|
|
74
|
+
durationMs: number;
|
|
75
|
+
progress: number;
|
|
76
|
+
progressLabel: string;
|
|
77
|
+
hidePlayer: boolean;
|
|
78
|
+
playbackError: "" | PodcastPlaybackErrorCode;
|
|
79
|
+
playbackErrorText: string;
|
|
80
|
+
hidePlaybackError: boolean;
|
|
81
|
+
hidePlaybackRetry: boolean;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The worker half of `podcastScreen`: reads a public feed through the Wix Podcasts gateway and
|
|
85
|
+
* plays episodes in the app with `media_playback` (play/pause, seek, previous/next, queue, live
|
|
86
|
+
* position and errors from the real player). Declare `wix_api` and `media_playback` on the screen
|
|
87
|
+
* and in config.ts `capabilities`. There is no browser fallback and no simulated progress: an
|
|
88
|
+
* install without the media module cannot play; `himi validate` identifies the native rebuild.
|
|
89
|
+
*/
|
|
90
|
+
export declare function createPodcastService(opts?: PodcastServiceOptions): import("@wix/himalaya/state", { with: { "resolution-mode": "import" } }).ServiceHandle<PodcastState> & {
|
|
91
|
+
load: (arg?: unknown) => Promise<PodcastState>;
|
|
92
|
+
refresh: () => Promise<PodcastState>;
|
|
93
|
+
retryFeed: () => Promise<PodcastState>;
|
|
94
|
+
playEpisode: (arg?: unknown) => Promise<PodcastState>;
|
|
95
|
+
queueEpisode: (arg?: unknown) => Promise<PodcastState>;
|
|
96
|
+
togglePlay: () => Promise<PodcastState>;
|
|
97
|
+
seek: (arg?: unknown) => Promise<PodcastState>;
|
|
98
|
+
seekBy: (arg?: unknown) => Promise<PodcastState>;
|
|
99
|
+
previousEpisode: () => Promise<PodcastState>;
|
|
100
|
+
nextEpisode: () => Promise<PodcastState>;
|
|
101
|
+
retryPlayback: () => Promise<PodcastState>;
|
|
102
|
+
playbackFailed: (code?: PodcastPlaybackErrorCode) => Promise<PodcastState>;
|
|
103
|
+
mediaStatus: (arg?: Partial<MediaPlaybackStatus>) => Promise<PodcastState>;
|
|
104
|
+
};
|
|
105
|
+
export {};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/** The public Wix Podcasts feed gateway. POST only; it takes no member or visitor credential. */
|
|
2
|
+
export declare const PODCAST_FEED_ENDPOINT = "https://podcasts.wix.com/api/feed/graphql";
|
|
3
|
+
export declare const PODCAST_EPISODES_QUERY = "\n query PodcastEpisodes($url: String!, $limit: Int) {\n episodes(url: $url, limit: $limit) {\n id title date duration image descriptionExcerpt(length: 220) playback { url type length }\n }\n }\n";
|
|
4
|
+
/** Why a feed shows no episodes. `feed_not_configured` and `feed_empty` are not failures. */
|
|
5
|
+
export type PodcastFeedErrorCode = "invalid_feed_url" | "feed_unavailable" | "feed_malformed" | "transport_unavailable";
|
|
6
|
+
/** One feed row as the gateway returns it. */
|
|
7
|
+
export interface PodcastFeedEpisode {
|
|
8
|
+
id?: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
date?: string;
|
|
11
|
+
duration?: string;
|
|
12
|
+
image?: string;
|
|
13
|
+
descriptionExcerpt?: string;
|
|
14
|
+
playback?: {
|
|
15
|
+
url?: string;
|
|
16
|
+
type?: string;
|
|
17
|
+
length?: number;
|
|
18
|
+
} | null;
|
|
19
|
+
}
|
|
20
|
+
/** A playable episode. `audioUrl` is always the episode's own enclosure, never the feed URL. */
|
|
21
|
+
export interface PodcastEpisode {
|
|
22
|
+
id: string;
|
|
23
|
+
title: string;
|
|
24
|
+
date: string;
|
|
25
|
+
durationMs: number;
|
|
26
|
+
image: string;
|
|
27
|
+
description: string;
|
|
28
|
+
audioUrl: string;
|
|
29
|
+
mimeType: string;
|
|
30
|
+
}
|
|
31
|
+
export type PodcastFeedResult = {
|
|
32
|
+
ok: true;
|
|
33
|
+
episodes: PodcastEpisode[];
|
|
34
|
+
unplayable: number;
|
|
35
|
+
} | {
|
|
36
|
+
ok: false;
|
|
37
|
+
code: PodcastFeedErrorCode;
|
|
38
|
+
};
|
|
39
|
+
/** Check syntax and literal hosts, not DNS or redirect safety (the gateway owns those). */
|
|
40
|
+
export declare function podcastFeedUrl(raw: unknown): {
|
|
41
|
+
ok: true;
|
|
42
|
+
url: string;
|
|
43
|
+
} | {
|
|
44
|
+
ok: false;
|
|
45
|
+
code: "feed_not_configured" | "invalid_feed_url";
|
|
46
|
+
};
|
|
47
|
+
/** An episode's HTTPS enclosure. Public HTTP audio is blocked by native ATS/network policy. */
|
|
48
|
+
export declare function podcastAudioUrl(raw: unknown): string;
|
|
49
|
+
/** The gateway request body for one feed. */
|
|
50
|
+
export declare function podcastFeedRequest(feedUrl: string, limit?: number): {
|
|
51
|
+
query: string;
|
|
52
|
+
variables: {
|
|
53
|
+
url: string;
|
|
54
|
+
limit: number;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
/** "1200", "20:00" or "1:02:03" → milliseconds. Anything else is unknown (0). */
|
|
58
|
+
export declare function podcastDurationMs(value: unknown): number;
|
|
59
|
+
/** Map the gateway's answer. Episodes without a usable enclosure are counted, never given another URL.
|
|
60
|
+
* `describe` turns the excerpt into display text (default: HTML stripped to plain text). */
|
|
61
|
+
export declare function mapPodcastFeed(response: unknown, describe?: (excerpt: unknown) => string): PodcastFeedResult;
|
|
62
|
+
type Node = {
|
|
63
|
+
id: string;
|
|
64
|
+
body: {
|
|
65
|
+
package: string;
|
|
66
|
+
type: string;
|
|
67
|
+
props: Record<string, unknown>;
|
|
68
|
+
};
|
|
69
|
+
modifiers?: Record<string, unknown>;
|
|
70
|
+
};
|
|
71
|
+
/** Fixed screen copy. Configure dynamic Play/Pause labels through `createPodcastService({ messages })`. */
|
|
72
|
+
export interface PodcastCopy {
|
|
73
|
+
title: string;
|
|
74
|
+
queue: string;
|
|
75
|
+
retry: string;
|
|
76
|
+
previous: string;
|
|
77
|
+
next: string;
|
|
78
|
+
back: string;
|
|
79
|
+
forward: string;
|
|
80
|
+
seek: string;
|
|
81
|
+
}
|
|
82
|
+
export interface PodcastScreenOptions {
|
|
83
|
+
/** Where the built worker bundle is served from. */
|
|
84
|
+
bundleUrl: string;
|
|
85
|
+
/** The creator's public RSS feed. Keep it a runtime setting (`process.env.…`), not a publisher default. */
|
|
86
|
+
feedUrl: string;
|
|
87
|
+
screenId?: string;
|
|
88
|
+
/** Must match `createPodcastService({ service })`. */
|
|
89
|
+
service?: string;
|
|
90
|
+
copy?: Partial<PodcastCopy>;
|
|
91
|
+
}
|
|
92
|
+
export interface PodcastScreenEnvelope {
|
|
93
|
+
screenId: string;
|
|
94
|
+
renderer: string;
|
|
95
|
+
title: string;
|
|
96
|
+
schemaVersion: number;
|
|
97
|
+
cacheControl: {
|
|
98
|
+
maxAge: number;
|
|
99
|
+
staleWhileRevalidate: number;
|
|
100
|
+
};
|
|
101
|
+
logicBundle: {
|
|
102
|
+
url: string;
|
|
103
|
+
integrity: string;
|
|
104
|
+
declaredCapabilities: string[];
|
|
105
|
+
};
|
|
106
|
+
payload: Node;
|
|
107
|
+
stickyFooter: Node;
|
|
108
|
+
}
|
|
109
|
+
/** The capabilities a podcast screen declares. config.ts `capabilities` must list both too:
|
|
110
|
+
* `media_playback` is native, so an app that adds it needs a new binary (`himi dist`). */
|
|
111
|
+
export declare const PODCAST_SCREEN_CAPABILITIES: readonly ["wix_api", "media_playback"];
|
|
112
|
+
/** Normalize a build-time feed setting before it enters a public descriptor. Never echoes credentials. */
|
|
113
|
+
export declare function podcastFeedSetting(raw: unknown): string;
|
|
114
|
+
/** Episode list + a pinned player. All state and every action come from `createPodcastService`. */
|
|
115
|
+
export declare function podcastScreen(opts: PodcastScreenOptions): PodcastScreenEnvelope;
|
|
116
|
+
export {};
|