@energy8platform/shell 0.6.1 → 0.6.2
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 +1 -1
- package/dist/html.d.ts +2 -2
- package/dist/html.esm.js +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 +19 -2
- package/dist/pixi.cjs.js.map +1 -1
- package/dist/pixi.d.ts +2 -2
- package/dist/pixi.esm.js +19 -2
- package/dist/pixi.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/core/version.ts +1 -1
- package/src/ui/pixi/components/GameInfo.ts +18 -1
package/dist/pixi.d.ts
CHANGED
|
@@ -513,7 +513,7 @@ declare class ShellController extends EventEmitter<ShellEvents> implements Shell
|
|
|
513
513
|
tokens: ShellTokens;
|
|
514
514
|
layout: ShellLayoutMode;
|
|
515
515
|
soundOn: boolean;
|
|
516
|
-
readonly engineVersion = "0.6.
|
|
516
|
+
readonly engineVersion = "0.6.2";
|
|
517
517
|
readonly actions: ShellActions;
|
|
518
518
|
private renderer;
|
|
519
519
|
private i18n;
|
|
@@ -595,7 +595,7 @@ interface I18n {
|
|
|
595
595
|
declare function createI18n(opts: I18nOptions): I18n;
|
|
596
596
|
|
|
597
597
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
598
|
-
declare const PACKAGE_VERSION = "0.6.
|
|
598
|
+
declare const PACKAGE_VERSION = "0.6.2";
|
|
599
599
|
|
|
600
600
|
/** A shell: the renderer-agnostic controller plus the surface facade (safeArea/barHeight/setVisible)
|
|
601
601
|
* an embedding host reads. `createShell`, `createGameShell` and `createPixiShell` all return this. */
|
package/dist/pixi.esm.js
CHANGED
|
@@ -1447,7 +1447,7 @@ class KeyboardController {
|
|
|
1447
1447
|
|
|
1448
1448
|
// AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
|
|
1449
1449
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
1450
|
-
const PACKAGE_VERSION = '0.6.
|
|
1450
|
+
const PACKAGE_VERSION = '0.6.2';
|
|
1451
1451
|
|
|
1452
1452
|
/** Apply defaults to the raw config (the mount target lives on the renderer, not here). */
|
|
1453
1453
|
function resolveConfig(config) {
|
|
@@ -4632,7 +4632,7 @@ function sectionCustom(host, s, width) {
|
|
|
4632
4632
|
const sec = section(host, s.title != null ? host.t(s.title) : undefined);
|
|
4633
4633
|
const inner = width - SECTION_PAD;
|
|
4634
4634
|
if (s.node) {
|
|
4635
|
-
sec.add(s.node); // game-supplied Pixi content owns its own layout
|
|
4635
|
+
sec.add(persistentSlot(s.node)); // game-supplied Pixi content owns its own layout
|
|
4636
4636
|
}
|
|
4637
4637
|
else if (s.html) {
|
|
4638
4638
|
const text = s.html.replace(/<[^>]*>/g, ' ').replace(/\s+/g, ' ').trim();
|
|
@@ -4689,6 +4689,23 @@ function spacerBox(w, h) {
|
|
|
4689
4689
|
g.rect(0, 0, w, h).fill({ color: 0xffffff, alpha: 0 });
|
|
4690
4690
|
return g;
|
|
4691
4691
|
}
|
|
4692
|
+
/** Wrap a GAME-supplied custom `node` so the shell BORROWS it instead of owning it. The overlay is
|
|
4693
|
+
* torn down with `destroy({ children: true })` on every close; that would recursively destroy the
|
|
4694
|
+
* game's node, so the section renders blank on reopen. This slot's `destroy` DETACHES the node
|
|
4695
|
+
* (leaving it intact) and destroys only the empty wrapper — the SAME node instance is re-mounted,
|
|
4696
|
+
* with all its drawing, the next time Game info opens. Mirrors the HTML shell, where the game's DOM
|
|
4697
|
+
* node simply persists in config across open/close. The game owns the node's lifetime, not us. */
|
|
4698
|
+
function persistentSlot(node) {
|
|
4699
|
+
const slot = new Container();
|
|
4700
|
+
slot.addChild(node);
|
|
4701
|
+
const destroySelf = Container.prototype.destroy.bind(slot);
|
|
4702
|
+
slot.destroy = () => {
|
|
4703
|
+
if (node.parent === slot)
|
|
4704
|
+
slot.removeChild(node); // keep the game node alive for the next open
|
|
4705
|
+
destroySelf({ children: false });
|
|
4706
|
+
};
|
|
4707
|
+
return slot;
|
|
4708
|
+
}
|
|
4692
4709
|
/** A fixed box that loads an image into it (object-fit: contain) once the texture resolves. */
|
|
4693
4710
|
function imageBox(url, w, h) {
|
|
4694
4711
|
const c = new Container();
|