@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,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;
|
|
@@ -0,0 +1,156 @@
|
|
|
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-sources` with its trigger, content and sources.
|
|
6
|
+
*
|
|
7
|
+
* The trigger has to report how many sources were projected into a sibling
|
|
8
|
+
* component, so every `tolle-source` registers here and the trigger renders
|
|
9
|
+
* from the resulting count.
|
|
10
|
+
*
|
|
11
|
+
* Provided on `SourcesComponent`, so each citation list gets its own instance.
|
|
12
|
+
*/
|
|
13
|
+
export declare class SourcesService {
|
|
14
|
+
private readonly openSource;
|
|
15
|
+
/** Emits whether the citation list is expanded. */
|
|
16
|
+
readonly open$: import("rxjs").Observable<boolean>;
|
|
17
|
+
private readonly idsSource;
|
|
18
|
+
/** Emits the ids of the registered sources, in registration (DOM) order. */
|
|
19
|
+
readonly ids$: import("rxjs").Observable<string[]>;
|
|
20
|
+
/** True while the citation list is expanded. */
|
|
21
|
+
get open(): boolean;
|
|
22
|
+
/** How many sources are currently registered. */
|
|
23
|
+
get count(): number;
|
|
24
|
+
setOpen(value: boolean): void;
|
|
25
|
+
toggle(): void;
|
|
26
|
+
register(id: string): void;
|
|
27
|
+
unregister(id: string): void;
|
|
28
|
+
/** Zero-based position of a source, or -1 when it is not registered. */
|
|
29
|
+
indexOf(id: string): number;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SourcesService, never>;
|
|
31
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SourcesService>;
|
|
32
|
+
}
|
|
33
|
+
declare const sourcesVariants: (props?: ({
|
|
34
|
+
variant?: "default" | "muted" | "card" | null | undefined;
|
|
35
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
36
|
+
export type SourcesProps = VariantProps<typeof sourcesVariants>;
|
|
37
|
+
/**
|
|
38
|
+
* A collapsible list of the citations behind a response.
|
|
39
|
+
*
|
|
40
|
+
* Compose it from `tolle-sources-trigger`, `tolle-sources-content` and one
|
|
41
|
+
* `tolle-source` per citation — the trigger counts the sources for you.
|
|
42
|
+
* @new
|
|
43
|
+
*/
|
|
44
|
+
export declare class SourcesComponent implements OnInit, OnChanges, OnDestroy {
|
|
45
|
+
/** Whether the citation list is expanded. @default false */
|
|
46
|
+
open: boolean;
|
|
47
|
+
/** Visual treatment of the list container. @default 'default' */
|
|
48
|
+
variant: SourcesProps['variant'];
|
|
49
|
+
/** Extra Tailwind classes merged onto the list via `cn()` (last-wins). */
|
|
50
|
+
class: string;
|
|
51
|
+
/** Emitted with the new state whenever the list is expanded or collapsed. */
|
|
52
|
+
openChange: EventEmitter<boolean>;
|
|
53
|
+
private readonly service;
|
|
54
|
+
private readonly cdr;
|
|
55
|
+
private readonly subscriptions;
|
|
56
|
+
/** True while an `open` input is being pushed into the service. */
|
|
57
|
+
private applyingInput;
|
|
58
|
+
ngOnInit(): void;
|
|
59
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
60
|
+
private applyInput;
|
|
61
|
+
ngOnDestroy(): void;
|
|
62
|
+
get computedClass(): string;
|
|
63
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SourcesComponent, never>;
|
|
64
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SourcesComponent, "tolle-sources", never, { "open": { "alias": "open"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, { "openChange": "openChange"; }, never, ["*"], true, never>;
|
|
65
|
+
}
|
|
66
|
+
/** Toggle for a `tolle-sources`, labelled with how many sources there are. */
|
|
67
|
+
export declare class SourcesTriggerComponent implements OnChanges, OnInit, OnDestroy {
|
|
68
|
+
/**
|
|
69
|
+
* Angular writes a bound `class` input through its styling path, which does
|
|
70
|
+
* not mark an OnPush component dirty — without this hook the component keeps
|
|
71
|
+
* rendering the class it was born with.
|
|
72
|
+
*/
|
|
73
|
+
ngOnChanges(): void;
|
|
74
|
+
/** Overrides the counted number of sources. @default null */
|
|
75
|
+
count: number | null;
|
|
76
|
+
/** Extra Tailwind classes merged onto the trigger via `cn()` (last-wins). */
|
|
77
|
+
class: string;
|
|
78
|
+
private readonly service;
|
|
79
|
+
private readonly cdr;
|
|
80
|
+
private readonly subscriptions;
|
|
81
|
+
open: boolean;
|
|
82
|
+
registered: number;
|
|
83
|
+
ngOnInit(): void;
|
|
84
|
+
ngOnDestroy(): void;
|
|
85
|
+
/** How many sources the trigger reports. */
|
|
86
|
+
get total(): number;
|
|
87
|
+
get label(): string;
|
|
88
|
+
get computedClass(): string;
|
|
89
|
+
onToggle(): void;
|
|
90
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SourcesTriggerComponent, never>;
|
|
91
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SourcesTriggerComponent, "tolle-sources-trigger", never, { "count": { "alias": "count"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Holds the `tolle-source` entries of a `tolle-sources`.
|
|
95
|
+
*
|
|
96
|
+
* Stays in the DOM while collapsed — hidden and `inert` rather than removed —
|
|
97
|
+
* so the sources inside it stay registered and the trigger's count is right
|
|
98
|
+
* before the list has ever been opened.
|
|
99
|
+
*/
|
|
100
|
+
export declare class SourcesContentComponent implements OnChanges, OnInit, OnDestroy {
|
|
101
|
+
/**
|
|
102
|
+
* Angular writes a bound `class` input through its styling path, which does
|
|
103
|
+
* not mark an OnPush component dirty — without this hook the component keeps
|
|
104
|
+
* rendering the class it was born with.
|
|
105
|
+
*/
|
|
106
|
+
ngOnChanges(): void;
|
|
107
|
+
/** Extra Tailwind classes merged onto the content via `cn()` (last-wins). */
|
|
108
|
+
class: string;
|
|
109
|
+
private readonly service;
|
|
110
|
+
private readonly cdr;
|
|
111
|
+
private readonly subscriptions;
|
|
112
|
+
open: boolean;
|
|
113
|
+
ngOnInit(): void;
|
|
114
|
+
ngOnDestroy(): void;
|
|
115
|
+
get computedClass(): string;
|
|
116
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SourcesContentComponent, never>;
|
|
117
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SourcesContentComponent, "tolle-sources-content", never, { "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
118
|
+
}
|
|
119
|
+
declare const sourceVariants: (props?: ({
|
|
120
|
+
size?: "default" | "sm" | null | undefined;
|
|
121
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
122
|
+
export type SourceProps = VariantProps<typeof sourceVariants>;
|
|
123
|
+
/** A single citation inside a `tolle-sources-content`. */
|
|
124
|
+
export declare class SourceComponent implements OnChanges, OnInit, OnDestroy {
|
|
125
|
+
/**
|
|
126
|
+
* Angular writes a bound `class` input through its styling path, which does
|
|
127
|
+
* not mark an OnPush component dirty — without this hook the component keeps
|
|
128
|
+
* rendering the class it was born with.
|
|
129
|
+
*/
|
|
130
|
+
ngOnChanges(): void;
|
|
131
|
+
/** URL the citation points at. @default '' */
|
|
132
|
+
href: string;
|
|
133
|
+
/** Human-readable title; falls back to the href when empty. @default '' */
|
|
134
|
+
title: string;
|
|
135
|
+
/** URL of a favicon shown instead of the numbered chip. @default '' */
|
|
136
|
+
favicon: string;
|
|
137
|
+
/** Overrides the auto-numbered position chip. @default null */
|
|
138
|
+
index: number | null;
|
|
139
|
+
/** Text scale of the citation. @default 'default' */
|
|
140
|
+
size: SourceProps['size'];
|
|
141
|
+
/** Extra Tailwind classes merged onto the citation via `cn()` (last-wins). */
|
|
142
|
+
class: string;
|
|
143
|
+
private readonly service;
|
|
144
|
+
private readonly cdr;
|
|
145
|
+
private readonly subscriptions;
|
|
146
|
+
private readonly id;
|
|
147
|
+
order: number;
|
|
148
|
+
ngOnInit(): void;
|
|
149
|
+
ngOnDestroy(): void;
|
|
150
|
+
/** One-based number shown in the chip. */
|
|
151
|
+
get position(): number;
|
|
152
|
+
get computedClass(): string;
|
|
153
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SourceComponent, never>;
|
|
154
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SourceComponent, "tolle-source", never, { "href": { "alias": "href"; "required": false; }; "title": { "alias": "title"; "required": false; }; "favicon": { "alias": "favicon"; "required": false; }; "index": { "alias": "index"; "required": false; }; "size": { "alias": "size"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
155
|
+
}
|
|
156
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { OnChanges } from '@angular/core';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
declare const spinnerVariants: (props?: ({
|
|
5
|
+
size?: "default" | "xs" | "sm" | "lg" | "xl" | null | undefined;
|
|
6
|
+
variant?: "default" | "destructive" | "muted" | "primary" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export type SpinnerProps = VariantProps<typeof spinnerVariants>;
|
|
9
|
+
/**
|
|
10
|
+
* An indeterminate loading indicator. Renders as `role="status"` with a
|
|
11
|
+
* visually-hidden label so screen readers announce the loading state.
|
|
12
|
+
* @new
|
|
13
|
+
*/
|
|
14
|
+
export declare class SpinnerComponent implements OnChanges {
|
|
15
|
+
private readonly cdr;
|
|
16
|
+
ngOnChanges(): void;
|
|
17
|
+
/** Diameter of the spinner. @default 'default' */
|
|
18
|
+
size: SpinnerProps['size'];
|
|
19
|
+
/** Colour of the spinner, inherited from the theme tokens. @default 'default' */
|
|
20
|
+
variant: SpinnerProps['variant'];
|
|
21
|
+
/** Accessible label announced while the spinner is visible. @default 'Loading' */
|
|
22
|
+
label: string;
|
|
23
|
+
/** Extra Tailwind classes merged onto the spinner via `cn()` (last-wins). */
|
|
24
|
+
class: string;
|
|
25
|
+
get computedClass(): string;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SpinnerComponent, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpinnerComponent, "tolle-spinner", never, { "size": { "alias": "size"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "label": { "alias": "label"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, never, true, never>;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { EventEmitter, OnDestroy, OnInit, OnChanges } from '@angular/core';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Relays a chosen suggestion from a `tolle-suggestion` up to the
|
|
6
|
+
* `tolle-suggestions` row that contains it, so consumers can listen in one
|
|
7
|
+
* place instead of binding every pill.
|
|
8
|
+
*
|
|
9
|
+
* Provided on `SuggestionsComponent`; injected optionally, since a pill is
|
|
10
|
+
* perfectly usable on its own.
|
|
11
|
+
*/
|
|
12
|
+
export declare class SuggestionsService {
|
|
13
|
+
private readonly selectedSource;
|
|
14
|
+
/** Emits the value of whichever suggestion the user picked. */
|
|
15
|
+
readonly selected$: import("rxjs").Observable<string>;
|
|
16
|
+
select(value: string): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SuggestionsService, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SuggestionsService>;
|
|
19
|
+
}
|
|
20
|
+
declare const suggestionsVariants: (props?: ({
|
|
21
|
+
gap?: "default" | "sm" | "lg" | null | undefined;
|
|
22
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
23
|
+
export type SuggestionsProps = VariantProps<typeof suggestionsVariants>;
|
|
24
|
+
/**
|
|
25
|
+
* A horizontally scrollable row of suggested follow-up prompts.
|
|
26
|
+
*
|
|
27
|
+
* Fill it with `tolle-suggestion` pills and listen to this component's
|
|
28
|
+
* `selected` output to react to any of them.
|
|
29
|
+
*/
|
|
30
|
+
export declare class SuggestionsComponent implements OnChanges, OnInit, OnDestroy {
|
|
31
|
+
private readonly cdr;
|
|
32
|
+
/**
|
|
33
|
+
* Angular writes a bound `class` input through its styling path, which does
|
|
34
|
+
* not mark an OnPush component dirty — without this hook the component keeps
|
|
35
|
+
* rendering the class it was born with.
|
|
36
|
+
*/
|
|
37
|
+
ngOnChanges(): void;
|
|
38
|
+
/** Spacing between the pills. @default 'default' */
|
|
39
|
+
gap: SuggestionsProps['gap'];
|
|
40
|
+
/** Accessible name for the row. @default 'Suggestions' */
|
|
41
|
+
ariaLabel: string;
|
|
42
|
+
/** Extra Tailwind classes merged onto the row via `cn()` (last-wins). */
|
|
43
|
+
class: string;
|
|
44
|
+
/** Emitted with the `value` of whichever suggestion in the row was picked. */
|
|
45
|
+
selected: EventEmitter<string>;
|
|
46
|
+
private readonly service;
|
|
47
|
+
private readonly subscriptions;
|
|
48
|
+
ngOnInit(): void;
|
|
49
|
+
ngOnDestroy(): void;
|
|
50
|
+
get computedClass(): string;
|
|
51
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SuggestionsComponent, never>;
|
|
52
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SuggestionsComponent, "tolle-suggestions", never, { "gap": { "alias": "gap"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, { "selected": "selected"; }, never, ["*"], true, never>;
|
|
53
|
+
}
|
|
54
|
+
declare const suggestionVariants: (props?: ({
|
|
55
|
+
variant?: "outline" | "secondary" | "ghost" | null | undefined;
|
|
56
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
57
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
58
|
+
export type SuggestionProps = VariantProps<typeof suggestionVariants>;
|
|
59
|
+
/**
|
|
60
|
+
* A single suggested follow-up prompt, rendered as a pill button.
|
|
61
|
+
*
|
|
62
|
+
* Projected content is the label; `value` is what gets emitted when it is
|
|
63
|
+
* picked, so the two can differ.
|
|
64
|
+
* @new
|
|
65
|
+
*/
|
|
66
|
+
export declare class SuggestionComponent implements OnChanges {
|
|
67
|
+
private readonly cdr;
|
|
68
|
+
/**
|
|
69
|
+
* Angular writes a bound `class` input through its styling path, which does
|
|
70
|
+
* not mark an OnPush component dirty — without this hook the component keeps
|
|
71
|
+
* rendering the class it was born with.
|
|
72
|
+
*/
|
|
73
|
+
ngOnChanges(): void;
|
|
74
|
+
/** Value emitted when the pill is picked. @default '' */
|
|
75
|
+
value: string;
|
|
76
|
+
/** Visual style of the pill. @default 'outline' */
|
|
77
|
+
variant: SuggestionProps['variant'];
|
|
78
|
+
/** Size of the pill. @default 'default' */
|
|
79
|
+
size: SuggestionProps['size'];
|
|
80
|
+
/** Remixicon class shown before the label. @default '' */
|
|
81
|
+
icon: string;
|
|
82
|
+
/** Blocks interaction with the pill. @default false */
|
|
83
|
+
disabled: boolean;
|
|
84
|
+
/** Accessible name, when the projected label is not descriptive enough. @default '' */
|
|
85
|
+
ariaLabel: string;
|
|
86
|
+
/** Extra Tailwind classes merged onto the pill via `cn()` (last-wins). */
|
|
87
|
+
class: string;
|
|
88
|
+
/** Emitted with this pill's `value` when it is picked. */
|
|
89
|
+
selected: EventEmitter<string>;
|
|
90
|
+
private readonly parent;
|
|
91
|
+
get computedClass(): string;
|
|
92
|
+
onClick(): void;
|
|
93
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SuggestionComponent, never>;
|
|
94
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SuggestionComponent, "tolle-suggestion", never, { "value": { "alias": "value"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, { "selected": "selected"; }, never, ["*"], true, never>;
|
|
95
|
+
}
|
|
96
|
+
export {};
|