@aceshooting/lyra-ui 30.4.0 → 30.7.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 (203) hide show
  1. package/CHANGELOG.md +92 -0
  2. package/README.md +2 -3
  3. package/dist/components/agent-tools/artifact-panel/artifact-panel.class.d.ts +7 -4
  4. package/dist/components/agent-tools/artifact-panel/artifact-panel.class.js +5 -5
  5. package/dist/components/conversation/code-block/onig.provenance.json +1 -1
  6. package/dist/components/conversation/markdown/markdown-base.class.d.ts +1 -1
  7. package/dist/components/conversation/markdown/markdown-base.class.js +1 -1
  8. package/dist/components/conversation/markdown/markdown-core.class.d.ts +11 -1
  9. package/dist/components/conversation/markdown/markdown-core.class.js +1 -1
  10. package/dist/components/conversation/markdown/markdown-progressive.js +2 -2
  11. package/dist/components/conversation/markdown/markdown-shared.d.ts +7 -2
  12. package/dist/components/conversation/markdown/markdown-shared.js +3 -3
  13. package/dist/components/conversation/markdown/markdown.class.d.ts +11 -1
  14. package/dist/components/conversation/markdown/markdown.class.js +1 -1
  15. package/dist/components/conversation/message-parts/message-parts.class.d.ts +1 -1
  16. package/dist/components/conversation/message-parts/message-parts.class.js +1 -1
  17. package/dist/components/conversation/message-parts/message-parts.d.ts +1 -1
  18. package/dist/components/conversation/model-select/model-select.class.d.ts +8 -1
  19. package/dist/components/conversation/model-select/model-select.class.js +2 -2
  20. package/dist/components/conversation/streaming-text/streaming-text-base.class.d.ts +5 -0
  21. package/dist/components/conversation/streaming-text/streaming-text-base.class.js +2 -2
  22. package/dist/components/conversation/streaming-text/streaming-text-core.class.d.ts +1 -1
  23. package/dist/components/conversation/streaming-text/streaming-text-core.class.js +1 -0
  24. package/dist/components/conversation/streaming-text/streaming-text.class.d.ts +1 -1
  25. package/dist/components/conversation/streaming-text/streaming-text.class.js +1 -0
  26. package/dist/components/conversation/suggestion-chips/suggestion-chips.class.d.ts +6 -0
  27. package/dist/components/conversation/suggestion-chips/suggestion-chips.styles.js +1 -1
  28. package/dist/components/conversation/voice-picker/voice-picker.class.d.ts +9 -2
  29. package/dist/components/conversation/voice-picker/voice-picker.class.js +2 -2
  30. package/dist/components/conversation/widget-renderer/default-registry.js +1 -1
  31. package/dist/components/conversation/widget-renderer/registry.d.ts +1 -27
  32. package/dist/components/conversation/widget-renderer/registry.js +1 -1
  33. package/dist/components/conversation/widget-renderer/resolve.d.ts +1 -29
  34. package/dist/components/conversation/widget-renderer/resolve.js +1 -1
  35. package/dist/components/conversation/widget-renderer/widget-renderer.class.d.ts +1 -1
  36. package/dist/components/conversation/widget-renderer/widget-renderer.class.js +1 -1
  37. package/dist/components/forms/catalog-picker-base.d.ts +3 -1
  38. package/dist/components/forms/catalog-picker-base.js +3 -3
  39. package/dist/components/forms/combobox/combobox.class.d.ts +9 -2
  40. package/dist/components/forms/combobox/combobox.class.js +2 -2
  41. package/dist/components/forms/date-picker/date-input.class.d.ts +9 -2
  42. package/dist/components/forms/date-picker/date-input.class.js +2 -2
  43. package/dist/components/forms/input/input-shared.d.ts +9 -2
  44. package/dist/components/forms/input/input-shared.js +2 -2
  45. package/dist/components/forms/input/time-input.class.d.ts +9 -2
  46. package/dist/components/forms/input/time-input.class.js +2 -2
  47. package/dist/components/forms/input/time-input.styles.js +1 -1
  48. package/dist/components/forms/locale-picker/locale-picker.class.d.ts +18 -3
  49. package/dist/components/forms/locale-picker/locale-picker.class.js +2 -2
  50. package/dist/components/forms/phone-input/phone-input.class.d.ts +9 -2
  51. package/dist/components/forms/phone-input/phone-input.class.js +2 -2
  52. package/dist/components/forms/phone-input/phone-input.styles.js +1 -1
  53. package/dist/components/forms/select/select.class.d.ts +9 -2
  54. package/dist/components/forms/select/select.class.js +2 -2
  55. package/dist/components/forms/textarea/textarea.class.d.ts +9 -2
  56. package/dist/components/forms/textarea/textarea.class.js +2 -2
  57. package/dist/components/forms/token-input/token-input.class.d.ts +9 -2
  58. package/dist/components/forms/token-input/token-input.class.js +2 -2
  59. package/dist/components/forms/token-input/token-input.styles.js +1 -1
  60. package/dist/components/layout/dock-panel/dock-panel.class.d.ts +5 -2
  61. package/dist/components/layout/dock-panel/dock-panel.styles.js +1 -1
  62. package/dist/components/layout/menu/menu-item.class.d.ts +7 -4
  63. package/dist/components/layout/menu/menu-item.class.js +3 -2
  64. package/dist/components/layout/multi-split/multi-split.class.d.ts +73 -6
  65. package/dist/components/layout/multi-split/multi-split.class.js +4 -4
  66. package/dist/components/layout/multi-split/multi-split.styles.js +1 -1
  67. package/dist/components/layout/page/page.class.d.ts +7 -0
  68. package/dist/components/layout/page/page.styles.js +1 -1
  69. package/dist/components/media/flag/language-map.js +1 -1
  70. package/dist/components/media/image-viewer/image-viewer-panorama.d.ts +1 -5
  71. package/dist/components/media/image-viewer/image-viewer-panorama.js +1 -8
  72. package/dist/components/media/image-viewer/image-viewer.class.d.ts +1 -1
  73. package/dist/components/media/image-viewer/image-viewer.class.js +1 -1
  74. package/dist/components/media/map/map-control-options.d.ts +19 -5
  75. package/dist/components/media/map/map-control-options.js +1 -1
  76. package/dist/components/media/map/map-controls-lifecycle.js +1 -1
  77. package/dist/components/media/map/map-feature-loader.js +1 -1
  78. package/dist/components/media/map/map-loader.d.ts +10 -4
  79. package/dist/components/media/map/map-loader.js +1 -1
  80. package/dist/components/media/map/map-scene-admission.js +1 -0
  81. package/dist/components/media/map/map-scene-completion-adapter.js +1 -0
  82. package/dist/components/media/map/map-scene-completion-camera.js +1 -0
  83. package/dist/components/media/map/map-scene-configuration-controller.js +1 -0
  84. package/dist/components/media/map/map-scene-configuration.d.ts +15 -0
  85. package/dist/components/media/map/map-scene-configuration.js +1 -0
  86. package/dist/components/media/map/map-scene-controls.js +1 -0
  87. package/dist/components/media/map/map-scene-errors.js +1 -0
  88. package/dist/components/media/map/map-scene-line-layer.js +1 -0
  89. package/dist/components/media/map/map-scene-lines.js +1 -0
  90. package/dist/components/media/map/map-scene-owner.js +1 -0
  91. package/dist/components/media/map/map-scene-position-registry.js +1 -0
  92. package/dist/components/media/map/map-scene-render-controller.js +1 -0
  93. package/dist/components/media/map/map-scene-render-input.js +1 -0
  94. package/dist/components/media/map/map-scene-source-snapshot.js +1 -0
  95. package/dist/components/media/map/map-scene-status.js +1 -0
  96. package/dist/components/media/map/map-scene-types.d.ts +55 -0
  97. package/dist/components/media/map/map.class.d.ts +105 -18
  98. package/dist/components/media/map/map.class.js +32 -15
  99. package/dist/components/media/map/map.styles.js +1 -1
  100. package/dist/components/media/sequence-playback/sequence-playback.class.d.ts +1 -1
  101. package/dist/components/media/sequence-playback/sequence-playback.class.js +1 -1
  102. package/dist/components/media/video/video.class.d.ts +1 -1
  103. package/dist/components/media/video/video.class.js +1 -1
  104. package/dist/components/retrieval/graph/graph-builtin-3d-engine.js +1 -1
  105. package/dist/components/retrieval/graph/graph-curvature.js +1 -0
  106. package/dist/components/retrieval/graph/graph-engine-columns.js +1 -1
  107. package/dist/components/retrieval/graph/graph-model.d.ts +4 -0
  108. package/dist/components/retrieval/graph/graph-node-renderer.d.ts +13 -0
  109. package/dist/components/retrieval/graph/graph-node-renderer.js +1 -0
  110. package/dist/components/retrieval/graph/graph-source-controller.js +1 -1
  111. package/dist/components/retrieval/graph/graph-spatial-controller.js +3 -1
  112. package/dist/components/retrieval/graph/graph-spatial.js +1 -1
  113. package/dist/components/retrieval/graph/graph-webgl-engine.js +1 -1
  114. package/dist/components/retrieval/graph/graph.class.d.ts +11 -3
  115. package/dist/components/retrieval/graph/graph.class.js +4 -4
  116. package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.class.d.ts +8 -2
  117. package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.class.js +4 -2
  118. package/dist/events.d.ts +41 -1
  119. package/dist/framework-types.d.ts +1 -1
  120. package/dist/internal/collection-policy.js +1 -0
  121. package/dist/internal/collection-snapshot.js +1 -1
  122. package/dist/internal/default-strings/media.generated.js +1 -1
  123. package/dist/internal/default-strings/retrieval.generated.js +1 -1
  124. package/dist/internal/engine-3d-loader.d.ts +8 -2
  125. package/dist/internal/engine-3d-loader.js +1 -1
  126. package/dist/internal/form-control.styles.js +1 -1
  127. package/dist/internal/locale-loaders.generated.js +1 -1
  128. package/dist/internal/localization-runtime.js +1 -1
  129. package/dist/internal/localization-types.d.ts +1 -1
  130. package/dist/internal/localization.js +1 -1
  131. package/dist/internal/map-camera-follow-controller.d.ts +9 -0
  132. package/dist/internal/map-camera-follow-controller.js +1 -0
  133. package/dist/internal/map-camera-follow-data.js +1 -0
  134. package/dist/internal/map-camera-follow-scene.js +1 -0
  135. package/dist/internal/map-camera-session-controller.d.ts +59 -0
  136. package/dist/internal/map-camera-session-controller.js +1 -0
  137. package/dist/internal/map-camera-session-data.d.ts +16 -0
  138. package/dist/internal/map-camera-session-data.js +1 -0
  139. package/dist/internal/map-camera-session.js +1 -0
  140. package/dist/internal/map-scene-session.js +1 -0
  141. package/dist/internal/media-panorama.d.ts +5 -0
  142. package/dist/internal/media-panorama.js +8 -0
  143. package/dist/internal/package-metadata.js +1 -1
  144. package/dist/internal/sequence-playback-binding.js +1 -0
  145. package/dist/internal/typed-columns.d.ts +3 -1
  146. package/dist/internal/typed-columns.js +1 -1
  147. package/dist/internal/variants.d.ts +7 -0
  148. package/dist/internal/widget-default-registry.js +1 -0
  149. package/dist/internal/widget-document.d.ts +29 -0
  150. package/dist/internal/widget-document.js +1 -0
  151. package/dist/internal/widget-type-registry.d.ts +27 -0
  152. package/dist/internal/widget-type-registry.js +1 -0
  153. package/dist/lyra.d.ts +1 -1
  154. package/dist/lyra.js +1 -1
  155. package/dist/map-camera-session.d.ts +10 -0
  156. package/dist/map-camera-session.js +1 -0
  157. package/dist/sequence-time-binding.d.ts +3 -0
  158. package/dist/sequence-time-binding.js +1 -0
  159. package/dist/simulation-clock.d.ts +3 -0
  160. package/dist/simulation-clock.js +1 -0
  161. package/dist/time-index.d.ts +3 -0
  162. package/dist/time-index.js +1 -0
  163. package/llms/components/lr-artifact-panel.md +8 -3
  164. package/llms/components/lr-combobox.md +2 -0
  165. package/llms/components/lr-country-picker.md +2 -0
  166. package/llms/components/lr-currency-picker.md +2 -0
  167. package/llms/components/lr-date-picker.md +2 -0
  168. package/llms/components/lr-dock-panel.md +5 -2
  169. package/llms/components/lr-graph.md +121 -3
  170. package/llms/components/lr-input.md +2 -0
  171. package/llms/components/lr-knowledge-graph-explorer.md +6 -1
  172. package/llms/components/lr-locale-picker.md +8 -1
  173. package/llms/components/lr-map.md +365 -13
  174. package/llms/components/lr-markdown-core.md +2 -1
  175. package/llms/components/lr-markdown.md +12 -1
  176. package/llms/components/lr-menu.md +5 -2
  177. package/llms/components/lr-model-select.md +2 -0
  178. package/llms/components/lr-multi-split.md +53 -4
  179. package/llms/components/lr-native-time-input.md +2 -0
  180. package/llms/components/lr-number-input.md +2 -0
  181. package/llms/components/lr-page.md +9 -1
  182. package/llms/components/lr-phone-input.md +2 -0
  183. package/llms/components/lr-select.md +2 -0
  184. package/llms/components/lr-sequence-playback.md +44 -0
  185. package/llms/components/lr-streaming-text-core.md +3 -2
  186. package/llms/components/lr-streaming-text.md +4 -1
  187. package/llms/components/lr-suggestion-chips.md +6 -2
  188. package/llms/components/lr-textarea.md +2 -0
  189. package/llms/components/lr-time-input.md +2 -0
  190. package/llms/components/lr-time-zone-picker.md +2 -0
  191. package/llms/components/lr-token-input.md +2 -0
  192. package/llms/components/lr-unit-picker.md +2 -0
  193. package/llms/components/lr-voice-picker.md +2 -0
  194. package/llms/peers.md +7 -7
  195. package/llms/shared/imports-and-registration.md +1 -1
  196. package/llms/shared/localization-and-rtl.md +15 -1
  197. package/llms/shared/testing-and-utilities.md +184 -0
  198. package/llms/shared.md +200 -2
  199. package/locales.json +1 -1
  200. package/package.json +39 -23
  201. package/registrations.json +1 -1
  202. package/skills/lyra-ui/lyra-gen.md +18 -0
  203. /package/dist/{components/media/image-viewer/image-viewer-panorama.styles.js → internal/media-panorama.styles.js} +0 -0
