@aparte/angular 0.12.0 → 0.13.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.
@@ -1054,11 +1054,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
1054
1054
  type: HostListener,
1055
1055
  args: ['aparte-branch-navigate', ['$event']]
1056
1056
  }] } });
1057
- /** `<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. */
1057
+ /** `<aparte-chat-status>` — A standalone status line — a light-DOM indicator the APP owns. Nothing in core turns it on: the framework host only ever flips it back OFF (on the first streamed token), and the four wrappers render one inside the viewport driven by their own `isTyping` prop. */
1058
1058
  class AparteChatStatusDirective extends AparteElementBase {
1059
1059
  /** Shows or hides the indicator. */
1060
1060
  set visible(v) { this.write('visible', v); }
1061
- /** The line to show. Defaults to the locale's typing string. */
1061
+ /** The line to show. Absent, the line is dots-only and the accessible name falls back to the literal `Typing` (not the locale's string). */
1062
1062
  set text(v) { this.write('text', v); }
1063
1063
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AparteChatStatusDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1064
1064
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.2.25", type: AparteChatStatusDirective, isStandalone: true, selector: "aparte-chat-status", inputs: { visible: ["visible", "visible", booleanAttribute], text: "text" }, usesInheritance: true, ngImport: i0 });
@@ -1080,13 +1080,13 @@ class AparteChatViewportDirective extends AparteElementBase {
1080
1080
  set maxRenderedBubbles(v) { this.write('max-rendered-bubbles', v); }
1081
1081
  /** 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. */
1082
1082
  set maxMessages(v) { this.write('max-messages', v); }
1083
- /** 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. */
1083
+ /** The wrapper's explicit hands-off signal: set it and this element builds no wrapper of its own and relocates none of the nodes the FRAMEWORK renders into it, because the framework owns them. Not "none of its children": core's own scroll-to-bottom button is re-appended whenever it stops being last, and that path runs in this mode only. All four wrappers set it. */
1084
1084
  set frameworkManaged(v) { this.write('framework-managed', v); }
1085
1085
  /** A segment grew or settled during a stream. */
1086
1086
  segmentUpdate = new EventEmitter();
1087
1087
  /** `clearAll()` finished emptying the transcript. No detail. */
1088
1088
  resetDone = new EventEmitter();
1089
- /** 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 */
1089
+ /** The active branch path changed, after a retry fork or a navigation. */
1090
1090
  pathChanged = new EventEmitter();
1091
1091
  onSegmentUpdate(e) { this.segmentUpdate.emit(e.detail); }
1092
1092
  onResetDone() { this.resetDone.emit(); }
@@ -1125,11 +1125,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
1125
1125
  type: HostListener,
1126
1126
  args: ['aparte-path-changed', ['$event']]
1127
1127
  }] } });
1128
- /** `<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. */
1128
+ /** `<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, whether a panel is up. */
1129
1129
  class AparteComposerDirective extends AparteElementBase {
1130
- /** Forwarded to `<aparte-composer-input>` through the internal bus. */
1130
+ /** Fallback placeholder for `<aparte-composer-input>`, which reads it off this element when it carries none of its own. Read when that input renders, not pushed: changing it here leaves an input already on the page as it was. */
1131
1131
  set placeholder(v) { this.write('placeholder', v); }
1132
- /** Disables the whole composer, every part included. */
1132
+ /** Disables the composer's own controls — the input, send, add-attachment and `<aparte-composer-action>` buttons each read it. What you put in the toolbar is yours to disable. */
1133
1133
  set disabled(v) { this.write('disabled', v); }
1134
1134
  /** The id of the `<aparte-chat>` this composer drives. */
1135
1135
  set target(v) { this.write('target', v); }
@@ -1184,7 +1184,7 @@ class AparteComposerActionDirective extends AparteElementBase {
1184
1184
  set label(v) { this.write('label', v); }
1185
1185
  /** Disables the button */
1186
1186
  set disabled(v) { this.write('disabled', v); }
1187
- /** 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. */
1187
+ /** Identifies WHICH button fired; carried as `AparteActionClickEventDetail.actionId`. Read lazily at dispatch time rather than observed, so changing it takes effect on the next click. */
1188
1188
  set actionId(v) { this.write('action-id', v); }
1189
1189
  /** 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 } */
1190
1190
  actionClick = new EventEmitter();
@@ -1216,7 +1216,7 @@ class AparteComposerAddAttachmentDirective extends AparteElementBase {
1216
1216
  set accept(v) { this.write('accept', v); }
1217
1217
  /** Allow multiple file selection (default: true) */
1218
1218
  set multiple(v) { this.write('multiple', v ? '' : 'false'); }
1219
- /** Greys out the picker and ignores drops. */
1219
+ /** Greys out the picker. Drops are gated by the composer root's `disabled`, not by this one. */
1220
1220
  set disabled(v) { this.write('disabled', v); }
1221
1221
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AparteComposerAddAttachmentDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1222
1222
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.2.25", type: AparteComposerAddAttachmentDirective, isStandalone: true, selector: "aparte-composer-add-attachment", inputs: { accept: "accept", multiple: ["multiple", "multiple", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute] }, usesInheritance: true, ngImport: i0 });
@@ -1275,7 +1275,7 @@ class AparteComposerInputDirective extends AparteElementBase {
1275
1275
  set minHeight(v) { this.write('min-height', v); }
1276
1276
  /** Makes the field non-editable; the composer's own `disabled` also reaches it. */
1277
1277
  set disabled(v) { this.write('disabled', v); }
1278
- /** 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. */
1278
+ /** A submitting Enter was pressed with no `<aparte-composer>` ancestor to submit to; with one it calls `root.submit()` and dispatches nothing. No detail — the host that placed this primitive reads `getValue()`. */
1279
1279
  composerSubmit = new EventEmitter();
1280
1280
  onComposerSubmit() { this.composerSubmit.emit(); }
1281
1281
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AparteComposerInputDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
@@ -1391,15 +1391,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
1391
1391
  type: Directive,
1392
1392
  args: [{ selector: 'aparte-elicitation', standalone: true }]
1393
1393
  }] });
1394
+ /** `<aparte-icon>` — AparteIcon */
1395
+ class AparteIconDirective extends AparteElementBase {
1396
+ /** Which glyph to draw. One of the names `setIconProvider` accepts; an unknown name draws nothing rather than a broken-image box. */
1397
+ set name(v) { this.write('name', v); }
1398
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AparteIconDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1399
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.25", type: AparteIconDirective, isStandalone: true, selector: "aparte-icon", inputs: { name: "name" }, usesInheritance: true, ngImport: i0 });
1400
+ }
1401
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AparteIconDirective, decorators: [{
1402
+ type: Directive,
1403
+ args: [{ selector: 'aparte-icon', standalone: true }]
1404
+ }], propDecorators: { name: [{
1405
+ type: Input
1406
+ }] } });
1394
1407
  /** `<aparte-optgroup>` — AparteOptgroup */
