{"version":3,"sources":["../../src/vanilla/index.ts"],"names":[],"mappings":";;;;AAuCO,SAAS,YAAA,CAAa,OAAA,GAA+B,EAAC,EAAqB;AAEhF,EAAA,IAAI,OAAO,WAAW,WAAA,EAAa;AACjC,IAAA,MAAM,oBAAA,GAAuB,MAAA,CAAO,UAAA,CAAW,kCAAkC,CAAA,CAAE,OAAA;AACnF,IAAA,IAAI,oBAAA,EAAsB;AAExB,MAAA,OAAO,EAAE,SAAS,MAAM;AAAA,MAAC,CAAA,EAAE;AAAA,IAC7B;AAAA,EACF;AAGA,EAAA,MAAM,MAAA,GAAS,IAAI,cAAA,EAAe;AAGlC,EAAA,MAAM,EAAE,MAAA,GAAS,WAAA,EAAa,GAAG,eAAc,GAAI,OAAA;AAInD,EAAA,MAAM,cAAA,GACJ,MAAA,KAAW,UAAA,GACP,oBAAA,CAAqB,aAAa,CAAA,GAClC,MAAA,KAAW,SAAA,GACX,mBAAA,CAAoB,aAAa,CAAA,GACjC,MAAA,KAAW,UAAA,GACX,oBAAA,CAAqB,aAAa,CAAA,GAClC,MAAA,KAAW,MAAA,GACX,gBAAA,CAAiB,aAAa,CAAA,GAC9B,MAAA,KAAW,QAAA,GACX,kBAAA,CAAmB,aAAa,CAAA,GAChC,qBAAA,CAAsB,aAAa,CAAA;AAGzC,EAAA,MAAA,CAAO,MAAM,cAAc,CAAA;AAE3B,EAAA,OAAO;AAAA,IACL,OAAA,EAAS,MAAM,MAAA,CAAO,OAAA;AAAQ,GAChC;AACF","file":"index.mjs","sourcesContent":["import { CursorFXEngine, createFairyDustEffect, createSparkleEffect, createConfettiEffect, createRetroCRTEffect, createSnowEffect, createBubbleEffect, ImageLoader } from '../core';\n\n// Re-export ImageLoader for CDN and vanilla users\nexport { ImageLoader };\n\nexport type CursorEffectType = 'fairyDust' | 'sparkle' | 'confetti' | 'retroCRT' | 'snow' | 'bubble';\n\nexport interface InitCursorFXOptions {\n  effect?: CursorEffectType;\n  colors?: string[];\n  particleCount?: number;\n  particleSize?: number;\n  gravity?: number;\n  maxLife?: number;\n  velocity?: number;\n}\n\nexport interface CursorFXInstance {\n  destroy: () => void;\n}\n\n/**\n * Initialize cursor effects with a single function call.\n * Creates canvas, appends to body, and starts the fairy dust effect.\n *\n * @param options - Configuration options for the effect\n * @returns Instance with destroy() method for cleanup\n *\n * @example\n * ```ts\n * const fx = initCursorFX({\n *   colors: ['#FFD700', '#FF69B4'],\n *   particleCount: 5\n * });\n *\n * // Later, to cleanup:\n * fx.destroy();\n * ```\n */\nexport function initCursorFX(options: InitCursorFXOptions = {}): CursorFXInstance {\n  // Check for prefers-reduced-motion\n  if (typeof window !== 'undefined') {\n    const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n    if (prefersReducedMotion) {\n      // Return no-op instance if user prefers reduced motion\n      return { destroy: () => {} };\n    }\n  }\n\n  // Create engine (automatically creates and appends canvas with fixed positioning)\n  const engine = new CursorFXEngine();\n\n  // Extract effect type from options\n  const { effect = 'fairyDust', ...effectOptions } = options;\n\n  // Select effect based on type\n  // Each effect will use its own defaults unless overridden in effectOptions\n  const selectedEffect =\n    effect === 'confetti'\n      ? createConfettiEffect(effectOptions)\n      : effect === 'sparkle'\n      ? createSparkleEffect(effectOptions)\n      : effect === 'retroCRT'\n      ? createRetroCRTEffect(effectOptions)\n      : effect === 'snow'\n      ? createSnowEffect(effectOptions)\n      : effect === 'bubble'\n      ? createBubbleEffect(effectOptions)\n      : createFairyDustEffect(effectOptions);\n\n  // Start the engine with the effect\n  engine.start(selectedEffect);\n\n  return {\n    destroy: () => engine.destroy(),\n  };\n}\n\n// Export types for TypeScript users\nexport type { EffectOptions } from '../core/types';\n"]}