@aceshooting/lyra-ui 31.0.0 → 31.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/CHANGELOG.md +129 -0
  2. package/dist/autoloader-cdn.js +1 -1
  3. package/dist/components/agent-tools/budget-meter/budget-meter.class.d.ts +12 -1
  4. package/dist/components/agent-tools/budget-meter/budget-meter.class.js +4 -4
  5. package/dist/components/charts/chart/lite-chart.class.js +1 -1
  6. package/dist/components/conversation/chat-composer/chat-composer.class.d.ts +18 -8
  7. package/dist/components/conversation/chat-composer/chat-composer.class.js +11 -9
  8. package/dist/components/conversation/chat-composer/chat-composer.styles.js +1 -1
  9. package/dist/components/conversation/message-feedback/message-feedback.class.d.ts +11 -3
  10. package/dist/components/conversation/message-feedback/message-feedback.class.js +12 -6
  11. package/dist/components/conversation/message-feedback/message-feedback.styles.js +1 -1
  12. package/dist/components/conversation/prompt-input/prompt-input.class.d.ts +6 -3
  13. package/dist/components/conversation/prompt-input/prompt-input.class.js +3 -2
  14. package/dist/components/conversation/push-to-talk/push-to-talk.class.js +1 -1
  15. package/dist/components/conversation/thread-list/thread-list.class.d.ts +1 -1
  16. package/dist/components/conversation/thread-list/thread-list.class.js +2 -2
  17. package/dist/components/data/document-library/document-library-cursor.js +1 -0
  18. package/dist/components/data/document-library/document-library-types.d.ts +20 -0
  19. package/dist/components/data/document-library/document-library.class.d.ts +37 -26
  20. package/dist/components/data/document-library/document-library.class.js +20 -11
  21. package/dist/components/data/document-library/document-library.styles.js +1 -1
  22. package/dist/components/data/flow-canvas/flow-canvas.class.d.ts +1 -1
  23. package/dist/components/data/flow-canvas/flow-canvas.class.js +1 -1
  24. package/dist/components/data/timeline/timeline.class.js +1 -1
  25. package/dist/components/forms/combobox/combobox.class.d.ts +20 -12
  26. package/dist/components/forms/combobox/combobox.class.js +2 -2
  27. package/dist/components/layout/dock-panel/dock-panel.class.d.ts +1 -1
  28. package/dist/components/layout/dock-panel/dock-panel.class.js +1 -1
  29. package/dist/components/layout/page/page.class.d.ts +3 -3
  30. package/dist/components/layout/page/page.class.js +1 -1
  31. package/dist/components/layout/segmented/segmented.class.d.ts +20 -7
  32. package/dist/components/layout/segmented/segmented.class.js +34 -24
  33. package/dist/components/layout/segmented/segmented.styles.js +1 -1
  34. package/dist/components/layout/stepper/stepper.styles.js +1 -1
  35. package/dist/components/layout/virtual-list/virtual-list.class.js +1 -1
  36. package/dist/components/media/map/map-anchor-controller.js +1 -1
  37. package/dist/components/media/map/map-canvas-target.js +1 -0
  38. package/dist/components/media/map/map.class.d.ts +10 -1
  39. package/dist/components/media/map/map.class.js +4 -4
  40. package/dist/components/media/map/map.styles.js +1 -1
  41. package/dist/components/media/sequence-playback/sequence-playback.class.d.ts +21 -9
  42. package/dist/components/media/sequence-playback/sequence-playback.class.js +7 -6
  43. package/dist/components/media/sequence-playback/sequence-playback.styles.js +1 -1
  44. package/dist/components/overlays/overlay/overlay.styles.js +1 -1
  45. package/dist/components/retrieval/graph/graph-spatial-controller.js +1 -1
  46. package/dist/components/retrieval/graph/graph.class.js +1 -1
  47. package/dist/components/retrieval/ingestion-queue/ingestion-queue-presentation.d.ts +11 -0
  48. package/dist/components/retrieval/ingestion-queue/ingestion-queue-presentation.js +1 -0
  49. package/dist/components/retrieval/ingestion-queue/ingestion-queue.class.d.ts +18 -7
  50. package/dist/components/retrieval/ingestion-queue/ingestion-queue.class.js +13 -26
  51. package/dist/components/retrieval/ingestion-queue/ingestion-queue.styles.js +1 -1
  52. package/dist/components/utility/diff-view/diff-view.class.d.ts +5 -5
  53. package/dist/components/utility/diff-view/diff-view.class.js +1 -1
  54. package/dist/components/utility/icon/icon.class.js +1 -1
  55. package/dist/components/viewers/archive-viewer/archive-viewer.class.js +1 -1
  56. package/dist/components/viewers/calendar-viewer/calendar-viewer.class.js +1 -1
  57. package/dist/components/viewers/contact-viewer/contact-viewer.class.js +1 -1
  58. package/dist/components/viewers/document-preview/document-preview.class.js +2 -2
  59. package/dist/components/viewers/docx-viewer/docx-viewer.class.d.ts +1 -1
  60. package/dist/components/viewers/docx-viewer/docx-viewer.class.js +1 -1
  61. package/dist/components/viewers/email-viewer/email-viewer.class.d.ts +1 -1
  62. package/dist/components/viewers/email-viewer/email-viewer.class.js +2 -2
  63. package/dist/components/viewers/html-viewer/html-viewer.class.js +1 -1
  64. package/dist/components/viewers/notebook-viewer/notebook-viewer.class.js +2 -2
  65. package/dist/components/viewers/pdf-viewer/pdf-viewer.class.d.ts +1 -1
  66. package/dist/components/viewers/pdf-viewer/pdf-viewer.class.js +1 -1
  67. package/dist/components/viewers/pptx-viewer/pptx-viewer.class.js +1 -1
  68. package/dist/components/viewers/svg-viewer/svg-viewer.class.js +1 -1
  69. package/dist/components/viewers/xml-viewer/xml-viewer.class.js +2 -2
  70. package/dist/data-sources.d.ts +10 -0
  71. package/dist/events.d.ts +9 -4
  72. package/dist/framework-types.d.ts +1 -1
  73. package/dist/internal/default-strings/conversation.generated.js +1 -1
  74. package/dist/internal/default-strings/data.generated.js +1 -1
  75. package/dist/internal/default-strings/retrieval.generated.js +1 -1
  76. package/dist/internal/localization-types.d.ts +1 -1
  77. package/dist/internal/localization.js +1 -1
  78. package/dist/internal/lyra-element.js +2 -2
  79. package/dist/internal/native-modal-context.js +1 -1
  80. package/dist/internal/overlay-manager.js +1 -1
  81. package/dist/internal/overlay-order.js +1 -1
  82. package/dist/internal/overlay-stack.js +1 -1
  83. package/dist/internal/package-metadata.js +1 -1
  84. package/dist/internal/runtime-diagnostics.js +1 -0
  85. package/dist/internal/source-cursor-controller.js +1 -0
  86. package/dist/internal/source-cursor-projection.js +1 -0
  87. package/dist/internal/source-page-scope.js +1 -1
  88. package/dist/lyra.d.ts +1 -1
  89. package/dist/theme/theme-bootstrap.js +1 -1
  90. package/dist/theme/theme.js +1 -1
  91. package/dist/utilities/overlay-manager.d.ts +2 -0
  92. package/llms/components/lr-budget-meter.md +31 -0
  93. package/llms/components/lr-chat-composer.md +13 -2
  94. package/llms/components/lr-combobox.md +27 -1
  95. package/llms/components/lr-diff-view.md +6 -0
  96. package/llms/components/lr-document-library.md +90 -6
  97. package/llms/components/lr-graph.md +5 -0
  98. package/llms/components/lr-ingestion-queue.md +76 -8
  99. package/llms/components/lr-json-viewer.md +34 -0
  100. package/llms/components/lr-lite-chart.md +2 -1
  101. package/llms/components/lr-map.md +33 -0
  102. package/llms/components/lr-message-feedback.md +38 -3
  103. package/llms/components/lr-page.md +4 -2
  104. package/llms/components/lr-prompt-input.md +5 -2
  105. package/llms/components/lr-segmented.md +30 -10
  106. package/llms/components/lr-sequence-playback.md +47 -12
  107. package/llms/components/lr-virtual-list.md +3 -1
  108. package/llms/peers.md +2 -2
  109. package/llms/shared/events-and-types.md +61 -2
  110. package/llms/shared/forms-and-accessibility.md +25 -0
  111. package/llms/shared/imports-and-registration.md +154 -110
  112. package/llms/shared/testing-and-utilities.md +5 -1
  113. package/llms/shared.md +245 -113
  114. package/locales.json +1 -1
  115. package/package.json +8 -8
  116. package/registrations.json +1 -1
