mn-angular-lib 2.0.33 → 2.0.35
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/fesm2022/mn-angular-lib-alert.mjs +515 -527
- package/fesm2022/mn-angular-lib-alert.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-bottom-sheet.mjs +264 -357
- package/fesm2022/mn-angular-lib-bottom-sheet.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-button.mjs +819 -382
- package/fesm2022/mn-angular-lib-button.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-calendar-core.mjs +240 -365
- package/fesm2022/mn-angular-lib-calendar-core.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-calendar.mjs +1691 -1545
- package/fesm2022/mn-angular-lib-calendar.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-collection.mjs +2367 -2796
- package/fesm2022/mn-angular-lib-collection.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-core.mjs +693 -1241
- package/fesm2022/mn-angular-lib-core.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-display.mjs +679 -712
- package/fesm2022/mn-angular-lib-display.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-forms.mjs +3671 -4647
- package/fesm2022/mn-angular-lib-forms.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-keyboard.mjs +221 -190
- package/fesm2022/mn-angular-lib-keyboard.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-modal-core.mjs +711 -896
- package/fesm2022/mn-angular-lib-modal-core.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-modal-ui.mjs +2089 -2035
- package/fesm2022/mn-angular-lib-modal-ui.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-modal.mjs +76 -121
- package/fesm2022/mn-angular-lib-modal.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-rich-text-editor.mjs +289 -277
- package/fesm2022/mn-angular-lib-rich-text-editor.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-segmented.mjs +189 -241
- package/fesm2022/mn-angular-lib-segmented.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-tab.mjs +409 -642
- package/fesm2022/mn-angular-lib-tab.mjs.map +1 -1
- package/fesm2022/mn-angular-lib.mjs +16 -29
- package/package.json +1 -1
- package/types/mn-angular-lib-alert.d.ts +239 -241
- package/types/mn-angular-lib-bottom-sheet.d.ts +190 -150
- package/types/mn-angular-lib-button.d.ts +319 -317
- package/types/mn-angular-lib-calendar-core.d.ts +199 -209
- package/types/mn-angular-lib-calendar.d.ts +656 -511
- package/types/mn-angular-lib-collection.d.ts +1649 -1585
- package/types/mn-angular-lib-core.d.ts +524 -535
- package/types/mn-angular-lib-display.d.ts +946 -886
- package/types/mn-angular-lib-forms.d.ts +3012 -3013
- package/types/mn-angular-lib-keyboard.d.ts +125 -85
- package/types/mn-angular-lib-modal-core.d.ts +978 -994
- package/types/mn-angular-lib-modal-ui.d.ts +541 -493
- package/types/mn-angular-lib-modal.d.ts +24 -27
- package/types/mn-angular-lib-rich-text-editor.d.ts +131 -98
- package/types/mn-angular-lib-segmented.d.ts +354 -341
- package/types/mn-angular-lib-tab.d.ts +345 -336
- package/types/mn-angular-lib.d.ts +16 -16
- package/fesm2022/mn-angular-lib.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mn-angular-lib-alert.mjs","sources":["../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert.tokens.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert.providers.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert.store.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert.service.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alertVariants.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert-outlet/mn-alert-outlet.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert-outlet/mn-alert-outlet.html","../../../projects/mn-angular-lib/alert/public-api.ts","../../../projects/mn-angular-lib/alert/mn-angular-lib-alert.ts"],"sourcesContent":["// projects/mn-angular-lib/src/lib/mn-mn-alert/mn-mn-alert.tokens.ts\nimport {InjectionToken} from '@angular/core';\nimport {MnAlert} from './mn-alert.types';\n\nexport type MnAlertKind = 'success' | 'info' | 'warning' | 'error' | 'default';\n\nexport type MnAlertConfig = {\n durations?: Partial<Record<MnAlertKind, number | null>>;\n cssClasses?: Partial<Record<MnAlertKind, string>>;\n icons?: Partial<Record<MnAlertKind, unknown>>;\n fallbackDuration?: number | null;\n /**\n * How many alerts may be on screen at once. Showing one past this cap drops the oldest\n * alert still visible, so a burst of alerts never grows into an unreadable stack.\n */\n maxVisible?: number;\n finalize?: (a: MnAlert) => MnAlert;\n}\n\nexport const MN_ALERT_CONFIG = new InjectionToken<MnAlertConfig>('MN_ALERT_CONFIG');\n\nexport const DEFAULT_MN_ALERT_CONFIG: Required<MnAlertConfig> = {\n durations: { success: 3000, info: 4000, warning: 5000, error: 7000, default: 4000 },\n cssClasses: {\n success: 'mn-alert-success',\n info: 'mn-alert-info',\n warning: 'mn-alert-warning',\n error: 'mn-alert-error',\n default: 'alert'\n },\n icons: {},\n fallbackDuration: 4000,\n maxVisible: 3,\n finalize: (a) => a\n};\n","// projects/mn-angular-lib/src/lib/mn-mn-alert/mn-mn-alert.providers.ts\nimport { Provider } from '@angular/core';\nimport { MN_ALERT_CONFIG, MnAlertConfig, DEFAULT_MN_ALERT_CONFIG } from './mn-alert.tokens';\n\nexport function provideMnAlerts(config: MnAlertConfig = {}): Provider {\n const merged: MnAlertConfig = {\n ...DEFAULT_MN_ALERT_CONFIG,\n ...config,\n durations: { ...DEFAULT_MN_ALERT_CONFIG.durations, ...(config.durations ?? {}) },\n cssClasses: { ...DEFAULT_MN_ALERT_CONFIG.cssClasses, ...(config.cssClasses ?? {}) },\n icons: { ...DEFAULT_MN_ALERT_CONFIG.icons, ...(config.icons ?? {}) }\n };\n return { provide: MN_ALERT_CONFIG, useValue: merged };\n}\n","import {inject, Injectable} from '@angular/core';\nimport {BehaviorSubject} from 'rxjs';\nimport {MnAlert, MnAlertId} from './mn-alert.types';\nimport {DEFAULT_MN_ALERT_CONFIG, MN_ALERT_CONFIG, MnAlertConfig} from './mn-alert.tokens';\n\nlet COUNTER = 0;\nconst uid = () => `mn_${++COUNTER}`;\n\n@Injectable({ providedIn: 'root' })\nexport class MnAlertStore {\n private readonly _alerts$ = new BehaviorSubject<MnAlert[]>([]);\n readonly alerts$ = this._alerts$.asObservable();\n\n /** Host configuration, when the app provided one. Only `maxVisible` is read here — the\n * per-kind durations are resolved by {@link MnAlertService} before an alert reaches the store. */\n private readonly cfg = inject<MnAlertConfig | null>(MN_ALERT_CONFIG, {optional: true});\n\n /** In-flight auto-dismiss timers keyed by alert id, so an alert that leaves early (dismissed\n * by hand, or pushed out by the visible cap) never fires a stale timeout later. */\n private readonly timers = new Map<MnAlertId, ReturnType<typeof setTimeout>>();\n\n /** How many alerts stay on screen at once; showing more drops the oldest ones. */\n private get maxVisible(): number {\n const configured = this.cfg?.maxVisible;\n return typeof configured === 'number' && configured > 0\n ? configured\n : DEFAULT_MN_ALERT_CONFIG.maxVisible;\n }\n\n show(partial: Omit<MnAlert, 'id'>): MnAlertId {\n // Ensure every alert has a numeric duration: use provided or fall back to per-kind default\n const computedDuration = (partial as {\n duration?: number\n }).duration ?? (DEFAULT_MN_ALERT_CONFIG.durations as Record<string, number>)[(partial as {\n kind?: string\n }).kind ?? ''] ?? DEFAULT_MN_ALERT_CONFIG.fallbackDuration;\n const a: MnAlert = { id: uid(), ...partial, duration: computedDuration } as MnAlert;\n\n // Newest alert last; anything beyond the cap is trimmed off the front (the oldest still\n // visible), so a burst of alerts scrolls rather than piling up.\n const queued = [...this._alerts$.value, a];\n const overflow = queued.length - this.maxVisible;\n if (overflow > 0) {\n queued.splice(0, overflow).forEach(dropped => this.clearTimer(dropped.id));\n }\n this._alerts$.next(queued);\n\n if (typeof a.duration === 'number' && a.duration > 0) {\n this.timers.set(a.id, setTimeout(() => this.dismiss(a.id), a.duration));\n }\n return a.id;\n }\n\n dismiss(id: MnAlertId) {\n const list = this._alerts$.value;\n if (list.some(x => x.id === id)) {\n this.clearTimer(id);\n this._alerts$.next(list.filter(x => x.id !== id));\n }\n }\n\n clear() {\n this.timers.forEach(t => clearTimeout(t));\n this.timers.clear();\n this._alerts$.next([]);\n }\n\n private clearTimer(id: MnAlertId) {\n const timer = this.timers.get(id);\n if (timer !== undefined) {\n clearTimeout(timer);\n this.timers.delete(id);\n }\n }\n}\n","// projects/mn-angular-lib/src/lib/mn-mn-alert/mn-mn-alert.service.ts\nimport {Injectable, inject} from '@angular/core';\nimport { MnAlertStore } from './mn-alert.store';\nimport { MnAlert, MnAlertId } from './mn-alert.types';\nimport { MN_ALERT_CONFIG, DEFAULT_MN_ALERT_CONFIG, MnAlertConfig, MnAlertKind } from './mn-alert.tokens';\nimport { MnAlertVariants } from './mn-alertVariants';\n\nexport type MnShowInput = {\n title: string;\n subTitle?: string;\n duration?: number;\n icon?: unknown;\n cssClass?: string;\n meta?: Record<string, unknown>;\n kind: MnAlertKind;\n variant?: MnAlertVariants['variant'];\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MnAlertService {\n private readonly store = inject(MnAlertStore);\n\n private readonly cfg: Required<MnAlertConfig>;\n private readonly userDurations?: Partial<Record<MnAlertKind, number | null>>;\n private readonly hasUserDurations: boolean;\n\n constructor() {\n const cfg = inject<MnAlertConfig | null>(MN_ALERT_CONFIG, {optional: true});\n\n this.userDurations = cfg?.durations;\n this.hasUserDurations = !!cfg?.durations;\n this.cfg = {\n ...DEFAULT_MN_ALERT_CONFIG,\n ...(cfg ?? {}),\n // Do not pre-merge durations; keep defaults separate and use logic in kind()\n durations: DEFAULT_MN_ALERT_CONFIG.durations,\n cssClasses: { ...DEFAULT_MN_ALERT_CONFIG.cssClasses, ...(cfg?.cssClasses ?? {}) },\n icons: { ...DEFAULT_MN_ALERT_CONFIG.icons, ...(cfg?.icons ?? {}) }\n };\n }\n\n show(input: MnShowInput): MnAlertId {\n // Always ensure a numeric duration is set\n let duration = input.duration;\n if (duration == null) {\n // Prefer user defaultDuration if provided and not null, otherwise use library per-kind default\n const userDefault = this.cfg.fallbackDuration;\n if (typeof userDefault === 'number') {\n duration = userDefault;\n } else {\n duration = DEFAULT_MN_ALERT_CONFIG.durations[input.kind as keyof typeof DEFAULT_MN_ALERT_CONFIG.durations] as number;\n }\n }\n\n const a: Omit<MnAlert, 'id'> = {\n title: input.title,\n subTitle: input.subTitle,\n duration,\n icon: input.icon,\n cssClass: input.cssClass,\n meta: input.meta,\n kind: input.kind,\n variant: input.variant\n };\n return this.store.show(this.cfg.finalize(a as MnAlert));\n }\n\n success(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('success', title, subTitle, extra);\n }\n info(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('info', title, subTitle, extra);\n }\n warning(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('warning', title, subTitle, extra);\n }\n error(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('error', title, subTitle, extra);\n }\n\n dismiss(id: MnAlertId) { this.store.dismiss(id); }\n clear() { this.store.clear(); }\n\n private kind(kind: MnAlertKind, title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n let duration: number | null | undefined = extra?.duration;\n\n if (duration == null) {\n if (this.hasUserDurations) {\n const userDur = this.userDurations?.[kind];\n if (typeof userDur === 'number') {\n duration = userDur;\n } else {\n // userDur is undefined or null -> fallback to user defaultDuration if numeric\n if (typeof this.cfg.fallbackDuration === 'number') {\n duration = this.cfg.fallbackDuration;\n } else {\n duration = this.cfg.durations[kind as keyof typeof this.cfg.durations];\n }\n }\n } else {\n // No user durations provided at all; use library defaults per kind\n duration = this.cfg.durations[kind as keyof typeof this.cfg.durations];\n }\n }\n\n const cssClass = extra?.cssClass ?? this.cfg.cssClasses[kind];\n const icon = (extra?.icon ?? this.cfg.icons[kind]) as unknown;\n const variant = extra?.variant;\n\n return this.show({ title, subTitle, duration: duration as number, cssClass, icon, meta: extra?.meta , kind: kind, variant});\n }\n}\n","import { tv, type VariantProps } from 'tailwind-variants';\n\nexport const mnAlertVariants = tv({\n base: 'flex items-start gap-3 p-4 border rounded-xl shadow-sm w-full ',\n variants: {\n kind: {\n success: 'bg-success/10 border-success/30 text-success',\n info: 'bg-info/10 border-info/30 text-info',\n warning: 'bg-warning/10 border-warning/30 text-warning',\n error: 'bg-error/10 border-error/30 text-error',\n default: 'bg-base-100 border-base-300 text-base-content',\n accent: 'bg-accent/10 border-accent/30 text-accent',\n },\n variant: {\n fill: '',\n outline: 'bg-base-200 border-2',\n soft: 'border-none shadow-none',\n }\n },\n compoundVariants: [\n {\n kind: 'success',\n variant: 'fill',\n class: 'bg-success border-success text-success-content'\n },\n {\n kind: 'info',\n variant: 'fill',\n class: 'bg-info border-info text-info-content'\n },\n {\n kind: 'warning',\n variant: 'fill',\n class: 'bg-warning border-warning text-warning-content'\n },\n {\n kind: 'error',\n variant: 'fill',\n class: 'bg-error border-error text-error-content'\n },\n {\n kind: 'accent',\n variant: 'fill',\n class: 'bg-accent border-accent text-accent-content'\n },\n ],\n defaultVariants: {\n kind: 'info',\n variant: 'soft'\n }\n});\n\nexport type MnAlertVariants = VariantProps<typeof mnAlertVariants>;\n","import {ChangeDetectionStrategy, Component, DestroyRef, inject, Input, signal, TemplateRef,} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {CommonModule} from '@angular/common';\nimport {MnAlertStore} from '../mn-alert.store';\nimport {MnAlert, MnAlertId} from '../mn-alert.types';\nimport {mnAlertVariants} from '../mn-alertVariants';\nimport {MnButton} from 'mn-angular-lib/button';\nimport {MnLanguageService} from 'mn-angular-lib/core';\n\nexport type MnAlertTemplateContext = {\n $implicit: MnAlert;\n alert: MnAlert;\n dismiss: () => void;\n}\n\n/**\n * A view-owned wrapper around a single {@link MnAlert}. The store's list is the source\n * of truth for which alerts *exist*; this outlet mirrors it into `views` so a removed\n * alert can play a leave animation (swipe-fling or fade + height-collapse) before its\n * node is actually dropped, rather than vanishing instantly.\n */\ntype MnAlertView = {\n alert: MnAlert;\n /** True once the alert has left the store — the node is animating out and will be removed. */\n leaving: boolean;\n /** True while the user is actively dragging this card (disables the snap transition). */\n dragging: boolean;\n /** Live drag offset (px) along the active swipe axis while swiping. */\n drag: number;\n /** Final offset (px) along the swipe axis the card flings to when a swipe dismisses it. */\n fling: number;\n};\n\n@Component({\n selector: 'mn-alert-outlet',\n standalone: true,\n imports: [CommonModule, MnButton],\n templateUrl: './mn-alert-outlet.html',\n styleUrl: './mn-alert-outlet.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MnAlertOutletComponent {\n private readonly lang = inject(MnLanguageService);\n private readonly store = inject(MnAlertStore);\n private readonly destroyRef = inject(DestroyRef);\n\n /** Drag distance (px) past which a release dismisses regardless of speed. */\n private static readonly SWIPE_DISMISS_THRESHOLD = 96;\n /** Release speed (px/ms) above which a short drag still dismisses — a \"flick\". */\n private static readonly FLICK_VELOCITY = 0.4;\n /** Minimum drag distance (px) a flick must cover, so an incidental fast tap never dismisses. */\n private static readonly FLICK_MIN_DISTANCE = 24;\n /** Upper bound for the leave wait; kept a touch longer than the CSS exit so removal never\n * preempts the animation. Mirrored by the `--mn-alert-exit` duration in the stylesheet. */\n private static readonly EXIT_MS = 320;\n /** Opacity floor a card fades to at the dismiss threshold, for drag feedback. */\n private static readonly DRAG_OPACITY_FLOOR = 0.35;\n\n /**\n * How the dismiss swipe is oriented:\n * - `'auto'` (default) matches the host platform's convention — Apple platforms\n * (iOS/iPadOS/macOS) flick a top banner *upward*, so we swipe vertically; Android (and\n * every other platform) dismisses toasts *to the right*, so we swipe horizontally.\n *\n * Either axis is one-directional: only an upward (vertical) or rightward (horizontal)\n * drag dismisses; dragging the opposite way springs the card back.\n * - `'vertical'` / `'horizontal'` force the axis regardless of platform. Useful when the\n * host can't be sniffed reliably (e.g. Chrome DevTools *Responsive* mode does not spoof\n * the user agent, so `'auto'` there resolves to the desktop/Android horizontal axis).\n */\n @Input() swipeAxis: 'auto' | 'vertical' | 'horizontal' = 'auto';\n\n /** Whether the running device is an Apple platform. Sniffed once from `navigator` at\n * construction (the UA is read at page load and does not change mid-session). */\n private readonly isApple = this.detectApple();\n\n /** The resolved swipe axis: the explicit {@link swipeAxis} override, or the platform\n * default when left on `'auto'`. */\n private get vertical(): boolean {\n if (this.swipeAxis === 'vertical') return true;\n if (this.swipeAxis === 'horizontal') return false;\n return this.isApple;\n }\n\n /**\n * Accessible name for this control. Resolved through the conventional\n * `mnAlert.close` key so an app can translate it, falling back to English when the\n * key is not defined rather than leaking the raw key into the UI.\n */\n get closeLabel(): string {\n return this.lang.translateIfPresent('mnAlert.close') ?? 'Close';\n }\n\n @Input() template?: TemplateRef<MnAlertTemplateContext>;\n\n /** The view-layer mirror of the store's alerts, retaining alerts mid-leave. A signal so\n * writes from the (external) store subscription and leave timers schedule change\n * detection in a zoneless app. */\n readonly views = signal<MnAlertView[]>([]);\n\n /**\n * `touch-action` for the swipe wrapper: reserve the swipe axis for our gesture while\n * leaving the cross-axis to the browser. Vertical swipe (Apple) claims the Y axis\n * (`pan-x`); horizontal swipe (Android/other) claims the X axis (`pan-y`).\n */\n get touchAction(): string {\n return this.vertical ? 'pan-x' : 'pan-y';\n }\n\n /** In-flight leave-removal timers, keyed by alert id, cleared on destroy so a fired\n * timer never touches a torn-down view. */\n private readonly exitTimers = new Map<MnAlertId, ReturnType<typeof setTimeout>>();\n\n /** The single active swipe, or null. Only one card is dragged at a time. `startCoord`\n * and the samples are taken along the active axis (Y when vertical, else X). */\n private activeDrag: {\n view: MnAlertView;\n startCoord: number;\n lastSample: { c: number; t: number };\n prevSample: { c: number; t: number };\n } | null = null;\n\n constructor() {\n this.store.alerts$\n .pipe(takeUntilDestroyed())\n .subscribe(alerts => this.sync(alerts));\n\n this.destroyRef.onDestroy(() => {\n this.exitTimers.forEach(t => clearTimeout(t));\n this.exitTimers.clear();\n });\n }\n\n trackById = (_: number, v: MnAlertView) => v.alert.id;\n\n getAlertClasses(a: MnAlert) {\n return mnAlertVariants({kind: a.kind, variant: a.variant});\n }\n\n /**\n * The lifetime (ms) to run the countdown bar over, or null when no bar should show: an alert\n * that never auto-dismisses has nothing to count down, and one already leaving would only\n * restart the animation mid-exit.\n */\n countdownDuration(v: MnAlertView): number | null {\n if (v.leaving) return null;\n const duration = v.alert.duration;\n return typeof duration === 'number' && duration > 0 ? duration : null;\n }\n\n contextFor(a: MnAlert) {\n return {\n $implicit: a,\n alert: a,\n dismiss: () => this.dismissAlert(a.id)\n } as const;\n }\n\n /** Dismisses via the store; the store's removal is turned into a leave animation by\n * {@link sync}. Used by the close button and the custom-template `dismiss` context. */\n dismissAlert(id: MnAlertId) {\n this.store.dismiss(id);\n }\n\n // =========================\n // Store → view reconciliation\n // =========================\n\n /** Reconciles the view list against the store: appends new alerts, updates the alert\n * reference for still-present ones, and marks vanished ones as leaving (they stay in the\n * list, animating out, until their removal timer fires). */\n private sync(alerts: MnAlert[]): void {\n const current = this.views();\n const existing = new Set(current.map(v => v.alert.id));\n const storeById = new Map(alerts.map(a => [a.id, a]));\n\n const next: MnAlertView[] = [];\n for (const v of current) {\n const fresh = storeById.get(v.alert.id);\n if (fresh) {\n v.alert = fresh;\n } else if (!v.leaving) {\n this.beginLeave(v);\n }\n next.push(v);\n }\n for (const a of alerts) {\n if (!existing.has(a.id)) {\n next.push({alert: a, leaving: false, dragging: false, drag: 0, fling: 0});\n }\n }\n this.views.set(next);\n }\n\n /** Flags a view as leaving and schedules its removal once the exit animation has run.\n * Idempotent: a card already leaving (e.g. flung by a swipe) is left untouched, so a\n * synchronous store re-emit cannot overwrite the swipe direction with the default fade. */\n private beginLeave(v: MnAlertView, fling?: number): void {\n if (v.leaving) return;\n v.leaving = true;\n v.dragging = false;\n if (fling !== undefined) v.fling = fling;\n\n const delay = this.prefersReducedMotion() ? 0 : MnAlertOutletComponent.EXIT_MS;\n const timer = setTimeout(() => this.removeView(v.alert.id), delay);\n this.exitTimers.set(v.alert.id, timer);\n }\n\n private removeView(id: MnAlertId): void {\n const timer = this.exitTimers.get(id);\n if (timer) {\n clearTimeout(timer);\n this.exitTimers.delete(id);\n }\n this.views.update(list => list.filter(v => v.alert.id !== id));\n }\n\n // =========================\n // Swipe-to-dismiss\n // =========================\n\n onPointerDown(event: PointerEvent, v: MnAlertView): void {\n if (v.leaving) return;\n // Don't hijack a press that begins on an interactive control inside the alert.\n if ((event.target as HTMLElement).closest('button, a, input, textarea, select')) return;\n if (event.button !== undefined && event.button !== 0) return;\n\n const coord = this.axisCoord(event);\n this.activeDrag = {\n view: v,\n startCoord: coord,\n lastSample: {c: coord, t: event.timeStamp},\n prevSample: {c: coord, t: event.timeStamp},\n };\n v.dragging = true;\n (event.currentTarget as HTMLElement).setPointerCapture?.(event.pointerId);\n }\n\n onPointerMove(event: PointerEvent, v: MnAlertView): void {\n const drag = this.activeDrag;\n if (!drag || drag.view !== v) return;\n const delta = this.axisCoord(event) - drag.startCoord;\n // Dismissal is one-directional: vertical (Apple) tracks upward only (clamp ≤ 0),\n // horizontal (Android/other) tracks rightward only (clamp ≥ 0). A drag the other way\n // rests at 0 and springs back.\n v.drag = this.vertical ? Math.min(0, delta) : Math.max(0, delta);\n drag.prevSample = drag.lastSample;\n drag.lastSample = {c: this.axisCoord(event), t: event.timeStamp};\n }\n\n onPointerUp(event: PointerEvent, v: MnAlertView): void {\n const drag = this.activeDrag;\n if (!drag || drag.view !== v) return;\n this.activeDrag = null;\n v.dragging = false;\n\n if (this.shouldDismiss(drag, v)) {\n // Fling the card the rest of the way off its edge, then dismiss through the store.\n // Vertical flings upward (off the top); horizontal flings rightward (off the right).\n const extent = this.viewportExtent() + Math.abs(v.drag);\n const fling = this.vertical ? -extent : extent;\n this.beginLeave(v, fling);\n this.store.dismiss(v.alert.id);\n } else {\n // Snap back to rest; the wrapper's transition eases the offset → 0.\n v.drag = 0;\n }\n // Notify: pointerup is template-bound (schedules CD), but the leave/snap mutations live\n // on the view object — re-set the signal so the new transform is reflected reliably.\n this.views.update(list => [...list]);\n }\n\n private shouldDismiss(\n drag: NonNullable<typeof this.activeDrag>,\n v: MnAlertView\n ): boolean {\n if (Math.abs(v.drag) > MnAlertOutletComponent.SWIPE_DISMISS_THRESHOLD) return true;\n const dt = drag.lastSample.t - drag.prevSample.t;\n const velocity = dt > 0 ? Math.abs(drag.lastSample.c - drag.prevSample.c) / dt : 0;\n return velocity > MnAlertOutletComponent.FLICK_VELOCITY\n && Math.abs(v.drag) > MnAlertOutletComponent.FLICK_MIN_DISTANCE;\n }\n\n // =========================\n // Template style helpers\n // =========================\n\n /** Offset transform for a card: the fling target while leaving via swipe, otherwise the\n * live drag offset, translated along the active axis. Returns null when neither applies,\n * letting the stylesheet own the default (fade-in-place) leave. */\n itemTransform(v: MnAlertView): string | null {\n if (v.leaving) {\n return v.fling !== 0 ? this.translate(v.fling) : null;\n }\n return v.drag !== 0 ? this.translate(v.drag) : null;\n }\n\n /** Fades a card toward a floor as it is dragged toward the dismiss threshold. Null (CSS\n * owns opacity) when at rest or leaving. */\n itemOpacity(v: MnAlertView): number | null {\n if (v.leaving || !v.dragging || v.drag === 0) return null;\n const progress = Math.min(Math.abs(v.drag) / MnAlertOutletComponent.SWIPE_DISMISS_THRESHOLD, 1);\n return 1 - progress * (1 - MnAlertOutletComponent.DRAG_OPACITY_FLOOR);\n }\n\n private translate(px: number): string {\n return this.vertical ? `translateY(${px}px)` : `translateX(${px}px)`;\n }\n\n private axisCoord(event: PointerEvent): number {\n return this.vertical ? event.clientY : event.clientX;\n }\n\n private viewportExtent(): number {\n if (typeof window === 'undefined') return 400;\n return this.vertical ? window.innerHeight : window.innerWidth;\n }\n\n /** Whether the current device runs an Apple OS (iOS/iPadOS/macOS). iPadOS 13+ masquerades\n * as a Mac, so it is caught by the touch-capable-Mac branch. */\n private detectApple(): boolean {\n if (typeof navigator === 'undefined') return false;\n const ua = navigator.userAgent ?? '';\n const platform = navigator.platform ?? '';\n const isIOS = /iP(hone|ad|od)/.test(platform) || /iPad|iPhone|iPod/.test(ua);\n const isTouchMac = /Mac/.test(platform + ' ' + ua)\n && typeof document !== 'undefined' && 'ontouchend' in document;\n const isMac = /Mac/.test(ua);\n return isIOS || isTouchMac || isMac;\n }\n\n private prefersReducedMotion(): boolean {\n return typeof window !== 'undefined'\n && typeof window.matchMedia === 'function'\n && window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n }\n}\n","<!-- The stack is a polite live region so every toast is announced; an error toast upgrades itself to an alert. -->\n<div aria-live=\"polite\" role=\"status\" class=\"fixed top-4 left-0 right-0 z-[9999] flex flex-col w-full px-2 sm:px-0 sm:left-auto sm:right-4 sm:max-w-sm\">\n @for (v of views(); track trackById($index, v)) {\n <div\n class=\"mn-alert-item\"\n [attr.role]=\"v.alert.kind === 'error' ? 'alert' : null\"\n [class.dragging]=\"v.dragging\"\n [class.leaving]=\"v.leaving\"\n [style.touch-action]=\"touchAction\"\n [style.transform]=\"itemTransform(v)\"\n [style.opacity]=\"itemOpacity(v)\"\n (pointerdown)=\"onPointerDown($event, v)\"\n (pointermove)=\"onPointerMove($event, v)\"\n (pointerup)=\"onPointerUp($event, v)\"\n (pointercancel)=\"onPointerUp($event, v)\"\n >\n <div class=\"mn-alert-inner\">\n @if (template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"contextFor(v.alert)\">\n </ng-container>\n } @else {\n <div [class.extra]=\"v.alert.cssClass\" [class]=\"getAlertClasses(v.alert)\" class=\"relative overflow-hidden\">\n <div class=\"flex-1 min-w-0 pr-8\">\n <h4 class=\"font-semibold text-sm\">{{ v.alert.title }}</h4>\n @if (v.alert.subTitle) {\n <p class=\"text-sm mt-1 opacity-90 leading-tight\">{{ v.alert.subTitle }}</p>\n }\n </div>\n <button\n [attr.aria-label]=\"closeLabel\"\n mnButton\n [data]=\"{ size: 'md', variant: 'text' }\"\n (click)=\"dismissAlert(v.alert.id)\"\n class=\"absolute top-2 right-2 shrink-0 !text-current hover:!bg-current/10\"\n type=\"button\"\n >\n ×\n </button>\n @if (countdownDuration(v); as ms) {\n <span aria-hidden=\"true\" class=\"mn-alert-progress\">\n <span [style.animation-duration.ms]=\"ms\" class=\"mn-alert-progress-bar\"></span>\n </span>\n }\n </div>\n }\n </div>\n </div>\n }\n</div>\n","/**\n * Public API of the `mn-angular-lib/alert` entry point: toast alerts.\n *\n * Each entry point is its own module in the published package, so a consumer's bundler\n * splits it into the chunk that uses it instead of loading the whole library at startup.\n * The root `mn-angular-lib` entry re-exports every entry point.\n */\nexport * from './src/mn-alert';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;MAmBa,eAAe,GAAG,IAAI,cAAc,CAAgB,iBAAiB;AAE3E,MAAM,uBAAuB,GAA4B;IAC9D,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE;AACnF,IAAA,UAAU,EAAE;AACV,QAAA,OAAO,EAAE,kBAAkB;AAC3B,QAAA,IAAI,EAAE,eAAe;AACrB,QAAA,OAAO,EAAE,kBAAkB;AAC3B,QAAA,KAAK,EAAE,gBAAgB;AACvB,QAAA,OAAO,EAAE;AACV,KAAA;AACD,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,gBAAgB,EAAE,IAAI;AACtB,IAAA,UAAU,EAAE,CAAC;AACb,IAAA,QAAQ,EAAE,CAAC,CAAC,KAAK;;;AC7Bb,SAAU,eAAe,CAAC,MAAA,GAAwB,EAAE,EAAA;AACxD,IAAA,MAAM,MAAM,GAAkB;AAC5B,QAAA,GAAG,uBAAuB;AAC1B,QAAA,GAAG,MAAM;AACT,QAAA,SAAS,EAAE,EAAE,GAAG,uBAAuB,CA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EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAtB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECzCnC,mrEAmDA,EAAA,MAAA,EAAA,CAAA,4qCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDfY,YAAY,sMAAE,QAAQ,EAAA,QAAA,EAAA,+BAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAKrB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBARlC,SAAS;+BACE,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAA,eAAA,EAGhB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,mrEAAA,EAAA,MAAA,EAAA,CAAA,4qCAAA,CAAA,EAAA;;sBA+B9C;;sBAuBA;;;AE7FH;;;;;;AAMG;;ACNH;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"mn-angular-lib-alert.mjs","names":[],"sources":["../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert.tokens.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert.providers.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert.store.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert.service.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alertVariants.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert-outlet/mn-alert-outlet.ts","../../../projects/mn-angular-lib/alert/src/mn-alert/mn-alert-outlet/mn-alert-outlet.html"],"sourcesContent":["// projects/mn-angular-lib/src/lib/mn-mn-alert/mn-mn-alert.tokens.ts\nimport {InjectionToken} from '@angular/core';\nimport {MnAlert} from './mn-alert.types';\n\nexport type MnAlertKind = 'success' | 'info' | 'warning' | 'error' | 'default';\n\nexport type MnAlertConfig = {\n durations?: Partial<Record<MnAlertKind, number | null>>;\n cssClasses?: Partial<Record<MnAlertKind, string>>;\n icons?: Partial<Record<MnAlertKind, unknown>>;\n fallbackDuration?: number | null;\n /**\n * How many alerts may be on screen at once. Showing one past this cap drops the oldest\n * alert still visible, so a burst of alerts never grows into an unreadable stack.\n */\n maxVisible?: number;\n finalize?: (a: MnAlert) => MnAlert;\n}\n\nexport const MN_ALERT_CONFIG = new InjectionToken<MnAlertConfig>('MN_ALERT_CONFIG');\n\nexport const DEFAULT_MN_ALERT_CONFIG: Required<MnAlertConfig> = {\n durations: { success: 3000, info: 4000, warning: 5000, error: 7000, default: 4000 },\n cssClasses: {\n success: 'mn-alert-success',\n info: 'mn-alert-info',\n warning: 'mn-alert-warning',\n error: 'mn-alert-error',\n default: 'alert'\n },\n icons: {},\n fallbackDuration: 4000,\n maxVisible: 3,\n finalize: (a) => a\n};\n","// projects/mn-angular-lib/src/lib/mn-mn-alert/mn-mn-alert.providers.ts\nimport { Provider } from '@angular/core';\nimport { MN_ALERT_CONFIG, MnAlertConfig, DEFAULT_MN_ALERT_CONFIG } from './mn-alert.tokens';\n\nexport function provideMnAlerts(config: MnAlertConfig = {}): Provider {\n const merged: MnAlertConfig = {\n ...DEFAULT_MN_ALERT_CONFIG,\n ...config,\n durations: { ...DEFAULT_MN_ALERT_CONFIG.durations, ...(config.durations ?? {}) },\n cssClasses: { ...DEFAULT_MN_ALERT_CONFIG.cssClasses, ...(config.cssClasses ?? {}) },\n icons: { ...DEFAULT_MN_ALERT_CONFIG.icons, ...(config.icons ?? {}) }\n };\n return { provide: MN_ALERT_CONFIG, useValue: merged };\n}\n","import {inject, Injectable} from '@angular/core';\nimport {BehaviorSubject} from 'rxjs';\nimport {MnAlert, MnAlertId} from './mn-alert.types';\nimport {DEFAULT_MN_ALERT_CONFIG, MN_ALERT_CONFIG, MnAlertConfig} from './mn-alert.tokens';\n\nlet COUNTER = 0;\nconst uid = () => `mn_${++COUNTER}`;\n\n@Injectable({ providedIn: 'root' })\nexport class MnAlertStore {\n private readonly _alerts$ = new BehaviorSubject<MnAlert[]>([]);\n readonly alerts$ = this._alerts$.asObservable();\n\n /** Host configuration, when the app provided one. Only `maxVisible` is read here — the\n * per-kind durations are resolved by {@link MnAlertService} before an alert reaches the store. */\n private readonly cfg = inject<MnAlertConfig | null>(MN_ALERT_CONFIG, {optional: true});\n\n /** In-flight auto-dismiss timers keyed by alert id, so an alert that leaves early (dismissed\n * by hand, or pushed out by the visible cap) never fires a stale timeout later. */\n private readonly timers = new Map<MnAlertId, ReturnType<typeof setTimeout>>();\n\n /** How many alerts stay on screen at once; showing more drops the oldest ones. */\n private get maxVisible(): number {\n const configured = this.cfg?.maxVisible;\n return typeof configured === 'number' && configured > 0\n ? configured\n : DEFAULT_MN_ALERT_CONFIG.maxVisible;\n }\n\n show(partial: Omit<MnAlert, 'id'>): MnAlertId {\n // Ensure every alert has a numeric duration: use provided or fall back to per-kind default\n const computedDuration = (partial as {\n duration?: number\n }).duration ?? (DEFAULT_MN_ALERT_CONFIG.durations as Record<string, number>)[(partial as {\n kind?: string\n }).kind ?? ''] ?? DEFAULT_MN_ALERT_CONFIG.fallbackDuration;\n const a: MnAlert = { id: uid(), ...partial, duration: computedDuration } as MnAlert;\n\n // Newest alert last; anything beyond the cap is trimmed off the front (the oldest still\n // visible), so a burst of alerts scrolls rather than piling up.\n const queued = [...this._alerts$.value, a];\n const overflow = queued.length - this.maxVisible;\n if (overflow > 0) {\n queued.splice(0, overflow).forEach(dropped => this.clearTimer(dropped.id));\n }\n this._alerts$.next(queued);\n\n if (typeof a.duration === 'number' && a.duration > 0) {\n this.timers.set(a.id, setTimeout(() => this.dismiss(a.id), a.duration));\n }\n return a.id;\n }\n\n dismiss(id: MnAlertId) {\n const list = this._alerts$.value;\n if (list.some(x => x.id === id)) {\n this.clearTimer(id);\n this._alerts$.next(list.filter(x => x.id !== id));\n }\n }\n\n clear() {\n this.timers.forEach(t => clearTimeout(t));\n this.timers.clear();\n this._alerts$.next([]);\n }\n\n private clearTimer(id: MnAlertId) {\n const timer = this.timers.get(id);\n if (timer !== undefined) {\n clearTimeout(timer);\n this.timers.delete(id);\n }\n }\n}\n","// projects/mn-angular-lib/src/lib/mn-mn-alert/mn-mn-alert.service.ts\nimport {Injectable, inject} from '@angular/core';\nimport { MnAlertStore } from './mn-alert.store';\nimport { MnAlert, MnAlertId } from './mn-alert.types';\nimport { MN_ALERT_CONFIG, DEFAULT_MN_ALERT_CONFIG, MnAlertConfig, MnAlertKind } from './mn-alert.tokens';\nimport { MnAlertVariants } from './mn-alertVariants';\n\nexport type MnShowInput = {\n title: string;\n subTitle?: string;\n duration?: number;\n icon?: unknown;\n cssClass?: string;\n meta?: Record<string, unknown>;\n kind: MnAlertKind;\n variant?: MnAlertVariants['variant'];\n}\n\n@Injectable({ providedIn: 'root' })\nexport class MnAlertService {\n private readonly store = inject(MnAlertStore);\n\n private readonly cfg: Required<MnAlertConfig>;\n private readonly userDurations?: Partial<Record<MnAlertKind, number | null>>;\n private readonly hasUserDurations: boolean;\n\n constructor() {\n const cfg = inject<MnAlertConfig | null>(MN_ALERT_CONFIG, {optional: true});\n\n this.userDurations = cfg?.durations;\n this.hasUserDurations = !!cfg?.durations;\n this.cfg = {\n ...DEFAULT_MN_ALERT_CONFIG,\n ...(cfg ?? {}),\n // Do not pre-merge durations; keep defaults separate and use logic in kind()\n durations: DEFAULT_MN_ALERT_CONFIG.durations,\n cssClasses: { ...DEFAULT_MN_ALERT_CONFIG.cssClasses, ...(cfg?.cssClasses ?? {}) },\n icons: { ...DEFAULT_MN_ALERT_CONFIG.icons, ...(cfg?.icons ?? {}) }\n };\n }\n\n show(input: MnShowInput): MnAlertId {\n // Always ensure a numeric duration is set\n let duration = input.duration;\n if (duration == null) {\n // Prefer user defaultDuration if provided and not null, otherwise use library per-kind default\n const userDefault = this.cfg.fallbackDuration;\n if (typeof userDefault === 'number') {\n duration = userDefault;\n } else {\n duration = DEFAULT_MN_ALERT_CONFIG.durations[input.kind as keyof typeof DEFAULT_MN_ALERT_CONFIG.durations] as number;\n }\n }\n\n const a: Omit<MnAlert, 'id'> = {\n title: input.title,\n subTitle: input.subTitle,\n duration,\n icon: input.icon,\n cssClass: input.cssClass,\n meta: input.meta,\n kind: input.kind,\n variant: input.variant\n };\n return this.store.show(this.cfg.finalize(a as MnAlert));\n }\n\n success(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('success', title, subTitle, extra);\n }\n info(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('info', title, subTitle, extra);\n }\n warning(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('warning', title, subTitle, extra);\n }\n error(title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n return this.kind('error', title, subTitle, extra);\n }\n\n dismiss(id: MnAlertId) { this.store.dismiss(id); }\n clear() { this.store.clear(); }\n\n private kind(kind: MnAlertKind, title: string, subTitle?: string, extra?: Partial<MnShowInput>) {\n let duration: number | null | undefined = extra?.duration;\n\n if (duration == null) {\n if (this.hasUserDurations) {\n const userDur = this.userDurations?.[kind];\n if (typeof userDur === 'number') {\n duration = userDur;\n } else {\n // userDur is undefined or null -> fallback to user defaultDuration if numeric\n if (typeof this.cfg.fallbackDuration === 'number') {\n duration = this.cfg.fallbackDuration;\n } else {\n duration = this.cfg.durations[kind as keyof typeof this.cfg.durations];\n }\n }\n } else {\n // No user durations provided at all; use library defaults per kind\n duration = this.cfg.durations[kind as keyof typeof this.cfg.durations];\n }\n }\n\n const cssClass = extra?.cssClass ?? this.cfg.cssClasses[kind];\n const icon = (extra?.icon ?? this.cfg.icons[kind]) as unknown;\n const variant = extra?.variant;\n\n return this.show({ title, subTitle, duration: duration as number, cssClass, icon, meta: extra?.meta , kind: kind, variant});\n }\n}\n","import { tv, type VariantProps } from 'tailwind-variants';\n\nexport const mnAlertVariants = tv({\n base: 'flex items-start gap-3 p-4 border rounded-xl shadow-sm w-full ',\n variants: {\n kind: {\n success: 'bg-success/10 border-success/30 text-success',\n info: 'bg-info/10 border-info/30 text-info',\n warning: 'bg-warning/10 border-warning/30 text-warning',\n error: 'bg-error/10 border-error/30 text-error',\n default: 'bg-base-100 border-base-300 text-base-content',\n accent: 'bg-accent/10 border-accent/30 text-accent',\n },\n variant: {\n fill: '',\n outline: 'bg-base-200 border-2',\n soft: 'border-none shadow-none',\n }\n },\n compoundVariants: [\n {\n kind: 'success',\n variant: 'fill',\n class: 'bg-success border-success text-success-content'\n },\n {\n kind: 'info',\n variant: 'fill',\n class: 'bg-info border-info text-info-content'\n },\n {\n kind: 'warning',\n variant: 'fill',\n class: 'bg-warning border-warning text-warning-content'\n },\n {\n kind: 'error',\n variant: 'fill',\n class: 'bg-error border-error text-error-content'\n },\n {\n kind: 'accent',\n variant: 'fill',\n class: 'bg-accent border-accent text-accent-content'\n },\n ],\n defaultVariants: {\n kind: 'info',\n variant: 'soft'\n }\n});\n\nexport type MnAlertVariants = VariantProps<typeof mnAlertVariants>;\n","import {ChangeDetectionStrategy, Component, DestroyRef, inject, Input, signal, TemplateRef,} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {CommonModule} from '@angular/common';\nimport {MnAlertStore} from '../mn-alert.store';\nimport {MnAlert, MnAlertId} from '../mn-alert.types';\nimport {mnAlertVariants} from '../mn-alertVariants';\nimport {MnButton} from 'mn-angular-lib/button';\nimport {MnLanguageService} from 'mn-angular-lib/core';\n\nexport type MnAlertTemplateContext = {\n $implicit: MnAlert;\n alert: MnAlert;\n dismiss: () => void;\n}\n\n/**\n * A view-owned wrapper around a single {@link MnAlert}. The store's list is the source\n * of truth for which alerts *exist*; this outlet mirrors it into `views` so a removed\n * alert can play a leave animation (swipe-fling or fade + height-collapse) before its\n * node is actually dropped, rather than vanishing instantly.\n */\ntype MnAlertView = {\n alert: MnAlert;\n /** True once the alert has left the store — the node is animating out and will be removed. */\n leaving: boolean;\n /** True while the user is actively dragging this card (disables the snap transition). */\n dragging: boolean;\n /** Live drag offset (px) along the active swipe axis while swiping. */\n drag: number;\n /** Final offset (px) along the swipe axis the card flings to when a swipe dismisses it. */\n fling: number;\n};\n\n@Component({\n selector: 'mn-alert-outlet',\n standalone: true,\n imports: [CommonModule, MnButton],\n templateUrl: './mn-alert-outlet.html',\n styleUrl: './mn-alert-outlet.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MnAlertOutletComponent {\n private readonly lang = inject(MnLanguageService);\n private readonly store = inject(MnAlertStore);\n private readonly destroyRef = inject(DestroyRef);\n\n /** Drag distance (px) past which a release dismisses regardless of speed. */\n private static readonly SWIPE_DISMISS_THRESHOLD = 96;\n /** Release speed (px/ms) above which a short drag still dismisses — a \"flick\". */\n private static readonly FLICK_VELOCITY = 0.4;\n /** Minimum drag distance (px) a flick must cover, so an incidental fast tap never dismisses. */\n private static readonly FLICK_MIN_DISTANCE = 24;\n /** Upper bound for the leave wait; kept a touch longer than the CSS exit so removal never\n * preempts the animation. Mirrored by the `--mn-alert-exit` duration in the stylesheet. */\n private static readonly EXIT_MS = 320;\n /** Opacity floor a card fades to at the dismiss threshold, for drag feedback. */\n private static readonly DRAG_OPACITY_FLOOR = 0.35;\n\n /**\n * How the dismiss swipe is oriented:\n * - `'auto'` (default) matches the host platform's convention — Apple platforms\n * (iOS/iPadOS/macOS) flick a top banner *upward*, so we swipe vertically; Android (and\n * every other platform) dismisses toasts *to the right*, so we swipe horizontally.\n *\n * Either axis is one-directional: only an upward (vertical) or rightward (horizontal)\n * drag dismisses; dragging the opposite way springs the card back.\n * - `'vertical'` / `'horizontal'` force the axis regardless of platform. Useful when the\n * host can't be sniffed reliably (e.g. Chrome DevTools *Responsive* mode does not spoof\n * the user agent, so `'auto'` there resolves to the desktop/Android horizontal axis).\n */\n @Input() swipeAxis: 'auto' | 'vertical' | 'horizontal' = 'auto';\n\n /** Whether the running device is an Apple platform. Sniffed once from `navigator` at\n * construction (the UA is read at page load and does not change mid-session). */\n private readonly isApple = this.detectApple();\n\n /** The resolved swipe axis: the explicit {@link swipeAxis} override, or the platform\n * default when left on `'auto'`. */\n private get vertical(): boolean {\n if (this.swipeAxis === 'vertical') return true;\n if (this.swipeAxis === 'horizontal') return false;\n return this.isApple;\n }\n\n /**\n * Accessible name for this control. Resolved through the conventional\n * `mnAlert.close` key so an app can translate it, falling back to English when the\n * key is not defined rather than leaking the raw key into the UI.\n */\n get closeLabel(): string {\n return this.lang.translateIfPresent('mnAlert.close') ?? 'Close';\n }\n\n @Input() template?: TemplateRef<MnAlertTemplateContext>;\n\n /** The view-layer mirror of the store's alerts, retaining alerts mid-leave. A signal so\n * writes from the (external) store subscription and leave timers schedule change\n * detection in a zoneless app. */\n readonly views = signal<MnAlertView[]>([]);\n\n /**\n * `touch-action` for the swipe wrapper: reserve the swipe axis for our gesture while\n * leaving the cross-axis to the browser. Vertical swipe (Apple) claims the Y axis\n * (`pan-x`); horizontal swipe (Android/other) claims the X axis (`pan-y`).\n */\n get touchAction(): string {\n return this.vertical ? 'pan-x' : 'pan-y';\n }\n\n /** In-flight leave-removal timers, keyed by alert id, cleared on destroy so a fired\n * timer never touches a torn-down view. */\n private readonly exitTimers = new Map<MnAlertId, ReturnType<typeof setTimeout>>();\n\n /** The single active swipe, or null. Only one card is dragged at a time. `startCoord`\n * and the samples are taken along the active axis (Y when vertical, else X). */\n private activeDrag: {\n view: MnAlertView;\n startCoord: number;\n lastSample: { c: number; t: number };\n prevSample: { c: number; t: number };\n } | null = null;\n\n constructor() {\n this.store.alerts$\n .pipe(takeUntilDestroyed())\n .subscribe(alerts => this.sync(alerts));\n\n this.destroyRef.onDestroy(() => {\n this.exitTimers.forEach(t => clearTimeout(t));\n this.exitTimers.clear();\n });\n }\n\n trackById = (_: number, v: MnAlertView) => v.alert.id;\n\n getAlertClasses(a: MnAlert) {\n return mnAlertVariants({kind: a.kind, variant: a.variant});\n }\n\n /**\n * The lifetime (ms) to run the countdown bar over, or null when no bar should show: an alert\n * that never auto-dismisses has nothing to count down, and one already leaving would only\n * restart the animation mid-exit.\n */\n countdownDuration(v: MnAlertView): number | null {\n if (v.leaving) return null;\n const duration = v.alert.duration;\n return typeof duration === 'number' && duration > 0 ? duration : null;\n }\n\n contextFor(a: MnAlert) {\n return {\n $implicit: a,\n alert: a,\n dismiss: () => this.dismissAlert(a.id)\n } as const;\n }\n\n /** Dismisses via the store; the store's removal is turned into a leave animation by\n * {@link sync}. Used by the close button and the custom-template `dismiss` context. */\n dismissAlert(id: MnAlertId) {\n this.store.dismiss(id);\n }\n\n // =========================\n // Store → view reconciliation\n // =========================\n\n /** Reconciles the view list against the store: appends new alerts, updates the alert\n * reference for still-present ones, and marks vanished ones as leaving (they stay in the\n * list, animating out, until their removal timer fires). */\n private sync(alerts: MnAlert[]): void {\n const current = this.views();\n const existing = new Set(current.map(v => v.alert.id));\n const storeById = new Map(alerts.map(a => [a.id, a]));\n\n const next: MnAlertView[] = [];\n for (const v of current) {\n const fresh = storeById.get(v.alert.id);\n if (fresh) {\n v.alert = fresh;\n } else if (!v.leaving) {\n this.beginLeave(v);\n }\n next.push(v);\n }\n for (const a of alerts) {\n if (!existing.has(a.id)) {\n next.push({alert: a, leaving: false, dragging: false, drag: 0, fling: 0});\n }\n }\n this.views.set(next);\n }\n\n /** Flags a view as leaving and schedules its removal once the exit animation has run.\n * Idempotent: a card already leaving (e.g. flung by a swipe) is left untouched, so a\n * synchronous store re-emit cannot overwrite the swipe direction with the default fade. */\n private beginLeave(v: MnAlertView, fling?: number): void {\n if (v.leaving) return;\n v.leaving = true;\n v.dragging = false;\n if (fling !== undefined) v.fling = fling;\n\n const delay = this.prefersReducedMotion() ? 0 : MnAlertOutletComponent.EXIT_MS;\n const timer = setTimeout(() => this.removeView(v.alert.id), delay);\n this.exitTimers.set(v.alert.id, timer);\n }\n\n private removeView(id: MnAlertId): void {\n const timer = this.exitTimers.get(id);\n if (timer) {\n clearTimeout(timer);\n this.exitTimers.delete(id);\n }\n this.views.update(list => list.filter(v => v.alert.id !== id));\n }\n\n // =========================\n // Swipe-to-dismiss\n // =========================\n\n onPointerDown(event: PointerEvent, v: MnAlertView): void {\n if (v.leaving) return;\n // Don't hijack a press that begins on an interactive control inside the alert.\n if ((event.target as HTMLElement).closest('button, a, input, textarea, select')) return;\n if (event.button !== undefined && event.button !== 0) return;\n\n const coord = this.axisCoord(event);\n this.activeDrag = {\n view: v,\n startCoord: coord,\n lastSample: {c: coord, t: event.timeStamp},\n prevSample: {c: coord, t: event.timeStamp},\n };\n v.dragging = true;\n (event.currentTarget as HTMLElement).setPointerCapture?.(event.pointerId);\n }\n\n onPointerMove(event: PointerEvent, v: MnAlertView): void {\n const drag = this.activeDrag;\n if (!drag || drag.view !== v) return;\n const delta = this.axisCoord(event) - drag.startCoord;\n // Dismissal is one-directional: vertical (Apple) tracks upward only (clamp ≤ 0),\n // horizontal (Android/other) tracks rightward only (clamp ≥ 0). A drag the other way\n // rests at 0 and springs back.\n v.drag = this.vertical ? Math.min(0, delta) : Math.max(0, delta);\n drag.prevSample = drag.lastSample;\n drag.lastSample = {c: this.axisCoord(event), t: event.timeStamp};\n }\n\n onPointerUp(event: PointerEvent, v: MnAlertView): void {\n const drag = this.activeDrag;\n if (!drag || drag.view !== v) return;\n this.activeDrag = null;\n v.dragging = false;\n\n if (this.shouldDismiss(drag, v)) {\n // Fling the card the rest of the way off its edge, then dismiss through the store.\n // Vertical flings upward (off the top); horizontal flings rightward (off the right).\n const extent = this.viewportExtent() + Math.abs(v.drag);\n const fling = this.vertical ? -extent : extent;\n this.beginLeave(v, fling);\n this.store.dismiss(v.alert.id);\n } else {\n // Snap back to rest; the wrapper's transition eases the offset → 0.\n v.drag = 0;\n }\n // Notify: pointerup is template-bound (schedules CD), but the leave/snap mutations live\n // on the view object — re-set the signal so the new transform is reflected reliably.\n this.views.update(list => [...list]);\n }\n\n private shouldDismiss(\n drag: NonNullable<typeof this.activeDrag>,\n v: MnAlertView\n ): boolean {\n if (Math.abs(v.drag) > MnAlertOutletComponent.SWIPE_DISMISS_THRESHOLD) return true;\n const dt = drag.lastSample.t - drag.prevSample.t;\n const velocity = dt > 0 ? Math.abs(drag.lastSample.c - drag.prevSample.c) / dt : 0;\n return velocity > MnAlertOutletComponent.FLICK_VELOCITY\n && Math.abs(v.drag) > MnAlertOutletComponent.FLICK_MIN_DISTANCE;\n }\n\n // =========================\n // Template style helpers\n // =========================\n\n /** Offset transform for a card: the fling target while leaving via swipe, otherwise the\n * live drag offset, translated along the active axis. Returns null when neither applies,\n * letting the stylesheet own the default (fade-in-place) leave. */\n itemTransform(v: MnAlertView): string | null {\n if (v.leaving) {\n return v.fling !== 0 ? this.translate(v.fling) : null;\n }\n return v.drag !== 0 ? this.translate(v.drag) : null;\n }\n\n /** Fades a card toward a floor as it is dragged toward the dismiss threshold. Null (CSS\n * owns opacity) when at rest or leaving. */\n itemOpacity(v: MnAlertView): number | null {\n if (v.leaving || !v.dragging || v.drag === 0) return null;\n const progress = Math.min(Math.abs(v.drag) / MnAlertOutletComponent.SWIPE_DISMISS_THRESHOLD, 1);\n return 1 - progress * (1 - MnAlertOutletComponent.DRAG_OPACITY_FLOOR);\n }\n\n private translate(px: number): string {\n return this.vertical ? `translateY(${px}px)` : `translateX(${px}px)`;\n }\n\n private axisCoord(event: PointerEvent): number {\n return this.vertical ? event.clientY : event.clientX;\n }\n\n private viewportExtent(): number {\n if (typeof window === 'undefined') return 400;\n return this.vertical ? window.innerHeight : window.innerWidth;\n }\n\n /** Whether the current device runs an Apple OS (iOS/iPadOS/macOS). iPadOS 13+ masquerades\n * as a Mac, so it is caught by the touch-capable-Mac branch. */\n private detectApple(): boolean {\n if (typeof navigator === 'undefined') return false;\n const ua = navigator.userAgent ?? '';\n const platform = navigator.platform ?? '';\n const isIOS = /iP(hone|ad|od)/.test(platform) || /iPad|iPhone|iPod/.test(ua);\n const isTouchMac = /Mac/.test(platform + ' ' + ua)\n && typeof document !== 'undefined' && 'ontouchend' in document;\n const isMac = /Mac/.test(ua);\n return isIOS || isTouchMac || isMac;\n }\n\n private prefersReducedMotion(): boolean {\n return typeof window !== 'undefined'\n && typeof window.matchMedia === 'function'\n && window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n }\n}\n","<!-- The stack is a polite live region so every toast is announced; an error toast upgrades itself to an alert. -->\n<div aria-live=\"polite\" role=\"status\" class=\"fixed top-4 left-0 right-0 z-[9999] flex flex-col w-full px-2 sm:px-0 sm:left-auto sm:right-4 sm:max-w-sm\">\n @for (v of views(); track trackById($index, v)) {\n <div\n class=\"mn-alert-item\"\n [attr.role]=\"v.alert.kind === 'error' ? 'alert' : null\"\n [class.dragging]=\"v.dragging\"\n [class.leaving]=\"v.leaving\"\n [style.touch-action]=\"touchAction\"\n [style.transform]=\"itemTransform(v)\"\n [style.opacity]=\"itemOpacity(v)\"\n (pointerdown)=\"onPointerDown($event, v)\"\n (pointermove)=\"onPointerMove($event, v)\"\n (pointerup)=\"onPointerUp($event, v)\"\n (pointercancel)=\"onPointerUp($event, v)\"\n >\n <div class=\"mn-alert-inner\">\n @if (template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"contextFor(v.alert)\">\n </ng-container>\n } @else {\n <div [class.extra]=\"v.alert.cssClass\" [class]=\"getAlertClasses(v.alert)\" class=\"relative overflow-hidden\">\n <div class=\"flex-1 min-w-0 pr-8\">\n <h4 class=\"font-semibold text-sm\">{{ v.alert.title }}</h4>\n @if (v.alert.subTitle) {\n <p class=\"text-sm mt-1 opacity-90 leading-tight\">{{ v.alert.subTitle }}</p>\n }\n </div>\n <button\n [attr.aria-label]=\"closeLabel\"\n mnButton\n [data]=\"{ size: 'md', variant: 'text' }\"\n (click)=\"dismissAlert(v.alert.id)\"\n class=\"absolute top-2 right-2 shrink-0 !text-current hover:!bg-current/10\"\n type=\"button\"\n >\n ×\n </button>\n @if (countdownDuration(v); as ms) {\n <span aria-hidden=\"true\" class=\"mn-alert-progress\">\n <span [style.animation-duration.ms]=\"ms\" class=\"mn-alert-progress-bar\"></span>\n </span>\n }\n </div>\n }\n </div>\n </div>\n }\n</div>\n"],"mappings":";;;;;;;;;AAmBA,MAAa,kBAAkB,IAAI,eAA8B,iBAAiB;AAElF,MAAa,0BAAmD;CAC9D,WAAW;EAAE,SAAS;EAAM,MAAM;EAAM,SAAS;EAAM,OAAO;EAAM,SAAS;CAAI;CACjF,YAAY;EACV,SAAS;EACT,MAAM;EACN,SAAS;EACT,OAAO;EACP,SAAS;CACV;CACD,OAAO,CAAA;CACP,kBAAkB;CAClB,YAAY;CACZ,WAAW,MAAM;AAClB;AC9BD,SAAgB,gBAAgB,SAAwB,CAAA,GAAE;CACxD,MAAM,SAAwB;EAC5B,GAAG;EACH,GAAG;EACH,WAAW;GAAE,GAAG,wBAAwB;GAAW,GAAI,OAAO,aAAa,CAAA;EAAG;EAC9E,YAAY;GAAE,GAAG,wBAAwB;GAAY,GAAI,OAAO,cAAc,CAAA;EAAG;EACjF,OAAO;GAAE,GAAG,wBAAwB;GAAO,GAAI,OAAO,SAAS,CAAA;EAAG;CACnE;CACD,OAAO;EAAE,SAAS;EAAiB,UAAU;CAAM;AACrD;ACRA,IAAI,UAAU;AACd,MAAM,YAAY,MAAM,EAAE;AAG1B,IAAa,eAAb,MAAa,aAAY;CACN,WAAW,IAAI,gBAA2B,CAAA,CAAE;CACpD,UAAU,KAAK,SAAS,aAAY;CAI5B,MAAM,OAA6B,iBAAiB,EAAC,UAAU,KAAI,CAAC;CAIpE,yBAAS,IAAI,IAAG;CAGjC,IAAY,aAAU;EACpB,MAA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