@tolle_/tolle-ui 18.2.29 → 18.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/accordion-item.component.mjs +5 -11
- package/esm2022/lib/accordion.component.mjs +4 -9
- package/esm2022/lib/alert-dialog-dynamic.component.mjs +12 -12
- package/esm2022/lib/alert-dialog.component.mjs +82 -64
- package/esm2022/lib/alert-dialog.service.mjs +38 -6
- 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 +125 -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 +59 -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/modal-ref.mjs +36 -7
- package/esm2022/lib/modal.component.mjs +42 -28
- package/esm2022/lib/modal.mjs +2 -29
- package/esm2022/lib/modal.service.mjs +26 -4
- 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-panel.component.mjs +5 -5
- package/esm2022/lib/resizable.component.mjs +219 -0
- package/esm2022/lib/segment.component.mjs +19 -9
- 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 +16642 -1105
- package/fesm2022/tolle-ui.mjs.map +1 -1
- package/lib/alert-dialog-dynamic.component.d.ts +5 -0
- package/lib/alert-dialog.component.d.ts +23 -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 +26 -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/modal-ref.d.ts +6 -1
- package/lib/modal.component.d.ts +7 -4
- package/lib/modal.d.ts +9 -3
- 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 +3 -2
- package/preset.js +7 -1
- package/public-api.d.ts +50 -0
- package/registry/docs-content.json +8480 -1542
- package/registry/llms-full.txt +2679 -319
- package/registry/llms.txt +43 -4
- package/registry/manifest.json +9090 -1742
- 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-menu-trigger.json +1 -1
- package/registry/r/context-menu.json +1 -1
- 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/modal.json +3 -3
- 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/resizable-panel.json +1 -1
- 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 +121 -8
|
@@ -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 {};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Coordinates a `tolle-reasoning` with its trigger and content.
|
|
6
|
+
*
|
|
7
|
+
* The trigger and content are OnPush children, so the open/streaming/duration
|
|
8
|
+
* state they render from is published here rather than read off the parent.
|
|
9
|
+
*
|
|
10
|
+
* Provided on `ReasoningComponent`, so each trace gets its own instance.
|
|
11
|
+
*/
|
|
12
|
+
export declare class ReasoningService {
|
|
13
|
+
private readonly openSource;
|
|
14
|
+
/** Emits whether the trace is expanded. */
|
|
15
|
+
readonly open$: import("rxjs").Observable<boolean>;
|
|
16
|
+
private readonly streamingSource;
|
|
17
|
+
/** Emits whether the model is still producing the trace. */
|
|
18
|
+
readonly streaming$: import("rxjs").Observable<boolean>;
|
|
19
|
+
private readonly durationSource;
|
|
20
|
+
/** Emits how long the model spent reasoning, in seconds. */
|
|
21
|
+
readonly duration$: import("rxjs").Observable<number>;
|
|
22
|
+
/** True while the trace is expanded. */
|
|
23
|
+
get open(): boolean;
|
|
24
|
+
setOpen(value: boolean): void;
|
|
25
|
+
toggle(): void;
|
|
26
|
+
setStreaming(value: boolean): void;
|
|
27
|
+
setDuration(value: number): void;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReasoningService, never>;
|
|
29
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ReasoningService>;
|
|
30
|
+
}
|
|
31
|
+
declare const reasoningVariants: (props?: ({
|
|
32
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
33
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
34
|
+
export type ReasoningProps = VariantProps<typeof reasoningVariants>;
|
|
35
|
+
/**
|
|
36
|
+
* A collapsible view of the model's reasoning, collapsed by default.
|
|
37
|
+
*
|
|
38
|
+
* While `streaming` is true the trigger reads "Thinking…"; once it finishes the
|
|
39
|
+
* trigger reports how long the model thought, using `duration`.
|
|
40
|
+
*
|
|
41
|
+
* Compose it from `tolle-reasoning-trigger` and `tolle-reasoning-content`.
|
|
42
|
+
* @new
|
|
43
|
+
*/
|
|
44
|
+
export declare class ReasoningComponent implements OnInit, OnChanges, OnDestroy {
|
|
45
|
+
/** Whether the trace is expanded. @default false */
|
|
46
|
+
open: boolean;
|
|
47
|
+
/** True while the model is still producing the trace. @default false */
|
|
48
|
+
streaming: boolean;
|
|
49
|
+
/** Seconds the model spent reasoning, shown once streaming finishes. @default 0 */
|
|
50
|
+
duration: number;
|
|
51
|
+
/** Text scale of the trace. @default 'default' */
|
|
52
|
+
size: ReasoningProps['size'];
|
|
53
|
+
/** Extra Tailwind classes merged onto the trace via `cn()` (last-wins). */
|
|
54
|
+
class: string;
|
|
55
|
+
/** Emitted with the new state whenever the trace is expanded or collapsed. */
|
|
56
|
+
openChange: EventEmitter<boolean>;
|
|
57
|
+
private readonly service;
|
|
58
|
+
private readonly cdr;
|
|
59
|
+
private readonly subscriptions;
|
|
60
|
+
/** True while an `open` input is being pushed into the service. */
|
|
61
|
+
private applyingInput;
|
|
62
|
+
ngOnInit(): void;
|
|
63
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
64
|
+
private applyInput;
|
|
65
|
+
ngOnDestroy(): void;
|
|
66
|
+
get computedClass(): string;
|
|
67
|
+
private sync;
|
|
68
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReasoningComponent, never>;
|
|
69
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ReasoningComponent, "tolle-reasoning", never, { "open": { "alias": "open"; "required": false; }; "streaming": { "alias": "streaming"; "required": false; }; "duration": { "alias": "duration"; "required": false; }; "size": { "alias": "size"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, { "openChange": "openChange"; }, never, ["*"], true, never>;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Toggle for a `tolle-reasoning`. Shows a live "Thinking…" label while the
|
|
73
|
+
* trace is streaming and the elapsed thinking time once it is done.
|
|
74
|
+
*/
|
|
75
|
+
export declare class ReasoningTriggerComponent implements OnChanges, OnInit, OnDestroy {
|
|
76
|
+
/**
|
|
77
|
+
* Angular writes a bound `class` input through its styling path, which does
|
|
78
|
+
* not mark an OnPush component dirty — without this hook the component keeps
|
|
79
|
+
* rendering the class it was born with.
|
|
80
|
+
*/
|
|
81
|
+
ngOnChanges(): void;
|
|
82
|
+
/** Remixicon class shown before the label. @default 'ri-brain-line' */
|
|
83
|
+
icon: string;
|
|
84
|
+
/** Label shown while the trace is streaming. @default 'Thinking…' */
|
|
85
|
+
thinkingLabel: string;
|
|
86
|
+
/** Label used when the trace finished without a measured duration. @default 'Thought for a few seconds' */
|
|
87
|
+
fallbackLabel: string;
|
|
88
|
+
/** Extra Tailwind classes merged onto the trigger via `cn()` (last-wins). */
|
|
89
|
+
class: string;
|
|
90
|
+
private readonly service;
|
|
91
|
+
private readonly cdr;
|
|
92
|
+
private readonly subscriptions;
|
|
93
|
+
open: boolean;
|
|
94
|
+
streaming: boolean;
|
|
95
|
+
duration: number;
|
|
96
|
+
ngOnInit(): void;
|
|
97
|
+
ngOnDestroy(): void;
|
|
98
|
+
/** "Thinking…" while streaming, otherwise how long the model thought. */
|
|
99
|
+
get label(): string;
|
|
100
|
+
get computedClass(): string;
|
|
101
|
+
onToggle(): void;
|
|
102
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReasoningTriggerComponent, never>;
|
|
103
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ReasoningTriggerComponent, "tolle-reasoning-trigger", never, { "icon": { "alias": "icon"; "required": false; }; "thinkingLabel": { "alias": "thinkingLabel"; "required": false; }; "fallbackLabel": { "alias": "fallbackLabel"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
104
|
+
}
|
|
105
|
+
/** The reasoning text itself. Rendered only while the trace is expanded. */
|
|
106
|
+
export declare class ReasoningContentComponent implements OnChanges, OnInit, OnDestroy {
|
|
107
|
+
/**
|
|
108
|
+
* Angular writes a bound `class` input through its styling path, which does
|
|
109
|
+
* not mark an OnPush component dirty — without this hook the component keeps
|
|
110
|
+
* rendering the class it was born with.
|
|
111
|
+
*/
|
|
112
|
+
ngOnChanges(): void;
|
|
113
|
+
/** Reasoning text to render; project your own markup instead when richer. @default '' */
|
|
114
|
+
text: string;
|
|
115
|
+
/** Extra Tailwind classes merged onto the content via `cn()` (last-wins). */
|
|
116
|
+
class: string;
|
|
117
|
+
private readonly service;
|
|
118
|
+
private readonly cdr;
|
|
119
|
+
private readonly subscriptions;
|
|
120
|
+
open: boolean;
|
|
121
|
+
ngOnInit(): void;
|
|
122
|
+
ngOnDestroy(): void;
|
|
123
|
+
get computedClass(): string;
|
|
124
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReasoningContentComponent, never>;
|
|
125
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ReasoningContentComponent, "tolle-reasoning-content", never, { "text": { "alias": "text"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
126
|
+
}
|
|
127
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { EventEmitter, ElementRef, AfterViewInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ResizableComponent implements AfterViewInit, OnDestroy {
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
minWidth: number;
|
|
7
|
+
minHeight: number;
|
|
8
|
+
maxWidth?: number;
|
|
9
|
+
maxHeight?: number;
|
|
10
|
+
resizable: boolean;
|
|
11
|
+
directions: ('right' | 'bottom' | 'both')[];
|
|
12
|
+
class: string;
|
|
13
|
+
containerClass: string;
|
|
14
|
+
resizeStart: EventEmitter<void>;
|
|
15
|
+
resize: EventEmitter<{
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
}>;
|
|
19
|
+
resizeEnd: EventEmitter<{
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
}>;
|
|
23
|
+
container: ElementRef<HTMLDivElement>;
|
|
24
|
+
private isResizing;
|
|
25
|
+
private resizeDirection;
|
|
26
|
+
private startX;
|
|
27
|
+
private startY;
|
|
28
|
+
private startWidth;
|
|
29
|
+
private startHeight;
|
|
30
|
+
private mouseMoveListener?;
|
|
31
|
+
private mouseUpListener?;
|
|
32
|
+
ngAfterViewInit(): void;
|
|
33
|
+
ngOnDestroy(): void;
|
|
34
|
+
get computedContainerClass(): string;
|
|
35
|
+
onResizeStart(event: MouseEvent, direction: 'horizontal' | 'vertical' | 'both'): void;
|
|
36
|
+
private onMouseMove;
|
|
37
|
+
private onMouseUp;
|
|
38
|
+
private getResizeCursor;
|
|
39
|
+
private setupGlobalListeners;
|
|
40
|
+
private cleanupGlobalListeners;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ResizableComponent, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ResizableComponent, "tolle-resizable", never, { "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "minWidth": { "alias": "minWidth"; "required": false; }; "minHeight": { "alias": "minHeight"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "resizable": { "alias": "resizable"; "required": false; }; "directions": { "alias": "directions"; "required": false; }; "class": { "alias": "class"; "required": false; }; "containerClass": { "alias": "containerClass"; "required": false; }; }, { "resizeStart": "resizeStart"; "resize": "resize"; "resizeEnd": "resizeEnd"; }, never, ["*"], true, never>;
|
|
43
|
+
}
|
|
@@ -10,7 +10,7 @@ export type SegmentItem = {
|
|
|
10
10
|
class?: string;
|
|
11
11
|
data?: any;
|
|
12
12
|
};
|
|
13
|
-
export declare class
|
|
13
|
+
export declare class SegmentComponent implements ControlValueAccessor, AfterViewInit, OnChanges, OnDestroy {
|
|
14
14
|
private cdr;
|
|
15
15
|
items: SegmentItem[];
|
|
16
16
|
class: string;
|
|
@@ -49,6 +49,16 @@ export declare class SegmentedComponent implements ControlValueAccessor, AfterVi
|
|
|
49
49
|
registerOnTouched(fn: any): void;
|
|
50
50
|
setDisabledState(isDisabled: boolean): void;
|
|
51
51
|
protected cn: typeof cn;
|
|
52
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
53
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SegmentComponent, never>;
|
|
53
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SegmentComponent, "tolle-segment", never, { "items": { "alias": "items"; "required": false; }; "class": { "alias": "class"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; }; }, {}, never, never, true, never>;
|
|
54
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Back-compat alias: the class was renamed to match its `tolle-segment` selector.
|
|
57
|
+
*
|
|
58
|
+
* A re-export binding rather than `const SegmentedComponent = SegmentComponent`,
|
|
59
|
+
* because Angular's AOT compiler resolves an aliased export straight back to the
|
|
60
|
+
* class declaration — so it still works in a consumer's `imports: []` array.
|
|
61
|
+
*
|
|
62
|
+
* @deprecated Use `SegmentComponent`. This alias will be removed in a future major.
|
|
63
|
+
*/
|
|
64
|
+
export { SegmentComponent as SegmentedComponent };
|
|
@@ -1,18 +1,42 @@
|
|
|
1
|
-
import { ElementRef, OnDestroy, QueryList, AfterContentInit, ChangeDetectorRef } from '@angular/core';
|
|
1
|
+
import { EventEmitter, ElementRef, OnDestroy, QueryList, AfterContentInit, OnChanges, ChangeDetectorRef } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
4
|
import { cn } from './utils/cn';
|
|
4
5
|
import { SelectItemComponent } from './select-item.component';
|
|
5
6
|
import { SelectService } from './select.service';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
|
-
|
|
8
|
+
declare const selectTriggerVariants: (props?: ({
|
|
9
|
+
size?: "default" | "xs" | "sm" | "lg" | null | undefined;
|
|
10
|
+
disabled?: boolean | null | undefined;
|
|
11
|
+
readonly?: boolean | null | undefined;
|
|
12
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
|
+
export type SelectProps = VariantProps<typeof selectTriggerVariants>;
|
|
14
|
+
/**
|
|
15
|
+
* A single-select listbox: a trigger that opens a floating panel of
|
|
16
|
+
* `tolle-select-item` options, with optional inline search. Implements
|
|
17
|
+
* `ControlValueAccessor`, so it works with `ngModel` and reactive forms.
|
|
18
|
+
*/
|
|
19
|
+
export declare class SelectComponent implements ControlValueAccessor, AfterContentInit, OnChanges, OnDestroy {
|
|
8
20
|
private selectService;
|
|
9
21
|
private cdr;
|
|
22
|
+
/** Text shown on the trigger when nothing is selected. @default 'Select an option' */
|
|
10
23
|
placeholder: string;
|
|
24
|
+
/** Extra Tailwind classes merged onto the trigger via `cn()` (last-wins). @default '' */
|
|
11
25
|
class: string;
|
|
26
|
+
/** Disables the control and blocks opening the panel. @default false */
|
|
12
27
|
disabled: boolean;
|
|
28
|
+
/** Adds a search box that filters the projected options. @default false */
|
|
13
29
|
searchable: boolean;
|
|
14
|
-
size
|
|
30
|
+
/** Height and text size of the trigger. @default 'default' */
|
|
31
|
+
size: SelectProps['size'];
|
|
32
|
+
/** Shows the current value but blocks opening the panel. @default false */
|
|
15
33
|
readonly: boolean;
|
|
34
|
+
/** Emitted with the chosen value whenever the selection changes. */
|
|
35
|
+
valueChange: EventEmitter<any>;
|
|
36
|
+
/** Emitted when the panel opens. */
|
|
37
|
+
opened: EventEmitter<void>;
|
|
38
|
+
/** Emitted when the panel closes. */
|
|
39
|
+
closed: EventEmitter<void>;
|
|
16
40
|
trigger: ElementRef;
|
|
17
41
|
popover: ElementRef;
|
|
18
42
|
container: ElementRef;
|
|
@@ -37,10 +61,17 @@ export declare class SelectComponent implements ControlValueAccessor, AfterConte
|
|
|
37
61
|
constructor(selectService: SelectService, cdr: ChangeDetectorRef);
|
|
38
62
|
get computedTriggerClass(): string;
|
|
39
63
|
get iconClass(): string;
|
|
64
|
+
/**
|
|
65
|
+
* Under OnPush a `[class]` binding is applied through Angular's *styling*
|
|
66
|
+
* path, which writes the input but — unlike a plain property binding — never
|
|
67
|
+
* marks the component dirty. Without this the trigger would keep rendering
|
|
68
|
+
* the class it was born with. Covering every input here is cheap and leaves
|
|
69
|
+
* no second instance of that trap.
|
|
70
|
+
*/
|
|
71
|
+
ngOnChanges(): void;
|
|
40
72
|
ngAfterContentInit(): void;
|
|
41
73
|
private applyPendingValue;
|
|
42
74
|
private updateItemSelection;
|
|
43
|
-
private syncSelectedLabel;
|
|
44
75
|
private _outsideClickHandler;
|
|
45
76
|
toggle(): void;
|
|
46
77
|
open(): void;
|
|
@@ -68,5 +99,6 @@ export declare class SelectComponent implements ControlValueAccessor, AfterConte
|
|
|
68
99
|
setDisabledState(isDisabled: boolean): void;
|
|
69
100
|
ngOnDestroy(): void;
|
|
70
101
|
static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent, never>;
|
|
71
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "tolle-select", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "class": { "alias": "class"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "size": { "alias": "size"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; }, {}, ["items"], ["*"], true, never>;
|
|
102
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "tolle-select", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "class": { "alias": "class"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "size": { "alias": "size"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; }, { "valueChange": "valueChange"; "opened": "opened"; "closed": "closed"; }, ["items"], ["*"], true, never>;
|
|
72
103
|
}
|
|
104
|
+
export {};
|
package/lib/sheet.component.d.ts
CHANGED
|
@@ -8,10 +8,13 @@ export declare class SheetComponent {
|
|
|
8
8
|
private viewContainerRef;
|
|
9
9
|
private scrollStrategy;
|
|
10
10
|
private overlayRef?;
|
|
11
|
+
/** Pending teardown scheduled by `hide()` for the exit animation. */
|
|
12
|
+
private disposeTimer?;
|
|
11
13
|
/** Element focused before the sheet opened, restored on close. */
|
|
12
14
|
private previouslyFocused?;
|
|
13
15
|
contentComponent?: any;
|
|
14
16
|
open(): void;
|
|
17
|
+
private cancelPendingDispose;
|
|
15
18
|
close(): void;
|
|
16
19
|
private show;
|
|
17
20
|
private hide;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { OnChanges } from '@angular/core';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
declare const shimmerVariants: (props?: ({
|
|
5
|
+
size?: "default" | "xs" | "sm" | "lg" | "xl" | null | undefined;
|
|
6
|
+
active?: boolean | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export type ShimmerProps = VariantProps<typeof shimmerVariants>;
|
|
9
|
+
/**
|
|
10
|
+
* Shimmering text for a live, in-progress status — "Thinking…", "Generating
|
|
11
|
+
* response…". While `active` the projected text sweeps with the `.shimmer`
|
|
12
|
+
* utility; when it is false the same text renders plain and static, so the
|
|
13
|
+
* label can stay mounted as the state settles.
|
|
14
|
+
*
|
|
15
|
+
* ```html
|
|
16
|
+
* <tolle-shimmer [active]="isStreaming" size="sm">Generating response…</tolle-shimmer>
|
|
17
|
+
* ```
|
|
18
|
+
* @new
|
|
19
|
+
*/
|
|
20
|
+
export declare class ShimmerComponent implements OnChanges {
|
|
21
|
+
private readonly cdr;
|
|
22
|
+
/**
|
|
23
|
+
* Angular writes a bound `class` input through its styling path, which does
|
|
24
|
+
* not mark an OnPush component dirty — without this hook the component keeps
|
|
25
|
+
* rendering the class it was born with.
|
|
26
|
+
*/
|
|
27
|
+
ngOnChanges(): void;
|
|
28
|
+
/** Runs the shimmer animation; false renders plain static text. @default true */
|
|
29
|
+
active: boolean;
|
|
30
|
+
/** Text size of the label. @default 'default' */
|
|
31
|
+
size: ShimmerProps['size'];
|
|
32
|
+
/** Extra Tailwind classes merged onto the label via `cn()` (last-wins). */
|
|
33
|
+
class: string;
|
|
34
|
+
get computedClass(): string;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShimmerComponent, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ShimmerComponent, "tolle-shimmer", never, { "active": { "alias": "active"; "required": false; }; "size": { "alias": "size"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
@@ -11,6 +11,8 @@ export type SidebarItem = {
|
|
|
11
11
|
expanded?: boolean;
|
|
12
12
|
/** Render as a plain anchor to an external URL / static file (opens in a new tab) instead of a router link. */
|
|
13
13
|
external?: boolean;
|
|
14
|
+
/** Short trailing pill, e.g. 'New' or 'Beta'. Hidden while the sidebar is collapsed. */
|
|
15
|
+
badge?: string;
|
|
14
16
|
};
|
|
15
17
|
export type SidebarGroup = {
|
|
16
18
|
title: string;
|