@@ -9,7 +9,7 @@
9
9
  - **Release history** [CHANGELOG.md](../../CHANGELOG.md); family-wide breaking-change summaries: [retrieval](https://github.com/aceshooting/lyra-ui/blob/main/packages/lyra-ui/llms/retrieval.md)
10
10
  - **Deprecations** none
11
11
  - **Optional peers** none
12
- - **Themeable via** 21 parts, 1 custom property — see this component's own `@csspart`/`@cssprop` list below
12
+ - **Themeable via** 23 parts, 1 custom property — 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
  ---
@@ -43,10 +43,12 @@ embeddedChunkCount?: number; attempts?: number; error?: string }` (exported here
43
43
  **`DocumentRef` from `@aceshooting/lyra-ui/ai`** (`{ id, name, mimeType?, uri?, version? }`), not a
44
44
  divergent name/mimeType pair, so a caller can reuse the same list a `DocumentRef`-typed
45
45
  knowledge-base view already holds. `IngestionStage = 'queued' | 'uploading' | 'extracting' |
46
- 'chunking' | 'embedding' | 'indexing' | 'done' | 'failed' | 'cancelled'` — the first six are
47
- in-flight (in pipeline order), the last three terminal. `progress` is 0–100 _within the current
48
- stage_ (omitted/non-finite renders an indeterminate indicator, and it is only meaningful during an
49
- active non-`'queued'` stage). `embeddedChunkCount` renders only alongside a defined `chunkCount`.
46
+ 'chunking' | 'embedding' | 'indexing' | 'done' | 'failed' | 'cancelled' | 'custom'` — the first six are
47
+ in-flight (in pipeline order), `'done'`, `'failed'` and `'cancelled'` are terminal, and `'custom'`
48
+ opts into host presentation without implying a lifecycle state. `progress` is 0–100 _within the current
49
+ stage_ (omitted/non-finite renders an indeterminate indicator, and it is meaningful during an
50
+ active non-`'queued'` stage or when a valid custom stage opts into progress).
51
+ `embeddedChunkCount` renders only alongside a defined `chunkCount`.
50
52
  `error` renders only while `stage === 'failed'`. A missing or unrecognized runtime stage renders
51
53
  as a localized neutral `unknown` state with no progress, retry, or cancel affordance, allowing a
52
54
  newer backend stage to fail safely. A blank `document.name` shows the localized "untitled source"
