@wix/himalaya-cli 0.1284.0 → 0.1285.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/ts/src/define-app.d.ts +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/locale.d.ts +19 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +9 -1
- package/dist/cli.mjs +20 -19
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/sdk-reference.json +1 -1
- package/package.json +2 -2
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts
CHANGED
|
@@ -311,7 +311,8 @@ export interface AppConfig {
|
|
|
311
311
|
* `NavigationConfig.locale`. `default` must be a supported catalog tag
|
|
312
312
|
* (`en` / `he` / `es`). `pin: true` ignores the device/browser language so a
|
|
313
313
|
* Hebrew app stays RTL on an English phone. In-app `locale.set` still wins.
|
|
314
|
-
*
|
|
314
|
+
* The device/browser language is followed only when it is `default` or listed in
|
|
315
|
+
* `translations`. Omit ⇒ the app runs in English on every device.
|
|
315
316
|
*/
|
|
316
317
|
locale?: LocaleConfig;
|
|
317
318
|
/**
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/locale.d.ts
CHANGED
|
@@ -7,7 +7,8 @@ export interface LocaleConfig {
|
|
|
7
7
|
/** BCP-47 primary subtag. Must be in `SUPPORTED_LOCALES` at defineApp time;
|
|
8
8
|
* clients coerce and drop anything else. */
|
|
9
9
|
default: string;
|
|
10
|
-
/** Skip device/browser language
|
|
10
|
+
/** Skip device/browser language, even one listed in `translations`. In-app
|
|
11
|
+
* `locale.set` still wins. */
|
|
11
12
|
pin?: boolean;
|
|
12
13
|
/**
|
|
13
14
|
* RFC 0054 — locale tags this app ships TRANSLATIONS for, beyond `default`.
|
|
@@ -17,8 +18,10 @@ export interface LocaleConfig {
|
|
|
17
18
|
* the eleven `himi init` templates shipped in. Declaring `translations` is what
|
|
18
19
|
* makes that gap reportable.
|
|
19
20
|
*
|
|
20
|
-
*
|
|
21
|
-
* (
|
|
21
|
+
* Also read by clients at runtime: the device/browser language is followed ONLY
|
|
22
|
+
* when it is `default` or listed here (see `shipsLocale`). Without this an English
|
|
23
|
+
* app on a Hebrew phone resolved `he` and painted English copy right-to-left. An
|
|
24
|
+
* older client ignores the field (invariant 6) and keeps following the device.
|
|
22
25
|
*/
|
|
23
26
|
translations?: readonly string[];
|
|
24
27
|
/**
|
|
@@ -40,13 +43,25 @@ export declare function isSupportedLocale(tag: string): tag is SupportedLocale;
|
|
|
40
43
|
export declare function coerceSupportedLocale(tag: string | undefined | null): SupportedLocale | undefined;
|
|
41
44
|
export declare function isRTL(locale: string): boolean;
|
|
42
45
|
export declare function layoutDirection(locale: string): "rtl" | "ltr";
|
|
46
|
+
/**
|
|
47
|
+
* `true` when the app ships copy in `tag`: its source locale (`default`, or `"en"` —
|
|
48
|
+
* the platform's source language — when no supported default is declared) or one of
|
|
49
|
+
* its declared `translations`.
|
|
50
|
+
*
|
|
51
|
+
* This is what decides whether the device/browser language is followed. Production
|
|
52
|
+
* serve swaps no strings by `Accept-Language`: an app only has a translation for a
|
|
53
|
+
* locale it declares, so following any other device language changes the layout
|
|
54
|
+
* direction and nothing else.
|
|
55
|
+
*/
|
|
56
|
+
export declare function shipsLocale(app: LocaleConfig | null | undefined, tag: string): boolean;
|
|
43
57
|
/**
|
|
44
58
|
* Resolve the app locale.
|
|
45
59
|
*
|
|
46
60
|
* 1. Launch override (`-himalaya.locale` / intent extra) if supported.
|
|
47
61
|
* 2. Explicit user choice (`locale.set`) when `source === "user"`.
|
|
48
62
|
* 3. If `pin && default` supported → app default (skip device).
|
|
49
|
-
* 4. Device/browser tag if
|
|
63
|
+
* 4. Device/browser tag if the app ships it (`shipsLocale`). An app with no
|
|
64
|
+
* `locale` block ships English only, so a Hebrew device does not make it RTL.
|
|
50
65
|
* 5. `app.default` if supported.
|
|
51
66
|
* 6. `"en"`.
|
|
52
67
|
*
|
|
@@ -7007,6 +7007,13 @@ function isRTL(locale) {
|
|
|
7007
7007
|
function layoutDirection(locale) {
|
|
7008
7008
|
return isRTL(locale) ? "rtl" : "ltr";
|
|
7009
7009
|
}
|
|
7010
|
+
function shipsLocale(app, tag) {
|
|
7011
|
+
const t = coerceSupportedLocale(tag);
|
|
7012
|
+
if (!t) return false;
|
|
7013
|
+
if (t === (coerceSupportedLocale(app?.default) ?? "en")) return true;
|
|
7014
|
+
const list = app?.translations;
|
|
7015
|
+
return Array.isArray(list) && list.every((x) => typeof x === "string") && list.some((x) => coerceSupportedLocale(x) === t);
|
|
7016
|
+
}
|
|
7010
7017
|
function resolveAppLocale(opts) {
|
|
7011
7018
|
const launch = coerceSupportedLocale(opts.launch);
|
|
7012
7019
|
if (launch) return launch;
|
|
@@ -7019,7 +7026,7 @@ function resolveAppLocale(opts) {
|
|
|
7019
7026
|
}
|
|
7020
7027
|
const appDefault = coerceSupportedLocale(opts.app?.default);
|
|
7021
7028
|
if (opts.app?.pin && appDefault) return appDefault;
|
|
7022
|
-
if (device) return device;
|
|
7029
|
+
if (device && shipsLocale(opts.app, device)) return device;
|
|
7023
7030
|
if (appDefault) return appDefault;
|
|
7024
7031
|
return "en";
|
|
7025
7032
|
}
|
|
@@ -13589,6 +13596,7 @@ export {
|
|
|
13589
13596
|
resolveTabBarPresentation,
|
|
13590
13597
|
screenDescriptorSchema,
|
|
13591
13598
|
selectIdiomOverlay,
|
|
13599
|
+
shipsLocale,
|
|
13592
13600
|
shouldRevealError,
|
|
13593
13601
|
siteAllowedOrigins,
|
|
13594
13602
|
siteHost,
|
package/dist/cli.mjs
CHANGED
|
@@ -7568,6 +7568,7 @@ function resolveTranslation(value, catalog3, sourceCatalog) {
|
|
|
7568
7568
|
var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
|
|
7569
7569
|
var init_bindings = __esm({
|
|
7570
7570
|
"../../core/ts/src/bindings.ts"() {
|
|
7571
|
+
"use strict";
|
|
7571
7572
|
BINDING_SIGILS = ["service", "flag", "item", "t"];
|
|
7572
7573
|
BINDING_SIGIL_RE = new RegExp(
|
|
7573
7574
|
`^\\$(?:${BINDING_SIGILS.filter((s2) => s2 !== "t").join("|")})\\b|^\\$t:`
|
|
@@ -147496,25 +147497,25 @@ var init_preview_assets_generated = __esm({
|
|
|
147496
147497
|
"../../packages/serve/src/preview-assets.generated.ts"() {
|
|
147497
147498
|
init_preview_assets_format();
|
|
147498
147499
|
PREVIEW_ASSET_MANIFEST = [
|
|
147499
|
-
{ key: "assets/index-
|
|
147500
|
-
{ key: "assets/pdf-
|
|
147501
|
-
{ key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
147502
|
-
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset:
|
|
147503
|
-
{ key: "assets/pdfDocument-
|
|
147504
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
147505
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
147506
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
147507
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
147508
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
147509
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
147510
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
147511
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
147512
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
147513
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
147514
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
147515
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
147516
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
147517
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
147500
|
+
{ key: "assets/index-BynCGh_e.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1233760, sha256: "d40489dde38e381b7a12a15594e20b9d6ea29bff761fc9a2a7e9b3a6825a334d" },
|
|
147501
|
+
{ key: "assets/pdf-CSx9d6Ik.js", contentType: "application/javascript; charset=utf-8", offset: 1233768, length: 488199, sha256: "5b5ef5de3805f1f6b1684ff2d5b61a10c86846262a54e5ceaf5f0691327133f0" },
|
|
147502
|
+
{ key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset: 1721967, length: 73, sha256: "41bcfda4f3c8c0a81c785ea87c69afc8e7d0ed8c333324aee94c273d881bb6aa" },
|
|
147503
|
+
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 1722040, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
|
|
147504
|
+
{ key: "assets/pdfDocument-C0FckwGm.js", contentType: "application/javascript; charset=utf-8", offset: 3039074, length: 2858, sha256: "94229686063333a7b0508e04ed86204424990a1f9c009fdb38cc92a5470bd815" },
|
|
147505
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3041932, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
147506
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3046542, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
147507
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3535126, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
147508
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3626050, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
147509
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3717034, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
147510
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3808014, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
147511
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 3898886, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
147512
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 3989866, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
147513
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4098502, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
147514
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4207586, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
147515
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4316634, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
147516
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4424334, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
147517
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 4512442, length: 4947, sha256: "aed86e7bc0cdd626f7b05cfb4e222718f755959af62153fa7fd8253337af3e8e" },
|
|
147518
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4517389, length: 17344, sha256: "d057298d75e7373e5e2c4d11b7d1bcbea88e03af555ba63d97641c78509c58e4" }
|
|
147518
147519
|
];
|
|
147519
147520
|
}
|
|
147520
147521
|
});
|
|
Binary file
|
|
@@ -1070,7 +1070,7 @@
|
|
|
1070
1070
|
"name": "LocaleConfig",
|
|
1071
1071
|
"kind": "interface",
|
|
1072
1072
|
"jsdoc": "/** Served on the OTA app-config channel. Unknown `default` tags are ignored by\n * clients rather than failing the envelope decode. */",
|
|
1073
|
-
"decl": "export interface LocaleConfig {\n /** BCP-47 primary subtag. Must be in `SUPPORTED_LOCALES` at defineApp time;\n * clients coerce and drop anything else. */\n default: string;\n /** Skip device/browser language
|
|
1073
|
+
"decl": "export interface LocaleConfig {\n /** BCP-47 primary subtag. Must be in `SUPPORTED_LOCALES` at defineApp time;\n * clients coerce and drop anything else. */\n default: string;\n /** Skip device/browser language, even one listed in `translations`. In-app\n * `locale.set` still wins. */\n pin?: boolean;\n /**\n * Locale tags this app ships TRANSLATIONS for, beyond `default`.\n *\n * Distinct from `default`, which picks the locale the app RUNS in: an app can run\n * in Hebrew with no Hebrew catalog (and paint English), which is exactly the state\n * the eleven `himi init` templates shipped in. Declaring `translations` is what\n * makes that gap reportable.\n *\n * Also read by clients at runtime: the device/browser language is followed ONLY\n * when it is `default` or listed here (see `shipsLocale`). Without this an English\n * app on a Hebrew phone resolved `he` and painted English copy right-to-left. An\n * older client ignores the field and keeps following the device.\n */\n translations?: readonly string[];\n /**\n * How hard `himi validate`'s `l10n` pass pushes on untranslated copy.\n *\n * `\"off\"` — the default, including when omitted entirely. Shipping one locale\n * is a legitimate choice, and a pass that scolds every app for it is\n * a pass everyone learns to ignore.\n * `\"warn\"` — report gaps. Where a new app starts.\n * `\"error\"` — gaps fail validate. Flip only once the app's own number is clean.\n *\n * Build-time only, as above.\n */\n enforce?: \"off\" | \"warn\" | \"error\";\n}"
|
|
1074
1074
|
}
|
|
1075
1075
|
]
|
|
1076
1076
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1285.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": [
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"artifactId": "himalaya-cli"
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
|
-
"falconPackageHash": "
|
|
73
|
+
"falconPackageHash": "a501a3b7c132cc5db9247bdc0cd15570da2891e5eedd6df2ff42004b"
|
|
74
74
|
}
|