@@ -9,7 +9,7 @@
9
9
  - **Release history** [CHANGELOG.md](../../CHANGELOG.md); family-wide breaking-change summaries: [media](https://github.com/aceshooting/lyra-ui/blob/main/packages/lyra-ui/llms/media.md)
10
10
  - **Deprecations** none
11
11
  - **Optional peers** `@aceshooting/lyra-map`, `dompurify`, `maplibre-gl` — see `llms/peers.md`
12
- - **Themeable via** 78 parts, 10 custom properties — see this component's own `@csspart`/`@cssprop` list below
12
+ - **Themeable via** 92 parts, 10 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
  ---
@@ -452,6 +452,12 @@ owned overlay layer; `interactiveBasemapLayers = []` explicitly enrolls basemap
452
452
  `lr-map-click`, `lr-map-contextmenu`, `lr-map-feature-enter`, and `lr-map-feature-leave` report routed interaction data;
453
453
  legacy `lr-map-click` and cluster payloads remain available. `pickMode = false` enables a temporary
454
454
  coordinate-picking session when set to true; `lr-map-pick` also supports keyboard center selection.
455
+ `keyboardActivation = false` (attribute `keyboard-activation`) opts in to keyboard activation: while
456
+ the map canvas has focus, an unmodified, non-repeated Enter or Space activates the interactive feature
457
+ at the view center (the camera center, inside any `cameraPadding`) through the same hit query and
458
+ priority as a click there, and emits `lr-map-click` with `trigger: 'keyboard'` (pointer clicks carry no
459
+ `trigger`). An empty center still emits a click without `feature`. It does nothing in pick mode, while
460
+ drawing is armed, or while the map is disabled or inert; unset, both keys are left to the browser.
455
461
  `setFeatureState(target, patch)`, `getFeatureState(target)`, and `removeFeatureState(target, key?)`
456
462
  use stable source/feature IDs and an optional `origin` (`choropleth`, `data-layer`, `overlay`, or
457
463
  `basemap`). Check boolean admission and retain application state across source identity changes;
@@ -1053,9 +1059,9 @@ intensity?: LyraMapHeatmapZoomValue; opacity?: number }`, where `LyraMapHeatmapZ
1053
1059
  `LyraMapScaleUnit = 'metric' | 'imperial'`. The element adds the engine's standard controls once
