@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/html.cjs.js CHANGED
@@ -1330,7 +1330,7 @@ const D = {
1330
1330
  * supported, the disclaimer is translated and displayed in each language").
1331
1331
  *
1332
1332
  * Brand-free by construction. Stake's own template ends with a seventh line — "TM and © {year}
1333
- * Stake Engine." — and that one belongs to a Stake launch alone: it arrives with the Stake bridge's
1333
+ * Engine." — and that one belongs to a Stake launch alone: it arrives with the Stake bridge's
1334
1334
  * `INIT.config.disclaimerLines`, which outrank this default, and renders verbatim (see the host's
1335
1335
  * `isBrandLine`). Every other platform gets the same mandated wording without someone else's mark.
1336
1336
  */
@@ -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.4';
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.4";
645
645
  readonly actions: ShellActions;
646
646
  private renderer;
647
647
  private i18n;
@@ -793,14 +793,14 @@ declare function createI18n(opts: I18nOptions): I18n;
793
793
  * supported, the disclaimer is translated and displayed in each language").
794
794
  *
795
795
  * Brand-free by construction. Stake's own template ends with a seventh line — "TM and © {year}
796
- * Stake Engine." — and that one belongs to a Stake launch alone: it arrives with the Stake bridge's
796
+ * Engine." — and that one belongs to a Stake launch alone: it arrives with the Stake bridge's
797
797
  * `INIT.config.disclaimerLines`, which outrank this default, and renders verbatim (see the host's
798
798
  * `isBrandLine`). Every other platform gets the same mandated wording without someone else's mark.
799
799
  */
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.4";
804
804
 
805
805
  /**
806
806
  * What a scrollable region should ADVERTISE about itself.
package/dist/html.esm.js CHANGED
@@ -1328,7 +1328,7 @@ const D = {
1328
1328
  * supported, the disclaimer is translated and displayed in each language").
1329
1329
  *
1330
1330
  * Brand-free by construction. Stake's own template ends with a seventh line — "TM and © {year}
1331
- * Stake Engine." — and that one belongs to a Stake launch alone: it arrives with the Stake bridge's
1331
+ * Engine." — and that one belongs to a Stake launch alone: it arrives with the Stake bridge's
1332
1332
  * `INIT.config.disclaimerLines`, which outrank this default, and renders verbatim (see the host's
1333
1333
  * `isBrandLine`). Every other platform gets the same mandated wording without someone else's mark.
1334
1334
  */
@@ -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.4';
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
@@ -1304,7 +1304,7 @@ const D = {
1304
1304
  * supported, the disclaimer is translated and displayed in each language").
1305
1305
  *
1306
1306
  * Brand-free by construction. Stake's own template ends with a seventh line — "TM and © {year}
1307
- * Stake Engine." — and that one belongs to a Stake launch alone: it arrives with the Stake bridge's
1307
+ * Engine." — and that one belongs to a Stake launch alone: it arrives with the Stake bridge's
1308
1308
  * `INIT.config.disclaimerLines`, which outrank this default, and renders verbatim (see the host's
1309
1309
  * `isBrandLine`). Every other platform gets the same mandated wording without someone else's mark.
1310
1310
  */
@@ -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.4';
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.4";
645
645
  readonly actions: ShellActions;
646
646
  private renderer;
647
647
  private i18n;
@@ -793,14 +793,14 @@ declare function createI18n(opts: I18nOptions): I18n;
793
793
  * supported, the disclaimer is translated and displayed in each language").
794
794
  *
795
795
  * Brand-free by construction. Stake's own template ends with a seventh line — "TM and © {year}
796
- * Stake Engine." — and that one belongs to a Stake launch alone: it arrives with the Stake bridge's
796
+ * Engine." — and that one belongs to a Stake launch alone: it arrives with the Stake bridge's
797
797
  * `INIT.config.disclaimerLines`, which outrank this default, and renders verbatim (see the host's
798
798
  * `isBrandLine`). Every other platform gets the same mandated wording without someone else's mark.
799
799
  */
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.4";
804
804
 
805
805
  /**
806
806
  * What a scrollable region should ADVERTISE about itself.
package/dist/index.esm.js CHANGED
@@ -1302,7 +1302,7 @@ const D = {
1302
1302
  * supported, the disclaimer is translated and displayed in each language").
1303
1303
  *
1304
1304
  * Brand-free by construction. Stake's own template ends with a seventh line — "TM and © {year}
1305
- * Stake Engine." — and that one belongs to a Stake launch alone: it arrives with the Stake bridge's
1305
+ * Engine." — and that one belongs to a Stake launch alone: it arrives with the Stake bridge's
1306
1306
  * `INIT.config.disclaimerLines`, which outrank this default, and renders verbatim (see the host's
1307
1307
  * `isBrandLine`). Every other platform gets the same mandated wording without someone else's mark.
1308
1308
  */
@@ -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.4';
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
@@ -1331,7 +1331,7 @@ const D = {
1331
1331
  * supported, the disclaimer is translated and displayed in each language").
1332
1332
  *
1333
1333
  * Brand-free by construction. Stake's own template ends with a seventh line — "TM and © {year}
1334
- * Stake Engine." — and that one belongs to a Stake launch alone: it arrives with the Stake bridge's
1334
+ * Engine." — and that one belongs to a Stake launch alone: it arrives with the Stake bridge's
1335
1335
  * `INIT.config.disclaimerLines`, which outrank this default, and renders verbatim (see the host's
1336
1336
  * `isBrandLine`). Every other platform gets the same mandated wording without someone else's mark.
1337
1337
  */
@@ -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.4';
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 +