@open-slot-ui/pixi 0.4.2 → 0.5.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/OpenUIPixi-D4Z7emFO.d.cts +202 -0
- package/dist/OpenUIPixi-D4Z7emFO.d.ts +202 -0
- package/dist/art.cjs +269 -0
- package/dist/art.cjs.map +1 -0
- package/dist/art.d.cts +125 -0
- package/dist/art.d.ts +125 -0
- package/dist/art.js +222 -0
- package/dist/art.js.map +1 -0
- package/dist/chunk-PYXZIGXG.js +3733 -0
- package/dist/chunk-PYXZIGXG.js.map +1 -0
- package/dist/index.cjs +146 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -185
- package/dist/index.d.ts +16 -185
- package/dist/index.js +16 -3621
- package/dist/index.js.map +1 -1
- package/package.json +9 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,187 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Base view: a Pixi Container bound to a core Control. Owns layout placement and
|
|
7
|
-
* registers the introspection hook so the core can report bounds/animation state.
|
|
8
|
-
* Subclasses draw and wire input. Dumb on its own (Charter B3).
|
|
9
|
-
*/
|
|
10
|
-
declare abstract class ControlView extends Container {
|
|
11
|
-
protected readonly control: Control;
|
|
12
|
-
protected readonly ui: OpenUI;
|
|
13
|
-
protected animating: boolean;
|
|
14
|
-
protected readonly disposers: Array<() => void>;
|
|
15
|
-
constructor(control: Control, ui: OpenUI);
|
|
16
|
-
/** Position + fit-scale from the control's layout spec against the screen. */
|
|
17
|
-
applyLayout(screen: ScreenState): void;
|
|
18
|
-
private computeRect;
|
|
19
|
-
dispose(): void;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/** Per-id view override — swap a control's renderer without forking (Charter P7). */
|
|
23
|
-
type ControlViewFactory = (control: Control, ui: OpenUI, ticker: Ticker) => ControlView;
|
|
24
|
-
interface BlockColumnOptions {
|
|
25
|
-
controlSkins?: Partial<Record<string, ControlViewFactory>>;
|
|
26
|
-
/** Unclipped layer for select dropdowns (so a scroll mask doesn't clip them). */
|
|
27
|
-
dropdownLayer?: Container;
|
|
28
|
-
}
|
|
29
|
-
interface BlockColumn {
|
|
30
|
-
/** Rows laid top→down (first row near y=0); the caller positions/scrolls it. */
|
|
31
|
-
content: Container;
|
|
32
|
-
/** Interactive child views, for disposal. */
|
|
33
|
-
views: ControlView[];
|
|
34
|
-
/** Total column height. */
|
|
35
|
-
height: number;
|
|
36
|
-
/** Inner content width (body width minus padding). */
|
|
37
|
-
innerW: number;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Render a declarative `BlockSpec[]` into a column of rows — interactive controls
|
|
41
|
-
* (slider/toggle/button/select/value/stepper) and static content (heading/text/
|
|
42
|
-
* callout/stat-grid/steps/paytable/image). All text flows through `ui.t`. This is
|
|
43
|
-
* the single renderer shared by the small panel body AND the scrollable menu, so
|
|
44
|
-
* blocks look identical wherever they appear (Charter B3/B9).
|
|
45
|
-
*/
|
|
46
|
-
declare function buildBlockColumn(blocks: BlockSpec[], controls: Control[], ui: OpenUI, ticker: Ticker, bodyW: number, opts?: BlockColumnOptions): BlockColumn;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* A skin owns a control's *look* and nothing else. The view drives it with the
|
|
50
|
-
* current state name; the skin swaps art accordingly. This is the seam where a
|
|
51
|
-
* game's design (Graphics, SVG, Spine, …) plugs in without touching control logic.
|
|
52
|
-
*/
|
|
53
|
-
interface SpinSkin {
|
|
54
|
-
/** The display object the view adds into its animated `art` container. */
|
|
55
|
-
readonly view: Container;
|
|
56
|
-
/** React to a state change (swap art, recolor, etc.). */
|
|
57
|
-
update(state: string): void;
|
|
58
|
-
destroy(): void;
|
|
59
|
-
}
|
|
60
|
-
type SpinSkinFactory = (theme: Theme) => SpinSkin;
|
|
61
|
-
|
|
62
|
-
interface CellRenderer<C extends Container = Container> {
|
|
63
|
-
createCell(digit: number): C;
|
|
64
|
-
setDigit(cell: C, digit: number): void;
|
|
65
|
-
setFiller(cell: C, digit: number): void;
|
|
66
|
-
createSeparator?(char: string): Container;
|
|
67
|
-
destroyCell?(cell: C): void;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Minimal GSAP-compatible API the Counter uses for `fit` animation.
|
|
71
|
-
* Passing the default `gsap` import satisfies this shape — no need for type imports.
|
|
72
|
-
*/
|
|
73
|
-
interface GsapLike {
|
|
74
|
-
to(target: object, vars: Record<string, unknown>): unknown;
|
|
75
|
-
killTweensOf(target: object): void;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
interface OpenUIIcons {
|
|
79
|
-
settingsIdle?: Texture;
|
|
80
|
-
settingsActive?: Texture;
|
|
81
|
-
close?: Texture;
|
|
82
|
-
rules?: Texture;
|
|
83
|
-
sliderMusic?: Texture;
|
|
84
|
-
sliderSound?: Texture;
|
|
85
|
-
turboOff?: Texture;
|
|
86
|
-
turboOn?: Texture;
|
|
87
|
-
/** One texture per turbo mode (index-aligned) — for 3-mode art. Wins over off/on. */
|
|
88
|
-
turboModes?: Texture[];
|
|
89
|
-
autoIdle?: Texture;
|
|
90
|
-
autoActive?: Texture;
|
|
91
|
-
bonus?: Texture;
|
|
92
|
-
betPlus?: Texture;
|
|
93
|
-
betMinus?: Texture;
|
|
94
|
-
}
|
|
95
|
-
interface OpenUIPixiOptions {
|
|
96
|
-
/** Expose `window.__OPENUI__` for e2e/introspection. Default true. */
|
|
97
|
-
expose?: boolean;
|
|
98
|
-
/** Override the spin control's skin (default = the art-free Graphics placeholder). */
|
|
99
|
-
spinSkin?: SpinSkinFactory;
|
|
100
|
-
/** Real art for the menu/close/slider controls (else neutral placeholders). */
|
|
101
|
-
icons?: OpenUIIcons;
|
|
102
|
-
/**
|
|
103
|
-
* The composed MENU blocks (Settings → Paytable → Rules) the ☰ button opens in a
|
|
104
|
-
* scrollable sheet. Usually built by `mountHud` via `composeMenu(spec.menu, …)`;
|
|
105
|
-
* omitted → a default Settings-only menu (Music/Sound). Pass `false` to skip the
|
|
106
|
-
* built-in Pixi menu entirely (e.g. when supplying your own HTML/DOM menu).
|
|
107
|
-
*/
|
|
108
|
-
menu?: BlockSpec[] | false;
|
|
109
|
-
/** Header title for the menu sheet (localizable). Default 'Menu'. */
|
|
110
|
-
menuTitle?: string;
|
|
111
|
-
/** Per-id view override — swap a control's renderer without forking (Charter P7). */
|
|
112
|
-
controlSkins?: Partial<Record<string, ControlViewFactory>>;
|
|
113
|
-
/**
|
|
114
|
-
* Host `gsap` — enables the value counter's auto-downscale so wide currencies
|
|
115
|
-
* (8-decimal BTC, big SATS counts, long codes) shrink to fit instead of spilling.
|
|
116
|
-
* Kept out of the lib's deps (Charter B5); the host passes its own gsap.
|
|
117
|
-
*/
|
|
118
|
-
gsap?: GsapLike;
|
|
119
|
-
/**
|
|
120
|
-
* Autoplay count-picker presentation. `'drawer'` (default) is a bottom sheet;
|
|
121
|
-
* `'radial'` fans the count chips around the spin button.
|
|
122
|
-
*/
|
|
123
|
-
autoplayPicker?: 'drawer' | 'radial';
|
|
124
|
-
/**
|
|
125
|
-
* Text colour for the top-corner compliance readouts (RTP / net / session). Defaults
|
|
126
|
-
* to the theme text colour; a light-background host can pass a dark colour so the
|
|
127
|
-
* Figma-style `Label: value` block stays legible.
|
|
128
|
-
*/
|
|
129
|
-
readoutColor?: string;
|
|
130
|
-
/**
|
|
131
|
-
* How the interactive HUD appears on mount: `'shown'` (default), `'hidden'` (off
|
|
132
|
-
* screen + non-interactive; reveal later with `showControls()`), or `'slide-in'`
|
|
133
|
-
* (start hidden, then slide in from the edges).
|
|
134
|
-
*/
|
|
135
|
-
intro?: 'shown' | 'hidden' | 'slide-in';
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* The controller: mounts ONE root Container onto the host's existing stage,
|
|
139
|
-
* shares the host ticker/renderer, drives resize, and exposes introspection.
|
|
140
|
-
* `unmount()` removes the layer and every listener it created (Charter P2/P12).
|
|
141
|
-
*/
|
|
142
|
-
declare class OpenUIPixi {
|
|
143
|
-
private readonly ui;
|
|
144
|
-
private readonly opts;
|
|
145
|
-
readonly root: Container<pixi_js.ContainerChild>;
|
|
146
|
-
private readonly views;
|
|
147
|
-
/** Full-screen overlays (e.g. the autoplay drawer) that own their own layout. */
|
|
148
|
-
private readonly overlays;
|
|
149
|
-
private readonly disposers;
|
|
150
|
-
private _eventLog?;
|
|
151
|
-
/** Show/hide slide: each interactive view slides toward its anchored edge (bottom
|
|
152
|
-
* controls down, top up — behind the status-bar plaque). Views stay direct children
|
|
153
|
-
* of `root` (introspection bounds unchanged); only their y moves, and the
|
|
154
|
-
* ref-counted input lock makes them non-interactive while moving/hidden. */
|
|
155
|
-
private slideProg;
|
|
156
|
-
private slideTarget;
|
|
157
|
-
private slideHeld;
|
|
158
|
-
private lastScreenH;
|
|
159
|
-
private appTicker?;
|
|
160
|
-
private slideTickFn?;
|
|
161
|
-
private readonly slideBaseY;
|
|
162
|
-
private readonly slideSign;
|
|
163
|
-
constructor(ui: OpenUI, opts?: OpenUIPixiOptions);
|
|
164
|
-
/** The bus event log backing `window.__OPENUI__.events` (available after mount). */
|
|
165
|
-
get eventLog(): EventLog | undefined;
|
|
166
|
-
mount(app: Application): void;
|
|
167
|
-
/**
|
|
168
|
-
* Build the unified scrollable MENU bound to the ☰ panel. Composed `menu` blocks
|
|
169
|
-
* are given by `mountHud`; absent → a default Settings-only menu. Built-in ids
|
|
170
|
-
* ('music'/'sfx') are reused, not shadowed (P10); button blocks wire `closePanel`.
|
|
171
|
-
*/
|
|
172
|
-
private buildMenu;
|
|
173
|
-
/**
|
|
174
|
-
* Slide the whole interactive HUD in (`true`) or out (`false`): bottom-anchored
|
|
175
|
-
* controls travel down, top-anchored travel up (behind the status-bar plaque).
|
|
176
|
-
* Pure translation (no scaling); controls are non-interactive while moving/hidden.
|
|
177
|
-
*/
|
|
178
|
-
setControlsVisible(visible: boolean): void;
|
|
179
|
-
/** Apply the current slide progress: translate each interactive view toward its
|
|
180
|
-
* anchored edge (pure translation — no scaling). */
|
|
181
|
-
private applySlide;
|
|
182
|
-
unmount(): void;
|
|
183
|
-
private expose;
|
|
184
|
-
}
|
|
1
|
+
import { C as ControlView, S as SpinSkinFactory, G as GsapLike, a as ControlViewFactory, b as OpenUIPixi, c as OpenUIPixiOptions, d as CellRenderer, e as SpinSkin } from './OpenUIPixi-D4Z7emFO.cjs';
|
|
2
|
+
export { B as BlockColumn, f as BlockColumnOptions, O as OpenUIIcons, g as buildBlockColumn } from './OpenUIPixi-D4Z7emFO.cjs';
|
|
3
|
+
import { Ticker, Texture, Container, Application, TextStyleOptions, Graphics } from 'pixi.js';
|
|
4
|
+
import { SpinControl, OpenUI, ValueDisplay, ButtonControl, ToggleControl, TurboControl, AutoplayControl, ScreenState, SliderControl, PanelControl, Theme, SelectControl, StepperControl, Control, BlockSpec, ReadoutControl, Signal, NoticeAction, OpenUIEvents, Dispose, CurrencySpec, JurisdictionConfig, NoticeOptions, RgsErrorOptions, ControlSnapshot, EventLog, HostHooks, UISpec, Transition } from '@open-slot-ui/core';
|
|
185
5
|
|
|
186
6
|
/**
|
|
187
7
|
* Pixi view for the spin control. Owns input forwarding + transition playback;
|
|
@@ -251,6 +71,9 @@ declare class ValueDisplayView extends ControlView {
|
|
|
251
71
|
fitGsap?: GsapLike | undefined);
|
|
252
72
|
private side;
|
|
253
73
|
private build;
|
|
74
|
+
/** Size the caption pill to the caption's current measured width + padding and centre
|
|
75
|
+
* the text in it, anchored to the value's side. Re-runnable (fonts-ready / relayout). */
|
|
76
|
+
private sizeCaptionPill;
|
|
254
77
|
/** (Re)create the rolling counter sized to `total` columns, starting at `fromMinor`. */
|
|
255
78
|
private buildCounter;
|
|
256
79
|
private rebuild;
|
|
@@ -733,7 +556,12 @@ declare class ReadoutView extends ControlView {
|
|
|
733
556
|
private readonly valueText;
|
|
734
557
|
private readonly tick?;
|
|
735
558
|
private readonly prefix;
|
|
559
|
+
/** Normal + accent value colours for the `emphasized` (modified) tint. */
|
|
560
|
+
private readonly baseFill;
|
|
561
|
+
private readonly accentFill;
|
|
736
562
|
constructor(ro: ReadoutControl, ui: OpenUI, ticker: Ticker, opts?: ReadoutViewOptions);
|
|
563
|
+
/** Tint the value in the theme accent while the readout is emphasized (modified). */
|
|
564
|
+
private applyEmphasis;
|
|
737
565
|
private render;
|
|
738
566
|
dispose(): void;
|
|
739
567
|
}
|
|
@@ -796,6 +624,9 @@ interface BootedHud {
|
|
|
796
624
|
on<K extends keyof OpenUIEvents>(type: K, fn: (p: OpenUIEvents[K]) => void): Dispose;
|
|
797
625
|
setBalance(major: number): void;
|
|
798
626
|
setBet(major: number): void;
|
|
627
|
+
/** Set the bonus total-win amount (major units). Shown in the buy-feature slot while
|
|
628
|
+
* the spin button is in free-spins mode (`setFreeSpins(n > 0)`). */
|
|
629
|
+
setTotalWin(major: number): void;
|
|
799
630
|
setCurrency(spec: CurrencySpec): void;
|
|
800
631
|
/** Apply a Stake Engine jurisdiction config (the compliance switchboard) at runtime. */
|
|
801
632
|
applyJurisdiction(jur: JurisdictionConfig): void;
|
|
@@ -920,4 +751,4 @@ declare class Tweener {
|
|
|
920
751
|
/** Treat touch devices as non-desktop so we don't fire phantom hover states. */
|
|
921
752
|
declare function isDesktop(): boolean;
|
|
922
753
|
|
|
923
|
-
export { AutoplayDrawerView, AutoplayView, type AutoplayViewOptions, type
|
|
754
|
+
export { AutoplayDrawerView, AutoplayView, type AutoplayViewOptions, type BootedHud, type ButtonGlyph, ButtonView, type ButtonViewOptions, ControlView, ControlViewFactory, DialogView, type DialogViewOptions, type HudOptions, type InfoContentBuilder, MenuView, type MenuViewOptions, OpenUIPixi, OpenUIPixiOptions, type PanelBodyOptions, PanelBodyView, PanelView, type PanelViewOptions, type PopoverArt, type PopoverParts, PopoverView, ReadoutView, type ReadoutViewOptions, SelectView, type SelectViewOptions, SliderView, SpinSkin, SpinSkinFactory, SpinView, type SpinViewOptions, StepperView, type SvgSpinTextures, TextCellRenderer, type TextCellRendererOptions, ToggleView, type ToggleViewOptions, TurboView, type TurboViewOptions, Tweener, ValueDisplayView, defaultSpinSkin, drawSpin, isDesktop, mountHud, svgSpinSkin };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,187 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Base view: a Pixi Container bound to a core Control. Owns layout placement and
|
|
7
|
-
* registers the introspection hook so the core can report bounds/animation state.
|
|
8
|
-
* Subclasses draw and wire input. Dumb on its own (Charter B3).
|
|
9
|
-
*/
|
|
10
|
-
declare abstract class ControlView extends Container {
|
|
11
|
-
protected readonly control: Control;
|
|
12
|
-
protected readonly ui: OpenUI;
|
|
13
|
-
protected animating: boolean;
|
|
14
|
-
protected readonly disposers: Array<() => void>;
|
|
15
|
-
constructor(control: Control, ui: OpenUI);
|
|
16
|
-
/** Position + fit-scale from the control's layout spec against the screen. */
|
|
17
|
-
applyLayout(screen: ScreenState): void;
|
|
18
|
-
private computeRect;
|
|
19
|
-
dispose(): void;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/** Per-id view override — swap a control's renderer without forking (Charter P7). */
|
|
23
|
-
type ControlViewFactory = (control: Control, ui: OpenUI, ticker: Ticker) => ControlView;
|
|
24
|
-
interface BlockColumnOptions {
|
|
25
|
-
controlSkins?: Partial<Record<string, ControlViewFactory>>;
|
|
26
|
-
/** Unclipped layer for select dropdowns (so a scroll mask doesn't clip them). */
|
|
27
|
-
dropdownLayer?: Container;
|
|
28
|
-
}
|
|
29
|
-
interface BlockColumn {
|
|
30
|
-
/** Rows laid top→down (first row near y=0); the caller positions/scrolls it. */
|
|
31
|
-
content: Container;
|
|
32
|
-
/** Interactive child views, for disposal. */
|
|
33
|
-
views: ControlView[];
|
|
34
|
-
/** Total column height. */
|
|
35
|
-
height: number;
|
|
36
|
-
/** Inner content width (body width minus padding). */
|
|
37
|
-
innerW: number;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Render a declarative `BlockSpec[]` into a column of rows — interactive controls
|
|
41
|
-
* (slider/toggle/button/select/value/stepper) and static content (heading/text/
|
|
42
|
-
* callout/stat-grid/steps/paytable/image). All text flows through `ui.t`. This is
|
|
43
|
-
* the single renderer shared by the small panel body AND the scrollable menu, so
|
|
44
|
-
* blocks look identical wherever they appear (Charter B3/B9).
|
|
45
|
-
*/
|
|
46
|
-
declare function buildBlockColumn(blocks: BlockSpec[], controls: Control[], ui: OpenUI, ticker: Ticker, bodyW: number, opts?: BlockColumnOptions): BlockColumn;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* A skin owns a control's *look* and nothing else. The view drives it with the
|
|
50
|
-
* current state name; the skin swaps art accordingly. This is the seam where a
|
|
51
|
-
* game's design (Graphics, SVG, Spine, …) plugs in without touching control logic.
|
|
52
|
-
*/
|
|
53
|
-
interface SpinSkin {
|
|
54
|
-
/** The display object the view adds into its animated `art` container. */
|
|
55
|
-
readonly view: Container;
|
|
56
|
-
/** React to a state change (swap art, recolor, etc.). */
|
|
57
|
-
update(state: string): void;
|
|
58
|
-
destroy(): void;
|
|
59
|
-
}
|
|
60
|
-
type SpinSkinFactory = (theme: Theme) => SpinSkin;
|
|
61
|
-
|
|
62
|
-
interface CellRenderer<C extends Container = Container> {
|
|
63
|
-
createCell(digit: number): C;
|
|
64
|
-
setDigit(cell: C, digit: number): void;
|
|
65
|
-
setFiller(cell: C, digit: number): void;
|
|
66
|
-
createSeparator?(char: string): Container;
|
|
67
|
-
destroyCell?(cell: C): void;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Minimal GSAP-compatible API the Counter uses for `fit` animation.
|
|
71
|
-
* Passing the default `gsap` import satisfies this shape — no need for type imports.
|
|
72
|
-
*/
|
|
73
|
-
interface GsapLike {
|
|
74
|
-
to(target: object, vars: Record<string, unknown>): unknown;
|
|
75
|
-
killTweensOf(target: object): void;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
interface OpenUIIcons {
|
|
79
|
-
settingsIdle?: Texture;
|
|
80
|
-
settingsActive?: Texture;
|
|
81
|
-
close?: Texture;
|
|
82
|
-
rules?: Texture;
|
|
83
|
-
sliderMusic?: Texture;
|
|
84
|
-
sliderSound?: Texture;
|
|
85
|
-
turboOff?: Texture;
|
|
86
|
-
turboOn?: Texture;
|
|
87
|
-
/** One texture per turbo mode (index-aligned) — for 3-mode art. Wins over off/on. */
|
|
88
|
-
turboModes?: Texture[];
|
|
89
|
-
autoIdle?: Texture;
|
|
90
|
-
autoActive?: Texture;
|
|
91
|
-
bonus?: Texture;
|
|
92
|
-
betPlus?: Texture;
|
|
93
|
-
betMinus?: Texture;
|
|
94
|
-
}
|
|
95
|
-
interface OpenUIPixiOptions {
|
|
96
|
-
/** Expose `window.__OPENUI__` for e2e/introspection. Default true. */
|
|
97
|
-
expose?: boolean;
|
|
98
|
-
/** Override the spin control's skin (default = the art-free Graphics placeholder). */
|
|
99
|
-
spinSkin?: SpinSkinFactory;
|
|
100
|
-
/** Real art for the menu/close/slider controls (else neutral placeholders). */
|
|
101
|
-
icons?: OpenUIIcons;
|
|
102
|
-
/**
|
|
103
|
-
* The composed MENU blocks (Settings → Paytable → Rules) the ☰ button opens in a
|
|
104
|
-
* scrollable sheet. Usually built by `mountHud` via `composeMenu(spec.menu, …)`;
|
|
105
|
-
* omitted → a default Settings-only menu (Music/Sound). Pass `false` to skip the
|
|
106
|
-
* built-in Pixi menu entirely (e.g. when supplying your own HTML/DOM menu).
|
|
107
|
-
*/
|
|
108
|
-
menu?: BlockSpec[] | false;
|
|
109
|
-
/** Header title for the menu sheet (localizable). Default 'Menu'. */
|
|
110
|
-
menuTitle?: string;
|
|
111
|
-
/** Per-id view override — swap a control's renderer without forking (Charter P7). */
|
|
112
|
-
controlSkins?: Partial<Record<string, ControlViewFactory>>;
|
|
113
|
-
/**
|
|
114
|
-
* Host `gsap` — enables the value counter's auto-downscale so wide currencies
|
|
115
|
-
* (8-decimal BTC, big SATS counts, long codes) shrink to fit instead of spilling.
|
|
116
|
-
* Kept out of the lib's deps (Charter B5); the host passes its own gsap.
|
|
117
|
-
*/
|
|
118
|
-
gsap?: GsapLike;
|
|
119
|
-
/**
|
|
120
|
-
* Autoplay count-picker presentation. `'drawer'` (default) is a bottom sheet;
|
|
121
|
-
* `'radial'` fans the count chips around the spin button.
|
|
122
|
-
*/
|
|
123
|
-
autoplayPicker?: 'drawer' | 'radial';
|
|
124
|
-
/**
|
|
125
|
-
* Text colour for the top-corner compliance readouts (RTP / net / session). Defaults
|
|
126
|
-
* to the theme text colour; a light-background host can pass a dark colour so the
|
|
127
|
-
* Figma-style `Label: value` block stays legible.
|
|
128
|
-
*/
|
|
129
|
-
readoutColor?: string;
|
|
130
|
-
/**
|
|
131
|
-
* How the interactive HUD appears on mount: `'shown'` (default), `'hidden'` (off
|
|
132
|
-
* screen + non-interactive; reveal later with `showControls()`), or `'slide-in'`
|
|
133
|
-
* (start hidden, then slide in from the edges).
|
|
134
|
-
*/
|
|
135
|
-
intro?: 'shown' | 'hidden' | 'slide-in';
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* The controller: mounts ONE root Container onto the host's existing stage,
|
|
139
|
-
* shares the host ticker/renderer, drives resize, and exposes introspection.
|
|
140
|
-
* `unmount()` removes the layer and every listener it created (Charter P2/P12).
|
|
141
|
-
*/
|
|
142
|
-
declare class OpenUIPixi {
|
|
143
|
-
private readonly ui;
|
|
144
|
-
private readonly opts;
|
|
145
|
-
readonly root: Container<pixi_js.ContainerChild>;
|
|
146
|
-
private readonly views;
|
|
147
|
-
/** Full-screen overlays (e.g. the autoplay drawer) that own their own layout. */
|
|
148
|
-
private readonly overlays;
|
|
149
|
-
private readonly disposers;
|
|
150
|
-
private _eventLog?;
|
|
151
|
-
/** Show/hide slide: each interactive view slides toward its anchored edge (bottom
|
|
152
|
-
* controls down, top up — behind the status-bar plaque). Views stay direct children
|
|
153
|
-
* of `root` (introspection bounds unchanged); only their y moves, and the
|
|
154
|
-
* ref-counted input lock makes them non-interactive while moving/hidden. */
|
|
155
|
-
private slideProg;
|
|
156
|
-
private slideTarget;
|
|
157
|
-
private slideHeld;
|
|
158
|
-
private lastScreenH;
|
|
159
|
-
private appTicker?;
|
|
160
|
-
private slideTickFn?;
|
|
161
|
-
private readonly slideBaseY;
|
|
162
|
-
private readonly slideSign;
|
|
163
|
-
constructor(ui: OpenUI, opts?: OpenUIPixiOptions);
|
|
164
|
-
/** The bus event log backing `window.__OPENUI__.events` (available after mount). */
|
|
165
|
-
get eventLog(): EventLog | undefined;
|
|
166
|
-
mount(app: Application): void;
|
|
167
|
-
/**
|
|
168
|
-
* Build the unified scrollable MENU bound to the ☰ panel. Composed `menu` blocks
|
|
169
|
-
* are given by `mountHud`; absent → a default Settings-only menu. Built-in ids
|
|
170
|
-
* ('music'/'sfx') are reused, not shadowed (P10); button blocks wire `closePanel`.
|
|
171
|
-
*/
|
|
172
|
-
private buildMenu;
|
|
173
|
-
/**
|
|
174
|
-
* Slide the whole interactive HUD in (`true`) or out (`false`): bottom-anchored
|
|
175
|
-
* controls travel down, top-anchored travel up (behind the status-bar plaque).
|
|
176
|
-
* Pure translation (no scaling); controls are non-interactive while moving/hidden.
|
|
177
|
-
*/
|
|
178
|
-
setControlsVisible(visible: boolean): void;
|
|
179
|
-
/** Apply the current slide progress: translate each interactive view toward its
|
|
180
|
-
* anchored edge (pure translation — no scaling). */
|
|
181
|
-
private applySlide;
|
|
182
|
-
unmount(): void;
|
|
183
|
-
private expose;
|
|
184
|
-
}
|
|
1
|
+
import { C as ControlView, S as SpinSkinFactory, G as GsapLike, a as ControlViewFactory, b as OpenUIPixi, c as OpenUIPixiOptions, d as CellRenderer, e as SpinSkin } from './OpenUIPixi-D4Z7emFO.js';
|
|
2
|
+
export { B as BlockColumn, f as BlockColumnOptions, O as OpenUIIcons, g as buildBlockColumn } from './OpenUIPixi-D4Z7emFO.js';
|
|
3
|
+
import { Ticker, Texture, Container, Application, TextStyleOptions, Graphics } from 'pixi.js';
|
|
4
|
+
import { SpinControl, OpenUI, ValueDisplay, ButtonControl, ToggleControl, TurboControl, AutoplayControl, ScreenState, SliderControl, PanelControl, Theme, SelectControl, StepperControl, Control, BlockSpec, ReadoutControl, Signal, NoticeAction, OpenUIEvents, Dispose, CurrencySpec, JurisdictionConfig, NoticeOptions, RgsErrorOptions, ControlSnapshot, EventLog, HostHooks, UISpec, Transition } from '@open-slot-ui/core';
|
|
185
5
|
|
|
186
6
|
/**
|
|
187
7
|
* Pixi view for the spin control. Owns input forwarding + transition playback;
|
|
@@ -251,6 +71,9 @@ declare class ValueDisplayView extends ControlView {
|
|
|
251
71
|
fitGsap?: GsapLike | undefined);
|
|
252
72
|
private side;
|
|
253
73
|
private build;
|
|
74
|
+
/** Size the caption pill to the caption's current measured width + padding and centre
|
|
75
|
+
* the text in it, anchored to the value's side. Re-runnable (fonts-ready / relayout). */
|
|
76
|
+
private sizeCaptionPill;
|
|
254
77
|
/** (Re)create the rolling counter sized to `total` columns, starting at `fromMinor`. */
|
|
255
78
|
private buildCounter;
|
|
256
79
|
private rebuild;
|
|
@@ -733,7 +556,12 @@ declare class ReadoutView extends ControlView {
|
|
|
733
556
|
private readonly valueText;
|
|
734
557
|
private readonly tick?;
|
|
735
558
|
private readonly prefix;
|
|
559
|
+
/** Normal + accent value colours for the `emphasized` (modified) tint. */
|
|
560
|
+
private readonly baseFill;
|
|
561
|
+
private readonly accentFill;
|
|
736
562
|
constructor(ro: ReadoutControl, ui: OpenUI, ticker: Ticker, opts?: ReadoutViewOptions);
|
|
563
|
+
/** Tint the value in the theme accent while the readout is emphasized (modified). */
|
|
564
|
+
private applyEmphasis;
|
|
737
565
|
private render;
|
|
738
566
|
dispose(): void;
|
|
739
567
|
}
|
|
@@ -796,6 +624,9 @@ interface BootedHud {
|
|
|
796
624
|
on<K extends keyof OpenUIEvents>(type: K, fn: (p: OpenUIEvents[K]) => void): Dispose;
|
|
797
625
|
setBalance(major: number): void;
|
|
798
626
|
setBet(major: number): void;
|
|
627
|
+
/** Set the bonus total-win amount (major units). Shown in the buy-feature slot while
|
|
628
|
+
* the spin button is in free-spins mode (`setFreeSpins(n > 0)`). */
|
|
629
|
+
setTotalWin(major: number): void;
|
|
799
630
|
setCurrency(spec: CurrencySpec): void;
|
|
800
631
|
/** Apply a Stake Engine jurisdiction config (the compliance switchboard) at runtime. */
|
|
801
632
|
applyJurisdiction(jur: JurisdictionConfig): void;
|
|
@@ -920,4 +751,4 @@ declare class Tweener {
|
|
|
920
751
|
/** Treat touch devices as non-desktop so we don't fire phantom hover states. */
|
|
921
752
|
declare function isDesktop(): boolean;
|
|
922
753
|
|
|
923
|
-
export { AutoplayDrawerView, AutoplayView, type AutoplayViewOptions, type
|
|
754
|
+
export { AutoplayDrawerView, AutoplayView, type AutoplayViewOptions, type BootedHud, type ButtonGlyph, ButtonView, type ButtonViewOptions, ControlView, ControlViewFactory, DialogView, type DialogViewOptions, type HudOptions, type InfoContentBuilder, MenuView, type MenuViewOptions, OpenUIPixi, OpenUIPixiOptions, type PanelBodyOptions, PanelBodyView, PanelView, type PanelViewOptions, type PopoverArt, type PopoverParts, PopoverView, ReadoutView, type ReadoutViewOptions, SelectView, type SelectViewOptions, SliderView, SpinSkin, SpinSkinFactory, SpinView, type SpinViewOptions, StepperView, type SvgSpinTextures, TextCellRenderer, type TextCellRendererOptions, ToggleView, type ToggleViewOptions, TurboView, type TurboViewOptions, Tweener, ValueDisplayView, defaultSpinSkin, drawSpin, isDesktop, mountHud, svgSpinSkin };
|