@energy8platform/platform-core 0.25.3 → 0.26.0

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.
@@ -64,11 +64,11 @@ export const SHELL_CSS = SHELL_FONT_CSS + `
64
64
 
65
65
  /* host = bottom-anchored flex column: [win pill (on overflow)] above [the bar] */
66
66
  #${SHELL_ROOT_ID} .ge-shell-barhost { position:absolute; left:0; right:0; bottom:0; pointer-events:none;
67
- display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:8px;
67
+ display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:4px;
68
68
  transform-origin:bottom center; }
69
69
  /* bottom bar: transparent, two zones (wide default) */
70
70
  #${SHELL_ROOT_ID} .ge-shell-bottom { width:100%; box-sizing:border-box; pointer-events:none;
71
- display:flex; align-items:center; justify-content:space-between; padding:0 18px 14px; gap:14px; }
71
+ display:flex; align-items:center; justify-content:space-between; padding:0 18px 6px; gap:14px; }
72
72
  #${SHELL_ROOT_ID} .ge-zone { display:flex; align-items:center; gap:14px; pointer-events:none; }
73
73
  #${SHELL_ROOT_ID} .ge-zone > * { pointer-events:auto; }
74
74
  #${SHELL_ROOT_ID} .ge-betstep { display:flex; flex-direction:column; gap:2px; }
@@ -151,6 +151,21 @@ export const SHELL_CSS = SHELL_FONT_CSS + `
151
151
  #${SHELL_ROOT_ID} .ge-gi-version { text-align:center; color:var(--shell-muted); font-size:11px;
152
152
  letter-spacing:.08em; opacity:.7; margin:4px 0 2px; }
153
153
 
154
+ /* hotkeys — keycap chips → localized action label, mirrors controls row layout */
155
+ #${SHELL_ROOT_ID} .ge-gi-hk-block { display:flex; flex-direction:column; }
156
+ #${SHELL_ROOT_ID} .ge-gi-hk { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 0; }
157
+ #${SHELL_ROOT_ID} .ge-gi-hk + .ge-gi-hk { border-top:1px solid var(--shell-plaque-line); }
158
+ #${SHELL_ROOT_ID} .ge-gi-hk-chips { display:flex; align-items:center; flex-wrap:wrap; gap:4px; flex:0 0 auto; }
159
+ #${SHELL_ROOT_ID} .ge-gi-hk-combo { display:inline-flex; align-items:center; gap:4px; }
160
+ #${SHELL_ROOT_ID} .ge-gi-hk-chip { display:inline-flex; align-items:center; justify-content:center;
161
+ padding:2px 7px; border-radius:6px; border:1px solid var(--shell-plaque-line);
162
+ background:var(--shell-plaque-dark); color:#fff;
163
+ font-family:'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace; font-size:12px;
164
+ font-weight:600; line-height:1.5; white-space:nowrap; min-width:1.6em; text-align:center; }
165
+ #${SHELL_ROOT_ID} .ge-gi-hk-sep { color:var(--shell-plaque-label); font-size:11px; padding:0 1px; }
166
+ #${SHELL_ROOT_ID} .ge-gi-hk-sep2 { color:var(--shell-plaque-label); font-size:11px; padding:0 4px; }
167
+ #${SHELL_ROOT_ID} .ge-gi-hk-tx { color:rgba(255,255,255,.88); font-size:14px; font-weight:600; text-align:right; flex:1; }
168
+
154
169
  /* controls — two blocks (gameplay / menu & info), icon/name/description per control */
155
170
  #${SHELL_ROOT_ID} .ge-gi-ctl-block + .ge-gi-ctl-block { margin-top:16px; padding-top:4px; border-top:1px solid var(--shell-plaque-line); }
156
171
  #${SHELL_ROOT_ID} .ge-gi-ctl-block-h { color:var(--shell-plaque-label); font-size:11px; letter-spacing:.12em;
@@ -259,6 +274,8 @@ export const SHELL_CSS = SHELL_FONT_CSS + `
259
274
  pointer-events:auto; cursor:pointer; transition:box-shadow .12s ease, background .12s ease; }
260
275
  #${SHELL_ROOT_ID} .ge-bonus-card:hover:not(.ge-bonus-off) {
261
276
  box-shadow:0 0 0 1px var(--card-acc), 0 12px 34px -12px var(--card-acc); }
277
+ #${SHELL_ROOT_ID} .ge-bonus-card--kbd-focus:not(.ge-bonus-off) {
278
+ box-shadow:0 0 0 1px var(--card-acc), 0 12px 34px -12px var(--card-acc); }
262
279
  /* custom card (BonusOption.custom): keep grid sizing + accent vars, drop the default chrome so the game owns the UI */
263
280
  #${SHELL_ROOT_ID} .ge-bonus-card--custom { background:none; border:none; cursor:default; }
264
281
  #${SHELL_ROOT_ID} .ge-bonus-body { display:flex; flex-direction:column; align-items:center; flex:1; padding:1.25em 1.1em .9em; }
@@ -337,7 +354,7 @@ export const SHELL_CSS = SHELL_FONT_CSS + `
337
354
  #${SHELL_ROOT_ID} .ge-pl .ge-iconbtn { color:#fff; }
