@open-slot-ui/pixi 0.11.0 → 0.12.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
@@ -120,6 +120,8 @@ declare class ButtonView extends ControlView {
120
120
  /** Swap the placeholder glyph (e.g. speaker ↔ speaker-mute, fullscreen ↔ exit). */
121
121
  setGlyph(glyph: ButtonGlyph): void;
122
122
  private fitSprite;
123
+ /** Screen position of the current press, for the tap-slop check on release. */
124
+ private downPt;
123
125
  private readonly onDown;
124
126
  private readonly onUp;
125
127
  private readonly onUpOutside;
@@ -626,10 +628,10 @@ interface ReplayInfo {
626
628
  interface HudOptions extends OpenUIPixiOptions {
627
629
  hooks?: HostHooks;
628
630
  /**
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.
631
+ * Opt IN to the legacy white **HTML info menu** (a DOM overlay). By default the menu now
632
+ * renders as the in-canvas **Pixi `MenuView`** (Settings · Paytable · Rules, driven by
633
+ * `spec.menu`) so the whole HUD stays on the canvas no DOM UI. Set `infoMenu: true` to
634
+ * use the old DOM overlay instead. `menu: false` opts out of BOTH (host supplies its own).
633
635
  */
634
636
  infoMenu?: boolean;
635
637
  }
@@ -740,7 +742,9 @@ interface FeatureSpec {
740
742
  id: string;
741
743
  name: string;
742
744
  variant: 'buy' | 'boost';
743
- /** Price as a multiple of the current bet bet). */
745
+ /** Cost as a multiple of the base bet. For `buy` this is the FULL stake multiple
746
+ * (deducted = cost × bet); for `boost` it is the SURCHARGE over the base bet, so the
747
+ * full per-spin cost shown/deducted is (1 + cost) × bet. */
744
748
  cost: number;
745
749
  /** Card image URL (or data URI). Optional — a neutral gradient is used when absent. */
746
750
  image?: string;
@@ -759,34 +763,9 @@ interface BuyFeatureOptions {
759
763
  * displays a modified EFFECTIVE stake (boost active) instead of the base bet. */
760
764
  getBet?: () => number;
761
765
  }
762
- /** Mount the buy-feature modal. Returns a leak-free teardown. */
766
+ /** Mount the buy-feature modal (in-canvas Pixi). Returns a leak-free teardown. */
763
767
  declare function mountBuyFeatureModal(_app: Application, hud: BootedHud, features: FeatureSpec[], opts?: BuyFeatureOptions): () => void;
764
768
 
765
- /** Minimal HUD surface the confirm needs — the translator + theme font. */
766
- interface ConfirmUI {
767
- t(key: string, params?: Record<string, string | number>): string;
768
- theme: {
769
- type: {
770
- family: string;
771
- };
772
- };
773
- }
774
- interface ConfirmOptions {
775
- /** Heading (already resolved text, or an i18n key). Default `Buy Feature`. */
776
- title?: string;
777
- /** Body message (already resolved). */
778
- message: string;
779
- /** Confirm button label (resolved text or i18n key). Default `openui.confirm`. */
780
- confirmLabel?: string;
781
- /** Cancel button label. Default `openui.cancel`. */
782
- cancelLabel?: string;
783
- }
784
- /**
785
- * Show the universal confirm dialog. Resolves `true` on Confirm, `false` on Cancel / backdrop
786
- * / Escape. Self-mounting + self-cleaning; layers above everything (z-index above the buy modal).
787
- */
788
- declare function showConfirm(ui: ConfirmUI, opts: ConfirmOptions): Promise<boolean>;
789
-
790
769
  interface BootErrorOptions {
791
770
  title?: string;
792
771
  message?: string;
@@ -869,4 +848,4 @@ declare class Tweener {
869
848
  /** Treat touch devices as non-desktop so we don't fire phantom hover states. */
870
849
  declare function isDesktop(): boolean;
871
850
 
872
- export { AutoplayDrawerView, AutoplayView, type AutoplayViewOptions, type BootErrorOptions, type BootedHud, type ButtonGlyph, ButtonView, type ButtonViewOptions, type BuyFeatureOptions, type ConfirmOptions, 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, showConfirm, svgSpinSkin };
851
+ 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
@@ -120,6 +120,8 @@ declare class ButtonView extends ControlView {
120
120
  /** Swap the placeholder glyph (e.g. speaker ↔ speaker-mute, fullscreen ↔ exit). */
121
121
  setGlyph(glyph: ButtonGlyph): void;
122
122
  private fitSprite;
123
+ /** Screen position of the current press, for the tap-slop check on release. */
124
+ private downPt;
123
125
  private readonly onDown;
124
126
  private readonly onUp;
125
127
  private readonly onUpOutside;
@@ -626,10 +628,10 @@ interface ReplayInfo {
626
628
  interface HudOptions extends OpenUIPixiOptions {
627
629
  hooks?: HostHooks;
628
630
  /**
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.
631
+ * Opt IN to the legacy white **HTML info menu** (a DOM overlay). By default the menu now
632
+ * renders as the in-canvas **Pixi `MenuView`** (Settings · Paytable · Rules, driven by
633
+ * `spec.menu`) so the whole HUD stays on the canvas no DOM UI. Set `infoMenu: true` to
634
+ * use the old DOM overlay instead. `menu: false` opts out of BOTH (host supplies its own).
633
635
  */
634
636
  infoMenu?: boolean;
635
637
  }
@@ -740,7 +742,9 @@ interface FeatureSpec {
740
742
  id: string;
741
743
  name: string;
742
744
  variant: 'buy' | 'boost';
743
- /** Price as a multiple of the current bet bet). */
745
+ /** Cost as a multiple of the base bet. For `buy` this is the FULL stake multiple
746
+ * (deducted = cost × bet); for `boost` it is the SURCHARGE over the base bet, so the
747
+ * full per-spin cost shown/deducted is (1 + cost) × bet. */
744
748
  cost: number;
745
749
  /** Card image URL (or data URI). Optional — a neutral gradient is used when absent. */
746
750
  image?: string;
@@ -759,34 +763,9 @@ interface BuyFeatureOptions {
759
763
  * displays a modified EFFECTIVE stake (boost active) instead of the base bet. */
760
764
  getBet?: () => number;
761
765
  }
762
- /** Mount the buy-feature modal. Returns a leak-free teardown. */
766
+ /** Mount the buy-feature modal (in-canvas Pixi). Returns a leak-free teardown. */
763
767
  declare function mountBuyFeatureModal(_app: Application, hud: BootedHud, features: FeatureSpec[], opts?: BuyFeatureOptions): () => void;
764
768
 
765
- /** Minimal HUD surface the confirm needs — the translator + theme font. */
766
- interface ConfirmUI {
767
- t(key: string, params?: Record<string, string | number>): string;
768
- theme: {
769
- type: {
770
- family: string;
771
- };
772
- };
773
- }
774
- interface ConfirmOptions {
775
- /** Heading (already resolved text, or an i18n key). Default `Buy Feature`. */
776
- title?: string;
777
- /** Body message (already resolved). */
778
- message: string;
779
- /** Confirm button label (resolved text or i18n key). Default `openui.confirm`. */
780
- confirmLabel?: string;
781
- /** Cancel button label. Default `openui.cancel`. */
782
- cancelLabel?: string;
783
- }
784
- /**
785
- * Show the universal confirm dialog. Resolves `true` on Confirm, `false` on Cancel / backdrop
786
- * / Escape. Self-mounting + self-cleaning; layers above everything (z-index above the buy modal).
787
- */
788
- declare function showConfirm(ui: ConfirmUI, opts: ConfirmOptions): Promise<boolean>;
789
-
790
769
  interface BootErrorOptions {
791
770
  title?: string;
792
771
  message?: string;
@@ -869,4 +848,4 @@ declare class Tweener {
869
848
  /** Treat touch devices as non-desktop so we don't fire phantom hover states. */
870
849
  declare function isDesktop(): boolean;
871
850
 
872
- export { AutoplayDrawerView, AutoplayView, type AutoplayViewOptions, type BootErrorOptions, type BootedHud, type ButtonGlyph, ButtonView, type ButtonViewOptions, type BuyFeatureOptions, type ConfirmOptions, 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, showConfirm, svgSpinSkin };
851
+ 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 };