@visuno/angular 0.0.0-stage → 0.1.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.
Files changed (175) hide show
  1. package/LICENSE +24 -0
  2. package/README.md +56 -2
  3. package/account-table/account-table.component.d.ts +72 -0
  4. package/action-log/action-log.component.d.ts +41 -0
  5. package/activity-heatmap/activity-heatmap.component.d.ts +67 -0
  6. package/agent-inbox/agent-inbox.component.d.ts +75 -0
  7. package/agent-lanes/agent-lanes.component.d.ts +152 -0
  8. package/agent-phases/agent-phases.component.d.ts +62 -0
  9. package/agent-run-timeline/agent-run-timeline.component.d.ts +113 -0
  10. package/agent-tree/agent-tree.component.d.ts +80 -0
  11. package/answer-action-bar/answer-action-bar.component.d.ts +110 -0
  12. package/artifact-card/artifact-card.component.d.ts +145 -0
  13. package/attachment-tray/attachment-tray.component.d.ts +84 -0
  14. package/badge/badge.component.d.ts +25 -0
  15. package/bar-chart/bar-chart.component.d.ts +87 -0
  16. package/browser-session/browser-session.component.d.ts +70 -0
  17. package/buttons/buttons.component.d.ts +63 -0
  18. package/card/card.component.d.ts +21 -0
  19. package/change-review/change-review.component.d.ts +97 -0
  20. package/citation-hover-card/citation-hover-card.component.d.ts +95 -0
  21. package/code-viewer/code-viewer.component.d.ts +86 -0
  22. package/composer/composer.component.d.ts +114 -0
  23. package/context-meter/context-meter.component.d.ts +60 -0
  24. package/core/icon.component.d.ts +10 -0
  25. package/core/reduced-motion.service.d.ts +15 -0
  26. package/decision-prompt/decision-prompt.component.d.ts +56 -0
  27. package/design-review/design-review.component.d.ts +108 -0
  28. package/design-tuner/design-tuner.component.d.ts +75 -0
  29. package/details-panel/details-panel.component.d.ts +150 -0
  30. package/donut-chart/donut-chart.component.d.ts +63 -0
  31. package/draft-review/draft-review.component.d.ts +128 -0
  32. package/error-recovery/error-recovery.component.d.ts +59 -0
  33. package/esm2022/account-table/account-table.component.mjs +399 -0
  34. package/esm2022/action-log/action-log.component.mjs +177 -0
  35. package/esm2022/activity-heatmap/activity-heatmap.component.mjs +285 -0
  36. package/esm2022/agent-inbox/agent-inbox.component.mjs +284 -0
  37. package/esm2022/agent-lanes/agent-lanes.component.mjs +600 -0
  38. package/esm2022/agent-phases/agent-phases.component.mjs +300 -0
  39. package/esm2022/agent-run-timeline/agent-run-timeline.component.mjs +412 -0
  40. package/esm2022/agent-tree/agent-tree.component.mjs +393 -0
  41. package/esm2022/answer-action-bar/answer-action-bar.component.mjs +636 -0
  42. package/esm2022/artifact-card/artifact-card.component.mjs +916 -0
  43. package/esm2022/attachment-tray/attachment-tray.component.mjs +402 -0
  44. package/esm2022/badge/badge.component.mjs +97 -0
  45. package/esm2022/bar-chart/bar-chart.component.mjs +300 -0
  46. package/esm2022/browser-session/browser-session.component.mjs +352 -0
  47. package/esm2022/buttons/buttons.component.mjs +215 -0
  48. package/esm2022/card/card.component.mjs +107 -0
  49. package/esm2022/change-review/change-review.component.mjs +398 -0
  50. package/esm2022/citation-hover-card/citation-hover-card.component.mjs +360 -0
  51. package/esm2022/code-viewer/code-viewer.component.mjs +291 -0
  52. package/esm2022/composer/composer.component.mjs +743 -0
  53. package/esm2022/context-meter/context-meter.component.mjs +275 -0
  54. package/esm2022/core/icon.component.mjs +111 -0
  55. package/esm2022/core/reduced-motion.service.mjs +34 -0
  56. package/esm2022/decision-prompt/decision-prompt.component.mjs +259 -0
  57. package/esm2022/design-review/design-review.component.mjs +428 -0
  58. package/esm2022/design-tuner/design-tuner.component.mjs +341 -0
  59. package/esm2022/details-panel/details-panel.component.mjs +537 -0
  60. package/esm2022/donut-chart/donut-chart.component.mjs +240 -0
  61. package/esm2022/draft-review/draft-review.component.mjs +549 -0
  62. package/esm2022/error-recovery/error-recovery.component.mjs +231 -0
  63. package/esm2022/eval-results/eval-results.component.mjs +368 -0
  64. package/esm2022/feedback-sheet/feedback-sheet.component.mjs +411 -0
  65. package/esm2022/field-extraction/field-extraction.component.mjs +368 -0
  66. package/esm2022/funnel-chart/funnel-chart.component.mjs +258 -0
  67. package/esm2022/grid/grid.component.mjs +66 -0
  68. package/esm2022/health-score/health-score.component.mjs +420 -0
  69. package/esm2022/human-handoff/human-handoff.component.mjs +676 -0
  70. package/esm2022/image-generation/image-generation.component.mjs +1028 -0
  71. package/esm2022/inline-text-diff/inline-text-diff.component.mjs +390 -0
  72. package/esm2022/launch-checklist/launch-checklist.component.mjs +229 -0
  73. package/esm2022/line-chart/line-chart.component.mjs +417 -0
  74. package/esm2022/live-answer/live-answer.component.mjs +411 -0
  75. package/esm2022/metric-insight/metric-insight.component.mjs +511 -0
  76. package/esm2022/modal/modal.component.mjs +202 -0
  77. package/esm2022/model-picker/model-picker.component.mjs +491 -0
  78. package/esm2022/permission-gate/permission-gate.component.mjs +498 -0
  79. package/esm2022/plan-review/plan-review.component.mjs +432 -0
  80. package/esm2022/progress/progress.component.mjs +503 -0
  81. package/esm2022/prompt-library/prompt-library.component.mjs +453 -0
  82. package/esm2022/prompt-starters/prompt-starters.component.mjs +272 -0
  83. package/esm2022/proposal-card/proposal-card.component.mjs +402 -0
  84. package/esm2022/public-api.mjs +88 -0
  85. package/esm2022/radar-chart/radar-chart.component.mjs +500 -0
  86. package/esm2022/radial-goals/radial-goals.component.mjs +418 -0
  87. package/esm2022/reasoning-trail/reasoning-trail.component.mjs +284 -0
  88. package/esm2022/response-versions/response-versions.component.mjs +288 -0
  89. package/esm2022/rewrite-toolbar/rewrite-toolbar.component.mjs +397 -0
  90. package/esm2022/rich-text-editor/rich-text-editor.component.mjs +1755 -0
  91. package/esm2022/run-cost/run-cost.component.mjs +215 -0
  92. package/esm2022/run-queue/run-queue.component.mjs +481 -0
  93. package/esm2022/run-summary/run-summary.component.mjs +331 -0
  94. package/esm2022/scatter-chart/scatter-chart.component.mjs +705 -0
  95. package/esm2022/score-breakdown/score-breakdown.component.mjs +460 -0
  96. package/esm2022/segmented-control/segmented-control.component.mjs +180 -0
  97. package/esm2022/source-stack/source-stack.component.mjs +245 -0
  98. package/esm2022/stat-cards/stat-cards.component.mjs +258 -0
  99. package/esm2022/status-pill/status-pill.component.mjs +305 -0
  100. package/esm2022/steering/steering.component.mjs +343 -0
  101. package/esm2022/step-loader/step-loader.component.mjs +209 -0
  102. package/esm2022/task-table/task-table.component.mjs +534 -0
  103. package/esm2022/terminal-stream/terminal-stream.component.mjs +583 -0
  104. package/esm2022/thinking/thinking.component.mjs +276 -0
  105. package/esm2022/thinking-states/thinking-states.component.mjs +333 -0
  106. package/esm2022/thread-panel/thread-panel.component.mjs +271 -0
  107. package/esm2022/toast/toast.component.mjs +195 -0
  108. package/esm2022/toast-stack/toast-stack.component.mjs +301 -0
  109. package/esm2022/tool-call/tool-call.component.mjs +273 -0
  110. package/esm2022/tooltip/tooltip.component.mjs +417 -0
  111. package/esm2022/top-pages/top-pages.component.mjs +240 -0
  112. package/esm2022/trace-view/trace-view.component.mjs +440 -0
  113. package/esm2022/visuno-angular.mjs +5 -0
  114. package/esm2022/voice-capture/voice-capture.component.mjs +650 -0
  115. package/esm2022/voice-orb/voice-orb.component.mjs +538 -0
  116. package/esm2022/web-search/web-search.component.mjs +374 -0
  117. package/eval-results/eval-results.component.d.ts +67 -0
  118. package/feedback-sheet/feedback-sheet.component.d.ts +74 -0
  119. package/fesm2022/visuno-angular.mjs +31992 -0
  120. package/fesm2022/visuno-angular.mjs.map +1 -0
  121. package/field-extraction/field-extraction.component.d.ts +82 -0
  122. package/funnel-chart/funnel-chart.component.d.ts +70 -0
  123. package/grid/grid.component.d.ts +22 -0
  124. package/health-score/health-score.component.d.ts +87 -0
  125. package/human-handoff/human-handoff.component.d.ts +125 -0
  126. package/image-generation/image-generation.component.d.ts +253 -0
  127. package/index.d.ts +5 -0
  128. package/inline-text-diff/inline-text-diff.component.d.ts +76 -0
  129. package/launch-checklist/launch-checklist.component.d.ts +46 -0
  130. package/line-chart/line-chart.component.d.ts +89 -0
  131. package/live-answer/live-answer.component.d.ts +110 -0
  132. package/metric-insight/metric-insight.component.d.ts +110 -0
  133. package/modal/modal.component.d.ts +37 -0
  134. package/model-picker/model-picker.component.d.ts +97 -0
  135. package/package.json +51 -4
  136. package/permission-gate/permission-gate.component.d.ts +100 -0
  137. package/plan-review/plan-review.component.d.ts +86 -0
  138. package/progress/progress.component.d.ts +91 -0
  139. package/prompt-library/prompt-library.component.d.ts +121 -0
  140. package/prompt-starters/prompt-starters.component.d.ts +65 -0
  141. package/proposal-card/proposal-card.component.d.ts +101 -0
  142. package/public-api.d.ts +82 -0
  143. package/radar-chart/radar-chart.component.d.ts +110 -0
  144. package/radial-goals/radial-goals.component.d.ts +90 -0
  145. package/reasoning-trail/reasoning-trail.component.d.ts +73 -0
  146. package/response-versions/response-versions.component.d.ts +54 -0
  147. package/rewrite-toolbar/rewrite-toolbar.component.d.ts +92 -0
  148. package/rich-text-editor/rich-text-editor.component.d.ts +180 -0
  149. package/run-cost/run-cost.component.d.ts +43 -0
  150. package/run-queue/run-queue.component.d.ts +93 -0
  151. package/run-summary/run-summary.component.d.ts +81 -0
  152. package/scatter-chart/scatter-chart.component.d.ts +139 -0
  153. package/score-breakdown/score-breakdown.component.d.ts +107 -0
  154. package/segmented-control/segmented-control.component.d.ts +44 -0
  155. package/source-stack/source-stack.component.d.ts +60 -0
  156. package/stat-cards/stat-cards.component.d.ts +86 -0
  157. package/status-pill/status-pill.component.d.ts +64 -0
  158. package/steering/steering.component.d.ts +75 -0
  159. package/step-loader/step-loader.component.d.ts +40 -0
  160. package/styles.css +424 -0
  161. package/task-table/task-table.component.d.ts +114 -0
  162. package/terminal-stream/terminal-stream.component.d.ts +110 -0
  163. package/thinking/thinking.component.d.ts +63 -0
  164. package/thinking-states/thinking-states.component.d.ts +51 -0
  165. package/thread-panel/thread-panel.component.d.ts +75 -0
  166. package/toast/toast.component.d.ts +56 -0
  167. package/toast-stack/toast-stack.component.d.ts +72 -0
  168. package/tokens.css +424 -0
  169. package/tool-call/tool-call.component.d.ts +61 -0
  170. package/tooltip/tooltip.component.d.ts +89 -0
  171. package/top-pages/top-pages.component.d.ts +75 -0
  172. package/trace-view/trace-view.component.d.ts +95 -0
  173. package/voice-capture/voice-capture.component.d.ts +103 -0
  174. package/voice-orb/voice-orb.component.d.ts +78 -0
  175. package/web-search/web-search.component.d.ts +77 -0
