@aceshooting/lyra-ui 30.8.0 → 31.0.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 (241) hide show
  1. package/CHANGELOG.md +239 -329
  2. package/dist/ai/adapters/ag-ui.js +1 -1
  3. package/dist/components/agent-tools/activity-feed/activity-feed.class.js +1 -1
  4. package/dist/components/agent-tools/compare-panel/compare-panel.class.js +1 -1
  5. package/dist/components/agent-tools/eval-dataset/eval-dataset.class.js +1 -1
  6. package/dist/components/agent-tools/thinking-panel/thinking-panel.class.js +1 -1
  7. package/dist/components/agent-tools/tool-select-dialog/tool-select-dialog.class.js +1 -1
  8. package/dist/components/charts/chart/box-plot-loader.js +1 -1
  9. package/dist/components/charts/chart/box-plot.class.js +2 -2
  10. package/dist/components/charts/chart/chart-core-loader.js +1 -1
  11. package/dist/components/charts/chart/chart-feature-loader.js +1 -1
  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 +1 -1
  17. package/dist/components/charts/chart-3d/chart-3d-engine.js +1 -1
  18. package/dist/components/conversation/chat-composer/chat-composer.class.d.ts +9 -4
  19. package/dist/components/conversation/chat-composer/chat-composer.class.js +1 -1
  20. package/dist/components/conversation/chat-composer/chat-composer.styles.js +1 -1
  21. package/dist/components/conversation/chat-message/chat-message.class.d.ts +27 -3
  22. package/dist/components/conversation/chat-message/chat-message.class.js +14 -12
  23. package/dist/components/conversation/chat-message/chat-message.styles.js +1 -1
  24. package/dist/components/conversation/chat-viewport/chat-viewport.class.d.ts +29 -2
  25. package/dist/components/conversation/chat-viewport/chat-viewport.class.js +2 -2
  26. package/dist/components/conversation/chat-viewport/chat-viewport.styles.js +1 -1
  27. package/dist/components/conversation/code-block/code-block-shared.js +1 -1
  28. package/dist/components/conversation/code-block/code-loader.js +1 -1
  29. package/dist/components/conversation/code-block/shiki-oniguruma.js +1 -1
  30. package/dist/components/conversation/code-block/shiki-types.js +1 -1
  31. package/dist/components/conversation/markdown/katex-loader.js +1 -1
  32. package/dist/components/conversation/markdown/markdown-base.class.d.ts +1 -1
  33. package/dist/components/conversation/markdown/markdown-base.class.js +1 -1
  34. package/dist/components/conversation/markdown/markdown-code-header.js +1 -1
  35. package/dist/components/conversation/markdown/markdown-core.class.d.ts +10 -0
  36. package/dist/components/conversation/markdown/markdown-core.class.js +1 -1
  37. package/dist/components/conversation/markdown/markdown-loader.js +1 -1
  38. package/dist/components/conversation/markdown/markdown-shared.d.ts +7 -2
  39. package/dist/components/conversation/markdown/markdown-shared.js +3 -3
  40. package/dist/components/conversation/markdown/markdown.class.d.ts +10 -0
  41. package/dist/components/conversation/markdown/markdown.class.js +1 -1
  42. package/dist/components/conversation/message-feedback/message-feedback.class.js +2 -2
  43. package/dist/components/conversation/message-parts/message-parts.class.js +1 -1
  44. package/dist/components/conversation/prompt-input/prompt-input.class.d.ts +2 -1
  45. package/dist/components/conversation/streaming-text/streaming-text-base.class.d.ts +4 -0
  46. package/dist/components/conversation/streaming-text/streaming-text-base.class.js +1 -1
  47. package/dist/components/conversation/streaming-text/streaming-text-core.class.d.ts +1 -1
  48. package/dist/components/conversation/streaming-text/streaming-text-core.class.js +1 -0
  49. package/dist/components/conversation/streaming-text/streaming-text.class.d.ts +1 -1
  50. package/dist/components/conversation/streaming-text/streaming-text.class.js +1 -0
  51. package/dist/components/conversation/suggestion-chips/suggestion-chips.class.d.ts +17 -3
  52. package/dist/components/conversation/suggestion-chips/suggestion-chips.class.js +3 -3
  53. package/dist/components/conversation/suggestion-chips/suggestion-chips.d.ts +1 -1
  54. package/dist/components/conversation/suggestion-chips/suggestion-chips.js +1 -1
  55. package/dist/components/conversation/suggestion-chips/suggestion-chips.styles.js +1 -1
  56. package/dist/components/conversation/thread-list/thread-list.class.js +2 -2
  57. package/dist/components/conversation/transcript-feed/transcript-feed.class.js +1 -1
  58. package/dist/components/data/data-grid/data-grid.class.d.ts +10 -10
  59. package/dist/components/data/data-grid/data-grid.class.js +1 -1
  60. package/dist/components/data/file-tree/file-tree.class.js +1 -1
  61. package/dist/components/data/flow-canvas/flow-canvas.class.js +1 -1
  62. package/dist/components/data/heatmap/heatmap.class.d.ts +1 -1
  63. package/dist/components/data/heatmap/heatmap.class.js +1 -1
  64. package/dist/components/data/pagination/pagination.class.js +1 -1
  65. package/dist/components/data/table/table.class.d.ts +31 -2
  66. package/dist/components/data/table/table.class.js +3 -3
  67. package/dist/components/data/table/table.styles.js +1 -1
  68. package/dist/components/data/timeline/timeline-cluster.js +1 -1
  69. package/dist/components/data/timeline/timeline-item.class.d.ts +10 -3
  70. package/dist/components/data/timeline/timeline-item.class.js +16 -12
  71. package/dist/components/data/timeline/timeline-item.styles.js +1 -1
  72. package/dist/components/data/timeline/timeline.class.d.ts +14 -2
  73. package/dist/components/data/timeline/timeline.class.js +9 -5
  74. package/dist/components/data/tree/tree-item.class.js +1 -1
  75. package/dist/components/data/tree/tree.class.d.ts +2 -0
  76. package/dist/components/data/tree/tree.class.js +1 -1
  77. package/dist/components/forms/button/button.class.d.ts +8 -6
  78. package/dist/components/forms/button/button.class.js +2 -2
  79. package/dist/components/forms/checkbox-group/checkbox-group.class.js +1 -1
  80. package/dist/components/forms/color-picker/color-core.js +1 -1
  81. package/dist/components/forms/date-picker/date-input.class.d.ts +1 -1
  82. package/dist/components/forms/date-picker/date-input.class.js +1 -1
  83. package/dist/components/forms/emoji-picker/emoji-data-loader.js +1 -1
  84. package/dist/components/forms/icon-button/icon-button.class.d.ts +4 -2
  85. package/dist/components/forms/icon-button/icon-button.class.js +2 -2
  86. package/dist/components/forms/input/input-shared.js +2 -2
  87. package/dist/components/forms/input/number-input-locale.js +1 -0
  88. package/dist/components/forms/input/number-input.class.d.ts +19 -2
  89. package/dist/components/forms/input/number-input.class.js +2 -2
  90. package/dist/components/forms/locale-picker/locale-picker.class.d.ts +3 -3
  91. package/dist/components/forms/locale-picker/locale-picker.class.js +1 -1
  92. package/dist/components/layout/app-rail-group/app-rail-group.class.js +1 -1
  93. package/dist/components/layout/details/accordion-item.class.js +1 -1
  94. package/dist/components/layout/menu/menu.class.js +1 -1
  95. package/dist/components/layout/multi-split/multi-split.class.js +1 -1
  96. package/dist/components/layout/navigation-menu-item/navigation-menu-item.class.js +1 -1
  97. package/dist/components/layout/tab-group/tab-group.class.d.ts +8 -1
  98. package/dist/components/layout/tab-group/tab-group.class.js +1 -1
  99. package/dist/components/layout/tab-group/tab.class.d.ts +7 -1
  100. package/dist/components/layout/tab-group/tab.class.js +1 -1
  101. package/dist/components/layout/virtual-list/virtual-list.class.d.ts +2 -2
  102. package/dist/components/layout/virtual-list/virtual-list.class.js +1 -1
  103. package/dist/components/media/animated-image/animated-image.class.js +1 -1
  104. package/dist/components/media/attachment-chip/attachment-chip.class.d.ts +21 -14
  105. package/dist/components/media/attachment-chip/attachment-chip.class.js +1 -1
  106. package/dist/components/media/attachment-trigger/attachment-trigger.class.d.ts +36 -12
  107. package/dist/components/media/attachment-trigger/attachment-trigger.class.js +3 -3
  108. package/dist/components/media/drop-zone/drop-zone.class.d.ts +23 -5
  109. package/dist/components/media/drop-zone/drop-zone.class.js +2 -2
  110. package/dist/components/media/drop-zone/drop-zone.styles.js +1 -1
  111. package/dist/components/media/file-icon/file-icon.class.js +1 -1
  112. package/dist/components/media/flag/flag-peer-bulk-standard.js +1 -1
  113. package/dist/components/media/flag/flag-peer-bulk.js +1 -1
  114. package/dist/components/media/flag/flag-peer.js +1 -1
  115. package/dist/components/media/flag/flag-url-resolver.js +1 -1
  116. package/dist/components/media/image-viewer/image-viewer.class.d.ts +2 -2
  117. package/dist/components/media/image-viewer/image-viewer.class.js +1 -1
  118. package/dist/components/media/map/map-feature-loader.js +1 -1
  119. package/dist/components/media/map/map-loader.js +1 -1
  120. package/dist/components/media/map/map-owned-features.js +1 -1
  121. package/dist/components/media/map/map-scene-elevated-lines.js +2 -2
  122. package/dist/components/media/map/map-scene-render-controller.js +1 -1
  123. package/dist/components/media/map/map.class.d.ts +5 -5
  124. package/dist/components/media/map/map.class.js +3 -3
  125. package/dist/components/media/pan-zoom/pan-zoom.class.js +1 -1
  126. package/dist/components/media/qr-code/qr-code-loader.js +1 -1
  127. package/dist/components/media/video/video.class.d.ts +3 -3
  128. package/dist/components/media/video/video.class.js +3 -1
  129. package/dist/components/media/video-playlist/video-playlist.class.js +1 -1
  130. package/dist/components/overlays/chip/chip.class.js +1 -1
  131. package/dist/components/overlays/overlay/dropdown.class.js +1 -1
  132. package/dist/components/overlays/overlay/tooltip.class.d.ts +5 -1
  133. package/dist/components/overlays/overlay/tooltip.class.js +3 -3
  134. package/dist/components/retrieval/embedding-explorer/embedding-explorer-engine.js +1 -1
  135. package/dist/components/retrieval/graph/graph-engine-adapter.js +1 -1
  136. package/dist/components/retrieval/graph/graph-loader.js +1 -1
  137. package/dist/components/retrieval/graph/graph-node-renderer.js +1 -1
  138. package/dist/components/retrieval/graph/graph-spatial-controller.js +1 -1
  139. package/dist/components/retrieval/graph/graph.class.d.ts +1 -1
  140. package/dist/components/retrieval/graph/graph.class.js +1 -1
  141. package/dist/components/retrieval/mind-map/mind-map.class.js +1 -1
  142. package/dist/components/retrieval/neighbor-list/neighbor-list.class.d.ts +1 -1
  143. package/dist/components/retrieval/neighbor-list/neighbor-list.class.js +3 -3
  144. package/dist/components/retrieval/retrieval-results/retrieval-results.class.js +1 -1
  145. package/dist/components/utility/icon/dompurify-loader.js +1 -1
  146. package/dist/components/utility/json-viewer/json-viewer.class.d.ts +16 -1
  147. package/dist/components/utility/json-viewer/json-viewer.class.js +4 -4
  148. package/dist/components/utility/json-viewer/json-viewer.styles.js +1 -1
  149. package/dist/components/utility/known-date/known-date.class.js +1 -1
  150. package/dist/components/utility/mention-popover/mention-popover.class.js +1 -1
  151. package/dist/components/viewers/calendar-viewer/calendar-loader.js +1 -1
  152. package/dist/components/viewers/calendar-viewer/calendar-viewer.class.js +1 -1
  153. package/dist/components/viewers/contact-viewer/contact-viewer.class.js +1 -1
  154. package/dist/components/viewers/csv-viewer/csv-viewer.class.js +1 -1
  155. package/dist/components/viewers/dataset-viewer/dataset-viewer.class.js +1 -1
  156. package/dist/components/viewers/docx-viewer/docx-loader.js +1 -1
  157. package/dist/components/viewers/docx-viewer/docx-viewer.class.js +1 -1
  158. package/dist/components/viewers/ebook-viewer/ebook-loader.js +1 -1
  159. package/dist/components/viewers/ebook-viewer/ebook-viewer.class.js +1 -1
  160. package/dist/components/viewers/ebook-viewer/epub-unload-guard.js +1 -0
  161. package/dist/components/viewers/email-viewer/email-loader.js +1 -1
  162. package/dist/components/viewers/html-viewer/dompurify-loader.js +1 -1
  163. package/dist/components/viewers/include/include.class.js +1 -1
  164. package/dist/components/viewers/model-viewer/model-viewer-loader.js +1 -1
  165. package/dist/components/viewers/model-viewer/model-viewer.class.js +1 -1
  166. package/dist/components/viewers/notebook-viewer/dompurify-loader.js +1 -1
  167. package/dist/components/viewers/notebook-viewer/notebook-viewer.class.js +1 -1
  168. package/dist/components/viewers/pdf-viewer/pdf-loader.js +1 -1
  169. package/dist/components/viewers/pdf-viewer/pdf-viewer.class.d.ts +2 -2
  170. package/dist/components/viewers/pdf-viewer/pdf-viewer.class.js +2 -2
  171. package/dist/components/viewers/pptx-viewer/pptx-loader.js +1 -1
  172. package/dist/components/viewers/spreadsheet-viewer/spreadsheet-loader.js +1 -1
  173. package/dist/components/viewers/spreadsheet-viewer/spreadsheet-viewer.class.js +1 -1
  174. package/dist/components/viewers/svg-viewer/dompurify-loader.js +1 -1
  175. package/dist/components/viewers/table-viewer-shared.js +4 -4
  176. package/dist/framework-types.d.ts +1 -1
  177. package/dist/internal/anchored-overlay-runtime.js +1 -1
  178. package/dist/internal/catalog-picker.js +1 -1
  179. package/dist/internal/document-tokens.js +2 -2
  180. package/dist/internal/dompurify-loader.js +1 -1
  181. package/dist/internal/drop-session-controller.js +1 -1
  182. package/dist/internal/engine-3d.js +1 -1
  183. package/dist/internal/icon-only-content.js +1 -1
  184. package/dist/internal/layered-layout.js +1 -1
  185. package/dist/internal/locale-loaders.generated.js +1 -1
  186. package/dist/internal/map-custom-layer-controller.js +1 -1
  187. package/dist/internal/map-scene-layer-runtime.js +1 -1
  188. package/dist/internal/media-panorama.js +1 -1
  189. package/dist/internal/package-metadata.js +1 -1
  190. package/dist/internal/papaparse-loader.js +1 -1
  191. package/dist/internal/safe-url.js +1 -1
  192. package/dist/internal/scoped-definitions.generated.js +1 -1
  193. package/dist/internal/scroll-overflow.js +1 -1
  194. package/dist/internal/source-window-controller.js +1 -1
  195. package/dist/internal/text-quote.js +1 -1
  196. package/dist/internal/viewer-search.js +1 -1
  197. package/dist/lyra.d.ts +1 -1
  198. package/dist/sequence-time-binding.js +1 -1
  199. package/dist/simulation-clock.js +1 -1
  200. package/dist/styles/reservations.css +1 -1
  201. package/dist/styles/reservations.styles.js +1 -1
  202. package/dist/testing/happy-dom-shims.js +1 -1
  203. package/dist/theme/theme.js +1 -1
  204. package/dist/theme-core.css +1 -0
  205. package/dist/utilities/scoped-registry.js +1 -1
  206. package/llms/components/lr-attachment-chip.md +27 -12
  207. package/llms/components/lr-attachment-trigger.md +27 -7
  208. package/llms/components/lr-button.md +6 -4
  209. package/llms/components/lr-chat-composer.md +13 -7
  210. package/llms/components/lr-chat-message.md +44 -3
  211. package/llms/components/lr-chat-viewport.md +39 -2
  212. package/llms/components/lr-data-grid.md +2 -0
  213. package/llms/components/lr-dialog.md +10 -0
  214. package/llms/components/lr-drop-zone.md +26 -2
  215. package/llms/components/lr-icon-button.md +2 -1
  216. package/llms/components/lr-json-viewer.md +17 -0
  217. package/llms/components/lr-locale-picker.md +5 -0
  218. package/llms/components/lr-markdown-core.md +2 -1
  219. package/llms/components/lr-markdown.md +20 -4
  220. package/llms/components/lr-menu.md +3 -1
  221. package/llms/components/lr-number-input.md +28 -1
  222. package/llms/components/lr-prompt-input.md +1 -1
  223. package/llms/components/lr-streaming-text-core.md +3 -2
  224. package/llms/components/lr-streaming-text.md +4 -1
  225. package/llms/components/lr-suggestion-chips.md +28 -5
  226. package/llms/components/lr-tab-group.md +13 -1
  227. package/llms/components/lr-tab.md +5 -0
  228. package/llms/components/lr-table.md +25 -4
  229. package/llms/components/lr-timeline-item.md +1 -1
  230. package/llms/components/lr-timeline.md +38 -4
  231. package/llms/components/lr-tooltip.md +3 -1
  232. package/llms/components/lr-tree.md +4 -0
  233. package/llms/components/lr-virtual-list.md +1 -0
  234. package/llms/peers.md +2 -2
  235. package/llms/shared/ai-and-peers.md +34 -0
  236. package/llms/shared/forms-and-accessibility.md +21 -4
  237. package/llms/shared/imports-and-registration.md +2 -0
  238. package/llms/shared/styles-and-tokens.md +47 -1
  239. package/llms/shared.md +104 -5
  240. package/package.json +25 -21
  241. package/registrations.json +1 -1