1054
1060
  the map exists, moves one whose corner changes, replaces one whose other options change and removes one that
1055
1061
  is dropped, so an application no longer imports control classes and calls `map.addControl()`.
1056
- All four control option objects accept finite `order` numbers, defaulting to `0`. Within each
1062
+ All control option objects accept finite `order` numbers, defaulting to `0`. Within each
1057
1063
  corner, ascending order controls both visual and keyboard order; ties retain the existing
1058
- navigation, scale, geolocate, attribution sequence. Changing only order moves existing controls
1064
+ navigation, scale, geolocate, globe, terrain, attribution sequence. Changing only order moves existing controls
1059
1065
  without reconstructing them. Invalid order values produce localized configuration feedback.
1060
1066
  `true` takes the defaults (navigation `'top-right'`, scale `'bottom-left'` and `'metric'`); an
1061
1067
  unknown navigation/scale position or unit falls back to its default. Malformed geolocate or
@@ -1063,7 +1069,7 @@ intensity?: LyraMapHeatmapZoomValue; opacity?: number }`, where `LyraMapHeatmapZ
1063
1069
  engine (`maplibre-gl`, or the companion's granular control entries). Requested controls load
1064
1070
  on demand; unavailable controls show localized feedback while the map remains usable. Geolocation
1065
1071
  starts only on user activation. Attribution is enabled by default; set `attribution: false` to
1066
- disable it. Attribution options accept `position`, `compact`, and `customAttribution` as a string,
1072
+ disable it. Attribution options accept `position`, `compact`, `initialExpanded`, and `customAttribution` as a string,
1067
1073
  `LyraMapAttributionLink { readonly label: string; readonly url: string }`, or a readonly array of
1068
1074
  either. Labels are escaped text; links open in a new tab with `rel="noopener noreferrer"`.
1069
1075
  Link URLs must be absolute HTTP(S), no longer than 2,048 characters, with no credentials or
@@ -1071,7 +1077,24 @@ intensity?: LyraMapHeatmapZoomValue; opacity?: number }`, where `LyraMapHeatmapZ
1071
1077
  limited to 4,096 characters. Admission snapshots own data properties without invoking accessors.
1072
1078
  An invalid item rejects the whole custom option and shows localized feedback while retaining
1073
1079
  provider credits. Image exports include link labels as text alongside provider credits, without
1074
- the link URLs or markup. For example:
1080
+ the link URLs or markup. `initialExpanded?: boolean` sets the compact credits disclosure once, when
1081
+ the control is installed and only while the native control is compact; omit it to keep the native
1082
+ initial state. It never hides noncompact credits, and later resizing, dragging or user activation
1083
+ stay native: it is not a controlled state. Changing it replaces the control; position- or
1084
+ order-only changes keep the current user-selected state, and reconnecting applies it again. A
1085
+ malformed value is rejected like other malformed attribution options, with the default credits
1086
+ retained. `lr-map-attribution-toggle` (`LyraMapAttributionToggleDetail { expanded }`) reports each
1087
+ later settled change of the owned (or default) attribution control: synchronous native changes
1088
+ coalesce to their result, repeats are not reported, and installation, seeding, replacement and
1089
+ reconnect emit nothing. Persist `expanded` and pass it as `initialExpanded` for a later
1090
+ installation:
1091
+
1092
+ ```js
1093
+ mapElement.controls = { attribution: { compact: true, initialExpanded: saved ?? false } };
1094
+ mapElement.addEventListener('lr-map-attribution-toggle', event => { saved = event.detail.expanded; });
1095
+ ```
1096
+
1097
+ For example:
1075
1098
 
1076
1099
  ```js
1077
1100
  mapElement.controls = {
@@ -1084,7 +1107,7 @@ intensity?: LyraMapHeatmapZoomValue; opacity?: number }`, where `LyraMapHeatmapZ
1084
1107
  };
1085
1108
  ```
1086
1109
 
1087
- Within each corner the visual and keyboard order is navigation, scale, geolocate, attribution,
1110
+ Within each corner the visual and keyboard order is navigation, scale, geolocate, globe, terrain, attribution,
1088
1111
  including when constructors load in a different order or one fails. A subset keeps that relative
1089
1112
  order. Changing only a corner moves the existing controls and retains focused buttons. Corners
1090
1113
  continue to follow text direction under RTL. Geolocation is never activated by reconfiguration
@@ -1271,6 +1294,18 @@ camera as it is now and return `undefined` before the map exists, for a non-fini
1271
1294
  the engine cannot project. Pair `project()` with `lr-map-move` to keep an overlay glued to a moving
1272
1295
  map.
1273
1296
 
1297
+ `getVisibleBounds(options?: LyraMapVisibleBoundsOptions): LyraMapBounds | null` synchronously reads
1298
+ the visible box as frozen `[[west, south], [east, north]]`. By default it is the box inside the
1299
+ applied `cameraPadding`, the one `lr-map-move` and `lr-map-view-change` report; `{ padded: false }`
1300
+ reads the whole viewport. `west` is wrapped into [-180, 180] and `east` keeps the span, so it can
1301
+ exceed 180 across the antimeridian; latitudes are clamped to [-90, 90]. It returns `null` before the
1302
+ engine exists or when the engine cannot report a box. Use it instead of reading bounds from `.map`:
1303
+
1304
+ ```js
1305
+ const box = mapElement.getVisibleBounds({ padded: false });
1306
+ if (box) loadTiles({ west: box[0][0], south: box[0][1], east: box[1][0], north: box[1][1] });
1307
+ ```
1308
+
1274
1309
  There is deliberately no declarative `bounds` property. `center` and `zoom` already describe the
1275
1310
  camera; a third camera input would need a precedence rule against them, and a framework that
1276
1311
  rebuilds its arrays on every render would refit on every render, pulling the camera away from a user
@@ -1340,7 +1375,8 @@ Also `lr-map-marker-activate` (non-cancelable; frozen `LyraMapMarkerActivationDe
1340
1375
  marker, source }`; `id` is the trimmed explicit identity or `undefined`, `marker` is the accepted
1341
1376
  declarative snapshot, and `source` is `'pointer' | 'keyboard'`), and `lr-map-click`