1395
1408
  class AparteOptgroupDirective extends AparteElementBase {
1396
1409
  /** Group label */
1397
1410
  set label(v) { this.write('label', v); }
1398
- /** Allow collapse/expand */
1411
+ /** Adds the chevron and the click handler to the header — so it needs a `label`, and it is read only when that header is first built. */
1399
1412
  set collapsible(v) { this.write('collapsible', v); }
1400
1413
  /** Collapsed state */
1401
1414
  set collapsed(v) { this.write('collapsed', v); }
1402
- /** Shows a spinner in place of the group's options. */
1415
+ /** Appends a spinner row to the group; the options stay visible. */
1403
1416
  set loading(v) { this.write('loading', v); }
1404
1417
  /** The group was collapsed or expanded. */
1405
1418
  optgroupToggle = new EventEmitter();
@@ -1474,11 +1487,11 @@ class AparteSelectDirective extends AparteElementBase {
1474
1487
  set value(v) { this.write('value', v); }
1475
1488
  /** Shown while nothing is selected. */
1476
1489
  set placeholder(v) { this.write('placeholder', v); }
1477
- /** Blocks opening and selection. */
1490
+ /** Blocks opening the dropdown. */
1478
1491
  set disabled(v) { this.write('disabled', v); }
1479
- /** Renders `<aparte-optgroup>` children as collapsible groups. */
1492
+ /** Observed, never read: `<aparte-optgroup>` children render as groups without it. */
1480
1493
  set grouped(v) { this.write('grouped', v); }
1481
- /** Adds a filter field above the options. */
1494
+ /** Adds a filter field above the options. Read on the first render only. */
1482
1495
  set searchable(v) { this.write('searchable', v); }
1483
1496
  /** Reflects (and controls) whether the dropdown is open. */
1484
1497
  set open(v) { this.write('open', v); }
@@ -1550,6 +1563,7 @@ const APARTE_ELEMENT_DIRECTIVES = [
1550
1563
  AparteComposerToolbarDirective,
1551
1564
  AparteConversationListDirective,
1552
1565
  AparteElicitationDirective,
1566
+ AparteIconDirective,
1553
1567
  AparteOptgroupDirective,
1554
1568
  AparteOptionDirective,
1555
1569
  AparteProgressSpinnerDirective,
@@ -1 +1 @@
1
- {"version":3,"file":"aparte-angular.mjs","sources":["../../src/lib/aparte-ai.service.ts","../../src/lib/provide-aparte.ts","../../src/lib/aparte-chat.component.ts","../../src/lib/aparte-ui.component.ts","../../src/generated/element.directives.ts","../../src/lib/conversation-manager.service.ts","../../src/index.ts","../../src/aparte-angular.ts"],"sourcesContent":["import { Injectable, OnDestroy, inject, InjectionToken } from '@angular/core';\nimport { AparteClient, AparteClientOptions } from '@aparte/core';\n\n/**\n * Injection token for AparteClient configuration. Provided by `provideAparte()`;\n * omit it and the service falls back to `{}`.\n */\nexport const APARTE_CLIENT_OPTIONS = new InjectionToken<AparteClientOptions>('APARTE_CLIENT_OPTIONS');\n\n/**\n * AparteAiService\n *\n * Angular service to bridge the UI events with AI Providers.\n * Uses the agnostic `AparteClient` under the hood.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class AparteAiService implements OnDestroy {\n private readonly _clientOptions = inject(APARTE_CLIENT_OPTIONS, { optional: true });\n private _client: AparteClient = new AparteClient(this._clientOptions ?? {});\n\n /**\n * Start listening to `aparte-send` events globally.\n * This connects the <aparte-chat> components to the AI Providers.\n *\n * `provideAparte()` calls this for you on app init (its `autoConnect`,\n * on by default). Idempotent — a manual call on top of that is a no-op,\n * so it stays the escape hatch when configuring without `provideAparte`.\n */\n connect(): void {\n this._client.start();\n }\n\n /**\n * Stop listening.\n */\n disconnect(): void {\n this._client.stop();\n }\n\n /**\n * Abort the current AI response and all active tool calls.\n */\n abort(): void {\n this._client.abort();\n }\n\n ngOnDestroy(): void {\n this.disconnect();\n }\n}\n","import {\n DestroyRef,\n InjectionToken,\n inject,\n makeEnvironmentProviders,\n provideAppInitializer,\n type EnvironmentProviders,\n} from '@angular/core';\nimport {\n aparteGlobalConfig,\n type AparteAIProvider,\n type AparteClientOptions,\n type AparteIconProvider,\n type AparteLocale,\n type AparteMarkdownProvider,\n type AparteModelConfig,\n type AparteSkeletonProvider,\n} from '@aparte/core';\nimport { APARTE_CLIENT_OPTIONS, AparteAiService } from './aparte-ai.service';\n\n/**\n * Any function that initialises a plugin — sync or async, so it can wrap a\n * dynamic `import()` of a package YOU choose:\n * `() => import('@aparte/plugin-model-selector')`.\n */\nexport type ApartePluginLoader = () => void | Promise<void>;\n\n/**\n * Config for {@link provideAparte}. Deliberately **instance-agnostic**: every\n * plugin/locale slot takes a provider OBJECT or a LOADER function you supply —\n * this package never hardcodes (nor depends on) a catalog of `@aparte/*` package\n * names, so it stays a leaf with only `@aparte/core` + Angular as peers.\n */\nexport interface ProvideAparteOptions {\n /** AI providers to register (e.g. from `@aparte/provider-openai-compat`). */\n providers?: AparteAIProvider[];\n\n /** Optional plugin wiring — objects or loaders, never package-name strings. */\n plugins?: {\n /** Action plugins, as loaders: `[() => import('@aparte/plugin-model-selector')]`. */\n actions?: ApartePluginLoader[];\n /** An icon provider object, or a loader that registers one. */\n icons?: AparteIconProvider | ApartePluginLoader;\n /** A skeleton provider object, or a loader that registers one. */\n skeleton?: AparteSkeletonProvider | ApartePluginLoader;\n /** A loader that applies a theme. */\n theme?: ApartePluginLoader;\n /** A markdown provider `(raw: string) => string`, or a loader that registers one. */\n markdown?: AparteMarkdownProvider | ApartePluginLoader;\n };\n\n /** Model selection configuration. */\n modelConfig?: AparteModelConfig;\n\n /** A locale OBJECT (e.g. `fr` from `@aparte/locale-fr`) — not a package-name string. */\n locale?: AparteLocale;\n\n /** Theme mode; `'auto'` follows the system preference. */\n themeMode?: 'light' | 'dark' | 'auto';\n\n /** Options for the `AparteClient` mounted by {@link AparteAiService}. */\n clientOptions?: AparteClientOptions;\n\n /**\n * Start the {@link AparteAiService} client once the app initialises (after\n * providers/plugins are registered), so sends stream without a manual\n * `AparteAiService.connect()` — \"wire the config and it works\", same as the\n * React/Vue/Svelte wrappers. Default `true`; set `false` to control the\n * client lifecycle yourself.\n */\n autoConnect?: boolean;\n}\n\n/** Holds the resolved aparté config, for consumers that want to inject it. */\nexport const APARTE_CONFIG_TOKEN = new InjectionToken<ProvideAparteOptions>('APARTE_CONFIG');\n\nasync function loadIconPlugin(plugin: AparteIconProvider | ApartePluginLoader): Promise<void> {\n if (typeof plugin === 'object' && plugin !== null) {\n aparteGlobalConfig.setIconProvider(plugin);\n return;\n }\n try {\n await (plugin as ApartePluginLoader)();\n } catch (err) {\n console.warn('[aparte] Failed to load icon plugin', err);\n }\n}\n\nasync function loadSkeletonPlugin(plugin: AparteSkeletonProvider | ApartePluginLoader): Promise<void> {\n if (typeof plugin === 'object' && plugin !== null) {\n aparteGlobalConfig.setSkeletonProvider(plugin);\n return;\n }\n try {\n await (plugin as ApartePluginLoader)();\n } catch (err) {\n console.warn('[aparte] Failed to load skeleton plugin', err);\n }\n}\n\nasync function loadMarkdownPlugin(plugin: AparteMarkdownProvider | ApartePluginLoader): Promise<void> {\n // A markdown provider takes the raw string; a loader takes nothing.\n if (plugin.length >= 1) {\n aparteGlobalConfig.setMarkdownProvider(plugin as AparteMarkdownProvider);\n return;\n }\n try {\n await (plugin as ApartePluginLoader)();\n } catch (err) {\n console.warn('[aparte] Failed to load markdown plugin', err);\n }\n}\n\nasync function runLoader(loader: ApartePluginLoader, label: string): Promise<void> {\n try {\n await loader();\n } catch (err) {\n console.warn(`[aparte] Failed to load ${label} plugin`, err);\n }\n}\n\nasync function loadPlugins(options: ProvideAparteOptions): Promise<void> {\n const plugins = options.plugins;\n if (!plugins) return;\n const pending: Promise<void>[] = [];\n\n for (const action of plugins.actions ?? []) pending.push(runLoader(action, 'action'));\n if (plugins.icons) pending.push(loadIconPlugin(plugins.icons));\n if (plugins.skeleton) pending.push(loadSkeletonPlugin(plugins.skeleton));\n if (plugins.theme) pending.push(runLoader(plugins.theme, 'theme'));\n if (plugins.markdown) pending.push(loadMarkdownPlugin(plugins.markdown));\n\n await Promise.all(pending);\n}\n\n/** Reflect the theme mode on the document root. */\nfunction applyThemeMode(mode: 'light' | 'dark' | 'auto', destroyRef: DestroyRef): void {\n if (mode !== 'auto') {\n document.documentElement.setAttribute('data-aparte-theme', mode);\n return;\n }\n const query = window.matchMedia('(prefers-color-scheme: dark)');\n const onChange = (e: MediaQueryListEvent) => {\n document.documentElement.setAttribute('data-aparte-theme', e.matches ? 'dark' : 'light');\n };\n document.documentElement.setAttribute('data-aparte-theme', query.matches ? 'dark' : 'light');\n query.addEventListener('change', onChange);\n // Released with the environment injector, so repeated bootstraps (TestBed, a\n // multi-instance embed) don't stack listeners on the media query forever.\n destroyRef.onDestroy(() => query.removeEventListener('change', onChange));\n}\n\n/**\n * Configure aparté for a standalone Angular app. Registers your AI providers,\n * model config, locale and optional plugins on `aparteGlobalConfig`,\n * provides {@link APARTE_CLIENT_OPTIONS} for {@link AparteAiService}, and\n * starts the client (see `autoConnect`) — no manual\n * `AparteAiService.connect()` needed.\n *\n * The components (`AparteChatComponent`, `AparteUiComponent`) are standalone and\n * work WITHOUT this — it is config sugar. You can equally call `aparteGlobalConfig.*`\n * yourself, exactly like the React/Vue/Svelte wrappers do.\n *\n * @example\n * bootstrapApplication(App, {\n * providers: [\n * provideAparte({\n * providers: [createOpenAICompatProvider(presets.OPENROUTER)],\n * clientOptions: { keyResolver },\n * }),\n * ],\n * });\n */\nexport function provideAparte(options: ProvideAparteOptions = {}): EnvironmentProviders {\n return makeEnvironmentProviders([\n { provide: APARTE_CONFIG_TOKEN, useValue: options },\n { provide: APARTE_CLIENT_OPTIONS, useValue: options.clientOptions ?? {} },\n provideAppInitializer(async () => {\n const destroyRef = inject(DestroyRef);\n // inject() only works before the first await — grab the service now,\n // connect at the end (after plugins) so the first send already sees\n // markdown/action providers. SSR-safe: no listener without a window.\n const ai = options.autoConnect !== false && typeof window !== 'undefined'\n ? inject(AparteAiService)\n : null;\n if (options.providers?.length) {\n aparteGlobalConfig.registerAIProvider(...options.providers);\n }\n if (options.modelConfig) {\n aparteGlobalConfig.setModelConfig(options.modelConfig);\n }\n if (options.locale) {\n aparteGlobalConfig.setLocale(options.locale);\n }\n await loadPlugins(options);\n if (options.themeMode) {\n applyThemeMode(options.themeMode, destroyRef);\n }\n ai?.connect();\n }),\n ]);\n}\n","import {\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n ElementRef,\n OnDestroy,\n ViewChild,\n QueryList,\n ViewChildren,\n output,\n signal,\n computed,\n ChangeDetectionStrategy,\n AfterViewInit,\n Input,\n TemplateRef,\n inject,\n effect,\n booleanAttribute,\n numberAttribute,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { Observable } from 'rxjs';\nimport type {\n AparteMessage,\n AparteSegment,\n AparteSendEventDetail,\n AparteChatHostBinding,\n AparteConfig,\n AparteActionEventDetail,\n AparteChatImperativeApi,\n} from '@aparte/core';\nimport { AparteChatHost, isAwaitingReply, uuid } from '@aparte/core';\n\n/**\n * AparteChatComponent — Angular 19 Wrapper\n *\n * Standalone component wrapping aparté Web Components with Angular Signals.\n * The streaming / branch-navigation / host-method orchestration (orphan-stream\n * guard, lifecycle tracking, conversation lifecycle, bubble reconciliation)\n * lives in the framework-agnostic `AparteChatHost` from `@aparte/core`; this\n * component only owns the Angular-idiomatic surface (signals, template, DI) and\n * binds the host over its `messages` signal.\n */\n@Component({\n selector: 'aparte-chat',\n standalone: true,\n imports: [NgTemplateOutlet],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n // This selector is ALSO core's `<aparte-chat>` custom element, so the host gets\n // upgraded by core on insert. `framework-managed` tells that shell to keep its\n // hands off: THIS component renders the viewport + composer and drives them\n // through AparteChatHost. Without it, core injects its default composition\n // underneath ours (its own check can't see our children — they render later).\n host: { 'framework-managed': '' },\n template: `\n <div\n class=\"aparte-chat-container\"\n [class.aparte-chat-container--auto-center]=\"centerWhenEmpty()\"\n [attr.data-aparte-empty]=\"centerWhenEmpty() && messages().length === 0 ? '' : null\"\n >\n <aparte-chat-viewport #viewport framework-managed=\"\">\n @if (messages().length === 0) {\n <!-- Welcome / placeholder shown inside the viewport while empty. -->\n <ng-content select=\"[slot='empty-state']\"></ng-content>\n }\n @for (message of messages(); track message.id) {\n @if (bubbleTemplate) {\n <!-- Render your OWN element per message; driven by the reactive\n messages() signal so it streams live. -->\n <ng-container\n [ngTemplateOutlet]=\"bubbleTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: message }\"\n ></ng-container>\n } @else {\n <aparte-chat-bubble\n #bubble\n [attr.message-id]=\"message.id\"\n [attr.data-role]=\"message.role\"\n [attr.timestamp]=\"message.timestamp\"\n [attr.content]=\"message.content\"\n [attr.streaming]=\"awaitingReply(message) ? '' : null\"\n ></aparte-chat-bubble>\n }\n }\n <aparte-chat-status\n [attr.visible]=\"isTyping() ? '' : null\"\n [attr.text]=\"typingText()\"\n ></aparte-chat-status>\n </aparte-chat-viewport>\n\n <ng-content select=\"[slot='above-composer']\"></ng-content>\n\n <aparte-composer\n #input\n [attr.placeholder]=\"placeholder()\"\n [attr.disabled]=\"disabled() ? '' : null\"\n [attr.submit-on-enter]=\"submitOnEnter() ? null : 'false'\"\n (aparte-send)=\"onAparteSend($event)\"\n >\n <!-- Custom composer via [slot='composer']; falls back to the default\n shell (input · send + footer slots, plus the attachment primitives\n when the attachments input is set). Project your own\n aparte-composer-* layout for a skin-specific composer. -->\n <ng-content select=\"[slot='composer']\">\n <div class=\"aparte-composer-shell\">\n @if (attachments()) {\n <aparte-composer-attachments></aparte-composer-attachments>\n }\n <div class=\"aparte-composer-row\">\n @if (attachments()) {\n <aparte-composer-add-attachment></aparte-composer-add-attachment>\n }\n <aparte-composer-input></aparte-composer-input>\n <aparte-composer-send></aparte-composer-send>\n </div>\n <!-- The composer's bottom row. ONE slot: placement is the DOM order of\n what you project, and margin-inline-start:auto pushes a control to the\n end (a logical property, so it reads correctly in RTL).\n Angular cannot test whether anything projects into an ng-content, so\n unlike the other three wrappers the element is always rendered -- but it\n declares itself data-empty when nothing lands in it, and the stylesheet\n hides it then. The guarantee no longer depends on Angular stripping\n template whitespace. -->\n <aparte-composer-toolbar>\n <ng-content select=\"[slot='toolbar']\"></ng-content>\n </aparte-composer-toolbar>\n </div>\n </ng-content>\n </aparte-composer>\n </div>\n `,\n styles: [`\n :host {\n display: block;\n width: 100%;\n height: 100%;\n }\n\n .aparte-chat-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n overflow: hidden;\n }\n\n aparte-chat-viewport {\n flex: 1;\n min-height: 0;\n }\n\n aparte-composer {\n flex-shrink: 0;\n }\n `]\n})\nexport class AparteChatComponent implements AfterViewInit, OnDestroy, AparteChatImperativeApi {\n constructor() {\n // Reactive effect to reconcile bubbles when the messages signal updates.\n // Debounced with requestAnimationFrame so rapid token bursts only trigger\n // one sync per paint frame instead of N syncs for N tokens.\n effect(() => {\n const msgs = this.messages();\n if (msgs.length > 0) {\n if (this._syncRafId !== null) return;\n this._syncRafId = requestAnimationFrame(() => {\n this._syncRafId = null;\n this._host?.syncBubbles();\n });\n }\n });\n }\n\n private elementRef = inject(ElementRef);\n\n /**\n * Template bridge to core's shared `isAwaitingReply` (an Angular template can't\n * call an imported function). One rule for the four wrappers and core itself,\n * so \"is this bubble in flight\" can't drift between them.\n */\n readonly awaitingReply = isAwaitingReply;\n\n // ── Input Signals ────────────────────────────────────────────────────────\n\n /** Messages to display */\n @Input('messages') set messagesInput(val: AparteMessage[]) {\n this.messages.set(val);\n // When messages are cleared (new conversation), reset the host's render cache\n // so the next conversation starts clean — same as React/Vue/Svelte do. (The\n // viewport's own clearMessages() is @deprecated in core and only clears its\n // repo; the host's clearAll() path already owns the real teardown.)\n if (val.length === 0) this._host?.clearRenderCache();\n }\n readonly messages = signal<AparteMessage[]>([]);\n\n /** Input placeholder text */\n @Input('placeholder') set placeholderInput(val: string) { this.placeholder.set(val); }\n readonly placeholder = signal<string>('Type a message...');\n\n /** Whether the input is disabled */\n @Input({ alias: 'disabled', transform: booleanAttribute }) set disabledInput(val: boolean) { this.disabled.set(val); }\n readonly disabled = signal<boolean>(false);\n\n /** When false, Shift+Enter submits and a bare Enter inserts a newline. */\n @Input({ alias: 'submitOnEnter', transform: booleanAttribute }) set submitOnEnterInput(val: boolean) { this.submitOnEnter.set(val); }\n readonly submitOnEnter = signal<boolean>(true);\n\n /**\n * Opt in to the \"centered composer when empty\" layout: the composer sits\n * vertically centered with the `[slot='empty-state']` content above it while\n * the list is empty, then slides to the bottom on the first message (~0.3s).\n * Off by default — additive (adds the `--auto-center` modifier + a\n * `data-aparte-empty` attribute the shipped `aparte.css` recipe keys off).\n */\n @Input({ alias: 'centerWhenEmpty', transform: booleanAttribute }) set centerWhenEmptyInput(val: boolean) { this.centerWhenEmpty.set(val); }\n readonly centerWhenEmpty = signal<boolean>(false);\n\n /**\n * Add the file picker + chips strip to the default composer shell. **Off by\n * default**, because the capability needs a host that consumes the files: an\n * `AparteClient` inlines them per its `rawFileInject` option, but if you drive\n * your own loop you must read `event.files` on `(messageSent)` — otherwise the\n * file the user deliberately attached is dropped in silence. No effect when you\n * project a `[slot='composer']` (drop `<aparte-composer-add-attachment>` and\n * `<aparte-composer-attachments>` in it yourself).\n */\n @Input({ alias: 'attachments', transform: booleanAttribute }) set attachmentsInput(val: boolean) { this.attachments.set(val); }\n readonly attachments = signal<boolean>(false);\n\n /** Whether the assistant is currently typing/streaming */\n @Input({ alias: 'isTyping', transform: booleanAttribute }) set isTypingInput(val: boolean) { this.isTyping.set(val); }\n readonly isTyping = signal<boolean>(false);\n\n /** Text to show in the typing status */\n @Input('typingText') set typingTextInput(val: string) { this.typingText.set(val); }\n readonly typingText = signal<string>('Assistant is thinking...');\n\n /** Duration in ms to freeze spacer recalculation after a conversation swap. */\n @Input({ alias: 'layoutTransitionMs', transform: numberAttribute }) layoutTransitionMs = 0;\n\n /**\n * Active conversation id. When provided, the host attaches an\n * `AparteConversationController` that loads/persists messages via the\n * `AparteConversationManager` registered in `aparteGlobalConfig`. Setting a different id\n * mid-stream aborts the previous request; `null` deselects.\n */\n @Input('conversationId') set conversationIdInput(val: string | null | undefined) {\n const next = val ?? null;\n if (next === this._conversationId) return;\n this._conversationId = next;\n if (this._host) void this._host.setConversationId(next);\n }\n private _conversationId: string | null = null;\n\n /**\n * Instance {@link AparteConfig} for this chat. When set, aparté components\n * inside resolve THIS config instead of `aparteGlobalConfig`, so\n * several independently-configured chats can coexist on one page. Omit for the\n * global config. Read once in `ngAfterViewInit` when the host is created.\n */\n @Input() config?: AparteConfig;\n\n /**\n * Render your OWN element per message in place of `<aparte-chat-bubble>`.\n * Opt-in — provide a `<ng-template let-message>` and pass its ref. Driven by\n * the reactive `messages()` signal, so it updates live during streaming.\n * The built-in action bar (retry/edit/branch) belongs to the native bubble;\n * a custom bubble owns whatever it wires.\n * @example\n * <aparte-chat [bubbleTemplate]=\"tpl\" />\n * <ng-template #tpl let-message>{{ message.content }}</ng-template>\n */\n @Input() bubbleTemplate?: TemplateRef<{ $implicit: AparteMessage }>;\n\n // ── Outputs ────────────────────────────────────────────────────────────\n\n /**\n * User submitted a message from the composer. It is **appended to the thread\n * automatically** (optimistic UI) before this fires — do NOT add it again in\n * the handler (uncontrolled → duplicates; controlled → mirror it into your\n * own `[messages]`). For side-effects: scroll, analytics, send.\n */\n readonly messageSent = output<AparteSendEventDetail>();\n /**\n * Emitted when a custom bubble action (registered via\n * `aparteGlobalConfig.registerAction` with `zones: ['bubble']`) is clicked — a typed\n * wrapper over the bubbling `aparte-action` DOM event. Switch on `$event.actionId`.\n */\n readonly action = output<AparteActionEventDetail>();\n /** Emitted when messages are updated internally (e.g. by AparteClient) */\n readonly messagesChange = output<AparteMessage[]>();\n /** Emitted when a message is added internally (e.g. by appendMessage) */\n readonly messageAppended = output<AparteMessage>();\n /** The typing/\"thinking\" indicator toggled (the host flips it off on the first streamed token). */\n readonly typingChange = output<boolean>();\n /** Emitted when the controller lazily creates a conversation on first send. */\n readonly conversationCreated = output<string>();\n\n // ── View Children ────────────────────────────────────────────────────────\n @ViewChild('viewport') viewportRef?: ElementRef<HTMLElement>;\n @ViewChild('input') inputRef?: ElementRef<HTMLElement>;\n @ViewChildren('bubble') bubbleRefs!: QueryList<ElementRef<HTMLElement>>;\n\n // ── Private State ────────────────────────────────────────────────────────\n /** Mirror of the host's streaming target id (drives `isStreaming`). */\n private readonly _streamingId = signal<string | null>(null);\n /** Computed: is currently streaming */\n readonly isStreaming = computed(() => this._streamingId() !== null);\n\n /** rAF id used to coalesce rapid signal updates during streaming */\n private _syncRafId: number | null = null;\n\n /** The framework-agnostic chat-host orchestrator (created in ngAfterViewInit). */\n private _host?: AparteChatHost;\n private _unbindHost?: () => void;\n /** QueryList.changes subscription — released in ngOnDestroy so SPA route\n * churn doesn't leak a live subscription per mount. */\n private _bubbleRefsSub?: { unsubscribe(): void };\n\n ngAfterViewInit(): void {\n const host = this.elementRef.nativeElement as HTMLElement;\n\n // Ensure a stable id so aparte-composer can reference the host via `target`,\n // letting AparteClient find it without DOM traversal across re-renders.\n if (!host.id) host.id = `aparte-chat-${uuid()}`;\n const composerEl = this.inputRef?.nativeElement;\n if (composerEl) composerEl.setAttribute('target', host.id);\n\n const binding: AparteChatHostBinding = {\n hostId: host.id,\n host,\n viewport: this.viewportRef?.nativeElement ?? null,\n getMessages: () => this.messages(),\n setMessages: (msgs) => this.messages.set(msgs as AparteMessage[]),\n onMessagesChange: (msgs) => this.messagesChange.emit(msgs as AparteMessage[]),\n onMessageAppended: (msg) => this.messageAppended.emit(msg as AparteMessage),\n onTypingChange: (typing) => { this.isTyping.set(typing); this.typingChange.emit(typing); },\n onStreamingChange: (id) => this._streamingId.set(id),\n // Sibling-info / deferred work runs after Angular has re-rendered.\n afterRender: (cb) => { setTimeout(cb, 0); },\n resetComposer: () => {\n (this.inputRef?.nativeElement as unknown as { reset?: () => void })?.reset?.();\n },\n };\n\n this._host = new AparteChatHost(binding, {\n layoutTransitionMs: this.layoutTransitionMs,\n conversationId: this._conversationId,\n onConversationCreated: (id) => {\n this._conversationId = id;\n this.conversationCreated.emit(id);\n },\n config: this.config,\n });\n this._unbindHost = this._host.bind();\n\n // Custom bubble actions bubble to the host as `aparte-action`; surface them as\n // the typed `action` output. (addEventListener, not @HostListener: Angular\n // parses a colon in the event name as a `target:event` global target.)\n host.addEventListener('aparte-action', this._onAction);\n\n // Re-reconcile bubbles whenever Angular's @for materialises/destroys them.\n this._host.syncBubbles();\n this._bubbleRefsSub = this.bubbleRefs.changes.subscribe(() => this._host?.syncBubbles());\n }\n\n private readonly _onAction = (event: Event): void => {\n this.action.emit((event as CustomEvent<AparteActionEventDetail>).detail);\n };\n\n ngOnDestroy(): void {\n if (this._syncRafId !== null) {\n cancelAnimationFrame(this._syncRafId);\n this._syncRafId = null;\n }\n (this.elementRef.nativeElement as HTMLElement).removeEventListener('aparte-action', this._onAction);\n this._bubbleRefsSub?.unsubscribe();\n this._bubbleRefsSub = undefined;\n this._unbindHost?.();\n this._unbindHost = undefined;\n this._host = undefined;\n }\n\n // ── Public imperative API (delegates to the host) ──────────────────────────\n\n /** Append a message optimistically. */\n appendMessage(message: AparteMessage): void { this._host?.appendMessage(message); }\n /** Atomic update for a message. */\n updateMessage(messageId: string, updates: Partial<AparteMessage>): void {\n this._host?.updateMessage(messageId, updates);\n }\n /** Update the last message content (streaming text). */\n updateLastMessage(content: string, options?: { append?: boolean }): void {\n this._host?.updateLastMessage(content, options);\n }\n /** Add a segment to the last message. */\n addSegment(segment: AparteSegment): void { this._host?.addSegment(segment); }\n /** Update a segment in the last message. */\n updateSegment(segmentId: string, updates: Partial<AparteSegment>): void {\n this._host?.updateSegment(segmentId, updates);\n }\n /** Remove a transient segment. */\n removeSegment(segmentId: string): void { this._host?.removeSegment(segmentId); }\n /** Append content to a segment in the last message. */\n appendToSegment(segmentId: string, content: string): void {\n this._host?.appendToSegment(segmentId, content);\n }\n /** Read the current message list. */\n getMessages(): AparteMessage[] { return this._host?.getMessages() ?? this.messages(); }\n /** Clear all messages + reset state. */\n clearMessages(): void { this._host?.clearMessages(); }\n /** Scroll the viewport to the latest message. */\n scrollToBottom(): void {\n (this.viewportRef?.nativeElement as unknown as { scrollToBottom?: () => void })?.scrollToBottom?.();\n }\n /**\n * The `<aparte-chat-viewport>` element — for custom scroll handling, an\n * IntersectionObserver, etc. Same `getViewport()` accessor on all four\n * wrappers.\n */\n getViewport(): HTMLElement | null { return this.viewportRef?.nativeElement ?? null; }\n /** Focus the composer input. */\n focusInput(): void {\n (this.inputRef?.nativeElement as unknown as { focus?: () => void })?.focus?.();\n }\n /** Create a new branch from a message (returns the new sibling index). */\n addBranch(messageId: string): number { return this._host?.addBranch(messageId) ?? 0; }\n /** Add a sibling of an existing message (returns the new id). */\n addSiblingOf(existingId: string, newMessage: AparteMessage): string | null {\n return this._host?.addSiblingOf(existingId, newMessage) ?? null;\n }\n /** Remove a message and all descendants (edit flow). */\n truncateFrom(messageId: string): void { this._host?.truncateFrom(messageId); }\n /** Keep up to and including a user message, drop later responses (retry). */\n truncateResponsesAfter(userMessageId: string): void {\n this._host?.truncateResponsesAfter(userMessageId);\n }\n\n // ── Token streaming (cross-wrapper contract + Observable adapter) ──────────\n\n /**\n * Inject a token stream for LLM streaming. Takes the cross-wrapper\n * `AsyncIterable<string>` contract (the exact call that works on\n * React/Vue/Svelte) — or an Angular-idiomatic RxJS `Observable<string>`,\n * adapted into the host's agnostic `streamTokens(AsyncIterable)` so the\n * orphan-stream guard + id tracking stay in one place (the host).\n */\n async injectTokenStream(\n messageId: string,\n stream: Observable<string> | AsyncIterable<string>,\n ): Promise<void> {\n if (!this._host) return;\n const tokens = Symbol.asyncIterator in stream\n ? (stream as AsyncIterable<string>)\n : this._observableToAsyncIterable(stream as Observable<string>);\n await this._host.streamTokens(messageId, tokens);\n }\n\n /** Stop any active token stream. */\n stopTokenStream(): void { this._host?.stopTokenStream(); }\n\n /**\n * Set the active conversation id imperatively — parity with the other\n * wrappers' handles (the `conversationId` `@Input` remains the declarative\n * path). Delegates to the host, which loads/persists via the registered\n * `AparteConversationManager`.\n */\n setConversationId(id: string | null): Promise<void> {\n return this._host?.setConversationId(id) ?? Promise.resolve();\n }\n\n private _observableToAsyncIterable(stream: Observable<string>): AsyncIterable<string> {\n return {\n [Symbol.asyncIterator](): AsyncIterator<string> {\n const buffer: string[] = [];\n let finished = false;\n let failure: unknown = null;\n let pending: {\n resolve: (r: IteratorResult<string>) => void;\n reject: (e: unknown) => void;\n } | null = null;\n const settle = () => {\n if (!pending) return;\n if (failure !== null) { const p = pending; pending = null; p.reject(failure); return; }\n if (buffer.length) {\n const p = pending; pending = null;\n p.resolve({ value: buffer.shift() as string, done: false });\n return;\n }\n if (finished) {\n const p = pending; pending = null;\n p.resolve({ value: undefined as unknown as string, done: true });\n }\n };\n const sub = stream.subscribe({\n next: (v) => { buffer.push(v); settle(); },\n error: (e) => { failure = e; settle(); },\n complete: () => { finished = true; settle(); },\n });\n return {\n next(): Promise<IteratorResult<string>> {\n if (failure !== null) return Promise.reject(failure);\n if (buffer.length) {\n return Promise.resolve({ value: buffer.shift() as string, done: false });\n }\n if (finished) {\n return Promise.resolve({ value: undefined as unknown as string, done: true });\n }\n return new Promise((resolve, reject) => { pending = { resolve, reject }; });\n },\n return(): Promise<IteratorResult<string>> {\n sub.unsubscribe();\n // If a consumer is mid-`await next()` on an empty buffer (e.g. the\n // orphan-stream guard calling `return()` on stop/teardown), settle\n // that pending promise now with done:true — otherwise it hangs\n // forever, since unsubscribing means `next` and `complete` will\n // never fire again to resolve it.\n if (pending) {\n const p = pending;\n pending = null;\n p.resolve({ value: undefined as unknown as string, done: true });\n }\n finished = true;\n return Promise.resolve({ value: undefined as unknown as string, done: true });\n },\n };\n },\n };\n }\n\n /** Handle aparte-send event from the composer Web Component. */\n onAparteSend(event: Event): void {\n const detail = (event as CustomEvent<AparteSendEventDetail>).detail;\n // Smooth-scroll the next auto-scroll (when Angular adds the user bubble).\n (this.viewportRef?.nativeElement as unknown as { requestSmoothScroll?: () => void })\n ?.requestSmoothScroll?.();\n this.messageSent.emit(detail);\n }\n}\n","import {\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n ElementRef,\n OnChanges,\n OnDestroy,\n AfterViewInit,\n SimpleChanges,\n ChangeDetectionStrategy,\n Input,\n output,\n Renderer2,\n inject\n} from '@angular/core';\nimport { applyElementProps, APARTE_DEFAULT_UI_EVENTS } from '@aparte/core';\n\n/**\n * The imperative surface of the `AparteUi` proxy — the same\n * `getElement`/`callMethod` contract on all four wrappers.\n */\nexport interface AparteUiHandle {\n getElement<T extends HTMLElement = HTMLElement>(): T | null;\n callMethod<T = unknown>(methodName: string, ...args: unknown[]): T | undefined;\n}\n\n/**\n * AparteUiComponent - Universal UI Proxy\n *\n * A pass-through proxy component that dynamically injects any aparté\n * Web Component, so you don't need a dedicated Angular wrapper per element.\n *\n * `name` can be any custom element, including one of yours. `aparte-model-selector`\n * below is defined by `@aparte/plugin-model-selector`, not by core — until that\n * package is imported the tag mounts empty and inert with no error, and upgrades on\n * its own once the definition arrives, which is what makes `provideAparte`'s lazy\n * `plugins` loaders work.\n *\n * A PLUGIN's event is not in the default forward list — that default is core's, and a\n * third-party plugin's author cannot add to it, so listing ours would privilege our\n * packages over theirs. Name it in `events` and it arrives; leave it out and the handler\n * silently never fires, which is what this example used to do.\n *\n * @example\n * ```html\n * <aparte-ui\n * name=\"aparte-model-selector\"\n * [props]=\"{\n * placeholder: 'Ask anything...',\n * '--glow-opacity': '1',\n * '--glow-speed': '4s'\n * }\"\n * [events]=\"['aparte-model-change']\"\n * (elementEvent)=\"onEvent($event)\"\n * />\n * ```\n *\n * @description\n * - Keys starting with `--` are applied as CSS Variables\n * - Other keys are set as DOM properties on the element\n * - The events in `events` (default: {@link APARTE_DEFAULT_UI_EVENTS}) bubble up via `elementEvent`\n */\n@Component({\n selector: 'aparte-ui',\n standalone: true,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `<ng-container></ng-container>`,\n styles: [`\n :host {\n display: contents;\n }\n `]\n})\nexport class AparteUiComponent implements AfterViewInit, OnChanges, OnDestroy, AparteUiHandle {\n private readonly renderer = inject(Renderer2);\n private readonly hostEl = inject(ElementRef);\n\n // ─────────────────────────────────────────────────────────────\n // Inputs\n // ─────────────────────────────────────────────────────────────\n\n /** The custom element tag name (e.g., 'aparte-model-selector') */\n @Input({ required: true }) name!: string;\n\n /** Properties to pass to the element. Keys starting with '--' are CSS vars */\n @Input() props: Record<string, unknown> = {};\n\n /**\n * Which custom events to forward through `elementEvent`. Defaults to the\n * interactive aparté surface ({@link APARTE_DEFAULT_UI_EVENTS}); pass your own list to\n * listen to other events (e.g. `['aparte-composer-change']` for attachments).\n */\n @Input() events?: string[];\n\n // ─────────────────────────────────────────────────────────────\n // Outputs\n // ─────────────────────────────────────────────────────────────\n\n /** Emits a forwarded custom event from the underlying Web Component */\n readonly elementEvent = output<CustomEvent>();\n\n // ─────────────────────────────────────────────────────────────\n // Internal State\n // ─────────────────────────────────────────────────────────────\n\n /** The dynamically created Web Component element */\n private element: HTMLElement | null = null;\n\n /** Cleanup functions for event listeners */\n private eventCleanups: (() => void)[] = [];\n\n /** Joined key of the bound event set, so a fresh inline `[events]` array\n * doesn't thrash the element — only a real change rebinds. */\n private lastEventsKey = '';\n\n // ─────────────────────────────────────────────────────────────\n // Lifecycle\n // ─────────────────────────────────────────────────────────────\n\n ngAfterViewInit(): void {\n this.createElement();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n // Recreate the element when `name` (or the forwarded event set) changes.\n const nameChanged = !!changes['name'] && !changes['name'].firstChange;\n const eventsChanged =\n !!changes['events'] &&\n !changes['events'].firstChange &&\n this.eventsKey() !== this.lastEventsKey;\n\n if (nameChanged || eventsChanged) {\n this.destroyElement();\n this.createElement();\n }\n\n // If props changed, update them\n if (changes['props'] && this.element) {\n this.applyProps();\n }\n }\n\n ngOnDestroy(): void {\n this.destroyElement();\n }\n\n // ─────────────────────────────────────────────────────────────\n // Element Management\n // ─────────────────────────────────────────────────────────────\n\n private eventsKey(): string {\n return (this.events ?? APARTE_DEFAULT_UI_EVENTS).join('|');\n }\n\n private createElement(): void {\n if (!this.name) return;\n\n // Create the custom element\n this.element = this.renderer.createElement(this.name);\n\n // Apply initial props\n this.applyProps();\n\n // Setup event listeners\n this.setupEventListeners();\n\n // Append to host (not container, to avoid extra wrapper)\n this.renderer.appendChild(this.hostEl.nativeElement, this.element);\n }\n\n private destroyElement(): void {\n // Cleanup event listeners\n this.eventCleanups.forEach(cleanup => cleanup());\n this.eventCleanups = [];\n\n // Remove element\n if (this.element && this.element.parentNode) {\n this.renderer.removeChild(this.hostEl.nativeElement, this.element);\n }\n this.element = null;\n }\n\n /**\n * aparté elements are **attribute-driven** (`observedAttributes`): assigning a\n * property is either a silent no-op (nothing observes it) or throws outright on\n * a getter-only accessor — `<aparte-composer>`'s `placeholder`/`disabled` are\n * exactly that. So primitives go through `setAttribute`; only values an\n * attribute cannot carry (objects, functions) are handed over as properties.\n */\n private applyProps(): void {\n if (this.element) applyElementProps(this.element, this.props);\n }\n\n private setupEventListeners(): void {\n if (!this.element) return;\n\n this.lastEventsKey = this.eventsKey();\n (this.events ?? APARTE_DEFAULT_UI_EVENTS).forEach(eventName => {\n const listener = (event: Event) => {\n this.elementEvent.emit(event as CustomEvent);\n };\n\n this.element!.addEventListener(eventName, listener);\n this.eventCleanups.push(() => {\n this.element?.removeEventListener(eventName, listener);\n });\n });\n }\n\n // ─────────────────────────────────────────────────────────────\n // Public API\n // ─────────────────────────────────────────────────────────────\n\n /** Get the underlying Web Component element */\n getElement<T extends HTMLElement = HTMLElement>(): T | null {\n return this.element as T | null;\n }\n\n /** Call a method on the underlying element */\n callMethod<T = unknown>(methodName: string, ...args: unknown[]): T | undefined {\n if (!this.element) return undefined;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const method = (this.element as any)[methodName];\n if (typeof method === 'function') {\n return method.apply(this.element, args) as T;\n }\n return undefined;\n }\n}\n","// AUTO-GENERATED by scripts/gen-element-bindings.mjs from this package's\n// custom-elements.json. Do not edit: it is gitignored and rewritten every build.\n// The source of every fact below is the element's own JSDoc.\n\n/**\n * A typed Angular surface for every element this package defines.\n *\n * Generated, and that is the point: a hand-written directive is a parallel structure over\n * the manifest with nothing watching it, so an attribute added to an element would be\n * typed in React, Vue and Svelte — which derive from the registry — and silently missing\n * here. That happened, which is why this file is generated now.\n *\n * Outputs emit the event's DETAIL, not the `CustomEvent`, because\n * `(selectChange)=\"pick($event.value)\"` is the Angular idiom. Reach the event itself with\n * a plain host listener when you need `stopPropagation`.\n */\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n Output,\n booleanAttribute,\n inject,\n numberAttribute,\n} from '@angular/core';\nimport { applyElementProps } from '@aparte/core';\nimport type {\n AparteActionClickEventDetail,\n AparteActionEventDetail,\n AparteAttachmentPreviewEventDetail,\n AparteBranchNavigateEventDetail,\n AparteComposerChangeEventDetail,\n AparteConversationArchiveDetail,\n AparteConversationDeleteDetail,\n AparteConversationSelectDetail,\n AparteEditEventDetail,\n AparteFeedbackEventDetail,\n AparteMessageInfoEventDetail,\n AparteOptgroupToggleEventDetail,\n ApartePathChangedEventDetail,\n AparteRetryEventDetail,\n AparteSegmentUpdateEventDetail,\n AparteSelectChangeDetail,\n AparteSendEventDetail,\n} from '@aparte/core';\n\n/**\n * Writes one declared attribute onto the host element.\n *\n * `applyElementProps` is core's own rule, reused rather than reimplemented: a primitive\n * goes through `setAttribute`, `true` becomes the empty presence attribute,\n * `false`/`null`/`undefined` remove it, and only a value an attribute cannot carry is\n * handed over as a property.\n */\n@Directive()\nabstract class AparteElementBase {\n protected readonly host = inject(ElementRef<HTMLElement>);\n\n protected write(name: string, value: unknown): void {\n applyElementProps(this.host.nativeElement, { [name]: value });\n }\n}\n\n/** `<aparte-chat-bubble>` — One message: plain content or a list of rich segments, in light DOM. */\n@Directive({ selector: 'aparte-chat-bubble', standalone: true })\nexport class AparteChatBubbleDirective extends AparteElementBase {\n /** `user` / `assistant` / `system`; what the CSS keys off. */\n @Input() set messageRole(v: string | undefined) { this.write('data-role', v); }\n /** Plain text content, for a bubble with no segments. */\n @Input() set content(v: string | undefined) { this.write('content', v); }\n /** Epoch milliseconds OR a date string: `_updateTimestamp` accepts either and only coerces when the value is numeric. */\n @Input() set timestamp(v: number | string | undefined) { this.write('timestamp', v); }\n /** How streaming and the action bar address this bubble. */\n @Input() set messageId(v: string | undefined) { this.write('message-id', v); }\n /** Hides the action bar and shows the caret while a reply is in flight. */\n @Input({ transform: booleanAttribute }) set streaming(v: boolean) { this.write('streaming', v); }\n /** The display name in the header. */\n @Input() set name(v: string | undefined) { this.write('name', v); }\n\n /** An attached image was clicked, asking the app to open it full-size. */\n @Output() readonly attachmentPreview = new EventEmitter<AparteAttachmentPreviewEventDetail>();\n /** A custom action-bar button was pressed. */\n @Output() readonly action = new EventEmitter<AparteActionEventDetail>();\n /** Retry was pressed; the host forks the turn. */\n @Output() readonly retry = new EventEmitter<AparteRetryEventDetail>();\n /** Thumbs up or down. */\n @Output() readonly feedback = new EventEmitter<AparteFeedbackEventDetail>();\n /** The info affordance was pressed. */\n @Output() readonly messageInfo = new EventEmitter<AparteMessageInfoEventDetail>();\n /** An edit was saved. */\n @Output() readonly edit = new EventEmitter<AparteEditEventDetail>();\n /** The `‹1/2›` picker moved between sibling versions. */\n @Output() readonly branchNavigate = new EventEmitter<AparteBranchNavigateEventDetail>();\n\n @HostListener('aparte-attachment-preview', ['$event'])\n protected onAttachmentPreview(e: CustomEvent<AparteAttachmentPreviewEventDetail>): void { this.attachmentPreview.emit(e.detail); }\n\n @HostListener('aparte-action', ['$event'])\n protected onAction(e: CustomEvent<AparteActionEventDetail>): void { this.action.emit(e.detail); }\n\n @HostListener('aparte-retry', ['$event'])\n protected onRetry(e: CustomEvent<AparteRetryEventDetail>): void { this.retry.emit(e.detail); }\n\n @HostListener('aparte-feedback', ['$event'])\n protected onFeedback(e: CustomEvent<AparteFeedbackEventDetail>): void { this.feedback.emit(e.detail); }\n\n @HostListener('aparte-message-info', ['$event'])\n protected onMessageInfo(e: CustomEvent<AparteMessageInfoEventDetail>): void { this.messageInfo.emit(e.detail); }\n\n @HostListener('aparte-edit', ['$event'])\n protected onEdit(e: CustomEvent<AparteEditEventDetail>): void { this.edit.emit(e.detail); }\n\n @HostListener('aparte-branch-navigate', ['$event'])\n protected onBranchNavigate(e: CustomEvent<AparteBranchNavigateEventDetail>): void { this.branchNavigate.emit(e.detail); }\n}\n\n/** `<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. */\n@Directive({ selector: 'aparte-chat-status', standalone: true })\nexport class AparteChatStatusDirective extends AparteElementBase {\n /** Shows or hides the indicator. */\n @Input({ transform: booleanAttribute }) set visible(v: boolean) { this.write('visible', v); }\n /** The line to show. Defaults to the locale's typing string. */\n @Input() set text(v: string | undefined) { this.write('text', v); }\n}\n\n/** `<aparte-chat-viewport>` — The transcript surface: a light-DOM container with sticky scrolling, token streaming and segment-aware rendering. */\n@Directive({ selector: 'aparte-chat-viewport', standalone: true })\nexport class AparteChatViewportDirective extends AparteElementBase {\n /** How close to the bottom still counts as \"at the bottom\". */\n @Input({ transform: numberAttribute }) set scrollThreshold(v: number) { this.write('scroll-threshold', v); }\n /** Caps how many bubbles stay in the DOM; older ones are released. */\n @Input({ transform: numberAttribute }) set maxRenderedBubbles(v: number) { this.write('max-rendered-bubbles', v); }\n /** 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. */\n @Input({ transform: numberAttribute }) set maxMessages(v: number) { this.write('max-messages', v); }\n /** 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. */\n @Input({ transform: booleanAttribute }) set frameworkManaged(v: boolean) { this.write('framework-managed', v); }\n\n /** A segment grew or settled during a stream. */\n @Output() readonly segmentUpdate = new EventEmitter<AparteSegmentUpdateEventDetail>();\n /** `clearAll()` finished emptying the transcript. No detail. */\n @Output() readonly resetDone = new EventEmitter<void>();\n /** 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 */\n @Output() readonly pathChanged = new EventEmitter<ApartePathChangedEventDetail>();\n\n @HostListener('aparte-segment-update', ['$event'])\n protected onSegmentUpdate(e: CustomEvent<AparteSegmentUpdateEventDetail>): void { this.segmentUpdate.emit(e.detail); }\n\n @HostListener('aparte-reset-done')\n protected onResetDone(): void { this.resetDone.emit(); }\n\n @HostListener('aparte-path-changed', ['$event'])\n protected onPathChanged(e: CustomEvent<ApartePathChangedEventDetail>): void { this.pathChanged.emit(e.detail); }\n}\n\n/** `<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. */\n@Directive({ selector: 'aparte-composer', standalone: true })\nexport class AparteComposerDirective extends AparteElementBase {\n /** Forwarded to `<aparte-composer-input>` through the internal bus. */\n @Input() set placeholder(v: string | undefined) { this.write('placeholder', v); }\n /** Disables the whole composer, every part included. */\n @Input({ transform: booleanAttribute }) set disabled(v: boolean) { this.write('disabled', v); }\n /** The id of the `<aparte-chat>` this composer drives. */\n @Input() set target(v: string | undefined) { this.write('target', v); }\n /** 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. */\n @Input({ transform: booleanAttribute }) set submitOnEnter(v: boolean) { this.write('submit-on-enter', v ? '' : 'false'); }\n\n /** A message was submitted: the text, its attachments and the target. */\n @Output() readonly send = new EventEmitter<AparteSendEventDetail>();\n /** The stop button was pressed. No detail; the two window events below carry the target. */\n @Output() readonly cancel = new EventEmitter<void>();\n /** Any of value / streaming / disabled / attachments / panel changed, folded into one event. */\n @Output() readonly composerChange = new EventEmitter<AparteComposerChangeEventDetail>();\n\n @HostListener('aparte-send', ['$event'])\n protected onSend(e: CustomEvent<AparteSendEventDetail>): void { this.send.emit(e.detail); }\n\n @HostListener('aparte-cancel')\n protected onCancel(): void { this.cancel.emit(); }\n\n @HostListener('aparte-composer-change', ['$event'])\n protected onComposerChange(e: CustomEvent<AparteComposerChangeEventDetail>): void { this.composerChange.emit(e.detail); }\n}\n\n/** `<aparte-composer-action>` — Generic action button primitive for <aparte-composer>. */\n@Directive({ selector: 'aparte-composer-action', standalone: true })\nexport class AparteComposerActionDirective extends AparteElementBase {\n /** Icon key for aparteGlobalConfig.getIcon(), or raw SVG/HTML starting with `<` */\n @Input() set icon(v: string | undefined) { this.write('icon', v); }\n /** Accessible label (also used as tooltip) */\n @Input() set label(v: string | undefined) { this.write('label', v); }\n /** Disables the button */\n @Input({ transform: booleanAttribute }) set disabled(v: boolean) { this.write('disabled', v); }\n /** 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. */\n @Input() set actionId(v: string | undefined) { this.write('action-id', v); }\n\n /** 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 } */\n @Output() readonly actionClick = new EventEmitter<AparteActionClickEventDetail>();\n\n @HostListener('aparte-action-click', ['$event'])\n protected onActionClick(e: CustomEvent<AparteActionClickEventDetail>): void { this.actionClick.emit(e.detail); }\n}\n\n/** `<aparte-composer-add-attachment>` — File picker button for <aparte-composer>. */\n@Directive({ selector: 'aparte-composer-add-attachment', standalone: true })\nexport class AparteComposerAddAttachmentDirective extends AparteElementBase {\n /** MIME types / extensions passed to the file input (e.g. \"image/*,.pdf\") */\n @Input() set accept(v: string | undefined) { this.write('accept', v); }\n /** Allow multiple file selection (default: true) */\n @Input({ transform: booleanAttribute }) set multiple(v: boolean) { this.write('multiple', v ? '' : 'false'); }\n /** Greys out the picker and ignores drops. */\n @Input({ transform: booleanAttribute }) set disabled(v: boolean) { this.write('disabled', v); }\n}\n\n/** `<aparte-composer-attachments>` — Renders a square thumbnail tile for each file attached to the root composer. */\n@Directive({ selector: 'aparte-composer-attachments', standalone: true })\nexport class AparteComposerAttachmentsDirective {\n /** An attached image was clicked; the app opens it full-size, and only if it declared `attachmentPreview`. */\n @Output() readonly attachmentPreview = new EventEmitter<AparteAttachmentPreviewEventDetail>();\n\n @HostListener('aparte-attachment-preview', ['$event'])\n protected onAttachmentPreview(e: CustomEvent<AparteAttachmentPreviewEventDetail>): void { this.attachmentPreview.emit(e.detail); }\n}\n\n/** `<aparte-composer-cancel>` — Cancel/stop streaming button primitive for <aparte-composer>. */\n/**\n * No member at all: this element observes nothing and dispatches nothing, so the\n * directive exists only to CLAIM THE TAG — which is what spares a consuming component\n * `CUSTOM_ELEMENTS_SCHEMA`, a switch that turns checking off for every unknown tag in\n * the file rather than just this one.\n */\n@Directive({ selector: 'aparte-composer-cancel', standalone: true })\nexport class AparteComposerCancelDirective {\n}\n\n/** `<aparte-composer-input>` — Contenteditable text input primitive. */\n@Directive({ selector: 'aparte-composer-input', standalone: true })\nexport class AparteComposerInputDirective extends AparteElementBase {\n /** Placeholder text (fallback: reads from aparte-composer) */\n @Input() set placeholder(v: string | undefined) { this.write('placeholder', v); }\n /** Max height in px before scroll (default: 200) */\n @Input({ transform: numberAttribute }) set maxHeight(v: number) { this.write('max-height', v); }\n /** 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. */\n @Input({ transform: numberAttribute }) set minHeight(v: number) { this.write('min-height', v); }\n /** Makes the field non-editable; the composer's own `disabled` also reaches it. */\n @Input({ transform: booleanAttribute }) set disabled(v: boolean) { this.write('disabled', v); }\n\n /** 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. */\n @Output() readonly composerSubmit = new EventEmitter<void>();\n\n @HostListener('aparte-composer-submit')\n protected onComposerSubmit(): void { this.composerSubmit.emit(); }\n}\n\n/** `<aparte-composer-send>` — Submit button primitive for <aparte-composer>. */\n/**\n * No member at all: this element observes nothing and dispatches nothing, so the\n * directive exists only to CLAIM THE TAG — which is what spares a consuming component\n * `CUSTOM_ELEMENTS_SCHEMA`, a switch that turns checking off for every unknown tag in\n * the file rather than just this one.\n */\n@Directive({ selector: 'aparte-composer-send', standalone: true })\nexport class AparteComposerSendDirective {\n}\n\n/** `<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. */\n/**\n * No member at all: this element observes nothing and dispatches nothing, so the\n * directive exists only to CLAIM THE TAG — which is what spares a consuming component\n * `CUSTOM_ELEMENTS_SCHEMA`, a switch that turns checking off for every unknown tag in\n * the file rather than just this one.\n */\n@Directive({ selector: 'aparte-composer-toolbar', standalone: true })\nexport class AparteComposerToolbarDirective {\n}\n\n/** `<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. */\n@Directive({ selector: 'aparte-conversation-list', standalone: true })\nexport class AparteConversationListDirective extends AparteElementBase {\n /** The id of the conversation to render as selected. */\n @Input() set activeId(v: string | undefined) { this.write('active-id', v); }\n\n /** A row was activated; the host loads that conversation. */\n @Output() readonly selectConversation = new EventEmitter<AparteConversationSelectDetail>();\n /** The delete action was pressed. Nothing is removed here. */\n @Output() readonly deleteConversation = new EventEmitter<AparteConversationDeleteDetail>();\n /** The archive action was pressed on a live conversation. */\n @Output() readonly archiveConversation = new EventEmitter<AparteConversationArchiveDetail>();\n /** The same action on an already-archived one; same detail shape, opposite intent. */\n @Output() readonly unarchiveConversation = new EventEmitter<AparteConversationArchiveDetail>();\n\n @HostListener('aparte-select-conversation', ['$event'])\n protected onSelectConversation(e: CustomEvent<AparteConversationSelectDetail>): void { this.selectConversation.emit(e.detail); }\n\n @HostListener('aparte-delete-conversation', ['$event'])\n protected onDeleteConversation(e: CustomEvent<AparteConversationDeleteDetail>): void { this.deleteConversation.emit(e.detail); }\n\n @HostListener('aparte-archive-conversation', ['$event'])\n protected onArchiveConversation(e: CustomEvent<AparteConversationArchiveDetail>): void { this.archiveConversation.emit(e.detail); }\n\n @HostListener('aparte-unarchive-conversation', ['$event'])\n protected onUnarchiveConversation(e: CustomEvent<AparteConversationArchiveDetail>): void { this.unarchiveConversation.emit(e.detail); }\n}\n\n/** `<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. */\n/**\n * No member at all: this element observes nothing and dispatches nothing, so the\n * directive exists only to CLAIM THE TAG — which is what spares a consuming component\n * `CUSTOM_ELEMENTS_SCHEMA`, a switch that turns checking off for every unknown tag in\n * the file rather than just this one.\n */\n@Directive({ selector: 'aparte-elicitation', standalone: true })\nexport class AparteElicitationDirective {\n}\n\n/** `<aparte-optgroup>` — AparteOptgroup */\n@Directive({ selector: 'aparte-optgroup', standalone: true })\nexport class AparteOptgroupDirective extends AparteElementBase {\n /** Group label */\n @Input() set label(v: string | undefined) { this.write('label', v); }\n /** Allow collapse/expand */\n @Input({ transform: booleanAttribute }) set collapsible(v: boolean) { this.write('collapsible', v); }\n /** Collapsed state */\n @Input({ transform: booleanAttribute }) set collapsed(v: boolean) { this.write('collapsed', v); }\n /** Shows a spinner in place of the group's options. */\n @Input({ transform: booleanAttribute }) set loading(v: boolean) { this.write('loading', v); }\n\n /** The group was collapsed or expanded. */\n @Output() readonly optgroupToggle = new EventEmitter<AparteOptgroupToggleEventDetail>();\n\n @HostListener('aparte-optgroup-toggle', ['$event'])\n protected onOptgroupToggle(e: CustomEvent<AparteOptgroupToggleEventDetail>): void { this.optgroupToggle.emit(e.detail); }\n}\n\n/** `<aparte-option>` — AparteOption */\n@Directive({ selector: 'aparte-option', standalone: true })\nexport class AparteOptionDirective extends AparteElementBase {\n /** Option value */\n @Input() set value(v: string | undefined) { this.write('value', v); }\n /** Disabled state */\n @Input({ transform: booleanAttribute }) set disabled(v: boolean) { this.write('disabled', v); }\n /** Selected state */\n @Input({ transform: booleanAttribute }) set selected(v: boolean) { this.write('selected', v); }\n /** Free-form status the host sets; styled, never read by core. */\n @Input() set dataStatus(v: string | undefined) { this.write('data-status', v); }\n}\n\n/** `<aparte-progress-spinner>` — AparteProgressSpinner */\n@Directive({ selector: 'aparte-progress-spinner', standalone: true })\nexport class AparteProgressSpinnerDirective extends AparteElementBase {\n /** Progress percentage 0–100 (omit for indeterminate) */\n @Input({ transform: numberAttribute }) set value(v: number) { this.write('value', v); }\n}\n\n/** `<aparte-select>` — Dropdown select for aparté — a vanilla web component with optional grouping, a search filter and a keyboard-driven listbox. */\n@Directive({ selector: 'aparte-select', standalone: true })\nexport class AparteSelectDirective extends AparteElementBase {\n /** The selected option's value. */\n @Input() set value(v: string | undefined) { this.write('value', v); }\n /** Shown while nothing is selected. */\n @Input() set placeholder(v: string | undefined) { this.write('placeholder', v); }\n /** Blocks opening and selection. */\n @Input({ transform: booleanAttribute }) set disabled(v: boolean) { this.write('disabled', v); }\n /** Renders `<aparte-optgroup>` children as collapsible groups. */\n @Input({ transform: booleanAttribute }) set grouped(v: boolean) { this.write('grouped', v); }\n /** Adds a filter field above the options. */\n @Input({ transform: booleanAttribute }) set searchable(v: boolean) { this.write('searchable', v); }\n /** Reflects (and controls) whether the dropdown is open. */\n @Input({ transform: booleanAttribute }) set open(v: boolean) { this.write('open', v); }\n\n /** The dropdown opened. No detail. */\n @Output() readonly selectOpen = new EventEmitter<void>();\n /** The dropdown closed. No detail. */\n @Output() readonly selectClose = new EventEmitter<void>();\n /** The selection changed; carries the new value, its label and the previous value. */\n @Output() readonly selectChange = new EventEmitter<AparteSelectChangeDetail>();\n\n @HostListener('aparte-select-open')\n protected onSelectOpen(): void { this.selectOpen.emit(); }\n\n @HostListener('aparte-select-close')\n protected onSelectClose(): void { this.selectClose.emit(); }\n\n @HostListener('aparte-select-change', ['$event'])\n protected onSelectChange(e: CustomEvent<AparteSelectChangeDetail>): void { this.selectChange.emit(e.detail); }\n}\n\n/**\n * Every element directive, for one import in a standalone component.\n *\n * ```ts\n * @Component({ imports: [...APARTE_ELEMENT_DIRECTIVES], template: `…` })\n * ```\n */\nexport const APARTE_ELEMENT_DIRECTIVES = [\n AparteChatBubbleDirective,\n AparteChatStatusDirective,\n AparteChatViewportDirective,\n AparteComposerDirective,\n AparteComposerActionDirective,\n AparteComposerAddAttachmentDirective,\n AparteComposerAttachmentsDirective,\n AparteComposerCancelDirective,\n AparteComposerInputDirective,\n AparteComposerSendDirective,\n AparteComposerToolbarDirective,\n AparteConversationListDirective,\n AparteElicitationDirective,\n AparteOptgroupDirective,\n AparteOptionDirective,\n AparteProgressSpinnerDirective,\n AparteSelectDirective,\n] as const;\n","import { Injectable, OnDestroy, computed, signal } from '@angular/core';\nimport { aparteGlobalConfig, AparteConversationManager, type AparteConfig, type AparteConversation, type AparteStorageAdapter } from '@aparte/core';\nimport type { AparteMessage } from '@aparte/core';\n\n/**\n * Angular 19 Signal-based wrapper around AparteConversationManager.\n *\n * Register a storage adapter before calling init():\n * ```ts\n * // app.config.ts\n * export const appConfig: ApplicationConfig = {\n * providers: [\n * {\n * provide: CONVERSATION_ADAPTER,\n * useValue: new IndexedDBAdapter('my-app-convs'),\n * },\n * ],\n * };\n * ```\n *\n * Then inject ConversationManagerService in any component or service.\n */\n@Injectable({ providedIn: 'root' })\nexport class ConversationManagerService implements OnDestroy {\n private _manager: AparteConversationManager | null = null;\n private _unsubscribe: (() => void) | null = null;\n\n // ─── Signals ─────────────────────────────────────────────────────────────\n\n /** All conversations (active + archived). */\n readonly conversations = signal<AparteConversation[]>([]);\n\n /** Active conversations only, newest first. */\n readonly activeConversations = computed(() =>\n this.conversations()\n .filter(c => !c.archivedAt)\n .sort((a, b) => b.updatedAt - a.updatedAt)\n );\n\n /** Archived conversations, newest first. */\n readonly archivedConversations = computed(() =>\n this.conversations()\n .filter(c => !!c.archivedAt)\n .sort((a, b) => b.updatedAt - a.updatedAt)\n );\n\n /** Currently active conversation id. */\n readonly activeId = signal<string | null>(null);\n\n /** The active conversation object (null when no conv is selected). */\n readonly activeConversation = computed(() => {\n const id = this.activeId();\n if (!id) return null;\n return this.conversations().find(c => c.id === id) ?? null;\n });\n\n // ─── Lifecycle ───────────────────────────────────────────────────────────\n\n /**\n * Initialise the service with a storage adapter.\n * Call once in your root component or app initialiser.\n */\n async init(adapter: AparteStorageAdapter, config: AparteConfig = aparteGlobalConfig): Promise<void> {\n this._manager = new AparteConversationManager(adapter);\n this._unsubscribe = this._manager.subscribe(convs => {\n this.conversations.set([...convs]);\n this.activeId.set(this._manager!.activeId);\n });\n await this._manager.init();\n // Sync activeId after load (manager may have no active conv yet)\n this.activeId.set(this._manager.activeId);\n // Registered on the config the chat will resolve, so\n // AparteConversationController finds it without explicit DI plumbing.\n //\n // `config` defaults to the global singleton. Pass the SAME config you gave\n // `[config]` on `<aparte-chat>`: the controller resolves the config\n // governing its host element, so a manager on the global is invisible to a\n // chat with its own — persistence silently does nothing while the\n // optimistic UI keeps working.\n config.setConversationManager(this._manager);\n }\n\n ngOnDestroy(): void {\n this._unsubscribe?.();\n }\n\n // ─── Actions ─────────────────────────────────────────────────────────────\n\n /** Create a new empty conversation, make it active, return it. */\n async createNew(title?: string): Promise<AparteConversation> {\n this._assertInit();\n return this._manager!.createNew(title);\n }\n\n // Note: there is no `select()` / `clearActive()` here on purpose.\n // The active conversation is owned exclusively by AparteConversationController\n // (inside <aparte-chat>). To switch conversations, either bind\n // `[conversationId]` on <aparte-chat> or dispatch a window event:\n // window.dispatchEvent(new CustomEvent('aparte-select-conversation', {\n // detail: { id, targetId? },\n // }));\n // The `activeId` signal here is read-only and stays in sync via subscribe().\n\n /** Append a message to a conversation and persist. */\n async addMessage(convId: string, msg: AparteMessage): Promise<void> {\n this._assertInit();\n return this._manager!.addMessage(convId, msg);\n }\n\n /**\n * Replace all messages for a conversation.\n * Call after branch navigation or AI response completion.\n */\n async updateMessages(convId: string, messages: AparteMessage[]): Promise<void> {\n this._assertInit();\n return this._manager!.updateMessages(convId, messages);\n }\n\n /** Permanently delete a conversation. */\n async delete(id: string): Promise<void> {\n this._assertInit();\n return this._manager!.delete(id);\n }\n\n /** Archive a conversation. */\n async archive(id: string): Promise<void> {\n this._assertInit();\n return this._manager!.archive(id);\n }\n\n /** Restore an archived conversation. */\n async unarchive(id: string): Promise<void> {\n this._assertInit();\n return this._manager!.unarchive(id);\n }\n\n // ─── Private ─────────────────────────────────────────────────────────────\n\n private _assertInit(): void {\n if (!this._manager) {\n throw new Error(\n '[ConversationManagerService] Not initialised. Call init(adapter) before using the service.'\n );\n }\n }\n}\n","/**\n * aparté Angular wrapper\n * Angular 19 standalone components + services over the framework-agnostic web components.\n */\n\n// Configuration (a standalone provider function — no NgModule).\nexport { provideAparte, APARTE_CONFIG_TOKEN } from './lib/provide-aparte';\nexport type { ProvideAparteOptions, ApartePluginLoader } from './lib/provide-aparte';\n\n// Components (standalone — import them directly).\nexport { AparteChatComponent } from './lib/aparte-chat.component';\nexport { AparteUiComponent } from './lib/aparte-ui.component';\nexport type { AparteUiHandle } from './lib/aparte-ui.component';\n\n// Typed directives, one per element: the real tag in the template with typed Inputs and\n// one Output per event. GENERATED from core's custom-elements manifest at build time —\n// hand-written, they were a parallel structure that nothing watched, so an attribute\n// added to an element would be typed in the other three wrappers and silently missing\n// here. `<aparte-ui>` stays for an element aparté does not define.\nexport {\n APARTE_ELEMENT_DIRECTIVES,\n AparteChatViewportDirective,\n AparteChatBubbleDirective,\n AparteChatStatusDirective,\n AparteComposerDirective,\n AparteComposerInputDirective,\n AparteComposerActionDirective,\n AparteComposerAddAttachmentDirective,\n AparteComposerAttachmentsDirective,\n AparteComposerSendDirective,\n AparteComposerCancelDirective,\n AparteComposerToolbarDirective,\n AparteSelectDirective,\n AparteOptionDirective,\n AparteOptgroupDirective,\n AparteConversationListDirective,\n AparteProgressSpinnerDirective,\n AparteElicitationDirective,\n} from './generated/element.directives';\n\n// Annex: client lifecycle + reactive conversation manager.\nexport { AparteAiService, APARTE_CLIENT_OPTIONS } from './lib/aparte-ai.service';\nexport { ConversationManagerService } from './lib/conversation-manager.service';\n\n// Public types — re-exported from `@aparte/core`, the single source of truth\n// (the component used to re-declare `AparteMessage`/`AparteSendEventDetail` locally).\nexport type {\n AparteMessage,\n AparteSendEventDetail,\n AparteActionEventDetail,\n AparteSegment,\n AparteTextSegment,\n AparteCodeSegment,\n AparteThinkingSegment,\n // The imperative surface every wrapper exposes. Angular alone used to omit it,\n // while React and the other two each aliased it under a name of their own.\n AparteChatImperativeApi,\n} from '@aparte/core';\n\n// Re-export aparteGlobalConfig for direct access (config without `provideAparte`).\nexport { aparteGlobalConfig } from '@aparte/core';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAGA;;;AAGG;MACU,qBAAqB,GAAG,IAAI,cAAc,CAAsB,uBAAuB;AAEpG;;;;;AAKG;MAIU,eAAe,CAAA;IACP,cAAc,GAAG,MAAM,CAAC,qBAAqB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3E,OAAO,GAAiB,IAAI,YAAY,CAAC,IAAI,CAAC,cAAc,IAAI,EAAE,CAAC;AAE3E;;;;;;;AAOG;IACH,OAAO,GAAA;AACH,QAAA,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE;IACxB;AAEA;;AAEG;IACH,UAAU,GAAA;AACN,QAA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A,eAAA,CAAA,UAAA,EAAA,CAAA;AAA1B,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,cADb,MAAM,EAAA,CAAA;;4FACnB,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBADtC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACtBlC;;;AAGG;AAEH;;ACLA;;AAEG;;;;"}
1
+ {"version":3,"file":"aparte-angular.mjs","sources":["../../src/lib/aparte-ai.service.ts","../../src/lib/provide-aparte.ts","../../src/lib/aparte-chat.component.ts","../../src/lib/aparte-ui.component.ts","../../src/generated/element.directives.ts","../../src/lib/conversation-manager.service.ts","../../src/index.ts","../../src/aparte-angular.ts"],"sourcesContent":["import { Injectable, OnDestroy, inject, InjectionToken } from '@angular/core';\nimport { AparteClient, AparteClientOptions } from '@aparte/core';\n\n/**\n * Injection token for AparteClient configuration. Provided by `provideAparte()`;\n * omit it and the service falls back to `{}`.\n */\nexport const APARTE_CLIENT_OPTIONS = new InjectionToken<AparteClientOptions>('APARTE_CLIENT_OPTIONS');\n\n/**\n * AparteAiService\n *\n * Angular service to bridge the UI events with AI Providers.\n * Uses the agnostic `AparteClient` under the hood.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class AparteAiService implements OnDestroy {\n private readonly _clientOptions = inject(APARTE_CLIENT_OPTIONS, { optional: true });\n private _client: AparteClient = new AparteClient(this._clientOptions ?? {});\n\n /**\n * Start listening to `aparte-send` events globally.\n * This connects the <aparte-chat> components to the AI Providers.\n *\n * `provideAparte()` calls this for you on app init (its `autoConnect`,\n * on by default). Idempotent — a manual call on top of that is a no-op,\n * so it stays the escape hatch when configuring without `provideAparte`.\n */\n connect(): void {\n this._client.start();\n }\n\n /**\n * Stop listening.\n */\n disconnect(): void {\n this._client.stop();\n }\n\n /**\n * Abort the current AI response and all active tool calls.\n */\n abort(): void {\n this._client.abort();\n }\n\n ngOnDestroy(): void {\n this.disconnect();\n }\n}\n","import {\n DestroyRef,\n InjectionToken,\n inject,\n makeEnvironmentProviders,\n provideAppInitializer,\n type EnvironmentProviders,\n} from '@angular/core';\nimport {\n aparteGlobalConfig,\n type AparteAIProvider,\n type AparteClientOptions,\n type AparteIconProvider,\n type AparteLocale,\n type AparteMarkdownProvider,\n type AparteModelConfig,\n type AparteSkeletonProvider,\n} from '@aparte/core';\nimport { APARTE_CLIENT_OPTIONS, AparteAiService } from './aparte-ai.service';\n\n/**\n * Any function that initialises a plugin — sync or async, so it can wrap a\n * dynamic `import()` of a package YOU choose:\n * `() => import('@aparte/plugin-model-selector')`.\n */\nexport type ApartePluginLoader = () => void | Promise<void>;\n\n/**\n * Config for {@link provideAparte}. Deliberately **instance-agnostic**: every\n * plugin/locale slot takes a provider OBJECT or a LOADER function you supply —\n * this package never hardcodes (nor depends on) a catalog of `@aparte/*` package\n * names, so it stays a leaf with only `@aparte/core` + Angular as peers.\n */\nexport interface ProvideAparteOptions {\n /** AI providers to register (e.g. from `@aparte/provider-openai-compat`). */\n providers?: AparteAIProvider[];\n\n /** Optional plugin wiring — objects or loaders, never package-name strings. */\n plugins?: {\n /** Action plugins, as loaders: `[() => import('@aparte/plugin-model-selector')]`. */\n actions?: ApartePluginLoader[];\n /** An icon provider object, or a loader that registers one. */\n icons?: AparteIconProvider | ApartePluginLoader;\n /** A skeleton provider object, or a loader that registers one. */\n skeleton?: AparteSkeletonProvider | ApartePluginLoader;\n /** A loader that applies a theme. */\n theme?: ApartePluginLoader;\n /** A markdown provider `(raw: string) => string`, or a loader that registers one. */\n markdown?: AparteMarkdownProvider | ApartePluginLoader;\n };\n\n /** Model selection configuration. */\n modelConfig?: AparteModelConfig;\n\n /** A locale OBJECT (e.g. `fr` from `@aparte/locale-fr`) — not a package-name string. */\n locale?: AparteLocale;\n\n /** Theme mode; `'auto'` follows the system preference. */\n themeMode?: 'light' | 'dark' | 'auto';\n\n /** Options for the `AparteClient` mounted by {@link AparteAiService}. */\n clientOptions?: AparteClientOptions;\n\n /**\n * Start the {@link AparteAiService} client once the app initialises (after\n * providers/plugins are registered), so sends stream without a manual\n * `AparteAiService.connect()` — \"wire the config and it works\", same as the\n * React/Vue/Svelte wrappers. Default `true`; set `false` to control the\n * client lifecycle yourself.\n */\n autoConnect?: boolean;\n}\n\n/** Holds the resolved aparté config, for consumers that want to inject it. */\nexport const APARTE_CONFIG_TOKEN = new InjectionToken<ProvideAparteOptions>('APARTE_CONFIG');\n\nasync function loadIconPlugin(plugin: AparteIconProvider | ApartePluginLoader): Promise<void> {\n if (typeof plugin === 'object' && plugin !== null) {\n aparteGlobalConfig.setIconProvider(plugin);\n return;\n }\n try {\n await (plugin as ApartePluginLoader)();\n } catch (err) {\n console.warn('[aparte] Failed to load icon plugin', err);\n }\n}\n\nasync function loadSkeletonPlugin(plugin: AparteSkeletonProvider | ApartePluginLoader): Promise<void> {\n if (typeof plugin === 'object' && plugin !== null) {\n aparteGlobalConfig.setSkeletonProvider(plugin);\n return;\n }\n try {\n await (plugin as ApartePluginLoader)();\n } catch (err) {\n console.warn('[aparte] Failed to load skeleton plugin', err);\n }\n}\n\nasync function loadMarkdownPlugin(plugin: AparteMarkdownProvider | ApartePluginLoader): Promise<void> {\n // A markdown provider takes the raw string; a loader takes nothing.\n if (plugin.length >= 1) {\n aparteGlobalConfig.setMarkdownProvider(plugin as AparteMarkdownProvider);\n return;\n }\n try {\n await (plugin as ApartePluginLoader)();\n } catch (err) {\n console.warn('[aparte] Failed to load markdown plugin', err);\n }\n}\n\nasync function runLoader(loader: ApartePluginLoader, label: string): Promise<void> {\n try {\n await loader();\n } catch (err) {\n console.warn(`[aparte] Failed to load ${label} plugin`, err);\n }\n}\n\nasync function loadPlugins(options: ProvideAparteOptions): Promise<void> {\n const plugins = options.plugins;\n if (!plugins) return;\n const pending: Promise<void>[] = [];\n\n for (const action of plugins.actions ?? []) pending.push(runLoader(action, 'action'));\n if (plugins.icons) pending.push(loadIconPlugin(plugins.icons));\n if (plugins.skeleton) pending.push(loadSkeletonPlugin(plugins.skeleton));\n if (plugins.theme) pending.push(runLoader(plugins.theme, 'theme'));\n if (plugins.markdown) pending.push(loadMarkdownPlugin(plugins.markdown));\n\n await Promise.all(pending);\n}\n\n/** Reflect the theme mode on the document root. */\nfunction applyThemeMode(mode: 'light' | 'dark' | 'auto', destroyRef: DestroyRef): void {\n if (mode !== 'auto') {\n document.documentElement.setAttribute('data-aparte-theme', mode);\n return;\n }\n const query = window.matchMedia('(prefers-color-scheme: dark)');\n const onChange = (e: MediaQueryListEvent) => {\n document.documentElement.setAttribute('data-aparte-theme', e.matches ? 'dark' : 'light');\n };\n document.documentElement.setAttribute('data-aparte-theme', query.matches ? 'dark' : 'light');\n query.addEventListener('change', onChange);\n // Released with the environment injector, so repeated bootstraps (TestBed, a\n // multi-instance embed) don't stack listeners on the media query forever.\n destroyRef.onDestroy(() => query.removeEventListener('change', onChange));\n}\n\n/**\n * Configure aparté for a standalone Angular app. Registers your AI providers,\n * model config, locale and optional plugins on `aparteGlobalConfig`,\n * provides {@link APARTE_CLIENT_OPTIONS} for {@link AparteAiService}, and\n * starts the client (see `autoConnect`) — no manual\n * `AparteAiService.connect()` needed.\n *\n * The components (`AparteChatComponent`, `AparteUiComponent`) are standalone and\n * work WITHOUT this — it is config sugar. You can equally call `aparteGlobalConfig.*`\n * yourself, exactly like the React/Vue/Svelte wrappers do.\n *\n * @example\n * bootstrapApplication(App, {\n * providers: [\n * provideAparte({\n * providers: [createOpenAICompatProvider(presets.OPENROUTER)],\n * clientOptions: { keyResolver },\n * }),\n * ],\n * });\n */\nexport function provideAparte(options: ProvideAparteOptions = {}): EnvironmentProviders {\n return makeEnvironmentProviders([\n { provide: APARTE_CONFIG_TOKEN, useValue: options },\n { provide: APARTE_CLIENT_OPTIONS, useValue: options.clientOptions ?? {} },\n provideAppInitializer(async () => {\n const destroyRef = inject(DestroyRef);\n // inject() only works before the first await — grab the service now,\n // connect at the end (after plugins) so the first send already sees\n // markdown/action providers. SSR-safe: no listener without a window.\n const ai = options.autoConnect !== false && typeof window !== 'undefined'\n ? inject(AparteAiService)\n : null;\n if (options.providers?.length) {\n aparteGlobalConfig.registerAIProvider(...options.providers);\n }\n if (options.modelConfig) {\n aparteGlobalConfig.setModelConfig(options.modelConfig);\n }\n if (options.locale) {\n aparteGlobalConfig.setLocale(options.locale);\n }\n await loadPlugins(options);\n if (options.themeMode) {\n applyThemeMode(options.themeMode, destroyRef);\n }\n ai?.connect();\n }),\n ]);\n}\n","import {\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n ElementRef,\n OnDestroy,\n ViewChild,\n QueryList,\n ViewChildren,\n output,\n signal,\n computed,\n ChangeDetectionStrategy,\n AfterViewInit,\n Input,\n TemplateRef,\n inject,\n effect,\n booleanAttribute,\n numberAttribute,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { Observable } from 'rxjs';\nimport type {\n AparteMessage,\n AparteSegment,\n AparteSendEventDetail,\n AparteChatHostBinding,\n AparteConfig,\n AparteActionEventDetail,\n AparteChatImperativeApi,\n} from '@aparte/core';\nimport { AparteChatHost, isAwaitingReply, uuid } from '@aparte/core';\n\n/**\n * AparteChatComponent — Angular 19 Wrapper\n *\n * Standalone component wrapping aparté Web Components with Angular Signals.\n * The streaming / branch-navigation / host-method orchestration (orphan-stream\n * guard, lifecycle tracking, conversation lifecycle, bubble reconciliation)\n * lives in the framework-agnostic `AparteChatHost` from `@aparte/core`; this\n * component only owns the Angular-idiomatic surface (signals, template, DI) and\n * binds the host over its `messages` signal.\n */\n@Component({\n selector: 'aparte-chat',\n standalone: true,\n imports: [NgTemplateOutlet],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n // This selector is ALSO core's `<aparte-chat>` custom element, so the host gets\n // upgraded by core on insert. `framework-managed` tells that shell to keep its\n // hands off: THIS component renders the viewport + composer and drives them\n // through AparteChatHost. Without it, core injects its default composition\n // underneath ours (its own check can't see our children — they render later).\n host: { 'framework-managed': '' },\n template: `\n <div\n class=\"aparte-chat-container\"\n [class.aparte-chat-container--auto-center]=\"centerWhenEmpty()\"\n [attr.data-aparte-empty]=\"centerWhenEmpty() && messages().length === 0 ? '' : null\"\n >\n <aparte-chat-viewport #viewport framework-managed=\"\">\n @if (messages().length === 0) {\n <!-- Welcome / placeholder shown inside the viewport while empty. -->\n <ng-content select=\"[slot='empty-state']\"></ng-content>\n }\n @for (message of messages(); track message.id) {\n @if (bubbleTemplate) {\n <!-- Render your OWN element per message; driven by the reactive\n messages() signal so it streams live. -->\n <ng-container\n [ngTemplateOutlet]=\"bubbleTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: message }\"\n ></ng-container>\n } @else {\n <aparte-chat-bubble\n #bubble\n [attr.message-id]=\"message.id\"\n [attr.data-role]=\"message.role\"\n [attr.timestamp]=\"message.timestamp\"\n [attr.content]=\"message.content\"\n [attr.streaming]=\"awaitingReply(message) ? '' : null\"\n ></aparte-chat-bubble>\n }\n }\n <aparte-chat-status\n [attr.visible]=\"isTyping() ? '' : null\"\n [attr.text]=\"typingText()\"\n ></aparte-chat-status>\n </aparte-chat-viewport>\n\n <ng-content select=\"[slot='above-composer']\"></ng-content>\n\n <aparte-composer\n #input\n [attr.placeholder]=\"placeholder()\"\n [attr.disabled]=\"disabled() ? '' : null\"\n [attr.submit-on-enter]=\"submitOnEnter() ? null : 'false'\"\n (aparte-send)=\"onAparteSend($event)\"\n >\n <!-- Custom composer via [slot='composer']; falls back to the default\n shell (input · send + footer slots, plus the attachment primitives\n when the attachments input is set). Project your own\n aparte-composer-* layout for a skin-specific composer. -->\n <ng-content select=\"[slot='composer']\">\n <div class=\"aparte-composer-shell\">\n @if (attachments()) {\n <aparte-composer-attachments></aparte-composer-attachments>\n }\n <div class=\"aparte-composer-row\">\n @if (attachments()) {\n <aparte-composer-add-attachment></aparte-composer-add-attachment>\n }\n <aparte-composer-input></aparte-composer-input>\n <aparte-composer-send></aparte-composer-send>\n </div>\n <!-- The composer's bottom row. ONE slot: placement is the DOM order of\n what you project, and margin-inline-start:auto pushes a control to the\n end (a logical property, so it reads correctly in RTL).\n Angular cannot test whether anything projects into an ng-content, so\n unlike the other three wrappers the element is always rendered -- but it\n declares itself data-empty when nothing lands in it, and the stylesheet\n hides it then. The guarantee no longer depends on Angular stripping\n template whitespace. -->\n <aparte-composer-toolbar>\n <ng-content select=\"[slot='toolbar']\"></ng-content>\n </aparte-composer-toolbar>\n </div>\n </ng-content>\n </aparte-composer>\n </div>\n `,\n styles: [`\n :host {\n display: block;\n width: 100%;\n height: 100%;\n }\n\n .aparte-chat-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n overflow: hidden;\n }\n\n aparte-chat-viewport {\n flex: 1;\n min-height: 0;\n }\n\n aparte-composer {\n flex-shrink: 0;\n }\n `]\n})\nexport class AparteChatComponent implements AfterViewInit, OnDestroy, AparteChatImperativeApi {\n constructor() {\n // Reactive effect to reconcile bubbles when the messages signal updates.\n // Debounced with requestAnimationFrame so rapid token bursts only trigger\n // one sync per paint frame instead of N syncs for N tokens.\n effect(() => {\n const msgs = this.messages();\n if (msgs.length > 0) {\n if (this._syncRafId !== null) return;\n this._syncRafId = requestAnimationFrame(() => {\n this._syncRafId = null;\n this._host?.syncBubbles();\n });\n }\n });\n }\n\n private elementRef = inject(ElementRef);\n\n /**\n * Template bridge to core's shared `isAwaitingReply` (an Angular template can't\n * call an imported function). One rule for the four wrappers and core itself,\n * so \"is this bubble in flight\" can't drift between them.\n */\n readonly awaitingReply = isAwaitingReply;\n\n // ── Input Signals ────────────────────────────────────────────────────────\n\n /** Messages to display */\n @Input('messages') set messagesInput(val: AparteMessage[]) {\n this.messages.set(val);\n // When messages are cleared (new conversation), reset the host's render cache\n // so the next conversation starts clean — same as React/Vue/Svelte do. (The\n // viewport's own clearMessages() is @deprecated in core and only clears its\n // repo; the host's clearAll() path already owns the real teardown.)\n if (val.length === 0) this._host?.clearRenderCache();\n }\n readonly messages = signal<AparteMessage[]>([]);\n\n /** Input placeholder text */\n @Input('placeholder') set placeholderInput(val: string) { this.placeholder.set(val); }\n readonly placeholder = signal<string>('Type a message...');\n\n /** Whether the input is disabled */\n @Input({ alias: 'disabled', transform: booleanAttribute }) set disabledInput(val: boolean) { this.disabled.set(val); }\n readonly disabled = signal<boolean>(false);\n\n /** When false, Shift+Enter submits and a bare Enter inserts a newline. */\n @Input({ alias: 'submitOnEnter', transform: booleanAttribute }) set submitOnEnterInput(val: boolean) { this.submitOnEnter.set(val); }\n readonly submitOnEnter = signal<boolean>(true);\n\n /**\n * Opt in to the \"centered composer when empty\" layout: the composer sits\n * vertically centered with the `[slot='empty-state']` content above it while\n * the list is empty, then slides to the bottom on the first message (~0.3s).\n * Off by default — additive (adds the `--auto-center` modifier + a\n * `data-aparte-empty` attribute the shipped `aparte.css` recipe keys off).\n */\n @Input({ alias: 'centerWhenEmpty', transform: booleanAttribute }) set centerWhenEmptyInput(val: boolean) { this.centerWhenEmpty.set(val); }\n readonly centerWhenEmpty = signal<boolean>(false);\n\n /**\n * Add the file picker + chips strip to the default composer shell. **Off by\n * default**, because the capability needs a host that consumes the files: an\n * `AparteClient` inlines them per its `rawFileInject` option, but if you drive\n * your own loop you must read `event.files` on `(messageSent)` — otherwise the\n * file the user deliberately attached is dropped in silence. No effect when you\n * project a `[slot='composer']` (drop `<aparte-composer-add-attachment>` and\n * `<aparte-composer-attachments>` in it yourself).\n */\n @Input({ alias: 'attachments', transform: booleanAttribute }) set attachmentsInput(val: boolean) { this.attachments.set(val); }\n readonly attachments = signal<boolean>(false);\n\n /** Whether the assistant is currently typing/streaming */\n @Input({ alias: 'isTyping', transform: booleanAttribute }) set isTypingInput(val: boolean) { this.isTyping.set(val); }\n readonly isTyping = signal<boolean>(false);\n\n /** Text to show in the typing status */\n @Input('typingText') set typingTextInput(val: string) { this.typingText.set(val); }\n readonly typingText = signal<string>('Assistant is thinking...');\n\n /** Duration in ms to freeze spacer recalculation after a conversation swap. */\n @Input({ alias: 'layoutTransitionMs', transform: numberAttribute }) layoutTransitionMs = 0;\n\n /**\n * Active conversation id. When provided, the host attaches an\n * `AparteConversationController` that loads/persists messages via the\n * `AparteConversationManager` registered in `aparteGlobalConfig`. Setting a different id\n * mid-stream aborts the previous request; `null` deselects.\n */\n @Input('conversationId') set conversationIdInput(val: string | null | undefined) {\n const next = val ?? null;\n if (next === this._conversationId) return;\n this._conversationId = next;\n if (this._host) void this._host.setConversationId(next);\n }\n private _conversationId: string | null = null;\n\n /**\n * Instance {@link AparteConfig} for this chat. When set, aparté components\n * inside resolve THIS config instead of `aparteGlobalConfig`, so\n * several independently-configured chats can coexist on one page. Omit for the\n * global config. Read once in `ngAfterViewInit` when the host is created.\n */\n @Input() config?: AparteConfig;\n\n /**\n * Render your OWN element per message in place of `<aparte-chat-bubble>`.\n * Opt-in — provide a `<ng-template let-message>` and pass its ref. Driven by\n * the reactive `messages()` signal, so it updates live during streaming.\n * The built-in action bar (retry/edit/branch) belongs to the native bubble;\n * a custom bubble owns whatever it wires.\n * @example\n * <aparte-chat [bubbleTemplate]=\"tpl\" />\n * <ng-template #tpl let-message>{{ message.content }}</ng-template>\n */\n @Input() bubbleTemplate?: TemplateRef<{ $implicit: AparteMessage }>;\n\n // ── Outputs ────────────────────────────────────────────────────────────\n\n /**\n * User submitted a message from the composer. It is **appended to the thread\n * automatically** (optimistic UI) before this fires — do NOT add it again in\n * the handler (uncontrolled → duplicates; controlled → mirror it into your\n * own `[messages]`). For side-effects: scroll, analytics, send.\n */\n readonly messageSent = output<AparteSendEventDetail>();\n /**\n * Emitted when a custom bubble action (registered via\n * `aparteGlobalConfig.registerAction` with `zones: ['bubble']`) is clicked — a typed\n * wrapper over the bubbling `aparte-action` DOM event. Switch on `$event.actionId`.\n */\n readonly action = output<AparteActionEventDetail>();\n /** Emitted when messages are updated internally (e.g. by AparteClient) */\n readonly messagesChange = output<AparteMessage[]>();\n /** Emitted when a message is added internally (e.g. by appendMessage) */\n readonly messageAppended = output<AparteMessage>();\n /** The typing/\"thinking\" indicator toggled (the host flips it off on the first streamed token). */\n readonly typingChange = output<boolean>();\n /** Emitted when the controller lazily creates a conversation on first send. */\n readonly conversationCreated = output<string>();\n\n // ── View Children ────────────────────────────────────────────────────────\n @ViewChild('viewport') viewportRef?: ElementRef<HTMLElement>;\n @ViewChild('input') inputRef?: ElementRef<HTMLElement>;\n @ViewChildren('bubble') bubbleRefs!: QueryList<ElementRef<HTMLElement>>;\n\n // ── Private State ────────────────────────────────────────────────────────\n /** Mirror of the host's streaming target id (drives `isStreaming`). */\n private readonly _streamingId = signal<string | null>(null);\n /** Computed: is currently streaming */\n readonly isStreaming = computed(() => this._streamingId() !== null);\n\n /** rAF id used to coalesce rapid signal updates during streaming */\n private _syncRafId: number | null = null;\n\n /** The framework-agnostic chat-host orchestrator (created in ngAfterViewInit). */\n private _host?: AparteChatHost;\n private _unbindHost?: () => void;\n /** QueryList.changes subscription — released in ngOnDestroy so SPA route\n * churn doesn't leak a live subscription per mount. */\n private _bubbleRefsSub?: { unsubscribe(): void };\n\n ngAfterViewInit(): void {\n const host = this.elementRef.nativeElement as HTMLElement;\n\n // Ensure a stable id so aparte-composer can reference the host via `target`,\n // letting AparteClient find it without DOM traversal across re-renders.\n if (!host.id) host.id = `aparte-chat-${uuid()}`;\n const composerEl = this.inputRef?.nativeElement;\n if (composerEl) composerEl.setAttribute('target', host.id);\n\n const binding: AparteChatHostBinding = {\n hostId: host.id,\n host,\n viewport: this.viewportRef?.nativeElement ?? null,\n getMessages: () => this.messages(),\n setMessages: (msgs) => this.messages.set(msgs as AparteMessage[]),\n onMessagesChange: (msgs) => this.messagesChange.emit(msgs as AparteMessage[]),\n onMessageAppended: (msg) => this.messageAppended.emit(msg as AparteMessage),\n onTypingChange: (typing) => { this.isTyping.set(typing); this.typingChange.emit(typing); },\n onStreamingChange: (id) => this._streamingId.set(id),\n // Sibling-info / deferred work runs after Angular has re-rendered.\n afterRender: (cb) => { setTimeout(cb, 0); },\n resetComposer: () => {\n (this.inputRef?.nativeElement as unknown as { reset?: () => void })?.reset?.();\n },\n };\n\n this._host = new AparteChatHost(binding, {\n layoutTransitionMs: this.layoutTransitionMs,\n conversationId: this._conversationId,\n onConversationCreated: (id) => {\n this._conversationId = id;\n this.conversationCreated.emit(id);\n },\n config: this.config,\n });\n this._unbindHost = this._host.bind();\n\n // Custom bubble actions bubble to the host as `aparte-action`; surface them as\n // the typed `action` output. (addEventListener, not @HostListener: Angular\n // parses a colon in the event name as a `target:event` global target.)\n host.addEventListener('aparte-action', this._onAction);\n\n // Re-reconcile bubbles whenever Angular's @for materialises/destroys them.\n this._host.syncBubbles();\n this._bubbleRefsSub = this.bubbleRefs.changes.subscribe(() => this._host?.syncBubbles());\n }\n\n private readonly _onAction = (event: Event): void => {\n this.action.emit((event as CustomEvent<AparteActionEventDetail>).detail);\n };\n\n ngOnDestroy(): void {\n if (this._syncRafId !== null) {\n cancelAnimationFrame(this._syncRafId);\n this._syncRafId = null;\n }\n (this.elementRef.nativeElement as HTMLElement).removeEventListener('aparte-action', this._onAction);\n this._bubbleRefsSub?.unsubscribe();\n this._bubbleRefsSub = undefined;\n this._unbindHost?.();\n this._unbindHost = undefined;\n this._host = undefined;\n }\n\n // ── Public imperative API (delegates to the host) ──────────────────────────\n\n /** Append a message optimistically. */\n appendMessage(message: AparteMessage): void { this._host?.appendMessage(message); }\n /** Atomic update for a message. */\n updateMessage(messageId: string, updates: Partial<AparteMessage>): void {\n this._host?.updateMessage(messageId, updates);\n }\n /** Update the last message content (streaming text). */\n updateLastMessage(content: string, options?: { append?: boolean }): void {\n this._host?.updateLastMessage(content, options);\n }\n /** Add a segment to the last message. */\n addSegment(segment: AparteSegment): void { this._host?.addSegment(segment); }\n /** Update a segment in the last message. */\n updateSegment(segmentId: string, updates: Partial<AparteSegment>): void {\n this._host?.updateSegment(segmentId, updates);\n }\n /** Remove a transient segment. */\n removeSegment(segmentId: string): void { this._host?.removeSegment(segmentId); }\n /** Append content to a segment in the last message. */\n appendToSegment(segmentId: string, content: string): void {\n this._host?.appendToSegment(segmentId, content);\n }\n /** Read the current message list. */\n getMessages(): AparteMessage[] { return this._host?.getMessages() ?? this.messages(); }\n /** Clear all messages + reset state. */\n clearMessages(): void { this._host?.clearMessages(); }\n /** Scroll the viewport to the latest message. */\n scrollToBottom(): void {\n (this.viewportRef?.nativeElement as unknown as { scrollToBottom?: () => void })?.scrollToBottom?.();\n }\n /**\n * The `<aparte-chat-viewport>` element — for custom scroll handling, an\n * IntersectionObserver, etc. Same `getViewport()` accessor on all four\n * wrappers.\n */\n getViewport(): HTMLElement | null { return this.viewportRef?.nativeElement ?? null; }\n /** Focus the composer input. */\n focusInput(): void {\n (this.inputRef?.nativeElement as unknown as { focus?: () => void })?.focus?.();\n }\n /** Create a new branch from a message (returns the new sibling index). */\n addBranch(messageId: string): number { return this._host?.addBranch(messageId) ?? 0; }\n /** Add a sibling of an existing message (returns the new id). */\n addSiblingOf(existingId: string, newMessage: AparteMessage): string | null {\n return this._host?.addSiblingOf(existingId, newMessage) ?? null;\n }\n /** Remove a message and all descendants (edit flow). */\n truncateFrom(messageId: string): void { this._host?.truncateFrom(messageId); }\n /** Keep up to and including a user message, drop later responses (retry). */\n truncateResponsesAfter(userMessageId: string): void {\n this._host?.truncateResponsesAfter(userMessageId);\n }\n\n // ── Token streaming (cross-wrapper contract + Observable adapter) ──────────\n\n /**\n * Inject a token stream for LLM streaming. Takes the cross-wrapper\n * `AsyncIterable<string>` contract (the exact call that works on\n * React/Vue/Svelte) — or an Angular-idiomatic RxJS `Observable<string>`,\n * adapted into the host's agnostic `streamTokens(AsyncIterable)` so the\n * orphan-stream guard + id tracking stay in one place (the host).\n */\n async injectTokenStream(\n messageId: string,\n stream: Observable<string> | AsyncIterable<string>,\n ): Promise<void> {\n if (!this._host) return;\n const tokens = Symbol.asyncIterator in stream\n ? (stream as AsyncIterable<string>)\n : this._observableToAsyncIterable(stream as Observable<string>);\n await this._host.streamTokens(messageId, tokens);\n }\n\n /** Stop any active token stream. */\n stopTokenStream(): void { this._host?.stopTokenStream(); }\n\n /**\n * Set the active conversation id imperatively — parity with the other\n * wrappers' handles (the `conversationId` `@Input` remains the declarative\n * path). Delegates to the host, which loads/persists via the registered\n * `AparteConversationManager`.\n */\n setConversationId(id: string | null): Promise<void> {\n return this._host?.setConversationId(id) ?? Promise.resolve();\n }\n\n private _observableToAsyncIterable(stream: Observable<string>): AsyncIterable<string> {\n return {\n [Symbol.asyncIterator](): AsyncIterator<string> {\n const buffer: string[] = [];\n let finished = false;\n let failure: unknown = null;\n let pending: {\n resolve: (r: IteratorResult<string>) => void;\n reject: (e: unknown) => void;\n } | null = null;\n const settle = () => {\n if (!pending) return;\n if (failure !== null) { const p = pending; pending = null; p.reject(failure); return; }\n if (buffer.length) {\n const p = pending; pending = null;\n p.resolve({ value: buffer.shift() as string, done: false });\n return;\n }\n if (finished) {\n const p = pending; pending = null;\n p.resolve({ value: undefined as unknown as string, done: true });\n }\n };\n const sub = stream.subscribe({\n next: (v) => { buffer.push(v); settle(); },\n error: (e) => { failure = e; settle(); },\n complete: () => { finished = true; settle(); },\n });\n return {\n next(): Promise<IteratorResult<string>> {\n if (failure !== null) return Promise.reject(failure);\n if (buffer.length) {\n return Promise.resolve({ value: buffer.shift() as string, done: false });\n }\n if (finished) {\n return Promise.resolve({ value: undefined as unknown as string, done: true });\n }\n return new Promise((resolve, reject) => { pending = { resolve, reject }; });\n },\n return(): Promise<IteratorResult<string>> {\n sub.unsubscribe();\n // If a consumer is mid-`await next()` on an empty buffer (e.g. the\n // orphan-stream guard calling `return()` on stop/teardown), settle\n // that pending promise now with done:true — otherwise it hangs\n // forever, since unsubscribing means `next` and `complete` will\n // never fire again to resolve it.\n if (pending) {\n const p = pending;\n pending = null;\n p.resolve({ value: undefined as unknown as string, done: true });\n }\n finished = true;\n return Promise.resolve({ value: undefined as unknown as string, done: true });\n },\n };\n },\n };\n }\n\n /** Handle aparte-send event from the composer Web Component. */\n onAparteSend(event: Event): void {\n const detail = (event as CustomEvent<AparteSendEventDetail>).detail;\n // Smooth-scroll the next auto-scroll (when Angular adds the user bubble).\n (this.viewportRef?.nativeElement as unknown as { requestSmoothScroll?: () => void })\n ?.requestSmoothScroll?.();\n this.messageSent.emit(detail);\n }\n}\n","import {\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n ElementRef,\n OnChanges,\n OnDestroy,\n AfterViewInit,\n SimpleChanges,\n ChangeDetectionStrategy,\n Input,\n output,\n Renderer2,\n inject\n} from '@angular/core';\nimport { applyElementProps, APARTE_DEFAULT_UI_EVENTS } from '@aparte/core';\n\n/**\n * The imperative surface of the `AparteUi` proxy — the same\n * `getElement`/`callMethod` contract on all four wrappers.\n */\nexport interface AparteUiHandle {\n getElement<T extends HTMLElement = HTMLElement>(): T | null;\n callMethod<T = unknown>(methodName: string, ...args: unknown[]): T | undefined;\n}\n\n/**\n * AparteUiComponent - Universal UI Proxy\n *\n * A pass-through proxy component that dynamically injects any aparté\n * Web Component, so you don't need a dedicated Angular wrapper per element.\n *\n * `name` can be any custom element, including one of yours. `aparte-model-selector`\n * below is defined by `@aparte/plugin-model-selector`, not by core — until that\n * package is imported the tag mounts empty and inert with no error, and upgrades on\n * its own once the definition arrives, which is what makes `provideAparte`'s lazy\n * `plugins` loaders work.\n *\n * A PLUGIN's event is not in the default forward list — that default is core's, and a\n * third-party plugin's author cannot add to it, so listing ours would privilege our\n * packages over theirs. Name it in `events` and it arrives; leave it out and the handler\n * silently never fires, which is what this example used to do.\n *\n * @example\n * ```html\n * <aparte-ui\n * name=\"aparte-model-selector\"\n * [props]=\"{\n * placeholder: 'Ask anything...',\n * '--glow-opacity': '1',\n * '--glow-speed': '4s'\n * }\"\n * [events]=\"['aparte-model-change']\"\n * (elementEvent)=\"onEvent($event)\"\n * />\n * ```\n *\n * @description\n * - Keys starting with `--` are applied as CSS Variables\n * - Other keys are set as DOM properties on the element\n * - The events in `events` (default: {@link APARTE_DEFAULT_UI_EVENTS}) bubble up via `elementEvent`\n */\n@Component({\n selector: 'aparte-ui',\n standalone: true,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `<ng-container></ng-container>`,\n styles: [`\n :host {\n display: contents;\n }\n `]\n})\nexport class AparteUiComponent implements AfterViewInit, OnChanges, OnDestroy, AparteUiHandle {\n private readonly renderer = inject(Renderer2);\n private readonly hostEl = inject(ElementRef);\n\n // ─────────────────────────────────────────────────────────────\n // Inputs\n // ─────────────────────────────────────────────────────────────\n\n /** The custom element tag name (e.g., 'aparte-model-selector') */\n @Input({ required: true }) name!: string;\n\n /** Properties to pass to the element. Keys starting with '--' are CSS vars */\n @Input() props: Record<string, unknown> = {};\n\n /**\n * Which custom events to forward through `elementEvent`. Defaults to the\n * interactive aparté surface ({@link APARTE_DEFAULT_UI_EVENTS}); pass your own list to\n * listen to other events (e.g. `['aparte-composer-change']` for attachments).\n */\n @Input() events?: string[];\n\n // ─────────────────────────────────────────────────────────────\n // Outputs\n // ─────────────────────────────────────────────────────────────\n\n /** Emits a forwarded custom event from the underlying Web Component */\n readonly elementEvent = output<CustomEvent>();\n\n // ─────────────────────────────────────────────────────────────\n // Internal State\n // ─────────────────────────────────────────────────────────────\n\n /** The dynamically created Web Component element */\n private element: HTMLElement | null = null;\n\n /** Cleanup functions for event listeners */\n private eventCleanups: (() => void)[] = [];\n\n /** Joined key of the bound event set, so a fresh inline `[events]` array\n * doesn't thrash the element — only a real change rebinds. */\n private lastEventsKey = '';\n\n // ─────────────────────────────────────────────────────────────\n // Lifecycle\n // ─────────────────────────────────────────────────────────────\n\n ngAfterViewInit(): void {\n this.createElement();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n // Recreate the element when `name` (or the forwarded event set) changes.\n const nameChanged = !!changes['name'] && !changes['name'].firstChange;\n const eventsChanged =\n !!changes['events'] &&\n !changes['events'].firstChange &&\n this.eventsKey() !== this.lastEventsKey;\n\n if (nameChanged || eventsChanged) {\n this.destroyElement();\n this.createElement();\n }\n\n // If props changed, update them\n if (changes['props'] && this.element) {\n this.applyProps();\n }\n }\n\n ngOnDestroy(): void {\n this.destroyElement();\n }\n\n // ─────────────────────────────────────────────────────────────\n // Element Management\n // ─────────────────────────────────────────────────────────────\n\n private eventsKey(): string {\n return (this.events ?? APARTE_DEFAULT_UI_EVENTS).join('|');\n }\n\n private createElement(): void {\n if (!this.name) return;\n\n // Create the custom element\n this.element = this.renderer.createElement(this.name);\n\n // Apply initial props\n this.applyProps();\n\n // Setup event listeners\n this.setupEventListeners();\n\n // Append to host (not container, to avoid extra wrapper)\n this.renderer.appendChild(this.hostEl.nativeElement, this.element);\n }\n\n private destroyElement(): void {\n // Cleanup event listeners\n this.eventCleanups.forEach(cleanup => cleanup());\n this.eventCleanups = [];\n\n // Remove element\n if (this.element && this.element.parentNode) {\n this.renderer.removeChild(this.hostEl.nativeElement, this.element);\n }\n this.element = null;\n }\n\n /**\n * aparté elements are **attribute-driven** (`observedAttributes`): assigning a\n * property is either a silent no-op (nothing observes it) or throws outright on\n * a getter-only accessor — `<aparte-composer>`'s `placeholder`/`disabled` are\n * exactly that. So primitives go through `setAttribute`; only values an\n * attribute cannot carry (objects, functions) are handed over as properties.\n */\n private applyProps(): void {\n if (this.element) applyElementProps(this.element, this.props);\n }\n\n private setupEventListeners(): void {\n if (!this.element) return;\n\n this.lastEventsKey = this.eventsKey();\n (this.events ?? APARTE_DEFAULT_UI_EVENTS).forEach(eventName => {\n const listener = (event: Event) => {\n this.elementEvent.emit(event as CustomEvent);\n };\n\n this.element!.addEventListener(eventName, listener);\n this.eventCleanups.push(() => {\n this.element?.removeEventListener(eventName, listener);\n });\n });\n }\n\n // ─────────────────────────────────────────────────────────────\n // Public API\n // ─────────────────────────────────────────────────────────────\n\n /** Get the underlying Web Component element */\n getElement<T extends HTMLElement = HTMLElement>(): T | null {\n return this.element as T | null;\n }\n\n /** Call a method on the underlying element */\n callMethod<T = unknown>(methodName: string, ...args: unknown[]): T | undefined {\n if (!this.element) return undefined;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const method = (this.element as any)[methodName];\n if (typeof method === 'function') {\n return method.apply(this.element, args) as T;\n }\n return undefined;\n }\n}\n","// AUTO-GENERATED by scripts/gen-element-bindings.mjs from this package's\n// custom-elements.json. Do not edit: it is gitignored and rewritten every build.\n// The source of every fact below is the element's own JSDoc.\n\n/**\n * A typed Angular surface for every element this package defines.\n *\n * Generated, and that is the point: a hand-written directive is a parallel structure over\n * the manifest with nothing watching it, so an attribute added to an element would be\n * typed in React, Vue and Svelte — which derive from the registry — and silently missing\n * here. That happened, which is why this file is generated now.\n *\n * Outputs emit the event's DETAIL, not the `CustomEvent`, because\n * `(selectChange)=\"pick($event.value)\"` is the Angular idiom. Reach the event itself with\n * a plain host listener when you need `stopPropagation`.\n */\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n Output,\n booleanAttribute,\n inject,\n numberAttribute,\n} from '@angular/core';\nimport { applyElementProps } from '@aparte/core';\nimport type {\n AparteActionClickEventDetail,\n AparteActionEventDetail,\n AparteAttachmentPreviewEventDetail,\n AparteBranchNavigateEventDetail,\n AparteComposerChangeEventDetail,\n AparteConversationArchiveDetail,\n AparteConversationDeleteDetail,\n AparteConversationSelectDetail,\n AparteEditEventDetail,\n AparteFeedbackEventDetail,\n AparteMessageInfoEventDetail,\n AparteOptgroupToggleEventDetail,\n ApartePathChangedEventDetail,\n AparteRetryEventDetail,\n AparteSegmentUpdateEventDetail,\n AparteSelectChangeDetail,\n AparteSendEventDetail,\n} from '@aparte/core';\n\n/**\n * Writes one declared attribute onto the host element.\n *\n * `applyElementProps` is core's own rule, reused rather than reimplemented: a primitive\n * goes through `setAttribute`, `true` becomes the empty presence attribute,\n * `false`/`null`/`undefined` remove it, and only a value an attribute cannot carry is\n * handed over as a property.\n */\n@Directive()\nabstract class AparteElementBase {\n protected readonly host = inject(ElementRef<HTMLElement>);\n\n protected write(name: string, value: unknown): void {\n applyElementProps(this.host.nativeElement, { [name]: value });\n }\n}\n\n/** `<aparte-chat-bubble>` — One message: plain content or a list of rich segments, in light DOM. */\n@Directive({ selector: 'aparte-chat-bubble', standalone: true })\nexport class AparteChatBubbleDirective extends AparteElementBase {\n /** `user` / `assistant` / `system`; what the CSS keys off. */\n @Input() set messageRole(v: string | undefined) { this.write('data-role', v); }\n /** Plain text content, for a bubble with no segments. */\n @Input() set content(v: string | undefined) { this.write('content', v); }\n /** Epoch milliseconds OR a date string: `_updateTimestamp` accepts either and only coerces when the value is numeric. */\n @Input() set timestamp(v: number | string | undefined) { this.write('timestamp', v); }\n /** How streaming and the action bar address this bubble. */\n @Input() set messageId(v: string | undefined) { this.write('message-id', v); }\n /** Hides the action bar and shows the caret while a reply is in flight. */\n @Input({ transform: booleanAttribute }) set streaming(v: boolean) { this.write('streaming', v); }\n /** The display name in the header. */\n @Input() set name(v: string | undefined) { this.write('name', v); }\n\n /** An attached image was clicked, asking the app to open it full-size. */\n @Output() readonly attachmentPreview = new EventEmitter<AparteAttachmentPreviewEventDetail>();\n /** A custom action-bar button was pressed. */\n @Output() readonly action = new EventEmitter<AparteActionEventDetail>();\n /** Retry was pressed; the host forks the turn. */\n @Output() readonly retry = new EventEmitter<AparteRetryEventDetail>();\n /** Thumbs up or down. */\n @Output() readonly feedback = new EventEmitter<AparteFeedbackEventDetail>();\n /** The info affordance was pressed. */\n @Output() readonly messageInfo = new EventEmitter<AparteMessageInfoEventDetail>();\n /** An edit was saved. */\n @Output() readonly edit = new EventEmitter<AparteEditEventDetail>();\n /** The `‹1/2›` picker moved between sibling versions. */\n @Output() readonly branchNavigate = new EventEmitter<AparteBranchNavigateEventDetail>();\n\n @HostListener('aparte-attachment-preview', ['$event'])\n protected onAttachmentPreview(e: CustomEvent<AparteAttachmentPreviewEventDetail>): void { this.attachmentPreview.emit(e.detail); }\n\n @HostListener('aparte-action', ['$event'])\n protected onAction(e: CustomEvent<AparteActionEventDetail>): void { this.action.emit(e.detail); }\n\n @HostListener('aparte-retry', ['$event'])\n protected onRetry(e: CustomEvent<AparteRetryEventDetail>): void { this.retry.emit(e.detail); }\n\n @HostListener('aparte-feedback', ['$event'])\n protected onFeedback(e: CustomEvent<AparteFeedbackEventDetail>): void { this.feedback.emit(e.detail); }\n\n @HostListener('aparte-message-info', ['$event'])\n protected onMessageInfo(e: CustomEvent<AparteMessageInfoEventDetail>): void { this.messageInfo.emit(e.detail); }\n\n @HostListener('aparte-edit', ['$event'])\n protected onEdit(e: CustomEvent<AparteEditEventDetail>): void { this.edit.emit(e.detail); }\n\n @HostListener('aparte-branch-navigate', ['$event'])\n protected onBranchNavigate(e: CustomEvent<AparteBranchNavigateEventDetail>): void { this.branchNavigate.emit(e.detail); }\n}\n\n/** `<aparte-chat-status>` — A standalone status line — a light-DOM indicator the APP owns. Nothing in core turns it on: the framework host only ever flips it back OFF (on the first streamed token), and the four wrappers render one inside the viewport driven by their own `isTyping` prop. */\n@Directive({ selector: 'aparte-chat-status', standalone: true })\nexport class AparteChatStatusDirective extends AparteElementBase {\n /** Shows or hides the indicator. */\n @Input({ transform: booleanAttribute }) set visible(v: boolean) { this.write('visible', v); }\n /** The line to show. Absent, the line is dots-only and the accessible name falls back to the literal `Typing` (not the locale's string). */\n @Input() set text(v: string | undefined) { this.write('text', v); }\n}\n\n/** `<aparte-chat-viewport>` — The transcript surface: a light-DOM container with sticky scrolling, token streaming and segment-aware rendering. */\n@Directive({ selector: 'aparte-chat-viewport', standalone: true })\nexport class AparteChatViewportDirective extends AparteElementBase {\n /** How close to the bottom still counts as \"at the bottom\". */\n @Input({ transform: numberAttribute }) set scrollThreshold(v: number) { this.write('scroll-threshold', v); }\n /** Caps how many bubbles stay in the DOM; older ones are released. */\n @Input({ transform: numberAttribute }) set maxRenderedBubbles(v: number) { this.write('max-rendered-bubbles', v); }\n /** 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. */\n @Input({ transform: numberAttribute }) set maxMessages(v: number) { this.write('max-messages', v); }\n /** The wrapper's explicit hands-off signal: set it and this element builds no wrapper of its own and relocates none of the nodes the FRAMEWORK renders into it, because the framework owns them. Not \"none of its children\": core's own scroll-to-bottom button is re-appended whenever it stops being last, and that path runs in this mode only. All four wrappers set it. */\n @Input({ transform: booleanAttribute }) set frameworkManaged(v: boolean) { this.write('framework-managed', v); }\n\n /** A segment grew or settled during a stream. */\n @Output() readonly segmentUpdate = new EventEmitter<AparteSegmentUpdateEventDetail>();\n /** `clearAll()` finished emptying the transcript. No detail. */\n @Output() readonly resetDone = new EventEmitter<void>();\n /** The active branch path changed, after a retry fork or a navigation. */\n @Output() readonly pathChanged = new EventEmitter<ApartePathChangedEventDetail>();\n\n @HostListener('aparte-segment-update', ['$event'])\n protected onSegmentUpdate(e: CustomEvent<AparteSegmentUpdateEventDetail>): void { this.segmentUpdate.emit(e.detail); }\n\n @HostListener('aparte-reset-done')\n protected onResetDone(): void { this.resetDone.emit(); }\n\n @HostListener('aparte-path-changed', ['$event'])\n protected onPathChanged(e: CustomEvent<ApartePathChangedEventDetail>): void { this.pathChanged.emit(e.detail); }\n}\n\n/** `<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, whether a panel is up. */\n@Directive({ selector: 'aparte-composer', standalone: true })\nexport class AparteComposerDirective extends AparteElementBase {\n /** Fallback placeholder for `<aparte-composer-input>`, which reads it off this element when it carries none of its own. Read when that input renders, not pushed: changing it here leaves an input already on the page as it was. */\n @Input() set placeholder(v: string | undefined) { this.write('placeholder', v); }\n /** Disables the composer's own controls — the input, send, add-attachment and `<aparte-composer-action>` buttons each read it. What you put in the toolbar is yours to disable. */\n @Input({ transform: booleanAttribute }) set disabled(v: boolean) { this.write('disabled', v); }\n /** The id of the `<aparte-chat>` this composer drives. */\n @Input() set target(v: string | undefined) { this.write('target', v); }\n /** 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. */\n @Input({ transform: booleanAttribute }) set submitOnEnter(v: boolean) { this.write('submit-on-enter', v ? '' : 'false'); }\n\n /** A message was submitted: the text, its attachments and the target. */\n @Output() readonly send = new EventEmitter<AparteSendEventDetail>();\n /** The stop button was pressed. No detail; the two window events below carry the target. */\n @Output() readonly cancel = new EventEmitter<void>();\n /** Any of value / streaming / disabled / attachments / panel changed, folded into one event. */\n @Output() readonly composerChange = new EventEmitter<AparteComposerChangeEventDetail>();\n\n @HostListener('aparte-send', ['$event'])\n protected onSend(e: CustomEvent<AparteSendEventDetail>): void { this.send.emit(e.detail); }\n\n @HostListener('aparte-cancel')\n protected onCancel(): void { this.cancel.emit(); }\n\n @HostListener('aparte-composer-change', ['$event'])\n protected onComposerChange(e: CustomEvent<AparteComposerChangeEventDetail>): void { this.composerChange.emit(e.detail); }\n}\n\n/** `<aparte-composer-action>` — Generic action button primitive for <aparte-composer>. */\n@Directive({ selector: 'aparte-composer-action', standalone: true })\nexport class AparteComposerActionDirective extends AparteElementBase {\n /** Icon key for aparteGlobalConfig.getIcon(), or raw SVG/HTML starting with `<` */\n @Input() set icon(v: string | undefined) { this.write('icon', v); }\n /** Accessible label (also used as tooltip) */\n @Input() set label(v: string | undefined) { this.write('label', v); }\n /** Disables the button */\n @Input({ transform: booleanAttribute }) set disabled(v: boolean) { this.write('disabled', v); }\n /** Identifies WHICH button fired; carried as `AparteActionClickEventDetail.actionId`. Read lazily at dispatch time rather than observed, so changing it takes effect on the next click. */\n @Input() set actionId(v: string | undefined) { this.write('action-id', v); }\n\n /** 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 } */\n @Output() readonly actionClick = new EventEmitter<AparteActionClickEventDetail>();\n\n @HostListener('aparte-action-click', ['$event'])\n protected onActionClick(e: CustomEvent<AparteActionClickEventDetail>): void { this.actionClick.emit(e.detail); }\n}\n\n/** `<aparte-composer-add-attachment>` — File picker button for <aparte-composer>. */\n@Directive({ selector: 'aparte-composer-add-attachment', standalone: true })\nexport class AparteComposerAddAttachmentDirective extends AparteElementBase {\n /** MIME types / extensions passed to the file input (e.g. \"image/*,.pdf\") */\n @Input() set accept(v: string | undefined) { this.write('accept', v); }\n /** Allow multiple file selection (default: true) */\n @Input({ transform: booleanAttribute }) set multiple(v: boolean) { this.write('multiple', v ? '' : 'false'); }\n /** Greys out the picker. Drops are gated by the composer root's `disabled`, not by this one. */\n @Input({ transform: booleanAttribute }) set disabled(v: boolean) { this.write('disabled', v); }\n}\n\n/** `<aparte-composer-attachments>` — Renders a square thumbnail tile for each file attached to the root composer. */\n@Directive({ selector: 'aparte-composer-attachments', standalone: true })\nexport class AparteComposerAttachmentsDirective {\n /** An attached image was clicked; the app opens it full-size, and only if it declared `attachmentPreview`. */\n @Output() readonly attachmentPreview = new EventEmitter<AparteAttachmentPreviewEventDetail>();\n\n @HostListener('aparte-attachment-preview', ['$event'])\n protected onAttachmentPreview(e: CustomEvent<AparteAttachmentPreviewEventDetail>): void { this.attachmentPreview.emit(e.detail); }\n}\n\n/** `<aparte-composer-cancel>` — Cancel/stop streaming button primitive for <aparte-composer>. */\n/**\n * No member at all: this element observes nothing and dispatches nothing, so the\n * directive exists only to CLAIM THE TAG — which is what spares a consuming component\n * `CUSTOM_ELEMENTS_SCHEMA`, a switch that turns checking off for every unknown tag in\n * the file rather than just this one.\n */\n@Directive({ selector: 'aparte-composer-cancel', standalone: true })\nexport class AparteComposerCancelDirective {\n}\n\n/** `<aparte-composer-input>` — Contenteditable text input primitive. */\n@Directive({ selector: 'aparte-composer-input', standalone: true })\nexport class AparteComposerInputDirective extends AparteElementBase {\n /** Placeholder text (fallback: reads from aparte-composer) */\n @Input() set placeholder(v: string | undefined) { this.write('placeholder', v); }\n /** Max height in px before scroll (default: 200) */\n @Input({ transform: numberAttribute }) set maxHeight(v: number) { this.write('max-height', v); }\n /** 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. */\n @Input({ transform: numberAttribute }) set minHeight(v: number) { this.write('min-height', v); }\n /** Makes the field non-editable; the composer's own `disabled` also reaches it. */\n @Input({ transform: booleanAttribute }) set disabled(v: boolean) { this.write('disabled', v); }\n\n /** A submitting Enter was pressed with no `<aparte-composer>` ancestor to submit to; with one it calls `root.submit()` and dispatches nothing. No detail — the host that placed this primitive reads `getValue()`. */\n @Output() readonly composerSubmit = new EventEmitter<void>();\n\n @HostListener('aparte-composer-submit')\n protected onComposerSubmit(): void { this.composerSubmit.emit(); }\n}\n\n/** `<aparte-composer-send>` — Submit button primitive for <aparte-composer>. */\n/**\n * No member at all: this element observes nothing and dispatches nothing, so the\n * directive exists only to CLAIM THE TAG — which is what spares a consuming component\n * `CUSTOM_ELEMENTS_SCHEMA`, a switch that turns checking off for every unknown tag in\n * the file rather than just this one.\n */\n@Directive({ selector: 'aparte-composer-send', standalone: true })\nexport class AparteComposerSendDirective {\n}\n\n/** `<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. */\n/**\n * No member at all: this element observes nothing and dispatches nothing, so the\n * directive exists only to CLAIM THE TAG — which is what spares a consuming component\n * `CUSTOM_ELEMENTS_SCHEMA`, a switch that turns checking off for every unknown tag in\n * the file rather than just this one.\n */\n@Directive({ selector: 'aparte-composer-toolbar', standalone: true })\nexport class AparteComposerToolbarDirective {\n}\n\n/** `<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. */\n@Directive({ selector: 'aparte-conversation-list', standalone: true })\nexport class AparteConversationListDirective extends AparteElementBase {\n /** The id of the conversation to render as selected. */\n @Input() set activeId(v: string | undefined) { this.write('active-id', v); }\n\n /** A row was activated; the host loads that conversation. */\n @Output() readonly selectConversation = new EventEmitter<AparteConversationSelectDetail>();\n /** The delete action was pressed. Nothing is removed here. */\n @Output() readonly deleteConversation = new EventEmitter<AparteConversationDeleteDetail>();\n /** The archive action was pressed on a live conversation. */\n @Output() readonly archiveConversation = new EventEmitter<AparteConversationArchiveDetail>();\n /** The same action on an already-archived one; same detail shape, opposite intent. */\n @Output() readonly unarchiveConversation = new EventEmitter<AparteConversationArchiveDetail>();\n\n @HostListener('aparte-select-conversation', ['$event'])\n protected onSelectConversation(e: CustomEvent<AparteConversationSelectDetail>): void { this.selectConversation.emit(e.detail); }\n\n @HostListener('aparte-delete-conversation', ['$event'])\n protected onDeleteConversation(e: CustomEvent<AparteConversationDeleteDetail>): void { this.deleteConversation.emit(e.detail); }\n\n @HostListener('aparte-archive-conversation', ['$event'])\n protected onArchiveConversation(e: CustomEvent<AparteConversationArchiveDetail>): void { this.archiveConversation.emit(e.detail); }\n\n @HostListener('aparte-unarchive-conversation', ['$event'])\n protected onUnarchiveConversation(e: CustomEvent<AparteConversationArchiveDetail>): void { this.unarchiveConversation.emit(e.detail); }\n}\n\n/** `<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. */\n/**\n * No member at all: this element observes nothing and dispatches nothing, so the\n * directive exists only to CLAIM THE TAG — which is what spares a consuming component\n * `CUSTOM_ELEMENTS_SCHEMA`, a switch that turns checking off for every unknown tag in\n * the file rather than just this one.\n */\n@Directive({ selector: 'aparte-elicitation', standalone: true })\nexport class AparteElicitationDirective {\n}\n\n/** `<aparte-icon>` — AparteIcon */\n@Directive({ selector: 'aparte-icon', standalone: true })\nexport class AparteIconDirective extends AparteElementBase {\n /** Which glyph to draw. One of the names `setIconProvider` accepts; an unknown name draws nothing rather than a broken-image box. */\n @Input() set name(v: string | undefined) { this.write('name', v); }\n}\n\n/** `<aparte-optgroup>` — AparteOptgroup */\n@Directive({ selector: 'aparte-optgroup', standalone: true })\nexport class AparteOptgroupDirective extends AparteElementBase {\n /** Group label */\n @Input() set label(v: string | undefined) { this.write('label', v); }\n /** Adds the chevron and the click handler to the header — so it needs a `label`, and it is read only when that header is first built. */\n @Input({ transform: booleanAttribute }) set collapsible(v: boolean) { this.write('collapsible', v); }\n /** Collapsed state */\n @Input({ transform: booleanAttribute }) set collapsed(v: boolean) { this.write('collapsed', v); }\n /** Appends a spinner row to the group; the options stay visible. */\n @Input({ transform: booleanAttribute }) set loading(v: boolean) { this.write('loading', v); }\n\n /** The group was collapsed or expanded. */\n @Output() readonly optgroupToggle = new EventEmitter<AparteOptgroupToggleEventDetail>();\n\n @HostListener('aparte-optgroup-toggle', ['$event'])\n protected onOptgroupToggle(e: CustomEvent<AparteOptgroupToggleEventDetail>): void { this.optgroupToggle.emit(e.detail); }\n}\n\n/** `<aparte-option>` — AparteOption */\n@Directive({ selector: 'aparte-option', standalone: true })\nexport class AparteOptionDirective extends AparteElementBase {\n /** Option value */\n @Input() set value(v: string | undefined) { this.write('value', v); }\n /** Disabled state */\n @Input({ transform: booleanAttribute }) set disabled(v: boolean) { this.write('disabled', v); }\n /** Selected state */\n @Input({ transform: booleanAttribute }) set selected(v: boolean) { this.write('selected', v); }\n /** Free-form status the host sets; styled, never read by core. */\n @Input() set dataStatus(v: string | undefined) { this.write('data-status', v); }\n}\n\n/** `<aparte-progress-spinner>` — AparteProgressSpinner */\n@Directive({ selector: 'aparte-progress-spinner', standalone: true })\nexport class AparteProgressSpinnerDirective extends AparteElementBase {\n /** Progress percentage 0–100 (omit for indeterminate) */\n @Input({ transform: numberAttribute }) set value(v: number) { this.write('value', v); }\n}\n\n/** `<aparte-select>` — Dropdown select for aparté — a vanilla web component with optional grouping, a search filter and a keyboard-driven listbox. */\n@Directive({ selector: 'aparte-select', standalone: true })\nexport class AparteSelectDirective extends AparteElementBase {\n /** The selected option's value. */\n @Input() set value(v: string | undefined) { this.write('value', v); }\n /** Shown while nothing is selected. */\n @Input() set placeholder(v: string | undefined) { this.write('placeholder', v); }\n /** Blocks opening the dropdown. */\n @Input({ transform: booleanAttribute }) set disabled(v: boolean) { this.write('disabled', v); }\n /** Observed, never read: `<aparte-optgroup>` children render as groups without it. */\n @Input({ transform: booleanAttribute }) set grouped(v: boolean) { this.write('grouped', v); }\n /** Adds a filter field above the options. Read on the first render only. */\n @Input({ transform: booleanAttribute }) set searchable(v: boolean) { this.write('searchable', v); }\n /** Reflects (and controls) whether the dropdown is open. */\n @Input({ transform: booleanAttribute }) set open(v: boolean) { this.write('open', v); }\n\n /** The dropdown opened. No detail. */\n @Output() readonly selectOpen = new EventEmitter<void>();\n /** The dropdown closed. No detail. */\n @Output() readonly selectClose = new EventEmitter<void>();\n /** The selection changed; carries the new value, its label and the previous value. */\n @Output() readonly selectChange = new EventEmitter<AparteSelectChangeDetail>();\n\n @HostListener('aparte-select-open')\n protected onSelectOpen(): void { this.selectOpen.emit(); }\n\n @HostListener('aparte-select-close')\n protected onSelectClose(): void { this.selectClose.emit(); }\n\n @HostListener('aparte-select-change', ['$event'])\n protected onSelectChange(e: CustomEvent<AparteSelectChangeDetail>): void { this.selectChange.emit(e.detail); }\n}\n\n/**\n * Every element directive, for one import in a standalone component.\n *\n * ```ts\n * @Component({ imports: [...APARTE_ELEMENT_DIRECTIVES], template: `…` })\n * ```\n */\nexport const APARTE_ELEMENT_DIRECTIVES = [\n AparteChatBubbleDirective,\n AparteChatStatusDirective,\n AparteChatViewportDirective,\n AparteComposerDirective,\n AparteComposerActionDirective,\n AparteComposerAddAttachmentDirective,\n AparteComposerAttachmentsDirective,\n AparteComposerCancelDirective,\n AparteComposerInputDirective,\n AparteComposerSendDirective,\n AparteComposerToolbarDirective,\n AparteConversationListDirective,\n AparteElicitationDirective,\n AparteIconDirective,\n AparteOptgroupDirective,\n AparteOptionDirective,\n AparteProgressSpinnerDirective,\n AparteSelectDirective,\n] as const;\n","import { Injectable, OnDestroy, computed, signal } from '@angular/core';\nimport { aparteGlobalConfig, AparteConversationManager, type AparteConfig, type AparteConversation, type AparteStorageAdapter } from '@aparte/core';\nimport type { AparteMessage } from '@aparte/core';\n\n/**\n * Angular 19 Signal-based wrapper around AparteConversationManager.\n *\n * Register a storage adapter before calling init():\n * ```ts\n * // app.config.ts\n * export const appConfig: ApplicationConfig = {\n * providers: [\n * {\n * provide: CONVERSATION_ADAPTER,\n * useValue: new IndexedDBAdapter('my-app-convs'),\n * },\n * ],\n * };\n * ```\n *\n * Then inject ConversationManagerService in any component or service.\n */\n@Injectable({ providedIn: 'root' })\nexport class ConversationManagerService implements OnDestroy {\n private _manager: AparteConversationManager | null = null;\n private _unsubscribe: (() => void) | null = null;\n\n // ─── Signals ─────────────────────────────────────────────────────────────\n\n /** All conversations (active + archived). */\n readonly conversations = signal<AparteConversation[]>([]);\n\n /** Active conversations only, newest first. */\n readonly activeConversations = computed(() =>\n this.conversations()\n .filter(c => !c.archivedAt)\n .sort((a, b) => b.updatedAt - a.updatedAt)\n );\n\n /** Archived conversations, newest first. */\n readonly archivedConversations = computed(() =>\n this.conversations()\n .filter(c => !!c.archivedAt)\n .sort((a, b) => b.updatedAt - a.updatedAt)\n );\n\n /** Currently active conversation id. */\n readonly activeId = signal<string | null>(null);\n\n /** The active conversation object (null when no conv is selected). */\n readonly activeConversation = computed(() => {\n const id = this.activeId();\n if (!id) return null;\n return this.conversations().find(c => c.id === id) ?? null;\n });\n\n // ─── Lifecycle ───────────────────────────────────────────────────────────\n\n /**\n * Initialise the service with a storage adapter.\n * Call once in your root component or app initialiser.\n */\n async init(adapter: AparteStorageAdapter, config: AparteConfig = aparteGlobalConfig): Promise<void> {\n this._manager = new AparteConversationManager(adapter);\n this._unsubscribe = this._manager.subscribe(convs => {\n this.conversations.set([...convs]);\n this.activeId.set(this._manager!.activeId);\n });\n await this._manager.init();\n // Sync activeId after load (manager may have no active conv yet)\n this.activeId.set(this._manager.activeId);\n // Registered on the config the chat will resolve, so\n // AparteConversationController finds it without explicit DI plumbing.\n //\n // `config` defaults to the global singleton. Pass the SAME config you gave\n // `[config]` on `<aparte-chat>`: the controller resolves the config\n // governing its host element, so a manager on the global is invisible to a\n // chat with its own — persistence silently does nothing while the\n // optimistic UI keeps working.\n config.setConversationManager(this._manager);\n }\n\n ngOnDestroy(): void {\n this._unsubscribe?.();\n }\n\n // ─── Actions ─────────────────────────────────────────────────────────────\n\n /** Create a new empty conversation, make it active, return it. */\n async createNew(title?: string): Promise<AparteConversation> {\n this._assertInit();\n return this._manager!.createNew(title);\n }\n\n // Note: there is no `select()` / `clearActive()` here on purpose.\n // The active conversation is owned exclusively by AparteConversationController\n // (inside <aparte-chat>). To switch conversations, either bind\n // `[conversationId]` on <aparte-chat> or dispatch a window event:\n // window.dispatchEvent(new CustomEvent('aparte-select-conversation', {\n // detail: { id, targetId? },\n // }));\n // The `activeId` signal here is read-only and stays in sync via subscribe().\n\n /** Append a message to a conversation and persist. */\n async addMessage(convId: string, msg: AparteMessage): Promise<void> {\n this._assertInit();\n return this._manager!.addMessage(convId, msg);\n }\n\n /**\n * Replace all messages for a conversation.\n * Call after branch navigation or AI response completion.\n */\n async updateMessages(convId: string, messages: AparteMessage[]): Promise<void> {\n this._assertInit();\n return this._manager!.updateMessages(convId, messages);\n }\n\n /** Permanently delete a conversation. */\n async delete(id: string): Promise<void> {\n this._assertInit();\n return this._manager!.delete(id);\n }\n\n /** Archive a conversation. */\n async archive(id: string): Promise<void> {\n this._assertInit();\n return this._manager!.archive(id);\n }\n\n /** Restore an archived conversation. */\n async unarchive(id: string): Promise<void> {\n this._assertInit();\n return this._manager!.unarchive(id);\n }\n\n // ─── Private ─────────────────────────────────────────────────────────────\n\n private _assertInit(): void {\n if (!this._manager) {\n throw new Error(\n '[ConversationManagerService] Not initialised. Call init(adapter) before using the service.'\n );\n }\n }\n}\n","/**\n * aparté Angular wrapper\n * Angular 19 standalone components + services over the framework-agnostic web components.\n */\n\n// Configuration (a standalone provider function — no NgModule).\nexport { provideAparte, APARTE_CONFIG_TOKEN } from './lib/provide-aparte';\nexport type { ProvideAparteOptions, ApartePluginLoader } from './lib/provide-aparte';\n\n// Components (standalone — import them directly).\nexport { AparteChatComponent } from './lib/aparte-chat.component';\nexport { AparteUiComponent } from './lib/aparte-ui.component';\nexport type { AparteUiHandle } from './lib/aparte-ui.component';\n\n// Typed directives, one per element: the real tag in the template with typed Inputs and\n// one Output per event. GENERATED from core's custom-elements manifest at build time —\n// hand-written, they were a parallel structure that nothing watched, so an attribute\n// added to an element would be typed in the other three wrappers and silently missing\n// here. `<aparte-ui>` stays for an element aparté does not define.\nexport {\n APARTE_ELEMENT_DIRECTIVES,\n AparteChatViewportDirective,\n AparteChatBubbleDirective,\n AparteChatStatusDirective,\n AparteComposerDirective,\n AparteComposerInputDirective,\n AparteComposerActionDirective,\n AparteComposerAddAttachmentDirective,\n AparteComposerAttachmentsDirective,\n AparteComposerSendDirective,\n AparteComposerCancelDirective,\n AparteComposerToolbarDirective,\n AparteSelectDirective,\n AparteOptionDirective,\n AparteOptgroupDirective,\n AparteConversationListDirective,\n AparteProgressSpinnerDirective,\n AparteElicitationDirective,\n} from './generated/element.directives';\n\n// Annex: client lifecycle + reactive conversation manager.\nexport { AparteAiService, APARTE_CLIENT_OPTIONS } from './lib/aparte-ai.service';\nexport { ConversationManagerService } from './lib/conversation-manager.service';\n\n// Public types — re-exported from `@aparte/core`, the single source of truth\n// (the component used to re-declare `AparteMessage`/`AparteSendEventDetail` locally).\nexport type {\n AparteMessage,\n AparteSendEventDetail,\n AparteActionEventDetail,\n AparteSegment,\n AparteTextSegment,\n AparteCodeSegment,\n AparteThinkingSegment,\n // The imperative surface every wrapper exposes. Angular alone used to omit it,\n // while React and the other two each aliased it under a name of their own.\n AparteChatImperativeApi,\n} from '@aparte/core';\n\n// Re-export aparteGlobalConfig for direct access (config without `provideAparte`).\nexport { aparteGlobalConfig } from '@aparte/core';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAGA;;;AAGG;MACU,qBAAqB,GAAG,IAAI,cAAc,CAAsB,uBAAuB;AAEpG;;;;;AAKG;MAIU,eAAe,CAAA;IACP,cAAc,GAAG,MAAM,CAAC,qBAAqB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3E,OAAO,GAAiB,IAAI,YAAY,CAAC,IAAI,CAAC,cAAc,IAAI,EAAE,CAAC;AAE3E;;;;;;;AAOG;IACH,OAAO,GAAA;AACH,QAAA,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE;IACxB;AAEA;;AAEG;IACH,UAAU,GAAA;AACN,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;IACvB;AAEA;;AAEG;IACH,KAAK,GAAA;AACD,QAAA,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE;IACxB;IAEA,WAAW,GAAA;QACP,IAAI,CAAC,UAAU,EAAE;IACrB;wGAhCS,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAf,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cAFZ,MAAM,EAAA,CAAA;;4FAET,eAAe,EAAA,UAAA,EAAA,CAAA;kBAH3B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE;AACf,iBAAA;;;ACwDD;MACa,mBAAmB,GAAG,IAAI,cAAc,CAAuB,eAAe;AAE3F,eAAe,cAAc,CAAC,M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A;AAA1B,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,cADb,MAAM,EAAA,CAAA;;4FACnB,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBADtC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACtBlC;;;AAGG;AAEH;;ACLA;;AAEG;;;;"}
@@ -66,11 +66,11 @@ export declare class AparteChatBubbleDirective extends AparteElementBase {
66
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
67
  static ngAcceptInputType_streaming: unknown;
68
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. */
69
+ /** `<aparte-chat-status>` — A standalone status line — a light-DOM indicator the APP owns. Nothing in core turns it on: the framework host only ever flips it back OFF (on the first streamed token), and the four wrappers render one inside the viewport driven by their own `isTyping` prop. */
70
70
  export declare class AparteChatStatusDirective extends AparteElementBase {
71
71
  /** Shows or hides the indicator. */
72
72
  set visible(v: boolean);
73
- /** The line to show. Defaults to the locale's typing string. */
73
+ /** The line to show. Absent, the line is dots-only and the accessible name falls back to the literal `Typing` (not the locale's string). */
74
74
  set text(v: string | undefined);
75
75
  static ɵfac: i0.ɵɵFactoryDeclaration<AparteChatStatusDirective, never>;
76
76
  static ɵdir: i0.ɵɵDirectiveDeclaration<AparteChatStatusDirective, "aparte-chat-status", never, { "visible": { "alias": "visible"; "required": false; }; "text": { "alias": "text"; "required": false; }; }, {}, never, never, true, never>;
@@ -84,13 +84,13 @@ export declare class AparteChatViewportDirective extends AparteElementBase {
84
84
  set maxRenderedBubbles(v: number);
85
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
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. */
87
+ /** The wrapper's explicit hands-off signal: set it and this element builds no wrapper of its own and relocates none of the nodes the FRAMEWORK renders into it, because the framework owns them. Not "none of its children": core's own scroll-to-bottom button is re-appended whenever it stops being last, and that path runs in this mode only. All four wrappers set it. */
88
88
  set frameworkManaged(v: boolean);
89
89
  /** A segment grew or settled during a stream. */
90
90
  readonly segmentUpdate: EventEmitter<AparteSegmentUpdateEventDetail>;
91
91
  /** `clearAll()` finished emptying the transcript. No detail. */
92
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 */
93
+ /** The active branch path changed, after a retry fork or a navigation. */
94
94
  readonly pathChanged: EventEmitter<ApartePathChangedEventDetail>;
95
95
  protected onSegmentUpdate(e: CustomEvent<AparteSegmentUpdateEventDetail>): void;
96
96
  protected onResetDone(): void;
@@ -102,11 +102,11 @@ export declare class AparteChatViewportDirective extends AparteElementBase {
102
102
  static ngAcceptInputType_maxMessages: unknown;
103
103
  static ngAcceptInputType_frameworkManaged: unknown;
104
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. */
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, whether a panel is up. */
106
106
  export declare class AparteComposerDirective extends AparteElementBase {
107
- /** Forwarded to `<aparte-composer-input>` through the internal bus. */
107
+ /** Fallback placeholder for `<aparte-composer-input>`, which reads it off this element when it carries none of its own. Read when that input renders, not pushed: changing it here leaves an input already on the page as it was. */
108
108
  set placeholder(v: string | undefined);
109
- /** Disables the whole composer, every part included. */
109
+ /** Disables the composer's own controls — the input, send, add-attachment and `<aparte-composer-action>` buttons each read it. What you put in the toolbar is yours to disable. */
110
110
  set disabled(v: boolean);
111
111
  /** The id of the `<aparte-chat>` this composer drives. */
112
112
  set target(v: string | undefined);
@@ -134,7 +134,7 @@ export declare class AparteComposerActionDirective extends AparteElementBase {
134
134
  set label(v: string | undefined);
135
135
  /** Disables the button */
136
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. */
137
+ /** Identifies WHICH button fired; carried as `AparteActionClickEventDetail.actionId`. Read lazily at dispatch time rather than observed, so changing it takes effect on the next click. */
138
138
  set actionId(v: string | undefined);
139
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
140
  readonly actionClick: EventEmitter<AparteActionClickEventDetail>;
@@ -149,7 +149,7 @@ export declare class AparteComposerAddAttachmentDirective extends AparteElementB
149
149
  set accept(v: string | undefined);
150
150
  /** Allow multiple file selection (default: true) */
151
151
  set multiple(v: boolean);
152
- /** Greys out the picker and ignores drops. */
152
+ /** Greys out the picker. Drops are gated by the composer root's `disabled`, not by this one. */
153
153
  set disabled(v: boolean);
154
154
  static ɵfac: i0.ɵɵFactoryDeclaration<AparteComposerAddAttachmentDirective, never>;
155
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>;
@@ -185,7 +185,7 @@ export declare class AparteComposerInputDirective extends AparteElementBase {
185
185
  set minHeight(v: number);
186
186
  /** Makes the field non-editable; the composer's own `disabled` also reaches it. */
187
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. */
188
+ /** A submitting Enter was pressed with no `<aparte-composer>` ancestor to submit to; with one it calls `root.submit()` and dispatches nothing. No detail — the host that placed this primitive reads `getValue()`. */
189
189
  readonly composerSubmit: EventEmitter<void>;
190
190
  protected onComposerSubmit(): void;
191
191
  static ɵfac: i0.ɵɵFactoryDeclaration<AparteComposerInputDirective, never>;
@@ -246,15 +246,22 @@ export declare class AparteElicitationDirective {
246
246
  static ɵfac: i0.ɵɵFactoryDeclaration<AparteElicitationDirective, never>;
247
247
  static ɵdir: i0.ɵɵDirectiveDeclaration<AparteElicitationDirective, "aparte-elicitation", never, {}, {}, never, never, true, never>;
248
248
  }
249
+ /** `<aparte-icon>` — AparteIcon */
250
+ export declare class AparteIconDirective extends AparteElementBase {
251
+ /** Which glyph to draw. One of the names `setIconProvider` accepts; an unknown name draws nothing rather than a broken-image box. */
252
+ set name(v: string | undefined);
253
+ static ɵfac: i0.ɵɵFactoryDeclaration<AparteIconDirective, never>;
254
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AparteIconDirective, "aparte-icon", never, { "name": { "alias": "name"; "required": false; }; }, {}, never, never, true, never>;
255
+ }
249
256
  /** `<aparte-optgroup>` — AparteOptgroup */
250
257
  export declare class AparteOptgroupDirective extends AparteElementBase {
251
258
  /** Group label */
252
259
  set label(v: string | undefined);
253
- /** Allow collapse/expand */
260
+ /** Adds the chevron and the click handler to the header — so it needs a `label`, and it is read only when that header is first built. */
254
261
  set collapsible(v: boolean);
255
262
  /** Collapsed state */
256
263
  set collapsed(v: boolean);
257
- /** Shows a spinner in place of the group's options. */
264
+ /** Appends a spinner row to the group; the options stay visible. */
258
265
  set loading(v: boolean);
259
266
  /** The group was collapsed or expanded. */
260
267
  readonly optgroupToggle: EventEmitter<AparteOptgroupToggleEventDetail>;
@@ -294,11 +301,11 @@ export declare class AparteSelectDirective extends AparteElementBase {
294
301
  set value(v: string | undefined);
295
302
  /** Shown while nothing is selected. */
296
303
  set placeholder(v: string | undefined);
297
- /** Blocks opening and selection. */
304
+ /** Blocks opening the dropdown. */
298
305
  set disabled(v: boolean);
299
- /** Renders `<aparte-optgroup>` children as collapsible groups. */
306
+ /** Observed, never read: `<aparte-optgroup>` children render as groups without it. */
300
307
  set grouped(v: boolean);
301
- /** Adds a filter field above the options. */
308
+ /** Adds a filter field above the options. Read on the first render only. */
302
309
  set searchable(v: boolean);
303
310
  /** Reflects (and controls) whether the dropdown is open. */
304
311
  set open(v: boolean);
@@ -325,5 +332,5 @@ export declare class AparteSelectDirective extends AparteElementBase {
325
332
  * @Component({ imports: [...APARTE_ELEMENT_DIRECTIVES], template: `…` })
326
333
  * ```
327
334
  */
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];
335
+ 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 AparteIconDirective, typeof AparteOptgroupDirective, typeof AparteOptionDirective, typeof AparteProgressSpinnerDirective, typeof AparteSelectDirective];
329
336
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aparte/angular",
3
- "version": "0.12.0",
3
+ "version": "0.13.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,
@@ -29,7 +29,7 @@
29
29
  "peerDependencies": {
30
30
  "@angular/common": "^19.2.0",
31
31
  "@angular/core": "^19.2.0",
32
- "@aparte/core": ">=0.7.0 <1.0.0",
32
+ "@aparte/core": ">=0.13.0 <1.0.0",
33
33
  "rxjs": "^7.8.0"
34
34
  },
35
35
  "devDependencies": {
@@ -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.12.0"
48
+ "@aparte/core": "0.13.0"
49
49
  },
50
50
  "keywords": [
51
51
  "angular",