@energy8platform/shell 0.6.4 → 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 +4 -10
- package/dist/html.cjs.js.map +1 -1
- package/dist/html.d.ts +7 -4
- package/dist/html.esm.js +4 -10
- package/dist/html.esm.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.esm.js +1 -1
- package/dist/pixi.cjs.js +8 -11
- package/dist/pixi.cjs.js.map +1 -1
- package/dist/pixi.d.ts +7 -6
- package/dist/pixi.esm.js +8 -11
- package/dist/pixi.esm.js.map +1 -1
- package/package.json +1 -1
- 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.d.ts
CHANGED
|
@@ -450,6 +450,11 @@ interface ShellHost {
|
|
|
450
450
|
setVolumeRefresh(fn: ((key: VolumeKey, value: number) => void) | null): void;
|
|
451
451
|
/** Logic-bearing actions invoked by renderer controls. */
|
|
452
452
|
readonly actions: ShellActions;
|
|
453
|
+
/** Re-show the replay summary modal through the controller (keeps its OverlayHandle in sync).
|
|
454
|
+
* Used as the modal's own reopen callback after START REPLAY, so a renderer never re-pushes a
|
|
455
|
+
* replay modal behind the controller's back (which would strand `overlay` and dead-end the
|
|
456
|
+
* next close). */
|
|
457
|
+
openReplay(opts: ReplayModalOptions): void;
|
|
453
458
|
}
|
|
454
459
|
/** Every state-changing thing a control can do. Each runs logic in the controller, emits the
|
|
455
460
|
* matching event, and triggers a re-render. Renderers MUST route input through these. */
|
|
@@ -511,7 +516,7 @@ declare class ShellController extends EventEmitter<ShellEvents> implements Shell
|
|
|
511
516
|
tokens: ShellTokens;
|
|
512
517
|
layout: ShellLayoutMode;
|
|
513
518
|
soundOn: boolean;
|
|
514
|
-
readonly engineVersion = "0.6.
|
|
519
|
+
readonly engineVersion = "0.6.5";
|
|
515
520
|
readonly actions: ShellActions;
|
|
516
521
|
private renderer;
|
|
517
522
|
private i18n;
|
|
@@ -593,7 +598,7 @@ interface I18n {
|
|
|
593
598
|
declare function createI18n(opts: I18nOptions): I18n;
|
|
594
599
|
|
|
595
600
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
596
|
-
declare const PACKAGE_VERSION = "0.6.
|
|
601
|
+
declare const PACKAGE_VERSION = "0.6.5";
|
|
597
602
|
|
|
598
603
|
/** A shell: the renderer-agnostic controller plus the surface facade (safeArea/barHeight/setVisible)
|
|
599
604
|
* an embedding host reads. `createShell`, `createGameShell` and `createPixiShell` all return this. */
|
|
@@ -640,8 +645,6 @@ declare class HtmlRenderer implements ShellRenderer {
|
|
|
640
645
|
fitBar(): void;
|
|
641
646
|
private cancelMoneyAnims;
|
|
642
647
|
private buildOverlay;
|
|
643
|
-
/** Opens a replay modal and shows it — used as the reopen callback after START REPLAY. */
|
|
644
|
-
private openReplayInternal;
|
|
645
648
|
private showModal;
|
|
646
649
|
/** Uniformly scale every open centred card modal (.ge-sheet) down so it fits a short/narrow
|
|
647
650
|
* popout. Covers pickers, generic + replay modals, AND the buy-bonus confirm (which is hosted
|
package/dist/html.esm.js
CHANGED
|
@@ -1453,7 +1453,7 @@ class KeyboardController {
|
|
|
1453
1453
|
|
|
1454
1454
|
// AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
|
|
1455
1455
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
1456
|
-
const PACKAGE_VERSION = '0.6.
|
|
1456
|
+
const PACKAGE_VERSION = '0.6.5';
|
|
1457
1457
|
|
|
1458
1458
|
/** Apply defaults to the raw config (the mount target lives on the renderer, not here). */
|
|
1459
1459
|
function resolveConfig(config) {
|
|
@@ -4025,7 +4025,9 @@ class HtmlRenderer {
|
|
|
4025
4025
|
}
|
|
4026
4026
|
case 'replay': {
|
|
4027
4027
|
const opts = req.opts;
|
|
4028
|
-
|
|
4028
|
+
// Reopen through the controller (not a renderer-direct re-push) so its OverlayHandle stays
|
|
4029
|
+
// in sync — otherwise a reopened replay modal is untracked and the next close no-ops.
|
|
4030
|
+
const reopen = () => { this.host.openReplay(opts); };
|
|
4029
4031
|
const root = buildReplayModal(this.host, opts, reopen);
|
|
4030
4032
|
return { root };
|
|
4031
4033
|
}
|
|
@@ -4035,14 +4037,6 @@ class HtmlRenderer {
|
|
|
4035
4037
|
}
|
|
4036
4038
|
}
|
|
4037
4039
|
}
|
|
4038
|
-
/** Opens a replay modal and shows it — used as the reopen callback after START REPLAY. */
|
|
4039
|
-
openReplayInternal(opts) {
|
|
4040
|
-
if (this.destroyed)
|
|
4041
|
-
return;
|
|
4042
|
-
const reopen = () => { this.openReplayInternal(opts); };
|
|
4043
|
-
const root = buildReplayModal(this.host, opts, reopen);
|
|
4044
|
-
this.showModal(root);
|
|
4045
|
-
}
|
|
4046
4040
|
showModal(el, onKey) {
|
|
4047
4041
|
// Drop focus from any open shell control so a stray Space/Enter doesn't re-activate it
|
|
4048
4042
|
const active = document.activeElement;
|