@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
|
@@ -60,6 +60,9 @@ export interface ScreenDescriptor {
|
|
|
60
60
|
* is the visible top of its tab's stack. Mirror of ScreenDescriptor.tab_bar_visibility in
|
|
61
61
|
* core.proto. */
|
|
62
62
|
tabBarVisibility?: string;
|
|
63
|
+
/** "" / "pinned" (default) | "floating": how the host draws `stickyFooter`. Mirror of
|
|
64
|
+
* ScreenDescriptor.sticky_footer_placement in core.proto. */
|
|
65
|
+
stickyFooterPlacement?: string;
|
|
63
66
|
}
|
|
64
67
|
/** Tier 3/4 + embeddable WebView behavior. Mirror of WebViewConfig in core.proto
|
|
65
68
|
* (RFC 0038). All fields optional; zero values reproduce legacy behavior. */
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/himi-package.d.ts
ADDED
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
/** Format tag written into (and required by) every package header. */
|
|
2
|
+
export declare const HIMI_PACKAGE_FORMAT = "himi-package/2";
|
|
3
|
+
/** The first package format. It intentionally remains readable as a snapshot. */
|
|
4
|
+
export declare const LEGACY_HIMI_PACKAGE_FORMAT = "himi-package/1";
|
|
5
|
+
export type HimiPackageFormat = typeof HIMI_PACKAGE_FORMAT | typeof LEGACY_HIMI_PACKAGE_FORMAT;
|
|
6
|
+
/** The header entry's path inside the archive. */
|
|
7
|
+
export declare const HIMI_PACKAGE_HEADER_PATH = "himi-package.json";
|
|
8
|
+
/** The manifest entry's path inside the archive (== the release tree's own name). */
|
|
9
|
+
export declare const HIMI_PACKAGE_MANIFEST_PATH = "release-manifest.json";
|
|
10
|
+
/**
|
|
11
|
+
* The app's OWN source, as one zip entry — the whole grammar for "this package is editable".
|
|
12
|
+
*
|
|
13
|
+
* ONE entry, not a `source/**` sub-tree, and that is a deliberate narrowing rather than a
|
|
14
|
+
* shortcut. A sub-tree would need its own path rules, its own traversal guard and its own
|
|
15
|
+
* per-file hashing inside a container that already has all three for its own entries; a single
|
|
16
|
+
* opaque blob needs none of it, and the archive it holds is the same one `himi push` already
|
|
17
|
+
* builds (tools/himi-cli/src/app-source.ts), collected through the same deny-list and the same
|
|
18
|
+
* secret scan.
|
|
19
|
+
*/
|
|
20
|
+
export declare const HIMI_PACKAGE_SOURCE_PATH = "source.zip";
|
|
21
|
+
/** Conventional file extension. */
|
|
22
|
+
export declare const HIMI_PACKAGE_EXTENSION = ".himi";
|
|
23
|
+
/**
|
|
24
|
+
* What a package is FOR. Only `preview` exists today, and it is load-bearing rather
|
|
25
|
+
* than decorative: a package carries no `/v1/revocations` reach, so the kill-switch
|
|
26
|
+
* cannot retract one once it is on someone's disk. Hosts admit `preview` packages
|
|
27
|
+
* only in dev/preview builds. A future durable kind would need its own trust story.
|
|
28
|
+
*/
|
|
29
|
+
export type HimiPackageKind = "preview";
|
|
30
|
+
/**
|
|
31
|
+
* A snapshot is a reproducible, permanently pinned artifact. A live package boots the
|
|
32
|
+
* same bundled release offline, then may follow the Player's canonical production ring.
|
|
33
|
+
* The origin is never package controlled: `launchMode` grants no network authority.
|
|
34
|
+
*/
|
|
35
|
+
export type HimiPackageLaunchMode = "live" | "snapshot";
|
|
36
|
+
/**
|
|
37
|
+
* Whether the package carries the app's own source — a THIRD axis, independent of the other
|
|
38
|
+
* two, and neither of them in disguise. `kind` is v1's vestigial spelling (`"preview"` only)
|
|
39
|
+
* and `launchMode` is v2's live/snapshot selector; "does this file contain the codebase" is
|
|
40
|
+
* answered by neither.
|
|
41
|
+
*
|
|
42
|
+
* `release` is the default and the only thing every package written before this field can
|
|
43
|
+
* mean, so ABSENT MUST READ AS RELEASE — see `packageContents`. A `dev` package IS the
|
|
44
|
+
* codebase, which makes this a privacy boundary rather than a label: a host decides on the
|
|
45
|
+
* header, before it reads an entry.
|
|
46
|
+
*/
|
|
47
|
+
export type HimiPackageContents = "release" | "dev";
|
|
48
|
+
/**
|
|
49
|
+
* The header — small on purpose. A reader extracts THIS entry alone (a zip central
|
|
50
|
+
* directory makes that cheap) and can refuse an incompatible package before spending
|
|
51
|
+
* anything on the rest of the archive.
|
|
52
|
+
*
|
|
53
|
+
* Everything under "copied from the manifest" is exactly that: a copy, present so the
|
|
54
|
+
* pre-flight needs one entry instead of two. `release-manifest.json` stays
|
|
55
|
+
* authoritative, and `validatePackage` fails a package whose header disagrees with it.
|
|
56
|
+
*/
|
|
57
|
+
export interface HimiPackageHeader {
|
|
58
|
+
format: HimiPackageFormat;
|
|
59
|
+
/** The app id this package IS — the same id the manifest and serve plane use. */
|
|
60
|
+
app: string;
|
|
61
|
+
releaseId: string;
|
|
62
|
+
/** Human label for pickers/tabs. Falls back to `app` when the release has none. */
|
|
63
|
+
displayName?: string;
|
|
64
|
+
/** ISO-8601 stamp of when the package was written. */
|
|
65
|
+
createdAt: string;
|
|
66
|
+
/** Producer identification, e.g. "himi-cli 0.4.1". Diagnostic only. */
|
|
67
|
+
createdBy: string;
|
|
68
|
+
/**
|
|
69
|
+
* `sha256-<base64>` over the archive's entries (see `packageContentHash`). Verified
|
|
70
|
+
* on open; a mismatch means the file was truncated or edited and is refused.
|
|
71
|
+
*/
|
|
72
|
+
contentHash: string;
|
|
73
|
+
/**
|
|
74
|
+
* Every entry this package contains: archive path → sha256 hex of its bytes.
|
|
75
|
+
*
|
|
76
|
+
* The list is EXPLICIT rather than re-derived from the manifest, because a reader that
|
|
77
|
+
* infers it has no way to tell "this optional entry is absent" from "this host answered
|
|
78
|
+
* my request with something else". That is not hypothetical: a static host with an
|
|
79
|
+
* SPA/error-document fallback (Netlify, Vercel, S3 website hosting, a Vite dev server)
|
|
80
|
+
* answers a missing `seed-data.json` with 200 and an index.html body — which the reader
|
|
81
|
+
* then folded into the content hash, and a perfectly good package failed to open.
|
|
82
|
+
*
|
|
83
|
+
* With the list, a directory reader fetches exactly these paths and checks each one's
|
|
84
|
+
* hash, so a substituted body fails its OWN entry with a precise message instead of
|
|
85
|
+
* corrupting the whole-package hash.
|
|
86
|
+
*
|
|
87
|
+
* OPTIONAL for back-compat: a package written before this field is still readable, just
|
|
88
|
+
* without the per-entry check.
|
|
89
|
+
*
|
|
90
|
+
* NOT `entries` — that name is already taken on this header by RFC 0051's per-surface
|
|
91
|
+
* entry map (which screen each surface starts at), copied from the manifest below.
|
|
92
|
+
*/
|
|
93
|
+
files?: Record<string, string>;
|
|
94
|
+
/** v1's spelling for a snapshot. Retained only to read historical packages. */
|
|
95
|
+
kind?: HimiPackageKind;
|
|
96
|
+
/** Required by v2. v1/`kind: preview` packages are interpreted as snapshots. */
|
|
97
|
+
launchMode?: HimiPackageLaunchMode;
|
|
98
|
+
/**
|
|
99
|
+
* `dev` when the package carries `source.zip`. Absent means `release`, which is what every
|
|
100
|
+
* package written before the field is and must keep being.
|
|
101
|
+
*
|
|
102
|
+
* An EXPLICIT field rather than "is `source.zip` in the `files` map", because the point is to
|
|
103
|
+
* refuse from the header alone: `files` tells a reader which entries exist, but reading it as
|
|
104
|
+
* a policy signal means every host has to agree on a path string to make a trust decision,
|
|
105
|
+
* and one that forgets is a host that hands out a codebase. One named field, one answer.
|
|
106
|
+
*/
|
|
107
|
+
contents?: HimiPackageContents;
|
|
108
|
+
minBinaryVersion?: string | null;
|
|
109
|
+
playerRequirements?: {
|
|
110
|
+
capabilities: string[];
|
|
111
|
+
nativeComponents: string[];
|
|
112
|
+
authProviders: string[];
|
|
113
|
+
};
|
|
114
|
+
platforms?: Record<string, boolean>;
|
|
115
|
+
entries?: Record<string, {
|
|
116
|
+
home: string;
|
|
117
|
+
}>;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Does this package carry source? Absent, unknown and legacy all answer `release`.
|
|
121
|
+
*
|
|
122
|
+
* The fallback is the load-bearing half. Every `.himi` in existence predates the field, so a
|
|
123
|
+
* reader that treated "absent" as anything but `release` would reclassify the entire installed
|
|
124
|
+
* base — and an unknown future value must fail CLOSED here (no source admitted) while
|
|
125
|
+
* `validatePackage` is the thing that says the header is malformed.
|
|
126
|
+
*/
|
|
127
|
+
export declare function packageContents(header: Pick<HimiPackageHeader, "contents"> | null | undefined): HimiPackageContents;
|
|
128
|
+
/** Resolve the behavioral mode without making an imported package authoritative. */
|
|
129
|
+
export declare function packageLaunchMode(header: Pick<HimiPackageHeader, "format" | "kind" | "launchMode"> | null | undefined): HimiPackageLaunchMode;
|
|
130
|
+
/**
|
|
131
|
+
* Sanitize the seed configuration before a host sees it. Snapshot packages lose every
|
|
132
|
+
* production switch; live packages request the baked-in production ring but never carry
|
|
133
|
+
* an origin from the file. The Player supplies that origin from its signed build config.
|
|
134
|
+
*/
|
|
135
|
+
export declare function packageAppConfigForLaunch(config: Record<string, unknown>, header: Pick<HimiPackageHeader, "format" | "kind" | "launchMode"> | null | undefined): Record<string, unknown>;
|
|
136
|
+
/**
|
|
137
|
+
* Byte reader over an opened package: a path relative to the archive root → its
|
|
138
|
+
* bytes, or null when absent. One shape for all three sources — an unzipped
|
|
139
|
+
* directory, an in-memory zip, an HTTP base — so validation and route resolution
|
|
140
|
+
* are written once.
|
|
141
|
+
*/
|
|
142
|
+
export type PackageRead = (path: string) => Uint8Array | null;
|
|
143
|
+
/** True when `id` is safe to use as a screen/widget entry name. */
|
|
144
|
+
export declare function isSafePackageSegment(id: string): boolean;
|
|
145
|
+
/**
|
|
146
|
+
* True when `app` is a well-formed app id.
|
|
147
|
+
*
|
|
148
|
+
* Load-bearing, not decorative: a package's app id comes out of a file the user got from
|
|
149
|
+
* somewhere, and every host turns it into a DIRECTORY PATH — one that gets removed
|
|
150
|
+
* recursively before extraction. `join(root, "../../../../Users/x/Documents")` escapes the
|
|
151
|
+
* root, so an unvalidated id is a delete-anything primitive. Same grammar as
|
|
152
|
+
* core/serve-storage/src/contract.ts, which guards the same class of trust boundary.
|
|
153
|
+
*/
|
|
154
|
+
export declare function isSafeAppId(app: unknown): app is string;
|
|
155
|
+
/**
|
|
156
|
+
* Every entry path a package legitimately contains, derived from its manifest.
|
|
157
|
+
*
|
|
158
|
+
* ONE definition, used by the packer (to decide what to write) and by the directory reader
|
|
159
|
+
* (to decide what counts toward the content hash). They diverged once: the reader walked
|
|
160
|
+
* the filesystem instead, so a `.DS_Store` — which Finder creates in any directory you
|
|
161
|
+
* open, including the one you are about to upload — changed the hash and got a perfectly
|
|
162
|
+
* good package refused as tampered.
|
|
163
|
+
*
|
|
164
|
+
* `opts.contents` is the source entry's ONLY licence. Admitting `source.zip` unconditionally
|
|
165
|
+
* would be simpler and wrong in the direction that matters: the entry would become legal in a
|
|
166
|
+
* release package, so a blob planted in one would be hashed rather than refused, and the
|
|
167
|
+
* header — the thing every host makes its trust decision from — would still say `release`.
|
|
168
|
+
*/
|
|
169
|
+
export declare function packableEntryPaths(manifest: PackagedManifest, opts?: {
|
|
170
|
+
contents?: HimiPackageContents;
|
|
171
|
+
}): Set<string>;
|
|
172
|
+
/**
|
|
173
|
+
* The manifest's handler records, normalized to an array.
|
|
174
|
+
*
|
|
175
|
+
* `handlers` is the only ARRAY-typed field in the manifest, and that makes it the only one a
|
|
176
|
+
* tampered package can weaponize. `Object.entries` shrugs at a non-object, but `for…of`, array
|
|
177
|
+
* spread and `.map` all THROW on a truthy non-array — so a hand-edited `"handlers": {}` turned
|
|
178
|
+
* `validatePackage` (whose entire contract is to RETURN a verdict on untrusted input) into a
|
|
179
|
+
* `TypeError`, and did the same to the packer and to the browser's fetch shim. Every reader of
|
|
180
|
+
* the field goes through here, so there is one answer to "what are this manifest's handlers"
|
|
181
|
+
* instead of four opportunities to crash.
|
|
182
|
+
*/
|
|
183
|
+
export declare function handlerRecords(manifest: PackagedManifest): NonNullable<PackagedManifest["handlers"]>;
|
|
184
|
+
/** Single-slot files a package carries when the release produced them. */
|
|
185
|
+
export declare const PACKAGE_SINGLETONS: readonly ["tokens.json", "app-config.json", "icon.png", "seed-data.json"];
|
|
186
|
+
/**
|
|
187
|
+
* How a `/v1` route is answered from a package.
|
|
188
|
+
*
|
|
189
|
+
* - `file` — served straight from an archive entry.
|
|
190
|
+
* - `synthesized` — built from `release-manifest.json` rather than stored (the serve
|
|
191
|
+
* plane computes these too; a package must not bake a second copy that can drift).
|
|
192
|
+
* - `unsupported` — genuinely not in a package. `POST /v1/__webwix/call` is the one
|
|
193
|
+
* that matters: live business data is not packed, so a host answers it with a clear
|
|
194
|
+
* offline error and the screen shows its error arm instead of hanging.
|
|
195
|
+
*/
|
|
196
|
+
export type PackageRouteResolution = {
|
|
197
|
+
kind: "file";
|
|
198
|
+
path: string;
|
|
199
|
+
contentType: string;
|
|
200
|
+
immutable: boolean;
|
|
201
|
+
} | {
|
|
202
|
+
kind: "synthesized";
|
|
203
|
+
doc: "boot" | "release-current" | "widgets" | "action-handlers";
|
|
204
|
+
} | {
|
|
205
|
+
kind: "unsupported";
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* `decodeURIComponent` that answers `null` instead of throwing.
|
|
209
|
+
*
|
|
210
|
+
* Every segment fed to this comes from a request URL — i.e. from outside — and
|
|
211
|
+
* `decodeURIComponent` throws `URIError` on a malformed escape like `%E0%A4%A`. In the
|
|
212
|
+
* browser shim that URIError escapes as a REJECTED fetch promise rather than the structured
|
|
213
|
+
* package response every caller is documented to get, which is the opposite of failing
|
|
214
|
+
* loudly. An undecodable segment cannot name a real entry anyway, so `null` — which every
|
|
215
|
+
* caller here already treats as "no such route" — is both the safe answer and the correct one.
|
|
216
|
+
*/
|
|
217
|
+
export declare function safeDecodeSegment(segment: string): string | null;
|
|
218
|
+
/**
|
|
219
|
+
* Map a `/v1` request path onto a package entry.
|
|
220
|
+
*
|
|
221
|
+
* Takes the PATHNAME only — the query string never selects content here. `?app=` and
|
|
222
|
+
* `?release=` exist on the serve plane to pick *which* app/release out of many; a
|
|
223
|
+
* package holds exactly one of each, so honoring them would only create a way for a
|
|
224
|
+
* URL to disagree with the file. Callers that care (e.g. a host serving several open
|
|
225
|
+
* packages) route to the right package first, then call this.
|
|
226
|
+
*/
|
|
227
|
+
export declare function packagePathFor(pathname: string): PackageRouteResolution;
|
|
228
|
+
/** The manifest fields validation needs. Structurally compatible with
|
|
229
|
+
* `ReleaseManifest` (core/serve-storage/src/store.ts) without importing it — that
|
|
230
|
+
* module pulls in node:crypto, and this one must stay browser-safe. */
|
|
231
|
+
export interface PackagedManifest {
|
|
232
|
+
releaseId?: string;
|
|
233
|
+
app?: string;
|
|
234
|
+
minBinaryVersion?: string | null;
|
|
235
|
+
screens?: Record<string, {
|
|
236
|
+
descriptorHash: string;
|
|
237
|
+
bundle?: string | null;
|
|
238
|
+
}>;
|
|
239
|
+
bundles?: Record<string, {
|
|
240
|
+
sha256: string;
|
|
241
|
+
sri: string;
|
|
242
|
+
bytes: number;
|
|
243
|
+
}>;
|
|
244
|
+
assets?: Record<string, {
|
|
245
|
+
sha256: string;
|
|
246
|
+
sri: string;
|
|
247
|
+
bytes: number;
|
|
248
|
+
contentType: string;
|
|
249
|
+
}>;
|
|
250
|
+
widgets?: Record<string, {
|
|
251
|
+
contentEtag: string;
|
|
252
|
+
ttlSeconds: number;
|
|
253
|
+
family?: string;
|
|
254
|
+
}>;
|
|
255
|
+
/** RFC 0027 served action handlers. Their bundles live in `bundles/` but are named
|
|
256
|
+
* HERE rather than in `manifest.bundles`, so a packer that only walks `bundles`
|
|
257
|
+
* ships an app whose every served handler 404s. */
|
|
258
|
+
handlers?: Array<{
|
|
259
|
+
id: string;
|
|
260
|
+
policy: string;
|
|
261
|
+
bundleHash: string;
|
|
262
|
+
sri: string;
|
|
263
|
+
}>;
|
|
264
|
+
[k: string]: unknown;
|
|
265
|
+
}
|
|
266
|
+
export interface PackageValidationResult {
|
|
267
|
+
ok: boolean;
|
|
268
|
+
errors: string[];
|
|
269
|
+
warnings: string[];
|
|
270
|
+
/** Parsed header, when one was present and well-formed. */
|
|
271
|
+
header: HimiPackageHeader | null;
|
|
272
|
+
/** Parsed manifest, when one was present and well-formed. */
|
|
273
|
+
manifest: PackagedManifest | null;
|
|
274
|
+
}
|
|
275
|
+
export interface ValidatePackageOptions {
|
|
276
|
+
/**
|
|
277
|
+
* Require `himi-package.json`. True for a `.himi` file; FALSE when validating a
|
|
278
|
+
* bare release/seed tree, which predates the header and legitimately has none.
|
|
279
|
+
*/
|
|
280
|
+
requireHeader?: boolean;
|
|
281
|
+
/**
|
|
282
|
+
* Recomputed content hash to compare against the header's. Omitted (the default)
|
|
283
|
+
* skips the comparison — hashing needs bytes the caller may not want to re-read,
|
|
284
|
+
* and the check belongs to whoever opened the archive.
|
|
285
|
+
*/
|
|
286
|
+
contentHash?: string;
|
|
287
|
+
/**
|
|
288
|
+
* Warn when `tokens.json` / `app-config.json` are absent. On by default for a
|
|
289
|
+
* package, where they are how the host gets a theme and a navigation baseline.
|
|
290
|
+
* Off for a bare seed tree: RFC 0014 bakes tokens through the app's own
|
|
291
|
+
* `scripts/gen.sh` instead, so their absence there is normal, not a smell.
|
|
292
|
+
*/
|
|
293
|
+
warnMissingDocs?: boolean;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Assert a package (or a bare release/seed tree) is internally consistent: the header
|
|
297
|
+
* agrees with the manifest, and every screen/bundle/asset/widget the manifest names
|
|
298
|
+
* is actually present.
|
|
299
|
+
*
|
|
300
|
+
* This is the single implementation behind `himi validate --package`, the runtime
|
|
301
|
+
* open path on every surface, and `tools/release-build/validate-seed.ts`. Sharing it
|
|
302
|
+
* is the point: a tree that a packer produces and a tree that a native binary bakes
|
|
303
|
+
* must be judged by identical rules, or "it validated" means nothing.
|
|
304
|
+
*/
|
|
305
|
+
export declare function validatePackage(read: PackageRead, opts?: ValidatePackageOptions): PackageValidationResult;
|
|
306
|
+
export interface BuildHeaderInput {
|
|
307
|
+
manifest: PackagedManifest;
|
|
308
|
+
app: string;
|
|
309
|
+
createdAt: string;
|
|
310
|
+
createdBy: string;
|
|
311
|
+
contentHash: string;
|
|
312
|
+
/** archive path → sha256 hex, for `HimiPackageHeader.files`. */
|
|
313
|
+
files?: Record<string, string>;
|
|
314
|
+
displayName?: string;
|
|
315
|
+
/** Defaults to `live`; snapshots must be selected explicitly by the producer. */
|
|
316
|
+
launchMode?: HimiPackageLaunchMode;
|
|
317
|
+
/** `dev` only when the caller is actually packing `source.zip`. Omitted ⇒ a release package. */
|
|
318
|
+
contents?: HimiPackageContents;
|
|
319
|
+
}
|
|
320
|
+
/** Build a header from a release manifest, copying only the pre-flight fields. */
|
|
321
|
+
export declare function buildPackageHeader(input: BuildHeaderInput): HimiPackageHeader;
|
|
322
|
+
/** Suggested file name for a package: `<app>-<short releaseId>.himi`. */
|
|
323
|
+
export declare function packageFileName(app: string, releaseId: string): string;
|
|
324
|
+
/**
|
|
325
|
+
* Suggested DIRECTORY name for the unpacked form: the file name without the extension.
|
|
326
|
+
*
|
|
327
|
+
* The `--format dir` writer replaces its destination recursively, so it needs a name to put
|
|
328
|
+
* the package UNDER when the caller hands it a directory that already holds something else —
|
|
329
|
+
* exactly as `packageFileName` gives the archive writer one.
|
|
330
|
+
*/
|
|
331
|
+
export declare function packageDirName(app: string, releaseId: string): string;
|
|
332
|
+
/**
|
|
333
|
+
* The canonical input to the package content hash: every entry's path and bytes,
|
|
334
|
+
* order-independent. Callers hash the returned string with their platform's sha256
|
|
335
|
+
* (this module stays crypto-free so it can run anywhere).
|
|
336
|
+
*
|
|
337
|
+
* Entry BYTES are represented by their own hash rather than inlined, so the caller
|
|
338
|
+
* hashes a small string instead of the whole archive twice; `hashEntry` is whatever
|
|
339
|
+
* sha256-hex function the caller already has.
|
|
340
|
+
*/
|
|
341
|
+
export declare function packageHashInput(entries: Array<{
|
|
342
|
+
path: string;
|
|
343
|
+
hash: string;
|
|
344
|
+
}>): string;
|
|
345
|
+
/** Why a host refused to open a package. */
|
|
346
|
+
export type PackageRejection = {
|
|
347
|
+
reason: "format";
|
|
348
|
+
detail: string;
|
|
349
|
+
} | {
|
|
350
|
+
reason: "binary_too_old";
|
|
351
|
+
required: string;
|
|
352
|
+
have: string;
|
|
353
|
+
} | {
|
|
354
|
+
reason: "missing_capabilities";
|
|
355
|
+
missing: string[];
|
|
356
|
+
} | {
|
|
357
|
+
reason: "missing_components";
|
|
358
|
+
missing: string[];
|
|
359
|
+
} | {
|
|
360
|
+
reason: "missing_auth_providers";
|
|
361
|
+
missing: string[];
|
|
362
|
+
} | {
|
|
363
|
+
reason: "source_not_accepted";
|
|
364
|
+
detail: string;
|
|
365
|
+
};
|
|
366
|
+
export interface HostCapabilityProfile {
|
|
367
|
+
/** Runtime/binary version this host reports, e.g. "1.4.0". */
|
|
368
|
+
binaryVersion: string;
|
|
369
|
+
capabilities: readonly string[];
|
|
370
|
+
nativeComponents: readonly string[];
|
|
371
|
+
authProviders: readonly string[];
|
|
372
|
+
/**
|
|
373
|
+
* Whether this host will open a package that CONTAINS THE CODEBASE.
|
|
374
|
+
*
|
|
375
|
+
* DEFAULT-DENY, and optional precisely so that it is: every host that exists today omits it
|
|
376
|
+
* and therefore refuses, which is the safe direction for a field whose other setting hands a
|
|
377
|
+
* visitor source code. A host opts in by saying so — `himi import` does, the web host's
|
|
378
|
+
* `?pkg=` door deliberately does not.
|
|
379
|
+
*/
|
|
380
|
+
acceptsSource?: boolean;
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Pre-flight a package against a host, from the header alone — no unpacking.
|
|
384
|
+
*
|
|
385
|
+
* Returns every reason it would fail rather than the first, because a user who has
|
|
386
|
+
* to update their Player wants to know that once, not four times in a row.
|
|
387
|
+
*/
|
|
388
|
+
export declare function assessPackage(header: HimiPackageHeader, host: HostCapabilityProfile): PackageRejection[];
|
|
389
|
+
/** CRC-32 (the ZIP variant) over `bytes`. */
|
|
390
|
+
export declare function zipCrc32(bytes: Uint8Array): number;
|
|
391
|
+
/**
|
|
392
|
+
* Reject an entry name that would escape the extraction root ("zip slip").
|
|
393
|
+
*
|
|
394
|
+
* Enforced on BOTH sides: a package we write can never contain such a name, and a
|
|
395
|
+
* package we read is never assumed to have been written by us. A `.himi` arrives from
|
|
396
|
+
* wherever the user got it, which is the whole point of the format and also the whole
|
|
397
|
+
* reason this check is not optional.
|
|
398
|
+
*/
|
|
399
|
+
export declare function isSafeEntryName(name: string): boolean;
|
|
400
|
+
/** One entry located in a ZIP archive, before its bytes are decompressed. */
|
|
401
|
+
export interface ZipEntryRef {
|
|
402
|
+
name: string;
|
|
403
|
+
/** 0 = stored, 8 = deflate. Readers must support both. */
|
|
404
|
+
method: number;
|
|
405
|
+
crc: number;
|
|
406
|
+
/** Offset + length of the raw (possibly compressed) payload within the archive. */
|
|
407
|
+
dataStart: number;
|
|
408
|
+
compSize: number;
|
|
409
|
+
/** Decompressed length, per the directory. */
|
|
410
|
+
rawSize: number;
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Limits enforced before extraction by package receivers. They deliberately live in
|
|
414
|
+
* the format module so Files/AirDrop imports, the CLI and browser preview cannot drift.
|
|
415
|
+
* They are conservative mobile-safe defaults, not an archive-format limit.
|
|
416
|
+
*/
|
|
417
|
+
export declare const DEFAULT_HIMI_PACKAGE_ARCHIVE_LIMITS: {
|
|
418
|
+
readonly maxCompressedBytes: number;
|
|
419
|
+
readonly maxExpandedBytes: number;
|
|
420
|
+
readonly maxEntries: 10000;
|
|
421
|
+
readonly maxDecompressionRatio: 1000;
|
|
422
|
+
};
|
|
423
|
+
export type HimiPackageArchiveLimits = typeof DEFAULT_HIMI_PACKAGE_ARCHIVE_LIMITS;
|
|
424
|
+
/** Reject zip bombs before allocating decompressed entry buffers. */
|
|
425
|
+
export declare function assertPackageArchiveBudget(compressedBytes: number, entries: readonly Pick<ZipEntryRef, "name" | "compSize" | "rawSize">[], limits?: HimiPackageArchiveLimits): void;
|
|
426
|
+
/**
|
|
427
|
+
* Locate every entry in a ZIP archive by walking its central directory.
|
|
428
|
+
*
|
|
429
|
+
* Returns positions only — decompression is the caller's, because that is the one part
|
|
430
|
+
* that differs per host. Throws on a malformed archive or an unsafe entry name.
|
|
431
|
+
*/
|
|
432
|
+
export declare function parseZipEntries(buf: Uint8Array): ZipEntryRef[];
|
|
433
|
+
/** Assert decompressed bytes match what the directory promised. */
|
|
434
|
+
export declare function verifyZipEntry(entry: ZipEntryRef, bytes: Uint8Array): void;
|
|
435
|
+
/**
|
|
436
|
+
* The app-config keys that point an app at a production serve plane (RFC 0012).
|
|
437
|
+
* A published app carries these; they are how it reaches production.
|
|
438
|
+
*/
|
|
439
|
+
export declare const PROD_SERVE_KEYS: readonly ["useProdServe", "prodServeBaseUrl", "prodControlBaseUrl"];
|
|
440
|
+
/**
|
|
441
|
+
* Strip the production-serve pointers out of an app-config before a host reads it.
|
|
442
|
+
*
|
|
443
|
+
* AN ORIGIN IN THE FILE IS NEVER TRUSTED — that is the intent, and here it holds for every
|
|
444
|
+
* launch mode. Left in place, these keys make the host resolve a release from, and fetch
|
|
445
|
+
* screens from, a plane the *package* named, so the artifact you handed someone would
|
|
446
|
+
* quietly render whatever that origin is serving today instead of the content in the file.
|
|
447
|
+
* It is silent when it happens.
|
|
448
|
+
*
|
|
449
|
+
* This is the ONLY implementation, and it covers the TS hosts: `himi run` (which serves a
|
|
450
|
+
* package over HTTP) and the browser's in-page package transport both reach it, because a
|
|
451
|
+
* rule enforced in one of two places is a rule that holds until someone opens the other
|
|
452
|
+
* door.
|
|
453
|
+
*
|
|
454
|
+
* IT DOES NOT COVER THE NATIVE HOSTS. Himi Player seeds the archive's app-config bytes
|
|
455
|
+
* verbatim into NavigationConfigStore and never calls this or `packageAppConfigForLaunch`;
|
|
456
|
+
* a packaged origin is inert there only because the Player's boot does not apply
|
|
457
|
+
* `ProdServeConfig` at all. Do not read this function as a platform-wide invariant — if you
|
|
458
|
+
* wire config application into a native package path, strip there too.
|
|
459
|
+
*
|
|
460
|
+
* NOT the whole policy, though — `packageAppConfigForLaunch` is, and hosts should call that
|
|
461
|
+
* instead of this. A live package (the `himi pack` default) has `useProdServe` set back on
|
|
462
|
+
* afterwards with NO origin, so it may follow the *host's* own canonical ring, which is the
|
|
463
|
+
* baked-seed-then-`release/resolve` shape RFC 0014 already gives a native binary. A
|
|
464
|
+
* snapshot (`himi pack --snapshot`) keeps none of the three and renders the bundled release
|
|
465
|
+
* forever. See docs/himi-packages.md.
|
|
466
|
+
*/
|
|
467
|
+
export declare function withoutProdServe(config: Record<string, unknown>): Record<string, unknown>;
|
|
468
|
+
/**
|
|
469
|
+
* Does this URL path address the serve `/v1` API?
|
|
470
|
+
*
|
|
471
|
+
* NOT `startsWith("/v1/")`. A serve plane is routinely mounted behind a gateway path
|
|
472
|
+
* prefix (`https://www.wix.com/_api/himalaya-serve/v1/screen/x`), and an app-config can
|
|
473
|
+
* point at exactly that. A prefix-only check misses those, which means a package that was
|
|
474
|
+
* supposed to be airtight quietly reaches the network instead — verified, not theorised.
|
|
475
|
+
*
|
|
476
|
+
* Returns the `/v1/…` suffix to route on, or null when the path is not a serve API call.
|
|
477
|
+
*/
|
|
478
|
+
export declare function serveApiPath(pathname: string): string | null;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/** The id lists a host serves, and an app requires. */
|
|
2
|
+
export interface HostClaims {
|
|
3
|
+
capabilities: string[];
|
|
4
|
+
nativeComponents: string[];
|
|
5
|
+
authProviders: string[];
|
|
6
|
+
}
|
|
7
|
+
export type HostClaimKind = keyof HostClaims;
|
|
8
|
+
export declare const HOST_CLAIM_KINDS: readonly HostClaimKind[];
|
|
9
|
+
/** A host's manifest, generated from its compiled iOS, Android and web registries. */
|
|
10
|
+
export interface HostManifest extends HostClaims {
|
|
11
|
+
/** The runtime version the host's binaries carry (HimalayaBinaryVersion). */
|
|
12
|
+
version: string;
|
|
13
|
+
/** Per shell, the claims of any kind that shell does not serve (an opt-in backend it does not link, or
|
|
14
|
+
* a claim whose shell wiring it lacks). */
|
|
15
|
+
unlinked: Record<string, string[]>;
|
|
16
|
+
/** Plain descriptor actionIds the host's native boots register on both iOS and Android. */
|
|
17
|
+
nativeActions: string[];
|
|
18
|
+
}
|
|
19
|
+
/** What an app needs from the host that runs it. */
|
|
20
|
+
export interface AppRequirements extends HostClaims {
|
|
21
|
+
/** The lowest host runtime version the app runs on. */
|
|
22
|
+
minBinaryVersion?: string;
|
|
23
|
+
/** The app takes its Wix identity from the host instead of signing in itself (#4088 `hostProvided`). */
|
|
24
|
+
hostProvidedIdentity?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface HostCheckOptions {
|
|
27
|
+
/** The shell the app would open on ("ios" | "android" | "macos" | "web"). Absent: judged as a phone. */
|
|
28
|
+
shell?: string;
|
|
29
|
+
/** The host's name in reasons ("Player", "Spaces"). */
|
|
30
|
+
hostName?: string;
|
|
31
|
+
/** The host runs every app under its own identity (Spaces): an app must accept it. */
|
|
32
|
+
requiresHostIdentity?: boolean;
|
|
33
|
+
/** The host's running version, when it differs from the manifest's (an older installed binary). */
|
|
34
|
+
installedVersion?: string;
|
|
35
|
+
}
|
|
36
|
+
export type HostCompatibility = {
|
|
37
|
+
ok: true;
|
|
38
|
+
} | {
|
|
39
|
+
ok: false;
|
|
40
|
+
reason: string;
|
|
41
|
+
reasons: string[];
|
|
42
|
+
};
|
|
43
|
+
/** Compares the numeric release parts the way the native runtimes do (compareHimalayaSemver,
|
|
44
|
+
* HimiPackage.compareVersions): a `-` suffix is ignored and a part that is not a number counts 0. */
|
|
45
|
+
export declare function compareVersion(a: string, b: string): number;
|
|
46
|
+
/** The claims [shell] serves: what the host registers, minus what that shell does not link or wire. A
|
|
47
|
+
* shell the manifest does not know (or none) is judged as a phone: it gets what both phone shells
|
|
48
|
+
* serve, so an app either phone would open broken is never accepted, and never macOS's own gaps. */
|
|
49
|
+
export declare function claimsFor(host: HostManifest, shell?: string): HostClaims;
|
|
50
|
+
/** Per kind, the ids [requirements] needs that [offered] does not serve, de-duplicated, in order. */
|
|
51
|
+
export declare function missingClaims(requirements: HostClaims, offered: HostClaims): Record<HostClaimKind, string[]>;
|
|
52
|
+
/** The reasons, in the Player's wording, for what [missing] names. */
|
|
53
|
+
export declare function missingReasons(missing: Record<HostClaimKind, string[]>, hostName?: string): string[];
|
|
54
|
+
/** Whether an app with [requirements] opens on [host]. Every failing rule is a reason; `reason` joins
|
|
55
|
+
* them, for a log line or a CLI. */
|
|
56
|
+
export declare function checkHostCompatibility(requirements: AppRequirements, host: HostManifest, options?: HostCheckOptions): HostCompatibility;
|
|
@@ -28,7 +28,7 @@ export declare const ICON_CATALOG: Readonly<Record<string, IconCatalogEntry>>;
|
|
|
28
28
|
/** normalized (lowercased, separators stripped) → canonical key, aliases included. */
|
|
29
29
|
export declare const ICON_NORMALIZED_INDEX: Readonly<Record<string, string>>;
|
|
30
30
|
/** Every authorable name, aliases included. `_unknown` is deliberately absent. */
|
|
31
|
-
export declare const ICON_NAMES: readonly ["ai", "arrow_down", "arrow_left", "arrow_right", "arrow_up", "back", "bag", "bag_fill", "barcode", "bell", "bell_fill", "bell_off", "bell_slash", "book", "bookmark", "bookmark_fill", "boxes", "branch", "calendar", "camera", "cart", "cart_fill", "chart", "chat", "check", "checklist", "checkmark", "chevron_down", "chevron_left", "chevron_right", "chevron_up", "circle", "circle_fill", "clock", "close", "concealed", "cookie", "copy", "dashboard", "doc", "document", "download", "edit", "ellipsis", "error", "expand", "external_link", "eye", "eye_slash", "filter", "folder", "forward", "fullscreen", "gear", "gift", "globe", "grid", "grid_fill", "grip", "heart", "heart_fill", "help", "home", "home_fill", "house", "image", "inbox", "info", "layers", "link", "list", "location", "lock", "logout", "mail", "map", "menu", "message", "mic", "mic_fill", "microphone", "microphone_fill", "minus", "moon", "more", "more_vertical", "music", "newspaper", "newspaper_fill", "next", "paper_plane", "pause", "pencil", "people", "person", "person_fill", "phone", "photo", "pin", "play", "play_circle", "play_circle_fill", "plus", "plus_circle", "plus_circle_fill", "prev", "question", "redo", "refresh", "repeat", "rss", "search", "send", "send_arrow", "settings", "settings_fill", "share", "shuffle", "skip_back", "skip_forward", "skip_next", "skip_previous", "star", "star_fill", "stop", "success", "tag", "ticket", "ticket_fill", "trash", "tray", "undo", "user", "visible", "volume", "warning", "wifi", "xmark"];
|
|
31
|
+
export declare const ICON_NAMES: readonly ["ai", "arrow_down", "arrow_left", "arrow_right", "arrow_up", "back", "bag", "bag_fill", "barcode", "bell", "bell_fill", "bell_off", "bell_slash", "book", "bookmark", "bookmark_fill", "boxes", "branch", "calendar", "camera", "cart", "cart_fill", "chart", "chat", "check", "checklist", "checkmark", "chevron_down", "chevron_left", "chevron_right", "chevron_up", "circle", "circle_fill", "clock", "close", "concealed", "cookie", "copy", "dashboard", "doc", "document", "download", "edit", "ellipsis", "error", "expand", "external_link", "eye", "eye_slash", "filter", "folder", "forward", "fullscreen", "gear", "gift", "globe", "grid", "grid_fill", "grip", "heart", "heart_fill", "help", "home", "home_fill", "house", "image", "inbox", "info", "layers", "link", "list", "location", "lock", "logout", "mail", "map", "menu", "message", "mic", "mic_fill", "microphone", "microphone_fill", "minus", "moon", "more", "more_vertical", "music", "newspaper", "newspaper_fill", "next", "paper_plane", "pause", "pencil", "people", "person", "person_fill", "phone", "photo", "pin", "play", "play_circle", "play_circle_fill", "plus", "plus_circle", "plus_circle_fill", "prev", "question", "redo", "refresh", "repeat", "rss", "search", "send", "send_arrow", "settings", "settings_fill", "share", "shuffle", "skip_back", "skip_forward", "skip_next", "skip_previous", "star", "star_fill", "stop", "success", "tag", "ticket", "ticket_fill", "trash", "tray", "undo", "user", "visible", "volume", "warning", "whatsapp", "wifi", "xmark"];
|
|
32
32
|
export type IconName = (typeof ICON_NAMES)[number];
|
|
33
33
|
/** Resolve any authored string to a row, falling back to `_unknown`. Never returns undefined. */
|
|
34
34
|
export declare function resolveIcon(name: string): IconCatalogEntry;
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts
CHANGED
|
@@ -3852,6 +3852,10 @@ export interface ScreenDescriptor {
|
|
|
3852
3852
|
/** "" / "visible" (default) | "hidden": hide the bottom tab bar while this screen is the
|
|
3853
3853
|
* visible top of its tab's stack (RFC 0066). Static; no effect in a presentation. */
|
|
3854
3854
|
tabBarVisibility?: string;
|
|
3855
|
+
/** "" / "pinned" (default) | "floating": how the host draws `stickyFooter`. Floating draws it
|
|
3856
|
+
* over the bottom of the scroll with no band behind it (a Fab, a snackbar) and insets the
|
|
3857
|
+
* content by its height. Static; an unknown value is "pinned". */
|
|
3858
|
+
stickyFooterPlacement?: string;
|
|
3855
3859
|
etag?: string;
|
|
3856
3860
|
cacheControl?: CacheControl;
|
|
3857
3861
|
telemetryScreenName?: string;
|