@aceshooting/lyra-ui 30.9.0 → 31.1.1

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 (283) hide show
  1. package/CHANGELOG.md +361 -335
  2. package/dist/ai/adapters/ag-ui.js +1 -1
  3. package/dist/autoloader-cdn.js +1 -1
  4. package/dist/components/agent-tools/activity-feed/activity-feed.class.js +1 -1
  5. package/dist/components/agent-tools/budget-meter/budget-meter.class.d.ts +12 -1
  6. package/dist/components/agent-tools/budget-meter/budget-meter.class.js +4 -4
  7. package/dist/components/agent-tools/compare-panel/compare-panel.class.js +1 -1
  8. package/dist/components/agent-tools/eval-dataset/eval-dataset.class.js +1 -1
  9. package/dist/components/agent-tools/thinking-panel/thinking-panel.class.js +1 -1
  10. package/dist/components/agent-tools/tool-select-dialog/tool-select-dialog.class.js +1 -1
  11. package/dist/components/charts/chart/box-plot.class.js +2 -2
  12. package/dist/components/charts/chart/chart-sync.js +1 -1
  13. package/dist/components/charts/chart/chart.class.d.ts +1 -1
  14. package/dist/components/charts/chart/chart.class.js +4 -4
  15. package/dist/components/charts/chart/lite-chart-axis-layout.js +1 -1
  16. package/dist/components/charts/chart/lite-chart.class.js +2 -2
  17. package/dist/components/conversation/chat-composer/chat-composer.class.d.ts +26 -11
  18. package/dist/components/conversation/chat-composer/chat-composer.class.js +11 -9
  19. package/dist/components/conversation/chat-composer/chat-composer.styles.js +1 -1
  20. package/dist/components/conversation/chat-message/chat-message.class.d.ts +27 -3
  21. package/dist/components/conversation/chat-message/chat-message.class.js +14 -12
  22. package/dist/components/conversation/chat-message/chat-message.styles.js +1 -1
  23. package/dist/components/conversation/chat-viewport/chat-viewport.class.d.ts +29 -2
  24. package/dist/components/conversation/chat-viewport/chat-viewport.class.js +2 -2
  25. package/dist/components/conversation/chat-viewport/chat-viewport.styles.js +1 -1
  26. package/dist/components/conversation/code-block/code-block-shared.js +1 -1
  27. package/dist/components/conversation/markdown/markdown-base.class.d.ts +1 -1
  28. package/dist/components/conversation/markdown/markdown-base.class.js +1 -1
  29. package/dist/components/conversation/markdown/markdown-code-header.js +1 -1
  30. package/dist/components/conversation/markdown/markdown-core.class.d.ts +10 -0
  31. package/dist/components/conversation/markdown/markdown-core.class.js +1 -1
  32. package/dist/components/conversation/markdown/markdown-shared.d.ts +7 -2
  33. package/dist/components/conversation/markdown/markdown-shared.js +3 -3
  34. package/dist/components/conversation/markdown/markdown.class.d.ts +10 -0
  35. package/dist/components/conversation/markdown/markdown.class.js +1 -1
  36. package/dist/components/conversation/message-feedback/message-feedback.class.d.ts +11 -3
  37. package/dist/components/conversation/message-feedback/message-feedback.class.js +12 -6
  38. package/dist/components/conversation/message-feedback/message-feedback.styles.js +1 -1
  39. package/dist/components/conversation/message-parts/message-parts.class.js +1 -1
  40. package/dist/components/conversation/prompt-input/prompt-input.class.d.ts +8 -4
  41. package/dist/components/conversation/prompt-input/prompt-input.class.js +3 -2
  42. package/dist/components/conversation/push-to-talk/push-to-talk.class.js +1 -1
  43. package/dist/components/conversation/streaming-text/streaming-text-base.class.d.ts +4 -0
  44. package/dist/components/conversation/streaming-text/streaming-text-base.class.js +1 -1
  45. package/dist/components/conversation/streaming-text/streaming-text-core.class.d.ts +1 -1
  46. package/dist/components/conversation/streaming-text/streaming-text-core.class.js +1 -0
  47. package/dist/components/conversation/streaming-text/streaming-text.class.d.ts +1 -1
  48. package/dist/components/conversation/streaming-text/streaming-text.class.js +1 -0
  49. package/dist/components/conversation/suggestion-chips/suggestion-chips.class.d.ts +17 -3
  50. package/dist/components/conversation/suggestion-chips/suggestion-chips.class.js +3 -3
  51. package/dist/components/conversation/suggestion-chips/suggestion-chips.d.ts +1 -1
  52. package/dist/components/conversation/suggestion-chips/suggestion-chips.js +1 -1
  53. package/dist/components/conversation/suggestion-chips/suggestion-chips.styles.js +1 -1
  54. package/dist/components/conversation/thread-list/thread-list.class.d.ts +1 -1
  55. package/dist/components/conversation/thread-list/thread-list.class.js +3 -3
  56. package/dist/components/conversation/transcript-feed/transcript-feed.class.js +1 -1
  57. package/dist/components/data/data-grid/data-grid.class.d.ts +10 -10
  58. package/dist/components/data/data-grid/data-grid.class.js +1 -1
  59. package/dist/components/data/document-library/document-library-cursor.js +1 -0
  60. package/dist/components/data/document-library/document-library-types.d.ts +20 -0
  61. package/dist/components/data/document-library/document-library.class.d.ts +37 -26
  62. package/dist/components/data/document-library/document-library.class.js +20 -11
  63. package/dist/components/data/document-library/document-library.styles.js +1 -1
  64. package/dist/components/data/file-tree/file-tree.class.js +1 -1
  65. package/dist/components/data/flow-canvas/flow-canvas.class.d.ts +1 -1
  66. package/dist/components/data/flow-canvas/flow-canvas.class.js +2 -2
  67. package/dist/components/data/heatmap/heatmap.class.d.ts +1 -1
  68. package/dist/components/data/heatmap/heatmap.class.js +1 -1
  69. package/dist/components/data/pagination/pagination.class.js +1 -1
  70. package/dist/components/data/table/table.class.d.ts +31 -2
  71. package/dist/components/data/table/table.class.js +3 -3
  72. package/dist/components/data/table/table.styles.js +1 -1
  73. package/dist/components/data/timeline/timeline-cluster.js +1 -1
  74. package/dist/components/data/timeline/timeline-item.class.d.ts +10 -3
  75. package/dist/components/data/timeline/timeline-item.class.js +16 -12
  76. package/dist/components/data/timeline/timeline-item.styles.js +1 -1
  77. package/dist/components/data/timeline/timeline.class.d.ts +14 -2
  78. package/dist/components/data/timeline/timeline.class.js +9 -5
  79. package/dist/components/data/tree/tree-item.class.js +1 -1
  80. package/dist/components/data/tree/tree.class.d.ts +2 -0
  81. package/dist/components/data/tree/tree.class.js +1 -1
  82. package/dist/components/forms/button/button.class.d.ts +8 -6
  83. package/dist/components/forms/button/button.class.js +2 -2
  84. package/dist/components/forms/checkbox-group/checkbox-group.class.js +1 -1
  85. package/dist/components/forms/color-picker/color-core.js +1 -1
  86. package/dist/components/forms/combobox/combobox.class.d.ts +20 -12
  87. package/dist/components/forms/combobox/combobox.class.js +2 -2
  88. package/dist/components/forms/date-picker/date-input.class.d.ts +1 -1
  89. package/dist/components/forms/date-picker/date-input.class.js +1 -1
  90. package/dist/components/forms/icon-button/icon-button.class.d.ts +4 -2
  91. package/dist/components/forms/icon-button/icon-button.class.js +2 -2
  92. package/dist/components/forms/input/input-shared.js +2 -2
  93. package/dist/components/forms/input/number-input-locale.js +1 -0
  94. package/dist/components/forms/input/number-input.class.d.ts +19 -2
  95. package/dist/components/forms/input/number-input.class.js +2 -2
  96. package/dist/components/forms/locale-picker/locale-picker.class.d.ts +3 -3
  97. package/dist/components/forms/locale-picker/locale-picker.class.js +1 -1
  98. package/dist/components/layout/app-rail-group/app-rail-group.class.js +1 -1
  99. package/dist/components/layout/details/accordion-item.class.js +1 -1
  100. package/dist/components/layout/dock-panel/dock-panel.class.d.ts +1 -1
  101. package/dist/components/layout/dock-panel/dock-panel.class.js +1 -1
  102. package/dist/components/layout/menu/menu.class.js +1 -1
  103. package/dist/components/layout/multi-split/multi-split.class.js +1 -1
  104. package/dist/components/layout/navigation-menu-item/navigation-menu-item.class.js +1 -1
  105. package/dist/components/layout/page/page.class.d.ts +3 -3
  106. package/dist/components/layout/page/page.class.js +1 -1
  107. package/dist/components/layout/segmented/segmented.class.d.ts +20 -7
  108. package/dist/components/layout/segmented/segmented.class.js +34 -24
  109. package/dist/components/layout/segmented/segmented.styles.js +1 -1
  110. package/dist/components/layout/stepper/stepper.styles.js +1 -1
  111. package/dist/components/layout/tab-group/tab-group.class.d.ts +8 -1
  112. package/dist/components/layout/tab-group/tab-group.class.js +1 -1
  113. package/dist/components/layout/tab-group/tab.class.d.ts +7 -1
  114. package/dist/components/layout/tab-group/tab.class.js +1 -1
  115. package/dist/components/layout/virtual-list/virtual-list.class.d.ts +2 -2
  116. package/dist/components/layout/virtual-list/virtual-list.class.js +1 -1
  117. package/dist/components/media/animated-image/animated-image.class.js +1 -1
  118. package/dist/components/media/attachment-chip/attachment-chip.class.d.ts +21 -14
  119. package/dist/components/media/attachment-chip/attachment-chip.class.js +1 -1
  120. package/dist/components/media/attachment-trigger/attachment-trigger.class.d.ts +36 -12
  121. package/dist/components/media/attachment-trigger/attachment-trigger.class.js +3 -3
  122. package/dist/components/media/drop-zone/drop-zone.class.d.ts +23 -5
  123. package/dist/components/media/drop-zone/drop-zone.class.js +2 -2
  124. package/dist/components/media/drop-zone/drop-zone.styles.js +1 -1
  125. package/dist/components/media/file-icon/file-icon.class.js +1 -1
  126. package/dist/components/media/flag/flag-url-resolver.js +1 -1
  127. package/dist/components/media/image-viewer/image-viewer.class.d.ts +2 -2
  128. package/dist/components/media/image-viewer/image-viewer.class.js +1 -1
  129. package/dist/components/media/map/map-anchor-controller.js +1 -1
  130. package/dist/components/media/map/map-canvas-target.js +1 -0
  131. package/dist/components/media/map/map-owned-features.js +1 -1
  132. package/dist/components/media/map/map-scene-elevated-lines.js +2 -2
  133. package/dist/components/media/map/map-scene-render-controller.js +1 -1
  134. package/dist/components/media/map/map.class.d.ts +15 -6
  135. package/dist/components/media/map/map.class.js +4 -4
  136. package/dist/components/media/map/map.styles.js +1 -1
  137. package/dist/components/media/pan-zoom/pan-zoom.class.js +1 -1
  138. package/dist/components/media/sequence-playback/sequence-playback.class.d.ts +21 -9
  139. package/dist/components/media/sequence-playback/sequence-playback.class.js +7 -6
  140. package/dist/components/media/sequence-playback/sequence-playback.styles.js +1 -1
  141. package/dist/components/media/video/video.class.d.ts +3 -3
  142. package/dist/components/media/video/video.class.js +3 -1
  143. package/dist/components/media/video-playlist/video-playlist.class.js +1 -1
  144. package/dist/components/overlays/chip/chip.class.js +1 -1
  145. package/dist/components/overlays/overlay/dropdown.class.js +1 -1
  146. package/dist/components/overlays/overlay/overlay.styles.js +1 -1
  147. package/dist/components/overlays/overlay/tooltip.class.d.ts +5 -1
  148. package/dist/components/overlays/overlay/tooltip.class.js +3 -3
  149. package/dist/components/retrieval/embedding-explorer/embedding-explorer-engine.js +1 -1
  150. package/dist/components/retrieval/graph/graph-node-renderer.js +1 -1
  151. package/dist/components/retrieval/graph/graph-spatial-controller.js +1 -1
  152. package/dist/components/retrieval/graph/graph.class.d.ts +1 -1
  153. package/dist/components/retrieval/graph/graph.class.js +1 -1
  154. package/dist/components/retrieval/ingestion-queue/ingestion-queue-presentation.d.ts +11 -0
  155. package/dist/components/retrieval/ingestion-queue/ingestion-queue-presentation.js +1 -0
  156. package/dist/components/retrieval/ingestion-queue/ingestion-queue.class.d.ts +18 -7
  157. package/dist/components/retrieval/ingestion-queue/ingestion-queue.class.js +13 -26
  158. package/dist/components/retrieval/ingestion-queue/ingestion-queue.styles.js +1 -1
  159. package/dist/components/retrieval/mind-map/mind-map.class.js +1 -1
  160. package/dist/components/retrieval/neighbor-list/neighbor-list.class.d.ts +1 -1
  161. package/dist/components/retrieval/neighbor-list/neighbor-list.class.js +3 -3
  162. package/dist/components/retrieval/retrieval-results/retrieval-results.class.js +1 -1
  163. package/dist/components/utility/diff-view/diff-view.class.d.ts +5 -5
  164. package/dist/components/utility/diff-view/diff-view.class.js +1 -1
  165. package/dist/components/utility/icon/icon.class.js +1 -1
  166. package/dist/components/utility/json-viewer/json-viewer.class.d.ts +16 -1
  167. package/dist/components/utility/json-viewer/json-viewer.class.js +4 -4
  168. package/dist/components/utility/json-viewer/json-viewer.styles.js +1 -1
  169. package/dist/components/utility/known-date/known-date.class.js +1 -1
  170. package/dist/components/utility/mention-popover/mention-popover.class.js +1 -1
  171. package/dist/components/viewers/archive-viewer/archive-viewer.class.js +1 -1
  172. package/dist/components/viewers/calendar-viewer/calendar-viewer.class.js +1 -1
  173. package/dist/components/viewers/contact-viewer/contact-viewer.class.js +1 -1
  174. package/dist/components/viewers/csv-viewer/csv-viewer.class.js +1 -1
  175. package/dist/components/viewers/dataset-viewer/dataset-viewer.class.js +1 -1
  176. package/dist/components/viewers/document-preview/document-preview.class.js +2 -2
  177. package/dist/components/viewers/docx-viewer/docx-viewer.class.d.ts +1 -1
  178. package/dist/components/viewers/docx-viewer/docx-viewer.class.js +2 -2
  179. package/dist/components/viewers/ebook-viewer/ebook-viewer.class.js +1 -1
  180. package/dist/components/viewers/email-viewer/email-viewer.class.d.ts +1 -1
  181. package/dist/components/viewers/email-viewer/email-viewer.class.js +2 -2
  182. package/dist/components/viewers/html-viewer/html-viewer.class.js +1 -1
  183. package/dist/components/viewers/include/include.class.js +1 -1
  184. package/dist/components/viewers/model-viewer/model-viewer.class.js +1 -1
  185. package/dist/components/viewers/notebook-viewer/notebook-viewer.class.js +2 -2
  186. package/dist/components/viewers/pdf-viewer/pdf-viewer.class.d.ts +2 -2
  187. package/dist/components/viewers/pdf-viewer/pdf-viewer.class.js +2 -2
  188. package/dist/components/viewers/pptx-viewer/pptx-viewer.class.js +1 -1
  189. package/dist/components/viewers/spreadsheet-viewer/spreadsheet-viewer.class.js +1 -1
  190. package/dist/components/viewers/svg-viewer/svg-viewer.class.js +1 -1
  191. package/dist/components/viewers/table-viewer-shared.js +4 -4
  192. package/dist/components/viewers/xml-viewer/xml-viewer.class.js +2 -2
  193. package/dist/data-sources.d.ts +10 -0
  194. package/dist/events.d.ts +9 -4
  195. package/dist/framework-types.d.ts +1 -1
  196. package/dist/internal/anchored-overlay-runtime.js +1 -1
  197. package/dist/internal/catalog-picker.js +1 -1
  198. package/dist/internal/default-strings/conversation.generated.js +1 -1
  199. package/dist/internal/default-strings/data.generated.js +1 -1
  200. package/dist/internal/default-strings/retrieval.generated.js +1 -1
  201. package/dist/internal/document-tokens.js +2 -2
  202. package/dist/internal/drop-session-controller.js +1 -1
  203. package/dist/internal/engine-3d.js +1 -1
  204. package/dist/internal/icon-only-content.js +1 -1
  205. package/dist/internal/layered-layout.js +1 -1
  206. package/dist/internal/localization-types.d.ts +1 -1
  207. package/dist/internal/localization.js +1 -1
  208. package/dist/internal/lyra-element.js +2 -2
  209. package/dist/internal/map-custom-layer-controller.js +1 -1
  210. package/dist/internal/media-panorama.js +1 -1
  211. package/dist/internal/native-modal-context.js +1 -1
  212. package/dist/internal/overlay-manager.js +1 -1
  213. package/dist/internal/overlay-order.js +1 -1
  214. package/dist/internal/overlay-stack.js +1 -1
  215. package/dist/internal/package-metadata.js +1 -1
  216. package/dist/internal/runtime-diagnostics.js +1 -0
  217. package/dist/internal/safe-url.js +1 -1
  218. package/dist/internal/scoped-definitions.generated.js +1 -1
  219. package/dist/internal/scroll-overflow.js +1 -1
  220. package/dist/internal/source-cursor-controller.js +1 -0
  221. package/dist/internal/source-cursor-projection.js +1 -0
  222. package/dist/internal/source-page-scope.js +1 -1
  223. package/dist/internal/source-window-controller.js +1 -1
  224. package/dist/internal/text-quote.js +1 -1
  225. package/dist/internal/viewer-search.js +1 -1
  226. package/dist/lyra.d.ts +1 -1
  227. package/dist/sequence-time-binding.js +1 -1
  228. package/dist/simulation-clock.js +1 -1
  229. package/dist/styles/reservations.css +1 -1
  230. package/dist/styles/reservations.styles.js +1 -1
  231. package/dist/testing/happy-dom-shims.js +1 -1
  232. package/dist/theme/theme-bootstrap.js +1 -1
  233. package/dist/theme/theme.js +1 -1
  234. package/dist/utilities/overlay-manager.d.ts +2 -0
  235. package/llms/components/lr-attachment-chip.md +27 -12
  236. package/llms/components/lr-attachment-trigger.md +27 -7
  237. package/llms/components/lr-budget-meter.md +31 -0
  238. package/llms/components/lr-button.md +6 -4
  239. package/llms/components/lr-chat-composer.md +26 -9
  240. package/llms/components/lr-chat-message.md +44 -3
  241. package/llms/components/lr-chat-viewport.md +39 -2
  242. package/llms/components/lr-combobox.md +27 -1
  243. package/llms/components/lr-data-grid.md +2 -0
  244. package/llms/components/lr-dialog.md +10 -0
  245. package/llms/components/lr-diff-view.md +6 -0
  246. package/llms/components/lr-document-library.md +90 -6
  247. package/llms/components/lr-drop-zone.md +26 -2
  248. package/llms/components/lr-graph.md +5 -0
  249. package/llms/components/lr-icon-button.md +2 -1
  250. package/llms/components/lr-ingestion-queue.md +76 -8
  251. package/llms/components/lr-json-viewer.md +51 -0
  252. package/llms/components/lr-lite-chart.md +2 -1
  253. package/llms/components/lr-locale-picker.md +5 -0
  254. package/llms/components/lr-map.md +33 -0
  255. package/llms/components/lr-markdown-core.md +2 -1
  256. package/llms/components/lr-markdown.md +20 -4
  257. package/llms/components/lr-menu.md +3 -1
  258. package/llms/components/lr-message-feedback.md +38 -3
  259. package/llms/components/lr-number-input.md +28 -1
  260. package/llms/components/lr-page.md +4 -2
  261. package/llms/components/lr-prompt-input.md +6 -3
  262. package/llms/components/lr-segmented.md +30 -10
  263. package/llms/components/lr-sequence-playback.md +47 -12
  264. package/llms/components/lr-streaming-text-core.md +3 -2
  265. package/llms/components/lr-streaming-text.md +4 -1
  266. package/llms/components/lr-suggestion-chips.md +28 -5
  267. package/llms/components/lr-tab-group.md +13 -1
  268. package/llms/components/lr-tab.md +5 -0
  269. package/llms/components/lr-table.md +25 -4
  270. package/llms/components/lr-timeline-item.md +1 -1
  271. package/llms/components/lr-timeline.md +38 -4
  272. package/llms/components/lr-tooltip.md +3 -1
  273. package/llms/components/lr-tree.md +4 -0
  274. package/llms/components/lr-virtual-list.md +4 -1
  275. package/llms/peers.md +2 -2
  276. package/llms/shared/events-and-types.md +61 -2
  277. package/llms/shared/forms-and-accessibility.md +46 -4
  278. package/llms/shared/imports-and-registration.md +154 -110
  279. package/llms/shared/testing-and-utilities.md +5 -1
  280. package/llms/shared.md +266 -117
  281. package/locales.json +1 -1
  282. package/package.json +22 -21
  283. package/registrations.json +1 -1
