@kouji-ui/core 0.2.0 → 0.3.0

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.
@@ -1,11 +1,15 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { Signal, InjectionToken, ViewContainerRef, Injector, ComponentRef, Type, ElementRef, AfterContentInit, WritableSignal, InputSignalWithTransform, Provider, ModelSignal, OnInit, OnDestroy, signal, EnvironmentProviders, TemplateRef, ResourceRef, EventEmitter } from '@angular/core';
2
+ import { Signal, InjectionToken, ViewContainerRef, Injector, ComponentRef, Type, ElementRef, AfterContentInit, WritableSignal, EnvironmentProviders, InputSignalWithTransform, Provider, ModelSignal, OnInit, OnDestroy, signal, TemplateRef, ResourceRef, EventEmitter } from '@angular/core';
3
3
  import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors, FormGroup } from '@angular/forms';
4
4
  import * as _kouji_ui_core from '@kouji-ui/core';
5
5
  import { Observable } from 'rxjs';
6
6
  import * as _tanstack_angular_table from '@tanstack/angular-table';
7
7
  import { SortingState, ColumnFiltersState, PaginationState, RowSelectionState, ColumnSizingState, VisibilityState, ColumnOrderState, ColumnPinningState, ExpandedState, GroupingState, RowData, ColumnDef, Table, Row, Column, ColumnSizingInfoState } from '@tanstack/angular-table';
8
- import { EChartsOption } from 'echarts';
8
+ import { EChartsOption, EChartsType, ECElementEvent } from 'echarts';
9
+ import * as lexical from 'lexical';
10
+ import { LexicalEditor, LexicalNode, LexicalCommand, CommandListenerPriority, Klass, SerializedEditorState } from 'lexical';
11
+ import * as monaco_editor from 'monaco-editor';
12
+ import { editor } from 'monaco-editor';
9
13
 