@@ -78,6 +80,65 @@ embeddedChunkCount?: number; attempts?: number; error?: string }` (exported here
78
80
  Queue item ids must be nonblank and unique. Malformed rows and later duplicates are omitted
79
81
  first-wins before empty state, counts, virtualization, failure announcements, rendering, or actions.
80
82
 
83
+ **Custom stages and row actions:** the item additionally accepts
84
+ `customStage?: IngestionQueueStagePresentation` and `actions?: readonly IngestionQueueAction[]`.
85
+ These types and `IngestionItemActionEventDetail` are exported from
86
+ `@aceshooting/lyra-ui/components/retrieval/ingestion-queue/ingestion-queue.class.js`.
87
+
88
+ `customStage` is read only for `stage: 'custom'`. It contains nonblank caller-owned `id: string`
89
+ and `label: string`, optional `variant?: LyraVariant` (default/fallback `'neutral'`), and
90
+ `showProgress?: boolean` (default `false`). The label is escaped caller-localized text.
91
+ `showProgress: true` uses the existing 0–100 `item.progress` indicator, indeterminate when omitted
92
+ or nonfinite. Invalid custom metadata renders the existing inert localized **Unknown stage**
93
+ with no progress or actions. Standard stages ignore `customStage` entirely. A valid custom stage
94
+ does not imply failure, completion, cancellation, transport work or automatic announcements.
95
+ Include `'custom'` when exhaustively switching on `IngestionStage`.
96
+
97
+ Omit `actions` to retain the existing stage-derived Retry/Cancel buttons; set `[]` to hide them.
98
+ An explicit list **replaces**, rather than extends, those defaults in list order:
99
+
100
+ - `{ readonly type: 'retry' | 'cancel'; readonly disabled?: boolean }` keeps the built-in localized
101
+ label/icon and event. Retry still requires `'failed'`; Cancel still requires a known queued or
102
+ active stage. The descriptor cannot grant lifecycle eligibility.
103
+ - `{ readonly type: 'custom'; readonly id: string; readonly label: string; readonly disabled?: boolean }`
104
+ renders a native button with caller-localized text and a localized document-context accessible
105
+ name. It emits only `lr-item-action`; a custom ID named `retry` does not emit `lr-retry`.
106
+
107
+ `disabled: true` gates the native button and activation. Unknown/unconfigured stages stay
108
+ actionless. Invalid explicit lists fail closed to no actions rather than restoring defaults;
109
+ invalid entries are omitted while later valid entries inside the inspected prefix survive. A
110
+ wrong-typed `disabled` value omits that descriptor instead of enabling it.
111
+ Projection reads own data fields, copies/freezes the admitted presentation and actions, and
112
+ inspects only the first 32 action positions. Built-ins deduplicate by type, custom actions by
113
+ custom ID, with the first valid identity retained. Custom stage/action text shares a 65,536
114
+ UTF-16-unit optional-presentation allowance; source rows share their existing total row-text
115
+ allowance with these fields. Action-prefix truncation displays localized `item-action-limit`
116
+ with retained/assigned counts and a development diagnostic.
117
+
118
+ Hosts own authorization, confirmation, execution and publishing new availability through a new
119
+ `items` array or source revision/result. Activation rechecks the current row occurrence, action,
120
+ stage, disabled state, source and connection; stale same-ID replacements cannot emit an old
121
+ action. Removing a focused action repairs focus to a surviving same-row action, a nearby row
122
+ action or the list, while preserving a newer outside focus move. No new slot, callback,
123
+ async-action protocol or menu/roving-key contract is introduced.
124
+
125
+ ```ts
126
+ import '@aceshooting/lyra-ui/components/lr-ingestion-queue.js';
127
+ import type { IngestionQueueItem } from '@aceshooting/lyra-ui/components/retrieval/ingestion-queue/ingestion-queue.class.js';
128
+
129
+ const item: IngestionQueueItem = {
130
+ id: 'document-1', document: { id: 'document-1', name: 'Notes.txt' }, stage: 'custom',
131
+ customStage: { id: 'paused', label: 'Paused' },
132
+ actions: [{ type: 'custom', id: 'resume', label: 'Resume' }],
133
+ };
134
+ const queue = document.querySelector('lr-ingestion-queue')!;
135
+ queue.items = [item];
136
+ queue.addEventListener('lr-item-action', ({ detail }) => {
137
+ // The host authorizes/executes this intent and publishes the resulting items.
138
+ console.log(detail.itemId, detail.actionId);
139
+ });
140
+ ```
141
+
81
142
  **Provider pages:**
82
143
 
83
144
  - `dataSource: IngestionQueueSource | undefined` (attribute: false) —
@@ -114,7 +175,8 @@ Only current settled source rows can emit the existing retry/cancel details belo
114
175
  replaced, removed or disconnected source controls cannot act on stale rows. Provider-load failure
115
176
  shows `source-status` with a `source-retry` button: it reloads only the current failed page, emits
116
177
  no row `lr-retry`, and obsolete load-retry controls are inert. `source-pagination` styles navigation.
117
- This route adds no public event, table or CSV export.
178
+ Custom actions use the same `lr-item-action` contract in both routes. Provider mode adds no
179
+ separate event, table or CSV export.
118
180
 
119
181
  **Events:**
120
182
 
@@ -125,6 +187,10 @@ This route adds no public event, table or CSV export.
125
187
  - `lr-cancel` (`detail: IngestionCancelEventDetail` = `CancelEventDetail & { itemId: string }` =
126
188
  `{ reason?: string; itemId: string }`) — this component never supplies `reason` itself. Only
127
189
  offered on non-terminal rows (`'queued'` plus the five active stages).
190
+ - `lr-item-action` (`detail: IngestionItemActionEventDetail` = readonly
191
+ `{ itemId: string; actionId: string }`) — an enabled current custom action was activated.
192
+ Bubbling, composed and non-cancelable, with frozen detail; this is controlled host intent and
193
+ performs no default domain operation.
128
194
 
129
195
  Both `RetryEventDetail` and `CancelEventDetail` come from `@aceshooting/lyra-ui/ai`.
130
196
 
@@ -136,7 +202,8 @@ per-item stage label), `item-progress`,
136
202
  `chunkCount` and `embeddedChunkCount` are set), `item-attempts` (only once `attempts > 0`),
137
203
  `item-error` (only for `stage="failed"` with `error` set), `failure-live` (the visually hidden,
138
204
  `aria-hidden` mirror of the last announced batch of fresh failures), `item-actions`,
139
- `retry-button`, `cancel-button`, `empty`, `limit` (the input-retention notice),
205
+ `retry-button`, `cancel-button`, `item-action-button` (a custom native action), `item-action-limit`
206
+ (the action-prefix truncation note), `empty`, `limit` (the input-retention notice),
140
207
  `source-status`, `source-retry`, `source-pagination`.
141
208
 
142
209
  `failure-live` is a styling and inspection surface and carries no live-region role of its own. The
@@ -150,7 +217,8 @@ visible without being re-announced. Read that document-level region rather than
150
217
  In virtualized mode (above `virtualizeAt`) the rows live in the internal
151
218
  `lr-virtual-list`'s shadow root, and `item`, `item-header`, `item-name`, `item-progress`,
152
219
  `item-meta`, `item-stage`, `item-chunk-count`, `item-embedding-status`, `item-attempts`, `item-error`,
153
- `item-actions`, `retry-button` and `cancel-button` are forwarded out through `exportparts`, so every
220
+ `item-actions`, `retry-button`, `cancel-button`, `item-action-button` and `item-action-limit` are
221
+ forwarded out through `exportparts`, so every
154
222
  documented row part remains reachable as `lr-ingestion-queue::part(...)` above and below the
155
223
  virtualization threshold.
156
224
 
@@ -29,6 +29,40 @@ reassigned as a fresh object per patch. A container value that self-references (
29
29
  renders as a leaf `Circular reference` marker (`data-type="circular"`) instead of recursing — no
30
30
  stack overflow on cyclic `data`.
31
31
 
32
+ **Host sizing:** the host is a block with `container-type: inline-size` so automatic row layout
33
+ responds to its own allocation. Inline-size containment replaces content-based intrinsic sizing
34
+ with `contain-intrinsic-inline-size: var(--lr-size-20rem)` (20rem by default). This fallback prevents a shrink-to-fit
35
+ viewer from collapsing, but it is not a minimum width required by the JSON content. Shrink-to-fit
36
+ parents and automatic grid tracks can size from that fallback rather than the available column.
37
+ Changing `layout` controls key/value arrangement; it does not remove host containment.
38
+
39
+ Give a narrow panel an allocation from its surrounding layout, and use a zero-minimum grid track
40
+ instead of a content-sized `auto` track (or the automatic minimum of a bare `1fr`):
41
+
42
+ ```js
43
+ import '@aceshooting/lyra-ui/components/lr-json-viewer.js';
44
+ ```
45
+
46
+ ```html
47
+ <div class="json-panel"><lr-json-viewer aria-label="Response"></lr-json-viewer></div>
48
+ ```
49
+
50
+ ```css
51
+ /* The surrounding layout supplies this panel's available inline size. */
52
+ .json-panel {
53
+ display: grid;
54
+ grid-template-columns: minmax(0, 1fr);
55
+ inline-size: 100%;
56
+ min-inline-size: 0;
57
+ }
58
+ .json-panel > lr-json-viewer { min-inline-size: 0; }
59
+ ```
60
+
61
+ The parent track/allocation is the important constraint: `min-inline-size: 0` on the viewer alone
62
+ does not change a content-sized parent's sizing rule. In a shrink-to-fit composition, first give
63
+ the panel a definite or otherwise constrained available inline size. Preserve containment so the
64
+ `layout="auto"` container query can continue following the viewer's width.
65
+
32
66
  Removing `query` clears matches while retaining null property readback. Before any match is active,
33
67
  `searchPrevious()` selects the final match; later next/previous navigation wraps. Navigation may
34
68
  reopen the selected match’s ancestors while unrelated manual collapse remains intact.
@@ -154,7 +154,8 @@ is no "every item in the tooltip" surface to hook a title or footer formatter on
154
154
  It therefore responds to either `layout` mode without DOM text measurement or browser-specific
155
155
  font metrics. Unset (the default) renders every label, unchanged. Each rendered category label
156
156
  is allocation-aware: narrow/long text is ellipsized before paint, with the complete caller label
157
- retained as its accessible name. With `preparedData = null`, the global 1,000-record safety
157
+ retained as its accessible name. If even the ellipsis cannot fit, the tick keeps that accessible
158
+ name without painting text; a later wider lane restores the label. With `preparedData = null`, the global 1,000-record safety
158
159
  sampler may independently bound marks and labels for very large category×series input.
159
160
  - `barX?: (index: number) => number` (attribute: false, bar type only) — overrides the internal
160
161
  per-category x-origin formula (`plotX + i * slot`) used by both bars and their axis labels, so a
@@ -611,6 +611,39 @@ cannot load rejects with `capture-failed`.
611
611
  panel or toolbar covering part of the map does not hide what the map frames. Changing it keeps
612
612
  the geographic centre fixed, shifts the picture and is not reported as a camera change. Sides are
613
613
  physical, not logical.
614
+ - `canvasTarget?: LyraMapCanvasTarget` (property only) — a connected same-document ancestor
615
+ element or `'viewport'` that the canvas fills. The host remains the usable rectangle: native
616
+ controls, legend and toolbars stay in it, and the camera automatically adds the target-to-host
617
+ insets. `cameraPadding` is additional space inside that rectangle; per-fit padding is additional
618
+ to both. `getVisibleBounds()` and movement-event bounds use the padded host, while
619
+ `getVisibleBounds({ padded: false })` explicitly reads the whole canvas. `project()`,
620
+ `unproject()` and pointer positions remain canvas-local CSS pixels.
621
+
622
+ ```ts
623
+ import '@aceshooting/lyra-ui/components/lr-map.js';
624
+ import type { LyraMapCanvasTarget } from '@aceshooting/lyra-ui/components/lr-map.js';
625
+
626
+ const target: LyraMapCanvasTarget = mapElement.parentElement!;
627
+ mapElement.canvasTarget = target; // The host occupies the uncovered part of this ancestor.
628
+ mapElement.cameraPadding = { top: 12 }; // Extra breathing room inside the host.
629
+ // Or use mapElement.canvasTarget = 'viewport' for the current visual viewport.
630
+ mapElement.canvasTarget = undefined; // Restore the ordinary host-sized canvas.
631
+ ```
632
+
633
+ The allocation follows resize, scroll, layout and transform changes. Translation and positive
634
+ axis-aligned scaling work beneath transformed, filtered and container-query ancestors without
635
+ moving the canvas out of its shadow root. A target must contain the entire host rectangle;
636
+ partial containment, an unrelated/disconnected target, rotation, skew, perspective or a
637
+ reflected/zero scale restores ordinary host layout and removes the automatic insets. Ordinary
638
+ ancestor overflow/paint clipping still applies; this option does not escape it or move content
639
+ into the top layer. Use a containing panel whose clipping permits the intended paint extent.
640
+
641
+ If authored padding collapses the usable region in an active extent, padded bounds return
642
+ `null` and live fits return `false`; the engine keeps the valid automatic host inset until the
643
+ padding becomes usable again. A per-fit padding that consumes the remaining region is also
644
+ refused. Explicit whole-canvas bounds remain available. Changing the allocation preserves the
645
+ geographic camera and emits no synthetic `lr-map-view-change`; clearing the option or
646
+ disconnecting the map releases extent tracking. Leaving it unset preserves existing behavior.
614
647
  - `renderWorldCopies?: boolean` (attribute: false) — forwarded to MapLibre when its map is
615
648
  constructed. Leave it unset to preserve MapLibre's own current default; set `false` before
616
649
  construction to stop repeating the world horizontally. This is a construction-time option, so a
@@ -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** 8 parts, 6 custom properties — see this component's own `@csspart`/`@cssprop` list below
12
+ - **Themeable via** 9 parts, 6 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
  ---
@@ -30,10 +30,42 @@ controls became disabled.
30
30
 
31
31
  **Properties:** `rating: MessageFeedbackValue = null` (`'up' | 'down' | null`, reflected),
32
32
  `detail?: MessageFeedbackDetailConfiguration` (attribute: false) — one configuration with optional
33
- `reasons?: readonly { id, label }[]` and `commentable?: boolean`; omit it for thumbs-only feedback.
33
+ `reasons?: readonly { id, label }[]`, `commentable?: boolean`,
34
+ `reasonSelection?: MessageFeedbackReasonSelection`, and `commentMaxLength?: number`; omit it for
35
+ thumbs-only feedback.
34
36
  The record and nested reasons are a bounded clone-owned frozen snapshot; malformed, empty, blank,
35
37
  and later duplicate reason ids are omitted first-wins before selection and submission. Create and
36
38
  reassign a new detail record after changes.
39
+ `MessageFeedbackReasonSelection = 'multiple' | 'single'`; omitted or invalid selection mode uses
40
+ `'multiple'`. Single mode permits zero or one selected reason: activating another chip replaces
41
+ the selection, and activating the selected chip clears it. Chips retain optional pressed-button
42
+ semantics in a named group with a localized description, rather than becoming required radio
43
+ buttons. Replacing multiple mode with single mode retains the most recently selected still-valid
44
+ reason; removed reasons are pruned silently. `reasonIds` remains an array in submitted details.
45
+
46
+ `commentMaxLength` bounds the **raw draft** in UTF-16 code units, like native `maxlength`:
47
+ fractions truncate, zero permits only an empty draft, and absent, negative, nonfinite or nonnumeric
48
+ values impose no bound. An astral character counts as two units; whitespace counts before the
49
+ existing submission trim. The normalized limit reaches the native textarea. A script-written
50
+ oversized draft or a draft exceeding a newly reduced limit is preserved. Submission is refused
51
+ before creating a transaction or emitting `lr-feedback-submit-request`, and a localized
52
+ `comment-error` is linked to the actual textarea with `aria-describedby` and `aria-invalid`.
53
+ Correcting the length or removing the limit/comment field clears that length error. Replacing
54
+ `detail` also retires old pending submission IDs; stale settlement cannot apply the old policy.
55
+ Reason labels and submitted comment text remain caller content. The library localizes the
56
+ single-selection description and length error through `feedbackSingleReasonDescription` and
57
+ `feedbackCommentTooLong`.
58
+
59
+ ```ts
60
+ import '@aceshooting/lyra-ui/components/lr-message-feedback.js';
61
+
62
+ const feedback = document.querySelector('lr-message-feedback')!;
63
+ feedback.detail = {
64
+ reasonSelection: 'single', commentable: true, commentMaxLength: 500,
65
+ reasons: [{ id: 'incorrect', label: 'Incorrect' }, { id: 'unclear', label: 'Unclear' }],
66
+ };
67
+ ```
68
+
37
69
  `detailFor: 'none' | 'up' | 'down' | 'both' = 'down'` (attribute `detail-for`) selects which rating
38
70
  owns that one detail panel. `disabled: boolean = false` (reflected) makes a recorded rating read-only, and
39
71
  `pending: boolean = false` (reflected) — set automatically when a submit listener prevents the
@@ -58,6 +90,8 @@ supplies a nonblank, never-reused id; a later/current settlement must use that e
58
90
  no-argument settlement remains available only for the first transaction that has never been
59
91
  invalidated; stale or mismatched settlements return `false`.
60
92
 
93
+ **Slots:** none.
94
+
61
95
  **Events:** `lr-feedback-change` — `detail: { rating: 'up' | 'down' | null }`, fired when a thumb's
62
96
  provisional rating changes or clears. `lr-feedback-submit-request` — cancelable
63
97
  `detail: { rating: 'up' | 'down' | null; reasonIds: string[]; comment: string; submissionId: string }`, fired for every
@@ -74,7 +108,8 @@ When uncanceled it retains the synchronous close/announce/focus behavior. The op
74
108
  toolbar actions change availability or order.
75
109
  **CSS parts:** `base` (the root), `thumbs` (wrapper around both thumb buttons), `up-button`,
76
110
  `down-button`, `panel` (the inline detail disclosure, only rendered when `reasons` is non-empty or
77
- `commentable` is set), `reasons` (the reason-chip group), `comment` (the comment `<textarea>`), and
111
+ `commentable` is set), `reasons` (the reason-chip group), `comment` (the comment `<textarea>`),
112
+ `comment-error` (the localized oversized-comment error), and
78
113
  `submit-button`. The thumbs read the shared `--lr-icon-button-*` tokens (`bg`, `color`, `radius` and
79
114
  their `-hover`/`-active` states), matching the `lr-icon-button` actions beside them in
80
115
  `lr-message-actions`.
@@ -41,8 +41,10 @@ and event listeners survive every breakpoint crossing.
41
41
  to mobile restores the same open drawer rather than replacing its content.
42
42
  - `mobileBreakpoint: string = '768px'` (attribute `mobile-breakpoint`, not reflected) — accepts a
43
43
  bare number/px length, `rem` resolved against the live root font size, or `em` resolved against
44
- the Page's live font size. It is re-resolved on every allocation measurement. Invalid values,
45
- including `%`, viewport units, `calc()`, and `var()`, fall back to `768px`.
44
+ the Page's live font size. Inline allocation changes reclassify the Page using its resolved
45
+ threshold. Changes to height alone skip this work. Changing the breakpoint or its font size,
46
+ or reconnecting the Page, resolves the threshold again. `vw` and `vh` track the size of the
47
+ owner window. Invalid values, including `%`, `calc()`, and `var()`, fall back to `768px`.
46
48
  - `navigationPlacement: 'start' | 'end' = 'start'` (attribute `navigation-placement`, reflected) —
47
49
  a logical placement: `start` is left in LTR and right in RTL; `end` is the reverse.
48
50
  - `tabindex: string = '-1'` (reflected) — the host fragment target's native focusability. The Page
@@ -35,8 +35,11 @@ their corresponding data can be supplied. The default entry registers all childr
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
37
  (attribute `max-rows`), `frame: 'card' | 'plain' = 'card'` and `actionsLayout: 'inline' | 'stacked' | 'below' = 'inline'`
38
- (attribute `actions-layout`) forward to the composed `lr-chat-composer` with its semantics, and a slotted
39
- `toolbar` child is forwarded to the composer's `toolbar` slot;
38
+ (attribute `actions-layout`) forward to the composed `lr-chat-composer` with its semantics.
39
+ `toolbarPlacement: ChatComposerToolbarPlacement = 'above'` (attribute `toolbar-placement`) forwards
40
+ `'above' | 'actions'` to that composer; `'actions'` takes effect with `actions-layout="below"`.
41
+ A slotted `toolbar` child is forwarded to the composer's `toolbar` slot. The separate data-driven
42
+ model, voice and source controls remain above the composer regardless of toolbar placement;
40
43
  `spellcheck: boolean = true` (string-aware true-default converter), `autocapitalize: string = ''`,
41
44
  `autocorrect: boolean = true` (legacy string writes `'off'`/`'false'` normalize to `false`),
42
45
  `wrap: 'hard' | 'soft' | 'off' = 'soft'`,
@@ -9,7 +9,7 @@
9
9
  - **Release history** [CHANGELOG.md](../../CHANGELOG.md)
10
10
  - **Deprecations** none
11
11
  - **Optional peers** none
12
- - **Themeable via** 4 parts, 20 custom properties — see this component's own `@csspart`/`@cssprop` list below
12
+ - **Themeable via** 7 parts, 20 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
  ---
@@ -36,8 +36,15 @@ string; label: string; icon?: unknown; disabled?: boolean }`; `icon` renders as
36
36
  256 positions); malformed/hostile entries are skipped, later duplicate values use