@@ -25,6 +25,37 @@ its own localized accessible name.
25
25
 
26
26
  **Heading and unit:** `headingLevel: LyraHeadingLevel = '2'` (attribute `heading-level`); an empty `label` renders no heading. The unit is passed bare to `budgetMeterValue`, so a translated message owns the spacing around `{unit}`.
27
27
 
28
+ **Quantity formatting:** property-only `valueFormatter?: BudgetMeterValueFormatter` uses
29
+ `BudgetMeterValueFormatter = (value: number, context: BudgetMeterFormatContext) => string`.
30
+ `BudgetMeterFormatContext { readonly locale: string; }` contains only the effective locale and is
31
+ frozen when passed to the callback. Both types are exported from
32
+ `@aceshooting/lyra-ui/components/agent-tools/budget-meter/budget-meter.class.js`.
33
+ The callback receives `used` and `limit`
34
+ independently, each normalized to a finite nonnegative number; usage is not clamped to the limit
35
+ before formatting. It must be synchronous and side-effect-free. Return nonblank plain text of at
36
+ most 65,536 UTF-16 code units per quantity. Text is escaped normally, never interpreted as markup.
37
+
38
+ The same accepted pair feeds visible value text and `aria-valuetext`. The localized
39
+ `budgetMeterValue` sentence and optional `unit` still wrap those strings; omit `unit` when each
40
+ formatted quantity already includes one. Numeric ARIA values, percentage, fill clamping and
41
+ exceeded/unavailable state retain their numeric semantics. An unset formatter, throw, nonstring,
42
+ blank or oversized result restores numeric formatting for **both** quantities. A callback that
43
+ changes the meter or requests an update invalidates its pair and is not automatically retried in
44
+ that render chain; a later external update can retry the same callback. Formatting adds no event
45
+ or slot.
46
+
47
+ ```ts
48
+ import '@aceshooting/lyra-ui/components/lr-budget-meter.js';
49
+ import { formatBytes } from '@aceshooting/lyra-ui/utilities/format.js';
50
+
51
+ const meter = document.querySelector('lr-budget-meter')!;
52
+ meter.used = 10 * 1024 ** 3;
53
+ meter.limit = 50 * 1024 ** 3;
54
+ // formatBytes supplies the unit for each quantity.
55
+ meter.unit = undefined;
56
+ meter.valueFormatter = (value, { locale }) => formatBytes(value, locale) ?? '';
57
+ ```
58
+
28
59
  **CSS parts:**
