@energy8platform/platform-core 0.26.0 → 0.26.1

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/shell.cjs.js CHANGED
@@ -643,15 +643,19 @@ const SHELL_CSS = SHELL_FONT_CSS + `
643
643
  #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-ov-body { max-width:none; padding:clamp(6px,2.5cqh,16px) clamp(12px,3vw,28px); }
644
644
  #${SHELL_ROOT_ID} .ge-bb-grid { display:flex; gap:14px; justify-content:safe center; overflow-x:auto; overflow-y:hidden; padding-bottom:6px;
645
645
  scroll-snap-type:x proximity; -webkit-overflow-scrolling:touch; }
646
- /* the one knob that scales the whole card cqh measures the overlay (popout frame), not the
647
- browser window, so cards shrink to fit the real container height. The floor is deliberately tiny:
648
- on a 400×225 popout the whole card (incl. the CTA) only fits below ~5px, and a fully visible,
649
- single-axis-scrolling card beats a bigger one whose button is clipped or needs a 2nd scrollbar. */
646
+ /* the one knob that scales the whole card (its whole layout is em-relative). It is the SMALLER of two
647
+ fits, so the card is always fully visible:
648
+ 3.4cqh height: the card stays inside the band between the header and the bet footer (cqh
649
+ measures the overlay popout frame, not the browser window);
650
+ • 84cqw / (N*18) — width: the N cards (each 18em) fit the frame width side-by-side instead of
651
+ overflowing into an X-scroll. --ge-bb-n is the live card count, set in BuyBonus.ts.
652
+ Floor is deliberately tiny: on a 400×225 popout a fully visible card beats a bigger clipped one. */
650
653
  #${SHELL_ROOT_ID} .ge-bb-grid .ge-bonus-card { flex:0 0 18em; scroll-snap-align:start;
651
- font-size:clamp(4px, 3.4cqh, 12px); }
652
- /* mobile: vertical stack at a fixed, readable size — scroll the list, don't shrink the cards */
654
+ font-size:clamp(4px, min(3.4cqh, calc(84cqw / (var(--ge-bb-n,3) * 18))), 12px); }
655
+ /* mobile: vertical stack at a fixed, readable size — scroll the list; only shrink if the card would
656
+ be wider than the frame (very narrow viewport), so it never overflows horizontally. */
653
657
  #${SHELL_ROOT_ID}.ge-mobile .ge-bb-grid { display:flex; flex-direction:column; gap:14px; overflow:visible; }
654
- #${SHELL_ROOT_ID}.ge-mobile .ge-bb-grid .ge-bonus-card { flex:0 0 auto; font-size:12px; }
658
+ #${SHELL_ROOT_ID}.ge-mobile .ge-bb-grid .ge-bonus-card { flex:0 0 auto; font-size:min(12px, calc(92cqw / 18)); }
655
659
  #${SHELL_ROOT_ID} .ge-bonus-card { display:flex; flex-direction:column; border-radius:1.4em; overflow:hidden;
656
660
  background:var(--shell-plaque-glass); border:1px solid var(--shell-plaque-line); color:#fff; text-align:center;
657
661
  pointer-events:auto; cursor:pointer; transition:box-shadow .12s ease, background .12s ease; }
@@ -714,13 +718,15 @@ const SHELL_CSS = SHELL_FONT_CSS + `
714
718
  #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-ov-spacer { width:clamp(24px,7cqh,32px); }
715
719
  #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-ov-nav { width:clamp(24px,7cqh,32px); height:clamp(24px,7cqh,32px);
716
720
  font-size:clamp(14px,4cqh,18px); border-radius:clamp(7px,2cqh,9px); }
717
- #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betbar { padding:clamp(2px,.9cqh,4px); }
718
- #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betpill { padding:clamp(2px,.67cqh,3px) clamp(4px,1.1cqh,5px); }
719
- #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betstep { width:clamp(24px,7cqh,32px); height:clamp(24px,7cqh,32px);
720
- font-size:clamp(15px,4.4cqh,20px); }
721
- #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval { min-width:clamp(62px,17.5cqh,80px); }
722
- #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval b { font-size:clamp(11px,3.1cqh,14px); }
723
- #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval span { font-size:clamp(6px,1.55cqh,7px); }
721
+ /* the bet pill read too large next to the shrunk cards — size it ~0. across the board (the floors
722
+ stay readable; the maxima are what dominate on Popout L / wide frames). */
723
+ #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betbar { padding:clamp(2px,.75cqh,3px); }
724
+ #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betpill { padding:clamp(2px,.55cqh,3px) clamp(3px,.9cqh,4px); }
725
+ #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betstep { width:clamp(20px,5.7cqh,26px); height:clamp(20px,5.7cqh,26px);
726
+ font-size:clamp(12px,3.5cqh,16px); }
727
+ #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval { min-width:clamp(50px,14cqh,66px); }
728
+ #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval b { font-size:clamp(9px,2.5cqh,11px); }
729
+ #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval span { font-size:clamp(5px,1.25cqh,6px); }
724
730
 
725
731
  /* ═══ base/wide plaque bar — grouped dark + glass panels (reference-style) ═══ */
726
732
  #${SHELL_ROOT_ID} .ge-zone-plaques { gap:0; } /* panels connect; buttons overlap */
@@ -1293,7 +1299,7 @@ function openSettingsModal(shell) {
1293
1299
 
1294
1300
  // AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
1295
1301
  /** The @energy8platform/platform-core package version, stamped at build time. */
1296
- const PACKAGE_VERSION = '0.26.0';
1302
+ const PACKAGE_VERSION = '0.26.1';
1297
1303
 
1298
1304
  /** Default order key for the auto-injected hotkeys section: just after `controls` (-1). */
1299
1305
  const HOTKEYS_DEFAULT_ORDER = -0.5;
@@ -1718,6 +1724,9 @@ function openBuyBonusOverlay(shell) {
1718
1724
  body.innerHTML = '';
1719
1725
  const grid = document.createElement('div');
1720
1726
  grid.className = 'ge-bb-grid';
1727
+ // Card count drives the width-fit clamp in CSS (each card is 18em; N cards must fit the frame
1728
+ // width), so the row scales to the available width instead of overflowing into an X-scroll.
1729
+ grid.style.setProperty('--ge-bb-n', String(bonuses.length));
1721
1730
  const affordable = [];
1722
1731
  for (const bonus of bonuses) {
1723
1732
  const card = buildCard(shell, bonus, root, st);