@@ -38,6 +38,14 @@ capability as a row.
38
38
  - Host `aria-label` attribute (default absent) — overrides the localized accessible name on the
39
39
  single-capability button or multi-capability menu trigger. An explicitly empty value is ignored,
40
40
  so the control keeps its localized name.
41
+ - `cameraCapture?: LyraAttachmentCameraCapture` (attribute `camera-capture`; `'user' |
42
+ 'environment'`, default unset) — opt-in system-camera capture for the `camera` capability. On an
43
+ engine that supports the native `capture` attribute (phones and tablets), activating `camera`
44
+ opens the hidden file input with `accept="image/*"` and this `capture` value synchronously inside
45
+ the same user gesture, and the photo arrives as `lr-files` with `capability: 'camera'` (non-image
46
+ picks move to `rejected`). Where `capture` is unsupported (desktop browsers, which would only show
47
+ a file picker), `camera` keeps firing `lr-camera-request`, so a host can keep its own
48
+ `getUserMedia` dialog there. Unset or any other value: unchanged request-only behavior.
41
49
  - `multiple: boolean = false` (reflected) — forwarded to the hidden file input. Bare `multiple`
42
50
  opts into batches; `multiple="false"` remains false and removal restores single-file mode.
43
51
  - `disabled: boolean = false` (reflected)