29
60
 
30
61
  | Part | Purpose |
@@ -39,10 +39,12 @@ The icon and label stay centered under `--lr-button-justify`, separated by `--lr
39
39
 
40
40
  **Properties:**
41
41
 
42
- - `href?: string` — when set to a safe link URL (`http:`/`https:`/`blob:`/`mailto:`/relative; see
43
- `safeLinkHref`), the root renders as an `<a href=…>` instead of a `<button>`. Setting `download`
44
- narrows the allowlist to `http:`/`https:`/`blob:`/relative — `mailto:` names no retrievable bytes,
45
- so a `mailto:` href paired with `download` falls back to the native `<button>`. Unset (the default)
42
+ - `href?: string` — when set to a safe link URL (`http:`/`https:`/`blob:`/`mailto:`/`tel:`/`sms:`/
43
+ relative; see `safeActionLinkHref`), the root renders as an `<a href=…>` instead of a `<button>`.
44
+ `tel:` and `sms:` hand off to the dialer or messaging app, like `mailto:` to the mail client
45
+ (`<lr-button href="tel:+40700000100">Call</lr-button>`). Setting `download` narrows the allowlist
46
+ to `http:`/`https:`/`blob:`/relative — a handoff names no retrievable bytes, so a `mailto:`,
47
+ `tel:` or `sms:` href paired with `download` falls back to the native `<button>`. Unset (the default)
46
48
  renders a plain `<button>`, unchanged. `type` (submit/reset) has no effect while the anchor
47
49
  renders. While the button is disabled the anchor is rendered **without** `href` (keeping
48
50
  `aria-disabled="true"`), so it cannot navigate; it also uses `--lr-opacity-disabled`, a
@@ -49,12 +49,25 @@ reveals the invalid state, and `form.reset()` clears the touched presentation.
49
49
  _control fills itself_, and one property name cannot mean both. The focus affordance is swapped,
50
50
  not dropped — see **Known gotchas**
51
51
  - `actionsLayout: ChatComposerActionsLayout = 'inline'` (reflected, attribute `actions-layout`) —
52
- `'inline' | 'stacked'`. `'inline'` (the default) keeps today's single flex row. `'stacked'`
53
- arranges the `start` and `end` action slots as a compact one-column rail (`start` above `end`)
54
- beside a `textarea` that spans both rows — for a multi-row composer (a taller `min-rows`) where
55
- stretching the action buttons across the row's full height would otherwise look wrong. Layout
52
+ `'inline' | 'stacked' | 'below'`. `'inline'` (the default) keeps today's single flex row.
53
+ `'stacked'` arranges the `start` and `end` action slots as a compact one-column rail (`start`
54
+ above `end`) beside a `textarea` that spans both rows — for a multi-row composer (a taller
55
+ `min-rows`) where stretching the action buttons across the row's full height would otherwise look
56
+ wrong. `'below'` gives the `textarea` its own full-width line and puts `start` and `end` on one
57
+ row beneath it, `start` at the inline start and `end` at the inline end (also while `start` is
58
+ empty; mirrored under RTL) — the usual phone-width chat input with attach buttons. `min-rows`/
59
+ `max-rows` growth and inner scrolling are unchanged in every layout. Layout
56
60
  only; slot content, empty-slot hiding and the built-in button are unchanged. Invalid direct or
57
61
  attribute values normalize and reflect as `'inline'`.
62
+ - `toolbarPlacement: ChatComposerToolbarPlacement = 'above'` (reflected, attribute
63
+ `toolbar-placement`) — `'above' | 'actions'`. By default the toolbar remains above attachments
64
+ and the input row. With `actionsLayout='below'`, `'actions'` places it between `start` and `end`
65
+ below the textarea, while attachments stay above the textarea. Inline and stacked layouts retain
66
+ the upper toolbar. Bottom controls use native Tab order: textarea, start, toolbar, end; callers
67
+ own keyboard behavior inside their toolbar controls. Long toolbar content stays in a bounded
68
+ wrapping/scrolling region so start and send remain visible at narrow widths and in RTL. Live
69
+ placement changes retain the textarea, draft, selection and focused caller controls. Invalid or
70
+ removed placement values normalize and reflect as `'above'`.
58
71
  - `withoutEnterSubmit: boolean = false` (reflected, attribute `without-enter-submit`) — when set,
59
72
  Enter always inserts a newline instead of submitting.
60
73
  - `submitDisabled: boolean = false` (reflected, attribute `submit-disabled`) — consumer-controlled
@@ -101,8 +114,10 @@ validity and recomputes the current intrinsic constraints.
101
114
  preventing it also prevents the native `invalid` event that produced it
102
115
 
103
116
  **Slots:** `toolbar` (auxiliary controls, e.g. a model or provider picker, rendered inside the
104
- frame above the chips tray and input row, sharing `[part="base"]`'s `:focus-within` affordance),
105
- `start` (content before the textarea, e.g. an attach-file trigger button), `end` (overrides the
117
+ frame above the chips tray and input row by default, or between start/end below the textarea with
118
+ `toolbar-placement="actions"` and `actions-layout="below"`, sharing `[part="base"]`'s
119
+ `:focus-within` affordance),
120
+ `start` (content at the logical start of the input/action layout, e.g. an attach-file trigger button), `end` (overrides the
106
121
  built-in send/stop button entirely when it has assigned content), `chips` (an attachment tray
107
122
  rendered above the input row).
108
123
 
@@ -194,8 +209,10 @@ and disables only the built-in Send button; editing and busy-state Stop behavior
194
209
  restyle `[part="base"]` under `plain` and want to draw your own focus cue instead (e.g. on a
195
210
  wrapper you place the composer inside), set `--lr-chat-composer-focus-shadow: none` rather than
196
211
  fighting the default with a higher-specificity override.
197
- - `actions-layout="stacked"` only changes `[part="row"]`'s layout (a CSS grid instead of a flex
198
- row); it does not change which slot content is hidden or when the built-in button replaces
199
- `end`.
212
+ - `actions-layout="stacked"` and `actions-layout="below"` only change `[part="row"]`'s layout (a
213
+ CSS grid instead of a flex row); they do not change which slot content is hidden or when the
214
+ built-in button replaces `end`. `reservations.css` reserves the taller resting footprint of
215
+ `below` (for the default `min-rows="1"`) before upgrade, so no `::part(row)` grid or hand-written
216
+ reservation is needed.
200
217
 
201
218
  ---
@@ -9,7 +9,7 @@
9
9
  - **Release history** [CHANGELOG.md](../../CHANGELOG.md); family-wide breaking-change summaries: [conversation](https://github.com/aceshooting/lyra-ui/blob/main/packages/lyra-ui/llms/conversation.md)
10
10
  - **Deprecations** none
11
11
  - **Optional peers** none
12
- - **Themeable via** 14 parts, 19 custom properties — see this component's own `@csspart`/`@cssprop` list below
12
+ - **Themeable via** 14 parts, 24 custom properties — see this component's own `@csspart`/`@cssprop` list below
13
13
  - **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
14
14
 
15
15
  ---
@@ -60,6 +60,16 @@ after the write fulfills.
60
60
  `ChatMessageActionsPosition` remains exported as the same union.
61
61
  - `messageId: string = ''` (attribute `message-id`, reflected) — optional stable application id;
62
62
  included in `lr-message-retry` detail when the built-in retry control is activated
63
+ - `avatarPlacement: ChatMessageAvatarPlacement = 'top'` (`'top' | 'start' | 'end'`, attribute
64
+ `avatar-placement`, reflected) — `'top'` keeps `[part="avatar"]` in the header row above the body;
65
+ `'start'`/`'end'` move it into its own column of `[part="bubble"]` beside the body at the inline
66
+ start/end (mirrored under RTL), while badges and the collapse toggle stay in the header. Any
67
+ other value behaves as `'top'`.
68
+ - `announceStatus: boolean = true` (attribute `announce-status`, reflected; `announce-status="false"`
69
+ in markup turns it off) — whether status transitions are announced through the shared live region
70
+ (see "Accessibility of `status`" below). Off, neither the failure nor the streaming-complete
71
+ announcement fires; the visible `[part="status-text"]` is unchanged. Use it when the application
72
+ announces each finished reply with its own text.
63
73
 
64
74
  **Events:** `lr-message-retry` (`detail: { messageId?: string }`; fired by the built-in retry button,
65
75
  only rendered when `status="failed"`). `lr-toggle-request` is cancelable and carries
@@ -85,8 +95,10 @@ after `bubble` when `actions-placement="outside"`), `failure` (`display: content
85
95
  `failure` slot; contributes no box when the slot is empty)