@@ -0,0 +1,76 @@
1
+ import { AfterViewInit, ElementRef, EventEmitter, OnDestroy } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ /** One of the agent's edits to the copy. */
4
+ export interface TextEdit {
5
+ key: string;
6
+ /** The words the copy has now, shown struck. */
7
+ from: string;
8
+ /** The words the agent suggests instead. */
9
+ to: string;
10
+ /** Why the agent isn't sure of this one. The edit is marked and the note shows above its buttons. */
11
+ note?: string;
12
+ }
13
+ /** A run of the copy as it stands, or one of the agent's edits to it. */
14
+ export type TextPart = string | TextEdit;
15
+ /** What was decided for an edit. */
16
+ export type EditDecision = 'accepted' | 'rejected';
17
+ /** Optional button label overrides. */
18
+ export interface InlineTextDiffLabels {
19
+ accept?: string;
20
+ reject?: string;
21
+ acceptAll?: string;
22
+ rejectAll?: string;
23
+ }
24
+ export declare class InlineTextDiffComponent implements AfterViewInit, OnDestroy {
25
+ /** What the copy is, like "Pricing intro". */
26
+ title: string;
27
+ /** The copy in order: plain strings, with the edits between them. */
28
+ parts: TextPart[];
29
+ /** The initial decisions by edit key; edits left out wait for a decision. */
30
+ defaultDecisions: Record<string, EditDecision>;
31
+ /** The line that replaces the buttons once every edit is decided. */
32
+ doneLabel: string;
33
+ /** Button label overrides. */
34
+ set labels(v: InlineTextDiffLabels);
35
+ /** Extra class on the root wrapper. */
36
+ className: string;
37
+ /** Emitted whenever the decisions change, with the full map by key. */
38
+ decisionsChange: EventEmitter<Record<string, EditDecision>>;
39
+ root: ElementRef<HTMLDivElement>;
40
+ bar: ElementRef<HTMLDivElement>;
41
+ private readonly motion;
42
+ L: Required<InlineTextDiffLabels>;
43
+ dec: Record<string, EditDecision>;
44
+ cur: string | null;
45
+ at: {
46
+ left: number;
47
+ top: number;
48
+ };
49
+ /** The card keeps the height it had with every edit open once decisions begin. */
50
+ held: number | null;
51
+ /** The toolbar keeps the last edit's note while it fades out. */
52
+ lastNote: string;
53
+ private openHeight;
54
+ private onDocDown;
55
+ ngAfterViewInit(): void;
56
+ ngOnDestroy(): void;
57
+ get edits(): TextEdit[];
58
+ get left(): number;
59
+ get fresh(): boolean;
60
+ get open(): TextEdit | undefined;
61
+ get status(): string;
62
+ asEdit(p: TextPart): TextEdit | null;
63
+ editLabel(e: TextEdit): string;
64
+ toggle(key: string): void;
65
+ onChunkKeydown(ev: KeyboardEvent, key: string): void;
66
+ onBarKeydown(ev: KeyboardEvent): void;
67
+ onRootKeydown(ev: KeyboardEvent): void;
68
+ decide(s: EditDecision): void;
69
+ all(s: EditDecision): void;
70
+ private set;
71
+ private commit;
72
+ private position;
73
+ private chunkEl;
74
+ static ɵfac: i0.ɵɵFactoryDeclaration<InlineTextDiffComponent, never>;
75
+ static ɵcmp: i0.ɵɵComponentDeclaration<InlineTextDiffComponent, "vo-inline-text-diff", never, { "title": { "alias": "title"; "required": true; }; "parts": { "alias": "parts"; "required": true; }; "defaultDecisions": { "alias": "defaultDecisions"; "required": false; }; "doneLabel": { "alias": "doneLabel"; "required": false; }; "labels": { "alias": "labels"; "required": false; }; "className": { "alias": "className"; "required": false; }; }, { "decisionsChange": "decisionsChange"; }, never, never, true, never>;
76
+ }
@@ -0,0 +1,46 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { type VoIconName } from '../core/icon.component';
3
+ import * as i0 from "@angular/core";
4
+ /** The state of one check: waiting, running (checking or fixing), passed or failed. */
5
+ export type CheckState = 'wait' | 'run' | 'ok' | 'bad';
6
+ /** One row in the checklist. */
7
+ export interface LaunchCheck {
8
+ /** What is checked, like "Contrast meets AA". */
9
+ label: string;
10
+ /** wait (not run yet), run (checking or fixing now), ok or bad. */
11
+ state: CheckState;
12
+ /** The quiet line under the label, like "All 14 text pairs pass" or what is wrong. */
13
+ note?: string;
14
+ /** When true on a failed check, a Fix button is shown (emits `fix` with the index). */
15
+ canFix?: boolean;
16
+ }
17
+ /** The button beside the title, like Run checks, Run again or Ship it. */
18
+ export interface LaunchAction {
19
+ label: string;
20
+ icon?: VoIconName;
21
+ /** The accent (ship) colour, for the step that ships. */
22
+ accent?: boolean;
23
+ disabled?: boolean;
24
+ }
25
+ export declare class LaunchChecklistComponent {
26
+ /** Like "Ready to ship pricing?". */
27
+ title: string;
28
+ /** The checks, one row (and one bar segment) each. */
29
+ checks: LaunchCheck[];
30
+ /** The line under the title. Defaults to a count, "Checking" while one runs, then what is left to fix. */
31
+ status?: string;
32
+ /** The button beside the title; omit for no button. */
33
+ action: LaunchAction | null;
34
+ /** Sits flat in a chat thread (the default). Set false to give it a card of its own. */
35
+ bare: boolean;
36
+ /** Emitted when the action button is clicked (Run checks / Run again / Ship it). */
37
+ run: EventEmitter<void>;
38
+ /** Emitted with the check index when its Fix button is clicked. */
39
+ fix: EventEmitter<number>;
40
+ /** The default status line, mirroring the React summary(). */
41
+ summary(): string;
42
+ /** Checks that have a result, for the progress bar's aria-valuenow. */
43
+ done(): number;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<LaunchChecklistComponent, never>;
45
+ static ɵcmp: i0.ɵɵComponentDeclaration<LaunchChecklistComponent, "vo-launch-checklist", never, { "title": { "alias": "title"; "required": false; }; "checks": { "alias": "checks"; "required": false; }; "status": { "alias": "status"; "required": false; }; "action": { "alias": "action"; "required": false; }; "bare": { "alias": "bare"; "required": false; }; }, { "run": "run"; "fix": "fix"; }, never, never, true, never>;
46
+ }
@@ -0,0 +1,89 @@
1
+ import { AfterViewInit, ChangeDetectorRef, EventEmitter, OnDestroy } from '@angular/core';
2
+ import { ReducedMotionService } from '../core/reduced-motion.service';
3
+ import * as i0 from "@angular/core";
4
+ /** One series of the chart. */
5
+ export interface LineChartSeries {
6
+ /** Names the series in `visible`. */
7
+ key: string;
8
+ /** The legend's label, like "This year". */
9
+ label: string;
10
+ /** One value per point, oldest first. */
11
+ values: number[];
12
+ /** Defaults to the chart palette: the accent for the first series, then violet, green and so on. */
13
+ color?: string;
14
+ }
15
+ /** Internal per-series render state. */
16
+ interface SeriesView {
17
+ series: LineChartSeries;
18
+ index: number;
19
+ d: string;
20
+ points: [number, number][];
21
+ color: string;
22
+ dash: string | null;
23
+ shown: boolean;
24
+ ptLeft: number;
25
+ ptTop: number;
26
+ }
27
+ export declare class LineChartComponent implements AfterViewInit, OnDestroy {
28
+ private readonly reduced;
29
+ private readonly cdr;
30
+ /** The name over the big number, like "Active editors". */
31
+ label: string;
32
+ /** The first series is the main one; the others are dashed, to compare against. */
33
+ series: LineChartSeries[];
34
+ /** One name per point, shown in the hover readout, like the months. */
35
+ points: string[];
36
+ /** Labels spread along the bottom. Defaults to every other point. */
37
+ axis?: string[];
38
+ /** The values at the bottom and top of the chart. Defaults to the data's range with a little room. */
39
+ range?: [number, number];
40
+ /** What the values count, like "editors" in "1,620 editors". */
41
+ unit?: string;
42
+ /** Ends the readout's comparison of the first two series, like "vs last year". */
43
+ compareLabel?: string;
44
+ /** Writes a value. Defaults to whole numbers like 1,620. */
45
+ format: (n: number) => string;
46
+ /** Keys of the series shown. Leave it out to let the legend toggle them. One always stays on. */
47
+ set visible(value: string[] | undefined);
48
+ defaultVisible?: string[];
49
+ visibleChange: EventEmitter<string[]>;
50
+ private chart;
51
+ readonly W = 320;
52
+ readonly H = 140;
53
+ readonly grid: number[];
54
+ ids: string;
55
+ views: SeriesView[];
56
+ drawOrder: SeriesView[];
57
+ ticks: string[];
58
+ areaD: string;
59
+ leadColor: string;
60
+ clip: number;
61
+ value: number;
62
+ at: boolean;
63
+ px: number;
64
+ ttLeft: number;
65
+ ttValue: string;
66
+ ttLabel: string;
67
+ private on;
68
+ private lo;
69
+ private hi;
70
+ private last;
71
+ private controlled;
72
+ private ready;
73
+ private timers;
74
+ private frames;
75
+ constructor(reduced: ReducedMotionService, cdr: ChangeDetectorRef);
76
+ private color;
77
+ private y;
78
+ ngAfterViewInit(): void;
79
+ private apply;
80
+ toggle(k: number): void;
81
+ move(e: PointerEvent): void;
82
+ leave(): void;
83
+ private tween;
84
+ private later;
85
+ ngOnDestroy(): void;
86
+ static ɵfac: i0.ɵɵFactoryDeclaration<LineChartComponent, never>;
87
+ static ɵcmp: i0.ɵɵComponentDeclaration<LineChartComponent, "vo-line-chart", never, { "label": { "alias": "label"; "required": true; }; "series": { "alias": "series"; "required": true; }; "points": { "alias": "points"; "required": true; }; "axis": { "alias": "axis"; "required": false; }; "range": { "alias": "range"; "required": false; }; "unit": { "alias": "unit"; "required": false; }; "compareLabel": { "alias": "compareLabel"; "required": false; }; "format": { "alias": "format"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "defaultVisible": { "alias": "defaultVisible"; "required": false; }; }, { "visibleChange": "visibleChange"; }, never, never, true, never>;
88
+ }
89
+ export {};
@@ -0,0 +1,110 @@
1
+ import { EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
2
+ import { ReducedMotionService } from '../core/reduced-motion.service';
3
+ import * as i0 from "@angular/core";
4
+ /** A source the answer can cite. */
5
+ export interface AnswerSource {
6
+ /** The number its citations use: [1] in the text cites source 1. */
7
+ n: number;
8
+ /** Like "Funnel data". */
9
+ title: string;
10
+ /** Where it came from, shown in the list, like "Amplitude, last 30 days". */
11
+ detail?: string;
12
+ /** Shown when you hover a citation. Defaults to the title and detail. */
13
+ tip?: string;
14
+ /** The letter on its badge. Defaults to the title's first letter. */
15
+ mark?: string;
16
+ /** Badge colour, any CSS colour. */
17
+ color?: string;
18
+ }
19
+ /** waiting shows nothing yet, thinking shows the Thinking line, answering streams the text, done adds sources and actions. */
20
+ export type AnswerState = 'waiting' | 'thinking' | 'answering' | 'done';
21
+ /** One question-and-answer turn in the thread. */
22
+ export interface AnswerTurn {
23
+ /** Keeps each turn in place when turns are added. Defaults to its index. */
24
+ key?: string | number;
25
+ /** What the person asked, shown as a bubble above the answer. Leave it out when the bubble is shown elsewhere, like in a chat. */
26
+ question?: string;
27
+ /** waiting shows nothing yet, thinking shows the Thinking line, answering streams the text, done adds sources and actions. */
28
+ state: AnswerState;
29
+ /** The answer so far. Each new word fades in as it arrives. [1] after a word cites source 1, a blank line starts a new paragraph. */
30
+ text?: string;
31
+ /** What the agent did before it answered, listed under a toggle that counts them, like "3 steps · 2s". */
32
+ thoughts?: string[];
33
+ /** Seconds it thought for. Leave it out to count while thinking. */
34
+ thoughtFor?: number;
35
+ sources?: AnswerSource[];
36
+ }
37
+ /** A rating given with the thumbs up/down buttons. */
38
+ export type AnswerRating = 'good' | 'bad' | null;
39
+ /** A word with any [n] citations that hung on it. */
40
+ interface Cite {
41
+ n: number;
42
+ rest: string;
43
+ }
44
+ interface Word {
45
+ text: string;
46
+ cites: Cite[];
47
+ }
48
+ /** A paragraph as its words, plus whether its last word carries a citation. */
49
+ type Paragraph = Word[];
50
+ /** The per-turn interactive state kept by the component. */
51
+ interface TurnView {
52
+ turn: AnswerTurn;
53
+ index: number;
54
+ /** Bumped whenever the turn goes back from done to answering, so it starts afresh. */
55
+ round: number;
56
+ seenState: AnswerState;
57
+ thoughtsOpen: boolean;
58
+ listOpen: boolean;
59
+ hover: number | null;
60
+ pin: number | null;
61
+ rating: AnswerRating;
62
+ copied: boolean;
63
+ counted: number;
64
+ }
65
+ export declare class LiveAnswerComponent implements OnChanges, OnDestroy {
66
+ private readonly reduced;
67
+ turns: AnswerTurn[];
68
+ /** Suggested next questions, shown under the last answer once it is done. */
69
+ followUps?: string[];
70
+ /** Adds a Try again button under each answer; emit is via the `retry` output. */
71
+ retryable: boolean;
72
+ className: string;
73
+ followUp: EventEmitter<string>;
74
+ retry: EventEmitter<number>;
75
+ rateChange: EventEmitter<{
76
+ index: number;
77
+ rating: AnswerRating;
78
+ }>;
79
+ /** Called after an answer is copied, with its text without the citations. */
80
+ copyText: EventEmitter<{
81
+ index: number;
82
+ text: string;
83
+ }>;
84
+ /** Called when a source in the list is clicked, besides pinning it. */
85
+ sourceClick: EventEmitter<AnswerSource>;
86
+ /** Whether a Try again button is shown. */
87
+ get retryOn(): boolean;
88
+ /** The per-turn interactive state, rebuilt from the turns input. */
89
+ views: TurnView[];
90
+ private tick?;
91
+ constructor(reduced: ReducedMotionService);
92
+ get lastIndex(): number;
93
+ ngOnChanges(changes: SimpleChanges): void;
94
+ /** Keeps each turn's view state across input changes, restarting one that goes back from done to answering. */
95
+ private sync;
96
+ private fresh;
97
+ active(v: TurnView): number | null;
98
+ max1(n: number): number;
99
+ paragraphs(turn: AnswerTurn): Paragraph[];
100
+ sourcesOf(turn: AnswerTurn): AnswerSource[];
101
+ tipOf(turn: AnswerTurn, n: number): string;
102
+ pick(v: TurnView, n: number): void;
103
+ rate(v: TurnView, r: 'good' | 'bad'): void;
104
+ copy(v: TurnView): void;
105
+ private startCounter;
106
+ ngOnDestroy(): void;
107
+ static ɵfac: i0.ɵɵFactoryDeclaration<LiveAnswerComponent, never>;
108
+ static ɵcmp: i0.ɵɵComponentDeclaration<LiveAnswerComponent, "vo-live-answer", never, { "turns": { "alias": "turns"; "required": false; }; "followUps": { "alias": "followUps"; "required": false; }; "retryable": { "alias": "retryable"; "required": false; }; "className": { "alias": "className"; "required": false; }; }, { "followUp": "followUp"; "retry": "retry"; "rateChange": "rateChange"; "copyText": "copyText"; "sourceClick": "sourceClick"; }, never, never, true, never>;
109
+ }
110
+ export {};
@@ -0,0 +1,110 @@
1
+ import { AfterViewInit, ChangeDetectorRef, EventEmitter, OnDestroy } from '@angular/core';
2
+ import { ReducedMotionService } from '../core/reduced-motion.service';
3
+ import * as i0 from "@angular/core";
4
+ /** One range of the metric, like the last 30 days. */
5
+ export interface MetricRange {
6
+ /** Identifies the range, like '30'. */
7
+ key: string;
8
+ /** The switch label, like "30d". */
9
+ label: string;
10
+ /** The values over the range, oldest first. */
11
+ points: number[];
12
+ /** The number in large type, which rolls to it. */
13
+ value: number;
14
+ /** The change over the range, in the tag beside it. */
15
+ change: number;
16
+ /** One line on what happened, like "Jumped after the pricing page update on Sep 18." */
17
+ insight: string;
18
+ /** A marker on the chart, like a release: `at` is 0 to 1 across, `label` shows on hover. */
19
+ marker?: {
20
+ at: number;
21
+ label: string;
22
+ };
23
+ }
24
+ /** One contributor to the change, shown under "Why did it move?". */
25
+ export interface MetricDriver {
26
+ label: string;
27
+ /** Its share of the change, 0 to 100. */
28
+ percent: number;
29
+ /** Any CSS colour, like 'var(--vo-accent)'. Defaults to the accent. */
30
+ color?: string;
31
+ }
32
+ export declare class MetricInsightComponent implements AfterViewInit, OnDestroy {
33
+ private readonly reduced;
34
+ private readonly cdr;
35
+ /** The metric's name, like "Trial to paid". */
36
+ label: string;
37
+ /** The ranges to switch between. */
38
+ ranges: MetricRange[];
39
+ /** The range on show, by key. Leave it out to let the switch pick it. */
40
+ set range(value: string | undefined);
41
+ defaultRange?: string;
42
+ /** Formats the large number and the hovered point. Defaults to one decimal and a %. */
43
+ format: (value: number) => string;
44
+ /** Formats the change. Defaults to "+8.1 pts". */
45
+ formatChange: (change: number) => string;
46
+ /** What moved the number, shown under "Why did it move?". Leave it out to hide the button. */
47
+ drivers?: MetricDriver[];
48
+ /** Shows "Looking into it" on the button and keeps the breakdown shut, while you fetch the drivers. */
49
+ explaining: boolean;
50
+ /** Whether the breakdown is open. Leave it out to let the button toggle it. */
51
+ set open(value: boolean | undefined);
52
+ defaultOpen: boolean;
53
+ rangeChange: EventEmitter<string>;
54
+ openChange: EventEmitter<boolean>;
55
+ private chartEl;
56
+ private segEl;
57
+ readonly W = 300;
58
+ readonly H = 90;
59
+ ids: string;
60
+ current: string;
61
+ value: number;
62
+ change: number;
63
+ rangeChangeValue: number;
64
+ lineD: string;
65
+ areaD: string;
66
+ dash: string | null;
67
+ len: number;
68
+ drawn: boolean;
69
+ hover: {
70
+ x: number;
71
+ y: number;
72
+ px: number;
73
+ py: number;
74
+ v: number;
75
+ } | null;
76
+ knobLeft: number;
77
+ knobWidth: number;
78
+ shownInsight: string;
79
+ insightOut: boolean;
80
+ whyLabel: string;
81
+ whyOut: boolean;
82
+ private isOpen;
83
+ private rangeControlled;
84
+ private openControlled;
85
+ private ready;
86
+ private pts;
87
+ private timers;
88
+ private frames;
89
+ constructor(reduced: ReducedMotionService, cdr: ChangeDetectorRef);
90
+ /** The change of the range on show, used to tint the tag green or red.
91
+ * Named `rangeDelta` to avoid colliding with the `rangeChange` output. */
92
+ get rangeDelta(): number;
93
+ get currentRange(): MetricRange | undefined;
94
+ /** The breakdown is on screen only when open, not explaining, and there are drivers. */
95
+ get shown(): boolean;
96
+ ngAfterViewInit(): void;
97
+ select(key: string): void;
98
+ toggle(): void;
99
+ private labelFor;
100
+ private swapWhy;
101
+ private placeKnob;
102
+ private draw;
103
+ private swapInsight;
104
+ move(e: PointerEvent): void;
105
+ private tween;
106
+ private later;
107
+ ngOnDestroy(): void;
108
+ static ɵfac: i0.ɵɵFactoryDeclaration<MetricInsightComponent, never>;
109
+ static ɵcmp: i0.ɵɵComponentDeclaration<MetricInsightComponent, "vo-metric-insight", never, { "label": { "alias": "label"; "required": true; }; "ranges": { "alias": "ranges"; "required": true; }; "range": { "alias": "range"; "required": false; }; "defaultRange": { "alias": "defaultRange"; "required": false; }; "format": { "alias": "format"; "required": false; }; "formatChange": { "alias": "formatChange"; "required": false; }; "drivers": { "alias": "drivers"; "required": false; }; "explaining": { "alias": "explaining"; "required": false; }; "open": { "alias": "open"; "required": false; }; "defaultOpen": { "alias": "defaultOpen"; "required": false; }; }, { "rangeChange": "rangeChange"; "openChange": "openChange"; }, never, never, true, never>;
110
+ }
@@ -0,0 +1,37 @@
1
+ import { ElementRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
2
+ import { ReducedMotionService } from '../core/reduced-motion.service';
3
+ import * as i0 from "@angular/core";
4
+ /** A centred dialog over a dimmed backdrop. */
5
+ export declare class ModalComponent implements OnChanges, OnDestroy {
6
+ readonly reduced: ReducedMotionService;
7
+ /** Whether the modal is on screen. */
8
+ open: boolean;
9
+ /** How wide the panel may grow. */
10
+ size: 'sm' | 'md' | 'lg';
11
+ /** Hide the corner close button (Escape and the backdrop still close it). */
12
+ hideClose: boolean;
13
+ /** Keep the modal open when the backdrop is clicked. */
14
+ disableBackdropClose: boolean;
15
+ /** For screen readers when there is no projected title. */
16
+ ariaLabel?: string;
17
+ /** Whether a title was projected (set by the host, defaults to true for the header). */
18
+ hasTitle: boolean;
19
+ /** Whether a footer was projected. */
20
+ hasFooter: boolean;
21
+ className: string;
22
+ /** Called when the person asks to close it. */
23
+ close: EventEmitter<void>;
24
+ panel?: ElementRef<HTMLElement>;
25
+ private returnTo;
26
+ private prevOverflow;
27
+ private locked;
28
+ onEscape(e: KeyboardEvent): void;
29
+ ngOnChanges(changes: SimpleChanges): void;
30
+ private lock;
31
+ private unlock;
32
+ onBackdrop(e: MouseEvent): void;
33
+ onKeyDown(e: KeyboardEvent): void;
34
+ ngOnDestroy(): void;
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalComponent, never>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent, "vo-modal", never, { "open": { "alias": "open"; "required": false; }; "size": { "alias": "size"; "required": false; }; "hideClose": { "alias": "hideClose"; "required": false; }; "disableBackdropClose": { "alias": "disableBackdropClose"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "hasTitle": { "alias": "hasTitle"; "required": false; }; "hasFooter": { "alias": "hasFooter"; "required": false; }; "className": { "alias": "className"; "required": false; }; }, { "close": "close"; }, never, ["[vo-modal-title]", "[vo-modal-subtitle]", "*", "[vo-modal-footer]"], true, never>;
37
+ }
@@ -0,0 +1,97 @@
1
+ import { AfterViewInit, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ /** One model in the list. */
4
+ export interface ModelOption {
5
+ id: string;
6
+ /** Like "Sonnet 5.5". */
7
+ name: string;
8
+ /** The letter in its coloured tile. Defaults to the first letter of the name. */
9
+ mark?: string;
10
+ /** The tile's colour, like "var(--vo-c1)". */
11
+ color?: string;
12
+ /** The letter colour that reads on the tile, like "var(--vo-on-accent)". */
13
+ markText?: string;
14
+ /** The quiet line under the name, like "Balanced, the default for design work". */
15
+ note?: string;
16
+ /** Speed, quality and cost, each from 1 to 5. For cost, 5 is the most expensive. */
17
+ speed: number;
18
+ quality: number;
19
+ cost: number;
20
+ /** What each meter shows on hover, like "74 tokens a second". */
21
+ speedDetail?: string;
22
+ qualityDetail?: string;
23
+ costDetail?: string;
24
+ /** checking spins beside the name; busy turns the row amber. Both replace the note with statusText. */
25
+ status?: 'ready' | 'checking' | 'busy';
26
+ /** Like "At capacity, about 20s wait". */
27
+ statusText?: string;
28
+ }
29
+ /** A thinking effort: its label, and the line shown under "Thinking" when it is picked. */
30
+ export interface ThinkingEffort {
31
+ label: string;
32
+ detail?: string;
33
+ }
34
+ /** One button in the suggestion notice. The last one is filled. */
35
+ export interface SuggestionAction {
36
+ label: string;
37
+ onClick: () => void;
38
+ }
39
+ /** A way out when the picked model can't take the request: a short text and its buttons. */
40
+ export interface Suggestion {
41
+ text: string;
42
+ actions: SuggestionAction[];
43
+ }
44
+ /** Choose the model for a chat by speed, quality and cost, and how hard it thinks. */
45
+ export declare class ModelPickerComponent implements OnChanges, AfterViewInit, OnDestroy {
46
+ /** The models to choose from. */
47
+ models: ModelOption[];
48
+ /** The picked model's id. Leave it out to let the list hold its own. */
49
+ value?: string;
50
+ defaultValue?: string;
51
+ /** The thinking efforts. Defaults to Off, Low, Medium and High. */
52
+ efforts: ThinkingEffort[];
53
+ effort?: string;
54
+ defaultEffort?: string;
55
+ /** A way out when the picked model can't take the request. */
56
+ suggestion: Suggestion | null;
57
+ /** The confirmation under the picker, shown with a green check. */
58
+ note: string;
59
+ /** The label beside the trigger. Defaults to "Model for this chat". */
60
+ label: string;
61
+ /** Whether the list is open. Leave it out to let the trigger and Escape open and close it. */
62
+ open?: boolean;
63
+ defaultOpen: boolean;
64
+ /** Emitted when a row is picked, busy or not, so you can check the model first. */
65
+ valueChange: EventEmitter<string>;
66
+ effortChange: EventEmitter<string>;
67
+ openChange: EventEmitter<boolean>;
68
+ private trigger;
69
+ private effBtn;
70
+ private pop;
71
+ private readonly motion;
72
+ /** The five meter steps. */
73
+ readonly bars: number[];
74
+ private curId;
75
+ private effLabel;
76
+ private openState;
77
+ effOpen: boolean;
78
+ private closeTimer?;
79
+ ngOnChanges(changes: SimpleChanges): void;
80
+ ngAfterViewInit(): void;
81
+ ngOnDestroy(): void;
82
+ get picked(): ModelOption | undefined;
83
+ get eff(): string;
84
+ get isOpen(): boolean;
85
+ get effortDetail(): string;
86
+ rowNote(m: ModelOption): string;
87
+ pick(i: number): void;
88
+ chooseEffort(label: string): void;
89
+ toggleOpen(): void;
90
+ private setOpen;
91
+ toggleEff(): void;
92
+ private closeEffSoon;
93
+ onKeydown(e: KeyboardEvent): void;
94
+ private readonly onOutside;
95
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModelPickerComponent, never>;
96
+ static ɵcmp: i0.ɵɵComponentDeclaration<ModelPickerComponent, "vo-model-picker", never, { "models": { "alias": "models"; "required": false; }; "value": { "alias": "value"; "required": false; }; "defaultValue": { "alias": "defaultValue"; "required": false; }; "efforts": { "alias": "efforts"; "required": false; }; "effort": { "alias": "effort"; "required": false; }; "defaultEffort": { "alias": "defaultEffort"; "required": false; }; "suggestion": { "alias": "suggestion"; "required": false; }; "note": { "alias": "note"; "required": false; }; "label": { "alias": "label"; "required": false; }; "open": { "alias": "open"; "required": false; }; "defaultOpen": { "alias": "defaultOpen"; "required": false; }; }, { "valueChange": "valueChange"; "effortChange": "effortChange"; "openChange": "openChange"; }, never, never, true, never>;
97
+ }
package/package.json CHANGED
@@ -1,6 +1,53 @@
1
1
  {
2
2
  "name": "@visuno/angular",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "Visuno UI components for Angular — one design across Vanilla, React, Angular and Flutter, driven by shared design tokens.",
5
+ "license": "MIT",
6
+ "homepage": "https://visuno.dev",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/Visuno/components.git",
10
+ "directory": "angular"
11
+ },
12
+ "bugs": "https://github.com/Visuno/components/issues",
13
+ "keywords": [
14
+ "ui",
15
+ "components",
16
+ "angular",
17
+ "design-system",
18
+ "ai"
19
+ ],
20
+ "peerDependencies": {
21
+ "@angular/common": ">=18.0.0",
22
+ "@angular/core": ">=18.0.0"
23
+ },
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "allowScripts": {
28
+ "esbuild@0.23.1": true
29
+ },
30
+ "module": "fesm2022/visuno-angular.mjs",
31
+ "typings": "index.d.ts",
32
+ "exports": {
33
+ "./package.json": {
34
+ "default": "./package.json"
35
+ },
36
+ ".": {
37
+ "types": "./index.d.ts",
38
+ "esm2022": "./esm2022/visuno-angular.mjs",
39
+ "esm": "./esm2022/visuno-angular.mjs",
40
+ "default": "./fesm2022/visuno-angular.mjs"
41
+ },
42
+ "./styles.css": {
43
+ "default": "./styles.css"
44
+ },
45
+ "./tokens.css": {
46
+ "default": "./tokens.css"
47
+ }
48
+ },
49
+ "sideEffects": false,
50
+ "dependencies": {
51
+ "tslib": "^2.3.0"
52
+ }
53
+ }