@energy8platform/shell 0.6.3 → 0.6.5
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 +14 -13
- package/dist/html.cjs.js.map +1 -1
- package/dist/html.d.ts +7 -4
- package/dist/html.esm.js +14 -13
- 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 +7 -2
- package/dist/index.esm.js +11 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/pixi.cjs.js +18 -14
- package/dist/pixi.cjs.js.map +1 -1
- package/dist/pixi.d.ts +7 -6
- package/dist/pixi.esm.js +18 -14
- package/dist/pixi.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/core/i18n.ts +10 -3
- package/src/core/renderer.ts +5 -0
- package/src/core/version.ts +1 -1
- package/src/ui/html/HtmlRenderer.ts +3 -9
- package/src/ui/pixi/PixiRenderer.ts +2 -11
- package/src/ui/pixi/text.ts +5 -0
package/dist/html.cjs.js
CHANGED
|
@@ -1220,12 +1220,19 @@ function normalizeLang(code) {
|
|
|
1220
1220
|
return (LANG_SET.has(base) ? base : 'en');
|
|
1221
1221
|
}
|
|
1222
1222
|
function createI18n(opts) {
|
|
1223
|
-
// Social is the `en-social` pseudo-locale: it rewrites the English source
|
|
1224
|
-
//
|
|
1223
|
+
// Social is the `en-social` pseudo-locale: it rewrites the English source into social-safe
|
|
1224
|
+
// vocabulary. The replacement dictionary only exists for English, so social mode FORCES English —
|
|
1225
|
+
// the requested `language` is ignored, matching the `isSocial` contract ("…derived from English…
|
|
1226
|
+
// regardless of `language`"). Rendering a non-English locale in social mode would leak untranslated
|
|
1227
|
+
// restricted terms, so we never do it.
|
|
1228
|
+
if (opts.isSocial) {
|
|
1229
|
+
const t = (src) => socialize(src);
|
|
1230
|
+
return { lang: 'en', t };
|
|
1231
|
+
}
|
|
1225
1232
|
const lang = normalizeLang(opts.language);
|
|
1226
1233
|
const t = (src) => {
|
|
1227
1234
|
if (lang === 'en')
|
|
1228
|
-
return
|
|
1235
|
+
return src;
|
|
1229
1236
|
return opts.messages?.[lang]?.[src] ?? LOCALES[lang]?.[src] ?? src;
|
|
1230
1237
|
};
|
|
1231
1238
|
return { lang, t };
|
|
@@ -1448,7 +1455,7 @@ class KeyboardController {
|
|
|
1448
1455
|
|
|
1449
1456
|
// AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
|
|
1450
1457
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
1451
|
-
const PACKAGE_VERSION = '0.6.
|
|
1458
|
+
const PACKAGE_VERSION = '0.6.5';
|
|
1452
1459
|
|
|
1453
1460
|
/** Apply defaults to the raw config (the mount target lives on the renderer, not here). */
|
|
1454
1461
|
function resolveConfig(config) {
|
|
@@ -4020,7 +4027,9 @@ class HtmlRenderer {
|
|
|
4020
4027
|
}
|
|
4021
4028
|
case 'replay': {
|
|
4022
4029
|
const opts = req.opts;
|
|
4023
|
-
|
|
4030
|
+
// Reopen through the controller (not a renderer-direct re-push) so its OverlayHandle stays
|
|
4031
|
+
// in sync — otherwise a reopened replay modal is untracked and the next close no-ops.
|
|
4032
|
+
const reopen = () => { this.host.openReplay(opts); };
|
|
4024
4033
|
const root = buildReplayModal(this.host, opts, reopen);
|
|
4025
4034
|
return { root };
|
|
4026
4035
|
}
|
|
@@ -4030,14 +4039,6 @@ class HtmlRenderer {
|
|
|
4030
4039
|
}
|
|
4031
4040
|
}
|
|
4032
4041
|
}
|
|
4033
|
-
/** Opens a replay modal and shows it — used as the reopen callback after START REPLAY. */
|
|
4034
|
-
openReplayInternal(opts) {
|
|
4035
|
-
if (this.destroyed)
|
|
4036
|
-
return;
|
|
4037
|
-
const reopen = () => { this.openReplayInternal(opts); };
|
|
4038
|
-
const root = buildReplayModal(this.host, opts, reopen);
|
|
4039
|
-
this.showModal(root);
|
|
4040
|
-
}
|
|
4041
4042
|
showModal(el, onKey) {
|
|
4042
4043
|
// Drop focus from any open shell control so a stray Space/Enter doesn't re-activate it
|
|
4043
4044
|
const active = document.activeElement;
|