@open-slot-ui/pixi 0.7.1 → 0.8.2

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
@@ -625,6 +625,13 @@ interface ReplayInfo {
625
625
  }
626
626
  interface HudOptions extends OpenUIPixiOptions {
627
627
  hooks?: HostHooks;
628
+ /**
629
+ * Render the library's white HTML **info menu** (Settings · Paytable · Rules) — the Figma
630
+ * design, driven by `spec.menu`, label-left / control-right, fully modular + localized —
631
+ * instead of the in-canvas Pixi menu. Default `true`. `menu: false` opts out of BOTH (the
632
+ * host supplies its own menu). Set `infoMenu: false` to keep the old Pixi menu.
633
+ */
634
+ infoMenu?: boolean;
628
635
  }
629
636
  /**
630
637
  * The complete-HUD handle returned by `mountHud`. Wraps the headless OpenUI + the
@@ -722,6 +729,39 @@ interface BootedHud {
722
729
  */
723
730
  declare function mountHud(app: Application, spec?: UISpec, opts?: HudOptions): BootedHud;
724
731
 
732
+ /**
733
+ * Mount the info menu overlay for a booted `OpenUI`. Reads `ui.spec.menu`; opens/closes with
734
+ * `ui.settingsPanel` (the canvas ☰ drives it). Returns a leak-free teardown.
735
+ */
736
+ declare function mountInfoMenu(app: Application, ui: OpenUI): () => void;
737
+
738
+ /** A buy-feature card. */
739
+ interface FeatureSpec {
740
+ id: string;
741
+ name: string;
742
+ variant: 'buy' | 'boost';
743
+ /** Price as a multiple of the current bet (× bet). */
744
+ cost: number;
745
+ /** Card image URL (or data URI). Optional — a neutral gradient is used when absent. */
746
+ image?: string;
747
+ }
748
+ /** Configurable behavior of the activatable bet-boost cards. */
749
+ interface BuyFeatureOptions {
750
+ /** `'single'` → only one boost active at a time · `'multi'` → combine them. Default `'multi'`. */
751
+ activation?: 'single' | 'multi';
752
+ /** When any boost is active, disable the Buy buttons. Default `false`. */
753
+ activationBlocksBuy?: boolean;
754
+ /** Host hook for a confirmed Buy (the modal has just closed): deduct + start the feature. */
755
+ onBuy?: (id: string, cost: number) => void;
756
+ /** Host hook whenever the active-boost set changes (the modal stays open). */
757
+ onActivate?: (activeIds: string[], id: string, active: boolean) => void;
758
+ /** BASE bet source for pricing. Default reads ui.bet — pass this when ui.bet
759
+ * displays a modified EFFECTIVE stake (boost active) instead of the base bet. */
760
+ getBet?: () => number;
761
+ }
762
+ /** Mount the buy-feature modal. Returns a leak-free teardown. */
763
+ declare function mountBuyFeatureModal(_app: Application, hud: BootedHud, features: FeatureSpec[], opts?: BuyFeatureOptions): () => void;
764
+
725
765
  interface BootErrorOptions {
726
766
  title?: string;
727
767
  message?: string;
@@ -804,4 +844,4 @@ declare class Tweener {
804
844
  /** Treat touch devices as non-desktop so we don't fire phantom hover states. */
805
845
  declare function isDesktop(): boolean;
806
846
 
807
- export { AutoplayDrawerView, AutoplayView, type AutoplayViewOptions, type BootErrorOptions, 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, type ReplayInfo, 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, hideBootError, isDesktop, mountHud, showBootError, svgSpinSkin };
847
+ export { AutoplayDrawerView, AutoplayView, type AutoplayViewOptions, type BootErrorOptions, type BootedHud, type ButtonGlyph, ButtonView, type ButtonViewOptions, type BuyFeatureOptions, ControlView, ControlViewFactory, DialogView, type DialogViewOptions, type FeatureSpec, type HudOptions, type InfoContentBuilder, MenuView, type MenuViewOptions, OpenUIPixi, OpenUIPixiOptions, type PanelBodyOptions, PanelBodyView, PanelView, type PanelViewOptions, type PopoverArt, type PopoverParts, PopoverView, ReadoutView, type ReadoutViewOptions, type ReplayInfo, 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, hideBootError, isDesktop, mountBuyFeatureModal, mountHud, mountInfoMenu, showBootError, svgSpinSkin };
package/dist/index.d.ts CHANGED
@@ -625,6 +625,13 @@ interface ReplayInfo {
625
625
  }
626
626
  interface HudOptions extends OpenUIPixiOptions {
627
627
  hooks?: HostHooks;
628
+ /**
629
+ * Render the library's white HTML **info menu** (Settings · Paytable · Rules) — the Figma
630
+ * design, driven by `spec.menu`, label-left / control-right, fully modular + localized —
631
+ * instead of the in-canvas Pixi menu. Default `true`. `menu: false` opts out of BOTH (the
632
+ * host supplies its own menu). Set `infoMenu: false` to keep the old Pixi menu.
633
+ */
634
+ infoMenu?: boolean;
628
635
  }
629
636
  /**
630
637
  * The complete-HUD handle returned by `mountHud`. Wraps the headless OpenUI + the
@@ -722,6 +729,39 @@ interface BootedHud {
722
729
  */
723
730
  declare function mountHud(app: Application, spec?: UISpec, opts?: HudOptions): BootedHud;
724
731
 
732
+ /**
733
+ * Mount the info menu overlay for a booted `OpenUI`. Reads `ui.spec.menu`; opens/closes with
734
+ * `ui.settingsPanel` (the canvas ☰ drives it). Returns a leak-free teardown.
735
+ */
736
+ declare function mountInfoMenu(app: Application, ui: OpenUI): () => void;
737
+
738
+ /** A buy-feature card. */
739
+ interface FeatureSpec {
740
+ id: string;
741
+ name: string;
742
+ variant: 'buy' | 'boost';
743
+ /** Price as a multiple of the current bet (× bet). */
744
+ cost: number;
745
+ /** Card image URL (or data URI). Optional — a neutral gradient is used when absent. */
746
+ image?: string;
747
+ }
748
+ /** Configurable behavior of the activatable bet-boost cards. */
749
+ interface BuyFeatureOptions {
750
+ /** `'single'` → only one boost active at a time · `'multi'` → combine them. Default `'multi'`. */
751
+ activation?: 'single' | 'multi';
752
+ /** When any boost is active, disable the Buy buttons. Default `false`. */
753
+ activationBlocksBuy?: boolean;
754
+ /** Host hook for a confirmed Buy (the modal has just closed): deduct + start the feature. */
755
+ onBuy?: (id: string, cost: number) => void;
756
+ /** Host hook whenever the active-boost set changes (the modal stays open). */
757
+ onActivate?: (activeIds: string[], id: string, active: boolean) => void;
758
+ /** BASE bet source for pricing. Default reads ui.bet — pass this when ui.bet
759
+ * displays a modified EFFECTIVE stake (boost active) instead of the base bet. */
760
+ getBet?: () => number;
761
+ }
762
+ /** Mount the buy-feature modal. Returns a leak-free teardown. */
763
+ declare function mountBuyFeatureModal(_app: Application, hud: BootedHud, features: FeatureSpec[], opts?: BuyFeatureOptions): () => void;
764
+
725
765
  interface BootErrorOptions {
726
766
  title?: string;
727
767
  message?: string;
@@ -804,4 +844,4 @@ declare class Tweener {
804
844
  /** Treat touch devices as non-desktop so we don't fire phantom hover states. */
805
845
  declare function isDesktop(): boolean;
806
846
 
807
- export { AutoplayDrawerView, AutoplayView, type AutoplayViewOptions, type BootErrorOptions, 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, type ReplayInfo, 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, hideBootError, isDesktop, mountHud, showBootError, svgSpinSkin };
847
+ export { AutoplayDrawerView, AutoplayView, type AutoplayViewOptions, type BootErrorOptions, type BootedHud, type ButtonGlyph, ButtonView, type ButtonViewOptions, type BuyFeatureOptions, ControlView, ControlViewFactory, DialogView, type DialogViewOptions, type FeatureSpec, type HudOptions, type InfoContentBuilder, MenuView, type MenuViewOptions, OpenUIPixi, OpenUIPixiOptions, type PanelBodyOptions, PanelBodyView, PanelView, type PanelViewOptions, type PopoverArt, type PopoverParts, PopoverView, ReadoutView, type ReadoutViewOptions, type ReplayInfo, 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, hideBootError, isDesktop, mountBuyFeatureModal, mountHud, mountInfoMenu, showBootError, svgSpinSkin };