@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,210 @@
|
|
|
1
|
+
import { type TemplateResult, type PropertyValues } from 'lit';
|
|
2
|
+
import { LyraElement } from '../../internal/lyra-element.js';
|
|
3
|
+
/** Largest accepted overscan on either side of the visible range. This keeps
|
|
4
|
+
* an accidental huge value from defeating virtualization. */
|
|
5
|
+
export declare const MAX_OVERSCAN_ROWS = 100;
|
|
6
|
+
/** `lyra-visible-range-changed` detail -- the current visible (non-overscanned) item index range. */
|
|
7
|
+
export interface VirtualListRange {
|
|
8
|
+
start: number;
|
|
9
|
+
end: number;
|
|
10
|
+
}
|
|
11
|
+
/** A visible group label anchored to the first row in its group. */
|
|
12
|
+
export interface VirtualListGroup {
|
|
13
|
+
key: string | number;
|
|
14
|
+
label?: string;
|
|
15
|
+
startIndex: number;
|
|
16
|
+
}
|
|
17
|
+
type VirtualListKey = string | number;
|
|
18
|
+
/**
|
|
19
|
+
* `<lyra-virtual-list>` — a generic windowed/virtualized list host. Renders
|
|
20
|
+
* only the items within the current viewport (plus `overscan` padding rows
|
|
21
|
+
* on each side) as real DOM, regardless of how large `items` is, so a
|
|
22
|
+
* multi-thousand-row chat history sidebar or long message thread stays cheap
|
|
23
|
+
* to scroll.
|
|
24
|
+
*
|
|
25
|
+
* Content is entirely caller-supplied: `renderItem(item, index)` returns
|
|
26
|
+
* whatever `lit-html` value should represent that row (typically a
|
|
27
|
+
* `TemplateResult`), and `keyFunction(item, index)` gives it a stable
|
|
28
|
+
* identity for `repeat()`'s DOM-reconciliation key, so scroll position and
|
|
29
|
+
* any per-row state (e.g. an `<audio>` element's playback position) survive
|
|
30
|
+
* an `items` mutation instead of every row remounting from scratch.
|
|
31
|
+
*
|
|
32
|
+
* **Windowing math.** Every row — in both `row-height` modes — is positioned
|
|
33
|
+
* by a `transform: translateY(offset)` computed from a single cumulative
|
|
34
|
+
* `offsets` array (`offsets[i]` = the pixel top of row `i`), rather than by
|
|
35
|
+
* page flow. This is what lets only a small DOM window exist while the
|
|
36
|
+
* scrollbar still reflects the *true* total content height:
|
|
37
|
+
* - **`row-height="auto"` (default).** Each currently-rendered row is
|
|
38
|
+
* watched by a `ResizeObserver`; its real height lands in a per-key
|
|
39
|
+
* `Map`, and any row not yet measured contributes `DEFAULT_ROW_ESTIMATE_PX`
|
|
40
|
+
* to the offsets array until it has been. `offsets` is *not* the same
|
|
41
|
+
* thing as a page-count-based `padding-top`/`padding-bottom` spacer pair —
|
|
42
|
+
* that approach reflows every unmeasured row's position on every new
|
|
43
|
+
* measurement, which is exactly what per-row transform offsets avoid: only
|
|
44
|
+
* the rows *after* a newly-measured one shift, and even that shift is a
|
|
45
|
+
* cheap style recompute, not a layout-affecting padding change.
|
|
46
|
+
* - **Fixed numeric `row-height`.** No measurement needed — `offsets[i]` is
|
|
47
|
+
* just `i * rowHeightPx`, computed by the exact same cumulative-array code
|
|
48
|
+
* path (a dedicated "single spacer + start-index" special case was
|
|
49
|
+
* considered and would work too, but reusing one code path for both modes
|
|
50
|
+
* avoids maintaining two parallel rendering strategies for a difference
|
|
51
|
+
* that's otherwise just "how is row *i*'s height looked up").
|
|
52
|
+
*
|
|
53
|
+
* The `offsets` array is rebuilt only when `items`, `row-height`, or
|
|
54
|
+
* `keyFunction` change, or a row's measured height changes -- not on every
|
|
55
|
+
* update, so a pure scroll-position tick (potentially every rAF while
|
|
56
|
+
* scrolling) only re-runs the cheap range/visibility math in
|
|
57
|
+
* `computeRange()`, never the `O(n)` offsets rebuild (which, in
|
|
58
|
+
* `row-height="auto"` mode, also means a `keyFunction` call per item). For
|
|
59
|
+
* the list sizes this component is meant for (a scrollable history sidebar,
|
|
60
|
+
* realistically hundreds to a few thousand rows) that rebuild is a trivial
|
|
61
|
+
* `O(n)` arithmetic loop even when it does run; it is *not* the right
|
|
62
|
+
* approach for a hundred-thousand-row list without further work (e.g. a
|
|
63
|
+
* Fenwick/segment tree for `O(log n)` offset queries+updates), which is out
|
|
64
|
+
* of scope here.
|
|
65
|
+
*
|
|
66
|
+
* **Accessibility.** The scroll container is `role="list"` and each rendered
|
|
67
|
+
* row is `role="listitem"`, deliberately *not* `listbox`/`option` — this
|
|
68
|
+
* component only provides windowing, not the roving-tabindex/
|
|
69
|
+
* `aria-activedescendant` keyboard-interaction contract ARIA requires
|
|
70
|
+
* alongside a real `listbox`. A consumer that wants full single-select
|
|
71
|
+
* listbox semantics on top of this should compose that behavior itself (see
|
|
72
|
+
* `<lyra-select>`'s pattern), the same way this component's `active-id`
|
|
73
|
+
* only *scrolls* the matching row into view and marks it `aria-current` —
|
|
74
|
+
* it never claims to be a selection widget. `aria-setsize`/`aria-posinset`
|
|
75
|
+
* are computed from the row's real index in the full `items` array (not its
|
|
76
|
+
* position among the currently-rendered DOM window), so a screen reader
|
|
77
|
+
* still announces e.g. "item 12 of 340" correctly. `[part="base"]` itself
|
|
78
|
+
* carries `tabindex="0"` — `renderItem`'s content is caller-supplied and not
|
|
79
|
+
* guaranteed to contain a focusable element, and a scrollable region with no
|
|
80
|
+
* focusable content of its own is otherwise unreachable by keyboard (native
|
|
81
|
+
* arrow/Page Up/Page Down scrolling included).
|
|
82
|
+
*
|
|
83
|
+
* **Grouping.** When supplied, `groups` renders a labeled group marker at the
|
|
84
|
+
* corresponding `startIndex`. Group markers are positioned independently of
|
|
85
|
+
* the row window, so they remain available when the first row in a group is
|
|
86
|
+
* outside the current overscanned range.
|
|
87
|
+
*
|
|
88
|
+
* @customElement lyra-virtual-list
|
|
89
|
+
* @event lyra-load-more - Fired once per approach to the bottom of the list
|
|
90
|
+
* while `has-more` is true and `loading` is false. Deliberately does not
|
|
91
|
+
* refire on every scroll tick while still near the bottom (`loading`
|
|
92
|
+
* gates the in-flight case; scrolling back away from the bottom and
|
|
93
|
+
* returning, or `items` growing enough to move the window away from the
|
|
94
|
+
* end, re-arms it) — a consumer wanting an automatic retry after a failed
|
|
95
|
+
* fetch should surface its own retry affordance rather than relying on
|
|
96
|
+
* this firing again unprompted.
|
|
97
|
+
* @event lyra-visible-range-changed - `detail: { start, end }` (see
|
|
98
|
+
* `VirtualListRange`) — the current visible (non-overscanned) item index
|
|
99
|
+
* range, fired only when it actually changes.
|
|
100
|
+
* @csspart base - The scrollable container (`role="list"`).
|
|
101
|
+
* @csspart spacer - The full-content-height inner element that gives the
|
|
102
|
+
* container its true scrollable extent.
|
|
103
|
+
* @csspart group - A positioned group label.
|
|
104
|
+
* @csspart row - One rendered row's absolutely-positioned wrapper
|
|
105
|
+
* (`role="listitem"`); `renderItem`'s return value renders inside it.
|
|
106
|
+
*/
|
|
107
|
+
export declare class LyraVirtualList extends LyraElement {
|
|
108
|
+
static styles: import("lit").CSSResultGroup[];
|
|
109
|
+
/** The full (non-windowed) item collection. */
|
|
110
|
+
items: unknown[];
|
|
111
|
+
/** Renders one row's content — typically returns a `lit-html` `TemplateResult`. */
|
|
112
|
+
renderItem: (item: unknown, index: number) => unknown;
|
|
113
|
+
/** Derives a row's stable `repeat()` key. Falls back to the item's index
|
|
114
|
+
* in `items` when omitted, which is only a safe identity while `items`
|
|
115
|
+
* never reorders/inserts/removes — provide this whenever it can, or
|
|
116
|
+
* scroll position and any per-row DOM state can attach to the wrong row
|
|
117
|
+
* across a mutation (same caveat as `<lyra-table>`'s `rowKey`). */
|
|
118
|
+
keyFunction?: (item: unknown, index: number) => string | number;
|
|
119
|
+
/** Group labels positioned at their first row's `startIndex`. Invalid or
|
|
120
|
+
* duplicate indexes are ignored during rendering. */
|
|
121
|
+
groups?: VirtualListGroup[];
|
|
122
|
+
/** `'auto'` (default) measures each row's real height via `ResizeObserver`;
|
|
123
|
+
* a numeric string fixes every row to that many pixels. */
|
|
124
|
+
rowHeight: string;
|
|
125
|
+
/** Extra rows rendered beyond the visible viewport on each side, to reduce
|
|
126
|
+
* blank-frame risk during fast scrolling. Normalized to a whole number in
|
|
127
|
+
* the inclusive range 0–`MAX_OVERSCAN_ROWS`; non-finite values use the
|
|
128
|
+
* default. */
|
|
129
|
+
overscan: number;
|
|
130
|
+
/** When set and it matches a row's typed `keyFunction` result, that row is
|
|
131
|
+
* smoothly scrolled into view whenever this changes. Attribute values are
|
|
132
|
+
* strings; assign the property for a numeric key. */
|
|
133
|
+
activeId: VirtualListKey | '';
|
|
134
|
+
loading: boolean;
|
|
135
|
+
/** When true, scrolling near the bottom fires `lyra-load-more`. */
|
|
136
|
+
hasMore: boolean;
|
|
137
|
+
private containerScrollTop;
|
|
138
|
+
private viewportHeight;
|
|
139
|
+
/** `offsets[i]` = row `i`'s pixel top; `offsets[items.length]` = total content height. Rebuilt only when `offsetsDirty` is set -- see `willUpdate()`. */
|
|
140
|
+
private offsets;
|
|
141
|
+
/** Parsed `rowHeight`: a positive pixel number, or `null` for `'auto'` (measured) mode. */
|
|
142
|
+
private fixedRowHeight;
|
|
143
|
+
/** `row-height="auto"` per-row measured heights, keyed by
|
|
144
|
+
* keyFunction result. Pruned to the current `items`'
|
|
145
|
+
* live keys whenever `items` changes (see `recomputeOffsets()`), so a
|
|
146
|
+
* long-lived instance handed many wholly different `items` arrays over
|
|
147
|
+
* its life doesn't grow this map without bound. */
|
|
148
|
+
private readonly measuredHeights;
|
|
149
|
+
/** True whenever `offsets` needs rebuilding before the next render --
|
|
150
|
+
* set initially and whenever `items`/`rowHeight`/`keyFunction` change or
|
|
151
|
+
* a row's measured height changes, but *not* on a pure scroll-position
|
|
152
|
+
* update, so the `O(n)` rebuild (including a `keyFunction` call per item
|
|
153
|
+
* in `row-height="auto"` mode) only runs when something that actually
|
|
154
|
+
* affects row heights or ordering changed. */
|
|
155
|
+
private offsetsDirty;
|
|
156
|
+
/** Set alongside `offsetsDirty` specifically when `items` changed (not
|
|
157
|
+
* just `rowHeight`/`keyFunction`/a measurement) -- consumed by the next
|
|
158
|
+
* `recomputeOffsets()` call to prune `measuredHeights` entries for keys
|
|
159
|
+
* no longer present in `items`. */
|
|
160
|
+
private itemsChangedPendingPrune;
|
|
161
|
+
private renderStart;
|
|
162
|
+
private renderEnd;
|
|
163
|
+
private visibleStart;
|
|
164
|
+
private visibleEnd;
|
|
165
|
+
private lastEmittedStart;
|
|
166
|
+
private lastEmittedEnd;
|
|
167
|
+
/** Re-armed whenever the window moves away from the end of `items` -- see the `lyra-load-more` event doc. */
|
|
168
|
+
private loadMoreArmed;
|
|
169
|
+
private isFirstUpdate;
|
|
170
|
+
private rowResizeObserver?;
|
|
171
|
+
private containerResizeObserver?;
|
|
172
|
+
private readonly observedRows;
|
|
173
|
+
private readonly observedRowKeys;
|
|
174
|
+
private readonly observedRowIndices;
|
|
175
|
+
private scrollRafId?;
|
|
176
|
+
private pendingScrollTop;
|
|
177
|
+
connectedCallback(): void;
|
|
178
|
+
disconnectedCallback(): void;
|
|
179
|
+
firstUpdated(): void;
|
|
180
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
181
|
+
protected updated(changed: PropertyValues): void;
|
|
182
|
+
private parseRowHeight;
|
|
183
|
+
private keyOf;
|
|
184
|
+
private recomputeOffsets;
|
|
185
|
+
/** First item index whose bottom edge is at/after `offset`. */
|
|
186
|
+
private findIndexAtOrAfter;
|
|
187
|
+
/** Last item index whose top edge is at/before `offset`. */
|
|
188
|
+
private findIndexAtOrBefore;
|
|
189
|
+
private computeRange;
|
|
190
|
+
private attachContainerListeners;
|
|
191
|
+
private onScroll;
|
|
192
|
+
private onRowsResized;
|
|
193
|
+
/** Keeps the row `ResizeObserver` watching exactly the currently-rendered
|
|
194
|
+
* rows in `row-height="auto"` mode -- rows that scroll out of the
|
|
195
|
+
* rendered window are unobserved so the observer doesn't accumulate
|
|
196
|
+
* references to detached elements it can never usefully report on again. */
|
|
197
|
+
private syncRowObservers;
|
|
198
|
+
private scrollActiveIntoView;
|
|
199
|
+
private emitRangeChangeIfNeeded;
|
|
200
|
+
private maybeFireLoadMore;
|
|
201
|
+
private renderRow;
|
|
202
|
+
private renderGroups;
|
|
203
|
+
render(): TemplateResult;
|
|
204
|
+
}
|
|
205
|
+
declare global {
|
|
206
|
+
interface HTMLElementTagNameMap {
|
|
207
|
+
'lyra-virtual-list': LyraVirtualList;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
export {};
|