@akcelik/strct 4.22.0 → 4.23.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.
@@ -23734,6 +23734,322 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
23734
23734
  }, styles: [".strct-windock{display:inline-flex;align-items:center;gap:6px}.strct-windock__chip{display:inline-flex;align-items:center;gap:2px;padding-inline:8px 4px;border:1px solid var(--b2);border-radius:var(--radius-full, 999px);background:var(--bg-1);font-size:12px}.strct-windock__open,.strct-windock__close{border:0;background:none;color:inherit;font:inherit;cursor:pointer;padding:3px 2px;border-radius:var(--radius-sm)}.strct-windock__open:hover{color:var(--acc)}.strct-windock__close{display:inline-flex;color:var(--t3)}.strct-windock__close:hover{color:var(--critical)}.strct-windock__open:focus-visible,.strct-windock__close:focus-visible{outline:2px solid var(--acc50);outline-offset:1px}\n"] }]
23735
23735
  }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], closeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLabel", required: false }] }] } });
23736
23736
 
23737
+ /** A card the message carries — an action to approve, a result to read. */
23738
+ class StrctChatAttachment {
23739
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctChatAttachment, deps: [], target: i0.ɵɵFactoryTarget.Directive });
23740
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.4", type: StrctChatAttachment, isStandalone: true, selector: "[strctChatAttachment]", host: { classAttribute: "strct-chat__attachment" }, ngImport: i0 });
23741
+ }
23742
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctChatAttachment, decorators: [{
23743
+ type: Directive,
23744
+ args: [{ selector: '[strctChatAttachment]', host: { class: 'strct-chat__attachment' } }]
23745
+ }] });
23746
+ /**
23747
+ * A conversation is a thread of messages from two or more authors, and an
23748
+ * assistant panel is built from the library like every other panel.
23749
+ *
23750
+ * <strct-chat-thread [busy]="thinking()" label="Assistant conversation">
23751
+ * …<strct-chat-message author="user">…</strct-chat-message>…
23752
+ * </strct-chat-thread>
23753
+ *
23754
+ * The thread is a `role="log"` with `aria-live="polite"`: a streaming reply is
23755
+ * announced once, when it finishes, rather than token by token.
23756
+ */
23757
+ class StrctChatThread {
23758
+ /** The assistant is composing: shows the typing indicator after the last message. */
23759
+ busy = input(false, { ...(ngDevMode ? { debugName: "busy" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
23760
+ /** The thread's accessible name. */
23761
+ label = input('Conversation', /* @ts-ignore */
23762
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
23763
+ /** What the typing indicator says to assistive tech. */
23764
+ typingLabel = input('Assistant is typing', /* @ts-ignore */
23765
+ ...(ngDevMode ? [{ debugName: "typingLabel" }] : /* istanbul ignore next */ []));
23766
+ /** Keep the latest message in view — unless the reader scrolled up. */
23767
+ autoScroll = input(true, { ...(ngDevMode ? { debugName: "autoScroll" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
23768
+ host = inject(ElementRef);
23769
+ /** False once the reader scrolls away from the end; true again at the end. */
23770
+ atEnd = signal(true, /* @ts-ignore */
23771
+ ...(ngDevMode ? [{ debugName: "atEnd" }] : /* istanbul ignore next */ []));
23772
+ constructor() {
23773
+ afterNextRender(() => this.scrollToEnd());
23774
+ effect(() => {
23775
+ this.busy();
23776
+ if (this.autoScroll() && this.atEnd())
23777
+ queueMicrotask(() => this.scrollToEnd());
23778
+ });
23779
+ }
23780
+ onScroll() {
23781
+ const el = this.host.nativeElement;
23782
+ this.atEnd.set(el.scrollHeight - el.scrollTop - el.clientHeight < 24);
23783
+ }
23784
+ /** Jump to the newest message. */
23785
+ scrollToEnd() {
23786
+ const el = this.host.nativeElement;
23787
+ el.scrollTop = el.scrollHeight;
23788
+ }
23789
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctChatThread, deps: [], target: i0.ɵɵFactoryTarget.Component });
23790
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: StrctChatThread, isStandalone: true, selector: "strct-chat-thread", inputs: { busy: { classPropertyName: "busy", publicName: "busy", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, typingLabel: { classPropertyName: "typingLabel", publicName: "typingLabel", isSignal: true, isRequired: false, transformFunction: null }, autoScroll: { classPropertyName: "autoScroll", publicName: "autoScroll", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "log", "aria-live": "polite", "aria-relevant": "additions" }, listeners: { "scroll": "onScroll()" }, properties: { "attr.aria-label": "label()", "attr.aria-busy": "busy() ? \"true\" : null" }, classAttribute: "strct-chat" }, ngImport: i0, template: `
23791
+ <div class="strct-chat__list" #list><ng-content /></div>
23792
+ @if (busy()) {
23793
+ <div class="strct-chat__typing" [attr.aria-label]="typingLabel()" role="status">
23794
+ <span class="strct-chat__dot"></span>
23795
+ <span class="strct-chat__dot"></span>
23796
+ <span class="strct-chat__dot"></span>
23797
+ </div>
23798
+ }
23799
+ `, isInline: true, styles: [".strct-chat{display:flex;flex-direction:column;gap:var(--space-3);min-height:0;overflow:auto;padding:var(--space-3)}.strct-chat__list{display:flex;flex-direction:column;gap:var(--space-3)}.strct-chat__typing{display:inline-flex;align-items:center;gap:4px;padding-inline-start:38px}.strct-chat__dot{width:6px;height:6px;border-radius:50%;background:var(--t3);animation:strct-chat-bounce 1.1s ease-in-out infinite}.strct-chat__dot:nth-child(2){animation-delay:.15s}.strct-chat__dot:nth-child(3){animation-delay:.3s}@keyframes strct-chat-bounce{0%,70%,to{opacity:.35;transform:translateY(0)}35%{opacity:1;transform:translateY(-3px)}}@media(prefers-reduced-motion:reduce){.strct-chat__dot{animation:none;opacity:.55}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
23800
+ }
23801
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctChatThread, decorators: [{
23802
+ type: Component,
23803
+ args: [{ selector: 'strct-chat-thread', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: `
23804
+ <div class="strct-chat__list" #list><ng-content /></div>
23805
+ @if (busy()) {
23806
+ <div class="strct-chat__typing" [attr.aria-label]="typingLabel()" role="status">
23807
+ <span class="strct-chat__dot"></span>
23808
+ <span class="strct-chat__dot"></span>
23809
+ <span class="strct-chat__dot"></span>
23810
+ </div>
23811
+ }
23812
+ `, host: {
23813
+ class: 'strct-chat',
23814
+ role: 'log',
23815
+ 'aria-live': 'polite',
23816
+ 'aria-relevant': 'additions',
23817
+ '[attr.aria-label]': 'label()',
23818
+ '[attr.aria-busy]': 'busy() ? "true" : null',
23819
+ '(scroll)': 'onScroll()',
23820
+ }, styles: [".strct-chat{display:flex;flex-direction:column;gap:var(--space-3);min-height:0;overflow:auto;padding:var(--space-3)}.strct-chat__list{display:flex;flex-direction:column;gap:var(--space-3)}.strct-chat__typing{display:inline-flex;align-items:center;gap:4px;padding-inline-start:38px}.strct-chat__dot{width:6px;height:6px;border-radius:50%;background:var(--t3);animation:strct-chat-bounce 1.1s ease-in-out infinite}.strct-chat__dot:nth-child(2){animation-delay:.15s}.strct-chat__dot:nth-child(3){animation-delay:.3s}@keyframes strct-chat-bounce{0%,70%,to{opacity:.35;transform:translateY(0)}35%{opacity:1;transform:translateY(-3px)}}@media(prefers-reduced-motion:reduce){.strct-chat__dot{animation:none;opacity:.55}}\n"] }]
23821
+ }], ctorParameters: () => [], propDecorators: { busy: [{ type: i0.Input, args: [{ isSignal: true, alias: "busy", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], typingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "typingLabel", required: false }] }], autoScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoScroll", required: false }] }] } });
23822
+ /**
23823
+ * One message in a {@link StrctChatThread}: an `article` labelled by its
23824
+ * author, with the author's avatar, its content, and any attachment card.
23825
+ */
23826
+ class StrctChatMessage {
23827
+ /** Who wrote it. */
23828
+ author = input('assistant', /* @ts-ignore */
23829
+ ...(ngDevMode ? [{ debugName: "author" }] : /* istanbul ignore next */ []));
23830
+ /** The author's name, shown above the bubble. */
23831
+ name = input('', /* @ts-ignore */
23832
+ ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
23833
+ /** An icon avatar instead of initials — an assistant is an icon. */
23834
+ avatarIcon = input('', /* @ts-ignore */
23835
+ ...(ngDevMode ? [{ debugName: "avatarIcon" }] : /* istanbul ignore next */ []));
23836
+ /** The reply is still arriving: a caret follows the content. */
23837
+ streaming = input(false, { ...(ngDevMode ? { debugName: "streaming" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
23838
+ /** When it was sent. */
23839
+ time = input(null, /* @ts-ignore */
23840
+ ...(ngDevMode ? [{ debugName: "time" }] : /* istanbul ignore next */ []));
23841
+ /** How the time reads (localisable). */
23842
+ timeFormat = input((d) => d.toLocaleTimeString(undefined, { hour: '2-digit', minute: '2-digit' }), /* @ts-ignore */
23843
+ ...(ngDevMode ? [{ debugName: "timeFormat" }] : /* istanbul ignore next */ []));
23844
+ /** Default names per author, overridable with `name` (and localisable). */
23845
+ authorNames = input({
23846
+ user: 'You',
23847
+ assistant: 'Assistant',
23848
+ system: 'System',
23849
+ }, /* @ts-ignore */
23850
+ ...(ngDevMode ? [{ debugName: "authorNames" }] : /* istanbul ignore next */ []));
23851
+ displayName = computed(() => this.name() || this.authorNames()[this.author()], /* @ts-ignore */
23852
+ ...(ngDevMode ? [{ debugName: "displayName" }] : /* istanbul ignore next */ []));
23853
+ shortTime = computed(() => {
23854
+ const t = this.time();
23855
+ return t ? this.timeFormat()(t) : '';
23856
+ }, /* @ts-ignore */
23857
+ ...(ngDevMode ? [{ debugName: "shortTime" }] : /* istanbul ignore next */ []));
23858
+ isoTime = computed(() => this.time()?.toISOString() ?? null, /* @ts-ignore */
23859
+ ...(ngDevMode ? [{ debugName: "isoTime" }] : /* istanbul ignore next */ []));
23860
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctChatMessage, deps: [], target: i0.ɵɵFactoryTarget.Component });
23861
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: StrctChatMessage, isStandalone: true, selector: "strct-chat-message", inputs: { author: { classPropertyName: "author", publicName: "author", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, avatarIcon: { classPropertyName: "avatarIcon", publicName: "avatarIcon", isSignal: true, isRequired: false, transformFunction: null }, streaming: { classPropertyName: "streaming", publicName: "streaming", isSignal: true, isRequired: false, transformFunction: null }, time: { classPropertyName: "time", publicName: "time", isSignal: true, isRequired: false, transformFunction: null }, timeFormat: { classPropertyName: "timeFormat", publicName: "timeFormat", isSignal: true, isRequired: false, transformFunction: null }, authorNames: { classPropertyName: "authorNames", publicName: "authorNames", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "article" }, properties: { "attr.data-author": "author()", "attr.aria-label": "displayName()", "attr.aria-busy": "streaming() ? \"true\" : null" }, classAttribute: "strct-msg" }, ngImport: i0, template: `
23862
+ @if (author() !== 'system') {
23863
+ <strct-avatar
23864
+ class="strct-msg__avatar"
23865
+ size="sm"
23866
+ [name]="displayName()"
23867
+ [icon]="avatarIcon()"
23868
+ [tone]="author() === 'user' ? 'neutral' : 'accent-soft'"
23869
+ />
23870
+ }
23871
+ <div class="strct-msg__body">
23872
+ @if (author() !== 'system' && (name() || time())) {
23873
+ <div class="strct-msg__meta">
23874
+ @if (name()) {
23875
+ <span class="strct-msg__name">{{ name() }}</span>
23876
+ }
23877
+ @if (time()) {
23878
+ <time class="strct-msg__time" [attr.datetime]="isoTime()">{{ shortTime() }}</time>
23879
+ }
23880
+ </div>
23881
+ }
23882
+ <div class="strct-msg__bubble">
23883
+ <ng-content />
23884
+ @if (streaming()) {
23885
+ <span class="strct-msg__caret" aria-hidden="true"></span>
23886
+ }
23887
+ </div>
23888
+ <ng-content select="[strctChatAttachment]" />
23889
+ </div>
23890
+ `, isInline: true, styles: [".strct-msg{display:flex;align-items:flex-start;gap:var(--space-2);min-width:0}.strct-msg[data-author=user]{flex-direction:row-reverse}.strct-msg[data-author=system]{justify-content:center}.strct-msg__avatar{flex:none}.strct-msg__body{display:flex;flex-direction:column;gap:4px;min-width:0;max-width:80%}.strct-msg[data-author=user] .strct-msg__body{align-items:flex-end}.strct-msg__meta{display:flex;align-items:baseline;gap:6px;font-size:var(--text-sm);color:var(--t3)}.strct-msg__name{font-weight:600}.strct-msg__bubble{padding:var(--space-2) var(--space-3);border:1px solid var(--b2);border-radius:var(--radius-lg);background:var(--bg-2);color:var(--t1);font-size:13px;line-height:1.5;min-width:0;overflow-wrap:anywhere}.strct-msg[data-author=user] .strct-msg__bubble{background:var(--acc-s);border-color:var(--acc30)}.strct-msg[data-author=system] .strct-msg__bubble{border:0;background:none;color:var(--t3);font-size:var(--text-sm);text-align:center}.strct-msg__caret{display:inline-block;width:2px;height:1em;margin-inline-start:2px;vertical-align:text-bottom;background:var(--acc);animation:strct-chat-caret 1s steps(2,start) infinite}@keyframes strct-chat-caret{to{opacity:0}}@media(prefers-reduced-motion:reduce){.strct-msg__caret{animation:none}}.strct-chat__attachment{display:block;margin-block-start:4px}\n"], dependencies: [{ kind: "component", type: StrctAvatar, selector: "strct-avatar", inputs: ["icon", "shape", "tone", "src", "name", "size", "status"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
23891
+ }
23892
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctChatMessage, decorators: [{
23893
+ type: Component,
23894
+ args: [{ selector: 'strct-chat-message', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [StrctAvatar], template: `
23895
+ @if (author() !== 'system') {
23896
+ <strct-avatar
23897
+ class="strct-msg__avatar"
23898
+ size="sm"
23899
+ [name]="displayName()"
23900
+ [icon]="avatarIcon()"
23901
+ [tone]="author() === 'user' ? 'neutral' : 'accent-soft'"
23902
+ />
23903
+ }
23904
+ <div class="strct-msg__body">
23905
+ @if (author() !== 'system' && (name() || time())) {
23906
+ <div class="strct-msg__meta">
23907
+ @if (name()) {
23908
+ <span class="strct-msg__name">{{ name() }}</span>
23909
+ }
23910
+ @if (time()) {
23911
+ <time class="strct-msg__time" [attr.datetime]="isoTime()">{{ shortTime() }}</time>
23912
+ }
23913
+ </div>
23914
+ }
23915
+ <div class="strct-msg__bubble">
23916
+ <ng-content />
23917
+ @if (streaming()) {
23918
+ <span class="strct-msg__caret" aria-hidden="true"></span>
23919
+ }
23920
+ </div>
23921
+ <ng-content select="[strctChatAttachment]" />
23922
+ </div>
23923
+ `, host: {
23924
+ class: 'strct-msg',
23925
+ role: 'article',
23926
+ '[attr.data-author]': 'author()',
23927
+ '[attr.aria-label]': 'displayName()',
23928
+ // A streaming reply is announced when it finishes, not token by token.
23929
+ '[attr.aria-busy]': 'streaming() ? "true" : null',
23930
+ }, styles: [".strct-msg{display:flex;align-items:flex-start;gap:var(--space-2);min-width:0}.strct-msg[data-author=user]{flex-direction:row-reverse}.strct-msg[data-author=system]{justify-content:center}.strct-msg__avatar{flex:none}.strct-msg__body{display:flex;flex-direction:column;gap:4px;min-width:0;max-width:80%}.strct-msg[data-author=user] .strct-msg__body{align-items:flex-end}.strct-msg__meta{display:flex;align-items:baseline;gap:6px;font-size:var(--text-sm);color:var(--t3)}.strct-msg__name{font-weight:600}.strct-msg__bubble{padding:var(--space-2) var(--space-3);border:1px solid var(--b2);border-radius:var(--radius-lg);background:var(--bg-2);color:var(--t1);font-size:13px;line-height:1.5;min-width:0;overflow-wrap:anywhere}.strct-msg[data-author=user] .strct-msg__bubble{background:var(--acc-s);border-color:var(--acc30)}.strct-msg[data-author=system] .strct-msg__bubble{border:0;background:none;color:var(--t3);font-size:var(--text-sm);text-align:center}.strct-msg__caret{display:inline-block;width:2px;height:1em;margin-inline-start:2px;vertical-align:text-bottom;background:var(--acc);animation:strct-chat-caret 1s steps(2,start) infinite}@keyframes strct-chat-caret{to{opacity:0}}@media(prefers-reduced-motion:reduce){.strct-msg__caret{animation:none}}.strct-chat__attachment{display:block;margin-block-start:4px}\n"] }]
23931
+ }], propDecorators: { author: [{ type: i0.Input, args: [{ isSignal: true, alias: "author", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], avatarIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarIcon", required: false }] }], streaming: [{ type: i0.Input, args: [{ isSignal: true, alias: "streaming", required: false }] }], time: [{ type: i0.Input, args: [{ isSignal: true, alias: "time", required: false }] }], timeFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeFormat", required: false }] }], authorNames: [{ type: i0.Input, args: [{ isSignal: true, alias: "authorNames", required: false }] }] } });
23932
+ /**
23933
+ * The box the user writes in: it grows with the text up to `maxRows`, sends on
23934
+ * Enter and breaks a line on Shift+Enter — and never sends mid-composition, so
23935
+ * an IME's Enter commits the candidate instead of the message.
23936
+ */
23937
+ class StrctChatComposer {
23938
+ /** The draft (two-way). */
23939
+ value = model('', /* @ts-ignore */
23940
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
23941
+ /** Placeholder text. */
23942
+ placeholder = input('', /* @ts-ignore */
23943
+ ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
23944
+ /** The field's accessible name (visually hidden). */
23945
+ label = input('Message', /* @ts-ignore */
23946
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
23947
+ /** Disabled while the assistant is busy, say. */
23948
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
23949
+ /** How tall the box grows before it scrolls. */
23950
+ maxRows = input(8, /* @ts-ignore */
23951
+ ...(ngDevMode ? [{ debugName: "maxRows" }] : /* istanbul ignore next */ []));
23952
+ /** The send button's accessible name. */
23953
+ sendLabel = input('Send', /* @ts-ignore */
23954
+ ...(ngDevMode ? [{ debugName: "sendLabel" }] : /* istanbul ignore next */ []));
23955
+ /** The user sent the draft. */
23956
+ send = output();
23957
+ inputId = `strct-composer-${++composerCounter}`;
23958
+ /** True while an IME is composing — Enter must commit, not send. */
23959
+ composing = signal(false, /* @ts-ignore */
23960
+ ...(ngDevMode ? [{ debugName: "composing" }] : /* istanbul ignore next */ []));
23961
+ host = inject(ElementRef);
23962
+ onInput(event) {
23963
+ const el = event.target;
23964
+ this.value.set(el.value);
23965
+ this.grow(el);
23966
+ }
23967
+ /** Grow with the text: reset first, so deleting a line shrinks it again. */
23968
+ grow(el) {
23969
+ el.style.height = 'auto';
23970
+ el.style.height = `${el.scrollHeight}px`;
23971
+ }
23972
+ onEnter(event) {
23973
+ const e = event;
23974
+ if (e.shiftKey || this.composing() || e.isComposing)
23975
+ return;
23976
+ e.preventDefault();
23977
+ this.submit();
23978
+ }
23979
+ submit() {
23980
+ const text = this.value().trim();
23981
+ if (!text || this.disabled())
23982
+ return;
23983
+ this.send.emit(text);
23984
+ this.value.set('');
23985
+ const el = this.host.nativeElement.querySelector('textarea');
23986
+ if (el) {
23987
+ el.value = '';
23988
+ this.grow(el);
23989
+ el.focus();
23990
+ }
23991
+ }
23992
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctChatComposer, deps: [], target: i0.ɵɵFactoryTarget.Component });
23993
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: StrctChatComposer, isStandalone: true, selector: "strct-chat-composer", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, maxRows: { classPropertyName: "maxRows", publicName: "maxRows", isSignal: true, isRequired: false, transformFunction: null }, sendLabel: { classPropertyName: "sendLabel", publicName: "sendLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", send: "send" }, host: { classAttribute: "strct-composer" }, ngImport: i0, template: `
23994
+ <label class="strct-composer__label" [attr.for]="inputId">{{ label() }}</label>
23995
+ <div class="strct-composer__box">
23996
+ <textarea
23997
+ class="strct-composer__input"
23998
+ [id]="inputId"
23999
+ rows="1"
24000
+ [placeholder]="placeholder()"
24001
+ [disabled]="disabled()"
24002
+ [value]="value()"
24003
+ [style.max-height.px]="maxRows() * 20"
24004
+ (input)="onInput($event)"
24005
+ (compositionstart)="composing.set(true)"
24006
+ (compositionend)="composing.set(false)"
24007
+ (keydown.enter)="onEnter($event)"
24008
+ ></textarea>
24009
+ <button
24010
+ type="button"
24011
+ class="strct-composer__send"
24012
+ [attr.aria-label]="sendLabel()"
24013
+ [disabled]="disabled() || !value().trim()"
24014
+ (click)="submit()"
24015
+ >
24016
+ <strct-icon strictName="arrowUp" [size]="15" [strokeWidth]="1.8" />
24017
+ </button>
24018
+ </div>
24019
+ `, isInline: true, styles: [".strct-composer{display:block}.strct-composer__label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.strct-composer__box{display:flex;align-items:flex-end;gap:4px;padding:4px 4px 4px var(--space-3);border:1px solid var(--b2);border-radius:var(--radius-lg);background:var(--bg-2);transition:border-color .14s ease,box-shadow .14s ease}.strct-composer__box:focus-within{border-color:var(--acc50);box-shadow:0 0 0 3px var(--acc18);background:var(--bg-1)}.strct-composer__input{flex:1;min-width:0;border:0;background:none;resize:none;padding:6px 0;font-family:var(--font);font-size:13px;line-height:20px;color:var(--t1);overflow-y:auto}.strct-composer__input:focus{outline:none}.strct-composer__input::placeholder{color:var(--t3)}.strct-composer__send{display:inline-flex;align-items:center;justify-content:center;flex:none;width:28px;height:28px;border:0;border-radius:var(--radius-md);background:var(--acc);color:var(--inv);cursor:pointer}.strct-composer__send:disabled{opacity:var(--disabled-opacity);cursor:not-allowed}.strct-composer__send:focus-visible{outline:2px solid var(--acc50);outline-offset:2px}\n"], dependencies: [{ kind: "component", type: StrctIcon, selector: "strct-icon", inputs: ["name", "strictName", "size", "strokeWidth", "badge", "ariaLabel", "count", "countMax", "countStatus", "countLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
24020
+ }
24021
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StrctChatComposer, decorators: [{
24022
+ type: Component,
24023
+ args: [{ selector: 'strct-chat-composer', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [StrctIcon], template: `
24024
+ <label class="strct-composer__label" [attr.for]="inputId">{{ label() }}</label>
24025
+ <div class="strct-composer__box">
24026
+ <textarea
24027
+ class="strct-composer__input"
24028
+ [id]="inputId"
24029
+ rows="1"
24030
+ [placeholder]="placeholder()"
24031
+ [disabled]="disabled()"
24032
+ [value]="value()"
24033
+ [style.max-height.px]="maxRows() * 20"
24034
+ (input)="onInput($event)"
24035
+ (compositionstart)="composing.set(true)"
24036
+ (compositionend)="composing.set(false)"
24037
+ (keydown.enter)="onEnter($event)"
24038
+ ></textarea>
24039
+ <button
24040
+ type="button"
24041
+ class="strct-composer__send"
24042
+ [attr.aria-label]="sendLabel()"
24043
+ [disabled]="disabled() || !value().trim()"
24044
+ (click)="submit()"
24045
+ >
24046
+ <strct-icon strictName="arrowUp" [size]="15" [strokeWidth]="1.8" />
24047
+ </button>
24048
+ </div>
24049
+ `, host: { class: 'strct-composer' }, styles: [".strct-composer{display:block}.strct-composer__label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.strct-composer__box{display:flex;align-items:flex-end;gap:4px;padding:4px 4px 4px var(--space-3);border:1px solid var(--b2);border-radius:var(--radius-lg);background:var(--bg-2);transition:border-color .14s ease,box-shadow .14s ease}.strct-composer__box:focus-within{border-color:var(--acc50);box-shadow:0 0 0 3px var(--acc18);background:var(--bg-1)}.strct-composer__input{flex:1;min-width:0;border:0;background:none;resize:none;padding:6px 0;font-family:var(--font);font-size:13px;line-height:20px;color:var(--t1);overflow-y:auto}.strct-composer__input:focus{outline:none}.strct-composer__input::placeholder{color:var(--t3)}.strct-composer__send{display:inline-flex;align-items:center;justify-content:center;flex:none;width:28px;height:28px;border:0;border-radius:var(--radius-md);background:var(--acc);color:var(--inv);cursor:pointer}.strct-composer__send:disabled{opacity:var(--disabled-opacity);cursor:not-allowed}.strct-composer__send:focus-visible{outline:2px solid var(--acc50);outline-offset:2px}\n"] }]
24050
+ }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], maxRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxRows", required: false }] }], sendLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "sendLabel", required: false }] }], send: [{ type: i0.Output, args: ["send"] }] } });
24051
+ let composerCounter = 0;
24052
+
23737
24053
  /**
23738
24054
  * A value change, as one phrase: "v10.27 → v10.28". The old value is muted, the
23739
24055
  * arrow is the library's, the new one is emphasised — and assistive tech hears
@@ -25650,5 +25966,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
25650
25966
  * Generated bundle index. Do not edit.
25651
25967
  */
25652
25968
 
25653
- export { FOCUSABLE_SELECTOR, STRCT_DP_DOW, STRCT_DP_DOW_FULL, STRCT_DP_MONTHS, STRCT_ICONS, STRCT_ICON_GROUPS, STRCT_ICON_NAMES, STRCT_MASKS, STRCT_NOTIFICATION_HISTORY_LIMIT, STRCT_PALETTES, STRCT_RAW_ICONS, STRCT_TIME_RANGE_PRESETS, STRCT_WIZARD_DEFAULTS, StrctAccordion, StrctAccordionPanel, StrctAlert, StrctAnnouncer, StrctAvatar, StrctBadge, StrctBreadcrumb, StrctBreadcrumbItem, StrctButton, StrctButtonGroup, StrctBytesPipe, StrctCard, StrctCardBlock, StrctCardFooter, StrctCardHeader, StrctCardHeaderActions, StrctCardHeaderMeta, StrctCardHeaderNote, StrctCascadeColumn, StrctCascadeHost, StrctCascadeSelect, StrctCellDef, StrctCellStatus, StrctChange, StrctChart, StrctCheckbox, StrctChips, StrctCode, StrctCodeInline, StrctColorPicker, StrctCombobox, StrctCommandPalette, StrctConfirmOutlet, StrctConfirmService, StrctContextMenu, StrctContextMenuTrigger, StrctControlDescription, StrctCopy, StrctDatagrid, StrctDatagridActionBar, StrctDatagridActionBarCaption, StrctDatepicker, StrctDatetimePicker, StrctDesc, StrctDescriptionList, StrctDiff, StrctDivider, StrctDonut, StrctDrawer, StrctDrawerFooter, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctDropdownItemAction, StrctDropdownTrigger, StrctDurationPipe, StrctEmptyState, StrctField, StrctFieldGroup, StrctFieldHint, StrctFieldPrefix, StrctFieldSuffix, StrctFile, StrctFilterBar, StrctFlow, StrctFlowNodeTemplate, StrctFooter, StrctGauge, StrctHeader, StrctHeatmap, StrctHero, StrctHotkeysHelp, StrctHotkeysService, StrctIcon, StrctInlineEdit, StrctInput, StrctInputMask, StrctInputOtp, StrctKbd, StrctKnob, StrctLegend, StrctList, StrctListItem, StrctListItemDescription, StrctListItemLeading, StrctListItemMeta, StrctListItemTrailing, StrctLiveIndicator, StrctLogViewer, StrctLogin, StrctMediaFrame, StrctMenuPanel, StrctMenuService, StrctMenubar, StrctMetricTile, StrctModal, StrctModalContent, StrctNav, StrctNavItem, StrctNotificationCenter, StrctNumber, StrctOverlay, StrctPageHeader, StrctPageHeaderActions, StrctPageHeaderCrumbs, StrctPageHeaderTitleMeta, StrctPagination, StrctPassword, StrctPopover, StrctPopoverTrigger, StrctProgress, StrctRadio, StrctRadioGroup, StrctRail, StrctRange, StrctRatePipe, StrctRating, StrctReorder, StrctReorderGroup, StrctReorderHandle, StrctReorderItem, StrctResizeHandle, StrctRowDetailDef, StrctSearchbox, StrctSectionHeader, StrctSectionHeaderActions, StrctSectionHeaderMeta, StrctSectionMenu, StrctSegmented, StrctSelect, StrctShell, StrctShellService, StrctSiPipe, StrctSignpost, StrctSignpostTrigger, StrctSkeleton, StrctSparkline, StrctSpeedDial, StrctSpinner, StrctSplitButton, StrctSplitter, StrctStack, StrctStackItem, StrctStatusDot, StrctStep, StrctStepAction, StrctSteps, StrctSubmenu, StrctTab, StrctTable, StrctTabs, StrctTag, StrctTagLeading, StrctThemeService, StrctThemeSwitcher, StrctTimeRangePicker, StrctTimeline, StrctTimelineItem, StrctToastOutlet, StrctToastService, StrctToggle, StrctToolbar, StrctToolbarCaption, StrctToolbarSpacer, StrctTooltip, StrctTour, StrctTransfer, StrctTree, StrctTreeNode, StrctTreeSelect, StrctVerticalNav, StrctWatermark, StrctWindow, StrctWindowDock, StrctWindowService, StrctWizard, StrctWizardAside, focusFirstIn, keepTabInside, lockBodyScroll, parseAnsi, provideStrctWizardDefaults, registerStrctIcon, restoreFocus, saveFocusedElement, strctComputeDiff, strctDpPad, strctFormatBytes, strctFormatDuration, strctFormatRate, strctFormatSi, strctValidationIcon, strctValidationTone, unlockBodyScroll };
25969
+ export { FOCUSABLE_SELECTOR, STRCT_DP_DOW, STRCT_DP_DOW_FULL, STRCT_DP_MONTHS, STRCT_ICONS, STRCT_ICON_GROUPS, STRCT_ICON_NAMES, STRCT_MASKS, STRCT_NOTIFICATION_HISTORY_LIMIT, STRCT_PALETTES, STRCT_RAW_ICONS, STRCT_TIME_RANGE_PRESETS, STRCT_WIZARD_DEFAULTS, StrctAccordion, StrctAccordionPanel, StrctAlert, StrctAnnouncer, StrctAvatar, StrctBadge, StrctBreadcrumb, StrctBreadcrumbItem, StrctButton, StrctButtonGroup, StrctBytesPipe, StrctCard, StrctCardBlock, StrctCardFooter, StrctCardHeader, StrctCardHeaderActions, StrctCardHeaderMeta, StrctCardHeaderNote, StrctCascadeColumn, StrctCascadeHost, StrctCascadeSelect, StrctCellDef, StrctCellStatus, StrctChange, StrctChart, StrctChatAttachment, StrctChatComposer, StrctChatMessage, StrctChatThread, StrctCheckbox, StrctChips, StrctCode, StrctCodeInline, StrctColorPicker, StrctCombobox, StrctCommandPalette, StrctConfirmOutlet, StrctConfirmService, StrctContextMenu, StrctContextMenuTrigger, StrctControlDescription, StrctCopy, StrctDatagrid, StrctDatagridActionBar, StrctDatagridActionBarCaption, StrctDatepicker, StrctDatetimePicker, StrctDesc, StrctDescriptionList, StrctDiff, StrctDivider, StrctDonut, StrctDrawer, StrctDrawerFooter, StrctDropdown, StrctDropdownDivider, StrctDropdownItem, StrctDropdownItemAction, StrctDropdownTrigger, StrctDurationPipe, StrctEmptyState, StrctField, StrctFieldGroup, StrctFieldHint, StrctFieldPrefix, StrctFieldSuffix, StrctFile, StrctFilterBar, StrctFlow, StrctFlowNodeTemplate, StrctFooter, StrctGauge, StrctHeader, StrctHeatmap, StrctHero, StrctHotkeysHelp, StrctHotkeysService, StrctIcon, StrctInlineEdit, StrctInput, StrctInputMask, StrctInputOtp, StrctKbd, StrctKnob, StrctLegend, StrctList, StrctListItem, StrctListItemDescription, StrctListItemLeading, StrctListItemMeta, StrctListItemTrailing, StrctLiveIndicator, StrctLogViewer, StrctLogin, StrctMediaFrame, StrctMenuPanel, StrctMenuService, StrctMenubar, StrctMetricTile, StrctModal, StrctModalContent, StrctNav, StrctNavItem, StrctNotificationCenter, StrctNumber, StrctOverlay, StrctPageHeader, StrctPageHeaderActions, StrctPageHeaderCrumbs, StrctPageHeaderTitleMeta, StrctPagination, StrctPassword, StrctPopover, StrctPopoverTrigger, StrctProgress, StrctRadio, StrctRadioGroup, StrctRail, StrctRange, StrctRatePipe, StrctRating, StrctReorder, StrctReorderGroup, StrctReorderHandle, StrctReorderItem, StrctResizeHandle, StrctRowDetailDef, StrctSearchbox, StrctSectionHeader, StrctSectionHeaderActions, StrctSectionHeaderMeta, StrctSectionMenu, StrctSegmented, StrctSelect, StrctShell, StrctShellService, StrctSiPipe, StrctSignpost, StrctSignpostTrigger, StrctSkeleton, StrctSparkline, StrctSpeedDial, StrctSpinner, StrctSplitButton, StrctSplitter, StrctStack, StrctStackItem, StrctStatusDot, StrctStep, StrctStepAction, StrctSteps, StrctSubmenu, StrctTab, StrctTable, StrctTabs, StrctTag, StrctTagLeading, StrctThemeService, StrctThemeSwitcher, StrctTimeRangePicker, StrctTimeline, StrctTimelineItem, StrctToastOutlet, StrctToastService, StrctToggle, StrctToolbar, StrctToolbarCaption, StrctToolbarSpacer, StrctTooltip, StrctTour, StrctTransfer, StrctTree, StrctTreeNode, StrctTreeSelect, StrctVerticalNav, StrctWatermark, StrctWindow, StrctWindowDock, StrctWindowService, StrctWizard, StrctWizardAside, focusFirstIn, keepTabInside, lockBodyScroll, parseAnsi, provideStrctWizardDefaults, registerStrctIcon, restoreFocus, saveFocusedElement, strctComputeDiff, strctDpPad, strctFormatBytes, strctFormatDuration, strctFormatRate, strctFormatSi, strctValidationIcon, strctValidationTone, unlockBodyScroll };
25654
25970
  //# sourceMappingURL=akcelik-strct.mjs.map