ngx-strata 0.6.1 → 0.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-strata",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "description": "A simple UI framework for quickly prototyping angular applications with a bit of flair.",
5
5
  "license": "MIT",
6
6
  "peerDependencies": {
@@ -99,6 +99,8 @@ for each component are stored in separate files.
99
99
  - **Button** (`[stButton]`): Read [`components/button.md`](components/button.md)
100
100
  - **Calendar** (`st-calendar`): Read [`components/calendar.md`](components/calendar.md)
101
101
  - **Card** (`st-card`): Read [`components/card.md`](components/card.md)
102
+ - **Chat** (`st-chat`, `st-chat-message`, `st-chat-group`, `st-chat-separator`, `st-chat-typing`): Read
103
+ [`components/chat.md`](components/chat.md)
102
104
  - **Checkbox** (`st-checkbox`): Read
103
105
  [`components/checkbox.md`](components/checkbox.md)
104
106
  - **Datepicker** (`st-datepicker`): Read [`components/datepicker.md`](components/datepicker.md)
@@ -0,0 +1,100 @@
1
+ # ngx-strata: chat Feature
2
+
3
+ This file contains the AI documentation for the `chat` feature suite and its components.
4
+
5
+ ## Chat (`<st-chat>`)
6
+ Flex container providing message flow direction and spacing scale.
7
+
8
+ - **Selector**: `st-chat`
9
+ - **Imports**: `StrataChatComponent`
10
+ - **Inputs**:
11
+ - `[spacing] (ChatSpacing)`: `'comfortable' | 'compact'` (default: `'comfortable'`)
12
+
13
+ ## Chat Message (`<st-chat-message>`)
14
+ Individual message bubble supporting sender variants, timestamps, status ticks, and media attachments.
15
+
16
+ - **Selector**: `st-chat-message`
17
+ - **Imports**: `StrataChatMessageComponent`
18
+ - **Inputs**:
19
+ - `[variant] (ChatMessageVariant)`: `'incoming' | 'outgoing'` (default: `'incoming'`)
20
+ - `[timestamp] (string | null)`: Timestamp text displayed below message (default: `null`)
21
+ - `[status] (ChatMessageStatus | null)`: Status indicator for outgoing messages: `'sent' | 'delivered' | 'read'` (default: `null`)
22
+ - `[showAvatar] (boolean)`: Whether projected avatar is visible. Supports boolean attribute (default: `true`)
23
+ - `[position] ('single' | 'first' | 'middle' | 'last')`: Positional curvature. Automatically handled inside `st-chat-group` (default: `'single'`)
24
+ - **Content Slots**:
25
+ - Default: Text body of the message
26
+ - `[slot="avatar"]`: User avatar element (`<st-avatar>`)
27
+ - `[slot="media"]`: Image or media preview element (`<img>`, `<video>`)
28
+ - `[slot="footer"]`: Custom footer overriding default timestamp/status layout
29
+
30
+ ## Chat Group (`<st-chat-group>`)
31
+ Groups consecutive messages from the same sender, collapsing adjacent border radii and showing the avatar only on the final message.
32
+
33
+ - **Selector**: `st-chat-group`
34
+ - **Imports**: `StrataChatGroupComponent`
35
+ - **Inputs**:
36
+ - `[variant] (ChatMessageVariant)`: `'incoming' | 'outgoing'` (default: `'incoming'`)
37
+
38
+ ## Chat Separator (`<st-chat-separator>`)
39
+ Decorative divider for date marks and system status messages.
40
+
41
+ - **Selector**: `st-chat-separator`
42
+ - **Imports**: `StrataChatSeparatorComponent`
43
+ - **Content Slots**:
44
+ - Default: Centered label (e.g. date or system message)
45
+
46
+ ## Chat Typing Indicator (`<st-chat-typing>`)
47
+ Animated three-dot bubble indicator representing active typing.
48
+
49
+ - **Selector**: `st-chat-typing`
50
+ - **Imports**: `StrataChatTypingComponent`
51
+ - **Inputs**:
52
+ - `[variant] (ChatMessageVariant)`: `'incoming' | 'outgoing'` (default: `'incoming'`)
53
+ - `[ariaLabel] (string)`: Accessible label for screen readers (default: `'Typing'`)
54
+ - **Content Slots**:
55
+ - `[slot="avatar"]`: Optional avatar element (`<st-avatar>`)
56
+
57
+ ---
58
+
59
+ ## Usage Examples
60
+
61
+ ### Basic Conversation
62
+ ```html
63
+ <st-chat spacing="comfortable">
64
+ <st-chat-separator>Today</st-chat-separator>
65
+
66
+ <st-chat-message variant="incoming" timestamp="10:14">
67
+ <st-avatar slot="avatar" size="sm" text="JD" />
68
+ Hi, is the report ready?
69
+ </st-chat-message>
70
+
71
+ <st-chat-message variant="outgoing" timestamp="10:15" status="read">
72
+ Yes, just sending it over now!
73
+ </st-chat-message>
74
+ </st-chat>
75
+ ```
76
+
77
+ ### Grouped Messages
78
+ ```html
79
+ <st-chat>
80
+ <st-chat-group variant="incoming">
81
+ <st-chat-message timestamp="14:20">First point</st-chat-message>
82
+ <st-chat-message timestamp="14:20">Second point</st-chat-message>
83
+ <st-chat-message timestamp="14:21">
84
+ <st-avatar slot="avatar" size="sm" text="AL" />
85
+ Final point with avatar
86
+ </st-chat-message>
87
+ </st-chat-group>
88
+ </st-chat>
89
+ ```
90
+
91
+ ### Media Attachment
92
+ ```html
93
+ <st-chat>
94
+ <st-chat-message variant="incoming" timestamp="16:00">
95
+ <st-avatar slot="avatar" size="sm" text="AL" />
96
+ <img slot="media" src="/path/to/image.png" alt="Screenshot" />
97
+ Here is the requested screenshot.
98
+ </st-chat-message>
99
+ </st-chat>
100
+ ```
@@ -21,6 +21,6 @@ This file contains the AI documentation for the `icon` feature and its related c
21
21
  ```
22
22
 
23
23
  > **CRITICAL RULE FOR AI AGENTS regarding Icons:**
24
- > NEVER guess an icon name. Before using an `<st-icon>`, you MUST verify that the icon is registered in the host application (usually located in `src/app/shared/icon.config.ts`). Alternatively, you may use one of the **ngx-strata Base Icons**: <!-- BASE_ICONS_START -->`question`, `arrow-right`, `arrow-left`, `arrow-up`, `arrow-down`, `close`, `expand-up-down`, `clipboard`, `more`, `check`, `calendar`, `clock`, `upload`, `camera`, or `image`<!-- BASE_ICONS_END -->. If the icon you want to use is NOT registered, you must STOP and ask the user to add it.
24
+ > NEVER guess an icon name. Before using an `<st-icon>`, you MUST verify that the icon is registered in the host application (usually located in `src/app/shared/icon.config.ts`). Alternatively, you may use one of the **ngx-strata Base Icons**: <!-- BASE_ICONS_START -->`question`, `arrow-right`, `arrow-left`, `arrow-up`, `arrow-down`, `close`, `expand-up-down`, `clipboard`, `more`, `check`, `calendar`, `clock`, `upload`, `camera`, `image`, `check-single`, or `check-double`<!-- BASE_ICONS_END -->. If the icon you want to use is NOT registered, you must STOP and ask the user to add it.
25
25
 
26
26
  > **Note to AI Agents**: Prioritize using these components over raw HTML equivalents. Use modern Angular Signals (input(), input.required(), and output()) for all data/event bindings. Do not use legacy @Input() or @Output() decorators.
@@ -473,6 +473,58 @@ declare class StrataCheckboxComponent implements ControlValueAccessor {
473
473
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrataCheckboxComponent, "st-checkbox", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "colorMessage": { "alias": "colorMessage"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
474
474
  }
475
475
 
476
+ type ChatMessageVariant = 'incoming' | 'outgoing';
477
+ type ChatMessageStatus = 'sent' | 'delivered' | 'read';
478
+ type ChatSpacing = 'compact' | 'comfortable';
479
+
480
+ declare class StrataChatComponent {
481
+ spacing: _angular_core.InputSignal<ChatSpacing>;
482
+ hostClasses: _angular_core.Signal<string>;
483
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrataChatComponent, never>;
484
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrataChatComponent, "st-chat", never, { "spacing": { "alias": "spacing"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
485
+ }
486
+
487
+ declare class StrataChatMessageComponent {
488
+ variant: _angular_core.InputSignal<ChatMessageVariant>;
489
+ timestamp: _angular_core.InputSignal<string | null>;
490
+ status: _angular_core.InputSignal<ChatMessageStatus | null>;
491
+ showAvatar: _angular_core.InputSignalWithTransform<boolean, unknown>;
492
+ position: _angular_core.InputSignal<"single" | "first" | "middle" | "last">;
493
+ groupVariant: _angular_core.WritableSignal<ChatMessageVariant | null>;
494
+ groupPosition: _angular_core.WritableSignal<"single" | "first" | "middle" | "last" | null>;
495
+ groupShowAvatar: _angular_core.WritableSignal<boolean | null>;
496
+ groupPreserveAvatarSpace: _angular_core.WritableSignal<boolean>;
497
+ effectiveVariant: _angular_core.Signal<ChatMessageVariant>;
498
+ effectivePosition: _angular_core.Signal<"single" | "first" | "middle" | "last">;
499
+ effectiveShowAvatar: _angular_core.Signal<boolean>;
500
+ hostClasses: _angular_core.Signal<string>;
501
+ setGroupConfig(variant: ChatMessageVariant, position: 'single' | 'first' | 'middle' | 'last', showAvatar: boolean, preserveAvatarSpace: boolean): void;
502
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrataChatMessageComponent, never>;
503
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrataChatMessageComponent, "st-chat-message", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "timestamp": { "alias": "timestamp"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; "showAvatar": { "alias": "showAvatar"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; }, {}, never, ["[slot=avatar]", "[slot=media]", "*", "[slot=footer]", "[slot=avatar]"], true, never>;
504
+ }
505
+
506
+ declare class StrataChatGroupComponent {
507
+ variant: _angular_core.InputSignal<ChatMessageVariant>;
508
+ messages: _angular_core.Signal<readonly StrataChatMessageComponent[]>;
509
+ hostClasses: _angular_core.Signal<string>;
510
+ constructor();
511
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrataChatGroupComponent, never>;
512
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrataChatGroupComponent, "st-chat-group", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; }, {}, ["messages"], ["*"], true, never>;
513
+ }
514
+
515
+ declare class StrataChatSeparatorComponent {
516
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrataChatSeparatorComponent, never>;
517
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrataChatSeparatorComponent, "st-chat-separator", never, {}, {}, never, ["*"], true, never>;
518
+ }
519
+
520
+ declare class StrataChatTypingComponent {
521
+ variant: _angular_core.InputSignal<ChatMessageVariant>;
522
+ ariaLabel: _angular_core.InputSignal<string>;
523
+ hostClasses: _angular_core.Signal<string>;
524
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrataChatTypingComponent, never>;
525
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrataChatTypingComponent, "st-chat-typing", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, ["[slot=avatar]", "[slot=avatar]"], true, never>;
526
+ }
527
+
476
528
  type CalendarSize = 'sm' | 'md';
477
529
  type DatePickerSize = 'sm' | 'md' | 'lg';
478
530
  type CalendarMode = 'single' | 'range';
@@ -1909,5 +1961,5 @@ declare class StrataToggleComponent implements ControlValueAccessor {
1909
1961
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrataToggleComponent, "st-toggle", never, { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "colorMessage": { "alias": "colorMessage"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; }, never, ["*"], true, [{ directive: typeof StrataActivatableDirective; inputs: { "disabled": "disabled"; }; outputs: { "activated": "activated"; }; }]>;
1910
1962
  }
1911
1963
 
1912
- export { BreakpointService, CapitalizePipe, DEFAULT_DATE_RANGE_PRESETS, DEFAULT_DURATION, DEFAULT_THEME, DarkmodeService, DeviceService, HotkeyService, HttpIconLoader, IconLoader, IconRegistry, IconRegistryService, ModalService, NotificationService, STRATA_CONFIG, StrataAccordionGroupComponent, StrataAccordionItemComponent, StrataActionMenuComponent, StrataActionMenuItemComponent, StrataActivatableDirective, StrataAlertComponent, StrataAlertContentComponent, StrataAutoResizeDirective, StrataAvatarComponent, StrataAvatarStackComponent, StrataBadgeComponent, StrataBreadcrumbComponent, StrataBreadcrumbItemComponent, StrataButtonDirective, StrataButtonGroupComponent, StrataCalendarComponent, StrataCardComponent, StrataCheckboxComponent, StrataContextMenuDirective, StrataDatePickerComponent, StrataDateRangePickerComponent, StrataDividerComponent, StrataFileUploadComponent, StrataIconComponent, StrataImageCropperComponent, StrataInputFieldComponent, StrataItemComponent, StrataItemListComponent, StrataKbdComponent, StrataMessageStateComponent, StrataModalBodyComponent, StrataModalComponent, StrataModalContainerComponent, StrataModalFooterComponent, StrataModalHeaderComponent, StrataModalRef, StrataNativeInputRefDirective, StrataNotificationComponent, StrataNotificationContainerComponent, StrataNumberDisplayComponent, StrataNumberStepperComponent, StrataOtpComponent, StrataOverlayDirective, StrataPaginationComponent, StrataProgressLinearComponent, StrataProgressRadialComponent, StrataRadioComponent, StrataRadioGroupComponent, StrataSegmentedControlComponent, StrataSegmentedControlItemComponent, StrataSelectItemComponent, StrataSelectTriggerDirective, StrataShellComponent, StrataSidemenuComponent, StrataSidemenuItemDirective, StrataSidemenuItemGroupComponent, StrataSidemenuSectionComponent, StrataSingleSelectComponent, StrataSkeletonComponent, StrataSliderComponent, StrataSpinnerComponent, StrataStepComponent, StrataStepperComponent, StrataTabItemComponent, StrataTabsComponent, StrataTagComponent, StrataTextStackComponent, StrataThemeDirective, StrataTimeStepperComponent, StrataTimepickerComponent, StrataToggleComponent, StrataTooltipDirective, addDays, addMonths, addYears, createCalendarGrid, disableDateRange, disableDaysOfWeek, disableFutureDates, disablePastDates, disableWeekends, endOfDay, endOfMonth, formatDate, formatMonthTitle, getDayOfWeek, getDaysInMonth, getDefaultShortcutLabels, getLocaleDefaultDateFormat, getMonthNames, getWeekdayNames, isAfterDay, isApplePlatform, isBeforeDay, isSameDay, isSameMonth, isSameYear, isWeekend, isWithinDayRange, parseDate, provideBaseIcons, provideIcons, provideStrata, resolveIsApple, startOfDay, startOfMonth };
1913
- export type { AccordionVariant, AlertConfiguration, AvatarSize, AvatarStackSpacing, AvatarVariant, BadgePlacement, BadgeSize, BadgeVariant, ButtonGroupJustification, ButtonSize, ButtonVariant, CalendarDayCell, CalendarMode, CalendarSize, CalendarView, CardVariant, CropPosition, CropResult, CropShape, CurrentDarkmode, DarkmodeSetting, DatePickerSize, DateRange, DateRangePreset, HotkeyOptions, IconConfig, IconSize, InputControlState, InputFieldSize, ModalConfiguration, ModalFooterJustification, ModalPlacement, ModalSize, ModalVariant, NotificationAction, NotificationConfiguration, NotificationsWithIds, NumberStepperLayout, NumberStepperSize, OtpSize, OtpState, OtpType, PaginationItem, ProgressLinearGrowDirection, ProgressLinearLabelFormat, ProgressRadialLabelFormat, SegmentedControlSize, SingleSelectSize, SkeletonAnimation, SkeletonSize, SkeletonVariant, SpinnerSize, StepState, StepperOrientation, StepperSize, StepperTheme, StrataBreakpoint, StrataConfig, StrataNotificationRef, StrataOS, StrataPlatform, TagSize, TextStackOverflow, Theme, TimeFormat, TimePrecision, TooltipPlacement };
1964
+ export { BreakpointService, CapitalizePipe, DEFAULT_DATE_RANGE_PRESETS, DEFAULT_DURATION, DEFAULT_THEME, DarkmodeService, DeviceService, HotkeyService, HttpIconLoader, IconLoader, IconRegistry, IconRegistryService, ModalService, NotificationService, STRATA_CONFIG, StrataAccordionGroupComponent, StrataAccordionItemComponent, StrataActionMenuComponent, StrataActionMenuItemComponent, StrataActivatableDirective, StrataAlertComponent, StrataAlertContentComponent, StrataAutoResizeDirective, StrataAvatarComponent, StrataAvatarStackComponent, StrataBadgeComponent, StrataBreadcrumbComponent, StrataBreadcrumbItemComponent, StrataButtonDirective, StrataButtonGroupComponent, StrataCalendarComponent, StrataCardComponent, StrataChatComponent, StrataChatGroupComponent, StrataChatMessageComponent, StrataChatSeparatorComponent, StrataChatTypingComponent, StrataCheckboxComponent, StrataContextMenuDirective, StrataDatePickerComponent, StrataDateRangePickerComponent, StrataDividerComponent, StrataFileUploadComponent, StrataIconComponent, StrataImageCropperComponent, StrataInputFieldComponent, StrataItemComponent, StrataItemListComponent, StrataKbdComponent, StrataMessageStateComponent, StrataModalBodyComponent, StrataModalComponent, StrataModalContainerComponent, StrataModalFooterComponent, StrataModalHeaderComponent, StrataModalRef, StrataNativeInputRefDirective, StrataNotificationComponent, StrataNotificationContainerComponent, StrataNumberDisplayComponent, StrataNumberStepperComponent, StrataOtpComponent, StrataOverlayDirective, StrataPaginationComponent, StrataProgressLinearComponent, StrataProgressRadialComponent, StrataRadioComponent, StrataRadioGroupComponent, StrataSegmentedControlComponent, StrataSegmentedControlItemComponent, StrataSelectItemComponent, StrataSelectTriggerDirective, StrataShellComponent, StrataSidemenuComponent, StrataSidemenuItemDirective, StrataSidemenuItemGroupComponent, StrataSidemenuSectionComponent, StrataSingleSelectComponent, StrataSkeletonComponent, StrataSliderComponent, StrataSpinnerComponent, StrataStepComponent, StrataStepperComponent, StrataTabItemComponent, StrataTabsComponent, StrataTagComponent, StrataTextStackComponent, StrataThemeDirective, StrataTimeStepperComponent, StrataTimepickerComponent, StrataToggleComponent, StrataTooltipDirective, addDays, addMonths, addYears, createCalendarGrid, disableDateRange, disableDaysOfWeek, disableFutureDates, disablePastDates, disableWeekends, endOfDay, endOfMonth, formatDate, formatMonthTitle, getDayOfWeek, getDaysInMonth, getDefaultShortcutLabels, getLocaleDefaultDateFormat, getMonthNames, getWeekdayNames, isAfterDay, isApplePlatform, isBeforeDay, isSameDay, isSameMonth, isSameYear, isWeekend, isWithinDayRange, parseDate, provideBaseIcons, provideIcons, provideStrata, resolveIsApple, startOfDay, startOfMonth };
1965
+ export type { AccordionVariant, AlertConfiguration, AvatarSize, AvatarStackSpacing, AvatarVariant, BadgePlacement, BadgeSize, BadgeVariant, ButtonGroupJustification, ButtonSize, ButtonVariant, CalendarDayCell, CalendarMode, CalendarSize, CalendarView, CardVariant, ChatMessageStatus, ChatMessageVariant, ChatSpacing, CropPosition, CropResult, CropShape, CurrentDarkmode, DarkmodeSetting, DatePickerSize, DateRange, DateRangePreset, HotkeyOptions, IconConfig, IconSize, InputControlState, InputFieldSize, ModalConfiguration, ModalFooterJustification, ModalPlacement, ModalSize, ModalVariant, NotificationAction, NotificationConfiguration, NotificationsWithIds, NumberStepperLayout, NumberStepperSize, OtpSize, OtpState, OtpType, PaginationItem, ProgressLinearGrowDirection, ProgressLinearLabelFormat, ProgressRadialLabelFormat, SegmentedControlSize, SingleSelectSize, SkeletonAnimation, SkeletonSize, SkeletonVariant, SpinnerSize, StepState, StepperOrientation, StepperSize, StepperTheme, StrataBreakpoint, StrataConfig, StrataNotificationRef, StrataOS, StrataPlatform, TagSize, TextStackOverflow, Theme, TimeFormat, TimePrecision, TooltipPlacement };