@wix/himalaya-cli 0.1716.0 → 0.1718.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/sdk/local-db/src/index.d.ts +65 -6
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/sdk-types/src/capabilities.generated.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/audio-record.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calendar.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calls.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/contacts.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/local-db.mjs +55 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/location.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/motion.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/photos.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdk-types.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/tasks.mjs +1 -1
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{b4828fbd7a53fb443702c941d578a5af3fdbb7d53defdbaeccc4e8b639dde683.bin → 74e5b76ecf38392d7eb3f9a9512d60a0675de85d411c9c56293e123152b3f70b.bin} +1 -1
- package/dist/browser-plane/sw.js +6 -6
- package/dist/cli.mjs +111 -50
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/branded-lite-site-binding.md +18 -0
- package/guides/designing-himi-screens.md +17 -0
- package/guides/sdk-reference.json +62 -6
- package/guides/web-page-sdk-reference.md +1 -1
- package/package.json +2 -2
|
Binary file
|
|
@@ -127,6 +127,24 @@ the contract being built is the committed `provisioning.json` itself, i.e. none
|
|
|
127
127
|
`HIMI_BRANDED_LITE_PROVISIONING_JSON` on its own is not a mark: it is also the dev and test seam
|
|
128
128
|
(template generation, fixture manifests), and every customer path that sets it carries a mark above.
|
|
129
129
|
|
|
130
|
+
A **provisioning-driven** customer build (§2 below: edit `provisioning.json` or hand one over that
|
|
131
|
+
env, then a plain `prepare:customer` with no `--contract`) leaves none of those marks, so the build
|
|
132
|
+
is also judged by what it names. It keeps the shared Amit1 client only while **all** of these hold:
|
|
133
|
+
|
|
134
|
+
| Still the committed Branded Lite build | A customer build once |
|
|
135
|
+
|---|---|
|
|
136
|
+
| every `native` field (`iosBundleId`, `androidApplicationId`, `urlScheme`, `appLinkHost`) is the shell's or absent | any one differs, or `native` carries a field the shell's does not |
|
|
137
|
+
| the manifest's `siteId` and `WIX_SITE_ID` are amit1's msid or the `development-site` placeholder | either names another site |
|
|
138
|
+
| every siteUrl it names (`wix.siteUrl`, `site.origin`, `HIMI_BRANDED_LITE_WIX_SITE_URL` / `WIX_SITE_URL`) is amit1's | any names another |
|
|
139
|
+
|
|
140
|
+
Template overlays and the shell's own tests change copy, verticals and branding, never these, so they
|
|
141
|
+
keep the reference binding. The rule is `brandedLiteBindingSource` in
|
|
142
|
+
[`wix-binding.ts`](../apps/himi-branded-lite/wix-binding.ts).
|
|
143
|
+
|
|
144
|
+
A visitor-only build's **Account** screen has no sign-in: no guest card, no member rows, no Sign out,
|
|
145
|
+
Delete account, Restore purchases or Notification settings (whose preferences are a member's) — only
|
|
146
|
+
saved posts and the app's settings (language, What's new, appearance, About), and the cart on the top bar.
|
|
147
|
+
|
|
130
148
|
A customer build binds the env override (`HIMI_BRANDED_LITE_WIX_CLIENT_ID` / `WIX_CLIENT_ID`), else its
|
|
131
149
|
contract's `wix.clientId`, else — for a build carrying another app's release — that release's own
|
|
132
150
|
`wix-consumer` client from the seed's app-config, else nothing. A `himi dist` build gets the release's
|
|
@@ -60,6 +60,23 @@ they decide what a phone screen looks like, and this guide decides how to compos
|
|
|
60
60
|
- **Every tap target is at least 44 points** (48 dp on Android). A `Button` grows its own hit area;
|
|
61
61
|
an `Icon`, an `Image` or a stack with `modifiers.onTap` does not, so give it `padding` until it
|
|
62
62
|
reaches 44, or use an `iconOnly` `Button` (`himi validate` warns: `touch_target_too_small`).
|
|
63
|
+
- **A wide surface gets its own layout, not the phone one stretched.** From the medium width
|
|
64
|
+
(600 points: an iPad in portrait) and the expanded one (840: an iPad in landscape, a Mac window,
|
|
65
|
+
the web at desktop width), each kind of screen changes shape:
|
|
66
|
+
- Photo tiles add columns (`columnsMedium: 3`, `columnsExpanded: 4`).
|
|
67
|
+
- Rows (a schedule, a menu, a session list) stay one readable column, or become
|
|
68
|
+
`grid({ columns: 1, columnsMedium: 2 })` of the same rows. A grid fills across each row, so
|
|
69
|
+
keep the items in reading order (by time) and they still read in order.
|
|
70
|
+
- A shelf has more covers than fit at the widest width (eight or more), so its rail never
|
|
71
|
+
ends halfway across the screen. With fewer, it is a grid row instead.
|
|
72
|
+
- A detail screen puts its photos and its information side by side:
|
|
73
|
+
`splitView({ primary: photos, detail: info })`, which stacks on a phone.
|
|
74
|
+
|
|
75
|
+
The readable column is the `contentMaxWidth` token. On expanded widths the shell centres the
|
|
76
|
+
screen in it (920 points by default). Never cap the root stack with `maxWidth`: it pins
|
|
77
|
+
the column to the leading edge and leaves the rest empty. Render `--device tablet` and
|
|
78
|
+
`--device desktop` and look for a half of the screen with nothing in it. Space below a short
|
|
79
|
+
list is fine.
|
|
63
80
|
|
|
64
81
|
---
|
|
65
82
|
|
|
@@ -4035,15 +4035,71 @@
|
|
|
4035
4035
|
{
|
|
4036
4036
|
"name": "upsert",
|
|
4037
4037
|
"kind": "function",
|
|
4038
|
-
"jsdoc": "/** Insert or replace a row (matched by its `id`). */",
|
|
4039
|
-
"decl": "export async function upsert(entity: string, object: DbEntity): Promise<void>;",
|
|
4038
|
+
"jsdoc": "/** Insert or replace a row (matched by its `id`).\n *\n * With `expectPrincipal` the write is principal-bound: it goes through {@link batch}, so it is\n * refused with a `principal_mismatch` {@link LocalDbError} instead of landing in another\n * member's partition. */",
|
|
4039
|
+
"decl": "export async function upsert(entity: string, object: DbEntity, opts?: WriteOptions): Promise<void>;",
|
|
4040
4040
|
"verificationChecked": true
|
|
4041
4041
|
},
|
|
4042
4042
|
{
|
|
4043
4043
|
"name": "remove",
|
|
4044
4044
|
"kind": "function",
|
|
4045
|
-
"jsdoc": "/** Remove a row by `id` (no-op if missing). */",
|
|
4046
|
-
"decl": "export async function remove(entity: string, id: string): Promise<void>;",
|
|
4045
|
+
"jsdoc": "/** Remove a row by `id` (no-op if missing). `expectPrincipal` binds it as {@link upsert} does. */",
|
|
4046
|
+
"decl": "export async function remove(entity: string, id: string, opts?: WriteOptions): Promise<void>;",
|
|
4047
|
+
"verificationChecked": true
|
|
4048
|
+
},
|
|
4049
|
+
{
|
|
4050
|
+
"name": "WriteOptions",
|
|
4051
|
+
"kind": "interface",
|
|
4052
|
+
"jsdoc": "/** Options for a principal-bound write. */",
|
|
4053
|
+
"decl": "export interface WriteOptions {\n /** A token from {@link principal}. The host refuses the write (and writes nothing) when the\n * partition it would land in now belongs to anyone else. */\n expectPrincipal?: string;\n}",
|
|
4054
|
+
"verificationChecked": true
|
|
4055
|
+
},
|
|
4056
|
+
{
|
|
4057
|
+
"name": "BatchWrite",
|
|
4058
|
+
"kind": "type",
|
|
4059
|
+
"jsdoc": "/** One write of a {@link batch}. */",
|
|
4060
|
+
"decl": "export type BatchWrite =\n | { op: \"upsert\"; entity: string; object: DbEntity }\n | { op: \"remove\"; entity: string; id: string };",
|
|
4061
|
+
"verificationChecked": true
|
|
4062
|
+
},
|
|
4063
|
+
{
|
|
4064
|
+
"name": "LocalDbErrorCode",
|
|
4065
|
+
"kind": "type",
|
|
4066
|
+
"jsdoc": "",
|
|
4067
|
+
"decl": "export type LocalDbErrorCode = \"principal_mismatch\" | \"unbindable\" | \"failed\";",
|
|
4068
|
+
"verificationChecked": true
|
|
4069
|
+
},
|
|
4070
|
+
{
|
|
4071
|
+
"name": "LocalDbError",
|
|
4072
|
+
"kind": "interface",
|
|
4073
|
+
"jsdoc": "/** The typed rejection of a principal-bound write. A plain Error carrying `code` — worker bundles\n * are compiled to a target without class syntax, so this is a factory, not a subclass.\n * - `principal_mismatch`: the partition changed hands since the token was read. Nothing was written.\n * - `unbindable`: this host keeps no per-member partition (no principal wired, or web storage with\n * no per-account database), so no token can bind the write. Nothing was written.\n * - `failed`: the host refused the batch for another reason it reported. Nothing was written. */",
|
|
4074
|
+
"decl": "export interface LocalDbError extends Error {\n name: \"LocalDbError\";\n code: LocalDbErrorCode;\n}",
|
|
4075
|
+
"verificationChecked": true
|
|
4076
|
+
},
|
|
4077
|
+
{
|
|
4078
|
+
"name": "localDbError",
|
|
4079
|
+
"kind": "function",
|
|
4080
|
+
"jsdoc": "/** Build a {@link LocalDbError}: what {@link batch} throws when the host refuses it. Exported so a\n * test fake can reject a bound write exactly as a host does. */",
|
|
4081
|
+
"decl": "export function localDbError(code: LocalDbErrorCode, message: string): LocalDbError;",
|
|
4082
|
+
"verificationChecked": true
|
|
4083
|
+
},
|
|
4084
|
+
{
|
|
4085
|
+
"name": "isLocalDbError",
|
|
4086
|
+
"kind": "function",
|
|
4087
|
+
"jsdoc": "/** Narrow a caught value: `catch (e) { if (isLocalDbError(e) && e.code === \"principal_mismatch\") … }`. */",
|
|
4088
|
+
"decl": "export function isLocalDbError(e: unknown): e is LocalDbError;",
|
|
4089
|
+
"verificationChecked": true
|
|
4090
|
+
},
|
|
4091
|
+
{
|
|
4092
|
+
"name": "principal",
|
|
4093
|
+
"kind": "function",
|
|
4094
|
+
"jsdoc": "/**\n * An opaque token for the partition local-db writes land in NOW: the signed-in principal, the\n * tenant and the active business, as this host scopes them. Equal tokens mean the same partition.\n * Read it once you have checked who you are writing for, and pass it to every write that must not\n * reach anyone else's rows.\n *\n * `null` when the host cannot bind writes: a binary older than capability `version` 3, or a host with\n * no per-member partition (no principal wired; web storage without a per-account database). A\n * bound write there is refused, never written unchecked. On an old binary the dispatcher does not\n * know the `batch` verb either, so a bound write there rejects with nothing written — never unchecked.\n */",
|
|
4095
|
+
"decl": "export async function principal(): Promise<string | null>;",
|
|
4096
|
+
"verificationChecked": true
|
|
4097
|
+
},
|
|
4098
|
+
{
|
|
4099
|
+
"name": "batch",
|
|
4100
|
+
"kind": "function",
|
|
4101
|
+
"jsdoc": "/**\n * Apply several writes together, across collections, to one partition.\n *\n * Every write is validated (declared entity, string `id`) before any is applied, so a bad write\n * fails the batch with nothing written. With `expectPrincipal`, the token is compared against the\n * partition the batch resolves, in the same step that applies it: a switch before that step is\n * refused with `principal_mismatch` and nothing written; a switch after it cannot move the batch,\n * which lands whole in the partition the token named. Writes apply in order. A process killed\n * part-way through can leave a prefix applied: batch is not crash-atomic across collections.\n */",
|
|
4102
|
+
"decl": "export async function batch(writes: readonly BatchWrite[], opts?: WriteOptions): Promise<void>;",
|
|
4047
4103
|
"verificationChecked": true
|
|
4048
4104
|
},
|
|
4049
4105
|
{
|
|
@@ -4091,8 +4147,8 @@
|
|
|
4091
4147
|
{
|
|
4092
4148
|
"name": "version",
|
|
4093
4149
|
"kind": "const",
|
|
4094
|
-
"jsdoc": "/** Capability version, for bundles that gate on min binary version. v2 adds the\n * query DSL (query/count)
|
|
4095
|
-
"decl": "export const version =
|
|
4150
|
+
"jsdoc": "/** Capability version, for bundles that gate on min binary version. v2 adds the\n * query DSL (query/count); v3 adds `principal()` and principal-bound `batch()`. */",
|
|
4151
|
+
"decl": "export const version = 3;",
|
|
4096
4152
|
"verificationChecked": true
|
|
4097
4153
|
}
|
|
4098
4154
|
]
|
|
@@ -34,7 +34,7 @@ the SDK sources, so it matches the shipped SDKs.
|
|
|
34
34
|
- [`keyboard`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fkeyboard?format=md) — Keyboard capability. 1 method.
|
|
35
35
|
- [`legacy_import`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Flegacy_import?format=md) — One-time legacy import report. 3 methods · not in Brandy.
|
|
36
36
|
- [`live_activity`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Flive_activity?format=md) — Live Activity capability. 3 methods · not in Brandy.
|
|
37
|
-
- [`local_database`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Flocal_database?format=md) — Local-database capability: a per-entity on-device store (EntityStore) + an offline WriteQueue, so a worker bundle can persist and query real data on device.
|
|
37
|
+
- [`local_database`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Flocal_database?format=md) — Local-database capability: a per-entity on-device store (EntityStore) + an offline WriteQueue, so a worker bundle can persist and query real data on device. 13 methods · not in Brandy.
|
|
38
38
|
- [`location`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Flocation?format=md) — Device location. 10 methods.
|
|
39
39
|
- [`media_playback`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fmedia_playback?format=md) — Background-capable media playback and offline downloads. 21 methods · returns FileHandles.
|
|
40
40
|
- [`motion`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fmotion?format=md) — Device's motion sensors. 7 methods.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1718.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": [
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"artifactId": "himalaya-cli"
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
|
-
"falconPackageHash": "
|
|
84
|
+
"falconPackageHash": "d9f9ddf2bf21b7e653af21f326e44ef6d0b52b0116b80a39b75816a5"
|
|
85
85
|
}
|