@@ -51,15 +59,18 @@ capability as a row.
51
59
  `--lr-icon-button-size` is an accessibility floor and the ladder's tightest steps resolve below
52
60
  WCAG 2.5.8's minimum. Override `--lr-icon-button-size` to make that trade-off explicitly
53
61
 
54
- **Events:** `lr-files` (`detail: { capability: 'files' | 'image'; files, rejected, remainingFiles,
55
- remainingTotalSize }`, the same shape as `lr-file-input`'s) — fired once a file-backed capability's
56
- hidden input produces a real selection. `files` are the picks matching `accept` as a fresh frozen
62
+ **Events:** `lr-files` (`detail: { capability: LyraAttachmentFilesCapability; files, rejected,
63
+ remainingFiles, remainingTotalSize }`, the same shape as `lr-file-input`'s;
64
+ `LyraAttachmentFilesCapability = 'files' | 'image' | 'camera'`, `'camera'` only while
65
+ `camera-capture` routed a capture through the system camera) — fired once a file-backed
66
+ capability's hidden input produces a real selection. `files` are the picks matching `accept` as a fresh frozen
57
67
  owner-realm array snapshot, not a live reference to the input's own `.files`; picks the OS dialog's
58
68
  "All files" filter let through that do not match `accept` are listed in `rejected` with reason
59
69
  `'type'`. No size or count limit applies here, so both `remaining*` fields are `null`. `lr-camera-request`
60
70
  and `lr-audio-request`
61
71
  (both no detail — `detail` is `null`, not `undefined`, per the DOM spec's `CustomEventInit`
62
- default) — fired when the `camera` / `audio` capability is activated; this component implements no
72
+ default) — fired when the `camera` / `audio` capability is activated (for `camera`, unless
73
+ `camera-capture` opened the system camera instead); this component implements no
63
74
  capture UI of its own, the host owns everything from here (there's no single right answer for
64
75
  `getUserMedia` vs. `<input capture>` vs. a native wrapper's own camera API; for `audio` the
65
76
  typical host response is opening `<lr-push-to-talk>` in an overlay, then handing the resulting
@@ -108,6 +119,10 @@ public token must pass through. Size remains the one exception that does not cro
108
119
  trigger.addEventListener("lr-files", (e) => queueFiles(e.detail.capability, e.detail.files));
109
120
  trigger.addEventListener("lr-camera-request", openCameraFlow);
110
121
  </script>
122
+
123
+ <!-- Phones open the rear camera and report the photo as lr-files (capability "camera");
124
+ desktop browsers keep firing lr-camera-request for a custom camera dialog. -->
125
+ <lr-attachment-trigger camera-capture="environment"></lr-attachment-trigger>
111
126
  ```
112
127
 
113
128
  **Known gotchas:**
@@ -117,9 +132,14 @@ public token must pass through. Size remains the one exception that does not cro
117
132
  mutates that exact `FileList` object back to empty in place, not just detaches a stale reference.
118
133
  A consumer reading `lr-files` later would otherwise observe an empty list — this component
119
134
  copies into a fresh frozen `File[]` before clearing the native input.
120
- - The `camera`/`audio` capabilities never touch the hidden `<input type="file">` at all — both are
121
- scope-limited by design to firing `lr-camera-request`/`lr-audio-request` and nothing else. The
122
- hidden input is only rendered when `capabilities` contains `files` or `image`.
135
+ - The `camera`/`audio` capabilities never touch the hidden `<input type="file">` by default — both
136
+ are scope-limited to firing `lr-camera-request`/`lr-audio-request`. The one exception is
137
+ `camera-capture` on a capture-capable engine (see above). The hidden input is only rendered when
138
+ `capabilities` contains `files` or `image`, or `camera` with a valid `camera-capture`.
139
+ - A capture input has to open inside the user's own gesture, which is why `camera-capture` exists:
140
+ a host that opened its own hidden `<input capture>` from an asynchronous `lr-camera-request`
141
+ handler could lose the gesture. Support is detected from the engine's `capture` IDL attribute,
142
+ not from the pointer type.
123
143
  - Setting `disabled` closes an open capability menu, disables its items as well as the trigger, and
124
144
  discards a native file selection that arrives after the component became disabled.
125
145
 
@@ -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,10 +49,14 @@ 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'`.
58
62
  - `withoutEnterSubmit: boolean = false` (reflected, attribute `without-enter-submit`) — when set,
@@ -194,8 +198,10 @@ and disables only the built-in Send button; editing and busy-state Stop behavior
194
198
  restyle `[part="base"]` under `plain` and want to draw your own focus cue instead (e.g. on a
195
199
  wrapper you place the composer inside), set `--lr-chat-composer-focus-shadow: none` rather than
196
200
  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`.
201
+ - `actions-layout="stacked"` and `actions-layout="below"` only change `[part="row"]`'s layout (a
202
+ CSS grid instead of a flex row); they do not change which slot content is hidden or when the
203
+ built-in button replaces `end`. `reservations.css` reserves the taller resting footprint of
204
+ `below` (for the default `min-rows="1"`) before upgrade, so no `::part(row)` grid or hand-written
205
+ reservation is needed.
200
206
 
201
207
  ---
@@ -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`).
@@ -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
@@ -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
@@ -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`
@@ -116,6 +116,23 @@ also apply. The flat source rows own logical treeitem semantics.
116
116
  uses a `var(--lr-size-20rem)` height ceiling. Values that do not parse
117
117
  as CSS `max-height`, contain declaration breaks, or contain `url()` are ignored, leaving
118
118
  `--lr-json-viewer-max-height` in control
119
+ - `layout: 'auto' | 'inline' | 'stacked' = 'auto'` (type `LyraJsonViewerLayout`) — how a scalar row places
120
+ its key and value. `'auto'` keeps them side by side while the viewer's own inline size is at
121
+ least 30rem and stacks them below that, through a container query on the viewer's allocation
122
+ (not the viewport), so a viewer in a phone-width tool-call panel stacks without configuration.
123
+ `'stacked'` always puts the value on its own line under its key, aligned with the key, keeps
124
+ the per-node copy button on the key's line, and tightens rows: leaf rows drop the
125
+ icon-button-sized floor their hidden toggle spacer otherwise imposes and lines use the snug
126
+ line height, while real expand/collapse toggles keep their full hit area. `'inline'` keeps the
127
+ side-by-side row at every width. Unknown values fall back to `'auto'`. Applies to the `data`
128
+ tree; `treeSource` rows keep their fixed virtualized layout. In every layout a key offers line
129
+ breaks after `_`, `-`, `.`, `/`, `:` and `@` and between a lower-case and an upper-case letter,
130
+ so `monthly_contribution_amount` wraps between its words; a single overlong segment still breaks
131
+ anywhere as a last resort.
132
+
133
+ ```html
134
+ <lr-json-viewer layout="stacked"></lr-json-viewer>
135
+ ```
119
136
  - `copyable: boolean = false` (reflected) — shows copy-to-clipboard affordances: one for the whole
120
137
  value, plus one per node
121
138
  - `query: string = ''` — with `treeSource` unset, case-insensitive substring match against
@@ -208,6 +208,11 @@ cross-document adoption closes it. A required, uncommitted value recomputes its
208
208
  message when `.strings` or the effective locale changes; an author custom-validity message retains
209
209
  priority until cleared.
210
210
 
211
+ Failed positioning closes the list with a non-cancelable `lr-hide` notification, then
212
+ `lr-after-hide` once it leaves layout. This includes replacement positioning after the list has
213
+ opened. A fresh opening retries positioning; an obsolete failure preserves newer geometry.
214
+ Ordinary connected closes remain cancelable.
215
+
211
216
  **Slots:** `label`, `hint`, `error`.
212
217
 
213
218
  **CSS parts:** `limit` (input-loss notice), `form-control`, `form-control-label`, `trigger`,
@@ -55,7 +55,8 @@ clamped to `[1, 32]` (`0` becomes `1`, `33` becomes `32`), and only non-finite v
55
55
  instance's isolated peer-neutral configurable parser; `htmlMode: 'sanitize' | 'escape' | 'trusted' =