37
37
  first-valid-value-wins, and the frozen returned array/records never alias caller-owned objects.
38
38
  - `value: string = ''` — the currently selected item's `value`.
39
- - `label: string = ''` — accessible-name fallback copied to the internal `role="radiogroup"`. A
40
- host-level `aria-label` wins by attribute presence, including an explicitly empty value.
39
+ - `label: string = ''` — field caption and accessible-name fallback. Property-only naming keeps
40
+ its existing `aria-label` value on the internal `role="radiogroup"`.
41
+ - `labelDisplay: LyraLabelDisplay = 'hidden'` (reflected, attribute `label-display`) — shared
42
+ `'visible' | 'hidden'` vocabulary. Only `label-display="visible"` opts into a caption above the
43
+ track, with the same label typography as `lr-select` and `lr-input`. Unset or other attribute
44
+ values leave the caption visually hidden and preserve the track-only footprint. Hidden labels
45
+ remain available for accessible naming; supporting hints are unaffected.
46
+ - `hint: string = ''` — supporting text below the track; the actual radiogroup references its
47
+ same-shadow hint id while content is present.
41
48
  - `disabled: boolean = false` (reflected) — disables the whole control: the `radiogroup` and every
42
49
  segment report `aria-disabled="true"` and neither pointer nor keyboard selects. An item's own