86
96
 
87
97
  **Themeable custom properties:** `--lr-chat-message-max-width` (default `80%` — the bubble's max
88
- inline size; component-specific, no shared width token exists), four role-scoped bubble color
89
- properties:
98
+ inline size; component-specific, no shared width token exists), `--lr-chat-message-width` (default
99
+ `auto` — the bubble's inline size; `fit-content` shrinks each bubble to its content, still capped by
100
+ `--lr-chat-message-max-width` and still aligned to its role's side, so a one-word user message renders
101
+ a compact end-aligned bubble), four role-scoped bubble color properties:
90
102
 
91
103
  - `--lr-chat-message-bubble-bg` (default `var(--lr-color-surface)`) — bubble fill for every role
92
104
  except `user`.
@@ -106,6 +118,30 @@ between 4.x and 5.0.0, which silently turned one consumer's inner-surface scrim
106
118
  bubble (near-black text on `rgba(0,0,0,0.22)`, visible only by eye). These four are that stable
107
119
  contract.
108
120
 
121
+ Three border properties cover every role:
122
+
123
+ - `--lr-chat-message-bubble-border-width` (default `var(--lr-border-width-thin)`) — the border width
124
+ for every role and status; `0` removes the border everywhere.
125
+ - `--lr-chat-message-bubble-border-color` (default `var(--lr-color-border-subtle)`) — the border
126
+ color for every role except `user`.
127
+ - `--lr-chat-message-user-bubble-border-color` (default `transparent`) — the border color for
128
+ `message-role="user"`.
129
+
130
+ `status="failed"`/`"streaming"` keep painting their own `--lr-chat-message-failed-border-color` /
131
+ `--lr-chat-message-streaming-border-color` over a recolored resting border.
132
+
133
+ ```html
134
+ <!-- Plain-text assistant reply with a side avatar: no border, no fill -->
135
+ <lr-chat-message
136
+ message-role="assistant"
137
+ avatar-placement="start"
138
+ style="--lr-chat-message-bubble-border-width: 0; --lr-chat-message-bubble-bg: transparent;"
139
+ >
140
+ <span slot="avatar" aria-hidden="true">A</span>
141
+ Reply text
142
+ </lr-chat-message>
143
+ ```
144
+
109
145
  Two matching geometry properties cover the bubble's box:
