@aceshooting/lyra-ui 30.9.0 → 31.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +361 -335
- package/dist/ai/adapters/ag-ui.js +1 -1
- package/dist/autoloader-cdn.js +1 -1
- package/dist/components/agent-tools/activity-feed/activity-feed.class.js +1 -1
- package/dist/components/agent-tools/budget-meter/budget-meter.class.d.ts +12 -1
- package/dist/components/agent-tools/budget-meter/budget-meter.class.js +4 -4
- package/dist/components/agent-tools/compare-panel/compare-panel.class.js +1 -1
- package/dist/components/agent-tools/eval-dataset/eval-dataset.class.js +1 -1
- package/dist/components/agent-tools/thinking-panel/thinking-panel.class.js +1 -1
- package/dist/components/agent-tools/tool-select-dialog/tool-select-dialog.class.js +1 -1
- package/dist/components/charts/chart/box-plot.class.js +2 -2
- package/dist/components/charts/chart/chart-sync.js +1 -1
- package/dist/components/charts/chart/chart.class.d.ts +1 -1
- package/dist/components/charts/chart/chart.class.js +4 -4
- package/dist/components/charts/chart/lite-chart-axis-layout.js +1 -1
- package/dist/components/charts/chart/lite-chart.class.js +2 -2
- package/dist/components/conversation/chat-composer/chat-composer.class.d.ts +26 -11
- package/dist/components/conversation/chat-composer/chat-composer.class.js +11 -9
- package/dist/components/conversation/chat-composer/chat-composer.styles.js +1 -1
- package/dist/components/conversation/chat-message/chat-message.class.d.ts +27 -3
- package/dist/components/conversation/chat-message/chat-message.class.js +14 -12
- package/dist/components/conversation/chat-message/chat-message.styles.js +1 -1
- package/dist/components/conversation/chat-viewport/chat-viewport.class.d.ts +29 -2
- package/dist/components/conversation/chat-viewport/chat-viewport.class.js +2 -2
- package/dist/components/conversation/chat-viewport/chat-viewport.styles.js +1 -1
- package/dist/components/conversation/code-block/code-block-shared.js +1 -1
- package/dist/components/conversation/markdown/markdown-base.class.d.ts +1 -1
- package/dist/components/conversation/markdown/markdown-base.class.js +1 -1
- package/dist/components/conversation/markdown/markdown-code-header.js +1 -1
- package/dist/components/conversation/markdown/markdown-core.class.d.ts +10 -0
- package/dist/components/conversation/markdown/markdown-core.class.js +1 -1
- package/dist/components/conversation/markdown/markdown-shared.d.ts +7 -2
- package/dist/components/conversation/markdown/markdown-shared.js +3 -3
- package/dist/components/conversation/markdown/markdown.class.d.ts +10 -0
- package/dist/components/conversation/markdown/markdown.class.js +1 -1
- package/dist/components/conversation/message-feedback/message-feedback.class.d.ts +11 -3
- package/dist/components/conversation/message-feedback/message-feedback.class.js +12 -6
- package/dist/components/conversation/message-feedback/message-feedback.styles.js +1 -1
- package/dist/components/conversation/message-parts/message-parts.class.js +1 -1
- package/dist/components/conversation/prompt-input/prompt-input.class.d.ts +8 -4
- package/dist/components/conversation/prompt-input/prompt-input.class.js +3 -2
- package/dist/components/conversation/push-to-talk/push-to-talk.class.js +1 -1
- package/dist/components/conversation/streaming-text/streaming-text-base.class.d.ts +4 -0
- package/dist/components/conversation/streaming-text/streaming-text-base.class.js +1 -1
- package/dist/components/conversation/streaming-text/streaming-text-core.class.d.ts +1 -1
- package/dist/components/conversation/streaming-text/streaming-text-core.class.js +1 -0
- package/dist/components/conversation/streaming-text/streaming-text.class.d.ts +1 -1
- package/dist/components/conversation/streaming-text/streaming-text.class.js +1 -0
- package/dist/components/conversation/suggestion-chips/suggestion-chips.class.d.ts +17 -3
- package/dist/components/conversation/suggestion-chips/suggestion-chips.class.js +3 -3
- package/dist/components/conversation/suggestion-chips/suggestion-chips.d.ts +1 -1
- package/dist/components/conversation/suggestion-chips/suggestion-chips.js +1 -1
- package/dist/components/conversation/suggestion-chips/suggestion-chips.styles.js +1 -1
- package/dist/components/conversation/thread-list/thread-list.class.d.ts +1 -1
- package/dist/components/conversation/thread-list/thread-list.class.js +3 -3
- package/dist/components/conversation/transcript-feed/transcript-feed.class.js +1 -1
- package/dist/components/data/data-grid/data-grid.class.d.ts +10 -10
- package/dist/components/data/data-grid/data-grid.class.js +1 -1
- package/dist/components/data/document-library/document-library-cursor.js +1 -0
- package/dist/components/data/document-library/document-library-types.d.ts +20 -0
- package/dist/components/data/document-library/document-library.class.d.ts +37 -26
- package/dist/components/data/document-library/document-library.class.js +20 -11
- package/dist/components/data/document-library/document-library.styles.js +1 -1
- package/dist/components/data/file-tree/file-tree.class.js +1 -1
- package/dist/components/data/flow-canvas/flow-canvas.class.d.ts +1 -1
- package/dist/components/data/flow-canvas/flow-canvas.class.js +2 -2
- package/dist/components/data/heatmap/heatmap.class.d.ts +1 -1
- package/dist/components/data/heatmap/heatmap.class.js +1 -1
- package/dist/components/data/pagination/pagination.class.js +1 -1
- package/dist/components/data/table/table.class.d.ts +31 -2
- package/dist/components/data/table/table.class.js +3 -3
- package/dist/components/data/table/table.styles.js +1 -1
- package/dist/components/data/timeline/timeline-cluster.js +1 -1
- package/dist/components/data/timeline/timeline-item.class.d.ts +10 -3
- package/dist/components/data/timeline/timeline-item.class.js +16 -12
- package/dist/components/data/timeline/timeline-item.styles.js +1 -1
- package/dist/components/data/timeline/timeline.class.d.ts +14 -2
- package/dist/components/data/timeline/timeline.class.js +9 -5
- package/dist/components/data/tree/tree-item.class.js +1 -1
- package/dist/components/data/tree/tree.class.d.ts +2 -0
- package/dist/components/data/tree/tree.class.js +1 -1
- package/dist/components/forms/button/button.class.d.ts +8 -6
- package/dist/components/forms/button/button.class.js +2 -2
- package/dist/components/forms/checkbox-group/checkbox-group.class.js +1 -1
- package/dist/components/forms/color-picker/color-core.js +1 -1
- package/dist/components/forms/combobox/combobox.class.d.ts +20 -12
- package/dist/components/forms/combobox/combobox.class.js +2 -2
- package/dist/components/forms/date-picker/date-input.class.d.ts +1 -1
- package/dist/components/forms/date-picker/date-input.class.js +1 -1
- package/dist/components/forms/icon-button/icon-button.class.d.ts +4 -2
- package/dist/components/forms/icon-button/icon-button.class.js +2 -2
- package/dist/components/forms/input/input-shared.js +2 -2
- package/dist/components/forms/input/number-input-locale.js +1 -0
- package/dist/components/forms/input/number-input.class.d.ts +19 -2
- package/dist/components/forms/input/number-input.class.js +2 -2
- package/dist/components/forms/locale-picker/locale-picker.class.d.ts +3 -3
- package/dist/components/forms/locale-picker/locale-picker.class.js +1 -1
- package/dist/components/layout/app-rail-group/app-rail-group.class.js +1 -1
- package/dist/components/layout/details/accordion-item.class.js +1 -1
- package/dist/components/layout/dock-panel/dock-panel.class.d.ts +1 -1
- package/dist/components/layout/dock-panel/dock-panel.class.js +1 -1
- package/dist/components/layout/menu/menu.class.js +1 -1
- package/dist/components/layout/multi-split/multi-split.class.js +1 -1
- package/dist/components/layout/navigation-menu-item/navigation-menu-item.class.js +1 -1
- package/dist/components/layout/page/page.class.d.ts +3 -3
- package/dist/components/layout/page/page.class.js +1 -1
- package/dist/components/layout/segmented/segmented.class.d.ts +20 -7
- package/dist/components/layout/segmented/segmented.class.js +34 -24
- package/dist/components/layout/segmented/segmented.styles.js +1 -1
- package/dist/components/layout/stepper/stepper.styles.js +1 -1
- package/dist/components/layout/tab-group/tab-group.class.d.ts +8 -1
- package/dist/components/layout/tab-group/tab-group.class.js +1 -1
- package/dist/components/layout/tab-group/tab.class.d.ts +7 -1
- package/dist/components/layout/tab-group/tab.class.js +1 -1
- package/dist/components/layout/virtual-list/virtual-list.class.d.ts +2 -2
- package/dist/components/layout/virtual-list/virtual-list.class.js +1 -1
- package/dist/components/media/animated-image/animated-image.class.js +1 -1
- package/dist/components/media/attachment-chip/attachment-chip.class.d.ts +21 -14
- package/dist/components/media/attachment-chip/attachment-chip.class.js +1 -1
- package/dist/components/media/attachment-trigger/attachment-trigger.class.d.ts +36 -12
- package/dist/components/media/attachment-trigger/attachment-trigger.class.js +3 -3
- package/dist/components/media/drop-zone/drop-zone.class.d.ts +23 -5
- package/dist/components/media/drop-zone/drop-zone.class.js +2 -2
- package/dist/components/media/drop-zone/drop-zone.styles.js +1 -1
- package/dist/components/media/file-icon/file-icon.class.js +1 -1
- package/dist/components/media/flag/flag-url-resolver.js +1 -1
- package/dist/components/media/image-viewer/image-viewer.class.d.ts +2 -2
- package/dist/components/media/image-viewer/image-viewer.class.js +1 -1
- package/dist/components/media/map/map-anchor-controller.js +1 -1
- package/dist/components/media/map/map-canvas-target.js +1 -0
- package/dist/components/media/map/map-owned-features.js +1 -1
- package/dist/components/media/map/map-scene-elevated-lines.js +2 -2
- package/dist/components/media/map/map-scene-render-controller.js +1 -1
- package/dist/components/media/map/map.class.d.ts +15 -6
- package/dist/components/media/map/map.class.js +4 -4
- package/dist/components/media/map/map.styles.js +1 -1
- package/dist/components/media/pan-zoom/pan-zoom.class.js +1 -1
- package/dist/components/media/sequence-playback/sequence-playback.class.d.ts +21 -9
- package/dist/components/media/sequence-playback/sequence-playback.class.js +7 -6
- package/dist/components/media/sequence-playback/sequence-playback.styles.js +1 -1
- package/dist/components/media/video/video.class.d.ts +3 -3
- package/dist/components/media/video/video.class.js +3 -1
- package/dist/components/media/video-playlist/video-playlist.class.js +1 -1
- package/dist/components/overlays/chip/chip.class.js +1 -1
- package/dist/components/overlays/overlay/dropdown.class.js +1 -1
- package/dist/components/overlays/overlay/overlay.styles.js +1 -1
- package/dist/components/overlays/overlay/tooltip.class.d.ts +5 -1
- package/dist/components/overlays/overlay/tooltip.class.js +3 -3
- package/dist/components/retrieval/embedding-explorer/embedding-explorer-engine.js +1 -1
- package/dist/components/retrieval/graph/graph-node-renderer.js +1 -1
- package/dist/components/retrieval/graph/graph-spatial-controller.js +1 -1
- package/dist/components/retrieval/graph/graph.class.d.ts +1 -1
- package/dist/components/retrieval/graph/graph.class.js +1 -1
- package/dist/components/retrieval/ingestion-queue/ingestion-queue-presentation.d.ts +11 -0
- package/dist/components/retrieval/ingestion-queue/ingestion-queue-presentation.js +1 -0
- package/dist/components/retrieval/ingestion-queue/ingestion-queue.class.d.ts +18 -7
- package/dist/components/retrieval/ingestion-queue/ingestion-queue.class.js +13 -26
- package/dist/components/retrieval/ingestion-queue/ingestion-queue.styles.js +1 -1
- package/dist/components/retrieval/mind-map/mind-map.class.js +1 -1
- package/dist/components/retrieval/neighbor-list/neighbor-list.class.d.ts +1 -1
- package/dist/components/retrieval/neighbor-list/neighbor-list.class.js +3 -3
- package/dist/components/retrieval/retrieval-results/retrieval-results.class.js +1 -1
- package/dist/components/utility/diff-view/diff-view.class.d.ts +5 -5
- package/dist/components/utility/diff-view/diff-view.class.js +1 -1
- package/dist/components/utility/icon/icon.class.js +1 -1
- package/dist/components/utility/json-viewer/json-viewer.class.d.ts +16 -1
- package/dist/components/utility/json-viewer/json-viewer.class.js +4 -4
- package/dist/components/utility/json-viewer/json-viewer.styles.js +1 -1
- package/dist/components/utility/known-date/known-date.class.js +1 -1
- package/dist/components/utility/mention-popover/mention-popover.class.js +1 -1
- package/dist/components/viewers/archive-viewer/archive-viewer.class.js +1 -1
- package/dist/components/viewers/calendar-viewer/calendar-viewer.class.js +1 -1
- package/dist/components/viewers/contact-viewer/contact-viewer.class.js +1 -1
- package/dist/components/viewers/csv-viewer/csv-viewer.class.js +1 -1
- package/dist/components/viewers/dataset-viewer/dataset-viewer.class.js +1 -1
- package/dist/components/viewers/document-preview/document-preview.class.js +2 -2
- package/dist/components/viewers/docx-viewer/docx-viewer.class.d.ts +1 -1
- package/dist/components/viewers/docx-viewer/docx-viewer.class.js +2 -2
- package/dist/components/viewers/ebook-viewer/ebook-viewer.class.js +1 -1
- package/dist/components/viewers/email-viewer/email-viewer.class.d.ts +1 -1
- package/dist/components/viewers/email-viewer/email-viewer.class.js +2 -2
- package/dist/components/viewers/html-viewer/html-viewer.class.js +1 -1
- package/dist/components/viewers/include/include.class.js +1 -1
- package/dist/components/viewers/model-viewer/model-viewer.class.js +1 -1
- package/dist/components/viewers/notebook-viewer/notebook-viewer.class.js +2 -2
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.d.ts +2 -2
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.js +2 -2
- package/dist/components/viewers/pptx-viewer/pptx-viewer.class.js +1 -1
- package/dist/components/viewers/spreadsheet-viewer/spreadsheet-viewer.class.js +1 -1
- package/dist/components/viewers/svg-viewer/svg-viewer.class.js +1 -1
- package/dist/components/viewers/table-viewer-shared.js +4 -4
- package/dist/components/viewers/xml-viewer/xml-viewer.class.js +2 -2
- package/dist/data-sources.d.ts +10 -0
- package/dist/events.d.ts +9 -4
- package/dist/framework-types.d.ts +1 -1
- package/dist/internal/anchored-overlay-runtime.js +1 -1
- package/dist/internal/catalog-picker.js +1 -1
- package/dist/internal/default-strings/conversation.generated.js +1 -1
- package/dist/internal/default-strings/data.generated.js +1 -1
- package/dist/internal/default-strings/retrieval.generated.js +1 -1
- package/dist/internal/document-tokens.js +2 -2
- package/dist/internal/drop-session-controller.js +1 -1
- package/dist/internal/engine-3d.js +1 -1
- package/dist/internal/icon-only-content.js +1 -1
- package/dist/internal/layered-layout.js +1 -1
- package/dist/internal/localization-types.d.ts +1 -1
- package/dist/internal/localization.js +1 -1
- package/dist/internal/lyra-element.js +2 -2
- package/dist/internal/map-custom-layer-controller.js +1 -1
- package/dist/internal/media-panorama.js +1 -1
- package/dist/internal/native-modal-context.js +1 -1
- package/dist/internal/overlay-manager.js +1 -1
- package/dist/internal/overlay-order.js +1 -1
- package/dist/internal/overlay-stack.js +1 -1
- package/dist/internal/package-metadata.js +1 -1
- package/dist/internal/runtime-diagnostics.js +1 -0
- package/dist/internal/safe-url.js +1 -1
- package/dist/internal/scoped-definitions.generated.js +1 -1
- package/dist/internal/scroll-overflow.js +1 -1
- package/dist/internal/source-cursor-controller.js +1 -0
- package/dist/internal/source-cursor-projection.js +1 -0
- package/dist/internal/source-page-scope.js +1 -1
- package/dist/internal/source-window-controller.js +1 -1
- package/dist/internal/text-quote.js +1 -1
- package/dist/internal/viewer-search.js +1 -1
- package/dist/lyra.d.ts +1 -1
- package/dist/sequence-time-binding.js +1 -1
- package/dist/simulation-clock.js +1 -1
- package/dist/styles/reservations.css +1 -1
- package/dist/styles/reservations.styles.js +1 -1
- package/dist/testing/happy-dom-shims.js +1 -1
- package/dist/theme/theme-bootstrap.js +1 -1
- package/dist/theme/theme.js +1 -1
- package/dist/utilities/overlay-manager.d.ts +2 -0
- package/llms/components/lr-attachment-chip.md +27 -12
- package/llms/components/lr-attachment-trigger.md +27 -7
- package/llms/components/lr-budget-meter.md +31 -0
- package/llms/components/lr-button.md +6 -4
- package/llms/components/lr-chat-composer.md +26 -9
- package/llms/components/lr-chat-message.md +44 -3
- package/llms/components/lr-chat-viewport.md +39 -2
- package/llms/components/lr-combobox.md +27 -1
- package/llms/components/lr-data-grid.md +2 -0
- package/llms/components/lr-dialog.md +10 -0
- package/llms/components/lr-diff-view.md +6 -0
- package/llms/components/lr-document-library.md +90 -6
- package/llms/components/lr-drop-zone.md +26 -2
- package/llms/components/lr-graph.md +5 -0
- package/llms/components/lr-icon-button.md +2 -1
- package/llms/components/lr-ingestion-queue.md +76 -8
- package/llms/components/lr-json-viewer.md +51 -0
- package/llms/components/lr-lite-chart.md +2 -1
- package/llms/components/lr-locale-picker.md +5 -0
- package/llms/components/lr-map.md +33 -0
- package/llms/components/lr-markdown-core.md +2 -1
- package/llms/components/lr-markdown.md +20 -4
- package/llms/components/lr-menu.md +3 -1
- package/llms/components/lr-message-feedback.md +38 -3
- package/llms/components/lr-number-input.md +28 -1
- package/llms/components/lr-page.md +4 -2
- package/llms/components/lr-prompt-input.md +6 -3
- package/llms/components/lr-segmented.md +30 -10
- package/llms/components/lr-sequence-playback.md +47 -12
- package/llms/components/lr-streaming-text-core.md +3 -2
- package/llms/components/lr-streaming-text.md +4 -1
- package/llms/components/lr-suggestion-chips.md +28 -5
- package/llms/components/lr-tab-group.md +13 -1
- package/llms/components/lr-tab.md +5 -0
- package/llms/components/lr-table.md +25 -4
- package/llms/components/lr-timeline-item.md +1 -1
- package/llms/components/lr-timeline.md +38 -4
- package/llms/components/lr-tooltip.md +3 -1
- package/llms/components/lr-tree.md +4 -0
- package/llms/components/lr-virtual-list.md +4 -1
- package/llms/peers.md +2 -2
- package/llms/shared/events-and-types.md +61 -2
- package/llms/shared/forms-and-accessibility.md +46 -4
- package/llms/shared/imports-and-registration.md +154 -110
- package/llms/shared/testing-and-utilities.md +5 -1
- package/llms/shared.md +266 -117
- package/locales.json +1 -1
- package/package.json +22 -21
- 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**
|
|
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),
|
|
48
|
-
|
|
49
|
-
|
|
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
|
-
|
|
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`, `
|
|
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
|
|
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.
|
|
@@ -116,6 +150,23 @@ also apply. The flat source rows own logical treeitem semantics.
|
|
|
116
150
|
uses a `var(--lr-size-20rem)` height ceiling. Values that do not parse
|
|
117
151
|
as CSS `max-height`, contain declaration breaks, or contain `url()` are ignored, leaving
|
|
118
152
|
`--lr-json-viewer-max-height` in control
|
|
153
|
+
- `layout: 'auto' | 'inline' | 'stacked' = 'auto'` (type `LyraJsonViewerLayout`) — how a scalar row places
|
|
154
|
+
its key and value. `'auto'` keeps them side by side while the viewer's own inline size is at
|
|
155
|
+
least 30rem and stacks them below that, through a container query on the viewer's allocation
|
|
156
|
+
(not the viewport), so a viewer in a phone-width tool-call panel stacks without configuration.
|
|
157
|
+
`'stacked'` always puts the value on its own line under its key, aligned with the key, keeps
|
|
158
|
+
the per-node copy button on the key's line, and tightens rows: leaf rows drop the
|
|
159
|
+
icon-button-sized floor their hidden toggle spacer otherwise imposes and lines use the snug
|
|
160
|
+
line height, while real expand/collapse toggles keep their full hit area. `'inline'` keeps the
|
|
161
|
+
side-by-side row at every width. Unknown values fall back to `'auto'`. Applies to the `data`
|
|
162
|
+
tree; `treeSource` rows keep their fixed virtualized layout. In every layout a key offers line
|
|
163
|
+
breaks after `_`, `-`, `.`, `/`, `:` and `@` and between a lower-case and an upper-case letter,
|
|
164
|
+
so `monthly_contribution_amount` wraps between its words; a single overlong segment still breaks
|
|
165
|
+
anywhere as a last resort.
|
|
166
|
+
|
|
167
|
+
```html
|
|
168
|
+
<lr-json-viewer layout="stacked"></lr-json-viewer>
|
|
169
|
+
```
|
|
119
170
|
- `copyable: boolean = false` (reflected) — shows copy-to-clipboard affordances: one for the whole
|
|
120
171
|
value, plus one per node
|
|
121
172
|
- `query: string = ''` — with `treeSource` unset, case-insensitive substring match against
|
|
@@ -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.
|
|
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
|
|
@@ -208,6 +208,11 @@ cross-document adoption closes it. A required, uncommitted value recomputes its
|
|
|
208
208
|
message when `.strings` or the effective locale changes; an author custom-validity message retains
|
|
209
209
|
priority until cleared.
|
|
210
210
|
|
|
211
|
+
Failed positioning closes the list with a non-cancelable `lr-hide` notification, then
|
|
212
|
+
`lr-after-hide` once it leaves layout. This includes replacement positioning after the list has
|
|
213
|
+
opened. A fresh opening retries positioning; an obsolete failure preserves newer geometry.
|
|
214
|
+
Ordinary connected closes remain cancelable.
|
|
215
|
+
|
|
211
216
|
**Slots:** `label`, `hint`, `error`.
|
|
212
217
|
|
|
213
218
|
**CSS parts:** `limit` (input-loss notice), `form-control`, `form-control-label`, `trigger`,
|
|
@@ -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
|
|
@@ -55,7 +55,8 @@ clamped to `[1, 32]` (`0` becomes `1`, `33` becomes `32`), and only non-finite v
|
|
|
55
55
|
instance's isolated peer-neutral configurable parser; `htmlMode: 'sanitize' | 'escape' | 'trusted' =
|
|
56
56
|
'sanitize'` (attribute `html-mode`), `withoutGfm: boolean = false` (attribute `without-gfm`),
|
|
57
57
|
`withoutImages: boolean = false` (attribute `without-images`), `linkTarget: string | null = '_blank'` (attribute
|
|
58
|
-
`link-target`), `
|
|
58
|
+
`link-target`), `linkSchemes?: string` (attribute `link-schemes`, the same narrowed link allowlist),
|
|
59
|
+
`internalLinkPrefix: string = ''` (attribute `internal-link-prefix`),
|
|
59
60
|
`headingOffset: number = 0` (attribute `heading-offset`), `streaming: boolean = false` (reflected),
|
|
60
61
|
`streamingRender: MarkdownStreamingRender = 'plain'` (attribute `streaming-render`, not reflected),
|
|
61
62
|
`codeBlockHeader: boolean = false` (attribute `code-block-header`),
|
|
@@ -101,6 +101,19 @@ uses for its own `[part="body"]`.
|
|
|
101
101
|
emitted. `'_blank'` (the default) preserves the original output; a falsy value (`null`, or the
|
|
102
102
|
empty string via `link-target=""`) omits `target`/`rel` entirely instead of always defaulting to
|
|
103
103
|
`_blank`, so rendered links open in the same tab
|
|
104
|
+
- `linkSchemes?: string` (attribute `link-schemes`) — narrows which link destinations may become
|
|
105
|
+
anchors. A space- or comma-separated list of `http`, `https`, `blob`, `mailto` and `relative`
|
|
106
|
+
(a URL with no scheme of its own: a path, query, fragment or scheme-relative `//host` URL, which
|
|
107
|
+
inherits the page's scheme). Tokens are case-insensitive and may end in `:`. Unset (the default)
|
|
108
|
+
keeps the standard allowlist below. Any other token (`data`, `javascript`, a typo) is ignored, so
|
|
109
|
+
the list can only narrow that allowlist, never widen it; a list with no recognised token,
|
|
110
|
+
including `link-schemes=""`, allows no link at all. A refused link fails closed: it renders as its
|
|
111
|
+
plain text, never as an anchor. When set, it applies in every `htmlMode`, `trusted` included, to
|
|
112
|
+
Markdown links and GFM autolinks and, after sanitization, to raw-HTML and SVG `<a>` elements
|
|
113
|
+
(unwrapped to their content) and `<area>` elements (removed). Sanitization itself is unchanged.
|
|
114
|
+
Images are governed by `withoutImages`, not by this list. Changing it re-renders.
|
|
115
|
+
`<lr-markdown link-schemes="https"></lr-markdown>` keeps only `https:` links;
|
|
116
|
+
`link-schemes="https relative"` also keeps same-site paths.
|
|
104
117
|
- `internalLinkPrefix: string = ''` (attribute `internal-link-prefix`) — when set, a rendered link
|
|
105
118
|
whose `href` _attribute_ (not the browser-resolved `.href` property) starts with this prefix is
|
|
106
119
|
intercepted on click and reported via `lr-link-activate` instead of navigating; empty (the default)
|
|
@@ -234,7 +247,8 @@ defers highlighting until completion; progressive streaming highlights settled b
|
|
|
234
247
|
light-DOM `MutationObserver` on that container can never see a property-driven update rendered
|
|
235
248
|
entirely inside this element's own shadow root. See `<lr-thinking-panel>`'s own reference at `llms/components/lr-thinking-panel.md`.
|
|
236
249
|
- `lr-copy` and `lr-copy-error` — the fulfilled and failed clipboard outcomes from the optional
|
|
237
|
-
code-block copy chrome; both bubble and are composed.
|
|
250
|
+
code-block copy chrome; both bubble and are composed. If an outcome listener disconnects the
|
|
251
|
+
element, disables the header, or starts another copy, superseded feedback is canceled.
|
|
238
252
|
**Slots:** none — content comes from the `content` property, not light-DOM children.
|
|
239
253
|
|
|
240
254
|
**CSS parts:** `content` (the wrapper around the rendered or plain-text-fallback output; respects
|
|
@@ -376,12 +390,14 @@ can cover the other. Both surfaces use `white-space: pre` and scroll horizontall
|
|
|
376
390
|
`encodeURI`-based validity guard throw, silently dropping just that anchor (the link text still
|
|
377
391
|
renders, with no `href`) — mirrors `marked`'s own default `link()` renderer's defensive behavior.
|
|
378
392
|
- every rendered link/image `href`/`src` is additionally scheme-checked against the same allowlist
|
|
379
|
-
`<lr-
|
|
380
|
-
relative URLs — plus `data:` for images only
|
|
393
|
+
`<lr-card>` uses for a navigation `href` (`http:`, `https:`, `blob:`, `mailto:`, and
|
|
394
|
+
relative URLs — plus `data:` for images only; the `tel:`/`sms:` handoffs `<lr-button>` accepts on
|
|
395
|
+
an author-written `href` are not admitted here), independently of `htmlMode` — `sanitize` and
|
|
381
396
|
`escape` both reject a disallowed scheme (e.g. `javascript:`) by dropping the anchor/image and
|
|
382
397
|
rendering only its text/alt content, exactly like the malformed-`href` case above; only
|
|
383
398
|
`html-mode="trusted"` skips this check, consistent with its documented full bypass. The allowlist
|
|
384
|
-
does not stop an allowed image URL from being fetched; set `without-images` for that.
|
|
399
|
+
does not stop an allowed image URL from being fetched; set `without-images` for that. To narrow
|
|
400
|
+
the link half of it (for example to `https:` only), set `link-schemes`.
|
|
385
401
|
- `target` is not in DOMPurify's default attribute allowlist (unlike `part`/`rel`/`class`, which
|
|
386
402
|
already are), so sanitization is called with `ADD_ATTR: ['target']` — without that, every rendered
|
|
387
403
|
link's `target` would be silently stripped by sanitization even though the anchor itself survives.
|
|
@@ -30,7 +30,7 @@ For a menu button or other anchored overlay, compose the semantic controller ins
|
|
|
30
30
|
`<lr-dropdown>`:
|
|
31
31
|
|
|
32
32
|
```html
|
|
33
|
-
<lr-dropdown label="Row actions">
|
|
33
|
+
<lr-dropdown aria-label="Row actions">
|
|
34
34
|
<button slot="trigger" aria-label="Row actions">⋮</button>
|
|
35
35
|
<lr-menu>
|
|
36
36
|
<lr-menu-item value="edit">Edit</lr-menu-item>
|
|
@@ -43,6 +43,8 @@ The dropdown shell owns trigger relationships, positioning, opening/closing, out
|
|
|
43
43
|
focus return, and lifecycle events. The contained menu remains the sole semantic owner: its
|
|
44
44
|
`header`/default/`footer` regions and named `role="menu"` list are preserved, while the outer popup
|
|
45
45
|
is neutral. This is also the composition used for direct `<lr-dropdown-item>` children.
|
|
46
|
+
The trigger's `aria-label` names its button. The dropdown's `aria-label` supplies the contained
|
|
47
|
+
menu's fallback name; a `label` or `aria-label` on the menu itself takes precedence.
|
|
46
48
|
|
|
47
49
|
### `lr-menu`
|
|
48
50
|
|
|
@@ -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**
|
|
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 }[]
|
|
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>`),
|
|
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`.
|
|
@@ -27,6 +27,31 @@ synchronous call, including changes made immediately beforehand. They preserve n
|
|
|
27
27
|
and bounds, update form submission silently, and remain no-ops before the native input has rendered
|
|
28
28
|
or while disabled/readonly. Native `step="any"` remains a non-steppable no-op.
|
|
29
29
|
|
|
30
|
+
**Locale-aware entry (`localized`).** `localized: boolean = false` (attribute `localized`,
|
|
31
|
+
reflected) reads and shows numbers with the grouping and decimal separators of the effective locale
|
|
32
|
+
(`lang`/`locale`): in `de` or `ro`, typing `25.000` gives twenty-five thousand and `10,24` gives ten
|
|
33
|
+
point two four. `value`, the submitted form value and `valueAsNumber` keep the native
|
|
34
|
+
`type="number"` form (`25000`, `10.24`), so the server and the `value`/`default-value` attributes
|
|
35
|
+
always use `.` and no grouping; a prefilled `value="1234567.5"` displays `1.234.567,5` in `de`.
|
|
36
|
+
Range, step and required validity come from a detached native number input given the parsed value,
|
|
37
|
+
so `min`/`max`/`step` and the browser's validation messages behave as on the default field. Grouping
|
|
38
|
+
is checked rather than ignored: text the locale would not write (`10.24` in `de`, `10,24` in `en`,
|
|
39
|
+
`1,234,567` in `en-IN`) reports `badInput` and leaves `value` empty instead of misreading the
|
|
40
|
+
entry. Any space counts as the group of a space-grouping locale (`fr`), and locale digits
|
|
41
|
+
(`ar-EG`) are accepted. Typed text stays as entered until `change` or blur, which re-format it;
|
|
42
|
+
stepping and programmatic writes re-format immediately, and a locale change re-formats the shown
|
|
43
|
+
value. The internal input becomes a text field with `role="spinbutton"`, `aria-valuenow`,
|
|
44
|
+
`aria-valuetext` and `aria-valuemin`/`aria-valuemax`, and ArrowUp/ArrowDown step the value with
|
|
45
|
+
the same `input`/`lr-input`/`change`/`lr-change` sequence as a stepper click. The default
|
|
46
|
+
`inputmode="numeric"` is unchanged; set `inputmode="decimal"` when fractions are expected so touch
|
|
47
|
+
keyboards offer the separator. Unset, the field is the native number input, unchanged.
|
|
48
|
+
|
|
49
|
+
```html
|
|
50
|
+
<lr-number-input lang="de" localized label="Betrag" name="amount" step="0.01" inputmode="decimal"
|
|
51
|
+
value="25000"></lr-number-input>
|
|
52
|
+
<!-- shows 25.000; submits amount=25000 -->
|
|
53
|
+
```
|
|
54
|
+
|
|
30
55
|
Changing own `disabled` from true to false in the same task that disables an ancestor fieldset keeps
|
|
31
56
|
the native editing control effectively disabled. The enabled first-legend exception and explicit
|
|
32
57
|
own-disabled state retain their native meaning; validity and form submission follow the effective
|
|
@@ -170,7 +195,9 @@ The exact-320px RTL story keeps long label/hint copy and both fixed-size stepper
|
|
|
170
195
|
- `clearable`/`clear-button`/`lr-clear` are inert: the clear action only renders for
|
|
171
196
|
`type="text"`/`"search"`. `password-visible`/`password-toggle` are likewise inert, since the
|
|
172
197
|
toggle only renders for `type="password"`. `minlength`/`maxlength`/`pattern` are inert too — the
|
|
173
|
-
platform ignores all three on `type="number"`; use `min`/`max`/`step` instead.
|
|
198
|
+
platform ignores all three on `type="number"`; use `min`/`max`/`step` instead. With `localized`,
|
|
199
|
+
the internal input is a text field, so `maxlength` does limit typing there; validity still ignores
|
|
200
|
+
all three.
|
|
174
201
|
- `type` is re-forced to `number` on every connect, but a later `el.type = 'text'` on a connected
|
|
175
202
|
element is not reverted — use `lr-input` when the type has to change.
|
|
176
203
|
|
|
@@ -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.
|
|
45
|
-
|
|
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
|
|
@@ -34,9 +34,12 @@ their corresponding data can be supplied. The default entry registers all childr
|
|
|
34
34
|
`withoutEnterSubmit: boolean = false` (attribute `without-enter-submit`);
|
|
35
35
|
`submitDisabled: boolean = false` (attribute `submit-disabled`), `withoutStop: boolean = false`
|
|
36
36
|
(attribute `without-stop`), `minRows: number = 1` (attribute `min-rows`) and `maxRows: number = 8`
|
|
37
|
-
(attribute `max-rows`), `frame: 'card' | 'plain' = 'card'` and `actionsLayout: 'inline' | 'stacked' = 'inline'`
|
|
38
|
-
(attribute `actions-layout`) forward to the composed `lr-chat-composer` with its semantics
|
|
39
|
-
`
|
|
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.
|
|
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**
|
|
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
|
|
40
|
-
|
|
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:**
|
|
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:** `
|
|
79
|
-
`
|
|
80
|
-
segment
|
|
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
|
|
165
|
-
host `aria-label`; a present host attribute wins, including an explicit empty value
|
|
166
|
-
|
|
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
|
|