@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.
Files changed (294) hide show
  1. package/esm2022/lib/accordion-item.component.mjs +5 -11
  2. package/esm2022/lib/accordion.component.mjs +4 -9
  3. package/esm2022/lib/alert-dialog-dynamic.component.mjs +12 -12
  4. package/esm2022/lib/alert-dialog.component.mjs +82 -64
  5. package/esm2022/lib/alert-dialog.service.mjs +38 -6
  6. package/esm2022/lib/alert.component.mjs +5 -11
  7. package/esm2022/lib/aspect-ratio.component.mjs +119 -0
  8. package/esm2022/lib/attachment.component.mjs +334 -0
  9. package/esm2022/lib/avatar-fallback.component.mjs +3 -3
  10. package/esm2022/lib/avatar.component.mjs +4 -9
  11. package/esm2022/lib/badge.component.mjs +4 -9
  12. package/esm2022/lib/breadcrumb-item.component.mjs +3 -3
  13. package/esm2022/lib/breadcrumb-link.component.mjs +3 -3
  14. package/esm2022/lib/breadcrumb-separator.component.mjs +3 -3
  15. package/esm2022/lib/breadcrumb.component.mjs +3 -3
  16. package/esm2022/lib/bubble.component.mjs +301 -0
  17. package/esm2022/lib/button.component.mjs +5 -11
  18. package/esm2022/lib/calendar.component.mjs +5 -11
  19. package/esm2022/lib/card.component.mjs +14 -43
  20. package/esm2022/lib/carousel/carousel.component.mjs +5 -12
  21. package/esm2022/lib/chain-of-thought.component.mjs +380 -0
  22. package/esm2022/lib/chart-pie.component.mjs +386 -0
  23. package/esm2022/lib/chart.component.mjs +1146 -0
  24. package/esm2022/lib/chart.service.mjs +555 -0
  25. package/esm2022/lib/checkbox.component.mjs +5 -11
  26. package/esm2022/lib/checkpoint.component.mjs +134 -0
  27. package/esm2022/lib/collapsible.component.mjs +4 -11
  28. package/esm2022/lib/combobox.component.mjs +372 -0
  29. package/esm2022/lib/command-dialog.component.mjs +164 -0
  30. package/esm2022/lib/command.component.mjs +514 -0
  31. package/esm2022/lib/command.service.mjs +130 -0
  32. package/esm2022/lib/confirmation.component.mjs +219 -0
  33. package/esm2022/lib/context-menu-trigger.directive.mjs +36 -0
  34. package/esm2022/lib/context-menu.component.mjs +460 -0
  35. package/esm2022/lib/context-menu.service.mjs +125 -0
  36. package/esm2022/lib/context.component.mjs +377 -0
  37. package/esm2022/lib/conversation.component.mjs +442 -0
  38. package/esm2022/lib/country-selector.component.mjs +5 -11
  39. package/esm2022/lib/data-table.component.mjs +59 -12
  40. package/esm2022/lib/date-picker.component.mjs +251 -198
  41. package/esm2022/lib/date-range-picker.component.mjs +224 -116
  42. package/esm2022/lib/date-time-picker.component.mjs +506 -0
  43. package/esm2022/lib/direction.component.mjs +79 -0
  44. package/esm2022/lib/dropdown-item.component.mjs +3 -3
  45. package/esm2022/lib/dropdown-label.component.mjs +3 -3
  46. package/esm2022/lib/dropdown-menu.component.mjs +3 -3
  47. package/esm2022/lib/dropdown-separator.component.mjs +3 -3
  48. package/esm2022/lib/dropdown-trigger.directive.mjs +6 -4
  49. package/esm2022/lib/empty-state.component.mjs +4 -9
  50. package/esm2022/lib/field.component.mjs +394 -0
  51. package/esm2022/lib/hover-card.component.mjs +6 -16
  52. package/esm2022/lib/inline-citation.component.mjs +263 -0
  53. package/esm2022/lib/input-group.component.mjs +418 -0
  54. package/esm2022/lib/input.component.mjs +5 -11
  55. package/esm2022/lib/item.component.mjs +243 -0
  56. package/esm2022/lib/kbd.component.mjs +82 -0
  57. package/esm2022/lib/label.component.mjs +4 -9
  58. package/esm2022/lib/marker.component.mjs +135 -0
  59. package/esm2022/lib/masked-input.component.mjs +5 -11
  60. package/esm2022/lib/menubar.component.mjs +683 -0
  61. package/esm2022/lib/message-scroller.component.mjs +353 -0
  62. package/esm2022/lib/message-scroller.service.mjs +157 -0
  63. package/esm2022/lib/message.component.mjs +228 -0
  64. package/esm2022/lib/modal-ref.mjs +36 -7
  65. package/esm2022/lib/modal.component.mjs +42 -28
  66. package/esm2022/lib/modal.mjs +2 -29
  67. package/esm2022/lib/modal.service.mjs +26 -4
  68. package/esm2022/lib/model-selector.component.mjs +310 -0
  69. package/esm2022/lib/multi-select.component.mjs +155 -72
  70. package/esm2022/lib/native-select.component.mjs +201 -0
  71. package/esm2022/lib/navigation-menu.component.mjs +642 -0
  72. package/esm2022/lib/otp-group.component.mjs +3 -3
  73. package/esm2022/lib/otp-slot.component.mjs +4 -9
  74. package/esm2022/lib/otp.component.mjs +5 -11
  75. package/esm2022/lib/pagination.component.mjs +7 -10
  76. package/esm2022/lib/plan.component.mjs +335 -0
  77. package/esm2022/lib/popover-content.component.mjs +4 -9
  78. package/esm2022/lib/popover.component.mjs +15 -13
  79. package/esm2022/lib/progress.component.mjs +4 -9
  80. package/esm2022/lib/prompt-input.component.mjs +526 -0
  81. package/esm2022/lib/queue.component.mjs +280 -0
  82. package/esm2022/lib/radio-group.component.mjs +6 -13
  83. package/esm2022/lib/radio-item.component.mjs +4 -9
  84. package/esm2022/lib/range-calendar.component.mjs +5 -11
  85. package/esm2022/lib/reasoning.component.mjs +335 -0
  86. package/esm2022/lib/resizable-panel.component.mjs +5 -5
  87. package/esm2022/lib/resizable.component.mjs +219 -0
  88. package/esm2022/lib/segment.component.mjs +19 -9
  89. package/esm2022/lib/select-group.component.mjs +4 -8
  90. package/esm2022/lib/select-item.component.mjs +4 -9
  91. package/esm2022/lib/select-separator.component.mjs +4 -8
  92. package/esm2022/lib/select.component.mjs +133 -49
  93. package/esm2022/lib/separator.component.mjs +4 -9
  94. package/esm2022/lib/sheet.component.mjs +38 -56
  95. package/esm2022/lib/shimmer.component.mjs +84 -0
  96. package/esm2022/lib/sidebar.component.mjs +11 -1
  97. package/esm2022/lib/skeleton.component.mjs +4 -9
  98. package/esm2022/lib/sources.component.mjs +452 -0
  99. package/esm2022/lib/spinner.component.mjs +68 -0
  100. package/esm2022/lib/suggestion.component.mjs +207 -0
  101. package/esm2022/lib/switch.component.mjs +5 -11
  102. package/esm2022/lib/table.component.mjs +213 -0
  103. package/esm2022/lib/tabs.component.mjs +4 -11
  104. package/esm2022/lib/tag-input.component.mjs +5 -11
  105. package/esm2022/lib/task.component.mjs +359 -0
  106. package/esm2022/lib/textarea.component.mjs +5 -11
  107. package/esm2022/lib/theme.service.mjs +17 -6
  108. package/esm2022/lib/time-picker.component.mjs +923 -0
  109. package/esm2022/lib/toast.service.mjs +3 -2
  110. package/esm2022/lib/toaster.component.mjs +76 -39
  111. package/esm2022/lib/toggle-group.component.mjs +4 -9
  112. package/esm2022/lib/toggle.component.mjs +5 -11
  113. package/esm2022/lib/tool.component.mjs +462 -0
  114. package/esm2022/lib/typography.component.mjs +83 -0
  115. package/esm2022/lib/utils/color.mjs +140 -19
  116. package/esm2022/public-api.mjs +61 -1
  117. package/fesm2022/tolle-ui.mjs +16642 -1105
  118. package/fesm2022/tolle-ui.mjs.map +1 -1
  119. package/lib/alert-dialog-dynamic.component.d.ts +5 -0
  120. package/lib/alert-dialog.component.d.ts +23 -2
  121. package/lib/aspect-ratio.component.d.ts +20 -0
  122. package/lib/attachment.component.d.ts +101 -0
  123. package/lib/bubble.component.d.ts +112 -0
  124. package/lib/chain-of-thought.component.d.ts +166 -0
  125. package/lib/chart-pie.component.d.ts +108 -0
  126. package/lib/chart.component.d.ts +369 -0
  127. package/lib/chart.service.d.ts +222 -0
  128. package/lib/checkpoint.component.d.ts +51 -0
  129. package/lib/combobox.component.d.ts +90 -0
  130. package/lib/command-dialog.component.d.ts +53 -0
  131. package/lib/command.component.d.ts +189 -0
  132. package/lib/command.service.d.ts +67 -0
  133. package/lib/confirmation.component.d.ts +70 -0
  134. package/lib/context-menu-trigger.directive.d.ts +12 -0
  135. package/lib/context-menu.component.d.ts +41 -0
  136. package/lib/context-menu.service.d.ts +38 -0
  137. package/lib/context.component.d.ts +134 -0
  138. package/lib/conversation.component.d.ts +165 -0
  139. package/lib/data-table.component.d.ts +26 -1
  140. package/lib/date-picker.component.d.ts +72 -11
  141. package/lib/date-range-picker.component.d.ts +63 -6
  142. package/lib/date-time-picker.component.d.ts +119 -0
  143. package/lib/direction.component.d.ts +45 -0
  144. package/lib/field.component.d.ts +201 -0
  145. package/lib/inline-citation.component.d.ts +103 -0
  146. package/lib/input-group.component.d.ts +150 -0
  147. package/lib/item.component.d.ts +154 -0
  148. package/lib/kbd.component.d.ts +50 -0
  149. package/lib/marker.component.d.ts +58 -0
  150. package/lib/menubar.component.d.ts +247 -0
  151. package/lib/message-scroller.component.d.ts +159 -0
  152. package/lib/message-scroller.service.d.ts +73 -0
  153. package/lib/message.component.d.ts +128 -0
  154. package/lib/modal-ref.d.ts +6 -1
  155. package/lib/modal.component.d.ts +7 -4
  156. package/lib/modal.d.ts +9 -3
  157. package/lib/model-selector.component.d.ts +103 -0
  158. package/lib/multi-select.component.d.ts +66 -14
  159. package/lib/native-select.component.d.ts +57 -0
  160. package/lib/navigation-menu.component.d.ts +230 -0
  161. package/lib/plan.component.d.ts +120 -0
  162. package/lib/popover.component.d.ts +1 -0
  163. package/lib/prompt-input.component.d.ts +194 -0
  164. package/lib/queue.component.d.ts +106 -0
  165. package/lib/reasoning.component.d.ts +127 -0
  166. package/lib/resizable.component.d.ts +43 -0
  167. package/lib/segment.component.d.ts +13 -3
  168. package/lib/select.component.d.ts +37 -5
  169. package/lib/sheet.component.d.ts +3 -0
  170. package/lib/shimmer.component.d.ts +38 -0
  171. package/lib/sidebar.component.d.ts +2 -0
  172. package/lib/sources.component.d.ts +156 -0
  173. package/lib/spinner.component.d.ts +29 -0
  174. package/lib/suggestion.component.d.ts +96 -0
  175. package/lib/table.component.d.ts +106 -0
  176. package/lib/task.component.d.ts +151 -0
  177. package/lib/theme.service.d.ts +9 -0
  178. package/lib/time-picker.component.d.ts +243 -0
  179. package/lib/toast.service.d.ts +3 -1
  180. package/lib/toaster.component.d.ts +26 -9
  181. package/lib/tool.component.d.ts +158 -0
  182. package/lib/typography.component.d.ts +32 -0
  183. package/lib/utils/color.d.ts +19 -5
  184. package/package.json +3 -2
  185. package/preset.js +7 -1
  186. package/public-api.d.ts +50 -0
  187. package/registry/docs-content.json +8480 -1542
  188. package/registry/llms-full.txt +2679 -319
  189. package/registry/llms.txt +43 -4
  190. package/registry/manifest.json +9090 -1742
  191. package/registry/r/accordion-item.json +1 -1
  192. package/registry/r/accordion.json +1 -1
  193. package/registry/r/alert-dialog-dynamic.json +1 -1
  194. package/registry/r/alert-dialog.json +1 -1
  195. package/registry/r/alert.json +1 -1
  196. package/registry/r/attachment.json +23 -0
  197. package/registry/r/avatar-fallback.json +1 -1
  198. package/registry/r/avatar.json +1 -1
  199. package/registry/r/badge.json +1 -1
  200. package/registry/r/breadcrumb-item.json +1 -1
  201. package/registry/r/breadcrumb-link.json +1 -1
  202. package/registry/r/breadcrumb-separator.json +1 -1
  203. package/registry/r/breadcrumb.json +1 -1
  204. package/registry/r/bubble.json +23 -0
  205. package/registry/r/button.json +1 -1
  206. package/registry/r/calendar.json +1 -1
  207. package/registry/r/card.json +1 -1
  208. package/registry/r/carousel.json +1 -1
  209. package/registry/r/chain-of-thought.json +23 -0
  210. package/registry/r/chart-pie.json +30 -0
  211. package/registry/r/chart.json +28 -0
  212. package/registry/r/checkbox.json +1 -1
  213. package/registry/r/checkpoint.json +23 -0
  214. package/registry/r/collapsible.json +1 -1
  215. package/registry/r/combobox.json +31 -0
  216. package/registry/r/command-dialog.json +21 -0
  217. package/registry/r/command.json +26 -0
  218. package/registry/r/confirmation.json +23 -0
  219. package/registry/r/context-menu-trigger.json +1 -1
  220. package/registry/r/context-menu.json +1 -1
  221. package/registry/r/context.json +26 -0
  222. package/registry/r/conversation.json +23 -0
  223. package/registry/r/country-selector.json +1 -1
  224. package/registry/r/data-table.json +1 -1
  225. package/registry/r/date-picker.json +4 -4
  226. package/registry/r/date-range-picker.json +3 -3
  227. package/registry/r/date-time-picker.json +28 -0
  228. package/registry/r/direction.json +16 -0
  229. package/registry/r/dropdown-item.json +1 -1
  230. package/registry/r/dropdown-label.json +1 -1
  231. package/registry/r/dropdown-menu.json +1 -1
  232. package/registry/r/dropdown-separator.json +1 -1
  233. package/registry/r/dropdown-trigger.json +1 -1
  234. package/registry/r/empty-state.json +1 -1
  235. package/registry/r/field.json +23 -0
  236. package/registry/r/hover-card.json +1 -1
  237. package/registry/r/inline-citation.json +26 -0
  238. package/registry/r/input-group.json +23 -0
  239. package/registry/r/input.json +1 -1
  240. package/registry/r/item.json +23 -0
  241. package/registry/r/kbd.json +23 -0
  242. package/registry/r/label.json +1 -1
  243. package/registry/r/marker.json +23 -0
  244. package/registry/r/masked-input.json +1 -1
  245. package/registry/r/menubar.json +24 -0
  246. package/registry/r/message-scroller.json +26 -0
  247. package/registry/r/message.json +23 -0
  248. package/registry/r/modal.json +3 -3
  249. package/registry/r/model-selector.json +32 -0
  250. package/registry/r/multi-select.json +2 -2
  251. package/registry/r/native-select.json +23 -0
  252. package/registry/r/navigation-menu.json +24 -0
  253. package/registry/r/otp-group.json +1 -1
  254. package/registry/r/otp-slot.json +1 -1
  255. package/registry/r/otp.json +1 -1
  256. package/registry/r/pagination.json +3 -2
  257. package/registry/r/plan.json +23 -0
  258. package/registry/r/popover-content.json +1 -1
  259. package/registry/r/popover.json +1 -1
  260. package/registry/r/progress.json +1 -1
  261. package/registry/r/prompt-input.json +23 -0
  262. package/registry/r/queue.json +23 -0
  263. package/registry/r/radio-group.json +1 -1
  264. package/registry/r/radio-item.json +1 -1
  265. package/registry/r/range-calendar.json +1 -1
  266. package/registry/r/reasoning.json +23 -0
  267. package/registry/r/resizable-panel.json +1 -1
  268. package/registry/r/segment.json +1 -1
  269. package/registry/r/select-group.json +1 -1
  270. package/registry/r/select-item.json +1 -1
  271. package/registry/r/select-separator.json +1 -1
  272. package/registry/r/select.json +4 -3
  273. package/registry/r/separator.json +1 -1
  274. package/registry/r/sheet.json +1 -1
  275. package/registry/r/shimmer.json +23 -0
  276. package/registry/r/sidebar.json +1 -1
  277. package/registry/r/skeleton.json +1 -1
  278. package/registry/r/sources.json +23 -0
  279. package/registry/r/spinner.json +23 -0
  280. package/registry/r/suggestion.json +23 -0
  281. package/registry/r/switch.json +1 -1
  282. package/registry/r/table.json +21 -0
  283. package/registry/r/tabs.json +1 -1
  284. package/registry/r/tag-input.json +1 -1
  285. package/registry/r/task.json +23 -0
  286. package/registry/r/textarea.json +1 -1
  287. package/registry/r/time-picker.json +24 -0
  288. package/registry/r/toaster.json +2 -2
  289. package/registry/r/toggle-group.json +1 -1
  290. package/registry/r/toggle.json +1 -1
  291. package/registry/r/tool.json +23 -0
  292. package/registry/r/typography.json +23 -0
  293. package/registry/registry.json +915 -22
  294. package/theme.css +121 -8
