@mk-kit/ui 0.54.0 → 0.55.1
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/README.md +21 -0
- package/fesm2022/mk-kit-ui-core.mjs +2 -0
- package/fesm2022/mk-kit-ui-core.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-dnd.mjs +339 -27
- package/fesm2022/mk-kit-ui-dnd.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-locales-de.mjs +2 -0
- package/fesm2022/mk-kit-ui-locales-de.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-locales-es.mjs +2 -0
- package/fesm2022/mk-kit-ui-locales-es.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-locales-fr.mjs +2 -0
- package/fesm2022/mk-kit-ui-locales-fr.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-locales-pl.mjs +2 -0
- package/fesm2022/mk-kit-ui-locales-pl.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-locales-uk.mjs +2 -0
- package/fesm2022/mk-kit-ui-locales-uk.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-translate-server.mjs +55 -0
- package/fesm2022/mk-kit-ui-translate-server.mjs.map +1 -0
- package/fesm2022/mk-kit-ui-translate.mjs +504 -0
- package/fesm2022/mk-kit-ui-translate.mjs.map +1 -0
- package/fesm2022/mk-kit-ui.mjs +1 -0
- package/fesm2022/mk-kit-ui.mjs.map +1 -1
- package/package.json +13 -1
- package/styles/presets/momentum.css +272 -0
- package/types/mk-kit-ui-core.d.ts +4 -0
- package/types/mk-kit-ui-dnd.d.ts +178 -6
- package/types/mk-kit-ui-translate-server.d.ts +39 -0
- package/types/mk-kit-ui-translate.d.ts +275 -0
- package/types/mk-kit-ui.d.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mk-kit-ui-core.mjs","sources":["../../../projects/mk-kit/core/types.ts","../../../projects/mk-kit/core/theme/theme.service.ts","../../../projects/mk-kit/core/layout/breakpoint.service.ts","../../../projects/mk-kit/core/a11y/live-announcer.service.ts","../../../projects/mk-kit/core/a11y/focus-trap.ts","../../../projects/mk-kit/core/a11y/unique-id.ts","../../../projects/mk-kit/core/overlay/overlay-ref.ts","../../../projects/mk-kit/core/overlay/overlay-root.ts","../../../projects/mk-kit/core/overlay/overlay.service.ts","../../../projects/mk-kit/core/overlay/anchored-overlay.ts","../../../projects/mk-kit/core/i18n/mk-i18n.ts","../../../projects/mk-kit/core/forms/field-context.ts","../../../projects/mk-kit/core/highlight/code-highlight.ts","../../../projects/mk-kit/core/forms/validator-change.ts","../../../projects/mk-kit/core/forms/validation-messages.ts","../../../projects/mk-kit/core/forms/signal-forms.ts","../../../projects/mk-kit/core/query/query.ts","../../../projects/mk-kit/core/mk-kit-ui-core.ts"],"sourcesContent":["/** Shared primitive types used across mk-kit components. */\n\n/** Control size scale. Maps to `--mk-control-height-*` tokens. */\nexport type MkSize = 'sm' | 'md' | 'lg';\n\n/** Semantic color tone. Each maps to a `--mk-<tone>*` token family. */\nexport type MkTone =\n | 'primary'\n | 'neutral'\n | 'success'\n | 'warning'\n | 'danger'\n | 'info';\n\n/** Visual treatment for tinted/interactive surfaces. */\nexport type MkVariant = 'solid' | 'soft' | 'outline' | 'ghost' | 'link';\n\n/** Theme selection. `system` follows the OS `prefers-color-scheme`. */\nexport type MkThemePreference = 'light' | 'dark' | 'system';\n\n/** Concrete resolved theme (never `system`). */\nexport type MkResolvedTheme = 'light' | 'dark';\n\n/** Common placement values for overlays — delegated to `@mk-kit/core`. */\nexport type { MkPlacement } from '@mk-kit/core';\n","import {\n DOCUMENT,\n DestroyRef,\n Injectable,\n PLATFORM_ID,\n computed,\n effect,\n inject,\n signal,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport type { MkResolvedTheme, MkThemePreference } from '../types';\n\nconst STORAGE_KEY = 'mk-kit-theme';\nconst THEME_ATTR = 'data-mk-theme';\nconst DENSITY_STORAGE_KEY = 'mk-kit-density';\nconst DENSITY_ATTR = 'data-mk-density';\nconst CONTRAST_STORAGE_KEY = 'mk-kit-contrast';\nconst CONTRAST_ATTR = 'data-mk-contrast';\nconst CONTRAST_QUERY = '(prefers-contrast: more)';\n\n/**\n * Global control-density mode.\n *\n * `touch` sizes controls for fingers (48px default) rather than a cursor —\n * tablets, kiosks, order screens. It is usually applied per-subtree with the\n * `data-mk-density` attribute rather than globally, since one app often has\n * both a mouse-driven admin and a touch-driven screen.\n */\nexport type MkDensity = 'comfortable' | 'compact' | 'touch';\n\n/**\n * Contrast preference.\n *\n * `high` applies the high-contrast token preset (`data-mk-contrast=\"high\"`):\n * pure text colours, line-like borders, opaque interaction washes, a thicker\n * focus ring. `system` (the default) writes no attribute and lets the\n * stylesheet follow the OS `prefers-contrast: more` setting; `normal` opts\n * out of that even when the OS asks for more contrast.\n */\nexport type MkContrastPreference = 'normal' | 'high' | 'system';\n\n/** Concrete resolved contrast (never `system`). */\nexport type MkResolvedContrast = 'normal' | 'high';\n\n/**\n * Reactive theme controller for mk-kit.\n *\n * - `preference()` is the user's choice: `light`, `dark`, or `system`.\n * - `resolvedTheme()` is the concrete theme currently applied.\n * - Writes `data-mk-theme` on `<html>` and persists the choice to\n * `localStorage`. When set to `system`, it live-tracks the OS setting and\n * removes the attribute so pure-CSS `prefers-color-scheme` takes over.\n *\n * Provided in root — inject it anywhere and bind to the signals.\n */\n@Injectable({ providedIn: 'root' })\nexport class MkThemeService {\n private readonly document = inject(DOCUMENT);\n private readonly destroyRef = inject(DestroyRef);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n private readonly _preference = signal<MkThemePreference>(this.readInitial());\n /** The user's theme preference. */\n readonly preference = this._preference.asReadonly();\n\n private readonly _systemPrefersDark = signal<boolean>(this.readSystemDark());\n\n /** The concrete theme in effect (`light` or `dark`). */\n readonly resolvedTheme = computed<MkResolvedTheme>(() => {\n const pref = this._preference();\n if (pref === 'system') {\n return this._systemPrefersDark() ? 'dark' : 'light';\n }\n return pref;\n });\n\n /** Convenience boolean for template bindings. */\n readonly isDark = computed(() => this.resolvedTheme() === 'dark');\n\n private readonly _density = signal<MkDensity>(this.readInitialDensity());\n /**\n * The global density mode. `compact` tightens control heights and the core\n * spacing steps via the `data-mk-density` attribute, `touch` enlarges them —\n * every component follows automatically because they read the same tokens.\n *\n * This signal is the GLOBAL mode only. To make one screen or dialog touch-\n * sized inside an otherwise comfortable app, put `data-mk-density=\"touch\"`\n * on that element instead; the tokens inherit and this service stays out of\n * it.\n */\n readonly density = this._density.asReadonly();\n\n private readonly _contrast = signal<MkContrastPreference>(this.readInitialContrast());\n /**\n * The user's contrast preference: `normal`, `high` or `system` (follow the\n * OS `prefers-contrast` setting — the default). Written as\n * `data-mk-contrast` on `<html>` and persisted; `system` removes the\n * attribute so the pure-CSS `prefers-contrast: more` mapping takes over.\n *\n * Like density, the attribute also works per subtree: put\n * `data-mk-contrast=\"high\"` on any element to raise contrast there only.\n */\n readonly contrast = this._contrast.asReadonly();\n\n private readonly _systemPrefersContrast = signal<boolean>(this.readSystemContrast());\n\n /** The concrete contrast in effect (`normal` or `high`). */\n readonly resolvedContrast = computed<MkResolvedContrast>(() => {\n const pref = this._contrast();\n if (pref === 'system') {\n return this._systemPrefersContrast() ? 'high' : 'normal';\n }\n return pref;\n });\n\n /** Convenience boolean for template bindings. */\n readonly isHighContrast = computed(() => this.resolvedContrast() === 'high');\n\n constructor() {\n if (this.isBrowser) {\n this.watchSystemPreference();\n this.watchSystemContrast();\n }\n\n // Keep the contrast attribute + storage in sync. `system` is the ABSENCE\n // of the attribute (the stylesheet then follows `prefers-contrast`);\n // `normal` and `high` name themselves so CSS can tell an explicit opt-out\n // from \"no preference\".\n effect(() => {\n const contrast = this._contrast();\n if (!this.isBrowser) return;\n const root = this.document.documentElement;\n if (contrast === 'system') {\n root.removeAttribute(CONTRAST_ATTR);\n } else {\n root.setAttribute(CONTRAST_ATTR, contrast);\n }\n try {\n localStorage.setItem(CONTRAST_STORAGE_KEY, contrast);\n } catch {\n /* ignore */\n }\n });\n\n // Keep the DOM attribute + storage in sync with the signal.\n effect(() => {\n const pref = this._preference();\n if (!this.isBrowser) return;\n\n const root = this.document.documentElement;\n if (pref === 'system') {\n root.removeAttribute(THEME_ATTR);\n } else {\n root.setAttribute(THEME_ATTR, pref);\n }\n try {\n localStorage.setItem(STORAGE_KEY, pref);\n } catch {\n /* storage may be unavailable (private mode) — ignore */\n }\n });\n\n // Keep the density attribute + storage in sync.\n effect(() => {\n const density = this._density();\n if (!this.isBrowser) return;\n const root = this.document.documentElement;\n // `comfortable` is the token default, so it is the ABSENCE of the\n // attribute — anything else names itself. Written this way so a new mode\n // needs no change here.\n if (density === 'comfortable') {\n root.removeAttribute(DENSITY_ATTR);\n } else {\n root.setAttribute(DENSITY_ATTR, density);\n }\n try {\n localStorage.setItem(DENSITY_STORAGE_KEY, density);\n } catch {\n /* ignore */\n }\n });\n }\n\n /** Set the global density mode. */\n setDensity(density: MkDensity): void {\n this._density.set(density);\n }\n\n /**\n * Toggle between comfortable and compact — the two modes a density switch in\n * a UI offers. `touch` is a deliberate choice for a specific screen, not\n * something to land on by toggling, so from `touch` this returns to\n * comfortable rather than cycling.\n */\n toggleDensity(): void {\n this._density.update((d) => (d === 'comfortable' ? 'compact' : 'comfortable'));\n }\n\n private readInitialDensity(): MkDensity {\n if (!this.isBrowser) return 'comfortable';\n try {\n const stored = localStorage.getItem(DENSITY_STORAGE_KEY);\n if (stored === 'compact' || stored === 'comfortable' || stored === 'touch') {\n return stored;\n }\n } catch {\n /* ignore */\n }\n return 'comfortable';\n }\n\n /** Set the contrast preference explicitly. */\n setContrast(contrast: MkContrastPreference): void {\n this._contrast.set(contrast);\n }\n\n /** Toggle between normal and high contrast (resolving `system` first). */\n toggleContrast(): void {\n this._contrast.set(this.resolvedContrast() === 'high' ? 'normal' : 'high');\n }\n\n private readInitialContrast(): MkContrastPreference {\n if (!this.isBrowserEnv()) return 'system';\n try {\n const stored = localStorage.getItem(CONTRAST_STORAGE_KEY);\n if (stored === 'normal' || stored === 'high' || stored === 'system') {\n return stored;\n }\n } catch {\n /* ignore */\n }\n return 'system';\n }\n\n private readSystemContrast(): boolean {\n if (!this.isBrowserEnv()) return false;\n return this.document.defaultView?.matchMedia?.(CONTRAST_QUERY).matches ?? false;\n }\n\n private watchSystemContrast(): void {\n const mql = this.document.defaultView?.matchMedia?.(CONTRAST_QUERY);\n if (!mql) return;\n const onChange = (e: MediaQueryListEvent) =>\n this._systemPrefersContrast.set(e.matches);\n mql.addEventListener('change', onChange);\n this.destroyRef.onDestroy(() => mql.removeEventListener('change', onChange));\n }\n\n /** Set the theme preference explicitly. */\n setTheme(preference: MkThemePreference): void {\n this._preference.set(preference);\n }\n\n /** Toggle between light and dark (resolving `system` first). */\n toggle(): void {\n this._preference.set(this.resolvedTheme() === 'dark' ? 'light' : 'dark');\n }\n\n private readInitial(): MkThemePreference {\n if (!this.isBrowserEnv()) return 'system';\n try {\n const stored = localStorage.getItem(STORAGE_KEY);\n if (stored === 'light' || stored === 'dark' || stored === 'system') {\n return stored;\n }\n } catch {\n /* ignore */\n }\n return 'system';\n }\n\n private readSystemDark(): boolean {\n if (!this.isBrowserEnv()) return false;\n return this.document.defaultView?.matchMedia('(prefers-color-scheme: dark)')\n .matches ?? false;\n }\n\n private watchSystemPreference(): void {\n const mql = this.document.defaultView?.matchMedia(\n '(prefers-color-scheme: dark)',\n );\n if (!mql) return;\n const onChange = (e: MediaQueryListEvent) =>\n this._systemPrefersDark.set(e.matches);\n mql.addEventListener('change', onChange);\n // Detach when the injector dies (repeated bootstraps in SSR/HMR/tests).\n this.destroyRef.onDestroy(() => mql.removeEventListener('change', onChange));\n }\n\n private isBrowserEnv(): boolean {\n return this.isBrowser && typeof this.document !== 'undefined';\n }\n}\n","import {\n DOCUMENT,\n Injectable,\n InjectionToken,\n PLATFORM_ID,\n computed,\n inject,\n signal,\n type OnDestroy,\n type Signal,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\n/** Named viewport ranges, mobile-first: each starts at its min-width. */\nexport type MkBreakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n/** Min-widths (px) at which each named breakpoint begins; `xs` is everything below `sm`. */\nexport type MkBreakpoints = Record<Exclude<MkBreakpoint, 'xs'>, number>;\n\n/** The default scale (same numbers as Tailwind, so mental models transfer). */\nexport const MK_DEFAULT_BREAKPOINTS: MkBreakpoints = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n '2xl': 1536,\n};\n\n/** Override the breakpoint scale app-wide: `{ provide: MK_BREAKPOINTS, useValue: { …, lg: 1100 } }`. */\nexport const MK_BREAKPOINTS = new InjectionToken<MkBreakpoints>('MK_BREAKPOINTS', {\n providedIn: 'root',\n factory: () => MK_DEFAULT_BREAKPOINTS,\n});\n\n/**\n * A value that may differ per breakpoint: either the plain value or a\n * mobile-first map, `{ xs: 1, md: 2, xl: 4 }`, where each key applies from\n * that breakpoint up until the next key given.\n */\nexport type MkResponsive<T> = T | Partial<Record<MkBreakpoint, T>>;\n\nconst ORDER: readonly MkBreakpoint[] = ['xs', 'sm', 'md', 'lg', 'xl', '2xl'];\n\n/** True when `value` is a per-breakpoint map rather than a plain value. */\nexport function mkIsResponsive<T>(value: MkResponsive<T>): value is Partial<Record<MkBreakpoint, T>> {\n return (\n typeof value === 'object' &&\n value !== null &&\n !Array.isArray(value) &&\n Object.keys(value).every((k) => (ORDER as readonly string[]).includes(k))\n );\n}\n\n/**\n * Reactive viewport breakpoints, one `matchMedia` listener per step.\n *\n * ```ts\n * private readonly bp = inject(MkBreakpointService);\n * readonly compact = this.bp.down('md'); // Signal<boolean>\n * readonly columns = computed(() => this.bp.resolve({ xs: 1, md: 2, xl: 4 }));\n * ```\n *\n * On the server (no `window`) everything reports `xs`.\n */\n@Injectable({ providedIn: 'root' })\nexport class MkBreakpointService implements OnDestroy {\n /** The breakpoint scale in effect (see {@link MK_BREAKPOINTS}). */\n readonly breakpoints = inject(MK_BREAKPOINTS);\n\n private readonly document = inject(DOCUMENT);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n /** `matches` per step, in scale order (`sm` first). */\n private readonly steps = new Map<MkBreakpoint, ReturnType<typeof signal<boolean>>>();\n private readonly cleanup: Array<() => void> = [];\n private readonly queries = new Map<string, Signal<boolean>>();\n private readonly ups = new Map<MkBreakpoint, Signal<boolean>>();\n private readonly downs = new Map<MkBreakpoint, Signal<boolean>>();\n\n /** The widest breakpoint the viewport currently satisfies. */\n readonly current: Signal<MkBreakpoint>;\n\n constructor() {\n for (const name of ORDER.slice(1)) {\n const min = this.breakpoints[name as Exclude<MkBreakpoint, 'xs'>];\n this.steps.set(name, this.watch(`(min-width: ${min}px)`));\n }\n this.current = computed(() => {\n let current: MkBreakpoint = 'xs';\n for (const name of ORDER.slice(1)) if (this.steps.get(name)!()) current = name;\n return current;\n });\n }\n\n /** True while the viewport is at least `bp` wide (`up('md')` = md, lg, xl, 2xl). */\n up(bp: MkBreakpoint): Signal<boolean> {\n let s = this.ups.get(bp);\n if (!s) {\n s = bp === 'xs' ? signal(true).asReadonly() : this.steps.get(bp)!.asReadonly();\n this.ups.set(bp, s);\n }\n return s;\n }\n\n /** True while the viewport is narrower than `bp` (`down('md')` = xs, sm). */\n down(bp: MkBreakpoint): Signal<boolean> {\n let s = this.downs.get(bp);\n if (!s) {\n const up = this.up(bp);\n s = computed(() => !up());\n this.downs.set(bp, s);\n }\n return s;\n }\n\n /** True while the viewport is at least `from` and narrower than `to`. */\n between(from: MkBreakpoint, to: MkBreakpoint): Signal<boolean> {\n const lo = this.up(from);\n const hi = this.down(to);\n return computed(() => lo() && hi());\n }\n\n /** Any media query as a signal, e.g. `observe('(orientation: portrait)')`. */\n observe(query: string): Signal<boolean> {\n let s = this.queries.get(query);\n if (!s) {\n s = this.watch(query).asReadonly();\n this.queries.set(query, s);\n }\n return s;\n }\n\n /**\n * Pick the entry of a responsive value for the current viewport —\n * mobile-first, so `{ xs: 1, md: 2 }` gives 1 on `sm` and 2 on `xl`.\n * A plain value is returned as is. Read inside a `computed` to track it.\n */\n resolve<T>(value: MkResponsive<T>): T | undefined {\n if (!mkIsResponsive(value)) return value as T;\n const idx = ORDER.indexOf(this.current());\n for (let i = idx; i >= 0; i--) {\n const v = value[ORDER[i]];\n if (v !== undefined) return v;\n }\n return undefined;\n }\n\n ngOnDestroy(): void {\n for (const off of this.cleanup) off();\n this.cleanup.length = 0;\n }\n\n private watch(query: string) {\n const s = signal(false);\n if (!this.isBrowser) return s;\n const mql = this.document.defaultView?.matchMedia?.(query);\n if (!mql) return s;\n s.set(mql.matches);\n const onChange = (e: MediaQueryListEvent) => s.set(e.matches);\n mql.addEventListener('change', onChange);\n this.cleanup.push(() => mql.removeEventListener('change', onChange));\n return s;\n }\n}\n","import { DOCUMENT, Injectable, PLATFORM_ID, inject } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\nexport type MkAriaLivePoliteness = 'polite' | 'assertive';\n\n/**\n * Announces messages to assistive technology via a visually-hidden\n * `aria-live` region. Used by toasts, form validation, sort changes, etc.\n * so state changes are perceivable without sight. WCAG 4.1.3 (Status Messages).\n */\n@Injectable({ providedIn: 'root' })\nexport class MkLiveAnnouncer {\n private readonly document = inject(DOCUMENT);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private region?: HTMLElement;\n private clearTimer?: ReturnType<typeof setTimeout>;\n\n /** Announce `message`. `politeness` controls interruption behavior. */\n announce(message: string, politeness: MkAriaLivePoliteness = 'polite'): void {\n if (!this.isBrowser) return;\n const region = this.ensureRegion();\n region.setAttribute('aria-live', politeness);\n\n // Clear then set on the next frame so identical consecutive messages\n // are still re-announced by screen readers.\n region.textContent = '';\n if (this.clearTimer) clearTimeout(this.clearTimer);\n this.document.defaultView?.requestAnimationFrame(() => {\n region.textContent = message;\n });\n\n // Tidy up after a while to keep the DOM clean.\n this.clearTimer = setTimeout(() => {\n if (this.region) this.region.textContent = '';\n }, 1000);\n }\n\n private ensureRegion(): HTMLElement {\n if (this.region) return this.region;\n const el = this.document.createElement('div');\n el.setAttribute('aria-atomic', 'true');\n el.setAttribute('aria-live', 'polite');\n el.className = 'mk-visually-hidden';\n el.style.cssText =\n 'position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;';\n this.document.body.appendChild(el);\n this.region = el;\n return el;\n }\n}\n","const FOCUSABLE_SELECTOR = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled]):not([type=\"hidden\"])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n '[contenteditable=\"true\"]',\n].join(',');\n\n/** Returns the tabbable elements inside `root`, in DOM order. */\nexport function mkGetFocusable(root: HTMLElement): HTMLElement[] {\n const win = root.ownerDocument.defaultView;\n return Array.from(\n root.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR),\n ).filter((el) => {\n if (el === root.ownerDocument.activeElement) return true;\n if (el.offsetWidth <= 0 && el.offsetHeight <= 0) return false;\n // `visibility:hidden` elements keep their box, so the size check above\n // passes — yet they are NOT tabbable, and counting one as a Tab-wrap\n // boundary makes the wrap focus a dead element. `getComputedStyle`\n // degrades safely in jsdom, where visibility resolves 'visible' by\n // default, so test environments without layout keep working.\n const visibility = win?.getComputedStyle(el).visibility;\n return visibility !== 'hidden' && visibility !== 'collapse';\n });\n}\n\n/**\n * Traps keyboard focus within `root` (wrapping Tab / Shift+Tab), moves focus\n * inside on activation, and restores focus to the previously-focused element\n * on release. Essential for accessible modals/menus (WCAG 2.4.3, 2.1.2).\n */\nexport class MkFocusTrap {\n private previouslyFocused: HTMLElement | null = null;\n private active = false;\n private readonly keydownHandler = (e: KeyboardEvent) => this.onKeydown(e);\n\n constructor(private readonly root: HTMLElement) {}\n\n /** Activate the trap and move focus to the first focusable element (or root). */\n activate(initialFocus?: HTMLElement): void {\n this.previouslyFocused = this.root.ownerDocument\n .activeElement as HTMLElement | null;\n this.active = true;\n this.root.addEventListener('keydown', this.keydownHandler, true);\n\n const target =\n initialFocus ??\n mkGetFocusable(this.root)[0] ??\n this.root;\n // Ensure programmatic focus works even on a non-tabbable container.\n if (target === this.root && !this.root.hasAttribute('tabindex')) {\n this.root.setAttribute('tabindex', '-1');\n }\n // Skip if the trap was released within the same tick, so the deferred\n // focus can't steal focus back after release() restored it.\n queueMicrotask(() => {\n if (this.active) target.focus();\n });\n }\n\n /** Deactivate and restore focus to the trigger element. */\n release(): void {\n this.active = false;\n this.root.removeEventListener('keydown', this.keydownHandler, true);\n const previous = this.previouslyFocused;\n this.previouslyFocused = null;\n if (!previous) return;\n if (previous.isConnected) {\n previous.focus?.();\n } else {\n // The trigger left the DOM while the trap was active (a deleted row, a\n // route change). Focusing a detached node is a silent no-op at best —\n // land on the body instead so focus has a real, connected home.\n this.root.ownerDocument.body?.focus?.();\n }\n }\n\n private onKeydown(e: KeyboardEvent): void {\n if (e.key !== 'Tab') return;\n const focusable = mkGetFocusable(this.root);\n if (focusable.length === 0) {\n e.preventDefault();\n this.root.focus();\n return;\n }\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n const active = this.root.ownerDocument.activeElement;\n\n if (e.shiftKey && active === first) {\n e.preventDefault();\n last.focus();\n } else if (!e.shiftKey && active === last) {\n e.preventDefault();\n first.focus();\n }\n }\n}\n","/** Delegates to `@mk-kit/core` — the exported name is unchanged. */\nexport { mkUniqueId } from '@mk-kit/core';\n","import { InjectionToken, signal, type ComponentRef } from '@angular/core';\nimport { Observable } from 'rxjs';\n\n/** Injection token exposing the data passed to an overlay component. */\nexport const MK_OVERLAY_DATA = new InjectionToken<unknown>('MK_OVERLAY_DATA');\n\n/**\n * Handle to an open overlay. Injected into the rendered component and returned\n * from `MkOverlayService.open`. Resolve the overlay by calling `close`.\n *\n * The close result is exposed three ways so the handle fits whatever style the\n * calling code already uses — they all settle together:\n *\n * - `result` — a signal, for template binding and signal-based components.\n * - `closed$` — an Observable that emits once and completes, for RxJS\n * pipelines. A service that hands a dialog result back to its callers can\n * return this directly instead of wrapping the promise in `from(...)`.\n * - `afterClosed` — a Promise, for `await` / `.then()`.\n */\nexport class MkOverlayRef<TResult = unknown, TComponent = unknown> {\n /** The rendered component instance (set by the service after creation). */\n componentRef?: ComponentRef<TComponent>;\n\n private readonly _closed = signal(false);\n /** Becomes `true` once the overlay has been dismissed. */\n readonly closed = this._closed.asReadonly();\n\n private readonly _result = signal<TResult | undefined>(undefined);\n /**\n * The value passed to `close`, or `undefined` while open and for a dismissal\n * (Escape / backdrop). Read `closed()` to tell \"closed with no result\" apart\n * from \"still open\".\n */\n readonly result = this._result.asReadonly();\n\n private resolveClosed!: (result: TResult | undefined) => void;\n /** Resolves with the close result when the overlay is dismissed. */\n readonly afterClosed = new Promise<TResult | undefined>((resolve) => {\n this.resolveClosed = resolve;\n });\n\n private emitClosed?: (result: TResult | undefined) => void;\n /**\n * Emits the close result once, then completes. Subscribing after the overlay\n * has already closed replays the result immediately, so a late subscriber\n * never hangs.\n */\n readonly closed$ = new Observable<TResult | undefined>((subscriber) => {\n if (this._closed()) {\n subscriber.next(this._result());\n subscriber.complete();\n return;\n }\n this.emitClosed = (result) => {\n subscriber.next(result);\n subscriber.complete();\n };\n return () => {\n this.emitClosed = undefined;\n };\n });\n\n /** Internal disposer wired up by the service. */\n _dispose: (result: TResult | undefined) => void = () => {};\n\n /** Close the overlay, optionally returning a result. */\n close(result?: TResult): void {\n if (this._closed()) return;\n this._closed.set(true);\n this._result.set(result);\n this._dispose(result);\n this.resolveClosed(result);\n this.emitClosed?.(result);\n }\n}\n","import { DOCUMENT, InjectionToken, inject } from '@angular/core';\n\n/**\n * Resolves the element overlay surfaces are appended to. A function (not an\n * element) because the root may be created lazily, after DI is set up.\n */\nexport type MkOverlayRootFn = () => HTMLElement;\n\n/**\n * Where mk-kit mounts everything that leaves the component tree: overlay\n * containers (dialogs), anchored panels (selects, menus, tooltips), toast /\n * snackbar containers and the tour surfaces. Defaults to `document.body`.\n *\n * Override it to confine those surfaces to another element — `@mk-kit/ui/embed`\n * points it at a themed shadow-DOM host so overlays opened by embedded custom\n * elements stay isolated from the host page's stylesheet:\n *\n * ```ts\n * { provide: MK_OVERLAY_ROOT, useValue: () => myOverlayHost }\n * ```\n */\nexport const MK_OVERLAY_ROOT = new InjectionToken<MkOverlayRootFn>('MK_OVERLAY_ROOT', {\n providedIn: 'root',\n factory: () => {\n const doc = inject(DOCUMENT);\n return () => doc.body;\n },\n});\n\n/**\n * The direct child of `document.body` an overlay-root descendant lives under,\n * crossing shadow boundaries on the way up — `null` when the node is not under\n * `body` at all. The overlay service uses it to keep the overlay's own host\n * out of the elements it makes `inert` behind a modal.\n */\nexport function mkBodyLevelAncestor(node: Node, body: HTMLElement): Element | null {\n let current: Node = node;\n for (;;) {\n const root = current.getRootNode();\n if (root instanceof ShadowRoot) {\n current = root.host;\n continue;\n }\n let el: Node = current;\n while (el.parentNode && el.parentNode !== body) el = el.parentNode;\n return el.parentNode === body ? (el as Element) : null;\n }\n}\n","import {\n ApplicationRef,\n DOCUMENT,\n EnvironmentInjector,\n Injectable,\n Injector,\n type OnDestroy,\n PLATFORM_ID,\n Type,\n createComponent,\n inject,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { MkFocusTrap } from '../a11y/focus-trap';\nimport { MK_OVERLAY_DATA, MkOverlayRef } from './overlay-ref';\nimport { MK_OVERLAY_ROOT, mkBodyLevelAncestor } from './overlay-root';\n\nexport interface MkOverlayConfig<TData = unknown> {\n /** Arbitrary data injected via `MK_OVERLAY_DATA`. */\n data?: TData;\n /** Render a dimmed scrim behind the panel. Default `true`. */\n hasBackdrop?: boolean;\n /** Close when the backdrop is clicked. Default `true`. */\n closeOnBackdropClick?: boolean;\n /** Close when Escape is pressed. Default `true`. */\n closeOnEscape?: boolean;\n /** Trap focus within the panel and restore it on close. Default `true`. */\n trapFocus?: boolean;\n /**\n * Move focus to the panel's first focusable element on open. Default `true`.\n * Set `false` to focus the panel itself instead — for content-led surfaces\n * (a product sheet, a preview) where focusing the close button first reads\n * as \"dismiss me\". Tab containment and focus restore are unaffected; turn\n * `trapFocus` off only if you want neither.\n */\n autoFocus?: boolean;\n /** Extra class(es) applied to the panel host element. */\n panelClass?: string | string[];\n /** Accessible role for the panel. Default `dialog`. */\n role?: 'dialog' | 'alertdialog' | 'menu' | 'listbox';\n /** `aria-label` for the panel when no visible title is wired up. */\n ariaLabel?: string;\n /** A custom injector to use as the parent for the rendered component. */\n injector?: Injector;\n}\n\n/**\n * State saved while body scroll is locked. iOS Safari ignores\n * `overflow: hidden` for touch scrolling, so the lock also fixes the body in\n * place at the current scroll offset (`position: fixed; top: -scrollY`) and\n * jumps back to that offset when the last overlay closes.\n */\ninterface BodyScrollLock {\n scrollY: number;\n /** The body's own inline styles before the lock, restored verbatim. */\n prev: Record<\n 'position' | 'top' | 'left' | 'right' | 'width' | 'overflow',\n string\n >;\n}\n\n/**\n * Body-level elements a modal must NOT inert:\n * - `[popover]` — anchored panels / tooltips teleport to `document.body` and\n * may open ABOVE the dialog after it (a select inside a dialog); inerting\n * them would kill the very widget the dialog just opened.\n * - toast / snackbar containers — transient status surfaces that must stay\n * reachable and announceable while a dialog is up.\n * - `[aria-live]` — the live announcer region; an inert live region stops\n * announcing entirely.\n */\nconst INERT_EXEMPT_SELECTOR =\n '[popover], [aria-live], mk-toast-container, mk-snackbar-container';\n\n/**\n * Lightweight, dependency-free overlay renderer. Instantiates a standalone\n * component into a body-level host, manages the backdrop, focus trapping,\n * Escape handling, and scroll locking. Powers Dialog, Menu, and others.\n */\n@Injectable({ providedIn: 'root' })\nexport class MkOverlayService implements OnDestroy {\n private readonly appRef = inject(ApplicationRef);\n private readonly envInjector = inject(EnvironmentInjector);\n private readonly document = inject(DOCUMENT);\n private readonly overlayRoot = inject(MK_OVERLAY_ROOT);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n // All coordination state lives on the INSTANCE, not the module: the service\n // is a root singleton, so one app still shares one stack — but each test\n // injector gets a fresh world instead of leaking overlays/locks/listeners\n // across spec files that share a worker.\n\n /** Reference count for the body scroll lock (first open locks, last close unlocks). */\n private openOverlays = 0;\n private bodyScrollLock: BodyScrollLock | null = null;\n\n /**\n * Every overlay currently on screen, in open order (Map preserves insertion\n * order, so the last entry is the topmost). Kept so {@link closeAll} can\n * dismiss them and so the shared Escape listener can find the topmost\n * dismissible overlay. Entries remove themselves on dispose.\n */\n private readonly openRefs = new Map<\n MkOverlayRef<unknown>,\n { closeOnEscape: boolean }\n >();\n\n /** The document currently carrying the shared Escape listener, if any. */\n private escapeListenerDoc: Document | null = null;\n\n /**\n * The one document-level Escape listener, shared by every open overlay.\n *\n * Registered on the BUBBLE phase on purpose: widgets living inside an\n * overlay (a menu, an anchored panel, a picker) handle Escape on their own\n * elements during bubbling and call `preventDefault()`, so a consumed\n * Escape arrives here already `defaultPrevented` and closes nothing. A\n * per-overlay capture listener with `stopPropagation()` cannot do this:\n * stopPropagation does not stop OTHER listeners on the same target, so one\n * Escape used to close every stacked overlay at once.\n */\n private readonly onDocumentEscape = (event: KeyboardEvent): void => {\n if (event.key !== 'Escape' || event.defaultPrevented) return;\n // Close ONLY the topmost open overlay that opted into Escape dismissal.\n const entries = [...this.openRefs.entries()];\n for (let i = entries.length - 1; i >= 0; i--) {\n const [ref, { closeOnEscape }] = entries[i];\n if (closeOnEscape) {\n ref.close();\n event.preventDefault();\n return;\n }\n }\n };\n\n /** (Un)register the shared Escape listener to match the open-overlay set. */\n private syncEscapeListener(doc: Document): void {\n const needed = [...this.openRefs.values()].some((e) => e.closeOnEscape);\n if (needed && this.escapeListenerDoc === null) {\n doc.addEventListener('keydown', this.onDocumentEscape);\n this.escapeListenerDoc = doc;\n } else if (!needed && this.escapeListenerDoc !== null) {\n this.escapeListenerDoc.removeEventListener(\n 'keydown',\n this.onDocumentEscape,\n );\n this.escapeListenerDoc = null;\n }\n }\n\n private lockBodyScroll(doc: Document): void {\n const { style } = doc.body;\n this.bodyScrollLock = {\n scrollY: doc.defaultView?.scrollY ?? 0,\n prev: {\n position: style.position,\n top: style.top,\n left: style.left,\n right: style.right,\n width: style.width,\n overflow: style.overflow,\n },\n };\n // overflow:hidden still does the whole job on desktop (and avoids a\n // scroll jump there); the fixed-body treatment is what actually stops iOS\n // touch scrolling. `top: -scrollY` keeps the page visually where it was.\n style.overflow = 'hidden';\n style.position = 'fixed';\n style.top = `-${this.bodyScrollLock.scrollY}px`;\n style.left = '0';\n style.right = '0';\n style.width = '100%';\n }\n\n private unlockBodyScroll(doc: Document): void {\n if (!this.bodyScrollLock) return;\n const { scrollY, prev } = this.bodyScrollLock;\n this.bodyScrollLock = null;\n const { style } = doc.body;\n style.position = prev.position;\n style.top = prev.top;\n style.left = prev.left;\n style.right = prev.right;\n style.width = prev.width;\n style.overflow = prev.overflow;\n // Fixing the body collapsed the document's scroll position to 0; jump\n // back instantly (never smooth — the restoration must be invisible).\n // Guarded for jsdom, where scrollTo is unimplemented.\n const view = doc.defaultView;\n if (scrollY !== 0 && typeof view?.scrollTo === 'function') {\n view.scrollTo({ top: scrollY, behavior: 'instant' });\n }\n }\n\n /** How many overlays are currently open. */\n get openCount(): number {\n return this.openRefs.size;\n }\n\n /**\n * Close every open overlay, newest first. Each is closed with no result, so\n * `afterClosed` resolves undefined exactly as a backdrop click or Escape\n * would. Safe to call when nothing is open.\n */\n closeAll(): void {\n // Iterate a COPY: close() disposes synchronously, which mutates the map.\n for (const ref of [...this.openRefs.keys()].reverse()) ref.close();\n }\n\n /**\n * Injector teardown closes everything still open. In an app this runs only\n * at shutdown; in tests it runs on every `TestBed.resetTestingModule()`,\n * so an overlay a spec forgot to close cannot leak its scroll lock, focus\n * trap, inert marks, or document listeners into later spec files sharing\n * the worker.\n */\n ngOnDestroy(): void {\n this.closeAll();\n }\n\n open<TComponent, TResult = unknown, TData = unknown>(\n component: Type<TComponent>,\n config: MkOverlayConfig<TData> = {},\n ): MkOverlayRef<TResult, TComponent> {\n const {\n hasBackdrop = true,\n closeOnBackdropClick = true,\n closeOnEscape = true,\n trapFocus = true,\n autoFocus = true,\n role = 'dialog',\n } = config;\n\n const overlayRef = new MkOverlayRef<TResult, TComponent>();\n\n if (!this.isBrowser) {\n // Nothing to render on the server; return an inert ref.\n return overlayRef;\n }\n\n const container = this.document.createElement('div');\n container.className = 'mk-overlay-container';\n container.style.cssText =\n 'position:fixed;inset:0;z-index:var(--mk-z-overlay,1000);display:flex;align-items:center;justify-content:center;';\n if (!hasBackdrop) {\n // Without a scrim the fullscreen container must not swallow clicks\n // meant for the page; the panel re-enables pointer events for itself.\n container.style.pointerEvents = 'none';\n }\n\n let backdrop: HTMLElement | undefined;\n if (hasBackdrop) {\n backdrop = this.document.createElement('div');\n backdrop.className = 'mk-overlay-backdrop';\n backdrop.style.cssText =\n 'position:absolute;inset:0;background:var(--mk-overlay-scrim,rgba(0,0,0,0.45));animation:mk-overlay-fade var(--mk-duration-fast,140ms) var(--mk-ease-out,ease);';\n container.appendChild(backdrop);\n if (closeOnBackdropClick) {\n backdrop.addEventListener('click', () => overlayRef.close());\n }\n }\n\n const panel = this.document.createElement('div');\n panel.className = 'mk-overlay-panel';\n if (config.panelClass) {\n const classes = Array.isArray(config.panelClass)\n ? config.panelClass\n : [config.panelClass];\n panel.classList.add(...classes);\n }\n panel.style.cssText = 'position:relative;max-width:100%;max-height:100%;';\n if (!hasBackdrop) panel.style.pointerEvents = 'auto';\n panel.setAttribute('role', role);\n panel.setAttribute('aria-modal', role === 'menu' ? 'false' : 'true');\n if (config.ariaLabel) panel.setAttribute('aria-label', config.ariaLabel);\n container.appendChild(panel);\n\n // Create the component with an injector exposing the data + ref.\n const componentRef = createComponent(component, {\n environmentInjector: this.envInjector,\n hostElement: panel,\n elementInjector: Injector.create({\n parent: config.injector ?? this.envInjector,\n providers: [\n { provide: MK_OVERLAY_DATA, useValue: config.data ?? null },\n { provide: MkOverlayRef, useValue: overlayRef },\n ],\n }),\n });\n overlayRef.componentRef = componentRef;\n this.appRef.attachView(componentRef.hostView);\n\n this.overlayRoot().appendChild(container);\n\n // Lock body scroll while any overlay is open (see lockBodyScroll for the\n // iOS-proof fixed-body technique and the reference counting).\n if (this.openOverlays++ === 0) {\n this.lockBodyScroll(this.document);\n }\n\n // Make the rest of the page inert while a MODAL overlay is open —\n // `aria-modal=\"true\"` alone does not stop Tab or a screen reader's\n // reading cursor from reaching background content (WCAG 2.4.3 / 1.3.2).\n // A backdropless overlay is deliberately non-blocking, so it inerts\n // nothing. Only the elements THIS overlay inerted are recorded, so\n // nested modals unwind correctly: the inner dialog skips (and therefore\n // never un-inerts) whatever the outer dialog already inerted.\n const isModal = hasBackdrop && role !== 'menu';\n const inerted: Element[] = [];\n if (isModal) {\n // With a custom MK_OVERLAY_ROOT the container is nested (possibly behind\n // a shadow boundary), so resolve which body child carries it — that one\n // must stay interactive.\n const containerHost = mkBodyLevelAncestor(container, this.document.body);\n for (const sibling of Array.from(this.document.body.children)) {\n if (\n sibling === containerHost ||\n sibling.hasAttribute('inert') ||\n sibling.matches(INERT_EXEMPT_SELECTOR)\n ) {\n continue;\n }\n sibling.setAttribute('inert', '');\n inerted.push(sibling);\n }\n }\n\n // Focus management.\n const focusTrap = trapFocus ? new MkFocusTrap(panel) : undefined;\n // `autoFocus: false` focuses the panel rather than its first control, so\n // the trap still contains Tab and restores focus on close.\n focusTrap?.activate(autoFocus ? undefined : panel);\n\n // Escape handling goes through ONE shared document listener (see\n // `onDocumentEscape`) so stacked overlays close one per keypress,\n // topmost first, and inner widgets can consume Escape before us.\n this.openRefs.set(overlayRef as MkOverlayRef<unknown>, { closeOnEscape });\n this.syncEscapeListener(this.document);\n\n overlayRef._dispose = () => {\n this.openRefs.delete(overlayRef as MkOverlayRef<unknown>);\n this.syncEscapeListener(this.document);\n for (const el of inerted) el.removeAttribute('inert');\n focusTrap?.release();\n // ApplicationRef destroys its views before root-injector destroy hooks\n // run — detaching then would throw (same guard as MkTourService).\n if (!this.appRef.destroyed) this.appRef.detachView(componentRef.hostView);\n componentRef.destroy();\n container.remove();\n if (--this.openOverlays === 0) {\n this.unlockBodyScroll(this.document);\n }\n };\n\n return overlayRef;\n }\n}\n","import {\n AfterViewInit,\n DOCUMENT,\n Directive,\n ElementRef,\n OnDestroy,\n PLATFORM_ID,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { MK_OVERLAY_ROOT } from './overlay-root';\nimport type { MkPlacement } from '../types';\n\n/**\n * The pure positioning maths is delegated to `@mk-kit/core` — the exported\n * names are unchanged.\n */\nexport {\n mkComputeAnchoredPosition,\n type MkAnchoredPosition,\n type MkAnchoredPositionOptions,\n} from '@mk-kit/core';\nimport { mkComputeAnchoredPosition } from '@mk-kit/core';\n\n/**\n * Never shrink a panel below this via the viewport size cap — a sub-120px\n * dropdown is unusable; at that point overflowing beats collapsing.\n */\nconst MIN_SIZE_CAP = 120;\n\n/** The rect shape `mkComputeAnchoredPosition` reads (a `DOMRect` qualifies). */\ninterface MkRectLike {\n top: number;\n left: number;\n right: number;\n bottom: number;\n width: number;\n height: number;\n}\n\n/**\n * Anchored-overlay directive. Apply it to a floating panel element (a dropdown\n * list, calendar, menu, …) that is rendered inside its component's own template\n * — typically inside an `@if (open()) { … }` block. On init the directive\n * **teleports the panel to `document.body` and into the browser top layer** via\n * the native Popover API (`popover=\"manual\"` + `showPopover()`), then positions\n * it against the anchor with `position: fixed`. Because the element stays part\n * of the component's Angular view, all bindings, `@for` content, events and\n * projected content keep working after the move.\n *\n * The top layer is immune to ancestor `overflow`, `transform` and `z-index`\n * stacking contexts, so the panel can never be clipped by a container or hidden\n * behind sibling content. Where the Popover API is unavailable the panel still\n * renders in a `document.body` portal with a `z-index` fallback.\n *\n * ```html\n * <ul #panel mkAnchoredPanel [mkAnchoredPanelFor]=\"trigger\" [matchWidth]=\"true\"\n * (dismiss)=\"close()\"> … </ul>\n * ```\n */\n@Directive({\n selector: '[mkAnchoredPanel]',\n exportAs: 'mkAnchoredPanel',\n})\nexport class MkAnchoredPanel implements AfterViewInit, OnDestroy {\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly document = inject(DOCUMENT);\n private readonly overlayRoot = inject(MK_OVERLAY_ROOT);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n /** The trigger element to position against. */\n readonly anchor = input<HTMLElement | ElementRef<HTMLElement> | undefined>(\n undefined,\n { alias: 'mkAnchoredPanelFor' },\n );\n /** Viewport-point anchor (e.g. a right-click position) — takes precedence. */\n readonly anchorRect = input<{ x: number; y: number } | undefined>(undefined);\n /** Preferred placement relative to the anchor. */\n readonly placement = input<MkPlacement>('bottom-start');\n /** Distance in px between the anchor and the panel. */\n readonly gap = input(4);\n /** Set the panel's `min-width` to the anchor's width (dropdowns). */\n readonly matchWidth = input(false);\n /** Flip to the opposite side when the preferred side would overflow. */\n readonly flip = input(true);\n /** Clamp the panel inside the viewport. */\n readonly clamp = input(true);\n\n /**\n * Predicate consulted before an outside pointerdown dismisses the panel.\n * Return `true` for targets that must keep it open — e.g. a nested panel\n * (a submenu) that lives in the top layer outside this element.\n */\n readonly keepOpenWhen = input<((target: Node) => boolean) | null>(null);\n /** Emitted on an outside pointerdown or when the window loses focus. */\n readonly dismiss = output<void>();\n\n private popover = false;\n /** Whether {@link position} applied an inline viewport size cap (`max-*`). */\n private sizeCapped = false;\n\n private repositionRaf: number | null = null;\n /**\n * Scroll-driven repositions track the anchor without clamping, so the\n * panel follows its trigger instead of detaching and hugging the viewport\n * edge; open/resize positioning clamps as usual.\n */\n private pendingTrack = true;\n /** rAF-coalesced repositioning — at most one layout pass per frame. */\n private reposition(track: boolean): void {\n // A clamped (open/resize) request in the same frame wins over tracking.\n this.pendingTrack &&= track;\n if (this.repositionRaf != null) return;\n this.repositionRaf =\n this.document.defaultView?.requestAnimationFrame(() => {\n this.repositionRaf = null;\n const wasTrack = this.pendingTrack;\n this.pendingTrack = true;\n this.position(wasTrack);\n }) ?? null;\n }\n private readonly onScroll = () => this.reposition(true);\n private readonly onResize = () => this.reposition(false);\n private readonly onDocPointerdown = (e: Event) => {\n const target = e.target as Node;\n if (this.host.nativeElement.contains(target)) return;\n const anchorEl = this.resolveAnchorEl();\n if (anchorEl?.contains(target)) return;\n if (this.keepOpenWhen()?.(target)) return;\n this.dismiss.emit();\n };\n private readonly onWindowBlur = () => this.dismiss.emit();\n\n ngAfterViewInit(): void {\n if (!this.isBrowser) return;\n const el = this.host.nativeElement;\n\n el.style.position = 'fixed';\n el.style.margin = '0';\n el.style.inset = 'auto';\n // setProperty (not .style.zIndex) so the CSS var() value is accepted. Only\n // matters in the no-Popover fallback; the top layer ignores z-index.\n el.style.setProperty('z-index', 'var(--mk-z-menu)');\n\n this.overlayRoot().appendChild(el);\n\n // Promote into the top layer when the Popover API is available.\n const withPopover = el as HTMLElement & {\n showPopover?: () => void;\n hidePopover?: () => void;\n };\n if (typeof withPopover.showPopover === 'function') {\n el.setAttribute('popover', 'manual');\n try {\n withPopover.showPopover();\n this.popover = true;\n } catch {\n // Already open or unsupported context — fall back to the body portal.\n // The attribute must go too: with it left on, the UA sheet's\n // `[popover]:not(:popover-open) { display: none }` hides the panel.\n el.removeAttribute('popover');\n this.popover = false;\n }\n }\n\n this.position();\n\n const view = this.document.defaultView;\n view?.addEventListener('scroll', this.onScroll, {\n capture: true,\n passive: true,\n });\n view?.addEventListener('resize', this.onResize);\n view?.addEventListener('blur', this.onWindowBlur);\n // iOS's software keyboard (and pinch-zoom) resizes/pans only the VISUAL\n // viewport — `window` never fires resize/scroll for it — so listen there\n // too, into the same reposition paths. Feature-detected: jsdom and older\n // browsers have no visualViewport.\n const visual = view?.visualViewport;\n visual?.addEventListener('resize', this.onResize);\n visual?.addEventListener('scroll', this.onScroll);\n this.document.addEventListener('pointerdown', this.onDocPointerdown, true);\n\n // Re-measure once layout has settled (fonts, async content).\n view?.requestAnimationFrame(() => this.position());\n }\n\n /**\n * Recompute and apply the panel position. Safe to call at any time.\n * With `track` (scroll-driven), the panel follows the anchor unclamped and\n * dismisses once the anchor leaves the viewport (matching the CDK's\n * reposition-with-auto-close scroll behaviour).\n */\n position(track = false): void {\n if (!this.isBrowser) return;\n const el = this.host.nativeElement;\n const view = this.document.defaultView;\n if (!view) return;\n\n const anchor = this.resolveAnchorRect();\n if (!anchor) return;\n\n // Prefer the visual viewport when it exists and is measured: on iOS the\n // software keyboard shrinks only `visualViewport`, never the layout\n // viewport, so clamp/flip maths against `documentElement.client*` would\n // keep placing panels underneath the keyboard. Fallback (no visualViewport,\n // or one reporting 0×0 pre-measure) keeps the existing behaviour, including\n // the jsdom \"unmeasured viewport\" guards below.\n const visual = view.visualViewport;\n const useVisual = visual != null && visual.width > 0 && visual.height > 0;\n const vw = useVisual ? visual.width : this.document.documentElement.clientWidth;\n const vh = useVisual ? visual.height : this.document.documentElement.clientHeight;\n\n // Anchor scrolled fully out of view — the panel would float detached.\n // Zero-size anchor rects and a zero-size viewport are skipped: they mean\n // \"not yet measured\" (jsdom, SSR hydration), not \"off-screen\".\n if (\n track &&\n !this.anchorRect() &&\n vw > 0 &&\n vh > 0 &&\n (anchor.width > 0 || anchor.height > 0) &&\n (anchor.bottom <= 0 || anchor.top >= vh || anchor.right <= 0 || anchor.left >= vw)\n ) {\n this.dismiss.emit();\n return;\n }\n\n if (this.matchWidth() && anchor.width > 0) {\n el.style.minWidth = `${Math.round(anchor.width)}px`;\n }\n\n const gap = this.gap();\n\n // Viewport size cap: a panel wider or taller than the screen (a fat menu\n // on a 360px phone) gets an inline `max-width`/`max-height` so it scrolls\n // internally instead of overflowing. An inline max-* OVERRIDES any\n // stylesheet max (e.g. a select list's own 16rem max-height), so the cap\n // is applied only when the panel's NATURAL size exceeds it — it never\n // enlarges a panel that already limits itself. A previously applied cap is\n // cleared first so the natural size is re-measured against the current\n // viewport. Scroll-tracking frames skip all of this: the viewport has not\n // resized mid-scroll, and clearing/re-measuring would force two extra\n // reflows per frame.\n if (!track && this.sizeCapped) {\n el.style.removeProperty('max-width');\n el.style.removeProperty('max-height');\n this.sizeCapped = false;\n }\n let rect = el.getBoundingClientRect();\n if (!track && vw > 0 && vh > 0) {\n const capW = Math.max(MIN_SIZE_CAP, Math.floor(vw - 2 * gap));\n const capH = Math.max(MIN_SIZE_CAP, Math.floor(vh - 2 * gap));\n const capWidth = rect.width > capW;\n const capHeight = rect.height > capH;\n if (capWidth) el.style.maxWidth = `${capW}px`;\n if (capHeight) el.style.maxHeight = `${capH}px`;\n if (capWidth || capHeight) {\n this.sizeCapped = true;\n rect = el.getBoundingClientRect();\n }\n }\n\n const pos = mkComputeAnchoredPosition(\n anchor,\n { width: rect.width, height: rect.height },\n { width: vw, height: vh },\n {\n placement: this.placement(),\n gap,\n flip: this.flip(),\n clamp: this.clamp() && !track,\n rtl: this.isAnchorRtl(),\n },\n );\n el.style.top = `${pos.top}px`;\n el.style.left = `${pos.left}px`;\n el.setAttribute('data-placement', pos.placement);\n }\n\n /** Whether the anchor renders in a right-to-left context. */\n private isAnchorRtl(): boolean {\n const el = this.resolveAnchorEl();\n const view = this.document.defaultView;\n if (!el || !view) return false;\n return view.getComputedStyle(el).direction === 'rtl';\n }\n\n private resolveAnchorEl(): HTMLElement | null {\n const a = this.anchor();\n if (!a) return null;\n return a instanceof ElementRef ? a.nativeElement : a;\n }\n\n private resolveAnchorRect(): MkRectLike | null {\n const point = this.anchorRect();\n if (point) {\n return {\n top: point.y,\n left: point.x,\n right: point.x,\n bottom: point.y,\n width: 0,\n height: 0,\n };\n }\n return this.resolveAnchorEl()?.getBoundingClientRect() ?? null;\n }\n\n ngOnDestroy(): void {\n if (!this.isBrowser) return;\n const el = this.host.nativeElement;\n const view = this.document.defaultView;\n if (this.repositionRaf != null) {\n view?.cancelAnimationFrame(this.repositionRaf);\n this.repositionRaf = null;\n }\n view?.removeEventListener('scroll', this.onScroll, true);\n view?.removeEventListener('resize', this.onResize);\n view?.removeEventListener('blur', this.onWindowBlur);\n const visual = view?.visualViewport;\n visual?.removeEventListener('resize', this.onResize);\n visual?.removeEventListener('scroll', this.onScroll);\n this.document.removeEventListener('pointerdown', this.onDocPointerdown, true);\n\n const withPopover = el as HTMLElement & { hidePopover?: () => void };\n if (this.popover && typeof withPopover.hidePopover === 'function') {\n try {\n withPopover.hidePopover();\n } catch {\n // Ignore — the element may already be disconnected.\n }\n el.removeAttribute('popover');\n }\n\n // Remove the teleported node ourselves. It was moved out of the component's\n // view into `document.body`, so Angular's view teardown removes it by\n // reference (`node.remove()`); re-inserting it anywhere would orphan a\n // detached copy, leaking one panel per open/close cycle. A plain remove is\n // idempotent whichever teardown step runs first.\n el.remove();\n }\n}\n","import { InjectionToken, type Provider } from '@angular/core';\n\n/** Direction passed to the sort announcer. */\nexport type MkSortAnnounceDirection = 'asc' | 'desc';\n\n/**\n * Localised date-name tables consumed by the calendar, the date/month/week\n * pickers and `formatDate`. All arrays are full-length (12 months, 7 weekdays\n * starting with Sunday) — override the whole set for a locale.\n */\nexport type { MkDateNames } from '@mk-kit/core';\nimport type { MkDateNames } from '@mk-kit/core';\n\n/** Strings used by the block editor's chrome. */\nexport interface MkBlockEditorStrings {\n addBlock: string;\n addFirstBlock: string;\n insertBlockHere: string;\n blockInserter: string;\n searchBlocks: string;\n blocks: string;\n moveBlockUp: string;\n moveBlockDown: string;\n blockOptions: string;\n duplicate: string;\n remove: string;\n textFormatting: string;\n altText: string;\n caption: string;\n alignment: string;\n replaceImage: string;\n imageUrl: string;\n externalContent: string;\n embedUrl: string;\n columnSettings: string;\n columns: string;\n ratio: string;\n gap: string;\n align: string;\n justify: string;\n headingLevel: (level: number) => string;\n /** Editor region label + empty-block placeholder defaults. */\n editorLabel: string;\n emptyBlockPlaceholder: string;\n /** Drag handle tooltip. */\n dragHandle: string;\n /** \"Turn into …\" transform menu item; receives the target block's label. */\n turnInto: (label: string) => string;\n /** Shown for a block whose type has no registered definition. */\n unknownBlock: (type: string) => string;\n /** Structural-change screen-reader announcements. */\n blockAdded: (label: string) => string;\n blockDuplicated: string;\n blockDeleted: (label: string) => string;\n blockMovedUp: string;\n blockMovedDown: string;\n turnedInto: (label: string) => string;\n /** Inserter empty state; receives the search query. */\n noBlocksMatch: (query: string) => string;\n /** Built-in palette group headings. */\n groupText: string;\n groupMedia: string;\n groupLayout: string;\n /** Built-in block labels + inserter descriptions. */\n blockParagraph: string;\n blockParagraphDesc: string;\n blockHeading: string;\n blockHeadingDesc: string;\n blockList: string;\n blockListDesc: string;\n blockQuote: string;\n blockQuoteDesc: string;\n blockCode: string;\n blockCodeDesc: string;\n blockImage: string;\n blockImageDesc: string;\n blockEmbed: string;\n blockEmbedDesc: string;\n blockButton: string;\n blockButtonDesc: string;\n blockDivider: string;\n blockDividerDesc: string;\n blockColumns: string;\n blockColumnsDesc: string;\n /** Rich-text inline toolbar. */\n bold: string;\n italic: string;\n underline: string;\n strikethrough: string;\n inlineCode: string;\n link: string;\n clearFormatting: string;\n /** Prompt asking for a link URL. */\n linkUrlPrompt: string;\n /** Default label of the editable rich-text region. */\n editableText: string;\n /** Heading block. */\n headingPlaceholder: (level: number) => string;\n headingLevelGroup: string;\n /** List block. */\n listStyle: string;\n bulleted: string;\n numbered: string;\n listItem: string;\n /** Quote block. */\n quoteText: string;\n citation: string;\n addCitation: string;\n /** Code block. */\n codeLanguage: string;\n codeLanguagePlaceholder: string;\n enterCode: string;\n /** Image block. */\n imageWidth: (percent: number) => string;\n uploading: string;\n dropImagePrompt: string;\n chooseFile: string;\n pasteImageUrl: string;\n notAnImage: string;\n uploadFailed: string;\n imageAdded: string;\n /** Embed block. */\n pasteEmbedUrl: string;\n embedFallbackNote: string;\n embedTitle: (provider: string) => string;\n embedAdded: (provider: string) => string;\n embeddedContent: string;\n /** Button block settings. */\n buttonLabel: string;\n buttonLink: string;\n buttonTone: string;\n buttonVariant: string;\n /** Label a freshly inserted Button block starts with. */\n buttonDefaultLabel: string;\n /** Alignment option captions (image + button blocks). */\n alignLeft: string;\n alignCenter: string;\n alignRight: string;\n /** Tone option captions (button block swatches). */\n tonePrimary: string;\n toneNeutral: string;\n toneSuccess: string;\n toneWarning: string;\n toneDanger: string;\n toneInfo: string;\n /** Variant option captions (button block). */\n variantSolid: string;\n variantSoft: string;\n variantOutline: string;\n /** Columns settings option captions. */\n ratioEqual: string;\n alignStretch: string;\n alignTop: string;\n alignMiddle: string;\n alignBottom: string;\n justifyStart: string;\n justifyCenter: string;\n justifyEnd: string;\n justifyBetween: string;\n}\n\n/**\n * Messages rendered by `mk-form-field` for the validation errors the library's\n * own controls produce, plus the standard Angular `Validators` keys, so a\n * field wrapping any control shows something sensible without per-form wiring.\n *\n * Keys match the `ValidationErrors` keys exactly and each entry receives that\n * key's error payload. Override any subset through\n * `provideMkI18n({ validation: … })`, or a whole map per field via\n * `mk-form-field`'s `errorMessages` input.\n */\nexport interface MkValidationStrings {\n /** `Validators.required` — also emitted by checkbox and radio-group. */\n required: string;\n /** `Validators.email`. */\n email: string;\n /** `Validators.min`, and the numeric controls' `[min]`. */\n min: (err: { min: number; actual: number }) => string;\n /** `Validators.max`, and the numeric controls' `[max]`. */\n max: (err: { max: number; actual: number }) => string;\n /** `Validators.minLength` — also emitted by password-input and OTP. */\n minlength: (err: { requiredLength: number; actualLength: number }) => string;\n /** `Validators.maxLength`. */\n maxlength: (err: { requiredLength: number; actualLength: number }) => string;\n /** `Validators.pattern`. */\n pattern: string;\n /** A date/month/week picker's `[min]`. */\n mkMinDate: (err: { min: Date; actual: Date }) => string;\n /** A date/month/week picker's `[max]`. */\n mkMaxDate: (err: { max: Date; actual: Date }) => string;\n /** A date rejected by a calendar's `[disabledDate]` predicate. */\n mkDateFilter: string;\n /** A range picker with only one end filled in. */\n mkDateRangeIncomplete: string;\n /** The time-picker's `[min]`. */\n mkMinTime: (err: { min: string; actual: string }) => string;\n /** The time-picker's `[max]`. */\n mkMaxTime: (err: { max: string; actual: string }) => string;\n /** More items than a multi-select's, tag-input's or upload's `[max*]` allows. */\n mkMaxItems: (err: { max: number; actual: number }) => string;\n /** A file larger than a file-upload's `[maxSize]`. */\n mkFileSize: (err: { max: number; maxLabel: string; name: string }) => string;\n /** A file not matching a file-upload's `[accept]` filter. */\n mkFileType: (err: { accept: string; name: string }) => string;\n /** A card number failing the Luhn checksum. */\n cardNumber: string;\n /** An IBAN failing the mod-97 checksum. */\n iban: (err: { country: string; expectedLength: number | null }) => string;\n /** A postal code not matching the country's format. */\n postalCode: (err: { country: string; example: string }) => string;\n /** A tax identifier not matching the country's format or checksum. */\n taxId: (err: { country: string; label: string; example: string }) => string;\n /** Fallback for an error key with no message of its own. */\n unknown: string;\n}\n\n/**\n * All user-facing strings the library renders itself (aria-labels, empty-state\n * text, control captions and screen-reader announcements). Consumers localise\n * the library by overriding any subset via {@link provideMkI18n}. Interpolated\n * strings are functions so translators control word order.\n */\nexport interface MkI18nStrings {\n // --- Locale ---------------------------------------------------------------\n /**\n * BCP 47 locale tag (`'pl-PL'`, `'de'`) used by the formatting pipes\n * (`mkCurrency`, `mkRelativeTime`, `mkFileSize`, `mkPluralize`) and any\n * other `Intl`-based formatting that has no explicit locale of its own.\n * Unset → the runtime (browser / Node) default locale.\n */\n locale?: string;\n /**\n * ISO 4217 currency code the `mkCurrency` pipe falls back to when the\n * template passes none. Unset → `'USD'`.\n */\n currency?: string;\n\n // --- Validation -----------------------------------------------------------\n /** Validation messages (deep-merged by provideMkI18n). */\n validation: MkValidationStrings;\n\n // --- Generic controls -----------------------------------------------------\n /** Generic \"Close\" control (dialog, drawer, bottom-sheet). */\n close: string;\n /** Generic \"Dismiss\" control (alert, banner, toast, snackbar). */\n dismiss: string;\n /** Clear-input control (autocomplete, pickers, tag inputs). */\n clear: string;\n /** Generic confirm action (confirm dialog, popconfirm). */\n confirm: string;\n /** Generic cancel action (dialogs, inline edit). */\n cancel: string;\n /** Generic acknowledge action (alert/prompt dialogs). */\n ok: string;\n /** Generic save action (inline edit). */\n save: string;\n /** Default action-button caption (submit input). */\n submit: string;\n /** Generic edit affordance (inline edit trigger). */\n edit: string;\n /** Generic remove control (chip). */\n remove: string;\n /** Remove a named item (tag input chips, file upload rows). */\n removeItem: (name: string) => string;\n /** Placeholder shown for an empty editable value (inline edit, mini date). */\n empty: string;\n /** \"Optional\" marker (stepper). */\n optional: string;\n /** Filter/search field placeholder (transfer list). */\n filter: string;\n /** Default confirmation question (popconfirm). */\n confirmMessage: string;\n /** Decrease control (number input). */\n decrease: string;\n /** Increase control (number input). */\n increase: string;\n\n // --- Async / empty states ---------------------------------------------------\n /** Async loading row (autocomplete, multi-select). */\n loading: string;\n /** Empty listbox with no options (select, time picker). */\n noOptions: string;\n /** Empty async/filtered results (autocomplete, multi-select, command palette). */\n noResults: string;\n /** Empty data table / list. */\n noData: string;\n /** Announced when a filterable list updates (autocomplete, multi-select, command palette). */\n resultsCount: (count: number) => string;\n\n // --- Pagination / carousel ---------------------------------------------------\n /** Pagination: previous page control. */\n previousPage: string;\n /** Pagination: next page control. */\n nextPage: string;\n /** Pagination: jump to a page. */\n goToPage: (page: number) => string;\n /** Pagination landmark label. */\n paginationLabel: string;\n /** Carousel: previous slide control. */\n previousSlide: string;\n /** Carousel: next slide control. */\n nextSlide: string;\n /** Carousel: jump to a slide. */\n goToSlide: (slide: number) => string;\n /** Carousel region label. */\n carouselLabel: string;\n /** Carousel: pause / resume automatic rotation. */\n pauseSlideshow: string;\n playSlideshow: string;\n /** Carousel: slide position (slide labels + live announcements). */\n slideOf: (slide: number, total: number) => string;\n\n // --- Dates & pickers ---------------------------------------------------------\n /** Localised month/weekday name tables (deep-merged by provideMkI18n). */\n dateNames: MkDateNames;\n /** Calendar: previous month control. */\n previousMonth: string;\n /** Calendar: next month control. */\n nextMonth: string;\n /** Month picker: previous/next year (month mode). */\n previousYear: string;\n nextYear: string;\n /** Month picker: previous/next decade page (year mode). */\n previousYears: string;\n nextYears: string;\n /** Field placeholders. */\n selectDate: string;\n selectRange: string;\n selectTime: string;\n selectMonth: string;\n selectYear: string;\n selectWeek: string;\n selectPlaceholder: string;\n /** Popover dialog labels. */\n chooseDate: string;\n chooseDateRange: string;\n chooseMonth: string;\n chooseYear: string;\n chooseWeek: string;\n openCalendar: string;\n openTimeList: string;\n /** Accessible name of the chevron segment of `mk-split-button`. */\n moreActions: string;\n /** Placeholder of `mk-datetime-picker`. */\n selectDateTime: string;\n /** Dialog label of the `mk-datetime-picker` panel. */\n chooseDateTime: string;\n /** Listbox label of the time list inside `mk-datetime-picker`. */\n chooseTime: string;\n /** Toggle-button label of `mk-datetime-picker`. */\n openDateTimePicker: string;\n /** Mini-date segment names. */\n daySegment: string;\n monthSegment: string;\n yearSegment: string;\n /** Countdown unit captions. */\n countdownDays: string;\n countdownHours: string;\n countdownMinutes: string;\n countdownSeconds: string;\n /** Announced when a countdown reaches zero. */\n countdownFinished: string;\n /** Event-calendar day label suffix, e.g. `2 events: Standup, Demo`. */\n dayEvents: (count: number, titles: string) => string;\n /** Event-calendar overflow pill for events beyond `maxPerDay`, e.g. `+2 more`. */\n moreEvents: (count: number) => string;\n\n // --- Table / data grid ---------------------------------------------------------\n /** Select-all header checkbox. */\n selectAllRows: string;\n /** Per-row checkbox; receives the row's leading cell text. */\n selectRow: (row: string) => string;\n /** Hidden expander column header. */\n expandHeader: string;\n /** Row expander toggle labels. */\n expandRow: string;\n collapseRow: string;\n /** Tree-row toggle labels (`childrenKey`). */\n expandTreeRow: string;\n collapseTreeRow: string;\n /** aria-label of a group header's toggle when the group is collapsed. */\n expandGroup: string;\n /** aria-label of a group header's toggle when the group is expanded. */\n collapseGroup: string;\n /** Row count shown on a group header, e.g. \"4 items\". */\n groupCount: (count: number) => string;\n /** Column resize separator label. */\n resizeColumn: string;\n /** Announced while a column is resized by keyboard. */\n columnWidth: (column: string, width: number) => string;\n /** Announced when a column is reordered. */\n columnMoved: (column: string, position: number, total: number) => string;\n /** Hint suffix + announcement for editable cells. */\n editCell: string;\n cellSaved: (value: string) => string;\n /** Announced when a column is sorted. */\n sortedBy: (column: string, direction: MkSortAnnounceDirection) => string;\n /** Announced when sorting is removed from a column. */\n sortingCleared: (column: string) => string;\n\n // --- Forms -----------------------------------------------------------------\n /** Password reveal toggle. */\n showPassword: string;\n hidePassword: string;\n /** Password rule captions. */\n passwordRuleMinLength: (length: number) => string;\n passwordRuleUppercase: string;\n passwordRuleNumber: string;\n passwordRuleSymbol: string;\n /** Password strength label for a 0–4 score. */\n passwordStrength: (score: number) => string;\n /** Visible prefix before the strength label. */\n passwordStrengthLabel: string;\n /** Rule-state prefixes announced to screen readers. */\n ruleMet: string;\n ruleNotMet: string;\n /** OTP field labels. */\n oneTimeCode: string;\n otpDigit: (position: number) => string;\n /** Numeric keypad labels + masked-PIN progress announcement. */\n numericKeypadLabel: string;\n keypadClear: string;\n keypadBackspace: string;\n keypadDigitsEntered: (count: number, length: number) => string;\n /** On-screen keyboard label + action-key labels. */\n onScreenKeyboardLabel: string;\n keyboardShift: string;\n keyboardSpace: string;\n keyboardEnter: string;\n keyboardAltLayer: string;\n keyboardBaseLayer: string;\n /** Rating slider label + value text. */\n ratingLabel: string;\n ratingValueText: (value: number, max: number) => string;\n /** Range slider thumb labels. */\n minimum: string;\n maximum: string;\n /** Color picker labels. */\n chooseColor: string;\n hexValue: string;\n presetColors: string;\n /** Phone input: country-prefix trigger label. */\n chooseCountry: string;\n /** Phone input: search field placeholder inside the country list. */\n searchCountries: string;\n /** Phone input: default accessible label of the national-number field. */\n phoneNumber: string;\n /** Postal-code input: default accessible label. */\n postalCode: string;\n /** Currency input: default accessible label. */\n amount: string;\n /** Card-number input: default accessible label. */\n cardNumber: string;\n /** Card-number input: announced/badge text for a detected brand. */\n cardBrand: (brand: string) => string;\n /** IBAN input: default accessible label. */\n iban: string;\n /** Tax-ID input: default accessible label. */\n taxId: string;\n /** Signature pad: default accessible label of the drawing surface. */\n signature: string;\n /** JSON viewer: default accessible label of the tree. */\n jsonLabel: string;\n\n // --- Log viewer -------------------------------------------------------------\n /** Log viewer: default accessible label of the log region. */\n logViewerLabel: string;\n /** Log viewer: re-attach-to-tail button. */\n logFollow: string;\n /** Log viewer: copy-the-whole-buffer toolbar button. */\n logCopyAll: string;\n /** Log viewer: soft-wrap toolbar toggle. */\n logWrapLines: string;\n\n // --- Org chart --------------------------------------------------------------\n /** Org chart: default accessible label of the tree. */\n orgChartLabel: string;\n /** Org chart: aria-label of a collapsed node's toggle (`{label}` = node label). */\n orgChartExpand: string;\n /** Org chart: aria-label of an expanded node's toggle (`{label}` = node label). */\n orgChartCollapse: string;\n\n // --- Chat -------------------------------------------------------------------\n /** Chat: accessible name of the message log. */\n chatLabel: string;\n /** Chat: accessible name of the composer textarea. */\n chatComposerLabel: string;\n /** Chat: composer placeholder. */\n chatPlaceholder: string;\n /** Chat: send button. */\n chatSend: string;\n /** Chat: stop-generating button (replaces send while busy). */\n chatStop: string;\n /** Chat: attach-files button. */\n chatAttach: string;\n /** Chat: remove one pending attachment. */\n chatRemoveAttachment: string;\n /** Chat: group label of pending / shown attachments. */\n chatAttachments: string;\n /** Chat: group label of quick-reply suggestions. */\n chatSuggestions: string;\n /** Chat: copy-message button. */\n chatCopy: string;\n /** Chat: retry a failed message. */\n chatRetry: string;\n /** Chat: typing indicator. */\n chatTyping: string;\n /** Chat: screen-reader text while a reply streams in. */\n chatStreaming: string;\n /** Chat: scroll-to-newest button. */\n chatJumpToLatest: string;\n /** Chat: empty-state text. */\n chatEmpty: string;\n /** Chat: author fallback for the user's own messages. */\n chatYou: string;\n /** Chat: author fallback for assistant messages. */\n chatAssistant: string;\n /** Chat: tool call in progress. */\n chatToolRunning: string;\n /** Chat: tool call finished. */\n chatToolDone: string;\n /** Chat: tool call failed. */\n chatToolError: string;\n\n // --- Dynamic form -----------------------------------------------------------\n /** Dynamic form: add an item to an array field. */\n dynamicFormAdd: string;\n /** Dynamic form: remove one item of an array field (index is 1-based). */\n dynamicFormRemove: (index: number) => string;\n\n // --- Query builder ----------------------------------------------------------\n /** Query builder: accessible name of the whole builder. */\n queryBuilderLabel: string;\n queryAddRule: string;\n queryAddGroup: string;\n queryRemoveRule: string;\n queryRemoveGroup: string;\n /** Combinator labels — also used by `mkQueryToText`. */\n queryAnd: string;\n queryOr: string;\n queryNot: string;\n queryField: string;\n queryOperator: string;\n queryValue: string;\n queryValueFrom: string;\n queryValueTo: string;\n queryEmptyGroup: string;\n queryTrue: string;\n queryFalse: string;\n queryOpEq: string;\n queryOpNeq: string;\n queryOpContains: string;\n queryOpNotContains: string;\n queryOpStartsWith: string;\n queryOpEndsWith: string;\n queryOpGt: string;\n queryOpGte: string;\n queryOpLt: string;\n queryOpLte: string;\n queryOpBetween: string;\n queryOpIn: string;\n queryOpNotIn: string;\n queryOpBefore: string;\n queryOpAfter: string;\n queryOpEmpty: string;\n queryOpNotEmpty: string;\n\n // --- Dialog drag / resize ---------------------------------------------------\n /** Dialog: label of the move grip (arrow keys move, Home resets). */\n dialogMove: string;\n /** Dialog: label of the resize grip (arrow keys resize, Home resets). */\n dialogResize: string;\n\n // --- Listbox ----------------------------------------------------------------\n /** Listbox: filter box placeholder / label. */\n listboxFilter: string;\n /** Listbox: shown when the filter matches nothing. */\n listboxEmpty: string;\n\n // --- Event calendar editing --------------------------------------------------\n /** Announced when an event is picked up in keyboard move mode. */\n eventCalendarGrabbed: (title: string, from: string, to: string) => string;\n /** Announced after each keyboard step: current day + time range. */\n eventCalendarPosition: (\n title: string,\n day: string,\n from: string,\n to: string,\n ) => string;\n /** Announced when a move commits. */\n eventCalendarMoved: (\n title: string,\n day: string,\n from: string,\n to: string,\n ) => string;\n /** Announced when a resize commits. */\n eventCalendarResized: (title: string, to: string) => string;\n /** Announced when an edit is aborted. */\n eventCalendarEditCancelled: string;\n /** `aria-roledescription` of an editable event pill. */\n eventCalendarMovableEvent: string;\n\n // --- Media -----------------------------------------------------------------\n /** Lightbox / gallery: previous-image control. */\n previousImage: string;\n /** Lightbox / gallery: next-image control. */\n nextImage: string;\n /** Lightbox counter + per-image aria label, e.g. `Image 2 of 8`. */\n imageOf: (index: number, total: number) => string;\n /** Gallery tile label; receives the image's alt text. */\n viewImage: (alt: string) => string;\n /** Shown in an image block whose source failed to load. */\n imageFailed: string;\n /** Cropper zoom controls. */\n zoom: string;\n zoomIn: string;\n zoomOut: string;\n /** Media gallery region label. */\n mediaLibrary: string;\n /** File upload dropzone + states. */\n dropzoneLabel: string;\n uploadFailed: string;\n retryUpload: string;\n /** Form error summary heading. */\n errorSummaryTitle: string;\n\n // --- Transfer list -----------------------------------------------------------\n /** Default column titles. */\n available: string;\n selected: string;\n /** Move-button labels; receive the target list's title. */\n transferSelected: (target: string) => string;\n transferAll: (target: string) => string;\n /** Announced after a move. */\n itemsMoved: (count: number, target: string) => string;\n\n // --- Notifications / tour ------------------------------------------------------\n notificationsTitle: string;\n allCaughtUp: string;\n markAllRead: string;\n notificationsUnread: (count: number) => string;\n /** Unread state announced per row. */\n unread: string;\n tourStepOf: (step: number, total: number) => string;\n tourSkip: string;\n tourPrevious: string;\n tourNext: string;\n tourDone: string;\n\n // --- Misc components -------------------------------------------------------\n /** Command palette input placeholder. */\n commandPalettePlaceholder: string;\n /** Command palette dialog label. */\n commandPaletteLabel: string;\n /** Stepper: step state, appended to the step's accessible name. */\n stepCompleted: string;\n stepError: string;\n /** Diff: screen-reader prefix for changed lines. */\n diffAddedLine: string;\n diffRemovedLine: string;\n /** Chip collections (tag input, multi-select): announced on add/remove. */\n itemAdded: (name: string) => string;\n itemRemoved: (name: string) => string;\n /** Splitter separator label. */\n resizePanes: string;\n /** Back-to-top button label. */\n backToTop: string;\n /** Breadcrumb nav landmark label. */\n breadcrumbLabel: string;\n /** FAB default label. */\n fabLabel: string;\n /** Diff view labels. */\n diffBefore: string;\n diffAfter: string;\n diffChanges: string;\n /** App shell. */\n skipToContent: string;\n primaryNav: string;\n\n // --- Drag & drop announcements --------------------------------------------------\n /** Announced when an item is lifted for keyboard dragging. */\n dndPickedUp: (position: number, total: number) => string;\n /** Announced as the item moves within its list. */\n dndMoved: (position: number, total: number) => string;\n /** Announced as the item moves into another list. */\n dndMovedToList: (list: string, position: number, total: number) => string;\n /** Announced when the item is dropped. */\n dndDropped: (position: number) => string;\n /** Announced when the drag is cancelled. */\n dndCancelled: string;\n\n // --- Repeater ---------------------------------------------------------------------\n /** Repeater add-row button caption (default when no `addLabel` is given). */\n repeaterAddRow: string;\n /** Repeater per-row remove button label (1-based row number). */\n repeaterRemoveRow: (index: number) => string;\n /** Repeater per-row drag-handle label (1-based row number). */\n repeaterReorderRow: (index: number) => string;\n /** Announced after a repeater row is reordered (1-based positions). */\n repeaterRowMoved: (from: number, to: number) => string;\n\n // --- File upload rejection reasons ------------------------------------------------\n fileRejectedType: (name: string) => string;\n fileRejectedSize: (name: string, limit: string) => string;\n fileRejectedCount: (name: string, max: number) => string;\n\n // --- Chart screen-reader table headers ---------------------------------------\n chartCategory: string;\n chartValue: string;\n chartSeries: string;\n chartSlice: string;\n chartStage: string;\n chartConversion: string;\n chartAxis: string;\n chartShare: string;\n chartLabel: string;\n\n // --- QR code -------------------------------------------------------------------\n /** Default accessible label of a QR code, carrying its encoded content. */\n qrCodeLabel: (text: string) => string;\n\n // --- Sortable list --------------------------------------------------------\n /** Default accessible name of `mk-sortable-list` when no `label` is given. */\n sortableListLabel: string;\n // --- Table filter row --------------------------------------------------------\n /** Table filter row: accessible name of a column's filter control. */\n filterColumn: (column: string) => string;\n /** Table filter row: the per-control clear (×) button. */\n clearFilter: (column: string) => string;\n /** Table filter row: the \"no filter\" option of a select filter. */\n filterAny: string;\n /** Table filter row: placeholder of a number / date filter (matches values ≥ the entry). */\n filterMin: string;\n\n // --- Block editor -------------------------------------------------------------\n /** Block editor chrome (deep-merged by provideMkI18n). */\n blockEditor: MkBlockEditorStrings;\n}\n\n/** The built-in English validation messages. */\nexport const MK_DEFAULT_VALIDATION: MkValidationStrings = {\n required: 'This field is required',\n email: 'Enter a valid email address',\n min: ({ min }) => `Must be ${min} or more`,\n max: ({ max }) => `Must be ${max} or less`,\n minlength: ({ requiredLength }) =>\n `Must be at least ${requiredLength} characters`,\n maxlength: ({ requiredLength }) =>\n `Must be at most ${requiredLength} characters`,\n pattern: 'Enter a value in the expected format',\n mkMinDate: ({ min }) => `Must be on or after ${min.toLocaleDateString()}`,\n mkMaxDate: ({ max }) => `Must be on or before ${max.toLocaleDateString()}`,\n mkDateFilter: 'This date is not available',\n mkDateRangeIncomplete: 'Select both a start and an end date',\n mkMinTime: ({ min }) => `Must be at or after ${min}`,\n mkMaxTime: ({ max }) => `Must be at or before ${max}`,\n mkMaxItems: ({ max }) =>\n `Select at most ${max} ${max === 1 ? 'item' : 'items'}`,\n mkFileSize: ({ name, maxLabel }) => `${name} is larger than ${maxLabel}`,\n mkFileType: ({ name }) => `${name} is not an accepted file type`,\n cardNumber: 'Enter a valid card number',\n iban: ({ expectedLength }) =>\n expectedLength\n ? `Enter a valid IBAN (${expectedLength} characters)`\n : 'Enter a valid IBAN',\n postalCode: ({ example }) => `Enter a valid postal code, e.g. ${example}`,\n taxId: ({ label, example }) => `Enter a valid ${label}, e.g. ${example}`,\n unknown: 'This value is not valid',\n};\n\n/** The built-in English date names. */\nexport const MK_DEFAULT_DATE_NAMES: MkDateNames = {\n months: [\n 'January', 'February', 'March', 'April', 'May', 'June',\n 'July', 'August', 'September', 'October', 'November', 'December',\n ],\n monthsShort: [\n 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',\n 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec',\n ],\n weekdays: [\n 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday',\n ],\n weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n weekdaysNarrow: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n};\n\nconst PASSWORD_STRENGTH_LABELS = ['Weak', 'Weak', 'Fair', 'Good', 'Strong'];\n\n/** The built-in English strings. */\nexport const MK_DEFAULT_I18N: MkI18nStrings = {\n validation: MK_DEFAULT_VALIDATION,\n\n close: 'Close',\n dismiss: 'Dismiss',\n clear: 'Clear',\n confirm: 'Confirm',\n cancel: 'Cancel',\n ok: 'OK',\n save: 'Save',\n submit: 'Submit',\n edit: 'Edit',\n remove: 'Remove',\n removeItem: (name) => `Remove ${name}`,\n empty: 'Empty',\n optional: 'Optional',\n filter: 'Filter…',\n confirmMessage: 'Are you sure?',\n decrease: 'Decrease',\n increase: 'Increase',\n\n loading: 'Loading…',\n noOptions: 'No options',\n noResults: 'No results',\n noData: 'No data to display',\n resultsCount: (count) => (count === 1 ? '1 result' : `${count} results`),\n\n previousPage: 'Go to previous page',\n nextPage: 'Go to next page',\n goToPage: (page) => `Go to page ${page}`,\n paginationLabel: 'Pagination',\n previousSlide: 'Previous slide',\n nextSlide: 'Next slide',\n goToSlide: (slide) => `Go to slide ${slide}`,\n carouselLabel: 'Carousel',\n pauseSlideshow: 'Pause slideshow',\n playSlideshow: 'Play slideshow',\n slideOf: (slide, total) => `Slide ${slide} of ${total}`,\n\n dateNames: MK_DEFAULT_DATE_NAMES,\n previousMonth: 'Previous month',\n nextMonth: 'Next month',\n previousYear: 'Previous year',\n nextYear: 'Next year',\n previousYears: 'Previous years',\n nextYears: 'Next years',\n selectDate: 'Select date…',\n selectRange: 'Select range…',\n selectTime: 'Select time…',\n selectMonth: 'Select month…',\n selectYear: 'Select year…',\n selectWeek: 'Select week…',\n selectPlaceholder: 'Select…',\n chooseDate: 'Choose date',\n chooseDateRange: 'Choose date range',\n chooseMonth: 'Choose month',\n chooseYear: 'Choose year',\n chooseWeek: 'Choose week',\n openCalendar: 'Open calendar',\n openTimeList: 'Open time list',\n moreActions: 'More actions',\n selectDateTime: 'Select date and time…',\n chooseDateTime: 'Choose date and time',\n chooseTime: 'Choose time',\n openDateTimePicker: 'Open date and time picker',\n daySegment: 'Day',\n monthSegment: 'Month',\n yearSegment: 'Year',\n countdownDays: 'days',\n countdownHours: 'hrs',\n countdownMinutes: 'min',\n countdownSeconds: 'sec',\n countdownFinished: 'Finished',\n dayEvents: (count, titles) =>\n `${count} ${count === 1 ? 'event' : 'events'}${titles ? `: ${titles}` : ''}`,\n moreEvents: (count) => `+${count} more`,\n\n selectAllRows: 'Select all rows',\n selectRow: (row) => (row ? `Select row ${row}` : 'Select row'),\n expandHeader: 'Expand',\n expandRow: 'Expand row',\n collapseRow: 'Collapse row',\n expandTreeRow: 'Show child rows',\n collapseTreeRow: 'Hide child rows',\n expandGroup: 'Expand group',\n collapseGroup: 'Collapse group',\n groupCount: (count) => `${count} item${count === 1 ? '' : 's'}`,\n resizeColumn: 'Resize column',\n columnWidth: (column, width) => `${column} column width ${width} pixels`,\n columnMoved: (column, position, total) =>\n `${column} moved to position ${position} of ${total}`,\n editCell: 'Press Enter to edit',\n cellSaved: (value) => `Saved ${value}`,\n sortedBy: (column, direction) =>\n `Sorted by ${column} ${direction === 'asc' ? 'ascending' : 'descending'}`,\n sortingCleared: (column) => `Sorting cleared on ${column}`,\n\n showPassword: 'Show password',\n hidePassword: 'Hide password',\n passwordRuleMinLength: (length) => `At least ${length} characters`,\n passwordRuleUppercase: 'An uppercase letter',\n passwordRuleNumber: 'A number',\n passwordRuleSymbol: 'A symbol',\n passwordStrength: (score) =>\n PASSWORD_STRENGTH_LABELS[Math.max(0, Math.min(4, score))],\n passwordStrengthLabel: 'Password strength:',\n ruleMet: 'Met:',\n ruleNotMet: 'Not met:',\n oneTimeCode: 'One-time code',\n otpDigit: (position) => `Digit ${position}`,\n numericKeypadLabel: 'Numeric keypad',\n keypadClear: 'Clear',\n keypadBackspace: 'Backspace',\n keypadDigitsEntered: (count, length) => `${count} of ${length} digits entered`,\n onScreenKeyboardLabel: 'On-screen keyboard',\n keyboardShift: 'Shift',\n keyboardSpace: 'Space',\n keyboardEnter: 'Enter',\n keyboardAltLayer: 'More characters',\n keyboardBaseLayer: 'Letters',\n ratingLabel: 'Rating',\n ratingValueText: (value, max) => `${value} of ${max} stars`,\n minimum: 'Minimum',\n maximum: 'Maximum',\n chooseColor: 'Choose color',\n hexValue: 'Hex value',\n presetColors: 'Preset colors',\n chooseCountry: 'Choose country',\n searchCountries: 'Search countries…',\n phoneNumber: 'Phone number',\n postalCode: 'Postal code',\n amount: 'Amount',\n cardNumber: 'Card number',\n cardBrand: (brand) => `Card brand: ${brand}`,\n iban: 'IBAN',\n taxId: 'Tax ID',\n signature: 'Signature',\n jsonLabel: 'JSON',\n\n logViewerLabel: 'Log output',\n logFollow: 'Follow',\n logCopyAll: 'Copy log',\n logWrapLines: 'Wrap lines',\n\n orgChartLabel: 'Organisation chart',\n orgChartExpand: 'Expand {label}',\n orgChartCollapse: 'Collapse {label}',\n\n chatLabel: 'Conversation',\n chatComposerLabel: 'Message',\n chatPlaceholder: 'Type a message…',\n chatSend: 'Send',\n chatStop: 'Stop generating',\n chatAttach: 'Attach files',\n chatRemoveAttachment: 'Remove attachment',\n chatAttachments: 'Attachments',\n chatSuggestions: 'Suggestions',\n chatCopy: 'Copy message',\n chatRetry: 'Retry',\n chatTyping: 'Typing…',\n chatStreaming: 'Generating…',\n chatJumpToLatest: 'Jump to latest',\n chatEmpty: 'No messages yet',\n chatYou: 'You',\n chatAssistant: 'Assistant',\n chatToolRunning: 'Running',\n chatToolDone: 'Done',\n chatToolError: 'Failed',\n\n dynamicFormAdd: 'Add',\n dynamicFormRemove: (index) => `Remove item ${index}`,\n\n queryBuilderLabel: 'Filter conditions',\n queryAddRule: 'Add rule',\n queryAddGroup: 'Add group',\n queryRemoveRule: 'Remove rule',\n queryRemoveGroup: 'Remove group',\n queryAnd: 'And',\n queryOr: 'Or',\n queryNot: 'Not',\n queryField: 'Field',\n queryOperator: 'Operator',\n queryValue: 'Value',\n queryValueFrom: 'From',\n queryValueTo: 'To',\n queryEmptyGroup: 'No conditions yet',\n queryTrue: 'True',\n queryFalse: 'False',\n queryOpEq: 'equals',\n queryOpNeq: 'does not equal',\n queryOpContains: 'contains',\n queryOpNotContains: 'does not contain',\n queryOpStartsWith: 'starts with',\n queryOpEndsWith: 'ends with',\n queryOpGt: 'greater than',\n queryOpGte: 'at least',\n queryOpLt: 'less than',\n queryOpLte: 'at most',\n queryOpBetween: 'between',\n queryOpIn: 'is any of',\n queryOpNotIn: 'is none of',\n queryOpBefore: 'before',\n queryOpAfter: 'after',\n queryOpEmpty: 'is empty',\n queryOpNotEmpty: 'is not empty',\n\n dialogMove: 'Move dialog (arrow keys; Home to reset)',\n dialogResize: 'Resize dialog (arrow keys; Home to reset)',\n\n listboxFilter: 'Filter options',\n listboxEmpty: 'No matching options',\n\n eventCalendarGrabbed: (title, from, to) =>\n `${title} grabbed, ${from} – ${to}. Use the arrow keys to move, ` +\n 'Shift with Up or Down to change the end time, Enter to save, ' +\n 'Escape to cancel.',\n eventCalendarPosition: (title, day, from, to) =>\n `${title}, ${day}, ${from} – ${to}.`,\n eventCalendarMoved: (title, day, from, to) =>\n `${title} moved to ${day}, ${from} – ${to}.`,\n eventCalendarResized: (title, to) => `${title} now ends at ${to}.`,\n eventCalendarEditCancelled: 'Move cancelled. The event keeps its original time.',\n eventCalendarMovableEvent: 'Movable event',\n\n previousImage: 'Previous image',\n nextImage: 'Next image',\n imageOf: (index, total) => `Image ${index} of ${total}`,\n viewImage: (alt) => (alt ? `View ${alt}` : 'View image'),\n imageFailed: 'Image failed to load',\n zoom: 'Zoom',\n zoomIn: 'Zoom in',\n zoomOut: 'Zoom out',\n mediaLibrary: 'Media library',\n dropzoneLabel: 'Drag files here or click to browse',\n uploadFailed: 'Upload failed',\n retryUpload: 'Retry upload',\n errorSummaryTitle: 'There is a problem',\n\n available: 'Available',\n selected: 'Selected',\n transferSelected: (target) => `Move selected to ${target}`,\n transferAll: (target) => `Move all to ${target}`,\n itemsMoved: (count, target) =>\n `Moved ${count} ${count === 1 ? 'item' : 'items'} to ${target}`,\n\n notificationsTitle: 'Notifications',\n allCaughtUp: \"You're all caught up\",\n markAllRead: 'Mark all read',\n notificationsUnread: (count) => `Notifications, ${count} unread`,\n unread: 'Unread',\n tourStepOf: (step, total) => `Step ${step} of ${total}`,\n tourSkip: 'Skip',\n tourPrevious: 'Previous',\n tourNext: 'Next',\n tourDone: 'Done',\n\n commandPalettePlaceholder: 'Type a command or search…',\n commandPaletteLabel: 'Command palette',\n stepCompleted: 'Completed',\n stepError: 'Has errors',\n diffAddedLine: 'Added:',\n diffRemovedLine: 'Removed:',\n itemAdded: (name) => `${name} added`,\n itemRemoved: (name) => `${name} removed`,\n resizePanes: 'Resize panes',\n backToTop: 'Back to top',\n breadcrumbLabel: 'Breadcrumb',\n fabLabel: 'Actions',\n diffBefore: 'Before',\n diffAfter: 'After',\n diffChanges: 'Changes',\n skipToContent: 'Skip to content',\n primaryNav: 'Primary',\n\n dndPickedUp: (position, total) =>\n `Picked up. Item ${position} of ${total}. ` +\n 'Use the arrow keys to move, space or enter to drop, escape to cancel.',\n dndMoved: (position, total) => `Moved to position ${position} of ${total}.`,\n dndMovedToList: (list, position, total) =>\n `Moved to ${list}, position ${position} of ${total}.`,\n dndDropped: (position) => `Dropped at position ${position}.`,\n dndCancelled: 'Movement cancelled. Item returned to its starting position.',\n\n repeaterAddRow: 'Add row',\n repeaterRemoveRow: (index) => `Remove row ${index}`,\n repeaterReorderRow: (index) => `Reorder row ${index}`,\n repeaterRowMoved: (from, to) => `Row moved from position ${from} to position ${to}.`,\n\n fileRejectedType: (name) => `${name}: unsupported type`,\n fileRejectedSize: (name, limit) => `${name}: exceeds ${limit}`,\n fileRejectedCount: (name, max) => `${name}: over the ${max}-file limit`,\n\n chartCategory: 'Category',\n chartValue: 'Value',\n chartSeries: 'Series',\n chartSlice: 'Slice',\n chartStage: 'Stage',\n chartConversion: 'Conversion',\n chartAxis: 'Axis',\n chartShare: 'Share',\n chartLabel: 'Label',\n\n qrCodeLabel: (text) => `QR code: ${text}`,\n\n sortableListLabel: 'Sortable list',\n filterColumn: (column) => `Filter ${column}`,\n clearFilter: (column) => `Clear filter for ${column}`,\n filterAny: 'All',\n filterMin: 'Min',\n\n blockEditor: {\n addBlock: 'Add block',\n addFirstBlock: 'Add your first block',\n insertBlockHere: 'Insert a block here',\n blockInserter: 'Block inserter',\n searchBlocks: 'Search blocks…',\n blocks: 'Blocks',\n moveBlockUp: 'Move block up',\n moveBlockDown: 'Move block down',\n blockOptions: 'Block options',\n duplicate: 'Duplicate',\n remove: 'Remove',\n textFormatting: 'Text formatting',\n altText: 'Alt text',\n caption: 'Caption',\n alignment: 'Alignment',\n replaceImage: 'Replace image',\n imageUrl: 'Image URL',\n externalContent: 'External content',\n embedUrl: 'Embed URL',\n columnSettings: 'Column settings',\n columns: 'Columns',\n ratio: 'Ratio',\n gap: 'Gap',\n align: 'Align',\n justify: 'Justify',\n headingLevel: (level) => `Heading level ${level}`,\n editorLabel: 'Block content editor',\n emptyBlockPlaceholder: 'Type / to choose a block, or start writing…',\n dragHandle: 'Drag handle',\n turnInto: (label) => `Turn into ${label}`,\n unknownBlock: (type) => `Unknown block: ${type}`,\n blockAdded: (label) => `${label} added`,\n blockDuplicated: 'Block duplicated',\n blockDeleted: (label) => `${label} deleted`,\n blockMovedUp: 'Block moved up',\n blockMovedDown: 'Block moved down',\n turnedInto: (label) => `Turned into ${label}`,\n noBlocksMatch: (query) => `No blocks match “${query}”.`,\n groupText: 'Text',\n groupMedia: 'Media',\n groupLayout: 'Layout',\n blockParagraph: 'Paragraph',\n blockParagraphDesc: 'Rich text with inline formatting.',\n blockHeading: 'Heading',\n blockHeadingDesc: 'A section title (H1–H4).',\n blockList: 'List',\n blockListDesc: 'Bulleted or numbered list.',\n blockQuote: 'Quote',\n blockQuoteDesc: 'A blockquote with optional citation.',\n blockCode: 'Code',\n blockCodeDesc: 'Preformatted, monospace code.',\n blockImage: 'Image',\n blockImageDesc: 'Upload or link an image.',\n blockEmbed: 'Embed',\n blockEmbedDesc: 'YouTube, Vimeo or any URL.',\n blockButton: 'Button',\n blockButtonDesc: 'A call-to-action link button.',\n blockDivider: 'Divider',\n blockDividerDesc: 'A horizontal separator.',\n blockColumns: 'Columns',\n blockColumnsDesc: 'A responsive multi-column layout.',\n bold: 'Bold',\n italic: 'Italic',\n underline: 'Underline',\n strikethrough: 'Strikethrough',\n inlineCode: 'Inline code',\n link: 'Link',\n clearFormatting: 'Clear formatting',\n linkUrlPrompt: 'Link URL',\n editableText: 'Editable text',\n headingPlaceholder: (level) => `Heading ${level}`,\n headingLevelGroup: 'Heading level',\n listStyle: 'List style',\n bulleted: 'Bulleted',\n numbered: 'Numbered',\n listItem: 'List item',\n quoteText: 'Quote text',\n citation: 'Citation',\n addCitation: '— Add a citation',\n codeLanguage: 'Code language',\n codeLanguagePlaceholder: 'language (optional)',\n enterCode: 'Enter code…',\n imageWidth: (percent) => `Width: ${percent}%`,\n uploading: 'Uploading…',\n dropImagePrompt: 'Drag & drop an image, or',\n chooseFile: 'Choose file',\n pasteImageUrl: '…or paste an image URL',\n notAnImage: 'Please choose an image file.',\n uploadFailed: 'Upload failed. Try again or paste a URL.',\n imageAdded: 'Image added',\n pasteEmbedUrl: 'Paste a YouTube, Vimeo or other URL…',\n embedFallbackNote: 'That URL can’t be embedded, but it will render as a link.',\n embedTitle: (provider) => `${provider} embed`,\n embedAdded: (provider) => `${provider} embed added`,\n embeddedContent: 'Embedded content',\n buttonLabel: 'Label',\n buttonLink: 'Link (href)',\n buttonTone: 'Tone',\n buttonVariant: 'Variant',\n buttonDefaultLabel: 'Click me',\n alignLeft: 'Left',\n alignCenter: 'Center',\n alignRight: 'Right',\n tonePrimary: 'Primary',\n toneNeutral: 'Neutral',\n toneSuccess: 'Success',\n toneWarning: 'Warning',\n toneDanger: 'Danger',\n toneInfo: 'Info',\n variantSolid: 'Solid',\n variantSoft: 'Soft',\n variantOutline: 'Outline',\n ratioEqual: 'Equal',\n alignStretch: 'Stretch',\n alignTop: 'Top',\n alignMiddle: 'Middle',\n alignBottom: 'Bottom',\n justifyStart: 'Start',\n justifyCenter: 'Center',\n justifyEnd: 'End',\n justifyBetween: 'Space between',\n },\n};\n\n/**\n * The active string map. Defaults to {@link MK_DEFAULT_I18N}; override with\n * {@link provideMkI18n}. Inject it (`inject(MK_I18N)`) wherever a built-in\n * string is rendered.\n */\nexport const MK_I18N = new InjectionToken<MkI18nStrings>('MK_I18N', {\n providedIn: 'root',\n factory: () => MK_DEFAULT_I18N,\n});\n\n/**\n * Any subset of {@link MkI18nStrings}; the nested `dateNames`, `blockEditor`\n * and `validation` groups may be partial too (they are merged deeply).\n */\nexport type MkI18nOverrides = Partial<\n Omit<MkI18nStrings, 'dateNames' | 'blockEditor' | 'validation'>\n> & {\n dateNames?: Partial<MkDateNames>;\n blockEditor?: Partial<MkBlockEditorStrings>;\n validation?: Partial<MkValidationStrings>;\n};\n\n/**\n * Merges `overrides` over a complete string map — shallow for the top level,\n * deep for the `dateNames`, `blockEditor` and `validation` groups. Exported\n * so locale packs and tests can build a map without providing it.\n */\nexport function mkMergeI18n(\n base: MkI18nStrings,\n overrides: MkI18nOverrides,\n): MkI18nStrings {\n return {\n ...base,\n ...overrides,\n dateNames: { ...base.dateNames, ...overrides.dateNames },\n blockEditor: { ...base.blockEditor, ...overrides.blockEditor },\n validation: { ...base.validation, ...overrides.validation },\n };\n}\n\n/**\n * Provide localised strings — pass any subset, merged over `base` (the\n * English defaults unless given). The nested `dateNames`, `blockEditor` and\n * `validation` groups are merged deeply, so partial overrides of those work\n * too.\n *\n * ```ts\n * bootstrapApplication(App, {\n * providers: [provideMkI18n({ noResults: 'Brak wyników', close: 'Zamknij' })],\n * });\n * ```\n *\n * A locale pack is a complete map that serves as the base — either through\n * its own helper (`provideMkI18nPl(overrides)` from `@mk-kit/ui/locales/pl`)\n * or explicitly: `provideMkI18n(overrides, MK_PL_I18N)`.\n */\nexport function provideMkI18n(\n overrides: MkI18nOverrides,\n base: MkI18nStrings = MK_DEFAULT_I18N,\n): Provider {\n return { provide: MK_I18N, useValue: mkMergeI18n(base, overrides) };\n}\n","import type { Signal } from '@angular/core';\nimport type { MkSize } from '../types';\n\n/**\n * Field context — the contract a field wrapper (`mk-form-field`) exposes to\n * the control nested inside it. Controls inject it optionally\n * (`inject(MkFieldContext, { optional: true })`) to adopt the wrapper's\n * control id and to reflect its required/error state and `aria-describedby`\n * wiring — without depending on the `@mk-kit/ui/forms` entry point.\n *\n * `MkFormField` provides itself under this token; standalone usage (no\n * wrapper) simply yields `null`.\n */\nexport abstract class MkFieldContext {\n /** Id for the nested interactive control — adopt on your control element. */\n abstract readonly controlId: string;\n /** Id of the field's label element, for `aria-labelledby`. */\n abstract readonly labelId: string;\n /** The field's visual size, mirrored onto the nested control. */\n abstract readonly size: Signal<MkSize>;\n /** Whether the field is required (explicitly or via the bound control). */\n abstract readonly isRequired: Signal<boolean>;\n /** Whether the field currently shows an error. */\n abstract readonly hasError: Signal<boolean>;\n /**\n * Space-separated id list for the nested control's `aria-describedby`,\n * or `null` when there is nothing to describe.\n */\n abstract readonly describedBy: Signal<string | null>;\n}\n","/** Delegates to `@mk-kit/core` — the exported names are unchanged. */\nexport { mkEscapeHtml, mkHighlight, mkHighlightJson, type MkCodeLanguage } from '@mk-kit/core';\n","import { effect, untracked } from '@angular/core';\n\n/**\n * Handle returned by {@link mkValidatorChange}, wiring a component's\n * `registerOnValidatorChange` callback to a set of reactive dependencies.\n */\nexport interface MkValidatorChangeRef {\n /** Store the callback Angular hands to `registerOnValidatorChange`. */\n register(fn: () => void): void;\n /** Ask the bound control to re-run `validate()` now. */\n notify(): void;\n}\n\n/**\n * Re-validates the bound form control whenever a validator's inputs change.\n *\n * A `Validator` whose constraints come from component inputs (`[min]`,\n * `[max]`, `[required]`, …) must tell Angular when those inputs change,\n * otherwise the control keeps the verdict computed under the old constraints.\n * `NgModel`/`FormControlName` pass a callback to `registerOnValidatorChange`\n * for exactly this; call it from an effect over the constraint signals.\n *\n * Must be called from an injection context (i.e. as a field initialiser).\n *\n * ```ts\n * private readonly validatorChange = mkValidatorChange(() => {\n * this.min();\n * this.max();\n * });\n *\n * registerOnValidatorChange(fn: () => void): void {\n * this.validatorChange.register(fn);\n * }\n * ```\n *\n * @param deps Reads every signal the validator depends on.\n */\nexport function mkValidatorChange(deps: () => void): MkValidatorChangeRef {\n let onChange: () => void = () => {};\n let primed = false;\n\n effect(() => {\n deps();\n // Skip the effect's initial run: the control validates once on bind\n // anyway, and re-entering validation during setup is wasted work.\n if (!primed) {\n primed = true;\n return;\n }\n // The callback synchronously calls `updateValueAndValidity()`, which reads\n // and writes signals — keep it out of this effect's dependency graph.\n untracked(() => onChange());\n });\n\n return {\n register(fn: () => void): void {\n onChange = fn;\n },\n notify(): void {\n onChange();\n },\n };\n}\n","import type { ValidationErrors } from '@angular/forms';\nimport type { MkValidationStrings } from '../i18n/mk-i18n';\n\n/**\n * A per-field override map: an error key mapped either to a fixed message or\n * to a function receiving that key's error payload.\n *\n * ```html\n * <mk-form-field label=\"Age\" [errorMessages]=\"{ min: 'You must be 18 or over' }\">\n * ```\n */\nexport type MkErrorMessages = Readonly<Record<string, string | ((err: any) => string)>>;\n\n/**\n * Resolves the message for the first error on a control, mirroring how\n * `mat-error` shows one message at a time.\n *\n * Lookup order per key: the field's `overrides`, then the i18n `validation`\n * table, then the error payload's own `message` string (so a custom validator\n * can carry its text), then the generic fallback. Keys are visited in the\n * order the validators put them on the control, so composing\n * `[Validators.required, Validators.email]` surfaces \"required\" while empty.\n *\n * @returns The message, or `null` when there are no errors.\n */\nexport function mkFirstErrorMessage(\n errors: ValidationErrors | null | undefined,\n strings: MkValidationStrings,\n overrides?: MkErrorMessages,\n): string | null {\n if (!errors) return null;\n\n for (const key of Object.keys(errors)) {\n const payload = errors[key];\n\n const override = overrides?.[key];\n if (typeof override === 'string') return override;\n if (typeof override === 'function') return override(payload);\n\n const builtin = (strings as unknown as MkErrorMessages)[key];\n if (typeof builtin === 'string') return builtin;\n if (typeof builtin === 'function') return builtin(payload);\n\n if (payload && typeof payload === 'object' && typeof payload.message === 'string') {\n return payload.message;\n }\n }\n\n return errors ? strings.unknown : null;\n}\n","import type { ValidationErrors } from '@angular/forms';\nimport type { MkValidationStrings } from '../i18n/mk-i18n';\nimport { type MkErrorMessages, mkFirstErrorMessage } from './validation-messages';\n\n/**\n * The shape of a Signal Forms validation error as `mk-kit` reads it — the\n * `{ kind, message? }` contract of `ValidationError` from\n * `@angular/forms/signals`, plus whatever payload the error class carries\n * (`min`, `maxLength`, `pattern`, …). Declared structurally so `@mk-kit/ui/core`\n * stays free of a runtime dependency on the signals entry point.\n */\nexport interface MkSignalValidationError {\n /** Identifies the kind of error (`'required'`, `'minLength'`, …). */\n readonly kind: string;\n /** Human-readable message, when the schema supplied one. */\n readonly message?: string;\n}\n\n/**\n * Converts Signal Forms errors to the reactive-forms `ValidationErrors` shape\n * the `validation` i18n table is keyed by, so both form systems render the\n * same messages. The built-in kinds map to Angular's classic keys and payloads\n * (`minLength` → `minlength: { requiredLength }`, `minDate` → `mkMinDate`,\n * …); any other kind is kept as-is with its payload spread into the value.\n *\n * @returns The error map in the order the errors were reported, or `null`\n * when the list is empty.\n */\nexport function mkSignalErrorsToValidationErrors(\n errors: readonly MkSignalValidationError[] | null | undefined,\n): ValidationErrors | null {\n if (!errors || errors.length === 0) return null;\n const out: ValidationErrors = {};\n for (const err of errors) {\n const [key, payload] = toReactiveError(err);\n if (!(key in out)) out[key] = payload;\n }\n return out;\n}\n\nfunction toReactiveError(error: MkSignalValidationError): [string, unknown] {\n const err = error as MkSignalValidationError & Record<string, unknown>;\n const message = err.message;\n switch (err.kind) {\n case 'required':\n return ['required', message ? { message } : true];\n case 'email':\n return ['email', message ? { message } : true];\n case 'min':\n return ['min', { min: err['min'], actual: err['actual'], message }];\n case 'max':\n return ['max', { max: err['max'], actual: err['actual'], message }];\n case 'minLength':\n return ['minlength', { requiredLength: err['minLength'], actualLength: err['actualLength'], message }];\n case 'maxLength':\n return ['maxlength', { requiredLength: err['maxLength'], actualLength: err['actualLength'], message }];\n case 'pattern':\n return ['pattern', { requiredPattern: String(err['pattern'] ?? ''), message }];\n case 'minDate':\n return ['mkMinDate', { min: err['minDate'], actual: err['actual'], message }];\n case 'maxDate':\n return ['mkMaxDate', { max: err['maxDate'], actual: err['actual'], message }];\n default: {\n // Custom / server / compat errors: keep the kind as the key and expose the\n // payload (a `CompatValidationError` carries the reactive payload in\n // `context`) so per-key `errorMessages` functions receive it.\n const rest: Record<string, unknown> = {};\n for (const key of Object.keys(err)) {\n if (key !== 'kind' && key !== 'fieldTree' && key !== 'formField') rest[key] = err[key];\n }\n const context = rest['context'];\n if (context && typeof context === 'object') {\n return [err.kind, { ...context, message: message ?? (context as { message?: string }).message }];\n }\n return [err.kind, Object.keys(rest).length ? rest : message ? { message } : true];\n }\n }\n}\n\n/**\n * Resolves the message for the first Signal Forms error on a field, the way\n * `mkFirstErrorMessage` does for reactive forms.\n *\n * Lookup order: the field's `overrides` for that kind, then the `message` the\n * schema attached to the error (`required(p.email, { message: '…' })`), then\n * the i18n `validation` table, then the generic fallback.\n *\n * @returns The message, or `null` when there are no errors.\n */\nexport function mkSignalErrorMessage(\n errors: readonly MkSignalValidationError[] | null | undefined,\n strings: MkValidationStrings,\n overrides?: MkErrorMessages,\n): string | null {\n if (!errors || errors.length === 0) return null;\n const first = errors[0];\n const [key, payload] = toReactiveError(first);\n const override = overrides?.[key];\n if (typeof override === 'string') return override;\n if (typeof override === 'function') return override(payload);\n if (typeof first.message === 'string' && first.message) return first.message;\n return mkFirstErrorMessage({ [key]: payload }, strings);\n}\n","/**\n * Delegates to `@mk-kit/core` — the exported names and behaviour are\n * unchanged. `mkQueryOperatorLabel` / `mkQueryToText` accept the full\n * `MkI18nStrings` map as before: it is a structural superset of the\n * package's `MkQueryTextStrings`.\n */\nexport {\n MK_QUERY_OPERATORS,\n MK_QUERY_TEXT_EN,\n MK_QUERY_UNARY,\n mkCreateQueryGroup,\n mkCreateQueryRule,\n mkIsQueryGroup,\n mkQueryCompact,\n mkQueryIsEmpty,\n mkQueryOperatorLabel,\n mkQueryOperatorsFor,\n mkQueryRuleCount,\n mkQueryRuleIsComplete,\n mkQueryRuleMatches,\n mkQueryToPred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"}
|
|
1
|
+
{"version":3,"file":"mk-kit-ui-core.mjs","sources":["../../../projects/mk-kit/core/types.ts","../../../projects/mk-kit/core/theme/theme.service.ts","../../../projects/mk-kit/core/layout/breakpoint.service.ts","../../../projects/mk-kit/core/a11y/live-announcer.service.ts","../../../projects/mk-kit/core/a11y/focus-trap.ts","../../../projects/mk-kit/core/a11y/unique-id.ts","../../../projects/mk-kit/core/overlay/overlay-ref.ts","../../../projects/mk-kit/core/overlay/overlay-root.ts","../../../projects/mk-kit/core/overlay/overlay.service.ts","../../../projects/mk-kit/core/overlay/anchored-overlay.ts","../../../projects/mk-kit/core/i18n/mk-i18n.ts","../../../projects/mk-kit/core/forms/field-context.ts","../../../projects/mk-kit/core/highlight/code-highlight.ts","../../../projects/mk-kit/core/forms/validator-change.ts","../../../projects/mk-kit/core/forms/validation-messages.ts","../../../projects/mk-kit/core/forms/signal-forms.ts","../../../projects/mk-kit/core/query/query.ts","../../../projects/mk-kit/core/mk-kit-ui-core.ts"],"sourcesContent":["/** Shared primitive types used across mk-kit components. */\n\n/** Control size scale. Maps to `--mk-control-height-*` tokens. */\nexport type MkSize = 'sm' | 'md' | 'lg';\n\n/** Semantic color tone. Each maps to a `--mk-<tone>*` token family. */\nexport type MkTone =\n | 'primary'\n | 'neutral'\n | 'success'\n | 'warning'\n | 'danger'\n | 'info';\n\n/** Visual treatment for tinted/interactive surfaces. */\nexport type MkVariant = 'solid' | 'soft' | 'outline' | 'ghost' | 'link';\n\n/** Theme selection. `system` follows the OS `prefers-color-scheme`. */\nexport type MkThemePreference = 'light' | 'dark' | 'system';\n\n/** Concrete resolved theme (never `system`). */\nexport type MkResolvedTheme = 'light' | 'dark';\n\n/** Common placement values for overlays — delegated to `@mk-kit/core`. */\nexport type { MkPlacement } from '@mk-kit/core';\n","import {\n DOCUMENT,\n DestroyRef,\n Injectable,\n PLATFORM_ID,\n computed,\n effect,\n inject,\n signal,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport type { MkResolvedTheme, MkThemePreference } from '../types';\n\nconst STORAGE_KEY = 'mk-kit-theme';\nconst THEME_ATTR = 'data-mk-theme';\nconst DENSITY_STORAGE_KEY = 'mk-kit-density';\nconst DENSITY_ATTR = 'data-mk-density';\nconst CONTRAST_STORAGE_KEY = 'mk-kit-contrast';\nconst CONTRAST_ATTR = 'data-mk-contrast';\nconst CONTRAST_QUERY = '(prefers-contrast: more)';\n\n/**\n * Global control-density mode.\n *\n * `touch` sizes controls for fingers (48px default) rather than a cursor —\n * tablets, kiosks, order screens. It is usually applied per-subtree with the\n * `data-mk-density` attribute rather than globally, since one app often has\n * both a mouse-driven admin and a touch-driven screen.\n */\nexport type MkDensity = 'comfortable' | 'compact' | 'touch';\n\n/**\n * Contrast preference.\n *\n * `high` applies the high-contrast token preset (`data-mk-contrast=\"high\"`):\n * pure text colours, line-like borders, opaque interaction washes, a thicker\n * focus ring. `system` (the default) writes no attribute and lets the\n * stylesheet follow the OS `prefers-contrast: more` setting; `normal` opts\n * out of that even when the OS asks for more contrast.\n */\nexport type MkContrastPreference = 'normal' | 'high' | 'system';\n\n/** Concrete resolved contrast (never `system`). */\nexport type MkResolvedContrast = 'normal' | 'high';\n\n/**\n * Reactive theme controller for mk-kit.\n *\n * - `preference()` is the user's choice: `light`, `dark`, or `system`.\n * - `resolvedTheme()` is the concrete theme currently applied.\n * - Writes `data-mk-theme` on `<html>` and persists the choice to\n * `localStorage`. When set to `system`, it live-tracks the OS setting and\n * removes the attribute so pure-CSS `prefers-color-scheme` takes over.\n *\n * Provided in root — inject it anywhere and bind to the signals.\n */\n@Injectable({ providedIn: 'root' })\nexport class MkThemeService {\n private readonly document = inject(DOCUMENT);\n private readonly destroyRef = inject(DestroyRef);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n private readonly _preference = signal<MkThemePreference>(this.readInitial());\n /** The user's theme preference. */\n readonly preference = this._preference.asReadonly();\n\n private readonly _systemPrefersDark = signal<boolean>(this.readSystemDark());\n\n /** The concrete theme in effect (`light` or `dark`). */\n readonly resolvedTheme = computed<MkResolvedTheme>(() => {\n const pref = this._preference();\n if (pref === 'system') {\n return this._systemPrefersDark() ? 'dark' : 'light';\n }\n return pref;\n });\n\n /** Convenience boolean for template bindings. */\n readonly isDark = computed(() => this.resolvedTheme() === 'dark');\n\n private readonly _density = signal<MkDensity>(this.readInitialDensity());\n /**\n * The global density mode. `compact` tightens control heights and the core\n * spacing steps via the `data-mk-density` attribute, `touch` enlarges them —\n * every component follows automatically because they read the same tokens.\n *\n * This signal is the GLOBAL mode only. To make one screen or dialog touch-\n * sized inside an otherwise comfortable app, put `data-mk-density=\"touch\"`\n * on that element instead; the tokens inherit and this service stays out of\n * it.\n */\n readonly density = this._density.asReadonly();\n\n private readonly _contrast = signal<MkContrastPreference>(this.readInitialContrast());\n /**\n * The user's contrast preference: `normal`, `high` or `system` (follow the\n * OS `prefers-contrast` setting — the default). Written as\n * `data-mk-contrast` on `<html>` and persisted; `system` removes the\n * attribute so the pure-CSS `prefers-contrast: more` mapping takes over.\n *\n * Like density, the attribute also works per subtree: put\n * `data-mk-contrast=\"high\"` on any element to raise contrast there only.\n */\n readonly contrast = this._contrast.asReadonly();\n\n private readonly _systemPrefersContrast = signal<boolean>(this.readSystemContrast());\n\n /** The concrete contrast in effect (`normal` or `high`). */\n readonly resolvedContrast = computed<MkResolvedContrast>(() => {\n const pref = this._contrast();\n if (pref === 'system') {\n return this._systemPrefersContrast() ? 'high' : 'normal';\n }\n return pref;\n });\n\n /** Convenience boolean for template bindings. */\n readonly isHighContrast = computed(() => this.resolvedContrast() === 'high');\n\n constructor() {\n if (this.isBrowser) {\n this.watchSystemPreference();\n this.watchSystemContrast();\n }\n\n // Keep the contrast attribute + storage in sync. `system` is the ABSENCE\n // of the attribute (the stylesheet then follows `prefers-contrast`);\n // `normal` and `high` name themselves so CSS can tell an explicit opt-out\n // from \"no preference\".\n effect(() => {\n const contrast = this._contrast();\n if (!this.isBrowser) return;\n const root = this.document.documentElement;\n if (contrast === 'system') {\n root.removeAttribute(CONTRAST_ATTR);\n } else {\n root.setAttribute(CONTRAST_ATTR, contrast);\n }\n try {\n localStorage.setItem(CONTRAST_STORAGE_KEY, contrast);\n } catch {\n /* ignore */\n }\n });\n\n // Keep the DOM attribute + storage in sync with the signal.\n effect(() => {\n const pref = this._preference();\n if (!this.isBrowser) return;\n\n const root = this.document.documentElement;\n if (pref === 'system') {\n root.removeAttribute(THEME_ATTR);\n } else {\n root.setAttribute(THEME_ATTR, pref);\n }\n try {\n localStorage.setItem(STORAGE_KEY, pref);\n } catch {\n /* storage may be unavailable (private mode) — ignore */\n }\n });\n\n // Keep the density attribute + storage in sync.\n effect(() => {\n const density = this._density();\n if (!this.isBrowser) return;\n const root = this.document.documentElement;\n // `comfortable` is the token default, so it is the ABSENCE of the\n // attribute — anything else names itself. Written this way so a new mode\n // needs no change here.\n if (density === 'comfortable') {\n root.removeAttribute(DENSITY_ATTR);\n } else {\n root.setAttribute(DENSITY_ATTR, density);\n }\n try {\n localStorage.setItem(DENSITY_STORAGE_KEY, density);\n } catch {\n /* ignore */\n }\n });\n }\n\n /** Set the global density mode. */\n setDensity(density: MkDensity): void {\n this._density.set(density);\n }\n\n /**\n * Toggle between comfortable and compact — the two modes a density switch in\n * a UI offers. `touch` is a deliberate choice for a specific screen, not\n * something to land on by toggling, so from `touch` this returns to\n * comfortable rather than cycling.\n */\n toggleDensity(): void {\n this._density.update((d) => (d === 'comfortable' ? 'compact' : 'comfortable'));\n }\n\n private readInitialDensity(): MkDensity {\n if (!this.isBrowser) return 'comfortable';\n try {\n const stored = localStorage.getItem(DENSITY_STORAGE_KEY);\n if (stored === 'compact' || stored === 'comfortable' || stored === 'touch') {\n return stored;\n }\n } catch {\n /* ignore */\n }\n return 'comfortable';\n }\n\n /** Set the contrast preference explicitly. */\n setContrast(contrast: MkContrastPreference): void {\n this._contrast.set(contrast);\n }\n\n /** Toggle between normal and high contrast (resolving `system` first). */\n toggleContrast(): void {\n this._contrast.set(this.resolvedContrast() === 'high' ? 'normal' : 'high');\n }\n\n private readInitialContrast(): MkContrastPreference {\n if (!this.isBrowserEnv()) return 'system';\n try {\n const stored = localStorage.getItem(CONTRAST_STORAGE_KEY);\n if (stored === 'normal' || stored === 'high' || stored === 'system') {\n return stored;\n }\n } catch {\n /* ignore */\n }\n return 'system';\n }\n\n private readSystemContrast(): boolean {\n if (!this.isBrowserEnv()) return false;\n return this.document.defaultView?.matchMedia?.(CONTRAST_QUERY).matches ?? false;\n }\n\n private watchSystemContrast(): void {\n const mql = this.document.defaultView?.matchMedia?.(CONTRAST_QUERY);\n if (!mql) return;\n const onChange = (e: MediaQueryListEvent) =>\n this._systemPrefersContrast.set(e.matches);\n mql.addEventListener('change', onChange);\n this.destroyRef.onDestroy(() => mql.removeEventListener('change', onChange));\n }\n\n /** Set the theme preference explicitly. */\n setTheme(preference: MkThemePreference): void {\n this._preference.set(preference);\n }\n\n /** Toggle between light and dark (resolving `system` first). */\n toggle(): void {\n this._preference.set(this.resolvedTheme() === 'dark' ? 'light' : 'dark');\n }\n\n private readInitial(): MkThemePreference {\n if (!this.isBrowserEnv()) return 'system';\n try {\n const stored = localStorage.getItem(STORAGE_KEY);\n if (stored === 'light' || stored === 'dark' || stored === 'system') {\n return stored;\n }\n } catch {\n /* ignore */\n }\n return 'system';\n }\n\n private readSystemDark(): boolean {\n if (!this.isBrowserEnv()) return false;\n return this.document.defaultView?.matchMedia('(prefers-color-scheme: dark)')\n .matches ?? false;\n }\n\n private watchSystemPreference(): void {\n const mql = this.document.defaultView?.matchMedia(\n '(prefers-color-scheme: dark)',\n );\n if (!mql) return;\n const onChange = (e: MediaQueryListEvent) =>\n this._systemPrefersDark.set(e.matches);\n mql.addEventListener('change', onChange);\n // Detach when the injector dies (repeated bootstraps in SSR/HMR/tests).\n this.destroyRef.onDestroy(() => mql.removeEventListener('change', onChange));\n }\n\n private isBrowserEnv(): boolean {\n return this.isBrowser && typeof this.document !== 'undefined';\n }\n}\n","import {\n DOCUMENT,\n Injectable,\n InjectionToken,\n PLATFORM_ID,\n computed,\n inject,\n signal,\n type OnDestroy,\n type Signal,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\n/** Named viewport ranges, mobile-first: each starts at its min-width. */\nexport type MkBreakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n/** Min-widths (px) at which each named breakpoint begins; `xs` is everything below `sm`. */\nexport type MkBreakpoints = Record<Exclude<MkBreakpoint, 'xs'>, number>;\n\n/** The default scale (same numbers as Tailwind, so mental models transfer). */\nexport const MK_DEFAULT_BREAKPOINTS: MkBreakpoints = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n '2xl': 1536,\n};\n\n/** Override the breakpoint scale app-wide: `{ provide: MK_BREAKPOINTS, useValue: { …, lg: 1100 } }`. */\nexport const MK_BREAKPOINTS = new InjectionToken<MkBreakpoints>('MK_BREAKPOINTS', {\n providedIn: 'root',\n factory: () => MK_DEFAULT_BREAKPOINTS,\n});\n\n/**\n * A value that may differ per breakpoint: either the plain value or a\n * mobile-first map, `{ xs: 1, md: 2, xl: 4 }`, where each key applies from\n * that breakpoint up until the next key given.\n */\nexport type MkResponsive<T> = T | Partial<Record<MkBreakpoint, T>>;\n\nconst ORDER: readonly MkBreakpoint[] = ['xs', 'sm', 'md', 'lg', 'xl', '2xl'];\n\n/** True when `value` is a per-breakpoint map rather than a plain value. */\nexport function mkIsResponsive<T>(value: MkResponsive<T>): value is Partial<Record<MkBreakpoint, T>> {\n return (\n typeof value === 'object' &&\n value !== null &&\n !Array.isArray(value) &&\n Object.keys(value).every((k) => (ORDER as readonly string[]).includes(k))\n );\n}\n\n/**\n * Reactive viewport breakpoints, one `matchMedia` listener per step.\n *\n * ```ts\n * private readonly bp = inject(MkBreakpointService);\n * readonly compact = this.bp.down('md'); // Signal<boolean>\n * readonly columns = computed(() => this.bp.resolve({ xs: 1, md: 2, xl: 4 }));\n * ```\n *\n * On the server (no `window`) everything reports `xs`.\n */\n@Injectable({ providedIn: 'root' })\nexport class MkBreakpointService implements OnDestroy {\n /** The breakpoint scale in effect (see {@link MK_BREAKPOINTS}). */\n readonly breakpoints = inject(MK_BREAKPOINTS);\n\n private readonly document = inject(DOCUMENT);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n /** `matches` per step, in scale order (`sm` first). */\n private readonly steps = new Map<MkBreakpoint, ReturnType<typeof signal<boolean>>>();\n private readonly cleanup: Array<() => void> = [];\n private readonly queries = new Map<string, Signal<boolean>>();\n private readonly ups = new Map<MkBreakpoint, Signal<boolean>>();\n private readonly downs = new Map<MkBreakpoint, Signal<boolean>>();\n\n /** The widest breakpoint the viewport currently satisfies. */\n readonly current: Signal<MkBreakpoint>;\n\n constructor() {\n for (const name of ORDER.slice(1)) {\n const min = this.breakpoints[name as Exclude<MkBreakpoint, 'xs'>];\n this.steps.set(name, this.watch(`(min-width: ${min}px)`));\n }\n this.current = computed(() => {\n let current: MkBreakpoint = 'xs';\n for (const name of ORDER.slice(1)) if (this.steps.get(name)!()) current = name;\n return current;\n });\n }\n\n /** True while the viewport is at least `bp` wide (`up('md')` = md, lg, xl, 2xl). */\n up(bp: MkBreakpoint): Signal<boolean> {\n let s = this.ups.get(bp);\n if (!s) {\n s = bp === 'xs' ? signal(true).asReadonly() : this.steps.get(bp)!.asReadonly();\n this.ups.set(bp, s);\n }\n return s;\n }\n\n /** True while the viewport is narrower than `bp` (`down('md')` = xs, sm). */\n down(bp: MkBreakpoint): Signal<boolean> {\n let s = this.downs.get(bp);\n if (!s) {\n const up = this.up(bp);\n s = computed(() => !up());\n this.downs.set(bp, s);\n }\n return s;\n }\n\n /** True while the viewport is at least `from` and narrower than `to`. */\n between(from: MkBreakpoint, to: MkBreakpoint): Signal<boolean> {\n const lo = this.up(from);\n const hi = this.down(to);\n return computed(() => lo() && hi());\n }\n\n /** Any media query as a signal, e.g. `observe('(orientation: portrait)')`. */\n observe(query: string): Signal<boolean> {\n let s = this.queries.get(query);\n if (!s) {\n s = this.watch(query).asReadonly();\n this.queries.set(query, s);\n }\n return s;\n }\n\n /**\n * Pick the entry of a responsive value for the current viewport —\n * mobile-first, so `{ xs: 1, md: 2 }` gives 1 on `sm` and 2 on `xl`.\n * A plain value is returned as is. Read inside a `computed` to track it.\n */\n resolve<T>(value: MkResponsive<T>): T | undefined {\n if (!mkIsResponsive(value)) return value as T;\n const idx = ORDER.indexOf(this.current());\n for (let i = idx; i >= 0; i--) {\n const v = value[ORDER[i]];\n if (v !== undefined) return v;\n }\n return undefined;\n }\n\n ngOnDestroy(): void {\n for (const off of this.cleanup) off();\n this.cleanup.length = 0;\n }\n\n private watch(query: string) {\n const s = signal(false);\n if (!this.isBrowser) return s;\n const mql = this.document.defaultView?.matchMedia?.(query);\n if (!mql) return s;\n s.set(mql.matches);\n const onChange = (e: MediaQueryListEvent) => s.set(e.matches);\n mql.addEventListener('change', onChange);\n this.cleanup.push(() => mql.removeEventListener('change', onChange));\n return s;\n }\n}\n","import { DOCUMENT, Injectable, PLATFORM_ID, inject } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\nexport type MkAriaLivePoliteness = 'polite' | 'assertive';\n\n/**\n * Announces messages to assistive technology via a visually-hidden\n * `aria-live` region. Used by toasts, form validation, sort changes, etc.\n * so state changes are perceivable without sight. WCAG 4.1.3 (Status Messages).\n */\n@Injectable({ providedIn: 'root' })\nexport class MkLiveAnnouncer {\n private readonly document = inject(DOCUMENT);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private region?: HTMLElement;\n private clearTimer?: ReturnType<typeof setTimeout>;\n\n /** Announce `message`. `politeness` controls interruption behavior. */\n announce(message: string, politeness: MkAriaLivePoliteness = 'polite'): void {\n if (!this.isBrowser) return;\n const region = this.ensureRegion();\n region.setAttribute('aria-live', politeness);\n\n // Clear then set on the next frame so identical consecutive messages\n // are still re-announced by screen readers.\n region.textContent = '';\n if (this.clearTimer) clearTimeout(this.clearTimer);\n this.document.defaultView?.requestAnimationFrame(() => {\n region.textContent = message;\n });\n\n // Tidy up after a while to keep the DOM clean.\n this.clearTimer = setTimeout(() => {\n if (this.region) this.region.textContent = '';\n }, 1000);\n }\n\n private ensureRegion(): HTMLElement {\n if (this.region) return this.region;\n const el = this.document.createElement('div');\n el.setAttribute('aria-atomic', 'true');\n el.setAttribute('aria-live', 'polite');\n el.className = 'mk-visually-hidden';\n el.style.cssText =\n 'position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;';\n this.document.body.appendChild(el);\n this.region = el;\n return el;\n }\n}\n","const FOCUSABLE_SELECTOR = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled]):not([type=\"hidden\"])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n '[contenteditable=\"true\"]',\n].join(',');\n\n/** Returns the tabbable elements inside `root`, in DOM order. */\nexport function mkGetFocusable(root: HTMLElement): HTMLElement[] {\n const win = root.ownerDocument.defaultView;\n return Array.from(\n root.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR),\n ).filter((el) => {\n if (el === root.ownerDocument.activeElement) return true;\n if (el.offsetWidth <= 0 && el.offsetHeight <= 0) return false;\n // `visibility:hidden` elements keep their box, so the size check above\n // passes — yet they are NOT tabbable, and counting one as a Tab-wrap\n // boundary makes the wrap focus a dead element. `getComputedStyle`\n // degrades safely in jsdom, where visibility resolves 'visible' by\n // default, so test environments without layout keep working.\n const visibility = win?.getComputedStyle(el).visibility;\n return visibility !== 'hidden' && visibility !== 'collapse';\n });\n}\n\n/**\n * Traps keyboard focus within `root` (wrapping Tab / Shift+Tab), moves focus\n * inside on activation, and restores focus to the previously-focused element\n * on release. Essential for accessible modals/menus (WCAG 2.4.3, 2.1.2).\n */\nexport class MkFocusTrap {\n private previouslyFocused: HTMLElement | null = null;\n private active = false;\n private readonly keydownHandler = (e: KeyboardEvent) => this.onKeydown(e);\n\n constructor(private readonly root: HTMLElement) {}\n\n /** Activate the trap and move focus to the first focusable element (or root). */\n activate(initialFocus?: HTMLElement): void {\n this.previouslyFocused = this.root.ownerDocument\n .activeElement as HTMLElement | null;\n this.active = true;\n this.root.addEventListener('keydown', this.keydownHandler, true);\n\n const target =\n initialFocus ??\n mkGetFocusable(this.root)[0] ??\n this.root;\n // Ensure programmatic focus works even on a non-tabbable container.\n if (target === this.root && !this.root.hasAttribute('tabindex')) {\n this.root.setAttribute('tabindex', '-1');\n }\n // Skip if the trap was released within the same tick, so the deferred\n // focus can't steal focus back after release() restored it.\n queueMicrotask(() => {\n if (this.active) target.focus();\n });\n }\n\n /** Deactivate and restore focus to the trigger element. */\n release(): void {\n this.active = false;\n this.root.removeEventListener('keydown', this.keydownHandler, true);\n const previous = this.previouslyFocused;\n this.previouslyFocused = null;\n if (!previous) return;\n if (previous.isConnected) {\n previous.focus?.();\n } else {\n // The trigger left the DOM while the trap was active (a deleted row, a\n // route change). Focusing a detached node is a silent no-op at best —\n // land on the body instead so focus has a real, connected home.\n this.root.ownerDocument.body?.focus?.();\n }\n }\n\n private onKeydown(e: KeyboardEvent): void {\n if (e.key !== 'Tab') return;\n const focusable = mkGetFocusable(this.root);\n if (focusable.length === 0) {\n e.preventDefault();\n this.root.focus();\n return;\n }\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n const active = this.root.ownerDocument.activeElement;\n\n if (e.shiftKey && active === first) {\n e.preventDefault();\n last.focus();\n } else if (!e.shiftKey && active === last) {\n e.preventDefault();\n first.focus();\n }\n }\n}\n","/** Delegates to `@mk-kit/core` — the exported name is unchanged. */\nexport { mkUniqueId } from '@mk-kit/core';\n","import { InjectionToken, signal, type ComponentRef } from '@angular/core';\nimport { Observable } from 'rxjs';\n\n/** Injection token exposing the data passed to an overlay component. */\nexport const MK_OVERLAY_DATA = new InjectionToken<unknown>('MK_OVERLAY_DATA');\n\n/**\n * Handle to an open overlay. Injected into the rendered component and returned\n * from `MkOverlayService.open`. Resolve the overlay by calling `close`.\n *\n * The close result is exposed three ways so the handle fits whatever style the\n * calling code already uses — they all settle together:\n *\n * - `result` — a signal, for template binding and signal-based components.\n * - `closed$` — an Observable that emits once and completes, for RxJS\n * pipelines. A service that hands a dialog result back to its callers can\n * return this directly instead of wrapping the promise in `from(...)`.\n * - `afterClosed` — a Promise, for `await` / `.then()`.\n */\nexport class MkOverlayRef<TResult = unknown, TComponent = unknown> {\n /** The rendered component instance (set by the service after creation). */\n componentRef?: ComponentRef<TComponent>;\n\n private readonly _closed = signal(false);\n /** Becomes `true` once the overlay has been dismissed. */\n readonly closed = this._closed.asReadonly();\n\n private readonly _result = signal<TResult | undefined>(undefined);\n /**\n * The value passed to `close`, or `undefined` while open and for a dismissal\n * (Escape / backdrop). Read `closed()` to tell \"closed with no result\" apart\n * from \"still open\".\n */\n readonly result = this._result.asReadonly();\n\n private resolveClosed!: (result: TResult | undefined) => void;\n /** Resolves with the close result when the overlay is dismissed. */\n readonly afterClosed = new Promise<TResult | undefined>((resolve) => {\n this.resolveClosed = resolve;\n });\n\n private emitClosed?: (result: TResult | undefined) => void;\n /**\n * Emits the close result once, then completes. Subscribing after the overlay\n * has already closed replays the result immediately, so a late subscriber\n * never hangs.\n */\n readonly closed$ = new Observable<TResult | undefined>((subscriber) => {\n if (this._closed()) {\n subscriber.next(this._result());\n subscriber.complete();\n return;\n }\n this.emitClosed = (result) => {\n subscriber.next(result);\n subscriber.complete();\n };\n return () => {\n this.emitClosed = undefined;\n };\n });\n\n /** Internal disposer wired up by the service. */\n _dispose: (result: TResult | undefined) => void = () => {};\n\n /** Close the overlay, optionally returning a result. */\n close(result?: TResult): void {\n if (this._closed()) return;\n this._closed.set(true);\n this._result.set(result);\n this._dispose(result);\n this.resolveClosed(result);\n this.emitClosed?.(result);\n }\n}\n","import { DOCUMENT, InjectionToken, inject } from '@angular/core';\n\n/**\n * Resolves the element overlay surfaces are appended to. A function (not an\n * element) because the root may be created lazily, after DI is set up.\n */\nexport type MkOverlayRootFn = () => HTMLElement;\n\n/**\n * Where mk-kit mounts everything that leaves the component tree: overlay\n * containers (dialogs), anchored panels (selects, menus, tooltips), toast /\n * snackbar containers and the tour surfaces. Defaults to `document.body`.\n *\n * Override it to confine those surfaces to another element — `@mk-kit/ui/embed`\n * points it at a themed shadow-DOM host so overlays opened by embedded custom\n * elements stay isolated from the host page's stylesheet:\n *\n * ```ts\n * { provide: MK_OVERLAY_ROOT, useValue: () => myOverlayHost }\n * ```\n */\nexport const MK_OVERLAY_ROOT = new InjectionToken<MkOverlayRootFn>('MK_OVERLAY_ROOT', {\n providedIn: 'root',\n factory: () => {\n const doc = inject(DOCUMENT);\n return () => doc.body;\n },\n});\n\n/**\n * The direct child of `document.body` an overlay-root descendant lives under,\n * crossing shadow boundaries on the way up — `null` when the node is not under\n * `body` at all. The overlay service uses it to keep the overlay's own host\n * out of the elements it makes `inert` behind a modal.\n */\nexport function mkBodyLevelAncestor(node: Node, body: HTMLElement): Element | null {\n let current: Node = node;\n for (;;) {\n const root = current.getRootNode();\n if (root instanceof ShadowRoot) {\n current = root.host;\n continue;\n }\n let el: Node = current;\n while (el.parentNode && el.parentNode !== body) el = el.parentNode;\n return el.parentNode === body ? (el as Element) : null;\n }\n}\n","import {\n ApplicationRef,\n DOCUMENT,\n EnvironmentInjector,\n Injectable,\n Injector,\n type OnDestroy,\n PLATFORM_ID,\n Type,\n createComponent,\n inject,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { MkFocusTrap } from '../a11y/focus-trap';\nimport { MK_OVERLAY_DATA, MkOverlayRef } from './overlay-ref';\nimport { MK_OVERLAY_ROOT, mkBodyLevelAncestor } from './overlay-root';\n\nexport interface MkOverlayConfig<TData = unknown> {\n /** Arbitrary data injected via `MK_OVERLAY_DATA`. */\n data?: TData;\n /** Render a dimmed scrim behind the panel. Default `true`. */\n hasBackdrop?: boolean;\n /** Close when the backdrop is clicked. Default `true`. */\n closeOnBackdropClick?: boolean;\n /** Close when Escape is pressed. Default `true`. */\n closeOnEscape?: boolean;\n /** Trap focus within the panel and restore it on close. Default `true`. */\n trapFocus?: boolean;\n /**\n * Move focus to the panel's first focusable element on open. Default `true`.\n * Set `false` to focus the panel itself instead — for content-led surfaces\n * (a product sheet, a preview) where focusing the close button first reads\n * as \"dismiss me\". Tab containment and focus restore are unaffected; turn\n * `trapFocus` off only if you want neither.\n */\n autoFocus?: boolean;\n /** Extra class(es) applied to the panel host element. */\n panelClass?: string | string[];\n /** Accessible role for the panel. Default `dialog`. */\n role?: 'dialog' | 'alertdialog' | 'menu' | 'listbox';\n /** `aria-label` for the panel when no visible title is wired up. */\n ariaLabel?: string;\n /** A custom injector to use as the parent for the rendered component. */\n injector?: Injector;\n}\n\n/**\n * State saved while body scroll is locked. iOS Safari ignores\n * `overflow: hidden` for touch scrolling, so the lock also fixes the body in\n * place at the current scroll offset (`position: fixed; top: -scrollY`) and\n * jumps back to that offset when the last overlay closes.\n */\ninterface BodyScrollLock {\n scrollY: number;\n /** The body's own inline styles before the lock, restored verbatim. */\n prev: Record<\n 'position' | 'top' | 'left' | 'right' | 'width' | 'overflow',\n string\n >;\n}\n\n/**\n * Body-level elements a modal must NOT inert:\n * - `[popover]` — anchored panels / tooltips teleport to `document.body` and\n * may open ABOVE the dialog after it (a select inside a dialog); inerting\n * them would kill the very widget the dialog just opened.\n * - toast / snackbar containers — transient status surfaces that must stay\n * reachable and announceable while a dialog is up.\n * - `[aria-live]` — the live announcer region; an inert live region stops\n * announcing entirely.\n */\nconst INERT_EXEMPT_SELECTOR =\n '[popover], [aria-live], mk-toast-container, mk-snackbar-container';\n\n/**\n * Lightweight, dependency-free overlay renderer. Instantiates a standalone\n * component into a body-level host, manages the backdrop, focus trapping,\n * Escape handling, and scroll locking. Powers Dialog, Menu, and others.\n */\n@Injectable({ providedIn: 'root' })\nexport class MkOverlayService implements OnDestroy {\n private readonly appRef = inject(ApplicationRef);\n private readonly envInjector = inject(EnvironmentInjector);\n private readonly document = inject(DOCUMENT);\n private readonly overlayRoot = inject(MK_OVERLAY_ROOT);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n // All coordination state lives on the INSTANCE, not the module: the service\n // is a root singleton, so one app still shares one stack — but each test\n // injector gets a fresh world instead of leaking overlays/locks/listeners\n // across spec files that share a worker.\n\n /** Reference count for the body scroll lock (first open locks, last close unlocks). */\n private openOverlays = 0;\n private bodyScrollLock: BodyScrollLock | null = null;\n\n /**\n * Every overlay currently on screen, in open order (Map preserves insertion\n * order, so the last entry is the topmost). Kept so {@link closeAll} can\n * dismiss them and so the shared Escape listener can find the topmost\n * dismissible overlay. Entries remove themselves on dispose.\n */\n private readonly openRefs = new Map<\n MkOverlayRef<unknown>,\n { closeOnEscape: boolean }\n >();\n\n /** The document currently carrying the shared Escape listener, if any. */\n private escapeListenerDoc: Document | null = null;\n\n /**\n * The one document-level Escape listener, shared by every open overlay.\n *\n * Registered on the BUBBLE phase on purpose: widgets living inside an\n * overlay (a menu, an anchored panel, a picker) handle Escape on their own\n * elements during bubbling and call `preventDefault()`, so a consumed\n * Escape arrives here already `defaultPrevented` and closes nothing. A\n * per-overlay capture listener with `stopPropagation()` cannot do this:\n * stopPropagation does not stop OTHER listeners on the same target, so one\n * Escape used to close every stacked overlay at once.\n */\n private readonly onDocumentEscape = (event: KeyboardEvent): void => {\n if (event.key !== 'Escape' || event.defaultPrevented) return;\n // Close ONLY the topmost open overlay that opted into Escape dismissal.\n const entries = [...this.openRefs.entries()];\n for (let i = entries.length - 1; i >= 0; i--) {\n const [ref, { closeOnEscape }] = entries[i];\n if (closeOnEscape) {\n ref.close();\n event.preventDefault();\n return;\n }\n }\n };\n\n /** (Un)register the shared Escape listener to match the open-overlay set. */\n private syncEscapeListener(doc: Document): void {\n const needed = [...this.openRefs.values()].some((e) => e.closeOnEscape);\n if (needed && this.escapeListenerDoc === null) {\n doc.addEventListener('keydown', this.onDocumentEscape);\n this.escapeListenerDoc = doc;\n } else if (!needed && this.escapeListenerDoc !== null) {\n this.escapeListenerDoc.removeEventListener(\n 'keydown',\n this.onDocumentEscape,\n );\n this.escapeListenerDoc = null;\n }\n }\n\n private lockBodyScroll(doc: Document): void {\n const { style } = doc.body;\n this.bodyScrollLock = {\n scrollY: doc.defaultView?.scrollY ?? 0,\n prev: {\n position: style.position,\n top: style.top,\n left: style.left,\n right: style.right,\n width: style.width,\n overflow: style.overflow,\n },\n };\n // overflow:hidden still does the whole job on desktop (and avoids a\n // scroll jump there); the fixed-body treatment is what actually stops iOS\n // touch scrolling. `top: -scrollY` keeps the page visually where it was.\n style.overflow = 'hidden';\n style.position = 'fixed';\n style.top = `-${this.bodyScrollLock.scrollY}px`;\n style.left = '0';\n style.right = '0';\n style.width = '100%';\n }\n\n private unlockBodyScroll(doc: Document): void {\n if (!this.bodyScrollLock) return;\n const { scrollY, prev } = this.bodyScrollLock;\n this.bodyScrollLock = null;\n const { style } = doc.body;\n style.position = prev.position;\n style.top = prev.top;\n style.left = prev.left;\n style.right = prev.right;\n style.width = prev.width;\n style.overflow = prev.overflow;\n // Fixing the body collapsed the document's scroll position to 0; jump\n // back instantly (never smooth — the restoration must be invisible).\n // Guarded for jsdom, where scrollTo is unimplemented.\n const view = doc.defaultView;\n if (scrollY !== 0 && typeof view?.scrollTo === 'function') {\n view.scrollTo({ top: scrollY, behavior: 'instant' });\n }\n }\n\n /** How many overlays are currently open. */\n get openCount(): number {\n return this.openRefs.size;\n }\n\n /**\n * Close every open overlay, newest first. Each is closed with no result, so\n * `afterClosed` resolves undefined exactly as a backdrop click or Escape\n * would. Safe to call when nothing is open.\n */\n closeAll(): void {\n // Iterate a COPY: close() disposes synchronously, which mutates the map.\n for (const ref of [...this.openRefs.keys()].reverse()) ref.close();\n }\n\n /**\n * Injector teardown closes everything still open. In an app this runs only\n * at shutdown; in tests it runs on every `TestBed.resetTestingModule()`,\n * so an overlay a spec forgot to close cannot leak its scroll lock, focus\n * trap, inert marks, or document listeners into later spec files sharing\n * the worker.\n */\n ngOnDestroy(): void {\n this.closeAll();\n }\n\n open<TComponent, TResult = unknown, TData = unknown>(\n component: Type<TComponent>,\n config: MkOverlayConfig<TData> = {},\n ): MkOverlayRef<TResult, TComponent> {\n const {\n hasBackdrop = true,\n closeOnBackdropClick = true,\n closeOnEscape = true,\n trapFocus = true,\n autoFocus = true,\n role = 'dialog',\n } = config;\n\n const overlayRef = new MkOverlayRef<TResult, TComponent>();\n\n if (!this.isBrowser) {\n // Nothing to render on the server; return an inert ref.\n return overlayRef;\n }\n\n const container = this.document.createElement('div');\n container.className = 'mk-overlay-container';\n container.style.cssText =\n 'position:fixed;inset:0;z-index:var(--mk-z-overlay,1000);display:flex;align-items:center;justify-content:center;';\n if (!hasBackdrop) {\n // Without a scrim the fullscreen container must not swallow clicks\n // meant for the page; the panel re-enables pointer events for itself.\n container.style.pointerEvents = 'none';\n }\n\n let backdrop: HTMLElement | undefined;\n if (hasBackdrop) {\n backdrop = this.document.createElement('div');\n backdrop.className = 'mk-overlay-backdrop';\n backdrop.style.cssText =\n 'position:absolute;inset:0;background:var(--mk-overlay-scrim,rgba(0,0,0,0.45));animation:mk-overlay-fade var(--mk-duration-fast,140ms) var(--mk-ease-out,ease);';\n container.appendChild(backdrop);\n if (closeOnBackdropClick) {\n backdrop.addEventListener('click', () => overlayRef.close());\n }\n }\n\n const panel = this.document.createElement('div');\n panel.className = 'mk-overlay-panel';\n if (config.panelClass) {\n const classes = Array.isArray(config.panelClass)\n ? config.panelClass\n : [config.panelClass];\n panel.classList.add(...classes);\n }\n panel.style.cssText = 'position:relative;max-width:100%;max-height:100%;';\n if (!hasBackdrop) panel.style.pointerEvents = 'auto';\n panel.setAttribute('role', role);\n panel.setAttribute('aria-modal', role === 'menu' ? 'false' : 'true');\n if (config.ariaLabel) panel.setAttribute('aria-label', config.ariaLabel);\n container.appendChild(panel);\n\n // Create the component with an injector exposing the data + ref.\n const componentRef = createComponent(component, {\n environmentInjector: this.envInjector,\n hostElement: panel,\n elementInjector: Injector.create({\n parent: config.injector ?? this.envInjector,\n providers: [\n { provide: MK_OVERLAY_DATA, useValue: config.data ?? null },\n { provide: MkOverlayRef, useValue: overlayRef },\n ],\n }),\n });\n overlayRef.componentRef = componentRef;\n this.appRef.attachView(componentRef.hostView);\n\n this.overlayRoot().appendChild(container);\n\n // Lock body scroll while any overlay is open (see lockBodyScroll for the\n // iOS-proof fixed-body technique and the reference counting).\n if (this.openOverlays++ === 0) {\n this.lockBodyScroll(this.document);\n }\n\n // Make the rest of the page inert while a MODAL overlay is open —\n // `aria-modal=\"true\"` alone does not stop Tab or a screen reader's\n // reading cursor from reaching background content (WCAG 2.4.3 / 1.3.2).\n // A backdropless overlay is deliberately non-blocking, so it inerts\n // nothing. Only the elements THIS overlay inerted are recorded, so\n // nested modals unwind correctly: the inner dialog skips (and therefore\n // never un-inerts) whatever the outer dialog already inerted.\n const isModal = hasBackdrop && role !== 'menu';\n const inerted: Element[] = [];\n if (isModal) {\n // With a custom MK_OVERLAY_ROOT the container is nested (possibly behind\n // a shadow boundary), so resolve which body child carries it — that one\n // must stay interactive.\n const containerHost = mkBodyLevelAncestor(container, this.document.body);\n for (const sibling of Array.from(this.document.body.children)) {\n if (\n sibling === containerHost ||\n sibling.hasAttribute('inert') ||\n sibling.matches(INERT_EXEMPT_SELECTOR)\n ) {\n continue;\n }\n sibling.setAttribute('inert', '');\n inerted.push(sibling);\n }\n }\n\n // Focus management.\n const focusTrap = trapFocus ? new MkFocusTrap(panel) : undefined;\n // `autoFocus: false` focuses the panel rather than its first control, so\n // the trap still contains Tab and restores focus on close.\n focusTrap?.activate(autoFocus ? undefined : panel);\n\n // Escape handling goes through ONE shared document listener (see\n // `onDocumentEscape`) so stacked overlays close one per keypress,\n // topmost first, and inner widgets can consume Escape before us.\n this.openRefs.set(overlayRef as MkOverlayRef<unknown>, { closeOnEscape });\n this.syncEscapeListener(this.document);\n\n overlayRef._dispose = () => {\n this.openRefs.delete(overlayRef as MkOverlayRef<unknown>);\n this.syncEscapeListener(this.document);\n for (const el of inerted) el.removeAttribute('inert');\n focusTrap?.release();\n // ApplicationRef destroys its views before root-injector destroy hooks\n // run — detaching then would throw (same guard as MkTourService).\n if (!this.appRef.destroyed) this.appRef.detachView(componentRef.hostView);\n componentRef.destroy();\n container.remove();\n if (--this.openOverlays === 0) {\n this.unlockBodyScroll(this.document);\n }\n };\n\n return overlayRef;\n }\n}\n","import {\n AfterViewInit,\n DOCUMENT,\n Directive,\n ElementRef,\n OnDestroy,\n PLATFORM_ID,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { MK_OVERLAY_ROOT } from './overlay-root';\nimport type { MkPlacement } from '../types';\n\n/**\n * The pure positioning maths is delegated to `@mk-kit/core` — the exported\n * names are unchanged.\n */\nexport {\n mkComputeAnchoredPosition,\n type MkAnchoredPosition,\n type MkAnchoredPositionOptions,\n} from '@mk-kit/core';\nimport { mkComputeAnchoredPosition } from '@mk-kit/core';\n\n/**\n * Never shrink a panel below this via the viewport size cap — a sub-120px\n * dropdown is unusable; at that point overflowing beats collapsing.\n */\nconst MIN_SIZE_CAP = 120;\n\n/** The rect shape `mkComputeAnchoredPosition` reads (a `DOMRect` qualifies). */\ninterface MkRectLike {\n top: number;\n left: number;\n right: number;\n bottom: number;\n width: number;\n height: number;\n}\n\n/**\n * Anchored-overlay directive. Apply it to a floating panel element (a dropdown\n * list, calendar, menu, …) that is rendered inside its component's own template\n * — typically inside an `@if (open()) { … }` block. On init the directive\n * **teleports the panel to `document.body` and into the browser top layer** via\n * the native Popover API (`popover=\"manual\"` + `showPopover()`), then positions\n * it against the anchor with `position: fixed`. Because the element stays part\n * of the component's Angular view, all bindings, `@for` content, events and\n * projected content keep working after the move.\n *\n * The top layer is immune to ancestor `overflow`, `transform` and `z-index`\n * stacking contexts, so the panel can never be clipped by a container or hidden\n * behind sibling content. Where the Popover API is unavailable the panel still\n * renders in a `document.body` portal with a `z-index` fallback.\n *\n * ```html\n * <ul #panel mkAnchoredPanel [mkAnchoredPanelFor]=\"trigger\" [matchWidth]=\"true\"\n * (dismiss)=\"close()\"> … </ul>\n * ```\n */\n@Directive({\n selector: '[mkAnchoredPanel]',\n exportAs: 'mkAnchoredPanel',\n})\nexport class MkAnchoredPanel implements AfterViewInit, OnDestroy {\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly document = inject(DOCUMENT);\n private readonly overlayRoot = inject(MK_OVERLAY_ROOT);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n /** The trigger element to position against. */\n readonly anchor = input<HTMLElement | ElementRef<HTMLElement> | undefined>(\n undefined,\n { alias: 'mkAnchoredPanelFor' },\n );\n /** Viewport-point anchor (e.g. a right-click position) — takes precedence. */\n readonly anchorRect = input<{ x: number; y: number } | undefined>(undefined);\n /** Preferred placement relative to the anchor. */\n readonly placement = input<MkPlacement>('bottom-start');\n /** Distance in px between the anchor and the panel. */\n readonly gap = input(4);\n /** Set the panel's `min-width` to the anchor's width (dropdowns). */\n readonly matchWidth = input(false);\n /** Flip to the opposite side when the preferred side would overflow. */\n readonly flip = input(true);\n /** Clamp the panel inside the viewport. */\n readonly clamp = input(true);\n\n /**\n * Predicate consulted before an outside pointerdown dismisses the panel.\n * Return `true` for targets that must keep it open — e.g. a nested panel\n * (a submenu) that lives in the top layer outside this element.\n */\n readonly keepOpenWhen = input<((target: Node) => boolean) | null>(null);\n /** Emitted on an outside pointerdown or when the window loses focus. */\n readonly dismiss = output<void>();\n\n private popover = false;\n /** Whether {@link position} applied an inline viewport size cap (`max-*`). */\n private sizeCapped = false;\n\n private repositionRaf: number | null = null;\n /**\n * Scroll-driven repositions track the anchor without clamping, so the\n * panel follows its trigger instead of detaching and hugging the viewport\n * edge; open/resize positioning clamps as usual.\n */\n private pendingTrack = true;\n /** rAF-coalesced repositioning — at most one layout pass per frame. */\n private reposition(track: boolean): void {\n // A clamped (open/resize) request in the same frame wins over tracking.\n this.pendingTrack &&= track;\n if (this.repositionRaf != null) return;\n this.repositionRaf =\n this.document.defaultView?.requestAnimationFrame(() => {\n this.repositionRaf = null;\n const wasTrack = this.pendingTrack;\n this.pendingTrack = true;\n this.position(wasTrack);\n }) ?? null;\n }\n private readonly onScroll = () => this.reposition(true);\n private readonly onResize = () => this.reposition(false);\n private readonly onDocPointerdown = (e: Event) => {\n const target = e.target as Node;\n if (this.host.nativeElement.contains(target)) return;\n const anchorEl = this.resolveAnchorEl();\n if (anchorEl?.contains(target)) return;\n if (this.keepOpenWhen()?.(target)) return;\n this.dismiss.emit();\n };\n private readonly onWindowBlur = () => this.dismiss.emit();\n\n ngAfterViewInit(): void {\n if (!this.isBrowser) return;\n const el = this.host.nativeElement;\n\n el.style.position = 'fixed';\n el.style.margin = '0';\n el.style.inset = 'auto';\n // setProperty (not .style.zIndex) so the CSS var() value is accepted. Only\n // matters in the no-Popover fallback; the top layer ignores z-index.\n el.style.setProperty('z-index', 'var(--mk-z-menu)');\n\n this.overlayRoot().appendChild(el);\n\n // Promote into the top layer when the Popover API is available.\n const withPopover = el as HTMLElement & {\n showPopover?: () => void;\n hidePopover?: () => void;\n };\n if (typeof withPopover.showPopover === 'function') {\n el.setAttribute('popover', 'manual');\n try {\n withPopover.showPopover();\n this.popover = true;\n } catch {\n // Already open or unsupported context — fall back to the body portal.\n // The attribute must go too: with it left on, the UA sheet's\n // `[popover]:not(:popover-open) { display: none }` hides the panel.\n el.removeAttribute('popover');\n this.popover = false;\n }\n }\n\n this.position();\n\n const view = this.document.defaultView;\n view?.addEventListener('scroll', this.onScroll, {\n capture: true,\n passive: true,\n });\n view?.addEventListener('resize', this.onResize);\n view?.addEventListener('blur', this.onWindowBlur);\n // iOS's software keyboard (and pinch-zoom) resizes/pans only the VISUAL\n // viewport — `window` never fires resize/scroll for it — so listen there\n // too, into the same reposition paths. Feature-detected: jsdom and older\n // browsers have no visualViewport.\n const visual = view?.visualViewport;\n visual?.addEventListener('resize', this.onResize);\n visual?.addEventListener('scroll', this.onScroll);\n this.document.addEventListener('pointerdown', this.onDocPointerdown, true);\n\n // Re-measure once layout has settled (fonts, async content).\n view?.requestAnimationFrame(() => this.position());\n }\n\n /**\n * Recompute and apply the panel position. Safe to call at any time.\n * With `track` (scroll-driven), the panel follows the anchor unclamped and\n * dismisses once the anchor leaves the viewport (matching the CDK's\n * reposition-with-auto-close scroll behaviour).\n */\n position(track = false): void {\n if (!this.isBrowser) return;\n const el = this.host.nativeElement;\n const view = this.document.defaultView;\n if (!view) return;\n\n const anchor = this.resolveAnchorRect();\n if (!anchor) return;\n\n // Prefer the visual viewport when it exists and is measured: on iOS the\n // software keyboard shrinks only `visualViewport`, never the layout\n // viewport, so clamp/flip maths against `documentElement.client*` would\n // keep placing panels underneath the keyboard. Fallback (no visualViewport,\n // or one reporting 0×0 pre-measure) keeps the existing behaviour, including\n // the jsdom \"unmeasured viewport\" guards below.\n const visual = view.visualViewport;\n const useVisual = visual != null && visual.width > 0 && visual.height > 0;\n const vw = useVisual ? visual.width : this.document.documentElement.clientWidth;\n const vh = useVisual ? visual.height : this.document.documentElement.clientHeight;\n\n // Anchor scrolled fully out of view — the panel would float detached.\n // Zero-size anchor rects and a zero-size viewport are skipped: they mean\n // \"not yet measured\" (jsdom, SSR hydration), not \"off-screen\".\n if (\n track &&\n !this.anchorRect() &&\n vw > 0 &&\n vh > 0 &&\n (anchor.width > 0 || anchor.height > 0) &&\n (anchor.bottom <= 0 || anchor.top >= vh || anchor.right <= 0 || anchor.left >= vw)\n ) {\n this.dismiss.emit();\n return;\n }\n\n if (this.matchWidth() && anchor.width > 0) {\n el.style.minWidth = `${Math.round(anchor.width)}px`;\n }\n\n const gap = this.gap();\n\n // Viewport size cap: a panel wider or taller than the screen (a fat menu\n // on a 360px phone) gets an inline `max-width`/`max-height` so it scrolls\n // internally instead of overflowing. An inline max-* OVERRIDES any\n // stylesheet max (e.g. a select list's own 16rem max-height), so the cap\n // is applied only when the panel's NATURAL size exceeds it — it never\n // enlarges a panel that already limits itself. A previously applied cap is\n // cleared first so the natural size is re-measured against the current\n // viewport. Scroll-tracking frames skip all of this: the viewport has not\n // resized mid-scroll, and clearing/re-measuring would force two extra\n // reflows per frame.\n if (!track && this.sizeCapped) {\n el.style.removeProperty('max-width');\n el.style.removeProperty('max-height');\n this.sizeCapped = false;\n }\n let rect = el.getBoundingClientRect();\n if (!track && vw > 0 && vh > 0) {\n const capW = Math.max(MIN_SIZE_CAP, Math.floor(vw - 2 * gap));\n const capH = Math.max(MIN_SIZE_CAP, Math.floor(vh - 2 * gap));\n const capWidth = rect.width > capW;\n const capHeight = rect.height > capH;\n if (capWidth) el.style.maxWidth = `${capW}px`;\n if (capHeight) el.style.maxHeight = `${capH}px`;\n if (capWidth || capHeight) {\n this.sizeCapped = true;\n rect = el.getBoundingClientRect();\n }\n }\n\n const pos = mkComputeAnchoredPosition(\n anchor,\n { width: rect.width, height: rect.height },\n { width: vw, height: vh },\n {\n placement: this.placement(),\n gap,\n flip: this.flip(),\n clamp: this.clamp() && !track,\n rtl: this.isAnchorRtl(),\n },\n );\n el.style.top = `${pos.top}px`;\n el.style.left = `${pos.left}px`;\n el.setAttribute('data-placement', pos.placement);\n }\n\n /** Whether the anchor renders in a right-to-left context. */\n private isAnchorRtl(): boolean {\n const el = this.resolveAnchorEl();\n const view = this.document.defaultView;\n if (!el || !view) return false;\n return view.getComputedStyle(el).direction === 'rtl';\n }\n\n private resolveAnchorEl(): HTMLElement | null {\n const a = this.anchor();\n if (!a) return null;\n return a instanceof ElementRef ? a.nativeElement : a;\n }\n\n private resolveAnchorRect(): MkRectLike | null {\n const point = this.anchorRect();\n if (point) {\n return {\n top: point.y,\n left: point.x,\n right: point.x,\n bottom: point.y,\n width: 0,\n height: 0,\n };\n }\n return this.resolveAnchorEl()?.getBoundingClientRect() ?? null;\n }\n\n ngOnDestroy(): void {\n if (!this.isBrowser) return;\n const el = this.host.nativeElement;\n const view = this.document.defaultView;\n if (this.repositionRaf != null) {\n view?.cancelAnimationFrame(this.repositionRaf);\n this.repositionRaf = null;\n }\n view?.removeEventListener('scroll', this.onScroll, true);\n view?.removeEventListener('resize', this.onResize);\n view?.removeEventListener('blur', this.onWindowBlur);\n const visual = view?.visualViewport;\n visual?.removeEventListener('resize', this.onResize);\n visual?.removeEventListener('scroll', this.onScroll);\n this.document.removeEventListener('pointerdown', this.onDocPointerdown, true);\n\n const withPopover = el as HTMLElement & { hidePopover?: () => void };\n if (this.popover && typeof withPopover.hidePopover === 'function') {\n try {\n withPopover.hidePopover();\n } catch {\n // Ignore — the element may already be disconnected.\n }\n el.removeAttribute('popover');\n }\n\n // Remove the teleported node ourselves. It was moved out of the component's\n // view into `document.body`, so Angular's view teardown removes it by\n // reference (`node.remove()`); re-inserting it anywhere would orphan a\n // detached copy, leaking one panel per open/close cycle. A plain remove is\n // idempotent whichever teardown step runs first.\n el.remove();\n }\n}\n","import { InjectionToken, type Provider } from '@angular/core';\n\n/** Direction passed to the sort announcer. */\nexport type MkSortAnnounceDirection = 'asc' | 'desc';\n\n/**\n * Localised date-name tables consumed by the calendar, the date/month/week\n * pickers and `formatDate`. All arrays are full-length (12 months, 7 weekdays\n * starting with Sunday) — override the whole set for a locale.\n */\nexport type { MkDateNames } from '@mk-kit/core';\nimport type { MkDateNames } from '@mk-kit/core';\n\n/** Strings used by the block editor's chrome. */\nexport interface MkBlockEditorStrings {\n addBlock: string;\n addFirstBlock: string;\n insertBlockHere: string;\n blockInserter: string;\n searchBlocks: string;\n blocks: string;\n moveBlockUp: string;\n moveBlockDown: string;\n blockOptions: string;\n duplicate: string;\n remove: string;\n textFormatting: string;\n altText: string;\n caption: string;\n alignment: string;\n replaceImage: string;\n imageUrl: string;\n externalContent: string;\n embedUrl: string;\n columnSettings: string;\n columns: string;\n ratio: string;\n gap: string;\n align: string;\n justify: string;\n headingLevel: (level: number) => string;\n /** Editor region label + empty-block placeholder defaults. */\n editorLabel: string;\n emptyBlockPlaceholder: string;\n /** Drag handle tooltip. */\n dragHandle: string;\n /** \"Turn into …\" transform menu item; receives the target block's label. */\n turnInto: (label: string) => string;\n /** Shown for a block whose type has no registered definition. */\n unknownBlock: (type: string) => string;\n /** Structural-change screen-reader announcements. */\n blockAdded: (label: string) => string;\n blockDuplicated: string;\n blockDeleted: (label: string) => string;\n blockMovedUp: string;\n blockMovedDown: string;\n turnedInto: (label: string) => string;\n /** Inserter empty state; receives the search query. */\n noBlocksMatch: (query: string) => string;\n /** Built-in palette group headings. */\n groupText: string;\n groupMedia: string;\n groupLayout: string;\n /** Built-in block labels + inserter descriptions. */\n blockParagraph: string;\n blockParagraphDesc: string;\n blockHeading: string;\n blockHeadingDesc: string;\n blockList: string;\n blockListDesc: string;\n blockQuote: string;\n blockQuoteDesc: string;\n blockCode: string;\n blockCodeDesc: string;\n blockImage: string;\n blockImageDesc: string;\n blockEmbed: string;\n blockEmbedDesc: string;\n blockButton: string;\n blockButtonDesc: string;\n blockDivider: string;\n blockDividerDesc: string;\n blockColumns: string;\n blockColumnsDesc: string;\n /** Rich-text inline toolbar. */\n bold: string;\n italic: string;\n underline: string;\n strikethrough: string;\n inlineCode: string;\n link: string;\n clearFormatting: string;\n /** Prompt asking for a link URL. */\n linkUrlPrompt: string;\n /** Default label of the editable rich-text region. */\n editableText: string;\n /** Heading block. */\n headingPlaceholder: (level: number) => string;\n headingLevelGroup: string;\n /** List block. */\n listStyle: string;\n bulleted: string;\n numbered: string;\n listItem: string;\n /** Quote block. */\n quoteText: string;\n citation: string;\n addCitation: string;\n /** Code block. */\n codeLanguage: string;\n codeLanguagePlaceholder: string;\n enterCode: string;\n /** Image block. */\n imageWidth: (percent: number) => string;\n uploading: string;\n dropImagePrompt: string;\n chooseFile: string;\n pasteImageUrl: string;\n notAnImage: string;\n uploadFailed: string;\n imageAdded: string;\n /** Embed block. */\n pasteEmbedUrl: string;\n embedFallbackNote: string;\n embedTitle: (provider: string) => string;\n embedAdded: (provider: string) => string;\n embeddedContent: string;\n /** Button block settings. */\n buttonLabel: string;\n buttonLink: string;\n buttonTone: string;\n buttonVariant: string;\n /** Label a freshly inserted Button block starts with. */\n buttonDefaultLabel: string;\n /** Alignment option captions (image + button blocks). */\n alignLeft: string;\n alignCenter: string;\n alignRight: string;\n /** Tone option captions (button block swatches). */\n tonePrimary: string;\n toneNeutral: string;\n toneSuccess: string;\n toneWarning: string;\n toneDanger: string;\n toneInfo: string;\n /** Variant option captions (button block). */\n variantSolid: string;\n variantSoft: string;\n variantOutline: string;\n /** Columns settings option captions. */\n ratioEqual: string;\n alignStretch: string;\n alignTop: string;\n alignMiddle: string;\n alignBottom: string;\n justifyStart: string;\n justifyCenter: string;\n justifyEnd: string;\n justifyBetween: string;\n}\n\n/**\n * Messages rendered by `mk-form-field` for the validation errors the library's\n * own controls produce, plus the standard Angular `Validators` keys, so a\n * field wrapping any control shows something sensible without per-form wiring.\n *\n * Keys match the `ValidationErrors` keys exactly and each entry receives that\n * key's error payload. Override any subset through\n * `provideMkI18n({ validation: … })`, or a whole map per field via\n * `mk-form-field`'s `errorMessages` input.\n */\nexport interface MkValidationStrings {\n /** `Validators.required` — also emitted by checkbox and radio-group. */\n required: string;\n /** `Validators.email`. */\n email: string;\n /** `Validators.min`, and the numeric controls' `[min]`. */\n min: (err: { min: number; actual: number }) => string;\n /** `Validators.max`, and the numeric controls' `[max]`. */\n max: (err: { max: number; actual: number }) => string;\n /** `Validators.minLength` — also emitted by password-input and OTP. */\n minlength: (err: { requiredLength: number; actualLength: number }) => string;\n /** `Validators.maxLength`. */\n maxlength: (err: { requiredLength: number; actualLength: number }) => string;\n /** `Validators.pattern`. */\n pattern: string;\n /** A date/month/week picker's `[min]`. */\n mkMinDate: (err: { min: Date; actual: Date }) => string;\n /** A date/month/week picker's `[max]`. */\n mkMaxDate: (err: { max: Date; actual: Date }) => string;\n /** A date rejected by a calendar's `[disabledDate]` predicate. */\n mkDateFilter: string;\n /** A range picker with only one end filled in. */\n mkDateRangeIncomplete: string;\n /** The time-picker's `[min]`. */\n mkMinTime: (err: { min: string; actual: string }) => string;\n /** The time-picker's `[max]`. */\n mkMaxTime: (err: { max: string; actual: string }) => string;\n /** More items than a multi-select's, tag-input's or upload's `[max*]` allows. */\n mkMaxItems: (err: { max: number; actual: number }) => string;\n /** A file larger than a file-upload's `[maxSize]`. */\n mkFileSize: (err: { max: number; maxLabel: string; name: string }) => string;\n /** A file not matching a file-upload's `[accept]` filter. */\n mkFileType: (err: { accept: string; name: string }) => string;\n /** A card number failing the Luhn checksum. */\n cardNumber: string;\n /** An IBAN failing the mod-97 checksum. */\n iban: (err: { country: string; expectedLength: number | null }) => string;\n /** A postal code not matching the country's format. */\n postalCode: (err: { country: string; example: string }) => string;\n /** A tax identifier not matching the country's format or checksum. */\n taxId: (err: { country: string; label: string; example: string }) => string;\n /** Fallback for an error key with no message of its own. */\n unknown: string;\n}\n\n/**\n * All user-facing strings the library renders itself (aria-labels, empty-state\n * text, control captions and screen-reader announcements). Consumers localise\n * the library by overriding any subset via {@link provideMkI18n}. Interpolated\n * strings are functions so translators control word order.\n */\nexport interface MkI18nStrings {\n // --- Locale ---------------------------------------------------------------\n /**\n * BCP 47 locale tag (`'pl-PL'`, `'de'`) used by the formatting pipes\n * (`mkCurrency`, `mkRelativeTime`, `mkFileSize`, `mkPluralize`) and any\n * other `Intl`-based formatting that has no explicit locale of its own.\n * Unset → the runtime (browser / Node) default locale.\n */\n locale?: string;\n /**\n * ISO 4217 currency code the `mkCurrency` pipe falls back to when the\n * template passes none. Unset → `'USD'`.\n */\n currency?: string;\n\n // --- Validation -----------------------------------------------------------\n /** Validation messages (deep-merged by provideMkI18n). */\n validation: MkValidationStrings;\n\n // --- Generic controls -----------------------------------------------------\n /** Generic \"Close\" control (dialog, drawer, bottom-sheet). */\n close: string;\n /** Generic \"Dismiss\" control (alert, banner, toast, snackbar). */\n dismiss: string;\n /** Clear-input control (autocomplete, pickers, tag inputs). */\n clear: string;\n /** Generic confirm action (confirm dialog, popconfirm). */\n confirm: string;\n /** Generic cancel action (dialogs, inline edit). */\n cancel: string;\n /** Generic acknowledge action (alert/prompt dialogs). */\n ok: string;\n /** Generic save action (inline edit). */\n save: string;\n /** Default action-button caption (submit input). */\n submit: string;\n /** Generic edit affordance (inline edit trigger). */\n edit: string;\n /** Generic remove control (chip). */\n remove: string;\n /** Remove a named item (tag input chips, file upload rows). */\n removeItem: (name: string) => string;\n /** Placeholder shown for an empty editable value (inline edit, mini date). */\n empty: string;\n /** \"Optional\" marker (stepper). */\n optional: string;\n /** Filter/search field placeholder (transfer list). */\n filter: string;\n /** Default confirmation question (popconfirm). */\n confirmMessage: string;\n /** Decrease control (number input). */\n decrease: string;\n /** Increase control (number input). */\n increase: string;\n\n // --- Async / empty states ---------------------------------------------------\n /** Async loading row (autocomplete, multi-select). */\n loading: string;\n /** Empty listbox with no options (select, time picker). */\n noOptions: string;\n /** Empty async/filtered results (autocomplete, multi-select, command palette). */\n noResults: string;\n /** Empty data table / list. */\n noData: string;\n /** Announced when a filterable list updates (autocomplete, multi-select, command palette). */\n resultsCount: (count: number) => string;\n\n // --- Pagination / carousel ---------------------------------------------------\n /** Pagination: previous page control. */\n previousPage: string;\n /** Pagination: next page control. */\n nextPage: string;\n /** Pagination: jump to a page. */\n goToPage: (page: number) => string;\n /** Pagination landmark label. */\n paginationLabel: string;\n /** Carousel: previous slide control. */\n previousSlide: string;\n /** Carousel: next slide control. */\n nextSlide: string;\n /** Carousel: jump to a slide. */\n goToSlide: (slide: number) => string;\n /** Carousel region label. */\n carouselLabel: string;\n /** Carousel: pause / resume automatic rotation. */\n pauseSlideshow: string;\n playSlideshow: string;\n /** Carousel: slide position (slide labels + live announcements). */\n slideOf: (slide: number, total: number) => string;\n\n // --- Dates & pickers ---------------------------------------------------------\n /** Localised month/weekday name tables (deep-merged by provideMkI18n). */\n dateNames: MkDateNames;\n /** Calendar: previous month control. */\n previousMonth: string;\n /** Calendar: next month control. */\n nextMonth: string;\n /** Month picker: previous/next year (month mode). */\n previousYear: string;\n nextYear: string;\n /** Month picker: previous/next decade page (year mode). */\n previousYears: string;\n nextYears: string;\n /** Field placeholders. */\n selectDate: string;\n selectRange: string;\n selectTime: string;\n selectMonth: string;\n selectYear: string;\n selectWeek: string;\n selectPlaceholder: string;\n /** Popover dialog labels. */\n chooseDate: string;\n chooseDateRange: string;\n chooseMonth: string;\n chooseYear: string;\n chooseWeek: string;\n openCalendar: string;\n openTimeList: string;\n /** Accessible name of the chevron segment of `mk-split-button`. */\n moreActions: string;\n /** Placeholder of `mk-datetime-picker`. */\n selectDateTime: string;\n /** Dialog label of the `mk-datetime-picker` panel. */\n chooseDateTime: string;\n /** Listbox label of the time list inside `mk-datetime-picker`. */\n chooseTime: string;\n /** Toggle-button label of `mk-datetime-picker`. */\n openDateTimePicker: string;\n /** Mini-date segment names. */\n daySegment: string;\n monthSegment: string;\n yearSegment: string;\n /** Countdown unit captions. */\n countdownDays: string;\n countdownHours: string;\n countdownMinutes: string;\n countdownSeconds: string;\n /** Announced when a countdown reaches zero. */\n countdownFinished: string;\n /** Event-calendar day label suffix, e.g. `2 events: Standup, Demo`. */\n dayEvents: (count: number, titles: string) => string;\n /** Event-calendar overflow pill for events beyond `maxPerDay`, e.g. `+2 more`. */\n moreEvents: (count: number) => string;\n\n // --- Table / data grid ---------------------------------------------------------\n /** Select-all header checkbox. */\n selectAllRows: string;\n /** Per-row checkbox; receives the row's leading cell text. */\n selectRow: (row: string) => string;\n /** Hidden expander column header. */\n expandHeader: string;\n /** Row expander toggle labels. */\n expandRow: string;\n collapseRow: string;\n /** Tree-row toggle labels (`childrenKey`). */\n expandTreeRow: string;\n collapseTreeRow: string;\n /** aria-label of a group header's toggle when the group is collapsed. */\n expandGroup: string;\n /** aria-label of a group header's toggle when the group is expanded. */\n collapseGroup: string;\n /** Row count shown on a group header, e.g. \"4 items\". */\n groupCount: (count: number) => string;\n /** Column resize separator label. */\n resizeColumn: string;\n /** Announced while a column is resized by keyboard. */\n columnWidth: (column: string, width: number) => string;\n /** Announced when a column is reordered. */\n columnMoved: (column: string, position: number, total: number) => string;\n /** Hint suffix + announcement for editable cells. */\n editCell: string;\n cellSaved: (value: string) => string;\n /** Announced when a column is sorted. */\n sortedBy: (column: string, direction: MkSortAnnounceDirection) => string;\n /** Announced when sorting is removed from a column. */\n sortingCleared: (column: string) => string;\n\n // --- Forms -----------------------------------------------------------------\n /** Password reveal toggle. */\n showPassword: string;\n hidePassword: string;\n /** Password rule captions. */\n passwordRuleMinLength: (length: number) => string;\n passwordRuleUppercase: string;\n passwordRuleNumber: string;\n passwordRuleSymbol: string;\n /** Password strength label for a 0–4 score. */\n passwordStrength: (score: number) => string;\n /** Visible prefix before the strength label. */\n passwordStrengthLabel: string;\n /** Rule-state prefixes announced to screen readers. */\n ruleMet: string;\n ruleNotMet: string;\n /** OTP field labels. */\n oneTimeCode: string;\n otpDigit: (position: number) => string;\n /** Numeric keypad labels + masked-PIN progress announcement. */\n numericKeypadLabel: string;\n keypadClear: string;\n keypadBackspace: string;\n keypadDigitsEntered: (count: number, length: number) => string;\n /** On-screen keyboard label + action-key labels. */\n onScreenKeyboardLabel: string;\n keyboardShift: string;\n keyboardSpace: string;\n keyboardEnter: string;\n keyboardAltLayer: string;\n keyboardBaseLayer: string;\n /** Rating slider label + value text. */\n ratingLabel: string;\n ratingValueText: (value: number, max: number) => string;\n /** Range slider thumb labels. */\n minimum: string;\n maximum: string;\n /** Color picker labels. */\n chooseColor: string;\n hexValue: string;\n presetColors: string;\n /** Phone input: country-prefix trigger label. */\n chooseCountry: string;\n /** Phone input: search field placeholder inside the country list. */\n searchCountries: string;\n /** Phone input: default accessible label of the national-number field. */\n phoneNumber: string;\n /** Postal-code input: default accessible label. */\n postalCode: string;\n /** Currency input: default accessible label. */\n amount: string;\n /** Card-number input: default accessible label. */\n cardNumber: string;\n /** Card-number input: announced/badge text for a detected brand. */\n cardBrand: (brand: string) => string;\n /** IBAN input: default accessible label. */\n iban: string;\n /** Tax-ID input: default accessible label. */\n taxId: string;\n /** Signature pad: default accessible label of the drawing surface. */\n signature: string;\n /** JSON viewer: default accessible label of the tree. */\n jsonLabel: string;\n\n // --- Log viewer -------------------------------------------------------------\n /** Log viewer: default accessible label of the log region. */\n logViewerLabel: string;\n /** Log viewer: re-attach-to-tail button. */\n logFollow: string;\n /** Log viewer: copy-the-whole-buffer toolbar button. */\n logCopyAll: string;\n /** Log viewer: soft-wrap toolbar toggle. */\n logWrapLines: string;\n\n // --- Org chart --------------------------------------------------------------\n /** Org chart: default accessible label of the tree. */\n orgChartLabel: string;\n /** Org chart: aria-label of a collapsed node's toggle (`{label}` = node label). */\n orgChartExpand: string;\n /** Org chart: aria-label of an expanded node's toggle (`{label}` = node label). */\n orgChartCollapse: string;\n\n // --- Chat -------------------------------------------------------------------\n /** Chat: accessible name of the message log. */\n chatLabel: string;\n /** Chat: accessible name of the composer textarea. */\n chatComposerLabel: string;\n /** Chat: composer placeholder. */\n chatPlaceholder: string;\n /** Chat: send button. */\n chatSend: string;\n /** Chat: stop-generating button (replaces send while busy). */\n chatStop: string;\n /** Chat: attach-files button. */\n chatAttach: string;\n /** Chat: remove one pending attachment. */\n chatRemoveAttachment: string;\n /** Chat: group label of pending / shown attachments. */\n chatAttachments: string;\n /** Chat: group label of quick-reply suggestions. */\n chatSuggestions: string;\n /** Chat: copy-message button. */\n chatCopy: string;\n /** Chat: retry a failed message. */\n chatRetry: string;\n /** Chat: typing indicator. */\n chatTyping: string;\n /** Chat: screen-reader text while a reply streams in. */\n chatStreaming: string;\n /** Chat: scroll-to-newest button. */\n chatJumpToLatest: string;\n /** Chat: empty-state text. */\n chatEmpty: string;\n /** Chat: author fallback for the user's own messages. */\n chatYou: string;\n /** Chat: author fallback for assistant messages. */\n chatAssistant: string;\n /** Chat: tool call in progress. */\n chatToolRunning: string;\n /** Chat: tool call finished. */\n chatToolDone: string;\n /** Chat: tool call failed. */\n chatToolError: string;\n\n // --- Dynamic form -----------------------------------------------------------\n /** Dynamic form: add an item to an array field. */\n dynamicFormAdd: string;\n /** Dynamic form: remove one item of an array field (index is 1-based). */\n dynamicFormRemove: (index: number) => string;\n\n // --- Query builder ----------------------------------------------------------\n /** Query builder: accessible name of the whole builder. */\n queryBuilderLabel: string;\n queryAddRule: string;\n queryAddGroup: string;\n queryRemoveRule: string;\n queryRemoveGroup: string;\n /** Combinator labels — also used by `mkQueryToText`. */\n queryAnd: string;\n queryOr: string;\n queryNot: string;\n queryField: string;\n queryOperator: string;\n queryValue: string;\n queryValueFrom: string;\n queryValueTo: string;\n queryEmptyGroup: string;\n queryTrue: string;\n queryFalse: string;\n queryOpEq: string;\n queryOpNeq: string;\n queryOpContains: string;\n queryOpNotContains: string;\n queryOpStartsWith: string;\n queryOpEndsWith: string;\n queryOpGt: string;\n queryOpGte: string;\n queryOpLt: string;\n queryOpLte: string;\n queryOpBetween: string;\n queryOpIn: string;\n queryOpNotIn: string;\n queryOpBefore: string;\n queryOpAfter: string;\n queryOpEmpty: string;\n queryOpNotEmpty: string;\n\n // --- Dialog drag / resize ---------------------------------------------------\n /** Dialog: label of the move grip (arrow keys move, Home resets). */\n dialogMove: string;\n /** Dialog: label of the resize grip (arrow keys resize, Home resets). */\n dialogResize: string;\n\n // --- Listbox ----------------------------------------------------------------\n /** Listbox: filter box placeholder / label. */\n listboxFilter: string;\n /** Listbox: shown when the filter matches nothing. */\n listboxEmpty: string;\n\n // --- Event calendar editing --------------------------------------------------\n /** Announced when an event is picked up in keyboard move mode. */\n eventCalendarGrabbed: (title: string, from: string, to: string) => string;\n /** Announced after each keyboard step: current day + time range. */\n eventCalendarPosition: (\n title: string,\n day: string,\n from: string,\n to: string,\n ) => string;\n /** Announced when a move commits. */\n eventCalendarMoved: (\n title: string,\n day: string,\n from: string,\n to: string,\n ) => string;\n /** Announced when a resize commits. */\n eventCalendarResized: (title: string, to: string) => string;\n /** Announced when an edit is aborted. */\n eventCalendarEditCancelled: string;\n /** `aria-roledescription` of an editable event pill. */\n eventCalendarMovableEvent: string;\n\n // --- Media -----------------------------------------------------------------\n /** Lightbox / gallery: previous-image control. */\n previousImage: string;\n /** Lightbox / gallery: next-image control. */\n nextImage: string;\n /** Lightbox counter + per-image aria label, e.g. `Image 2 of 8`. */\n imageOf: (index: number, total: number) => string;\n /** Gallery tile label; receives the image's alt text. */\n viewImage: (alt: string) => string;\n /** Shown in an image block whose source failed to load. */\n imageFailed: string;\n /** Cropper zoom controls. */\n zoom: string;\n zoomIn: string;\n zoomOut: string;\n /** Media gallery region label. */\n mediaLibrary: string;\n /** File upload dropzone + states. */\n dropzoneLabel: string;\n uploadFailed: string;\n retryUpload: string;\n /** Form error summary heading. */\n errorSummaryTitle: string;\n\n // --- Transfer list -----------------------------------------------------------\n /** Default column titles. */\n available: string;\n selected: string;\n /** Move-button labels; receive the target list's title. */\n transferSelected: (target: string) => string;\n transferAll: (target: string) => string;\n /** Announced after a move. */\n itemsMoved: (count: number, target: string) => string;\n\n // --- Notifications / tour ------------------------------------------------------\n notificationsTitle: string;\n allCaughtUp: string;\n markAllRead: string;\n notificationsUnread: (count: number) => string;\n /** Unread state announced per row. */\n unread: string;\n tourStepOf: (step: number, total: number) => string;\n tourSkip: string;\n tourPrevious: string;\n tourNext: string;\n tourDone: string;\n\n // --- Misc components -------------------------------------------------------\n /** Command palette input placeholder. */\n commandPalettePlaceholder: string;\n /** Command palette dialog label. */\n commandPaletteLabel: string;\n /** Stepper: step state, appended to the step's accessible name. */\n stepCompleted: string;\n stepError: string;\n /** Diff: screen-reader prefix for changed lines. */\n diffAddedLine: string;\n diffRemovedLine: string;\n /** Chip collections (tag input, multi-select): announced on add/remove. */\n itemAdded: (name: string) => string;\n itemRemoved: (name: string) => string;\n /** Splitter separator label. */\n resizePanes: string;\n /** Back-to-top button label. */\n backToTop: string;\n /** Breadcrumb nav landmark label. */\n breadcrumbLabel: string;\n /** FAB default label. */\n fabLabel: string;\n /** Diff view labels. */\n diffBefore: string;\n diffAfter: string;\n diffChanges: string;\n /** App shell. */\n skipToContent: string;\n primaryNav: string;\n\n // --- Drag & drop announcements --------------------------------------------------\n /** Announced when an item is lifted for keyboard dragging. */\n dndPickedUp: (position: number, total: number) => string;\n /** Announced as the item moves within its list. */\n dndMoved: (position: number, total: number) => string;\n /** Announced as the item moves into another list. */\n dndMovedToList: (list: string, position: number, total: number) => string;\n /** Announced when the item is dropped. */\n dndDropped: (position: number) => string;\n /** Announced as a lifted item reaches a drop zone (a target that is not a list). */\n dndMovedToZone: (zone: string) => string;\n /** Announced when the item is dropped on a zone. */\n dndDroppedInZone: (zone: string) => string;\n /** Announced when the drag is cancelled. */\n dndCancelled: string;\n\n // --- Repeater ---------------------------------------------------------------------\n /** Repeater add-row button caption (default when no `addLabel` is given). */\n repeaterAddRow: string;\n /** Repeater per-row remove button label (1-based row number). */\n repeaterRemoveRow: (index: number) => string;\n /** Repeater per-row drag-handle label (1-based row number). */\n repeaterReorderRow: (index: number) => string;\n /** Announced after a repeater row is reordered (1-based positions). */\n repeaterRowMoved: (from: number, to: number) => string;\n\n // --- File upload rejection reasons ------------------------------------------------\n fileRejectedType: (name: string) => string;\n fileRejectedSize: (name: string, limit: string) => string;\n fileRejectedCount: (name: string, max: number) => string;\n\n // --- Chart screen-reader table headers ---------------------------------------\n chartCategory: string;\n chartValue: string;\n chartSeries: string;\n chartSlice: string;\n chartStage: string;\n chartConversion: string;\n chartAxis: string;\n chartShare: string;\n chartLabel: string;\n\n // --- QR code -------------------------------------------------------------------\n /** Default accessible label of a QR code, carrying its encoded content. */\n qrCodeLabel: (text: string) => string;\n\n // --- Sortable list --------------------------------------------------------\n /** Default accessible name of `mk-sortable-list` when no `label` is given. */\n sortableListLabel: string;\n // --- Table filter row --------------------------------------------------------\n /** Table filter row: accessible name of a column's filter control. */\n filterColumn: (column: string) => string;\n /** Table filter row: the per-control clear (×) button. */\n clearFilter: (column: string) => string;\n /** Table filter row: the \"no filter\" option of a select filter. */\n filterAny: string;\n /** Table filter row: placeholder of a number / date filter (matches values ≥ the entry). */\n filterMin: string;\n\n // --- Block editor -------------------------------------------------------------\n /** Block editor chrome (deep-merged by provideMkI18n). */\n blockEditor: MkBlockEditorStrings;\n}\n\n/** The built-in English validation messages. */\nexport const MK_DEFAULT_VALIDATION: MkValidationStrings = {\n required: 'This field is required',\n email: 'Enter a valid email address',\n min: ({ min }) => `Must be ${min} or more`,\n max: ({ max }) => `Must be ${max} or less`,\n minlength: ({ requiredLength }) =>\n `Must be at least ${requiredLength} characters`,\n maxlength: ({ requiredLength }) =>\n `Must be at most ${requiredLength} characters`,\n pattern: 'Enter a value in the expected format',\n mkMinDate: ({ min }) => `Must be on or after ${min.toLocaleDateString()}`,\n mkMaxDate: ({ max }) => `Must be on or before ${max.toLocaleDateString()}`,\n mkDateFilter: 'This date is not available',\n mkDateRangeIncomplete: 'Select both a start and an end date',\n mkMinTime: ({ min }) => `Must be at or after ${min}`,\n mkMaxTime: ({ max }) => `Must be at or before ${max}`,\n mkMaxItems: ({ max }) =>\n `Select at most ${max} ${max === 1 ? 'item' : 'items'}`,\n mkFileSize: ({ name, maxLabel }) => `${name} is larger than ${maxLabel}`,\n mkFileType: ({ name }) => `${name} is not an accepted file type`,\n cardNumber: 'Enter a valid card number',\n iban: ({ expectedLength }) =>\n expectedLength\n ? `Enter a valid IBAN (${expectedLength} characters)`\n : 'Enter a valid IBAN',\n postalCode: ({ example }) => `Enter a valid postal code, e.g. ${example}`,\n taxId: ({ label, example }) => `Enter a valid ${label}, e.g. ${example}`,\n unknown: 'This value is not valid',\n};\n\n/** The built-in English date names. */\nexport const MK_DEFAULT_DATE_NAMES: MkDateNames = {\n months: [\n 'January', 'February', 'March', 'April', 'May', 'June',\n 'July', 'August', 'September', 'October', 'November', 'December',\n ],\n monthsShort: [\n 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',\n 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec',\n ],\n weekdays: [\n 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday',\n ],\n weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n weekdaysNarrow: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n};\n\nconst PASSWORD_STRENGTH_LABELS = ['Weak', 'Weak', 'Fair', 'Good', 'Strong'];\n\n/** The built-in English strings. */\nexport const MK_DEFAULT_I18N: MkI18nStrings = {\n validation: MK_DEFAULT_VALIDATION,\n\n close: 'Close',\n dismiss: 'Dismiss',\n clear: 'Clear',\n confirm: 'Confirm',\n cancel: 'Cancel',\n ok: 'OK',\n save: 'Save',\n submit: 'Submit',\n edit: 'Edit',\n remove: 'Remove',\n removeItem: (name) => `Remove ${name}`,\n empty: 'Empty',\n optional: 'Optional',\n filter: 'Filter…',\n confirmMessage: 'Are you sure?',\n decrease: 'Decrease',\n increase: 'Increase',\n\n loading: 'Loading…',\n noOptions: 'No options',\n noResults: 'No results',\n noData: 'No data to display',\n resultsCount: (count) => (count === 1 ? '1 result' : `${count} results`),\n\n previousPage: 'Go to previous page',\n nextPage: 'Go to next page',\n goToPage: (page) => `Go to page ${page}`,\n paginationLabel: 'Pagination',\n previousSlide: 'Previous slide',\n nextSlide: 'Next slide',\n goToSlide: (slide) => `Go to slide ${slide}`,\n carouselLabel: 'Carousel',\n pauseSlideshow: 'Pause slideshow',\n playSlideshow: 'Play slideshow',\n slideOf: (slide, total) => `Slide ${slide} of ${total}`,\n\n dateNames: MK_DEFAULT_DATE_NAMES,\n previousMonth: 'Previous month',\n nextMonth: 'Next month',\n previousYear: 'Previous year',\n nextYear: 'Next year',\n previousYears: 'Previous years',\n nextYears: 'Next years',\n selectDate: 'Select date…',\n selectRange: 'Select range…',\n selectTime: 'Select time…',\n selectMonth: 'Select month…',\n selectYear: 'Select year…',\n selectWeek: 'Select week…',\n selectPlaceholder: 'Select…',\n chooseDate: 'Choose date',\n chooseDateRange: 'Choose date range',\n chooseMonth: 'Choose month',\n chooseYear: 'Choose year',\n chooseWeek: 'Choose week',\n openCalendar: 'Open calendar',\n openTimeList: 'Open time list',\n moreActions: 'More actions',\n selectDateTime: 'Select date and time…',\n chooseDateTime: 'Choose date and time',\n chooseTime: 'Choose time',\n openDateTimePicker: 'Open date and time picker',\n daySegment: 'Day',\n monthSegment: 'Month',\n yearSegment: 'Year',\n countdownDays: 'days',\n countdownHours: 'hrs',\n countdownMinutes: 'min',\n countdownSeconds: 'sec',\n countdownFinished: 'Finished',\n dayEvents: (count, titles) =>\n `${count} ${count === 1 ? 'event' : 'events'}${titles ? `: ${titles}` : ''}`,\n moreEvents: (count) => `+${count} more`,\n\n selectAllRows: 'Select all rows',\n selectRow: (row) => (row ? `Select row ${row}` : 'Select row'),\n expandHeader: 'Expand',\n expandRow: 'Expand row',\n collapseRow: 'Collapse row',\n expandTreeRow: 'Show child rows',\n collapseTreeRow: 'Hide child rows',\n expandGroup: 'Expand group',\n collapseGroup: 'Collapse group',\n groupCount: (count) => `${count} item${count === 1 ? '' : 's'}`,\n resizeColumn: 'Resize column',\n columnWidth: (column, width) => `${column} column width ${width} pixels`,\n columnMoved: (column, position, total) =>\n `${column} moved to position ${position} of ${total}`,\n editCell: 'Press Enter to edit',\n cellSaved: (value) => `Saved ${value}`,\n sortedBy: (column, direction) =>\n `Sorted by ${column} ${direction === 'asc' ? 'ascending' : 'descending'}`,\n sortingCleared: (column) => `Sorting cleared on ${column}`,\n\n showPassword: 'Show password',\n hidePassword: 'Hide password',\n passwordRuleMinLength: (length) => `At least ${length} characters`,\n passwordRuleUppercase: 'An uppercase letter',\n passwordRuleNumber: 'A number',\n passwordRuleSymbol: 'A symbol',\n passwordStrength: (score) =>\n PASSWORD_STRENGTH_LABELS[Math.max(0, Math.min(4, score))],\n passwordStrengthLabel: 'Password strength:',\n ruleMet: 'Met:',\n ruleNotMet: 'Not met:',\n oneTimeCode: 'One-time code',\n otpDigit: (position) => `Digit ${position}`,\n numericKeypadLabel: 'Numeric keypad',\n keypadClear: 'Clear',\n keypadBackspace: 'Backspace',\n keypadDigitsEntered: (count, length) => `${count} of ${length} digits entered`,\n onScreenKeyboardLabel: 'On-screen keyboard',\n keyboardShift: 'Shift',\n keyboardSpace: 'Space',\n keyboardEnter: 'Enter',\n keyboardAltLayer: 'More characters',\n keyboardBaseLayer: 'Letters',\n ratingLabel: 'Rating',\n ratingValueText: (value, max) => `${value} of ${max} stars`,\n minimum: 'Minimum',\n maximum: 'Maximum',\n chooseColor: 'Choose color',\n hexValue: 'Hex value',\n presetColors: 'Preset colors',\n chooseCountry: 'Choose country',\n searchCountries: 'Search countries…',\n phoneNumber: 'Phone number',\n postalCode: 'Postal code',\n amount: 'Amount',\n cardNumber: 'Card number',\n cardBrand: (brand) => `Card brand: ${brand}`,\n iban: 'IBAN',\n taxId: 'Tax ID',\n signature: 'Signature',\n jsonLabel: 'JSON',\n\n logViewerLabel: 'Log output',\n logFollow: 'Follow',\n logCopyAll: 'Copy log',\n logWrapLines: 'Wrap lines',\n\n orgChartLabel: 'Organisation chart',\n orgChartExpand: 'Expand {label}',\n orgChartCollapse: 'Collapse {label}',\n\n chatLabel: 'Conversation',\n chatComposerLabel: 'Message',\n chatPlaceholder: 'Type a message…',\n chatSend: 'Send',\n chatStop: 'Stop generating',\n chatAttach: 'Attach files',\n chatRemoveAttachment: 'Remove attachment',\n chatAttachments: 'Attachments',\n chatSuggestions: 'Suggestions',\n chatCopy: 'Copy message',\n chatRetry: 'Retry',\n chatTyping: 'Typing…',\n chatStreaming: 'Generating…',\n chatJumpToLatest: 'Jump to latest',\n chatEmpty: 'No messages yet',\n chatYou: 'You',\n chatAssistant: 'Assistant',\n chatToolRunning: 'Running',\n chatToolDone: 'Done',\n chatToolError: 'Failed',\n\n dynamicFormAdd: 'Add',\n dynamicFormRemove: (index) => `Remove item ${index}`,\n\n queryBuilderLabel: 'Filter conditions',\n queryAddRule: 'Add rule',\n queryAddGroup: 'Add group',\n queryRemoveRule: 'Remove rule',\n queryRemoveGroup: 'Remove group',\n queryAnd: 'And',\n queryOr: 'Or',\n queryNot: 'Not',\n queryField: 'Field',\n queryOperator: 'Operator',\n queryValue: 'Value',\n queryValueFrom: 'From',\n queryValueTo: 'To',\n queryEmptyGroup: 'No conditions yet',\n queryTrue: 'True',\n queryFalse: 'False',\n queryOpEq: 'equals',\n queryOpNeq: 'does not equal',\n queryOpContains: 'contains',\n queryOpNotContains: 'does not contain',\n queryOpStartsWith: 'starts with',\n queryOpEndsWith: 'ends with',\n queryOpGt: 'greater than',\n queryOpGte: 'at least',\n queryOpLt: 'less than',\n queryOpLte: 'at most',\n queryOpBetween: 'between',\n queryOpIn: 'is any of',\n queryOpNotIn: 'is none of',\n queryOpBefore: 'before',\n queryOpAfter: 'after',\n queryOpEmpty: 'is empty',\n queryOpNotEmpty: 'is not empty',\n\n dialogMove: 'Move dialog (arrow keys; Home to reset)',\n dialogResize: 'Resize dialog (arrow keys; Home to reset)',\n\n listboxFilter: 'Filter options',\n listboxEmpty: 'No matching options',\n\n eventCalendarGrabbed: (title, from, to) =>\n `${title} grabbed, ${from} – ${to}. Use the arrow keys to move, ` +\n 'Shift with Up or Down to change the end time, Enter to save, ' +\n 'Escape to cancel.',\n eventCalendarPosition: (title, day, from, to) =>\n `${title}, ${day}, ${from} – ${to}.`,\n eventCalendarMoved: (title, day, from, to) =>\n `${title} moved to ${day}, ${from} – ${to}.`,\n eventCalendarResized: (title, to) => `${title} now ends at ${to}.`,\n eventCalendarEditCancelled: 'Move cancelled. The event keeps its original time.',\n eventCalendarMovableEvent: 'Movable event',\n\n previousImage: 'Previous image',\n nextImage: 'Next image',\n imageOf: (index, total) => `Image ${index} of ${total}`,\n viewImage: (alt) => (alt ? `View ${alt}` : 'View image'),\n imageFailed: 'Image failed to load',\n zoom: 'Zoom',\n zoomIn: 'Zoom in',\n zoomOut: 'Zoom out',\n mediaLibrary: 'Media library',\n dropzoneLabel: 'Drag files here or click to browse',\n uploadFailed: 'Upload failed',\n retryUpload: 'Retry upload',\n errorSummaryTitle: 'There is a problem',\n\n available: 'Available',\n selected: 'Selected',\n transferSelected: (target) => `Move selected to ${target}`,\n transferAll: (target) => `Move all to ${target}`,\n itemsMoved: (count, target) =>\n `Moved ${count} ${count === 1 ? 'item' : 'items'} to ${target}`,\n\n notificationsTitle: 'Notifications',\n allCaughtUp: \"You're all caught up\",\n markAllRead: 'Mark all read',\n notificationsUnread: (count) => `Notifications, ${count} unread`,\n unread: 'Unread',\n tourStepOf: (step, total) => `Step ${step} of ${total}`,\n tourSkip: 'Skip',\n tourPrevious: 'Previous',\n tourNext: 'Next',\n tourDone: 'Done',\n\n commandPalettePlaceholder: 'Type a command or search…',\n commandPaletteLabel: 'Command palette',\n stepCompleted: 'Completed',\n stepError: 'Has errors',\n diffAddedLine: 'Added:',\n diffRemovedLine: 'Removed:',\n itemAdded: (name) => `${name} added`,\n itemRemoved: (name) => `${name} removed`,\n resizePanes: 'Resize panes',\n backToTop: 'Back to top',\n breadcrumbLabel: 'Breadcrumb',\n fabLabel: 'Actions',\n diffBefore: 'Before',\n diffAfter: 'After',\n diffChanges: 'Changes',\n skipToContent: 'Skip to content',\n primaryNav: 'Primary',\n\n dndPickedUp: (position, total) =>\n `Picked up. Item ${position} of ${total}. ` +\n 'Use the arrow keys to move, space or enter to drop, escape to cancel.',\n dndMoved: (position, total) => `Moved to position ${position} of ${total}.`,\n dndMovedToList: (list, position, total) =>\n `Moved to ${list}, position ${position} of ${total}.`,\n dndDropped: (position) => `Dropped at position ${position}.`,\n dndMovedToZone: (zone) => `Moved to ${zone}. Space or enter to drop here.`,\n dndDroppedInZone: (zone) => `Dropped in ${zone}.`,\n dndCancelled: 'Movement cancelled. Item returned to its starting position.',\n\n repeaterAddRow: 'Add row',\n repeaterRemoveRow: (index) => `Remove row ${index}`,\n repeaterReorderRow: (index) => `Reorder row ${index}`,\n repeaterRowMoved: (from, to) => `Row moved from position ${from} to position ${to}.`,\n\n fileRejectedType: (name) => `${name}: unsupported type`,\n fileRejectedSize: (name, limit) => `${name}: exceeds ${limit}`,\n fileRejectedCount: (name, max) => `${name}: over the ${max}-file limit`,\n\n chartCategory: 'Category',\n chartValue: 'Value',\n chartSeries: 'Series',\n chartSlice: 'Slice',\n chartStage: 'Stage',\n chartConversion: 'Conversion',\n chartAxis: 'Axis',\n chartShare: 'Share',\n chartLabel: 'Label',\n\n qrCodeLabel: (text) => `QR code: ${text}`,\n\n sortableListLabel: 'Sortable list',\n filterColumn: (column) => `Filter ${column}`,\n clearFilter: (column) => `Clear filter for ${column}`,\n filterAny: 'All',\n filterMin: 'Min',\n\n blockEditor: {\n addBlock: 'Add block',\n addFirstBlock: 'Add your first block',\n insertBlockHere: 'Insert a block here',\n blockInserter: 'Block inserter',\n searchBlocks: 'Search blocks…',\n blocks: 'Blocks',\n moveBlockUp: 'Move block up',\n moveBlockDown: 'Move block down',\n blockOptions: 'Block options',\n duplicate: 'Duplicate',\n remove: 'Remove',\n textFormatting: 'Text formatting',\n altText: 'Alt text',\n caption: 'Caption',\n alignment: 'Alignment',\n replaceImage: 'Replace image',\n imageUrl: 'Image URL',\n externalContent: 'External content',\n embedUrl: 'Embed URL',\n columnSettings: 'Column settings',\n columns: 'Columns',\n ratio: 'Ratio',\n gap: 'Gap',\n align: 'Align',\n justify: 'Justify',\n headingLevel: (level) => `Heading level ${level}`,\n editorLabel: 'Block content editor',\n emptyBlockPlaceholder: 'Type / to choose a block, or start writing…',\n dragHandle: 'Drag handle',\n turnInto: (label) => `Turn into ${label}`,\n unknownBlock: (type) => `Unknown block: ${type}`,\n blockAdded: (label) => `${label} added`,\n blockDuplicated: 'Block duplicated',\n blockDeleted: (label) => `${label} deleted`,\n blockMovedUp: 'Block moved up',\n blockMovedDown: 'Block moved down',\n turnedInto: (label) => `Turned into ${label}`,\n noBlocksMatch: (query) => `No blocks match “${query}”.`,\n groupText: 'Text',\n groupMedia: 'Media',\n groupLayout: 'Layout',\n blockParagraph: 'Paragraph',\n blockParagraphDesc: 'Rich text with inline formatting.',\n blockHeading: 'Heading',\n blockHeadingDesc: 'A section title (H1–H4).',\n blockList: 'List',\n blockListDesc: 'Bulleted or numbered list.',\n blockQuote: 'Quote',\n blockQuoteDesc: 'A blockquote with optional citation.',\n blockCode: 'Code',\n blockCodeDesc: 'Preformatted, monospace code.',\n blockImage: 'Image',\n blockImageDesc: 'Upload or link an image.',\n blockEmbed: 'Embed',\n blockEmbedDesc: 'YouTube, Vimeo or any URL.',\n blockButton: 'Button',\n blockButtonDesc: 'A call-to-action link button.',\n blockDivider: 'Divider',\n blockDividerDesc: 'A horizontal separator.',\n blockColumns: 'Columns',\n blockColumnsDesc: 'A responsive multi-column layout.',\n bold: 'Bold',\n italic: 'Italic',\n underline: 'Underline',\n strikethrough: 'Strikethrough',\n inlineCode: 'Inline code',\n link: 'Link',\n clearFormatting: 'Clear formatting',\n linkUrlPrompt: 'Link URL',\n editableText: 'Editable text',\n headingPlaceholder: (level) => `Heading ${level}`,\n headingLevelGroup: 'Heading level',\n listStyle: 'List style',\n bulleted: 'Bulleted',\n numbered: 'Numbered',\n listItem: 'List item',\n quoteText: 'Quote text',\n citation: 'Citation',\n addCitation: '— Add a citation',\n codeLanguage: 'Code language',\n codeLanguagePlaceholder: 'language (optional)',\n enterCode: 'Enter code…',\n imageWidth: (percent) => `Width: ${percent}%`,\n uploading: 'Uploading…',\n dropImagePrompt: 'Drag & drop an image, or',\n chooseFile: 'Choose file',\n pasteImageUrl: '…or paste an image URL',\n notAnImage: 'Please choose an image file.',\n uploadFailed: 'Upload failed. Try again or paste a URL.',\n imageAdded: 'Image added',\n pasteEmbedUrl: 'Paste a YouTube, Vimeo or other URL…',\n embedFallbackNote: 'That URL can’t be embedded, but it will render as a link.',\n embedTitle: (provider) => `${provider} embed`,\n embedAdded: (provider) => `${provider} embed added`,\n embeddedContent: 'Embedded content',\n buttonLabel: 'Label',\n buttonLink: 'Link (href)',\n buttonTone: 'Tone',\n buttonVariant: 'Variant',\n buttonDefaultLabel: 'Click me',\n alignLeft: 'Left',\n alignCenter: 'Center',\n alignRight: 'Right',\n tonePrimary: 'Primary',\n toneNeutral: 'Neutral',\n toneSuccess: 'Success',\n toneWarning: 'Warning',\n toneDanger: 'Danger',\n toneInfo: 'Info',\n variantSolid: 'Solid',\n variantSoft: 'Soft',\n variantOutline: 'Outline',\n ratioEqual: 'Equal',\n alignStretch: 'Stretch',\n alignTop: 'Top',\n alignMiddle: 'Middle',\n alignBottom: 'Bottom',\n justifyStart: 'Start',\n justifyCenter: 'Center',\n justifyEnd: 'End',\n justifyBetween: 'Space between',\n },\n};\n\n/**\n * The active string map. Defaults to {@link MK_DEFAULT_I18N}; override with\n * {@link provideMkI18n}. Inject it (`inject(MK_I18N)`) wherever a built-in\n * string is rendered.\n */\nexport const MK_I18N = new InjectionToken<MkI18nStrings>('MK_I18N', {\n providedIn: 'root',\n factory: () => MK_DEFAULT_I18N,\n});\n\n/**\n * Any subset of {@link MkI18nStrings}; the nested `dateNames`, `blockEditor`\n * and `validation` groups may be partial too (they are merged deeply).\n */\nexport type MkI18nOverrides = Partial<\n Omit<MkI18nStrings, 'dateNames' | 'blockEditor' | 'validation'>\n> & {\n dateNames?: Partial<MkDateNames>;\n blockEditor?: Partial<MkBlockEditorStrings>;\n validation?: Partial<MkValidationStrings>;\n};\n\n/**\n * Merges `overrides` over a complete string map — shallow for the top level,\n * deep for the `dateNames`, `blockEditor` and `validation` groups. Exported\n * so locale packs and tests can build a map without providing it.\n */\nexport function mkMergeI18n(\n base: MkI18nStrings,\n overrides: MkI18nOverrides,\n): MkI18nStrings {\n return {\n ...base,\n ...overrides,\n dateNames: { ...base.dateNames, ...overrides.dateNames },\n blockEditor: { ...base.blockEditor, ...overrides.blockEditor },\n validation: { ...base.validation, ...overrides.validation },\n };\n}\n\n/**\n * Provide localised strings — pass any subset, merged over `base` (the\n * English defaults unless given). The nested `dateNames`, `blockEditor` and\n * `validation` groups are merged deeply, so partial overrides of those work\n * too.\n *\n * ```ts\n * bootstrapApplication(App, {\n * providers: [provideMkI18n({ noResults: 'Brak wyników', close: 'Zamknij' })],\n * });\n * ```\n *\n * A locale pack is a complete map that serves as the base — either through\n * its own helper (`provideMkI18nPl(overrides)` from `@mk-kit/ui/locales/pl`)\n * or explicitly: `provideMkI18n(overrides, MK_PL_I18N)`.\n */\nexport function provideMkI18n(\n overrides: MkI18nOverrides,\n base: MkI18nStrings = MK_DEFAULT_I18N,\n): Provider {\n return { provide: MK_I18N, useValue: mkMergeI18n(base, overrides) };\n}\n","import type { Signal } from '@angular/core';\nimport type { MkSize } from '../types';\n\n/**\n * Field context — the contract a field wrapper (`mk-form-field`) exposes to\n * the control nested inside it. Controls inject it optionally\n * (`inject(MkFieldContext, { optional: true })`) to adopt the wrapper's\n * control id and to reflect its required/error state and `aria-describedby`\n * wiring — without depending on the `@mk-kit/ui/forms` entry point.\n *\n * `MkFormField` provides itself under this token; standalone usage (no\n * wrapper) simply yields `null`.\n */\nexport abstract class MkFieldContext {\n /** Id for the nested interactive control — adopt on your control element. */\n abstract readonly controlId: string;\n /** Id of the field's label element, for `aria-labelledby`. */\n abstract readonly labelId: string;\n /** The field's visual size, mirrored onto the nested control. */\n abstract readonly size: Signal<MkSize>;\n /** Whether the field is required (explicitly or via the bound control). */\n abstract readonly isRequired: Signal<boolean>;\n /** Whether the field currently shows an error. */\n abstract readonly hasError: Signal<boolean>;\n /**\n * Space-separated id list for the nested control's `aria-describedby`,\n * or `null` when there is nothing to describe.\n */\n abstract readonly describedBy: Signal<string | null>;\n}\n","/** Delegates to `@mk-kit/core` — the exported names are unchanged. */\nexport { mkEscapeHtml, mkHighlight, mkHighlightJson, type MkCodeLanguage } from '@mk-kit/core';\n","import { effect, untracked } from '@angular/core';\n\n/**\n * Handle returned by {@link mkValidatorChange}, wiring a component's\n * `registerOnValidatorChange` callback to a set of reactive dependencies.\n */\nexport interface MkValidatorChangeRef {\n /** Store the callback Angular hands to `registerOnValidatorChange`. */\n register(fn: () => void): void;\n /** Ask the bound control to re-run `validate()` now. */\n notify(): void;\n}\n\n/**\n * Re-validates the bound form control whenever a validator's inputs change.\n *\n * A `Validator` whose constraints come from component inputs (`[min]`,\n * `[max]`, `[required]`, …) must tell Angular when those inputs change,\n * otherwise the control keeps the verdict computed under the old constraints.\n * `NgModel`/`FormControlName` pass a callback to `registerOnValidatorChange`\n * for exactly this; call it from an effect over the constraint signals.\n *\n * Must be called from an injection context (i.e. as a field initialiser).\n *\n * ```ts\n * private readonly validatorChange = mkValidatorChange(() => {\n * this.min();\n * this.max();\n * });\n *\n * registerOnValidatorChange(fn: () => void): void {\n * this.validatorChange.register(fn);\n * }\n * ```\n *\n * @param deps Reads every signal the validator depends on.\n */\nexport function mkValidatorChange(deps: () => void): MkValidatorChangeRef {\n let onChange: () => void = () => {};\n let primed = false;\n\n effect(() => {\n deps();\n // Skip the effect's initial run: the control validates once on bind\n // anyway, and re-entering validation during setup is wasted work.\n if (!primed) {\n primed = true;\n return;\n }\n // The callback synchronously calls `updateValueAndValidity()`, which reads\n // and writes signals — keep it out of this effect's dependency graph.\n untracked(() => onChange());\n });\n\n return {\n register(fn: () => void): void {\n onChange = fn;\n },\n notify(): void {\n onChange();\n },\n };\n}\n","import type { ValidationErrors } from '@angular/forms';\nimport type { MkValidationStrings } from '../i18n/mk-i18n';\n\n/**\n * A per-field override map: an error key mapped either to a fixed message or\n * to a function receiving that key's error payload.\n *\n * ```html\n * <mk-form-field label=\"Age\" [errorMessages]=\"{ min: 'You must be 18 or over' }\">\n * ```\n */\nexport type MkErrorMessages = Readonly<Record<string, string | ((err: any) => string)>>;\n\n/**\n * Resolves the message for the first error on a control, mirroring how\n * `mat-error` shows one message at a time.\n *\n * Lookup order per key: the field's `overrides`, then the i18n `validation`\n * table, then the error payload's own `message` string (so a custom validator\n * can carry its text), then the generic fallback. Keys are visited in the\n * order the validators put them on the control, so composing\n * `[Validators.required, Validators.email]` surfaces \"required\" while empty.\n *\n * @returns The message, or `null` when there are no errors.\n */\nexport function mkFirstErrorMessage(\n errors: ValidationErrors | null | undefined,\n strings: MkValidationStrings,\n overrides?: MkErrorMessages,\n): string | null {\n if (!errors) return null;\n\n for (const key of Object.keys(errors)) {\n const payload = errors[key];\n\n const override = overrides?.[key];\n if (typeof override === 'string') return override;\n if (typeof override === 'function') return override(payload);\n\n const builtin = (strings as unknown as MkErrorMessages)[key];\n if (typeof builtin === 'string') return builtin;\n if (typeof builtin === 'function') return builtin(payload);\n\n if (payload && typeof payload === 'object' && typeof payload.message === 'string') {\n return payload.message;\n }\n }\n\n return errors ? strings.unknown : null;\n}\n","import type { ValidationErrors } from '@angular/forms';\nimport type { MkValidationStrings } from '../i18n/mk-i18n';\nimport { type MkErrorMessages, mkFirstErrorMessage } from './validation-messages';\n\n/**\n * The shape of a Signal Forms validation error as `mk-kit` reads it — the\n * `{ kind, message? }` contract of `ValidationError` from\n * `@angular/forms/signals`, plus whatever payload the error class carries\n * (`min`, `maxLength`, `pattern`, …). Declared structurally so `@mk-kit/ui/core`\n * stays free of a runtime dependency on the signals entry point.\n */\nexport interface MkSignalValidationError {\n /** Identifies the kind of error (`'required'`, `'minLength'`, …). */\n readonly kind: string;\n /** Human-readable message, when the schema supplied one. */\n readonly message?: string;\n}\n\n/**\n * Converts Signal Forms errors to the reactive-forms `ValidationErrors` shape\n * the `validation` i18n table is keyed by, so both form systems render the\n * same messages. The built-in kinds map to Angular's classic keys and payloads\n * (`minLength` → `minlength: { requiredLength }`, `minDate` → `mkMinDate`,\n * …); any other kind is kept as-is with its payload spread into the value.\n *\n * @returns The error map in the order the errors were reported, or `null`\n * when the list is empty.\n */\nexport function mkSignalErrorsToValidationErrors(\n errors: readonly MkSignalValidationError[] | null | undefined,\n): ValidationErrors | null {\n if (!errors || errors.length === 0) return null;\n const out: ValidationErrors = {};\n for (const err of errors) {\n const [key, payload] = toReactiveError(err);\n if (!(key in out)) out[key] = payload;\n }\n return out;\n}\n\nfunction toReactiveError(error: MkSignalValidationError): [string, unknown] {\n const err = error as MkSignalValidationError & Record<string, unknown>;\n const message = err.message;\n switch (err.kind) {\n case 'required':\n return ['required', message ? { message } : true];\n case 'email':\n return ['email', message ? { message } : true];\n case 'min':\n return ['min', { min: err['min'], actual: err['actual'], message }];\n case 'max':\n return ['max', { max: err['max'], actual: err['actual'], message }];\n case 'minLength':\n return ['minlength', { requiredLength: err['minLength'], actualLength: err['actualLength'], message }];\n case 'maxLength':\n return ['maxlength', { requiredLength: err['maxLength'], actualLength: err['actualLength'], message }];\n case 'pattern':\n return ['pattern', { requiredPattern: String(err['pattern'] ?? ''), message }];\n case 'minDate':\n return ['mkMinDate', { min: err['minDate'], actual: err['actual'], message }];\n case 'maxDate':\n return ['mkMaxDate', { max: err['maxDate'], actual: err['actual'], message }];\n default: {\n // Custom / server / compat errors: keep the kind as the key and expose the\n // payload (a `CompatValidationError` carries the reactive payload in\n // `context`) so per-key `errorMessages` functions receive it.\n const rest: Record<string, unknown> = {};\n for (const key of Object.keys(err)) {\n if (key !== 'kind' && key !== 'fieldTree' && key !== 'formField') rest[key] = err[key];\n }\n const context = rest['context'];\n if (context && typeof context === 'object') {\n return [err.kind, { ...context, message: message ?? (context as { message?: string }).message }];\n }\n return [err.kind, Object.keys(rest).length ? rest : message ? { message } : true];\n }\n }\n}\n\n/**\n * Resolves the message for the first Signal Forms error on a field, the way\n * `mkFirstErrorMessage` does for reactive forms.\n *\n * Lookup order: the field's `overrides` for that kind, then the `message` the\n * schema attached to the error (`required(p.email, { message: '…' })`), then\n * the i18n `validation` table, then the generic fallback.\n *\n * @returns The message, or `null` when there are no errors.\n */\nexport function mkSignalErrorMessage(\n errors: readonly MkSignalValidationError[] | null | undefined,\n strings: MkValidationStrings,\n overrides?: MkErrorMessages,\n): string | null {\n if (!errors || errors.length === 0) return null;\n const first = errors[0];\n const [key, payload] = toReactiveError(first);\n const override = overrides?.[key];\n if (typeof override === 'string') return override;\n if (typeof override === 'function') return override(payload);\n if (typeof first.message === 'string' && first.message) return first.message;\n return mkFirstErrorMessage({ [key]: payload }, strings);\n}\n","/**\n * Delegates to `@mk-kit/core` — the exported names and behaviour are\n * unchanged. `mkQueryOperatorLabel` / `mkQueryToText` accept the full\n * `MkI18nStrings` map as before: it is a structural superset of the\n * package's `MkQueryTextStrings`.\n */\nexport {\n MK_QUERY_OPERATORS,\n MK_QUERY_TEXT_EN,\n MK_QUERY_UNARY,\n mkCreateQueryGroup,\n mkCreateQueryRule,\n mkIsQueryGroup,\n mkQueryCompact,\n mkQueryIsEmpty,\n mkQueryOperatorLabel,\n mkQueryOperatorsFor,\n mkQueryRuleCount,\n mkQueryRuleIsComplete,\n mkQueryRuleMatches,\n mkQueryToPredicate,\n mkQueryToText,\n type MkQueryTextStrings,\n} from '@mk-kit/core';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;;ACaA,MAAM,WAAW,GAAG,cAAc;AAClC,MAAM,UAAU,GAAG,eAAe;AAClC,MAAM,mBAAmB,GAAG,gBAAgB;AAC5C,MAAM,YAAY,GAAG,iBAAiB;AACtC,MAAM,oBAAoB,GAAG,iBAAiB;AAC9C,MAAM,aAAa,GAAG,kBAAkB;AACxC,MAAM,cAAc,GAAG,0BAA0B;AA0BjD;;;;;;;;;;AAUG;MAEU,cAAc,CAAA;AACR,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IAC/B,SAAS,GAAG,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAElD,IAAA,WAAW,GAAG,MAAM,CAAoB,IAAI,CAAC,WAAW,EAAE;oFAAC;;AAEnE,IAAA,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE;AAElC,IAAA,kBAAkB,GAAG,MAAM,CAAU,IAAI,CAAC,cAAc,EAAE;2FAAC;;AAGnE,IAAA,aAAa,GAAG,QAAQ,CAAkB,MAAK;AACtD,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE;AAC/B,QAAA,IAAI,IAAI,KAAK,QAAQ,EAAE;AACrB,YAAA,OA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