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