56
56
  'sanitize'` (attribute `html-mode`), `withoutGfm: boolean = false` (attribute `without-gfm`),
57
57
  `withoutImages: boolean = false` (attribute `without-images`), `linkTarget: string | null = '_blank'` (attribute
58
- `link-target`), `internalLinkPrefix: string = ''` (attribute `internal-link-prefix`),
58
+ `link-target`), `linkSchemes?: string` (attribute `link-schemes`, the same narrowed link allowlist),
59
+ `internalLinkPrefix: string = ''` (attribute `internal-link-prefix`),
59
60
  `headingOffset: number = 0` (attribute `heading-offset`), `streaming: boolean = false` (reflected),
60
61
  `streamingRender: MarkdownStreamingRender = 'plain'` (attribute `streaming-render`, not reflected),
61
62
  `codeBlockHeader: boolean = false` (attribute `code-block-header`),
@@ -101,6 +101,19 @@ uses for its own `[part="body"]`.
101
101
  emitted. `'_blank'` (the default) preserves the original output; a falsy value (`null`, or the
102
102
  empty string via `link-target=""`) omits `target`/`rel` entirely instead of always defaulting to
103
103
  `_blank`, so rendered links open in the same tab
104
+ - `linkSchemes?: string` (attribute `link-schemes`) — narrows which link destinations may become
105
+ anchors. A space- or comma-separated list of `http`, `https`, `blob`, `mailto` and `relative`
106
+ (a URL with no scheme of its own: a path, query, fragment or scheme-relative `//host` URL, which
107
+ inherits the page's scheme). Tokens are case-insensitive and may end in `:`. Unset (the default)
108
+ keeps the standard allowlist below. Any other token (`data`, `javascript`, a typo) is ignored, so
109
+ the list can only narrow that allowlist, never widen it; a list with no recognised token,
110
+ including `link-schemes=""`, allows no link at all. A refused link fails closed: it renders as its
111
+ plain text, never as an anchor. When set, it applies in every `htmlMode`, `trusted` included, to
112
+ Markdown links and GFM autolinks and, after sanitization, to raw-HTML and SVG `<a>` elements
113
+ (unwrapped to their content) and `<area>` elements (removed). Sanitization itself is unchanged.
114
+ Images are governed by `withoutImages`, not by this list. Changing it re-renders.
115
+ `<lr-markdown link-schemes="https"></lr-markdown>` keeps only `https:` links;
116
+ `link-schemes="https relative"` also keeps same-site paths.
104
117
  - `internalLinkPrefix: string = ''` (attribute `internal-link-prefix`) — when set, a rendered link
