@energy8platform/shell 0.11.1 → 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 +2 -2
- package/dist/html.d.ts +2 -2
- package/dist/html.esm.js +2 -2
- package/dist/index.cjs.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +2 -2
- package/dist/pixi.cjs.js +51 -3
- package/dist/pixi.cjs.js.map +1 -1
- package/dist/pixi.d.ts +2 -2
- package/dist/pixi.esm.js +51 -3
- package/dist/pixi.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/core/locales.ts +1 -1
- package/src/core/version.ts +1 -1
- package/src/ui/pixi/components/BuyBonus.ts +46 -1
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.
|
|
646
|
+
readonly engineVersion = "0.11.3";
|
|
647
647
|
readonly actions: ShellActions;
|
|
648
648
|
private renderer;
|
|
649
649
|
private i18n;
|
|
@@ -802,7 +802,7 @@ declare function createI18n(opts: I18nOptions): I18n;
|
|
|
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.
|
|
805
|
+
declare const PACKAGE_VERSION = "0.11.3";
|
|
806
806
|
|
|
807
807
|
/**
|
|
808
808
|
* What a scrollable region should ADVERTISE about itself.
|
package/dist/pixi.esm.js
CHANGED
|
@@ -1313,7 +1313,7 @@ const BASE_LOCALES = {
|
|
|
1313
1313
|
// Kept in a separate block (grouped per language, not interleaved) because these are long legal
|
|
1314
1314
|
// sentences, MACHINE-TRANSLATED and pending native QA. The keys are the exact English source lines
|
|
1315
1315
|
// the Stake bridge emits (see @energy8platform/stake-bridge `buildDisclaimer`). The copyright/brand
|
|
1316
|
-
// line ("TM and © {year}
|
|
1316
|
+
// line ("TM and © {year} Engine.") is deliberately omitted — it renders verbatim.
|
|
1317
1317
|
const D = {
|
|
1318
1318
|
L1: 'Malfunction voids all wins and plays.',
|
|
1319
1319
|
L2: 'A consistent internet connection is required. In the event of a disconnection, reload the game to finish any uncompleted rounds.',
|
|
@@ -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.
|
|
1756
|
+
const PACKAGE_VERSION = '0.11.3';
|
|
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
|
-
|
|
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 +
|