@atelier-ui/angular 0.0.25 → 0.0.27

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atelier-ui/angular",
3
- "version": "0.0.25",
3
+ "version": "0.0.27",
4
4
  "description": "Atelier UI component library for Angular — LLM-optimised, accessible, design-token-driven",
5
5
  "keywords": [
6
6
  "angular",
@@ -16,13 +16,16 @@ import * as i1$1 from '@angular/cdk/menu';
16
16
  * Angular: use the union types as `input<T>()` type parameters.
17
17
  * React: extend the spec interface from the framework-specific props interface.
18
18
  */
19
- type LlmButtonVariant = 'primary' | 'secondary' | 'outline';
19
+ type LlmButtonVariant = 'primary' | 'secondary' | 'outline' | 'danger';
20
20
  type LlmButtonSize = 'sm' | 'md' | 'lg';
21
21
  interface LlmComboboxOption {
22
22
  value: string;
23
23
  label: string;
24
24
  disabled?: boolean;
25
25
  }
26
+ type LlmChatVariant = 'drawer' | 'popup' | 'inline';
27
+ type LlmChatStatus = 'idle' | 'streaming' | 'error';
28
+ type LlmChatMessageRole = 'user' | 'assistant' | 'system';
26
29
 
27
30
  /**
28
31
  * Accessible button component with visual variants and sizes.
@@ -114,7 +117,7 @@ declare class LlmCardFooter {
114
117
 
115
118
  declare class LlmBadge {
116
119
  /** Semantic color variant of the badge. */
117
- readonly variant: _angular_core.InputSignal<"default" | "success" | "warning" | "danger" | "info">;
120
+ readonly variant: _angular_core.InputSignal<"danger" | "default" | "success" | "warning" | "info">;
118
121
  /** Size of the badge. */
119
122
  readonly size: _angular_core.InputSignal<"sm" | "md">;
120
123
  protected readonly hostClasses: _angular_core.Signal<string>;
@@ -412,7 +415,7 @@ declare class LlmToggle implements FormCheckboxControl {
412
415
 
413
416
  declare class LlmAlert {
414
417
  /** Semantic color variant of the alert. */
415
- readonly variant: _angular_core.InputSignal<"success" | "warning" | "danger" | "info">;
418
+ readonly variant: _angular_core.InputSignal<"danger" | "success" | "warning" | "info">;
416
419
  /** Whether to show a dismiss button. */
417
420
  readonly dismissible: _angular_core.InputSignal<boolean>;
418
421
  /** Emitted when the dismiss button is clicked. */
@@ -1196,7 +1199,7 @@ declare class LlmProgress {
1196
1199
  /** Maximum value. */
1197
1200
  readonly max: _angular_core.InputSignal<number>;
1198
1201
  /** Semantic color variant. */
1199
- readonly variant: _angular_core.InputSignal<"default" | "success" | "warning" | "danger">;
1202
+ readonly variant: _angular_core.InputSignal<"danger" | "default" | "success" | "warning">;
1200
1203
  /** Height size of the track. */
1201
1204
  readonly size: _angular_core.InputSignal<"sm" | "md" | "lg">;
1202
1205
  /** Shows an animated indeterminate state (loading). */
@@ -1644,5 +1647,155 @@ declare class LlmCodeBlock {
1644
1647
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<LlmCodeBlock, "llm-code-block", never, { "code": { "alias": "code"; "required": false; "isSignal": true; }; "language": { "alias": "language"; "required": false; "isSignal": true; }; "filename": { "alias": "filename"; "required": false; "isSignal": true; }; "copyable": { "alias": "copyable"; "required": false; "isSignal": true; }; "showLineNumbers": { "alias": "showLineNumbers"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1645
1648
  }
1646
1649
 
1647
- export { LLM_ACCORDION_GROUP, LLM_BREADCRUMBS, LLM_DIALOG, LLM_DRAWER, LLM_RADIO_GROUP, LLM_SELECT, LLM_STEPPER, LLM_TABLE, LLM_TAB_GROUP, LlmAccordionGroup, LlmAccordionHeader, LlmAccordionItem, LlmAlert, LlmAvatar, LlmAvatarGroup, LlmBadge, LlmBreadcrumbItem, LlmBreadcrumbs, LlmButton, LlmCard, LlmCardContent, LlmCardFooter, LlmCardHeader, LlmCheckbox, LlmCodeBlock, LlmCombobox, LlmDialog, LlmDialogContent, LlmDialogFooter, LlmDialogHeader, LlmDrawer, LlmDrawerContent, LlmDrawerFooter, LlmDrawerHeader, LlmInput, LlmMenu, LlmMenuItem, LlmMenuSeparator, LlmMenuTrigger, LlmOption, LlmPagination, LlmProgress, LlmRadio, LlmRadioGroup, LlmSelect, LlmSkeleton, LlmStep, LlmStepper, LlmTab, LlmTabGroup, LlmTable, LlmTbody, LlmTd, LlmTextarea, LlmTh, LlmThead, LlmToast, LlmToastContainer, LlmToastService, LlmToggle, LlmTooltip, LlmTr };
1648
- export type { LlmAccordionGroupContext, LlmBreadcrumbsContext, LlmDialogContext, LlmDrawerContext, LlmRadioGroupContext, LlmSelectContext, LlmSortDirection, LlmStepperContext, LlmTabGroupContext, LlmTableContext, PageItem, StepInfo, TabInfo, ToastData, ToastOptions };
1650
+ /**
1651
+ * AI assistant surface. Three layout variants share the same content slots
1652
+ * and can be swapped without changing the children.
1653
+ *
1654
+ * Variants:
1655
+ * - `drawer`: Right-anchored slide-in panel, full viewport height.
1656
+ * - `popup`: Floating bubble (bottom-right) + compact chat window.
1657
+ * - `inline`: Embedded card, sits inline with page content.
1658
+ *
1659
+ * Compose with `llm-chat-header`, `llm-chat-messages`, `llm-chat-input`.
1660
+ *
1661
+ * Usage:
1662
+ * ```html
1663
+ * <llm-chat variant="drawer" [(open)]="isOpen" status="idle">
1664
+ * <llm-chat-header>AI Assistant</llm-chat-header>
1665
+ * <llm-chat-messages>
1666
+ * <llm-chat-message role="assistant">Hi! How can I help?</llm-chat-message>
1667
+ * <llm-chat-message role="user">Show me a sorting function.</llm-chat-message>
1668
+ * </llm-chat-messages>
1669
+ * <llm-chat-input placeholder="Ask anything…" (send)="onSend($event)" />
1670
+ * </llm-chat>
1671
+ * ```
1672
+ */
1673
+ declare class LlmChat {
1674
+ /** Layout variant. */
1675
+ readonly variant: _angular_core.InputSignal<LlmChatVariant>;
1676
+ /** Whether the chat is open. Used by drawer/popup; ignored by inline. Two-way bindable via [(open)]. */
1677
+ readonly open: _angular_core.ModelSignal<boolean>;
1678
+ /** Connection / response status. Drives badge color in header and disables input while streaming. */
1679
+ readonly status: _angular_core.InputSignal<LlmChatStatus>;
1680
+ /** @internal — referenced by LlmChatHeader via LLM_CHAT token for aria-labelledby. */
1681
+ readonly headerId: string;
1682
+ protected readonly dialogRef: _angular_core.Signal<ElementRef<HTMLDialogElement> | undefined>;
1683
+ private readonly triggerEl;
1684
+ protected readonly hostClasses: _angular_core.Signal<string>;
1685
+ constructor();
1686
+ protected onCancel(event: Event): void;
1687
+ protected onBackdropClick(event: MouseEvent): void;
1688
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<LlmChat, never>;
1689
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<LlmChat, "llm-chat", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; }, { "open": "openChange"; }, never, ["*"], true, never>;
1690
+ }
1691
+ /**
1692
+ * Header slot for `llm-chat`. Holds the title, status indicator, and close button.
1693
+ * Children are projected into the title area; the close button is rendered automatically.
1694
+ */
1695
+ declare class LlmChatHeader {
1696
+ protected readonly context: _atelier_ui_angular.LlmChatContext;
1697
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<LlmChatHeader, never>;
1698
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<LlmChatHeader, "llm-chat-header", never, {}, {}, never, ["*"], true, never>;
1699
+ }
1700
+ /**
1701
+ * Scrollable message list for `llm-chat`. Project `llm-chat-message`,
1702
+ * `llm-chat-typing`, or `llm-chat-suggestion` children inside.
1703
+ */
1704
+ declare class LlmChatMessages {
1705
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<LlmChatMessages, never>;
1706
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<LlmChatMessages, "llm-chat-messages", never, {}, {}, never, ["*"], true, never>;
1707
+ }
1708
+ /**
1709
+ * A single chat message. Role drives bubble alignment and color.
1710
+ *
1711
+ * Usage:
1712
+ * ```html
1713
+ * <llm-chat-message role="assistant">Sure, here you go.</llm-chat-message>
1714
+ * <llm-chat-message role="user">Thanks!</llm-chat-message>
1715
+ * <llm-chat-message role="assistant" [failed]="true">Couldn't reach the assistant.</llm-chat-message>
1716
+ * ```
1717
+ */
1718
+ declare class LlmChatMessage {
1719
+ /** Sender of the message. Drives bubble alignment and color. */
1720
+ readonly role: _angular_core.InputSignal<LlmChatMessageRole>;
1721
+ /** Marks the message as failed (red dashed border, used in error state). */
1722
+ readonly failed: _angular_core.InputSignal<boolean>;
1723
+ protected readonly hostClasses: _angular_core.Signal<string>;
1724
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<LlmChatMessage, never>;
1725
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<LlmChatMessage, "llm-chat-message", never, { "role": { "alias": "role"; "required": false; "isSignal": true; }; "failed": { "alias": "failed"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
1726
+ }
1727
+ /**
1728
+ * Typing indicator (three animated dots). Render at the end of the message
1729
+ * list while the assistant is streaming a response.
1730
+ */
1731
+ declare class LlmChatTyping {
1732
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<LlmChatTyping, never>;
1733
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<LlmChatTyping, "llm-chat-typing", never, {}, {}, never, never, true, never>;
1734
+ }
1735
+ /**
1736
+ * Tappable suggestion chip used in the empty state to seed a conversation.
1737
+ *
1738
+ * Usage:
1739
+ * ```html
1740
+ * <llm-chat-suggestion label="Explain a code snippet" hint="Tap to start →" (selected)="prompt.set($event)" />
1741
+ * ```
1742
+ */
1743
+ declare class LlmChatSuggestion {
1744
+ /** Primary label of the suggestion. */
1745
+ readonly label: _angular_core.InputSignal<string>;
1746
+ /** Optional secondary hint text shown below the label. */
1747
+ readonly hint: _angular_core.InputSignal<string>;
1748
+ /** Fires the label string when the chip is activated. */
1749
+ readonly selected: _angular_core.OutputEmitterRef<string>;
1750
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<LlmChatSuggestion, never>;
1751
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<LlmChatSuggestion, "llm-chat-suggestion", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; }, { "selected": "selected"; }, never, never, true, never>;
1752
+ }
1753
+ /**
1754
+ * Composable input footer for `llm-chat`. Wraps a text field and emits
1755
+ * `send` (or `stop` while the assistant is streaming).
1756
+ *
1757
+ * The button automatically switches to a `danger` "Stop" button when the
1758
+ * parent chat's `status` is `'streaming'`.
1759
+ *
1760
+ * Usage:
1761
+ * ```html
1762
+ * <llm-chat-input placeholder="Ask anything…" (send)="onSend($event)" (stop)="onStop()" />
1763
+ * ```
1764
+ */
1765
+ declare class LlmChatInput {
1766
+ /** Placeholder shown in the empty input. Defaults change per parent status. */
1767
+ readonly placeholder: _angular_core.InputSignal<string>;
1768
+ /** Accessible label for the input field. */
1769
+ readonly ariaLabel: _angular_core.InputSignal<string>;
1770
+ /** Two-way bindable text content. */
1771
+ readonly value: _angular_core.ModelSignal<string>;
1772
+ /** Fires when Enter is pressed (without Shift) or the Send button is clicked. */
1773
+ readonly send: _angular_core.OutputEmitterRef<string>;
1774
+ /** Fires when the Stop button is clicked while the parent chat is streaming. */
1775
+ readonly stop: _angular_core.OutputEmitterRef<void>;
1776
+ protected readonly context: _atelier_ui_angular.LlmChatContext;
1777
+ protected readonly isStreaming: _angular_core.Signal<boolean>;
1778
+ protected readonly effectivePlaceholder: _angular_core.Signal<string>;
1779
+ protected onInput(event: Event): void;
1780
+ protected onEnter(event: Event): void;
1781
+ protected emitSend(): void;
1782
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<LlmChatInput, never>;
1783
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<LlmChatInput, "llm-chat-input", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "send": "send"; "stop": "stop"; }, never, never, true, never>;
1784
+ }
1785
+
1786
+ /**
1787
+ * Context token used by `llm-chat` sub-components (header, input) to
1788
+ * read parent state and dispatch close/toggle actions without a direct
1789
+ * component reference.
1790
+ */
1791
+ interface LlmChatContext {
1792
+ readonly headerId: string;
1793
+ readonly variant: Signal<LlmChatVariant>;
1794
+ readonly status: Signal<LlmChatStatus>;
1795
+ close(): void;
1796
+ toggle(): void;
1797
+ }
1798
+ declare const LLM_CHAT: InjectionToken<LlmChatContext>;
1799
+
1800
+ export { LLM_ACCORDION_GROUP, LLM_BREADCRUMBS, LLM_CHAT, LLM_DIALOG, LLM_DRAWER, LLM_RADIO_GROUP, LLM_SELECT, LLM_STEPPER, LLM_TABLE, LLM_TAB_GROUP, LlmAccordionGroup, LlmAccordionHeader, LlmAccordionItem, LlmAlert, LlmAvatar, LlmAvatarGroup, LlmBadge, LlmBreadcrumbItem, LlmBreadcrumbs, LlmButton, LlmCard, LlmCardContent, LlmCardFooter, LlmCardHeader, LlmChat, LlmChatHeader, LlmChatInput, LlmChatMessage, LlmChatMessages, LlmChatSuggestion, LlmChatTyping, LlmCheckbox, LlmCodeBlock, LlmCombobox, LlmDialog, LlmDialogContent, LlmDialogFooter, LlmDialogHeader, LlmDrawer, LlmDrawerContent, LlmDrawerFooter, LlmDrawerHeader, LlmInput, LlmMenu, LlmMenuItem, LlmMenuSeparator, LlmMenuTrigger, LlmOption, LlmPagination, LlmProgress, LlmRadio, LlmRadioGroup, LlmSelect, LlmSkeleton, LlmStep, LlmStepper, LlmTab, LlmTabGroup, LlmTable, LlmTbody, LlmTd, LlmTextarea, LlmTh, LlmThead, LlmToast, LlmToastContainer, LlmToastService, LlmToggle, LlmTooltip, LlmTr };
1801
+ export type { LlmAccordionGroupContext, LlmBreadcrumbsContext, LlmChatContext, LlmDialogContext, LlmDrawerContext, LlmRadioGroupContext, LlmSelectContext, LlmSortDirection, LlmStepperContext, LlmTabGroupContext, LlmTableContext, PageItem, StepInfo, TabInfo, ToastData, ToastOptions };