@energy8platform/shell 0.11.2 → 0.11.3

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