110
146
 
111
147
  - `--lr-chat-message-bubble-padding` (default `var(--lr-space-m)`) — the bubble's padding.
@@ -160,6 +196,7 @@ Accessibility of `status`: the current status is always available as plain visib
160
196
  politely (`"Message complete."`) — so a screen-reader user not currently focused on this message
161
197
  still learns about it. No other status transition is announced (e.g. `streaming`→`sending`, or
162
198
  `sending`→`sent` without having passed through `streaming`, produce no announcement).
199
+ `announce-status="false"` (`announceStatus = false`) turns off both announcements.
163
200
 
164
201
  **Known gotchas:**
165
202
 
@@ -184,6 +221,10 @@ undefined`, i.e. not the very first update) triggers the live-region announcemen
184
221
  - `--lr-chat-message-streaming-border-color` — Streaming bubble border. Default: `var(--lr-color-brand)`.
185
222
  - `--lr-chat-message-failed-border-color` — Failed bubble border. Default: `var(--lr-color-danger)`.
186
223
  - `--lr-chat-message-failed-bg` — Failed bubble fill. Default: `var(--lr-color-danger-quiet)`.
224
+ - `--lr-chat-message-failed-color` — Failed bubble text color, for every role. Default:
225
+ `var(--lr-color-text)`. It pairs with `--lr-chat-message-failed-bg`, so a light role text color
226
+ (e.g. white `--lr-chat-message-user-bubble-color` on a dark brand fill) never lands on the pale
227
+ failed fill; restyle both together.
187
228
  - `--lr-chat-message-footer-color` — Default footer text. Default: `var(--lr-color-text-quiet)`.
188
229
  - `--lr-chat-message-user-footer-color` — User-message footer text. Default: `var(--lr-color-text)`.
189
230
  - `--lr-chat-message-failed-footer-color` — Failed-message footer text. Default: `var(--lr-color-danger)`.
@@ -9,7 +9,7 @@
9
9
  - **Release history** [CHANGELOG.md](../../CHANGELOG.md); family-wide breaking-change summaries: [conversation](https://github.com/aceshooting/lyra-ui/blob/main/packages/lyra-ui/llms/conversation.md)
10
10
  - **Deprecations** none
11
11
  - **Optional peers** none
12
- - **Themeable via** 5 parts, 0 custom properties — see this component's own `@csspart`/`@cssprop` list below
12
+ - **Themeable via** 5 parts, 3 custom properties — see this component's own `@csspart`/`@cssprop` list below
13
13
  - **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
14
14
 
15
15
  ---
@@ -41,6 +41,13 @@ Hidden, inert, `aria-hidden`, and CSS-hidden content is omitted. Existing declar
41
41
  silent on mount, and appending the same text again creates another announcement. `off` acquires no
42
42
  sink and produces no announcements.
43
43
 
44
+ **Host layout contract.** The host is a flex column (`display: flex; flex-direction: column`), and
45
+ `[part="base"]` and `[part="scroll"]` grow with `flex: 1` inside it. Do not override the host's
46
+ `display`, and give the viewport a bounded block size: an explicit height, a definite-height
47
+ flex/grid track, or a positioned container. With `display: block` (or an unbounded parent) the
48
+ transcript grows with its content and nothing scrolls, without any error. This applies to both
49
+ slotted and virtual mode.
50
+
44
51
  **Properties:** `follow: boolean = true` (reflected) — component-managed stick-to-bottom state,
45
52
  host-writable: setting `true` scrolls to the end and re-engages following, setting `false` releases
46
53
  it. `bottomThreshold: number = 24` (attribute `bottom-threshold`) — px distance from the end still
@@ -50,7 +57,20 @@ index of the first unread item (element-child index in slotted mode, `items` ind
50
57
  `null` disables both the divider and the pill's unread count. `live: 'off' | 'polite' | 'assertive' =
51
58
  'off'` (reflected) — policy for the shared light-DOM announcement sink; the internal log itself
52
59
  remains non-live. Keep `off` for token-by-token streaming and opt in only when complete messages are
53
- appended as direct children at an announcement-safe cadence.
60
+ appended as direct children at an announcement-safe cadence, or use `liveSettle` for streamed
61
+ replies. `liveSettle: number | null = null` (attribute `live-settle`) — announce-when-settled delay
62
+ in ms. While `null`, each appended direct child is announced once at append time. When set and
63
+ `live` is `polite` or `assertive`, a newly appended child is instead announced once, with its final
64
+ accessibility-exposed text, after that text has stayed unchanged for at least the delay and the child
65
+ no longer reports work in progress: `aria-busy="true"` or `status="streaming"` on the child, or an
66
+ `aria-busy="true"`, `status="streaming"` or `streaming` descendant (such as a streaming
67
+ `lr-streaming-text`). The text is sampled every delay, so text rendered in a child's own shadow
68
+ root is followed too; the announcement lands between one and two delays after the last change.
69
+ Values below `50` are raised to `50`; a non-finite value uses `1000`. A child removed before it
70
+ settles, or that never gains text, is not announced; switching `live` to `off`, clearing
71
+ `liveSettle`, or disconnecting drops pending announcements. An `lr-chat-message` moving from
72
+ `streaming` to `sent` still makes its own short "Message complete." announcement; the settled
73
+ announcement follows with the reply text.
54
74
  `label?: string` — accessible name
55
75
  for the log region. Omitting it localizes the default `chatViewportLabel` message; an explicit
56
76
  empty string suppresses that default and renders no label. `accessibleLabel: string | null =
@@ -87,6 +107,23 @@ slotted-content wrapper the growth observers watch), `jump-pill` (the built-in j
87
107
  absent while `follow` is engaged), `unread-divider` (the "New messages" separator, slotted mode
88
108
  only).
89
109
 
