@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/pixi.d.ts CHANGED
@@ -452,6 +452,11 @@ interface ShellHost {
452
452
  setVolumeRefresh(fn: ((key: VolumeKey, value: number) => void) | null): void;
453
453
  /** Logic-bearing actions invoked by renderer controls. */
454
454
  readonly actions: ShellActions;
455
+ /** Re-show the replay summary modal through the controller (keeps its OverlayHandle in sync).
456
+ * Used as the modal's own reopen callback after START REPLAY, so a renderer never re-pushes a
457
+ * replay modal behind the controller's back (which would strand `overlay` and dead-end the
458
+ * next close). */
459
+ openReplay(opts: ReplayModalOptions): void;
455
460
  }
456
461
  /** Every state-changing thing a control can do. Each runs logic in the controller, emits the
457
462
  * matching event, and triggers a re-render. Renderers MUST route input through these. */
@@ -513,7 +518,7 @@ declare class ShellController extends EventEmitter<ShellEvents> implements Shell
513
518
  tokens: ShellTokens;
514
519
  layout: ShellLayoutMode;
515
520
  soundOn: boolean;
516
- readonly engineVersion = "0.6.4";
521
+ readonly engineVersion = "0.6.5";
517
522
  readonly actions: ShellActions;
518
523
  private renderer;
519
524
  private i18n;
@@ -595,7 +600,7 @@ interface I18n {
595
600
  declare function createI18n(opts: I18nOptions): I18n;
596
601
 
597
602
  /** The @energy8platform/shell package version, stamped into the game-info footer. */
598
- declare const PACKAGE_VERSION = "0.6.4";
603
+ declare const PACKAGE_VERSION = "0.6.5";
599
604
 
600
605
  /** A shell: the renderer-agnostic controller plus the surface facade (safeArea/barHeight/setVisible)
601
606
  * an embedding host reads. `createShell`, `createGameShell` and `createPixiShell` all return this. */
@@ -672,10 +677,6 @@ declare class PixiRenderer implements ShellRenderer {
672
677
  closeLayer(): void;
673
678
  private clearLayer;
674
679
  fitModals(): void;
675
- /** Replay's reopen path: a replay modal can rebuild itself (e.g. after a replay completes). It is
676
- * routed back through the controller-equivalent open flow so the layer stack + backdrop stay in
677
- * sync — mirrors PixiGameShell.openReplay (push a fresh replay modal). */
678
- private openReplayInternal;
679
680
  /** Snapshot the scene behind the modal layer and blur it — the Pixi analogue of the overlay's
680
681
  * `backdrop-filter: blur(20px) saturate(120%)`. Static (captured at open time): the game is paused
681
682
  * under a modal, so a live re-blur each frame isn't worth the cost. */
package/dist/pixi.esm.js CHANGED
@@ -1454,7 +1454,7 @@ class KeyboardController {
1454
1454
 
1455
1455
  // AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
1456
1456
  /** The @energy8platform/shell package version, stamped into the game-info footer. */
1457
- const PACKAGE_VERSION = '0.6.4';
1457
+ const PACKAGE_VERSION = '0.6.5';
1458
1458
 
1459
1459
  /** Apply defaults to the raw config (the mount target lives on the renderer, not here). */
1460
1460
  function resolveConfig(config) {
@@ -1932,6 +1932,11 @@ function makeText(str, opts) {
1932
1932
  if (opts.wrapWidth != null) {
1933
1933
  style.wordWrap = true;
1934
1934
  style.wordWrapWidth = opts.wrapWidth;
1935
+ // CJK (and any long unbroken run) has no spaces to wrap on — without breakWords the line
1936
+ // overflows the wrap width instead of wrapping. This is the single shell text helper (How to
1937
+ // Play, disclaimer, Game Info section titles, mode table, win messages, buy-bonus cards), so
1938
+ // one flag fixes wrapping everywhere.
1939
+ style.breakWords = true;
1935
1940
  }
1936
1941
  if (opts.lineHeight != null)
1937
1942
  style.lineHeight = opts.lineHeight;
@@ -5991,7 +5996,7 @@ class PixiRenderer {
5991
5996
  layer = openAutoplayPicker(this.ctx);
5992
5997
  break;
5993
5998
  case 'replay':
5994
- layer = buildReplayModal(this.ctx, req.opts, () => this.openReplayInternal(req.opts));
5999
+ layer = buildReplayModal(this.ctx, req.opts, () => this.host.openReplay(req.opts));
5995
6000
  break;
5996
6001
  case 'modal':
5997
6002
  layer = buildModal(this.ctx, req.opts);
@@ -6065,15 +6070,6 @@ class PixiRenderer {
6065
6070
  fitModals() {
6066
6071
  this.currentLayer?.fit?.();
6067
6072
  }
6068
- /** Replay's reopen path: a replay modal can rebuild itself (e.g. after a replay completes). It is
6069
- * routed back through the controller-equivalent open flow so the layer stack + backdrop stay in
6070
- * sync — mirrors PixiGameShell.openReplay (push a fresh replay modal). */
6071
- openReplayInternal(opts) {
6072
- if (this.destroyed)
6073
- return;
6074
- const layer = buildReplayModal(this.ctx, opts, () => this.openReplayInternal(opts));
6075
- this.pushLayer(layer);
6076
- }
6077
6073
  // ── frosted backdrop ─────────────────────────────────────────────────────────
6078
6074
  /** Snapshot the scene behind the modal layer and blur it — the Pixi analogue of the overlay's
6079
6075
  * `backdrop-filter: blur(20px) saturate(120%)`. Static (captured at open time): the game is paused
@@ -6170,6 +6166,7 @@ class PixiRenderer {
6170
6166
  get layout() { return host.layout; },
6171
6167
  get soundOn() { return host.soundOn; },
6172
6168
  get actions() { return host.actions; },
6169
+ openReplay: (opts) => host.openReplay(opts),
6173
6170
  t: (s) => host.t(s),
6174
6171
  formatCurrency: (n, win) => host.formatCurrency(n, win),
6175
6172
  emit: host.emit.bind(host),