105
118
  whose `href` _attribute_ (not the browser-resolved `.href` property) starts with this prefix is
106
119
  intercepted on click and reported via `lr-link-activate` instead of navigating; empty (the default)
@@ -234,7 +247,8 @@ defers highlighting until completion; progressive streaming highlights settled b
234
247
  light-DOM `MutationObserver` on that container can never see a property-driven update rendered
235
248
  entirely inside this element's own shadow root. See `<lr-thinking-panel>`'s own reference at `llms/components/lr-thinking-panel.md`.
236
249
  - `lr-copy` and `lr-copy-error` — the fulfilled and failed clipboard outcomes from the optional
237
- code-block copy chrome; both bubble and are composed.
250
+ code-block copy chrome; both bubble and are composed. If an outcome listener disconnects the
251
+ element, disables the header, or starts another copy, superseded feedback is canceled.
238
252
  **Slots:** none — content comes from the `content` property, not light-DOM children.
239
253
 
240
254
  **CSS parts:** `content` (the wrapper around the rendered or plain-text-fallback output; respects
@@ -376,12 +390,14 @@ can cover the other. Both surfaces use `white-space: pre` and scroll horizontall
376
390
  `encodeURI`-based validity guard throw, silently dropping just that anchor (the link text still
377
391
  renders, with no `href`) — mirrors `marked`'s own default `link()` renderer's defensive behavior.
378
392
  - every rendered link/image `href`/`src` is additionally scheme-checked against the same allowlist
379
- `<lr-button>`/`<lr-card>` use for a navigation `href` (`http:`, `https:`, `blob:`, `mailto:`, and
380
- relative URLs — plus `data:` for images only), independently of `htmlMode` — `sanitize` and
393
+ `<lr-card>` uses for a navigation `href` (`http:`, `https:`, `blob:`, `mailto:`, and
394
+ relative URLs — plus `data:` for images only; the `tel:`/`sms:` handoffs `<lr-button>` accepts on
395
+ an author-written `href` are not admitted here), independently of `htmlMode` — `sanitize` and
381
396
  `escape` both reject a disallowed scheme (e.g. `javascript:`) by dropping the anchor/image and
382
397
  rendering only its text/alt content, exactly like the malformed-`href` case above; only
383
398
  `html-mode="trusted"` skips this check, consistent with its documented full bypass. The allowlist
384
- does not stop an allowed image URL from being fetched; set `without-images` for that.
399
+ does not stop an allowed image URL from being fetched; set `without-images` for that. To narrow
400
+ the link half of it (for example to `https:` only), set `link-schemes`.
385
401
  - `target` is not in DOMPurify's default attribute allowlist (unlike `part`/`rel`/`class`, which
386
402
  already are), so sanitization is called with `ADD_ATTR: ['target']` — without that, every rendered
