@energy8platform/shell 0.6.3 → 0.6.4
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/html.cjs.js +11 -4
- package/dist/html.cjs.js.map +1 -1
- package/dist/html.d.ts +2 -2
- package/dist/html.esm.js +11 -4
- package/dist/html.esm.js.map +1 -1
- package/dist/index.cjs.js +11 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +11 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/pixi.cjs.js +11 -4
- package/dist/pixi.cjs.js.map +1 -1
- package/dist/pixi.d.ts +2 -2
- package/dist/pixi.esm.js +11 -4
- package/dist/pixi.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/core/i18n.ts +10 -3
- package/src/core/version.ts +1 -1
package/dist/html.d.ts
CHANGED
|
@@ -511,7 +511,7 @@ declare class ShellController extends EventEmitter<ShellEvents> implements Shell
|
|
|
511
511
|
tokens: ShellTokens;
|
|
512
512
|
layout: ShellLayoutMode;
|
|
513
513
|
soundOn: boolean;
|
|
514
|
-
readonly engineVersion = "0.6.
|
|
514
|
+
readonly engineVersion = "0.6.4";
|
|
515
515
|
readonly actions: ShellActions;
|
|
516
516
|
private renderer;
|
|
517
517
|
private i18n;
|
|
@@ -593,7 +593,7 @@ interface I18n {
|
|
|
593
593
|
declare function createI18n(opts: I18nOptions): I18n;
|
|
594
594
|
|
|
595
595
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
596
|
-
declare const PACKAGE_VERSION = "0.6.
|
|
596
|
+
declare const PACKAGE_VERSION = "0.6.4";
|
|
597
597
|
|
|
598
598
|
/** A shell: the renderer-agnostic controller plus the surface facade (safeArea/barHeight/setVisible)
|
|
599
599
|
* an embedding host reads. `createShell`, `createGameShell` and `createPixiShell` all return this. */
|
package/dist/html.esm.js
CHANGED
|
@@ -1218,12 +1218,19 @@ function normalizeLang(code) {
|
|
|
1218
1218
|
return (LANG_SET.has(base) ? base : 'en');
|
|
1219
1219
|
}
|
|
1220
1220
|
function createI18n(opts) {
|
|
1221
|
-
// Social is the `en-social` pseudo-locale: it rewrites the English source
|
|
1222
|
-
//
|
|
1221
|
+
// Social is the `en-social` pseudo-locale: it rewrites the English source into social-safe
|
|
1222
|
+
// vocabulary. The replacement dictionary only exists for English, so social mode FORCES English —
|
|
1223
|
+
// the requested `language` is ignored, matching the `isSocial` contract ("…derived from English…
|
|
1224
|
+
// regardless of `language`"). Rendering a non-English locale in social mode would leak untranslated
|
|
1225
|
+
// restricted terms, so we never do it.
|
|
1226
|
+
if (opts.isSocial) {
|
|
1227
|
+
const t = (src) => socialize(src);
|
|
1228
|
+
return { lang: 'en', t };
|
|
1229
|
+
}
|
|
1223
1230
|
const lang = normalizeLang(opts.language);
|
|
1224
1231
|
const t = (src) => {
|
|
1225
1232
|
if (lang === 'en')
|
|
1226
|
-
return
|
|
1233
|
+
return src;
|
|
1227
1234
|
return opts.messages?.[lang]?.[src] ?? LOCALES[lang]?.[src] ?? src;
|
|
1228
1235
|
};
|
|
1229
1236
|
return { lang, t };
|
|
@@ -1446,7 +1453,7 @@ class KeyboardController {
|
|
|
1446
1453
|
|
|
1447
1454
|
// AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
|
|
1448
1455
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
1449
|
-
const PACKAGE_VERSION = '0.6.
|
|
1456
|
+
const PACKAGE_VERSION = '0.6.4';
|
|
1450
1457
|
|
|
1451
1458
|
/** Apply defaults to the raw config (the mount target lives on the renderer, not here). */
|
|
1452
1459
|
function resolveConfig(config) {
|