43
50
  `disabled` is unaffected.
@@ -73,11 +80,19 @@ string; label: string; icon?: unknown; disabled?: boolean }`; `icon` renders as
73
80
  is changed programmatically (keyboard navigation already reveals the focused segment on its own),
74
81
  so you only need to call it for the "reveal without selecting" case.
75
82
 
76
- **Slots:** none.
83
+ **Slots:** `label` and `hint` slots replace their corresponding property
84
+ fallbacks. Assigned content, including an empty assigned element, follows native slot fallback
85
+ semantics; removing it restores the property. A label slot names the group via a same-shadow
86
+ `aria-labelledby` relationship in both display modes. A present host `aria-label` takes precedence,
87
+ including an explicitly empty value, without hiding the visible caption. A hint supplies the
88
+ same-shadow `aria-describedby` relationship; dynamic slot assignment/removal updates these
89
+ relationships. These are noninteractive group captions, with no external-idref forwarding,
90
+ label-click action, form association or validation API.
77
91
 
78
- **CSS parts:** `base` (the `role="radiogroup"` root), `segment` (a single `role="radio"` button),
79
- `segment-icon` (an optional inert, `aria-hidden` decorative leading icon), `segment-label` (the
80
- segment's label text).
92
+ **CSS parts:** `form-control` (caption, track and hint wrapper), `form-control-label` (caption),
93
+ `hint` (supporting text), `base` (the `role="radiogroup"` root and horizontal scroll owner),
94
+ `segment` (a single `role="radio"` button), `segment-icon` (an optional inert, `aria-hidden`
95
+ decorative leading icon), `segment-label` (the segment's label text).
81
96
 
82
97
  **Themeable custom properties:** `--lr-scroll-fade-size` (default `2rem`) — width of the mask fade
83
98
  at each horizontal scroll edge of the track, painted only while the track actually overflows (a row
@@ -152,6 +167,11 @@ resolves.
152
167
  </script>
153
168
  ```
