@tolle_/tolle-ui 18.2.28 → 18.2.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/accordion-item.component.mjs +5 -11
- package/esm2022/lib/accordion.component.mjs +4 -9
- package/esm2022/lib/alert-dialog-dynamic.component.mjs +5 -10
- package/esm2022/lib/alert-dialog.component.mjs +44 -59
- package/esm2022/lib/alert.component.mjs +5 -11
- package/esm2022/lib/aspect-ratio.component.mjs +119 -0
- package/esm2022/lib/attachment.component.mjs +334 -0
- package/esm2022/lib/avatar-fallback.component.mjs +3 -3
- package/esm2022/lib/avatar.component.mjs +4 -9
- package/esm2022/lib/badge.component.mjs +4 -9
- package/esm2022/lib/breadcrumb-item.component.mjs +3 -3
- package/esm2022/lib/breadcrumb-link.component.mjs +3 -3
- package/esm2022/lib/breadcrumb-separator.component.mjs +3 -3
- package/esm2022/lib/breadcrumb.component.mjs +3 -3
- package/esm2022/lib/bubble.component.mjs +301 -0
- package/esm2022/lib/button.component.mjs +5 -11
- package/esm2022/lib/calendar.component.mjs +5 -11
- package/esm2022/lib/card.component.mjs +14 -43
- package/esm2022/lib/carousel/carousel.component.mjs +5 -12
- package/esm2022/lib/chain-of-thought.component.mjs +380 -0
- package/esm2022/lib/chart-pie.component.mjs +386 -0
- package/esm2022/lib/chart.component.mjs +1146 -0
- package/esm2022/lib/chart.service.mjs +555 -0
- package/esm2022/lib/checkbox.component.mjs +5 -11
- package/esm2022/lib/checkpoint.component.mjs +134 -0
- package/esm2022/lib/collapsible.component.mjs +4 -11
- package/esm2022/lib/combobox.component.mjs +372 -0
- package/esm2022/lib/command-dialog.component.mjs +164 -0
- package/esm2022/lib/command.component.mjs +514 -0
- package/esm2022/lib/command.service.mjs +130 -0
- package/esm2022/lib/confirmation.component.mjs +219 -0
- package/esm2022/lib/context-menu-trigger.directive.mjs +36 -0
- package/esm2022/lib/context-menu.component.mjs +460 -0
- package/esm2022/lib/context-menu.service.mjs +121 -0
- package/esm2022/lib/context.component.mjs +377 -0
- package/esm2022/lib/conversation.component.mjs +442 -0
- package/esm2022/lib/country-selector.component.mjs +5 -11
- package/esm2022/lib/data-table.component.mjs +63 -12
- package/esm2022/lib/date-picker.component.mjs +251 -198
- package/esm2022/lib/date-range-picker.component.mjs +224 -116
- package/esm2022/lib/date-time-picker.component.mjs +506 -0
- package/esm2022/lib/direction.component.mjs +79 -0
- package/esm2022/lib/dropdown-item.component.mjs +3 -3
- package/esm2022/lib/dropdown-label.component.mjs +3 -3
- package/esm2022/lib/dropdown-menu.component.mjs +3 -3
- package/esm2022/lib/dropdown-separator.component.mjs +3 -3
- package/esm2022/lib/dropdown-trigger.directive.mjs +6 -4
- package/esm2022/lib/empty-state.component.mjs +4 -9
- package/esm2022/lib/field.component.mjs +394 -0
- package/esm2022/lib/hover-card.component.mjs +6 -16
- package/esm2022/lib/inline-citation.component.mjs +263 -0
- package/esm2022/lib/input-group.component.mjs +418 -0
- package/esm2022/lib/input.component.mjs +5 -11
- package/esm2022/lib/item.component.mjs +243 -0
- package/esm2022/lib/kbd.component.mjs +82 -0
- package/esm2022/lib/label.component.mjs +4 -9
- package/esm2022/lib/marker.component.mjs +135 -0
- package/esm2022/lib/masked-input.component.mjs +5 -11
- package/esm2022/lib/menubar.component.mjs +683 -0
- package/esm2022/lib/message-scroller.component.mjs +353 -0
- package/esm2022/lib/message-scroller.service.mjs +157 -0
- package/esm2022/lib/message.component.mjs +228 -0
- package/esm2022/lib/model-selector.component.mjs +310 -0
- package/esm2022/lib/multi-select.component.mjs +155 -72
- package/esm2022/lib/native-select.component.mjs +201 -0
- package/esm2022/lib/navigation-menu.component.mjs +642 -0
- package/esm2022/lib/otp-group.component.mjs +3 -3
- package/esm2022/lib/otp-slot.component.mjs +4 -9
- package/esm2022/lib/otp.component.mjs +5 -11
- package/esm2022/lib/pagination.component.mjs +7 -10
- package/esm2022/lib/plan.component.mjs +335 -0
- package/esm2022/lib/popover-content.component.mjs +4 -9
- package/esm2022/lib/popover.component.mjs +15 -13
- package/esm2022/lib/progress.component.mjs +4 -9
- package/esm2022/lib/prompt-input.component.mjs +526 -0
- package/esm2022/lib/queue.component.mjs +280 -0
- package/esm2022/lib/radio-group.component.mjs +6 -13
- package/esm2022/lib/radio-item.component.mjs +4 -9
- package/esm2022/lib/range-calendar.component.mjs +5 -11
- package/esm2022/lib/reasoning.component.mjs +335 -0
- package/esm2022/lib/resizable.component.mjs +219 -0
- package/esm2022/lib/segment.component.mjs +17 -7
- package/esm2022/lib/select-group.component.mjs +4 -8
- package/esm2022/lib/select-item.component.mjs +4 -9
- package/esm2022/lib/select-separator.component.mjs +4 -8
- package/esm2022/lib/select.component.mjs +133 -49
- package/esm2022/lib/separator.component.mjs +4 -9
- package/esm2022/lib/sheet.component.mjs +38 -56
- package/esm2022/lib/shimmer.component.mjs +84 -0
- package/esm2022/lib/sidebar.component.mjs +11 -1
- package/esm2022/lib/skeleton.component.mjs +4 -9
- package/esm2022/lib/sources.component.mjs +452 -0
- package/esm2022/lib/spinner.component.mjs +68 -0
- package/esm2022/lib/suggestion.component.mjs +207 -0
- package/esm2022/lib/switch.component.mjs +5 -11
- package/esm2022/lib/table.component.mjs +213 -0
- package/esm2022/lib/tabs.component.mjs +4 -11
- package/esm2022/lib/tag-input.component.mjs +5 -11
- package/esm2022/lib/task.component.mjs +359 -0
- package/esm2022/lib/textarea.component.mjs +5 -11
- package/esm2022/lib/theme.service.mjs +17 -6
- package/esm2022/lib/time-picker.component.mjs +923 -0
- package/esm2022/lib/toast.service.mjs +3 -2
- package/esm2022/lib/toaster.component.mjs +76 -39
- package/esm2022/lib/toggle-group.component.mjs +4 -9
- package/esm2022/lib/toggle.component.mjs +5 -11
- package/esm2022/lib/tool.component.mjs +462 -0
- package/esm2022/lib/typography.component.mjs +83 -0
- package/esm2022/lib/utils/color.mjs +140 -19
- package/esm2022/public-api.mjs +61 -1
- package/fesm2022/tolle-ui.mjs +16457 -1024
- package/fesm2022/tolle-ui.mjs.map +1 -1
- package/lib/alert-dialog.component.d.ts +10 -2
- package/lib/aspect-ratio.component.d.ts +20 -0
- package/lib/attachment.component.d.ts +101 -0
- package/lib/bubble.component.d.ts +112 -0
- package/lib/chain-of-thought.component.d.ts +166 -0
- package/lib/chart-pie.component.d.ts +108 -0
- package/lib/chart.component.d.ts +369 -0
- package/lib/chart.service.d.ts +222 -0
- package/lib/checkpoint.component.d.ts +51 -0
- package/lib/combobox.component.d.ts +90 -0
- package/lib/command-dialog.component.d.ts +53 -0
- package/lib/command.component.d.ts +189 -0
- package/lib/command.service.d.ts +67 -0
- package/lib/confirmation.component.d.ts +70 -0
- package/lib/context-menu-trigger.directive.d.ts +12 -0
- package/lib/context-menu.component.d.ts +41 -0
- package/lib/context-menu.service.d.ts +38 -0
- package/lib/context.component.d.ts +134 -0
- package/lib/conversation.component.d.ts +165 -0
- package/lib/data-table.component.d.ts +27 -1
- package/lib/date-picker.component.d.ts +72 -11
- package/lib/date-range-picker.component.d.ts +63 -6
- package/lib/date-time-picker.component.d.ts +119 -0
- package/lib/direction.component.d.ts +45 -0
- package/lib/field.component.d.ts +201 -0
- package/lib/inline-citation.component.d.ts +103 -0
- package/lib/input-group.component.d.ts +150 -0
- package/lib/item.component.d.ts +154 -0
- package/lib/kbd.component.d.ts +50 -0
- package/lib/marker.component.d.ts +58 -0
- package/lib/menubar.component.d.ts +247 -0
- package/lib/message-scroller.component.d.ts +159 -0
- package/lib/message-scroller.service.d.ts +73 -0
- package/lib/message.component.d.ts +128 -0
- package/lib/model-selector.component.d.ts +103 -0
- package/lib/multi-select.component.d.ts +66 -14
- package/lib/native-select.component.d.ts +57 -0
- package/lib/navigation-menu.component.d.ts +230 -0
- package/lib/plan.component.d.ts +120 -0
- package/lib/popover.component.d.ts +1 -0
- package/lib/prompt-input.component.d.ts +194 -0
- package/lib/queue.component.d.ts +106 -0
- package/lib/reasoning.component.d.ts +127 -0
- package/lib/resizable.component.d.ts +43 -0
- package/lib/segment.component.d.ts +13 -3
- package/lib/select.component.d.ts +37 -5
- package/lib/sheet.component.d.ts +3 -0
- package/lib/shimmer.component.d.ts +38 -0
- package/lib/sidebar.component.d.ts +2 -0
- package/lib/sources.component.d.ts +156 -0
- package/lib/spinner.component.d.ts +29 -0
- package/lib/suggestion.component.d.ts +96 -0
- package/lib/table.component.d.ts +106 -0
- package/lib/task.component.d.ts +151 -0
- package/lib/theme.service.d.ts +9 -0
- package/lib/time-picker.component.d.ts +243 -0
- package/lib/toast.service.d.ts +3 -1
- package/lib/toaster.component.d.ts +26 -9
- package/lib/tool.component.d.ts +158 -0
- package/lib/typography.component.d.ts +32 -0
- package/lib/utils/color.d.ts +19 -5
- package/package.json +1 -1
- package/public-api.d.ts +50 -0
- package/registry/docs-content.json +8497 -1553
- package/registry/llms-full.txt +2679 -318
- package/registry/llms.txt +43 -4
- package/registry/manifest.json +9093 -1739
- package/registry/r/accordion-item.json +1 -1
- package/registry/r/accordion.json +1 -1
- package/registry/r/alert-dialog-dynamic.json +1 -1
- package/registry/r/alert-dialog.json +1 -1
- package/registry/r/alert.json +1 -1
- package/registry/r/attachment.json +23 -0
- package/registry/r/avatar-fallback.json +1 -1
- package/registry/r/avatar.json +1 -1
- package/registry/r/badge.json +1 -1
- package/registry/r/breadcrumb-item.json +1 -1
- package/registry/r/breadcrumb-link.json +1 -1
- package/registry/r/breadcrumb-separator.json +1 -1
- package/registry/r/breadcrumb.json +1 -1
- package/registry/r/bubble.json +23 -0
- package/registry/r/button.json +1 -1
- package/registry/r/calendar.json +1 -1
- package/registry/r/card.json +1 -1
- package/registry/r/carousel.json +1 -1
- package/registry/r/chain-of-thought.json +23 -0
- package/registry/r/chart-pie.json +30 -0
- package/registry/r/chart.json +28 -0
- package/registry/r/checkbox.json +1 -1
- package/registry/r/checkpoint.json +23 -0
- package/registry/r/collapsible.json +1 -1
- package/registry/r/combobox.json +31 -0
- package/registry/r/command-dialog.json +21 -0
- package/registry/r/command.json +26 -0
- package/registry/r/confirmation.json +23 -0
- package/registry/r/context.json +26 -0
- package/registry/r/conversation.json +23 -0
- package/registry/r/country-selector.json +1 -1
- package/registry/r/data-table.json +1 -1
- package/registry/r/date-picker.json +4 -4
- package/registry/r/date-range-picker.json +3 -3
- package/registry/r/date-time-picker.json +28 -0
- package/registry/r/direction.json +16 -0
- package/registry/r/dropdown-item.json +1 -1
- package/registry/r/dropdown-label.json +1 -1
- package/registry/r/dropdown-menu.json +1 -1
- package/registry/r/dropdown-separator.json +1 -1
- package/registry/r/dropdown-trigger.json +1 -1
- package/registry/r/empty-state.json +1 -1
- package/registry/r/field.json +23 -0
- package/registry/r/hover-card.json +1 -1
- package/registry/r/inline-citation.json +26 -0
- package/registry/r/input-group.json +23 -0
- package/registry/r/input.json +1 -1
- package/registry/r/item.json +23 -0
- package/registry/r/kbd.json +23 -0
- package/registry/r/label.json +1 -1
- package/registry/r/marker.json +23 -0
- package/registry/r/masked-input.json +1 -1
- package/registry/r/menubar.json +24 -0
- package/registry/r/message-scroller.json +26 -0
- package/registry/r/message.json +23 -0
- package/registry/r/model-selector.json +32 -0
- package/registry/r/multi-select.json +2 -2
- package/registry/r/native-select.json +23 -0
- package/registry/r/navigation-menu.json +24 -0
- package/registry/r/otp-group.json +1 -1
- package/registry/r/otp-slot.json +1 -1
- package/registry/r/otp.json +1 -1
- package/registry/r/pagination.json +3 -2
- package/registry/r/plan.json +23 -0
- package/registry/r/popover-content.json +1 -1
- package/registry/r/popover.json +1 -1
- package/registry/r/progress.json +1 -1
- package/registry/r/prompt-input.json +23 -0
- package/registry/r/queue.json +23 -0
- package/registry/r/radio-group.json +1 -1
- package/registry/r/radio-item.json +1 -1
- package/registry/r/range-calendar.json +1 -1
- package/registry/r/reasoning.json +23 -0
- package/registry/r/segment.json +1 -1
- package/registry/r/select-group.json +1 -1
- package/registry/r/select-item.json +1 -1
- package/registry/r/select-separator.json +1 -1
- package/registry/r/select.json +4 -3
- package/registry/r/separator.json +1 -1
- package/registry/r/sheet.json +1 -1
- package/registry/r/shimmer.json +23 -0
- package/registry/r/sidebar.json +1 -1
- package/registry/r/skeleton.json +1 -1
- package/registry/r/sources.json +23 -0
- package/registry/r/spinner.json +23 -0
- package/registry/r/suggestion.json +23 -0
- package/registry/r/switch.json +1 -1
- package/registry/r/table.json +21 -0
- package/registry/r/tabs.json +1 -1
- package/registry/r/tag-input.json +1 -1
- package/registry/r/task.json +23 -0
- package/registry/r/textarea.json +1 -1
- package/registry/r/time-picker.json +24 -0
- package/registry/r/toaster.json +2 -2
- package/registry/r/toggle-group.json +1 -1
- package/registry/r/toggle.json +1 -1
- package/registry/r/tool.json +23 -0
- package/registry/r/typography.json +23 -0
- package/registry/registry.json +915 -22
- package/theme.css +109 -8
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter, OnDestroy, OnInit, OnChanges } from '@angular/core';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { cn } from './utils/cn';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Coordinates the items of a single `tolle-navigation-menu`. Provided by
|
|
7
|
+
* `NavigationMenuComponent`, injected by its descendants.
|
|
8
|
+
*
|
|
9
|
+
* Closing is deferred by `closeDelay` so a pointer travelling diagonally from a
|
|
10
|
+
* trigger into its panel does not dismiss the menu mid-flight; re-entering
|
|
11
|
+
* either surface calls `cancelClose()` and the pending close is dropped.
|
|
12
|
+
*/
|
|
13
|
+
export declare class NavigationMenuService {
|
|
14
|
+
private openIdSource;
|
|
15
|
+
/** Emits the id of the currently open item, or `null` when all are closed. */
|
|
16
|
+
readonly openId$: import("rxjs").Observable<string | null>;
|
|
17
|
+
/** Milliseconds to wait before closing after the pointer leaves. */
|
|
18
|
+
closeDelay: number;
|
|
19
|
+
private closeTimer;
|
|
20
|
+
/** Id of the open item, or `null`. */
|
|
21
|
+
get openId(): string | null;
|
|
22
|
+
/** True while any panel is open. */
|
|
23
|
+
get isAnyOpen(): boolean;
|
|
24
|
+
/** True while a deferred close is pending — exposed for tests/diagnostics. */
|
|
25
|
+
get isCloseScheduled(): boolean;
|
|
26
|
+
isOpen(id: string): boolean;
|
|
27
|
+
/** Opens an item immediately and cancels any pending close. */
|
|
28
|
+
open(id: string): void;
|
|
29
|
+
/** Closes immediately, dropping any pending close. */
|
|
30
|
+
closeNow(): void;
|
|
31
|
+
/** Queues a close in `closeDelay` ms; a later `open`/`cancelClose` wins. */
|
|
32
|
+
scheduleClose(): void;
|
|
33
|
+
/** Drops a pending close (pointer came back). */
|
|
34
|
+
cancelClose(): void;
|
|
35
|
+
toggle(id: string): void;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationMenuService, never>;
|
|
37
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NavigationMenuService>;
|
|
38
|
+
}
|
|
39
|
+
declare const navigationMenuVariants: (props?: ({
|
|
40
|
+
align?: "start" | "end" | "center" | null | undefined;
|
|
41
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
42
|
+
export type NavigationMenuProps = VariantProps<typeof navigationMenuVariants>;
|
|
43
|
+
declare const navigationMenuTriggerVariants: (props?: ({
|
|
44
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
45
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
46
|
+
export type NavigationMenuTriggerProps = VariantProps<typeof navigationMenuTriggerVariants>;
|
|
47
|
+
declare const navigationMenuLinkVariants: (props?: ({
|
|
48
|
+
variant?: "default" | "muted" | null | undefined;
|
|
49
|
+
active?: boolean | null | undefined;
|
|
50
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
51
|
+
export type NavigationMenuLinkProps = VariantProps<typeof navigationMenuLinkVariants>;
|
|
52
|
+
/**
|
|
53
|
+
* Site navigation menu: a row of links and triggers, where each trigger reveals
|
|
54
|
+
* a floating panel on hover, focus or click.
|
|
55
|
+
*
|
|
56
|
+
* ```html
|
|
57
|
+
* <tolle-navigation-menu>
|
|
58
|
+
* <tolle-navigation-menu-list>
|
|
59
|
+
* <tolle-navigation-menu-item>
|
|
60
|
+
* <tolle-navigation-menu-trigger>Products</tolle-navigation-menu-trigger>
|
|
61
|
+
* <tolle-navigation-menu-content class="w-[420px]">
|
|
62
|
+
* <tolle-navigation-menu-link href="/analytics">Analytics</tolle-navigation-menu-link>
|
|
63
|
+
* </tolle-navigation-menu-content>
|
|
64
|
+
* </tolle-navigation-menu-item>
|
|
65
|
+
* </tolle-navigation-menu-list>
|
|
66
|
+
* </tolle-navigation-menu>
|
|
67
|
+
* ```
|
|
68
|
+
* @new
|
|
69
|
+
*/
|
|
70
|
+
export declare class NavigationMenuComponent implements OnChanges, OnInit, OnDestroy {
|
|
71
|
+
private readonly cdr;
|
|
72
|
+
/**
|
|
73
|
+
* Angular writes a bound `class` input through its styling path, which does
|
|
74
|
+
* not mark an OnPush component dirty — without this hook the component keeps
|
|
75
|
+
* rendering the class it was born with.
|
|
76
|
+
*/
|
|
77
|
+
ngOnChanges(): void;
|
|
78
|
+
/** Horizontal alignment of the list within the nav. @default 'center' */
|
|
79
|
+
align: NavigationMenuProps['align'];
|
|
80
|
+
/** Accessible name for the `<nav>` landmark. @default 'Main' */
|
|
81
|
+
ariaLabel: string;
|
|
82
|
+
/**
|
|
83
|
+
* Milliseconds before a panel closes after the pointer leaves — the grace
|
|
84
|
+
* period that lets the pointer travel diagonally into the panel. @default 150
|
|
85
|
+
*/
|
|
86
|
+
set closeDelay(value: number);
|
|
87
|
+
get closeDelay(): number;
|
|
88
|
+
/** Extra Tailwind classes merged onto the `<nav>` via `cn()` (last-wins). */
|
|
89
|
+
class: string;
|
|
90
|
+
/** Emitted with the id of the item that opened, or `null` when the menu closes. */
|
|
91
|
+
openChange: EventEmitter<string | null>;
|
|
92
|
+
private readonly service;
|
|
93
|
+
private readonly host;
|
|
94
|
+
private readonly sub;
|
|
95
|
+
private listening;
|
|
96
|
+
protected get computedClass(): string;
|
|
97
|
+
ngOnInit(): void;
|
|
98
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
99
|
+
private outsideClick;
|
|
100
|
+
private startListening;
|
|
101
|
+
private stopListening;
|
|
102
|
+
ngOnDestroy(): void;
|
|
103
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationMenuComponent, never>;
|
|
104
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NavigationMenuComponent, "tolle-navigation-menu", never, { "align": { "alias": "align"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "closeDelay": { "alias": "closeDelay"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, { "openChange": "openChange"; }, never, ["*"], true, never>;
|
|
105
|
+
}
|
|
106
|
+
/** The horizontal list that holds the navigation items. */
|
|
107
|
+
export declare class NavigationMenuListComponent implements OnChanges {
|
|
108
|
+
private readonly cdr;
|
|
109
|
+
/**
|
|
110
|
+
* Angular writes a bound `class` input through its styling path, which does
|
|
111
|
+
* not mark an OnPush component dirty — without this hook the component keeps
|
|
112
|
+
* rendering the class it was born with.
|
|
113
|
+
*/
|
|
114
|
+
ngOnChanges(): void;
|
|
115
|
+
/** Extra Tailwind classes merged onto the `<ul>` via `cn()` (last-wins). */
|
|
116
|
+
class: string;
|
|
117
|
+
protected readonly cn: typeof cn;
|
|
118
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationMenuListComponent, never>;
|
|
119
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NavigationMenuListComponent, "tolle-navigation-menu-list", never, { "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
120
|
+
}
|
|
121
|
+
/** One entry in the list — a plain link, or a trigger plus its content panel. */
|
|
122
|
+
export declare class NavigationMenuItemComponent implements OnChanges, OnDestroy {
|
|
123
|
+
private readonly cdr;
|
|
124
|
+
/**
|
|
125
|
+
* Angular writes a bound `class` input through its styling path, which does
|
|
126
|
+
* not mark an OnPush component dirty — without this hook the component keeps
|
|
127
|
+
* rendering the class it was born with.
|
|
128
|
+
*/
|
|
129
|
+
ngOnChanges(): void;
|
|
130
|
+
/** Explicit id for the item; one is generated when omitted. */
|
|
131
|
+
id: string;
|
|
132
|
+
/** Extra Tailwind classes merged onto the `<li>` via `cn()` (last-wins). */
|
|
133
|
+
class: string;
|
|
134
|
+
readonly service: NavigationMenuService;
|
|
135
|
+
protected readonly cn: typeof cn;
|
|
136
|
+
triggerElement: HTMLElement | null;
|
|
137
|
+
get triggerId(): string;
|
|
138
|
+
get contentId(): string;
|
|
139
|
+
get isOpen(): boolean;
|
|
140
|
+
ngOnDestroy(): void;
|
|
141
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationMenuItemComponent, never>;
|
|
142
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NavigationMenuItemComponent, "tolle-navigation-menu-item", never, { "id": { "alias": "id"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
143
|
+
}
|
|
144
|
+
/** Button that reveals its item's panel on hover, focus or click. */
|
|
145
|
+
export declare class NavigationMenuTriggerComponent implements OnChanges, OnDestroy {
|
|
146
|
+
/**
|
|
147
|
+
* Angular writes a bound `class` input through its styling path, which does
|
|
148
|
+
* not mark an OnPush component dirty — without this hook the component keeps
|
|
149
|
+
* rendering the class it was born with.
|
|
150
|
+
*/
|
|
151
|
+
ngOnChanges(): void;
|
|
152
|
+
/** Prevents the panel from opening. @default false */
|
|
153
|
+
disabled: boolean;
|
|
154
|
+
/** Height/padding scale of the trigger. @default 'default' */
|
|
155
|
+
size: NavigationMenuTriggerProps['size'];
|
|
156
|
+
/** Extra Tailwind classes merged onto the trigger via `cn()` (last-wins). */
|
|
157
|
+
class: string;
|
|
158
|
+
protected readonly item: NavigationMenuItemComponent;
|
|
159
|
+
private readonly service;
|
|
160
|
+
private readonly cdr;
|
|
161
|
+
private readonly sub;
|
|
162
|
+
constructor();
|
|
163
|
+
set triggerRef(ref: ElementRef<HTMLButtonElement> | undefined);
|
|
164
|
+
protected get isOpen(): boolean;
|
|
165
|
+
protected get computedClass(): string;
|
|
166
|
+
protected onClick(): void;
|
|
167
|
+
protected onPointerEnter(): void;
|
|
168
|
+
protected onPointerLeave(): void;
|
|
169
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
170
|
+
ngOnDestroy(): void;
|
|
171
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationMenuTriggerComponent, never>;
|
|
172
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NavigationMenuTriggerComponent, "tolle-navigation-menu-trigger", never, { "disabled": { "alias": "disabled"; "required": false; }; "size": { "alias": "size"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
173
|
+
}
|
|
174
|
+
/** The floating panel revealed by a trigger. Rendered only while open. */
|
|
175
|
+
export declare class NavigationMenuContentComponent implements OnChanges, OnDestroy {
|
|
176
|
+
/**
|
|
177
|
+
* Angular writes a bound `class` input through its styling path, which does
|
|
178
|
+
* not mark an OnPush component dirty — without this hook the component keeps
|
|
179
|
+
* rendering the class it was born with.
|
|
180
|
+
*/
|
|
181
|
+
ngOnChanges(): void;
|
|
182
|
+
/** Preferred side of the trigger to render on; flips when space is tight. @default 'bottom' */
|
|
183
|
+
placement: 'bottom' | 'bottom-start' | 'bottom-end' | 'top' | 'top-start' | 'top-end';
|
|
184
|
+
/** Gap in pixels between the trigger and the panel. @default 8 */
|
|
185
|
+
sideOffset: number;
|
|
186
|
+
/** Extra Tailwind classes merged onto the panel via `cn()` (last-wins). */
|
|
187
|
+
class: string;
|
|
188
|
+
protected readonly item: NavigationMenuItemComponent;
|
|
189
|
+
private readonly service;
|
|
190
|
+
private readonly cdr;
|
|
191
|
+
private readonly sub;
|
|
192
|
+
private cleanup?;
|
|
193
|
+
constructor();
|
|
194
|
+
set panelRef(ref: ElementRef<HTMLElement> | undefined);
|
|
195
|
+
protected get isOpen(): boolean;
|
|
196
|
+
protected get computedClass(): string;
|
|
197
|
+
protected onPointerEnter(): void;
|
|
198
|
+
protected onPointerLeave(): void;
|
|
199
|
+
private startPositioning;
|
|
200
|
+
private stopPositioning;
|
|
201
|
+
ngOnDestroy(): void;
|
|
202
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationMenuContentComponent, never>;
|
|
203
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NavigationMenuContentComponent, "tolle-navigation-menu-content", never, { "placement": { "alias": "placement"; "required": false; }; "sideOffset": { "alias": "sideOffset"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
204
|
+
}
|
|
205
|
+
/** A link inside a panel (or directly in the list, for flat entries). */
|
|
206
|
+
export declare class NavigationMenuLinkComponent implements OnChanges {
|
|
207
|
+
private readonly cdr;
|
|
208
|
+
/**
|
|
209
|
+
* Angular writes a bound `class` input through its styling path, which does
|
|
210
|
+
* not mark an OnPush component dirty — without this hook the component keeps
|
|
211
|
+
* rendering the class it was born with.
|
|
212
|
+
*/
|
|
213
|
+
ngOnChanges(): void;
|
|
214
|
+
/** Destination URL. Omit to render a non-navigating item. */
|
|
215
|
+
href: string;
|
|
216
|
+
/** Anchor target; `_blank` also sets a safe `rel`. */
|
|
217
|
+
target: string;
|
|
218
|
+
/** Marks the link as the current page. @default false */
|
|
219
|
+
active: boolean;
|
|
220
|
+
/** Visual style of the link. @default 'default' */
|
|
221
|
+
variant: NavigationMenuLinkProps['variant'];
|
|
222
|
+
/** Extra Tailwind classes merged onto the anchor via `cn()` (last-wins). */
|
|
223
|
+
class: string;
|
|
224
|
+
/** Emitted with the click event when the link is activated. */
|
|
225
|
+
navigate: EventEmitter<MouseEvent>;
|
|
226
|
+
protected get computedClass(): string;
|
|
227
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationMenuLinkComponent, never>;
|
|
228
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NavigationMenuLinkComponent, "tolle-navigation-menu-link", never, { "href": { "alias": "href"; "required": false; }; "target": { "alias": "target"; "required": false; }; "active": { "alias": "active"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, { "navigate": "navigate"; }, never, ["[label]", "*", "[description]"], true, never>;
|
|
229
|
+
}
|
|
230
|
+
export {};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/** Progress of a single step in an agent plan. */
|
|
5
|
+
export type PlanStepStatus = 'pending' | 'active' | 'done' | 'skipped';
|
|
6
|
+
/** How far through the plan the agent is. */
|
|
7
|
+
export interface PlanProgress {
|
|
8
|
+
/** 1-based position of the step being worked on, or of the last finished one. */
|
|
9
|
+
current: number;
|
|
10
|
+
/** Number of registered steps. */
|
|
11
|
+
total: number;
|
|
12
|
+
}
|
|
13
|
+
declare const planVariants: (props?: ({
|
|
14
|
+
size?: "default" | "sm" | null | undefined;
|
|
15
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
|
+
export type PlanProps = VariantProps<typeof planVariants>;
|
|
17
|
+
declare const planStepVariants: (props?: ({
|
|
18
|
+
status?: "active" | "pending" | "done" | "skipped" | null | undefined;
|
|
19
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
20
|
+
export type PlanStepProps = VariantProps<typeof planStepVariants>;
|
|
21
|
+
/**
|
|
22
|
+
* Coordinates a `tolle-plan` and its steps: assigns each step its number and
|
|
23
|
+
* derives the "Step N of M" summary.
|
|
24
|
+
*
|
|
25
|
+
* The header is `OnPush` and the step count is not one of its inputs, so the
|
|
26
|
+
* summary is published as an observable and every subscriber calls
|
|
27
|
+
* `markForCheck()`.
|
|
28
|
+
*/
|
|
29
|
+
export declare class PlanService {
|
|
30
|
+
private readonly statuses;
|
|
31
|
+
private readonly order;
|
|
32
|
+
private readonly progressSource;
|
|
33
|
+
/** Emits the plan's current position and step count. */
|
|
34
|
+
readonly progress$: import("rxjs").Observable<PlanProgress>;
|
|
35
|
+
private readonly collapsedSource;
|
|
36
|
+
/** Emits whether the plan is showing only its summary row. */
|
|
37
|
+
readonly collapsed$: import("rxjs").Observable<boolean>;
|
|
38
|
+
get progress(): PlanProgress;
|
|
39
|
+
get collapsed(): boolean;
|
|
40
|
+
setCollapsed(collapsed: boolean): void;
|
|
41
|
+
toggleCollapsed(): void;
|
|
42
|
+
/** Registers a step and returns its 1-based number. */
|
|
43
|
+
register(id: string, status: PlanStepStatus): number;
|
|
44
|
+
setStatus(id: string, status: PlanStepStatus): void;
|
|
45
|
+
unregister(id: string): void;
|
|
46
|
+
/**
|
|
47
|
+
* "Current" is the first step still in flight — the active one if there is
|
|
48
|
+
* one, otherwise however many have already been resolved.
|
|
49
|
+
*/
|
|
50
|
+
private recompute;
|
|
51
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PlanService, never>;
|
|
52
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PlanService>;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* An ordered plan the agent intends to work through. Each `tolle-plan-step`
|
|
56
|
+
* numbers itself and joins the connector line; collapsing the plan swaps the
|
|
57
|
+
* steps for a single "Step N of M" summary.
|
|
58
|
+
*
|
|
59
|
+
* ```html
|
|
60
|
+
* <tolle-plan title="Migration plan">
|
|
61
|
+
* <tolle-plan-step label="Read the schema" status="done"></tolle-plan-step>
|
|
62
|
+
* <tolle-plan-step label="Write the migration" status="active"></tolle-plan-step>
|
|
63
|
+
* <tolle-plan-step label="Run it" status="pending"></tolle-plan-step>
|
|
64
|
+
* </tolle-plan>
|
|
65
|
+
* ```
|
|
66
|
+
* @new
|
|
67
|
+
*/
|
|
68
|
+
export declare class PlanComponent implements OnInit, OnChanges, OnDestroy {
|
|
69
|
+
/** Heading shown above the steps. @default 'Plan' */
|
|
70
|
+
title: string;
|
|
71
|
+
/** Shows only the header and its "Step N of M" summary. @default false */
|
|
72
|
+
collapsed: boolean;
|
|
73
|
+
/** Lets the user collapse and expand the plan by clicking the header. @default true */
|
|
74
|
+
collapsible: boolean;
|
|
75
|
+
/** Padding and text scale of the plan. @default 'default' */
|
|
76
|
+
size: PlanProps['size'];
|
|
77
|
+
/** Extra Tailwind classes merged onto the plan via `cn()` (last-wins). */
|
|
78
|
+
class: string;
|
|
79
|
+
/** Emitted with the new collapsed state when the header is toggled. */
|
|
80
|
+
collapsedChange: EventEmitter<boolean>;
|
|
81
|
+
private readonly service;
|
|
82
|
+
private readonly cdr;
|
|
83
|
+
private readonly sub;
|
|
84
|
+
isCollapsed: boolean;
|
|
85
|
+
progress: PlanProgress;
|
|
86
|
+
ngOnInit(): void;
|
|
87
|
+
ngOnChanges(): void;
|
|
88
|
+
ngOnDestroy(): void;
|
|
89
|
+
/** The compact "Step N of M" label, empty until at least one step registers. */
|
|
90
|
+
get summary(): string;
|
|
91
|
+
get computedClass(): string;
|
|
92
|
+
get headerClass(): string;
|
|
93
|
+
toggle(): void;
|
|
94
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PlanComponent, never>;
|
|
95
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PlanComponent, "tolle-plan", never, { "title": { "alias": "title"; "required": false; }; "collapsed": { "alias": "collapsed"; "required": false; }; "collapsible": { "alias": "collapsible"; "required": false; }; "size": { "alias": "size"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, { "collapsedChange": "collapsedChange"; }, never, ["*"], true, never>;
|
|
96
|
+
}
|
|
97
|
+
/** One numbered step of a `tolle-plan`. */
|
|
98
|
+
export declare class PlanStepComponent implements OnInit, OnChanges, OnDestroy {
|
|
99
|
+
/** What this step does. @default '' */
|
|
100
|
+
label: string;
|
|
101
|
+
/** Supporting detail shown under the label. @default '' */
|
|
102
|
+
description: string;
|
|
103
|
+
/** Progress of this step; drives the badge colour and glyph. @default 'pending' */
|
|
104
|
+
status: PlanStepStatus;
|
|
105
|
+
/** Extra Tailwind classes merged onto the step via `cn()` (last-wins). */
|
|
106
|
+
class: string;
|
|
107
|
+
private readonly service;
|
|
108
|
+
private readonly id;
|
|
109
|
+
/** 1-based position of this step, assigned on registration. */
|
|
110
|
+
index: number;
|
|
111
|
+
ngOnInit(): void;
|
|
112
|
+
ngOnChanges(): void;
|
|
113
|
+
ngOnDestroy(): void;
|
|
114
|
+
get computedClass(): string;
|
|
115
|
+
get badgeClass(): string;
|
|
116
|
+
get labelClass(): string;
|
|
117
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PlanStepComponent, never>;
|
|
118
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PlanStepComponent, "tolle-plan-step", never, { "label": { "alias": "label"; "required": false; }; "description": { "alias": "description"; "required": false; }; "status": { "alias": "status"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
119
|
+
}
|
|
120
|
+
export {};
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { AfterViewInit, EventEmitter, OnChanges, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
declare const promptInputVariants: (props?: ({
|
|
6
|
+
status?: "error" | "ready" | "streaming" | null | undefined;
|
|
7
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
+
export type PromptInputProps = VariantProps<typeof promptInputVariants>;
|
|
10
|
+
/** Lifecycle of the response the composer is driving. */
|
|
11
|
+
export type PromptInputStatus = NonNullable<PromptInputProps['status']>;
|
|
12
|
+
/**
|
|
13
|
+
* Coordinates a `tolle-prompt-input` with its projected toolbar controls.
|
|
14
|
+
*
|
|
15
|
+
* The submit button is an OnPush child that must flip to a stop button the
|
|
16
|
+
* moment the status changes, so the composer publishes its state here instead
|
|
17
|
+
* of the button reading the parent's fields.
|
|
18
|
+
*
|
|
19
|
+
* Provided on `PromptInputComponent`, so each composer gets its own instance.
|
|
20
|
+
*/
|
|
21
|
+
export declare class PromptInputService {
|
|
22
|
+
private readonly statusSource;
|
|
23
|
+
/** Emits the composer's current status. */
|
|
24
|
+
readonly status$: import("rxjs").Observable<PromptInputStatus>;
|
|
25
|
+
private readonly canSubmitSource;
|
|
26
|
+
/** Emits whether there is submittable text and the composer is enabled. */
|
|
27
|
+
readonly canSubmit$: import("rxjs").Observable<boolean>;
|
|
28
|
+
private readonly submitSource;
|
|
29
|
+
/** Emits when a toolbar control asks the composer to submit. */
|
|
30
|
+
readonly submit$: import("rxjs").Observable<void>;
|
|
31
|
+
private readonly stopSource;
|
|
32
|
+
/** Emits when a toolbar control asks the composer to stop streaming. */
|
|
33
|
+
readonly stop$: import("rxjs").Observable<void>;
|
|
34
|
+
/** The composer's current status. */
|
|
35
|
+
get status(): PromptInputStatus;
|
|
36
|
+
/** True when the composer has submittable text. */
|
|
37
|
+
get canSubmit(): boolean;
|
|
38
|
+
setStatus(status: PromptInputStatus): void;
|
|
39
|
+
setCanSubmit(value: boolean): void;
|
|
40
|
+
requestSubmit(): void;
|
|
41
|
+
requestStop(): void;
|
|
42
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PromptInputService, never>;
|
|
43
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PromptInputService>;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* A message composer: an auto-growing textarea plus a toolbar, wired as a
|
|
47
|
+
* `ControlValueAccessor` so it drops into template- or reactive-driven forms.
|
|
48
|
+
*
|
|
49
|
+
* Enter submits and Shift+Enter inserts a newline (swap with `submitOnEnter`).
|
|
50
|
+
* While `status` is 'streaming' the projected `tolle-prompt-input-submit`
|
|
51
|
+
* becomes a stop button that emits `stopped`.
|
|
52
|
+
* @new
|
|
53
|
+
*/
|
|
54
|
+
export declare class PromptInputComponent implements ControlValueAccessor, OnInit, OnChanges, AfterViewInit, OnDestroy {
|
|
55
|
+
/** Placeholder shown while the composer is empty. @default 'Send a message…' */
|
|
56
|
+
placeholder: string;
|
|
57
|
+
/** Blocks typing and submission. @default false */
|
|
58
|
+
disabled: boolean;
|
|
59
|
+
/** Rows the textarea may grow to before it starts scrolling. @default 8 */
|
|
60
|
+
maxRows: number;
|
|
61
|
+
/** Lifecycle of the response being composed. @default 'ready' */
|
|
62
|
+
status: PromptInputStatus;
|
|
63
|
+
/** Size scale of the composer. @default 'default' */
|
|
64
|
+
size: PromptInputProps['size'];
|
|
65
|
+
/** Submit on Enter, keeping Shift+Enter for newlines. @default true */
|
|
66
|
+
submitOnEnter: boolean;
|
|
67
|
+
/** Clears the composer after a successful submit. @default true */
|
|
68
|
+
clearOnSubmit: boolean;
|
|
69
|
+
/** Accessible name for the textarea. @default '' */
|
|
70
|
+
ariaLabel: string;
|
|
71
|
+
/** Extra Tailwind classes merged onto the composer via `cn()` (last-wins). */
|
|
72
|
+
class: string;
|
|
73
|
+
/** Extra Tailwind classes merged onto the textarea via `cn()` (last-wins). */
|
|
74
|
+
textareaClass: string;
|
|
75
|
+
/** Emitted with the trimmed message text when the user submits. */
|
|
76
|
+
submitted: EventEmitter<string>;
|
|
77
|
+
/** Emitted when the user cancels an in-flight streaming response. */
|
|
78
|
+
stopped: EventEmitter<void>;
|
|
79
|
+
/** Emitted with the message text whenever it changes. */
|
|
80
|
+
valueChange: EventEmitter<string>;
|
|
81
|
+
private textarea?;
|
|
82
|
+
private readonly service;
|
|
83
|
+
private readonly cdr;
|
|
84
|
+
private readonly subscriptions;
|
|
85
|
+
value: string;
|
|
86
|
+
private onChange;
|
|
87
|
+
private onTouched;
|
|
88
|
+
ngOnInit(): void;
|
|
89
|
+
ngOnChanges(): void;
|
|
90
|
+
ngAfterViewInit(): void;
|
|
91
|
+
ngOnDestroy(): void;
|
|
92
|
+
get computedClass(): string;
|
|
93
|
+
get textareaComputedClass(): string;
|
|
94
|
+
onInput(event: Event): void;
|
|
95
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
96
|
+
onBlur(): void;
|
|
97
|
+
/** Submits the current text, unless the composer is empty, disabled or busy. */
|
|
98
|
+
submit(): void;
|
|
99
|
+
/** Cancels an in-flight streaming response. */
|
|
100
|
+
stop(): void;
|
|
101
|
+
/** Moves focus into the textarea. */
|
|
102
|
+
focus(): void;
|
|
103
|
+
writeValue(value: string | null): void;
|
|
104
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
105
|
+
registerOnTouched(fn: () => void): void;
|
|
106
|
+
setDisabledState(isDisabled: boolean): void;
|
|
107
|
+
private get canSubmit();
|
|
108
|
+
private setValue;
|
|
109
|
+
private syncService;
|
|
110
|
+
/**
|
|
111
|
+
* Grows the textarea with its content up to `maxRows`, then lets it scroll.
|
|
112
|
+
* Measured from the computed line height so it tracks the inherited font.
|
|
113
|
+
*/
|
|
114
|
+
private resize;
|
|
115
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PromptInputComponent, never>;
|
|
116
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PromptInputComponent, "tolle-prompt-input", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "maxRows": { "alias": "maxRows"; "required": false; }; "status": { "alias": "status"; "required": false; }; "size": { "alias": "size"; "required": false; }; "submitOnEnter": { "alias": "submitOnEnter"; "required": false; }; "clearOnSubmit": { "alias": "clearOnSubmit"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "class": { "alias": "class"; "required": false; }; "textareaClass": { "alias": "textareaClass"; "required": false; }; }, { "submitted": "submitted"; "stopped": "stopped"; "valueChange": "valueChange"; }, never, ["*"], true, never>;
|
|
117
|
+
}
|
|
118
|
+
/** Bottom bar of a `tolle-prompt-input`: tools on the left, submit on the right. */
|
|
119
|
+
export declare class PromptInputToolbarComponent implements OnChanges {
|
|
120
|
+
private readonly cdr;
|
|
121
|
+
/**
|
|
122
|
+
* Angular writes a bound `class` input through its styling path, which does
|
|
123
|
+
* not mark an OnPush component dirty — without this hook the component keeps
|
|
124
|
+
* rendering the class it was born with.
|
|
125
|
+
*/
|
|
126
|
+
ngOnChanges(): void;
|
|
127
|
+
/** Extra Tailwind classes merged onto the toolbar via `cn()` (last-wins). */
|
|
128
|
+
class: string;
|
|
129
|
+
get computedClass(): string;
|
|
130
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PromptInputToolbarComponent, never>;
|
|
131
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PromptInputToolbarComponent, "tolle-prompt-input-toolbar", never, { "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
132
|
+
}
|
|
133
|
+
/** Left-aligned cluster of tool buttons inside a `tolle-prompt-input-toolbar`. */
|
|
134
|
+
export declare class PromptInputToolsComponent implements OnChanges {
|
|
135
|
+
private readonly cdr;
|
|
136
|
+
/**
|
|
137
|
+
* Angular writes a bound `class` input through its styling path, which does
|
|
138
|
+
* not mark an OnPush component dirty — without this hook the component keeps
|
|
139
|
+
* rendering the class it was born with.
|
|
140
|
+
*/
|
|
141
|
+
ngOnChanges(): void;
|
|
142
|
+
/** Extra Tailwind classes merged onto the tool row via `cn()` (last-wins). */
|
|
143
|
+
class: string;
|
|
144
|
+
get computedClass(): string;
|
|
145
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PromptInputToolsComponent, never>;
|
|
146
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PromptInputToolsComponent, "tolle-prompt-input-tools", never, { "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
147
|
+
}
|
|
148
|
+
declare const promptInputSubmitVariants: (props?: ({
|
|
149
|
+
variant?: "default" | "secondary" | "ghost" | null | undefined;
|
|
150
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
151
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
152
|
+
export type PromptInputSubmitProps = VariantProps<typeof promptInputSubmitVariants>;
|
|
153
|
+
/**
|
|
154
|
+
* Send button for a `tolle-prompt-input`. Turns into a stop button while the
|
|
155
|
+
* composer's status is 'streaming', so one control covers both directions.
|
|
156
|
+
*/
|
|
157
|
+
export declare class PromptInputSubmitComponent implements OnChanges, OnInit, OnDestroy {
|
|
158
|
+
/**
|
|
159
|
+
* Angular writes a bound `class` input through its styling path, which does
|
|
160
|
+
* not mark an OnPush component dirty — without this hook the component keeps
|
|
161
|
+
* rendering the class it was born with.
|
|
162
|
+
*/
|
|
163
|
+
ngOnChanges(): void;
|
|
164
|
+
/** Visual style of the button. @default 'default' */
|
|
165
|
+
variant: PromptInputSubmitProps['variant'];
|
|
166
|
+
/** Size of the button. @default 'default' */
|
|
167
|
+
size: PromptInputSubmitProps['size'];
|
|
168
|
+
/** Accessible name while the composer is idle. @default 'Send message' */
|
|
169
|
+
submitLabel: string;
|
|
170
|
+
/** Accessible name while the composer is streaming. @default 'Stop generating' */
|
|
171
|
+
stopLabel: string;
|
|
172
|
+
/** Renders the label next to the icon. @default false */
|
|
173
|
+
showLabel: boolean;
|
|
174
|
+
/** Extra Tailwind classes merged onto the button via `cn()` (last-wins). */
|
|
175
|
+
class: string;
|
|
176
|
+
private readonly service;
|
|
177
|
+
private readonly cdr;
|
|
178
|
+
private readonly subscriptions;
|
|
179
|
+
status: PromptInputStatus;
|
|
180
|
+
canSubmit: boolean;
|
|
181
|
+
ngOnInit(): void;
|
|
182
|
+
ngOnDestroy(): void;
|
|
183
|
+
/** True while the button is showing its stop affordance. */
|
|
184
|
+
get isStreaming(): boolean;
|
|
185
|
+
get currentIcon(): string;
|
|
186
|
+
get currentLabel(): string;
|
|
187
|
+
/** Stopping stays available with an empty composer; sending does not. */
|
|
188
|
+
get isDisabled(): boolean;
|
|
189
|
+
get computedClass(): string;
|
|
190
|
+
onClick(): void;
|
|
191
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PromptInputSubmitComponent, never>;
|
|
192
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PromptInputSubmitComponent, "tolle-prompt-input-submit", never, { "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "submitLabel": { "alias": "submitLabel"; "required": false; }; "stopLabel": { "alias": "stopLabel"; "required": false; }; "showLabel": { "alias": "showLabel"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, never, true, never>;
|
|
193
|
+
}
|
|
194
|
+
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/** Where a queued entry is in its lifecycle. */
|
|
5
|
+
export type QueueItemStatus = 'queued' | 'running' | 'done';
|
|
6
|
+
/** Tallies of the entries currently in a queue. */
|
|
7
|
+
export interface QueueCounts {
|
|
8
|
+
total: number;
|
|
9
|
+
queued: number;
|
|
10
|
+
running: number;
|
|
11
|
+
done: number;
|
|
12
|
+
}
|
|
13
|
+
declare const queueVariants: (props?: ({
|
|
14
|
+
size?: "default" | "sm" | null | undefined;
|
|
15
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
|
+
export type QueueProps = VariantProps<typeof queueVariants>;
|
|
17
|
+
declare const queueItemVariants: (props?: ({
|
|
18
|
+
status?: "running" | "done" | "queued" | null | undefined;
|
|
19
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
20
|
+
export type QueueItemProps = VariantProps<typeof queueItemVariants>;
|
|
21
|
+
/**
|
|
22
|
+
* Counts the items of a single `tolle-queue`.
|
|
23
|
+
*
|
|
24
|
+
* The header is `OnPush` and the item count is not one of its inputs, so it is
|
|
25
|
+
* published as an observable and the subscriber calls `markForCheck()`.
|
|
26
|
+
*/
|
|
27
|
+
export declare class QueueService {
|
|
28
|
+
private readonly statuses;
|
|
29
|
+
private readonly countsSource;
|
|
30
|
+
/** Emits the queue's tallies whenever an item is added, updated or removed. */
|
|
31
|
+
readonly counts$: import("rxjs").Observable<QueueCounts>;
|
|
32
|
+
get counts(): QueueCounts;
|
|
33
|
+
register(id: string, status: QueueItemStatus): void;
|
|
34
|
+
setStatus(id: string, status: QueueItemStatus): void;
|
|
35
|
+
unregister(id: string): void;
|
|
36
|
+
private recompute;
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueueService, never>;
|
|
38
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<QueueService>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Messages or tasks waiting their turn. The header counts the entries for you,
|
|
42
|
+
* so the host only has to render `tolle-queue-item` children.
|
|
43
|
+
*
|
|
44
|
+
* ```html
|
|
45
|
+
* <tolle-queue title="Queued">
|
|
46
|
+
* <tolle-queue-item label="Summarise the thread" status="running"></tolle-queue-item>
|
|
47
|
+
* <tolle-queue-item label="Draft a reply" (remove)="drop(1)"></tolle-queue-item>
|
|
48
|
+
* </tolle-queue>
|
|
49
|
+
* ```
|
|
50
|
+
* @new
|
|
51
|
+
*/
|
|
52
|
+
export declare class QueueComponent implements OnChanges, OnInit, OnDestroy {
|
|
53
|
+
/**
|
|
54
|
+
* Angular writes a bound `class` input through its styling path, which does
|
|
55
|
+
* not mark an OnPush component dirty — without this hook the component keeps
|
|
56
|
+
* rendering the class it was born with.
|
|
57
|
+
*/
|
|
58
|
+
ngOnChanges(): void;
|
|
59
|
+
/** Heading shown above the queued items. @default 'Queue' */
|
|
60
|
+
title: string;
|
|
61
|
+
/** Text shown while the queue holds nothing. @default 'Nothing queued.' */
|
|
62
|
+
emptyMessage: string;
|
|
63
|
+
/** Padding and text scale of the queue. @default 'default' */
|
|
64
|
+
size: QueueProps['size'];
|
|
65
|
+
/** Extra Tailwind classes merged onto the queue via `cn()` (last-wins). */
|
|
66
|
+
class: string;
|
|
67
|
+
/** Emitted with the queue's tallies whenever its items change. */
|
|
68
|
+
countsChange: EventEmitter<QueueCounts>;
|
|
69
|
+
private readonly service;
|
|
70
|
+
private readonly cdr;
|
|
71
|
+
private readonly sub;
|
|
72
|
+
counts: QueueCounts;
|
|
73
|
+
ngOnInit(): void;
|
|
74
|
+
ngOnDestroy(): void;
|
|
75
|
+
get computedClass(): string;
|
|
76
|
+
get countClass(): string;
|
|
77
|
+
get listClass(): string;
|
|
78
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueueComponent, never>;
|
|
79
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<QueueComponent, "tolle-queue", never, { "title": { "alias": "title"; "required": false; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; }; "size": { "alias": "size"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, { "countsChange": "countsChange"; }, never, ["*"], true, never>;
|
|
80
|
+
}
|
|
81
|
+
/** A single entry in a `tolle-queue`. */
|
|
82
|
+
export declare class QueueItemComponent implements OnInit, OnChanges, OnDestroy {
|
|
83
|
+
/** Text describing the queued work. @default '' */
|
|
84
|
+
label: string;
|
|
85
|
+
/** Lifecycle state of this entry. @default 'queued' */
|
|
86
|
+
status: QueueItemStatus;
|
|
87
|
+
/** Shows the trailing dismiss button that emits `remove`. @default true */
|
|
88
|
+
removable: boolean;
|
|
89
|
+
/** Accessible label for the dismiss button. @default 'Remove from queue' */
|
|
90
|
+
removeLabel: string;
|
|
91
|
+
/** Extra Tailwind classes merged onto the entry via `cn()` (last-wins). */
|
|
92
|
+
class: string;
|
|
93
|
+
/** Emitted when the user dismisses this entry. */
|
|
94
|
+
remove: EventEmitter<void>;
|
|
95
|
+
private readonly service;
|
|
96
|
+
private readonly id;
|
|
97
|
+
ngOnInit(): void;
|
|
98
|
+
ngOnChanges(): void;
|
|
99
|
+
ngOnDestroy(): void;
|
|
100
|
+
get computedClass(): string;
|
|
101
|
+
get iconClass(): string;
|
|
102
|
+
get labelClass(): string;
|
|
103
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueueItemComponent, never>;
|
|
104
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<QueueItemComponent, "tolle-queue-item", never, { "label": { "alias": "label"; "required": false; }; "status": { "alias": "status"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; "removeLabel": { "alias": "removeLabel"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, { "remove": "remove"; }, never, ["*"], true, never>;
|
|
105
|
+
}
|
|
106
|
+
export {};
|