@wix/himalaya-cli 0.1722.0 → 0.1724.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-config.d.ts +1 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-module.d.ts +2 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/godot/src/index.d.ts +3 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/attendance-classifier.d.ts +1 -1
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/wix-payments-contract.d.ts +3 -39
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +10 -0
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/index.d.ts +2 -0
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/preview-surfaces.d.ts +24 -0
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-web-sdk.d.ts +37 -0
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-web-sdk.generated.d.ts +1 -0
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/wrapped-app-link.d.ts +13 -0
  12. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/checkout-source.d.ts +2 -3
  13. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-order-backend.d.ts +0 -2
  14. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/attendance.d.ts +2 -8
  15. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/index.d.ts +4 -13
  16. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +175 -1
  17. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap-checkout.mjs +46 -502
  18. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap.mjs +5 -26
  19. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +64 -648
  20. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +1 -0
  21. package/dist/browser-plane/assets.json +5 -5
  22. package/dist/browser-plane/package-reader.js +4 -4
  23. package/dist/browser-plane/preview-deferred/{74e5b76ecf38392d7eb3f9a9512d60a0675de85d411c9c56293e123152b3f70b.bin → a6e25c06d2a17ab2b5e34bf2b5965fa3ddd76ce3da32a036e546a60938130d7b.bin} +1 -1
  24. package/dist/browser-plane/sw.js +9 -9
  25. package/dist/cli.mjs +1325 -422
  26. package/dist/preview-assets.generated.bin +0 -0
  27. package/guides/himi-json-output.md +6 -2
  28. package/guides/iap-screen-adoption.md +4 -4
  29. package/guides/sdk-reference.json +11 -74
  30. package/guides/webview-page-sdk.md +14 -0
  31. package/guides/wix-business-context.md +24 -0
  32. package/guides/wix-site-to-himi-app.md +2 -1
  33. package/package.json +2 -2
  34. package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +2 -2
  35. package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +5 -8
  36. package/templates/beauty-salon-owner/config.ts +1 -1
  37. package/templates/branded-lite/tier5-src/himi-store-account/index.ts +2 -2
  38. package/templates/branded-lite/tier5-src/himi-store-product/index.ts +5 -8
  39. package/templates/brandy/README.md +14 -1
  40. package/templates/brandy/config.ts +71 -5
  41. package/templates/brandy/dev/index.ts +522 -8
  42. package/templates/brandy/himalaya.content.json +1 -1
  43. package/templates/brandy/himalaya.template.json +1 -1
  44. package/templates/brandy/tier5-src/himi-brandy-base44-account/index.ts +187 -0
  45. package/templates/community-club/tier5-src/himi-store-account/index.ts +2 -2
  46. package/templates/community-club-owner/config.ts +1 -1
  47. package/templates/conference/tier5-src/himi-store-account/index.ts +2 -2
  48. package/templates/events-meetups/tier5-src/himi-store-account/index.ts +2 -2
  49. package/templates/events-meetups-owner/config.ts +1 -1
  50. package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +2 -2
  51. package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +5 -8
  52. package/templates/gym-fitness-owner/config.ts +1 -1
  53. package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +2 -2
  54. package/templates/nonprofit-cause-owner/config.ts +1 -1
  55. package/templates/owner-lite/config.ts +1 -1
  56. package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +2 -2
  57. package/templates/podcast-creator-owner/config.ts +1 -1
  58. package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +2 -2
  59. package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +5 -8
  60. package/templates/portfolio-creative-owner/config.ts +1 -1
  61. package/templates/restaurant/tier5-src/himi-store-account/index.ts +2 -2
  62. package/templates/restaurant-owner/config.ts +1 -1
  63. package/templates/retail-store/tier5-src/himi-store-account/index.ts +2 -2
  64. package/templates/retail-store/tier5-src/himi-store-product/index.ts +5 -8
  65. package/templates/retail-store-owner/config.ts +1 -1
  66. package/templates/salon-spa/tier5-src/himi-store-account/index.ts +2 -2
  67. package/templates/wholesale-store/tier5-src/himi-store-account/index.ts +2 -2
  68. package/templates/wholesale-store/tier5-src/himi-store-product/index.ts +5 -8
  69. package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +2 -2
  70. package/templates/yoga-studio-owner/config.ts +1 -1
  71. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/attendance-orders.d.ts +0 -10
  72. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/online-programs-orders.d.ts +0 -2
  73. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/pricing-plans-orders.d.ts +0 -2