10
14
  /**
11
15
  * Applies disabled state to any element via ARIA and data attributes.
@@ -1490,6 +1494,445 @@ declare class KjVisuallyHidden {
1490
1494
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjVisuallyHidden, "[kjVisuallyHidden]", never, {}, {}, never, never, true, never>;
1491
1495
  }
1492
1496
 
1497
+ /**
1498
+ * Application-wide source of truth for **how locale-sensitive data renders** —
1499
+ * number / currency / date formatting and the logical text direction
1500
+ * (`ltr` / `rtl`). Every locale-aware primitive (NumberInput, DatePicker,
1501
+ * TimePicker, Calendar, currency display) falls back to this service instead of
1502
+ * re-reading `LOCALE_ID` or drilling a `kjLocale` prop.
1503
+ *
1504
+ * Configure the initial state with {@link provideKjLocale}; change it at runtime
1505
+ * with {@link setLocale} / {@link setDirection} / {@link setCurrency} — the seam
1506
+ * the RTL switch and language menu build on. Everything is `Intl`-backed and
1507
+ * SSR-safe, so anything Angular's `LOCALE_ID` already supports works with zero
1508
+ * configuration.
1509
+ *
1510
+ * @example
1511
+ * ```ts
1512
+ * private readonly locale = inject(KjLocale);
1513
+ * readonly price = computed(() => this.locale.formatCurrency(19.9)); // '€19.90'
1514
+ * readonly isRtl = this.locale.isRtl;
1515
+ * ```
1516
+ * @doc
1517
+ * @doc-name locale
1518
+ * @doc-category Core/Primitives
1519
+ * @doc-description One DI provider for locale-aware number, currency, and date formatting plus the ltr/rtl direction every primitive falls back to.
1520
+ * @doc-is-main
1521
+ */
1522
+ declare class KjLocale {
1523
+ private readonly defaultLocale;
1524
+ private readonly directionality;
1525
+ private readonly config;
1526
+ private readonly _locale;
1527
+ private readonly _direction;
1528
+ private readonly _currency;
1529
+ /** Resolved BCP-47 locale tag. Falls back to Angular's `LOCALE_ID`. */
1530
+ readonly locale: Signal<string>;
1531
+ /**
1532
+ * Resolved logical text direction. When set to `'auto'`, derives from the
1533
+ * locale script, then falls back to the document's `<html dir>`.
1534
+ */
1535
+ readonly direction: Signal<KjDirection>;
1536
+ /** `true` when the resolved {@link direction} is `'rtl'`. */
1537
+ readonly isRtl: Signal<boolean>;
1538
+ /** Resolved default currency (ISO 4217), or `undefined`. */
1539
+ readonly currency: Signal<string | undefined>;
1540
+ /** Override the active locale at runtime. */
1541
+ setLocale(tag: string): void;
1542
+ /** Override the active direction at runtime. `'auto'` re-enables derivation. */
1543
+ setDirection(dir: KjDirection | 'auto'): void;
1544
+ /** Override the default currency at runtime. */
1545
+ setCurrency(code: string | undefined): void;
1546
+ /**
1547
+ * Build an `Intl.NumberFormat` bound to the resolved locale. Pass options to
1548
+ * override; `undefined` locale in options is ignored.
1549
+ */
1550
+ numberFormat(options?: Intl.NumberFormatOptions): Intl.NumberFormat;
1551
+ /** Build an `Intl.DateTimeFormat` bound to the resolved locale. */
1552
+ dateTimeFormat(options?: Intl.DateTimeFormatOptions): Intl.DateTimeFormat;
1553
+ /** Format a number with the resolved locale. */
1554
+ formatNumber(value: number, options?: Intl.NumberFormatOptions): string;
1555
+ /**
1556
+ * Format a currency amount. Uses `currency` when given, else the provider's
1557
+ * default {@link currency}. Returns a plain number format when neither is set.
1558
+ */
1559
+ formatCurrency(value: number, currency?: string, options?: Intl.NumberFormatOptions): string;
1560
+ /** Format a `Date` with the resolved locale. */
1561
+ formatDate(value: Date, options?: Intl.DateTimeFormatOptions): string;
1562
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjLocale, never>;
1563
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<KjLocale>;
1564
+ }
1565
+
1566
+ /**
1567
+ * Static configuration for the locale provider. Every field is optional — with
1568
+ * an empty config the {@link KjLocale} service falls back to Angular's
1569
+ * `LOCALE_ID` and the document's `<html dir>`.
1570
+ */
1571
+ interface KjLocaleConfig {
1572
+ /**
1573
+ * BCP-47 language tag (e.g. `'de-DE'`, `'ar-EG'`). Defaults to the injected
1574
+ * `LOCALE_ID` when omitted.
1575
+ */
1576
+ readonly locale?: string;
1577
+ /**
1578
+ * Logical text direction. `'auto'` (the default) derives the direction from
1579
+ * the locale's script, then falls back to the document's `<html dir>` via
1580
+ * `KjDirectionality`. An explicit `'ltr'` / `'rtl'` always wins.
1581
+ */
1582
+ readonly direction?: KjDirection | 'auto';
1583
+ /**
1584
+ * ISO 4217 currency code (e.g. `'EUR'`) used as the default for currency
1585
+ * formatting when a component does not specify its own.
1586
+ */
1587
+ readonly currency?: string;
1588
+ }
1589
+ /**
1590
+ * DI token for the initial locale configuration. Default factory yields an
1591
+ * empty config, so {@link KjLocale} resolves entirely from `LOCALE_ID` and
1592
+ * `<html dir>` when {@link provideKjLocale} is not called.
1593
+ */
1594
+ declare const KJ_LOCALE_CONFIG: InjectionToken<KjLocaleConfig>;
1595
+ /**
1596
+ * Configures the application (or route) locale — the single source of truth
1597
+ * every locale-sensitive kouji-ui primitive falls back to for number, currency,
1598
+ * and date formatting plus logical text direction.
1599
+ *
1600
+ * Call once at the application scope (`bootstrapApplication`'s `providers`) or
1601
+ * on a route to scope a sub-tree. Runtime changes go through the
1602
+ * {@link KjLocale} service (`setLocale` / `setDirection` / `setCurrency`) — the
1603
+ * seam the upcoming RTL switch and language menu build on.
1604
+ *
1605
+ * @example
1606
+ * ```ts
1607
+ * bootstrapApplication(App, {
1608
+ * providers: [provideKjLocale({ locale: 'de-DE', currency: 'EUR' })],
1609
+ * });
1610
+ * ```
1611
+ * @doc
1612
+ * @doc-example Basic
1613
+ * Switch the active locale and watch every `Intl`-backed formatter (number,
1614
+ * currency, date) and the resolved direction update reactively.
1615
+ * @doc-file locale.basic.example.ts
1616
+ * @doc-name locale
1617
+ * @doc-order 1
1618
+ */
1619
+ declare function provideKjLocale(config?: KjLocaleConfig): EnvironmentProviders;
1620
+
1621
+ /**
1622
+ * Reflects {@link KjLocale}'s resolved logical direction onto the document's
1623
+ * `<html dir>` attribute, keeping the whole page (and every assistive
1624
+ * technology) in sync whenever the direction changes at runtime.
1625
+ *
1626
+ * This is the single writer of `<html dir>`; {@link KjDirectionality} stays the
1627
+ * *reader* that feeds `KjLocale`'s `'auto'` derivation. The write is idempotent
1628
+ * (skipped when the attribute already matches), so it never fights an app that
1629
+ * sets `dir` itself, and it is **SSR-safe** — on the server no DOM APIs are
1630
+ * touched and the attribute is left to the app's own template.
1631
+ *
1632
+ * Register once at the application scope. It is the piece the visible RTL
1633
+ * toggle (`KjDirectionToggle`) relies on to actually flip the layout: the toggle
1634
+ * calls `KjLocale.setDirection(...)`, this effect propagates it to `<html dir>`.
1635
+ *
1636
+ * @example
1637
+ * ```ts
1638
+ * bootstrapApplication(App, {
1639
+ * providers: [
1640
+ * provideKjLocale({ direction: 'auto' }),
1641
+ * provideKjDocumentDirection(),
1642
+ * ],
1643
+ * });
1644
+ * ```
1645
+ * @doc
1646
+ * @doc-name locale
1647
+ * @doc-order 2
1648
+ */
1649
+ declare function provideKjDocumentDirection(): EnvironmentProviders;
1650
+
1651
+ /**
1652
+ * Reads the user's `prefers-reduced-motion` OS setting via `matchMedia` and
1653
+ * exposes it as a signal that updates live when the setting flips. SSR-safe —
1654
+ * on the server (or where `matchMedia` is unavailable) the signal returns
1655
+ * `false` and no DOM APIs are touched.
1656
+ *
1657
+ * Pair this with the `motion.css` presets (which already no-op under reduced
1658
+ * motion in pure CSS) whenever a directive needs the value in TypeScript — e.g.
1659
+ * to shorten a JS-driven timeout, skip an imperative animation, or await
1660
+ * `animationend` only when motion is actually running.
1661
+ *
1662
+ * @example
1663
+ * ```ts
1664
+ * private readonly motion = inject(KjReducedMotion);
1665
+ * readonly animate = computed(() => !this.motion.prefersReducedMotion());
1666
+ * ```
1667
+ * @doc-category Core/Primitives
1668
+ * @doc-name reduced-motion
1669
+ * @doc-description SSR-safe signal of the user's prefers-reduced-motion setting.
1670
+ */
1671
+ declare class KjReducedMotion {
1672
+ private readonly platformId;
1673
+ private readonly destroyRef;
1674
+ private readonly _prefersReducedMotion;
1675
+ /**
1676
+ * `true` when the user has requested reduced motion. `false` on the server
1677
+ * and as the fallback when `matchMedia` is unavailable.
1678
+ */
1679
+ readonly prefersReducedMotion: Signal<boolean>;
1680
+ constructor();
1681
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjReducedMotion, never>;
1682
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<KjReducedMotion>;
1683
+ }
1684
+
1685
+ /**
1686
+ * Direction of a motion preset — `'enter'` plays the entrance keyframe,
1687
+ * `'exit'` plays the reverse.
1688
+ */
1689
+ type KjMotionState = 'enter' | 'exit';
1690
+ /**
1691
+ * Applies a named motion preset from `motion.css` to its host element. The
1692
+ * animation itself lives entirely in CSS (keyed off the reflected
1693
+ * `data-kj-motion` / `data-kj-motion-state` attributes and the `--kj-motion-*`
1694
+ * custom properties); this directive is a thin, declarative opt-in.
1695
+ *
1696
+ * Presets are composable, pre-bundled names — `fade`, `slide-up`, `slide-down`,
1697
+ * `slide-left`, `slide-right`, `scale`, `slide-up-fade`, `scale-spring`. Under
1698
+ * `prefers-reduced-motion: reduce` every preset collapses to a ~1ms opacity
1699
+ * fade with no transform (WCAG 2.1 AAA 2.3.3), so consumers never have to
1700
+ * branch on the setting for the visual result. The `reduced()` signal is
1701
+ * exposed for the rare case that needs to gate JS-driven timing.
1702
+ *
1703
+ * Requires `@kouji-ui/core/motion/motion.css` to be loaded (globally or in the
1704
+ * component's styles).
1705
+ *
1706
+ * @example
1707
+ * ```html
1708
+ * <div kjMotion="slide-up-fade" [kjMotionState]="open() ? 'enter' : 'exit'">…</div>
1709
+ * ```
1710
+ *
1711
+ * @doc-aria
1712
+ * data-kj-motion — reflects the active preset name for CSS targeting
1713
+ * data-kj-motion-state — "enter" | "exit"
1714
+ * data-kj-reduced-motion — present when the user prefers reduced motion
1715
+ *
1716
+ * @doc-a11y
1717
+ * Motion is decorative and opt-in; the directive adds no interactive
1718
+ * semantics (no role, no tabindex). Every preset honours
1719
+ * prefers-reduced-motion by collapsing to a near-instant opacity fade with no
1720
+ * transform, satisfying WCAG 2.1 AAA 2.3.3 (Animation from Interactions).
1721
+ *
1722
+ * @doc
1723
+ * @doc-example Presets
1724
+ * @doc-file motion.example.ts
1725
+ * @doc-example Reduced motion
1726
+ * @doc-file motion.reduced.example.ts
1727
+ * @doc-category Core/Primitives
1728
+ * @doc-name motion
1729
+ * @doc-is-main
1730
+ * @doc-description Applies a named, reduced-motion-aware CSS motion preset to any element.
1731
+ */
1732
+ declare class KjMotion {
1733
+ private readonly motion;
1734
+ /** Named preset to apply, e.g. `'fade'`, `'slide-up-fade'`, `'scale-spring'`. */
1735
+ readonly kjMotion: _angular_core.InputSignal<string>;
1736
+ /** Whether to play the entrance or exit keyframe. Defaults to `'enter'`. */
1737
+ readonly kjMotionState: _angular_core.InputSignal<KjMotionState>;
1738
+ /** `true` when the user prefers reduced motion. Mirrors `KjReducedMotion`. */
1739
+ readonly reduced: Signal<boolean>;
1740
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjMotion, never>;
1741
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjMotion, "[kjMotion]", never, { "kjMotion": { "alias": "kjMotion"; "required": true; "isSignal": true; }; "kjMotionState": { "alias": "kjMotionState"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1742
+ }
1743
+
1744
+ /**
1745
+ * Canonical English (`en`) message catalog — the **source of truth** for
1746
+ * kouji-ui's visible / assistive-text strings. Every translation key the
1747
+ * library understands is spelled exactly once here; the {@link KjTranslationKey}
1748
+ * union and the {@link KjTranslationCatalog} shape are derived from it, so a
1749
+ * typo in any alternate catalog is a compile error and no key can be forgotten.
1750
+ *
1751
+ * Values may contain `{name}` placeholders — see {@link KjTranslationParams} —
1752
+ * which {@link KjTranslateService.translate} substitutes at lookup time.
1753
+ */
1754
+ declare const EN_CATALOG: {
1755
+ readonly 'toast.close': "Close notification";
1756
+ readonly 'dialog.close': "Close dialog";
1757
+ readonly 'pagination.nav': "Pagination";
1758
+ readonly 'pagination.previous': "Previous page";
1759
+ readonly 'pagination.next': "Next page";
1760
+ readonly 'pagination.first': "First page";
1761
+ readonly 'pagination.last': "Last page";
1762
+ readonly 'pagination.more': "More pages";
1763
+ readonly 'pagination.page': "Page {page}";
1764
+ readonly 'pagination.pageOf': "Page {page} of {total}";
1765
+ readonly 'a11y.pageChanged': "Page {page} of {total}";
1766
+ readonly 'a11y.selected': "Selected";
1767
+ readonly 'a11y.sortApplied': "Sort applied, {rows} rows";
1768
+ };
1769
+ /**
1770
+ * Union of every valid translation key, derived from {@link EN_CATALOG}. Using a
1771
+ * derived union (instead of a hand-maintained enum) keeps the keys and their
1772
+ * source-language values in a single place and makes misspelled keys fail
1773
+ * `tsc`.
1774
+ */
1775
+ type KjTranslationKey = keyof typeof EN_CATALOG;
1776
+ /** A complete catalog: every {@link KjTranslationKey} mapped to a string. */
1777
+ type KjTranslationCatalog = Record<KjTranslationKey, string>;
1778
+ /**
1779
+ * Interpolation values for a translation. `{name}` placeholders in a catalog
1780
+ * value are replaced by `params[name]`. Numbers are coerced with `String()`.
1781
+ */
1782
+ type KjTranslationParams = Record<string, string | number>;
1783
+
1784
+ /**
1785
+ * French (`fr`) message catalog — shipped as proof that alternate locales plug
1786
+ * in. Typed as `Partial<KjTranslationCatalog>`: a translator may omit keys and
1787
+ * each missing one falls through to the English source at lookup time. The key
1788
+ * union is derived from `en`, so a misspelled key here fails `tsc`.
1789
+ *
1790
+ * Import it explicitly and register with `provideKjTranslations({ fr: FR_CATALOG })`
1791
+ * — because it is a plain module, bundlers tree-shake it away when unused.
1792
+ */
1793
+ declare const FR_CATALOG: Partial<KjTranslationCatalog>;
1794
+
1795
+ /**
1796
+ * A group of alternate catalogs, keyed by BCP-47 tag or bare language subtag
1797
+ * (e.g. `{ fr: FR_CATALOG }` or `{ 'fr-CA': FR_CA_CATALOG }`). Values are
1798
+ * `Partial` — omitted keys fall through to the English source catalog.
1799
+ */
1800
+ type KjTranslationCatalogs = Record<string, Partial<KjTranslationCatalog>>;
1801
+ /**
1802
+ * Multi-provider DI token holding every registered {@link KjTranslationCatalogs}
1803
+ * group. {@link KjTranslateService} reads it once at construction and merges the
1804
+ * groups over the always-present English source.
1805
+ */
1806
+ declare const KJ_TRANSLATION_CATALOGS: InjectionToken<KjTranslationCatalogs[]>;
1807
+ /**
1808
+ * Registers one or more alternate message catalogs for the enclosing injector.
1809
+ * The English (`en`) catalog is always available without registration, so this
1810
+ * only adds the languages you ship. Composes — several calls accumulate.
1811
+ *
1812
+ * Because catalogs are plain `import`-able modules, only the languages you
1813
+ * actually import are bundled (tree-shakable).
1814
+ *
1815
+ * @example
1816
+ * ```ts
1817
+ * import { FR_CATALOG, provideKjTranslations, provideKjLocale } from '@kouji-ui/core';
1818
+ *
1819
+ * bootstrapApplication(App, {
1820
+ * providers: [
1821
+ * provideKjLocale({ locale: 'fr-FR' }), // selects the catalog at runtime
1822
+ * provideKjTranslations({ fr: FR_CATALOG }),
1823
+ * ],
1824
+ * });
1825
+ * ```
1826
+ * @doc
1827
+ * @doc-name i18n
1828
+ * @doc-order 1
1829
+ */
1830
+ declare function provideKjTranslations(catalogs: KjTranslationCatalogs): EnvironmentProviders;
1831
+
1832
+ /**
1833
+ * Resolves kouji-ui's visible / assistive-text strings from **typed, per-locale
1834
+ * catalogs**, selecting the active catalog from the locale that already exists —
1835
+ * {@link KjLocale.locale} — and guaranteeing a fallback to the English source so
1836
+ * the UI never blanks out on a missing key.
1837
+ *
1838
+ * Selection for a key resolves in order: exact locale tag (`fr-FR`) → bare
1839
+ * language subtag (`fr`) → `en`; within the chosen catalog a missing key falls
1840
+ * through to the English value, then to the key string itself. Values may carry
1841
+ * `{name}` placeholders substituted from `params`.
1842
+ *
1843
+ * Register alternate catalogs with {@link provideKjTranslations}; switch locale
1844
+ * at runtime with `KjLocale.setLocale()` — lookups are reactive, so
1845
+ * {@link translation} signals and the {@link KjTranslate} directive re-render.
1846
+ *
1847
+ * @example
1848
+ * ```ts
1849
+ * private readonly i18n = inject(KjTranslateService);
1850
+ * readonly closeLabel = this.i18n.translation('toast.close'); // Signal<string>
1851
+ * readonly info = computed(() =>
1852
+ * this.i18n.translate('pagination.pageOf', { page: 3, total: 12 }));
1853
+ * ```
1854
+ * @doc
1855
+ * @doc-name i18n
1856
+ * @doc-is-main
1857
+ * @doc-category Core/Accessibility
1858
+ * @doc-description Resolves visible and ARIA strings from typed, tree-shakable per-locale catalogs, selected by KjLocale with an English fallback.
1859
+ */
1860
+ declare class KjTranslateService {
1861
+ private readonly locale;
1862
+ private readonly catalogs;
1863
+ constructor();
1864
+ /**
1865
+ * Register (or extend) a catalog at runtime. Merges over any catalog already
1866
+ * registered for the same tag. Locale tags are matched case-insensitively.
1867
+ * @param locale - BCP-47 tag or bare language subtag (e.g. `'fr'`, `'fr-CA'`).
1868
+ * @param catalog - Partial catalog; omitted keys fall through to English.
1869
+ */
1870
+ register(locale: string, catalog: Partial<KjTranslationCatalog>): void;
1871
+ /**
1872
+ * Look up a key for the active locale and interpolate `params`. Reads
1873
+ * {@link KjLocale.locale}, so call it inside a `computed`/`effect` (or use
1874
+ * {@link translation}) to react to locale changes.
1875
+ */
1876
+ translate(key: KjTranslationKey, params?: KjTranslationParams): string;
1877
+ /**
1878
+ * Reactive wrapper around {@link translate} — a `Signal` that re-emits when
1879
+ * the active locale or the resolved value changes. Ideal for host bindings
1880
+ * and template interpolation.
1881
+ */
1882
+ translation(key: KjTranslationKey, params?: KjTranslationParams): Signal<string>;
1883
+ /**
1884
+ * Pick the best catalog for a locale tag: exact tag → bare language subtag →
1885
+ * English. Never returns `undefined`.
1886
+ */
1887
+ private selectCatalog;
1888
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjTranslateService, never>;
1889
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<KjTranslateService>;
1890
+ }
1891
+
1892
+ /**
1893
+ * Writes a localized string into its host — either the element's text content
1894
+ * or a named attribute (for `aria-label`, `title`, …). Fully reactive: the host
1895
+ * re-renders when the active locale (`KjLocale.locale()`) or the interpolation
1896
+ * params change, with no change-detection cost between changes (signals +
1897
+ * `effect`, no pipe).
1898
+ *
1899
+ * The key is compile-checked against the {@link KjTranslationKey} union, so a
1900
+ * typo fails `tsc`. Values may contain `{name}` placeholders filled from
1901
+ * `kjTranslateParams`.
1902
+ *
1903
+ * @example
1904
+ * ```html
1905
+ * <!-- visible text -->
1906
+ * <span [kjTranslate]="'pagination.pageOf'"
1907
+ * [kjTranslateParams]="{ page: page(), total: total() }"></span>
1908
+ *
1909
+ * <!-- localized aria-label on an icon-only button -->
1910
+ * <button [kjTranslate]="'toast.close'" kjTranslateAttr="aria-label">×</button>
1911
+ * ```
1912
+ * @doc
1913
+ * @doc-example Basic
1914
+ * @doc-theme default
1915
+ * @doc-file i18n.basic.example.ts
1916
+ * @doc-name i18n
1917
+ * @doc-category Core/Accessibility
1918
+ */
1919
+ declare class KjTranslate {
1920
+ private readonly svc;
1921
+ private readonly el;
1922
+ /** Translation key to render. Compile-checked against the catalog. */
1923
+ readonly kjTranslate: _angular_core.InputSignal<"toast.close" | "dialog.close" | "pagination.nav" | "pagination.previous" | "pagination.next" | "pagination.first" | "pagination.last" | "pagination.more" | "pagination.page" | "pagination.pageOf" | "a11y.pageChanged" | "a11y.selected" | "a11y.sortApplied">;
1924
+ /** Values for `{name}` placeholders in the resolved string. */
1925
+ readonly kjTranslateParams: _angular_core.InputSignal<KjTranslationParams | undefined>;
1926
+ /**
1927
+ * Target attribute to write (e.g. `'aria-label'`, `'title'`). When unset, the
1928
+ * translation is written to the host's text content.
1929
+ */
1930
+ readonly kjTranslateAttr: _angular_core.InputSignal<string | undefined>;
1931
+ constructor();
1932
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjTranslate, never>;
1933
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjTranslate, "[kjTranslate]", never, { "kjTranslate": { "alias": "kjTranslate"; "required": true; "isSignal": true; }; "kjTranslateParams": { "alias": "kjTranslateParams"; "required": false; "isSignal": true; }; "kjTranslateAttr": { "alias": "kjTranslateAttr"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1934
+ }
1935
+
1493
1936
  /**
1494
1937
  * Shape of the preset configuration consumed by `KjVariant`. One per consumer
1495
1938
  * directive, provided via `bindPresets` from a per-component config token.
@@ -2484,7 +2927,8 @@ declare class KjNumberInput implements KjNumberInputContext {
2484
2927
  /** @internal */
2485
2928
  readonly formCtrl: KjFormControl;
2486
2929
  private readonly el;
2487
- private readonly localeId;
2930
+ /** Locale provider — the fallback source of truth for locale + currency. */
2931
+ private readonly locale;
2488
2932
  private readonly group;
2489
2933
  /** Two-way bindable numeric model. `null` for empty. */
2490
2934
  readonly kjValue: _angular_core.ModelSignal<number | null>;
@@ -2511,10 +2955,13 @@ declare class KjNumberInput implements KjNumberInputContext {
2511
2955
  /** Opts into native `<input type="number">` mode. Disables the mask + locale formatting. */
2512
2956
  readonly kjUseNativeNumber: _angular_core.InputSignalWithTransform<boolean, unknown>;
2513
2957
  /** Drives `Intl.NumberFormat` style. Ignored when `kjUseNativeNumber=true`. */
2514
- readonly kjFormat: _angular_core.InputSignal<"decimal" | "currency" | "percent" | "unit">;
2515
- /** BCP-47 tag. Falls back to the injected `LOCALE_ID`. */
2958
+ readonly kjFormat: _angular_core.InputSignal<"decimal" | "percent" | "currency" | "unit">;
2959
+ /** BCP-47 tag. Falls back to the `KjLocale` provider (`provideKjLocale`). */
2516
2960
  readonly kjLocale: _angular_core.InputSignal<string | undefined>;
2517
- /** ISO 4217 code (e.g. `'USD'`). Required when `kjFormat="currency"`. */
2961
+ /**
2962
+ * ISO 4217 code (e.g. `'USD'`). Required when `kjFormat="currency"` unless a
2963
+ * default currency is supplied via `provideKjLocale`.
2964
+ */
2518
2965
  readonly kjCurrency: _angular_core.InputSignal<string | undefined>;
2519
2966
  /** Currency display mode. */
2520
2967
  readonly kjCurrencyDisplay: _angular_core.InputSignal<"symbol" | "name" | "code" | "narrowSymbol">;
@@ -5209,6 +5656,301 @@ declare const KJ_CHAT_BUBBLE_CONFIG: InjectionToken<KjChatBubbleConfig>;
5209
5656
  */
5210
5657
  declare function provideKjChatBubble(config: Partial<KjChatBubbleConfig>): Provider[];
5211
5658
 
5659
+ /**
5660
+ * Role of an AI-thread message. Distinct from {@link KjChatRole} in
5661
+ * `chat.context.ts` (that type is an ARIA role for the chat-bubble kit); this
5662
+ * one models the LLM conversation roles.
5663
+ */
5664
+ type KjChatMessageRole = 'user' | 'assistant' | 'system' | 'tool';
5665
+ /** High-level stream status of the thread. */
5666
+ type KjChatStatus = 'idle' | 'streaming' | 'error';
5667
+ /** A source reference attached to an assistant message. */
5668
+ interface KjChatCitation {
5669
+ /** Stable id (used as the list key and `aria` target). */
5670
+ readonly id: string;
5671
+ /** Human-readable title of the source. */
5672
+ readonly title: string;
5673
+ /** Optional link to the source. */
5674
+ readonly url?: string;
5675
+ /** Optional supporting snippet. */
5676
+ readonly snippet?: string;
5677
+ }
5678
+ /** Lifecycle status of a tool call. */
5679
+ type KjChatToolStatus = 'pending' | 'running' | 'done' | 'error';
5680
+ /** A tool / function call surfaced inside an assistant turn. */
5681
+ interface KjChatToolCall {
5682
+ /** Stable id. */
5683
+ readonly id: string;
5684
+ /** Tool / function name. */
5685
+ readonly name: string;
5686
+ /** Serialised arguments (opaque to the kit). */
5687
+ readonly args?: unknown;
5688
+ /** Lifecycle status. */
5689
+ readonly status: KjChatToolStatus;
5690
+ /** Result payload once resolved. */
5691
+ readonly result?: unknown;
5692
+ /** Error message when `status === 'error'`. */
5693
+ readonly error?: string;
5694
+ }
5695
+ /** A single message in an AI thread. */
5696
+ interface KjChatMessageData {
5697
+ /** Stable id. */
5698
+ readonly id: string;
5699
+ /** Conversation role. */
5700
+ readonly role: KjChatMessageRole;
5701
+ /** Message text (may be partial while streaming). */
5702
+ readonly content: string;
5703
+ /** True while this (assistant) message is being streamed in. */
5704
+ readonly streaming?: boolean;
5705
+ /** Error text if this turn failed. */
5706
+ readonly error?: string | null;
5707
+ /** Tool calls surfaced during this turn. */
5708
+ readonly toolCalls?: readonly KjChatToolCall[];
5709
+ /** Citations attached to this turn. */
5710
+ readonly citations?: readonly KjChatCitation[];
5711
+ /** Creation timestamp (epoch ms). */
5712
+ readonly createdAt?: number;
5713
+ }
5714
+ /** Allocate a stable message id. */
5715
+ declare function nextChatMessageId(): string;
5716
+ /**
5717
+ * Headless, **provider-agnostic** streaming chat state.
5718
+ *
5719
+ * Owns the `messages` signal, the stream `status`, and the append API. It has
5720
+ * **no** LLM SDK, `fetch`, or backend — the consumer wires their own model /
5721
+ * stream and drives this store: `sendUser()`, `beginAssistant()`, then
5722
+ * `pushChunk()` per token/chunk, and finally `endAssistant()` (or `fail()` /
5723
+ * `stop()`).
5724
+ *
5725
+ * Provided **per thread** (no `providedIn`); `KjChatThread` provides one, or
5726
+ * the consumer provides their own to share state.
5727
+ *
5728
+ * @example
5729
+ * ```ts
5730
+ * const store = inject(KjChatStore);
5731
+ * store.sendUser('Summarise the spec');
5732
+ * store.beginAssistant();
5733
+ * for await (const token of myModelStream()) store.pushChunk(token);
5734
+ * store.endAssistant();
5735
+ * ```
5736
+ * @doc-category Core/AI
5737
+ * @doc
5738
+ * @doc-name chat-store
5739
+ * @doc-description Headless provider-agnostic streaming chat state — messages, status, and the token-append API.
5740
+ */
5741
+ declare class KjChatStore {
5742
+ private readonly _messages;
5743
+ private readonly _status;
5744
+ private readonly _streamingId;
5745
+ /** The full message list. */
5746
+ readonly messages: _angular_core.Signal<readonly KjChatMessageData[]>;
5747
+ /** Current stream status. */
5748
+ readonly status: _angular_core.Signal<KjChatStatus>;
5749
+ /** Id of the in-flight assistant message, or `null`. */
5750
+ readonly streamingId: _angular_core.Signal<string | null>;
5751
+ /** True while an assistant message is streaming. */
5752
+ readonly isStreaming: _angular_core.Signal<boolean>;
5753
+ /** The current thread-level error, if any. */
5754
+ readonly error: _angular_core.Signal<string | null>;
5755
+ /** Append a user message; returns its id. */
5756
+ sendUser(content: string): string;
5757
+ /** Append a system message; returns its id. */
5758
+ addSystem(content: string): string;
5759
+ /**
5760
+ * Start an in-flight assistant message. Sets `status → 'streaming'` and
5761
+ * `streamingId`. Returns the new message id.
5762
+ */
5763
+ beginAssistant(seed?: string): string;
5764
+ /**
5765
+ * Append a token / chunk to the in-flight assistant message. No-op (with a
5766
+ * dev warning) if there is no in-flight message.
5767
+ */
5768
+ pushChunk(text: string): void;
5769
+ /** Add a tool call to the in-flight assistant message. */
5770
+ addToolCall(tc: KjChatToolCall): void;
5771
+ /** Patch an existing tool call by id on the in-flight message. */
5772
+ updateToolCall(toolCallId: string, patch: Partial<KjChatToolCall>): void;
5773
+ /** Attach citations to the in-flight assistant message. */
5774
+ addCitations(citations: readonly KjChatCitation[]): void;
5775
+ /** Complete the in-flight message; `status → 'idle'`. */
5776
+ endAssistant(): void;
5777
+ /**
5778
+ * Fail the in-flight turn. Sets `status → 'error'` and records the error on
5779
+ * the message. The message stops streaming but keeps any partial content.
5780
+ */
5781
+ fail(message: string): void;
5782
+ /**
5783
+ * Consumer-initiated stop (abort). Freezes whatever partial content exists
5784
+ * and returns to `idle`. The consumer is responsible for aborting their own
5785
+ * network stream.
5786
+ */
5787
+ stop(): void;
5788
+ /** Replace the whole message list (e.g. load history). */
5789
+ setMessages(messages: readonly KjChatMessageData[]): void;
5790
+ /** Clear the thread and return to `idle`. */
5791
+ reset(): void;
5792
+ private append;
5793
+ private patch;
5794
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjChatStore, never>;
5795
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<KjChatStore>;
5796
+ }
5797
+
5798
+ /** Options for {@link coalesceAnnouncement}. */
5799
+ interface KjCoalesceOptions {
5800
+ /**
5801
+ * Max characters to hold without a sentence boundary before flushing at the
5802
+ * last word boundary. Prevents a long boundary-less clause from being held
5803
+ * silent indefinitely. Default `160`.
5804
+ */
5805
+ readonly maxChars?: number;
5806
+ }
5807
+ /** Result of a coalescing pass. */
5808
+ interface KjCoalesceResult {
5809
+ /** Text ready to announce now (may be empty). */
5810
+ readonly toAnnounce: string;
5811
+ /** Trailing partial text to keep buffered for the next pass. */
5812
+ readonly remainder: string;
5813
+ }
5814
+ /**
5815
+ * Pure coalescing logic for the streaming live region — **the differentiator**.
5816
+ *
5817
+ * Screen readers announce every mutation of an `aria-live` region, so pushing a
5818
+ * streamed reply char-by-char produces an unusable torrent. This function holds
5819
+ * the streamed `buffer` and releases it only in **whole units**:
5820
+ *
5821
+ * 1. Flush up to and including the **last sentence boundary** (`.`, `!`, `?`,
5822
+ * newline). The trailing partial sentence stays in `remainder`.
5823
+ * 2. If no boundary exists but the buffer exceeds `maxChars`, flush up to the
5824
+ * last **word** boundary (space) so a long clause is not held silent.
5825
+ * 3. Otherwise announce nothing yet (`toAnnounce: ''`).
5826
+ *
5827
+ * The caller appends new chunks to `remainder` and calls this again; on stream
5828
+ * completion it flushes the final remainder unconditionally (see
5829
+ * {@link KjChatAnnouncer.flush}).
5830
+ *
5831
+ * @example
5832
+ * ```ts
5833
+ * coalesceAnnouncement('Hello there. How ar')
5834
+ * // → { toAnnounce: 'Hello there.', remainder: ' How ar' }
5835
+ * ```
5836
+ */
5837
+ declare function coalesceAnnouncement(buffer: string, opts?: KjCoalesceOptions): KjCoalesceResult;
5838
+ /**
5839
+ * Stateful wrapper around {@link coalesceAnnouncement} that exposes the current
5840
+ * announcement as a signal for a visually-hidden `aria-live="polite"` region.
5841
+ *
5842
+ * `push()` accumulates streamed text and emits coalesced sentences; `flush()`
5843
+ * (called on stream completion) releases the final remainder; `announce()`
5844
+ * pushes a discrete status line (e.g. an error) immediately.
5845
+ *
5846
+ * The emitted string toggles through empty between announcements so repeated
5847
+ * identical sentences are still re-announced by AT.
5848
+ *
5849
+ * @doc-category Core/AI
5850
+ * @doc
5851
+ * @doc-name chat-announcer
5852
+ * @doc-description Coalesces streamed tokens into whole-sentence polite live-region announcements.
5853
+ */
5854
+ declare class KjChatAnnouncer {
5855
+ private buffer;
5856
+ private readonly _message;
5857
+ private toggle;
5858
+ /** The current announcement text for the polite live region. */
5859
+ readonly message: _angular_core.Signal<string>;
5860
+ /** Max chars held without a boundary before a word-boundary flush. */
5861
+ maxChars: number;
5862
+ /** Append streamed text; emits any newly-completed sentence(s). */
5863
+ push(chunk: string): void;
5864
+ /** Force-release the buffered remainder (call on stream completion). */
5865
+ flush(): void;
5866
+ /** Announce a discrete status line immediately (bypasses coalescing). */
5867
+ announce(text: string): void;
5868
+ /** Clear buffered text and the current announcement. */
5869
+ clear(): void;
5870
+ private emit;
5871
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjChatAnnouncer, never>;
5872
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<KjChatAnnouncer>;
5873
+ }
5874
+
5875
+ /**
5876
+ * Filter function type for the command palette.
5877
+ * Returns a numeric score: > 0 means the item is visible, 0 means hidden.
5878
+ * Higher scores are more relevant when sorting by score.
5879
+ */
5880
+ type KjCommandFilter = (query: string, haystacks: readonly string[]) => number;
5881
+ /**
5882
+ * Strip diacritic marks from a string (e.g. `café` → `cafe`).
5883
+ * Uses NFD normalisation followed by removal of Unicode diacritic characters.
5884
+ * Note: locale-naive for v1 (Turkish/German edge cases are documented).
5885
+ */
5886
+ declare function stripDiacritics(str: string): string;
5887
+ /**
5888
+ * Default filter: case- and diacritic-insensitive substring match.
5889
+ * Returns score 1 if any haystack contains the needle, 0 otherwise.
5890
+ * Returns 1 for empty queries (all items visible).
5891
+ */
5892
+ declare const kjSubstringFilter: KjCommandFilter;
5893
+ /**
5894
+ * Optional fuzzy filter: checks whether all characters of the query appear
5895
+ * in the haystack in order (abbreviation matching).
5896
+ * E.g. `gth` matches `git checkout`.
5897
+ * Returns score 1 if any haystack matches, 0 otherwise.
5898
+ * Returns 1 for empty queries.
5899
+ *
5900
+ * @example
5901
+ * ```html
5902
+ * <div kjCommandPalette [kjFilter]="kjFuzzyFilter">…</div>
5903
+ * ```
5904
+ */
5905
+ declare const kjFuzzyFilter: KjCommandFilter;
5906
+
5907
+ /**
5908
+ * A slash command offered in the prompt input. The slash menu is rendered by a
5909
+ * real `KjCommandPalette` (keyboard nav, `aria-activedescendant`, listbox
5910
+ * semantics) — this type is just the data, and matching reuses the palette's
5911
+ * filter functions.
5912
+ */
5913
+ interface KjSlashCommand {
5914
+ /** Command name including the leading slash, e.g. `'/summarize'`. */
5915
+ readonly name: string;
5916
+ /** Short human-readable label. */
5917
+ readonly label: string;
5918
+ /** Optional longer description shown in the menu. */
5919
+ readonly description?: string;
5920
+ /** Opaque payload returned when the command is picked. */
5921
+ readonly value?: unknown;
5922
+ }
5923
+ /** Result of parsing prompt text for an in-progress slash command. */
5924
+ interface KjSlashParse {
5925
+ /** True while the user is typing a slash command name (no space yet). */
5926
+ readonly active: boolean;
5927
+ /** The query *after* the leading slash (empty string when just `/`). */
5928
+ readonly query: string;
5929
+ }
5930
+ /**
5931
+ * Parse prompt text for an in-progress slash command. The menu is active only
5932
+ * when the text starts with `/` and the command token has not been completed by
5933
+ * whitespace yet — so `/sum` is active but `/summarize now` is not.
5934
+ *
5935
+ * @example
5936
+ * ```ts
5937
+ * parseSlash('/sum') // → { active: true, query: 'sum' }
5938
+ * parseSlash('/sum arg') // → { active: false, query: '' }
5939
+ * parseSlash('hi') // → { active: false, query: '' }
5940
+ * ```
5941
+ */
5942
+ declare function parseSlash(text: string): KjSlashParse;
5943
+ /**
5944
+ * Filter slash commands against a query using the **command-palette filter**
5945
+ * (`kjSubstringFilter` by default — case- and diacritic-insensitive). Each
5946
+ * command's `[name, label, description]` form the haystack.
5947
+ *
5948
+ * @param query the text after the leading slash
5949
+ * @param commands the available commands
5950
+ * @param filter palette filter (defaults to {@link kjSubstringFilter})
5951
+ */
5952
+ declare function matchSlashCommands(query: string, commands: readonly KjSlashCommand[], filter?: KjCommandFilter): KjSlashCommand[];
5953
+
5212
5954
  /**
5213
5955
  * Marks a paragraph as the lead-in paragraph for a section — slightly larger
5214
5956
  * size with a softer tone. Reflects `data-tone="lead"` so theme CSS keys off
@@ -5756,24 +6498,161 @@ declare class KjDrawer {
5756
6498
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<KjDrawer, "kj-drawer", never, {}, {}, never, ["*"], true, [{ directive: typeof KjOverlayPanel; inputs: {}; outputs: {}; }]>;
5757
6499
  }
5758
6500
 
5759
- declare class KjTooltipTrigger {
5760
- readonly kjOpenDelay: _angular_core.InputSignalWithTransform<number, unknown>;
5761
- readonly kjCloseDelay: _angular_core.InputSignalWithTransform<number, unknown>;
5762
- readonly kjDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
5763
- constructor();
5764
- private readonly _overlayTrigger;
5765
- /** The controller of the composed `KjOverlayTrigger`, exposed for sibling `[kjFor]` panels. */
5766
- get controller(): KjOverlayController;
5767
- attachPanel(panel: KjOverlayPanel): void;
5768
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjTooltipTrigger, never>;
5769
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjTooltipTrigger, "[kjTooltipTrigger]", ["kjTooltipTrigger"], { "kjOpenDelay": { "alias": "kjOpenDelay"; "required": false; "isSignal": true; }; "kjCloseDelay": { "alias": "kjCloseDelay"; "required": false; "isSignal": true; }; "kjDisabled": { "alias": "kjDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof KjOverlayTrigger; inputs: { "kjOpen": "kjOpen"; }; outputs: {}; }]>;
5770
- }
5771
-
5772
- declare class KjTooltipContent {
5773
- readonly kjSide: _angular_core.InputSignal<KjSide>;
5774
- readonly kjAlign: _angular_core.InputSignal<KjAlign>;
5775
- readonly kjOffset: _angular_core.InputSignalWithTransform<number, unknown>;
5776
- constructor();
6501
+ /**
6502
+ * Reference returned by `KjSheetService.open()`. Mirrors
6503
+ * {@link import('../drawer/drawer.ref').KjDrawerRef}.
6504
+ *
6505
+ * Use `close(result?)` to dismiss the bottom sheet programmatically. Subscribe
6506
+ * to `afterClosed$` for the close result, or await the `result` promise.
6507
+ *
6508
+ * @doc-category Core/Overlay
6509
+ */
6510
+ declare class KjSheetRef<T, R = unknown> {
6511
+ readonly controller: KjOverlayController;
6512
+ private _instance;
6513
+ private _result;
6514
+ private resolveResult;
6515
+ /** Promise resolving with the close result. */
6516
+ readonly result: Promise<R | undefined>;
6517
+ private readonly _afterOpened;
6518
+ private readonly _afterClosed;
6519
+ /** Emits once after the sheet has finished opening. */
6520
+ readonly afterOpened$: Observable<void>;
6521
+ /** Emits the close result once the sheet has finished closing. */
6522
+ readonly afterClosed$: Observable<R | undefined>;
6523
+ /** Reactive lifecycle state mirrored from the underlying controller. */
6524
+ readonly state: Signal<'closed' | 'opening' | 'open' | 'closing'>;
6525
+ /** Convenience for `state() === 'open' || 'opening'`. */
6526
+ readonly isOpen: Signal<boolean>;
6527
+ constructor(controller: KjOverlayController);
6528
+ /** @internal Bind the rendered component instance for `instance`. */
6529
+ bindInstance(instance: T): void;
6530
+ /** The rendered sheet body component instance. */
6531
+ get instance(): T;
6532
+ /** Close the sheet with an optional result payload. */
6533
+ close(result?: R): void;
6534
+ }
6535
+
6536
+ /**
6537
+ * Initial resting height of the bottom sheet.
6538
+ *
6539
+ * - `'auto'` — hugs its content (default).
6540
+ * - `'half'` — opens at roughly half the viewport height.
6541
+ * - `'full'` — opens near full height, leaving a top inset.
6542
+ *
6543
+ * A multi-detent snap machine (dragging between heights) is intentionally
6544
+ * deferred; this option is forward-compatible with that follow-up.
6545
+ */
6546
+ type KjSheetDetent = 'auto' | 'half' | 'full';
6547
+ /** Configuration options for {@link KjSheetService.open}. */
6548
+ interface KjSheetOpenOptions<D = unknown> {
6549
+ /** Data injected into the rendered body via `SHEET_DATA`. */
6550
+ data?: D;
6551
+ /** Initial resting height. Defaults to `'auto'`. */
6552
+ detent?: KjSheetDetent;
6553
+ /** Enables grab-handle + drag-to-dismiss. Defaults to `true`. */
6554
+ dismissible?: boolean;
6555
+ /** Whether clicking the backdrop closes the sheet. Defaults to `true`. */
6556
+ closeOnOutside?: boolean;
6557
+ /** Accessible name applied when the body does not provide a heading. */
6558
+ ariaLabel?: string;
6559
+ }
6560
+ /**
6561
+ * Programmatic service for opening bottom sheets — a mobile-first,
6562
+ * bottom-anchored modal surface with a grab handle and drag-to-dismiss.
6563
+ *
6564
+ * Composes the same overlay primitive stack as `KjDrawer` and `KjDialog`
6565
+ * (`edgeSheet` position, `solidBackdrop`, `tabCycle` focus trap,
6566
+ * `htmlOverflow` scroll lock) through {@link KjOverlayBuilder} — the overlay
6567
+ * engine is reused, not reinvented.
6568
+ *
6569
+ * @doc-category Core/Overlay
6570
+ */
6571
+ declare class KjSheetService {
6572
+ private readonly builder;
6573
+ private readonly env;
6574
+ /**
6575
+ * Open a component as a modal bottom sheet.
6576
+ *
6577
+ * @param component - The body component rendered inside the sheet.
6578
+ * @param opts - Data, detent, dismissible, and close-on-outside controls.
6579
+ * @returns A {@link KjSheetRef} for closing and observing the sheet.
6580
+ */
6581
+ open<T, R = unknown, D = unknown>(component: Type<T>, opts?: KjSheetOpenOptions<D>): KjSheetRef<T, R>;
6582
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjSheetService, never>;
6583
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<KjSheetService>;
6584
+ }
6585
+ /** Token for passing data to a programmatically opened sheet body. */
6586
+ declare const SHEET_DATA: InjectionToken<unknown>;
6587
+ /** Token exposing the resolved initial detent to the rendered body. */
6588
+ declare const SHEET_DETENT: InjectionToken<KjSheetDetent>;
6589
+ /** Token exposing whether drag-to-dismiss is enabled to the rendered body. */
6590
+ declare const SHEET_DISMISSIBLE: InjectionToken<boolean>;
6591
+ /** Token exposing the fallback accessible name to the rendered body. */
6592
+ declare const SHEET_ARIA_LABEL: InjectionToken<string | null>;
6593
+
6594
+ /**
6595
+ * Bottom-sheet body component. Composes {@link KjOverlayPanel} so the host
6596
+ * inherits `role="dialog"`, `aria-modal`, `[data-state]`, and the bottom
6597
+ * edge-sheet position from `KjSheetService.open()`.
6598
+ *
6599
+ * Renders a grab handle (a real `<button>` for keyboard/click dismissal) and
6600
+ * hosts drag-to-dismiss: a downward pointer drag past 40% of the panel height
6601
+ * or 600 px/s velocity calls `ref.close()`. The drag mechanics mirror the
6602
+ * proven drawer bottom-drag path — no new gesture surface.
6603
+ *
6604
+ * @doc-category Core/Overlay
6605
+ */
6606
+ declare class KjSheet {
6607
+ /** Resolved initial detent (provided by `KjSheetService.open`). */
6608
+ readonly detent: KjSheetDetent;
6609
+ /** Whether grab-handle + drag-to-dismiss is active. */
6610
+ readonly dismissible: boolean;
6611
+ /** Fallback accessible name applied to the host when no heading is projected. */
6612
+ readonly ariaLabel: string | null;
6613
+ private readonly ref;
6614
+ private readonly el;
6615
+ private startY;
6616
+ private startTime;
6617
+ private pointerId;
6618
+ private _dragging;
6619
+ /** Reactive flag for the `data-kj-dragging` host binding. */
6620
+ protected dragging: _angular_core.Signal<boolean>;
6621
+ /** @internal */
6622
+ onPointerDown(event: PointerEvent): void;
6623
+ /** @internal */
6624
+ onPointerMove(event: PointerEvent): void;
6625
+ /** @internal */
6626
+ onPointerUp(event: PointerEvent): void;
6627
+ /** @internal */
6628
+ onPointerCancel(_event: PointerEvent): void;
6629
+ private endDrag;
6630
+ /** Close the sheet with an optional payload. */
6631
+ close(result?: unknown): void;
6632
+ /** Esc closes via the overlay-stack coordinator on the controller. */
6633
+ onEscape(): void;
6634
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjSheet, never>;
6635
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<KjSheet, "kj-sheet", never, {}, {}, never, ["*"], true, [{ directive: typeof KjOverlayPanel; inputs: {}; outputs: {}; }]>;
6636
+ }
6637
+
6638
+ declare class KjTooltipTrigger {
6639
+ readonly kjOpenDelay: _angular_core.InputSignalWithTransform<number, unknown>;
6640
+ readonly kjCloseDelay: _angular_core.InputSignalWithTransform<number, unknown>;
6641
+ readonly kjDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
6642
+ constructor();
6643
+ private readonly _overlayTrigger;
6644
+ /** The controller of the composed `KjOverlayTrigger`, exposed for sibling `[kjFor]` panels. */
6645
+ get controller(): KjOverlayController;
6646
+ attachPanel(panel: KjOverlayPanel): void;
6647
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjTooltipTrigger, never>;
6648
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjTooltipTrigger, "[kjTooltipTrigger]", ["kjTooltipTrigger"], { "kjOpenDelay": { "alias": "kjOpenDelay"; "required": false; "isSignal": true; }; "kjCloseDelay": { "alias": "kjCloseDelay"; "required": false; "isSignal": true; }; "kjDisabled": { "alias": "kjDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof KjOverlayTrigger; inputs: { "kjOpen": "kjOpen"; }; outputs: {}; }]>;
6649
+ }
6650
+
6651
+ declare class KjTooltipContent {
6652
+ readonly kjSide: _angular_core.InputSignal<KjSide>;
6653
+ readonly kjAlign: _angular_core.InputSignal<KjAlign>;
6654
+ readonly kjOffset: _angular_core.InputSignalWithTransform<number, unknown>;
6655
+ constructor();
5777
6656
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjTooltipContent, never>;
5778
6657
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<KjTooltipContent, "kj-tooltip-content", never, { "kjSide": { "alias": "kjSide"; "required": false; "isSignal": true; }; "kjAlign": { "alias": "kjAlign"; "required": false; "isSignal": true; }; "kjOffset": { "alias": "kjOffset"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof KjOverlayPanel; inputs: { "kjFor": "kjFor"; }; outputs: {}; }]>;
5779
6658
  }
@@ -6850,19 +7729,29 @@ declare class KjToastViewport {
6850
7729
  * for new code — this directive is for cases where the dismiss target id is
6851
7730
  * known outside the template context.
6852
7731
  *
7732
+ * Carries a **localized default `aria-label`** (from the `'toast.close'`
7733
+ * translation key), so an icon-only close button is named for assistive tech in
7734
+ * the active locale with no extra markup. Override per-instance with
7735
+ * `[kjToastCloseLabel]`.
7736
+ *
6853
7737
  * @example
6854
7738
  * ```html
6855
- * <button [kjToastClose]="toast.id" aria-label="Dismiss">×</button>
7739
+ * <button [kjToastClose]="toast.id">×</button>
6856
7740
  * ```
6857
7741
  * @doc-category Core/Overlay
6858
7742
  */
6859
7743
  declare class KjToastClose {
6860
7744
  private readonly svc;
7745
+ private readonly i18n;
6861
7746
  /** The id of the toast to dismiss on click. */
6862
7747
  kjToastClose: _angular_core.InputSignal<string>;
7748
+ /** Overrides the localized default `aria-label`. */
7749
+ readonly kjToastCloseLabel: _angular_core.InputSignal<string | undefined>;
7750
+ /** Resolved `aria-label`: explicit override, else the localized default. */
7751
+ protected readonly closeLabel: _angular_core.Signal<string>;
6863
7752
  dismiss(): void;
6864
7753
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjToastClose, never>;
6865
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjToastClose, "[kjToastClose]", never, { "kjToastClose": { "alias": "kjToastClose"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
7754
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjToastClose, "[kjToastClose]", never, { "kjToastClose": { "alias": "kjToastClose"; "required": true; "isSignal": true; }; "kjToastCloseLabel": { "alias": "kjToastCloseLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
6866
7755
  }
6867
7756
  /**
6868
7757
  * Service-launched toast panel. Composes `KjOverlayPanel` as a host directive
@@ -7041,6 +7930,7 @@ declare class KjCommandInput implements OnInit, OnDestroy {
7041
7930
  protected readonly palette: KjCommandPalette;
7042
7931
  private readonly nav;
7043
7932
  private readonly el;
7933
+ constructor();
7044
7934
  ngOnInit(): void;
7045
7935
  ngOnDestroy(): void;
7046
7936
  onKeydown(event: KeyboardEvent): void;
@@ -7204,38 +8094,6 @@ declare class KjCommandPaletteTrigger {
7204
8094
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjCommandPaletteTrigger, "[kjCommandPaletteTrigger]", ["kjCommandPaletteTrigger"], { "kjHotkey": { "alias": "kjHotkey"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof KjOverlayTrigger; inputs: { "kjOpen": "kjOpen"; }; outputs: {}; }]>;
7205
8095
  }
7206
8096
 
7207
- /**
7208
- * Filter function type for the command palette.
7209
- * Returns a numeric score: > 0 means the item is visible, 0 means hidden.
7210
- * Higher scores are more relevant when sorting by score.
7211
- */
7212
- type KjCommandFilter = (query: string, haystacks: readonly string[]) => number;
7213
- /**
7214
- * Strip diacritic marks from a string (e.g. `café` → `cafe`).
7215
- * Uses NFD normalisation followed by removal of Unicode diacritic characters.
7216
- * Note: locale-naive for v1 (Turkish/German edge cases are documented).
7217
- */
7218
- declare function stripDiacritics(str: string): string;
7219
- /**
7220
- * Default filter: case- and diacritic-insensitive substring match.
7221
- * Returns score 1 if any haystack contains the needle, 0 otherwise.
7222
- * Returns 1 for empty queries (all items visible).
7223
- */
7224
- declare const kjSubstringFilter: KjCommandFilter;
7225
- /**
7226
- * Optional fuzzy filter: checks whether all characters of the query appear
7227
- * in the haystack in order (abbreviation matching).
7228
- * E.g. `gth` matches `git checkout`.
7229
- * Returns score 1 if any haystack matches, 0 otherwise.
7230
- * Returns 1 for empty queries.
7231
- *
7232
- * @example
7233
- * ```html
7234
- * <div kjCommandPalette [kjFilter]="kjFuzzyFilter">…</div>
7235
- * ```
7236
- */
7237
- declare const kjFuzzyFilter: KjCommandFilter;
7238
-
7239
8097
  /**
7240
8098
  * Structured filter models — a near-direct adaptation of AG-Grid's
7241
8099
  * `FilterModel` shape. Each built-in filter writes one of these models
@@ -11567,7 +12425,7 @@ declare const KJ_DATE_PICKER: InjectionToken<KjDatePickerContext>;
11567
12425
  */
11568
12426
  declare class KjDatePicker implements KjDatePickerContext {
11569
12427
  private readonly disabledHost;
11570
- private readonly defaultLocale;
12428
+ private readonly localeProvider;
11571
12429
  /** Current selected value. Two-way bindable — `[(kjValue)]`. */
11572
12430
  readonly kjValue: _angular_core.ModelSignal<Date | null>;
11573
12431
  /** Earliest selectable date (inclusive). */
@@ -11576,7 +12434,7 @@ declare class KjDatePicker implements KjDatePickerContext {
11576
12434
  readonly kjMax: _angular_core.InputSignal<Date | null>;
11577
12435
  /** Per-date predicate. */
11578
12436
  readonly kjDisabledDates: _angular_core.InputSignal<((d: Date) => boolean) | null>;
11579
- /** BCP-47 locale tag. Defaults to Angular's `LOCALE_ID`. */
12437
+ /** BCP-47 locale tag. Falls back to the `KjLocale` provider (`provideKjLocale`). */
11580
12438
  readonly kjLocale: _angular_core.InputSignal<string>;
11581
12439
  /** First day of the week override (0=Sun … 6=Sat). */
11582
12440
  readonly kjFirstDayOfWeek: _angular_core.InputSignal<number | null>;
@@ -11691,7 +12549,195 @@ declare class KjDatePickerCalendar {
11691
12549
  }
11692
12550
 
11693
12551
  /**
11694
- * Wraps Apache ECharts. Initializes after first render, updates reactively, disposes on destroy.
12552
+ * A closed date interval, both bounds inclusive and normalized to
12553
+ * `startOfDay` (day precision — matching the Calendar / Date Picker family).
12554
+ *
12555
+ * @doc-category Core/Data input
12556
+ */
12557
+ interface KjDateRange {
12558
+ /** First day of the range (inclusive, `startOfDay`). */
12559
+ readonly start: Date;
12560
+ /** Last day of the range (inclusive, `startOfDay`). */
12561
+ readonly end: Date;
12562
+ }
12563
+ /**
12564
+ * A named quick-select for a {@link KjDateRange} — the unit the presets
12565
+ * listbox renders as one option.
12566
+ *
12567
+ * `getRange` is pure and receives the current instant so it is deterministic
12568
+ * in tests and lets consumers freeze "today".
12569
+ *
12570
+ * @doc-category Core/Data input
12571
+ */
12572
+ interface KjDateRangePreset {
12573
+ /** Stable identifier, e.g. `'last-7-days'`. */
12574
+ readonly id: string;
12575
+ /** Human-readable label, e.g. `'Last 7 days'`. */
12576
+ readonly label: string;
12577
+ /** Resolves the preset to a concrete range relative to `now`. */
12578
+ readonly getRange: (now: Date) => KjDateRange;
12579
+ }
12580
+ /**
12581
+ * Resolves a preset against `now`, normalizing both bounds to `startOfDay`.
12582
+ * `null` when the preset produces an inverted range (`start > end`).
12583
+ */
12584
+ declare function resolveDateRangePreset(preset: KjDateRangePreset, now: Date): KjDateRange | null;
12585
+ /**
12586
+ * Shared context for the Date Range Presets family. Implemented by
12587
+ * `KjDateRangePresets` (listbox root) and consumed by
12588
+ * `KjDateRangePresetOption`.
12589
+ *
12590
+ * @doc-category Core/Data input
12591
+ */
12592
+ interface KjDateRangePresetsContext {
12593
+ /** The presets currently rendered as options. */
12594
+ readonly presets: Signal<readonly KjDateRangePreset[]>;
12595
+ /** Id of the currently selected preset; `null` when none is chosen. */
12596
+ readonly selectedId: Signal<string | null>;
12597
+ /** Whether the listbox is disabled. */
12598
+ readonly disabled: Signal<boolean>;
12599
+ /** Selects a preset — resolves its range and commits `kjValue`. */
12600
+ select(preset: KjDateRangePreset): void;
12601
+ /** True when `id` names the selected preset. */
12602
+ isSelected(id: string): boolean;
12603
+ }
12604
+ declare const KJ_DATE_RANGE_PRESETS: InjectionToken<KjDateRangePresetsContext>;
12605
+
12606
+ /**
12607
+ * Headless Date Range Presets listbox. Renders a set of named quick-selects
12608
+ * ("Last 7 days", "This quarter", …) as `role="option"` children; picking one
12609
+ * resolves its `{ start, end }` range and commits the two-way `kjValue`.
12610
+ *
12611
+ * Designed to slot beside a range calendar, but usable standalone against any
12612
+ * `signal<KjDateRange | null>`.
12613
+ *
12614
+ * **Compound shape:**
12615
+ *
12616
+ * ```html
12617
+ * <div kjDateRangePresets [(kjValue)]="range">
12618
+ * @for (p of presets.presets(); track p.id) {
12619
+ * <button kjDateRangePresetOption [kjPreset]="p">{{ p.label }}</button>
12620
+ * }
12621
+ * </div>
12622
+ * ```
12623
+ *
12624
+ * Composes {@link KjRovingTabindex} (vertical) so the whole list is a single
12625
+ * tab stop with Arrow / Home / End navigation.
12626
+ *
12627
+ * @doc-category Core/Data input
12628
+ * @doc
12629
+ * @doc-name date-range-presets
12630
+ * @doc-description Unstyled listbox of named date-range quick-selects that resolve to an inclusive `{ start, end }` range.
12631
+ * @doc-is-main
12632
+ */
12633
+ declare class KjDateRangePresets implements KjDateRangePresetsContext {
12634
+ private readonly disabledHost;
12635
+ /** Selected range. Two-way bindable — `[(kjValue)]`. `null` when empty. */
12636
+ readonly kjValue: _angular_core.ModelSignal<KjDateRange | null>;
12637
+ /** Presets to render as options. Defaults to {@link defaultDateRangePresets}. */
12638
+ readonly kjPresets: _angular_core.InputSignal<readonly KjDateRangePreset[]>;
12639
+ /** Accessible name for the listbox. */
12640
+ readonly kjLabel: _angular_core.InputSignal<string>;
12641
+ /**
12642
+ * Injectable "now" for the preset math — defaults to the current instant.
12643
+ * Pass a fixed `Date` to freeze "today" (tests, storybook, replay).
12644
+ */
12645
+ readonly kjNow: _angular_core.InputSignal<Date | null>;
12646
+ /** Read-only — value displays but cannot be edited. */
12647
+ readonly kjReadonly: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
12648
+ readonly presets: _angular_core.Signal<readonly KjDateRangePreset[]>;
12649
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
12650
+ /**
12651
+ * Id of the preset whose resolved range matches `kjValue`, or `null`. Derived
12652
+ * from the value so an externally-set range still highlights its preset.
12653
+ */
12654
+ readonly selectedId: _angular_core.Signal<string | null>;
12655
+ private now;
12656
+ select(preset: KjDateRangePreset): void;
12657
+ isSelected(id: string): boolean;
12658
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjDateRangePresets, never>;
12659
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjDateRangePresets, "[kjDateRangePresets]", ["kjDateRangePresets"], { "kjValue": { "alias": "kjValue"; "required": false; "isSignal": true; }; "kjPresets": { "alias": "kjPresets"; "required": false; "isSignal": true; }; "kjLabel": { "alias": "kjLabel"; "required": false; "isSignal": true; }; "kjNow": { "alias": "kjNow"; "required": false; "isSignal": true; }; "kjReadonly": { "alias": "kjReadonly"; "required": false; "isSignal": true; }; }, { "kjValue": "kjValueChange"; }, never, never, true, [{ directive: typeof KjDisabled; inputs: { "kjDisabled": "kjDisabled"; }; outputs: {}; }, { directive: typeof KjRovingTabindex; inputs: {}; outputs: {}; }]>;
12660
+ }
12661
+
12662
+ /**
12663
+ * One option inside a `[kjDateRangePresets]` listbox. Apply to a native
12664
+ * `<button>` so Enter / Space activation comes for free; the composed
12665
+ * {@link KjRovingTabindexItemDirective} manages its `tabindex` so the list is
12666
+ * a single tab stop.
12667
+ *
12668
+ * ```html
12669
+ * <button kjDateRangePresetOption [kjPreset]="preset">{{ preset.label }}</button>
12670
+ * ```
12671
+ *
12672
+ * @doc-category Core/Data input
12673
+ * @doc
12674
+ * @doc-name date-range-presets
12675
+ */
12676
+ declare class KjDateRangePresetOption {
12677
+ /** @internal */
12678
+ readonly ctx: _kouji_ui_core.KjDateRangePresetsContext;
12679
+ /** The preset this option represents. */
12680
+ readonly kjPreset: _angular_core.InputSignal<KjDateRangePreset>;
12681
+ /** Whether this option is the selected one. */
12682
+ readonly selected: _angular_core.Signal<boolean>;
12683
+ /** @internal */
12684
+ onClick(): void;
12685
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjDateRangePresetOption, never>;
12686
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjDateRangePresetOption, "button[kjDateRangePresetOption]", ["kjDateRangePresetOption"], { "kjPreset": { "alias": "kjPreset"; "required": true; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof KjRovingTabindexItemDirective; inputs: {}; outputs: {}; }]>;
12687
+ }
12688
+
12689
+ /**
12690
+ * The built-in date range presets — Today, Yesterday, Last 7 / 30 days, This
12691
+ * week / month, Last month, This quarter, Year to date, Last year.
12692
+ *
12693
+ * All ranges are inclusive of both bounds. `Last 7 days` spans 7 calendar days
12694
+ * *including* today (today − 6 … today), matching how analytics tools count.
12695
+ *
12696
+ * @param weekStartsOn - First day of the week (0=Sun … 6=Sat) used by the
12697
+ * `This week` preset. Defaults to Sunday; pass the locale's week start to
12698
+ * align with the calendar.
12699
+ *
12700
+ * @doc-category Core/Data input
12701
+ * @doc
12702
+ * @doc-name date-range-presets
12703
+ */
12704
+ declare function defaultDateRangePresets(weekStartsOn?: number): KjDateRangePreset[];
12705
+
12706
+ /**
12707
+ * Projects a screen-reader-only table fallback for a `KjChart`. When present
12708
+ * inside a `[kjChart]` host, the host directive renders the template as a table
12709
+ * *sibling* of the chart element — outside the `role="img"` subtree — so
12710
+ * assistive technology reads structured data instead of the canvas.
12711
+ *
12712
+ * This directive only exposes its `TemplateRef`; `KjChart` performs the
12713
+ * rendering (see its `_fallback` content query). Rendering it standalone,
12714
+ * without a `[kjChart]` host, produces no output.
12715
+ *
12716
+ * @example
12717
+ * ```html
12718
+ * <div kjChart [kjChartOption]="opt()" kjChartLabel="Sales">
12719
+ * <ng-container *kjChartTableFallback>
12720
+ * <table>...</table>
12721
+ * </ng-container>
12722
+ * </div>
12723
+ * ```
12724
+ */
12725
+ declare class KjChartTableFallback {
12726
+ readonly tpl: TemplateRef<any>;
12727
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjChartTableFallback, never>;
12728
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjChartTableFallback, "[kjChartTableFallback]", never, {}, {}, never, never, true, never>;
12729
+ }
12730
+
12731
+ /** Payload emitted by `(kjChartEvent)` — the forwarded ECharts event name and its raw params. */
12732
+ interface KjChartEvent {
12733
+ /** The ECharts event name (as listed in `kjChartOn`), e.g. `'click'`, `'datazoom'`. */
12734
+ readonly type: string;
12735
+ /** The raw event object ECharts passes to the handler. Shape depends on `type`. */
12736
+ readonly params: unknown;
12737
+ }
12738
+ /**
12739
+ * Wraps Apache ECharts. Initializes after first render, updates reactively
12740
+ * (resize, reduced-motion, kj theme palette), disposes on destroy.
11695
12741
  * Always provide `kjChartLabel` for WCAG AAA compliance.
11696
12742
  *
11697
12743
  * @example
@@ -11703,20 +12749,900 @@ declare class KjDatePickerCalendar {
11703
12749
  * @doc-name chart
11704
12750
  * @doc-description Renders a reactive ECharts chart on any sized element with an accessible label.
11705
12751
  * @doc-is-main
12752
+ * @doc-example Line
12753
+ * @doc-file chart.example.ts
12754
+ * @doc-example Bar
12755
+ * @doc-file chart.bar.example.ts
12756
+ * @doc-example Donut
12757
+ * @doc-file chart.donut.example.ts
12758
+ * @doc-example Area
12759
+ * @doc-file chart.area.example.ts
12760
+ * @doc-example Sparkline
12761
+ * @doc-file chart.sparkline.example.ts
12762
+ * @doc-example Events
12763
+ * @doc-file chart.events.example.ts
12764
+ * @doc-example Loading
12765
+ * @doc-file chart.loading.example.ts
12766
+ * @doc-example Table fallback
12767
+ * @doc-file chart.fallback.example.ts
12768
+ * @doc-example Pluggable engine + general events
12769
+ * @doc-file chart.pluggable.example.ts
11706
12770
  */
11707
12771
  declare class KjChart {
11708
12772
  private readonly el;
11709
12773
  private readonly destroyRef;
12774
+ private readonly vcr;
12775
+ /** Optional consumer-supplied ECharts loader (via `provideECharts`); null → full-import fallback. */
12776
+ private readonly echartsLoader;
11710
12777
  /** ECharts option object defining the chart. */
11711
12778
  kjChartOption: _angular_core.InputSignal<EChartsOption>;
11712
- /** Accessible label for the chart. Required for WCAG AAA compliance. */
12779
+ /** Accessible short label for the chart. Required for WCAG AAA compliance. */
11713
12780
  kjChartLabel: _angular_core.InputSignal<string>;
11714
- private chart;
12781
+ /** Longer description; rendered visually-hidden and wired via aria-describedby. */
12782
+ kjChartDescription: _angular_core.InputSignal<string>;
12783
+ /** Toggles ECharts showLoading/hideLoading. */
12784
+ kjChartLoading: _angular_core.InputSignal<boolean>;
12785
+ /** Explicit color array; falls back to kj theme palette (resolveChartPalette) when undefined. */
12786
+ kjChartPalette: _angular_core.InputSignal<string[] | undefined>;
12787
+ /** Honored unless prefers-reduced-motion: reduce is set. */
12788
+ kjChartAnimate: _angular_core.InputSignal<boolean>;
12789
+ /**
12790
+ * ECharts event names to forward through `(kjChartEvent)`. Bound via
12791
+ * `chart.on(name, …)` and re-bound reactively when this list changes.
12792
+ * e.g. `['click', 'datazoom', 'legendselectchanged']`.
12793
+ */
12794
+ kjChartOn: _angular_core.InputSignal<readonly string[]>;
12795
+ /** Emits the ECharts instance after its first `setOption` (ready with data). Re-emits on re-init. */
12796
+ kjChartReady: _angular_core.OutputEmitterRef<EChartsType>;
12797
+ /**
12798
+ * Emits `{ type, params }` for every ECharts event named in `kjChartOn`.
12799
+ * Use this for arbitrary events; `kjChartReady` still exposes the raw
12800
+ * instance for full manual `.on(...)` wiring.
12801
+ */
12802
+ kjChartEvent: _angular_core.OutputEmitterRef<KjChartEvent>;
12803
+ /** Emits ECharts 'click' events. Convenience — also available via `kjChartOn`. */
12804
+ kjChartClick: _angular_core.OutputEmitterRef<ECElementEvent>;
12805
+ /** Emits ECharts 'legendselectchanged' events. Convenience — also available via `kjChartOn`. */
12806
+ kjChartLegendSelect: _angular_core.OutputEmitterRef<unknown>;
12807
+ /** Unique id for the description div; used by host's aria-describedby binding. */
12808
+ readonly descriptionId: _angular_core.Signal<string>;
12809
+ private readonly _descSeq;
12810
+ /** Projected `*kjChartTableFallback`, if any. Rendered as an SR table sibling. */
12811
+ protected readonly _fallback: _angular_core.Signal<KjChartTableFallback | undefined>;
12812
+ /** The live ECharts instance. A signal so event-binding + loading effects react to init/dispose. */
12813
+ private readonly chart;
12814
+ private readonly prefersReducedMotion;
12815
+ /** Currently-bound `kjChartOn` forwarders, tracked so they can be unbound on re-bind/destroy. */
12816
+ private forwarded;
11715
12817
  constructor();
12818
+ /**
12819
+ * (Re)binds the `kjChartOn` event forwarders: unbinds the previous set, then
12820
+ * binds `chart.on(name, …)` for each name, emitting `(kjChartEvent)`.
12821
+ * Idempotent — safe to call from both init and the reactive effect.
12822
+ */
12823
+ private bindForwardedEvents;
12824
+ /** Merges reactive concerns (palette, reduced-motion) into the user option. */
12825
+ private resolveOption;
12826
+ /** Imperative resize — wraps chart.resize(). */
12827
+ resize(): void;
12828
+ /** Imperative dispatch — passes through to ECharts. */
12829
+ dispatchAction(payload: Parameters<EChartsType['dispatchAction']>[0]): void;
12830
+ /** Reads current option — passes through to ECharts. */
12831
+ getOption(): EChartsOption | undefined;
11716
12832
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjChart, never>;
11717
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjChart, "[kjChart]", never, { "kjChartOption": { "alias": "kjChartOption"; "required": true; "isSignal": true; }; "kjChartLabel": { "alias": "kjChartLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
12833
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjChart, "[kjChart]", ["kjChart"], { "kjChartOption": { "alias": "kjChartOption"; "required": true; "isSignal": true; }; "kjChartLabel": { "alias": "kjChartLabel"; "required": true; "isSignal": true; }; "kjChartDescription": { "alias": "kjChartDescription"; "required": false; "isSignal": true; }; "kjChartLoading": { "alias": "kjChartLoading"; "required": false; "isSignal": true; }; "kjChartPalette": { "alias": "kjChartPalette"; "required": false; "isSignal": true; }; "kjChartAnimate": { "alias": "kjChartAnimate"; "required": false; "isSignal": true; }; "kjChartOn": { "alias": "kjChartOn"; "required": false; "isSignal": true; }; }, { "kjChartReady": "kjChartReady"; "kjChartEvent": "kjChartEvent"; "kjChartClick": "kjChartClick"; "kjChartLegendSelect": "kjChartLegendSelect"; }, ["_fallback"], never, true, never>;
11718
12834
  }
11719
12835
 
12836
+ /**
12837
+ * Resolves the chart color palette from kj theme tokens on the given host element.
12838
+ * Reads `--kj-chart-1..6` first; for any empty slot, falls back to the matching
12839
+ * intent token (`--kj-bg-primary`, `--kj-bg-accent`, `--kj-bg-success`,
12840
+ * `--kj-bg-warning`, `--kj-bg-danger`) in that order. Slots that remain empty
12841
+ * after fallback are dropped.
12842
+ */
12843
+ declare function resolveChartPalette(host: HTMLElement): string[];
12844
+
12845
+ /**
12846
+ * Minimal ECharts surface {@link KjChart} needs to boot a chart: the `init`
12847
+ * factory. Both the full `echarts` module and a tree-shaken `echarts/core`
12848
+ * build (after `.use([...])`) structurally satisfy this, so either can be
12849
+ * handed to {@link provideECharts}.
12850
+ *
12851
+ * `init` is typed to return `unknown` deliberately: `echarts` and `echarts/core`
12852
+ * ship separate (private-field-incompatible) declarations of their instance
12853
+ * type, so a shared structural type is the only thing both satisfy. `KjChart`
12854
+ * narrows the result to `EChartsType` internally.
12855
+ */
12856
+ interface KjEChartsCore {
12857
+ init(dom: HTMLElement | null, theme?: string | object | null, opts?: object): unknown;
12858
+ }
12859
+ /**
12860
+ * Supplies an ECharts implementation. Return it synchronously or as a
12861
+ * `Promise` — {@link KjChart} awaits either. Typically returns the consumer's
12862
+ * own `echarts/core` namespace with the needed charts/components/renderer
12863
+ * already registered via `.use([...])`, trading the ~1 MB full bundle for a
12864
+ * minimal tree-shaken one.
12865
+ */
12866
+ type KjEChartsLoader = () => KjEChartsCore | Promise<KjEChartsCore>;
12867
+ /**
12868
+ * DI token holding the optional {@link KjEChartsLoader}. When unset (default),
12869
+ * {@link KjChart} falls back to a dynamic `import('echarts')` of the full
12870
+ * build — zero-config convenience at the cost of bundle size.
12871
+ *
12872
+ * Prefer {@link provideECharts} over binding this token directly.
12873
+ * @doc
12874
+ * @doc-name chart
12875
+ * @doc-order 2
12876
+ */
12877
+ declare const KJ_ECHARTS: InjectionToken<KjEChartsLoader | null>;
12878
+ /**
12879
+ * Registers a tree-shaken ECharts build for {@link KjChart}. Call at app
12880
+ * bootstrap (or a route's `providers`) so every `[kjChart]` uses the minimal
12881
+ * engine instead of the full `import('echarts')` fallback.
12882
+ *
12883
+ * @example
12884
+ * ```ts
12885
+ * // main.ts
12886
+ * import { provideECharts } from '@kouji-ui/core';
12887
+ * import * as echarts from 'echarts/core';
12888
+ * import { LineChart, BarChart } from 'echarts/charts';
12889
+ * import { GridComponent, TooltipComponent, LegendComponent } from 'echarts/components';
12890
+ * import { CanvasRenderer } from 'echarts/renderers';
12891
+ *
12892
+ * echarts.use([LineChart, BarChart, GridComponent, TooltipComponent, LegendComponent, CanvasRenderer]);
12893
+ *
12894
+ * bootstrapApplication(App, {
12895
+ * providers: [provideECharts(() => echarts)],
12896
+ * });
12897
+ * ```
12898
+ * @doc
12899
+ * @doc-name chart
12900
+ * @doc-order 1
12901
+ */
12902
+ declare function provideECharts(loader: KjEChartsLoader): EnvironmentProviders;
12903
+
12904
+ /**
12905
+ * Public types for the {@link KjRichTextEditor} engine wrapper.
12906
+ *
12907
+ * These are framework- and engine-agnostic: they contain no Lexical runtime
12908
+ * imports so they are safe to import eagerly (including during SSR).
12909
+ */
12910
+ /** Inline text formats that {@link KjRichTextEditor} can toggle on a selection. */
12911
+ type KjTextFormat = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code';
12912
+ /** Block-level node type that the current selection resolves to. */
12913
+ type KjBlockType = 'paragraph' | 'h1' | 'h2' | 'h3' | 'quote' | 'code' | 'bullet' | 'number';
12914
+ /**
12915
+ * Snapshot of the editor's formatting state, derived from the current
12916
+ * selection. Exposed as reactive signals on the directive.
12917
+ */
12918
+ interface KjRichTextState {
12919
+ /** Inline formats active on the current selection. */
12920
+ readonly activeFormats: ReadonlySet<KjTextFormat>;
12921
+ /** Block type of the selection's top-level element. */
12922
+ readonly blockType: KjBlockType;
12923
+ /** Whether an undo step is available. */
12924
+ readonly canUndo: boolean;
12925
+ /** Whether a redo step is available. */
12926
+ readonly canRedo: boolean;
12927
+ /** Whether the selection is inside a link. */
12928
+ readonly isLink: boolean;
12929
+ /** Whether the document has no text content. */
12930
+ readonly empty: boolean;
12931
+ }
12932
+ /** Serialized editor content emitted whenever the document changes. */
12933
+ interface KjRichTextValue {
12934
+ /** Content serialized to HTML. */
12935
+ readonly html: string;
12936
+ /** Plain-text content. */
12937
+ readonly text: string;
12938
+ /** Lexical `SerializedEditorState` (structurally typed as `unknown`). */
12939
+ readonly json: unknown;
12940
+ }
12941
+ /** Descriptor for an image inserted via {@link KjRichTextEditor.insertImage}. */
12942
+ interface KjImageInsert {
12943
+ /** Image source URL. */
12944
+ readonly src: string;
12945
+ /** Alternative text — always supply for WCAG 1.1.1. */
12946
+ readonly alt?: string;
12947
+ /** Optional intrinsic width in pixels. */
12948
+ readonly width?: number;
12949
+ /** Optional intrinsic height in pixels. */
12950
+ readonly height?: number;
12951
+ }
12952
+
12953
+ /**
12954
+ * A keyboard shortcut spec, e.g. `'mod+b'`, `'mod+shift+z'`. `mod` resolves to
12955
+ * Ctrl on Windows/Linux and Cmd on macOS.
12956
+ */
12957
+ type KjRteShortcut = string;
12958
+ /**
12959
+ * Context passed to a feature's `setup` and to every toolbar/overlay action.
12960
+ * Wraps the live editor with high-level, package-agnostic helpers so features
12961
+ * rarely touch Lexical internals directly (bold/italic never import a package).
12962
+ */
12963
+ interface KjRichTextContext {
12964
+ /** The live Lexical editor. */
12965
+ readonly editor: LexicalEditor;
12966
+ /** Current formatting state derived from the selection. */
12967
+ readonly state: KjRichTextState;
12968
+ /** Run a mutation in a discrete (synchronously committed) editor update. */
12969
+ update(fn: () => void): void;
12970
+ /** Read editor state. */
12971
+ read<T>(fn: () => T): T;
12972
+ /** Toggle an inline text format (uses the core `FORMAT_TEXT_COMMAND`). */
12973
+ toggleInlineFormat(format: KjTextFormat): void;
12974
+ /** Replace the selected block(s) with the node returned by `create`. */
12975
+ setBlock(create: () => LexicalNode): void;
12976
+ /** Replace the selected block(s) with a plain paragraph. */
12977
+ setParagraph(): void;
12978
+ /** Insert nodes produced by `create` at the selection. */
12979
+ insertNodes(create: () => LexicalNode[]): void;
12980
+ /** Dispatch a Lexical command (feature packages provide the command constants). */
12981
+ dispatch<P>(command: LexicalCommand<P>, payload: P): void;
12982
+ /** Register a command handler; returns a teardown. */
12983
+ registerCommand<P>(command: LexicalCommand<P>, listener: (payload: P, editor: LexicalEditor) => boolean, priority: CommandListenerPriority): () => void;
12984
+ /** Register a node transform; returns a teardown. */
12985
+ registerNodeTransform<T extends LexicalNode>(klass: Klass<T>, listener: (node: T) => void): () => void;
12986
+ /** Register a keyboard shortcut; returns a teardown. */
12987
+ registerShortcut(shortcut: KjRteShortcut, run: () => void): () => void;
12988
+ /** Undo / redo. */
12989
+ undo(): void;
12990
+ redo(): void;
12991
+ /** Move focus into the editor. */
12992
+ focus(): void;
12993
+ /** Open a feature overlay by id, passing arbitrary data to its component. */
12994
+ openOverlay(id: string, data?: unknown): void;
12995
+ /** Close any open overlay. */
12996
+ closeOverlay(): void;
12997
+ /** Announce a message to assistive technology (aria-live). */
12998
+ announce(message: string): void;
12999
+ }
13000
+ /** How a toolbar item behaves. */
13001
+ type KjRteToolbarKind = 'button' | 'toggle';
13002
+ /**
13003
+ * A declarative toolbar contribution. Features own what appears in the toolbar;
13004
+ * the components layer renders items sorted by `group` then `order`.
13005
+ */
13006
+ interface KjRteToolbarItem {
13007
+ /** Stable unique id. */
13008
+ readonly id: string;
13009
+ /** Logical group (rendered together, separated from other groups). */
13010
+ readonly group: string;
13011
+ /** Sort order within the group. */
13012
+ readonly order: number;
13013
+ /** Lucide icon name. */
13014
+ readonly icon: string;
13015
+ /** Accessible name + tooltip. */
13016
+ readonly label: string;
13017
+ /** Value for `aria-keyshortcuts` (e.g. `'Control+B'`). */
13018
+ readonly ariaKeyshortcuts?: string;
13019
+ /** `toggle` items expose `aria-pressed`; `button` items do not. */
13020
+ readonly kind: KjRteToolbarKind;
13021
+ /** Whether the toggle is currently active (drives `aria-pressed` + styling). */
13022
+ isActive?(state: KjRichTextState): boolean;
13023
+ /** Whether the item is currently disabled. */
13024
+ isDisabled?(state: KjRichTextState): boolean;
13025
+ /** Run the item's action. */
13026
+ run(context: KjRichTextContext): void;
13027
+ }
13028
+ /**
13029
+ * A declarative overlay/popover contribution (e.g. the link editor). Opened via
13030
+ * `context.openOverlay(id, data)`; the component receives the `data` (via
13031
+ * `injectRteOverlayData`) and can act through the passed callbacks.
13032
+ */
13033
+ interface KjRteOverlay {
13034
+ /** Id used with `context.openOverlay(id)`. */
13035
+ readonly id: string;
13036
+ /** Accessible name for the overlay dialog. */
13037
+ readonly label: string;
13038
+ /** Standalone Angular component rendered inside the overlay. */
13039
+ readonly component: Type<unknown>;
13040
+ }
13041
+ /**
13042
+ * Maps a Lexical decorator-node type to the Angular component that renders it.
13043
+ * The engine's decorator bridge mounts the component into each node's DOM.
13044
+ */
13045
+ interface KjDecoratorRegistration {
13046
+ /** The Lexical node `getType()` value this renders. */
13047
+ readonly nodeType: string;
13048
+ /** The standalone Angular component to mount for each node instance. */
13049
+ readonly component: Type<unknown>;
13050
+ }
13051
+ /**
13052
+ * A self-contained vertical slice of editor functionality. A feature owns its
13053
+ * **package loading** (`load`), its **nodes**, its **behaviour/activation**
13054
+ * (`setup`), and its **UI** (`toolbar`, `overlay`).
13055
+ *
13056
+ * Package loading is lazy and per-feature: `load` dynamically imports the
13057
+ * feature's own `@lexical/*` package(s), so disabling a feature means its code
13058
+ * is never downloaded. Nodes are collected from all active features **before**
13059
+ * the editor is created.
13060
+ *
13061
+ * @example
13062
+ * ```ts
13063
+ * export function bulletList(): KjRichTextFeature {
13064
+ * let mod!: typeof import('@lexical/list');
13065
+ * return {
13066
+ * name: 'bullet-list',
13067
+ * async load() { mod = await import('@lexical/list'); },
13068
+ * nodes: () => [mod.ListNode, mod.ListItemNode],
13069
+ * setup: (ctx) => mod.registerList(ctx.editor),
13070
+ * toolbar: [{ id: 'bullet-list', group: 'block', order: 1, icon: 'list',
13071
+ * label: 'Bullet list', kind: 'toggle',
13072
+ * isActive: (s) => s.blockType === 'bullet',
13073
+ * run: (ctx) => ctx.dispatch(mod.INSERT_UNORDERED_LIST_COMMAND, undefined) }],
13074
+ * };
13075
+ * }
13076
+ * ```
13077
+ */
13078
+ interface KjRichTextFeature {
13079
+ /** Unique, human-readable feature name. */
13080
+ readonly name: string;
13081
+ /** Lazily import this feature's own `@lexical/*` package(s). Called once at init. */
13082
+ load?(): Promise<void>;
13083
+ /** Node classes this feature contributes (resolved after `load`). */
13084
+ nodes?(): ReadonlyArray<Klass<LexicalNode>>;
13085
+ /** Register behaviour (commands, transforms, keybindings). Returns an optional teardown. */
13086
+ setup?(context: KjRichTextContext): (() => void) | void;
13087
+ /** Angular components to render for this feature's decorator node types. */
13088
+ decorators?: readonly KjDecoratorRegistration[];
13089
+ /** Declarative toolbar contributions. */
13090
+ toolbar?: readonly KjRteToolbarItem[];
13091
+ /** Declarative overlay contributions. */
13092
+ overlay?: readonly KjRteOverlay[];
13093
+ }
13094
+
13095
+ /**
13096
+ * Context contract exposed by a {@link KjRichTextEditor} through {@link KJ_RICH_TEXT}.
13097
+ *
13098
+ * Follows the repo's signal-context pattern (root provides a token pointing to
13099
+ * itself; descendants inject it) so that child directives and toolbars can read
13100
+ * editor state / toolbar contributions and register features without a hard
13101
+ * reference to the class.
13102
+ */
13103
+ interface KjRichTextHost {
13104
+ /** The live Lexical editor instance, or `null` before initialization. */
13105
+ readonly editor: Signal<LexicalEditor | null>;
13106
+ /** Current formatting state derived from the selection. */
13107
+ readonly state: Signal<KjRichTextState>;
13108
+ /** Toolbar items contributed by the active features, sorted by group then order. */
13109
+ readonly toolbarItems: Signal<readonly KjRteToolbarItem[]>;
13110
+ /**
13111
+ * Register a feature with this editor. Must be called before the editor
13112
+ * initializes (during a child directive's `ngOnInit`, or via
13113
+ * {@link provideKjRichText}) for node-contributing features to take effect.
13114
+ */
13115
+ registerFeature(feature: KjRichTextFeature): void;
13116
+ }
13117
+ /**
13118
+ * Context token for the rich-text editor. A {@link KjRichTextEditor} provides it
13119
+ * pointing to itself; descendants (toolbars, feature directives) inject it.
13120
+ */
13121
+ declare const KJ_RICH_TEXT: InjectionToken<KjRichTextHost>;
13122
+ /**
13123
+ * Multi-provider token for app- or scope-wide rich-text features. Contribute to
13124
+ * it with {@link provideKjRichText}; every {@link KjRichTextEditor} in that
13125
+ * injector scope activates them.
13126
+ */
13127
+ declare const KJ_RICH_TEXT_FEATURES: InjectionToken<KjRichTextFeature[]>;
13128
+ /** @deprecated Renamed to {@link KJ_RICH_TEXT_FEATURES}. Same token instance. */
13129
+ declare const KJ_RICH_TEXT_EXTENSIONS: InjectionToken<KjRichTextFeature[]>;
13130
+ /**
13131
+ * Register one or more rich-text features for every editor in this injector
13132
+ * scope (app config, a route, or a component's `providers`). Only the chosen
13133
+ * features load their packages and contribute toolbar/overlay UI.
13134
+ *
13135
+ * @example
13136
+ * ```ts
13137
+ * providers: [provideKjRichText(bold(), italic(), link())]
13138
+ * ```
13139
+ */
13140
+ declare function provideKjRichText(...features: KjRichTextFeature[]): Provider[];
13141
+ /**
13142
+ * Injection token holding the Lexical node instance being decorated. An Angular
13143
+ * component mounted for a decorator node injects it (via {@link injectRichTextNode})
13144
+ * to read the node's data.
13145
+ */
13146
+ declare const KJ_RICH_TEXT_NODE: InjectionToken<unknown>;
13147
+ /** Inject the Lexical node instance a decorator-node component is rendering. */
13148
+ declare function injectRichTextNode<T = unknown>(): T;
13149
+ /** Injection token holding the data a feature passed to `context.openOverlay(id, data)`. */
13150
+ declare const KJ_RTE_OVERLAY_DATA: InjectionToken<unknown>;
13151
+ /** Inject the data supplied to the currently rendered rich-text overlay component. */
13152
+ declare function injectRteOverlayData<T = unknown>(): T;
13153
+ /** A component mounted by the decorator bridge, with a handle to tear it down. */
13154
+ interface KjMountedComponent {
13155
+ /** The mounted component's root DOM element (to append into the node's host). */
13156
+ readonly element: HTMLElement;
13157
+ /** Destroy the component and detach it from change detection. */
13158
+ destroy(): void;
13159
+ }
13160
+ /**
13161
+ * Adapter the engine uses to mount an Angular component for a Lexical decorator
13162
+ * node. Supplied by {@link KjRichTextEditor} so the engine stays free of Angular
13163
+ * DI specifics (and CDK-free).
13164
+ */
13165
+ interface KjDecoratorMountAdapter {
13166
+ /** Mount `component`, providing `node` via {@link KJ_RICH_TEXT_NODE}. */
13167
+ mount(component: unknown, node: unknown): KjMountedComponent;
13168
+ }
13169
+
13170
+ /** A resolved open overlay: its descriptor plus the data the feature passed. */
13171
+ interface KjActiveOverlay {
13172
+ readonly overlay: KjRteOverlay;
13173
+ readonly data: unknown;
13174
+ }
13175
+ /** A contiguous run of toolbar items sharing a group, for rendering. */
13176
+ interface KjRteToolbarGroup {
13177
+ readonly group: string;
13178
+ readonly items: readonly KjRteToolbarItem[];
13179
+ }
13180
+ /**
13181
+ * Headless, client-driven rich-text editor wrapping [Lexical](https://lexical.dev).
13182
+ *
13183
+ * Apply to a block element to turn it into an editable, accessible surface
13184
+ * (`role="textbox"`, `aria-multiline`). The editor is composed from **features**
13185
+ * (see {@link KjRichTextFeature}) supplied via {@link provideKjRichText}, the
13186
+ * `kjFeatures` input, or `[kjRichTextExtension]` child directives. Each feature
13187
+ * lazily loads its own `@lexical/*` package(s) in the browser, so disabling a
13188
+ * feature keeps its code out of the bundle. SSR-safe: the engine loads via
13189
+ * dynamic `import()` inside `afterNextRender`.
13190
+ *
13191
+ * Exposes the aggregated {@link toolbarItems}, reactive `state`, and imperative
13192
+ * helpers (`runItem`, `undo`, …) for a dynamic toolbar to bind to, and
13193
+ * implements {@link ControlValueAccessor} (HTML string model) for Angular forms.
13194
+ *
13195
+ * @doc-category Core/Forms
13196
+ * @doc
13197
+ * @doc-name rich-text-editor
13198
+ * @doc-description Headless, feature-composed Lexical rich-text editor directive with a dynamic toolbar contract and form support.
13199
+ * @doc-is-main
13200
+ */
13201
+ declare class KjRichTextEditor implements ControlValueAccessor, KjRichTextHost {
13202
+ private readonly el;
13203
+ private readonly destroyRef;
13204
+ private readonly platformId;
13205
+ private readonly envInjector;
13206
+ private readonly appRef;
13207
+ /** App-/scope-wide features contributed via {@link provideKjRichText}. */
13208
+ private readonly providedFeatures;
13209
+ /** Features registered by child directives via {@link registerFeature}. */
13210
+ private readonly childFeatures;
13211
+ /** Initial content as an HTML string. Ongoing edits are reported via outputs / forms. */
13212
+ readonly kjValue: _angular_core.InputSignal<string>;
13213
+ /** Per-instance features, merged with provided + child-registered features. */
13214
+ readonly kjFeatures: _angular_core.InputSignal<readonly KjRichTextFeature[]>;
13215
+ /** @deprecated Renamed to {@link kjFeatures}. Still honored (merged). */
13216
+ readonly kjExtensions: _angular_core.InputSignal<readonly KjRichTextFeature[]>;
13217
+ /** @deprecated Renamed to {@link kjFeatures}. Still honored (merged). */
13218
+ readonly kjPlugins: _angular_core.InputSignal<readonly KjRichTextFeature[]>;
13219
+ /** Makes the editor non-editable while still selectable. */
13220
+ readonly kjReadonly: _angular_core.InputSignal<boolean>;
13221
+ /** Native spellcheck toggle. */
13222
+ readonly kjSpellcheck: _angular_core.InputSignal<boolean>;
13223
+ /** Lexical namespace (diagnostics only). */
13224
+ readonly kjNamespace: _angular_core.InputSignal<string>;
13225
+ /** Emits the serialized HTML whenever the document changes. */
13226
+ readonly valueChange: _angular_core.OutputEmitterRef<string>;
13227
+ /** Emits the plain-text content whenever the document changes. */
13228
+ readonly textChange: _angular_core.OutputEmitterRef<string>;
13229
+ /** Emits the Lexical `SerializedEditorState` whenever the document changes. */
13230
+ readonly jsonChange: _angular_core.OutputEmitterRef<SerializedEditorState<lexical.SerializedLexicalNode>>;
13231
+ /** Emits messages a feature asked to announce to assistive technology. */
13232
+ readonly announce: _angular_core.OutputEmitterRef<string>;
13233
+ private readonly editorSig;
13234
+ /** The live Lexical editor instance, or `null` before initialization. */
13235
+ readonly editor: _angular_core.Signal<LexicalEditor | null>;
13236
+ /** Current formatting state derived from the selection. */
13237
+ readonly state: _angular_core.WritableSignal<KjRichTextState>;
13238
+ readonly isBold: _angular_core.Signal<boolean>;
13239
+ readonly isItalic: _angular_core.Signal<boolean>;
13240
+ readonly isUnderline: _angular_core.Signal<boolean>;
13241
+ readonly isStrikethrough: _angular_core.Signal<boolean>;
13242
+ readonly isCode: _angular_core.Signal<boolean>;
13243
+ readonly blockType: _angular_core.Signal<KjBlockType>;
13244
+ readonly canUndo: _angular_core.Signal<boolean>;
13245
+ readonly canRedo: _angular_core.Signal<boolean>;
13246
+ readonly isLink: _angular_core.Signal<boolean>;
13247
+ readonly empty: _angular_core.Signal<boolean>;
13248
+ /** All active features (provided + inputs + child-registered). */
13249
+ private readonly features;
13250
+ /** Toolbar items contributed by active features, sorted by group then order. */
13251
+ readonly toolbarItems: _angular_core.Signal<readonly KjRteToolbarItem[]>;
13252
+ /** Toolbar items grouped into contiguous runs (for rendering separators). */
13253
+ readonly toolbarGroups: _angular_core.Signal<readonly KjRteToolbarGroup[]>;
13254
+ /** Overlay descriptors contributed by active features. */
13255
+ private readonly overlays;
13256
+ /** The overlay currently open (opened by a feature), or `null`. */
13257
+ readonly activeOverlay: _angular_core.WritableSignal<KjActiveOverlay | null>;
13258
+ /** @internal CVA disabled flag. */
13259
+ readonly disabledState: _angular_core.WritableSignal<boolean>;
13260
+ private engine;
13261
+ private pendingValue;
13262
+ private lastHtml;
13263
+ private applyingExternal;
13264
+ private destroyed;
13265
+ private onChange;
13266
+ /** @internal blur handler wired via host bindings. */
13267
+ onTouched: () => void;
13268
+ constructor();
13269
+ private emitValue;
13270
+ private openOverlayById;
13271
+ /** {@inheritDoc KjRichTextHost.registerFeature} */
13272
+ registerFeature(feature: KjRichTextFeature): void;
13273
+ /** @deprecated Renamed to {@link registerFeature}. */
13274
+ registerExtension(feature: KjRichTextFeature): void;
13275
+ /** Run a toolbar item's action against the live editor (no-op until ready). */
13276
+ runItem(item: KjRteToolbarItem): void;
13277
+ /** Whether a toggle toolbar item is currently active. */
13278
+ itemActive(item: KjRteToolbarItem): boolean;
13279
+ /** Whether a toolbar item is currently disabled. */
13280
+ itemDisabled(item: KjRteToolbarItem): boolean;
13281
+ /** Close any open feature overlay. */
13282
+ closeOverlay(): void;
13283
+ /** Undo the last edit. */
13284
+ undo(): void;
13285
+ /** Redo the last undone edit. */
13286
+ redo(): void;
13287
+ /** Move focus into the editor. */
13288
+ focus(): void;
13289
+ /** Remove all content, leaving a single empty paragraph. */
13290
+ clear(): void;
13291
+ /** Serialize the current content to HTML. */
13292
+ getHtml(): string;
13293
+ /** Replace the content from an HTML string. */
13294
+ setHtml(html: string): void;
13295
+ /** Serialize the current content to a Lexical `SerializedEditorState`. */
13296
+ getJson(): SerializedEditorState | null;
13297
+ /** Replace the content from a Lexical `SerializedEditorState`. */
13298
+ setJson(json: SerializedEditorState): void;
13299
+ /** Build the Angular mount adapter the engine uses for decorator-node components. */
13300
+ private createMountAdapter;
13301
+ writeValue(value: string | null): void;
13302
+ registerOnChange(fn: (value: string) => void): void;
13303
+ registerOnTouched(fn: () => void): void;
13304
+ setDisabledState(isDisabled: boolean): void;
13305
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjRichTextEditor, never>;
13306
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjRichTextEditor, "[kjRichTextEditor]", ["kjRichTextEditor"], { "kjValue": { "alias": "kjValue"; "required": false; "isSignal": true; }; "kjFeatures": { "alias": "kjFeatures"; "required": false; "isSignal": true; }; "kjExtensions": { "alias": "kjExtensions"; "required": false; "isSignal": true; }; "kjPlugins": { "alias": "kjPlugins"; "required": false; "isSignal": true; }; "kjReadonly": { "alias": "kjReadonly"; "required": false; "isSignal": true; }; "kjSpellcheck": { "alias": "kjSpellcheck"; "required": false; "isSignal": true; }; "kjNamespace": { "alias": "kjNamespace"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "textChange": "textChange"; "jsonChange": "jsonChange"; "announce": "announce"; }, never, never, true, never>;
13307
+ }
13308
+
13309
+ /**
13310
+ * Registers one or more {@link KjRichTextFeature}s with the nearest
13311
+ * {@link KjRichTextEditor} — the signal-context pattern (like `Option`
13312
+ * registering with `Select`).
13313
+ *
13314
+ * Place it on the same element as `[kjRichTextEditor]`, or on a descendant that
13315
+ * can inject {@link KJ_RICH_TEXT} (e.g. an `<ng-container>`). Registration
13316
+ * happens in `ngOnInit`, before the editor initializes, so node-contributing
13317
+ * features are picked up.
13318
+ *
13319
+ * @example
13320
+ * ```html
13321
+ * <div kjRichTextEditor [kjFeatures]="[mentionFeature]"></div>
13322
+ * <!-- or as a child directive -->
13323
+ * <div kjRichTextEditor [kjRichTextFeature]="mentionFeature"></div>
13324
+ * ```
13325
+ * @doc-category Core/Forms
13326
+ * @doc
13327
+ * @doc-name rich-text-editor
13328
+ */
13329
+ declare class KjRichTextExtensionDirective implements OnInit {
13330
+ private readonly host;
13331
+ /** The feature (or features) to register with the host editor. */
13332
+ readonly kjRichTextFeature: _angular_core.InputSignal<KjRichTextFeature | readonly KjRichTextFeature[] | undefined>;
13333
+ /** @deprecated Renamed to {@link kjRichTextFeature}. */
13334
+ readonly kjRichTextExtension: _angular_core.InputSignal<KjRichTextFeature | readonly KjRichTextFeature[] | undefined>;
13335
+ ngOnInit(): void;
13336
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjRichTextExtensionDirective, never>;
13337
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjRichTextExtensionDirective, "[kjRichTextFeature], [kjRichTextExtension]", never, { "kjRichTextFeature": { "alias": "kjRichTextFeature"; "required": false; "isSignal": true; }; "kjRichTextExtension": { "alias": "kjRichTextExtension"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
13338
+ }
13339
+
13340
+ /** Configuration for {@link createKjDecoratorNode}. */
13341
+ interface KjDecoratorNodeConfig {
13342
+ /** Unique Lexical node type string (must match the `decorators` registration). */
13343
+ type: string;
13344
+ /** The Angular component rendered for each node instance. */
13345
+ component: Type<unknown>;
13346
+ /** Render inline (`<span>`) rather than as a block (`<div>`). Default `false`. */
13347
+ inline?: boolean;
13348
+ /** Optional accessible name applied to the node's host element (WCAG 4.1.2). */
13349
+ ariaLabel?: string;
13350
+ }
13351
+ /** The node class plus helpers returned by {@link createKjDecoratorNode}. */
13352
+ interface KjDecoratorNodeApi<TData extends Record<string, unknown> = Record<string, unknown>> {
13353
+ /** The generated Lexical `DecoratorNode` subclass — pass to `nodes` in your extension. */
13354
+ readonly Node: Klass<LexicalNode>;
13355
+ /** Create a node instance carrying `data`. Use inside `editor.update`. */
13356
+ $create(data?: TData): LexicalNode;
13357
+ /** Type guard for this node. */
13358
+ $is(node: LexicalNode | null | undefined): boolean;
13359
+ }
13360
+ /**
13361
+ * Build a self-contained Lexical `DecoratorNode` subclass whose instances render
13362
+ * an Angular component (mounted by the editor's decorator bridge). This is the
13363
+ * reusable "render an Angular component as an editor node" framework — define a
13364
+ * custom node from outside the engine in a handful of lines.
13365
+ *
13366
+ * The node stores an arbitrary JSON-serializable `data` object; the mounted
13367
+ * component reads it via {@link injectRichTextNode}. `lexical` is passed in (not
13368
+ * imported here) so this stays SSR-safe and out of the base bundle.
13369
+ *
13370
+ * @example
13371
+ * ```ts
13372
+ * const badge = createKjDecoratorNode(lexical, { type: 'badge', component: BadgeChip, inline: true });
13373
+ * // badge.Node -> register via extension.nodes; badge.$create({ label }) -> insert
13374
+ * ```
13375
+ */
13376
+ declare function createKjDecoratorNode<TData extends Record<string, unknown> = Record<string, unknown>>(lexical: typeof lexical, config: KjDecoratorNodeConfig): KjDecoratorNodeApi<TData>;
13377
+
13378
+ /** The image node class plus helpers returned by {@link createKjImageNode}. */
13379
+ interface KjImageNodeApi {
13380
+ /** The generated Lexical image node class — pass to a feature's `nodes()`. */
13381
+ readonly Node: Klass<LexicalNode>;
13382
+ /** Create an image node. Use inside `editor.update`. */
13383
+ $create(image: KjImageInsert): LexicalNode;
13384
+ /** Type guard for this image node. */
13385
+ $is(node: LexicalNode | null | undefined): boolean;
13386
+ }
13387
+ /**
13388
+ * Build a self-rendering block image `DecoratorNode` subclass. It paints its own
13389
+ * `<figure><img></figure>` in `createDOM` (no framework decorator infra needed)
13390
+ * and round-trips through HTML via `importDOM`/`exportDOM`.
13391
+ *
13392
+ * `lexical` is passed in (not imported here) so this module carries no eager
13393
+ * Lexical import and stays SSR-safe — the image feature calls it inside `load()`.
13394
+ */
13395
+ declare function createKjImageNode(lexical: typeof lexical): KjImageNodeApi;
13396
+
13397
+ /**
13398
+ * @deprecated Renamed to {@link KjRichTextFeature}. Kept as an alias for
13399
+ * backwards compatibility; will be removed in a future major.
13400
+ */
13401
+ type KjRichTextExtension = KjRichTextFeature;
13402
+ /**
13403
+ * @deprecated Renamed to {@link KjRichTextFeature}. Kept as an alias for
13404
+ * backwards compatibility; will be removed in a future major.
13405
+ */
13406
+ type KjRichTextPlugin = KjRichTextFeature;
13407
+
13408
+ /**
13409
+ * The Monaco namespace (`typeof import('monaco-editor')`). Imported as a
13410
+ * **type only** so `monaco-editor` never becomes a runtime dependency of the
13411
+ * base bundle — the actual module is resolved lazily by {@link KjEditorLoader}.
13412
+ */
13413
+ type KjMonaco = typeof monaco_editor;
13414
+ /** A function that resolves a ready-to-use Monaco namespace. */
13415
+ type KjMonacoLoaderFn = () => Promise<KjMonaco>;
13416
+ /**
13417
+ * Monaco standalone editor construction options. Re-exported under a `kj` name
13418
+ * so consumers don't need a direct `monaco-editor` type import at call sites.
13419
+ */
13420
+ type KjEditorOptions = editor.IStandaloneEditorConstructionOptions;
13421
+ /** The live Monaco editor instance. */
13422
+ type KjEditorInstance = editor.IStandaloneCodeEditor;
13423
+ /** Gutter line-number rendering mode. */
13424
+ type KjEditorLineNumbers = 'on' | 'off' | 'relative';
13425
+ /** Soft-wrap mode. */
13426
+ type KjEditorWordWrap = 'on' | 'off';
13427
+ /**
13428
+ * A code language for the editor. The listed ids get editor autocomplete, but
13429
+ * any Monaco language id (or a short alias like `ts` / `md` / `yml`, normalised
13430
+ * for you) is accepted — hence the open `(string & {})`. This is a kj-level
13431
+ * abstraction: callers never import a Monaco type to set a language.
13432
+ */
13433
+ type KjEditorLanguage = 'plaintext' | 'typescript' | 'javascript' | 'json' | 'html' | 'css' | 'scss' | 'less' | 'markdown' | 'yaml' | 'xml' | 'python' | 'java' | 'go' | 'rust' | 'sql' | 'shell' | 'c' | 'cpp' | 'csharp' | 'php' | 'ruby' | (string & {});
13434
+ /**
13435
+ * Lazily loads one language's Monaco contribution (grammar + config). The
13436
+ * returned promise resolves once the language is registered. Typically an
13437
+ * `import(...)` of a `monaco-editor/esm/vs/basic-languages/<lang>/<lang>.contribution`
13438
+ * module, which self-registers into Monaco as a side effect.
13439
+ */
13440
+ type KjMonacoLanguageLoader = () => Promise<unknown>;
13441
+
13442
+ /**
13443
+ * Headless code editor — wraps [Monaco](https://microsoft.github.io/monaco-editor/)
13444
+ * (VS Code's editor) on its host element. Loads Monaco lazily after first
13445
+ * render (SSR-safe), binds `kjValue` two-way, and disposes on destroy.
13446
+ *
13447
+ * Monaco is browser-only and heavy: it is resolved through {@link KjEditorLoader}
13448
+ * whose source is configurable via `provideMonaco()` (defaults to a CDN loader
13449
+ * so nothing bloats the base bundle). The styled `<kj-editor>` wrapper in
13450
+ * `@kouji-ui/components` adds theming, a toolbar and a status bar on top.
13451
+ *
13452
+ * @example
13453
+ * ```html
13454
+ * <div kjEditor [(kjValue)]="code" kjLanguage="typescript" style="height:320px"></div>
13455
+ * ```
13456
+ * @doc-category Core/Data
13457
+ * @doc
13458
+ * @doc-name editor
13459
+ * @doc-is-main
13460
+ * @doc-description Headless Monaco-wrapped code editor directive — two-way value, language, options, SSR-safe lazy load.
13461
+ */
13462
+ declare class KjEditor {
13463
+ private readonly el;
13464
+ private readonly destroyRef;
13465
+ private readonly loader;
13466
+ /** Two-way editor text. */
13467
+ readonly kjValue: _angular_core.ModelSignal<string>;
13468
+ /** Code language — friendly name or Monaco id; short aliases (`ts`, `md`) normalised. */
13469
+ readonly kjLanguage: _angular_core.InputSignal<KjEditorLanguage>;
13470
+ /** Read-only mode. */
13471
+ readonly kjReadonly: _angular_core.InputSignal<boolean>;
13472
+ /** Show the minimap. */
13473
+ readonly kjMinimap: _angular_core.InputSignal<boolean>;
13474
+ /** Gutter line-number mode. */
13475
+ readonly kjLineNumbers: _angular_core.InputSignal<KjEditorLineNumbers>;
13476
+ /** Soft wrap. */
13477
+ readonly kjWordWrap: _angular_core.InputSignal<KjEditorWordWrap>;
13478
+ /** Font size in px. */
13479
+ readonly kjFontSize: _angular_core.InputSignal<number>;
13480
+ /** Grow the host to fit content instead of filling its container. */
13481
+ readonly kjAutoHeight: _angular_core.InputSignal<boolean>;
13482
+ /** Cap for `kjAutoHeight` in px (content scrolls past it). Uncapped when unset. */
13483
+ readonly kjMaxHeight: _angular_core.InputSignal<number | undefined>;
13484
+ /** Explicit Monaco theme id; overrides the wrapper's auto light/dark. */
13485
+ readonly kjTheme: _angular_core.InputSignal<string | undefined>;
13486
+ /** Accessible name — set as Monaco `ariaLabel` and the host `aria-label`. */
13487
+ readonly kjAriaLabel: _angular_core.InputSignal<string>;
13488
+ /**
13489
+ * Start with Tab moving focus out instead of inserting a tab. Consumers who
13490
+ * embed the editor in a form flow may prefer this so keyboard users are never
13491
+ * trapped; the `Ctrl+M` toggle remains available either way.
13492
+ */
13493
+ readonly kjTabFocusMode: _angular_core.InputSignal<boolean>;
13494
+ /** Escape hatch — merged last into Monaco's construction options. */
13495
+ readonly kjOptions: _angular_core.InputSignal<monaco_editor.editor.IStandaloneEditorConstructionOptions>;
13496
+ /** Emits the live Monaco editor once created, for imperative use. */
13497
+ readonly kjReady: _angular_core.OutputEmitterRef<monaco_editor.editor.IStandaloneCodeEditor>;
13498
+ private editor;
13499
+ private monaco;
13500
+ private applyingExternal;
13501
+ /** Our tracked copy of Monaco's tabFocusMode (no public getter exists). */
13502
+ private tabFocusOn;
13503
+ /** Recompute-height callback, wired once auto-height is set up. */
13504
+ private autoHeightUpdate;
13505
+ private readonly reducedMotion;
13506
+ constructor();
13507
+ /** Focus the editor. */
13508
+ focus(): void;
13509
+ /** Relayout the editor to its host size. */
13510
+ layout(): void;
13511
+ /** The live Monaco editor instance, or `null` before mount / after destroy. */
13512
+ getEditor(): KjEditorInstance | null;
13513
+ private init;
13514
+ /**
13515
+ * Size the host to the editor's content height (capped by `kjMaxHeight`),
13516
+ * updating whenever the content grows/shrinks. Mirrors the docs code-viewer
13517
+ * behaviour so a snippet fits its lines instead of needing a fixed height.
13518
+ */
13519
+ private setupAutoHeight;
13520
+ private resolveOptions;
13521
+ /**
13522
+ * Force Monaco's tabFocusMode to a specific state (idempotent). `tabFocusMode`
13523
+ * is not a construction option — it's a context key flipped by the
13524
+ * `toggleTabFocusMode` command (bound to `Ctrl+M`). We track our own copy
13525
+ * since Monaco exposes no public getter, and only trigger the toggle when the
13526
+ * desired state differs from what we last applied.
13527
+ */
13528
+ private syncTabFocus;
13529
+ private dispose;
13530
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjEditor, never>;
13531
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjEditor, "[kjEditor]", ["kjEditor"], { "kjValue": { "alias": "kjValue"; "required": false; "isSignal": true; }; "kjLanguage": { "alias": "kjLanguage"; "required": false; "isSignal": true; }; "kjReadonly": { "alias": "kjReadonly"; "required": false; "isSignal": true; }; "kjMinimap": { "alias": "kjMinimap"; "required": false; "isSignal": true; }; "kjLineNumbers": { "alias": "kjLineNumbers"; "required": false; "isSignal": true; }; "kjWordWrap": { "alias": "kjWordWrap"; "required": false; "isSignal": true; }; "kjFontSize": { "alias": "kjFontSize"; "required": false; "isSignal": true; }; "kjAutoHeight": { "alias": "kjAutoHeight"; "required": false; "isSignal": true; }; "kjMaxHeight": { "alias": "kjMaxHeight"; "required": false; "isSignal": true; }; "kjTheme": { "alias": "kjTheme"; "required": false; "isSignal": true; }; "kjAriaLabel": { "alias": "kjAriaLabel"; "required": false; "isSignal": true; }; "kjTabFocusMode": { "alias": "kjTabFocusMode"; "required": false; "isSignal": true; }; "kjOptions": { "alias": "kjOptions"; "required": false; "isSignal": true; }; }, { "kjValue": "kjValueChange"; "kjReady": "kjReady"; }, never, never, true, never>;
13532
+ }
13533
+
13534
+ /**
13535
+ * Resolves the Monaco namespace **once** and memoises the promise, so every
13536
+ * `KjEditor` on the page shares a single Monaco instance.
13537
+ *
13538
+ * Resolution strategy (see {@link KjMonacoConfig}):
13539
+ * 1. A consumer-supplied `loader` wins — self-hosted / bundled Monaco.
13540
+ * 2. Otherwise dynamically `import('@monaco-editor/loader')` and `init()` it,
13541
+ * applying `vsPath` when provided. The dynamic import keeps both Monaco and
13542
+ * the loader out of the base bundle (their own lazy chunk).
13543
+ *
13544
+ * Browser-only: callers must gate `load()` behind `afterNextRender` /
13545
+ * `isPlatformBrowser`. Naming keeps the `Loader` suffix because `KjEditor`
13546
+ * already names the directive.
13547
+ *
13548
+ * @doc
13549
+ * @doc-name editor
13550
+ * @doc-description Loads and memoises Monaco for the code editor; source is configurable via provideMonaco.
13551
+ */
13552
+ declare class KjEditorLoader {
13553
+ private readonly config;
13554
+ private readonly languageLoaders;
13555
+ private promise;
13556
+ private readonly loadedLanguages;
13557
+ /** Resolve Monaco (cached after the first call). */
13558
+ load(): Promise<KjMonaco>;
13559
+ /**
13560
+ * Ensure a language's contribution is loaded before it's used. Runs the loader
13561
+ * registered via {@link provideMonacoLanguages} for this id (once, memoised).
13562
+ * No-ops when no loader is registered — the default CDN Monaco already ships
13563
+ * every language, so this only does work for lean/self-hosted setups.
13564
+ */
13565
+ ensureLanguage(language: string): Promise<void>;
13566
+ private loadFromCdn;
13567
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjEditorLoader, never>;
13568
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<KjEditorLoader>;
13569
+ }
13570
+
13571
+ /**
13572
+ * Configures where the code editor gets Monaco from. Provide via
13573
+ * {@link provideMonaco}. Left unset, the library dynamically imports
13574
+ * `@monaco-editor/loader` and initialises Monaco from its default CDN — no
13575
+ * esbuild worker wiring, and Monaco stays out of the base bundle.
13576
+ */
13577
+ interface KjMonacoConfig {
13578
+ /**
13579
+ * Custom loader returning a ready Monaco namespace. Wins over `vsPath`.
13580
+ * Use this to point at a **self-hosted or bundled** Monaco instead of a CDN
13581
+ * (e.g. `() => import('monaco-editor')` once you've wired MonacoEnvironment
13582
+ * workers yourself). A library must never hard-lock consumers to a CDN.
13583
+ */
13584
+ loader?: KjMonacoLoaderFn;
13585
+ /**
13586
+ * Override the AMD `vs` base URL used by the default `@monaco-editor/loader`
13587
+ * path — e.g. `'/assets/monaco/vs'` to serve Monaco from your own origin.
13588
+ * Ignored when `loader` is set.
13589
+ */
13590
+ vsPath?: string;
13591
+ }
13592
+ /** DI token holding the resolved {@link KjMonacoConfig}. Defaults to `{}`. */
13593
+ declare const KJ_MONACO_CONFIG: InjectionToken<KjMonacoConfig>;
13594
+
13595
+ /**
13596
+ * Configure the Monaco source for `KjEditor` / `<kj-editor>`. Call once at the
13597
+ * app (or route) level. With no arguments the editor loads Monaco from the
13598
+ * default CDN via `@monaco-editor/loader`.
13599
+ *
13600
+ * @example
13601
+ * // Default CDN loader (nothing to install beyond the peer deps):
13602
+ * provideMonaco()
13603
+ *
13604
+ * @example
13605
+ * // Self-hosted Monaco assets:
13606
+ * provideMonaco({ vsPath: '/assets/monaco/vs' })
13607
+ *
13608
+ * @example
13609
+ * // Fully custom / bundled Monaco (you own the worker setup):
13610
+ * provideMonaco({ loader: () => import('monaco-editor') })
13611
+ *
13612
+ * @doc
13613
+ * @doc-name editor
13614
+ * @doc-order 1
13615
+ */
13616
+ declare function provideMonaco(config?: KjMonacoConfig): EnvironmentProviders;
13617
+
13618
+ /**
13619
+ * Registered per-language lazy loaders, keyed by (normalised) language id.
13620
+ * `multi` so several `provideMonacoLanguages` calls compose; later
13621
+ * registrations win on key collision. Consumed by `KjEditorLoader.ensureLanguage`.
13622
+ */
13623
+ declare const KJ_MONACO_LANGUAGE_LOADERS: InjectionToken<Record<string, KjMonacoLanguageLoader>[]>;
13624
+ /**
13625
+ * Register lazy loaders for individual Monaco languages so only the languages an
13626
+ * editor actually uses are downloaded, and only when first used. This keeps the
13627
+ * base editor lean when you bundle a **minimal** Monaco (the `provideMonaco({ loader })`
13628
+ * path); with the default CDN loader every language is already bundled, so
13629
+ * registering loaders is optional (a missing id simply falls back to the
13630
+ * built-in language).
13631
+ *
13632
+ * @example
13633
+ * provideMonacoLanguages({
13634
+ * python: () => import('monaco-editor/esm/vs/basic-languages/python/python.contribution'),
13635
+ * rust: () => import('monaco-editor/esm/vs/basic-languages/rust/rust.contribution'),
13636
+ * })
13637
+ *
13638
+ * @doc
13639
+ * @doc-name editor
13640
+ * @doc-order 2
13641
+ */
13642
+ declare function provideMonacoLanguages(loaders: Record<string, KjMonacoLanguageLoader>): EnvironmentProviders;
13643
+ /** Map a friendly/alias language name to the canonical Monaco language id. */
13644
+ declare function normalizeLanguage(lang: string | undefined | null): string;
13645
+
11720
13646
  /**
11721
13647
  * Orientation of the divider rule.
11722
13648
  */
@@ -11900,7 +13826,7 @@ declare class KjLink {
11900
13826
  * underline entirely (e.g. icon-text links inside breadcrumb separators).
11901
13827
  * Reflects `[attr.data-underline]`.
11902
13828
  */
11903
- readonly kjUnderline: _angular_core.InputSignal<"none" | "hover" | "always">;
13829
+ readonly kjUnderline: _angular_core.InputSignal<"none" | "always" | "hover">;
11904
13830
  /**
11905
13831
  * External-link tri-state. `undefined` (default) auto-detects from the
11906
13832
  * host's `target` attribute (`target="_blank"` → external). `true` forces
@@ -11969,6 +13895,71 @@ declare const KJ_LINK_CONFIG: InjectionToken<KjLinkConfig>;
11969
13895
  */
11970
13896
  declare function provideKjLink(config: Partial<KjLinkConfig>): Provider[];
11971
13897
 
13898
+ /**
13899
+ * Headless "skip to content" link. Turns a native `<a>` into a
13900
+ * [WCAG 2.4.1 Bypass Blocks](https://www.w3.org/TR/WCAG21/#bypass-blocks)
13901
+ * mechanism: a fragment link that, when activated, moves **keyboard focus** to
13902
+ * the page's main-content landmark — not merely the scroll position.
13903
+ *
13904
+ * Owns the two behaviours a CSS-only skip link cannot deliver:
13905
+ *
13906
+ * 1. **Fragment `href`.** `[attr.href]` reflects `#<target-id>`, so the element
13907
+ * is a real anchor (role=link, Enter activates) and carries the id in the
13908
+ * SSR-prerendered HTML.
13909
+ * 2. **Deterministic focus move.** On `click` (which Enter also fires on an
13910
+ * anchor) the directive `preventDefault()`s the navigation, looks the target
13911
+ * up by id, makes it programmatically focusable via `tabindex="-1"` when it
13912
+ * has no `tabindex`, and calls `focus()` (which also scrolls it into view).
13913
+ *
13914
+ * `preventDefault()` is required, not optional: under a `<base href="/">`
13915
+ * (the norm for Angular SPAs) a fragment-only reference like `#main-content`
13916
+ * resolves against the **base URL**, not the current document — so the native
13917
+ * click would navigate to `/#main-content` (the root route), swapping the
13918
+ * page out and discarding focus. Moving focus programmatically is both the
13919
+ * correct behaviour and immune to that gotcha.
13920
+ *
13921
+ * Styling (visually-hidden-until-focused) is a component-layer concern; see
13922
+ * `KjSkipLinkComponent` in `@kouji-ui/components`.
13923
+ *
13924
+ * @example
13925
+ * ```html
13926
+ * <a kjSkipLink>Skip to main content</a>
13927
+ * <main id="main-content" tabindex="-1">…</main>
13928
+ * ```
13929
+ * @example
13930
+ * ```html
13931
+ * <a kjSkipLink="page-body">Skip to content</a>
13932
+ * <section id="page-body" tabindex="-1">…</section>
13933
+ * ```
13934
+ *
13935
+ * @doc-category Core/Navigation
13936
+ * @doc
13937
+ * @doc-name skip-link
13938
+ * @doc-description Turns a native anchor into a focus-moving "skip to content" bypass link.
13939
+ * @doc-is-main
13940
+ */
13941
+ declare class KjSkipLink {
13942
+ private readonly document;
13943
+ /**
13944
+ * `id` of the element to move focus to. Aliased to the selector attribute so
13945
+ * `<a kjSkipLink="page-body">` sets it directly. Defaults to `'main-content'`.
13946
+ *
13947
+ * The `transform` maps an empty value to the default: a bare `<a kjSkipLink>`
13948
+ * binds the attribute as `''` (the selector attribute is present but valueless),
13949
+ * which would otherwise shadow the initial value.
13950
+ */
13951
+ readonly kjSkipLink: _angular_core.InputSignalWithTransform<string, string | undefined>;
13952
+ /**
13953
+ * Moves keyboard focus to the target landmark. Suppresses the anchor's native
13954
+ * navigation (see class docs — it is base-relative and would leave the page),
13955
+ * then adds `tabindex="-1"` when the target is not already focusable so
13956
+ * `focus()` succeeds while keeping it out of the sequential tab order.
13957
+ */
13958
+ protected onActivate(event: Event): void;
13959
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjSkipLink, never>;
13960
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjSkipLink, "a[kjSkipLink]", never, { "kjSkipLink": { "alias": "kjSkipLink"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
13961
+ }
13962
+
11972
13963
  /** Public-facing token interface representing a registered crumb item. */
11973
13964
  interface KjBreadcrumbItemContext {
11974
13965
  /** Index of the item among registered items (0-based, document order). */
@@ -13548,5 +15539,5 @@ declare const KJ_ALERT_CONFIG: InjectionToken<KjAlertConfig>;
13548
15539
  */
13549
15540
  declare function provideKjAlert(config: Partial<KjAlertConfig>): Provider[];
13550
15541
 
13551
- export { DRAWER_DATA, DRAWER_DRAG, DRAWER_SIDE, KJ_ACCORDION, KJ_ACCORDION_ITEM, KJ_ALERT, KJ_ALERT_CONFIG, KJ_ALERT_DEFAULTS, KJ_AVATAR, KJ_AVATAR_GROUP, KJ_BREADCRUMB, KJ_BREADCRUMB_CONFIG, KJ_BREADCRUMB_DEFAULTS, KJ_BUTTON_CONFIG, KJ_BUTTON_DEFAULTS, KJ_BUTTON_GROUP, KJ_CALENDAR, KJ_CAROUSEL, KJ_CAROUSEL_INDICATORS, KJ_CAROUSEL_SLIDE, KJ_CASCADE_SELECT, KJ_CHAT, KJ_CHAT_BUBBLE_CONFIG, KJ_CHAT_BUBBLE_DEFAULTS, KJ_CHAT_LOG, KJ_COLOR_PICKER, KJ_CONFIRM_POPUP, KJ_DATE_PICKER, KJ_DROPDOWN_MENU, KJ_FIELD, KJ_FILE_UPLOAD, KJ_FILE_UPLOAD_DEFAULT_MESSAGES, KJ_FILE_UPLOAD_ITEM, KJ_FORM, KJ_FORM_FIELD, KJ_ICON_CSS_PATH, KJ_ICON_ENTRIES, KJ_ICON_LOADER, KJ_ICON_REGISTRY, KJ_ICON_RESOLVER, KJ_INPUT_GROUP, KJ_INPUT_MASK_PRESETS, KJ_INPUT_MASK_TOKENS, KJ_INPUT_OTP, KJ_KBD_SIZE_PRESET, KJ_LINK_CONFIG, KJ_LINK_DEFAULTS, KJ_LIST, KJ_LIST_FOCUS_MODE, KJ_LIST_NAVIGATOR_CONFIG, KJ_LIST_ROW, KJ_MENUBAR, KJ_NUMBER_INPUT, KJ_OVERLAY_BACKDROP_STRATEGY, KJ_OVERLAY_BADGE, KJ_OVERLAY_FOCUS_TRAP_STRATEGY, KJ_OVERLAY_LIVE_ANNOUNCER_STRATEGY, KJ_OVERLAY_MOUNT_STRATEGY, KJ_OVERLAY_PANEL_ROLE, KJ_OVERLAY_POSITION_STRATEGY, KJ_OVERLAY_SCROLL_LOCK_STRATEGY, KJ_OVERLAY_TRIGGER_EVENT_STRATEGY, KJ_PAGINATION, KJ_PAGINATION_CONFIG, KJ_PAGINATION_DEFAULTS, KJ_PASSWORD_INPUT, KJ_PROGRESS_BAR, KJ_PROGRESS_BAR_CONFIG, KJ_PROGRESS_BAR_DEFAULTS, KJ_PROSE_CSS_PATH, KJ_RADIO_GROUP, KJ_ROVING_TABINDEX, KJ_SELECT, KJ_SIZE_PRESET, KJ_SLIDER, KJ_SPEED_DIAL, KJ_SPINNER_CONFIG, KJ_SPINNER_DEFAULTS, KJ_STEP, KJ_STEPPER, KJ_TABLE, KJ_TABLE_STORAGE, KJ_TABS, KJ_TAG, KJ_TAG_CONFIG, KJ_TAG_DEFAULTS, KJ_TAG_LIST, KJ_TEXTAREA_CONFIG, KJ_TEXTAREA_DEFAULTS, KJ_TIME_PICKER, KJ_TOAST_LIST_STRATEGY, KJ_TOAST_SONNER_STRATEGY, KJ_TOAST_STRATEGY, KJ_TREE_SELECT, KJ_VARIANT_PRESET, KjAccordion, KjAccordionContent, KjAccordionItem, KjAccordionTrigger, KjAlert, KjAlertActions, KjAlertDescription, KjAlertDismiss, KjAlertIcon, KjAlertTitle, KjAriaDescribedBy, KjAriaLabelledBy, KjAvatar, KjAvatarFallback, KjAvatarGroup, KjAvatarImage, KjBackdrop, KjBadge, KjBlockquote, KjBreadcrumb, KjBreadcrumbCurrent, KjBreadcrumbEllipsis, KjBreadcrumbItem, KjBreadcrumbLink, KjBreadcrumbList, KjBreadcrumbSeparator, KjButton, KjButtonGroup, KjCalendar, KjCalendarDay, KjCalendarGrid, KjCalendarHeader, KjCarousel, KjCarouselAutoplay, KjCarouselIndicator, KjCarouselIndicators, KjCarouselNext, KjCarouselPauseToggle, KjCarouselPrevious, KjCarouselSlide, KjCarouselViewport, KjCascadeSelect, KjCascadeSelectOption, KjCascadeSelectPanel, KjCascadeSelectSubPanel, KjCascadeSelectTrigger, KjChart, KjChat, KjChatAvatar, KjChatBubble, KjChatFooter, KjChatHeader, KjChatLog, KjCheckbox, KjCode, KjColorPicker, KjColorPickerAlphaSlider, KjColorPickerArea, KjColorPickerHueSlider, KjColorPickerInput, KjColorPickerPanel, KjColorPickerTrigger, KjCombobox, KjComboboxInput, KjComboboxListbox, KjComboboxOption, KjCommandEmpty, KjCommandGroup, KjCommandInput, KjCommandItem, KjCommandList, KjCommandPalette, KjCommandPaletteDialog, KjCommandPaletteTrigger, KjCommandSeparator, KjConfirmPopup, KjConfirmPopupAction, KjConfirmPopupCancel, KjConfirmPopupContent, KjConfirmPopupMessage, KjConfirmPopupTrigger, KjDatePicker, KjDatePickerCalendar, KjDatePickerTrigger, KjDialog$1 as KjDialog, KjDialogRef, KjDialog as KjDialogService, KjDirectionality, KjDisabled, KjDivider, KjDrawer, KjDrawerRef, KjDrawerService, KjDropdownMenu, KjDropdownMenuContent, KjDropdownMenuGroup, KjDropdownMenuItem, KjDropdownMenuLabel, KjDropdownMenuSeparator, KjDropdownMenuTrigger, KjField, KjFieldError, KjFieldGroup, KjFieldHelp, KjFieldLabel, KjFileUpload, KjFileUploadDropzone, KjFileUploadItem, KjFileUploadList, KjFileUploadTrigger, KjFilterableList, KjFocusRing, KjFocusTrap, KjForm, KjFormControl, KjFormError, KjFormErrorSummary, KjFormField, KjFormLabel, KjIconDirective, KjId, KjInput, KjInputGroup, KjInputGroupAddon, KjInputMask, KjInputOtp, KjInputOtpCell, KjKbd, KjLead, KjLink, KjList, KjListGroup, KjListGroupLabel, KjListItem, KjListNavigator, KjListRow, KjListSeparator, KjLiveRegion, KjMenubar, KjMenubarItem, KjMuted, KjNumberInput, KjNumberInputGroup, KjNumberStepper, KjOption, KjOverlayBadge, KjOverlayBadgeContent, KjOverlayBuilder, KjOverlayController, KjOverlayHandle, KjOverlayPanel, KjOverlayStack, KjOverlayTrigger, KjOverlayWrapper, KjPagination, KjPaginationEllipsis, KjPaginationFirst, KjPaginationInfo, KjPaginationItem, KjPaginationLast, KjPaginationNext, KjPaginationPrevious, KjPasswordCapsLockWarning, KjPasswordInput, KjPasswordInputScope, KjPasswordStrength, KjPasswordToggle, KjPopoverArrow, KjPopoverClose, KjPopoverContent, KjPopoverTitle, KjPopoverTrigger, KjProgressBar, KjProgressBarFill, KjRadio, KjRadioGroup, KjRovingTabindex, KjRovingTabindexItemDirective, KjSelect, KjSelectContent, KjSelectTrigger, KjSelectionModel, KjSize, KjSkeleton, KjSlider, KjSliderRange, KjSliderThumb, KjSliderTrack, KjSpeedDial, KjSpeedDialAction, KjSpeedDialActions, KjSpeedDialTrigger, KjSpinner, KjStep, KjStepContent, KjStepLabel, KjStepper, KjStepperNext, KjStepperPrevious, KjStepperReset, KjTab, KjTabList, KjTabPanel, KjTable, KjTableCell, KjTableFilterOutlet, KjTableHeader, KjTableKeyboardNav, KjTableRow, KjTabs, KjTag, KjTagList, KjTagRemove, KjTextarea, KjTimePicker, KjTimePickerHours, KjTimePickerMeridiem, KjTimePickerMinutes, KjTimePickerSeconds, KjToast, KjToastClose, KjToastPanel, KjToastRef, KjToastService, KjToastViewport, KjToggle, KjTooltipArrow, KjTooltipContent, KjTooltipGroup, KjTooltipTrigger, KjTreeSelect, KjTreeSelectContent, KjTreeSelectNode, KjTreeSelectToggle, KjTreeSelectTrigger, KjTruncate, KjTypeAhead, KjVariant, KjVisuallyHidden, MaskEngine, addDays, addMonths, addYears, anchoredTo, assertive, bindPresets, blurredBackdrop, bodyPortal, buildMonthMatrix, compareDay, compileMask, corner, cssClip, defaultMaskTokens, defaultPasswordScorer, edgeSheet, endOfMonth, firstDayOfWeek, formatDateLong, formatDateShort, formatMonthYear, getIconMode, htmlOverflow, inContainer, inMemoryAdapter, inPlace, inPlaceSibling, inertBased, injectFilterableList, injectKjFilterParams, injectKjIconResolver, injectListItem, injectSelectionModel, isInRange, isKjFilterModel, isSameDay, isSameMonth, kjColumn, kjColumnGroup, kjContainsFilter, kjDateFilterFn, kjFileMatchesAccept, kjFuzzyFilter, kjHsvToHsl, kjHsvToRgb, kjMultiFilterFn, kjNumberFilterFn, kjParseHex, kjRgbToHex, kjRgbToHsv, kjSetFilterFn, kjStartsWithFilter, kjSubstringFilter, kjTableResource, kjTextFilterFn, localStorageAdapter, nextCascadeId, nextDropdownMenuLabelId, nextPopoverTitleId, noBackdrop, noScrollLock, noTrap, onClick, onContextMenu, onFocus, onFocusOrInput, onHotkey, onHover, parseDate, pointAt, polite, programmatic, provideIconLoader, provideIconResolver, provideIcons, provideKjAlert, provideKjBreadcrumb, provideKjButton, provideKjChatBubble, provideKjFilterParams, provideKjInputMaskTokens, provideKjLink, provideKjPagination, provideKjProgressBar, provideKjSpinner, provideKjTableStorage, provideKjTag, provideKjTextarea, provideKjToastListStrategy, provideKjToastSonnerStrategy, provideKjToastStrategy, sessionStorageAdapter, silent, solidBackdrop, startOfDay, startOfMonth, stripDiacritics, tabCycle, toDeepSignal, viewportCentered, weekdayLongNames, weekdayShortNames };
13552
- export type { CompiledMask, DeepSignal, IconLoader, IconMode, IconResolver, InvalidControlInfo, KjAccordionContext, KjAccordionItemContext, KjAccordionType, KjAggregation, KjAggregationFn, KjAggregationKind, KjAlertConfig, KjAlertContext, KjAlertMode, KjAlign, KjAnchoredToOpts, KjAnchoredToStrategy, KjAriaHasPopup, KjAsyncSubmitHandler, KjAttachOptions, KjAvatarGroupAriaLabelFormat, KjAvatarGroupContext, KjAvatarGroupDirection, KjAvatarShape, KjBackdropStrategy, KjBadgeVariant, KjBindablePresetConfig, KjBreadcrumbConfig, KjBreadcrumbContext, KjBreadcrumbItemContext, KjButtonConfig, KjButtonGroupContext, KjButtonGroupOrientation, KjCalendarContext, KjCarouselAlign, KjCarouselContext, KjCarouselControlPattern, KjCarouselIndicatorsContext, KjCarouselOrientation, KjCarouselSlideContext, KjCascadeNode, KjCascadeSelectContext, KjChatBubbleConfig, KjChatContext, KjChatLogContext, KjChatRole, KjChatSide, KjChatState, KjCloseReason, KjColorFormat, KjColorPickerContext, KjColorPreset, KjColorValue, KjColumnApi, KjColumnDef, KjColumnGroupingApi, KjColumnMeta, KjColumnOrderApi, KjColumnPin, KjColumnPinningApi, KjColumnSizingApi, KjColumnType, KjColumnVisibilityApi, KjCommandActivateEvent, KjCommandFilter, KjCompareFn, KjConfirmPopupContext, KjConfirmPopupDefaultFocus, KjContainerTarget, KjCornerPosition, KjDateFilterModel, KjDateFilterType, KjDatePickerContext, KjDensityApi, KjDialogOpenOptions, KjDirection, KjDividerAlign, KjDividerOrientation, KjDrawerOpenOptions, KjDrawerSide, KjDropdownMenuCloseReason, KjDropdownMenuContext, KjDropdownMenuMount, KjDropdownMenuTriggerKind, KjEditorRef, KjExpansionApi, KjFieldContext, KjFileRejectReason, KjFileRejection, KjFileStatus, KjFileUploadAggregateStatus, KjFileUploadContext, KjFileUploadItemContext, KjFileUploadValidationMessages, KjFilterApi, KjFilterFn, KjFilterModel, KjFilterParams, KjFilterRenderer, KjFilterUiRef, KjFocusTrapStrategy, KjFormContext, KjFormControlRegistration, KjFormFieldContext, KjGlobalFilterApi, KjGridApi, KjGridFilterModel, KjGroupingApi, KjHourCycle, KjHsl, KjHsv, KjIconColor, KjIconSize, KjInputGroupContext, KjInputOtpContext, KjLinkConfig, KjListAs, KjListContext, KjListFocusMode, KjListNavigatorConfig, KjListOrientation, KjListRowContext, KjListSelectionMode, KjLiveAnnouncerStrategy, KjLivePoliteness, KjMenubarContext, KjMenubarItemContext, KjMountStrategy, KjMultiConditionFilterModel, KjNumberFilterModel, KjNumberFilterType, KjNumberInputContext, KjOnContextMenuOpts, KjOnContextMenuStrategy, KjOnHoverOpts, KjOnHoverStrategy, KjOverlayBadgeContext, KjOverlayBadgePosition, KjOverlayBuilderConfig, KjOverlayContext, KjLivePoliteness$1 as KjOverlayLivePoliteness, KjOverlayRegistration, KjOverlayStackHandle, KjOverlayState, KjOverlayStrategies, KjOverlayTriggerLike, KjPageToken, KjPaginationApi, KjPaginationConfig, KjPaginationContext, KjPanelRole, KjPasswordAutocomplete, KjPasswordInputContext, KjPasswordScore, KjPasswordScoreLabel, KjPlacement, KjPointAtOpts, KjPopoverTriggerKind, KjPositionStrategy, KjProgressBarConfig, KjProgressBarContext, KjRadioContext, KjResourceResult, KjRgb, KjRowsApi, KjScrollLockStrategy, KjSelectionApi, KjSetFilterModel, KjSheetSide, KjSide, KjSizePreset, KjSkeletonAnimation, KjSkeletonShape, KjSliderContext, KjSliderSource, KjSliderThumbHandle, KjSolidBackdropOpts, KjSolidBackdropStrategy, KjSortApi, KjSortDirection, KjSpeedDialContext, KjSpeedDialDirection, KjSpinnerAnimation, KjSpinnerConfig, KjStepContext, KjStepperContext, KjStorageAdapter, KjStrategy, KjTabCycleOpts, KjTabCycleStrategy, KjTableState, KjTabsActivationMode, KjTabsContext, KjTabsOrientation, KjTagConfig, KjTagContext, KjTagListContext, KjTagListRole, KjTextFilterModel, KjTextFilterType, KjTextareaAutoresize, KjTextareaConfig, KjTextareaResize, KjTimePickerContext, KjToastContext, KjToastItem, KjToastOptions, KjToastPositionX, KjToastPositionY, KjToastRenderable, KjToastStrategy, KjToastSugarVariant, KjToastTemplateContext, KjToastVariant, KjTreeNode, KjTreeSelectContext, KjTreeShape, KjTriggerEventStrategy, KjUploadableFile, KjVariantPreset, MaskEngineCallbacks, MaskEngineOptions, Slot, TimeParts };
15542
+ export { DRAWER_DATA, DRAWER_DRAG, DRAWER_SIDE, EN_CATALOG, FR_CATALOG, KJ_ACCORDION, KJ_ACCORDION_ITEM, KJ_ALERT, KJ_ALERT_CONFIG, KJ_ALERT_DEFAULTS, KJ_AVATAR, KJ_AVATAR_GROUP, KJ_BREADCRUMB, KJ_BREADCRUMB_CONFIG, KJ_BREADCRUMB_DEFAULTS, KJ_BUTTON_CONFIG, KJ_BUTTON_DEFAULTS, KJ_BUTTON_GROUP, KJ_CALENDAR, KJ_CAROUSEL, KJ_CAROUSEL_INDICATORS, KJ_CAROUSEL_SLIDE, KJ_CASCADE_SELECT, KJ_CHAT, KJ_CHAT_BUBBLE_CONFIG, KJ_CHAT_BUBBLE_DEFAULTS, KJ_CHAT_LOG, KJ_COLOR_PICKER, KJ_CONFIRM_POPUP, KJ_DATE_PICKER, KJ_DATE_RANGE_PRESETS, KJ_DROPDOWN_MENU, KJ_ECHARTS, KJ_FIELD, KJ_FILE_UPLOAD, KJ_FILE_UPLOAD_DEFAULT_MESSAGES, KJ_FILE_UPLOAD_ITEM, KJ_FORM, KJ_FORM_FIELD, KJ_ICON_CSS_PATH, KJ_ICON_ENTRIES, KJ_ICON_LOADER, KJ_ICON_REGISTRY, KJ_ICON_RESOLVER, KJ_INPUT_GROUP, KJ_INPUT_MASK_PRESETS, KJ_INPUT_MASK_TOKENS, KJ_INPUT_OTP, KJ_KBD_SIZE_PRESET, KJ_LINK_CONFIG, KJ_LINK_DEFAULTS, KJ_LIST, KJ_LIST_FOCUS_MODE, KJ_LIST_NAVIGATOR_CONFIG, KJ_LIST_ROW, KJ_LOCALE_CONFIG, KJ_MENUBAR, KJ_MONACO_CONFIG, KJ_MONACO_LANGUAGE_LOADERS, KJ_NUMBER_INPUT, KJ_OVERLAY_BACKDROP_STRATEGY, KJ_OVERLAY_BADGE, KJ_OVERLAY_FOCUS_TRAP_STRATEGY, KJ_OVERLAY_LIVE_ANNOUNCER_STRATEGY, KJ_OVERLAY_MOUNT_STRATEGY, KJ_OVERLAY_PANEL_ROLE, KJ_OVERLAY_POSITION_STRATEGY, KJ_OVERLAY_SCROLL_LOCK_STRATEGY, KJ_OVERLAY_TRIGGER_EVENT_STRATEGY, KJ_PAGINATION, KJ_PAGINATION_CONFIG, KJ_PAGINATION_DEFAULTS, KJ_PASSWORD_INPUT, KJ_PROGRESS_BAR, KJ_PROGRESS_BAR_CONFIG, KJ_PROGRESS_BAR_DEFAULTS, KJ_PROSE_CSS_PATH, KJ_RADIO_GROUP, KJ_RICH_TEXT, KJ_RICH_TEXT_EXTENSIONS, KJ_RICH_TEXT_FEATURES, KJ_RICH_TEXT_NODE, KJ_ROVING_TABINDEX, KJ_RTE_OVERLAY_DATA, KJ_SELECT, KJ_SIZE_PRESET, KJ_SLIDER, KJ_SPEED_DIAL, KJ_SPINNER_CONFIG, KJ_SPINNER_DEFAULTS, KJ_STEP, KJ_STEPPER, KJ_TABLE, KJ_TABLE_STORAGE, KJ_TABS, KJ_TAG, KJ_TAG_CONFIG, KJ_TAG_DEFAULTS, KJ_TAG_LIST, KJ_TEXTAREA_CONFIG, KJ_TEXTAREA_DEFAULTS, KJ_TIME_PICKER, KJ_TOAST_LIST_STRATEGY, KJ_TOAST_SONNER_STRATEGY, KJ_TOAST_STRATEGY, KJ_TRANSLATION_CATALOGS, KJ_TREE_SELECT, KJ_VARIANT_PRESET, KjAccordion, KjAccordionContent, KjAccordionItem, KjAccordionTrigger, KjAlert, KjAlertActions, KjAlertDescription, KjAlertDismiss, KjAlertIcon, KjAlertTitle, KjAriaDescribedBy, KjAriaLabelledBy, KjAvatar, KjAvatarFallback, KjAvatarGroup, KjAvatarImage, KjBackdrop, KjBadge, KjBlockquote, KjBreadcrumb, KjBreadcrumbCurrent, KjBreadcrumbEllipsis, KjBreadcrumbItem, KjBreadcrumbLink, KjBreadcrumbList, KjBreadcrumbSeparator, KjButton, KjButtonGroup, KjCalendar, KjCalendarDay, KjCalendarGrid, KjCalendarHeader, KjCarousel, KjCarouselAutoplay, KjCarouselIndicator, KjCarouselIndicators, KjCarouselNext, KjCarouselPauseToggle, KjCarouselPrevious, KjCarouselSlide, KjCarouselViewport, KjCascadeSelect, KjCascadeSelectOption, KjCascadeSelectPanel, KjCascadeSelectSubPanel, KjCascadeSelectTrigger, KjChart, KjChartTableFallback, KjChat, KjChatAnnouncer, KjChatAvatar, KjChatBubble, KjChatFooter, KjChatHeader, KjChatLog, KjChatStore, KjCheckbox, KjCode, KjColorPicker, KjColorPickerAlphaSlider, KjColorPickerArea, KjColorPickerHueSlider, KjColorPickerInput, KjColorPickerPanel, KjColorPickerTrigger, KjCombobox, KjComboboxInput, KjComboboxListbox, KjComboboxOption, KjCommandEmpty, KjCommandGroup, KjCommandInput, KjCommandItem, KjCommandList, KjCommandPalette, KjCommandPaletteDialog, KjCommandPaletteTrigger, KjCommandSeparator, KjConfirmPopup, KjConfirmPopupAction, KjConfirmPopupCancel, KjConfirmPopupContent, KjConfirmPopupMessage, KjConfirmPopupTrigger, KjDatePicker, KjDatePickerCalendar, KjDatePickerTrigger, KjDateRangePresetOption, KjDateRangePresets, KjDialog$1 as KjDialog, KjDialogRef, KjDialog as KjDialogService, KjDirectionality, KjDisabled, KjDivider, KjDrawer, KjDrawerRef, KjDrawerService, KjDropdownMenu, KjDropdownMenuContent, KjDropdownMenuGroup, KjDropdownMenuItem, KjDropdownMenuLabel, KjDropdownMenuSeparator, KjDropdownMenuTrigger, KjEditor, KjEditorLoader, KjField, KjFieldError, KjFieldGroup, KjFieldHelp, KjFieldLabel, KjFileUpload, KjFileUploadDropzone, KjFileUploadItem, KjFileUploadList, KjFileUploadTrigger, KjFilterableList, KjFocusRing, KjFocusTrap, KjForm, KjFormControl, KjFormError, KjFormErrorSummary, KjFormField, KjFormLabel, KjIconDirective, KjId, KjInput, KjInputGroup, KjInputGroupAddon, KjInputMask, KjInputOtp, KjInputOtpCell, KjKbd, KjLead, KjLink, KjList, KjListGroup, KjListGroupLabel, KjListItem, KjListNavigator, KjListRow, KjListSeparator, KjLiveRegion, KjLocale, KjMenubar, KjMenubarItem, KjMotion, KjMuted, KjNumberInput, KjNumberInputGroup, KjNumberStepper, KjOption, KjOverlayBadge, KjOverlayBadgeContent, KjOverlayBuilder, KjOverlayController, KjOverlayHandle, KjOverlayPanel, KjOverlayStack, KjOverlayTrigger, KjOverlayWrapper, KjPagination, KjPaginationEllipsis, KjPaginationFirst, KjPaginationInfo, KjPaginationItem, KjPaginationLast, KjPaginationNext, KjPaginationPrevious, KjPasswordCapsLockWarning, KjPasswordInput, KjPasswordInputScope, KjPasswordStrength, KjPasswordToggle, KjPopoverArrow, KjPopoverClose, KjPopoverContent, KjPopoverTitle, KjPopoverTrigger, KjProgressBar, KjProgressBarFill, KjRadio, KjRadioGroup, KjReducedMotion, KjRichTextEditor, KjRichTextExtensionDirective, KjRovingTabindex, KjRovingTabindexItemDirective, KjSelect, KjSelectContent, KjSelectTrigger, KjSelectionModel, KjSheet, KjSheetRef, KjSheetService, KjSize, KjSkeleton, KjSkipLink, KjSlider, KjSliderRange, KjSliderThumb, KjSliderTrack, KjSpeedDial, KjSpeedDialAction, KjSpeedDialActions, KjSpeedDialTrigger, KjSpinner, KjStep, KjStepContent, KjStepLabel, KjStepper, KjStepperNext, KjStepperPrevious, KjStepperReset, KjTab, KjTabList, KjTabPanel, KjTable, KjTableCell, KjTableFilterOutlet, KjTableHeader, KjTableKeyboardNav, KjTableRow, KjTabs, KjTag, KjTagList, KjTagRemove, KjTextarea, KjTimePicker, KjTimePickerHours, KjTimePickerMeridiem, KjTimePickerMinutes, KjTimePickerSeconds, KjToast, KjToastClose, KjToastPanel, KjToastRef, KjToastService, KjToastViewport, KjToggle, KjTooltipArrow, KjTooltipContent, KjTooltipGroup, KjTooltipTrigger, KjTranslate, KjTranslateService, KjTreeSelect, KjTreeSelectContent, KjTreeSelectNode, KjTreeSelectToggle, KjTreeSelectTrigger, KjTruncate, KjTypeAhead, KjVariant, KjVisuallyHidden, MaskEngine, SHEET_ARIA_LABEL, SHEET_DATA, SHEET_DETENT, SHEET_DISMISSIBLE, addDays, addMonths, addYears, anchoredTo, assertive, bindPresets, blurredBackdrop, bodyPortal, buildMonthMatrix, coalesceAnnouncement, compareDay, compileMask, corner, createKjDecoratorNode, createKjImageNode, cssClip, defaultDateRangePresets, defaultMaskTokens, defaultPasswordScorer, edgeSheet, endOfMonth, firstDayOfWeek, formatDateLong, formatDateShort, formatMonthYear, getIconMode, htmlOverflow, inContainer, inMemoryAdapter, inPlace, inPlaceSibling, inertBased, injectFilterableList, injectKjFilterParams, injectKjIconResolver, injectListItem, injectRichTextNode, injectRteOverlayData, injectSelectionModel, isInRange, isKjFilterModel, isSameDay, isSameMonth, kjColumn, kjColumnGroup, kjContainsFilter, kjDateFilterFn, kjFileMatchesAccept, kjFuzzyFilter, kjHsvToHsl, kjHsvToRgb, kjMultiFilterFn, kjNumberFilterFn, kjParseHex, kjRgbToHex, kjRgbToHsv, kjSetFilterFn, kjStartsWithFilter, kjSubstringFilter, kjTableResource, kjTextFilterFn, localStorageAdapter, matchSlashCommands, nextCascadeId, nextChatMessageId, nextDropdownMenuLabelId, nextPopoverTitleId, noBackdrop, noScrollLock, noTrap, normalizeLanguage, onClick, onContextMenu, onFocus, onFocusOrInput, onHotkey, onHover, parseDate, parseSlash, pointAt, polite, programmatic, provideECharts, provideIconLoader, provideIconResolver, provideIcons, provideKjAlert, provideKjBreadcrumb, provideKjButton, provideKjChatBubble, provideKjDocumentDirection, provideKjFilterParams, provideKjInputMaskTokens, provideKjLink, provideKjLocale, provideKjPagination, provideKjProgressBar, provideKjRichText, provideKjSpinner, provideKjTableStorage, provideKjTag, provideKjTextarea, provideKjToastListStrategy, provideKjToastSonnerStrategy, provideKjToastStrategy, provideKjTranslations, provideMonaco, provideMonacoLanguages, resolveChartPalette, resolveDateRangePreset, sessionStorageAdapter, silent, solidBackdrop, startOfDay, startOfMonth, stripDiacritics, tabCycle, toDeepSignal, viewportCentered, weekdayLongNames, weekdayShortNames };
15543
+ export type { CompiledMask, DeepSignal, IconLoader, IconMode, IconResolver, InvalidControlInfo, KjAccordionContext, KjAccordionItemContext, KjAccordionType, KjActiveOverlay, KjAggregation, KjAggregationFn, KjAggregationKind, KjAlertConfig, KjAlertContext, KjAlertMode, KjAlign, KjAnchoredToOpts, KjAnchoredToStrategy, KjAriaHasPopup, KjAsyncSubmitHandler, KjAttachOptions, KjAvatarGroupAriaLabelFormat, KjAvatarGroupContext, KjAvatarGroupDirection, KjAvatarShape, KjBackdropStrategy, KjBadgeVariant, KjBindablePresetConfig, KjBlockType, KjBreadcrumbConfig, KjBreadcrumbContext, KjBreadcrumbItemContext, KjButtonConfig, KjButtonGroupContext, KjButtonGroupOrientation, KjCalendarContext, KjCarouselAlign, KjCarouselContext, KjCarouselControlPattern, KjCarouselIndicatorsContext, KjCarouselOrientation, KjCarouselSlideContext, KjCascadeNode, KjCascadeSelectContext, KjChartEvent, KjChatBubbleConfig, KjChatCitation, KjChatContext, KjChatLogContext, KjChatMessageData, KjChatMessageRole, KjChatRole, KjChatSide, KjChatState, KjChatStatus, KjChatToolCall, KjChatToolStatus, KjCloseReason, KjCoalesceOptions, KjCoalesceResult, KjColorFormat, KjColorPickerContext, KjColorPreset, KjColorValue, KjColumnApi, KjColumnDef, KjColumnGroupingApi, KjColumnMeta, KjColumnOrderApi, KjColumnPin, KjColumnPinningApi, KjColumnSizingApi, KjColumnType, KjColumnVisibilityApi, KjCommandActivateEvent, KjCommandFilter, KjCompareFn, KjConfirmPopupContext, KjConfirmPopupDefaultFocus, KjContainerTarget, KjCornerPosition, KjDateFilterModel, KjDateFilterType, KjDatePickerContext, KjDateRange, KjDateRangePreset, KjDateRangePresetsContext, KjDecoratorMountAdapter, KjDecoratorNodeApi, KjDecoratorNodeConfig, KjDecoratorRegistration, KjDensityApi, KjDialogOpenOptions, KjDirection, KjDividerAlign, KjDividerOrientation, KjDrawerOpenOptions, KjDrawerSide, KjDropdownMenuCloseReason, KjDropdownMenuContext, KjDropdownMenuMount, KjDropdownMenuTriggerKind, KjEChartsCore, KjEChartsLoader, KjEditorInstance, KjEditorLanguage, KjEditorLineNumbers, KjEditorOptions, KjEditorRef, KjEditorWordWrap, KjExpansionApi, KjFieldContext, KjFileRejectReason, KjFileRejection, KjFileStatus, KjFileUploadAggregateStatus, KjFileUploadContext, KjFileUploadItemContext, KjFileUploadValidationMessages, KjFilterApi, KjFilterFn, KjFilterModel, KjFilterParams, KjFilterRenderer, KjFilterUiRef, KjFocusTrapStrategy, KjFormContext, KjFormControlRegistration, KjFormFieldContext, KjGlobalFilterApi, KjGridApi, KjGridFilterModel, KjGroupingApi, KjHourCycle, KjHsl, KjHsv, KjIconColor, KjIconSize, KjImageInsert, KjImageNodeApi, KjInputGroupContext, KjInputOtpContext, KjLinkConfig, KjListAs, KjListContext, KjListFocusMode, KjListNavigatorConfig, KjListOrientation, KjListRowContext, KjListSelectionMode, KjLiveAnnouncerStrategy, KjLivePoliteness, KjLocaleConfig, KjMenubarContext, KjMenubarItemContext, KjMonaco, KjMonacoConfig, KjMonacoLanguageLoader, KjMonacoLoaderFn, KjMotionState, KjMountStrategy, KjMountedComponent, KjMultiConditionFilterModel, KjNumberFilterModel, KjNumberFilterType, KjNumberInputContext, KjOnContextMenuOpts, KjOnContextMenuStrategy, KjOnHoverOpts, KjOnHoverStrategy, KjOverlayBadgeContext, KjOverlayBadgePosition, KjOverlayBuilderConfig, KjOverlayContext, KjLivePoliteness$1 as KjOverlayLivePoliteness, KjOverlayRegistration, KjOverlayStackHandle, KjOverlayState, KjOverlayStrategies, KjOverlayTriggerLike, KjPageToken, KjPaginationApi, KjPaginationConfig, KjPaginationContext, KjPanelRole, KjPasswordAutocomplete, KjPasswordInputContext, KjPasswordScore, KjPasswordScoreLabel, KjPlacement, KjPointAtOpts, KjPopoverTriggerKind, KjPositionStrategy, KjProgressBarConfig, KjProgressBarContext, KjRadioContext, KjResourceResult, KjRgb, KjRichTextContext, KjRichTextExtension, KjRichTextFeature, KjRichTextHost, KjRichTextPlugin, KjRichTextState, KjRichTextValue, KjRowsApi, KjRteOverlay, KjRteShortcut, KjRteToolbarGroup, KjRteToolbarItem, KjRteToolbarKind, KjScrollLockStrategy, KjSelectionApi, KjSetFilterModel, KjSheetDetent, KjSheetOpenOptions, KjSheetSide, KjSide, KjSizePreset, KjSkeletonAnimation, KjSkeletonShape, KjSlashCommand, KjSlashParse, KjSliderContext, KjSliderSource, KjSliderThumbHandle, KjSolidBackdropOpts, KjSolidBackdropStrategy, KjSortApi, KjSortDirection, KjSpeedDialContext, KjSpeedDialDirection, KjSpinnerAnimation, KjSpinnerConfig, KjStepContext, KjStepperContext, KjStorageAdapter, KjStrategy, KjTabCycleOpts, KjTabCycleStrategy, KjTableState, KjTabsActivationMode, KjTabsContext, KjTabsOrientation, KjTagConfig, KjTagContext, KjTagListContext, KjTagListRole, KjTextFilterModel, KjTextFilterType, KjTextFormat, KjTextareaAutoresize, KjTextareaConfig, KjTextareaResize, KjTimePickerContext, KjToastContext, KjToastItem, KjToastOptions, KjToastPositionX, KjToastPositionY, KjToastRenderable, KjToastStrategy, KjToastSugarVariant, KjToastTemplateContext, KjToastVariant, KjTranslationCatalog, KjTranslationCatalogs, KjTranslationKey, KjTranslationParams, KjTreeNode, KjTreeSelectContext, KjTreeShape, KjTriggerEventStrategy, KjUploadableFile, KjVariantPreset, MaskEngineCallbacks, MaskEngineOptions, Slot, TimeParts };