@wix/himalaya-cli 0.1671.0 → 0.1673.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/legacy-import/src/index.d.ts +16 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/legacy-import.d.ts +21 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +14 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/legacy-import.mjs +32 -1
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{6eef5856f65113cbc7504d7f926fe7039c48f614b3b0daf20c0e6eea0315c923.bin → 0f5533bf4197dc43489701db18378cecdb02db230a0fc2603e764999544513da.bin} +1 -1
- package/dist/browser-plane/sw.js +6 -6
- package/dist/cli.mjs +240 -55
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/android-ux.md +3 -1
- package/guides/component-reference.json +2 -2
- package/guides/component-reference.md +2 -2
- package/guides/designing-himi-screens.md +3 -1
- package/guides/ios-ux.md +6 -4
- package/guides/sdk-reference.json +15 -1
- package/guides/web-page-sdk-reference.md +1 -1
- package/package.json +2 -2
- package/templates/beauty-salon/l10n/en.json +1 -1
- package/templates/branded-lite/dev/index.ts +6607 -2231
- package/templates/branded-lite/l10n/en.json +25 -15
- package/templates/branded-lite/l10n/he.json +34 -34
- package/templates/branded-lite/tier5-src/_shared/himi-cms.ts +10 -3
- package/templates/branded-lite/tier5-src/himi-branded-lite-cms/index.ts +7 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-cms-collection/index.ts +527 -138
- package/templates/community-club/dev/index.ts +2459 -271
- package/templates/community-club/l10n/en.json +16 -11
- package/templates/community-club/l10n/he.json +38 -34
- package/templates/community-club/tier5-src/_shared/himi-cms.ts +10 -3
- package/templates/community-club/tier5-src/himi-branded-lite-cms/index.ts +7 -0
- package/templates/community-club/tier5-src/himi-branded-lite-cms-collection/index.ts +527 -138
- package/templates/events-meetups/l10n/en.json +1 -1
- package/templates/gym-fitness/l10n/en.json +1 -1
- package/templates/nonprofit-cause/l10n/en.json +1 -1
- package/templates/podcast-creator/l10n/en.json +1 -1
- package/templates/portfolio-creative/l10n/en.json +1 -1
- package/templates/restaurant/l10n/en.json +1 -1
- package/templates/retail-store/l10n/en.json +1 -1
- package/templates/yoga-studio/l10n/en.json +1 -1
|
@@ -12,6 +12,15 @@ export interface LegacyImportReportItem {
|
|
|
12
12
|
value: string;
|
|
13
13
|
meta?: Record<string, string>;
|
|
14
14
|
}
|
|
15
|
+
/** A WebView `storage_seed` snapshot — bind it as a WebView's `storage_seed.snapshot_path`. */
|
|
16
|
+
export interface WebStorageSnapshot {
|
|
17
|
+
/** Always true: it was captured from the legacy app's shared WebView storage. */
|
|
18
|
+
legacy: true;
|
|
19
|
+
/** The legacy principal it was captured for. A snapshot without one is never exposed. */
|
|
20
|
+
principal: string;
|
|
21
|
+
localStorage?: Record<string, string>;
|
|
22
|
+
sessionStorage?: Record<string, string>;
|
|
23
|
+
}
|
|
15
24
|
export interface LegacyImportReport {
|
|
16
25
|
/** The `legacyImport.id` that produced it. */
|
|
17
26
|
id: string;
|
|
@@ -20,10 +29,17 @@ export interface LegacyImportReport {
|
|
|
20
29
|
sources: LegacyImportSourceReport[];
|
|
21
30
|
/** Only the `report` sink's items. */
|
|
22
31
|
items: LegacyImportReportItem[];
|
|
32
|
+
/** Origin → snapshot, from the `webStorageSnapshot` sink. */
|
|
33
|
+
webStorage?: Record<string, WebStorageSnapshot>;
|
|
23
34
|
}
|
|
24
35
|
/** The import report for the signed-in principal, or null — none ran, it was acknowledged, it
|
|
25
36
|
* belongs to another account, or this host has nothing to import (web). */
|
|
26
37
|
export declare function read(): Promise<LegacyImportReport | null>;
|
|
38
|
+
/** The `storage_seed` snapshot of the legacy WebView storage captured for `origin` by a
|
|
39
|
+
* `web-storage` source, or null — none was captured, it has no principal, it was acknowledged
|
|
40
|
+
* (`ack()` deletes it for good), or the signed-in account is not the one it was captured for
|
|
41
|
+
* (the native side only exposes the report to the legacy principal). */
|
|
42
|
+
export declare function webStorageSnapshot(origin: string): Promise<WebStorageSnapshot | null>;
|
|
27
43
|
/** Delete the report. Idempotent: acknowledging twice (or with nothing to acknowledge) is fine. */
|
|
28
44
|
export declare function ack(): Promise<void>;
|
|
29
45
|
/** Capability version, for bundles that gate on min binary version. */
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/legacy-import.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/** Source kinds a baked config may name. A kind a binary does not register is skipped and
|
|
2
2
|
* reported at runtime, never a crash — but `defineApp` only accepts kinds the contract knows. */
|
|
3
|
-
export declare const LEGACY_IMPORT_SOURCE_KINDS: readonly ["files"];
|
|
3
|
+
export declare const LEGACY_IMPORT_SOURCE_KINDS: readonly ["files", "web-storage"];
|
|
4
4
|
export type LegacyImportSourceKind = (typeof LEGACY_IMPORT_SOURCE_KINDS)[number];
|
|
5
5
|
/** Sinks an item can be mapped to. */
|
|
6
|
-
export declare const LEGACY_IMPORT_SINKS: readonly ["localDatabase", "state", "files", "report", "installationId", "drop"];
|
|
6
|
+
export declare const LEGACY_IMPORT_SINKS: readonly ["localDatabase", "state", "files", "report", "webStorageSnapshot", "installationId", "drop"];
|
|
7
7
|
export type LegacyImportSinkName = (typeof LEGACY_IMPORT_SINKS)[number];
|
|
8
8
|
/** The container roots a `files` source may read under (the OLD app's container, which an
|
|
9
9
|
* update shares). iOS: `documents`, `library`, `caches`. Android (#4654): `files` (filesDir),
|
|
@@ -28,7 +28,19 @@ export interface LegacyImportFilesSource {
|
|
|
28
28
|
/** Relative directory under `root` — no leading `/`, no `..`. */
|
|
29
29
|
path: string;
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
/** One legacy WebView origin's `localStorage` / `sessionStorage` (#4660). Reads a hidden WebView on
|
|
32
|
+
* the platform's default data store, loaded with `origin` as its base URL. One item, key
|
|
33
|
+
* `snapshot` (JSON `{ localStorage, sessionStorage }`); map it to the `webStorageSnapshot` sink.
|
|
34
|
+
* IndexedDB is not captured — the source's counts report whether the origin has any. */
|
|
35
|
+
export interface LegacyImportWebStorageSource {
|
|
36
|
+
id: string;
|
|
37
|
+
kind: "web-storage";
|
|
38
|
+
/** `https://host[:port]` — scheme and authority only. */
|
|
39
|
+
origin: string;
|
|
40
|
+
}
|
|
41
|
+
export type LegacyImportSourceConfig = LegacyImportFilesSource | LegacyImportWebStorageSource;
|
|
42
|
+
/** A well-formed web origin: http(s) scheme + host (+ port), no path, query or fragment. */
|
|
43
|
+
export declare function isWebOrigin(v: unknown): v is string;
|
|
32
44
|
/** How a `localDatabase` row gets its `id`:
|
|
33
45
|
* - `key` — the item key;
|
|
34
46
|
* - `keySuffix` — the key minus the rule's literal prefix (the text before the first `*` of
|
|
@@ -58,6 +70,12 @@ export type LegacyImportSink =
|
|
|
58
70
|
| {
|
|
59
71
|
sink: "report";
|
|
60
72
|
}
|
|
73
|
+
/** Kept as an RFC 0073 §4.2 `storage_seed` snapshot `{ legacy: true, principal, localStorage?,
|
|
74
|
+
* sessionStorage? }`, readable once through `webStorageSnapshot(origin)` by the legacy principal
|
|
75
|
+
* only. Pair it with a `web-storage` source's `snapshot` item. */
|
|
76
|
+
| {
|
|
77
|
+
sink: "webStorageSnapshot";
|
|
78
|
+
}
|
|
61
79
|
/** The device-scoped push installation id override (the value push registration sends
|
|
62
80
|
* instead of a fresh id). The only sink that is NOT principal-scoped. */
|
|
63
81
|
| {
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts
CHANGED
|
@@ -1054,7 +1054,7 @@ export interface BadgeProps {
|
|
|
1054
1054
|
style?: string;
|
|
1055
1055
|
/** #1055 — explicit color token (overrides `style`). #2286.4a — this names the
|
|
1056
1056
|
* **FOREGROUND** (text) colour; the pill's fill is derived from it, a **16% tint of
|
|
1057
|
-
* this same token**
|
|
1057
|
+
* this same token** mixed into an opaque `surfacePrimary`, so a badge on a photo keeps its pill. One token drives both, so
|
|
1058
1058
|
* choose one with contrast **against `surfacePrimary`**, not against the fill:
|
|
1059
1059
|
* `accentPrimary` / `success` / `danger` read; an already-pale token such as
|
|
1060
1060
|
* `accentSoft` paints pale-on-pale and is effectively invisible. The same 16% on web,
|
|
@@ -1075,7 +1075,7 @@ export interface TagProps {
|
|
|
1075
1075
|
text: string;
|
|
1076
1076
|
/** #2286.4a — the tag's **FOREGROUND** (text) colour token; default `accentPrimary`.
|
|
1077
1077
|
* The pill is not a separate colour: its fill is a **14% tint of this same token**
|
|
1078
|
-
*
|
|
1078
|
+
* mixed into an opaque `surfacePrimary`, with a 30% border of it. One token drives all three,
|
|
1079
1079
|
* so choose one with contrast **against `surfacePrimary`**, not against the fill.
|
|
1080
1080
|
* That is the whole trap: `accentSoft` (and any other already-pale token) renders
|
|
1081
1081
|
* near-invisible — pale text on a 14% wash of the same pale colour — while
|
|
@@ -7444,10 +7444,19 @@ function gateScreenIdShapeProblem(id) {
|
|
|
7444
7444
|
}
|
|
7445
7445
|
|
|
7446
7446
|
// ../../core/ts/src/legacy-import.ts
|
|
7447
|
-
var LEGACY_IMPORT_SOURCE_KINDS = ["files"];
|
|
7448
|
-
var LEGACY_IMPORT_SINKS = ["localDatabase", "state", "files", "report", "installationId", "drop"];
|
|
7447
|
+
var LEGACY_IMPORT_SOURCE_KINDS = ["files", "web-storage"];
|
|
7448
|
+
var LEGACY_IMPORT_SINKS = ["localDatabase", "state", "files", "report", "webStorageSnapshot", "installationId", "drop"];
|
|
7449
7449
|
var LEGACY_IMPORT_FILE_ROOTS = ["documents", "library", "caches", "files", "noBackup", "cache", "external"];
|
|
7450
7450
|
var LEGACY_IMPORT_ANDROID_FILE_ROOTS = ["files", "noBackup", "cache", "external"];
|
|
7451
|
+
function isWebOrigin(v) {
|
|
7452
|
+
if (typeof v !== "string") return false;
|
|
7453
|
+
try {
|
|
7454
|
+
const u = new URL(v);
|
|
7455
|
+
return (u.protocol === "https:" || u.protocol === "http:") && u.origin === v;
|
|
7456
|
+
} catch {
|
|
7457
|
+
return false;
|
|
7458
|
+
}
|
|
7459
|
+
}
|
|
7451
7460
|
var LEGACY_IMPORT_DEFAULT_RETAIN_DAYS = 30;
|
|
7452
7461
|
var LEGACY_IMPORT_BUDGET_MS = 3e3;
|
|
7453
7462
|
var LEGACY_IMPORT_MAX_ATTEMPTS = 3;
|
|
@@ -7505,6 +7514,9 @@ function legacyImportProblems(cfg, at = "legacyImport") {
|
|
|
7505
7514
|
out.push(`${p}.kind: unknown source kind ${JSON.stringify(s.kind)} (known: ${LEGACY_IMPORT_SOURCE_KINDS.join(", ")})`);
|
|
7506
7515
|
return;
|
|
7507
7516
|
}
|
|
7517
|
+
if (s.kind === "web-storage") {
|
|
7518
|
+
if (!isWebOrigin(s.origin)) out.push(`${p}.origin: must be an http(s) origin like "https://app.local" \u2014 no path, query or trailing slash (got ${JSON.stringify(s.origin)})`);
|
|
7519
|
+
}
|
|
7508
7520
|
if (s.kind === "files") {
|
|
7509
7521
|
if (!LEGACY_IMPORT_FILE_ROOTS.includes(s.root)) {
|
|
7510
7522
|
out.push(`${p}.root: must be one of ${LEGACY_IMPORT_FILE_ROOTS.join(", ")} (got ${JSON.stringify(s.root)})`);
|
|
@@ -14,11 +14,37 @@ function dispatch(handlerId, params, _options) {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
// ../../core/sdk/legacy-import/src/index.ts
|
|
17
|
+
function asStringMap(v) {
|
|
18
|
+
if (!v || typeof v !== "object" || Array.isArray(v)) return void 0;
|
|
19
|
+
const out = {};
|
|
20
|
+
for (const [k, val] of Object.entries(v)) if (typeof val === "string") out[k] = val;
|
|
21
|
+
return out;
|
|
22
|
+
}
|
|
23
|
+
function asSnapshot(v) {
|
|
24
|
+
if (!v || typeof v !== "object") return null;
|
|
25
|
+
const s = v;
|
|
26
|
+
if (s.legacy !== true || typeof s.principal !== "string" || s.principal === "") return null;
|
|
27
|
+
const snap = { legacy: true, principal: s.principal };
|
|
28
|
+
const local = asStringMap(s.localStorage);
|
|
29
|
+
const session = asStringMap(s.sessionStorage);
|
|
30
|
+
if (local) snap.localStorage = local;
|
|
31
|
+
if (session) snap.sessionStorage = session;
|
|
32
|
+
return local || session ? snap : null;
|
|
33
|
+
}
|
|
17
34
|
function asReport(v) {
|
|
18
35
|
if (!v || typeof v !== "object") return null;
|
|
19
36
|
const r = v;
|
|
20
37
|
if (typeof r.id !== "string" || !Array.isArray(r.items) || !Array.isArray(r.sources)) return null;
|
|
38
|
+
const webStorage = {};
|
|
39
|
+
const rawWs = r.webStorage;
|
|
40
|
+
if (rawWs && typeof rawWs === "object") {
|
|
41
|
+
for (const [origin, v2] of Object.entries(rawWs)) {
|
|
42
|
+
const snap = asSnapshot(v2);
|
|
43
|
+
if (snap) webStorage[origin] = snap;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
21
46
|
return {
|
|
47
|
+
...Object.keys(webStorage).length > 0 ? { webStorage } : {},
|
|
22
48
|
id: r.id,
|
|
23
49
|
extractedAt: typeof r.extractedAt === "number" ? r.extractedAt : 0,
|
|
24
50
|
sources: r.sources.filter((s) => !!s && typeof s === "object" && typeof s.id === "string"),
|
|
@@ -28,6 +54,10 @@ function asReport(v) {
|
|
|
28
54
|
async function read() {
|
|
29
55
|
return asReport(await dispatch("capability.legacy_import.read"));
|
|
30
56
|
}
|
|
57
|
+
async function webStorageSnapshot(origin) {
|
|
58
|
+
const report = await read();
|
|
59
|
+
return report?.webStorage?.[origin] ?? null;
|
|
60
|
+
}
|
|
31
61
|
async function ack() {
|
|
32
62
|
await dispatch("capability.legacy_import.ack");
|
|
33
63
|
}
|
|
@@ -35,6 +65,7 @@ var version = 1;
|
|
|
35
65
|
export {
|
|
36
66
|
ack,
|
|
37
67
|
read,
|
|
38
|
-
version
|
|
68
|
+
version,
|
|
69
|
+
webStorageSnapshot
|
|
39
70
|
};
|
|
40
71
|
//# sourceMappingURL=legacy-import.mjs.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"files": [
|
|
3
3
|
{
|
|
4
4
|
"name": "sw.js",
|
|
5
|
-
"bytes":
|
|
5
|
+
"bytes": 2518384
|
|
6
6
|
},
|
|
7
7
|
{
|
|
8
8
|
"name": "host.html",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"bytes": 23064
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
"name": "preview-deferred/
|
|
24
|
+
"name": "preview-deferred/0f5533bf4197dc43489701db18378cecdb02db230a0fc2603e764999544513da.bin",
|
|
25
25
|
"bytes": 488215
|
|
26
26
|
},
|
|
27
27
|
{
|
|
@@ -79,10 +79,10 @@
|
|
|
79
79
|
],
|
|
80
80
|
"deferred": [
|
|
81
81
|
{
|
|
82
|
-
"key": "assets/pdf-
|
|
82
|
+
"key": "assets/pdf-11HKDITS.js",
|
|
83
83
|
"contentType": "application/javascript; charset=utf-8",
|
|
84
|
-
"sha256": "
|
|
85
|
-
"file": "preview-deferred/
|
|
84
|
+
"sha256": "0f5533bf4197dc43489701db18378cecdb02db230a0fc2603e764999544513da",
|
|
85
|
+
"file": "preview-deferred/0f5533bf4197dc43489701db18378cecdb02db230a0fc2603e764999544513da.bin"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
"key": "assets/pdf.worker.min-BGnVRhRG.js",
|