110
+ **Themeable custom properties:** `--lr-chat-viewport-padding` (default `var(--lr-space-m)`) —
111
+ padding of `[part="scroll"]` around the transcript, slotted mode only (in virtual mode the slotted
112
+ list owns its spacing). `--lr-chat-viewport-gap` (default `0`) — block-direction gap between slotted
113
+ messages. In slotted mode `[part="content"]` is a flex column, so adjacent message margins add up
114
+ rather than collapse. The unread divider is centred in the space above the first unread message.
115
+ `--lr-chat-viewport-content-max-inline-size` (default `none`) — maximum inline size of the
116
+ transcript column (`[part="content"]`), centred in the scroll container when narrower.
117
+
118
+ ```html
119
+ <lr-chat-viewport
120
+ style="--lr-chat-viewport-padding: 1rem; --lr-chat-viewport-gap: 0.75rem; --lr-chat-viewport-content-max-inline-size: 44rem"
121
+ >
122
+ <lr-chat-message message-role="user">A</lr-chat-message>
123
+ <lr-chat-message message-role="assistant">B</lr-chat-message>
124
+ </lr-chat-viewport>
125
+ ```
126
+
90
127
  Renders no messages and computes no unread state itself — the host supplies `unreadStartIndex`; no
91
128
  virtualization of its own (`lr-virtual-list`); not a generic overflow surface (`lr-scroller`); no
92
129
  message semantics (`lr-chat-message`).
@@ -246,6 +246,11 @@ other value (a plain object, a function) is dropped from the row instead of reac
246
246
  mapped IDLs `inputmode` and `enterkeyhint` delegate to the corresponding camel-case native
247
247
  properties
248
248
  - `inputValue: string` — the live filter input text; programmatic writes are event-silent
249
+ - `minQueryLength: number = 0` (attribute `min-query-length`) — opt-in minimum Unicode code
250
+ points in the trimmed query before suggestions can open or `source` can be called. The actual
251
+ displayed and provider query is preserved verbatim; counting is not grapheme segmentation.
252
+ Negative values clamp to zero, fractional values truncate, and non-finite values fall back to
253
+ zero. Unset or zero preserves unrestricted opening and current source behavior.
249
254
  - `maxOptionsVisible: number = 3` (attribute `max-options-visible` — caps how many selected **tags**
250
255
  show before collapsing to `+N`; nothing to do with the suggestion list, see the three-caps note
251
256
  below)
@@ -337,6 +342,26 @@ including during SSR, a committed value renders as its raw code without an unava
337
342
  synthetic unknown option or custom unknown label. Once the slot has been observed, even when
338
343
  empty, ordinary matched/unmatched presentation applies.
339
344
 
345
+ **Minimum query length:** a positive `minQueryLength` applies to local suggestions and every
346
+ source/opening path, including focus, input, arrow keys, `show()`, direct `open`, public text edits,
347
+ refresh, clear/pick resets and reconnect. A rejected `show()` resolves immediately without
348
+ show/after-show events. Below the minimum the popup and its expanded/active-descendant ARIA state
349
+ stay closed. Typing a qualifying query follows the normal opening/debounce behavior.
350
+
351
+ When editing falls below the minimum, the popup closes without clearing the typed draft, moving
352
+ focus or changing the committed selection. This threshold-forced close is non-cancelable and
353
+ reports hide/after-hide only if the popup was already open; it emits no selection or clear events.
354
+ Ordinary explicit dismissal keeps its existing query-reset contract. Armed searches are canceled,
355
+ in-flight searches are aborted, and obsolete results/errors cannot restore suggestions. Already
356
+ known selected-row labels/data are retained. Raising the minimum reconciles the current query;
357
+ lowering it does not independently reopen or fetch before another normal query/open/refresh action.
358
+
359
+ A positive minimum also suppresses the closed selected-value `source('')` warmup: no short-query
360
+ metadata exception invokes the provider. A newly assigned async selection whose label has never
361
+ been resolved keeps the existing unresolved-selection presentation until a qualifying response can
362
+ resolve it. This does not change `selectedRows`' current/deferred resolution contract. Leave the
363
+ minimum at zero when empty-query label lookup or immediate catalog browsing is required.
364
+
340
365
  **Methods:** `focus(options?)`, `blur()`, `select()`, `setSelectionRange()`, and `setRangeText()`
341
366
  forward to the internal input. `setRangeText()` synchronizes the filter query and visible options.
342
367
  `show(): Promise<void>` and `hide(): Promise<void>` settle after `lr-after-show` and
@@ -426,7 +451,8 @@ disconnect or a positioning runtime failure are non-cancelable because they cann
426
451
  Vetoing an ordinary connected close
427
452
  is atomic: the filter query, active option, async result rows, reflected `open` state, and overlay
428
453
  ownership remain unchanged, so the host can defer dismissal without reconstructing the search.
429
- `lr-after-show` and
454
+ A minimum-query-length forced close is also non-cancelable because an ineligible query cannot
455
+ keep suggestions open. `lr-after-show` and
430
456
  `lr-after-hide` fire when the corresponding transition settles. `lr-create` carries
431
457
  `detail: { inputValue }` and is also cancelable: preventing it suppresses the default append/select
432
458
  action so the host can normalize and commit its own option.