1342
1377
  (frozen `detail: { readonly lngLat: readonly [lng, lat], readonly feature?, readonly origin?,
1343
- readonly sourceId?, readonly noData? }`; the tuple and any hit GeoJSON feature are detached and
1378
+ readonly sourceId?, readonly noData?, readonly trigger? }`, `trigger` being `'keyboard'` only for a
1379
+ `keyboardActivation`; the tuple and any hit GeoJSON feature are detached and
1344
1380
  recursively frozen). `noData` is `true` only for a choropleth hit whose `field` value is missing,
1345
1381
  `null` or not a number while `choropleth.noData` is configured, and is absent otherwise.
1346
1382
  `feature` resolves against the choropleth fill layer **and** every applied `dataLayers`
@@ -1396,8 +1432,21 @@ user-activated geolocate control locates the user.
1396
1432
  Failures: `lr-map-geolocate-error` (frozen `LyraMapGeolocateErrorDetail { code }`, a
1397
1433
  `LyraMapGeolocationErrorCode`) and `lr-map-geolocate-out-of-bounds` (`{ code: 'out-of-bounds' }`)
1398
1434
  expose no coordinates or native messages; `lr-map-export-error` (frozen
1399
- `LyraMapImageExportErrorDetail { code }`) reports a sanitized `exportImage()` failure. None of these
1400
- events is cancelable; all bubble and are composed.
1435
+ `LyraMapImageExportErrorDetail { code }`) reports a sanitized `exportImage()` failure.
1436
+ Attribution: `lr-map-attribution-toggle` (`LyraMapAttributionToggleDetail { expanded }`) after the owned
1437
+ attribution control's credits are shown or hidden. None of these events is cancelable; all bubble and
1438
+ are composed.
1439
+ Scene: `lr-map-projection-change` (frozen `LyraMapProjectionChangeDetail { projection, source:
1440
+ 'control' }`) and `lr-map-terrain-change` (frozen `LyraMapTerrainChangeDetail { terrain, source:
1441
+ 'control' }`) follow a component-owned globe or terrain control after the property is assigned;
1442
+ programmatic assignments do not emit them, and `whenIdle()` resolves once the change applies.
1443
+ `lr-map-scene-state` (frozen `LyraMapSceneStateDetail { revision, state, code? }`) reports accepted
1444
+ scene status, with rejected updates keeping the previous accepted revision, and
1445
+ `lr-map-scene-activate` (frozen `LyraMapSceneActivateDetail { id, kind, source, position? }`)
1446
+ reports activation of an interactive scene object without moving the camera.
1447
+ Camera: `lr-map-camera-interrupt` (frozen `LyraMapCameraInterruptDetail { reason }`, a
1448
+ `LyraMapCameraInterruptReason`) reports that something other than a `createMapCameraSession()`
1449
+ session ended its viewpoint transition, tour or follow; see the camera sessions section below.
1401
1450
 
1402
1451
  The outer marker-activation detail is frozen, while an opaque marker `unsafeHtml` value remains the
1403
1452
  original supplied value at the MapLibre popup and marker-activation boundary. Treat it as trusted
@@ -1434,15 +1483,34 @@ which only reaches rows projected from `legend`.
1434
1483
  `geolocate`, `geolocate-control`, `controls`, `controls-top`, `controls-bottom`, `controls-top-left`, `controls-top-right`,
1435
1484
  `controls-bottom-left`, `controls-bottom-right`, `zoom-in-icon`, `zoom-out-icon`, `compass-icon`,
1436
1485
  `geolocate-icon`, `geolocate-waiting`, `geolocate-active`, `geolocate-background`, `geolocate-error`,
1486
+ `globe-control`, `globe-button`, `globe-icon`, `terrain-control`, `terrain-button`, `terrain-icon`,
1437
1487
  `attribution-link`, `attribution-expanded`, `controls-attribution-expanded`,
1438
- `configuration-error`, `error`.
1488
+ `configuration-error`, `error`, `scene-panel`, `scene-toggle`, `scene-list`, `scene-item`,
1489
+ `scene-pagination`, `scene-status`.
1490
+
1491
+ | Scene part | Description |
1492
+ | --- | --- |
1493
+ | `scene-panel` | Accessible section containing accepted scene text controls and status. |
1494
+ | `scene-toggle` | Native button that expands or collapses the scene object list. |
1495
+ | `scene-list` | List containing the current page of accepted scene objects. |
1496
+ | `scene-item` | An object's interactive native button or noninteractive text row. |
1497
+ | `scene-pagination` | Previous/next page buttons and localized page summary, present when more than one page exists. |
1498
+ | `scene-status` | Localized accepted-scene or rejected-update status text. |
1499
+
1439
1500
  Before native construction, `initialization-placeholder` is the stable surface and
1440
1501
  `initialization-skeleton` is its decorative skeleton. `initialization-controls` also exposes `controls`;
1441
1502
  its rows expose `controls-top` and `controls-bottom`, and each `initialization-corner` also exposes its
1442
1503
  matching corner token. `initialization-control` outlines explicitly requested controls, with
1443
- `initialization-navigation`, `initialization-scale`, `initialization-geolocate` or
1444
- `initialization-attribution` identifying the kind. Placeholder corners and order follow those options;
1445
- implicit default attribution has no placeholder. For `initialization="interaction"`,
1504
+ `initialization-navigation`, `initialization-scale`, `initialization-geolocate`,
1505
+ `initialization-attribution`, `initialization-globe` or `initialization-terrain` identifying the kind.
1506
+ Placeholder corners and order follow those options;
1507
+ implicit default attribution has no placeholder. Once the map is constructed, the activation surface
1508
+ and skeleton are gone, but `initialization-controls` stays (`aria-hidden`, inert, no pointer events)
1509
+ with outlines only for requested controls whose lazy code is still installing. Those controls load and
1510
+ install in one pass, so their outlines are removed together when the pass settles, whether every
1511
+ control installed or one failed; a later `controls` change replaces them and disconnecting clears them.
1512
+ Already installed controls gain no outline. Outlines paint with the same glass or solid surface material
1513
+ as the installed controls, so the swap does not change their fill. For `initialization="interaction"`,
1446
1514
  `initialization-activate` starts the map and `initialization-activate-label` styles its visible label.
1447
1515
  Hiding that label retains the button's localized accessible name. Pick mode renders `pick-controls` with
1448
1516
  `pick-center` and `pick-cancel`; draw mode renders `drawing-controls` with `drawing-add`,
@@ -1881,3 +1949,287 @@ undefined`, or changing `choropleth.sourceId` to a different value, now calls `r
1881
1949
  without `ResizeObserver` retain MapLibre's own window-resize behavior.
1882
1950
 
1883
1951
  ---
1952
+
1953
+ ### Geographic scene input and text fallback
1954
+
1955
+ The property-only `scene` accepts a `LyraMapScene` with an `objects` array of `marker`,
1956
+ `path`, `arc` and `model` records. Every object has a unique exact-string `id` and a required
1957
+ plain-text `label`. Positions use `{ lngLat: [longitude, latitude], altitude?,
1958
+ altitudeReference? }`; altitude is in meters and defaults to 0 above `sea-level`, with `terrain`
1959
+ as the other reference. Model sources use `{ format, bytes }` or `{ format, src }`, with formats
1960
+ `gltf`, `glb`, `stl`, `obj`, `ply`, `xyz` and `pcd`. Use a property binding, never an attribute.
1961
+
1962
+ Optional descriptor fields use these admission defaults:
1963
+
1964
+ | Field | Default |
1965
+ | --- | --- |
1966
+ | Position `altitude` / `altitudeReference` | `0` meters / `'sea-level'` |
1967
+ | Object `color` / `opacity` | No authored color override / `1` |
1968
+ | Object `interactive` / `showLabel` | `true` / `false` |
1969
+ | Marker `radius` | `6` |
1970
+ | Path `interpolation` / `width` | `'great-circle'` / `2` |
1971
+ | Arc `width` | `2` (`height` is required) |
1972
+ | Model `metersPerUnit` / `orientation` | `1` / identity `[0, 0, 0, 1]` |
1973
+
1974
+ Opacity must be between 0 and 1; radius, width and model scale must be positive. Model orientation
1975
+ is a scalar-last quaternion normalized during admission. Model fields describe requested rendering,
1976
+ which is not yet drawn. `interactive` controls text-row activation; `showLabel` does not hide the
1977
+ required label from the text fallback, and rendered labels are not drawn.
1978
+
1979
+ ```ts
1980
+ import '@aceshooting/lyra-ui/components/lr-map.js';
1981
+ import type { LyraMapScene } from '@aceshooting/lyra-ui/components/lr-map.js';
1982
+
1983
+ const scene: LyraMapScene = { objects: [
1984
+ { kind: 'marker', id: 'station', label: 'Central station',
1985
+ position: { lngLat: [6.134, 49.6] }, interactive: true },
1986
+ ] };
1987
+ const map = document.querySelector('lr-map')!;
1988
+ map.scene = scene;
1989
+ ```
1990
+
1991
+ Accepted scenes are drawn on the map and keep the accessible text fallback. Markers render as
1992
+ geographic circles through the optional `@aceshooting/lyra-map/scene` bridge. Paths and arcs render
1993
+ as one scene-owned GeoJSON source and line layer, with each object's resolved `color` (default: the
1994
+ accent token), `width` in CSS pixels and `opacity`. Markers draw above lines. Models are not fetched,
1995
+ parsed or drawn. Existing `markers`, `dataLayers`, projection and terrain configuration remain
1996
+ separate APIs.
1997
+
1998
+ Path `interpolation: 'great-circle'` follows the shortest route on the globe, sampled at most one
1999
+ degree apart; `'linear'` joins vertices straight in longitude/latitude. Both cross the antimeridian
2000
+ the shorter way. An arc follows the great circle from `start` to `end`; its altitude interpolates
2001
+ linearly between the endpoint altitudes and adds a parabolic rise of `height` meters,
2002
+ `height * 4t(1 - t)`, peaking at the midpoint. Generated vertices carry that altitude as the third
2003
+ GeoJSON coordinate.
2004
+
2005
+ The map draws lines flat on its displayed surface, so altitude is drawn exactly only when it is
2006
+ zero against that surface: `sea-level` without terrain, or `terrain`. A path or arc with any other
2007
+ altitude, a nonzero arc `height`, or `sea-level` geometry while terrain is displayed is drawn as its
2008
+ ground track, and the scene reports `partial` with code `altitude`. Changing terrain re-evaluates
2009
+ this. A style replacement reinstalls scene lines after the new style loads; clearing the scene,
2010
+ removing every path and arc, or disconnecting the map removes them.
2011
+
2012
+ A connected assignment snapshots and admits input synchronously before returning. A detached
2013
+ assignment is accepted on connection in that document's realm. Assign a new scene object to
2014
+ request an update; mutating an existing graph in place is not an update API. Invalid updates
2015
+ retain the last accepted rows and report the rejected update. `{ objects: [] }` accepts an empty
2016
+ scene; `undefined` clears accepted ownership. Leaving `scene` unset preserves existing behavior
2017
+ and adds no scene panel.
2018
+
2019
+ Direct source bytes are copied on admission. Reusing the same source record with unchanged
2020
+ metadata reuses its owned snapshot, including after its original buffer detaches. Replace the
2021
+ source record to supply new content. Clearing, disconnecting or adopting the map revokes that
2022
+ reuse; reconnect accepts current authored input again. Relative source URLs resolve against the
2023
+ connected owner document; acceptance alone does not fetch them.
2024
+
2025
+ Admission rejects the complete update rather than truncating it:
2026
+
2027
+ | Input | Ceiling |
2028
+ | --- | --- |
2029
+ | Objects / model objects per scene | 2,000 / 32 |
2030
+ | Authored positions per scene / positions per path | 65,536 / 4,096 |
2031
+ | Generated path and arc vertices per scene | 262,144; great-circle sampling coarsens to fit, and code `limit` is reported otherwise |
2032
+ | ID / required label / optional color | 1–1,024 / 16,384 / 1,024 UTF-16 units |
2033
+ | Model `src` / resolved absolute source URL | 1,048,576 UTF-16 units each |
2034
+ | Aggregate authored IDs, labels, colors and model `src` occurrences | 4,194,304 UTF-16 units per request |
2035
+ | Aggregate resolved source URLs | 4,194,304 UTF-16 units per source stage |
2036
+ | Library-owned encoded source snapshots, including staged replacements and retained associations | 64 MiB shared per connection |
2037
+
2038
+ A marker/model counts as one authored position and an arc as two. Text field limits apply before
2039
+ trimming or resolution; repeated authored references may count again. Resolved URL accounting
2040
+ counts each source-record association once, including reused associations, while distinct records
2041
+ count separately. These are admission limits, not a total JavaScript heap bound; the public
2042
+ property still retains caller input, including a rejected assignment. Generated geometry and
2043
+ rendering resources need separate limits.
2044
+
2045
+ The expandable text panel pages accepted objects with at most 100 rows rendered at once.
2046
+ Interactive rows support pointer, Enter and Space activation without implicitly panning; other
2047
+ rows remain text. Caller labels render as text. Style the surface with `scene-panel`,
2048
+ `scene-toggle`, `scene-list`, `scene-item`, `scene-pagination` and `scene-status` parts.
2049
+
2050
+ `lr-map-scene-state` emits immutable `{ revision, state, code? }` detail against the accepted
2051
+ revision. Accepted empty input and clear report `empty`. Nonempty input reports `loading`, then
2052
+ one settled state: `ready` when every object is installed on the map exactly; `partial` with a code
2053
+ when some objects are missing or approximated; or `unavailable` with a code when nothing could be
2054
+ drawn. Codes are `altitude` (drawn as a ground track), `model` (models are not drawn), `engine` (the
2055
+ map, its optional scene renderer or a native layer failed), `limit` (generated geometry exceeds the
2056
+ vertex limit) and `context-lost` (the WebGL context is lost; drawing resumes on restore). When
2057
+ several apply, the most significant is reported in that reverse order, `context-lost` first. A
2058
+ settled state can change again on a style replacement, terrain change or context loss. `ready`
2059
+ means installed, not visible: the viewport, terrain and occlusion still apply. Rejected input
2060
+ reports `error` with `invalid` or `limit` while retaining the previous accepted revision, and
2061
+ renderer progress does not replace that report until a new scene is accepted. `loading` and
2062
+ `ready` are not announced; `partial` is announced politely and `unavailable`, `empty` and `error`
2063
+ assertively. The `scene-status` part shows the current text except when `ready`. `lr-map-scene-activate` emits immutable `{ id, kind, source,
2064
+ position? }` detail, with `source: 'pointer' | 'keyboard'`; positional marker/model actions include
2065
+ the accepted geographic position. Both events bubble, are composed and are noncancelable.
2066
+
2067
+ ### Declarative globe and terrain configuration
2068
+
2069
+ `lr-map.projection` accepts `'mercator'` or `'globe'`. Leaving it unset preserves the projection
2070
+ in `mapStyle`, including a native projection expression. Clearing an override restores the
2071
+ captured configuration of the **current** style; an asynchronous style replacement establishes
2072
+ a new baseline after that replacement actually loads. Removing the `projection` attribute or
2073
+ assigning `undefined` releases ownership. Invalid projection strings normalize to unset.
2074
+
2075
+ The property-only `terrain` accepts `{ source, exaggeration? }`. `source` must name an existing
2076
+ `raster-dem` source in the current `mapStyle`; the component never adds a DEM provider or removes
2077
+ caller-owned sources. Exaggeration defaults to 1 and accepts finite numbers greater than or equal
2078
+ to zero, with no upper cap. Assign `null` to disable terrain explicitly, or `undefined` to restore
2079
+ the current style's terrain. The record is snapshotted on assignment; replace the record to change
2080
+ it. The new settings do not change the existing camera, overlay or control ownership contracts.
2081
+
2082
+ ```ts
2083
+ import '@aceshooting/lyra-ui/components/lr-map.js';
2084
+ import type { LyraMapTerrain } from '@aceshooting/lyra-ui/components/lr-map.js';
2085
+
2086
+ const map = document.querySelector('lr-map')!;
2087
+ // Supply mapStyle with a raster-dem source named "elevation" before enabling terrain.
2088
+ const terrain: LyraMapTerrain = { source: 'elevation', exaggeration: 1.5 };
2089
+ map.projection = 'globe';
2090
+ map.terrain = terrain;
2091
+ await map.whenIdle();
2092
+
2093
+ map.terrain = null; // Disable terrain, preserving its source.
2094
+ await map.whenIdle();
2095
+ map.projection = undefined;
2096
+ map.terrain = undefined; // Restore this style's original configuration.
2097
+ await map.whenIdle();
2098
+ ```
2099
+
2100
+ Initial overrides and style-replacement replay are included in `whenStyleReady()` and
2101
+ `lr-map-style-load`. A same-style change leaves that completed style barrier alone; await
2102
+ `whenIdle()` for each new configuration. An equal effective configuration does not call the
2103
+ native setters again. Superseded preparation cannot mutate a newer style or a disconnected map.
2104
+
2105
+ Unsupported capabilities, malformed terrain or a missing/wrong-kind elevation source reject
2106
+ readiness with `MapReadinessError` and show the existing localized map fallback. Native setters
2107
+ are not an atomic transaction; a failed application retires the map instead of reporting a
2108
+ partially configured scene as ready. Reconnect or assign a valid `mapStyle` to retry. Do not
2109
+ mutate native projection/terrain while the matching declarative override owns it; clear the
2110
+ override first. Native toolbar controls are not added by these properties: compose ordinary
2111
+ Lyra buttons and a slider around the map, or opt into the component-owned toggles below. Terrain exaggeration is
2112
+ a display scale, not a physical simulation.
2113
+
2114
+ ### Component-owned globe and terrain controls
2115
+
2116
+ `controls.globe` accepts `true` or `{ position?, order? }`. `controls.terrain` accepts
2117
+ `false` or `{ source, exaggeration?, position?, order? }`; the source is required and `true`
2118
+ is not accepted. Both default to `top-right`, order 0. Equal-order controls read navigation,
2119
+ scale, geolocate, globe, terrain, attribution. Existing corner mirroring follows RTL.
2120
+
2121
+ ```ts
2122
+ map.controls = {
2123
+ globe: true,
2124
+ terrain: { source: 'elevation', exaggeration: 1.5 },
2125
+ };
2126
+ ```
2127
+
2128
+ Installing or changing these controls does not change the scene. Activation assigns `projection`
2129
+ or `terrain` first, then emits a noncancelable request event: `lr-map-projection-change` carries
2130
+ `{ projection, source: 'control' }`; `lr-map-terrain-change` carries
2131
+ `{ terrain, source: 'control' }`. Await `whenIdle()` for application. Programmatic changes and
2132
+ style replay do not emit either event. A controlled application can synchronously reassign the
2133
+ property in the event handler; its latest assignment wins.
2134
+
2135
+ Pressed state reflects settled native configuration. Literal globe is pressed, mercator is not;
2136
+ expression-valued projection is mixed. Transition metadata does not change a literal's state.
2137
+ The terrain toggle disables any active terrain, including a different source; enabling uses its
2138
+ configured source and scale. A missing enable source disables that action with localized feedback;
2139
+ disabling active terrain remains available. Source availability recovers after style/source updates.
2140
+ Controls are disabled while scene changes are pending. `whenControlsReady()` covers installation,
2141
+ not terrain tiles or scene application. Showing a control never downloads or guesses a DEM source.
2142
+
2143
+ Use `globe-control`, `globe-button`, `globe-icon`, `terrain-control`, `terrain-button` and
2144
+ `terrain-icon` parts for the owned chrome. Labels use `mapGlobe` and `mapTerrain` localization keys.
2145
+
2146
+ ### Saved viewpoints, camera tours and following
2147
+
2148
+ Import `createMapCameraSession` from `@aceshooting/lyra-ui/map-camera-session.js`. It registers no
2149
+ element and loads no engine; register `lr-map` separately. Create a session after
2150
+ `whenStyleReady()` resolves on a connected map. One session owns a map's camera at a time.
2151
+
2152
+ ```ts
2153
+ import '@aceshooting/lyra-ui/components/lr-map.js';
2154
+ import { createMapCameraSession, type MapViewpoint } from '@aceshooting/lyra-ui/map-camera-session.js';
2155
+ import { createSimulationClock } from '@aceshooting/lyra-ui/simulation-clock.js';
2156
+
2157
+ const map = document.querySelector('lr-map')!;
2158
+ await map.whenStyleReady();
2159
+ const camera = createMapCameraSession(map);
2160
+
2161
+ const saved: MapViewpoint = camera.capture(); // { center, zoom, bearing, pitch }, frozen
2162
+ camera.restore(saved, { kind: 'fly', duration: 1200 });
2163
+
2164
+ const start = Date.UTC(2026, 0, 15, 12);
2165
+ const clock = createSimulationClock({ range: [start, start + 60_000], instant: start });
2166
+ camera.tour(clock, { keyframes: [
2167
+ { instant: start, view: saved },
2168
+ { instant: start + 20_000, view: { center: [2.35, 48.86], zoom: 9, bearing: 30, pitch: 45 } },
2169
+ { instant: start + 60_000, view: saved, interpolation: 'hold' },
2170
+ ] });
2171
+ clock.play();
2172
+
2173
+ map.scene = { objects: [{ kind: 'marker', id: 'relay-1', label: 'Relay 1', position: { lngLat: [-3, 48.2] } }] };
2174
+ camera.follow({ objectId: 'relay-1', mode: 'ground', zoom: 7 });
2175
+
2176
+ map.addEventListener('lr-map-camera-interrupt', event => showReason(event.detail.reason));
2177
+ camera.subscribe(snapshot => render(snapshot.mode, snapshot.active, snapshot.reason));
2178
+ // When the application scope ends:
2179
+ camera.dispose(); clock.dispose();
2180
+ ```
2181
+
2182
+ `capture()` returns the current camera as a detached frozen `MapViewpoint`. `restore(viewpoint,
2183
+ transition?)` validates the whole viewpoint (longitude in `[-180, 180]`, latitude in `[-90, 90]`,
2184
+ finite zoom and bearing, pitch in `[0, 85]`) and moves with `kind: 'jump'` (the default), `'ease'`
2185
+ or `'fly'`; `duration` is milliseconds, finite and at least 0. The map's zoom limits clamp zoom.
2186
+
2187
+ `tour(clock, tour)` samples 1 to 1,024 keyframes whose `instant` values strictly increase, on the
2188
+ clock's delivered instants; the gap between instants is each segment's duration. Linear segments
2189
+ interpolate centre, zoom, bearing and pitch, with longitude and bearing taking the shorter way
2190
+ round; `interpolation: 'hold'` keeps a keyframe until the next one. Before the first keyframe the
2191
+ tour holds it, and after the last it holds the last. Seeking, pausing and the clock rate apply
2192
+ directly. The tour stays active at the range end until another action, `stop()` or an
2193
+ interruption; disposing the clock ends it with reason `engine`.
2194
+
2195
+ `follow({ objectId, mode: 'ground', zoom?, bearing?, pitch? })` centres an accepted `scene`
2196
+ marker or model and moves again each time an assigned `scene` changes that object's accepted
2197
+ position. Following needs no scene rendering: it reads accepted geography. Omitted axes keep the
2198
+ camera's values from the start of following. A missing object keeps following armed with
2199
+ `trackingStatus: 'missing'`; a path or arc fails with `invalid-follow`. Drive a moving object from
2200
+ the shared clock by assigning a new `scene` from a clock subscription.
2201
+
2202
+ Each new `restore()`, `tour()` or `follow()` replaces the previous action without an interrupt
2203
+ event; `stop()` ends it in place. A drag, wheel, touch, box-zoom or keyboard gesture ends the action
2204
+ and lets the gesture continue; `flyTo()`, `easeTo()`, `jumpTo()`, `fitBounds()`, `fitToData()` or a
2205
+ different `center`/`zoom` assignment ends it as `external`; a `mapStyle`, `projection` or `terrain`
2206
+ change ends it as `style` and stops its animation; a lost rendering context ends it as `engine`. In
2207
+ each case the session snapshot becomes `{ mode: 'idle', active: false, reason }` and the map emits
2208
+ `lr-map-camera-interrupt` once, after ownership settles, so a listener can start a newer action. A
2209
+ map without a session never emits it. Re-assigning an equal `center`/`zoom` mirror does not
2210
+ interrupt.
2211
+
2212
+ Under `prefers-reduced-motion: reduce` or `data-lr-motion="reduce"`, `restore()` jumps instead of
2213
+ animating, a tour holds each keyframe instead of interpolating, and following centres the object
2214
+ once and then holds still. A motion preference change while an animated restore runs completes it
2215
+ as a jump.
2216
+
2217
+ Disconnecting or adopting the map disposes the session permanently with reason `disconnect`; create
2218
+ a new session after the map reconnects and its style is ready. `dispose()`, or aborting
2219
+ `options.signal`, releases the camera; both are idempotent. Methods on a disposed session throw
2220
+ `disposed`.
2221
+
2222
+ `snapshot` and `subscribe(listener, { signal? })` report frozen `MapCameraSessionSnapshot`
2223
+ records: `mode` (`'idle' | 'viewpoint' | 'tour' | 'follow'`), `active` and `reason`
2224
+ (`MapCameraSessionReason`: `'initial' | 'start' | 'complete' | 'stop' | 'user' | 'external' |
2225
+ 'style' | 'disconnect' | 'engine' | 'disposed'`). Follow snapshots add `objectId`, `followMode`,
2226
+ `trackingStatus` (`'pending' | 'ground' | 'missing' | 'unavailable'` while ground following),
2227
+ `corrections` and an optional `unavailableReason`. A listener runs once on subscription.
2228
+
2229
+ Failures throw `MapCameraSessionError` synchronously and leave the running action unchanged. Its
2230
+ `code` is `MapCameraSessionErrorCode`: `'unsupported-map'` (a connected element without camera
2231
+ support), `'inactive-map'` (disconnected), `'already-bound'` (another session owns the camera),
2232
+ `'unavailable'` (style not ready, pending camera work, or a refused engine command),
2233
+ `'invalid-viewpoint'`, `'invalid-tour'`, `'invalid-follow'`, `'invalid-clock'`,
2234
+ `'invalid-options'` or `'disposed'`. Input records must be plain own-data objects; accessors and
2235
+ unknown fields are rejected without being read.
@@ -53,7 +53,8 @@ clamped to `[1, 32]` (`0` becomes `1`, `33` becomes `32`), and only non-finite v
53
53
  `Infinity`) fall back to `4`, independently of rendered code's
54
54
  `--lr-code-block-tab-size`; `marked: LyraMarkedParser | undefined` (readonly, no attribute) — this
55
55
  instance's isolated peer-neutral configurable parser; `htmlMode: 'sanitize' | 'escape' | 'trusted' =
