@energy8platform/shell 0.2.0 → 0.2.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 +22 -8
- package/dist/html.cjs.js.map +1 -1
- package/dist/html.d.ts +2 -2
- package/dist/html.esm.js +22 -8
- package/dist/html.esm.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +1 -1
- package/dist/pixi.cjs.js +28 -11
- package/dist/pixi.cjs.js.map +1 -1
- package/dist/pixi.d.ts +2 -2
- package/dist/pixi.esm.js +28 -11
- package/dist/pixi.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/core/version.ts +1 -1
- package/src/ui/html/HtmlRenderer.ts +1 -1
- package/src/ui/html/components/GameInfo.ts +1 -1
- package/src/ui/html/components/Modal.ts +8 -4
- package/src/ui/html/components/Settings.ts +1 -1
- package/src/ui/html/shell.css.ts +11 -0
- package/src/ui/pixi/PixiRenderer.ts +4 -1
- package/src/ui/pixi/components/BuyBonus.ts +21 -10
- package/src/ui/pixi/primitives/scroll.ts +3 -0
package/dist/html.esm.js
CHANGED
|
@@ -1350,7 +1350,7 @@ class KeyboardController {
|
|
|
1350
1350
|
|
|
1351
1351
|
// AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
|
|
1352
1352
|
/** The @energy8platform/shell package version, stamped into the game-info footer. */
|
|
1353
|
-
const PACKAGE_VERSION = '0.2.
|
|
1353
|
+
const PACKAGE_VERSION = '0.2.3';
|
|
1354
1354
|
|
|
1355
1355
|
/** Apply defaults to the raw config (the mount target lives on the renderer, not here). */
|
|
1356
1356
|
function resolveConfig(config) {
|
|
@@ -2018,6 +2018,17 @@ const SHELL_CSS = SHELL_FONT_CSS + SHELL_DIGIT_FONT_CSS + `
|
|
|
2018
2018
|
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval { min-width:clamp(50px,14cqh,66px); }
|
|
2019
2019
|
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval b { font-size:clamp(9px,2.5cqh,11px); }
|
|
2020
2020
|
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval span { font-size:clamp(5px,1.25cqh,6px); }
|
|
2021
|
+
/* Popout S (very short landscape, e.g. 400×225): the height-fit shrank the cards' descriptions to an
|
|
2022
|
+
unreadable ~4px floor with nothing to scroll. Below a ~340px frame height, drop the shrink-to-fit and
|
|
2023
|
+
switch the (non-mobile) buy-bonus to a READABLE vertical stack that scrolls vertically — like mobile.
|
|
2024
|
+
Query the overlay's ge-bb-frame size container so it tracks the popout frame, not the browser window. */
|
|
2025
|
+
@container ge-bb-frame (max-height: 340px) {
|
|
2026
|
+
#${SHELL_ROOT_ID}:not(.ge-mobile) [data-ge="buybonus-overlay"] .ge-ov-scroll { overflow-y:auto; }
|
|
2027
|
+
#${SHELL_ROOT_ID}:not(.ge-mobile) [data-ge="buybonus-overlay"] .ge-ov-body { justify-content:flex-start; }
|
|
2028
|
+
#${SHELL_ROOT_ID}:not(.ge-mobile) .ge-bb-grid { flex-direction:column; align-items:center; overflow:visible; }
|
|
2029
|
+
#${SHELL_ROOT_ID}:not(.ge-mobile) .ge-bb-grid .ge-bonus-card {
|
|
2030
|
+
flex:0 0 auto; width:18em; font-size:min(12px, calc(84cqw / 18)); }
|
|
2031
|
+
}
|
|
2021
2032
|
|
|
2022
2033
|
/* ═══ desktop control bar — one continuous dark panel; white-disc buttons; BUY BONUS outside-left ═══ */
|
|
2023
2034
|
/* the dark surface fills the row width (BUY BONUS sits outside, to its left) */
|
|
@@ -2569,7 +2580,7 @@ function createOverlay(opts) {
|
|
|
2569
2580
|
}
|
|
2570
2581
|
|
|
2571
2582
|
function openSettingsModal(host) {
|
|
2572
|
-
const { root, body } = createOverlay({ title: host.t('Settings'), onClose: () =>
|
|
2583
|
+
const { root, body } = createOverlay({ title: host.t('Settings'), onClose: () => host.actions.closeOverlay() });
|
|
2573
2584
|
root.dataset.ge = 'settings-modal';
|
|
2574
2585
|
// Sound on/off — backed by the shell's shared `soundOn` state so this toggle and the Shift+M
|
|
2575
2586
|
// hotkey stay in sync; `setSound` emits `settingChange({ key: 'sound' })` and refreshes the icon.
|
|
@@ -2640,7 +2651,7 @@ const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
|
2640
2651
|
function openGameInfoModal(host) {
|
|
2641
2652
|
const { root, body, scroll } = createOverlay({
|
|
2642
2653
|
title: host.t('Game info'),
|
|
2643
|
-
onClose: () =>
|
|
2654
|
+
onClose: () => host.actions.closeOverlay(),
|
|
2644
2655
|
onBack: () => { root.remove(); host.actions.openSettings(); },
|
|
2645
2656
|
});
|
|
2646
2657
|
root.dataset.ge = 'info-modal';
|
|
@@ -3486,14 +3497,17 @@ function openAutoplayModal(host) {
|
|
|
3486
3497
|
|
|
3487
3498
|
/** Build a generic, externally-triggered modal (title + body text + optional action buttons),
|
|
3488
3499
|
* on the shared card-modal chrome. Each action runs its `on` then closes; the ✕ (if
|
|
3489
|
-
* `availableClose`) and the actions are the only ways to dismiss. See GameShell.openModal.
|
|
3490
|
-
|
|
3500
|
+
* `availableClose`) and the actions are the only ways to dismiss. See GameShell.openModal.
|
|
3501
|
+
* Dismissals route through host.actions.closeOverlay() so the controller clears its overlay handle
|
|
3502
|
+
* (a bare root.remove() leaves the handle stale → keydowns keep routing to a torn-down layer). */
|
|
3503
|
+
function buildModal(host, opts) {
|
|
3504
|
+
const close = () => host.actions.closeOverlay();
|
|
3491
3505
|
const ui = createCardModal({
|
|
3492
3506
|
ge: 'modal',
|
|
3493
3507
|
title: opts.title,
|
|
3494
3508
|
closable: opts.availableClose,
|
|
3495
3509
|
blur: opts.blurLevel,
|
|
3496
|
-
onClose:
|
|
3510
|
+
onClose: close,
|
|
3497
3511
|
});
|
|
3498
3512
|
const text = document.createElement('p');
|
|
3499
3513
|
text.className = 'ge-modal-text';
|
|
@@ -3514,7 +3528,7 @@ function buildModal(opts) {
|
|
|
3514
3528
|
}
|
|
3515
3529
|
else
|
|
3516
3530
|
btn.classList.add('ge-modal-btn--ghost');
|
|
3517
|
-
btn.addEventListener('click', () => { a.on?.();
|
|
3531
|
+
btn.addEventListener('click', () => { a.on?.(); close(); });
|
|
3518
3532
|
actions.appendChild(btn);
|
|
3519
3533
|
}
|
|
3520
3534
|
ui.card.appendChild(actions);
|
|
@@ -3725,7 +3739,7 @@ class HtmlRenderer {
|
|
|
3725
3739
|
return { root };
|
|
3726
3740
|
}
|
|
3727
3741
|
case 'modal': {
|
|
3728
|
-
const root = buildModal(req.opts);
|
|
3742
|
+
const root = buildModal(this.host, req.opts);
|
|
3729
3743
|
return { root, onKey: req.opts.onKey };
|
|
3730
3744
|
}
|
|
3731
3745
|
}
|