387
403
  link's `target` would be silently stripped by sanitization even though the anchor itself survives.
@@ -30,7 +30,7 @@ For a menu button or other anchored overlay, compose the semantic controller ins
30
30
  `<lr-dropdown>`:
31
31
 
32
32
  ```html
33
- <lr-dropdown label="Row actions">
33
+ <lr-dropdown aria-label="Row actions">
34
34
  <button slot="trigger" aria-label="Row actions">⋮</button>
35
35
  <lr-menu>
36
36
  <lr-menu-item value="edit">Edit</lr-menu-item>
@@ -43,6 +43,8 @@ The dropdown shell owns trigger relationships, positioning, opening/closing, out
43
43
  focus return, and lifecycle events. The contained menu remains the sole semantic owner: its
44
44
  `header`/default/`footer` regions and named `role="menu"` list are preserved, while the outer popup
45
45
  is neutral. This is also the composition used for direct `<lr-dropdown-item>` children.
46
+ The trigger's `aria-label` names its button. The dropdown's `aria-label` supplies the contained
47
+ menu's fallback name; a `label` or `aria-label` on the menu itself takes precedence.
46
48
 
47
49
  ### `lr-menu`
48
50
 
@@ -27,6 +27,31 @@ synchronous call, including changes made immediately beforehand. They preserve n
27
27
  and bounds, update form submission silently, and remain no-ops before the native input has rendered
28
28
  or while disabled/readonly. Native `step="any"` remains a non-steppable no-op.
29
29
 
30
+ **Locale-aware entry (`localized`).** `localized: boolean = false` (attribute `localized`,
31
+ reflected) reads and shows numbers with the grouping and decimal separators of the effective locale
32
+ (`lang`/`locale`): in `de` or `ro`, typing `25.000` gives twenty-five thousand and `10,24` gives ten
33
+ point two four. `value`, the submitted form value and `valueAsNumber` keep the native
34
+ `type="number"` form (`25000`, `10.24`), so the server and the `value`/`default-value` attributes
35
+ always use `.` and no grouping; a prefilled `value="1234567.5"` displays `1.234.567,5` in `de`.
36
+ Range, step and required validity come from a detached native number input given the parsed value,
37
+ so `min`/`max`/`step` and the browser's validation messages behave as on the default field. Grouping
38
+ is checked rather than ignored: text the locale would not write (`10.24` in `de`, `10,24` in `en`,
39
+ `1,234,567` in `en-IN`) reports `badInput` and leaves `value` empty instead of misreading the
40
+ entry. Any space counts as the group of a space-grouping locale (`fr`), and locale digits
41
+ (`ar-EG`) are accepted. Typed text stays as entered until `change` or blur, which re-format it;
42
+ stepping and programmatic writes re-format immediately, and a locale change re-formats the shown
43
+ value. The internal input becomes a text field with `role="spinbutton"`, `aria-valuenow`,
44
+ `aria-valuetext` and `aria-valuemin`/`aria-valuemax`, and ArrowUp/ArrowDown step the value with
45
+ the same `input`/`lr-input`/`change`/`lr-change` sequence as a stepper click. The default
46
+ `inputmode="numeric"` is unchanged; set `inputmode="decimal"` when fractions are expected so touch
47
+ keyboards offer the separator. Unset, the field is the native number input, unchanged.
48
+
49
+ ```html
50
+ <lr-number-input lang="de" localized label="Betrag" name="amount" step="0.01" inputmode="decimal"
51
+ value="25000"></lr-number-input>
52
+ <!-- shows 25.000; submits amount=25000 -->
53
+ ```
54
+
30
55
  Changing own `disabled` from true to false in the same task that disables an ancestor fieldset keeps
31
56
  the native editing control effectively disabled. The enabled first-legend exception and explicit
32
57
  own-disabled state retain their native meaning; validity and form submission follow the effective
@@ -170,7 +195,9 @@ The exact-320px RTL story keeps long label/hint copy and both fixed-size stepper
170
195
  - `clearable`/`clear-button`/`lr-clear` are inert: the clear action only renders for
171
196
  `type="text"`/`"search"`. `password-visible`/`password-toggle` are likewise inert, since the
172
197
  toggle only renders for `type="password"`. `minlength`/`maxlength`/`pattern` are inert too — the
173
- platform ignores all three on `type="number"`; use `min`/`max`/`step` instead.
198
+ platform ignores all three on `type="number"`; use `min`/`max`/`step` instead. With `localized`,
199
+ the internal input is a text field, so `maxlength` does limit typing there; validity still ignores
200
+ all three.
174
201
  - `type` is re-forced to `number` on every connect, but a later `el.type = 'text'` on a connected
175
202
  element is not reverted — use `lr-input` when the type has to change.
176
203
 
@@ -34,7 +34,7 @@ their corresponding data can be supplied. The default entry registers all childr
34
34
  `withoutEnterSubmit: boolean = false` (attribute `without-enter-submit`);
35
35
  `submitDisabled: boolean = false` (attribute `submit-disabled`), `withoutStop: boolean = false`
36
36
  (attribute `without-stop`), `minRows: number = 1` (attribute `min-rows`) and `maxRows: number = 8`
37
- (attribute `max-rows`), `frame: 'card' | 'plain' = 'card'` and `actionsLayout: 'inline' | 'stacked' = 'inline'`
37
+ (attribute `max-rows`), `frame: 'card' | 'plain' = 'card'` and `actionsLayout: 'inline' | 'stacked' | 'below' = 'inline'`
38
38
  (attribute `actions-layout`) forward to the composed `lr-chat-composer` with its semantics, and a slotted
39
39
  `toolbar` child is forwarded to the composer's `toolbar` slot;
40
40
  `spellcheck: boolean = true` (string-aware true-default converter), `autocapitalize: string = ''`,
@@ -20,7 +20,7 @@ A build-lean `<lr-streaming-text>` variant for a consumer whose fenced-code `lan
20
20
  covers every language it will ever stream, or who never renders fenced code at all. Every