@@ -0,0 +1,263 @@
1
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, inject } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { cva } from 'class-variance-authority';
4
+ import { cn } from './utils/cn';
5
+ import { HoverCardComponent, HoverCardTriggerComponent, HoverCardContentComponent, } from './hover-card.component';
6
+ import * as i0 from "@angular/core";
7
+ import * as i1 from "@angular/common";
8
+ const inlineCitationVariants = cva('cursor-pointer rounded-sm align-super font-medium leading-none transition-colors', {
9
+ variants: {
10
+ variant: {
11
+ default: 'text-primary hover:text-primary/80',
12
+ muted: 'text-muted-foreground hover:text-foreground',
13
+ subtle: 'text-foreground/60 hover:text-foreground',
14
+ },
15
+ size: {
16
+ sm: 'text-[9px]',
17
+ default: 'text-[10px]',
18
+ },
19
+ },
20
+ defaultVariants: { variant: 'default', size: 'default' },
21
+ });
22
+ /**
23
+ * A superscript citation marker for prose. Hovering the marker reveals the
24
+ * projected source card, positioned by the existing `tolle-hover-card`.
25
+ *
26
+ * ```html
27
+ * The model was released in March.<tolle-inline-citation [index]="1">
28
+ * <tolle-inline-citation-card
29
+ * title="Release notes"
30
+ * url="https://example.com/notes"
31
+ * snippet="Shipped on 14 March."
32
+ * ></tolle-inline-citation-card>
33
+ * </tolle-inline-citation>
34
+ * ```
35
+ * @new
36
+ */
37
+ export class InlineCitationComponent {
38
+ /**
39
+ * Angular writes a bound `class` input through its styling path, which does
40
+ * not mark an OnPush component dirty — without this hook the component keeps
41
+ * rendering the class it was born with.
42
+ */
43
+ ngOnChanges() {
44
+ this.cdr.markForCheck();
45
+ }
46
+ /** Number rendered in the superscript marker. @default 1 */
47
+ index = 1;
48
+ /** Colour treatment of the marker. @default 'default' */
49
+ variant = 'default';
50
+ /** Text size of the marker. @default 'default' */
51
+ size = 'default';
52
+ /** Side of the marker the source card opens on. @default 'top' */
53
+ placement = 'top';
54
+ /** Milliseconds to wait before opening the card. @default 150 */
55
+ openDelay = 150;
56
+ /** Milliseconds to wait before closing the card. @default 200 */
57
+ closeDelay = 200;
58
+ /** Accessible label for the marker; falls back to "Citation {index}". @default '' */
59
+ ariaLabel = '';
60
+ /** Extra Tailwind classes merged onto the marker via `cn()` (last-wins). */
61
+ class = '';
62
+ /** Extra Tailwind classes merged onto the hover card panel via `cn()` (last-wins). */
63
+ cardClass = '';
64
+ cdr = inject(ChangeDetectorRef);
65
+ refreshTimer;
66
+ get computedClass() {
67
+ return cn(inlineCitationVariants({ variant: this.variant, size: this.size }), this.class);
68
+ }
69
+ get contentClass() {
70
+ return cn('w-72 p-0', this.cardClass);
71
+ }
72
+ /**
73
+ * `tolle-hover-card` flips its own visibility from a `setTimeout`, which never
74
+ * marks this OnPush view dirty. Re-check just after the delay elapses so the
75
+ * card actually appears (and disappears) inside an OnPush host.
76
+ */
77
+ scheduleRefresh(delay) {
78
+ clearTimeout(this.refreshTimer);
79
+ this.refreshTimer = setTimeout(() => this.cdr.markForCheck(), delay + 32);
80
+ }
81
+ ngOnDestroy() {
82
+ clearTimeout(this.refreshTimer);
83
+ }
84
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InlineCitationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
85
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: InlineCitationComponent, isStandalone: true, selector: "tolle-inline-citation", inputs: { index: "index", variant: "variant", size: "size", placement: "placement", openDelay: "openDelay", closeDelay: "closeDelay", ariaLabel: "ariaLabel", class: "class", cardClass: "cardClass" }, usesOnChanges: true, ngImport: i0, template: `
86
+ <tolle-hover-card
87
+ [openDelay]="openDelay"
88
+ [closeDelay]="closeDelay"
89
+ [placement]="placement"
90
+ (mouseenter)="scheduleRefresh(openDelay)"
91
+ (mouseleave)="scheduleRefresh(closeDelay)"
92
+ >
93
+ <tolle-hover-card-trigger>
94
+ <sup
95
+ role="button"
96
+ tabindex="0"
97
+ [attr.aria-label]="ariaLabel || 'Citation ' + index"
98
+ [class]="computedClass"
99
+ >{{ index }}</sup
100
+ >
101
+ </tolle-hover-card-trigger>
102
+ <tolle-hover-card-content [class]="contentClass">
103
+ <ng-content></ng-content>
104
+ </tolle-hover-card-content>
105
+ </tolle-hover-card>
106
+ `, isInline: true, styles: [":host{display:inline-flex}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: HoverCardComponent, selector: "tolle-hover-card", inputs: ["openDelay", "closeDelay", "placement"] }, { kind: "component", type: HoverCardTriggerComponent, selector: "tolle-hover-card-trigger" }, { kind: "component", type: HoverCardContentComponent, selector: "tolle-hover-card-content", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
107
+ }
108
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InlineCitationComponent, decorators: [{
109
+ type: Component,
110
+ args: [{ selector: 'tolle-inline-citation', standalone: true, imports: [CommonModule, HoverCardComponent, HoverCardTriggerComponent, HoverCardContentComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: `
111
+ <tolle-hover-card
112
+ [openDelay]="openDelay"
113
+ [closeDelay]="closeDelay"
114
+ [placement]="placement"
115
+ (mouseenter)="scheduleRefresh(openDelay)"
116
+ (mouseleave)="scheduleRefresh(closeDelay)"
117
+ >
118
+ <tolle-hover-card-trigger>
119
+ <sup
120
+ role="button"
121
+ tabindex="0"
122
+ [attr.aria-label]="ariaLabel || 'Citation ' + index"
123
+ [class]="computedClass"
124
+ >{{ index }}</sup
125
+ >
126
+ </tolle-hover-card-trigger>
127
+ <tolle-hover-card-content [class]="contentClass">
128
+ <ng-content></ng-content>
129
+ </tolle-hover-card-content>
130
+ </tolle-hover-card>
131
+ `, styles: [":host{display:inline-flex}\n"] }]
132
+ }], propDecorators: { index: [{
133
+ type: Input
134
+ }], variant: [{
135
+ type: Input
136
+ }], size: [{
137
+ type: Input
138
+ }], placement: [{
139
+ type: Input
140
+ }], openDelay: [{
141
+ type: Input
142
+ }], closeDelay: [{
143
+ type: Input
144
+ }], ariaLabel: [{
145
+ type: Input
146
+ }], class: [{
147
+ type: Input
148
+ }], cardClass: [{
149
+ type: Input
150
+ }] } });
151
+ /** The source preview shown inside a citation's hover card. */
152
+ export class InlineCitationCardComponent {
153
+ cdr = inject(ChangeDetectorRef);
154
+ /**
155
+ * Angular writes a bound `class` input through its styling path, which does
156
+ * not mark an OnPush component dirty — without this hook the component keeps
157
+ * rendering the class it was born with.
158
+ */
159
+ ngOnChanges() {
160
+ this.cdr.markForCheck();
161
+ }
162
+ /** Title of the cited source. @default '' */
163
+ title = '';
164
+ /** Link to the cited source. @default '' */
165
+ url = '';
166
+ /** Short excerpt from the source. @default '' */
167
+ snippet = '';
168
+ /** Extra Tailwind classes merged onto the card via `cn()` (last-wins). */
169
+ class = '';
170
+ get computedClass() {
171
+ return cn('flex flex-col p-3', this.class);
172
+ }
173
+ /** The URL without its scheme, which reads better in a narrow card. */
174
+ get displayUrl() {
175
+ return this.url.replace(/^https?:\/\//, '');
176
+ }
177
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InlineCitationCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
178
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: InlineCitationCardComponent, isStandalone: true, selector: "tolle-inline-citation-card", inputs: { title: "title", url: "url", snippet: "snippet", class: "class" }, usesOnChanges: true, ngImport: i0, template: `
179
+ <div [class]="computedClass">
180
+ <p class="truncate text-sm font-medium text-popover-foreground">{{ title }}</p>
181
+ <a
182
+ *ngIf="url"
183
+ [href]="url"
184
+ target="_blank"
185
+ rel="noreferrer noopener"
186
+ class="mt-0.5 flex items-center gap-1 truncate text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline"
187
+ >
188
+ <i class="ri-external-link-line shrink-0" aria-hidden="true"></i>
189
+ <span class="truncate">{{ displayUrl }}</span>
190
+ </a>
191
+ <p *ngIf="snippet" class="mt-2 line-clamp-3 text-xs leading-relaxed text-muted-foreground">{{ snippet }}</p>
192
+ <ng-content></ng-content>
193
+ </div>
194
+ `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
195
+ }
196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InlineCitationCardComponent, decorators: [{
197
+ type: Component,
198
+ args: [{ selector: 'tolle-inline-citation-card', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `
199
+ <div [class]="computedClass">
200
+ <p class="truncate text-sm font-medium text-popover-foreground">{{ title }}</p>
201
+ <a
202
+ *ngIf="url"
203
+ [href]="url"
204
+ target="_blank"
205
+ rel="noreferrer noopener"
206
+ class="mt-0.5 flex items-center gap-1 truncate text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline"
207
+ >
208
+ <i class="ri-external-link-line shrink-0" aria-hidden="true"></i>
209
+ <span class="truncate">{{ displayUrl }}</span>
210
+ </a>
211
+ <p *ngIf="snippet" class="mt-2 line-clamp-3 text-xs leading-relaxed text-muted-foreground">{{ snippet }}</p>
212
+ <ng-content></ng-content>
213
+ </div>
214
+ `, styles: [":host{display:block}\n"] }]
215
+ }], propDecorators: { title: [{
216
+ type: Input
217
+ }], url: [{
218
+ type: Input
219
+ }], snippet: [{
220
+ type: Input
221
+ }], class: [{
222
+ type: Input
223
+ }] } });
224
+ /** A pulled quote from the cited source, shown inside the citation card. */
225
+ export class InlineCitationQuoteComponent {
226
+ cdr = inject(ChangeDetectorRef);
227
+ /**
228
+ * Angular writes a bound `class` input through its styling path, which does
229
+ * not mark an OnPush component dirty — without this hook the component keeps
230
+ * rendering the class it was born with.
231
+ */
232
+ ngOnChanges() {
233
+ this.cdr.markForCheck();
234
+ }
235
+ /** Attribution shown beneath the quote. @default '' */
236
+ cite = '';
237
+ /** Extra Tailwind classes merged onto the quote via `cn()` (last-wins). */
238
+ class = '';
239
+ get computedClass() {
240
+ return cn('mt-2 border-l-2 border-border pl-3 text-xs italic leading-relaxed text-muted-foreground', this.class);
241
+ }
242
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InlineCitationQuoteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
243
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: InlineCitationQuoteComponent, isStandalone: true, selector: "tolle-inline-citation-quote", inputs: { cite: "cite", class: "class" }, usesOnChanges: true, ngImport: i0, template: `
244
+ <blockquote [class]="computedClass">
245
+ <ng-content></ng-content>
246
+ <footer *ngIf="cite" class="mt-1 text-[11px] not-italic text-muted-foreground/80">— {{ cite }}</footer>
247
+ </blockquote>
248
+ `, isInline: true, styles: [":host{display:inline-flex}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
249
+ }
250
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InlineCitationQuoteComponent, decorators: [{
251
+ type: Component,
252
+ args: [{ selector: 'tolle-inline-citation-quote', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `
253
+ <blockquote [class]="computedClass">
254
+ <ng-content></ng-content>
255
+ <footer *ngIf="cite" class="mt-1 text-[11px] not-italic text-muted-foreground/80">— {{ cite }}</footer>
256
+ </blockquote>
257
+ `, styles: [":host{display:inline-flex}\n"] }]
258
+ }], propDecorators: { cite: [{
259
+ type: Input
260
+ }], class: [{
261
+ type: Input
262
+ }] } });
263
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5saW5lLWNpdGF0aW9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3RvbGxlL3NyYy9saWIvaW5saW5lLWNpdGF0aW9uLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsaUJBQWlCLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBYSxNQUFNLEVBQWEsTUFBTSxlQUFlLENBQUM7QUFDM0gsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQy9DLE9BQU8sRUFBRSxHQUFHLEVBQXFCLE1BQU0sMEJBQTBCLENBQUM7QUFDbEUsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLFlBQVksQ0FBQztBQUNoQyxPQUFPLEVBQ0wsa0JBQWtCLEVBQ2xCLHlCQUF5QixFQUN6Qix5QkFBeUIsR0FDMUIsTUFBTSx3QkFBd0IsQ0FBQzs7O0FBRWhDLE1BQU0sc0JBQXNCLEdBQUcsR0FBRyxDQUNoQyxrRkFBa0YsRUFDbEY7SUFDRSxRQUFRLEVBQUU7UUFDUixPQUFPLEVBQUU7WUFDUCxPQUFPLEVBQUUsb0NBQW9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