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