@aceshooting/lyra-ui 1.2.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +98 -14
- package/custom-elements.json +30279 -12124
- package/dist/components/app-rail/app-rail-item.d.ts +30 -0
- package/dist/components/app-rail/app-rail-item.js +68 -0
- package/dist/components/app-rail/app-rail-item.styles.d.ts +1 -0
- package/dist/components/app-rail/app-rail-item.styles.js +65 -0
- package/dist/components/app-rail/app-rail.d.ts +168 -0
- package/dist/components/app-rail/app-rail.js +419 -0
- package/dist/components/app-rail/app-rail.styles.d.ts +1 -0
- package/dist/components/app-rail/app-rail.styles.js +128 -0
- package/dist/components/attachment-chip/attachment-chip.d.ts +141 -0
- package/dist/components/attachment-chip/attachment-chip.js +356 -0
- package/dist/components/attachment-chip/attachment-chip.styles.d.ts +1 -0
- package/dist/components/attachment-chip/attachment-chip.styles.js +184 -0
- package/dist/components/attachment-trigger/attachment-trigger.d.ts +96 -0
- package/dist/components/attachment-trigger/attachment-trigger.js +270 -0
- package/dist/components/attachment-trigger/attachment-trigger.styles.d.ts +1 -0
- package/dist/components/attachment-trigger/attachment-trigger.styles.js +90 -0
- package/dist/components/chart/bar-chart.js +2 -18
- package/dist/components/chart/box-plot.d.ts +25 -1
- package/dist/components/chart/box-plot.js +147 -7
- package/dist/components/chart/box-plot.styles.js +13 -0
- package/dist/components/chart/bubble-chart.js +2 -18
- package/dist/components/chart/chart-loader.d.ts +44 -13
- package/dist/components/chart/chart-loader.js +65 -18
- package/dist/components/chart/chart.d.ts +55 -12
- package/dist/components/chart/chart.js +247 -49
- package/dist/components/chart/doughnut-chart.js +2 -18
- package/dist/components/chart/histogram-bin.d.ts +7 -1
- package/dist/components/chart/histogram-bin.js +32 -14
- package/dist/components/chart/histogram.js +8 -16
- package/dist/components/chart/line-chart.js +2 -18
- package/dist/components/chart/lite-chart.d.ts +134 -3
- package/dist/components/chart/lite-chart.js +382 -67
- package/dist/components/chart/lite-chart.styles.js +9 -0
- package/dist/components/chart/pie-chart.js +2 -18
- package/dist/components/chart/polar-area-chart.js +2 -18
- package/dist/components/chart/radar-chart.js +2 -18
- package/dist/components/chart/scatter-chart.js +2 -18
- package/dist/components/chat-composer/chat-composer.d.ts +133 -0
- package/dist/components/chat-composer/chat-composer.js +366 -0
- package/dist/components/chat-composer/chat-composer.styles.d.ts +1 -0
- package/dist/components/chat-composer/chat-composer.styles.js +145 -0
- package/dist/components/chat-message/chat-message.d.ts +141 -0
- package/dist/components/chat-message/chat-message.js +331 -0
- package/dist/components/chat-message/chat-message.styles.d.ts +1 -0
- package/dist/components/chat-message/chat-message.styles.js +203 -0
- package/dist/components/checkbox/checkbox.d.ts +117 -0
- package/dist/components/checkbox/checkbox.js +353 -0
- package/dist/components/checkbox/checkbox.styles.d.ts +1 -0
- package/dist/components/checkbox/checkbox.styles.js +77 -0
- package/dist/components/chip/chip-group.d.ts +56 -0
- package/dist/components/chip/chip-group.js +130 -0
- package/dist/components/chip/chip-group.styles.d.ts +1 -0
- package/dist/components/chip/chip-group.styles.js +57 -0
- package/dist/components/chip/chip.d.ts +64 -0
- package/dist/components/chip/chip.js +122 -0
- package/dist/components/chip/chip.styles.d.ts +1 -0
- package/dist/components/chip/chip.styles.js +115 -0
- package/dist/components/citation-badge/citation-badge.d.ts +113 -0
- package/dist/components/citation-badge/citation-badge.js +318 -0
- package/dist/components/citation-badge/citation-badge.styles.d.ts +1 -0
- package/dist/components/citation-badge/citation-badge.styles.js +96 -0
- package/dist/components/code-block/code-block.d.ts +127 -0
- package/dist/components/code-block/code-block.js +382 -0
- package/dist/components/code-block/code-block.styles.d.ts +1 -0
- package/dist/components/code-block/code-block.styles.js +187 -0
- package/dist/components/code-block/code-loader.d.ts +87 -0
- package/dist/components/code-block/code-loader.js +142 -0
- package/dist/components/combobox/combobox.d.ts +65 -6
- package/dist/components/combobox/combobox.js +258 -48
- package/dist/components/combobox/combobox.styles.js +3 -3
- package/dist/components/combobox/option.d.ts +5 -1
- package/dist/components/combobox/option.js +35 -0
- package/dist/components/context-meter/context-meter.d.ts +53 -0
- package/dist/components/context-meter/context-meter.js +159 -0
- package/dist/components/context-meter/context-meter.styles.d.ts +1 -0
- package/dist/components/context-meter/context-meter.styles.js +114 -0
- package/dist/components/conversation-item/conversation-item.d.ts +125 -0
- package/dist/components/conversation-item/conversation-item.js +331 -0
- package/dist/components/conversation-item/conversation-item.styles.d.ts +1 -0
- package/dist/components/conversation-item/conversation-item.styles.js +155 -0
- package/dist/components/date-picker/calendar-core.d.ts +24 -0
- package/dist/components/date-picker/calendar-core.js +51 -4
- package/dist/components/date-picker/date-input.d.ts +100 -9
- package/dist/components/date-picker/date-input.js +383 -66
- package/dist/components/date-picker/date-picker.d.ts +35 -4
- package/dist/components/date-picker/date-picker.js +171 -44
- package/dist/components/dialog/confirm.d.ts +40 -0
- package/dist/components/dialog/confirm.js +76 -0
- package/dist/components/dialog/dialog.d.ts +129 -0
- package/dist/components/dialog/dialog.js +288 -0
- package/dist/components/dialog/dialog.styles.d.ts +1 -0
- package/dist/components/dialog/dialog.styles.js +96 -0
- package/dist/components/dock-panel/dock-panel.d.ts +142 -0
- package/dist/components/dock-panel/dock-panel.js +359 -0
- package/dist/components/dock-panel/dock-panel.styles.d.ts +1 -0
- package/dist/components/dock-panel/dock-panel.styles.js +159 -0
- package/dist/components/document-preview/document-preview.d.ts +143 -0
- package/dist/components/document-preview/document-preview.js +388 -0
- package/dist/components/document-preview/document-preview.styles.d.ts +1 -0
- package/dist/components/document-preview/document-preview.styles.js +191 -0
- package/dist/components/empty/empty.d.ts +1 -2
- package/dist/components/empty/empty.js +18 -12
- package/dist/components/empty/empty.styles.js +0 -3
- package/dist/components/export-button/csv.js +1 -1
- package/dist/components/export-button/export-button.d.ts +12 -0
- package/dist/components/export-button/export-button.js +35 -5
- package/dist/components/export-button/export-button.styles.js +5 -1
- package/dist/components/file-input/accept.js +2 -0
- package/dist/components/file-input/file-input.d.ts +10 -1
- package/dist/components/file-input/file-input.js +36 -5
- package/dist/components/flag/flag.d.ts +29 -13
- package/dist/components/flag/flag.js +54 -14
- package/dist/components/flag/flag.styles.js +1 -1
- package/dist/components/flag/language-map.d.ts +4 -1
- package/dist/components/flag/language-map.js +6 -3
- package/dist/components/gauge/gauge.d.ts +10 -1
- package/dist/components/gauge/gauge.js +41 -13
- package/dist/components/generation-status/generation-status.d.ts +117 -0
- package/dist/components/generation-status/generation-status.js +327 -0
- package/dist/components/generation-status/generation-status.styles.d.ts +1 -0
- package/dist/components/generation-status/generation-status.styles.js +84 -0
- package/dist/components/graph/graph.d.ts +37 -3
- package/dist/components/graph/graph.js +132 -20
- package/dist/components/heatmap/calendar-grid.d.ts +19 -7
- package/dist/components/heatmap/calendar-grid.js +42 -18
- package/dist/components/heatmap/heatmap-scale.d.ts +11 -1
- package/dist/components/heatmap/heatmap-scale.js +14 -2
- package/dist/components/heatmap/heatmap.d.ts +227 -12
- package/dist/components/heatmap/heatmap.js +488 -93
- package/dist/components/json-viewer/json-viewer.d.ts +70 -0
- package/dist/components/json-viewer/json-viewer.js +361 -0
- package/dist/components/json-viewer/json-viewer.styles.d.ts +1 -0
- package/dist/components/json-viewer/json-viewer.styles.js +177 -0
- package/dist/components/kbd/kbd.d.ts +77 -0
- package/dist/components/kbd/kbd.js +231 -0
- package/dist/components/kbd/kbd.styles.d.ts +1 -0
- package/dist/components/kbd/kbd.styles.js +52 -0
- package/dist/components/live-region/live-region.d.ts +90 -0
- package/dist/components/live-region/live-region.js +189 -0
- package/dist/components/live-region/live-region.styles.d.ts +1 -0
- package/dist/components/live-region/live-region.styles.js +10 -0
- package/dist/components/map/map.d.ts +32 -7
- package/dist/components/map/map.js +133 -32
- package/dist/components/markdown/markdown-loader.d.ts +58 -0
- package/dist/components/markdown/markdown-loader.js +77 -0
- package/dist/components/markdown/markdown.d.ts +119 -0
- package/dist/components/markdown/markdown.js +389 -0
- package/dist/components/markdown/markdown.styles.d.ts +1 -0
- package/dist/components/markdown/markdown.styles.js +88 -0
- package/dist/components/media-card/media-card.d.ts +130 -0
- package/dist/components/media-card/media-card.js +273 -0
- package/dist/components/media-card/media-card.styles.d.ts +1 -0
- package/dist/components/media-card/media-card.styles.js +132 -0
- package/dist/components/mention-popover/mention-popover.d.ts +203 -0
- package/dist/components/mention-popover/mention-popover.js +493 -0
- package/dist/components/mention-popover/mention-popover.styles.d.ts +1 -0
- package/dist/components/mention-popover/mention-popover.styles.js +101 -0
- package/dist/components/menu/menu-item.d.ts +91 -0
- package/dist/components/menu/menu-item.js +206 -0
- package/dist/components/menu/menu-item.styles.d.ts +1 -0
- package/dist/components/menu/menu-item.styles.js +75 -0
- package/dist/components/menu/menu.d.ts +167 -0
- package/dist/components/menu/menu.js +461 -0
- package/dist/components/menu/menu.styles.d.ts +1 -0
- package/dist/components/menu/menu.styles.js +67 -0
- package/dist/components/model-select/model-select.d.ts +170 -0
- package/dist/components/model-select/model-select.js +588 -0
- package/dist/components/model-select/model-select.styles.d.ts +1 -0
- package/dist/components/model-select/model-select.styles.js +203 -0
- package/dist/components/model-settings-panel/model-settings-panel.d.ts +93 -0
- package/dist/components/model-settings-panel/model-settings-panel.js +209 -0
- package/dist/components/model-settings-panel/model-settings-panel.styles.d.ts +1 -0
- package/dist/components/model-settings-panel/model-settings-panel.styles.js +82 -0
- package/dist/components/playback/playback.d.ts +19 -3
- package/dist/components/playback/playback.js +109 -33
- package/dist/components/playback/playback.styles.js +6 -1
- package/dist/components/responsive-panel/responsive-panel.d.ts +163 -0
- package/dist/components/responsive-panel/responsive-panel.js +363 -0
- package/dist/components/responsive-panel/responsive-panel.styles.d.ts +1 -0
- package/dist/components/responsive-panel/responsive-panel.styles.js +103 -0
- package/dist/components/result-card/result-card.d.ts +50 -0
- package/dist/components/result-card/result-card.js +89 -0
- package/dist/components/result-card/result-card.styles.d.ts +1 -0
- package/dist/components/result-card/result-card.styles.js +49 -0
- package/dist/components/result-card/result-field.d.ts +36 -0
- package/dist/components/result-card/result-field.js +87 -0
- package/dist/components/result-card/result-field.styles.d.ts +1 -0
- package/dist/components/result-card/result-field.styles.js +32 -0
- package/dist/components/select/select.d.ts +84 -4
- package/dist/components/select/select.js +251 -36
- package/dist/components/skeleton/skeleton.d.ts +3 -0
- package/dist/components/skeleton/skeleton.js +7 -1
- package/dist/components/skeleton/skeleton.styles.js +5 -4
- package/dist/components/slider/slider.d.ts +141 -0
- package/dist/components/slider/slider.js +467 -0
- package/dist/components/slider/slider.styles.d.ts +1 -0
- package/dist/components/slider/slider.styles.js +87 -0
- package/dist/components/source-card/source-card.d.ts +104 -0
- package/dist/components/source-card/source-card.js +195 -0
- package/dist/components/source-card/source-card.styles.d.ts +1 -0
- package/dist/components/source-card/source-card.styles.js +69 -0
- package/dist/components/source-list/source-list.d.ts +63 -0
- package/dist/components/source-list/source-list.js +130 -0
- package/dist/components/source-list/source-list.styles.d.ts +1 -0
- package/dist/components/source-list/source-list.styles.js +59 -0
- package/dist/components/sparkline/sparkline.js +58 -20
- package/dist/components/split/split.d.ts +224 -5
- package/dist/components/split/split.js +617 -43
- package/dist/components/split/split.styles.js +47 -0
- package/dist/components/stat/stat.d.ts +15 -4
- package/dist/components/stat/stat.js +53 -12
- package/dist/components/stream-status/stream-status.d.ts +126 -0
- package/dist/components/stream-status/stream-status.js +292 -0
- package/dist/components/stream-status/stream-status.styles.d.ts +1 -0
- package/dist/components/stream-status/stream-status.styles.js +103 -0
- package/dist/components/streaming-text/streaming-text.d.ts +104 -0
- package/dist/components/streaming-text/streaming-text.js +224 -0
- package/dist/components/streaming-text/streaming-text.styles.d.ts +1 -0
- package/dist/components/streaming-text/streaming-text.styles.js +63 -0
- package/dist/components/switch/switch.d.ts +103 -0
- package/dist/components/switch/switch.js +250 -0
- package/dist/components/switch/switch.styles.d.ts +1 -0
- package/dist/components/switch/switch.styles.js +75 -0
- package/dist/components/table/table.d.ts +89 -5
- package/dist/components/table/table.js +243 -26
- package/dist/components/table/table.styles.js +6 -1
- package/dist/components/tabs/tabs.d.ts +74 -0
- package/dist/components/tabs/tabs.js +254 -0
- package/dist/components/tabs/tabs.styles.d.ts +1 -0
- package/dist/components/tabs/tabs.styles.js +74 -0
- package/dist/components/thinking-panel/thinking-panel.d.ts +123 -0
- package/dist/components/thinking-panel/thinking-panel.js +260 -0
- package/dist/components/thinking-panel/thinking-panel.styles.d.ts +1 -0
- package/dist/components/thinking-panel/thinking-panel.styles.js +123 -0
- package/dist/components/time-range/time-range.d.ts +59 -2
- package/dist/components/time-range/time-range.js +163 -67
- package/dist/components/toast/toast-item.d.ts +12 -2
- package/dist/components/toast/toast-item.js +106 -44
- package/dist/components/toast/toast-item.styles.js +59 -28
- package/dist/components/toast/toast.js +17 -5
- package/dist/components/toast/toaster.js +10 -1
- package/dist/components/tool-approval-dialog/tool-approval-dialog.d.ts +131 -0
- package/dist/components/tool-approval-dialog/tool-approval-dialog.js +329 -0
- package/dist/components/tool-approval-dialog/tool-approval-dialog.styles.d.ts +1 -0
- package/dist/components/tool-approval-dialog/tool-approval-dialog.styles.js +160 -0
- package/dist/components/tool-call-chip/tool-call-chip.d.ts +105 -0
- package/dist/components/tool-call-chip/tool-call-chip.js +349 -0
- package/dist/components/tool-call-chip/tool-call-chip.styles.d.ts +1 -0
- package/dist/components/tool-call-chip/tool-call-chip.styles.js +203 -0
- package/dist/components/tool-param-form/tool-param-form.d.ts +206 -0
- package/dist/components/tool-param-form/tool-param-form.js +610 -0
- package/dist/components/tool-param-form/tool-param-form.styles.d.ts +1 -0
- package/dist/components/tool-param-form/tool-param-form.styles.js +75 -0
- package/dist/components/tool-result-dialog/tool-result-dialog.d.ts +122 -0
- package/dist/components/tool-result-dialog/tool-result-dialog.js +358 -0
- package/dist/components/tool-result-dialog/tool-result-dialog.styles.d.ts +1 -0
- package/dist/components/tool-result-dialog/tool-result-dialog.styles.js +176 -0
- package/dist/components/tool-result-view/registry.d.ts +73 -0
- package/dist/components/tool-result-view/registry.js +89 -0
- package/dist/components/tool-result-view/tool-result-view.d.ts +58 -0
- package/dist/components/tool-result-view/tool-result-view.js +152 -0
- package/dist/components/tool-result-view/tool-result-view.styles.d.ts +1 -0
- package/dist/components/tool-result-view/tool-result-view.styles.js +13 -0
- package/dist/components/tool-select-dialog/tool-select-dialog.d.ts +151 -0
- package/dist/components/tool-select-dialog/tool-select-dialog.js +350 -0
- package/dist/components/tool-select-dialog/tool-select-dialog.styles.d.ts +1 -0
- package/dist/components/tool-select-dialog/tool-select-dialog.styles.js +191 -0
- package/dist/components/tree/tree-node.d.ts +15 -3
- package/dist/components/tree/tree-node.js +20 -7
- package/dist/components/tree/tree.d.ts +25 -10
- package/dist/components/tree/tree.js +39 -31
- package/dist/components/typing-indicator/typing-indicator.d.ts +70 -0
- package/dist/components/typing-indicator/typing-indicator.js +108 -0
- package/dist/components/typing-indicator/typing-indicator.styles.d.ts +1 -0
- package/dist/components/typing-indicator/typing-indicator.styles.js +132 -0
- package/dist/components/virtual-list/virtual-list.d.ts +210 -0
- package/dist/components/virtual-list/virtual-list.js +607 -0
- package/dist/components/virtual-list/virtual-list.styles.d.ts +1 -0
- package/dist/components/virtual-list/virtual-list.styles.js +56 -0
- package/dist/components/widget/widget.d.ts +5 -4
- package/dist/components/widget/widget.js +54 -120
- package/dist/components/widget/widget.styles.js +8 -2
- package/dist/components/word-cloud/word-cloud-layout.d.ts +7 -0
- package/dist/components/word-cloud/word-cloud-layout.js +29 -2
- package/dist/components/word-cloud/word-cloud.d.ts +28 -2
- package/dist/components/word-cloud/word-cloud.js +69 -19
- package/dist/components/word-cloud/word-cloud.styles.js +16 -3
- package/dist/internal/anchored-validity.d.ts +1 -0
- package/dist/internal/anchored-validity.js +86 -0
- package/dist/internal/announcer.d.ts +57 -0
- package/dist/internal/announcer.js +71 -0
- package/dist/internal/form-associated.d.ts +8 -0
- package/dist/internal/form-associated.js +98 -15
- package/dist/internal/group-by-recency.d.ts +50 -0
- package/dist/internal/group-by-recency.js +80 -0
- package/dist/internal/numbers.d.ts +12 -0
- package/dist/internal/numbers.js +26 -0
- package/dist/internal/overlay-manager.d.ts +51 -0
- package/dist/internal/overlay-manager.js +523 -0
- package/dist/internal/positioner.js +27 -3
- package/dist/internal/rtl.d.ts +23 -0
- package/dist/internal/rtl.js +28 -0
- package/dist/internal/safe-url.d.ts +12 -0
- package/dist/internal/safe-url.js +41 -0
- package/dist/internal/scroll-lock.d.ts +10 -5
- package/dist/internal/scroll-lock.js +30 -14
- package/dist/internal/tokens.styles.js +22 -10
- package/dist/lyra.d.ts +133 -31
- package/dist/lyra.js +96 -26
- package/llms-full.txt +4546 -183
- package/llms.txt +21 -5
- package/package.json +41 -6
- package/dist/components/chart/bar-chart.stories.d.ts +0 -5
- package/dist/components/chart/bar-chart.stories.js +0 -20
- package/dist/components/chart/box-plot.stories.d.ts +0 -5
- package/dist/components/chart/box-plot.stories.js +0 -29
- package/dist/components/chart/bubble-chart.stories.d.ts +0 -5
- package/dist/components/chart/bubble-chart.stories.js +0 -26
- package/dist/components/chart/chart.stories.d.ts +0 -32
- package/dist/components/chart/chart.stories.js +0 -141
- package/dist/components/chart/doughnut-chart.stories.d.ts +0 -5
- package/dist/components/chart/doughnut-chart.stories.js +0 -26
- package/dist/components/chart/histogram.stories.d.ts +0 -5
- package/dist/components/chart/histogram.stories.js +0 -17
- package/dist/components/chart/line-chart.stories.d.ts +0 -22
- package/dist/components/chart/line-chart.stories.js +0 -99
- package/dist/components/chart/lite-chart.stories.d.ts +0 -14
- package/dist/components/chart/lite-chart.stories.js +0 -114
- package/dist/components/chart/pie-chart.stories.d.ts +0 -5
- package/dist/components/chart/pie-chart.stories.js +0 -26
- package/dist/components/chart/polar-area-chart.stories.d.ts +0 -5
- package/dist/components/chart/polar-area-chart.stories.js +0 -20
- package/dist/components/chart/radar-chart.stories.d.ts +0 -5
- package/dist/components/chart/radar-chart.stories.js +0 -20
- package/dist/components/chart/scatter-chart.stories.d.ts +0 -5
- package/dist/components/chart/scatter-chart.stories.js +0 -31
- package/dist/components/combobox/combobox.stories.d.ts +0 -24
- package/dist/components/combobox/combobox.stories.js +0 -102
- package/dist/components/date-picker/date-input.stories.d.ts +0 -10
- package/dist/components/date-picker/date-input.stories.js +0 -48
- package/dist/components/date-picker/date-picker.stories.d.ts +0 -10
- package/dist/components/date-picker/date-picker.stories.js +0 -25
- package/dist/components/empty/empty.stories.d.ts +0 -7
- package/dist/components/empty/empty.stories.js +0 -34
- package/dist/components/export-button/export-button.stories.d.ts +0 -7
- package/dist/components/export-button/export-button.stories.js +0 -37
- package/dist/components/file-input/file-input.stories.d.ts +0 -7
- package/dist/components/file-input/file-input.stories.js +0 -19
- package/dist/components/flag/flag.stories.d.ts +0 -6
- package/dist/components/flag/flag.stories.js +0 -31
- package/dist/components/gauge/gauge.stories.d.ts +0 -8
- package/dist/components/gauge/gauge.stories.js +0 -19
- package/dist/components/graph/graph.stories.d.ts +0 -8
- package/dist/components/graph/graph.stories.js +0 -68
- package/dist/components/heatmap/heatmap.stories.d.ts +0 -27
- package/dist/components/heatmap/heatmap.stories.js +0 -179
- package/dist/components/map/map.stories.d.ts +0 -15
- package/dist/components/map/map.stories.js +0 -135
- package/dist/components/playback/playback.stories.d.ts +0 -7
- package/dist/components/playback/playback.stories.js +0 -16
- package/dist/components/select/select.stories.d.ts +0 -21
- package/dist/components/select/select.stories.js +0 -91
- package/dist/components/skeleton/skeleton.stories.d.ts +0 -5
- package/dist/components/skeleton/skeleton.stories.js +0 -16
- package/dist/components/sparkline/sparkline.stories.d.ts +0 -11
- package/dist/components/sparkline/sparkline.stories.js +0 -39
- package/dist/components/split/split.stories.d.ts +0 -7
- package/dist/components/split/split.stories.js +0 -36
- package/dist/components/stat/stat.stories.d.ts +0 -9
- package/dist/components/stat/stat.stories.js +0 -81
- package/dist/components/table/table.stories.d.ts +0 -12
- package/dist/components/table/table.stories.js +0 -67
- package/dist/components/time-range/time-range.stories.d.ts +0 -8
- package/dist/components/time-range/time-range.stories.js +0 -26
- package/dist/components/toast/toast.stories.d.ts +0 -8
- package/dist/components/toast/toast.stories.js +0 -72
- package/dist/components/tree/tree.stories.d.ts +0 -9
- package/dist/components/tree/tree.stories.js +0 -52
- package/dist/components/widget/widget.stories.d.ts +0 -9
- package/dist/components/widget/widget.stories.js +0 -74
- package/dist/components/word-cloud/word-cloud.stories.d.ts +0 -10
- package/dist/components/word-cloud/word-cloud.stories.js +0 -55
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type TemplateResult } from 'lit';
|
|
2
|
+
import { LyraElement } from '../../internal/lyra-element.js';
|
|
3
|
+
export type ContextMeterTone = 'brand' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
4
|
+
export type ContextMeterVariant = 'ring' | 'bar';
|
|
5
|
+
export interface ContextMeterSegment {
|
|
6
|
+
label: string;
|
|
7
|
+
/** Absolute quantity (e.g. tokens), not a pre-computed percentage. */
|
|
8
|
+
value: number;
|
|
9
|
+
tone?: ContextMeterTone;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* `<lyra-context-meter>` — a segmented occupancy meter (bar or ring) for
|
|
13
|
+
* showing how a fixed capacity (a model's context window, a token budget,
|
|
14
|
+
* any consumable quota) is divided across labeled categories. First-party
|
|
15
|
+
* invention; no equivalent exists in Web Awesome.
|
|
16
|
+
*
|
|
17
|
+
* Pure data visualization: it renders `segments`/`total` as given and never
|
|
18
|
+
* computes token counts, costs, or any other domain-specific estimate
|
|
19
|
+
* itself — the one exception is the plain arithmetic sum of the segment
|
|
20
|
+
* values used to build the accessible "X of Y used" summary below.
|
|
21
|
+
*
|
|
22
|
+
* @customElement lyra-context-meter
|
|
23
|
+
* @csspart base - The component's root wrapper (a `<div>` for `bar`, an `<svg>` for `ring`).
|
|
24
|
+
* @csspart track - The unfilled/empty capacity track.
|
|
25
|
+
* @csspart segment - One occupied segment. Carries `data-tone` for styling.
|
|
26
|
+
* @csspart label - The visible caption, when `label` is set.
|
|
27
|
+
*/
|
|
28
|
+
export declare class LyraContextMeter extends LyraElement {
|
|
29
|
+
static styles: import("lit").CSSResultGroup[];
|
|
30
|
+
/** Occupied segments, each an absolute quantity against `total` — never a percentage. */
|
|
31
|
+
segments: ContextMeterSegment[];
|
|
32
|
+
/** The full capacity segments are measured against (e.g. a model's context window size). */
|
|
33
|
+
total: number;
|
|
34
|
+
variant: ContextMeterVariant;
|
|
35
|
+
/** Overall accessible label/caption, e.g. `"128K context window"`. */
|
|
36
|
+
label: string;
|
|
37
|
+
/** Sum of segment values, clamped so a negative/NaN entry can't produce a negative total. */
|
|
38
|
+
private get usedTotal();
|
|
39
|
+
/** Per-segment ratio of `value` to `total`, clamped to [0,1] and capped so the
|
|
40
|
+
* running sum across all segments never overflows past 1 — a `segments` array
|
|
41
|
+
* that sums to more than `total` still renders a fully (not over-) filled meter. */
|
|
42
|
+
private ratios;
|
|
43
|
+
private get summary();
|
|
44
|
+
protected willUpdate(): void;
|
|
45
|
+
private renderBar;
|
|
46
|
+
private renderRing;
|
|
47
|
+
render(): TemplateResult;
|
|
48
|
+
}
|
|
49
|
+
declare global {
|
|
50
|
+
interface HTMLElementTagNameMap {
|
|
51
|
+
'lyra-context-meter': LyraContextMeter;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, svg, nothing } from 'lit';
|
|
8
|
+
import { property } from 'lit/decorators.js';
|
|
9
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
10
|
+
import { LyraElement } from '../../internal/lyra-element.js';
|
|
11
|
+
import { defineElement } from '../../internal/prefix.js';
|
|
12
|
+
import { finiteNumber } from '../../internal/numbers.js';
|
|
13
|
+
import { styles } from './context-meter.styles.js';
|
|
14
|
+
// Ring geometry: RADIUS/CENTER match lyra-gauge's radial numbers, so both
|
|
15
|
+
// components' rings sit on the same circle within their viewBox. STROKE is
|
|
16
|
+
// intentionally heavier than the gauge's (12 vs. 10) -- tightly-packed
|
|
17
|
+
// multi-tone arcs need more width to stay visually distinct than a gauge's
|
|
18
|
+
// single fill arc, so it isn't shared.
|
|
19
|
+
const RADIUS = 40;
|
|
20
|
+
const CENTER = 50;
|
|
21
|
+
const STROKE = 12;
|
|
22
|
+
const CIRCUMFERENCE = 2 * Math.PI * RADIUS;
|
|
23
|
+
function formatCount(n) {
|
|
24
|
+
return Math.round(finiteNumber(n, 0)).toLocaleString();
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* `<lyra-context-meter>` — a segmented occupancy meter (bar or ring) for
|
|
28
|
+
* showing how a fixed capacity (a model's context window, a token budget,
|
|
29
|
+
* any consumable quota) is divided across labeled categories. First-party
|
|
30
|
+
* invention; no equivalent exists in Web Awesome.
|
|
31
|
+
*
|
|
32
|
+
* Pure data visualization: it renders `segments`/`total` as given and never
|
|
33
|
+
* computes token counts, costs, or any other domain-specific estimate
|
|
34
|
+
* itself — the one exception is the plain arithmetic sum of the segment
|
|
35
|
+
* values used to build the accessible "X of Y used" summary below.
|
|
36
|
+
*
|
|
37
|
+
* @customElement lyra-context-meter
|
|
38
|
+
* @csspart base - The component's root wrapper (a `<div>` for `bar`, an `<svg>` for `ring`).
|
|
39
|
+
* @csspart track - The unfilled/empty capacity track.
|
|
40
|
+
* @csspart segment - One occupied segment. Carries `data-tone` for styling.
|
|
41
|
+
* @csspart label - The visible caption, when `label` is set.
|
|
42
|
+
*/
|
|
43
|
+
export class LyraContextMeter extends LyraElement {
|
|
44
|
+
constructor() {
|
|
45
|
+
super(...arguments);
|
|
46
|
+
/** Occupied segments, each an absolute quantity against `total` — never a percentage. */
|
|
47
|
+
this.segments = [];
|
|
48
|
+
/** The full capacity segments are measured against (e.g. a model's context window size). */
|
|
49
|
+
this.total = 0;
|
|
50
|
+
this.variant = 'bar';
|
|
51
|
+
/** Overall accessible label/caption, e.g. `"128K context window"`. */
|
|
52
|
+
this.label = '';
|
|
53
|
+
}
|
|
54
|
+
static { this.styles = [LyraElement.styles, styles]; }
|
|
55
|
+
/** Sum of segment values, clamped so a negative/NaN entry can't produce a negative total. */
|
|
56
|
+
get usedTotal() {
|
|
57
|
+
return this.segments.reduce((sum, s) => sum + Math.max(0, finiteNumber(s.value, 0)), 0);
|
|
58
|
+
}
|
|
59
|
+
/** Per-segment ratio of `value` to `total`, clamped to [0,1] and capped so the
|
|
60
|
+
* running sum across all segments never overflows past 1 — a `segments` array
|
|
61
|
+
* that sums to more than `total` still renders a fully (not over-) filled meter. */
|
|
62
|
+
ratios() {
|
|
63
|
+
const total = Math.max(0, finiteNumber(this.total, 0));
|
|
64
|
+
if (total <= 0)
|
|
65
|
+
return [];
|
|
66
|
+
const out = [];
|
|
67
|
+
let cumulative = 0;
|
|
68
|
+
for (const segment of this.segments) {
|
|
69
|
+
const raw = Math.max(0, finiteNumber(segment.value, 0));
|
|
70
|
+
const available = Math.max(0, 1 - cumulative);
|
|
71
|
+
const ratio = Math.min(raw / total, available);
|
|
72
|
+
cumulative += ratio;
|
|
73
|
+
out.push({ segment, ratio });
|
|
74
|
+
}
|
|
75
|
+
return out;
|
|
76
|
+
}
|
|
77
|
+
get summary() {
|
|
78
|
+
// Clamp the announced figure the same way ratios() clamps the visual fill --
|
|
79
|
+
// a segments array that sums past total must not report an impossible
|
|
80
|
+
// "160 of 100 used" to assistive tech while the bar/ring visibly caps at 100%.
|
|
81
|
+
const totalValue = Math.max(0, finiteNumber(this.total, 0));
|
|
82
|
+
const usedForSummary = totalValue > 0 ? Math.min(this.usedTotal, totalValue) : this.usedTotal;
|
|
83
|
+
const used = formatCount(usedForSummary);
|
|
84
|
+
const total = totalValue > 0 ? formatCount(totalValue) : null;
|
|
85
|
+
const phrase = total ? `${used} of ${total} used` : `${used} used`;
|
|
86
|
+
return this.label ? `${this.label} — ${phrase}` : phrase;
|
|
87
|
+
}
|
|
88
|
+
willUpdate() {
|
|
89
|
+
// role="img" + aria-label (rather than exposing the SVG/bar internals to
|
|
90
|
+
// the accessibility tree) mirrors lyra-gauge's "meter" role convention:
|
|
91
|
+
// one computed string carries the whole occupancy summary, so a screen
|
|
92
|
+
// reader gets meaningful text instead of silence or a bare "graphic".
|
|
93
|
+
this.setAttribute('role', 'img');
|
|
94
|
+
this.setAttribute('aria-label', this.summary);
|
|
95
|
+
}
|
|
96
|
+
renderBar() {
|
|
97
|
+
const ratios = this.ratios();
|
|
98
|
+
return html `
|
|
99
|
+
<div part="base">
|
|
100
|
+
${this.label ? html `<div part="label" aria-hidden="true">${this.label}</div>` : nothing}
|
|
101
|
+
<div part="track" aria-hidden="true">
|
|
102
|
+
${ratios.map(({ segment, ratio }) => html `
|
|
103
|
+
<span
|
|
104
|
+
part="segment"
|
|
105
|
+
data-tone=${segment.tone ?? 'neutral'}
|
|
106
|
+
title=${`${segment.label}: ${formatCount(segment.value)}`}
|
|
107
|
+
style=${styleMap({ flexBasis: `${(ratio * 100).toFixed(4)}%` })}
|
|
108
|
+
></span>
|
|
109
|
+
`)}
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
`;
|
|
113
|
+
}
|
|
114
|
+
renderRing() {
|
|
115
|
+
const ratios = this.ratios();
|
|
116
|
+
let cumulative = 0;
|
|
117
|
+
const arcs = ratios.map(({ segment, ratio }) => {
|
|
118
|
+
const segLen = ratio * CIRCUMFERENCE;
|
|
119
|
+
const dashoffset = -cumulative * CIRCUMFERENCE;
|
|
120
|
+
cumulative += ratio;
|
|
121
|
+
return svg `
|
|
122
|
+
<circle
|
|
123
|
+
part="segment"
|
|
124
|
+
data-tone=${segment.tone ?? 'neutral'}
|
|
125
|
+
cx=${CENTER}
|
|
126
|
+
cy=${CENTER}
|
|
127
|
+
r=${RADIUS}
|
|
128
|
+
stroke-width=${STROKE}
|
|
129
|
+
stroke-dasharray=${`${segLen} ${CIRCUMFERENCE - segLen}`}
|
|
130
|
+
stroke-dashoffset=${dashoffset}
|
|
131
|
+
transform="rotate(-90 ${CENTER} ${CENTER})"
|
|
132
|
+
><title>${`${segment.label}: ${formatCount(segment.value)}`}</title></circle>
|
|
133
|
+
`;
|
|
134
|
+
});
|
|
135
|
+
return html `
|
|
136
|
+
<svg part="base" viewBox="0 0 100 100" aria-hidden="true">
|
|
137
|
+
<circle part="track" cx=${CENTER} cy=${CENTER} r=${RADIUS} stroke-width=${STROKE}></circle>
|
|
138
|
+
${arcs}
|
|
139
|
+
${this.label ? svg `<text part="label" x=${CENTER} y=${CENTER + 4} aria-hidden="true">${this.label}</text>` : nothing}
|
|
140
|
+
</svg>
|
|
141
|
+
`;
|
|
142
|
+
}
|
|
143
|
+
render() {
|
|
144
|
+
return this.variant === 'ring' ? this.renderRing() : this.renderBar();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
__decorate([
|
|
148
|
+
property({ attribute: false })
|
|
149
|
+
], LyraContextMeter.prototype, "segments", void 0);
|
|
150
|
+
__decorate([
|
|
151
|
+
property({ type: Number })
|
|
152
|
+
], LyraContextMeter.prototype, "total", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
property({ reflect: true })
|
|
155
|
+
], LyraContextMeter.prototype, "variant", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
property()
|
|
158
|
+
], LyraContextMeter.prototype, "label", void 0);
|
|
159
|
+
defineElement('context-meter', LyraContextMeter);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const styles = css `
|
|
3
|
+
:host {
|
|
4
|
+
display: block;
|
|
5
|
+
inline-size: 100%;
|
|
6
|
+
}
|
|
7
|
+
:host([variant='ring']) {
|
|
8
|
+
display: inline-block;
|
|
9
|
+
inline-size: 8em;
|
|
10
|
+
block-size: 8em;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[part='base'] {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: var(--lyra-space-xs);
|
|
17
|
+
}
|
|
18
|
+
:host([variant='ring']) [part='base'] {
|
|
19
|
+
inline-size: 100%;
|
|
20
|
+
block-size: 100%;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
[part='label'] {
|
|
24
|
+
font-size: 0.75rem;
|
|
25
|
+
color: var(--lyra-color-text-quiet);
|
|
26
|
+
font-family: var(--lyra-font);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* --- bar variant ------------------------------------------------- */
|
|
30
|
+
[part='track'] {
|
|
31
|
+
position: relative;
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: stretch;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
block-size: 0.5rem;
|
|
36
|
+
border-radius: calc(var(--lyra-radius) * 0.5);
|
|
37
|
+
/* Quiet neutral fill for the unfilled remainder -- deliberately lighter
|
|
38
|
+
than a 'neutral'-tone segment (var(--lyra-color-border) at full
|
|
39
|
+
strength below) so "counted but uncolored" data still reads as
|
|
40
|
+
visually distinct from "not counted at all". */
|
|
41
|
+
background: color-mix(in srgb, var(--lyra-color-border) 30%, transparent);
|
|
42
|
+
}
|
|
43
|
+
[part='segment'] {
|
|
44
|
+
display: block;
|
|
45
|
+
flex: 0 0 auto;
|
|
46
|
+
block-size: 100%;
|
|
47
|
+
background: var(--lyra-color-border);
|
|
48
|
+
transition: flex-basis var(--lyra-transition-base);
|
|
49
|
+
}
|
|
50
|
+
/* A hairline seam between adjacent segments -- painted in the surface
|
|
51
|
+
color rather than as real gap spacing, so two same-tone segments next
|
|
52
|
+
to each other (e.g. two 'neutral' entries) still read as separate
|
|
53
|
+
quantities instead of merging into one block. Logical property keeps it
|
|
54
|
+
RTL-correct without extra math. */
|
|
55
|
+
[part='segment']:not(:first-of-type) {
|
|
56
|
+
border-inline-start: 1px solid var(--lyra-color-surface);
|
|
57
|
+
}
|
|
58
|
+
[part='segment'][data-tone='brand'] {
|
|
59
|
+
background: var(--lyra-color-brand);
|
|
60
|
+
}
|
|
61
|
+
[part='segment'][data-tone='success'] {
|
|
62
|
+
background: var(--lyra-color-success);
|
|
63
|
+
}
|
|
64
|
+
[part='segment'][data-tone='warning'] {
|
|
65
|
+
background: var(--lyra-color-warning);
|
|
66
|
+
}
|
|
67
|
+
[part='segment'][data-tone='danger'] {
|
|
68
|
+
background: var(--lyra-color-danger);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* --- ring variant -------------------------------------------------- */
|
|
72
|
+
:host([variant='ring']) svg[part='base'] {
|
|
73
|
+
display: block;
|
|
74
|
+
overflow: visible;
|
|
75
|
+
}
|
|
76
|
+
:host([variant='ring']) [part='track'] {
|
|
77
|
+
fill: none;
|
|
78
|
+
stroke: color-mix(in srgb, var(--lyra-color-border) 30%, transparent);
|
|
79
|
+
}
|
|
80
|
+
:host([variant='ring']) [part='segment'] {
|
|
81
|
+
fill: none;
|
|
82
|
+
stroke: var(--lyra-color-border);
|
|
83
|
+
/* Butt (not round) caps -- round caps on tightly-packed segmented arcs
|
|
84
|
+
bleed past the exact boundary and overlap the next segment's color. */
|
|
85
|
+
stroke-linecap: butt;
|
|
86
|
+
transition:
|
|
87
|
+
stroke-dasharray var(--lyra-transition-base),
|
|
88
|
+
stroke-dashoffset var(--lyra-transition-base);
|
|
89
|
+
}
|
|
90
|
+
:host([variant='ring']) [part='segment'][data-tone='brand'] {
|
|
91
|
+
stroke: var(--lyra-color-brand);
|
|
92
|
+
}
|
|
93
|
+
:host([variant='ring']) [part='segment'][data-tone='success'] {
|
|
94
|
+
stroke: var(--lyra-color-success);
|
|
95
|
+
}
|
|
96
|
+
:host([variant='ring']) [part='segment'][data-tone='warning'] {
|
|
97
|
+
stroke: var(--lyra-color-warning);
|
|
98
|
+
}
|
|
99
|
+
:host([variant='ring']) [part='segment'][data-tone='danger'] {
|
|
100
|
+
stroke: var(--lyra-color-danger);
|
|
101
|
+
}
|
|
102
|
+
:host([variant='ring']) [part='label'] {
|
|
103
|
+
text-anchor: middle;
|
|
104
|
+
fill: var(--lyra-color-text-quiet);
|
|
105
|
+
font-size: 0.625rem;
|
|
106
|
+
text-transform: uppercase;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@media (prefers-reduced-motion: reduce) {
|
|
110
|
+
[part='segment'] {
|
|
111
|
+
transition: none !important;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
`;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { type TemplateResult, type PropertyValues } from 'lit';
|
|
2
|
+
import { LyraElement } from '../../internal/lyra-element.js';
|
|
3
|
+
export interface ConversationItemRenameDetail {
|
|
4
|
+
title: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* `<lyra-conversation-item>` — a selectable row representing one chat
|
|
8
|
+
* session in a history sidebar list. Usable standalone or as the
|
|
9
|
+
* `renderItem()` payload of a sibling virtualized-list component; this
|
|
10
|
+
* module has no dependency on that (or any) other component.
|
|
11
|
+
*
|
|
12
|
+
* Takes `title`/`excerpt`/`timestamp` as individual primitive props rather
|
|
13
|
+
* than one opaque bound object, deliberately consistent with how
|
|
14
|
+
* `<lyra-chat-message>` takes individual props instead of a single
|
|
15
|
+
* `.message` blob -- every other component in this family follows that
|
|
16
|
+
* shape, so this one does too even though a single bound `.session` object
|
|
17
|
+
* would also have been a reasonable design.
|
|
18
|
+
*
|
|
19
|
+
* Identifying *which* session a `lyra-select` click/keypress was about: this
|
|
20
|
+
* reuses the platform's own `id` attribute (every element already has one)
|
|
21
|
+
* rather than inventing a second, differently-named id-carrying prop --
|
|
22
|
+
* consumers already have the event's `target`/`currentTarget` (and thus
|
|
23
|
+
* `.id`), the same reasoning `<lyra-attachment-chip>` documents for its own
|
|
24
|
+
* identically-shaped choice. `lyra-select` therefore carries no detail
|
|
25
|
+
* payload at all.
|
|
26
|
+
*
|
|
27
|
+
* `role="button"` on `[part="option"]` so the item has valid semantics both
|
|
28
|
+
* standalone and when placed in a larger history-list layout. A conversation
|
|
29
|
+
* row activates one current session; it is not itself a listbox option and
|
|
30
|
+
* therefore does not require a particular owner role.
|
|
31
|
+
*
|
|
32
|
+
* `role="button"` forbids focusable
|
|
33
|
+
* descendants -- verified against axe-core's `nested-interactive` rule,
|
|
34
|
+
* which flags it. That's why the rename button and the `actions` slot are
|
|
35
|
+
* rendered as DOM *siblings* of `[part="option"]` (both inside
|
|
36
|
+
* `[part="base"]`) rather than nested inside it: `[part="option"]` only ever
|
|
37
|
+
* contains plain text/`<time>` content. The in-place rename `<input>` is the
|
|
38
|
+
* same problem one level deeper -- it replaces the title *inside*
|
|
39
|
+
* `[part="option"]` while renaming -- so `[part="option"]` sheds its
|
|
40
|
+
* `role`/`tabindex`/`aria-current`/`aria-label` entirely for the duration
|
|
41
|
+
* of an edit. A row mid-edit is a text field, so suspending the button
|
|
42
|
+
* semantics is also the more accurate
|
|
43
|
+
* description of what's on screen.
|
|
44
|
+
*
|
|
45
|
+
* Inline rename is a dedicated pencil/edit icon button (not a double-click
|
|
46
|
+
* on the title) -- double-click has no keyboard/screen-reader equivalent
|
|
47
|
+
* and would silently swallow the row's own single-click `lyra-select`,
|
|
48
|
+
* whereas a button is independently focusable, has its own accessible name,
|
|
49
|
+
* and composes cleanly with click-to-select.
|
|
50
|
+
*
|
|
51
|
+
* @customElement lyra-conversation-item
|
|
52
|
+
* @slot actions - Overflow/icon-button controls (e.g. a future pin/delete
|
|
53
|
+
* button) rendered at the trailing edge of the row. `lyra-menu` doesn't
|
|
54
|
+
* exist yet in this phase, so this is a plain slot for whatever a consumer
|
|
55
|
+
* wants to put there today.
|
|
56
|
+
* @event lyra-select - The row was activated: a click on `[part="option"]`
|
|
57
|
+
* (i.e. outside the rename button and the `actions` slot), or Enter/Space
|
|
58
|
+
* while it's focused -- in both cases only while not currently renaming. No
|
|
59
|
+
* detail payload -- see the class doc's "Identifying which session" note.
|
|
60
|
+
* @event lyra-rename - An in-place rename was committed (Enter, or blur
|
|
61
|
+
* while editing). `detail: { title }`. Does not mutate `title` itself --
|
|
62
|
+
* this is a controlled component, the same convention
|
|
63
|
+
* `<lyra-chat-message>` follows by not clearing its own state on retry; the
|
|
64
|
+
* consumer applies the new title once it's actually persisted. Not fired
|
|
65
|
+
* when the trimmed draft is empty or unchanged from the original `title`
|
|
66
|
+
* (that's treated as an implicit cancel).
|
|
67
|
+
* @csspart base - The outer row wrapper (plain, no ARIA role) laying out `[part="option"]`, the rename button, and `actions`.
|
|
68
|
+
* @csspart option - The selectable region (`role="button"`, removed while renaming -- see the class doc). Wraps `content` and `timestamp`.
|
|
69
|
+
* @csspart content - Wrapper around the title and excerpt.
|
|
70
|
+
* @csspart title - The title text, shown while not renaming.
|
|
71
|
+
* @csspart title-input - The in-place rename `<input>`, shown only while renaming.
|
|
72
|
+
* @csspart rename-button - The pencil/edit affordance that starts a rename (only rendered while `editable` and not already renaming).
|
|
73
|
+
* @csspart excerpt - The last-message preview snippet. Only rendered when `excerpt` is non-empty.
|
|
74
|
+
* @csspart timestamp - The formatted `timestamp`, rendered in a `<time>` element. Only rendered when `timestamp` is set and valid.
|
|
75
|
+
* @csspart actions - The wrapper around the `actions` slot.
|
|
76
|
+
*/
|
|
77
|
+
export declare class LyraConversationItem extends LyraElement {
|
|
78
|
+
static styles: import("lit").CSSResultGroup[];
|
|
79
|
+
/** The session's display title. */
|
|
80
|
+
title: string;
|
|
81
|
+
/** A short preview snippet of the last message. Omit for no excerpt line. */
|
|
82
|
+
excerpt: string;
|
|
83
|
+
/** When the session was last active. Accepts a `Date` or anything
|
|
84
|
+
* `new Date()` can parse (e.g. an ISO 8601 string); invalid input is
|
|
85
|
+
* treated the same as unset (no timestamp rendered) -- mirrors
|
|
86
|
+
* `<lyra-chat-message>`'s identical `timestamp` prop. */
|
|
87
|
+
timestamp?: Date | string;
|
|
88
|
+
/** Overrides the default absolute-time rendering of `timestamp` -- this
|
|
89
|
+
* library has no i18n system of its own, so an overridable formatter is
|
|
90
|
+
* the established way to hand locale-sensitive display back to the
|
|
91
|
+
* consumer (mirrors `<lyra-chat-message>`'s identical `formatTimestamp`). */
|
|
92
|
+
formatTimestamp?: (date: Date) => string;
|
|
93
|
+
/** Whether this is the currently-selected/open session. Drives the
|
|
94
|
+
* brand-quiet background treatment. */
|
|
95
|
+
active: boolean;
|
|
96
|
+
/** Whether inline-rename is available at all. When `false`, the rename
|
|
97
|
+
* button never renders and the row can never enter its editing state. If
|
|
98
|
+
* flipped to `false` while a rename is already open, the in-progress edit
|
|
99
|
+
* is cancelled (discarded, like Escape) rather than left committable. */
|
|
100
|
+
editable: boolean;
|
|
101
|
+
private renaming;
|
|
102
|
+
private draftTitle;
|
|
103
|
+
private hasActionsSlot;
|
|
104
|
+
private titleInput?;
|
|
105
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
106
|
+
protected updated(changed: PropertyValues): void;
|
|
107
|
+
private get normalizedTimestamp();
|
|
108
|
+
private select;
|
|
109
|
+
private startRename;
|
|
110
|
+
private commitRename;
|
|
111
|
+
private cancelRename;
|
|
112
|
+
private onOptionClick;
|
|
113
|
+
private onOptionKeyDown;
|
|
114
|
+
private onRenameButtonClick;
|
|
115
|
+
private onTitleInputChange;
|
|
116
|
+
private onTitleInputKeyDown;
|
|
117
|
+
private onTitleInputBlur;
|
|
118
|
+
private onActionsSlotChange;
|
|
119
|
+
render(): TemplateResult;
|
|
120
|
+
}
|
|
121
|
+
declare global {
|
|
122
|
+
interface HTMLElementTagNameMap {
|
|
123
|
+
'lyra-conversation-item': LyraConversationItem;
|
|
124
|
+
}
|
|
125
|
+
}
|