21
21
  capability — token coalescing, `contentMode` auto-detection, the blinking cursor, the
22
22
  `lr-content-settled` event, the `languages` property, and the full forwarded Markdown configuration
23
- surface (`tabSize`, `htmlMode`, `withoutGfm`, `withoutImages`, `linkTarget`, `internalLinkPrefix`, `headingOffset`,
23
+ surface (`tabSize`, `htmlMode`, `withoutGfm`, `withoutImages`, `linkTarget`, `linkSchemes`, `internalLinkPrefix`, `headingOffset`,
24
24
  `withoutSyntaxHighlighting`, `headingAnchors`, `math`, `maxHeight`) — is identical to `<lr-streaming-text>`;
25
25
  only which Markdown element Markdown mode composes differs: this variant renders
26
26
  `<lr-markdown-core>` (`../markdown/markdown-core.js`) instead of `<lr-markdown>`, so importing this
@@ -48,7 +48,8 @@ attribute names, and defaults described under `<lr-streaming-text>`'s own **Prop
48
48
  'sanitize'` (attribute `html-mode`); `withoutGfm: boolean = false` (attribute `without-gfm`);
49
49
  `withoutImages: boolean = false` (attribute `without-images`); `linkTarget: string | null = '_blank'`
50
50
  (attribute `link-target`, still guarded by the composed element's own
51
- `rel="noopener noreferrer"` whenever a `target` is emitted); `internalLinkPrefix: string = ''`
51
+ `rel="noopener noreferrer"` whenever a `target` is emitted); `linkSchemes?: string` (attribute
52
+ `link-schemes`); `internalLinkPrefix: string = ''`
52
53
  (attribute `internal-link-prefix`); `headingOffset: number = 0` (attribute `heading-offset`);
53
54
  `streamingRender: MarkdownStreamingRender = 'plain'` (attribute `streaming-render`, not reflected);
54
55
  `codeBlockHeader: boolean = false` (attribute `code-block-header`); `withoutSyntaxHighlighting: boolean = false` (attribute
@@ -64,6 +64,9 @@ properties existed:
64
64
  `<lr-markdown>`'s own `linkTarget`; the composed element always applies its own
65
65
  `rel="noopener noreferrer"` guard whenever a `target` is emitted, including a forwarded
66
66
  non-default value, and never a bare `opener`.
67
+ - `linkSchemes?: string` (attribute `link-schemes`) — forwarded to the composed `<lr-markdown>`'s
68
+ own `linkSchemes`; `link-schemes="https"` keeps only `https:` links in streamed model output and
69
+ renders every other link as plain text.
67
70
  - `internalLinkPrefix: string = ''` (attribute `internal-link-prefix`) — forwarded to the composed
68
71
  `<lr-markdown>`'s own `internalLinkPrefix`.
69
72
  - `headingOffset: number = 0` (attribute `heading-offset`) — forwarded to the composed
@@ -169,7 +172,7 @@ showing the previous stream's stale final content for the length of the window.
169
172
  Rendering itself is never reimplemented here: Markdown mode composes `<lr-markdown>` directly,
170
173
  forwarding this component's own `streaming` through as that component's `streaming` hint prop,
171
174
  `streamingRender`, `codeBlockHeader`, `languages` verbatim, and the rest of `<lr-markdown>`'s
172
- configuration surface verbatim too (`tabSize`, `htmlMode`, `withoutGfm`, `withoutImages`, `linkTarget`,
175
+ configuration surface verbatim too (`tabSize`, `htmlMode`, `withoutGfm`, `withoutImages`, `linkTarget`, `linkSchemes`,
173
176
  `internalLinkPrefix`, `headingOffset`, `withoutSyntaxHighlighting`, `headingAnchors`, `math`, `maxHeight` —
174
177
  see **Properties** above); plain-text mode
175
178
  renders into a `white-space: pre-wrap` span instead. The