56
- 'sanitize'` (attribute `html-mode`), `withoutGfm: boolean = false` (attribute `without-gfm`), `linkTarget: string | null = '_blank'` (attribute
56
+ 'sanitize'` (attribute `html-mode`), `withoutGfm: boolean = false` (attribute `without-gfm`),
57
+ `withoutImages: boolean = false` (attribute `without-images`), `linkTarget: string | null = '_blank'` (attribute
57
58
  `link-target`), `internalLinkPrefix: string = ''` (attribute `internal-link-prefix`),
58
59
  `headingOffset: number = 0` (attribute `heading-offset`), `streaming: boolean = false` (reflected),
59
60
  `streamingRender: MarkdownStreamingRender = 'plain'` (attribute `streaming-render`, not reflected),
@@ -79,6 +79,16 @@ uses for its own `[part="body"]`.
79
79
  Markdown still renders; `trusted` renders raw HTML without sanitization and is only for trusted
80
80
  content. In escape mode, a consumer `renderer.text` or `renderer.html` override replaces the
81
81
  escaping and is the consumer's responsibility.
82
+ - `withoutImages: boolean = false` (attribute `without-images`) — the untrusted-content switch for
83
+ images, in every `htmlMode`. The scheme allowlist alone still admits any `http(s)`, relative or
84
+ `data:` image, so untrusted Markdown (a streamed language-model answer, for example) can make the
85
+ page request an arbitrary URL as soon as it renders. With `without-images`, every Markdown image
86
+ renders as its alt text, exactly like a refused URL, and the finished HTML is enforced too:
87
+ raw-HTML `<img>` and `<input type="image">` become their alt text, `<picture>` sources and SVG
88
+ `<image>`/`<feImage>` are removed, and `<video>` loses its `poster`. In `sanitize` mode authored
89
+ `<style>` elements are also removed; `trusted` mode does not inspect authored CSS. Changing it
90
+ re-renders. Pair it with the default `sanitize` mode for language-model output:
91
+ `<lr-markdown without-images></lr-markdown>`.
82
92
  - `withoutGfm: boolean = false` (attribute `without-gfm`) — disables GitHub-flavored Markdown
