@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.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.3";
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.3";
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. Non-English locales are
1222
- // authored social-safe already, so `socialize` only runs on the English source string.
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 opts.isSocial ? socialize(src) : src;
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.3';
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) {