@open-slot-ui/core 0.1.0 → 0.1.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.d.cts CHANGED
@@ -1582,9 +1582,6 @@ interface UISpec {
1582
1582
  jurisdiction?: JurisdictionConfig;
1583
1583
  /** Initial RTP percentage for the RTP readout (e.g. 96 → "96.0%"). */
1584
1584
  rtp?: number;
1585
- /** Put the compliance readouts (net · RTP · session) in a thin status bar pinned
1586
- * to the `'top'` or `'bottom'` edge instead of at screen corners. */
1587
- statusBar?: 'top' | 'bottom';
1588
1585
  /** Game name + version — shown in the menu footer (support / certification). */
1589
1586
  game?: {
1590
1587
  name?: string;
@@ -1792,24 +1789,4 @@ declare function buildBetLadder(cfg: RgsBetConfig, divisor?: number): {
1792
1789
  /** Clamp a stake (major units) to the RGS min/max and snap to `stepBet`. Pure. */
1793
1790
  declare function clampBet(amount: number, cfg: RgsBetConfig, divisor?: number): number;
1794
1791
 
1795
- /**
1796
- * Win-celebration classifier — the RTS 14F guardrail. open-ui doesn't render the win
1797
- * (the game does), but this helper lets a game decide HOW LOUD to celebrate without
1798
- * ever celebrating a return ≤ the stake (the most-fined responsible-gambling rule).
1799
- */
1800
- interface WinTier {
1801
- name: string;
1802
- /** Minimum win/stake multiplier for this tier. */
1803
- minMultiplier: number;
1804
- }
1805
- /** Default escalation tiers (multipliers of stake). */
1806
- declare const DEFAULT_WIN_TIERS: readonly WinTier[];
1807
- /**
1808
- * Classify a win for celebration. Returns `'none'` when the win is ≤ the stake (so a
1809
- * "win" that returns less than was staked is NEVER celebrated — UKGC RTS 14F), else
1810
- * `'win'` for a positive win below the first tier, or the highest tier whose
1811
- * multiplier threshold is met. Pure + total.
1812
- */
1813
- declare function winTier(win: number, stake: number, tiers?: readonly WinTier[]): string;
1814
-
1815
- export { API_AMOUNT_DIVISOR, type Anchor, AutoplayControl, type AutoplayLimits, type AutoplayMode, type AutoplayOptions, BLOCK_KINDS, type BlockFactory, type BlockSpec, type Breakpoint, type BuiltPanel, ButtonControl, type ButtonOptions, CURRENCY_TABLE, CardControl, type CardOptions, type ComposeMenuOptions, Control, type ControlOptions, type ControlOverride, ControlRegistry, type ControlSnapshot, type CurrencyInfo, type CurrencySpec, DEFAULT_MENU_TITLES, DEFAULT_NOTICE_ACTION, DEFAULT_WIN_TIERS, type DeepPartial, DictionaryTranslator, type Dispose, EventBus, EventLog, type EventLogOptions, type EventMap, Fade, type HostHooks, type JurisdictionConfig, type KnownControlId, LOCALE_LABELS, type LayoutConfig, type LayoutSpec, type LoggedEvent, type MenuSpec, type NoticeAction, type NoticeOptions, OpenUI, type OpenUIEvents, type OpenUIOptions, type Orientation, PanelControl, type PanelOptions, type PanelSpec, type PanelVariant, Parallel, type Placement, Pulse, RGS_ERROR_KEYS, ReadoutControl, type ReadoutKind, type ReadoutOptions, type RealityCheckOptions, type Rect, type ResponsiveKey, type ResponsiveOverride, type RgsBetConfig, type RgsErrorCode, type RgsErrorOptions, type ScreenState, SelectControl, type SelectControlOptions, type SelectOption, Sequence, Signal, SliderControl, type SliderOptions, type SpecIssue, SpinControl, type SpinPress, type SpinSpec, Squish, type StateDef, type StateMap, StepperControl, type StepperOptions, type Subscribable, type Theme, type ThemeChoice, type ThemeIssue, type ThemeOverrides, type ThemePreset, ToggleControl, type ToggleOptions, type Transition, type Translator, TurboControl, type TurboOptions, type TurboSpec, Turn, type UISpec, ValueDisplay, type ValueDisplayOptions, type ViewInspect, type WinTier, applyJurisdiction, breakpointFor, buildBetLadder, buildBlocks, buildPanel, buttonBlocks, clampBet, clampDecimals, clampDigits, clampMinDigits, composeMenu, computeScreen, createUI, defaultHudSpec, defaultLayoutConfig, defaultTheme, defineUI, dictionary, displayDigits, effect, errorBlocks, extendTheme, formatAmount, installResponsive, integerDigits, isSafeColor, isSocialCurrency, openuiDefaults, resolveCurrency, resolvePlacement, resolveTheme, resolveTurboModes, safeAmount, sanitizeThemeOverrides, themePresets, validateSpec, valueFitMaxWidth, winTier };
1792
+ export { API_AMOUNT_DIVISOR, type Anchor, AutoplayControl, type AutoplayLimits, type AutoplayMode, type AutoplayOptions, BLOCK_KINDS, type BlockFactory, type BlockSpec, type Breakpoint, type BuiltPanel, ButtonControl, type ButtonOptions, CURRENCY_TABLE, CardControl, type CardOptions, type ComposeMenuOptions, Control, type ControlOptions, type ControlOverride, ControlRegistry, type ControlSnapshot, type CurrencyInfo, type CurrencySpec, DEFAULT_MENU_TITLES, DEFAULT_NOTICE_ACTION, type DeepPartial, DictionaryTranslator, type Dispose, EventBus, EventLog, type EventLogOptions, type EventMap, Fade, type HostHooks, type JurisdictionConfig, type KnownControlId, LOCALE_LABELS, type LayoutConfig, type LayoutSpec, type LoggedEvent, type MenuSpec, type NoticeAction, type NoticeOptions, OpenUI, type OpenUIEvents, type OpenUIOptions, type Orientation, PanelControl, type PanelOptions, type PanelSpec, type PanelVariant, Parallel, type Placement, Pulse, RGS_ERROR_KEYS, ReadoutControl, type ReadoutKind, type ReadoutOptions, type RealityCheckOptions, type Rect, type ResponsiveKey, type ResponsiveOverride, type RgsBetConfig, type RgsErrorCode, type RgsErrorOptions, type ScreenState, SelectControl, type SelectControlOptions, type SelectOption, Sequence, Signal, SliderControl, type SliderOptions, type SpecIssue, SpinControl, type SpinPress, type SpinSpec, Squish, type StateDef, type StateMap, StepperControl, type StepperOptions, type Subscribable, type Theme, type ThemeChoice, type ThemeIssue, type ThemeOverrides, type ThemePreset, ToggleControl, type ToggleOptions, type Transition, type Translator, TurboControl, type TurboOptions, type TurboSpec, Turn, type UISpec, ValueDisplay, type ValueDisplayOptions, type ViewInspect, applyJurisdiction, breakpointFor, buildBetLadder, buildBlocks, buildPanel, buttonBlocks, clampBet, clampDecimals, clampDigits, clampMinDigits, composeMenu, computeScreen, createUI, defaultHudSpec, defaultLayoutConfig, defaultTheme, defineUI, dictionary, displayDigits, effect, errorBlocks, extendTheme, formatAmount, installResponsive, integerDigits, isSafeColor, isSocialCurrency, openuiDefaults, resolveCurrency, resolvePlacement, resolveTheme, resolveTurboModes, safeAmount, sanitizeThemeOverrides, themePresets, validateSpec, valueFitMaxWidth };
package/dist/index.d.ts CHANGED
@@ -1582,9 +1582,6 @@ interface UISpec {
1582
1582
  jurisdiction?: JurisdictionConfig;
1583
1583
  /** Initial RTP percentage for the RTP readout (e.g. 96 → "96.0%"). */
1584
1584
  rtp?: number;
1585
- /** Put the compliance readouts (net · RTP · session) in a thin status bar pinned
1586
- * to the `'top'` or `'bottom'` edge instead of at screen corners. */
1587
- statusBar?: 'top' | 'bottom';
1588
1585
  /** Game name + version — shown in the menu footer (support / certification). */
1589
1586
  game?: {
1590
1587
  name?: string;
@@ -1792,24 +1789,4 @@ declare function buildBetLadder(cfg: RgsBetConfig, divisor?: number): {
1792
1789
  /** Clamp a stake (major units) to the RGS min/max and snap to `stepBet`. Pure. */
1793
1790
  declare function clampBet(amount: number, cfg: RgsBetConfig, divisor?: number): number;
1794
1791
 
1795
- /**
1796
- * Win-celebration classifier — the RTS 14F guardrail. open-ui doesn't render the win
1797
- * (the game does), but this helper lets a game decide HOW LOUD to celebrate without
1798
- * ever celebrating a return ≤ the stake (the most-fined responsible-gambling rule).
1799
- */
1800
- interface WinTier {
1801
- name: string;
1802
- /** Minimum win/stake multiplier for this tier. */
1803
- minMultiplier: number;
1804
- }
1805
- /** Default escalation tiers (multipliers of stake). */
1806
- declare const DEFAULT_WIN_TIERS: readonly WinTier[];
1807
- /**
1808
- * Classify a win for celebration. Returns `'none'` when the win is ≤ the stake (so a
1809
- * "win" that returns less than was staked is NEVER celebrated — UKGC RTS 14F), else
1810
- * `'win'` for a positive win below the first tier, or the highest tier whose
1811
- * multiplier threshold is met. Pure + total.
1812
- */
1813
- declare function winTier(win: number, stake: number, tiers?: readonly WinTier[]): string;
1814
-
1815
- export { API_AMOUNT_DIVISOR, type Anchor, AutoplayControl, type AutoplayLimits, type AutoplayMode, type AutoplayOptions, BLOCK_KINDS, type BlockFactory, type BlockSpec, type Breakpoint, type BuiltPanel, ButtonControl, type ButtonOptions, CURRENCY_TABLE, CardControl, type CardOptions, type ComposeMenuOptions, Control, type ControlOptions, type ControlOverride, ControlRegistry, type ControlSnapshot, type CurrencyInfo, type CurrencySpec, DEFAULT_MENU_TITLES, DEFAULT_NOTICE_ACTION, DEFAULT_WIN_TIERS, type DeepPartial, DictionaryTranslator, type Dispose, EventBus, EventLog, type EventLogOptions, type EventMap, Fade, type HostHooks, type JurisdictionConfig, type KnownControlId, LOCALE_LABELS, type LayoutConfig, type LayoutSpec, type LoggedEvent, type MenuSpec, type NoticeAction, type NoticeOptions, OpenUI, type OpenUIEvents, type OpenUIOptions, type Orientation, PanelControl, type PanelOptions, type PanelSpec, type PanelVariant, Parallel, type Placement, Pulse, RGS_ERROR_KEYS, ReadoutControl, type ReadoutKind, type ReadoutOptions, type RealityCheckOptions, type Rect, type ResponsiveKey, type ResponsiveOverride, type RgsBetConfig, type RgsErrorCode, type RgsErrorOptions, type ScreenState, SelectControl, type SelectControlOptions, type SelectOption, Sequence, Signal, SliderControl, type SliderOptions, type SpecIssue, SpinControl, type SpinPress, type SpinSpec, Squish, type StateDef, type StateMap, StepperControl, type StepperOptions, type Subscribable, type Theme, type ThemeChoice, type ThemeIssue, type ThemeOverrides, type ThemePreset, ToggleControl, type ToggleOptions, type Transition, type Translator, TurboControl, type TurboOptions, type TurboSpec, Turn, type UISpec, ValueDisplay, type ValueDisplayOptions, type ViewInspect, type WinTier, applyJurisdiction, breakpointFor, buildBetLadder, buildBlocks, buildPanel, buttonBlocks, clampBet, clampDecimals, clampDigits, clampMinDigits, composeMenu, computeScreen, createUI, defaultHudSpec, defaultLayoutConfig, defaultTheme, defineUI, dictionary, displayDigits, effect, errorBlocks, extendTheme, formatAmount, installResponsive, integerDigits, isSafeColor, isSocialCurrency, openuiDefaults, resolveCurrency, resolvePlacement, resolveTheme, resolveTurboModes, safeAmount, sanitizeThemeOverrides, themePresets, validateSpec, valueFitMaxWidth, winTier };
1792
+ export { API_AMOUNT_DIVISOR, type Anchor, AutoplayControl, type AutoplayLimits, type AutoplayMode, type AutoplayOptions, BLOCK_KINDS, type BlockFactory, type BlockSpec, type Breakpoint, type BuiltPanel, ButtonControl, type ButtonOptions, CURRENCY_TABLE, CardControl, type CardOptions, type ComposeMenuOptions, Control, type ControlOptions, type ControlOverride, ControlRegistry, type ControlSnapshot, type CurrencyInfo, type CurrencySpec, DEFAULT_MENU_TITLES, DEFAULT_NOTICE_ACTION, type DeepPartial, DictionaryTranslator, type Dispose, EventBus, EventLog, type EventLogOptions, type EventMap, Fade, type HostHooks, type JurisdictionConfig, type KnownControlId, LOCALE_LABELS, type LayoutConfig, type LayoutSpec, type LoggedEvent, type MenuSpec, type NoticeAction, type NoticeOptions, OpenUI, type OpenUIEvents, type OpenUIOptions, type Orientation, PanelControl, type PanelOptions, type PanelSpec, type PanelVariant, Parallel, type Placement, Pulse, RGS_ERROR_KEYS, ReadoutControl, type ReadoutKind, type ReadoutOptions, type RealityCheckOptions, type Rect, type ResponsiveKey, type ResponsiveOverride, type RgsBetConfig, type RgsErrorCode, type RgsErrorOptions, type ScreenState, SelectControl, type SelectControlOptions, type SelectOption, Sequence, Signal, SliderControl, type SliderOptions, type SpecIssue, SpinControl, type SpinPress, type SpinSpec, Squish, type StateDef, type StateMap, StepperControl, type StepperOptions, type Subscribable, type Theme, type ThemeChoice, type ThemeIssue, type ThemeOverrides, type ThemePreset, ToggleControl, type ToggleOptions, type Transition, type Translator, TurboControl, type TurboOptions, type TurboSpec, Turn, type UISpec, ValueDisplay, type ValueDisplayOptions, type ViewInspect, applyJurisdiction, breakpointFor, buildBetLadder, buildBlocks, buildPanel, buttonBlocks, clampBet, clampDecimals, clampDigits, clampMinDigits, composeMenu, computeScreen, createUI, defaultHudSpec, defaultLayoutConfig, defaultTheme, defineUI, dictionary, displayDigits, effect, errorBlocks, extendTheme, formatAmount, installResponsive, integerDigits, isSafeColor, isSocialCurrency, openuiDefaults, resolveCurrency, resolvePlacement, resolveTheme, resolveTurboModes, safeAmount, sanitizeThemeOverrides, themePresets, validateSpec, valueFitMaxWidth };
package/dist/index.js CHANGED
@@ -1170,9 +1170,6 @@ function validateSpec(spec) {
1170
1170
  if (spec.rtp != null && !(typeof spec.rtp === "number" && Number.isFinite(spec.rtp))) {
1171
1171
  add("error", "rtp", "bad-rtp", `rtp must be a number, got ${String(spec.rtp)}`);
1172
1172
  }
1173
- if (spec.statusBar != null && spec.statusBar !== "top" && spec.statusBar !== "bottom") {
1174
- add("error", "statusBar", "bad-statusbar", `statusBar must be 'top' or 'bottom', got "${String(spec.statusBar)}"`);
1175
- }
1176
1173
  if (spec.realityCheck != null && !(typeof spec.realityCheck.everyMinutes === "number" && spec.realityCheck.everyMinutes > 0)) {
1177
1174
  add("error", "realityCheck.everyMinutes", "bad-interval", "realityCheck.everyMinutes must be a number > 0");
1178
1175
  }
@@ -2255,20 +2252,6 @@ function clampBet(amount, cfg, divisor = API_AMOUNT_DIVISOR) {
2255
2252
  return Math.min(max, Math.max(min, v));
2256
2253
  }
2257
2254
 
2258
- // src/win.ts
2259
- var DEFAULT_WIN_TIERS = Object.freeze([
2260
- { name: "big", minMultiplier: 10 },
2261
- { name: "mega", minMultiplier: 50 },
2262
- { name: "epic", minMultiplier: 100 }
2263
- ]);
2264
- function winTier(win, stake, tiers = DEFAULT_WIN_TIERS) {
2265
- if (!Number.isFinite(win) || !Number.isFinite(stake) || stake <= 0 || win <= stake) return "none";
2266
- const mult = win / stake;
2267
- let name = "win";
2268
- for (const t of tiers) if (mult >= t.minMultiplier) name = t.name;
2269
- return name;
2270
- }
2271
-
2272
- export { API_AMOUNT_DIVISOR, AutoplayControl, BLOCK_KINDS, ButtonControl, CURRENCY_TABLE, CardControl, Control, ControlRegistry, DEFAULT_MENU_TITLES, DEFAULT_NOTICE_ACTION, DEFAULT_WIN_TIERS, DictionaryTranslator, EventBus, EventLog, Fade, LOCALE_LABELS, OpenUI, PanelControl, Parallel, Pulse, RGS_ERROR_KEYS, ReadoutControl, SelectControl, Sequence, Signal, SliderControl, SpinControl, Squish, StepperControl, ToggleControl, TurboControl, Turn, ValueDisplay, applyJurisdiction, breakpointFor, buildBetLadder, buildBlocks, buildPanel, buttonBlocks, clampBet, clampDecimals, clampDigits, clampMinDigits, composeMenu, computeScreen, createUI, defaultHudSpec, defaultLayoutConfig, defaultTheme, defineUI, dictionary, displayDigits, effect, errorBlocks, extendTheme, formatAmount, installResponsive, integerDigits, isSafeColor, isSocialCurrency, openuiDefaults, resolveCurrency, resolvePlacement, resolveTheme, resolveTurboModes, safeAmount, sanitizeThemeOverrides, themePresets, validateSpec, valueFitMaxWidth, winTier };
2255
+ export { API_AMOUNT_DIVISOR, AutoplayControl, BLOCK_KINDS, ButtonControl, CURRENCY_TABLE, CardControl, Control, ControlRegistry, DEFAULT_MENU_TITLES, DEFAULT_NOTICE_ACTION, DictionaryTranslator, EventBus, EventLog, Fade, LOCALE_LABELS, OpenUI, PanelControl, Parallel, Pulse, RGS_ERROR_KEYS, ReadoutControl, SelectControl, Sequence, Signal, SliderControl, SpinControl, Squish, StepperControl, ToggleControl, TurboControl, Turn, ValueDisplay, applyJurisdiction, breakpointFor, buildBetLadder, buildBlocks, buildPanel, buttonBlocks, clampBet, clampDecimals, clampDigits, clampMinDigits, composeMenu, computeScreen, createUI, defaultHudSpec, defaultLayoutConfig, defaultTheme, defineUI, dictionary, displayDigits, effect, errorBlocks, extendTheme, formatAmount, installResponsive, integerDigits, isSafeColor, isSocialCurrency, openuiDefaults, resolveCurrency, resolvePlacement, resolveTheme, resolveTurboModes, safeAmount, sanitizeThemeOverrides, themePresets, validateSpec, valueFitMaxWidth };
2273
2256
  //# sourceMappingURL=index.js.map
2274
2257
  //# sourceMappingURL=index.js.map