@aceshooting/lyra-ui 3.5.0 → 3.6.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 (269) hide show
  1. package/README.md +110 -2
  2. package/custom-elements.json +48093 -40204
  3. package/dist/components/animated-image/animated-image.class.d.ts +131 -0
  4. package/dist/components/animated-image/animated-image.class.d.ts.map +1 -0
  5. package/dist/components/animated-image/animated-image.class.js +296 -0
  6. package/dist/components/animated-image/animated-image.class.js.map +1 -0
  7. package/dist/components/animated-image/animated-image.d.ts +2 -0
  8. package/dist/components/animated-image/animated-image.d.ts.map +1 -0
  9. package/dist/components/animated-image/animated-image.js +5 -0
  10. package/dist/components/animated-image/animated-image.js.map +1 -0
  11. package/dist/components/animated-image/animated-image.styles.d.ts +2 -0
  12. package/dist/components/animated-image/animated-image.styles.d.ts.map +1 -0
  13. package/dist/components/animated-image/animated-image.styles.js +117 -0
  14. package/dist/components/animated-image/animated-image.styles.js.map +1 -0
  15. package/dist/components/animation/animation.class.d.ts +119 -0
  16. package/dist/components/animation/animation.class.d.ts.map +1 -0
  17. package/dist/components/animation/animation.class.js +420 -0
  18. package/dist/components/animation/animation.class.js.map +1 -0
  19. package/dist/components/animation/animation.d.ts +2 -0
  20. package/dist/components/animation/animation.d.ts.map +1 -0
  21. package/dist/components/animation/animation.js +5 -0
  22. package/dist/components/animation/animation.js.map +1 -0
  23. package/dist/components/animation/animation.styles.d.ts +2 -0
  24. package/dist/components/animation/animation.styles.d.ts.map +1 -0
  25. package/dist/components/animation/animation.styles.js +18 -0
  26. package/dist/components/animation/animation.styles.js.map +1 -0
  27. package/dist/components/avatar-group/avatar-group.class.d.ts +110 -0
  28. package/dist/components/avatar-group/avatar-group.class.d.ts.map +1 -0
  29. package/dist/components/avatar-group/avatar-group.class.js +182 -0
  30. package/dist/components/avatar-group/avatar-group.class.js.map +1 -0
  31. package/dist/components/avatar-group/avatar-group.d.ts +2 -0
  32. package/dist/components/avatar-group/avatar-group.d.ts.map +1 -0
  33. package/dist/components/avatar-group/avatar-group.js +5 -0
  34. package/dist/components/avatar-group/avatar-group.js.map +1 -0
  35. package/dist/components/avatar-group/avatar-group.styles.d.ts +2 -0
  36. package/dist/components/avatar-group/avatar-group.styles.d.ts.map +1 -0
  37. package/dist/components/avatar-group/avatar-group.styles.js +112 -0
  38. package/dist/components/avatar-group/avatar-group.styles.js.map +1 -0
  39. package/dist/components/calendar/calendar.class.d.ts.map +1 -1
  40. package/dist/components/calendar/calendar.class.js +1 -12
  41. package/dist/components/calendar/calendar.class.js.map +1 -1
  42. package/dist/components/calendar-viewer/calendar-viewer.class.d.ts +1 -1
  43. package/dist/components/calendar-viewer/calendar-viewer.class.d.ts.map +1 -1
  44. package/dist/components/calendar-viewer/calendar-viewer.class.js +2 -2
  45. package/dist/components/calendar-viewer/calendar-viewer.class.js.map +1 -1
  46. package/dist/components/chart/box-plot.class.d.ts.map +1 -1
  47. package/dist/components/chart/box-plot.class.js +1 -3
  48. package/dist/components/chart/box-plot.class.js.map +1 -1
  49. package/dist/components/chart/chart.class.d.ts.map +1 -1
  50. package/dist/components/chart/chart.class.js +1 -3
  51. package/dist/components/chart/chart.class.js.map +1 -1
  52. package/dist/components/code-editor/code-editor.styles.d.ts.map +1 -1
  53. package/dist/components/code-editor/code-editor.styles.js +5 -2
  54. package/dist/components/code-editor/code-editor.styles.js.map +1 -1
  55. package/dist/components/contact-viewer/contact-viewer.class.d.ts +4 -1
  56. package/dist/components/contact-viewer/contact-viewer.class.d.ts.map +1 -1
  57. package/dist/components/contact-viewer/contact-viewer.class.js +5 -2
  58. package/dist/components/contact-viewer/contact-viewer.class.js.map +1 -1
  59. package/dist/components/email-viewer/email-viewer.class.d.ts +4 -1
  60. package/dist/components/email-viewer/email-viewer.class.d.ts.map +1 -1
  61. package/dist/components/email-viewer/email-viewer.class.js +5 -2
  62. package/dist/components/email-viewer/email-viewer.class.js.map +1 -1
  63. package/dist/components/graph/graph.class.d.ts.map +1 -1
  64. package/dist/components/graph/graph.class.js +1 -3
  65. package/dist/components/graph/graph.class.js.map +1 -1
  66. package/dist/components/heatmap/heatmap.class.d.ts.map +1 -1
  67. package/dist/components/heatmap/heatmap.class.js +1 -8
  68. package/dist/components/heatmap/heatmap.class.js.map +1 -1
  69. package/dist/components/icon/icon.styles.d.ts.map +1 -1
  70. package/dist/components/icon/icon.styles.js +1 -1
  71. package/dist/components/icon/icon.styles.js.map +1 -1
  72. package/dist/components/include/include.class.d.ts +104 -0
  73. package/dist/components/include/include.class.d.ts.map +1 -0
  74. package/dist/components/include/include.class.js +149 -0
  75. package/dist/components/include/include.class.js.map +1 -0
  76. package/dist/components/include/include.d.ts +2 -0
  77. package/dist/components/include/include.d.ts.map +1 -0
  78. package/dist/components/include/include.js +5 -0
  79. package/dist/components/include/include.js.map +1 -0
  80. package/dist/components/include/include.styles.d.ts +2 -0
  81. package/dist/components/include/include.styles.d.ts.map +1 -0
  82. package/dist/components/include/include.styles.js +14 -0
  83. package/dist/components/include/include.styles.js.map +1 -0
  84. package/dist/components/kbd/kbd.class.d.ts.map +1 -1
  85. package/dist/components/kbd/kbd.class.js +1 -11
  86. package/dist/components/kbd/kbd.class.js.map +1 -1
  87. package/dist/components/known-date/known-date.class.d.ts +208 -0
  88. package/dist/components/known-date/known-date.class.d.ts.map +1 -0
  89. package/dist/components/known-date/known-date.class.js +588 -0
  90. package/dist/components/known-date/known-date.class.js.map +1 -0
  91. package/dist/components/known-date/known-date.d.ts +2 -0
  92. package/dist/components/known-date/known-date.d.ts.map +1 -0
  93. package/dist/components/known-date/known-date.js +5 -0
  94. package/dist/components/known-date/known-date.js.map +1 -0
  95. package/dist/components/known-date/known-date.styles.d.ts +2 -0
  96. package/dist/components/known-date/known-date.styles.d.ts.map +1 -0
  97. package/dist/components/known-date/known-date.styles.js +134 -0
  98. package/dist/components/known-date/known-date.styles.js.map +1 -0
  99. package/dist/components/lightbox/lightbox.class.d.ts +187 -0
  100. package/dist/components/lightbox/lightbox.class.d.ts.map +1 -0
  101. package/dist/components/lightbox/lightbox.class.js +415 -0
  102. package/dist/components/lightbox/lightbox.class.js.map +1 -0
  103. package/dist/components/lightbox/lightbox.d.ts +3 -0
  104. package/dist/components/lightbox/lightbox.d.ts.map +1 -0
  105. package/dist/components/lightbox/lightbox.js +6 -0
  106. package/dist/components/lightbox/lightbox.js.map +1 -0
  107. package/dist/components/lightbox/lightbox.styles.d.ts +2 -0
  108. package/dist/components/lightbox/lightbox.styles.d.ts.map +1 -0
  109. package/dist/components/lightbox/lightbox.styles.js +179 -0
  110. package/dist/components/lightbox/lightbox.styles.js.map +1 -0
  111. package/dist/components/map/map.class.d.ts.map +1 -1
  112. package/dist/components/map/map.class.js +1 -23
  113. package/dist/components/map/map.class.js.map +1 -1
  114. package/dist/components/menu/menu.class.d.ts +1 -1
  115. package/dist/components/model-settings-panel/model-settings-panel.class.d.ts.map +1 -1
  116. package/dist/components/model-settings-panel/model-settings-panel.class.js +1 -10
  117. package/dist/components/model-settings-panel/model-settings-panel.class.js.map +1 -1
  118. package/dist/components/qr-code/qr-code-loader.d.ts +15 -0
  119. package/dist/components/qr-code/qr-code-loader.d.ts.map +1 -0
  120. package/dist/components/qr-code/qr-code-loader.js +28 -0
  121. package/dist/components/qr-code/qr-code-loader.js.map +1 -0
  122. package/dist/components/qr-code/qr-code.class.d.ts +121 -0
  123. package/dist/components/qr-code/qr-code.class.d.ts.map +1 -0
  124. package/dist/components/qr-code/qr-code.class.js +392 -0
  125. package/dist/components/qr-code/qr-code.class.js.map +1 -0
  126. package/dist/components/qr-code/qr-code.d.ts +2 -0
  127. package/dist/components/qr-code/qr-code.d.ts.map +1 -0
  128. package/dist/components/qr-code/qr-code.js +5 -0
  129. package/dist/components/qr-code/qr-code.js.map +1 -0
  130. package/dist/components/qr-code/qr-code.styles.d.ts +2 -0
  131. package/dist/components/qr-code/qr-code.styles.d.ts.map +1 -0
  132. package/dist/components/qr-code/qr-code.styles.js +48 -0
  133. package/dist/components/qr-code/qr-code.styles.js.map +1 -0
  134. package/dist/components/random-content/random-content.class.d.ts +99 -0
  135. package/dist/components/random-content/random-content.class.d.ts.map +1 -0
  136. package/dist/components/random-content/random-content.class.js +268 -0
  137. package/dist/components/random-content/random-content.class.js.map +1 -0
  138. package/dist/components/random-content/random-content.d.ts +2 -0
  139. package/dist/components/random-content/random-content.d.ts.map +1 -0
  140. package/dist/components/random-content/random-content.js +5 -0
  141. package/dist/components/random-content/random-content.js.map +1 -0
  142. package/dist/components/random-content/random-content.styles.d.ts +2 -0
  143. package/dist/components/random-content/random-content.styles.d.ts.map +1 -0
  144. package/dist/components/random-content/random-content.styles.js +94 -0
  145. package/dist/components/random-content/random-content.styles.js.map +1 -0
  146. package/dist/components/result-card/result-card.class.d.ts +9 -8
  147. package/dist/components/result-card/result-card.class.d.ts.map +1 -1
  148. package/dist/components/result-card/result-card.class.js +7 -26
  149. package/dist/components/result-card/result-card.class.js.map +1 -1
  150. package/dist/components/result-card/result-field.class.d.ts.map +1 -1
  151. package/dist/components/result-card/result-field.class.js +1 -11
  152. package/dist/components/result-card/result-field.class.js.map +1 -1
  153. package/dist/components/slider/slider.class.d.ts.map +1 -1
  154. package/dist/components/slider/slider.class.js +1 -19
  155. package/dist/components/slider/slider.class.js.map +1 -1
  156. package/dist/components/source-card/source-card.class.d.ts +8 -7
  157. package/dist/components/source-card/source-card.class.d.ts.map +1 -1
  158. package/dist/components/source-card/source-card.class.js +6 -25
  159. package/dist/components/source-card/source-card.class.js.map +1 -1
  160. package/dist/components/stat/stat.class.js +1 -1
  161. package/dist/components/stat/stat.class.js.map +1 -1
  162. package/dist/components/time-range/time-range.class.d.ts.map +1 -1
  163. package/dist/components/time-range/time-range.class.js +1 -21
  164. package/dist/components/time-range/time-range.class.js.map +1 -1
  165. package/dist/components/timeline/timeline-item.class.d.ts +120 -0
  166. package/dist/components/timeline/timeline-item.class.d.ts.map +1 -0
  167. package/dist/components/timeline/timeline-item.class.js +203 -0
  168. package/dist/components/timeline/timeline-item.class.js.map +1 -0
  169. package/dist/components/timeline/timeline-item.d.ts +3 -0
  170. package/dist/components/timeline/timeline-item.d.ts.map +1 -0
  171. package/dist/components/timeline/timeline-item.js +10 -0
  172. package/dist/components/timeline/timeline-item.js.map +1 -0
  173. package/dist/components/timeline/timeline-item.styles.d.ts +2 -0
  174. package/dist/components/timeline/timeline-item.styles.d.ts.map +1 -0
  175. package/dist/components/timeline/timeline-item.styles.js +149 -0
  176. package/dist/components/timeline/timeline-item.styles.js.map +1 -0
  177. package/dist/components/timeline/timeline.class.d.ts +59 -0
  178. package/dist/components/timeline/timeline.class.d.ts.map +1 -0
  179. package/dist/components/timeline/timeline.class.js +100 -0
  180. package/dist/components/timeline/timeline.class.js.map +1 -0
  181. package/dist/components/timeline/timeline.d.ts +2 -0
  182. package/dist/components/timeline/timeline.d.ts.map +1 -0
  183. package/dist/components/timeline/timeline.js +5 -0
  184. package/dist/components/timeline/timeline.js.map +1 -0
  185. package/dist/components/timeline/timeline.styles.d.ts +2 -0
  186. package/dist/components/timeline/timeline.styles.d.ts.map +1 -0
  187. package/dist/components/timeline/timeline.styles.js +52 -0
  188. package/dist/components/timeline/timeline.styles.js.map +1 -0
  189. package/dist/components/toast/toast-item.class.d.ts.map +1 -1
  190. package/dist/components/toast/toast-item.class.js +1 -3
  191. package/dist/components/toast/toast-item.class.js.map +1 -1
  192. package/dist/components/tool-param-form/tool-param-form.class.d.ts.map +1 -1
  193. package/dist/components/tool-param-form/tool-param-form.class.js +0 -1
  194. package/dist/components/tool-param-form/tool-param-form.class.js.map +1 -1
  195. package/dist/components/tour/tour.class.d.ts +250 -0
  196. package/dist/components/tour/tour.class.d.ts.map +1 -0
  197. package/dist/components/tour/tour.class.js +530 -0
  198. package/dist/components/tour/tour.class.js.map +1 -0
  199. package/dist/components/tour/tour.d.ts +2 -0
  200. package/dist/components/tour/tour.d.ts.map +1 -0
  201. package/dist/components/tour/tour.js +5 -0
  202. package/dist/components/tour/tour.js.map +1 -0
  203. package/dist/components/tour/tour.styles.d.ts +2 -0
  204. package/dist/components/tour/tour.styles.d.ts.map +1 -0
  205. package/dist/components/tour/tour.styles.js +165 -0
  206. package/dist/components/tour/tour.styles.js.map +1 -0
  207. package/dist/components/virtual-list/virtual-list.class.d.ts.map +1 -1
  208. package/dist/components/virtual-list/virtual-list.class.js +1 -3
  209. package/dist/components/virtual-list/virtual-list.class.js.map +1 -1
  210. package/dist/components/word-cloud/word-cloud.class.d.ts.map +1 -1
  211. package/dist/components/word-cloud/word-cloud.class.js +1 -8
  212. package/dist/components/word-cloud/word-cloud.class.js.map +1 -1
  213. package/dist/components/zoomable-frame/zoomable-frame.class.d.ts +15 -0
  214. package/dist/components/zoomable-frame/zoomable-frame.class.d.ts.map +1 -1
  215. package/dist/components/zoomable-frame/zoomable-frame.class.js +18 -0
  216. package/dist/components/zoomable-frame/zoomable-frame.class.js.map +1 -1
  217. package/dist/internal/a11y.d.ts +4 -0
  218. package/dist/internal/a11y.d.ts.map +1 -1
  219. package/dist/internal/a11y.js +17 -0
  220. package/dist/internal/a11y.js.map +1 -1
  221. package/dist/internal/canvas.d.ts +8 -0
  222. package/dist/internal/canvas.d.ts.map +1 -0
  223. package/dist/internal/canvas.js +14 -0
  224. package/dist/internal/canvas.js.map +1 -0
  225. package/dist/internal/localization.d.ts +1 -1
  226. package/dist/internal/localization.d.ts.map +1 -1
  227. package/dist/internal/localization.js +20 -2
  228. package/dist/internal/localization.js.map +1 -1
  229. package/dist/internal/motion.d.ts +5 -0
  230. package/dist/internal/motion.d.ts.map +1 -0
  231. package/dist/internal/motion.js +7 -0
  232. package/dist/internal/motion.js.map +1 -0
  233. package/dist/internal/numbers.d.ts +11 -0
  234. package/dist/internal/numbers.d.ts.map +1 -1
  235. package/dist/internal/numbers.js +21 -0
  236. package/dist/internal/numbers.js.map +1 -1
  237. package/dist/internal/positioner.d.ts +14 -0
  238. package/dist/internal/positioner.d.ts.map +1 -1
  239. package/dist/internal/positioner.js +27 -0
  240. package/dist/internal/positioner.js.map +1 -1
  241. package/dist/internal/root-registration-allowlist.d.ts +1 -1
  242. package/dist/internal/root-registration-allowlist.d.ts.map +1 -1
  243. package/dist/internal/root-registration-allowlist.js +11 -0
  244. package/dist/internal/root-registration-allowlist.js.map +1 -1
  245. package/dist/internal/rtl.d.ts +0 -11
  246. package/dist/internal/rtl.d.ts.map +1 -1
  247. package/dist/internal/rtl.js +0 -13
  248. package/dist/internal/rtl.js.map +1 -1
  249. package/dist/internal/safe-css.d.ts +15 -0
  250. package/dist/internal/safe-css.d.ts.map +1 -0
  251. package/dist/internal/safe-css.js +25 -0
  252. package/dist/internal/safe-css.js.map +1 -0
  253. package/dist/internal/strip-host-title.d.ts +24 -0
  254. package/dist/internal/strip-host-title.d.ts.map +1 -0
  255. package/dist/internal/strip-host-title.js +46 -0
  256. package/dist/internal/strip-host-title.js.map +1 -0
  257. package/dist/internal/tokens.styles.d.ts.map +1 -1
  258. package/dist/internal/tokens.styles.js +4 -0
  259. package/dist/internal/tokens.styles.js.map +1 -1
  260. package/dist/lyra.d.ts +33 -0
  261. package/dist/lyra.d.ts.map +1 -1
  262. package/dist/lyra.js +22 -0
  263. package/dist/lyra.js.map +1 -1
  264. package/llms-full.txt +90 -0
  265. package/llms.txt +3 -0
  266. package/package.json +43 -6
  267. package/vscode-css-data.json +719 -0
  268. package/vscode-html-data.json +10579 -0
  269. package/web-types.json +12161 -0
