@wix/himalaya-cli 0.1405.0 → 0.1407.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/app-config.d.ts +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-module.d.ts +3 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/wix-cache-policy.d.ts +64 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/wix-platform/src/index.d.ts +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/wix-platform/src/offline.d.ts +66 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +10 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +82 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts +350 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +82 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +83 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-platform.mjs +58 -25
- package/dist/cli.mjs +450 -66
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/sdk-reference.json +32 -2
- package/guides/wix-api-usage.md +49 -0
- package/package.json +2 -2
|
Binary file
|
|
@@ -1053,7 +1053,7 @@
|
|
|
1053
1053
|
"name": "NavigationConfig",
|
|
1054
1054
|
"kind": "interface",
|
|
1055
1055
|
"jsdoc": "/** Per-app navigation/deep-link config, served OTA at GET /v1/app-config/:appName. */",
|
|
1056
|
-
"decl": "export interface NavigationConfig {\n /** Tab-bar structure (which tabs; their icons/labels/badges). */\n tabBar?: TabBarConfig;\n /** Slide-in drawer / hamburger-menu destinations. */\n drawer?: DrawerConfig;\n /** Navigation chrome the shell draws.\n * Omitted ⇒ \"bottomTabs\". The shell (not the descriptor) reads this. */\n navKind?: NavKind;\n /** Destinations for \"sidebar\" mode.\n * Absent ⇒ the shell derives the rail from `tabBar.items`. */\n sidebar?: SidebarConfig;\n /** App-level default top bar; a per-screen\n * `ScreenDescriptor.topBar` fully replaces it (override, not merge). */\n topBarDefault?: TopBarConfig;\n /** The post-OS-splash brand surface (see `SplashConfig`). Absent / not enabled\n * ⇒ today's behavior. Operational per (live-flippable). */\n splash?: SplashConfig;\n /** App-level default locale. Operational per so a Hebrew (or Spanish)\n * branded app can pin RTL/l10n OTA without a launch flag. `default` is a\n * BCP-47 primary subtag; clients coerce unknown tags rather than failing the\n * envelope. `pin: true` skips the device/browser language; in-app `locale.set`\n * still wins. Absent ⇒ today's device-then-en behavior. */\n locale?: LocaleConfig;\n /** Effective orientations, resolved INSIDE\n * the binary's build-time envelope (config.ts `orientationEnvelope`). The\n * envelope is the ceiling and can never be OTA (iOS reads the plist before\n * any app code runs); this narrows within it. Always intersected with the\n * envelope — it can never widen it. Absent/empty ⇒ the envelope itself. */\n orientation?: OrientationConfig;\n /** Per-surface nav projection, keyed by catalog\n * surface id (`phone` | `tablet` | `desktop` | `mac` | `watch` | `wear` | `rn`).\n * Keyed the way `orientation` is keyed by device family and narrowed the same\n * way: a key outside the app's `platforms.json` envelope is DROPPED, never\n * honored (see `resolveSurfaceNav`). Absent key ⇒ that surface uses the default\n * projection, so an app that never thinks about surfaces is unaffected. */\n surfaces?: Record<string, SurfaceNavConfig>;\n /** The APP-LEVEL nav worker\n * that feeds every `*Path` binding on `NavTabItem` / `DrawerItem` /\n * `TopBarAction`. App-level, not a screen's worker, because chrome outlives\n * every screen: a cart badge must survive leaving the cart, and a flag-hidden\n * tab must stay hidden three pushes deep in another stack. Absent ⇒ paths stay\n * unresolved and the literals render — the worker enriches, it never gates. */\n navLogicBundle?: LogicBundleRef;\n /** Which nav badges ALSO drive the OS app-icon\n * badge. Each entry is `\"<kind>:<id>\"` (`tab` | `drawer` | `topBarAction`, the\n * spelling `navKey` uses); the icon shows the SUM of those slots' resolved counts.\n * Empty/absent ⇒ no mirroring. An entry naming a slot this build does not have is\n * ignored, never a blanked badge. Requires the `push` capability — `defineApp`\n * rejects the combination, because the badge would be set and never shown. */\n appIconBadgeSources?: string[];\n /** Signed release allowlist for contained browser Tier-5 `_stream` requests. */\n streamPolicy?: StreamPolicy;\n /** A site shell's URL space. A push tap, app link or\n * custom-scheme link whose URL is an https page on one of `site.origins` opens the\n * screen owning its path, and that screen's WebView loads the full URL. Absent ⇒\n * links resolve as before. Build it with `siteNavConfig()` from\n * `@himalaya/core/site-shell`; resolution is `resolveSiteLink()`. */\n site?: SiteNavConfig;\n scheme: string;\n deepLinkPatterns: DeepLinkPattern[];\n linkableScreens: LinkableScreen[];\n}"
|
|
1056
|
+
"decl": "export interface NavigationConfig {\n /** Tab-bar structure (which tabs; their icons/labels/badges). */\n tabBar?: TabBarConfig;\n /** Slide-in drawer / hamburger-menu destinations. */\n drawer?: DrawerConfig;\n /** Navigation chrome the shell draws.\n * Omitted ⇒ \"bottomTabs\". The shell (not the descriptor) reads this. */\n navKind?: NavKind;\n /** Destinations for \"sidebar\" mode.\n * Absent ⇒ the shell derives the rail from `tabBar.items`. */\n sidebar?: SidebarConfig;\n /** App-level default top bar; a per-screen\n * `ScreenDescriptor.topBar` fully replaces it (override, not merge). */\n topBarDefault?: TopBarConfig;\n /** The post-OS-splash brand surface (see `SplashConfig`). Absent / not enabled\n * ⇒ today's behavior. Operational per (live-flippable). */\n splash?: SplashConfig;\n /** App-level default locale. Operational per so a Hebrew (or Spanish)\n * branded app can pin RTL/l10n OTA without a launch flag. `default` is a\n * BCP-47 primary subtag; clients coerce unknown tags rather than failing the\n * envelope. `pin: true` skips the device/browser language; in-app `locale.set`\n * still wins. Absent ⇒ today's device-then-en behavior. */\n locale?: LocaleConfig;\n /** Effective orientations, resolved INSIDE\n * the binary's build-time envelope (config.ts `orientationEnvelope`). The\n * envelope is the ceiling and can never be OTA (iOS reads the plist before\n * any app code runs); this narrows within it. Always intersected with the\n * envelope — it can never widen it. Absent/empty ⇒ the envelope itself. */\n orientation?: OrientationConfig;\n /** Per-surface nav projection, keyed by catalog\n * surface id (`phone` | `tablet` | `desktop` | `mac` | `watch` | `wear` | `rn`).\n * Keyed the way `orientation` is keyed by device family and narrowed the same\n * way: a key outside the app's `platforms.json` envelope is DROPPED, never\n * honored (see `resolveSurfaceNav`). Absent key ⇒ that surface uses the default\n * projection, so an app that never thinks about surfaces is unaffected. */\n surfaces?: Record<string, SurfaceNavConfig>;\n /** The APP-LEVEL nav worker\n * that feeds every `*Path` binding on `NavTabItem` / `DrawerItem` /\n * `TopBarAction`. App-level, not a screen's worker, because chrome outlives\n * every screen: a cart badge must survive leaving the cart, and a flag-hidden\n * tab must stay hidden three pushes deep in another stack. Absent ⇒ paths stay\n * unresolved and the literals render — the worker enriches, it never gates. */\n navLogicBundle?: LogicBundleRef;\n /** Which nav badges ALSO drive the OS app-icon\n * badge. Each entry is `\"<kind>:<id>\"` (`tab` | `drawer` | `topBarAction`, the\n * spelling `navKey` uses); the icon shows the SUM of those slots' resolved counts.\n * Empty/absent ⇒ no mirroring. An entry naming a slot this build does not have is\n * ignored, never a blanked badge. Requires the `push` capability — `defineApp`\n * rejects the combination, because the badge would be set and never shown. */\n appIconBadgeSources?: string[];\n /** Signed release allowlist for contained browser Tier-5 `_stream` requests. */\n streamPolicy?: StreamPolicy;\n /** A site shell's URL space. A push tap, app link or\n * custom-scheme link whose URL is an https page on one of `site.origins` opens the\n * screen owning its path, and that screen's WebView loads the full URL. Absent ⇒\n * links resolve as before. Build it with `siteNavConfig()` from\n * `@himalaya/core/site-shell`; resolution is `resolveSiteLink()`. */\n site?: SiteNavConfig;\n /** amendment \"top-bar gap items\" — app-wide logo for tab-stack roots. */\n topBarLogo?: TopBarLogo;\n scheme: string;\n deepLinkPatterns: DeepLinkPattern[];\n linkableScreens: LinkableScreen[];\n}"
|
|
1057
1057
|
},
|
|
1058
1058
|
{
|
|
1059
1059
|
"name": "NavKind",
|
|
@@ -1095,7 +1095,7 @@
|
|
|
1095
1095
|
"name": "TopBarConfig",
|
|
1096
1096
|
"kind": "interface",
|
|
1097
1097
|
"jsdoc": "/** The shell-owned top bar. The shell paints\n * `ScreenDescriptor.title` and computes the leading slot (back XOR menu) from\n * nav depth; this adds the trailing action cluster + leading/style overrides.\n * Lives on `ScreenDescriptor.topBar` (authoritative) and\n * `NavigationConfig.topBarDefault` (app-level fallback, fully replaced). */",
|
|
1098
|
-
"decl": "export interface TopBarConfig {\n /** Trailing (right-edge) actions, authored order = leading→trailing. */\n actions?: TopBarAction[];\n /** Leading override: \"\" | \"auto\" (shell-computed) | \"back\" | \"menu\" | \"none\". */\n leading?: string;\n /** Content-under-bar: \"\" | \"opaque\" (default) | \"transparent\" | \"immersive\". */\n style?: string;\n}"
|
|
1098
|
+
"decl": "export interface TopBarConfig {\n /** Trailing (right-edge) actions, authored order = leading→trailing. */\n actions?: TopBarAction[];\n /** Leading override: \"\" | \"auto\" (shell-computed) | \"back\" | \"menu\" | \"none\". */\n leading?: string;\n /** Content-under-bar: \"\" | \"opaque\" (default) | \"transparent\" | \"immersive\". */\n style?: string;\n /** Toolbar items (drawn after the legacy `actions`). */\n items?: ToolbarItem[];\n /** \"\" / \"automatic\" (default) | \"large\" | \"inline\". */\n titleDisplay?: string;\n /** The literal subtitle (the fallback for `subtitlePath`). */\n subtitle?: string;\n /** \"\" / \"visible\" (default) | \"hidden\". */\n visibility?: string;\n /** Bar fill token. iOS 26 keeps the system glass (amendment R12). */\n background?: TokenRef;\n // Field 9 (`searchable`) belongs to the \"Native top-bar search\" implementation.\n /** amendment — the screen's logo; overrides `NavigationConfig.topBarLogo`. */\n logo?: TopBarLogo;\n /** amendment — the title as a menu. */\n titleMenu?: TopBarTitleMenu;\n /** amendment — live subtitle (`$service:`); `subtitle` is the fallback. */\n subtitlePath?: string;\n /** amendment — \"\" / \"pinned\" (default) | \"hide_on_scroll\". */\n scrollBehavior?: string;\n /** amendment — truthy ⇒ leaving the presentation asks to discard. Unset/unresolved ⇒ false. */\n dirtyPath?: string;\n}"
|
|
1099
1099
|
},
|
|
1100
1100
|
{
|
|
1101
1101
|
"name": "SplashConfig",
|
|
@@ -1151,6 +1151,30 @@
|
|
|
1151
1151
|
"jsdoc": "/** One entry of {@link SiteNavConfig.routes}. */",
|
|
1152
1152
|
"decl": "export interface SiteRoute {\n /** Site-relative path prefix: `\"/\"`, `\"/shop\"`, `\"/blog\"`. */\n path: string;\n /** The screen whose WebView loads the URL. */\n screenId: string;\n}"
|
|
1153
1153
|
},
|
|
1154
|
+
{
|
|
1155
|
+
"name": "TopBarLogo",
|
|
1156
|
+
"kind": "interface",
|
|
1157
|
+
"jsdoc": "/** amendment — the bar logo, per screen (`TopBarConfig.logo`) or app-wide\n * (`NavigationConfig.topBarLogo`). `imageUrlPath` resolves by the parent's context: the\n * screen host per screen, the nav worker app-wide. */",
|
|
1158
|
+
"decl": "export interface TopBarLogo {\n imageUrl?: string;\n imageUrlDark?: string;\n /** Baked asset name; wins over `imageUrl`. */\n imageAsset?: string;\n /** Optional business name beside a mark-only logo. */\n name?: string;\n /** \"\" / \"title\" (default) | \"leading\" | \"none\". */\n placement?: string;\n imageUrlPath?: string;\n /** Default: the app's display name. */\n accessibilityLabel?: string;\n}"
|
|
1159
|
+
},
|
|
1160
|
+
{
|
|
1161
|
+
"name": "ToolbarItem",
|
|
1162
|
+
"kind": "interface",
|
|
1163
|
+
"jsdoc": "/** One top-bar item. Test id `toolbar.<id>`\n * (`toolbar-<id>` on web and React Native). Every tap carries an existing `Action`\n *. Bindings are `$service:` sentinels resolved by the screen host. */",
|
|
1164
|
+
"decl": "export interface ToolbarItem {\n id: string;\n /** \"leading\" | \"trailing\" (default) | \"principal\" | \"bottom\" | \"keyboard\" | \"overflow\". */\n placement?: string;\n /** Text button when there is no icon; the accessible name always. */\n label?: string;\n icon?: IconRef;\n onTap?: Action;\n /** \"\" | \"cancel\" | \"confirm\" | \"destructive\". */\n role?: string;\n disabled?: boolean;\n /** OR'd with `disabled`. For Save, bind \"nothing to save\" (e.g. `cannotSave`), never the dirty flag. */\n disabledPath?: string;\n /** Non-empty ⇒ the item opens a menu. */\n menu?: MenuItem[];\n /** \"principal\" only: a custom title view. */\n content?: Component;\n /** Truthy ⇒ a progress indicator replaces the item. Unset/unresolved ⇒ false. */\n loadingPath?: string;\n /** Set ⇒ the item draws an avatar; `label` stays the accessible name (\"Profile\" by default). */\n avatar?: ToolbarAvatar;\n /** Live label; `label` is the fallback. */\n labelPath?: string;\n}"
|
|
1165
|
+
},
|
|
1166
|
+
{
|
|
1167
|
+
"name": "ToolbarAvatar",
|
|
1168
|
+
"kind": "interface",
|
|
1169
|
+
"jsdoc": "/** amendment — an avatar item. Images are absolute https URLs (resolve a Wix\n * media id with `wixMediaUrl` before publishing). */",
|
|
1170
|
+
"decl": "export interface ToolbarAvatar {\n imageUrl?: string;\n initials?: string;\n imageUrlPath?: string;\n initialsPath?: string;\n}"
|
|
1171
|
+
},
|
|
1172
|
+
{
|
|
1173
|
+
"name": "TopBarTitleMenu",
|
|
1174
|
+
"kind": "interface",
|
|
1175
|
+
"jsdoc": "/** amendment — the title as a menu (switch location or feed). */",
|
|
1176
|
+
"decl": "export interface TopBarTitleMenu {\n items?: MenuItem[];\n selectedId?: string;\n /** `selectedId` is the fallback. */\n selectedIdPath?: string;\n /** Default \"<title>, switch\". */\n accessibilityLabel?: string;\n}"
|
|
1177
|
+
},
|
|
1154
1178
|
{
|
|
1155
1179
|
"name": "LocaleConfig",
|
|
1156
1180
|
"kind": "interface",
|
|
@@ -5210,6 +5234,12 @@
|
|
|
5210
5234
|
"kind": "const",
|
|
5211
5235
|
"jsdoc": "/** Capability version, for bundles that gate on min binary version. */",
|
|
5212
5236
|
"decl": "export const version = 2;"
|
|
5237
|
+
},
|
|
5238
|
+
{
|
|
5239
|
+
"name": "\"./offline.js\"",
|
|
5240
|
+
"kind": "reexport",
|
|
5241
|
+
"jsdoc": "",
|
|
5242
|
+
"decl": "export {\n offline, isOfflineWriteBlocked, isOfflineWriteOutcomeUnknown,\n type Sent, type Queued, type OfflineResult, type OfflineEvent, type OfflineEventType, type PendingWrite, type RejectedWrite,\n} from \"./offline.js\";"
|
|
5213
5243
|
}
|
|
5214
5244
|
]
|
|
5215
5245
|
},
|
package/guides/wix-api-usage.md
CHANGED
|
@@ -222,6 +222,55 @@ hosts will require. (Contrast: the cross-cutting facade `@himalaya/wix-platform`
|
|
|
222
222
|
provisioned — decide per call whether to surface, fall back, or render an empty state (don't crash the worker).
|
|
223
223
|
Produce complete results synchronously in the action (the ambient tick is unreliable — see the Tier-5 notes).
|
|
224
224
|
|
|
225
|
+
## Offline writes — `{ offline: "queue" }`
|
|
226
|
+
|
|
227
|
+
A write a member makes offline can wait in an on-device outbox and go out on reconnect, but only
|
|
228
|
+
when BOTH keys turn:
|
|
229
|
+
|
|
230
|
+
1. **The app's cache rule opts the endpoint in**, naming it exactly, with a `method` and a `tag`:
|
|
231
|
+
|
|
232
|
+
```ts
|
|
233
|
+
cache: { rules: [
|
|
234
|
+
{ method: "POST", pathPrefix: "/form-submission-service/v4/submissions", cacheable: false, ttl: 0,
|
|
235
|
+
tag: "forms", queueOffline: true },
|
|
236
|
+
] }
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
The platform queues it only if the endpoint is one it lists as safe to resend (each verified
|
|
240
|
+
live for how a repeated request is deduplicated), and never for payments, checkout, orders,
|
|
241
|
+
auth, gift cards, loyalty or bookings. It decides the dedupe mechanism and a max age (7 days,
|
|
242
|
+
24 hours for personal data). App validation reports a rule that asks but cannot queue, and why.
|
|
243
|
+
|
|
244
|
+
2. **The call site asks**, so a worker that never heard of this keeps today's behaviour:
|
|
245
|
+
|
|
246
|
+
```ts
|
|
247
|
+
import { offline, isOfflineWriteOutcomeUnknown } from "@himalaya/wix-platform";
|
|
248
|
+
|
|
249
|
+
const r = await offline.call("POST", "/form-submission-service/v4/submissions", body);
|
|
250
|
+
if (r.status === "queued") markPending(r.writeId); // show the row as "Pending"
|
|
251
|
+
else render(r.value); // r.status === "sent"
|
|
252
|
+
offline.on("applied", (e) => clearPending(e.writeId));
|
|
253
|
+
offline.on("rejected", (e) => showFailed(e.writeId, e.code));
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
(`himalaya.wixApi.call(method, path, body, headers, { offline: "queue" })` is the raw form.)
|
|
257
|
+
|
|
258
|
+
What a worker gets back:
|
|
259
|
+
|
|
260
|
+
- `sent` — online and nothing of the same `tag` waiting: the endpoint's own answer.
|
|
261
|
+
- `queued` — offline, or behind an earlier write of the same `tag`, or the live attempt failed in a
|
|
262
|
+
way the outbox will retry. Never resubmit it: that would be a real duplicate.
|
|
263
|
+
- a thrown response error — a definite rejection (a 4xx), exactly as without the option.
|
|
264
|
+
- `err.code === "offline_write_outcome_unknown"` — an endpoint with no server-side dedupe whose
|
|
265
|
+
attempt may or may not have landed. Say "we couldn't confirm this went through".
|
|
266
|
+
- `err.code === "offline_write_blocked"` — offline and the write may not queue (`err.reason`:
|
|
267
|
+
`not_queueable`, `no_outbox` for a visitor or a host with no member, `queue_full`).
|
|
268
|
+
|
|
269
|
+
Only a signed-in member has an outbox; it is dropped on sign-out, account switch and
|
|
270
|
+
`AppContext.forget`. `offline.pending()` lists what waits (no bodies), `offline.rejected()` what was
|
|
271
|
+
refused (with its body until the write's max age), `offline.dismiss(writeId)` clears one. The shell
|
|
272
|
+
banner shows "Offline · Pending sync (n)" and "Syncing (n)…" for the app on screen.
|
|
273
|
+
|
|
225
274
|
## Visitor vs owner scope — a data-surface cheat-sheet
|
|
226
275
|
|
|
227
276
|
The currency trap below is just the sharpest edge of one rule: a **visitor / consumer** session reads site
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1407.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
|
|
6
6
|
"keywords": [
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"artifactId": "himalaya-cli"
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
|
-
"falconPackageHash": "
|
|
74
|
+
"falconPackageHash": "b802acb38e0b8d9b19d1d1d61a60d51aff08fee456a640e590e83157"
|
|
75
75
|
}
|