@energy8platform/shell 0.2.0 → 0.2.1
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 -8
- package/dist/html.cjs.js.map +1 -1
- package/dist/html.d.ts +2 -2
- package/dist/html.esm.js +11 -8
- package/dist/html.esm.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +1 -1
- package/dist/pixi.cjs.js +9 -2
- package/dist/pixi.cjs.js.map +1 -1
- package/dist/pixi.d.ts +2 -2
- package/dist/pixi.esm.js +9 -2
- package/dist/pixi.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/core/version.ts +1 -1
- package/src/ui/html/HtmlRenderer.ts +1 -1
- package/src/ui/html/components/GameInfo.ts +1 -1
- package/src/ui/html/components/Modal.ts +8 -4
- package/src/ui/html/components/Settings.ts +1 -1
- package/src/ui/pixi/PixiRenderer.ts +4 -1
- package/src/ui/pixi/primitives/scroll.ts +3 -0
package/dist/index.d.ts
CHANGED
|
@@ -471,7 +471,7 @@ declare class ShellController extends EventEmitter<ShellEvents> implements Shell
|
|
|
471
471
|
tokens: ShellTokens;
|
|
472
472
|
layout: ShellLayoutMode;
|
|
473
473
|
soundOn: boolean;
|
|
474
|
-
readonly engineVersion = "0.2.
|
|
474
|
+
readonly engineVersion = "0.2.1";
|
|
475
475
|
readonly actions: ShellActions;
|
|
476
476
|
private renderer;
|
|
477
477
|
private i18n;
|
|
@@ -537,7 +537,7 @@ interface I18n {
|
|
|
537
537
|
declare function createI18n(opts: I18nOptions): I18n;
|
|
538
538
|
|
|
539
539
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
540
|
-
declare const PACKAGE_VERSION = "0.2.
|
|
540
|
+
declare const PACKAGE_VERSION = "0.2.1";
|
|
541
541
|
|
|
542
542
|
/** A shell: the renderer-agnostic controller plus the surface facade (safeArea/barHeight/setVisible)
|
|
543
543
|
* an embedding host reads. `createShell`, `createGameShell` and `createPixiShell` all return this. */
|
package/dist/index.esm.js
CHANGED
|
@@ -1324,7 +1324,7 @@ class KeyboardController {
|
|
|
1324
1324
|
|
|
1325
1325
|
// AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
|
|
1326
1326
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
1327
|
-
const PACKAGE_VERSION = '0.2.
|
|
1327
|
+
const PACKAGE_VERSION = '0.2.1';
|
|
1328
1328
|
|
|
1329
1329
|
/** Apply defaults to the raw config (the mount target lives on the renderer, not here). */
|
|
1330
1330
|
function resolveConfig(config) {
|
package/dist/pixi.cjs.js
CHANGED
|
@@ -1354,7 +1354,7 @@ class KeyboardController {
|
|
|
1354
1354
|
|
|
1355
1355
|
// AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
|
|
1356
1356
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
1357
|
-
const PACKAGE_VERSION = '0.2.
|
|
1357
|
+
const PACKAGE_VERSION = '0.2.1';
|
|
1358
1358
|
|
|
1359
1359
|
/** Apply defaults to the raw config (the mount target lives on the renderer, not here). */
|
|
1360
1360
|
function resolveConfig(config) {
|
|
@@ -3311,6 +3311,10 @@ class ScrollBox extends pixi_js.Container {
|
|
|
3311
3311
|
this.setScroll(this.scrollY + dy);
|
|
3312
3312
|
}
|
|
3313
3313
|
setScroll(y) {
|
|
3314
|
+
// Ignore late scrolls after teardown: a queued keydown (or resize) can route here once the modal
|
|
3315
|
+
// has been destroyed, and writing to a torn-down content Container throws (use-after-destroy).
|
|
3316
|
+
if (this.destroyed || !this.content || this.content.destroyed)
|
|
3317
|
+
return;
|
|
3314
3318
|
this.scrollY = Math.max(0, Math.min(this.maxScroll, y)) || 0; // || 0 converts -0 to 0
|
|
3315
3319
|
this.content.y = this.scrollY === 0 ? 0 : -this.scrollY;
|
|
3316
3320
|
}
|
|
@@ -5694,7 +5698,10 @@ class PixiRenderer {
|
|
|
5694
5698
|
get screenH() { return self.app.screen.height; },
|
|
5695
5699
|
render: () => self.renderBar(),
|
|
5696
5700
|
pushLayer: (node) => self.pushLayer(node),
|
|
5697
|
-
|
|
5701
|
+
// Route component-initiated closes through the controller (not straight to self.closeLayer) so
|
|
5702
|
+
// it clears its OverlayHandle. Otherwise the handle goes stale: hasOpenLayer() stays true and
|
|
5703
|
+
// keydowns keep routing to onKey on a destroyed overlay → write to a torn-down ScrollBox.
|
|
5704
|
+
closeLayer: () => host.actions.closeOverlay(),
|
|
5698
5705
|
fitModals: () => self.fitModals(),
|
|
5699
5706
|
fmt: (n) => host.formatCurrency(n),
|
|
5700
5707
|
fmtWin: (n) => host.formatCurrency(n, true),
|