@@ -0,0 +1,203 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { html, nothing } from 'lit';
8
+ import { property, state } from 'lit/decorators.js';
9
+ import { LyraElement } from '../../internal/lyra-element.js';
10
+ import { styles } from './timeline-item.styles.js';
11
+ /**
12
+ * `<lyra-timeline-item>` — one marker + title + optional timestamp + optional description row inside
13
+ * `<lyra-timeline>`'s default slot. See that component's class doc for the overall shape; this class
14
+ * doc covers the rail-connecting mechanism this item's own `[part="track"]`/`[part="rail"]`
15
+ * implement.
16
+ *
17
+ * Each item owns and renders *its own trailing rail segment*, not the whole connecting line — think
18
+ * of it as a linked list of line segments, one per item, each reaching toward the next item's marker.
19
+ * `[part="track"]` (marker then rail) is a flex sibling of `[part="content"]` inside `[part="base"]`,
20
+ * with `[part="base"]`'s default `align-items: stretch` left alone — so `[part="track"]`'s
21
+ * cross-axis size automatically equals `[part="content"]`'s own size, including any content-driven
22
+ * height from a long slotted description. `[part="rail"]` is `flex: 1 1 auto` inside `[part="track"]`,
23
+ * so once the marker (fixed size) takes its share, the rail fills the rest — no JS measurement, no
24
+ * `ResizeObserver`, no absolute positioning. `[part="content"]` carries a trailing logical padding
25
+ * (block-end in vertical mode, inline-end in horizontal mode) equal to `<lyra-timeline>`'s
26
+ * `--lyra-timeline-gap`, so the stretched rail visually reaches *into* the gap before the next item's
27
+ * marker with no seam. The last item's rail is suppressed by `<lyra-timeline>`'s own pure-CSS
28
+ * `::slotted(:last-child)` rule (see that component's stylesheet) — no JS coordination between the
29
+ * two components is needed anywhere in this mechanism.
30
+ *
31
+ * A pure display row: no events, no keyboard interaction, and no selection/expansion state of its
32
+ * own — a deliberate scope decision, not an oversight. An earlier "interactive row" design (mirroring
33
+ * `<lyra-conversation-item>`'s clickable `role="button"` row) was considered and dropped: this
34
+ * component's `title` and `description` are slots that routinely contain focusable content of their
35
+ * own (a link, a button) — wrapping them in an ancestor `role="button"` would trip axe's
36
+ * `nested-interactive` rule the moment a consumer slots one in, unlike `<lyra-conversation-item>`,
37
+ * which keeps its own focusable content in a sibling `actions` slot specifically to avoid that. A
38
+ * consumer who wants a clickable entry slots an actual interactive element inside `description`
39
+ * themselves — `role="listitem"` places no restriction on focusable descendants. Not a
40
+ * form-associated control — no value to submit, no label/hint/error chrome.
41
+ *
42
+ * @customElement lyra-timeline-item
43
+ * @slot - The item's primary heading/title content. Rich content allowed (inline code, a badge, a
44
+ * link) — nothing renders when this slot is empty, a valid if unusual usage.
45
+ * @slot icon - Leading marker/glyph override (e.g. a `<lyra-icon>`, an emoji, a small avatar-like
46
+ * element). Falls back to a plain color-coded dot (driven by `variant`) when empty.
47
+ * @slot timestamp - Full override of the timestamp presentation (e.g.
48
+ * `<lyra-format-date slot="timestamp">`, a custom string, a differently-configured
49
+ * `<lyra-relative-time>`). Wins over the `timestamp` property whenever it has assigned content,
50
+ * even if `timestamp` is also set. Falls back to an internally-rendered `<lyra-relative-time>`
51
+ * (driven by the `timestamp` property) wrapped in a `<time>`, or renders nothing at all
52
+ * (`[part="timestamp"]` hidden) when neither the slot nor a valid `timestamp` is present.
53
+ * @slot description - Secondary/body content below the title (explanatory text, a diff snippet, a
54
+ * "view details" affordance). `[part="description"]` is hidden entirely when this slot is empty.
55
+ * @csspart base - The root wrapper. Flex container; `flex-direction` is driven by the
56
+ * `--lyra-timeline-item-direction` custom property inherited from `<lyra-timeline>`'s `:host` --
57
+ * `row` in vertical-timeline mode (marker beside content), `column` in horizontal-timeline mode
58
+ * (marker above content).
59
+ * @csspart track - Wrapper around the marker and rail (the "spine"). Always the opposite axis from
60
+ * `[part="base"]` -- see the class doc's rail-mechanism note.
61
+ * @csspart marker - The dot/icon circle. Always `aria-hidden="true"` -- purely decorative, the
62
+ * item's accessible content is its title/timestamp/description text.
63
+ * @csspart rail - The connecting line segment extending from this item's marker toward the next
64
+ * item's marker. Hidden (`visibility: hidden`, not removed) for the last item in a
65
+ * `<lyra-timeline>` -- see the class doc.
66
+ * @csspart content - Wrapper around `header` and `description`.
67
+ * @csspart header - Flex row wrapping `title` and `timestamp`; wraps at narrow widths rather than
68
+ * truncating either.
69
+ * @csspart title - Wrapper around the default (title) slot.
70
+ * @csspart timestamp - Wrapper around the `timestamp` slot / the internally-rendered `<time>`
71
+ * fallback. Hidden entirely when there's nothing to show.
72
+ * @csspart description - Wrapper around the `description` slot. Hidden entirely when the slot is
73
+ * empty.
74
+ * @cssprop [--lyra-timeline-marker-size=var(--lyra-size-1-25rem)] - Diameter of the marker circle
75
+ * (both inline-size and block-size, so the default dot stays circular).
76
+ * @cssprop [--lyra-timeline-rail-width=var(--lyra-border-width-medium)] - Thickness of the
77
+ * connecting rail line.
78
+ * @cssprop [--lyra-timeline-rail-color=var(--lyra-color-border)] - Color of the connecting rail
79
+ * line. A component-scoped property (not just inlining `var(--lyra-color-border)` at every use
80
+ * site) so a consumer can retint just the rail without touching the library-wide border color
81
+ * elsewhere.
82
+ * @cssprop [--lyra-timeline-marker-color=var(--lyra-color-text-quiet)] - Marker fill/accent color.
83
+ * Swapped per `variant` (see the class doc's variant table); a consumer overriding this directly on
84
+ * one item wins over the variant default via normal CSS cascade/specificity.
85
+ */
86
+ export class LyraTimelineItem extends LyraElement {
87
+ constructor() {
88
+ super(...arguments);
89
+ /** Forwarded 1:1 onto the internally-rendered `<lyra-relative-time>`'s own `sync` property, so a
90
+ * live feed (e.g. streaming agent actions) can opt this item into auto-refreshing relative text
91
+ * ("just now" ticking to "1 minute ago"). Named to match `<lyra-relative-time>`'s own `sync`
92
+ * property verbatim. Has no effect when the `timestamp` slot is populated -- there is no internal
93
+ * `<lyra-relative-time>` to forward onto in that case. */
94
+ this.sync = false;
95
+ /** Tone of the marker. `'neutral'` (default) is a plain past event; `'brand'` is highlighted/
96
+ * informational; `'success'` is completed positively (e.g. a successful deploy); `'warning'` needs
97
+ * attention; `'danger'` is a failed/error event. Same five-value set as `BadgeVariant`/
98
+ * `CalloutVariant`. */
99
+ this.variant = 'neutral';
100
+ /** Marks this as the current/in-progress item (e.g. "the agent is executing this step right now"),
101
+ * as opposed to a resolved past entry. Drives a pulsing marker (disabled under
102
+ * `prefers-reduced-motion: reduce`) and `aria-current="true"` on the host -- omitted entirely
103
+ * (not `"false"`) while inactive, matching `<lyra-stepper>`'s identical `aria-current` handling. */
104
+ this.active = false;
105
+ // Tracked in JS rather than relying on native <slot> fallback content: the "slot wins outright"
106
+ // precedence described in the class doc requires the internal <lyra-relative-time>/default-dot
107
+ // markup to be entirely absent from the render() output -- not merely visually superseded -- once
108
+ // the corresponding slot has assigned content. Same [part][hidden]-not-:empty reasoning as
109
+ // <lyra-menu-item>'s hasIconSlot (a [part] containing a literal <slot> child never matches a bare
110
+ // :empty selector), copied verbatim for all three slots here.
111
+ this.hasIconSlot = false;
112
+ this.hasTimestampSlot = false;
113
+ this.hasDescriptionSlot = false;
114
+ this.onIconSlotChange = (e) => {
115
+ this.hasIconSlot = e.target.assignedElements({ flatten: true }).length > 0;
116
+ };
117
+ this.onTimestampSlotChange = (e) => {
118
+ this.hasTimestampSlot = e.target.assignedElements({ flatten: true }).length > 0;
119
+ };
120
+ this.onDescriptionSlotChange = (e) => {
121
+ this.hasDescriptionSlot = e.target.assignedElements({ flatten: true }).length > 0;
122
+ };
123
+ }
124
+ static { this.styles = [LyraElement.styles, styles]; }
125
+ connectedCallback() {
126
+ super.connectedCallback();
127
+ this.setAttribute('role', 'listitem');
128
+ }
129
+ willUpdate() {
130
+ // aria-current lives on the host (role="listitem" does too -- see connectedCallback), so it's a
131
+ // plain imperative attribute write here rather than part of render()'s shadow-DOM template.
132
+ // Removed entirely (not set to "false") while inactive -- omitting it loses no information since
133
+ // aria-current's own ARIA-spec default value is already "false".
134
+ if (this.active)
135
+ this.setAttribute('aria-current', 'true');
136
+ else
137
+ this.removeAttribute('aria-current');
138
+ }
139
+ get normalizedTimestamp() {
140
+ if (this.timestamp === undefined)
141
+ return undefined;
142
+ const date = this.timestamp instanceof Date ? this.timestamp : new Date(this.timestamp);
143
+ return Number.isNaN(date.getTime()) ? undefined : date;
144
+ }
145
+ render() {
146
+ const ts = this.normalizedTimestamp;
147
+ const showTimestampFallback = !this.hasTimestampSlot && ts !== undefined;
148
+ const showTimestamp = this.hasTimestampSlot || ts !== undefined;
149
+ // Intl-formatted absolute date/time -- caller/data formatting exempt from localize() routing per
150
+ // AGENTS.md's i18n carve-out for Intl-formatted dates. Never hand-rolled.
151
+ const absolute = ts
152
+ ? new Intl.DateTimeFormat(this.effectiveLocale || undefined, { dateStyle: 'long', timeStyle: 'short' }).format(ts)
153
+ : '';
154
+ return html `
155
+ <div part="base">
156
+ <div part="track">
157
+ <span part="marker" aria-hidden="true">
158
+ <slot name="icon" @slotchange=${this.onIconSlotChange}></slot>
159
+ </span>
160
+ <span part="rail"></span>
161
+ </div>
162
+ <div part="content">
163
+ <div part="header">
164
+ <span part="title"><slot></slot></span>
165
+ <span part="timestamp" ?hidden=${!showTimestamp}>
166
+ <slot name="timestamp" @slotchange=${this.onTimestampSlotChange}></slot>
167
+ ${showTimestampFallback
168
+ ? html `<time datetime=${ts.toISOString()} title=${absolute}>
169
+ <lyra-relative-time .date=${ts} .sync=${this.sync}></lyra-relative-time>
170
+ </time>`
171
+ : nothing}
172
+ </span>
173
+ </div>
174
+ <span part="description" ?hidden=${!this.hasDescriptionSlot}>
175
+ <slot name="description" @slotchange=${this.onDescriptionSlotChange}></slot>
176
+ </span>
177
+ </div>
178
+ </div>
179
+ `;
180
+ }
181
+ }
182
+ __decorate([
183
+ property({ attribute: false })
184
+ ], LyraTimelineItem.prototype, "timestamp", void 0);
185
+ __decorate([
186
+ property({ type: Boolean })
187
+ ], LyraTimelineItem.prototype, "sync", void 0);
188
+ __decorate([
189
+ property()
190
+ ], LyraTimelineItem.prototype, "variant", void 0);
191
+ __decorate([
192
+ property({ type: Boolean, reflect: true })
193
+ ], LyraTimelineItem.prototype, "active", void 0);
194
+ __decorate([
195
+ state()
196
+ ], LyraTimelineItem.prototype, "hasIconSlot", void 0);
197
+ __decorate([
198
+ state()
199
+ ], LyraTimelineItem.prototype, "hasTimestampSlot", void 0);
200
+ __decorate([
201
+ state()
202
+ ], LyraTimelineItem.prototype, "hasDescriptionSlot", void 0);
203
+ //# sourceMappingURL=timeline-item.class.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-item.class.js","sourceRoot":"","sources":["../../../src/components/timeline/timeline-item.class.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAInD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AACH,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAAjD;;QAWE;;;;mEAI2D;QAC9B,SAAI,GAAG,KAAK,CAAC;QAE1C;;;gCAGwB;QACZ,YAAO,GAAwB,SAAS,CAAC;QAErD;;;6GAGqG;QACzD,WAAM,GAAG,KAAK,CAAC;QAE3D,gGAAgG;QAChG,+FAA+F;QAC/F,kGAAkG;QAClG,2FAA2F;QAC3F,kGAAkG;QAClG,8DAA8D;QAC7C,gBAAW,GAAG,KAAK,CAAC;QACpB,qBAAgB,GAAG,KAAK,CAAC;QACzB,uBAAkB,GAAG,KAAK,CAAC;QAsBpC,qBAAgB,GAAG,CAAC,CAAQ,EAAQ,EAAE;YAC5C,IAAI,CAAC,WAAW,GAAI,CAAC,CAAC,MAA0B,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QAClG,CAAC,CAAC;QAEM,0BAAqB,GAAG,CAAC,CAAQ,EAAQ,EAAE;YACjD,IAAI,CAAC,gBAAgB,GAAI,CAAC,CAAC,MAA0B,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAA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ourceRoot":"","sources":["../../../src/components/timeline/timeline-item.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AAOzC,OAAO,4BAA4B,CAAC"}
@@ -0,0 +1,10 @@
1
+ export * from './timeline-item.class.js';
2
+ import { LyraTimelineItem } from './timeline-item.class.js';
3
+ import { defineElement } from '../../internal/prefix.js';
4
+ // Registers <lyra-relative-time>, rendered internally as the default timestamp fallback -- see the
5
+ // class doc's "Timestamp rendering" note. Kept out of timeline-item.class.ts so that module stays
6
+ // side-effect free per AGENTS.md's tree-shaking rule; mirrors <lyra-chat-message>'s identical
7
+ // dependency-registration split (chat-message.ts imports live-region.js the same way).
8
+ import '../format/relative-time.js';
9
+ defineElement('timeline-item', LyraTimelineItem);
10
+ //# sourceMappingURL=timeline-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-item.js","sourceRoot":"","sources":["../../../src/components/timeline/timeline-item.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,mGAAmG;AACnG,kGAAkG;AAClG,8FAA8F;AAC9F,uFAAuF;AACvF,OAAO,4BAA4B,CAAC;AACpC,aAAa,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const styles: import("lit").CSSResult;
2
+ //# sourceMappingURL=timeline-item.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-item.styles.d.ts","sourceRoot":"","sources":["../../../src/components/timeline/timeline-item.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBAkJlB,CAAC"}
@@ -0,0 +1,149 @@
1
+ import { css } from 'lit';
2
+ export const styles = css `
3
+ :host {
4
+ display: block;
5
+ --lyra-timeline-marker-size: var(--lyra-size-1-25rem);
6
+ --lyra-timeline-rail-width: var(--lyra-border-width-medium);
7
+ --lyra-timeline-rail-color: var(--lyra-color-border);
8
+ /* Swapped per-variant by the :host([variant]) rules below -- same one-custom-property-per-tone
9
+ shape as lyra-stream-status's --lyra-stream-status-dot-color. */
10
+ --lyra-timeline-marker-color: var(--lyra-color-text-quiet);
11
+ }
12
+ :host([variant='brand']) {
13
+ --lyra-timeline-marker-color: var(--lyra-color-brand);
14
+ }
15
+ :host([variant='success']) {
16
+ --lyra-timeline-marker-color: var(--lyra-color-success);
17
+ }
18
+ :host([variant='warning']) {
19
+ --lyra-timeline-marker-color: var(--lyra-color-warning);
20
+ }
21
+ :host([variant='danger']) {
22
+ --lyra-timeline-marker-color: var(--lyra-color-danger);
23
+ }
24
+
25
+ [part='base'] {
26
+ display: flex;
27
+ /* Driven by the --lyra-timeline-item-direction custom property inherited from <lyra-timeline>'s
28
+ :host across the slot boundary -- row (marker beside content) in vertical-timeline mode,
29
+ column (marker above content) in horizontal-timeline mode. This component has no orientation
30
+ attribute of its own; see <lyra-timeline>'s styles for the source of truth. */
31
+ flex-direction: var(--lyra-timeline-item-direction, row);
32
+ gap: var(--lyra-space-s);
33
+ }
34
+
35
+ [part='track'] {
36
+ display: flex;
37
+ /* Always the *opposite* axis from [part='base'] -- see the class doc's rail-mechanism note.
38
+ Paired with --lyra-timeline-item-direction at the same <lyra-timeline> source, since CSS has
39
+ no way to derive "the other one of row/column" from a single custom property's value. */
40
+ flex-direction: var(--lyra-timeline-item-track-direction, column);
41
+ align-items: center;
42
+ flex: 0 0 auto;
43
+ }
44
+
45
+ [part='marker'] {
46
+ inline-size: var(--lyra-timeline-marker-size);
47
+ block-size: var(--lyra-timeline-marker-size);
48
+ border-radius: 50%;
49
+ flex: 0 0 auto;
50
+ background: var(--lyra-timeline-marker-color);
51
+ /* A slotted <lyra-icon> (or any currentColor-stroked glyph) automatically inherits the correct
52
+ variant tint with no extra wiring. */
53
+ color: var(--lyra-timeline-marker-color);
54
+ display: inline-flex;
55
+ align-items: center;
56
+ justify-content: center;
57
+ overflow: hidden;
58
+ }
59
+
60
+ /* The pulsing "in-progress" treatment -- same token/guard shape as lyra-stream-status's
61
+ streaming-phase dot pulse. */
62
+ :host([active]) [part='marker'] {
63
+ animation: lyra-timeline-item-pulse var(--lyra-transition-ambient) infinite;
64
+ }
65
+ @keyframes lyra-timeline-item-pulse {
66
+ 0%,
67
+ 100% {
68
+ transform: scale(0.85);
69
+ opacity: 0.6;
70
+ }
71
+ 50% {
72
+ transform: scale(1);
73
+ opacity: 1;
74
+ }
75
+ }
76
+ @media (prefers-reduced-motion: reduce) {
77
+ [part='marker'] {
78
+ animation: none !important;
79
+ }
80
+ }
81
+
82
+ [part='rail'] {
83
+ flex: 1 1 auto;
84
+ /* Both dimensions set to the same fixed thickness: whichever one ends up being [part='track']'s
85
+ cross axis (see above) is the one that visually matters as the rail's width -- the main-axis
86
+ dimension is just flex-basis's starting point, immediately overridden by flex-grow filling
87
+ whatever length [part='content']'s own padding/height creates (see the class doc's rail
88
+ mechanism). One declaration handles both orientations with no extra conditional. */
89
+ inline-size: var(--lyra-timeline-rail-width);
90
+ block-size: var(--lyra-timeline-rail-width);
91
+ background: var(--lyra-timeline-rail-color);
92
+ /* Suppressed for the last item in a <lyra-timeline> via this custom property, set by
93
+ <lyra-timeline>'s own ::slotted(:last-child) rule -- visibility (not display) keeps the same
94
+ layout box every other item's track has, so marker alignment stays consistent down the list. */
95
+ visibility: var(--lyra-timeline-item-rail-visibility, visible);
96
+ }
97
+
98
+ [part='content'] {
99
+ display: flex;
100
+ flex-direction: column;
101
+ flex: 1 1 auto;
102
+ min-inline-size: 0;
103
+ gap: var(--lyra-space-2xs);
104
+ /* Reaches into the gap before the next item so the rail (which stretches to match this
105
+ element's own size -- see [part='track']) visually meets the next item's marker with no seam.
106
+ Exactly one of these two is non-zero at a time, set together by <lyra-timeline>'s
107
+ :host / :host([orientation='horizontal']) rules; both default to 0 when this item is used
108
+ standalone (no <lyra-timeline> ancestor). */
109
+ padding-block-end: var(--lyra-timeline-item-gap-block-end, 0);
110
+ padding-inline-end: var(--lyra-timeline-item-gap-inline-end, 0);
111
+ }
112
+
113
+ [part='header'] {
114
+ display: flex;
115
+ align-items: baseline;
116
+ justify-content: space-between;
117
+ flex-wrap: wrap;
118
+ gap: var(--lyra-space-xs);
119
+ }
120
+
121
+ [part='title'] {
122
+ min-inline-size: 0;
123
+ color: var(--lyra-color-text);
124
+ font-weight: var(--lyra-font-weight-semibold);
125
+ line-height: var(--lyra-line-height-snug);
126
+ }
127
+
128
+ [part='timestamp'] {
129
+ flex: 0 0 auto;
130
+ color: var(--lyra-color-text-quiet);
131
+ font-size: var(--lyra-font-size-xs);
132
+ white-space: nowrap;
133
+ }
134
+ [part='timestamp'][hidden] {
135
+ display: none;
136
+ }
137
+
138
+ [part='description'] {
139
+ min-inline-size: 0;
140
+ color: var(--lyra-color-text-quiet);
141
+ font-size: var(--lyra-font-size-md-sm);
142
+ line-height: var(--lyra-line-height-1-4);
143
+ overflow-wrap: anywhere;
144
+ }
145
+ [part='description'][hidden] {
146
+ display: none;
147
+ }
148
+ `;
149
+ //# sourceMappingURL=timeline-item.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-item.styles.js","sourceRoot":"","sources":["../../../src/components/timeline/timeline-item.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkJxB,CAAC"}
@@ -0,0 +1,59 @@
1
+ import { type TemplateResult } from 'lit';
2
+ import { LyraElement } from '../../internal/lyra-element.js';
3
+ export type TimelineOrientation = 'vertical' | 'horizontal';
4
+ /**
5
+ * `<lyra-timeline>` — an ordered, connected sequence of past-event rows (an audit trail, an agent
6
+ * action history, a changelog) composed from `<lyra-timeline-item>` light-DOM children, joined by a
7
+ * continuous connecting rail. First-party invention: no Web Awesome/Shoelace counterpart exists, so
8
+ * this follows the library's own established conventions rather than mirroring an upstream API.
9
+ *
10
+ * A pure, read-only, declarative display component — same zero-event shape as `<lyra-badge>`/
11
+ * `<lyra-avatar>`/`<lyra-skeleton>`. It never mutates its own children and fires no events; a
12
+ * consumer who needs to react to item count changes already owns the mutation (they're the one
13
+ * adding/removing `<lyra-timeline-item>` children) and can listen to the native `slotchange` event
14
+ * directly if truly needed.
15
+ *
16
+ * No keyboard navigation, roving-tabindex, or selection model of any kind — a deliberate scope
17
+ * decision, not an oversight. A timeline is a passive record display, not a navigable widget; see
18
+ * `<lyra-timeline-item>`'s class doc for the full reasoning behind dropping an earlier
19
+ * "interactive row" design. Not a form-associated control — no value to submit, no label/hint/error
20
+ * chrome.
21
+ *
22
+ * @customElement lyra-timeline
23
+ * @slot - `<lyra-timeline-item>` children, in display order.
24
+ * @csspart base - The root wrapper. `role="list"` lives here directly (a timeline isn't a navigation
25
+ * landmark, so it doesn't need a two-layer `base`+`list` split). Flex container: `flex-direction:
26
+ * column` in `vertical` orientation (the default), `flex-direction: row` (with `overflow-x: auto`)
27
+ * in `horizontal` orientation.
28
+ * @cssprop [--lyra-timeline-gap=var(--lyra-space-l)] - Spacing between consecutive items along the
29
+ * timeline's main axis; also the length each item's own rail visually bridges to reach the next
30
+ * item's marker. Declared here but actually consumed inside each `<lyra-timeline-item>`'s own
31
+ * stylesheet, via ordinary CSS custom-property inheritance across the slot boundary.
32
+ */
33
+ export declare class LyraTimeline extends LyraElement {
34
+ static styles: import("lit").CSSResultGroup[];
35
+ /** `'vertical'` (the default) lays items out in a column, the primary/most-common use case — an
36
+ * audit trail or agent history reads top-to-bottom. `'horizontal'` lays them out in a row.
37
+ * Deliberately differs from `<lyra-stepper>`'s `'horizontal'` default — don't copy that default by
38
+ * habit. */
39
+ orientation: TimelineOrientation;
40
+ /** Host-level `aria-label` override for the list's accessible name — wins over the localized
41
+ * default `"Timeline"`. Needed because the `role="list"` element lives in the shadow root and
42
+ * never inherits a host attribute automatically — same reasoning as `<lyra-breadcrumb>`'s
43
+ * identical property. */
44
+ accessibleLabel: string;
45
+ private slottedCount;
46
+ protected willUpdate(): void;
47
+ firstUpdated(): void;
48
+ /** Read-only, live-updated count of the currently-slotted `<lyra-timeline-item>` children — handy
49
+ * for building a `"{count} events"` header without hand-counting DOM children. */
50
+ get itemCount(): number;
51
+ private onSlotChange;
52
+ render(): TemplateResult;
53
+ }
54
+ declare global {
55
+ interface HTMLElementTagNameMap {
56
+ 'lyra-timeline': LyraTimeline;
57
+ }
58
+ }
59
+ //# sourceMappingURL=timeline.class.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline.class.d.ts","sourceRoot":"","sources":["../../../src/components/timeline/timeline.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAG7D,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,YAAY,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C,MAAM,CAAC,MAAM,iCAAgC;IAE7C;;;iBAGa;IACD,WAAW,EAAE,mBAAmB,CAAc;IAE1D;;;8BAG0B;IACa,eAAe,SAAM;IAMnD,OAAO,CAAC,YAAY,CAAK;IAElC,SAAS,CAAC,UAAU,IAAI,IAAI,CAQ3B;IAED,YAAY,IAAI,IAAI,CAKnB;IAED;uFACmF;IACnF,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,OAAO,CAAC,YAAY,CAElB;IAEF,MAAM,IAAI,cAAc,CAMvB;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,YAAY,CAAC;KAC/B;CACF"}
@@ -0,0 +1,100 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { html } from 'lit';
8
+ import { property, state } from 'lit/decorators.js';
9
+ import { LyraElement } from '../../internal/lyra-element.js';
10
+ import { styles } from './timeline.styles.js';
11
+ /**
12
+ * `<lyra-timeline>` — an ordered, connected sequence of past-event rows (an audit trail, an agent
13
+ * action history, a changelog) composed from `<lyra-timeline-item>` light-DOM children, joined by a
14
+ * continuous connecting rail. First-party invention: no Web Awesome/Shoelace counterpart exists, so
15
+ * this follows the library's own established conventions rather than mirroring an upstream API.
16
+ *
17
+ * A pure, read-only, declarative display component — same zero-event shape as `<lyra-badge>`/
18
+ * `<lyra-avatar>`/`<lyra-skeleton>`. It never mutates its own children and fires no events; a
19
+ * consumer who needs to react to item count changes already owns the mutation (they're the one
20
+ * adding/removing `<lyra-timeline-item>` children) and can listen to the native `slotchange` event
21
+ * directly if truly needed.
22
+ *
23
+ * No keyboard navigation, roving-tabindex, or selection model of any kind — a deliberate scope
24
+ * decision, not an oversight. A timeline is a passive record display, not a navigable widget; see
25
+ * `<lyra-timeline-item>`'s class doc for the full reasoning behind dropping an earlier
26
+ * "interactive row" design. Not a form-associated control — no value to submit, no label/hint/error
27
+ * chrome.
28
+ *
29
+ * @customElement lyra-timeline
30
+ * @slot - `<lyra-timeline-item>` children, in display order.
31
+ * @csspart base - The root wrapper. `role="list"` lives here directly (a timeline isn't a navigation
32
+ * landmark, so it doesn't need a two-layer `base`+`list` split). Flex container: `flex-direction:
33
+ * column` in `vertical` orientation (the default), `flex-direction: row` (with `overflow-x: auto`)
34
+ * in `horizontal` orientation.
35
+ * @cssprop [--lyra-timeline-gap=var(--lyra-space-l)] - Spacing between consecutive items along the
36
+ * timeline's main axis; also the length each item's own rail visually bridges to reach the next
37
+ * item's marker. Declared here but actually consumed inside each `<lyra-timeline-item>`'s own
38
+ * stylesheet, via ordinary CSS custom-property inheritance across the slot boundary.
39
+ */
40
+ export class LyraTimeline extends LyraElement {
41
+ constructor() {
42
+ super(...arguments);
43
+ /** `'vertical'` (the default) lays items out in a column, the primary/most-common use case — an
44
+ * audit trail or agent history reads top-to-bottom. `'horizontal'` lays them out in a row.
45
+ * Deliberately differs from `<lyra-stepper>`'s `'horizontal'` default — don't copy that default by
46
+ * habit. */
47
+ this.orientation = 'vertical';
48
+ /** Host-level `aria-label` override for the list's accessible name — wins over the localized
49
+ * default `"Timeline"`. Needed because the `role="list"` element lives in the shadow root and
50
+ * never inherits a host attribute automatically — same reasoning as `<lyra-breadcrumb>`'s
51
+ * identical property. */
52
+ this.accessibleLabel = '';
53
+ // Tracks the default slot's assigned-element count purely for the `itemCount` convenience getter
54
+ // below -- copies <lyra-source-list>'s sourceCount three-part technique (pre-count in willUpdate to
55
+ // dodge a wasted second update, reconciled in firstUpdated via the authoritative slot-based count,
56
+ // kept live afterward via slotchange) rather than re-deriving it.
57
+ this.slottedCount = 0;
58
+ this.onSlotChange = (e) => {
59
+ this.slottedCount = e.target.assignedElements({ flatten: true }).length;
60
+ };
61
+ }
62
+ static { this.styles = [LyraElement.styles, styles]; }
63
+ willUpdate() {
64
+ if (!this.hasUpdated) {
65
+ // Must count only children assigned to the *default* slot -- an explicit slot="" attribute
66
+ // still assigns to the default slot per the HTML slot algorithm, so check the attribute's
67
+ // value rather than its mere presence. Otherwise this pre-count could disagree with
68
+ // firstUpdated's authoritative slot-based recount below and schedule a wasted second update.
69
+ this.slottedCount = Array.from(this.children).filter((el) => !el.getAttribute('slot')).length;
70
+ }
71
+ }
72
+ firstUpdated() {
73
+ // Fallback reconciliation for slot-forwarding / engines that don't fire `slotchange` for content
74
+ // present at parse time.
75
+ const slot = this.shadowRoot.querySelector('slot');
76
+ this.slottedCount = slot.assignedElements({ flatten: true }).length;
77
+ }
78
+ /** Read-only, live-updated count of the currently-slotted `<lyra-timeline-item>` children — handy
79
+ * for building a `"{count} events"` header without hand-counting DOM children. */
80
+ get itemCount() {
81
+ return this.slottedCount;
82
+ }
83
+ render() {
84
+ return html `
85
+ <div part="base" role="list" aria-label=${this.accessibleLabel || this.localize('timeline')}>
86
+ <slot @slotchange=${this.onSlotChange}></slot>
87
+ </div>
88
+ `;
89
+ }
90
+ }
91
+ __decorate([
92
+ property()
93
+ ], LyraTimeline.prototype, "orientation", void 0);
94
+ __decorate([
95
+ property({ attribute: 'aria-label' })
96
+ ], LyraTimeline.prototype, "accessibleLabel", void 0);
97
+ __decorate([
98
+ state()
99
+ ], LyraTimeline.prototype, "slottedCount", void 0);
100
+ //# sourceMappingURL=timeline.class.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline.class.js","sourceRoot":"","sources":["../../../src/components/timeline/timeline.class.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAuB,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAI9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAA7C;;QAGE;;;qBAGa;QACD,gBAAW,GAAwB,UAAU,CAAC;QAE1D;;;kCAG0B;QACa,oBAAe,GAAG,EAAE,CAAC;QAE5D,iGAAiG;QACjG,oGAAoG;QACpG,mGAAmG;QACnG,kEA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C;qDAAsB;AAM3C;IAAhB,KAAK,EAAE;kDAA0B"}
@@ -0,0 +1,2 @@
1
+ export * from './timeline.class.js';
2
+ //# sourceMappingURL=timeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../../../src/components/timeline/timeline.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './timeline.class.js';
2
+ import { LyraTimeline } from './timeline.class.js';
3
+ import { defineElement } from '../../internal/prefix.js';
4
+ defineElement('timeline', LyraTimeline);
5
+ //# sourceMappingURL=timeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline.js","sourceRoot":"","sources":["../../../src/components/timeline/timeline.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,aAAa,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const styles: import("lit").CSSResult;
2
+ //# sourceMappingURL=timeline.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline.styles.d.ts","sourceRoot":"","sources":["../../../src/components/timeline/timeline.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBAiDlB,CAAC"}