@@ -200,6 +200,8 @@ are `text`, `equals`, `number-range`, `date-range`, `set`, `includes-any`, and `
200
200
  query immediately aborts and supersedes the previous request, including while its replacement
201
201
  waits for `filterDebounce`. Obsolete results and errors cannot update the grid even when a loader
202
202
  ignores the signal. A rejected current request keeps prior rows and emits `lr-data-error`.
203
+ Request listeners can disconnect the grid, replace its source or query, or call `reload()`;
204
+ the superseded invocation stops before emitting further notifications or starting its loader.
203
205
  Filter/search requests use `filterDebounce`; sorting and paging load immediately.
204
206
  For event-driven loading, set `server`, listen to the mirrored `request` event, and assign `data`,
205
207
  `total`, and `loading` yourself. The redundant Lyra-only `lr-data-request` event was removed in
@@ -226,6 +226,16 @@ to scope it) retints the dialog together with every popup opened from it. The mo
226
226
  separate name from `--lr-overlay-shadow-anchored`, which anchored popups read, so raising popups
227
227
  never raises dialogs.
228
228
 
229
+ **Surface treatment.** The panel follows the style system's surface axis like other floating chrome.
230
+ With no surface chosen anywhere — no `data-lr-surface`, no `setLyraStyle({ surface })`, and either
231
+ no theme stylesheet or `theme.css` — it paints the built-in profile's Glass: the fill at
232
+ `--lr-theme-surface-opacity` (default 60%) over a 12px backdrop blur. The blur sits on an internal
233
+ layer behind the panel content, so `getComputedStyle(panel).backdropFilter` reads `none` even while
234
+ the backdrop is blurred; translucency never appears without that blur. `theme-core.css` defaults to
235
+ Solid instead. For an opaque panel set `data-lr-surface="solid"` on the element, a wrapper or
236
+ `<html>`, or call `setLyraStyle({ surface: 'solid' })`; reduced transparency, increased contrast and
237
+ forced colours paint it opaque too. `<lr-drawer>` behaves the same way.
238
+
229
239
  Otherwise the shared tokens the panel and its chrome read include the `--lr-size-20rem` /
230
240
  `-24rem` / `-28rem` / `-32rem` / `-38rem` / `-48rem` width ladder behind `size`, `--lr-space-l`,
231
241
  `--lr-space-m`, `--lr-space-s` and `--lr-space-xs` (spacing defaults), the `--lr-safe-area-*` insets
@@ -86,6 +86,12 @@ resolving `false` when there are none); `clearSearch()` clears the query, matche
86
86
  marks. `scrollToAnchor(target)` (inherited from `DocumentAnchorTarget`) resolves a `line-range`
87
87
  anchor or a `highlights` id string.
88
88
 
89
+ Search/navigation work belongs to the compared inputs and current host lifecycle. If a
90
+ `lr-search-change` listener clears or replaces the search, or the compared source, connection or
91
+ document changes before scrolling, a superseded `search()` resolves zero and superseded
92
+ `searchNext()`/`searchPrevious()` resolves `false`. Retired work does not scroll a revealed fold or
93
+ borrow a newer search's active match. A fresh search can navigate the current source normally.
94
+
89
95
  **Events:**
90
96
 
91
97
  - `lr-copy` (`detail: LyraClipboardWriteSuccess`, `{ ok: true; text: string }`) — the frozen full
@@ -9,7 +9,7 @@
9
9
  - **Release history** [CHANGELOG.md](../../CHANGELOG.md)
10
10
  - **Deprecations** none
11
11
  - **Optional peers** none
12
- - **Themeable via** 24 parts, 0 custom properties — see this component's own `@csspart`/`@cssprop` list below
12
+ - **Themeable via** 29 parts, 0 custom properties — see this component's own `@csspart`/`@cssprop` list below
13
13
  - **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
14
14
 
15
15
  ---
@@ -20,7 +20,7 @@ Controlled searchable and filterable document inventory with versions, tags, own
20
20
  sorting, and bulk selection. It composes the table's bounded 100-row default, so a large document
21
21
  collection stays reachable through pagination without mounting an unbounded grid.
22
22
 
23
- With `dataSource` unset, the tag facet displays the first 500 locale-sorted distinct tags. A localized `[part="limit"]`
23
+ With both `dataSource` and `cursorSource` unset, the tag facet displays the first 500 locale-sorted distinct tags. A localized `[part="limit"]`
24
24
  note reports the omitted count. Search and a controlled `tagFilter` continue to match all admitted
25
25
  document tags, including tags outside the facet window. Matching rows, sorting, and folded search
26
26
  fields are reused when their inputs are unchanged; loading and selection updates reuse the current
@@ -66,6 +66,7 @@ the nested table.
66
66
  The provider query type is `DocumentLibrarySourceQuery { readonly searchTerm: string;
67
67
  readonly tagFilter: readonly string[]; readonly sortKey: LibraryDocumentSortKey;
68
68
  readonly sortDir: 'asc' | 'desc'; readonly filter: LyraDocumentLibrary['filter'] }`.
69
+ The component's `filter` property uses this same callback contract.
69
70
 
70
71
  **Full-source paging:** Set property-only `dataSource: DocumentLibrarySource | undefined`
71
72
  (default `undefined`) to browse a host-owned logical collection. `DocumentLibrarySource` is
@@ -102,17 +103,98 @@ User `lr-selection-change` carries the complete accepted ID list, and programmat
102
103
  remain silent. Page/query changes and page retry reuse the independent selected-record cache.
103
104
  `lr-filter-change.matchCount` reports the accepted global query total.
104
105
 
105
- A defined source takes display precedence over `documents`; it never overwrites that legacy
106
+ A defined `dataSource` takes display precedence over `documents`; it never overwrites that legacy
106
107
  getter. Invalid defined sources fail visibly. Setting `dataSource = undefined` restores the
107
- current legacy documents and their existing limits. The source remains host-owned by identity;
108
+ current legacy documents and their existing limits when `cursorSource` is also unset. The source remains host-owned by identity;
108
109
  after changing its contents or revision, reassign it (including the same object) or call unnamed
109
110
  `requestUpdate()`. Replacement, explicit refresh, locale change, disconnect and adoption revoke
110
111
  obsolete work. Named presentation updates reuse accepted data. Both source and legacy routes
111
112
  forward instance `strings` to the composed table.
112
113
 
114
+ **Unknown-total cursor batches:** property-only `cursorSource: DocumentLibraryCursorSource | undefined`
115
+ (default `undefined`) accepts
116
+ `LyraCursorSource<LibraryDocument, DocumentLibrarySourceQuery>`. This is a separate route from
117
+ counted `dataSource`: setting both fails visibly without invoking either provider or falling back
118
+ to `documents`. With both unset, the legacy array route keeps its existing behavior.
119
+ `DocumentLibraryCursorSource = LyraCursorSource<LibraryDocument, DocumentLibrarySourceQuery>` and
120
+ `DocumentLibraryQueryChangeDetail { readonly searchTerm: string;
121
+ readonly tags: readonly string[]; }` are exported by the component class entry. The generic cursor types
122
+ come from `@aceshooting/lyra-ui/data-sources.js`; see the [provider guide](../shared/events-and-types.md#large-collection-sources).
123
+
124
+ The provider supplies a nonempty identity `scope`, a `revision`, and
125
+ `query({ scope, revision, locale, signal, query, cursor, limit })`, returning
126
+ `{ rows: [{ key, value }], nextCursor }`. Each key must exactly equal its document's nonblank ID.
127
+ There is no required total, numeric order, lookup or locate. `cursor: null` starts the query;
128
+ `nextCursor: null` is the only end marker. Nonempty tokens are opaque: preserve them unchanged,
129
+ without parsing, displaying or persisting them. An empty or short batch can still have a next
130
+ token. The provider applies the complete search, AND tag filtering, optional custom filter and
131
+ sort **before** paging, with the same query/callback semantics as the counted route. It must
132
+ reject a query it cannot implement instead of silently ignoring it or filtering only loaded rows.
133
+
134
+ The nested table renders only the current batch. `sourcePageSize` supplies the request limit
135
+ (default 100, normalized to 1–500); `sourcePage` is inactive, and assigning it does not refetch.
136
+ `sourceTotal` remains `null`, including at the end. No match count, facet catalogue or total is
137
+ inferred from visited batches. The built-in tag picker and omitted-facet count are absent;
138
+ document tags still render, and a host may bind `tagFilter` from an external control. Partial
139
+ batches never prune that filter.
140
+
141
+ Readonly frozen `cursorNavigation: LyraCursorNavigationState` contains `status` (`'idle' |
142
+ 'loading' | 'ready' | 'error'`), `canGoBack`, `canGoForward`, `atEnd`, and `historyTruncated` only:
143
+ no rows, tokens, absolute positions or counts. End is reported only for a ready terminal result,
144
+ never for a failure. `nextCursorPage(): Promise<boolean>`, `previousCursorPage(): Promise<boolean>`
145
+ and `restartCursorSource(): Promise<boolean>` resolve `true` only for their own accepted commits;
146
+ unavailable, externally blocked, failed or superseded actions resolve `false`.
147
+
148
+ Previous refetches a visited request cursor, retaining at most 32 visited cursors including the
149
+ current one. It discards the old forward branch; Next follows that newly accepted continuation.
150
+ Earlier history can be evicted, which sets `historyTruncated`; Start over discards history and
151
+ requests `null`. No previous batch rows or prefetch queue are retained. Retry repeats the exact
152
+ failed cursor request; Start over is the explicit way to discard an expired token. Known cycles
153
+ within retained history are rejected; global cycle detection across evicted history is not
154
+ promised. Empty continuation batches stay navigable without automatic fetch/skip loops.
155
+
156
+ Cursor selection is bounded **unverified selected-ID intent**, not proof of global membership.
157
+ Selecting the page preserves off-page IDs; hosts validate membership before mutations. IDs
158
+ survive query, revision, refresh, reconnect and same-scope provider replacement. A different
159
+ scope clears the old selection immediately, including after temporary source removal. Reusing
160
+ a scope asserts compatible document identity. When restoring selection for a new namespace,
161
+ assign the new source first, then the IDs:
162
+
163
+ ```ts
164
+ import '@aceshooting/lyra-ui/components/lr-document-library.js';
165
+ import type { DocumentLibraryCursorSource } from '@aceshooting/lyra-ui/components/data/document-library/document-library.class.js';
166
+
167
+ declare const source: DocumentLibraryCursorSource; // Host-owned query implementation.
168
+ declare const restoredIds: readonly string[];
169
+ const library = document.querySelector('lr-document-library')!;
170
+ library.cursorSource = source;
171
+ library.selectedDocumentIds = restoredIds;
172
+ ```
173
+
174
+ Cursor `tagFilter` and selected-ID assignments inspect at most 10,000 raw entries, deduplicate
175
+ stably, then admit at most 500 unique tags or 10,000 unique selected IDs. Each nonblank ID is at
176
+ most 65,536 UTF-16 units; owned unique text is at most 2,000,000 units per input. Query search is
177
+ at most 65,536 units and shares the query text allowance with tag IDs. Malformed, sparse or
178
+ oversized inputs fail atomically rather than truncating. Scope, nonnull token and string revision
179
+ are nonempty and at most 8,192 units each. Replies contain at most the requested number of rows;
180
+ duplicate/invalid keys or documents reject the whole batch. Documents retain the provider-row
181
+ 500-tag/65,536-display-unit limit, and combined keys plus display text are bounded to 2,000,000
182
+ units per batch. None of these cursor admission rules changes the legacy array/counting limits.
183
+
184
+ Source reassignment (including the same object), keyless `requestUpdate()`, query/locale/limit
185
+ changes, explicit restart or reconnect starts at `null` and revokes old results. Named visual
186
+ updates reuse accepted data; observe revision changes by reassigning or explicitly refreshing.
187
+ Navigation/selection closures from an obsolete batch cannot act on a new same-ID row. A callback
188
+ must settle promptly on `signal` abort: ignoring cancellation holds the physical page permit, so
189
+ newer requests wait instead of overlapping it. The host owns callback cost and backend work.
190
+
113
191
  **Events:**
114
192
 
115
- - `lr-filter-change` — non-cancelable; fresh frozen readonly `{ searchTerm, tags, matchCount }`.
193
+ - `lr-filter-change` — array/counted routes only; non-cancelable, with fresh frozen readonly
194
+ `{ searchTerm, tags, matchCount }` and the exact admitted/global match count.
195
+ - `lr-query-change` — cursor route only; non-cancelable, with fresh frozen readonly
196
+ `{ searchTerm, tags }` after a user search edit. It is an immediate input notification, not a
197
+ result/total notification; programmatic assignments are silent and no `matchCount` is fabricated.
116
198
  - `lr-sort-request` — cancelable; proposes frozen readonly `{ phase: 'request', sortKey, sortDir }`.
117
199
  - `lr-sort` — non-cancelable; an accepted sort commits the same fields with `phase: 'commit'`.
118
200
  - `lr-selection-change` — non-cancelable; fresh frozen readonly `{ documentIds }`.
@@ -129,7 +211,9 @@ button, while a host or provider load error is shown.
129
211
  `clear-selection`, `table`, `row`, `cell`, `header-cell`, `document-name`, `error-row`, `error-cell`,
130
212
  `error` (the nested table's built-in `lr-empty` host), `error-base`, `error-icon`, `error-heading`,
131
213
  `error-description`, `error-actions`, `retry-button`, `limit` (the count of distinct tags omitted
132
- from the facet), `selection-status` (source selection loading/error), and `selection-retry`.
214
+ from the facet), `selection-status` (counted-source selection loading/error), `selection-retry`,
215
+ `cursor-navigation` (the named navigation region), `cursor-previous`, `cursor-next`,
216
+ `cursor-restart`, and `cursor-status` (end/history-boundary text).
133
217
 
134
218
  `selection-bar` is visible ordinary content, not a shadow live region. `selectedDocumentIds`
135
219
  assignments stay silent; each selection change the user makes (row or select-all checkbox, "Clear
@@ -22,7 +22,8 @@ make that entire region a file-drop target: it owns the drag-session state, rend
22
22
  drag-over overlay, applies `accept`/size/count limits, and emits the same `lr-files` event shape
23
23
  `lr-file-input` does. It never renders a native file picker, a selected-file list, or any focusable
24
24
  control of its own; wrap `lr-file-input` itself (or any other focusable content) inside it when the
25
- region also needs a click-to-browse affordance. The drag-session mechanics are the exact ones
25
+ region also needs a click-to-browse affordance. It can also sit beside a region that already exists
26
+ in the page instead of wrapping it (`for`/`target`, below). The drag-session mechanics are the exact ones
26
27
  `lr-file-input` uses, shared through `internal/drop-session-controller.ts` rather than
27
28
  reimplemented.
28
29
 
@@ -51,6 +52,15 @@ reimplemented.
51
52
  allow/deny lists, identical to `lr-file-input`'s (denylist first); a mismatch rejects with `'type'`.
52
53
  - `acceptedMessage` / `rejectedMessage: string` (attributes `accepted-message` / `rejected-message`) —
53
54
  caller-owned outcome copy with `{count}`; unset uses the localized default.
55
+ - `for: string = ''` — id of an existing element, resolved in the zone's own root (like a label's
56
+ `for`), to attach to instead of the default slot. The zone then handles drags over that element,
57
+ lays its overlay over the element's box (a fixed box measured from the element, also correct
58
+ inside a transformed ancestor, following a region that scrolls mid-drag), adds no box of its own
59
+ (`display: contents`) and still emits `lr-files` from itself. An id matching nothing binds nothing
60
+ and is re-resolved when elements or ids in the root change, so a region rendered later is picked
61
+ up. The default slot is not a drop target while a target is bound.
62
+ - `target: Element | null = null` (property only) — the same, with an element reference; takes
63
+ precedence over `for` while it is connected.
54
64
  - `readonly dragging: boolean` — `true` during an active drag session
55
65
  - `size: LyraSize = 'm'` (reflected) — density tier for the overlay's padding, icon and
56
66
  instructional text; identical contract and scale to `lr-file-input`'s own `size`, so a drop-zone
@@ -75,7 +85,8 @@ drag state and counts — announcements go through the shared light-DOM regions,
75
85
  `lr-file-input`), `rejection` (a visible region listing each currently-rejected file, rendered only
76
86
  while one exists).
77
87
 
78
- **CSS custom states:** `dragging`, matching `lr-file-input`'s.
88
+ **CSS custom states:** `dragging`, matching `lr-file-input`'s; `targeted` while `for`/`target`
89
+ resolves to an element the zone is attached to.
79
90
 
80
91
  **Themeable custom properties:** `--lr-drop-zone-radius` (default `var(--lr-radius)`),
81
92
  `--lr-drop-zone-overlay-border-color` (default `var(--lr-color-brand)`, the dashed overlay border in
@@ -120,8 +131,21 @@ shape, so check `event.target` when a zone-level listener must react to the zone
120
131
  </lr-drop-zone>
121
132
  ```
