@kouji-ui/core 0.2.0 → 0.4.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.
- package/fesm2022/kouji-ui-core-engine-CKMr0aiZ.mjs +390 -0
- package/fesm2022/kouji-ui-core-engine-CKMr0aiZ.mjs.map +1 -0
- package/fesm2022/kouji-ui-core.mjs +3239 -183
- package/fesm2022/kouji-ui-core.mjs.map +1 -1
- package/motion/motion.css +90 -0
- package/package.json +50 -2
- package/types/kouji-ui-core.d.ts +2122 -69
package/types/kouji-ui-core.d.ts
CHANGED
|
@@ -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,
|
|
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
|
-
|
|
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" | "
|
|
2515
|
-
/** BCP-47 tag. Falls back to the
|
|
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
|
-
/**
|
|
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
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
readonly
|
|
5775
|
-
readonly
|
|
5776
|
-
|
|
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"
|
|
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
|
|
@@ -8150,11 +9008,15 @@ declare class KjFieldHelp {
|
|
|
8150
9008
|
*
|
|
8151
9009
|
* Carries `role="alert"` + `aria-live="polite"` so newly-shown errors
|
|
8152
9010
|
* are announced. Hidden via `[hidden]` when the field is not in error
|
|
8153
|
-
* state
|
|
9011
|
+
* state — unless `kjFieldErrorReserve` is set, in which case the element
|
|
9012
|
+
* keeps its box (`data-hidden` + `visibility: hidden` styling) so error
|
|
9013
|
+
* text can appear and disappear without shifting the surrounding layout.
|
|
8154
9014
|
*
|
|
8155
9015
|
* @example
|
|
8156
9016
|
* ```html
|
|
8157
9017
|
* <span kjFieldError>Please enter a valid email.</span>
|
|
9018
|
+
* <!-- Reserve the line so showing the error never moves the layout: -->
|
|
9019
|
+
* <span kjFieldError kjFieldErrorReserve>Please enter a valid email.</span>
|
|
8158
9020
|
* ```
|
|
8159
9021
|
* @doc-category Core/Inputs
|
|
8160
9022
|
* @doc
|
|
@@ -8164,10 +9026,16 @@ declare class KjFieldError {
|
|
|
8164
9026
|
/** @internal */ readonly ctx: _kouji_ui_core.KjFieldContext;
|
|
8165
9027
|
/** Override the auto-minted host id. */
|
|
8166
9028
|
readonly kjFieldErrorId: _angular_core.InputSignal<string | undefined>;
|
|
9029
|
+
/**
|
|
9030
|
+
* When set, the element keeps its layout box while the field is valid
|
|
9031
|
+
* (`visibility: hidden` via `data-hidden` instead of `display: none`),
|
|
9032
|
+
* so the error appearing never repositions the fields around it.
|
|
9033
|
+
*/
|
|
9034
|
+
readonly kjFieldErrorReserve: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
8167
9035
|
/** @internal */ readonly id: () => string;
|
|
8168
9036
|
constructor();
|
|
8169
9037
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjFieldError, never>;
|
|
8170
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjFieldError, "[kjFieldError]", never, { "kjFieldErrorId": { "alias": "kjFieldErrorId"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
9038
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjFieldError, "[kjFieldError]", never, { "kjFieldErrorId": { "alias": "kjFieldErrorId"; "required": false; "isSignal": true; }; "kjFieldErrorReserve": { "alias": "kjFieldErrorReserve"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
8171
9039
|
}
|
|
8172
9040
|
|
|
8173
9041
|
/**
|
|
@@ -8762,6 +9630,58 @@ declare class KjForm implements KjFormContext {
|
|
|
8762
9630
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjForm, "form[kjForm]", ["kjForm"], { "kjFocusOnError": { "alias": "kjFocusOnError"; "required": false; "isSignal": true; }; "kjScrollOnError": { "alias": "kjScrollOnError"; "required": false; "isSignal": true; }; "kjScrollBehavior": { "alias": "kjScrollBehavior"; "required": false; "isSignal": true; }; "kjScrollBlock": { "alias": "kjScrollBlock"; "required": false; "isSignal": true; }; "kjMarkAllAsTouchedOnSubmit": { "alias": "kjMarkAllAsTouchedOnSubmit"; "required": false; "isSignal": true; }; "kjResetOnSuccess": { "alias": "kjResetOnSuccess"; "required": false; "isSignal": true; }; "kjAsyncSubmit": { "alias": "kjAsyncSubmit"; "required": false; "isSignal": true; }; "kjSubmitting": { "alias": "kjSubmitting"; "required": false; "isSignal": true; }; }, { "kjSubmit": "kjSubmit"; "kjInvalidSubmit": "kjInvalidSubmit"; "kjSubmitting": "kjSubmittingChange"; }, never, never, true, never>;
|
|
8763
9631
|
}
|
|
8764
9632
|
|
|
9633
|
+
/**
|
|
9634
|
+
* Field-level error messages returned by a backend, keyed by control path
|
|
9635
|
+
* (`'email'`, `'address.street'`, …). Values may be a single message or a
|
|
9636
|
+
* list; {@link kjApplyServerErrors} normalizes both to `readonly string[]`.
|
|
9637
|
+
*/
|
|
9638
|
+
type KjServerErrors = Record<string, string | readonly string[]>;
|
|
9639
|
+
/** Options for {@link kjApplyServerErrors}. */
|
|
9640
|
+
interface KjApplyServerErrorsOptions {
|
|
9641
|
+
/**
|
|
9642
|
+
* Error key set on each control (`control.errors[errorKey]`), holding the
|
|
9643
|
+
* normalized `readonly string[]` of messages. Default `'server'`.
|
|
9644
|
+
*/
|
|
9645
|
+
errorKey?: string;
|
|
9646
|
+
/** Mark each targeted control as touched so its error shows. Default `true`. */
|
|
9647
|
+
markTouched?: boolean;
|
|
9648
|
+
}
|
|
9649
|
+
/**
|
|
9650
|
+
* Applies backend validation errors onto a `FormGroup`'s controls: each entry
|
|
9651
|
+
* whose key matches a control path gets `{ [errorKey]: string[] }` merged into
|
|
9652
|
+
* that control's errors (and is marked touched by default) so field-level UI —
|
|
9653
|
+
* `kj-field [kjInvalid]` + `kj-field-error` — lights up per field.
|
|
9654
|
+
*
|
|
9655
|
+
* The error clears itself the next time the control's validators run (any
|
|
9656
|
+
* user edit), which is the behaviour you want for server-side messages.
|
|
9657
|
+
*
|
|
9658
|
+
* Returns the paths that did not match any control, so callers can surface
|
|
9659
|
+
* those messages globally (toast, form-level error line) instead of losing
|
|
9660
|
+
* them.
|
|
9661
|
+
*
|
|
9662
|
+
* @example
|
|
9663
|
+
* ```ts
|
|
9664
|
+
* const unmatched = kjApplyServerErrors(this.form, err.fields);
|
|
9665
|
+
* if (unmatched.length) this.globalError.set('…');
|
|
9666
|
+
* ```
|
|
9667
|
+
* @doc-category Core/Inputs
|
|
9668
|
+
* @doc
|
|
9669
|
+
* @doc-name form
|
|
9670
|
+
*/
|
|
9671
|
+
declare function kjApplyServerErrors(form: FormGroup, errors: KjServerErrors, options?: KjApplyServerErrorsOptions): string[];
|
|
9672
|
+
/**
|
|
9673
|
+
* Reads the messages previously set by {@link kjApplyServerErrors} from a
|
|
9674
|
+
* control's errors, or `null` when none are present. Convenience for
|
|
9675
|
+
* templates rendering the first (or all) server message(s) of a field.
|
|
9676
|
+
*
|
|
9677
|
+
* @doc-category Core/Inputs
|
|
9678
|
+
* @doc
|
|
9679
|
+
* @doc-name form
|
|
9680
|
+
*/
|
|
9681
|
+
declare function kjServerErrorsOf(control: {
|
|
9682
|
+
errors: Record<string, unknown> | null;
|
|
9683
|
+
} | null | undefined, errorKey?: string): readonly string[] | null;
|
|
9684
|
+
|
|
8765
9685
|
/**
|
|
8766
9686
|
* Optional companion to `KjForm` that renders a polite/assertive live-region
|
|
8767
9687
|
* summary of the invalid controls after a failed submit. Composes
|
|
@@ -11567,7 +12487,7 @@ declare const KJ_DATE_PICKER: InjectionToken<KjDatePickerContext>;
|
|
|
11567
12487
|
*/
|
|
11568
12488
|
declare class KjDatePicker implements KjDatePickerContext {
|
|
11569
12489
|
private readonly disabledHost;
|
|
11570
|
-
private readonly
|
|
12490
|
+
private readonly localeProvider;
|
|
11571
12491
|
/** Current selected value. Two-way bindable — `[(kjValue)]`. */
|
|
11572
12492
|
readonly kjValue: _angular_core.ModelSignal<Date | null>;
|
|
11573
12493
|
/** Earliest selectable date (inclusive). */
|
|
@@ -11576,7 +12496,7 @@ declare class KjDatePicker implements KjDatePickerContext {
|
|
|
11576
12496
|
readonly kjMax: _angular_core.InputSignal<Date | null>;
|
|
11577
12497
|
/** Per-date predicate. */
|
|
11578
12498
|
readonly kjDisabledDates: _angular_core.InputSignal<((d: Date) => boolean) | null>;
|
|
11579
|
-
/** BCP-47 locale tag.
|
|
12499
|
+
/** BCP-47 locale tag. Falls back to the `KjLocale` provider (`provideKjLocale`). */
|
|
11580
12500
|
readonly kjLocale: _angular_core.InputSignal<string>;
|
|
11581
12501
|
/** First day of the week override (0=Sun … 6=Sat). */
|
|
11582
12502
|
readonly kjFirstDayOfWeek: _angular_core.InputSignal<number | null>;
|
|
@@ -11691,7 +12611,195 @@ declare class KjDatePickerCalendar {
|
|
|
11691
12611
|
}
|
|
11692
12612
|
|
|
11693
12613
|
/**
|
|
11694
|
-
*
|
|
12614
|
+
* A closed date interval, both bounds inclusive and normalized to
|
|
12615
|
+
* `startOfDay` (day precision — matching the Calendar / Date Picker family).
|
|
12616
|
+
*
|
|
12617
|
+
* @doc-category Core/Data input
|
|
12618
|
+
*/
|
|
12619
|
+
interface KjDateRange {
|
|
12620
|
+
/** First day of the range (inclusive, `startOfDay`). */
|
|
12621
|
+
readonly start: Date;
|
|
12622
|
+
/** Last day of the range (inclusive, `startOfDay`). */
|
|
12623
|
+
readonly end: Date;
|
|
12624
|
+
}
|
|
12625
|
+
/**
|
|
12626
|
+
* A named quick-select for a {@link KjDateRange} — the unit the presets
|
|
12627
|
+
* listbox renders as one option.
|
|
12628
|
+
*
|
|
12629
|
+
* `getRange` is pure and receives the current instant so it is deterministic
|
|
12630
|
+
* in tests and lets consumers freeze "today".
|
|
12631
|
+
*
|
|
12632
|
+
* @doc-category Core/Data input
|
|
12633
|
+
*/
|
|
12634
|
+
interface KjDateRangePreset {
|
|
12635
|
+
/** Stable identifier, e.g. `'last-7-days'`. */
|
|
12636
|
+
readonly id: string;
|
|
12637
|
+
/** Human-readable label, e.g. `'Last 7 days'`. */
|
|
12638
|
+
readonly label: string;
|
|
12639
|
+
/** Resolves the preset to a concrete range relative to `now`. */
|
|
12640
|
+
readonly getRange: (now: Date) => KjDateRange;
|
|
12641
|
+
}
|
|
12642
|
+
/**
|
|
12643
|
+
* Resolves a preset against `now`, normalizing both bounds to `startOfDay`.
|
|
12644
|
+
* `null` when the preset produces an inverted range (`start > end`).
|
|
12645
|
+
*/
|
|
12646
|
+
declare function resolveDateRangePreset(preset: KjDateRangePreset, now: Date): KjDateRange | null;
|
|
12647
|
+
/**
|
|
12648
|
+
* Shared context for the Date Range Presets family. Implemented by
|
|
12649
|
+
* `KjDateRangePresets` (listbox root) and consumed by
|
|
12650
|
+
* `KjDateRangePresetOption`.
|
|
12651
|
+
*
|
|
12652
|
+
* @doc-category Core/Data input
|
|
12653
|
+
*/
|
|
12654
|
+
interface KjDateRangePresetsContext {
|
|
12655
|
+
/** The presets currently rendered as options. */
|
|
12656
|
+
readonly presets: Signal<readonly KjDateRangePreset[]>;
|
|
12657
|
+
/** Id of the currently selected preset; `null` when none is chosen. */
|
|
12658
|
+
readonly selectedId: Signal<string | null>;
|
|
12659
|
+
/** Whether the listbox is disabled. */
|
|
12660
|
+
readonly disabled: Signal<boolean>;
|
|
12661
|
+
/** Selects a preset — resolves its range and commits `kjValue`. */
|
|
12662
|
+
select(preset: KjDateRangePreset): void;
|
|
12663
|
+
/** True when `id` names the selected preset. */
|
|
12664
|
+
isSelected(id: string): boolean;
|
|
12665
|
+
}
|
|
12666
|
+
declare const KJ_DATE_RANGE_PRESETS: InjectionToken<KjDateRangePresetsContext>;
|
|
12667
|
+
|
|
12668
|
+
/**
|
|
12669
|
+
* Headless Date Range Presets listbox. Renders a set of named quick-selects
|
|
12670
|
+
* ("Last 7 days", "This quarter", …) as `role="option"` children; picking one
|
|
12671
|
+
* resolves its `{ start, end }` range and commits the two-way `kjValue`.
|
|
12672
|
+
*
|
|
12673
|
+
* Designed to slot beside a range calendar, but usable standalone against any
|
|
12674
|
+
* `signal<KjDateRange | null>`.
|
|
12675
|
+
*
|
|
12676
|
+
* **Compound shape:**
|
|
12677
|
+
*
|
|
12678
|
+
* ```html
|
|
12679
|
+
* <div kjDateRangePresets [(kjValue)]="range">
|
|
12680
|
+
* @for (p of presets.presets(); track p.id) {
|
|
12681
|
+
* <button kjDateRangePresetOption [kjPreset]="p">{{ p.label }}</button>
|
|
12682
|
+
* }
|
|
12683
|
+
* </div>
|
|
12684
|
+
* ```
|
|
12685
|
+
*
|
|
12686
|
+
* Composes {@link KjRovingTabindex} (vertical) so the whole list is a single
|
|
12687
|
+
* tab stop with Arrow / Home / End navigation.
|
|
12688
|
+
*
|
|
12689
|
+
* @doc-category Core/Data input
|
|
12690
|
+
* @doc
|
|
12691
|
+
* @doc-name date-range-presets
|
|
12692
|
+
* @doc-description Unstyled listbox of named date-range quick-selects that resolve to an inclusive `{ start, end }` range.
|
|
12693
|
+
* @doc-is-main
|
|
12694
|
+
*/
|
|
12695
|
+
declare class KjDateRangePresets implements KjDateRangePresetsContext {
|
|
12696
|
+
private readonly disabledHost;
|
|
12697
|
+
/** Selected range. Two-way bindable — `[(kjValue)]`. `null` when empty. */
|
|
12698
|
+
readonly kjValue: _angular_core.ModelSignal<KjDateRange | null>;
|
|
12699
|
+
/** Presets to render as options. Defaults to {@link defaultDateRangePresets}. */
|
|
12700
|
+
readonly kjPresets: _angular_core.InputSignal<readonly KjDateRangePreset[]>;
|
|
12701
|
+
/** Accessible name for the listbox. */
|
|
12702
|
+
readonly kjLabel: _angular_core.InputSignal<string>;
|
|
12703
|
+
/**
|
|
12704
|
+
* Injectable "now" for the preset math — defaults to the current instant.
|
|
12705
|
+
* Pass a fixed `Date` to freeze "today" (tests, storybook, replay).
|
|
12706
|
+
*/
|
|
12707
|
+
readonly kjNow: _angular_core.InputSignal<Date | null>;
|
|
12708
|
+
/** Read-only — value displays but cannot be edited. */
|
|
12709
|
+
readonly kjReadonly: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
|
|
12710
|
+
readonly presets: _angular_core.Signal<readonly KjDateRangePreset[]>;
|
|
12711
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
12712
|
+
/**
|
|
12713
|
+
* Id of the preset whose resolved range matches `kjValue`, or `null`. Derived
|
|
12714
|
+
* from the value so an externally-set range still highlights its preset.
|
|
12715
|
+
*/
|
|
12716
|
+
readonly selectedId: _angular_core.Signal<string | null>;
|
|
12717
|
+
private now;
|
|
12718
|
+
select(preset: KjDateRangePreset): void;
|
|
12719
|
+
isSelected(id: string): boolean;
|
|
12720
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjDateRangePresets, never>;
|
|
12721
|
+
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: {}; }]>;
|
|
12722
|
+
}
|
|
12723
|
+
|
|
12724
|
+
/**
|
|
12725
|
+
* One option inside a `[kjDateRangePresets]` listbox. Apply to a native
|
|
12726
|
+
* `<button>` so Enter / Space activation comes for free; the composed
|
|
12727
|
+
* {@link KjRovingTabindexItemDirective} manages its `tabindex` so the list is
|
|
12728
|
+
* a single tab stop.
|
|
12729
|
+
*
|
|
12730
|
+
* ```html
|
|
12731
|
+
* <button kjDateRangePresetOption [kjPreset]="preset">{{ preset.label }}</button>
|
|
12732
|
+
* ```
|
|
12733
|
+
*
|
|
12734
|
+
* @doc-category Core/Data input
|
|
12735
|
+
* @doc
|
|
12736
|
+
* @doc-name date-range-presets
|
|
12737
|
+
*/
|
|
12738
|
+
declare class KjDateRangePresetOption {
|
|
12739
|
+
/** @internal */
|
|
12740
|
+
readonly ctx: _kouji_ui_core.KjDateRangePresetsContext;
|
|
12741
|
+
/** The preset this option represents. */
|
|
12742
|
+
readonly kjPreset: _angular_core.InputSignal<KjDateRangePreset>;
|
|
12743
|
+
/** Whether this option is the selected one. */
|
|
12744
|
+
readonly selected: _angular_core.Signal<boolean>;
|
|
12745
|
+
/** @internal */
|
|
12746
|
+
onClick(): void;
|
|
12747
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjDateRangePresetOption, never>;
|
|
12748
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjDateRangePresetOption, "button[kjDateRangePresetOption]", ["kjDateRangePresetOption"], { "kjPreset": { "alias": "kjPreset"; "required": true; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof KjRovingTabindexItemDirective; inputs: {}; outputs: {}; }]>;
|
|
12749
|
+
}
|
|
12750
|
+
|
|
12751
|
+
/**
|
|
12752
|
+
* The built-in date range presets — Today, Yesterday, Last 7 / 30 days, This
|
|
12753
|
+
* week / month, Last month, This quarter, Year to date, Last year.
|
|
12754
|
+
*
|
|
12755
|
+
* All ranges are inclusive of both bounds. `Last 7 days` spans 7 calendar days
|
|
12756
|
+
* *including* today (today − 6 … today), matching how analytics tools count.
|
|
12757
|
+
*
|
|
12758
|
+
* @param weekStartsOn - First day of the week (0=Sun … 6=Sat) used by the
|
|
12759
|
+
* `This week` preset. Defaults to Sunday; pass the locale's week start to
|
|
12760
|
+
* align with the calendar.
|
|
12761
|
+
*
|
|
12762
|
+
* @doc-category Core/Data input
|
|
12763
|
+
* @doc
|
|
12764
|
+
* @doc-name date-range-presets
|
|
12765
|
+
*/
|
|
12766
|
+
declare function defaultDateRangePresets(weekStartsOn?: number): KjDateRangePreset[];
|
|
12767
|
+
|
|
12768
|
+
/**
|
|
12769
|
+
* Projects a screen-reader-only table fallback for a `KjChart`. When present
|
|
12770
|
+
* inside a `[kjChart]` host, the host directive renders the template as a table
|
|
12771
|
+
* *sibling* of the chart element — outside the `role="img"` subtree — so
|
|
12772
|
+
* assistive technology reads structured data instead of the canvas.
|
|
12773
|
+
*
|
|
12774
|
+
* This directive only exposes its `TemplateRef`; `KjChart` performs the
|
|
12775
|
+
* rendering (see its `_fallback` content query). Rendering it standalone,
|
|
12776
|
+
* without a `[kjChart]` host, produces no output.
|
|
12777
|
+
*
|
|
12778
|
+
* @example
|
|
12779
|
+
* ```html
|
|
12780
|
+
* <div kjChart [kjChartOption]="opt()" kjChartLabel="Sales">
|
|
12781
|
+
* <ng-container *kjChartTableFallback>
|
|
12782
|
+
* <table>...</table>
|
|
12783
|
+
* </ng-container>
|
|
12784
|
+
* </div>
|
|
12785
|
+
* ```
|
|
12786
|
+
*/
|
|
12787
|
+
declare class KjChartTableFallback {
|
|
12788
|
+
readonly tpl: TemplateRef<any>;
|
|
12789
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjChartTableFallback, never>;
|
|
12790
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjChartTableFallback, "[kjChartTableFallback]", never, {}, {}, never, never, true, never>;
|
|
12791
|
+
}
|
|
12792
|
+
|
|
12793
|
+
/** Payload emitted by `(kjChartEvent)` — the forwarded ECharts event name and its raw params. */
|
|
12794
|
+
interface KjChartEvent {
|
|
12795
|
+
/** The ECharts event name (as listed in `kjChartOn`), e.g. `'click'`, `'datazoom'`. */
|
|
12796
|
+
readonly type: string;
|
|
12797
|
+
/** The raw event object ECharts passes to the handler. Shape depends on `type`. */
|
|
12798
|
+
readonly params: unknown;
|
|
12799
|
+
}
|
|
12800
|
+
/**
|
|
12801
|
+
* Wraps Apache ECharts. Initializes after first render, updates reactively
|
|
12802
|
+
* (resize, reduced-motion, kj theme palette), disposes on destroy.
|
|
11695
12803
|
* Always provide `kjChartLabel` for WCAG AAA compliance.
|
|
11696
12804
|
*
|
|
11697
12805
|
* @example
|
|
@@ -11703,20 +12811,900 @@ declare class KjDatePickerCalendar {
|
|
|
11703
12811
|
* @doc-name chart
|
|
11704
12812
|
* @doc-description Renders a reactive ECharts chart on any sized element with an accessible label.
|
|
11705
12813
|
* @doc-is-main
|
|
12814
|
+
* @doc-example Line
|
|
12815
|
+
* @doc-file chart.example.ts
|
|
12816
|
+
* @doc-example Bar
|
|
12817
|
+
* @doc-file chart.bar.example.ts
|
|
12818
|
+
* @doc-example Donut
|
|
12819
|
+
* @doc-file chart.donut.example.ts
|
|
12820
|
+
* @doc-example Area
|
|
12821
|
+
* @doc-file chart.area.example.ts
|
|
12822
|
+
* @doc-example Sparkline
|
|
12823
|
+
* @doc-file chart.sparkline.example.ts
|
|
12824
|
+
* @doc-example Events
|
|
12825
|
+
* @doc-file chart.events.example.ts
|
|
12826
|
+
* @doc-example Loading
|
|
12827
|
+
* @doc-file chart.loading.example.ts
|
|
12828
|
+
* @doc-example Table fallback
|
|
12829
|
+
* @doc-file chart.fallback.example.ts
|
|
12830
|
+
* @doc-example Pluggable engine + general events
|
|
12831
|
+
* @doc-file chart.pluggable.example.ts
|
|
11706
12832
|
*/
|
|
11707
12833
|
declare class KjChart {
|
|
11708
12834
|
private readonly el;
|
|
11709
12835
|
private readonly destroyRef;
|
|
12836
|
+
private readonly vcr;
|
|
12837
|
+
/** Optional consumer-supplied ECharts loader (via `provideECharts`); null → full-import fallback. */
|
|
12838
|
+
private readonly echartsLoader;
|
|
11710
12839
|
/** ECharts option object defining the chart. */
|
|
11711
12840
|
kjChartOption: _angular_core.InputSignal<EChartsOption>;
|
|
11712
|
-
/** Accessible label for the chart. Required for WCAG AAA compliance. */
|
|
12841
|
+
/** Accessible short label for the chart. Required for WCAG AAA compliance. */
|
|
11713
12842
|
kjChartLabel: _angular_core.InputSignal<string>;
|
|
11714
|
-
|
|
12843
|
+
/** Longer description; rendered visually-hidden and wired via aria-describedby. */
|
|
12844
|
+
kjChartDescription: _angular_core.InputSignal<string>;
|
|
12845
|
+
/** Toggles ECharts showLoading/hideLoading. */
|
|
12846
|
+
kjChartLoading: _angular_core.InputSignal<boolean>;
|
|
12847
|
+
/** Explicit color array; falls back to kj theme palette (resolveChartPalette) when undefined. */
|
|
12848
|
+
kjChartPalette: _angular_core.InputSignal<string[] | undefined>;
|
|
12849
|
+
/** Honored unless prefers-reduced-motion: reduce is set. */
|
|
12850
|
+
kjChartAnimate: _angular_core.InputSignal<boolean>;
|
|
12851
|
+
/**
|
|
12852
|
+
* ECharts event names to forward through `(kjChartEvent)`. Bound via
|
|
12853
|
+
* `chart.on(name, …)` and re-bound reactively when this list changes.
|
|
12854
|
+
* e.g. `['click', 'datazoom', 'legendselectchanged']`.
|
|
12855
|
+
*/
|
|
12856
|
+
kjChartOn: _angular_core.InputSignal<readonly string[]>;
|
|
12857
|
+
/** Emits the ECharts instance after its first `setOption` (ready with data). Re-emits on re-init. */
|
|
12858
|
+
kjChartReady: _angular_core.OutputEmitterRef<EChartsType>;
|
|
12859
|
+
/**
|
|
12860
|
+
* Emits `{ type, params }` for every ECharts event named in `kjChartOn`.
|
|
12861
|
+
* Use this for arbitrary events; `kjChartReady` still exposes the raw
|
|
12862
|
+
* instance for full manual `.on(...)` wiring.
|
|
12863
|
+
*/
|
|
12864
|
+
kjChartEvent: _angular_core.OutputEmitterRef<KjChartEvent>;
|
|
12865
|
+
/** Emits ECharts 'click' events. Convenience — also available via `kjChartOn`. */
|
|
12866
|
+
kjChartClick: _angular_core.OutputEmitterRef<ECElementEvent>;
|
|
12867
|
+
/** Emits ECharts 'legendselectchanged' events. Convenience — also available via `kjChartOn`. */
|
|
12868
|
+
kjChartLegendSelect: _angular_core.OutputEmitterRef<unknown>;
|
|
12869
|
+
/** Unique id for the description div; used by host's aria-describedby binding. */
|
|
12870
|
+
readonly descriptionId: _angular_core.Signal<string>;
|
|
12871
|
+
private readonly _descSeq;
|
|
12872
|
+
/** Projected `*kjChartTableFallback`, if any. Rendered as an SR table sibling. */
|
|
12873
|
+
protected readonly _fallback: _angular_core.Signal<KjChartTableFallback | undefined>;
|
|
12874
|
+
/** The live ECharts instance. A signal so event-binding + loading effects react to init/dispose. */
|
|
12875
|
+
private readonly chart;
|
|
12876
|
+
private readonly prefersReducedMotion;
|
|
12877
|
+
/** Currently-bound `kjChartOn` forwarders, tracked so they can be unbound on re-bind/destroy. */
|
|
12878
|
+
private forwarded;
|
|
11715
12879
|
constructor();
|
|
12880
|
+
/**
|
|
12881
|
+
* (Re)binds the `kjChartOn` event forwarders: unbinds the previous set, then
|
|
12882
|
+
* binds `chart.on(name, …)` for each name, emitting `(kjChartEvent)`.
|
|
12883
|
+
* Idempotent — safe to call from both init and the reactive effect.
|
|
12884
|
+
*/
|
|
12885
|
+
private bindForwardedEvents;
|
|
12886
|
+
/** Merges reactive concerns (palette, reduced-motion) into the user option. */
|
|
12887
|
+
private resolveOption;
|
|
12888
|
+
/** Imperative resize — wraps chart.resize(). */
|
|
12889
|
+
resize(): void;
|
|
12890
|
+
/** Imperative dispatch — passes through to ECharts. */
|
|
12891
|
+
dispatchAction(payload: Parameters<EChartsType['dispatchAction']>[0]): void;
|
|
12892
|
+
/** Reads current option — passes through to ECharts. */
|
|
12893
|
+
getOption(): EChartsOption | undefined;
|
|
11716
12894
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjChart, never>;
|
|
11717
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjChart, "[kjChart]",
|
|
12895
|
+
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>;
|
|
12896
|
+
}
|
|
12897
|
+
|
|
12898
|
+
/**
|
|
12899
|
+
* Resolves the chart color palette from kj theme tokens on the given host element.
|
|
12900
|
+
* Reads `--kj-chart-1..6` first; for any empty slot, falls back to the matching
|
|
12901
|
+
* intent token (`--kj-bg-primary`, `--kj-bg-accent`, `--kj-bg-success`,
|
|
12902
|
+
* `--kj-bg-warning`, `--kj-bg-danger`) in that order. Slots that remain empty
|
|
12903
|
+
* after fallback are dropped.
|
|
12904
|
+
*/
|
|
12905
|
+
declare function resolveChartPalette(host: HTMLElement): string[];
|
|
12906
|
+
|
|
12907
|
+
/**
|
|
12908
|
+
* Minimal ECharts surface {@link KjChart} needs to boot a chart: the `init`
|
|
12909
|
+
* factory. Both the full `echarts` module and a tree-shaken `echarts/core`
|
|
12910
|
+
* build (after `.use([...])`) structurally satisfy this, so either can be
|
|
12911
|
+
* handed to {@link provideECharts}.
|
|
12912
|
+
*
|
|
12913
|
+
* `init` is typed to return `unknown` deliberately: `echarts` and `echarts/core`
|
|
12914
|
+
* ship separate (private-field-incompatible) declarations of their instance
|
|
12915
|
+
* type, so a shared structural type is the only thing both satisfy. `KjChart`
|
|
12916
|
+
* narrows the result to `EChartsType` internally.
|
|
12917
|
+
*/
|
|
12918
|
+
interface KjEChartsCore {
|
|
12919
|
+
init(dom: HTMLElement | null, theme?: string | object | null, opts?: object): unknown;
|
|
12920
|
+
}
|
|
12921
|
+
/**
|
|
12922
|
+
* Supplies an ECharts implementation. Return it synchronously or as a
|
|
12923
|
+
* `Promise` — {@link KjChart} awaits either. Typically returns the consumer's
|
|
12924
|
+
* own `echarts/core` namespace with the needed charts/components/renderer
|
|
12925
|
+
* already registered via `.use([...])`, trading the ~1 MB full bundle for a
|
|
12926
|
+
* minimal tree-shaken one.
|
|
12927
|
+
*/
|
|
12928
|
+
type KjEChartsLoader = () => KjEChartsCore | Promise<KjEChartsCore>;
|
|
12929
|
+
/**
|
|
12930
|
+
* DI token holding the optional {@link KjEChartsLoader}. When unset (default),
|
|
12931
|
+
* {@link KjChart} falls back to a dynamic `import('echarts')` of the full
|
|
12932
|
+
* build — zero-config convenience at the cost of bundle size.
|
|
12933
|
+
*
|
|
12934
|
+
* Prefer {@link provideECharts} over binding this token directly.
|
|
12935
|
+
* @doc
|
|
12936
|
+
* @doc-name chart
|
|
12937
|
+
* @doc-order 2
|
|
12938
|
+
*/
|
|
12939
|
+
declare const KJ_ECHARTS: InjectionToken<KjEChartsLoader | null>;
|
|
12940
|
+
/**
|
|
12941
|
+
* Registers a tree-shaken ECharts build for {@link KjChart}. Call at app
|
|
12942
|
+
* bootstrap (or a route's `providers`) so every `[kjChart]` uses the minimal
|
|
12943
|
+
* engine instead of the full `import('echarts')` fallback.
|
|
12944
|
+
*
|
|
12945
|
+
* @example
|
|
12946
|
+
* ```ts
|
|
12947
|
+
* // main.ts
|
|
12948
|
+
* import { provideECharts } from '@kouji-ui/core';
|
|
12949
|
+
* import * as echarts from 'echarts/core';
|
|
12950
|
+
* import { LineChart, BarChart } from 'echarts/charts';
|
|
12951
|
+
* import { GridComponent, TooltipComponent, LegendComponent } from 'echarts/components';
|
|
12952
|
+
* import { CanvasRenderer } from 'echarts/renderers';
|
|
12953
|
+
*
|
|
12954
|
+
* echarts.use([LineChart, BarChart, GridComponent, TooltipComponent, LegendComponent, CanvasRenderer]);
|
|
12955
|
+
*
|
|
12956
|
+
* bootstrapApplication(App, {
|
|
12957
|
+
* providers: [provideECharts(() => echarts)],
|
|
12958
|
+
* });
|
|
12959
|
+
* ```
|
|
12960
|
+
* @doc
|
|
12961
|
+
* @doc-name chart
|
|
12962
|
+
* @doc-order 1
|
|
12963
|
+
*/
|
|
12964
|
+
declare function provideECharts(loader: KjEChartsLoader): EnvironmentProviders;
|
|
12965
|
+
|
|
12966
|
+
/**
|
|
12967
|
+
* Public types for the {@link KjRichTextEditor} engine wrapper.
|
|
12968
|
+
*
|
|
12969
|
+
* These are framework- and engine-agnostic: they contain no Lexical runtime
|
|
12970
|
+
* imports so they are safe to import eagerly (including during SSR).
|
|
12971
|
+
*/
|
|
12972
|
+
/** Inline text formats that {@link KjRichTextEditor} can toggle on a selection. */
|
|
12973
|
+
type KjTextFormat = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code';
|
|
12974
|
+
/** Block-level node type that the current selection resolves to. */
|
|
12975
|
+
type KjBlockType = 'paragraph' | 'h1' | 'h2' | 'h3' | 'quote' | 'code' | 'bullet' | 'number';
|
|
12976
|
+
/**
|
|
12977
|
+
* Snapshot of the editor's formatting state, derived from the current
|
|
12978
|
+
* selection. Exposed as reactive signals on the directive.
|
|
12979
|
+
*/
|
|
12980
|
+
interface KjRichTextState {
|
|
12981
|
+
/** Inline formats active on the current selection. */
|
|
12982
|
+
readonly activeFormats: ReadonlySet<KjTextFormat>;
|
|
12983
|
+
/** Block type of the selection's top-level element. */
|
|
12984
|
+
readonly blockType: KjBlockType;
|
|
12985
|
+
/** Whether an undo step is available. */
|
|
12986
|
+
readonly canUndo: boolean;
|
|
12987
|
+
/** Whether a redo step is available. */
|
|
12988
|
+
readonly canRedo: boolean;
|
|
12989
|
+
/** Whether the selection is inside a link. */
|
|
12990
|
+
readonly isLink: boolean;
|
|
12991
|
+
/** Whether the document has no text content. */
|
|
12992
|
+
readonly empty: boolean;
|
|
12993
|
+
}
|
|
12994
|
+
/** Serialized editor content emitted whenever the document changes. */
|
|
12995
|
+
interface KjRichTextValue {
|
|
12996
|
+
/** Content serialized to HTML. */
|
|
12997
|
+
readonly html: string;
|
|
12998
|
+
/** Plain-text content. */
|
|
12999
|
+
readonly text: string;
|
|
13000
|
+
/** Lexical `SerializedEditorState` (structurally typed as `unknown`). */
|
|
13001
|
+
readonly json: unknown;
|
|
13002
|
+
}
|
|
13003
|
+
/** Descriptor for an image inserted via {@link KjRichTextEditor.insertImage}. */
|
|
13004
|
+
interface KjImageInsert {
|
|
13005
|
+
/** Image source URL. */
|
|
13006
|
+
readonly src: string;
|
|
13007
|
+
/** Alternative text — always supply for WCAG 1.1.1. */
|
|
13008
|
+
readonly alt?: string;
|
|
13009
|
+
/** Optional intrinsic width in pixels. */
|
|
13010
|
+
readonly width?: number;
|
|
13011
|
+
/** Optional intrinsic height in pixels. */
|
|
13012
|
+
readonly height?: number;
|
|
13013
|
+
}
|
|
13014
|
+
|
|
13015
|
+
/**
|
|
13016
|
+
* A keyboard shortcut spec, e.g. `'mod+b'`, `'mod+shift+z'`. `mod` resolves to
|
|
13017
|
+
* Ctrl on Windows/Linux and Cmd on macOS.
|
|
13018
|
+
*/
|
|
13019
|
+
type KjRteShortcut = string;
|
|
13020
|
+
/**
|
|
13021
|
+
* Context passed to a feature's `setup` and to every toolbar/overlay action.
|
|
13022
|
+
* Wraps the live editor with high-level, package-agnostic helpers so features
|
|
13023
|
+
* rarely touch Lexical internals directly (bold/italic never import a package).
|
|
13024
|
+
*/
|
|
13025
|
+
interface KjRichTextContext {
|
|
13026
|
+
/** The live Lexical editor. */
|
|
13027
|
+
readonly editor: LexicalEditor;
|
|
13028
|
+
/** Current formatting state derived from the selection. */
|
|
13029
|
+
readonly state: KjRichTextState;
|
|
13030
|
+
/** Run a mutation in a discrete (synchronously committed) editor update. */
|
|
13031
|
+
update(fn: () => void): void;
|
|
13032
|
+
/** Read editor state. */
|
|
13033
|
+
read<T>(fn: () => T): T;
|
|
13034
|
+
/** Toggle an inline text format (uses the core `FORMAT_TEXT_COMMAND`). */
|
|
13035
|
+
toggleInlineFormat(format: KjTextFormat): void;
|
|
13036
|
+
/** Replace the selected block(s) with the node returned by `create`. */
|
|
13037
|
+
setBlock(create: () => LexicalNode): void;
|
|
13038
|
+
/** Replace the selected block(s) with a plain paragraph. */
|
|
13039
|
+
setParagraph(): void;
|
|
13040
|
+
/** Insert nodes produced by `create` at the selection. */
|
|
13041
|
+
insertNodes(create: () => LexicalNode[]): void;
|
|
13042
|
+
/** Dispatch a Lexical command (feature packages provide the command constants). */
|
|
13043
|
+
dispatch<P>(command: LexicalCommand<P>, payload: P): void;
|
|
13044
|
+
/** Register a command handler; returns a teardown. */
|
|
13045
|
+
registerCommand<P>(command: LexicalCommand<P>, listener: (payload: P, editor: LexicalEditor) => boolean, priority: CommandListenerPriority): () => void;
|
|
13046
|
+
/** Register a node transform; returns a teardown. */
|
|
13047
|
+
registerNodeTransform<T extends LexicalNode>(klass: Klass<T>, listener: (node: T) => void): () => void;
|
|
13048
|
+
/** Register a keyboard shortcut; returns a teardown. */
|
|
13049
|
+
registerShortcut(shortcut: KjRteShortcut, run: () => void): () => void;
|
|
13050
|
+
/** Undo / redo. */
|
|
13051
|
+
undo(): void;
|
|
13052
|
+
redo(): void;
|
|
13053
|
+
/** Move focus into the editor. */
|
|
13054
|
+
focus(): void;
|
|
13055
|
+
/** Open a feature overlay by id, passing arbitrary data to its component. */
|
|
13056
|
+
openOverlay(id: string, data?: unknown): void;
|
|
13057
|
+
/** Close any open overlay. */
|
|
13058
|
+
closeOverlay(): void;
|
|
13059
|
+
/** Announce a message to assistive technology (aria-live). */
|
|
13060
|
+
announce(message: string): void;
|
|
13061
|
+
}
|
|
13062
|
+
/** How a toolbar item behaves. */
|
|
13063
|
+
type KjRteToolbarKind = 'button' | 'toggle';
|
|
13064
|
+
/**
|
|
13065
|
+
* A declarative toolbar contribution. Features own what appears in the toolbar;
|
|
13066
|
+
* the components layer renders items sorted by `group` then `order`.
|
|
13067
|
+
*/
|
|
13068
|
+
interface KjRteToolbarItem {
|
|
13069
|
+
/** Stable unique id. */
|
|
13070
|
+
readonly id: string;
|
|
13071
|
+
/** Logical group (rendered together, separated from other groups). */
|
|
13072
|
+
readonly group: string;
|
|
13073
|
+
/** Sort order within the group. */
|
|
13074
|
+
readonly order: number;
|
|
13075
|
+
/** Lucide icon name. */
|
|
13076
|
+
readonly icon: string;
|
|
13077
|
+
/** Accessible name + tooltip. */
|
|
13078
|
+
readonly label: string;
|
|
13079
|
+
/** Value for `aria-keyshortcuts` (e.g. `'Control+B'`). */
|
|
13080
|
+
readonly ariaKeyshortcuts?: string;
|
|
13081
|
+
/** `toggle` items expose `aria-pressed`; `button` items do not. */
|
|
13082
|
+
readonly kind: KjRteToolbarKind;
|
|
13083
|
+
/** Whether the toggle is currently active (drives `aria-pressed` + styling). */
|
|
13084
|
+
isActive?(state: KjRichTextState): boolean;
|
|
13085
|
+
/** Whether the item is currently disabled. */
|
|
13086
|
+
isDisabled?(state: KjRichTextState): boolean;
|
|
13087
|
+
/** Run the item's action. */
|
|
13088
|
+
run(context: KjRichTextContext): void;
|
|
13089
|
+
}
|
|
13090
|
+
/**
|
|
13091
|
+
* A declarative overlay/popover contribution (e.g. the link editor). Opened via
|
|
13092
|
+
* `context.openOverlay(id, data)`; the component receives the `data` (via
|
|
13093
|
+
* `injectRteOverlayData`) and can act through the passed callbacks.
|
|
13094
|
+
*/
|
|
13095
|
+
interface KjRteOverlay {
|
|
13096
|
+
/** Id used with `context.openOverlay(id)`. */
|
|
13097
|
+
readonly id: string;
|
|
13098
|
+
/** Accessible name for the overlay dialog. */
|
|
13099
|
+
readonly label: string;
|
|
13100
|
+
/** Standalone Angular component rendered inside the overlay. */
|
|
13101
|
+
readonly component: Type<unknown>;
|
|
13102
|
+
}
|
|
13103
|
+
/**
|
|
13104
|
+
* Maps a Lexical decorator-node type to the Angular component that renders it.
|
|
13105
|
+
* The engine's decorator bridge mounts the component into each node's DOM.
|
|
13106
|
+
*/
|
|
13107
|
+
interface KjDecoratorRegistration {
|
|
13108
|
+
/** The Lexical node `getType()` value this renders. */
|
|
13109
|
+
readonly nodeType: string;
|
|
13110
|
+
/** The standalone Angular component to mount for each node instance. */
|
|
13111
|
+
readonly component: Type<unknown>;
|
|
13112
|
+
}
|
|
13113
|
+
/**
|
|
13114
|
+
* A self-contained vertical slice of editor functionality. A feature owns its
|
|
13115
|
+
* **package loading** (`load`), its **nodes**, its **behaviour/activation**
|
|
13116
|
+
* (`setup`), and its **UI** (`toolbar`, `overlay`).
|
|
13117
|
+
*
|
|
13118
|
+
* Package loading is lazy and per-feature: `load` dynamically imports the
|
|
13119
|
+
* feature's own `@lexical/*` package(s), so disabling a feature means its code
|
|
13120
|
+
* is never downloaded. Nodes are collected from all active features **before**
|
|
13121
|
+
* the editor is created.
|
|
13122
|
+
*
|
|
13123
|
+
* @example
|
|
13124
|
+
* ```ts
|
|
13125
|
+
* export function bulletList(): KjRichTextFeature {
|
|
13126
|
+
* let mod!: typeof import('@lexical/list');
|
|
13127
|
+
* return {
|
|
13128
|
+
* name: 'bullet-list',
|
|
13129
|
+
* async load() { mod = await import('@lexical/list'); },
|
|
13130
|
+
* nodes: () => [mod.ListNode, mod.ListItemNode],
|
|
13131
|
+
* setup: (ctx) => mod.registerList(ctx.editor),
|
|
13132
|
+
* toolbar: [{ id: 'bullet-list', group: 'block', order: 1, icon: 'list',
|
|
13133
|
+
* label: 'Bullet list', kind: 'toggle',
|
|
13134
|
+
* isActive: (s) => s.blockType === 'bullet',
|
|
13135
|
+
* run: (ctx) => ctx.dispatch(mod.INSERT_UNORDERED_LIST_COMMAND, undefined) }],
|
|
13136
|
+
* };
|
|
13137
|
+
* }
|
|
13138
|
+
* ```
|
|
13139
|
+
*/
|
|
13140
|
+
interface KjRichTextFeature {
|
|
13141
|
+
/** Unique, human-readable feature name. */
|
|
13142
|
+
readonly name: string;
|
|
13143
|
+
/** Lazily import this feature's own `@lexical/*` package(s). Called once at init. */
|
|
13144
|
+
load?(): Promise<void>;
|
|
13145
|
+
/** Node classes this feature contributes (resolved after `load`). */
|
|
13146
|
+
nodes?(): ReadonlyArray<Klass<LexicalNode>>;
|
|
13147
|
+
/** Register behaviour (commands, transforms, keybindings). Returns an optional teardown. */
|
|
13148
|
+
setup?(context: KjRichTextContext): (() => void) | void;
|
|
13149
|
+
/** Angular components to render for this feature's decorator node types. */
|
|
13150
|
+
decorators?: readonly KjDecoratorRegistration[];
|
|
13151
|
+
/** Declarative toolbar contributions. */
|
|
13152
|
+
toolbar?: readonly KjRteToolbarItem[];
|
|
13153
|
+
/** Declarative overlay contributions. */
|
|
13154
|
+
overlay?: readonly KjRteOverlay[];
|
|
13155
|
+
}
|
|
13156
|
+
|
|
13157
|
+
/**
|
|
13158
|
+
* Context contract exposed by a {@link KjRichTextEditor} through {@link KJ_RICH_TEXT}.
|
|
13159
|
+
*
|
|
13160
|
+
* Follows the repo's signal-context pattern (root provides a token pointing to
|
|
13161
|
+
* itself; descendants inject it) so that child directives and toolbars can read
|
|
13162
|
+
* editor state / toolbar contributions and register features without a hard
|
|
13163
|
+
* reference to the class.
|
|
13164
|
+
*/
|
|
13165
|
+
interface KjRichTextHost {
|
|
13166
|
+
/** The live Lexical editor instance, or `null` before initialization. */
|
|
13167
|
+
readonly editor: Signal<LexicalEditor | null>;
|
|
13168
|
+
/** Current formatting state derived from the selection. */
|
|
13169
|
+
readonly state: Signal<KjRichTextState>;
|
|
13170
|
+
/** Toolbar items contributed by the active features, sorted by group then order. */
|
|
13171
|
+
readonly toolbarItems: Signal<readonly KjRteToolbarItem[]>;
|
|
13172
|
+
/**
|
|
13173
|
+
* Register a feature with this editor. Must be called before the editor
|
|
13174
|
+
* initializes (during a child directive's `ngOnInit`, or via
|
|
13175
|
+
* {@link provideKjRichText}) for node-contributing features to take effect.
|
|
13176
|
+
*/
|
|
13177
|
+
registerFeature(feature: KjRichTextFeature): void;
|
|
13178
|
+
}
|
|
13179
|
+
/**
|
|
13180
|
+
* Context token for the rich-text editor. A {@link KjRichTextEditor} provides it
|
|
13181
|
+
* pointing to itself; descendants (toolbars, feature directives) inject it.
|
|
13182
|
+
*/
|
|
13183
|
+
declare const KJ_RICH_TEXT: InjectionToken<KjRichTextHost>;
|
|
13184
|
+
/**
|
|
13185
|
+
* Multi-provider token for app- or scope-wide rich-text features. Contribute to
|
|
13186
|
+
* it with {@link provideKjRichText}; every {@link KjRichTextEditor} in that
|
|
13187
|
+
* injector scope activates them.
|
|
13188
|
+
*/
|
|
13189
|
+
declare const KJ_RICH_TEXT_FEATURES: InjectionToken<KjRichTextFeature[]>;
|
|
13190
|
+
/** @deprecated Renamed to {@link KJ_RICH_TEXT_FEATURES}. Same token instance. */
|
|
13191
|
+
declare const KJ_RICH_TEXT_EXTENSIONS: InjectionToken<KjRichTextFeature[]>;
|
|
13192
|
+
/**
|
|
13193
|
+
* Register one or more rich-text features for every editor in this injector
|
|
13194
|
+
* scope (app config, a route, or a component's `providers`). Only the chosen
|
|
13195
|
+
* features load their packages and contribute toolbar/overlay UI.
|
|
13196
|
+
*
|
|
13197
|
+
* @example
|
|
13198
|
+
* ```ts
|
|
13199
|
+
* providers: [provideKjRichText(bold(), italic(), link())]
|
|
13200
|
+
* ```
|
|
13201
|
+
*/
|
|
13202
|
+
declare function provideKjRichText(...features: KjRichTextFeature[]): Provider[];
|
|
13203
|
+
/**
|
|
13204
|
+
* Injection token holding the Lexical node instance being decorated. An Angular
|
|
13205
|
+
* component mounted for a decorator node injects it (via {@link injectRichTextNode})
|
|
13206
|
+
* to read the node's data.
|
|
13207
|
+
*/
|
|
13208
|
+
declare const KJ_RICH_TEXT_NODE: InjectionToken<unknown>;
|
|
13209
|
+
/** Inject the Lexical node instance a decorator-node component is rendering. */
|
|
13210
|
+
declare function injectRichTextNode<T = unknown>(): T;
|
|
13211
|
+
/** Injection token holding the data a feature passed to `context.openOverlay(id, data)`. */
|
|
13212
|
+
declare const KJ_RTE_OVERLAY_DATA: InjectionToken<unknown>;
|
|
13213
|
+
/** Inject the data supplied to the currently rendered rich-text overlay component. */
|
|
13214
|
+
declare function injectRteOverlayData<T = unknown>(): T;
|
|
13215
|
+
/** A component mounted by the decorator bridge, with a handle to tear it down. */
|
|
13216
|
+
interface KjMountedComponent {
|
|
13217
|
+
/** The mounted component's root DOM element (to append into the node's host). */
|
|
13218
|
+
readonly element: HTMLElement;
|
|
13219
|
+
/** Destroy the component and detach it from change detection. */
|
|
13220
|
+
destroy(): void;
|
|
13221
|
+
}
|
|
13222
|
+
/**
|
|
13223
|
+
* Adapter the engine uses to mount an Angular component for a Lexical decorator
|
|
13224
|
+
* node. Supplied by {@link KjRichTextEditor} so the engine stays free of Angular
|
|
13225
|
+
* DI specifics (and CDK-free).
|
|
13226
|
+
*/
|
|
13227
|
+
interface KjDecoratorMountAdapter {
|
|
13228
|
+
/** Mount `component`, providing `node` via {@link KJ_RICH_TEXT_NODE}. */
|
|
13229
|
+
mount(component: unknown, node: unknown): KjMountedComponent;
|
|
13230
|
+
}
|
|
13231
|
+
|
|
13232
|
+
/** A resolved open overlay: its descriptor plus the data the feature passed. */
|
|
13233
|
+
interface KjActiveOverlay {
|
|
13234
|
+
readonly overlay: KjRteOverlay;
|
|
13235
|
+
readonly data: unknown;
|
|
13236
|
+
}
|
|
13237
|
+
/** A contiguous run of toolbar items sharing a group, for rendering. */
|
|
13238
|
+
interface KjRteToolbarGroup {
|
|
13239
|
+
readonly group: string;
|
|
13240
|
+
readonly items: readonly KjRteToolbarItem[];
|
|
13241
|
+
}
|
|
13242
|
+
/**
|
|
13243
|
+
* Headless, client-driven rich-text editor wrapping [Lexical](https://lexical.dev).
|
|
13244
|
+
*
|
|
13245
|
+
* Apply to a block element to turn it into an editable, accessible surface
|
|
13246
|
+
* (`role="textbox"`, `aria-multiline`). The editor is composed from **features**
|
|
13247
|
+
* (see {@link KjRichTextFeature}) supplied via {@link provideKjRichText}, the
|
|
13248
|
+
* `kjFeatures` input, or `[kjRichTextExtension]` child directives. Each feature
|
|
13249
|
+
* lazily loads its own `@lexical/*` package(s) in the browser, so disabling a
|
|
13250
|
+
* feature keeps its code out of the bundle. SSR-safe: the engine loads via
|
|
13251
|
+
* dynamic `import()` inside `afterNextRender`.
|
|
13252
|
+
*
|
|
13253
|
+
* Exposes the aggregated {@link toolbarItems}, reactive `state`, and imperative
|
|
13254
|
+
* helpers (`runItem`, `undo`, …) for a dynamic toolbar to bind to, and
|
|
13255
|
+
* implements {@link ControlValueAccessor} (HTML string model) for Angular forms.
|
|
13256
|
+
*
|
|
13257
|
+
* @doc-category Core/Forms
|
|
13258
|
+
* @doc
|
|
13259
|
+
* @doc-name rich-text-editor
|
|
13260
|
+
* @doc-description Headless, feature-composed Lexical rich-text editor directive with a dynamic toolbar contract and form support.
|
|
13261
|
+
* @doc-is-main
|
|
13262
|
+
*/
|
|
13263
|
+
declare class KjRichTextEditor implements ControlValueAccessor, KjRichTextHost {
|
|
13264
|
+
private readonly el;
|
|
13265
|
+
private readonly destroyRef;
|
|
13266
|
+
private readonly platformId;
|
|
13267
|
+
private readonly envInjector;
|
|
13268
|
+
private readonly appRef;
|
|
13269
|
+
/** App-/scope-wide features contributed via {@link provideKjRichText}. */
|
|
13270
|
+
private readonly providedFeatures;
|
|
13271
|
+
/** Features registered by child directives via {@link registerFeature}. */
|
|
13272
|
+
private readonly childFeatures;
|
|
13273
|
+
/** Initial content as an HTML string. Ongoing edits are reported via outputs / forms. */
|
|
13274
|
+
readonly kjValue: _angular_core.InputSignal<string>;
|
|
13275
|
+
/** Per-instance features, merged with provided + child-registered features. */
|
|
13276
|
+
readonly kjFeatures: _angular_core.InputSignal<readonly KjRichTextFeature[]>;
|
|
13277
|
+
/** @deprecated Renamed to {@link kjFeatures}. Still honored (merged). */
|
|
13278
|
+
readonly kjExtensions: _angular_core.InputSignal<readonly KjRichTextFeature[]>;
|
|
13279
|
+
/** @deprecated Renamed to {@link kjFeatures}. Still honored (merged). */
|
|
13280
|
+
readonly kjPlugins: _angular_core.InputSignal<readonly KjRichTextFeature[]>;
|
|
13281
|
+
/** Makes the editor non-editable while still selectable. */
|
|
13282
|
+
readonly kjReadonly: _angular_core.InputSignal<boolean>;
|
|
13283
|
+
/** Native spellcheck toggle. */
|
|
13284
|
+
readonly kjSpellcheck: _angular_core.InputSignal<boolean>;
|
|
13285
|
+
/** Lexical namespace (diagnostics only). */
|
|
13286
|
+
readonly kjNamespace: _angular_core.InputSignal<string>;
|
|
13287
|
+
/** Emits the serialized HTML whenever the document changes. */
|
|
13288
|
+
readonly valueChange: _angular_core.OutputEmitterRef<string>;
|
|
13289
|
+
/** Emits the plain-text content whenever the document changes. */
|
|
13290
|
+
readonly textChange: _angular_core.OutputEmitterRef<string>;
|
|
13291
|
+
/** Emits the Lexical `SerializedEditorState` whenever the document changes. */
|
|
13292
|
+
readonly jsonChange: _angular_core.OutputEmitterRef<SerializedEditorState<lexical.SerializedLexicalNode>>;
|
|
13293
|
+
/** Emits messages a feature asked to announce to assistive technology. */
|
|
13294
|
+
readonly announce: _angular_core.OutputEmitterRef<string>;
|
|
13295
|
+
private readonly editorSig;
|
|
13296
|
+
/** The live Lexical editor instance, or `null` before initialization. */
|
|
13297
|
+
readonly editor: _angular_core.Signal<LexicalEditor | null>;
|
|
13298
|
+
/** Current formatting state derived from the selection. */
|
|
13299
|
+
readonly state: _angular_core.WritableSignal<KjRichTextState>;
|
|
13300
|
+
readonly isBold: _angular_core.Signal<boolean>;
|
|
13301
|
+
readonly isItalic: _angular_core.Signal<boolean>;
|
|
13302
|
+
readonly isUnderline: _angular_core.Signal<boolean>;
|
|
13303
|
+
readonly isStrikethrough: _angular_core.Signal<boolean>;
|
|
13304
|
+
readonly isCode: _angular_core.Signal<boolean>;
|
|
13305
|
+
readonly blockType: _angular_core.Signal<KjBlockType>;
|
|
13306
|
+
readonly canUndo: _angular_core.Signal<boolean>;
|
|
13307
|
+
readonly canRedo: _angular_core.Signal<boolean>;
|
|
13308
|
+
readonly isLink: _angular_core.Signal<boolean>;
|
|
13309
|
+
readonly empty: _angular_core.Signal<boolean>;
|
|
13310
|
+
/** All active features (provided + inputs + child-registered). */
|
|
13311
|
+
private readonly features;
|
|
13312
|
+
/** Toolbar items contributed by active features, sorted by group then order. */
|
|
13313
|
+
readonly toolbarItems: _angular_core.Signal<readonly KjRteToolbarItem[]>;
|
|
13314
|
+
/** Toolbar items grouped into contiguous runs (for rendering separators). */
|
|
13315
|
+
readonly toolbarGroups: _angular_core.Signal<readonly KjRteToolbarGroup[]>;
|
|
13316
|
+
/** Overlay descriptors contributed by active features. */
|
|
13317
|
+
private readonly overlays;
|
|
13318
|
+
/** The overlay currently open (opened by a feature), or `null`. */
|
|
13319
|
+
readonly activeOverlay: _angular_core.WritableSignal<KjActiveOverlay | null>;
|
|
13320
|
+
/** @internal CVA disabled flag. */
|
|
13321
|
+
readonly disabledState: _angular_core.WritableSignal<boolean>;
|
|
13322
|
+
private engine;
|
|
13323
|
+
private pendingValue;
|
|
13324
|
+
private lastHtml;
|
|
13325
|
+
private applyingExternal;
|
|
13326
|
+
private destroyed;
|
|
13327
|
+
private onChange;
|
|
13328
|
+
/** @internal blur handler wired via host bindings. */
|
|
13329
|
+
onTouched: () => void;
|
|
13330
|
+
constructor();
|
|
13331
|
+
private emitValue;
|
|
13332
|
+
private openOverlayById;
|
|
13333
|
+
/** {@inheritDoc KjRichTextHost.registerFeature} */
|
|
13334
|
+
registerFeature(feature: KjRichTextFeature): void;
|
|
13335
|
+
/** @deprecated Renamed to {@link registerFeature}. */
|
|
13336
|
+
registerExtension(feature: KjRichTextFeature): void;
|
|
13337
|
+
/** Run a toolbar item's action against the live editor (no-op until ready). */
|
|
13338
|
+
runItem(item: KjRteToolbarItem): void;
|
|
13339
|
+
/** Whether a toggle toolbar item is currently active. */
|
|
13340
|
+
itemActive(item: KjRteToolbarItem): boolean;
|
|
13341
|
+
/** Whether a toolbar item is currently disabled. */
|
|
13342
|
+
itemDisabled(item: KjRteToolbarItem): boolean;
|
|
13343
|
+
/** Close any open feature overlay. */
|
|
13344
|
+
closeOverlay(): void;
|
|
13345
|
+
/** Undo the last edit. */
|
|
13346
|
+
undo(): void;
|
|
13347
|
+
/** Redo the last undone edit. */
|
|
13348
|
+
redo(): void;
|
|
13349
|
+
/** Move focus into the editor. */
|
|
13350
|
+
focus(): void;
|
|
13351
|
+
/** Remove all content, leaving a single empty paragraph. */
|
|
13352
|
+
clear(): void;
|
|
13353
|
+
/** Serialize the current content to HTML. */
|
|
13354
|
+
getHtml(): string;
|
|
13355
|
+
/** Replace the content from an HTML string. */
|
|
13356
|
+
setHtml(html: string): void;
|
|
13357
|
+
/** Serialize the current content to a Lexical `SerializedEditorState`. */
|
|
13358
|
+
getJson(): SerializedEditorState | null;
|
|
13359
|
+
/** Replace the content from a Lexical `SerializedEditorState`. */
|
|
13360
|
+
setJson(json: SerializedEditorState): void;
|
|
13361
|
+
/** Build the Angular mount adapter the engine uses for decorator-node components. */
|
|
13362
|
+
private createMountAdapter;
|
|
13363
|
+
writeValue(value: string | null): void;
|
|
13364
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
13365
|
+
registerOnTouched(fn: () => void): void;
|
|
13366
|
+
setDisabledState(isDisabled: boolean): void;
|
|
13367
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjRichTextEditor, never>;
|
|
13368
|
+
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>;
|
|
11718
13369
|
}
|
|
11719
13370
|
|
|
13371
|
+
/**
|
|
13372
|
+
* Registers one or more {@link KjRichTextFeature}s with the nearest
|
|
13373
|
+
* {@link KjRichTextEditor} — the signal-context pattern (like `Option`
|
|
13374
|
+
* registering with `Select`).
|
|
13375
|
+
*
|
|
13376
|
+
* Place it on the same element as `[kjRichTextEditor]`, or on a descendant that
|
|
13377
|
+
* can inject {@link KJ_RICH_TEXT} (e.g. an `<ng-container>`). Registration
|
|
13378
|
+
* happens in `ngOnInit`, before the editor initializes, so node-contributing
|
|
13379
|
+
* features are picked up.
|
|
13380
|
+
*
|
|
13381
|
+
* @example
|
|
13382
|
+
* ```html
|
|
13383
|
+
* <div kjRichTextEditor [kjFeatures]="[mentionFeature]"></div>
|
|
13384
|
+
* <!-- or as a child directive -->
|
|
13385
|
+
* <div kjRichTextEditor [kjRichTextFeature]="mentionFeature"></div>
|
|
13386
|
+
* ```
|
|
13387
|
+
* @doc-category Core/Forms
|
|
13388
|
+
* @doc
|
|
13389
|
+
* @doc-name rich-text-editor
|
|
13390
|
+
*/
|
|
13391
|
+
declare class KjRichTextExtensionDirective implements OnInit {
|
|
13392
|
+
private readonly host;
|
|
13393
|
+
/** The feature (or features) to register with the host editor. */
|
|
13394
|
+
readonly kjRichTextFeature: _angular_core.InputSignal<KjRichTextFeature | readonly KjRichTextFeature[] | undefined>;
|
|
13395
|
+
/** @deprecated Renamed to {@link kjRichTextFeature}. */
|
|
13396
|
+
readonly kjRichTextExtension: _angular_core.InputSignal<KjRichTextFeature | readonly KjRichTextFeature[] | undefined>;
|
|
13397
|
+
ngOnInit(): void;
|
|
13398
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjRichTextExtensionDirective, never>;
|
|
13399
|
+
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>;
|
|
13400
|
+
}
|
|
13401
|
+
|
|
13402
|
+
/** Configuration for {@link createKjDecoratorNode}. */
|
|
13403
|
+
interface KjDecoratorNodeConfig {
|
|
13404
|
+
/** Unique Lexical node type string (must match the `decorators` registration). */
|
|
13405
|
+
type: string;
|
|
13406
|
+
/** The Angular component rendered for each node instance. */
|
|
13407
|
+
component: Type<unknown>;
|
|
13408
|
+
/** Render inline (`<span>`) rather than as a block (`<div>`). Default `false`. */
|
|
13409
|
+
inline?: boolean;
|
|
13410
|
+
/** Optional accessible name applied to the node's host element (WCAG 4.1.2). */
|
|
13411
|
+
ariaLabel?: string;
|
|
13412
|
+
}
|
|
13413
|
+
/** The node class plus helpers returned by {@link createKjDecoratorNode}. */
|
|
13414
|
+
interface KjDecoratorNodeApi<TData extends Record<string, unknown> = Record<string, unknown>> {
|
|
13415
|
+
/** The generated Lexical `DecoratorNode` subclass — pass to `nodes` in your extension. */
|
|
13416
|
+
readonly Node: Klass<LexicalNode>;
|
|
13417
|
+
/** Create a node instance carrying `data`. Use inside `editor.update`. */
|
|
13418
|
+
$create(data?: TData): LexicalNode;
|
|
13419
|
+
/** Type guard for this node. */
|
|
13420
|
+
$is(node: LexicalNode | null | undefined): boolean;
|
|
13421
|
+
}
|
|
13422
|
+
/**
|
|
13423
|
+
* Build a self-contained Lexical `DecoratorNode` subclass whose instances render
|
|
13424
|
+
* an Angular component (mounted by the editor's decorator bridge). This is the
|
|
13425
|
+
* reusable "render an Angular component as an editor node" framework — define a
|
|
13426
|
+
* custom node from outside the engine in a handful of lines.
|
|
13427
|
+
*
|
|
13428
|
+
* The node stores an arbitrary JSON-serializable `data` object; the mounted
|
|
13429
|
+
* component reads it via {@link injectRichTextNode}. `lexical` is passed in (not
|
|
13430
|
+
* imported here) so this stays SSR-safe and out of the base bundle.
|
|
13431
|
+
*
|
|
13432
|
+
* @example
|
|
13433
|
+
* ```ts
|
|
13434
|
+
* const badge = createKjDecoratorNode(lexical, { type: 'badge', component: BadgeChip, inline: true });
|
|
13435
|
+
* // badge.Node -> register via extension.nodes; badge.$create({ label }) -> insert
|
|
13436
|
+
* ```
|
|
13437
|
+
*/
|
|
13438
|
+
declare function createKjDecoratorNode<TData extends Record<string, unknown> = Record<string, unknown>>(lexical: typeof lexical, config: KjDecoratorNodeConfig): KjDecoratorNodeApi<TData>;
|
|
13439
|
+
|
|
13440
|
+
/** The image node class plus helpers returned by {@link createKjImageNode}. */
|
|
13441
|
+
interface KjImageNodeApi {
|
|
13442
|
+
/** The generated Lexical image node class — pass to a feature's `nodes()`. */
|
|
13443
|
+
readonly Node: Klass<LexicalNode>;
|
|
13444
|
+
/** Create an image node. Use inside `editor.update`. */
|
|
13445
|
+
$create(image: KjImageInsert): LexicalNode;
|
|
13446
|
+
/** Type guard for this image node. */
|
|
13447
|
+
$is(node: LexicalNode | null | undefined): boolean;
|
|
13448
|
+
}
|
|
13449
|
+
/**
|
|
13450
|
+
* Build a self-rendering block image `DecoratorNode` subclass. It paints its own
|
|
13451
|
+
* `<figure><img></figure>` in `createDOM` (no framework decorator infra needed)
|
|
13452
|
+
* and round-trips through HTML via `importDOM`/`exportDOM`.
|
|
13453
|
+
*
|
|
13454
|
+
* `lexical` is passed in (not imported here) so this module carries no eager
|
|
13455
|
+
* Lexical import and stays SSR-safe — the image feature calls it inside `load()`.
|
|
13456
|
+
*/
|
|
13457
|
+
declare function createKjImageNode(lexical: typeof lexical): KjImageNodeApi;
|
|
13458
|
+
|
|
13459
|
+
/**
|
|
13460
|
+
* @deprecated Renamed to {@link KjRichTextFeature}. Kept as an alias for
|
|
13461
|
+
* backwards compatibility; will be removed in a future major.
|
|
13462
|
+
*/
|
|
13463
|
+
type KjRichTextExtension = KjRichTextFeature;
|
|
13464
|
+
/**
|
|
13465
|
+
* @deprecated Renamed to {@link KjRichTextFeature}. Kept as an alias for
|
|
13466
|
+
* backwards compatibility; will be removed in a future major.
|
|
13467
|
+
*/
|
|
13468
|
+
type KjRichTextPlugin = KjRichTextFeature;
|
|
13469
|
+
|
|
13470
|
+
/**
|
|
13471
|
+
* The Monaco namespace (`typeof import('monaco-editor')`). Imported as a
|
|
13472
|
+
* **type only** so `monaco-editor` never becomes a runtime dependency of the
|
|
13473
|
+
* base bundle — the actual module is resolved lazily by {@link KjEditorLoader}.
|
|
13474
|
+
*/
|
|
13475
|
+
type KjMonaco = typeof monaco_editor;
|
|
13476
|
+
/** A function that resolves a ready-to-use Monaco namespace. */
|
|
13477
|
+
type KjMonacoLoaderFn = () => Promise<KjMonaco>;
|
|
13478
|
+
/**
|
|
13479
|
+
* Monaco standalone editor construction options. Re-exported under a `kj` name
|
|
13480
|
+
* so consumers don't need a direct `monaco-editor` type import at call sites.
|
|
13481
|
+
*/
|
|
13482
|
+
type KjEditorOptions = editor.IStandaloneEditorConstructionOptions;
|
|
13483
|
+
/** The live Monaco editor instance. */
|
|
13484
|
+
type KjEditorInstance = editor.IStandaloneCodeEditor;
|
|
13485
|
+
/** Gutter line-number rendering mode. */
|
|
13486
|
+
type KjEditorLineNumbers = 'on' | 'off' | 'relative';
|
|
13487
|
+
/** Soft-wrap mode. */
|
|
13488
|
+
type KjEditorWordWrap = 'on' | 'off';
|
|
13489
|
+
/**
|
|
13490
|
+
* A code language for the editor. The listed ids get editor autocomplete, but
|
|
13491
|
+
* any Monaco language id (or a short alias like `ts` / `md` / `yml`, normalised
|
|
13492
|
+
* for you) is accepted — hence the open `(string & {})`. This is a kj-level
|
|
13493
|
+
* abstraction: callers never import a Monaco type to set a language.
|
|
13494
|
+
*/
|
|
13495
|
+
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 & {});
|
|
13496
|
+
/**
|
|
13497
|
+
* Lazily loads one language's Monaco contribution (grammar + config). The
|
|
13498
|
+
* returned promise resolves once the language is registered. Typically an
|
|
13499
|
+
* `import(...)` of a `monaco-editor/esm/vs/basic-languages/<lang>/<lang>.contribution`
|
|
13500
|
+
* module, which self-registers into Monaco as a side effect.
|
|
13501
|
+
*/
|
|
13502
|
+
type KjMonacoLanguageLoader = () => Promise<unknown>;
|
|
13503
|
+
|
|
13504
|
+
/**
|
|
13505
|
+
* Headless code editor — wraps [Monaco](https://microsoft.github.io/monaco-editor/)
|
|
13506
|
+
* (VS Code's editor) on its host element. Loads Monaco lazily after first
|
|
13507
|
+
* render (SSR-safe), binds `kjValue` two-way, and disposes on destroy.
|
|
13508
|
+
*
|
|
13509
|
+
* Monaco is browser-only and heavy: it is resolved through {@link KjEditorLoader}
|
|
13510
|
+
* whose source is configurable via `provideMonaco()` (defaults to a CDN loader
|
|
13511
|
+
* so nothing bloats the base bundle). The styled `<kj-editor>` wrapper in
|
|
13512
|
+
* `@kouji-ui/components` adds theming, a toolbar and a status bar on top.
|
|
13513
|
+
*
|
|
13514
|
+
* @example
|
|
13515
|
+
* ```html
|
|
13516
|
+
* <div kjEditor [(kjValue)]="code" kjLanguage="typescript" style="height:320px"></div>
|
|
13517
|
+
* ```
|
|
13518
|
+
* @doc-category Core/Data
|
|
13519
|
+
* @doc
|
|
13520
|
+
* @doc-name editor
|
|
13521
|
+
* @doc-is-main
|
|
13522
|
+
* @doc-description Headless Monaco-wrapped code editor directive — two-way value, language, options, SSR-safe lazy load.
|
|
13523
|
+
*/
|
|
13524
|
+
declare class KjEditor {
|
|
13525
|
+
private readonly el;
|
|
13526
|
+
private readonly destroyRef;
|
|
13527
|
+
private readonly loader;
|
|
13528
|
+
/** Two-way editor text. */
|
|
13529
|
+
readonly kjValue: _angular_core.ModelSignal<string>;
|
|
13530
|
+
/** Code language — friendly name or Monaco id; short aliases (`ts`, `md`) normalised. */
|
|
13531
|
+
readonly kjLanguage: _angular_core.InputSignal<KjEditorLanguage>;
|
|
13532
|
+
/** Read-only mode. */
|
|
13533
|
+
readonly kjReadonly: _angular_core.InputSignal<boolean>;
|
|
13534
|
+
/** Show the minimap. */
|
|
13535
|
+
readonly kjMinimap: _angular_core.InputSignal<boolean>;
|
|
13536
|
+
/** Gutter line-number mode. */
|
|
13537
|
+
readonly kjLineNumbers: _angular_core.InputSignal<KjEditorLineNumbers>;
|
|
13538
|
+
/** Soft wrap. */
|
|
13539
|
+
readonly kjWordWrap: _angular_core.InputSignal<KjEditorWordWrap>;
|
|
13540
|
+
/** Font size in px. */
|
|
13541
|
+
readonly kjFontSize: _angular_core.InputSignal<number>;
|
|
13542
|
+
/** Grow the host to fit content instead of filling its container. */
|
|
13543
|
+
readonly kjAutoHeight: _angular_core.InputSignal<boolean>;
|
|
13544
|
+
/** Cap for `kjAutoHeight` in px (content scrolls past it). Uncapped when unset. */
|
|
13545
|
+
readonly kjMaxHeight: _angular_core.InputSignal<number | undefined>;
|
|
13546
|
+
/** Explicit Monaco theme id; overrides the wrapper's auto light/dark. */
|
|
13547
|
+
readonly kjTheme: _angular_core.InputSignal<string | undefined>;
|
|
13548
|
+
/** Accessible name — set as Monaco `ariaLabel` and the host `aria-label`. */
|
|
13549
|
+
readonly kjAriaLabel: _angular_core.InputSignal<string>;
|
|
13550
|
+
/**
|
|
13551
|
+
* Start with Tab moving focus out instead of inserting a tab. Consumers who
|
|
13552
|
+
* embed the editor in a form flow may prefer this so keyboard users are never
|
|
13553
|
+
* trapped; the `Ctrl+M` toggle remains available either way.
|
|
13554
|
+
*/
|
|
13555
|
+
readonly kjTabFocusMode: _angular_core.InputSignal<boolean>;
|
|
13556
|
+
/** Escape hatch — merged last into Monaco's construction options. */
|
|
13557
|
+
readonly kjOptions: _angular_core.InputSignal<monaco_editor.editor.IStandaloneEditorConstructionOptions>;
|
|
13558
|
+
/** Emits the live Monaco editor once created, for imperative use. */
|
|
13559
|
+
readonly kjReady: _angular_core.OutputEmitterRef<monaco_editor.editor.IStandaloneCodeEditor>;
|
|
13560
|
+
private editor;
|
|
13561
|
+
private monaco;
|
|
13562
|
+
private applyingExternal;
|
|
13563
|
+
/** Our tracked copy of Monaco's tabFocusMode (no public getter exists). */
|
|
13564
|
+
private tabFocusOn;
|
|
13565
|
+
/** Recompute-height callback, wired once auto-height is set up. */
|
|
13566
|
+
private autoHeightUpdate;
|
|
13567
|
+
private readonly reducedMotion;
|
|
13568
|
+
constructor();
|
|
13569
|
+
/** Focus the editor. */
|
|
13570
|
+
focus(): void;
|
|
13571
|
+
/** Relayout the editor to its host size. */
|
|
13572
|
+
layout(): void;
|
|
13573
|
+
/** The live Monaco editor instance, or `null` before mount / after destroy. */
|
|
13574
|
+
getEditor(): KjEditorInstance | null;
|
|
13575
|
+
private init;
|
|
13576
|
+
/**
|
|
13577
|
+
* Size the host to the editor's content height (capped by `kjMaxHeight`),
|
|
13578
|
+
* updating whenever the content grows/shrinks. Mirrors the docs code-viewer
|
|
13579
|
+
* behaviour so a snippet fits its lines instead of needing a fixed height.
|
|
13580
|
+
*/
|
|
13581
|
+
private setupAutoHeight;
|
|
13582
|
+
private resolveOptions;
|
|
13583
|
+
/**
|
|
13584
|
+
* Force Monaco's tabFocusMode to a specific state (idempotent). `tabFocusMode`
|
|
13585
|
+
* is not a construction option — it's a context key flipped by the
|
|
13586
|
+
* `toggleTabFocusMode` command (bound to `Ctrl+M`). We track our own copy
|
|
13587
|
+
* since Monaco exposes no public getter, and only trigger the toggle when the
|
|
13588
|
+
* desired state differs from what we last applied.
|
|
13589
|
+
*/
|
|
13590
|
+
private syncTabFocus;
|
|
13591
|
+
private dispose;
|
|
13592
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjEditor, never>;
|
|
13593
|
+
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>;
|
|
13594
|
+
}
|
|
13595
|
+
|
|
13596
|
+
/**
|
|
13597
|
+
* Resolves the Monaco namespace **once** and memoises the promise, so every
|
|
13598
|
+
* `KjEditor` on the page shares a single Monaco instance.
|
|
13599
|
+
*
|
|
13600
|
+
* Resolution strategy (see {@link KjMonacoConfig}):
|
|
13601
|
+
* 1. A consumer-supplied `loader` wins — self-hosted / bundled Monaco.
|
|
13602
|
+
* 2. Otherwise dynamically `import('@monaco-editor/loader')` and `init()` it,
|
|
13603
|
+
* applying `vsPath` when provided. The dynamic import keeps both Monaco and
|
|
13604
|
+
* the loader out of the base bundle (their own lazy chunk).
|
|
13605
|
+
*
|
|
13606
|
+
* Browser-only: callers must gate `load()` behind `afterNextRender` /
|
|
13607
|
+
* `isPlatformBrowser`. Naming keeps the `Loader` suffix because `KjEditor`
|
|
13608
|
+
* already names the directive.
|
|
13609
|
+
*
|
|
13610
|
+
* @doc
|
|
13611
|
+
* @doc-name editor
|
|
13612
|
+
* @doc-description Loads and memoises Monaco for the code editor; source is configurable via provideMonaco.
|
|
13613
|
+
*/
|
|
13614
|
+
declare class KjEditorLoader {
|
|
13615
|
+
private readonly config;
|
|
13616
|
+
private readonly languageLoaders;
|
|
13617
|
+
private promise;
|
|
13618
|
+
private readonly loadedLanguages;
|
|
13619
|
+
/** Resolve Monaco (cached after the first call). */
|
|
13620
|
+
load(): Promise<KjMonaco>;
|
|
13621
|
+
/**
|
|
13622
|
+
* Ensure a language's contribution is loaded before it's used. Runs the loader
|
|
13623
|
+
* registered via {@link provideMonacoLanguages} for this id (once, memoised).
|
|
13624
|
+
* No-ops when no loader is registered — the default CDN Monaco already ships
|
|
13625
|
+
* every language, so this only does work for lean/self-hosted setups.
|
|
13626
|
+
*/
|
|
13627
|
+
ensureLanguage(language: string): Promise<void>;
|
|
13628
|
+
private loadFromCdn;
|
|
13629
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjEditorLoader, never>;
|
|
13630
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<KjEditorLoader>;
|
|
13631
|
+
}
|
|
13632
|
+
|
|
13633
|
+
/**
|
|
13634
|
+
* Configures where the code editor gets Monaco from. Provide via
|
|
13635
|
+
* {@link provideMonaco}. Left unset, the library dynamically imports
|
|
13636
|
+
* `@monaco-editor/loader` and initialises Monaco from its default CDN — no
|
|
13637
|
+
* esbuild worker wiring, and Monaco stays out of the base bundle.
|
|
13638
|
+
*/
|
|
13639
|
+
interface KjMonacoConfig {
|
|
13640
|
+
/**
|
|
13641
|
+
* Custom loader returning a ready Monaco namespace. Wins over `vsPath`.
|
|
13642
|
+
* Use this to point at a **self-hosted or bundled** Monaco instead of a CDN
|
|
13643
|
+
* (e.g. `() => import('monaco-editor')` once you've wired MonacoEnvironment
|
|
13644
|
+
* workers yourself). A library must never hard-lock consumers to a CDN.
|
|
13645
|
+
*/
|
|
13646
|
+
loader?: KjMonacoLoaderFn;
|
|
13647
|
+
/**
|
|
13648
|
+
* Override the AMD `vs` base URL used by the default `@monaco-editor/loader`
|
|
13649
|
+
* path — e.g. `'/assets/monaco/vs'` to serve Monaco from your own origin.
|
|
13650
|
+
* Ignored when `loader` is set.
|
|
13651
|
+
*/
|
|
13652
|
+
vsPath?: string;
|
|
13653
|
+
}
|
|
13654
|
+
/** DI token holding the resolved {@link KjMonacoConfig}. Defaults to `{}`. */
|
|
13655
|
+
declare const KJ_MONACO_CONFIG: InjectionToken<KjMonacoConfig>;
|
|
13656
|
+
|
|
13657
|
+
/**
|
|
13658
|
+
* Configure the Monaco source for `KjEditor` / `<kj-editor>`. Call once at the
|
|
13659
|
+
* app (or route) level. With no arguments the editor loads Monaco from the
|
|
13660
|
+
* default CDN via `@monaco-editor/loader`.
|
|
13661
|
+
*
|
|
13662
|
+
* @example
|
|
13663
|
+
* // Default CDN loader (nothing to install beyond the peer deps):
|
|
13664
|
+
* provideMonaco()
|
|
13665
|
+
*
|
|
13666
|
+
* @example
|
|
13667
|
+
* // Self-hosted Monaco assets:
|
|
13668
|
+
* provideMonaco({ vsPath: '/assets/monaco/vs' })
|
|
13669
|
+
*
|
|
13670
|
+
* @example
|
|
13671
|
+
* // Fully custom / bundled Monaco (you own the worker setup):
|
|
13672
|
+
* provideMonaco({ loader: () => import('monaco-editor') })
|
|
13673
|
+
*
|
|
13674
|
+
* @doc
|
|
13675
|
+
* @doc-name editor
|
|
13676
|
+
* @doc-order 1
|
|
13677
|
+
*/
|
|
13678
|
+
declare function provideMonaco(config?: KjMonacoConfig): EnvironmentProviders;
|
|
13679
|
+
|
|
13680
|
+
/**
|
|
13681
|
+
* Registered per-language lazy loaders, keyed by (normalised) language id.
|
|
13682
|
+
* `multi` so several `provideMonacoLanguages` calls compose; later
|
|
13683
|
+
* registrations win on key collision. Consumed by `KjEditorLoader.ensureLanguage`.
|
|
13684
|
+
*/
|
|
13685
|
+
declare const KJ_MONACO_LANGUAGE_LOADERS: InjectionToken<Record<string, KjMonacoLanguageLoader>[]>;
|
|
13686
|
+
/**
|
|
13687
|
+
* Register lazy loaders for individual Monaco languages so only the languages an
|
|
13688
|
+
* editor actually uses are downloaded, and only when first used. This keeps the
|
|
13689
|
+
* base editor lean when you bundle a **minimal** Monaco (the `provideMonaco({ loader })`
|
|
13690
|
+
* path); with the default CDN loader every language is already bundled, so
|
|
13691
|
+
* registering loaders is optional (a missing id simply falls back to the
|
|
13692
|
+
* built-in language).
|
|
13693
|
+
*
|
|
13694
|
+
* @example
|
|
13695
|
+
* provideMonacoLanguages({
|
|
13696
|
+
* python: () => import('monaco-editor/esm/vs/basic-languages/python/python.contribution'),
|
|
13697
|
+
* rust: () => import('monaco-editor/esm/vs/basic-languages/rust/rust.contribution'),
|
|
13698
|
+
* })
|
|
13699
|
+
*
|
|
13700
|
+
* @doc
|
|
13701
|
+
* @doc-name editor
|
|
13702
|
+
* @doc-order 2
|
|
13703
|
+
*/
|
|
13704
|
+
declare function provideMonacoLanguages(loaders: Record<string, KjMonacoLanguageLoader>): EnvironmentProviders;
|
|
13705
|
+
/** Map a friendly/alias language name to the canonical Monaco language id. */
|
|
13706
|
+
declare function normalizeLanguage(lang: string | undefined | null): string;
|
|
13707
|
+
|
|
11720
13708
|
/**
|
|
11721
13709
|
* Orientation of the divider rule.
|
|
11722
13710
|
*/
|
|
@@ -11900,7 +13888,7 @@ declare class KjLink {
|
|
|
11900
13888
|
* underline entirely (e.g. icon-text links inside breadcrumb separators).
|
|
11901
13889
|
* Reflects `[attr.data-underline]`.
|
|
11902
13890
|
*/
|
|
11903
|
-
readonly kjUnderline: _angular_core.InputSignal<"none" | "
|
|
13891
|
+
readonly kjUnderline: _angular_core.InputSignal<"none" | "always" | "hover">;
|
|
11904
13892
|
/**
|
|
11905
13893
|
* External-link tri-state. `undefined` (default) auto-detects from the
|
|
11906
13894
|
* host's `target` attribute (`target="_blank"` → external). `true` forces
|
|
@@ -11969,6 +13957,71 @@ declare const KJ_LINK_CONFIG: InjectionToken<KjLinkConfig>;
|
|
|
11969
13957
|
*/
|
|
11970
13958
|
declare function provideKjLink(config: Partial<KjLinkConfig>): Provider[];
|
|
11971
13959
|
|
|
13960
|
+
/**
|
|
13961
|
+
* Headless "skip to content" link. Turns a native `<a>` into a
|
|
13962
|
+
* [WCAG 2.4.1 Bypass Blocks](https://www.w3.org/TR/WCAG21/#bypass-blocks)
|
|
13963
|
+
* mechanism: a fragment link that, when activated, moves **keyboard focus** to
|
|
13964
|
+
* the page's main-content landmark — not merely the scroll position.
|
|
13965
|
+
*
|
|
13966
|
+
* Owns the two behaviours a CSS-only skip link cannot deliver:
|
|
13967
|
+
*
|
|
13968
|
+
* 1. **Fragment `href`.** `[attr.href]` reflects `#<target-id>`, so the element
|
|
13969
|
+
* is a real anchor (role=link, Enter activates) and carries the id in the
|
|
13970
|
+
* SSR-prerendered HTML.
|
|
13971
|
+
* 2. **Deterministic focus move.** On `click` (which Enter also fires on an
|
|
13972
|
+
* anchor) the directive `preventDefault()`s the navigation, looks the target
|
|
13973
|
+
* up by id, makes it programmatically focusable via `tabindex="-1"` when it
|
|
13974
|
+
* has no `tabindex`, and calls `focus()` (which also scrolls it into view).
|
|
13975
|
+
*
|
|
13976
|
+
* `preventDefault()` is required, not optional: under a `<base href="/">`
|
|
13977
|
+
* (the norm for Angular SPAs) a fragment-only reference like `#main-content`
|
|
13978
|
+
* resolves against the **base URL**, not the current document — so the native
|
|
13979
|
+
* click would navigate to `/#main-content` (the root route), swapping the
|
|
13980
|
+
* page out and discarding focus. Moving focus programmatically is both the
|
|
13981
|
+
* correct behaviour and immune to that gotcha.
|
|
13982
|
+
*
|
|
13983
|
+
* Styling (visually-hidden-until-focused) is a component-layer concern; see
|
|
13984
|
+
* `KjSkipLinkComponent` in `@kouji-ui/components`.
|
|
13985
|
+
*
|
|
13986
|
+
* @example
|
|
13987
|
+
* ```html
|
|
13988
|
+
* <a kjSkipLink>Skip to main content</a>
|
|
13989
|
+
* <main id="main-content" tabindex="-1">…</main>
|
|
13990
|
+
* ```
|
|
13991
|
+
* @example
|
|
13992
|
+
* ```html
|
|
13993
|
+
* <a kjSkipLink="page-body">Skip to content</a>
|
|
13994
|
+
* <section id="page-body" tabindex="-1">…</section>
|
|
13995
|
+
* ```
|
|
13996
|
+
*
|
|
13997
|
+
* @doc-category Core/Navigation
|
|
13998
|
+
* @doc
|
|
13999
|
+
* @doc-name skip-link
|
|
14000
|
+
* @doc-description Turns a native anchor into a focus-moving "skip to content" bypass link.
|
|
14001
|
+
* @doc-is-main
|
|
14002
|
+
*/
|
|
14003
|
+
declare class KjSkipLink {
|
|
14004
|
+
private readonly document;
|
|
14005
|
+
/**
|
|
14006
|
+
* `id` of the element to move focus to. Aliased to the selector attribute so
|
|
14007
|
+
* `<a kjSkipLink="page-body">` sets it directly. Defaults to `'main-content'`.
|
|
14008
|
+
*
|
|
14009
|
+
* The `transform` maps an empty value to the default: a bare `<a kjSkipLink>`
|
|
14010
|
+
* binds the attribute as `''` (the selector attribute is present but valueless),
|
|
14011
|
+
* which would otherwise shadow the initial value.
|
|
14012
|
+
*/
|
|
14013
|
+
readonly kjSkipLink: _angular_core.InputSignalWithTransform<string, string | undefined>;
|
|
14014
|
+
/**
|
|
14015
|
+
* Moves keyboard focus to the target landmark. Suppresses the anchor's native
|
|
14016
|
+
* navigation (see class docs — it is base-relative and would leave the page),
|
|
14017
|
+
* then adds `tabindex="-1"` when the target is not already focusable so
|
|
14018
|
+
* `focus()` succeeds while keeping it out of the sequential tab order.
|
|
14019
|
+
*/
|
|
14020
|
+
protected onActivate(event: Event): void;
|
|
14021
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KjSkipLink, never>;
|
|
14022
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KjSkipLink, "a[kjSkipLink]", never, { "kjSkipLink": { "alias": "kjSkipLink"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
14023
|
+
}
|
|
14024
|
+
|
|
11972
14025
|
/** Public-facing token interface representing a registered crumb item. */
|
|
11973
14026
|
interface KjBreadcrumbItemContext {
|
|
11974
14027
|
/** Index of the item among registered items (0-based, document order). */
|
|
@@ -13548,5 +15601,5 @@ declare const KJ_ALERT_CONFIG: InjectionToken<KjAlertConfig>;
|
|
|
13548
15601
|
*/
|
|
13549
15602
|
declare function provideKjAlert(config: Partial<KjAlertConfig>): Provider[];
|
|
13550
15603
|
|
|
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 };
|
|
15604
|
+
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, kjApplyServerErrors, kjColumn, kjColumnGroup, kjContainsFilter, kjDateFilterFn, kjFileMatchesAccept, kjFuzzyFilter, kjHsvToHsl, kjHsvToRgb, kjMultiFilterFn, kjNumberFilterFn, kjParseHex, kjRgbToHex, kjRgbToHsv, kjServerErrorsOf, 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 };
|
|
15605
|
+
export type { CompiledMask, DeepSignal, IconLoader, IconMode, IconResolver, InvalidControlInfo, KjAccordionContext, KjAccordionItemContext, KjAccordionType, KjActiveOverlay, KjAggregation, KjAggregationFn, KjAggregationKind, KjAlertConfig, KjAlertContext, KjAlertMode, KjAlign, KjAnchoredToOpts, KjAnchoredToStrategy, KjApplyServerErrorsOptions, 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, KjServerErrors, 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 };
|