API Reference
This page summarizes the public surfaces most host apps need. The canonical package APIs live in the main luxy repo and should be checked before release.
Core package
@luxy-creative/core exports shared outcome, theme, haptic, accessibility, animation, reduced-motion, and quality primitives.
| API | Purpose |
|---|---|
LuxyOutcome | Shared outcome contract used by reward components. |
OutcomeMode | Union for outcome, resolveOutcome, and odds. |
OutcomeResolver | Async resolver contract for backend-first rewards. |
WeightedOutcome | Local weighted demo outcome entry. |
resolveLuxyOutcome | Resolves the active outcome mode. |
pickWeightedOutcome | Picks local demo outcomes. |
createOutcomeResolutionCache | Caches resolver state by interaction when needed. |
LuxyTheme / LuxyThemeOverrides | Runtime product theme contracts. |
LuxyQualityTier | auto, low, medium, or high quality policy. |
LuxyReducedMotionPolicy | Reduced-motion behavior contract. |
createHapticScheduler | Schedules host haptic drivers. |
createAccessibilityConfig | Builds component accessibility labels and hints. |
Scratch package
@luxy-creative/scratch-card exports both the high-level ticket layer and low-level card primitive.
| API | Purpose |
|---|---|
ScratchTicket / ScratchTicketProps | High-level gameplay ticket component and props. |
ScratchCard / ScratchCardProps | Low-level reveal component and props. |
ScratchCardHandle | Imperative card handle. |
ScratchTicketGame | Gameplay union: number match, symbol grid, bonus reveal, custom. |
ScratchTicketLayoutConfig | Ticket layout options and labels. |
ScratchTicketAssets | Expo Image source slots for ticket art. |
ScratchTicketTheme | Ticket-level color overrides. |
ScratchCoverPreset / ScratchCoverMaterial | Cover material contracts. |
ScratchBrushConfig | Brush size and sampling configuration. |
ScratchZone / ScratchZoneProgress | Normalized scratch zones and per-zone progress. |
ScratchHapticsConfig | Scratch haptic milestones. |
ScratchParticleConfig / ScratchSparkleConfig | Premium effect configuration. |
evaluateNumberMatchGame | Local preview evaluator for number-match games. |
evaluateSymbolGridGame | Local preview evaluator for symbol-grid games. |
evaluateBonusRevealGame | Local preview evaluator for bonus-reveal games. |
Slot package
@luxy-creative/slot-machine exports deterministic spin-to-win components and engine helpers.
| API | Purpose |
|---|---|
SlotMachine / SlotMachineProps | Slot component and props. |
SlotMachineHandle | Imperative slot handle. |
SlotOutcome / SlotOutcomePayload | Slot-specific outcome shape, including payload.stops. |
SlotSymbol | Symbol id, label, value, and metadata contract. |
SlotPhysics | Reel physics tuning. |
SlotEffectsConfig | Glass, payline glow, motion blur, and win treatment config. |
SlotHapticsConfig | Slot haptic scheduling config. |
SlotMachineController | Controller API for spin state. |
SlotSpinScheduler | Reel runtime scheduler. |
computeTargetCell | Maps final stops to reel cells. |
computeMotionBlurOpacity | Derives blur opacity from velocity and config. |
Callback policy
Callbacks are analytics and UI hooks, not secret transport. Pass reward ids, interaction ids, and state transitions. Do not pass raw tokens, full customer records, or fraud details.