@aparte/angular 0.10.0 → 0.12.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/README.md +6 -3
- package/dist/README.md +6 -3
- package/dist/fesm2022/aparte-angular.mjs +634 -2
- package/dist/fesm2022/aparte-angular.mjs.map +1 -1
- package/dist/generated/element.directives.d.ts +329 -0
- package/dist/index.d.ts +1 -0
- package/dist/lib/aparte-ui.component.d.ts +6 -0
- package/package.json +4 -3
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A typed Angular surface for every element this package defines.
|
|
3
|
+
*
|
|
4
|
+
* Generated, and that is the point: a hand-written directive is a parallel structure over
|
|
5
|
+
* the manifest with nothing watching it, so an attribute added to an element would be
|
|
6
|
+
* typed in React, Vue and Svelte — which derive from the registry — and silently missing
|
|
7
|
+
* here. That happened, which is why this file is generated now.
|
|
8
|
+
*
|
|
9
|
+
* Outputs emit the event's DETAIL, not the `CustomEvent`, because
|
|
10
|
+
* `(selectChange)="pick($event.value)"` is the Angular idiom. Reach the event itself with
|
|
11
|
+
* a plain host listener when you need `stopPropagation`.
|
|
12
|
+
*/
|
|
13
|
+
import { ElementRef, EventEmitter } from '@angular/core';
|
|
14
|
+
import type { AparteActionClickEventDetail, AparteActionEventDetail, AparteAttachmentPreviewEventDetail, AparteBranchNavigateEventDetail, AparteComposerChangeEventDetail, AparteConversationArchiveDetail, AparteConversationDeleteDetail, AparteConversationSelectDetail, AparteEditEventDetail, AparteFeedbackEventDetail, AparteMessageInfoEventDetail, AparteOptgroupToggleEventDetail, ApartePathChangedEventDetail, AparteRetryEventDetail, AparteSegmentUpdateEventDetail, AparteSelectChangeDetail, AparteSendEventDetail } from '@aparte/core';
|
|
15
|
+
import * as i0 from "@angular/core";
|
|
16
|
+
/**
|
|
17
|
+
* Writes one declared attribute onto the host element.
|
|
18
|
+
*
|
|
19
|
+
* `applyElementProps` is core's own rule, reused rather than reimplemented: a primitive
|
|
20
|
+
* goes through `setAttribute`, `true` becomes the empty presence attribute,
|
|
21
|
+
* `false`/`null`/`undefined` remove it, and only a value an attribute cannot carry is
|
|
22
|
+
* handed over as a property.
|
|
23
|
+
*/
|
|
24
|
+
declare abstract class AparteElementBase {
|
|
25
|
+
protected readonly host: ElementRef<any>;
|
|
26
|
+
protected write(name: string, value: unknown): void;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AparteElementBase, never>;
|
|
28
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AparteElementBase, never, never, {}, {}, never, never, true, never>;
|
|
29
|
+
}
|
|
30
|
+
/** `<aparte-chat-bubble>` — One message: plain content or a list of rich segments, in light DOM. */
|
|
31
|
+
export declare class AparteChatBubbleDirective extends AparteElementBase {
|
|
32
|
+
/** `user` / `assistant` / `system`; what the CSS keys off. */
|
|
33
|
+
set messageRole(v: string | undefined);
|
|
34
|
+
/** Plain text content, for a bubble with no segments. */
|
|
35
|
+
set content(v: string | undefined);
|
|
36
|
+
/** Epoch milliseconds OR a date string: `_updateTimestamp` accepts either and only coerces when the value is numeric. */
|
|
37
|
+
set timestamp(v: number | string | undefined);
|
|
38
|
+
/** How streaming and the action bar address this bubble. */
|
|
39
|
+
set messageId(v: string | undefined);
|
|
40
|
+
/** Hides the action bar and shows the caret while a reply is in flight. */
|
|
41
|
+
set streaming(v: boolean);
|
|
42
|
+
/** The display name in the header. */
|
|
43
|
+
set name(v: string | undefined);
|
|
44
|
+
/** An attached image was clicked, asking the app to open it full-size. */
|
|
45
|
+
readonly attachmentPreview: EventEmitter<AparteAttachmentPreviewEventDetail>;
|
|
46
|
+
/** A custom action-bar button was pressed. */
|
|
47
|
+
readonly action: EventEmitter<AparteActionEventDetail>;
|
|
48
|
+
/** Retry was pressed; the host forks the turn. */
|
|
49
|
+
readonly retry: EventEmitter<AparteRetryEventDetail>;
|
|
50
|
+
/** Thumbs up or down. */
|
|
51
|
+
readonly feedback: EventEmitter<AparteFeedbackEventDetail>;
|
|
52
|
+
/** The info affordance was pressed. */
|
|
53
|
+
readonly messageInfo: EventEmitter<AparteMessageInfoEventDetail>;
|
|
54
|
+
/** An edit was saved. */
|
|
55
|
+
readonly edit: EventEmitter<AparteEditEventDetail>;
|
|
56
|
+
/** The `‹1/2›` picker moved between sibling versions. */
|
|
57
|
+
readonly branchNavigate: EventEmitter<AparteBranchNavigateEventDetail>;
|
|
58
|
+
protected onAttachmentPreview(e: CustomEvent<AparteAttachmentPreviewEventDetail>): void;
|
|
59
|
+
protected onAction(e: CustomEvent<AparteActionEventDetail>): void;
|
|
60
|
+
protected onRetry(e: CustomEvent<AparteRetryEventDetail>): void;
|
|
61
|
+
protected onFeedback(e: CustomEvent<AparteFeedbackEventDetail>): void;
|
|
62
|
+
protected onMessageInfo(e: CustomEvent<AparteMessageInfoEventDetail>): void;
|
|
63
|
+
protected onEdit(e: CustomEvent<AparteEditEventDetail>): void;
|
|
64
|
+
protected onBranchNavigate(e: CustomEvent<AparteBranchNavigateEventDetail>): void;
|
|
65
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AparteChatBubbleDirective, never>;
|
|
66
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AparteChatBubbleDirective, "aparte-chat-bubble", never, { "messageRole": { "alias": "messageRole"; "required": false; }; "content": { "alias": "content"; "required": false; }; "timestamp": { "alias": "timestamp"; "required": false; }; "messageId": { "alias": "messageId"; "required": false; }; "streaming": { "alias": "streaming"; "required": false; }; "name": { "alias": "name"; "required": false; }; }, { "attachmentPreview": "attachmentPreview"; "action": "action"; "retry": "retry"; "feedback": "feedback"; "messageInfo": "messageInfo"; "edit": "edit"; "branchNavigate": "branchNavigate"; }, never, never, true, never>;
|
|
67
|
+
static ngAcceptInputType_streaming: unknown;
|
|
68
|
+
}
|
|
69
|
+
/** `<aparte-chat-status>` — A standalone status line — a light-DOM typing indicator the APP owns. Core never turns it on by itself, so it can never compete with the bubble's own waiting state. */
|
|
70
|
+
export declare class AparteChatStatusDirective extends AparteElementBase {
|
|
71
|
+
/** Shows or hides the indicator. */
|
|
72
|
+
set visible(v: boolean);
|
|
73
|
+
/** The line to show. Defaults to the locale's typing string. */
|
|
74
|
+
set text(v: string | undefined);
|
|
75
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AparteChatStatusDirective, never>;
|
|
76
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AparteChatStatusDirective, "aparte-chat-status", never, { "visible": { "alias": "visible"; "required": false; }; "text": { "alias": "text"; "required": false; }; }, {}, never, never, true, never>;
|
|
77
|
+
static ngAcceptInputType_visible: unknown;
|
|
78
|
+
}
|
|
79
|
+
/** `<aparte-chat-viewport>` — The transcript surface: a light-DOM container with sticky scrolling, token streaming and segment-aware rendering. */
|
|
80
|
+
export declare class AparteChatViewportDirective extends AparteElementBase {
|
|
81
|
+
/** How close to the bottom still counts as "at the bottom". */
|
|
82
|
+
set scrollThreshold(v: number);
|
|
83
|
+
/** Caps how many bubbles stay in the DOM; older ones are released. */
|
|
84
|
+
set maxRenderedBubbles(v: number);
|
|
85
|
+
/** DEPRECATED. It used to evict messages from the model; it now only caps rendered bubbles, which is what `max-rendered-bubbles` says. For real history retention configure the conversation manager instead. */
|
|
86
|
+
set maxMessages(v: number);
|
|
87
|
+
/** The wrapper's explicit hands-off signal: set it and this element composes none of its own children, because the framework owns them. All four wrappers set it; it was read by this element and declared by nothing until now. */
|
|
88
|
+
set frameworkManaged(v: boolean);
|
|
89
|
+
/** A segment grew or settled during a stream. */
|
|
90
|
+
readonly segmentUpdate: EventEmitter<AparteSegmentUpdateEventDetail>;
|
|
91
|
+
/** `clearAll()` finished emptying the transcript. No detail. */
|
|
92
|
+
readonly resetDone: EventEmitter<void>;
|
|
93
|
+
/** The active branch path changed, after a retry fork or a navigation. Features: - Smart Scroll: Sticks to bottom when user is at bottom, stops on manual scroll up - appendToken(): For simple content streaming - appendToSegment(): For segment-aware streaming (thinking, code, etc.) - Internal message registry for memory management */
|
|
94
|
+
readonly pathChanged: EventEmitter<ApartePathChangedEventDetail>;
|
|
95
|
+
protected onSegmentUpdate(e: CustomEvent<AparteSegmentUpdateEventDetail>): void;
|
|
96
|
+
protected onResetDone(): void;
|
|
97
|
+
protected onPathChanged(e: CustomEvent<ApartePathChangedEventDetail>): void;
|
|
98
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AparteChatViewportDirective, never>;
|
|
99
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AparteChatViewportDirective, "aparte-chat-viewport", never, { "scrollThreshold": { "alias": "scrollThreshold"; "required": false; }; "maxRenderedBubbles": { "alias": "maxRenderedBubbles"; "required": false; }; "maxMessages": { "alias": "maxMessages"; "required": false; }; "frameworkManaged": { "alias": "frameworkManaged"; "required": false; }; }, { "segmentUpdate": "segmentUpdate"; "resetDone": "resetDone"; "pathChanged": "pathChanged"; }, never, never, true, never>;
|
|
100
|
+
static ngAcceptInputType_scrollThreshold: unknown;
|
|
101
|
+
static ngAcceptInputType_maxRenderedBubbles: unknown;
|
|
102
|
+
static ngAcceptInputType_maxMessages: unknown;
|
|
103
|
+
static ngAcceptInputType_frameworkManaged: unknown;
|
|
104
|
+
}
|
|
105
|
+
/** `<aparte-composer>` — The root context for every `aparte-composer-*` primitive. It imposes no visual layout — the consumer owns the structure — and holds the shared state the parts read: the value, the streaming flag, pending attachments, the panel slot. */
|
|
106
|
+
export declare class AparteComposerDirective extends AparteElementBase {
|
|
107
|
+
/** Forwarded to `<aparte-composer-input>` through the internal bus. */
|
|
108
|
+
set placeholder(v: string | undefined);
|
|
109
|
+
/** Disables the whole composer, every part included. */
|
|
110
|
+
set disabled(v: boolean);
|
|
111
|
+
/** The id of the `<aparte-chat>` this composer drives. */
|
|
112
|
+
set target(v: string | undefined);
|
|
113
|
+
/** Enter sends and Shift+Enter breaks the line (the default); set it to the string `"false"` to swap them. Read lazily by the `submitOnEnter` getter rather than observed, which is why it was missing from the manifest — and so from every typed surface — while all four wrappers wrote it. */
|
|
114
|
+
set submitOnEnter(v: boolean);
|
|
115
|
+
/** A message was submitted: the text, its attachments and the target. */
|
|
116
|
+
readonly send: EventEmitter<AparteSendEventDetail>;
|
|
117
|
+
/** The stop button was pressed. No detail; the two window events below carry the target. */
|
|
118
|
+
readonly cancel: EventEmitter<void>;
|
|
119
|
+
/** Any of value / streaming / disabled / attachments / panel changed, folded into one event. */
|
|
120
|
+
readonly composerChange: EventEmitter<AparteComposerChangeEventDetail>;
|
|
121
|
+
protected onSend(e: CustomEvent<AparteSendEventDetail>): void;
|
|
122
|
+
protected onCancel(): void;
|
|
123
|
+
protected onComposerChange(e: CustomEvent<AparteComposerChangeEventDetail>): void;
|
|
124
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AparteComposerDirective, never>;
|
|
125
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AparteComposerDirective, "aparte-composer", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "target": { "alias": "target"; "required": false; }; "submitOnEnter": { "alias": "submitOnEnter"; "required": false; }; }, { "send": "send"; "cancel": "cancel"; "composerChange": "composerChange"; }, never, never, true, never>;
|
|
126
|
+
static ngAcceptInputType_disabled: unknown;
|
|
127
|
+
static ngAcceptInputType_submitOnEnter: unknown;
|
|
128
|
+
}
|
|
129
|
+
/** `<aparte-composer-action>` — Generic action button primitive for <aparte-composer>. */
|
|
130
|
+
export declare class AparteComposerActionDirective extends AparteElementBase {
|
|
131
|
+
/** Icon key for aparteGlobalConfig.getIcon(), or raw SVG/HTML starting with `<` */
|
|
132
|
+
set icon(v: string | undefined);
|
|
133
|
+
/** Accessible label (also used as tooltip) */
|
|
134
|
+
set label(v: string | undefined);
|
|
135
|
+
/** Disables the button */
|
|
136
|
+
set disabled(v: boolean);
|
|
137
|
+
/** Identifies WHICH button fired; carried as `AparteActionClickEventDetail.actionId`. Read lazily at dispatch time rather than observed, so the manifest never recorded it — leaving the only way to tell two custom composer buttons apart absent from the typed surface. */
|
|
138
|
+
set actionId(v: string | undefined);
|
|
139
|
+
/** Bubbles up when the button is clicked, carrying which button it was and the composer it belongs to. The type argument is not decoration: a BARE `@fires` records `CustomEvent` with no argument, and the bindings generator then emits `EventEmitter<void>` with a listener that drops `$event` — so an Angular consumer with two custom buttons could not tell which one fired. detail: { actionId: string, composer: AparteComposer | null } */
|
|
140
|
+
readonly actionClick: EventEmitter<AparteActionClickEventDetail>;
|
|
141
|
+
protected onActionClick(e: CustomEvent<AparteActionClickEventDetail>): void;
|
|
142
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AparteComposerActionDirective, never>;
|
|
143
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AparteComposerActionDirective, "aparte-composer-action", never, { "icon": { "alias": "icon"; "required": false; }; "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "actionId": { "alias": "actionId"; "required": false; }; }, { "actionClick": "actionClick"; }, never, never, true, never>;
|
|
144
|
+
static ngAcceptInputType_disabled: unknown;
|
|
145
|
+
}
|
|
146
|
+
/** `<aparte-composer-add-attachment>` — File picker button for <aparte-composer>. */
|
|
147
|
+
export declare class AparteComposerAddAttachmentDirective extends AparteElementBase {
|
|
148
|
+
/** MIME types / extensions passed to the file input (e.g. "image/*,.pdf") */
|
|
149
|
+
set accept(v: string | undefined);
|
|
150
|
+
/** Allow multiple file selection (default: true) */
|
|
151
|
+
set multiple(v: boolean);
|
|
152
|
+
/** Greys out the picker and ignores drops. */
|
|
153
|
+
set disabled(v: boolean);
|
|
154
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AparteComposerAddAttachmentDirective, never>;
|
|
155
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AparteComposerAddAttachmentDirective, "aparte-composer-add-attachment", never, { "accept": { "alias": "accept"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
|
|
156
|
+
static ngAcceptInputType_multiple: unknown;
|
|
157
|
+
static ngAcceptInputType_disabled: unknown;
|
|
158
|
+
}
|
|
159
|
+
/** `<aparte-composer-attachments>` — Renders a square thumbnail tile for each file attached to the root composer. */
|
|
160
|
+
export declare class AparteComposerAttachmentsDirective {
|
|
161
|
+
/** An attached image was clicked; the app opens it full-size, and only if it declared `attachmentPreview`. */
|
|
162
|
+
readonly attachmentPreview: EventEmitter<AparteAttachmentPreviewEventDetail>;
|
|
163
|
+
protected onAttachmentPreview(e: CustomEvent<AparteAttachmentPreviewEventDetail>): void;
|
|
164
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AparteComposerAttachmentsDirective, never>;
|
|
165
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AparteComposerAttachmentsDirective, "aparte-composer-attachments", never, {}, { "attachmentPreview": "attachmentPreview"; }, never, never, true, never>;
|
|
166
|
+
}
|
|
167
|
+
/** `<aparte-composer-cancel>` — Cancel/stop streaming button primitive for <aparte-composer>. */
|
|
168
|
+
/**
|
|
169
|
+
* No member at all: this element observes nothing and dispatches nothing, so the
|
|
170
|
+
* directive exists only to CLAIM THE TAG — which is what spares a consuming component
|
|
171
|
+
* `CUSTOM_ELEMENTS_SCHEMA`, a switch that turns checking off for every unknown tag in
|
|
172
|
+
* the file rather than just this one.
|
|
173
|
+
*/
|
|
174
|
+
export declare class AparteComposerCancelDirective {
|
|
175
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AparteComposerCancelDirective, never>;
|
|
176
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AparteComposerCancelDirective, "aparte-composer-cancel", never, {}, {}, never, never, true, never>;
|
|
177
|
+
}
|
|
178
|
+
/** `<aparte-composer-input>` — Contenteditable text input primitive. */
|
|
179
|
+
export declare class AparteComposerInputDirective extends AparteElementBase {
|
|
180
|
+
/** Placeholder text (fallback: reads from aparte-composer) */
|
|
181
|
+
set placeholder(v: string | undefined);
|
|
182
|
+
/** Max height in px before scroll (default: 200) */
|
|
183
|
+
set maxHeight(v: number);
|
|
184
|
+
/** Min height in px. When omitted, the stylesheet's min-height governs (44px in aparte.css) — so themes can resize the editor in pure CSS without being fought by an inline height. */
|
|
185
|
+
set minHeight(v: number);
|
|
186
|
+
/** Makes the field non-editable; the composer's own `disabled` also reaches it. */
|
|
187
|
+
set disabled(v: boolean);
|
|
188
|
+
/** Enter was pressed with content. No detail; the composer reads its own value. Behaviour: Enter submits (calls root.submit()), Shift+Enter inserts newline. Auto-expands up to max-height. Paste strips HTML, handles image paste. */
|
|
189
|
+
readonly composerSubmit: EventEmitter<void>;
|
|
190
|
+
protected onComposerSubmit(): void;
|
|
191
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AparteComposerInputDirective, never>;
|
|
192
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AparteComposerInputDirective, "aparte-composer-input", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "minHeight": { "alias": "minHeight"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "composerSubmit": "composerSubmit"; }, never, never, true, never>;
|
|
193
|
+
static ngAcceptInputType_maxHeight: unknown;
|
|
194
|
+
static ngAcceptInputType_minHeight: unknown;
|
|
195
|
+
static ngAcceptInputType_disabled: unknown;
|
|
196
|
+
}
|
|
197
|
+
/** `<aparte-composer-send>` — Submit button primitive for <aparte-composer>. */
|
|
198
|
+
/**
|
|
199
|
+
* No member at all: this element observes nothing and dispatches nothing, so the
|
|
200
|
+
* directive exists only to CLAIM THE TAG — which is what spares a consuming component
|
|
201
|
+
* `CUSTOM_ELEMENTS_SCHEMA`, a switch that turns checking off for every unknown tag in
|
|
202
|
+
* the file rather than just this one.
|
|
203
|
+
*/
|
|
204
|
+
export declare class AparteComposerSendDirective {
|
|
205
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AparteComposerSendDirective, never>;
|
|
206
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AparteComposerSendDirective, "aparte-composer-send", never, {}, {}, never, never, true, never>;
|
|
207
|
+
}
|
|
208
|
+
/** `<aparte-composer-toolbar>` — The composer's bottom row — the strip a mode picker, a model selector or a token counter belongs in, rather than a bar of your own floating below the chat. Purely structural: it lays its children out in a row and gets out of the way. */
|
|
209
|
+
/**
|
|
210
|
+
* No member at all: this element observes nothing and dispatches nothing, so the
|
|
211
|
+
* directive exists only to CLAIM THE TAG — which is what spares a consuming component
|
|
212
|
+
* `CUSTOM_ELEMENTS_SCHEMA`, a switch that turns checking off for every unknown tag in
|
|
213
|
+
* the file rather than just this one.
|
|
214
|
+
*/
|
|
215
|
+
export declare class AparteComposerToolbarDirective {
|
|
216
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AparteComposerToolbarDirective, never>;
|
|
217
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AparteComposerToolbarDirective, "aparte-composer-toolbar", never, {}, {}, never, never, true, never>;
|
|
218
|
+
}
|
|
219
|
+
/** `<aparte-conversation-list>` — Conversation-history sidebar — a framework-agnostic web component. The host sets the `conversations` JS property and the `active-id` attribute; this renders the list and fires the user's intent, never acting on it itself. */
|
|
220
|
+
export declare class AparteConversationListDirective extends AparteElementBase {
|
|
221
|
+
/** The id of the conversation to render as selected. */
|
|
222
|
+
set activeId(v: string | undefined);
|
|
223
|
+
/** A row was activated; the host loads that conversation. */
|
|
224
|
+
readonly selectConversation: EventEmitter<AparteConversationSelectDetail>;
|
|
225
|
+
/** The delete action was pressed. Nothing is removed here. */
|
|
226
|
+
readonly deleteConversation: EventEmitter<AparteConversationDeleteDetail>;
|
|
227
|
+
/** The archive action was pressed on a live conversation. */
|
|
228
|
+
readonly archiveConversation: EventEmitter<AparteConversationArchiveDetail>;
|
|
229
|
+
/** The same action on an already-archived one; same detail shape, opposite intent. */
|
|
230
|
+
readonly unarchiveConversation: EventEmitter<AparteConversationArchiveDetail>;
|
|
231
|
+
protected onSelectConversation(e: CustomEvent<AparteConversationSelectDetail>): void;
|
|
232
|
+
protected onDeleteConversation(e: CustomEvent<AparteConversationDeleteDetail>): void;
|
|
233
|
+
protected onArchiveConversation(e: CustomEvent<AparteConversationArchiveDetail>): void;
|
|
234
|
+
protected onUnarchiveConversation(e: CustomEvent<AparteConversationArchiveDetail>): void;
|
|
235
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AparteConversationListDirective, never>;
|
|
236
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AparteConversationListDirective, "aparte-conversation-list", never, { "activeId": { "alias": "activeId"; "required": false; }; }, { "selectConversation": "selectConversation"; "deleteConversation": "deleteConversation"; "archiveConversation": "archiveConversation"; "unarchiveConversation": "unarchiveConversation"; }, never, never, true, never>;
|
|
237
|
+
}
|
|
238
|
+
/** `<aparte-elicitation>` — The default presenter for a request to the human. It renders nothing itself: it registers as the presenter for the config governing its subtree, and mounts a panel inside the nearest `<aparte-composer>` when something asks — a tool handler calling `requestUserInput`, or core's own approval gate. */
|
|
239
|
+
/**
|
|
240
|
+
* No member at all: this element observes nothing and dispatches nothing, so the
|
|
241
|
+
* directive exists only to CLAIM THE TAG — which is what spares a consuming component
|
|
242
|
+
* `CUSTOM_ELEMENTS_SCHEMA`, a switch that turns checking off for every unknown tag in
|
|
243
|
+
* the file rather than just this one.
|
|
244
|
+
*/
|
|
245
|
+
export declare class AparteElicitationDirective {
|
|
246
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AparteElicitationDirective, never>;
|
|
247
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AparteElicitationDirective, "aparte-elicitation", never, {}, {}, never, never, true, never>;
|
|
248
|
+
}
|
|
249
|
+
/** `<aparte-optgroup>` — AparteOptgroup */
|
|
250
|
+
export declare class AparteOptgroupDirective extends AparteElementBase {
|
|
251
|
+
/** Group label */
|
|
252
|
+
set label(v: string | undefined);
|
|
253
|
+
/** Allow collapse/expand */
|
|
254
|
+
set collapsible(v: boolean);
|
|
255
|
+
/** Collapsed state */
|
|
256
|
+
set collapsed(v: boolean);
|
|
257
|
+
/** Shows a spinner in place of the group's options. */
|
|
258
|
+
set loading(v: boolean);
|
|
259
|
+
/** The group was collapsed or expanded. */
|
|
260
|
+
readonly optgroupToggle: EventEmitter<AparteOptgroupToggleEventDetail>;
|
|
261
|
+
protected onOptgroupToggle(e: CustomEvent<AparteOptgroupToggleEventDetail>): void;
|
|
262
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AparteOptgroupDirective, never>;
|
|
263
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AparteOptgroupDirective, "aparte-optgroup", never, { "label": { "alias": "label"; "required": false; }; "collapsible": { "alias": "collapsible"; "required": false; }; "collapsed": { "alias": "collapsed"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; }, { "optgroupToggle": "optgroupToggle"; }, never, never, true, never>;
|
|
264
|
+
static ngAcceptInputType_collapsible: unknown;
|
|
265
|
+
static ngAcceptInputType_collapsed: unknown;
|
|
266
|
+
static ngAcceptInputType_loading: unknown;
|
|
267
|
+
}
|
|
268
|
+
/** `<aparte-option>` — AparteOption */
|
|
269
|
+
export declare class AparteOptionDirective extends AparteElementBase {
|
|
270
|
+
/** Option value */
|
|
271
|
+
set value(v: string | undefined);
|
|
272
|
+
/** Disabled state */
|
|
273
|
+
set disabled(v: boolean);
|
|
274
|
+
/** Selected state */
|
|
275
|
+
set selected(v: boolean);
|
|
276
|
+
/** Free-form status the host sets; styled, never read by core. */
|
|
277
|
+
set dataStatus(v: string | undefined);
|
|
278
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AparteOptionDirective, never>;
|
|
279
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AparteOptionDirective, "aparte-option", never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "dataStatus": { "alias": "dataStatus"; "required": false; }; }, {}, never, never, true, never>;
|
|
280
|
+
static ngAcceptInputType_disabled: unknown;
|
|
281
|
+
static ngAcceptInputType_selected: unknown;
|
|
282
|
+
}
|
|
283
|
+
/** `<aparte-progress-spinner>` — AparteProgressSpinner */
|
|
284
|
+
export declare class AparteProgressSpinnerDirective extends AparteElementBase {
|
|
285
|
+
/** Progress percentage 0–100 (omit for indeterminate) */
|
|
286
|
+
set value(v: number);
|
|
287
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AparteProgressSpinnerDirective, never>;
|
|
288
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AparteProgressSpinnerDirective, "aparte-progress-spinner", never, { "value": { "alias": "value"; "required": false; }; }, {}, never, never, true, never>;
|
|
289
|
+
static ngAcceptInputType_value: unknown;
|
|
290
|
+
}
|
|
291
|
+
/** `<aparte-select>` — Dropdown select for aparté — a vanilla web component with optional grouping, a search filter and a keyboard-driven listbox. */
|
|
292
|
+
export declare class AparteSelectDirective extends AparteElementBase {
|
|
293
|
+
/** The selected option's value. */
|
|
294
|
+
set value(v: string | undefined);
|
|
295
|
+
/** Shown while nothing is selected. */
|
|
296
|
+
set placeholder(v: string | undefined);
|
|
297
|
+
/** Blocks opening and selection. */
|
|
298
|
+
set disabled(v: boolean);
|
|
299
|
+
/** Renders `<aparte-optgroup>` children as collapsible groups. */
|
|
300
|
+
set grouped(v: boolean);
|
|
301
|
+
/** Adds a filter field above the options. */
|
|
302
|
+
set searchable(v: boolean);
|
|
303
|
+
/** Reflects (and controls) whether the dropdown is open. */
|
|
304
|
+
set open(v: boolean);
|
|
305
|
+
/** The dropdown opened. No detail. */
|
|
306
|
+
readonly selectOpen: EventEmitter<void>;
|
|
307
|
+
/** The dropdown closed. No detail. */
|
|
308
|
+
readonly selectClose: EventEmitter<void>;
|
|
309
|
+
/** The selection changed; carries the new value, its label and the previous value. */
|
|
310
|
+
readonly selectChange: EventEmitter<AparteSelectChangeDetail>;
|
|
311
|
+
protected onSelectOpen(): void;
|
|
312
|
+
protected onSelectClose(): void;
|
|
313
|
+
protected onSelectChange(e: CustomEvent<AparteSelectChangeDetail>): void;
|
|
314
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AparteSelectDirective, never>;
|
|
315
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AparteSelectDirective, "aparte-select", never, { "value": { "alias": "value"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "grouped": { "alias": "grouped"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "open": { "alias": "open"; "required": false; }; }, { "selectOpen": "selectOpen"; "selectClose": "selectClose"; "selectChange": "selectChange"; }, never, never, true, never>;
|
|
316
|
+
static ngAcceptInputType_disabled: unknown;
|
|
317
|
+
static ngAcceptInputType_grouped: unknown;
|
|
318
|
+
static ngAcceptInputType_searchable: unknown;
|
|
319
|
+
static ngAcceptInputType_open: unknown;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Every element directive, for one import in a standalone component.
|
|
323
|
+
*
|
|
324
|
+
* ```ts
|
|
325
|
+
* @Component({ imports: [...APARTE_ELEMENT_DIRECTIVES], template: `…` })
|
|
326
|
+
* ```
|
|
327
|
+
*/
|
|
328
|
+
export declare const APARTE_ELEMENT_DIRECTIVES: readonly [typeof AparteChatBubbleDirective, typeof AparteChatStatusDirective, typeof AparteChatViewportDirective, typeof AparteComposerDirective, typeof AparteComposerActionDirective, typeof AparteComposerAddAttachmentDirective, typeof AparteComposerAttachmentsDirective, typeof AparteComposerCancelDirective, typeof AparteComposerInputDirective, typeof AparteComposerSendDirective, typeof AparteComposerToolbarDirective, typeof AparteConversationListDirective, typeof AparteElicitationDirective, typeof AparteOptgroupDirective, typeof AparteOptionDirective, typeof AparteProgressSpinnerDirective, typeof AparteSelectDirective];
|
|
329
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export type { ProvideAparteOptions, ApartePluginLoader } from './lib/provide-apa
|
|
|
7
7
|
export { AparteChatComponent } from './lib/aparte-chat.component';
|
|
8
8
|
export { AparteUiComponent } from './lib/aparte-ui.component';
|
|
9
9
|
export type { AparteUiHandle } from './lib/aparte-ui.component';
|
|
10
|
+
export { APARTE_ELEMENT_DIRECTIVES, AparteChatViewportDirective, AparteChatBubbleDirective, AparteChatStatusDirective, AparteComposerDirective, AparteComposerInputDirective, AparteComposerActionDirective, AparteComposerAddAttachmentDirective, AparteComposerAttachmentsDirective, AparteComposerSendDirective, AparteComposerCancelDirective, AparteComposerToolbarDirective, AparteSelectDirective, AparteOptionDirective, AparteOptgroupDirective, AparteConversationListDirective, AparteProgressSpinnerDirective, AparteElicitationDirective, } from './generated/element.directives';
|
|
10
11
|
export { AparteAiService, APARTE_CLIENT_OPTIONS } from './lib/aparte-ai.service';
|
|
11
12
|
export { ConversationManagerService } from './lib/conversation-manager.service';
|
|
12
13
|
export type { AparteMessage, AparteSendEventDetail, AparteActionEventDetail, AparteSegment, AparteTextSegment, AparteCodeSegment, AparteThinkingSegment, AparteChatImperativeApi, } from '@aparte/core';
|
|
@@ -20,6 +20,11 @@ export interface AparteUiHandle {
|
|
|
20
20
|
* its own once the definition arrives, which is what makes `provideAparte`'s lazy
|
|
21
21
|
* `plugins` loaders work.
|
|
22
22
|
*
|
|
23
|
+
* A PLUGIN's event is not in the default forward list — that default is core's, and a
|
|
24
|
+
* third-party plugin's author cannot add to it, so listing ours would privilege our
|
|
25
|
+
* packages over theirs. Name it in `events` and it arrives; leave it out and the handler
|
|
26
|
+
* silently never fires, which is what this example used to do.
|
|
27
|
+
*
|
|
23
28
|
* @example
|
|
24
29
|
* ```html
|
|
25
30
|
* <aparte-ui
|
|
@@ -29,6 +34,7 @@ export interface AparteUiHandle {
|
|
|
29
34
|
* '--glow-opacity': '1',
|
|
30
35
|
* '--glow-speed': '4s'
|
|
31
36
|
* }"
|
|
37
|
+
* [events]="['aparte-model-change']"
|
|
32
38
|
* (elementEvent)="onEvent($event)"
|
|
33
39
|
* />
|
|
34
40
|
* ```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aparte/angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Angular 19 wrapper for aparté — an ergonomic <aparte-chat> component plus services over the framework-agnostic web components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"typescript": "^5.4.0",
|
|
46
46
|
"vite": "^6.0.0",
|
|
47
47
|
"zone.js": "~0.15.0",
|
|
48
|
-
"@aparte/core": "0.
|
|
48
|
+
"@aparte/core": "0.12.0"
|
|
49
49
|
},
|
|
50
50
|
"keywords": [
|
|
51
51
|
"angular",
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"typecheck:tests": "tsc -p tsconfig.spec.json --noEmit",
|
|
70
70
|
"test": "vitest",
|
|
71
71
|
"test:run": "vitest run",
|
|
72
|
-
"test:coverage": "vitest run --coverage"
|
|
72
|
+
"test:coverage": "vitest run --coverage",
|
|
73
|
+
"gen": "node ../../../scripts/gen-element-bindings.mjs packages/core --angular packages/wrappers/angular/src/generated"
|
|
73
74
|
}
|
|
74
75
|
}
|