122
133
 
134
+ Attaching to an existing, statically rendered region without wrapping it — the region keeps its own
135
+ layout tree, and the zone's script can load after first paint:
136
+
137
+ ```html
138
+ <section id="chat-area"><!-- server-rendered chat --></section>
139
+ <lr-drop-zone for="chat-area" multiple></lr-drop-zone>
140
+ ```
141
+
123
142
  **Known gotchas:**
124
143
 
144
+ - In `for`/`target` mode the overlay is a fixed box at the content layer (`--lr-layer-content`)
145
+ painted in the zone's own place in the tree; when the region has positioned descendants with a
146
+ higher `z-index`, raise the overlay with `::part(overlay) { z-index: … }`. The overlay never takes
147
+ pointer events, so drags keep reaching the region. A visible `rejection` list renders where the
148
+ zone itself sits.
125
149
  - No paste-from-clipboard handling (unlike `lr-file-input`, which accepts pasted files unless
126
150
  `without-paste` is set) — this component is drag/drop only.
127
151
  - Dragged folders are traversed recursively while `multiple` (not the default here), with the same
@@ -568,6 +568,11 @@ of the box with no host styling required); a host typically computes the set fro
568
568
  it back — `lr-knowledge-graph-explorer`'s own `highlight` property is exactly this composition,
569
569
  built-in. Empty (the default) renders every node/edge at full opacity, unchanged from today.
570
570
 
571
+ An activation listener that replaces controlled selection, active graph data, view, renderer,
572
+ selection mode, hidden types or the host connection retires the originating action: it emits no later selection proposal from that
573
+ activation. A subsequent activation uses the current graph normally. This applies to both array
574
+ and column inputs; it does not make selection uncontrolled.
575
+
571
576
  `nodes`, `edges`, `nodeTypes`, and `communities` use nonblank first-wins identities before lookup,
572
577
  layout, rendering, selection, or events. An edge uses its explicit `id`, or `source->target` when
573
578
  `id` is omitted; a blank explicit `id` is invalid, while distinct explicit ids deliberately allow
@@ -59,7 +59,8 @@ until `<lr-icon>` is registered by something else.
59
59
  accessible name; wins over `label`
60
60
  - `label: string = ''` — accessible name when `accessibleLabel` is unset
61
61
  - `disabled: boolean = false` (reflected)
62
- - `href?: string`, `target?: string`, `download?: string` — a safe `href` renders a native anchor;
62
+ - `href?: string`, `target?: string`, `download?: string` — a safe `href` (the same
63
+ `http:`/`https:`/`blob:`/`mailto:`/`tel:`/`sms:`/relative allowlist as `<lr-button>`) renders a native anchor;
63
64
  `target` derives `rel="noopener noreferrer"`, and download presence (including `download=""`)
64
65
  selects the stricter downloadable-URL allowlist. A disabled link keeps the anchor but removes
65
66
  `href`