{"version":3,"file":"styloviz-core-directives.mjs","names":[],"sources":["../../../../projects/core/directives/chart-animate.directive.ts","../../../../projects/core/directives/autofocus.directive.ts","../../../../projects/core/directives/autosize.directive.ts","../../../../projects/core/directives/stop-propagation.directive.ts","../../../../projects/core/directives/reveal.directive.ts","../../../../projects/core/directives/pause-offscreen.directive.ts","../../../../projects/core/directives/listen-while.ts"],"sourcesContent":["import {\n  Directive,\n  ElementRef,\n  OnDestroy,\n  OnInit,\n  inject,\n} from '@angular/core';\n\n/**\n * SvChartAnimDirective — Viewport-aware chart animation trigger.\n *\n * Attach `svChartAnim` to the root wrapper of any Styloviz chart.\n * Uses IntersectionObserver to add `.sv-animate` once the chart\n * enters the viewport (threshold 10%), triggering CSS bar-grow animations.\n *\n * @example\n * ```html\n * <div svChartAnim class=\"flex flex-col gap-3\">\n *   <!-- chart content -->\n * </div>\n * ```\n */\n@Directive({\n  selector: '[svChartAnim]',\n  standalone: true,\n})\nexport class SvChartAnimDirective implements OnInit, OnDestroy {\n  private readonly el = inject(ElementRef<HTMLElement>);\n  private observer?: IntersectionObserver;\n\n  ngOnInit(): void {\n    // `IntersectionObserver` does not exist under SSR or in a DOM shim such as\n    // jsdom, and this used to throw there — taking every chart in the kit down\n    // with it. The animation is decorative, so its absence just means the\n    // chart renders in its final state immediately.\n    if (typeof IntersectionObserver === 'undefined') {\n      this.el.nativeElement.classList.add('sv-animate');\n      return;\n    }\n\n    this.observer = new IntersectionObserver(\n      (entries) => {\n        entries.forEach((entry) => {\n          if (entry.isIntersecting) {\n            requestAnimationFrame(() => {\n              (entry.target as HTMLElement).classList.add('sv-animate');\n            });\n            this.observer?.unobserve(entry.target);\n          }\n        });\n      },\n      { threshold: 0.1 }\n    );\n\n    this.observer.observe(this.el.nativeElement);\n  }\n\n  ngOnDestroy(): void {\n    this.observer?.disconnect();\n  }\n}\n","import { Directive, ElementRef, inject, input, afterNextRender, Injector } from '@angular/core';\n\n/**\n * Move focus to this element when it appears.\n *\n * The native `autofocus` attribute does not do this. It is specified to apply\n * when a *document* finishes loading, and browsers vary on what they do with it\n * on an element inserted later — which is exactly the case that matters here: a\n * cell editor opening on double-click, a picker's search box appearing inside a\n * popover, a reply box expanding under a comment. Those either worked by\n * accident or not at all, and `@angular-eslint`'s blanket `no-autofocus` was\n * flagging them for the wrong reason — the attribute is not merely bad practice\n * on dynamic content, it is inert.\n *\n * Focus is applied after the next render rather than in `ngOnInit`, because at\n * init the element may not be attached yet — and `.focus()` on a detached node\n * silently does nothing, which is the failure mode that makes people reach for\n * `setTimeout(…, 0)` and hope.\n *\n * Only use this where the user's own action caused the element to appear.\n * Stealing focus on page load is the accessibility problem `no-autofocus`\n * exists to prevent, and this directive does not make that acceptable.\n *\n * ```html\n * <input svAutofocus [svAutofocus]=\"isEditing()\" />\n * ```\n */\n@Directive({\n  selector: '[svAutofocus]',\n  standalone: true,\n})\nexport class SvAutofocusDirective {\n  private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n  private readonly injector = inject(Injector);\n\n  /**\n   * Set to `false` to render the element without taking focus. Bare\n   * `svAutofocus` (no value) reads as an empty string, which is why this\n   * accepts `'' | boolean` rather than `boolean` alone.\n   * @default true\n   */\n  readonly svAutofocus = input<'' | boolean>(true);\n\n  /** Select existing text as well, for an editor opening over a current value. */\n  readonly selectOnFocus = input<boolean>(false);\n\n  constructor() {\n    afterNextRender(\n      () => {\n        if (this.svAutofocus() === false) return;\n        const node = this.el.nativeElement;\n        node.focus();\n        if (\n          this.selectOnFocus() &&\n          (node instanceof HTMLInputElement || node instanceof HTMLTextAreaElement)\n        ) {\n          node.select();\n        }\n      },\n      { injector: this.injector },\n    );\n  }\n}\n","import { Directive, ElementRef, afterRenderEffect, inject, input } from '@angular/core';\n\n/**\n * A `<textarea>` that grows with its text (`FI-27-V2`, `FI-12-M5`).\n *\n * ★★★ `field-sizing: content` IS THE ANSWER AND IT IS NOT YET EVERYWHERE.\n *     Chromium sizes a textarea to its content with one declaration; WebKit\n *     and Firefox do not support it yet and ignore it — leaving a fixed box\n *     with a scrollbar, which is the thing being fixed. So the CSS is used\n *     where `CSS.supports` says it works, and everywhere else the height is\n *     MEASURED: collapse to `auto`, read `scrollHeight`, set it.\n *\n * ★★ THE MEASURED PATH NEEDS TO KNOW WHEN THE TEXT CHANGED. Typing fires\n *    `input`, but a value written by a form (`writeValue`, `[value]`) fires\n *    nothing — so the host binds `[svAutosizeValue]` to the same value and the\n *    directive re-measures after the render that wrote it.\n *\n * ★ `svAutosizeMaxRows` caps the growth; past it the box scrolls. The cap is\n *   computed from the element's own line-height and padding, so it holds in\n *   both paths.\n *\n * ```html\n * <textarea svAutosize [svAutosizeValue]=\"value()\" [svAutosizeMaxRows]=\"8\"></textarea>\n * ```\n */\n@Directive({\n  selector: 'textarea[svAutosize]',\n  standalone: true,\n  host: {\n    '(input)': 'resize()', // sv-i18n-ignore: host binding\n    '[attr.data-sv-autosize]': 'enabled() ? mode : null', // sv-i18n-ignore: host binding\n  },\n})\nexport class SvAutosizeDirective {\n  private readonly el = inject<ElementRef<HTMLTextAreaElement>>(ElementRef);\n\n  /**\n   * Turn autosizing on. Bare `svAutosize` reads as `''`, which is on.\n   * @default true\n   */\n  readonly svAutosize = input<'' | boolean>(true);\n  /** The text, so a value written without an `input` event still resizes. */\n  readonly svAutosizeValue = input<string | null | undefined>(undefined);\n  /** Most rows before the box scrolls; `0` is no cap. @default 0 */\n  readonly svAutosizeMaxRows = input<number>(0);\n\n  /** `'css'` where `field-sizing: content` works, `'measure'` elsewhere. */\n  readonly mode: 'css' | 'measure' =\n    typeof CSS !== 'undefined' && typeof CSS.supports === 'function' && CSS.supports('field-sizing', 'content')\n      ? 'css'\n      : 'measure';\n\n  protected enabled(): boolean {\n    return this.svAutosize() !== false;\n  }\n\n  constructor() {\n    afterRenderEffect(() => {\n      this.svAutosizeValue();\n      this.svAutosizeMaxRows();\n      const on = this.enabled();\n      const node = this.el.nativeElement;\n      if (!on) {\n        node.style.removeProperty('field-sizing');\n        node.style.removeProperty('min-height');\n        node.style.removeProperty('max-height');\n        node.style.removeProperty('height');\n        node.style.removeProperty('overflow-y');\n        return;\n      }\n      if (this.mode === 'css') {\n        node.style.setProperty('field-sizing', 'content');\n        // `field-sizing` ignores `rows`; keep it as the floor the measured path has.\n        const floor = this.rowsPx(node.rows || 0);\n        if (floor) node.style.minHeight = `${floor}px`;\n        const cap = this.capPx();\n        if (cap) node.style.maxHeight = `${cap}px`;\n        else node.style.removeProperty('max-height');\n        return;\n      }\n      this.resize();\n    });\n  }\n\n  /** The height `svAutosizeMaxRows` allows, in px, or 0 for none. */\n  private capPx(): number {\n    return this.rowsPx(this.svAutosizeMaxRows());\n  }\n\n  /** The height of `count` rows of this textarea's text, padding (and border) included; 0 for none. */\n  private rowsPx(count: number): number {\n    const rows = Math.floor(count);\n    if (!(rows > 0) || typeof getComputedStyle !== 'function') return 0;\n    const style = getComputedStyle(this.el.nativeElement);\n    const fontSize = parseFloat(style.fontSize) || 16;\n    const line = parseFloat(style.lineHeight) || fontSize * 1.5;\n    const chrome = (parseFloat(style.paddingTop) || 0) + (parseFloat(style.paddingBottom) || 0)\n      + (style.boxSizing === 'border-box'\n        ? (parseFloat(style.borderTopWidth) || 0) + (parseFloat(style.borderBottomWidth) || 0)\n        : 0);\n    return rows * line + chrome;\n  }\n\n  /** Measure and set the height (the fallback path; a no-op where CSS does it). */\n  resize(): void {\n    if (!this.enabled() || this.mode === 'css') return;\n    const node = this.el.nativeElement;\n    node.style.height = 'auto';\n    const style = typeof getComputedStyle === 'function' ? getComputedStyle(node) : null;\n    const borders = style && style.boxSizing === 'border-box'\n      ? (parseFloat(style.borderTopWidth) || 0) + (parseFloat(style.borderBottomWidth) || 0)\n      : 0;\n    const wanted = node.scrollHeight + borders;\n    const cap = this.capPx();\n    const height = cap ? Math.min(wanted, cap) : wanted;\n    node.style.height = `${height}px`;\n    node.style.overflowY = cap && wanted > cap ? 'auto' : 'hidden';\n  }\n}\n","import { Directive } from '@angular/core';\n\n/**\n * Stops a click reaching an outside-click listener, without putting a\n * behaviour-free handler in the template.\n *\n * Panels that close on an outside click need their own clicks to not count as\n * \"outside\". The usual spelling is `(click)=\"$event.stopPropagation()\"` on the\n * panel — which reads to both a reviewer and `@angular-eslint`'s\n * `click-events-have-key-events` / `interactive-supports-focus` rules as an\n * interactive element, because it has a click handler. It is not one. There is\n * nothing to reach by keyboard because there is no behaviour: the handler exists\n * to *prevent* an effect, not to cause one.\n *\n * That accounted for 31 elements — roughly 62 of the 147 keyboard-accessibility\n * warnings in this repo, none of them a real defect, all of them crowding out\n * the ones that are.\n *\n * Naming the intent fixes both problems: the template says what it means, and\n * the rules stop reporting an interaction that does not exist.\n *\n * @example <div class=\"panel\" svStopPropagation> … </div>\n */\n@Directive({\n  selector: '[svStopPropagation]',\n  standalone: true,\n  host: { '(click)': '$event.stopPropagation()' },\n})\nexport class SvStopPropagationDirective {}\n","import { afterNextRender, DestroyRef, Directive, ElementRef, inject, input } from '@angular/core';\n\n/**\n * ============================================================\n *  svReveal — a section fades up as it comes into view\n * ============================================================\n *\n *  Promoted out of the portfolio template (2026-08-26) when a second template\n *  needed it. The transition itself is CSS on `[data-sv-reveal]` and lives in\n *  each template's own token block in `styles.css`, because a packed template\n *  ships only what is between its markers — a template without those rules\n *  gets no animation, which is the same graceful nothing every other failure\n *  path here produces.\n * ============================================================\n *\n *  ★★★ THE HIDDEN STATE IS APPLIED BY JAVASCRIPT, NEVER BY THE STYLESHEET.\n *\n *      The obvious build is `opacity-0` in the markup and a class that turns\n *      it on. That ships a page whose content is invisible to anyone the\n *      script never reaches — a crawler reading the prerendered HTML, a\n *      browser where the bundle failed, a reader who has asked their OS for\n *      less motion. The failure is total and silent: the page looks blank.\n *\n *      So the element starts visible, in the markup, and this directive hides\n *      it only once it has decided it can animate — which means it has a DOM,\n *      an IntersectionObserver, and permission to move. Every path that is not\n *      that one leaves the page exactly as the server rendered it.\n *\n *  ★★ `prefers-reduced-motion` IS CHECKED, NOT ASSUMED. A fade is still\n *     motion. Someone who has turned motion down gets the content, immediately\n *     and in place, rather than a shorter version of the animation.\n *\n *  ★ It disconnects after the first reveal. A section that has been seen does\n *    not need watching, and an observer left attached to every card on a long\n *    index is work the page does forever for nothing.\n *\n *  Usage — note the element is fully visible without any of this:\n *\n *    <section svReveal>…</section>\n *    <article svReveal [revealDelay]=\"80\">…</article>\n * ============================================================\n */\n@Directive({\n  selector: '[svReveal]',\n  standalone: true,\n})\nexport class SvRevealDirective {\n  private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n  private readonly destroyRef = inject(DestroyRef);\n\n  /**\n   * Stagger, in milliseconds, for items revealed as a group.\n   *\n   * ★ Capped by the caller, not here — but keep it small. A stagger long\n   *   enough to notice as a queue reads as the page being slow rather than as\n   *   the page being considered.\n   */\n  readonly revealDelay = input<number>(0);\n\n  constructor() {\n    // ★ `afterNextRender` rather than a constructor body or `ngOnInit`: this\n    //   touches `window` and the element's box, neither of which exists during\n    //   the server render. `check:ssr-safety` enforces the same rule.\n    afterNextRender(() => this.arm());\n  }\n\n  private arm(): void {\n    const el = this.host.nativeElement;\n\n    if (typeof window === 'undefined' || typeof IntersectionObserver === 'undefined') return;\n\n    const reduced = window.matchMedia?.('(prefers-reduced-motion: reduce)').matches ?? false;\n    if (reduced) return;\n\n    // Already on screen when the page loads — above the fold, or a short page.\n    // Animating it would mean hiding something the reader is looking at and\n    // then showing it again.\n    const box = el.getBoundingClientRect();\n    if (box.top < window.innerHeight * 0.9) return;\n\n    el.dataset['svReveal'] = 'hidden';\n    const delay = Math.max(0, this.revealDelay());\n    if (delay) el.style.transitionDelay = `${delay}ms`;\n\n    const observer = new IntersectionObserver(\n      (entries) => {\n        for (const entry of entries) {\n          if (!entry.isIntersecting) continue;\n          el.dataset['svReveal'] = 'shown';\n          observer.disconnect();\n        }\n      },\n      // A little before the edge, so the movement finishes as the section\n      // arrives rather than starting when it is already being read.\n      { rootMargin: '0px 0px -12% 0px', threshold: 0.05 },\n    );\n\n    observer.observe(el);\n    // Left before it was ever seen — a route change mid-page. The observer would\n    // otherwise keep watching a detached element for the life of the tab.\n    this.destroyRef.onDestroy(() => observer.disconnect());\n  }\n}\n","import { afterNextRender, DestroyRef, Directive, ElementRef, inject, input } from '@angular/core';\n\n/**\n * ============================================================\n *  svPauseOffscreen — CSS animations stop while nobody can see them\n * ============================================================\n *  A spinner, a pulsing live dot, a skeleton shimmer: each runs forever, and\n *  each keeps the compositor producing frames — or, for anything that is not\n *  a transform/opacity animation, the main thread painting — for as long as\n *  it exists. On a long page most of them are off-screen. The component\n *  gallery's line-charts page ran 71 at once, data-tables 52\n *  (STYLOVIZ_SCROLL_FLICKER_TODO SF-12).\n *\n *  This marks its host `data-sv-offscreen` while it is out of view, and the\n *  kit stylesheet pauses every CSS animation under a marked element:\n *\n *      [data-sv-offscreen] … { animation-play-state: paused !important; }\n *\n *  ★★ PAUSED, NOT REMOVED. Play-state keeps each animation's place, so a\n *     spinner that scrolls back into view continues from where it stopped —\n *     no jump, no restart, nothing to reconcile.\n *  ★★ `!important` is on purpose and on one property only. Components declare\n *     the `animation` shorthand, which resets play-state to `running` with\n *     their own specificity; nothing else here needs to win.\n *  ★ It resumes a little BEFORE the element arrives (`margin`, 200px by\n *    default), so an animation is already moving when it comes into view.\n *  ★ CSS animations only. A requestAnimationFrame or timer loop in a\n *    component is that component's business — pause it from its own\n *    visibility, not from here.\n *  ★ Off the server, without an IntersectionObserver, or before the first\n *    callback, the host is never marked: everything simply animates, exactly\n *    as it did without the directive.\n *\n *  Usage:\n *    <div svPauseOffscreen>…a panel of live demos…</div>\n *    <section svPauseOffscreen pauseMargin=\"400px\">…</section>\n * ============================================================\n */\n@Directive({\n  selector: '[svPauseOffscreen]',\n  standalone: true,\n})\nexport class SvPauseOffscreenDirective {\n  private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n  private readonly destroyRef = inject(DestroyRef);\n\n  /**\n   * How far outside the viewport the host still counts as visible, as a CSS\n   * margin. Larger resumes earlier; `0px` pauses the instant it leaves.\n   * @default '200px'\n   */\n  readonly pauseMargin = input<string>('200px');\n\n  constructor() {\n    // `afterNextRender`: the observer needs a DOM, which the server render does not have.\n    afterNextRender(() => this.arm());\n  }\n\n  private arm(): void {\n    if (typeof IntersectionObserver === 'undefined') return;\n    const el = this.host.nativeElement;\n\n    const observer = new IntersectionObserver(\n      (entries) => {\n        // The last entry is the current state when several are batched.\n        const entry = entries[entries.length - 1];\n        if (!entry) return;\n        if (entry.isIntersecting) delete el.dataset['svOffscreen'];\n        else el.dataset['svOffscreen'] = '';\n      },\n      { rootMargin: this.pauseMargin() },\n    );\n\n    observer.observe(el);\n    this.destroyRef.onDestroy(() => {\n      observer.disconnect();\n      delete el.dataset['svOffscreen'];\n    });\n  }\n}\n","import { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { DestroyRef, PLATFORM_ID, effect, inject, untracked } from '@angular/core';\n\n/** Where the listeners go. */\nexport type SvListenTarget = 'document' | 'window';\n\n/** Returned by {@link svListenWhile}. */\nexport interface SvListenWhileRef {\n  /**\n   * Re-read `active()` NOW and attach or detach accordingly. Call it from the\n   * handler that starts the drag, right after setting the state: the effect\n   * that does this automatically only runs on the next change-detection pass,\n   * and a pointer can move before then.\n   */\n  sync(): void;\n}\n\n/**\n * Attach global listeners ONLY while `active()` is true.\n *\n * ★★ WHY (1.0 release audit, M2). Eight components declared\n *    `@HostListener('document:pointermove')` (or `mousemove` / `touchmove`) for\n *    a drag that is idle 99.9 % of the time. Angular wraps every host listener:\n *    each event marks the view dirty and, in a zoneless app, schedules a change\n *    detection pass — so moving the mouse anywhere on a dashboard with a line\n *    chart and a data table ran change detection continuously, even though every\n *    handler returned on its first line. This keeps the listener for exactly the\n *    span of the drag.\n *\n * ★ Moves only — keep the matching `pointerup` / `mouseup` as a host listener:\n *   it fires once per click, costs nothing between clicks, and is what clears\n *   the state. Call the returned `sync()` from the drag-START handler so the\n *   very first move is caught; an effect also follows `active()` on its own.\n *\n * Handlers are expected to write SIGNALS, which schedule their own render — the\n * listener is a plain DOM listener, not an Angular template listener.\n *\n * Call in an injection context (a constructor or field initializer). A no-op on\n * the server.\n *\n * @example\n * private readonly moves = svListenWhile(() => this.resizing() !== null, 'document', {\n *   pointermove: (e) => this.onResizeMove(e as PointerEvent),\n * });\n * onResizeStart(): void { this.resizing.set(…); this.moves.sync(); }\n */\nexport function svListenWhile(\n  active: () => boolean,\n  target: SvListenTarget,\n  handlers: Readonly<Record<string, (event: Event) => void>>,\n): SvListenWhileRef {\n  if (!isPlatformBrowser(inject(PLATFORM_ID))) return { sync: () => undefined };\n  const doc = inject(DOCUMENT);\n  let detach: (() => void) | null = null;\n\n  const attach = (): (() => void) | null => {\n    const el: EventTarget | null = target === 'window' ? doc.defaultView : doc;\n    if (!el) return null;\n    const bound = Object.entries(handlers).map(([type, handler]) => {\n      // `untracked`: a signal the handler reads must not become a dependency of\n      // whatever reactive context happens to be running when the event fires.\n      const fn = (event: Event): void => untracked(() => handler(event));\n      el.addEventListener(type, fn, { passive: type !== 'touchmove' });\n      return [type, fn] as const;\n    });\n    return () => {\n      for (const [type, fn] of bound) el.removeEventListener(type, fn);\n    };\n  };\n\n  const sync = (): void => {\n    const on = untracked(active);\n    if (on && !detach) detach = attach();\n    else if (!on && detach) {\n      detach();\n      detach = null;\n    }\n  };\n\n  // Follows `active()` on its own — an `up` handler that clears the drag state\n  // detaches on the next pass even if nobody calls `sync()`.\n  effect(() => {\n    active();\n    untracked(sync);\n  });\n  inject(DestroyRef).onDestroy(() => {\n    detach?.();\n    detach = null;\n  });\n  return { sync };\n}\n"],"mappings":";;;AA0BA,IAAa,uBAAb,MAAa,qBAAoB;CACd,KAAK,OAAO,UAAuB;CAC5C;CAER,WAAQ;EAKN,IAAI,OAAO,yBAAyB,aAAa;GAC/C,KAAK,GAAG,cAAc,UAAU,IAAI,YAAY;GAChD;EACF;EAEA,KAAK,WAAW,IAAI,sBACjB,YAAW;GACV,QAAQ,SAAS,UAAS;IACxB,IAAI,MAAM,gBA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