83
93
  (tables, strikethrough, autolinks, task lists), which is on by default.
84
94
  GFM task-list checkboxes stay disabled. Unordered tasks replace their bullets and align their
@@ -370,7 +380,8 @@ can cover the other. Both surfaces use `white-space: pre` and scroll horizontall
370
380
  relative URLs — plus `data:` for images only), independently of `htmlMode` — `sanitize` and
371
381
  `escape` both reject a disallowed scheme (e.g. `javascript:`) by dropping the anchor/image and
372
382
  rendering only its text/alt content, exactly like the malformed-`href` case above; only
373
- `html-mode="trusted"` skips this check, consistent with its documented full bypass.
383
+ `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.
374
385
  - `target` is not in DOMPurify's default attribute allowlist (unlike `part`/`rel`/`class`, which
375
386
  already are), so sanitization is called with `ADD_ATTR: ['target']` — without that, every rendered
376
387
  link's `target` would be silently stripped by sanitization even though the anchor itself survives.
@@ -145,8 +145,11 @@ A focusable action row owned by `<lr-menu>`. The host itself carries `role="menu
145
145
  `[part="base"]` renders as a real `<a href=…>` instead of a `<span>`, and activation (click, or
146
146
  the owning menu's Enter/Space handling, which forwards through `click()` for a link item so the
147
147
  anchor's own native default action runs) navigates there in addition to firing the usual
148
- `select()`/`lr-select` contract. An unsafe/unparseable value falls back to the plain `<span>`,
149
- matching `lr-button`'s identical fallback
148
+ `select()`/`lr-select` contract. The anchor carries the row's accessible name as its own
149
+ `aria-label` (a non-empty host `aria-label` wins, otherwise the visible label) and keeps it live
150
+ when either changes, because its visible label sits behind the decorative label wrapper. An
151
+ unsafe/unparseable value falls back to the plain `<span>`, matching `lr-button`'s identical
152
+ fallback
150
153
  - `target?: string` — native anchor `target`, used only while `href` resolves to a link. Setting it
151
154
  (e.g. `'_blank'`) always force-adds `noopener noreferrer` to the rendered anchor's `rel`,
152
155
  matching `lr-button`'s identical pattern
@@ -16,6 +16,8 @@
16
16
 
17
17
  ## `lr-model-select`
18
18
 
19
+ `labelDisplay: 'visible' | 'hidden' = 'visible'` (attribute `label-display`) — `'hidden'` removes the label visually while it stays the accessible name; hint and error are unaffected (see "Hiding the label visually: `label-display`" in the shared forms notes).
20
+
19
21
  The model list follows the [shared surface treatment](../shared/styles-and-tokens.md);
20
22
  its editing field retains an opaque fill.
21
23
 
@@ -9,7 +9,7 @@
9
9
  - **Release history** [CHANGELOG.md](../../CHANGELOG.md)
10
10
  - **Deprecations** none
11
11
  - **Optional peers** none
12
- - **Themeable via** 3 parts, 8 custom properties — see this component's own `@csspart`/`@cssprop` list below
12
+ - **Themeable via** 3 parts, 9 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
  ---
@@ -103,7 +103,10 @@ needs a different scrolling surface.
103
103
  doesn't resolve to a length. Also reflected as `data-effective-orientation` (only present while
104
104
  `orientationBreakpoint` resolves to a usable length).
