@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/index.cjs.js
CHANGED
|
@@ -1429,7 +1429,7 @@ class KeyboardController {
|
|
|
1429
1429
|
|
|
1430
1430
|
// AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
|
|
1431
1431
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
1432
|
-
const PACKAGE_VERSION = '0.6.
|
|
1432
|
+
const PACKAGE_VERSION = '0.6.5';
|
|
1433
1433
|
|
|
1434
1434
|
/** Apply defaults to the raw config (the mount target lives on the renderer, not here). */
|
|
1435
1435
|
function resolveConfig(config) {
|
package/dist/index.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. */
|
package/dist/index.esm.js
CHANGED
|
@@ -1427,7 +1427,7 @@ class KeyboardController {
|
|
|
1427
1427
|
|
|
1428
1428
|
// AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
|
|
1429
1429
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
1430
|
-
const PACKAGE_VERSION = '0.6.
|
|
1430
|
+
const PACKAGE_VERSION = '0.6.5';
|
|
1431
1431
|
|
|
1432
1432
|
/** Apply defaults to the raw config (the mount target lives on the renderer, not here). */
|
|
1433
1433
|
function resolveConfig(config) {
|
package/dist/pixi.cjs.js
CHANGED
|
@@ -1456,7 +1456,7 @@ class KeyboardController {
|
|
|
1456
1456
|
|
|
1457
1457
|
// AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
|
|
1458
1458
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
1459
|
-
const PACKAGE_VERSION = '0.6.
|
|
1459
|
+
const PACKAGE_VERSION = '0.6.5';
|
|
1460
1460
|
|
|
1461
1461
|
/** Apply defaults to the raw config (the mount target lives on the renderer, not here). */
|
|
1462
1462
|
function resolveConfig(config) {
|
|
@@ -1934,6 +1934,11 @@ function makeText(str, opts) {
|
|
|
1934
1934
|
if (opts.wrapWidth != null) {
|
|
1935
1935
|
style.wordWrap = true;
|
|
1936
1936
|
style.wordWrapWidth = opts.wrapWidth;
|
|
1937
|
+
// CJK (and any long unbroken run) has no spaces to wrap on — without breakWords the line
|
|
1938
|
+
// overflows the wrap width instead of wrapping. This is the single shell text helper (How to
|
|
1939
|
+
// Play, disclaimer, Game Info section titles, mode table, win messages, buy-bonus cards), so
|
|
1940
|
+
// one flag fixes wrapping everywhere.
|
|
1941
|
+
style.breakWords = true;
|
|
1937
1942
|
}
|
|
1938
1943
|
if (opts.lineHeight != null)
|
|
1939
1944
|
style.lineHeight = opts.lineHeight;
|
|
@@ -5993,7 +5998,7 @@ class PixiRenderer {
|
|
|
5993
5998
|
layer = openAutoplayPicker(this.ctx);
|
|
5994
5999
|
break;
|
|
5995
6000
|
case 'replay':
|
|
5996
|
-
layer = buildReplayModal(this.ctx, req.opts, () => this.
|
|
6001
|
+
layer = buildReplayModal(this.ctx, req.opts, () => this.host.openReplay(req.opts));
|
|
5997
6002
|
break;
|
|
5998
6003
|
case 'modal':
|
|
5999
6004
|
layer = buildModal(this.ctx, req.opts);
|
|
@@ -6067,15 +6072,6 @@ class PixiRenderer {
|
|
|
6067
6072
|
fitModals() {
|
|
6068
6073
|
this.currentLayer?.fit?.();
|
|
6069
6074
|
}
|
|
6070
|
-
/** Replay's reopen path: a replay modal can rebuild itself (e.g. after a replay completes). It is
|
|
6071
|
-
* routed back through the controller-equivalent open flow so the layer stack + backdrop stay in
|
|
6072
|
-
* sync — mirrors PixiGameShell.openReplay (push a fresh replay modal). */
|
|
6073
|
-
openReplayInternal(opts) {
|
|
6074
|
-
if (this.destroyed)
|
|
6075
|
-
return;
|
|
6076
|
-
const layer = buildReplayModal(this.ctx, opts, () => this.openReplayInternal(opts));
|
|
6077
|
-
this.pushLayer(layer);
|
|
6078
|
-
}
|
|
6079
6075
|
// ── frosted backdrop ─────────────────────────────────────────────────────────
|
|
6080
6076
|
/** Snapshot the scene behind the modal layer and blur it — the Pixi analogue of the overlay's
|
|
6081
6077
|
* `backdrop-filter: blur(20px) saturate(120%)`. Static (captured at open time): the game is paused
|
|
@@ -6172,6 +6168,7 @@ class PixiRenderer {
|
|
|
6172
6168
|
get layout() { return host.layout; },
|
|
6173
6169
|
get soundOn() { return host.soundOn; },
|
|
6174
6170
|
get actions() { return host.actions; },
|
|
6171
|
+
openReplay: (opts) => host.openReplay(opts),
|
|
6175
6172
|
t: (s) => host.t(s),
|
|
6176
6173
|
formatCurrency: (n, win) => host.formatCurrency(n, win),
|
|
6177
6174
|
emit: host.emit.bind(host),
|