338
355
  /* LEFT: [menu] ⊐ coin ⊏ [balance] — coin overlaps both; balance fixed-wide so it doesn't jiggle */
339
356
  #${SHELL_ROOT_ID} .ge-pl-menu { border-radius:16px 0 0 16px; padding-right:20px; }
340
- #${SHELL_ROOT_ID} .ge-pl-bal { border-radius:0 16px 16px 0; padding-left:24px; min-width:240px; }
357
+ #${SHELL_ROOT_ID} .ge-pl-bal { border-radius:0 16px 16px 0; padding-left:24px; min-width:200px; }
341
358
  #${SHELL_ROOT_ID} .ge-zone-plaques .ge-shell-buybonus { margin:0 -16px; position:relative; z-index:3; }
342
359
  /* RIGHT: [bet] · |divider| · [auto · SPIN · turbo] */
343
360
  #${SHELL_ROOT_ID} .ge-pl-bet { border-radius:16px 0 0 16px; justify-content:space-between;
@@ -117,6 +117,7 @@ export interface GameMode {
117
117
  export type GameInfoSection =
118
118
  | { type: 'modes'; title?: string; order?: number; modes: GameMode[] }
119
119
  | { type: 'controls'; title?: string; order?: number }
120
+ | { type: 'hotkeys'; title?: string; order?: number }
120
121
  | { type: 'paytable'; title?: string; order?: number; rows: PaytableRow[] }
121
122
  | WinSection
122
123
  | { type: 'custom'; title?: string; order?: number; node?: HTMLElement; html?: string };
@@ -135,6 +136,9 @@ export interface AutoplayConfig {
135
136
 
136
137
  export interface ShellFeatures {
137
138
  turbo: 0 | 1 | 2 | 3;
139
+ /** Master keyboard-shortcut switch. Defaults to `true`; set `false` to disable ALL hotkeys
140
+ * (overrides `spacebar` and any future hotkey). */
141
+ hotkeys?: boolean;
138
142
  /** Spacebar starts a spin in base mode. Defaults to `true`; set `false` to disable the
139
143
  * keyboard shortcut (e.g. jurisdictions that forbid quick-spin keys). */
140
144
  spacebar?: boolean;
@@ -187,6 +191,10 @@ export interface ModalOptions {
187
191
  actions?: ModalAction[];
188
192
  /** Backdrop blur in px (defaults to the shell's standard blur). */
189
193
  blurLevel?: number;
194
+ /** Optional keyboard handler — called by the shell keyboard controller while this modal is
195
+ * open. Return true to consume the key (prevents bar actions + Escape close); false to let
196
+ * the controller handle it (Escape → closeModal). */
197
+ onKey?: (e: KeyboardEvent) => boolean;
190
198
  }
191
199
 
192
200
  export interface ShellConfig {
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
2
2
  /** The @energy8platform/platform-core package version, stamped at build time. */
3
- export const PACKAGE_VERSION = '0.25.3';
3
+ export const PACKAGE_VERSION = '0.26.0';
package/src/types.ts CHANGED
@@ -3,6 +3,8 @@
3
3
  // Phaser/Three/custom-engine consumers import these from
4
4
  // `@energy8platform/platform-core` instead of pulling in game-engine.
5
5
 
6
+ import type { PreloaderVariantName } from './loading/variants';
7
+
6
8
  // SDK types
7
9
  export type {
8
10
  InitData,
@@ -43,6 +45,12 @@ export interface AssetManifest {
43
45
  // engine-specific loading scenes (in @energy8platform/game-engine etc.).
44
46
 
45
47
  export interface LoadingScreenConfig {
48
+ /**
49
+ * Which visual identity the CSS preloader renders. Defaults to `'energy8'`;
50
+ * an unknown value falls back to the default. Ignored when `cssPreloaderHTML`
51
+ * is set (custom HTML bypasses the variant).
52
+ */
53
+ preloaderVariant?: PreloaderVariantName;
46
54
  /** Background color (hex number or CSS string) */
47
55
  backgroundColor?: number | string;
48
56
  /** Background gradient (CSS string applied to the CSS preloader) */