@open-slot-ui/pixi 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.d.cts CHANGED
@@ -151,6 +151,12 @@ interface OpenUIPixiOptions {
151
151
  * shows when its jurisdiction `display*` flag is set.
152
152
  */
153
153
  statusBar?: StatusBarSide;
154
+ /**
155
+ * Text colour for the top-corner compliance readouts (RTP / net / session). Defaults
156
+ * to the theme text colour; a light-background host can pass a dark colour so the
157
+ * Figma-style `Label: value` block stays legible.
158
+ */
159
+ readoutColor?: string;
154
160
  /**
155
161
  * How the interactive HUD appears on mount: `'shown'` (default), `'hidden'` (off
156
162
  * screen + non-interactive; reveal later with `showControls()`), or `'slide-in'`
@@ -231,9 +237,15 @@ declare class SpinView extends ControlView {
231
237
  private readonly fsFace;
232
238
  private readonly fsCount;
233
239
  private readonly fsLabel;
240
+ /** Autoplay STOP face — a "STOP" label over the remaining count (or ∞); shown while
241
+ * autoplay is active. Tapping the spin button then STOPS autoplay. */
242
+ private readonly stopFace;
243
+ private readonly stopCount;
244
+ private readonly stopLabel;
234
245
  constructor(spin: SpinControl, ui: OpenUI, ticker: Ticker, skinOrOpts?: SpinSkinFactory | SpinViewOptions);
235
- /** Swap the spin face: free-spins counter when `freeSpins > 0`, else the skin. */
236
- private updateFreeSpins;
246
+ /** Pick the spin face: autoplay STOP-count (top priority) free-spins counter
247
+ * the normal skin. */
248
+ private updateFaces;
237
249
  private readonly onOver;
238
250
  private readonly onOut;
239
251
  private readonly onDown;
@@ -262,6 +274,7 @@ declare class ValueDisplayView extends ControlView {
262
274
  private readonly fitGsap?;
263
275
  private counter;
264
276
  private caption;
277
+ private captionPill;
265
278
  constructor(vd: ValueDisplay, ui: OpenUI, ticker: Ticker,
266
279
  /** Host `gsap` — when present, the counter auto-downscales wide values to fit
267
280
  * (Charter B5: no hard gsap dep; the host passes it). */
@@ -289,16 +302,15 @@ interface ButtonViewOptions {
289
302
  /** Monochrome look — white circle, black ring, black glyph (matches the turbo
290
303
  * button's b&w art). Only affects the drawn (no-texture) circle path. */
291
304
  mono?: boolean;
305
+ /** Inverted look — solid black circle with a white glyph, no ring (the Figma ☰
306
+ * menu button). Only affects the drawn (no-texture) circle path. */
307
+ dark?: boolean;
292
308
  }
293
- /**
294
- * Generic button view. With `iconTexture` it renders the provided art as a Sprite
295
- * (swappable via `setIconTexture`, e.g. ☰ ↔ ✕); otherwise a neutral token placeholder.
296
- * Pointer input drives the control's state machine; entry transitions play on `art`.
297
- */
298
309
  declare class ButtonView extends ControlView {
299
310
  private readonly btn;
300
311
  private readonly art;
301
312
  private readonly bg;
313
+ private readonly glyphG;
302
314
  private sprite;
303
315
  private labelText;
304
316
  private readonly tween;
@@ -308,14 +320,13 @@ declare class ButtonView extends ControlView {
308
320
  private glyph;
309
321
  private readonly iconTarget;
310
322
  private readonly mono;
323
+ private readonly dark;
311
324
  constructor(btn: ButtonControl, ui: OpenUI, ticker: Ticker, opts?: ButtonViewOptions);
312
325
  /** Swap the displayed art (e.g. ☰ → ✕). */
313
326
  setIconTexture(tex: Texture): void;
314
327
  /** Swap the placeholder glyph (e.g. speaker ↔ speaker-mute, fullscreen ↔ exit). */
315
328
  setGlyph(glyph: ButtonGlyph): void;
316
329
  private fitSprite;
317
- private readonly onOver;
318
- private readonly onOut;
319
330
  private readonly onDown;
320
331
  private readonly onUp;
321
332
  private readonly onUpOutside;
@@ -731,6 +742,10 @@ interface ReadoutViewOptions {
731
742
  inline?: boolean;
732
743
  /** Force black-and-white text (white on a dark bar), ignoring the theme accent/text hue. */
733
744
  mono?: boolean;
745
+ /** Single left-aligned `Label: value` line (the Figma top-corner block). */
746
+ prefix?: boolean;
747
+ /** Explicit text colour (else the theme text colour). Lets a light-bg host darken it. */
748
+ fill?: string;
734
749
  }
735
750
  /**
736
751
  * A compact, non-interactive readout for the Stake Engine jurisdiction `display*`
@@ -746,6 +761,7 @@ declare class ReadoutView extends ControlView {
746
761
  private readonly caption?;
747
762
  private readonly valueText;
748
763
  private readonly tick?;
764
+ private readonly prefix;
749
765
  constructor(ro: ReadoutControl, ui: OpenUI, ticker: Ticker, opts?: ReadoutViewOptions);
750
766
  private render;
751
767
  dispose(): void;
@@ -779,6 +795,9 @@ declare class DialogView extends ControlView {
779
795
  private childViews;
780
796
  private screen;
781
797
  private readonly maxWidth;
798
+ /** `ui` proxy with a light theme — so the shared block renderer draws dark-on-white
799
+ * content inside the white modal card (Figma "default" dialog look). */
800
+ private readonly lightUi;
782
801
  constructor(panel: PanelControl, blocks: Signal<BlockSpec[]>, actions: Signal<NoticeAction[]>, ui: OpenUI, ticker: Ticker, opts?: DialogViewOptions);
783
802
  private buildClose;
784
803
  applyLayout(screen: ScreenState): void;
package/dist/index.d.ts CHANGED
@@ -151,6 +151,12 @@ interface OpenUIPixiOptions {
151
151
  * shows when its jurisdiction `display*` flag is set.
152
152
  */
153
153
  statusBar?: StatusBarSide;
154
+ /**
155
+ * Text colour for the top-corner compliance readouts (RTP / net / session). Defaults
156
+ * to the theme text colour; a light-background host can pass a dark colour so the
157
+ * Figma-style `Label: value` block stays legible.
158
+ */
159
+ readoutColor?: string;
154
160
  /**
155
161
  * How the interactive HUD appears on mount: `'shown'` (default), `'hidden'` (off
156
162
  * screen + non-interactive; reveal later with `showControls()`), or `'slide-in'`
@@ -231,9 +237,15 @@ declare class SpinView extends ControlView {
231
237
  private readonly fsFace;
232
238
  private readonly fsCount;
233
239
  private readonly fsLabel;
240
+ /** Autoplay STOP face — a "STOP" label over the remaining count (or ∞); shown while
241
+ * autoplay is active. Tapping the spin button then STOPS autoplay. */
242
+ private readonly stopFace;
243
+ private readonly stopCount;
244
+ private readonly stopLabel;
234
245
  constructor(spin: SpinControl, ui: OpenUI, ticker: Ticker, skinOrOpts?: SpinSkinFactory | SpinViewOptions);
235
- /** Swap the spin face: free-spins counter when `freeSpins > 0`, else the skin. */
236
- private updateFreeSpins;
246
+ /** Pick the spin face: autoplay STOP-count (top priority) free-spins counter
247
+ * the normal skin. */
248
+ private updateFaces;
237
249
  private readonly onOver;
238
250
  private readonly onOut;
239
251
  private readonly onDown;
@@ -262,6 +274,7 @@ declare class ValueDisplayView extends ControlView {
262
274
  private readonly fitGsap?;
263
275
  private counter;
264
276
  private caption;
277
+ private captionPill;
265
278
  constructor(vd: ValueDisplay, ui: OpenUI, ticker: Ticker,
266
279
  /** Host `gsap` — when present, the counter auto-downscales wide values to fit
267
280
  * (Charter B5: no hard gsap dep; the host passes it). */
@@ -289,16 +302,15 @@ interface ButtonViewOptions {
289
302
  /** Monochrome look — white circle, black ring, black glyph (matches the turbo
290
303
  * button's b&w art). Only affects the drawn (no-texture) circle path. */
291
304
  mono?: boolean;
305
+ /** Inverted look — solid black circle with a white glyph, no ring (the Figma ☰
306
+ * menu button). Only affects the drawn (no-texture) circle path. */
307
+ dark?: boolean;
292
308
  }
293
- /**
294
- * Generic button view. With `iconTexture` it renders the provided art as a Sprite
295
- * (swappable via `setIconTexture`, e.g. ☰ ↔ ✕); otherwise a neutral token placeholder.
296
- * Pointer input drives the control's state machine; entry transitions play on `art`.
297
- */
298
309
  declare class ButtonView extends ControlView {
299
310
  private readonly btn;
300
311
  private readonly art;
301
312
  private readonly bg;
313
+ private readonly glyphG;
302
314
  private sprite;
303
315
  private labelText;
304
316
  private readonly tween;
@@ -308,14 +320,13 @@ declare class ButtonView extends ControlView {
308
320
  private glyph;
309
321
  private readonly iconTarget;
310
322
  private readonly mono;
323
+ private readonly dark;
311
324
  constructor(btn: ButtonControl, ui: OpenUI, ticker: Ticker, opts?: ButtonViewOptions);
312
325
  /** Swap the displayed art (e.g. ☰ → ✕). */
313
326
  setIconTexture(tex: Texture): void;
314
327
  /** Swap the placeholder glyph (e.g. speaker ↔ speaker-mute, fullscreen ↔ exit). */
315
328
  setGlyph(glyph: ButtonGlyph): void;
316
329
  private fitSprite;
317
- private readonly onOver;
318
- private readonly onOut;
319
330
  private readonly onDown;
320
331
  private readonly onUp;
321
332
  private readonly onUpOutside;
@@ -731,6 +742,10 @@ interface ReadoutViewOptions {
731
742
  inline?: boolean;
732
743
  /** Force black-and-white text (white on a dark bar), ignoring the theme accent/text hue. */
733
744
  mono?: boolean;
745
+ /** Single left-aligned `Label: value` line (the Figma top-corner block). */
746
+ prefix?: boolean;
747
+ /** Explicit text colour (else the theme text colour). Lets a light-bg host darken it. */
748
+ fill?: string;
734
749
  }
735
750
  /**
736
751
  * A compact, non-interactive readout for the Stake Engine jurisdiction `display*`
@@ -746,6 +761,7 @@ declare class ReadoutView extends ControlView {
746
761
  private readonly caption?;
747
762
  private readonly valueText;
748
763
  private readonly tick?;
764
+ private readonly prefix;
749
765
  constructor(ro: ReadoutControl, ui: OpenUI, ticker: Ticker, opts?: ReadoutViewOptions);
750
766
  private render;
751
767
  dispose(): void;
@@ -779,6 +795,9 @@ declare class DialogView extends ControlView {
779
795
  private childViews;
780
796
  private screen;
781
797
  private readonly maxWidth;
798
+ /** `ui` proxy with a light theme — so the shared block renderer draws dark-on-white
799
+ * content inside the white modal card (Figma "default" dialog look). */
800
+ private readonly lightUi;
782
801
  constructor(panel: PanelControl, blocks: Signal<BlockSpec[]>, actions: Signal<NoticeAction[]>, ui: OpenUI, ticker: Ticker, opts?: DialogViewOptions);
783
802
  private buildClose;
784
803
  applyLayout(screen: ScreenState): void;