154
169
 
170
+
171
+ ```html
172
+ <lr-segmented label="Time range" label-display="visible" hint="Choose one range."></lr-segmented>
173
+ ```
174
+
155
175
  **Known gotchas:**
156
176
 
157
177
  - arrow-key navigation cycles (past the last non-disabled item wraps to the first, and vice versa)
@@ -161,9 +181,9 @@ resolves.
161
181
  `lr-select`'s popup has. `lr-change` is change-only, so re-picking the segment that is already
162
182
  selected fires nothing on it; listen for `lr-activate` if a repeat pick is meaningful to
163
183
  your application.
164
- - the semantic `radiogroup` lives inside shadow DOM. Set `label` (preferred for reactive code) or a
165
- host `aria-label`; a present host attribute wins, including an explicit empty value, and the
166
- component deliberately forwards the resulting name to that internal role.
184
+ - the semantic `radiogroup` lives inside shadow DOM. Set `label`, assign the `label` slot, or set
185
+ a host `aria-label`; a present host attribute wins, including an explicit empty value. Visible
186
+ caption display is opt-in and does not replace this naming precedence.
167
187
 
168
188
  **Additional API surface:**
169
189
 
@@ -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** none
12
- - **Themeable via** 3 parts, 3 custom properties — see this component's own `@csspart`/`@cssprop` list below
12
+ - **Themeable via** 4 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
  ---
@@ -32,14 +32,34 @@ feedback.
32
32
  Start and stop it with `play()`, `pause()` or `toggle()`; assigning it throws in strict-mode code
33
33
  and an authored `playing` attribute starts nothing.
34
34
  - `withoutLoop: boolean = false` (attribute `without-loop`) — stops playback on the last item
35
- instead of wrapping back to the first; read on every tick.
35
+ instead of wrapping back to the first; read on every tick. Starting paused standalone playback
36
+ again from the final item resets to zero. A bound source clock owns restart and loop policy.
37
+ - `valueFormatter?: SequencePlaybackValueFormatter` (property-only) — synchronous, side-effect-free
38
+ `(currentIndex: number) => string | null | undefined`, receiving the normalized **zero-based** index.
39
+ Its plain text supplies the range's `aria-valuetext` and the optional visible readout. Nullish,
40
+ nonstring, or thrown results use the localized ordinal; an explicit empty string remains empty.
41
+ Mutating playback inside the callback discards its result without immediately retrying it.
42
+ - `withValue: boolean = false` (attribute `with-value`) — show a non-live position readout below
43
+ the range. Hidden by default; it duplicates the range's text and is `aria-hidden`.
36
44
  - `hidden: boolean = false` (reflected; re-declared over the native IDL property so Lit's
37
45
  change-tracking sees it and auto-pauses on `hidden = true`)
38
46
 
39
- **Methods:** `play()`, `pause()`, `toggle()`, `next()`, `previous()`,
40
- `goTo(currentIndex: number)` — all idempotent/clamped; `itemCount <= 1` is a no-op degenerate case.
41
- `focus(options?)`, `blur()`, and
42
- `click()` forward to the play button.
47
+ **Methods:**
48
+
49
+ - `play()` starts playback; repeated calls while playing and starts with fewer than two items do
50
+ nothing. For paused standalone `withoutLoop` playback at the last item, index zero is installed
51
+ **before** `lr-play`; one `lr-sequence-step { currentIndex: 0 }` follows unless a listener supersedes
52
+ the start. A reentrant pause, seek, restart, disconnect, binding attachment, or manual step retires
53
+ the stale reset event. The next timer tick advances from the current index.
54
+ - `pause()` stops playback and is idempotent; `toggle()` pauses or starts with the same replay rules.
55
+ - `next()` and `previous()` preserve playing/paused state, moving one item or doing nothing at the
56
+ respective endpoint. They do not pause active playback.
57
+ - `goTo(currentIndex)` pauses, clamps the requested index, and emits a manual step even when the
58
+ index is unchanged. Use `goTo(index); play()` for an explicit seek-and-resume.
59
+ - `focus(options?)`, `blur()`, and `click()` forward to the play button.
60
+
61
+ When bound, these commands delegate to the source clock; its restart and loop semantics take
62
+ precedence over the standalone rules.
43
63
 
