@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/index.cjs.js CHANGED
@@ -1722,15 +1722,19 @@ const SHELL_CSS = SHELL_FONT_CSS + `
1722
1722
  #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-ov-body { max-width:none; padding:clamp(6px,2.5cqh,16px) clamp(12px,3vw,28px); }
1723
1723
  #${SHELL_ROOT_ID} .ge-bb-grid { display:flex; gap:14px; justify-content:safe center; overflow-x:auto; overflow-y:hidden; padding-bottom:6px;
1724
1724
  scroll-snap-type:x proximity; -webkit-overflow-scrolling:touch; }
1725
- /* the one knob that scales the whole card cqh measures the overlay (popout frame), not the
1726
- browser window, so cards shrink to fit the real container height. The floor is deliberately tiny:
1727
- on a 400×225 popout the whole card (incl. the CTA) only fits below ~5px, and a fully visible,
1728
- single-axis-scrolling card beats a bigger one whose button is clipped or needs a 2nd scrollbar. */
1725
+ /* the one knob that scales the whole card (its whole layout is em-relative). It is the SMALLER of two
1726
+ fits, so the card is always fully visible:
1727
+ 3.4cqh height: the card stays inside the band between the header and the bet footer (cqh
1728
+ measures the overlay popout frame, not the browser window);
1729
+ • 84cqw / (N*18) — width: the N cards (each 18em) fit the frame width side-by-side instead of
1730
+ overflowing into an X-scroll. --ge-bb-n is the live card count, set in BuyBonus.ts.
1731
+ Floor is deliberately tiny: on a 400×225 popout a fully visible card beats a bigger clipped one. */
1729
1732
  #${SHELL_ROOT_ID} .ge-bb-grid .ge-bonus-card { flex:0 0 18em; scroll-snap-align:start;
1730
- font-size:clamp(4px, 3.4cqh, 12px); }
1731
- /* mobile: vertical stack at a fixed, readable size — scroll the list, don't shrink the cards */
1733
+ font-size:clamp(4px, min(3.4cqh, calc(84cqw / (var(--ge-bb-n,3) * 18))), 12px); }
1734
+ /* mobile: vertical stack at a fixed, readable size — scroll the list; only shrink if the card would
1735
+ be wider than the frame (very narrow viewport), so it never overflows horizontally. */
1732
1736
  #${SHELL_ROOT_ID}.ge-mobile .ge-bb-grid { display:flex; flex-direction:column; gap:14px; overflow:visible; }
1733
- #${SHELL_ROOT_ID}.ge-mobile .ge-bb-grid .ge-bonus-card { flex:0 0 auto; font-size:12px; }
1737
+ #${SHELL_ROOT_ID}.ge-mobile .ge-bb-grid .ge-bonus-card { flex:0 0 auto; font-size:min(12px, calc(92cqw / 18)); }
1734
1738
  #${SHELL_ROOT_ID} .ge-bonus-card { display:flex; flex-direction:column; border-radius:1.4em; overflow:hidden;
1735
1739
  background:var(--shell-plaque-glass); border:1px solid var(--shell-plaque-line); color:#fff; text-align:center;
1736
1740
  pointer-events:auto; cursor:pointer; transition:box-shadow .12s ease, background .12s ease; }
@@ -1793,13 +1797,15 @@ const SHELL_CSS = SHELL_FONT_CSS + `
1793
1797
  #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-ov-spacer { width:clamp(24px,7cqh,32px); }
1794
1798
  #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-ov-nav { width:clamp(24px,7cqh,32px); height:clamp(24px,7cqh,32px);
1795
1799
  font-size:clamp(14px,4cqh,18px); border-radius:clamp(7px,2cqh,9px); }
1796
- #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betbar { padding:clamp(2px,.9cqh,4px); }
1797
- #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betpill { padding:clamp(2px,.67cqh,3px) clamp(4px,1.1cqh,5px); }
1798
- #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betstep { width:clamp(24px,7cqh,32px); height:clamp(24px,7cqh,32px);
1799
- font-size:clamp(15px,4.4cqh,20px); }
1800
- #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval { min-width:clamp(62px,17.5cqh,80px); }
1801
- #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval b { font-size:clamp(11px,3.1cqh,14px); }
1802
- #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval span { font-size:clamp(6px,1.55cqh,7px); }
1800
+ /* the bet pill read too large next to the shrunk cards — size it ~0. across the board (the floors
1801
+ stay readable; the maxima are what dominate on Popout L / wide frames). */
1802
+ #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betbar { padding:clamp(2px,.75cqh,3px); }
1803
+ #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betpill { padding:clamp(2px,.55cqh,3px) clamp(3px,.9cqh,4px); }
1804
+ #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betstep { width:clamp(20px,5.7cqh,26px); height:clamp(20px,5.7cqh,26px);
1805
+ font-size:clamp(12px,3.5cqh,16px); }
1806
+ #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval { min-width:clamp(50px,14cqh,66px); }
1807
+ #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval b { font-size:clamp(9px,2.5cqh,11px); }
1808
+ #${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval span { font-size:clamp(5px,1.25cqh,6px); }
1803
1809
 
1804
1810
  /* ═══ base/wide plaque bar — grouped dark + glass panels (reference-style) ═══ */
1805
1811
  #${SHELL_ROOT_ID} .ge-zone-plaques { gap:0; } /* panels connect; buttons overlap */
@@ -2372,7 +2378,7 @@ function openSettingsModal(shell) {
2372
2378
 
2373
2379
  // AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
2374
2380
  /** The @energy8platform/platform-core package version, stamped at build time. */
2375
- const PACKAGE_VERSION = '0.26.0';
2381
+ const PACKAGE_VERSION = '0.26.1';
2376
2382
 
2377
2383
  /** Default order key for the auto-injected hotkeys section: just after `controls` (-1). */
2378
2384
  const HOTKEYS_DEFAULT_ORDER = -0.5;
@@ -2797,6 +2803,9 @@ function openBuyBonusOverlay(shell) {
2797
2803
  body.innerHTML = '';
2798
2804
  const grid = document.createElement('div');
2799
2805
  grid.className = 'ge-bb-grid';
2806
+ // Card count drives the width-fit clamp in CSS (each card is 18em; N cards must fit the frame
2807
+ // width), so the row scales to the available width instead of overflowing into an X-scroll.
2808
+ grid.style.setProperty('--ge-bb-n', String(bonuses.length));
2800
2809
  const affordable = [];
2801
2810
  for (const bonus of bonuses) {
2802
2811
  const card = buildCard(shell, bonus, root, st);