@@ -125,6 +125,7 @@ export interface NavigationConfig {
125
125
  flagConfig: FlagConfig;
126
126
  push?: PushConfig;
127
127
  appLinkHosts?: string[];
128
+ wrappedAppLinks?: import("@wix/himalaya/core").WrappedAppLink[];
128
129
  permissionCopy?: Record<string, string>;
129
130
  control?: AppControl;
130
131
  useProdServe?: boolean;
@@ -206,6 +206,8 @@ export interface DerivedAppMeta {
206
206
  control?: import("@wix/himalaya/core").AppControl;
207
207
  /** Forwarded from AppConfig.appLinkHosts for the OTA app-config channel. */
208
208
  appLinkHosts?: string[];
209
+ /** Forwarded from AppConfig.wrappedAppLinks (#4816) for the OTA app-config channel. */
210
+ wrappedAppLinks?: import("@wix/himalaya/core").WrappedAppLink[];
209
211
  /** Forwarded from AppConfig.permissionCopy — read by the dist contract (native usage strings). */
210
212
  permissionCopy?: Record<string, string>;
211
213
  /** Forwarded from AppConfig.navigation.tabBar — RFC 0010 tab structure. */
@@ -19,6 +19,9 @@ export interface PackResult {
19
19
  status: PackStatus;
20
20
  /** Local path the verified pack was written to, when it got that far. */
21
21
  path?: string;
22
+ /** Why it failed, when the platform said: e.g. `http 404 host/v1/asset/<sha>`, `network -1009 host/…`,
23
+ * `sri mismatch`. Never a query or a header, so it is safe to show. */
24
+ detail?: string;
22
25
  }
23
26
  /**
24
27
  * Send a message to the running game (worker -> game).
@@ -26,7 +26,7 @@ export interface TicketAttendance extends AttendancePrice {
26
26
  }
27
27
  /** Delivery metadata decides the route; online booking and online payment alone never do. */
28
28
  export declare function classifyForApple(item: BookingAttendance | TicketAttendance, currency: string): AppleAttendanceRoute;
29
- /** Applies platform support and activation switches without sending uncertain iOS offers to web checkout. */
29
+ /** Applies platform support without sending uncertain iOS offers to web checkout. */
30
30
  export declare function attendanceCheckoutRoute(item: BookingAttendance | TicketAttendance, currency: string, platform: string): "regular" | "appleIap" | "blocked";
31
31
  /** Preserves missing Wix service fields as unknown so absent metadata cannot authorize a payment route. */
32
32
  export declare function bookingAttendanceOf(raw: unknown): BookingAttendance;
@@ -37,23 +37,9 @@ export interface AppleSaleRule {
37
37
  appProductId(entityId: string): string;
38
38
  productType: "NON_CONSUMABLE" | "CONSUMABLE";
39
39
  }
40
- export declare const BOOKINGS_APPLE_SALES_ENABLED = true;
41
- export declare const EVENTS_APPLE_SALES_ENABLED = true;
42
- /**
43
- * Whether Wix Stores items sell through the App Store: the Stores rule in `APPLE_SALE_RULES` and the
44
- * product screen's Buy. A sale is wix-iap StartItemPayment (catalyst-server #24496), which places and
45
- * charges the member's eCom order for one catalog item server-side; the device never opens an eCom
46
- * checkout or a cashier charge for it. ON for mapped digital products.
47
- */
48
- export declare const STORES_APPLE_SALES_ENABLED = true;
49
40
  /** StartItemPayment's CatalogReference: the purchases catalog sells a Stores product under its product
50
41
  * id (eCom's `catalogItemId`). One-time unlocks only, whatever the backend also accepts. */
51
42
  export declare const STORES_PRODUCT_SALE_RULE: AppleSaleRule;
52
- /** One-time unlimited plans sell through the App Store. Proven live in Sandbox on 2026-10-19: a member's
53
- * online plan order is charged with one cashier item whose id is the plan id, so StartPayment maps it to the
54
- * plan's Apple product, and the order reads ACTIVE and PAID. Recurring and time-limited plans stay outside
55
- * this rule; their Billing lifecycle is unfinished. */
56
- export declare const PRICING_PLAN_APPLE_SALES_ENABLED = true;
57
43
  /**
58
44
  * Whether Wix Video videos sell through the App Store. OFF: prices only. A video with a one-time Sale
59
45
  * price above zero is mapped under its video id as a one-time unlock (`wixVideoItem`), and screens show
@@ -61,40 +47,18 @@ export declare const PRICING_PLAN_APPLE_SALES_ENABLED = true;
61
47
  * Videos order adapter refuses every sale until this is on.
62
48
  */
63
49
  export declare const VIDEOS_APPLE_SALES_ENABLED = false;
64
- /**
65
- * Which verticals order through wix-iap StartItemPayment (catalyst-server #24878 Plans, #24880 Online
66
- * Programs, #24881 Bookings, #24882 Events) instead of the device's own checkout and StartPayment. The
67
- * server places the order as the member, charges it with appleIAP and names the App Store product. Each
68
- * OFF: that vertical keeps its client checkout. Turn one on only once production wix-iap and Serve's
69
- * generated client carry its fields; each flips on its own.
70
- */
71
- export declare const PRICING_PLAN_ITEM_PAYMENT_ENABLED = false;
72
- export declare const ONLINE_PROGRAM_ITEM_PAYMENT_ENABLED = false;
73
- export declare const BOOKINGS_ITEM_PAYMENT_ENABLED = false;
74
- export declare const EVENTS_ITEM_PAYMENT_ENABLED = false;
75
- /**
76
- * CancelPayment (catalyst-server #24894, not deployed) when the member closes the Apple sheet: it cancels
77
- * the pending Payment and releases the ticket reservation or booking it held. OFF: nothing is sent, and the
78
- * Payment expires on its own in about an hour.
79
- */
80
- export declare const CANCEL_PAYMENT_ENABLED = false;
81
50
  /**
82
51
  * The one definition `himi store iap connect` writes mappings by and the mapping source reads them by,
83
- * keyed by catalog kind. wix-iap StartPayment maps the cashier order's single item id, and Online
84
- * Programs builds that order with the program id as the item id; programs are one-time unlocks.
85
- * Wix Stores and one-time unlimited Pricing Plans join only with their independent switches.
52
+ * keyed by catalog kind. Every vertical but Video sells through wix-iap StartItemPayment, which orders
53
+ * the item server-side and names the App Store product by the item's own id.
86
54
  */
87
55
  export interface AppleSaleOptions {
88
- storesAppleSalesEnabled?: boolean;
89
- pricingPlanAppleSalesEnabled?: boolean;
90
- bookingsAppleSalesEnabled?: boolean;
91
- eventsAppleSalesEnabled?: boolean;
92
56
  videosAppleSalesEnabled?: boolean;
93
57
  }
94
58
  /** Resolves runtime sale eligibility independently from the catalog's provisioning support. */
95
59
  export declare function appleSaleRules(options?: AppleSaleOptions): Readonly<Record<string, AppleSaleRule>>;
96
60
  export declare const APPLE_SALE_RULES: Readonly<Record<string, AppleSaleRule>>;
97
- /** Catalog setup may precede activation; purchases still require the independent sales switches. */
61
+ /** Catalog setup may precede activation: a video is provisioned while its sales stay off. */
98
62
  export declare const APPLE_PROVISIONING_RULES: Readonly<Record<string, AppleSaleRule>>;
99
63
  /** What the mapping source prices by: every sale rule, plus the verticals whose App Store prices show
100
64
  * before their purchase is on (Wix Video). A priced item with no sale rule has no checkout adapter. */
@@ -10,6 +10,7 @@ import type { CmsConfig } from "./cms.js";
10
10
  import { type LegacyImportConfig } from "./legacy-import.js";
11
11
  import { type DataResourcesConfig } from "@wix/himalaya/data-resources";
12
12
  import { type Base44EntitySpec, type Base44FunctionSpec } from "./base44-entities.js";
13
+ import { type WrappedAppLink } from "./wrapped-app-link.js";
13
14
  import type { FunctionDefinition, FunctionScheduleRecord } from "@himalaya/functions";
14
15
  export type { CmsConfig, CmsCollectionSpec, CmsFieldSpec, WixFieldType } from "./cms.js";
15
16
  export type { PushRoute, PushPayloadAdapter, PushScreenMapEntry };
@@ -525,6 +526,15 @@ export interface AppConfig {
525
526
  * routes inbound https links on these hosts through the deep-link table.
526
527
  */
527
528
  appLinkHosts?: string[];
529
+ /**
530
+ * #4816 — links on a host this app SHARES with other apps, which carry its route in a query
531
+ * param: `{ host: "invite.mobileappinvite.com", path: "/nano", param: "deeplink" }` makes
532
+ * `https://invite.mobileappinvite.com/nano?deeplink=join/AB12` open `<scheme>://join/AB12`.
533
+ * Served OTA on the app-config channel as `wrappedAppLinks`; the native `normalizeIncomingURL`
534
+ * unwraps such a link before routing it. The host is NOT an `appLinkHosts` entry (the app does
535
+ * not own it); the shell still claims the path in its entitlements and manifest.
536
+ */
537
+ wrappedAppLinks?: WrappedAppLink[];
528
538
  /**
529
539
  * iOS universal-link identity. Served (per running app instance) by the
530
540
  * dev-server's `GET /.well-known/apple-app-site-association`. Pure app
@@ -19,10 +19,12 @@ export * from "./worker-subtree.js";
19
19
  export * from "./worker-subtree-safe-types.generated.js";
20
20
  export * from "./icon-catalog.generated.js";
21
21
  export * from "./app-link.js";
22
+ export * from "./wrapped-app-link.js";
22
23
  export * from "./app-identity.js";
23
24
  export * from "./store-adopt.js";
24
25
  export * from "./app-registry-client.js";
25
26
  export * from "./site-shell.js";
27
+ export * from "./site-web-sdk.js";
26
28
  export * from "./site-menu.js";
27
29
  export * from "./webview-embedded.js";
28
30
  export * from "./webview-origin.js";
@@ -11,6 +11,30 @@ export type SizeClass = "compact" | "medium" | "expanded";
11
11
  * CONTAINER, never the OS window — that is what lets a 390px phone frame on a
12
12
  * wide desktop still resolve to `compact` (AppShell.tsx). */
13
13
  export declare function resolveSizeClass(width: number): SizeClass;
14
+ /** The `contentMaxWidth` token: a size-class-keyed content measure (RFC 0041). */
15
+ export interface ContentMaxWidth {
16
+ base: number;
17
+ medium?: number;
18
+ expanded?: number;
19
+ }
20
+ export declare const DEFAULT_CONTENT_MAX: ContentMaxWidth;
21
+ /** The web shell's expanded sidebar rail, in px (SidebarRail.tsx). The column beside it is the
22
+ * surface width less this, so a render that draws no rail draws the screen at that column. */
23
+ export declare const SIDEBAR_RAIL_WIDTH = 240;
24
+ /** Resolve a size-class-keyed content measure against a width (expanded ≥840 →
25
+ * medium ≥600 → base), with downward fallback. Mirror of the Grid column ladder. */
26
+ export declare function resolveContentMax(cmw: ContentMaxWidth, width: number): number;
27
+ /** The web shell's content measures for one surface at one width (AppShell.tsx).
28
+ * `contentMax` caps the screen beside a sidebar; `shellMax` caps the whole shell
29
+ * otherwise. Tablet and Mac previews imitate the native shells (full bleed below
30
+ * expanded, then the token's measure); the website (`desktop`) and phones keep the
31
+ * token's `base` phone column. `himi render` applies the same measure, so a render
32
+ * matches what the host shows. */
33
+ export declare function shellContentMeasures(surfaceId: string | undefined, width: number, contentMaxWidth: ContentMaxWidth | undefined): {
34
+ nativePreview: boolean;
35
+ contentMax: number | "100%";
36
+ shellMax: number | "100%";
37
+ };
14
38
  /** The chassis drawn around a preview. Purely presentational — it decides bezel,
15
39
  * status bar, title bar, crown, wallpaper; it never affects what renders inside. */
16
40
  export type ChassisKind = "phone" | "tablet" | "browser" | "mac" | "watch" | "watch-round" | "widget" | "car" | "tv";
@@ -0,0 +1,37 @@
1
+ import type { ScreenDescriptor } from "./schema.js";
2
+ /** A provisioning.json `webSdk` block, as written: `bundle` is usually absent. */
3
+ export interface SiteWebSdk {
4
+ /** The package's own Tier-5 worker. Absent ⇒ the generated companion (health alone ⇒ its built-in
5
+ * proof worker). */
6
+ bundle?: string;
7
+ /** Capability ids a page may call. */
8
+ capabilities?: readonly string[];
9
+ }
10
+ /** The worker a `webSdk` block puts behind every site page, and what each page declares for it. */
11
+ export interface SiteWebSdkCompanion {
12
+ bundle: string;
13
+ declaredCapabilities: string[];
14
+ }
15
+ /** What {@link withSiteWebSdk} reads from the screen builder's context. */
16
+ export interface SiteWebSdkBuildContext {
17
+ serverBaseUrl: string;
18
+ bundleIntegrity(bundleName: string): string | null;
19
+ }
20
+ /** Bundle names the content build reserves for generated companions. */
21
+ export declare const SITE_WEB_SDK_GENERATED_PREFIX = "himi-webview-page-";
22
+ /** Health's built-in proof worker, used when health is the only capability. */
23
+ export declare const SITE_WEB_SDK_HEALTH_BUNDLE = "himi-webview-health";
24
+ /** The generated companion's bundle name for a capability set (order and duplicates ignored). */
25
+ export declare function siteWebSdkBundleName(capabilities: readonly string[]): string;
26
+ /** The worker a `webSdk` block needs and what a site screen declares for it, or null when the block
27
+ * enables no capability. A generated companion declares the `webview` transport, the enabled set,
28
+ * and whatever their packages dispatch besides them; the package's own `bundle` declares the
29
+ * transport and the enabled set. Throws on a block no worker can serve: a reserved bundle name
30
+ * that is not this set's, or a capability no page can call. */
31
+ export declare function siteWebSdkCompanion(webSdk: SiteWebSdk | null | undefined): SiteWebSdkCompanion | null;
32
+ /** A copy of a site screen with the `webSdk` block's worker attached as its `logicBundle`, so the
33
+ * page can call the enabled capabilities. Without a block (or with no capability) the copy is
34
+ * unchanged. Null when the worker is not built, so the screen fails to build rather than ship a
35
+ * page whose calls nothing answers. A worker-backed page keeps the WebView screen form only (its
36
+ * node form is dropped), which every binary routes to the worker-backed WebView. */
37
+ export declare function withSiteWebSdk(descriptor: ScreenDescriptor, ctx: SiteWebSdkBuildContext, webSdk: SiteWebSdk | null | undefined): ScreenDescriptor | null;
@@ -0,0 +1 @@
1
+ export declare const PAGE_CAPABILITY_DISPATCHES: Readonly<Record<string, readonly string[]>>;
@@ -0,0 +1,13 @@
1
+ /** One `wrappedAppLinks` entry: an http(s) link on `host` whose path is `path` or under it carries
2
+ * the app's route in the `param` query param. */
3
+ export interface WrappedAppLink {
4
+ host: string;
5
+ /** Starts with `/`, no trailing slash: `/nano` matches `/nano`, `/nano/` and `/nano/x`. */
6
+ path: string;
7
+ param: string;
8
+ }
9
+ /** The route `url` carries as `<scheme>://<route>`, keeping its other query params (e.g.
10
+ * `businessId`), or null when `url` matches none of `wrappers`. Only http(s) links are read. */
11
+ export declare function unwrapAppLink(url: string, wrappers: readonly WrappedAppLink[], scheme: string): string | null;
12
+ /** `defineApp` validation: the problems with a `wrappedAppLinks` value, empty when it is valid. */
13
+ export declare function wrappedAppLinksProblems(value: unknown, appLinkHosts?: readonly string[]): string[];
@@ -3,7 +3,6 @@ export declare const HIMALAYA_SERVE_CHECKOUT_ROUTES: AppleIapCheckoutRoutes;
3
3
  export declare function appleIapCheckoutRoutes(): AppleIapCheckoutRoutes | null;
4
4
  /** The low-level factory's switch: on whenever the production routes exist. */
5
5
  export declare function appleIapCheckoutEnabled(): boolean;
6
- /** Whether Wix Stores items sell through the App Store: wix-iap StartItemPayment places and charges
7
- * the member's eCom order (`STORES_APPLE_SALES_ENABLED` in @himalaya/iap). Turning it off stops only
8
- * new attempts: stored ones are still held, completed and tracked (docs/iap-wix-checkout.md). */
6
+ /** @deprecated Always true: Wix Stores items always sell through the App Store (wix-iap StartItemPayment).
7
+ * Kept because screens generated from earlier `himi init` templates still call it. */
9
8
  export declare function storesAppleSalesEnabled(): boolean;
@@ -32,8 +32,6 @@ export interface WixOrderBackendDependencies {
32
32
  /** StoreKit's storefront country (alpha-3), the billing country of a Pricing Plans order; null
33
33
  * when the store has none. Read before every StartItemPayment. */
34
34
  storeCountry?(): Promise<string | null>;
35
- /** Whether a closed Apple sheet sends CancelPayment; defaults to `CANCEL_PAYMENT_ENABLED` (off). */
36
- cancelPaymentEnabled?: boolean;
37
35
  report(event: OrderEvent): void;
38
36
  }
39
37
  export declare function createWixOrderBackend(deps: WixOrderBackendDependencies): DeliveryBackend;
@@ -1,9 +1,3 @@
1
1
  import type { IapItemPaymentAdapter } from "../apple-iap-contract.js";
2
- export declare function attendanceOrdersWith(options: {
3
- bookingsEnabled: boolean;
4
- eventsEnabled: boolean;
5
- }): {
6
- bookingOrders: IapItemPaymentAdapter;
7
- eventTicketOrders: IapItemPaymentAdapter;
8
- };
9
- export declare const bookingItemPayments: IapItemPaymentAdapter, eventTicketItemPayments: IapItemPaymentAdapter;
2
+ export declare const bookingItemPayments: IapItemPaymentAdapter;
3
+ export declare const eventTicketItemPayments: IapItemPaymentAdapter;
@@ -1,15 +1,6 @@
1
- import type { IapOrderAdapter } from "../apple-iap-contract.js";
2
- import { onlineProgramItemPayments } from "./online-programs.js";
3
- import { onlineProgramClientOrders } from "./online-programs-orders.js";
4
- import { pricingPlanItemPayments } from "./pricing-plans.js";
5
- import { pricingPlanClientOrders } from "./pricing-plans-orders.js";
6
- import { bookingItemPayments, eventTicketItemPayments } from "./attendance.js";
7
- import { bookingClientOrders, eventTicketClientOrders } from "./attendance-orders.js";
8
- export { onlineProgramItemPayments, onlineProgramClientOrders, pricingPlanItemPayments, pricingPlanClientOrders };
9
- export { bookingItemPayments, eventTicketItemPayments, bookingClientOrders, eventTicketClientOrders };
10
1
  export { storesProductOrders, classifyCart } from "./stores.js";
11
2
  export { wixVideoOrders } from "./videos.js";
12
- export declare const onlineProgramOrders: IapOrderAdapter;
13
- export declare const pricingPlanOrders: IapOrderAdapter;
14
- export declare const bookingOrders: IapOrderAdapter;
15
- export declare const eventTicketOrders: IapOrderAdapter;
3
+ export declare const onlineProgramOrders: import("../apple-iap-contract.js").IapItemPaymentAdapter;
4
+ export declare const pricingPlanOrders: import("../apple-iap-contract.js").IapItemPaymentAdapter;
5
+ export declare const bookingOrders: import("../apple-iap-contract.js").IapItemPaymentAdapter;
6
+ export declare const eventTicketOrders: import("../apple-iap-contract.js").IapItemPaymentAdapter;
@@ -7851,6 +7851,49 @@ var KV_DEFAULT_MAX_VALUE_BYTES = 64 * 1024;
7851
7851
  var KV_MAX_VALUE_BYTES = 256 * 1024;
7852
7852
  var KV_MAX_TTL_SECONDS = 365 * 24 * 60 * 60;
7853
7853
 
7854
+ // ../../core/ts/src/wrapped-app-link.ts
7855
+ var ABSOLUTE = /^[a-z][a-z0-9+.-]*:\/\//i;
7856
+ function encodeRoute(route) {
7857
+ return route.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@/?]/gu, (c) => encodeURIComponent(c));
7858
+ }
7859
+ function unwrapAppLink(url, wrappers, scheme) {
7860
+ if (wrappers.length === 0 || !scheme) return null;
7861
+ let parsed;
7862
+ try {
7863
+ parsed = new URL(url);
7864
+ } catch {
7865
+ return null;
7866
+ }
7867
+ if (parsed.protocol !== "https:" && parsed.protocol !== "http:") return null;
7868
+ const wrapper = wrappers.find(
7869
+ (w) => parsed.host === w.host.toLowerCase() && (parsed.pathname === w.path || parsed.pathname.startsWith(`${w.path}/`))
7870
+ );
7871
+ if (!wrapper) return null;
7872
+ const link = parsed.searchParams.get(wrapper.param);
7873
+ if (!link) return null;
7874
+ const target = encodeRoute(ABSOLUTE.test(link) ? link : `${scheme}://${link.replace(/^\/+/, "")}`);
7875
+ const rest = [...parsed.searchParams].filter(([k]) => k !== wrapper.param);
7876
+ if (rest.length === 0) return target;
7877
+ const sep = target.includes("?") ? "&" : "?";
7878
+ return target + sep + rest.map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`).join("&");
7879
+ }
7880
+ function wrappedAppLinksProblems(value, appLinkHosts = []) {
7881
+ if (value === void 0) return [];
7882
+ if (!Array.isArray(value)) return ["wrappedAppLinks must be an array"];
7883
+ const problems = [];
7884
+ value.forEach((w, i) => {
7885
+ const at = `wrappedAppLinks[${i}]`;
7886
+ if (!w || typeof w !== "object") return void problems.push(`${at} must be an object`);
7887
+ if (typeof w.host !== "string" || !/^[a-z0-9.-]+$/.test(w.host)) problems.push(`${at}.host must be a lower-case host name`);
7888
+ else if (appLinkHosts.includes(w.host)) problems.push(`${at}.host "${w.host}" is also an appLinkHosts host: a host the app owns needs no wrapper`);
7889
+ if (typeof w.path !== "string" || !/^\/[^/?#\\]+(\/[^/?#\\]+)*$/.test(w.path) || /(^|\/)\.\.?(\/|$)/.test(w.path)) {
7890
+ problems.push(`${at}.path must start with "/", end without one, and hold no "." or ".." segment`);
7891
+ }
7892
+ if (typeof w.param !== "string" || w.param.length === 0) problems.push(`${at}.param must be a non-empty string`);
7893
+ });
7894
+ return problems;
7895
+ }
7896
+
7854
7897
  // ../../core/sdk/functions/src/index.ts
7855
7898
  var HTTP_METHODS = ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"];
7856
7899
  var FUNCTION_AUTHS = ["public", "visitor", "member", "user"];
@@ -8351,6 +8394,8 @@ function validateConfigShape(config) {
8351
8394
  throw new Error("defineApp: environments.prod requires a non-empty serve URL.");
8352
8395
  }
8353
8396
  }
8397
+ const wrappedProblems = wrappedAppLinksProblems(config.wrappedAppLinks, config.appLinkHosts ?? []);
8398
+ if (wrappedProblems.length) throw new Error(`defineApp: ${wrappedProblems.join("; ")}.`);
8354
8399
  if (config.navigation) {
8355
8400
  const nav = config.navigation;
8356
8401
  if (nav.linkableScreens !== void 0 && nav.linkableScreens !== null && !Array.isArray(nav.linkableScreens)) {
@@ -10480,6 +10525,20 @@ function resolveSizeClass(width) {
10480
10525
  if (width >= SIZE_CLASS_BREAKPOINTS.medium) return "medium";
10481
10526
  return "compact";
10482
10527
  }
10528
+ var DEFAULT_CONTENT_MAX = { base: 480, medium: 600, expanded: 920 };
10529
+ var SIDEBAR_RAIL_WIDTH = 240;
10530
+ function resolveContentMax(cmw, width) {
10531
+ if (width >= SIZE_CLASS_BREAKPOINTS.expanded) return cmw.expanded ?? cmw.medium ?? cmw.base;
10532
+ if (width >= SIZE_CLASS_BREAKPOINTS.medium) return cmw.medium ?? cmw.base;
10533
+ return cmw.base;
10534
+ }
10535
+ function shellContentMeasures(surfaceId, width, contentMaxWidth) {
10536
+ const cmw = contentMaxWidth ?? DEFAULT_CONTENT_MAX;
10537
+ const surfaceWidth = (surfaceId ? surfaceById(surfaceId)?.viewport.width : void 0) ?? 0;
10538
+ const nativePreview = surfaceId !== "desktop" && surfaceWidth >= SIZE_CLASS_BREAKPOINTS.medium;
10539
+ const contentMax = nativePreview && width < SIZE_CLASS_BREAKPOINTS.expanded ? "100%" : resolveContentMax(cmw, width);
10540
+ return { nativePreview, contentMax, shellMax: nativePreview ? contentMax : cmw.base };
10541
+ }
10483
10542
  var CHASSIS_GEOMETRY = {
10484
10543
  // The phone numbers are the pre-existing HostFrame/DeviceFrame constants —
10485
10544
  // preserved exactly so parameterizing the frames is not a visual change.
@@ -15369,6 +15428,110 @@ function assertSiteShellConfig(site, opts) {
15369
15428
  }
15370
15429
  }
15371
15430
 
15431
+ // ../../core/ts/src/site-web-sdk.generated.ts
15432
+ var PAGE_CAPABILITY_DISPATCHES = {
15433
+ "app_info": [],
15434
+ "audio_record": [],
15435
+ "base44": [],
15436
+ "biometrics": [],
15437
+ "browser_auth": [],
15438
+ "calendar": [],
15439
+ "calls": [],
15440
+ "camera": [],
15441
+ "clipboard": [],
15442
+ "contacts": [],
15443
+ "file_picker": [],
15444
+ "files": [],
15445
+ "godot": [],
15446
+ "haptic": [],
15447
+ "health": [],
15448
+ "himi_apps": [],
15449
+ "iap": ["wix_api"],
15450
+ "keyboard": [],
15451
+ "legacy_import": [],
15452
+ "live_activity": [],
15453
+ "local_database": [],
15454
+ "location": [],
15455
+ "media_playback": [],
15456
+ "motion": [],
15457
+ "network": [],
15458
+ "on_device_ai": [],
15459
+ "open_url": [],
15460
+ "pdf": [],
15461
+ "photos": [],
15462
+ "presigned_upload": [],
15463
+ "push": [],
15464
+ "release_control": [],
15465
+ "secure_storage": [],
15466
+ "share": [],
15467
+ "speaker_diarization": [],
15468
+ "speech": [],
15469
+ "system_intents": [],
15470
+ "tasks": [],
15471
+ "theme": [],
15472
+ "torch": [],
15473
+ "ui": [],
15474
+ "wix_cashier": [],
15475
+ "wix_chat": [],
15476
+ "wix_platform": ["wix_api"]
15477
+ };
15478
+
15479
+ // ../../core/ts/src/site-web-sdk.ts
15480
+ var SITE_WEB_SDK_GENERATED_PREFIX = "himi-webview-page-";
15481
+ var SITE_WEB_SDK_HEALTH_BUNDLE = "himi-webview-health";
15482
+ function siteWebSdkBundleName(capabilities) {
15483
+ const ids = [...new Set(capabilities)].sort();
15484
+ return `${SITE_WEB_SDK_GENERATED_PREFIX}${workerSubtreeSha256(ids.join(",")).slice(0, 10)}`;
15485
+ }
15486
+ function capabilityIds(value) {
15487
+ if (value == null) return [];
15488
+ if (!Array.isArray(value)) throw new Error("webSdk.capabilities must be an array of capability ids");
15489
+ const ids = value.map((id) => {
15490
+ if (typeof id !== "string" || !id.trim()) throw new Error("webSdk.capabilities must be an array of capability ids");
15491
+ return id.trim();
15492
+ });
15493
+ return [...new Set(ids)];
15494
+ }
15495
+ function siteWebSdkCompanion(webSdk) {
15496
+ if (webSdk == null) return null;
15497
+ if (typeof webSdk !== "object" || Array.isArray(webSdk)) throw new Error("webSdk must be an object");
15498
+ const capabilities = capabilityIds(webSdk.capabilities);
15499
+ if (capabilities.length === 0) return null;
15500
+ if (webSdk.bundle != null && typeof webSdk.bundle !== "string") throw new Error("webSdk.bundle must be a string");
15501
+ const generated = siteWebSdkBundleName(capabilities);
15502
+ const named = webSdk.bundle?.trim() || void 0;
15503
+ if (named && named.startsWith(SITE_WEB_SDK_GENERATED_PREFIX) && named !== generated) {
15504
+ throw new Error(`webSdk.bundle must not start with "${SITE_WEB_SDK_GENERATED_PREFIX}": that name is reserved for the generated companion \u2014 omit bundle to use it`);
15505
+ }
15506
+ const bundle = named ?? (capabilities.length === 1 && capabilities[0] === "health" ? SITE_WEB_SDK_HEALTH_BUNDLE : generated);
15507
+ const declared = ["webview", ...capabilities];
15508
+ if (bundle !== generated) return { bundle, declaredCapabilities: declared };
15509
+ const extra = /* @__PURE__ */ new Set();
15510
+ for (const id of capabilities) {
15511
+ const dispatches = PAGE_CAPABILITY_DISPATCHES[id];
15512
+ if (!dispatches) throw new Error(`webSdk.capabilities: a page cannot call ${JSON.stringify(id)}`);
15513
+ for (const other of dispatches) if (!declared.includes(other)) extra.add(other);
15514
+ }
15515
+ return { bundle, declaredCapabilities: [...declared, ...[...extra].sort()] };
15516
+ }
15517
+ function withSiteWebSdk(descriptor, ctx, webSdk) {
15518
+ const out = JSON.parse(JSON.stringify(descriptor));
15519
+ const companion = siteWebSdkCompanion(webSdk);
15520
+ if (!companion) return out;
15521
+ const integrity = ctx.bundleIntegrity(companion.bundle);
15522
+ if (!integrity) return null;
15523
+ delete out.payload;
15524
+ out.logicBundle = {
15525
+ url: `${ctx.serverBaseUrl}/v1/bundles/${companion.bundle}?integrity=${encodeURIComponent(integrity)}`,
15526
+ integrity,
15527
+ contentType: "application/javascript+ts-bundle",
15528
+ declaredCapabilities: companion.declaredCapabilities,
15529
+ minBinaryVersion: "0.2.0",
15530
+ bundleVersion: "0.0.1"
15531
+ };
15532
+ return out;
15533
+ }
15534
+
15372
15535
  // ../../core/ts/src/site-menu-script.generated.ts
15373
15536
  var SITE_MENU_MESSAGE_NAME = "himalayaSiteMenu";
15374
15537
  var SITE_NAV_LINKS_JS = '(function(){var q=document.querySelectorAll("nav a, header a, [role=navigation] a"),o=[],i,a,t,h;for(i=0;i<q.length&&o.length<24;i++){a=q[i];t=String(a.textContent||"").replace(/\\s+/g," ").trim();h=String(a.href||"");if(t&&/^https?:/.test(h))o.push({label:t,href:h})}return o})()';
@@ -15597,6 +15760,7 @@ export {
15597
15760
  BUTTON_VARIANTS,
15598
15761
  CHASSIS_GEOMETRY,
15599
15762
  CORE_COMPONENTS,
15763
+ DEFAULT_CONTENT_MAX,
15600
15764
  DEFAULT_DISTRIBUTION,
15601
15765
  DEFAULT_ICON_ACCENT_TOKEN,
15602
15766
  DEFAULT_ICON_GLYPH_SCALE,
@@ -15632,6 +15796,7 @@ export {
15632
15796
  PROJECTION_SNAPSHOT_SIZE,
15633
15797
  RICH_CONTENT_EDITOR_TOOLS,
15634
15798
  RTL_LOCALES,
15799
+ SIDEBAR_RAIL_WIDTH,
15635
15800
  SITE_LAYOUTS,
15636
15801
  SITE_MENU_DEFAULT_ICON,
15637
15802
  SITE_MENU_DRAWER_ID_PREFIX,
@@ -15654,6 +15819,8 @@ export {
15654
15819
  SITE_SCREEN_FORMS,
15655
15820
  SITE_SCREEN_PREFIX,
15656
15821
  SITE_SHELL_MAX_TABS,
15822
+ SITE_WEB_SDK_GENERATED_PREFIX,
15823
+ SITE_WEB_SDK_HEALTH_BUNDLE,
15657
15824
  SIZE_CLASS_BREAKPOINTS,
15658
15825
  SPLASH_MAX_HOLD_MS_MAX,
15659
15826
  SPLASH_MIN_VISIBLE_MS_MAX,
@@ -15758,6 +15925,7 @@ export {
15758
15925
  resolveAppLocale,
15759
15926
  resolveButtonTokens,
15760
15927
  resolveColor,
15928
+ resolveContentMax,
15761
15929
  resolveIcon,
15762
15930
  resolveIdiom,
15763
15931
  resolveKeyboard,
@@ -15776,6 +15944,7 @@ export {
15776
15944
  sameCapabilityScope,
15777
15945
  screenDescriptorSchema,
15778
15946
  selectIdiomOverlay,
15947
+ shellContentMeasures,
15779
15948
  shipsLocale,
15780
15949
  shouldRevealError,
15781
15950
  siteAllowedOrigins,
@@ -15794,6 +15963,8 @@ export {
15794
15963
  siteScreenId,
15795
15964
  siteScreens,
15796
15965
  siteSidebar,
15966
+ siteWebSdkBundleName,
15967
+ siteWebSdkCompanion,
15797
15968
  siteWebViewPreset,
15798
15969
  stripOriginParams,
15799
15970
  summarize,
@@ -15802,6 +15973,7 @@ export {
15802
15973
  surfaceRenderMode,
15803
15974
  surfacesForApp,
15804
15975
  tonalElevationAlpha,
15976
+ unwrapAppLink,
15805
15977
  validate,
15806
15978
  validateAll,
15807
15979
  validateAuthGateScreen,
@@ -15820,7 +15992,9 @@ export {
15820
15992
  webViewOriginAllowed,
15821
15993
  webViewSiteTrustAppFindings,
15822
15994
  widgetSnapshotSchema,
15995
+ withSiteWebSdk,
15823
15996
  workerSubtreePolicyErrors,
15824
- workerSubtreeSha256
15997
+ workerSubtreeSha256,
15998
+ wrappedAppLinksProblems
15825
15999
  };
15826
16000
  //# sourceMappingURL=core.mjs.map