44
64
  **Events:** `lr-play`, `lr-pause` (no detail), `lr-sequence-step`
45
65
  (`detail: LyraSequencePlaybackStepDetail { currentIndex }`, fired on every tick and manual step);
@@ -47,19 +67,22 @@ internal `focus`/`blur` are relayed exactly once as owner-realm native `FocusEve
47
67
  composed, preserving `relatedTarget`).
48
68
 
49
69
  **Class and event types:** `LyraSequencePlayback`, `LyraSequencePlaybackEventMap`, and
50
- `LyraSequencePlaybackStepDetail`.
70
+ `LyraSequencePlaybackStepDetail`, plus the `SequencePlaybackValueFormatter` callback type.
51
71
 
52
72
  **Slots:** `play-icon`, `pause-icon` — decorative glyphs for the paused and playing states; an empty
53
73
  slot keeps the built-in glyph. Assigned content renders in an inert, `aria-hidden` layer inside the
54
74
  play/pause button, so do not use either slot for a second interactive control.
55
75
 
56
- **CSS parts:** `base`, `play-button`, `slider`
76
+ **CSS parts:** `base`, `play-button`, `slider`, `value` (the optional readout)
57
77
 
58
78
  The `slider` carries supplemental localized `aria-valuetext` — `Step {index} of {total}` (key
59
79
  `playbackStepPosition`, both numbers formatted with the component's effective locale). Browsers may
60
80
  ignore that override on a native range, so the interoperable semantic contract is itself one-based
61
81
  (`min=1`, `max=itemCount`, `value=currentIndex+1`): assistive technologies receive the correct
62
- ordinal even when they expose the native numeric value.
82
+ ordinal even when they expose the native numeric value. `valueFormatter` can supply a frame name,
83
+ date, or state instead; enable `with-value` when sighted users also need that text. The callback is
84
+ called at most once per render and both presentations share its result. The visible text wraps at narrow
85
+ allocations and is not a live region, avoiding unsolicited announcements on every timer tick.
63
86
 
64
87
  **Themeable custom properties:** `--lr-sequence-playback-icon-size` (default
65
88
  `calc(var(--lr-icon-button-size) * 0.35)` — the play/pause glyph's size; applied as the button's
@@ -85,6 +108,19 @@ dimming at `itemCount <= 1`), `--lr-focus-ring-*`.
85
108
  </script>
86
109
  ```
87
110
 
111
+ For caller-owned frame labels, use a property binding (not an attribute):
112
+
113
+ ```ts
114
+ import '@aceshooting/lyra-ui/components/lr-sequence-playback.js';
115
+ import type { LyraSequencePlayback } from '@aceshooting/lyra-ui/components/media/sequence-playback/sequence-playback.class.js';
116
+
117
+ const frames = ['Initial state', 'Review', 'Final state'];
118
+ const playback = document.querySelector<LyraSequencePlayback>('lr-sequence-playback')!;
119
+ playback.itemCount = frames.length;
120
+ playback.withValue = true;
121
+ playback.valueFormatter = index => frames[index];
122
+ ```
123
+
88
124
  **Known gotchas:**
89
125
 
90
126
  - `currentIndex` is re-clamped into `[0, itemCount)` as soon as `itemCount` shrinks (in
@@ -102,9 +138,8 @@ dimming at `itemCount <= 1`), `--lr-focus-ring-*`.
102
138
  values cannot poison end conditions or the slider.
103
139
  - `interval-ms` is clamped to the 16ms floor and the browser's finite timer ceiling: a non-finite or
104
140
  lower value ticks at 16ms, while an oversized value uses the timer ceiling.
105
- - No _visible_ "N of M" position label beside the range input; the native one-based range still
106
- exposes the current ordinal and total bounds, with localized `aria-valuetext` as a supplemental
107
- enhancement where the platform honors it.
141
+ - The compact default has no visible position readout. Opt in with `with-value`; formatting alone
142
+ updates `aria-valuetext` without adding visible content. The native range remains one-based.
108
143
  - Calling `play()`/`pause()` programmatically (not via the button) gives no `aria-live`
109
144
  announcement of the Play/Pause state change.
110
145
 
@@ -373,7 +373,9 @@ default estimate with sparse `ResizeObserver` measurements for rows that have ac
373
373
  the first frame.
374
374
  - A sticky band only appears when `renderStickyGroup` _and_ at least one valid `groups` entry are
375
375
  both present; `groups` alone renders positioned markers with nothing pinned, and
376
- `renderStickyGroup` alone renders no overlay element at all.
376
+ `renderStickyGroup` alone renders no overlay element at all. Removing the last normalized group
377
+ also removes the measured sticky scroll inset, even while the renderer remains configured.
378
+ Restoring a valid group resumes sticky measurement.
377
379
  - **A row that renders a popup needs the active-row lift, and this is why `[part='row']` has one.**
378
380
  Each row carries `will-change: transform` (a compositor hint for the per-frame translate), which
379
381
  makes every row its own stacking context. Rows otherwise carry no `z-index`, so they paint in DOM
package/llms/peers.md CHANGED
@@ -39,8 +39,8 @@ for the page.
39
39
  |---|---|---|
40
40
  | `@aceshooting/lyra-3d` | `^1.2.0` | `lr-chart-3d`, `lr-embedding-explorer`, `lr-graph`, `lr-image-viewer`, `lr-knowledge-graph-explorer`, `lr-model-viewer`, `lr-video` |
41
41
  | `@aceshooting/lyra-flags` | `^2.3.1` | _(loaded by a shared internal module)_ |
42
- | `@aceshooting/lyra-map` | `^1.5.1` | `lr-geojson-viewer`, `lr-map` |
43
- | `@aceshooting/lyra-translations` | `^31.0.0` | _(not referenced by any component)_ |
42
+ | `@aceshooting/lyra-map` | `^1.5.2` | `lr-geojson-viewer`, `lr-map` |
43
+ | `@aceshooting/lyra-translations` | `^31.1.1` | _(not referenced by any component)_ |
44
44
  | `@aiden0z/pptx-renderer` | `^1.4.0` | `lr-pptx-viewer` |
45
45
  | `@sgratzl/chartjs-chart-boxplot` | `^4.0.0` | `lr-box-plot` |