105
105
  - `storageKey?: string` (attribute `storage-key`) — persists a versioned list of `{ panelId, size }`
106
- records to `localStorage` under `` `lr-multi-split:${key}:panels` ``. Every direct panel must have
106
+ records to `localStorage` under `` `lr-multi-split:${key}:panels` ``. While a panel is folded
107
+ (`collapsedPanels`) the record is version 2 and a folded panel's entry adds `collapsed: true` and
108
+ the `expandedSize` it returns to; with nothing folded the original version-1 shape is written, and
109
+ both versions restore. Every direct panel must have
107
110
  a unique, nonempty, whitespace-stable `panel-id`; a missing, surrounding-whitespace, or duplicate identity fails persistence closed without
108
111
  disabling the live split. Restores and same-instance membership reconciliation follow `panelId`,
109
112
  so a reorder/replacement never transfers a saved size to a different business panel.
@@ -205,6 +208,24 @@ number; maxPx?: number; minPercent?: number; maxPercent?: number }`, index-align
205
208
  releases a pin, so ordinary resizing inside one band leaves it alone. Left unset (the default), a
206
209
  pin survives every band and orientation change until a consumer writes `'auto'` — the pre-existing
207
210
  behavior.
211
+ - `collapsedPanels: string[] = []` (attribute: false) — the `panel-id`s of panels folded to a narrow
212
+ rail strip by a host control, at any container width and for any panel (not only an edge one).
213
+ Empty (the default) leaves the split exactly as before. A collapsed panel clamps along the resize
214
+ axis to `--lr-multi-split-collapsed-panel-size` (default `var(--lr-size-2-5rem)`), carries a
215
+ `data-panel-collapsed` marker, clips its overflow, and stays rendered: the panel's own content
216
+ paints the strip (a rotated title, an expand control) under `[data-panel-collapsed]` and takes its
217
+ full content out of the tab order itself (for example `display: none` or `inert` on the hidden
218
+ region). Its share moves to the open panels in proportion to their sizes, never past a panel's
219
+ `panelConstraints` maximum (a capped panel's surplus goes to the others); its `sizes` entry reads
220
+ `0` while folded, and expanding restores the share it had when it folded, reclaimed from the open
221
+ panels' room above their minimums. Requires the full `panel-id` identity model (otherwise the set
222
+ is ignored); unknown ids are ignored, and at least one panel stays open (a set naming every panel
223
+ leaves the last one open). Assigning it is silent, like `sizes`; a `sizes` assignment made
224
+ together with it may already describe the fold (zero entries for the folded panels), otherwise a
225
+ `sizes` value with a non-zero entry for a folded panel is rejected like any invalid layout. A
226
+ valid `storageKey` layout restores the set, unless this property already names panels. The
227
+ responsive `collapse` pane is independent: while it is `'rail'`/`'floating'` its own state governs
228
+ that panel, and a per-panel fold of the same panel shows again once it is `'wide'`.
208
229
 
209
230
  **Methods:** `expandPane()`, `collapsePane()` and `togglePane()` drive the collapse feature
210
231
  semantically, each picking the mechanism the pane's *current band* provides rather than its pinned
@@ -220,6 +241,24 @@ write does not. They are named `…Pane()` rather than `expand()`/`collapse()`/`
220
241
  `collapse` is already the pane-selection property, following `<lr-page>`'s `showNavigation()` trio.
