@energy8platform/shell 0.11.2 → 0.11.4

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
@@ -643,7 +643,7 @@ declare class ShellController extends EventEmitter<ShellEvents> implements Shell
643
643
  tokens: ShellTokens;
644
644
  layout: ShellLayoutMode;
645
645
  soundOn: boolean;
646
- readonly engineVersion = "0.11.2";
646
+ readonly engineVersion = "0.11.4";
647
647
  readonly actions: ShellActions;
648
648
  private renderer;
649
649
  private i18n;
@@ -795,14 +795,14 @@ declare function createI18n(opts: I18nOptions): I18n;
795
795
  * supported, the disclaimer is translated and displayed in each language").
796
796
  *
797
797
  * Brand-free by construction. Stake's own template ends with a seventh line — "TM and © {year}
798
- * Stake Engine." — and that one belongs to a Stake launch alone: it arrives with the Stake bridge's
798
+ * Engine." — and that one belongs to a Stake launch alone: it arrives with the Stake bridge's
799
799
  * `INIT.config.disclaimerLines`, which outrank this default, and renders verbatim (see the host's
800
800
  * `isBrandLine`). Every other platform gets the same mandated wording without someone else's mark.
801
801
  */
802
802
  declare const DISCLAIMER_LINES: readonly string[];
803
803
 
804
804
  /** The @energy8platform/shell package version, stamped into the game-info footer. */
805
- declare const PACKAGE_VERSION = "0.11.2";
805
+ declare const PACKAGE_VERSION = "0.11.4";
806
806
 
807
807
  /**
808
808
  * What a scrollable region should ADVERTISE about itself.
package/dist/pixi.esm.js CHANGED
@@ -1329,7 +1329,7 @@ const D = {
1329
1329
  * supported, the disclaimer is translated and displayed in each language").
1330
1330
  *
1331
1331
  * Brand-free by construction. Stake's own template ends with a seventh line — "TM and © {year}
1332
- * Stake Engine." — and that one belongs to a Stake launch alone: it arrives with the Stake bridge's
1332
+ * Engine." — and that one belongs to a Stake launch alone: it arrives with the Stake bridge's
1333
1333
  * `INIT.config.disclaimerLines`, which outrank this default, and renders verbatim (see the host's
1334
1334
  * `isBrandLine`). Every other platform gets the same mandated wording without someone else's mark.
1335
1335
  */
@@ -1753,7 +1753,7 @@ function keyboardCapable(win = typeof window === 'undefined' ? undefined : windo
1753
1753
 
1754
1754
  // AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
1755
1755
  /** The @energy8platform/shell package version, stamped into the game-info footer. */
1756
- const PACKAGE_VERSION = '0.11.2';
1756
+ const PACKAGE_VERSION = '0.11.4';
1757
1757
 
1758
1758
  /** Apply defaults to the raw config (the mount target lives on the renderer, not here). */
1759
1759
  function resolveConfig(config) {
@@ -5853,6 +5853,9 @@ class BuyBonusOverlay extends Container {
5853
5853
  dragFrom = 0;
5854
5854
  dragBase = 0;
5855
5855
  dragged = false; // a tap that actually moved → suppress the card select
5856
+ // The wheel is a canvas listener, not a Pixi event: Pixi's federated events don't carry `wheel`.
5857
+ canvas;
5858
+ wheelHandler;
5856
5859
  constructor(host, bonuses) {
5857
5860
  super();
5858
5861
  this.host = host;
@@ -5868,6 +5871,47 @@ class BuyBonusOverlay extends Container {
5868
5871
  this.on('pointerup', this.onDragUp);
5869
5872
  this.on('pointerupoutside', this.onDragUp);
5870
5873
  this.resize(host.screenW, host.screenH);
5874
+ // Stake asked for this band to be "scrollable, not only draggable": on a Popout S frame the
5875
+ // cards stack past the bottom, and a drag was the only way to reach the last one. Every other
5876
+ // scroll region in this shell (ScrollBox) already takes the wheel; this strip rolls its own
5877
+ // scroll, so it needs its own listener.
5878
+ if (host.canvas) {
5879
+ this.canvas = host.canvas;
5880
+ this.wheelHandler = (e) => {
5881
+ // Swallowed whether or not we scroll: on Stake the game is an iframe, and a wheel this
5882
+ // overlay ignores scrolls the casino page behind it (same rule as ScrollBox).
5883
+ e.preventDefault();
5884
+ if (this.confirm)
5885
+ return; // the confirm card is on top — don't move the strip beneath it
5886
+ // A mouse reports deltaY on either layout; a trackpad swipe across the horizontal row
5887
+ // reports deltaX. Take whichever axis the gesture actually favoured.
5888
+ this.scrollBy(Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY);
5889
+ };
5890
+ this.canvas.addEventListener('wheel', this.wheelHandler, { passive: false });
5891
+ }
5892
+ }
5893
+ /** Move the card band `delta` px along its scroll axis, clamped to the drag's own range. The
5894
+ * wheel's entry point; the drag writes `dragX` straight from the pointer delta. */
5895
+ scrollBy(delta) {
5896
+ if (this.destroyed || this.dragMax <= 0)
5897
+ return;
5898
+ const next = clamp(-this.dragMax, this.dragX - delta, 0);
5899
+ if (next === this.dragX)
5900
+ return;
5901
+ this.dragX = next;
5902
+ if (this.dragAxis === 'x')
5903
+ this.strip.position.x = this.dragBaseX + this.dragX;
5904
+ else
5905
+ this.strip.position.y = this.dragBaseY + this.dragX;
5906
+ this.syncScrollCue();
5907
+ }
5908
+ /** Drop the canvas listener. Called from both onRemove (the normal close) and destroy, so a
5909
+ * layer torn down without onRemove can't leave a handler swallowing every wheel on the page. */
5910
+ detachWheel() {
5911
+ if (this.canvas && this.wheelHandler)
5912
+ this.canvas.removeEventListener('wheel', this.wheelHandler);
5913
+ this.wheelHandler = undefined;
5914
+ this.canvas = undefined;
5871
5915
  }
5872
5916
  onDragDown = (e) => {
5873
5917
  if (this.confirm || this.dragMax <= 0)
@@ -6359,7 +6403,11 @@ class BuyBonusOverlay extends Container {
6359
6403
  /* cards already sized to the area */
6360
6404
  }
6361
6405
  onRemove() {
6362
- /* nothing extra */
6406
+ this.detachWheel();
6407
+ }
6408
+ destroy(options) {
6409
+ this.detachWheel();
6410
+ super.destroy(options);
6363
6411
  }
6364
6412
  }
6365
6413
  /** Wrapper for a game-supplied custom card (`BonusOption.custom`). The shell keeps the card slot (sizing +