46
46
  | `chart.js` | `^4.0.1` | `lr-bar-chart`, `lr-box-plot`, `lr-bubble-chart`, `lr-chart`, `lr-doughnut-chart`, `lr-histogram`, `lr-line-chart`, `lr-pie-chart`, `lr-polar-area-chart`, `lr-radar-chart`, `lr-scatter-chart` |
@@ -124,8 +124,9 @@ a capped prefix does not provide access to a million-record source.
124
124
 
125
125
  The host owns each source and its indexes, storage and query work. Keep its revision, counts,
126
126
  records and returned projections immutable for a request snapshot. Revisions are nonempty strings
127
- or finite numbers; counts, offsets and record orders are nonnegative safe integers. Nonempty keys
128
- identify logical records, and `order` is canonical source order independent of query sorting.
127
+ or finite numbers; where present, counts, offsets and record orders are nonnegative safe integers.
128
+ Nonempty keys identify logical records, and a counted record's `order` is canonical source order
129
+ independent of query sorting. Cursor records instead carry only key/value identity.
129
130
  A provider can generate or fetch a requested window without allocating an array for the entire collection.
130
131
  Arbitrary work inside a host callback remains the host's responsibility.
131
132
 
@@ -148,6 +149,14 @@ Choose the access shape that matches the host's data:
148
149
  `total` describes every query match, not loaded rows; group ranges describe the globally
149
150
  ordered query and facets describe the full source catalogue. A declared `Summary` is required
150
151
  in each result, while the default `undefined` summary can be omitted.
152
+ - `LyraCursorSource<T, Q>` supplies unknown-total continuation batches without `total`, `order`,
153
+ lookup or locate. Its nonempty `scope` is an identity namespace; a compatible scope keeps keys
154
+ meaningful across query/revision changes. `query(request: LyraCursorRequest<Q>)` receives
155
+ `{ scope, revision, locale, signal, query, cursor, limit }` and resolves `LyraCursorResult<T>`:
156
+ `{ rows: readonly LyraCursorRecord<T>[]; nextCursor: string | null }`, where each record is
157
+ readonly `{ key: string; value: T }`. `cursor: null` starts a query and `nextCursor: null` ends
158
+ continuation; nonempty string tokens remain opaque and may continue an empty/short batch. They do
159
+ not promise another record or a total. The provider applies the full query before paging.
151
160
  - `LyraTabularSource` has separate column metadata and zero-based body rows, using either
152
161
  `cellAt` or bounded rectangular `readCells`. `LyraWorkbookSource` names sheets separately.
153
162
  Search results use a bounded hit list, `total: null` when the global total is unknown, and
@@ -161,6 +170,26 @@ Choose the access shape that matches the host's data:
161
170
  bins. Global node/edge totals, scene coverage and displayed counts have distinct meanings;
162
171
  a neighborhood or aggregate scene is not a complete graph layout.
163
172
 
173
+ Cursor binding is supported by **`lr-document-library.cursorSource` only**; the type declaration
174
+ does not enable it on other provider components. Choose exactly one of that input and its
175
+ counted `dataSource`. The table shows the current batch, `sourcePage` is inactive, and
176
+ `sourceTotal` remains `null`, including at the end. No facet catalogue, match total, absolute
177
+ membership or global selection is inferred from batches. Selected IDs are explicit unverified
178
+ intent; page selection preserves off-page IDs and the host validates them before mutations. A
179
+ different scope clears prior intent; assign the new `cursorSource` before restoring selected IDs.
180
+
181
+ The document cursor adapter bounds requests to 1–500 rows (default 100), scope/string-revision/
182
+ token text to 8,192 UTF-16 units, and visited request-cursor history to 32 entries including current.
183
+ Previous refetches; Start over discards history. It retains no old page rows, persisted tokens or
184
+ prefetch work. `LyraCursorSourceStatus` and the frozen `LyraCursorNavigationState` expose only
185
+ `status`, `canGoBack`, `canGoForward`, `atEnd` and `historyTruncated`; tokens never enter public
186
+ navigation state or events. User search edits emit `lr-query-change` without a match count;
187
+ existing counted `lr-filter-change` keeps its numeric contract. Source reassignment, refresh,
188
+ query/locale/limit change or reconnect starts at `null`; named visual paints do not refetch.
189
+ Callbacks must settle promptly on abort because the physical query permit is held until actual
190
+ settlement. See [document-library](../components/lr-document-library.md) for row/input admission bounds,
191
+ retry semantics, method results, selection binding order and navigation parts.
192
+
164
193
  Numeric helpers inspect all source positions in bounded chunks. Preparation has total O(n)
165
194
  source-read work per pass, plus reducer work, even though each chunk and the retained result are
166
195
  bounded. The default `batchSize` is 2,048 and its maximum is 8,192; it must be a positive safe
@@ -471,6 +500,36 @@ These named interfaces and helper signatures are available to typed integrations
471
500
  scene(request: LyraGraphSceneRequest): Promise<LyraGraphScene<N, E>>;
472
501
  overview?(request: LyraSourceContext & { readonly limit: number }): Promise<LyraGraphOverview>;
473
502
  }`
503
+ `LyraCursorRecord<T> {
504
+ readonly key: string;
505
+ readonly value: T;
506
+ }`
507
+ `LyraCursorRequest<Q> extends LyraSourceContext {
508
+ readonly revision: LyraSourceRevision;
509
+ readonly locale: string;
510
+ readonly signal: AbortSignal;
511
+ readonly scope: string;
512
+ readonly query: Q;
513
+ readonly cursor: string | null;
514
+ readonly limit: number;
515
+ }`
516
+ `LyraCursorResult<T> {
517
+ readonly rows: readonly LyraCursorRecord<T>[];
518
+ readonly nextCursor: string | null;
519
+ }`
520
+ `LyraCursorSource<T, Q> {
521
+ readonly revision: LyraSourceRevision;
522
+ readonly scope: string;
523
+ query(request: LyraCursorRequest<Q>): Promise<LyraCursorResult<T>>;
524
+ }`
525
+ `LyraCursorSourceStatus = 'idle' | 'loading' | 'ready' | 'error'`
526
+ `LyraCursorNavigationState {
527
+ readonly status: LyraCursorSourceStatus;
528
+ readonly canGoBack: boolean;
529
+ readonly canGoForward: boolean;
530
+ readonly atEnd: boolean;
531
+ readonly historyTruncated: boolean;
532
+ }`
474
533
 
475
534
  - **`utilities-data-preparation-contracts`** — Public staged numeric helpers and result contracts from `utilities/data-preparation.js`. Preparation reads the full immutable source in bounded chunks; retained summaries are distinct from source counts. Inherited fields are repeated for reference. Defaulted options may be omitted.
476
535