221
242
  The component still renders no trigger of its own — wire these to your own control.
222
243
 
244
+ `collapsePanel(panel)`, `expandPanel(panel)` and `togglePanel(panel)` fold and unfold one panel of
245
+ `collapsedPanels`; `panel` is its `panel-id` or the panel element. Each applies synchronously:
246
+ `sizes` is redistributed, the layout persists under `storageKey` (with the collapsed set), the panel
247
+ is decorated, and `lr-multi-split-panel-collapse-change` fires. Each returns whether anything
248
+ changed: `false` for an unknown panel, one already in the requested state, the last open panel, or a
249
+ split without valid `panel-id`s. Called before the first update, they only record the request,
250
+ silently. Wire them to a chevron in each panel's header and mirror the fold onto that control's
251
+ `aria-expanded` from the event or the `data-panel-collapsed` marker:
252
+
253
+ ```js
254
+ split.addEventListener('lr-multi-split-panel-collapse-change', (event) => {
255
+ const { panelId, collapsed } = event.detail;
256
+ const toggle = split.querySelector(`[panel-id="${panelId}"] .toggle`);
257
+ toggle.setAttribute('aria-expanded', String(!collapsed));
258
+ });
259
+ toggleButton.addEventListener('click', () => split.togglePanel(toggleButton.closest('[panel-id]')));
260
+ ```
261
+
223
262
  `collapse`'s three resulting states — `'wide'` (default, today's plain layout) / `'rail'` / `'floating'`
224
263
  — are exposed as: a `data-collapse-state` attribute on both the host and the collapsing panel element
225
264
  itself (absent for `'wide'`/`collapse="none"`); and the `lr-multi-split-collapse-change` event below. The
@@ -265,7 +304,12 @@ Forced closes emit no request. Direct `open` writes and no-op dismissals emit ne
265
304
  `lr-multi-split-constraints-invalid` (`detail: LyraMultiSplitConstraintIssueDetail`, fired once per configuration when the
266
305
  configured panel minimums/maximums cannot fit the track; resizing the container does not repeat it; the infeasible set is rejected for interaction and a
267
306
  normalized percent minimum is used instead), `lr-multi-split-orientation-change` (`detail: { orientation }`,
268
- fired only when an enabled `orientationBreakpoint` actually changes `effectiveOrientation`)
307
+ fired only when an enabled `orientationBreakpoint` actually changes `effectiveOrientation`),
308
+ `lr-multi-split-panel-collapse-change` (`detail: LyraMultiSplitPanelCollapseChangeDetail = { panelId,
309
+ collapsed, collapsedPanels, sizes }`, an immutable snapshot fired when `collapsePanel()`,
310
+ `expandPanel()` or `togglePanel()` folds or unfolds a panel, after the redistributed `sizes` are
311
+ applied and persisted and the `data-panel-collapsed` marker is set; never for a direct
312
+ `collapsedPanels`/`sizes` assignment or a stored-layout restore)
269
313
 
270
314
  **Slots:** default (each direct child element is one panel; set a unique `panel-id` on every child
271
315
  when `storage-key` is used).
@@ -273,7 +317,9 @@ when `storage-key` is used).
273
317
  **CSS parts:** `base` (`position: relative`, so the `'floating'` state can anchor to it), `divider`
274
318
  (carries `aria-disabled="true"` and is drag/keyboard-inert while its adjacent panel is collapsed;
275
319
  while that panel is `'floating'` it takes no track and paints no line, but stays focusable as the
276
- collapse-focus fallback; beside a `'rail'` panel it keeps both),
320
+ collapse-focus fallback; beside a `'rail'` panel it keeps both; beside a `collapsedPanels` panel it
321
+ instead resizes the nearest open panel on each side, reports that leading panel as `aria-valuenow`
322
+ and names those two panels in its label, and is disabled only when one side has no open panel),
277
323
  `backdrop` (the `'floating'` drawer's scrim — only rendered while `collapseState === 'floating'` and
278
324
  `open`)
279
325
 
@@ -304,6 +350,9 @@ needed against the inline style the component rewrites on every render.
304
350
  `collapse` anchors the drawer to, so one declaration insets all three anchored edges; the free inline
305
351
  edge stays governed by the panel's own width. Unset, the drawer is flush with its container exactly
306
352
  as before.
353
+ `--lr-multi-split-collapsed-panel-size` (default `var(--lr-size-2-5rem)`) sets the rail a
354
+ `collapsedPanels` panel clamps to: its inline size in a horizontal split, its block size in a
355
+ vertical one. Set it on the split or an ancestor.
307
356
  Otherwise shared tokens only.
308
357
 
309
358
  **Optional peer deps:** none.
@@ -16,6 +16,8 @@
16
16
 
17
17
  ## `lr-native-time-input`
18
18
 
19
+ Attribute `label-display` (`'visible'` default, or `'hidden'`) removes the label visually while it stays the accessible name; hint and error are unaffected (see "Hiding the label visually: `label-display`").
20
+
19
21
  The Lyra 7 browser-native time field preserved under an explicit tag. It shares the input
20
22
  implementation with `lr-input`, forces its internal native input to `type="time"` on construction and reconnect, and retypes
21
23
  `min`/`max` so time-shaped attributes such as `09:00:30` are forwarded verbatim instead of parsed