@open-slot-ui/core 0.0.1 → 0.1.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.
package/dist/index.cjs CHANGED
@@ -95,8 +95,11 @@ function extendTheme(base, patch) {
95
95
 
96
96
  // src/layout/screen.ts
97
97
  var defaultLayoutConfig = {
98
+ // Reference design frames, matching the Figma "DEF" frames 1:1 so offsets map
99
+ // directly: desktop 1920×1080, mobile 360×779 (×3 = 1080×2337). The portrait
100
+ // aspect matches real phones (~0.46), so scaling no longer squashes vertically.
98
101
  refLandscape: [1920, 1080],
99
- refPortrait: [1080, 1920],
102
+ refPortrait: [1080, 2337],
100
103
  portraitBelowAspect: 0.85,
101
104
  breakpoints: { mobile: 480, tablet: 840 }
102
105
  };
@@ -1346,10 +1349,10 @@ var RGS_ERROR_KEYS = Object.freeze({
1346
1349
  ERR_TIMEOUT: { title: "openui.err.connection.title", message: "openui.err.connection.message" }
1347
1350
  });
1348
1351
  var DEFAULT_NOTICE_ACTION = { label: "openui.ok", variant: "primary" };
1349
- function errorBlocks(message, title, tone) {
1352
+ function errorBlocks(message, title, _tone) {
1350
1353
  return [
1351
1354
  { kind: "heading", id: "notice-title", text: title },
1352
- { kind: "callout", id: "notice-body", tone, text: message }
1355
+ { kind: "text", id: "notice-body", text: message }
1353
1356
  ];
1354
1357
  }
1355
1358
 
@@ -1620,11 +1623,11 @@ var OpenUI = class {
1620
1623
  this.betMinus = new ButtonControl({ id: "bet-minus", layout: { anchor: "bottom-center", offset: [-150, -270] } }, this.bus);
1621
1624
  this.betPlus = new ButtonControl({ id: "bet-plus", layout: { anchor: "bottom-center", offset: [150, -270] } }, this.bus);
1622
1625
  this.betStepper = new StepperControl({ id: "bet-stepper", layout: { anchor: "center" }, levels: [0.5, 1, 2, 5, 10, 20], index: 1 }, this.bus);
1623
- this.muteButton = new ButtonControl({ id: "mute", layout: { anchor: "top-right", offset: [-110, 28] } }, this.bus);
1624
- this.fullscreenButton = new ButtonControl({ id: "fullscreen", layout: { anchor: "top-right", offset: [-52, 28] } }, this.bus);
1625
- this.rtp = new ReadoutControl({ id: "rtp", kind: "percent", label: "RTP", layout: { anchor: "top-left", offset: [120, 96] } });
1626
- this.netPosition = new ReadoutControl({ id: "net-position", kind: "currency", label: "Net", currency: { code: "USD", decimals: 2 }, layout: { anchor: "top-center", offset: [0, 56] } });
1627
- this.sessionTimer = new ReadoutControl({ id: "session-timer", kind: "duration", label: "Session", layout: { anchor: "top-left", offset: [120, 56] } });
1626
+ this.muteButton = new ButtonControl({ id: "mute", layout: { anchor: "top-right", offset: [-122, 46] } }, this.bus);
1627
+ this.fullscreenButton = new ButtonControl({ id: "fullscreen", layout: { anchor: "top-right", offset: [-46, 46] } }, this.bus);
1628
+ this.rtp = new ReadoutControl({ id: "rtp", kind: "percent", label: "RTP", layout: { anchor: "top-left", offset: [18, 18] } });
1629
+ this.sessionTimer = new ReadoutControl({ id: "session-timer", kind: "duration", label: "Session Time", layout: { anchor: "top-left", offset: [18, 36] } });
1630
+ this.netPosition = new ReadoutControl({ id: "net-position", kind: "currency", label: "Net", currency: { code: "USD", symbol: "$", display: "symbol", position: "prefix", decimals: 2 }, layout: { anchor: "top-left", offset: [18, 60] } });
1628
1631
  this.noticePanel = new PanelControl({ id: "notice-panel", variant: "modal", layout: { anchor: "center" } }, this.bus);
1629
1632
  for (const c of [
1630
1633
  this.spin,
@@ -1961,7 +1964,7 @@ var OpenUI = class {
1961
1964
 
1962
1965
  // src/spec/responsive.ts
1963
1966
  function cloneLayout(l) {
1964
- return { anchor: l.anchor, offset: l.offset ? [l.offset[0], l.offset[1]] : void 0, scale: l.scale };
1967
+ return { anchor: l.anchor, offset: l.offset ? [l.offset[0], l.offset[1]] : void 0, scale: l.scale, rotation: l.rotation };
1965
1968
  }
1966
1969
  function activeKeys(screen) {
1967
1970
  return [screen.orientation, screen.breakpoint];