{"version":3,"file":"ngwr-border-glow.mjs","sources":["../../../projects/lib/border-glow/border-glow.ts","../../../projects/lib/border-glow/border-glow.html","../../../projects/lib/border-glow/ngwr-border-glow.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n *\n * Port of the reactbits.dev BorderGlow effect — a cursor-tracked cone of\n * mesh-gradient light that follows the pointer along the card's perimeter,\n * with an outer halo and optional auto-sweep on mount.\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n  Component,\n  DestroyRef,\n  ElementRef,\n  PLATFORM_ID,\n  ViewEncapsulation,\n  computed,\n  effect,\n  inject,\n  input,\n} from '@angular/core';\n\nimport { WrPlatform } from 'ngwr/platform';\nimport { numAttr } from 'ngwr/utils';\n\nconst RADIANS_TO_DEG = 180 / Math.PI;\n\ninterface ParsedHsl {\n  readonly h: number;\n  readonly s: number;\n  readonly l: number;\n}\n\nfunction parseHsl(input: string): ParsedHsl {\n  const match = /([\\d.]+)\\s*([\\d.]+)%?\\s*([\\d.]+)%?/.exec(input);\n  if (!match) return { h: 40, s: 80, l: 80 };\n  return { h: Number.parseFloat(match[1]), s: Number.parseFloat(match[2]), l: Number.parseFloat(match[3]) };\n}\n\nconst GLOW_OPACITY_STEPS = [100, 60, 50, 40, 30, 20, 10] as const;\nconst GLOW_VAR_SUFFIXES = ['', '-60', '-50', '-40', '-30', '-20', '-10'] as const;\n\nconst GRADIENT_POSITIONS = ['80% 55%', '69% 34%', '8% 6%', '41% 38%', '86% 85%', '82% 18%', '51% 4%'] as const;\nconst GRADIENT_VAR_NAMES = [\n  '--wr-border-glow-gradient-one',\n  '--wr-border-glow-gradient-two',\n  '--wr-border-glow-gradient-three',\n  '--wr-border-glow-gradient-four',\n  '--wr-border-glow-gradient-five',\n  '--wr-border-glow-gradient-six',\n  '--wr-border-glow-gradient-seven',\n] as const;\nconst GRADIENT_COLOR_INDEX = [0, 1, 2, 0, 1, 2, 1] as const;\n\nconst DEFAULT_COLORS: readonly string[] = ['#c084fc', '#f472b6', '#38bdf8'];\n\nfunction buildGlowVars(glowColor: string, intensity: number): Record<string, string> {\n  const { h, s, l } = parseHsl(glowColor);\n  const base = `${h}deg ${s}% ${l}%`;\n  const out: Record<string, string> = {};\n  for (let i = 0; i < GLOW_OPACITY_STEPS.length; i++) {\n    const alpha = Math.min(GLOW_OPACITY_STEPS[i] * intensity, 100);\n    out[`--wr-border-glow-color${GLOW_VAR_SUFFIXES[i]}`] = `hsl(${base} / ${alpha}%)`;\n  }\n  return out;\n}\n\nfunction buildGradientVars(colors: readonly string[]): Record<string, string> {\n  const out: Record<string, string> = {};\n  const palette = colors.length > 0 ? colors : DEFAULT_COLORS;\n  for (let i = 0; i < GRADIENT_VAR_NAMES.length; i++) {\n    const colour = palette[Math.min(GRADIENT_COLOR_INDEX[i], palette.length - 1)];\n    out[GRADIENT_VAR_NAMES[i]] = `radial-gradient(at ${GRADIENT_POSITIONS[i]}, ${colour} 0px, transparent 50%)`;\n  }\n  out['--wr-border-glow-gradient-base'] = `linear-gradient(${palette[0]} 0 100%)`;\n  return out;\n}\n\ninterface AnimateOptions {\n  readonly start?: number;\n  readonly end?: number;\n  readonly duration?: number;\n  readonly delay?: number;\n  readonly ease?: (t: number) => number;\n  readonly onUpdate: (v: number) => void;\n  readonly onEnd?: () => void;\n}\n\n/** Tiny rAF-driven tweener. Returns a cancel function so callers can clean up on destroy. */\nfunction animateValue(opts: AnimateOptions): () => void {\n  const { start = 0, end = 100, duration = 1000, delay = 0, ease = (t: number): number => t, onUpdate, onEnd } = opts;\n  let raf = 0;\n  let cancelled = false;\n\n  const startAt = performance.now() + delay;\n  const tick = (): void => {\n    if (cancelled) return;\n    const elapsed = performance.now() - startAt;\n    const t = Math.min(Math.max(elapsed / duration, 0), 1);\n    onUpdate(start + (end - start) * ease(t));\n    if (t < 1) raf = requestAnimationFrame(tick);\n    else if (onEnd) onEnd();\n  };\n\n  const timer = setTimeout(() => {\n    raf = requestAnimationFrame(tick);\n  }, delay);\n\n  return () => {\n    cancelled = true;\n    clearTimeout(timer);\n    cancelAnimationFrame(raf);\n  };\n}\n\n/**\n * Cursor-tracked glowing border card. A cone of light follows the pointer\n * along the card's perimeter, brightening as the cursor approaches an edge.\n *\n * - Outer halo via stacked `box-shadow` on an inner `.edge-light` element.\n * - Inner \"soft bloom\" via `mix-blend-mode: soft-light` for content near the\n *   edges (subtle; control via `[fillOpacity]`).\n * - Optional `[animated]` mode performs a one-shot sweep on mount, useful\n *   for drawing attention to a freshly-rendered card.\n *\n * @example\n * ```html\n * <wr-border-glow [animated]=\"true\" [colors]=\"['#c084fc', '#f472b6', '#38bdf8']\">\n *   <h3>Hover me</h3>\n *   <p>The border lights up where the cursor is.</p>\n * </wr-border-glow>\n * ```\n *\n * @see https://www.reactbits.dev/components/border-glow (visual reference)\n */\n@Component({\n  selector: 'wr-border-glow',\n  templateUrl: './border-glow.html',\n  styleUrl: './border-glow.scss',\n  encapsulation: ViewEncapsulation.None,\n  host: {\n    class: 'wr-border-glow',\n    '(pointermove)': 'onPointerMove($event)',\n  },\n})\nexport class WrBorderGlow {\n  /** Card background fill. When unset, uses the theme surface token. */\n  readonly backgroundColor = input<string | null>(null);\n\n  /** Corner radius in pixels. @default 28 */\n  readonly borderRadius = input(28, { transform: numAttr(28) });\n\n  /** Halo extent in pixels — how far the outer glow reaches past the card edge. @default 40 */\n  readonly glowRadius = input(40, { transform: numAttr(40) });\n\n  /** Halo opacity multiplier (1 = full strength). @default 1 */\n  readonly glowIntensity = input(1, { transform: numAttr(1) });\n\n  /** Width of the lit cone as a percentage of the perimeter. @default 25 */\n  readonly coneSpread = input(25, { transform: numAttr(25) });\n\n  /** How sharply the halo fades as the cursor leaves the edge. Lower = wider falloff. @default 30 */\n  readonly edgeSensitivity = input(30, { transform: numAttr(30) });\n\n  /** Strength of the soft-light interior fill near edges. @default 0.5 */\n  readonly fillOpacity = input(0.5, { transform: numAttr(0.5) });\n\n  /**\n   * Halo colour as `'H S L'` (HSL parts, no commas). When unset, the theme\n   * decides: a deep amber on light surfaces, pale amber on dark. Note\n   * `glowIntensity` only applies alongside an explicit `glowColor`.\n   */\n  readonly glowColor = input<string | null>(null);\n\n  /**\n   * Mesh-gradient palette for the colored border slice. When unset, the\n   * theme decides: deep tones on light, pastels on dark.\n   */\n  readonly colors = input<readonly string[] | null>(null);\n\n  /** Play a one-shot perimeter sweep on mount, then fade out. @default false */\n  readonly animated = input(false, { transform: coerceBooleanProperty });\n\n  private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n  private readonly platform = inject(WrPlatform);\n  private readonly destroyRef = inject(DestroyRef);\n  private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n  /** Inline CSS variable bag — recomputed when colour / radius / sensitivity inputs change. */\n  protected readonly cssVars = computed<Record<string, string>>(() => {\n    const vars: Record<string, string> = {\n      '--wr-border-glow-radius': `${this.borderRadius()}px`,\n      '--wr-border-glow-padding': `${this.glowRadius()}px`,\n      '--wr-border-glow-cone-spread': String(this.coneSpread()),\n      '--wr-border-glow-edge-sensitivity': String(this.edgeSensitivity()),\n      '--wr-border-glow-fill-opacity': String(this.fillOpacity()),\n    };\n    const colors = this.colors();\n    if (colors !== null) Object.assign(vars, buildGradientVars(colors));\n    // Colour vars are written only when set — otherwise the stylesheet's\n    // per-theme defaults (light vs dark) take over.\n    const bg = this.backgroundColor();\n    if (bg !== null) vars['--wr-border-glow-bg'] = bg;\n    const glow = this.glowColor();\n    if (glow !== null) Object.assign(vars, buildGlowVars(glow, this.glowIntensity()));\n    return vars;\n  });\n\n  constructor() {\n    // Apply the variable bag to the host on every input change. Bind in an\n    // effect rather than `host: { '[style.--foo]': '...' }` so a single\n    // `setProperty` loop handles the lot.\n    effect(() => {\n      const host = this.el.nativeElement;\n      const vars = this.cssVars();\n      for (const [k, v] of Object.entries(vars)) host.style.setProperty(k, v);\n    });\n\n    if (!this.isBrowser) return;\n\n    // Auto-sweep on mount — fires once when `animated` is true.\n    effect(() => {\n      if (!this.animated()) return;\n      this.runAutoSweep();\n    });\n  }\n\n  /** Pointer-driven update of `--wr-border-glow-angle` + `--wr-border-glow-edge-proximity`. */\n  protected onPointerMove(event: PointerEvent): void {\n    const host = this.el.nativeElement;\n    const rect = host.getBoundingClientRect();\n    const x = event.clientX - rect.left;\n    const y = event.clientY - rect.top;\n    const cx = rect.width / 2;\n    const cy = rect.height / 2;\n\n    const dx = x - cx;\n    const dy = y - cy;\n\n    // `edge-proximity`: 0 at centre, 1 at the perimeter (whichever axis hits first).\n    let edge = 0;\n    if (dx !== 0 || dy !== 0) {\n      const kx = dx === 0 ? Infinity : cx / Math.abs(dx);\n      const ky = dy === 0 ? Infinity : cy / Math.abs(dy);\n      edge = Math.min(Math.max(1 / Math.min(kx, ky), 0), 1);\n    }\n\n    // `cursor-angle`: 0deg = top, increases clockwise.\n    let angle = 0;\n    if (dx !== 0 || dy !== 0) {\n      angle = Math.atan2(dy, dx) * RADIANS_TO_DEG + 90;\n      if (angle < 0) angle += 360;\n    }\n\n    host.style.setProperty('--wr-border-glow-edge-proximity', (edge * 100).toFixed(3));\n    host.style.setProperty('--wr-border-glow-angle', `${angle.toFixed(3)}deg`);\n  }\n\n  /** One-shot perimeter sweep: in → around → out, mirroring the reactbits behaviour. */\n  private runAutoSweep(): void {\n    // Reduced motion: skip the decorative mount sweep. The pointer-driven\n    // glow stays — it maps 1:1 to the cursor with no autonomous motion.\n    if (this.platform.prefersReducedMotion()) return;\n    const host = this.el.nativeElement;\n    const ANGLE_START = 110;\n    const ANGLE_END = 465;\n    host.classList.add('wr-border-glow--sweeping');\n    host.style.setProperty('--wr-border-glow-angle', `${ANGLE_START}deg`);\n\n    const easeOutCubic = (t: number): number => 1 - (1 - t) ** 3;\n    const easeInCubic = (t: number): number => t * t * t;\n    const lerpAngle = (v: number): string => `${(ANGLE_END - ANGLE_START) * (v / 100) + ANGLE_START}deg`;\n\n    // 1. Ramp edge-proximity up to 100 quickly.\n    const cancelA = animateValue({\n      duration: 500,\n      onUpdate: v => host.style.setProperty('--wr-border-glow-edge-proximity', `${v}`),\n    });\n    // 2. Sweep angle first half (ease-in).\n    const cancelB = animateValue({\n      duration: 1500,\n      end: 50,\n      ease: easeInCubic,\n      onUpdate: v => host.style.setProperty('--wr-border-glow-angle', lerpAngle(v)),\n    });\n    // 3. Sweep angle second half (ease-out).\n    const cancelC = animateValue({\n      delay: 1500,\n      duration: 2250,\n      start: 50,\n      end: 100,\n      ease: easeOutCubic,\n      onUpdate: v => host.style.setProperty('--wr-border-glow-angle', lerpAngle(v)),\n    });\n    // 4. Fade proximity back to 0.\n    const cancelD = animateValue({\n      delay: 2500,\n      duration: 1500,\n      start: 100,\n      end: 0,\n      ease: easeInCubic,\n      onUpdate: v => host.style.setProperty('--wr-border-glow-edge-proximity', `${v}`),\n      onEnd: () => host.classList.remove('wr-border-glow--sweeping'),\n    });\n\n    this.destroyRef.onDestroy(() => {\n      cancelA();\n      cancelB();\n      cancelC();\n      cancelD();\n      host.classList.remove('wr-border-glow--sweeping');\n    });\n  }\n}\n","<span class=\"wr-border-glow__edge\" aria-hidden=\"true\"></span>\n<div class=\"wr-border-glow__inner\">\n  <ng-content />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;;AASG;AAmBH,MAAM,cAAc,GAAG,GAAG,GAAG,IAAI,CAAC,EAAE;AAQpC,SAAS,QAAQ,CAAC,KAAa,EAAA;IAC7B,MAAM,KAAK,GAAG,oCAAoC,CAAC,IAAI,CAAC,KAAK,CAAC;AAC9D,IAAA,IAAI,CAAC,KAAK;AAAE,QAAA,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE;AAC1C,IAAA,OAAO,EAAE,CAAC,EAAE,MAAM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