@aceshooting/lyra-ui 1.1.0 → 2.0.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 +12 -1
- package/custom-elements.json +21460 -8489
- package/dist/components/app-rail/app-rail.d.ts +171 -0
- package/dist/components/app-rail/app-rail.js +483 -0
- package/dist/components/app-rail/app-rail.styles.d.ts +1 -0
- package/dist/components/app-rail/app-rail.styles.js +125 -0
- package/dist/components/attachment-chip/attachment-chip.d.ts +114 -0
- package/dist/components/attachment-chip/attachment-chip.js +312 -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 +83 -0
- package/dist/components/attachment-trigger/attachment-trigger.js +258 -0
- package/dist/components/attachment-trigger/attachment-trigger.styles.d.ts +1 -0
- package/dist/components/attachment-trigger/attachment-trigger.styles.js +68 -0
- package/dist/components/chart/box-plot.js +11 -1
- 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 +12 -2
- package/dist/components/chart/chart.js +121 -14
- package/dist/components/chart/histogram-bin.d.ts +4 -1
- package/dist/components/chart/histogram-bin.js +24 -14
- package/dist/components/chart/lite-chart.d.ts +63 -0
- package/dist/components/chart/lite-chart.js +181 -23
- package/dist/components/chart/lite-chart.styles.js +9 -0
- package/dist/components/chat-composer/chat-composer.d.ts +92 -0
- package/dist/components/chat-composer/chat-composer.js +285 -0
- package/dist/components/chat-composer/chat-composer.styles.d.ts +1 -0
- package/dist/components/chat-composer/chat-composer.styles.js +135 -0
- package/dist/components/chat-message/chat-message.d.ts +113 -0
- package/dist/components/chat-message/chat-message.js +291 -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 +59 -0
- package/dist/components/checkbox/checkbox.js +230 -0
- package/dist/components/checkbox/checkbox.styles.d.ts +1 -0
- package/dist/components/checkbox/checkbox.styles.js +70 -0
- package/dist/components/chip/chip-group.d.ts +56 -0
- package/dist/components/chip/chip-group.js +124 -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 +115 -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 +300 -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 +89 -0
- package/dist/components/code-block/code-block.js +317 -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 +44 -0
- package/dist/components/code-block/code-loader.js +79 -0
- package/dist/components/combobox/combobox.d.ts +19 -1
- package/dist/components/combobox/combobox.js +84 -14
- 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 +150 -0
- package/dist/components/context-meter/context-meter.styles.d.ts +1 -0
- package/dist/components/context-meter/context-meter.styles.js +120 -0
- package/dist/components/conversation-item/conversation-item.d.ts +128 -0
- package/dist/components/conversation-item/conversation-item.js +322 -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/date-input.d.ts +24 -0
- package/dist/components/date-picker/date-input.js +134 -22
- package/dist/components/date-picker/date-picker.d.ts +7 -0
- package/dist/components/date-picker/date-picker.js +85 -16
- package/dist/components/dialog/confirm.d.ts +40 -0
- package/dist/components/dialog/confirm.js +79 -0
- package/dist/components/dialog/dialog.d.ts +85 -0
- package/dist/components/dialog/dialog.js +272 -0
- package/dist/components/dialog/dialog.styles.d.ts +1 -0
- package/dist/components/dialog/dialog.styles.js +52 -0
- package/dist/components/dock-panel/dock-panel.d.ts +134 -0
- package/dist/components/dock-panel/dock-panel.js +345 -0
- package/dist/components/dock-panel/dock-panel.styles.d.ts +1 -0
- package/dist/components/dock-panel/dock-panel.styles.js +145 -0
- package/dist/components/document-preview/document-preview.d.ts +135 -0
- package/dist/components/document-preview/document-preview.js +372 -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/export-button/csv.js +1 -1
- package/dist/components/export-button/export-button.js +2 -0
- package/dist/components/flag/flag.d.ts +42 -5
- package/dist/components/flag/flag.js +70 -3
- package/dist/components/gauge/gauge.js +19 -10
- package/dist/components/generation-status/generation-status.d.ts +109 -0
- package/dist/components/generation-status/generation-status.js +273 -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/heatmap/calendar-grid.d.ts +4 -1
- package/dist/components/heatmap/calendar-grid.js +25 -12
- package/dist/components/heatmap/heatmap-scale.d.ts +6 -0
- package/dist/components/heatmap/heatmap-scale.js +7 -1
- package/dist/components/heatmap/heatmap.d.ts +89 -3
- package/dist/components/heatmap/heatmap.js +158 -29
- package/dist/components/json-viewer/json-viewer.d.ts +53 -0
- package/dist/components/json-viewer/json-viewer.js +283 -0
- package/dist/components/json-viewer/json-viewer.styles.d.ts +1 -0
- package/dist/components/json-viewer/json-viewer.styles.js +176 -0
- package/dist/components/kbd/kbd.d.ts +77 -0
- package/dist/components/kbd/kbd.js +214 -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 +81 -0
- package/dist/components/live-region/live-region.js +153 -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 +8 -6
- package/dist/components/map/map.js +44 -8
- package/dist/components/markdown/markdown-loader.d.ts +34 -0
- package/dist/components/markdown/markdown-loader.js +43 -0
- package/dist/components/markdown/markdown.d.ts +81 -0
- package/dist/components/markdown/markdown.js +284 -0
- package/dist/components/markdown/markdown.styles.d.ts +1 -0
- package/dist/components/markdown/markdown.styles.js +82 -0
- package/dist/components/media-card/media-card.d.ts +122 -0
- package/dist/components/media-card/media-card.js +295 -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 +200 -0
- package/dist/components/mention-popover/mention-popover.js +475 -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 +62 -0
- package/dist/components/menu/menu-item.js +119 -0
- package/dist/components/menu/menu-item.styles.d.ts +1 -0
- package/dist/components/menu/menu-item.styles.js +67 -0
- package/dist/components/menu/menu.d.ts +143 -0
- package/dist/components/menu/menu.js +365 -0
- package/dist/components/menu/menu.styles.d.ts +1 -0
- package/dist/components/menu/menu.styles.js +66 -0
- package/dist/components/model-select/model-select.d.ts +125 -0
- package/dist/components/model-select/model-select.js +490 -0
- package/dist/components/model-select/model-select.styles.d.ts +1 -0
- package/dist/components/model-select/model-select.styles.js +189 -0
- package/dist/components/model-settings-panel/model-settings-panel.d.ts +69 -0
- package/dist/components/model-settings-panel/model-settings-panel.js +145 -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 +13 -1
- package/dist/components/playback/playback.js +47 -14
- package/dist/components/responsive-panel/responsive-panel.d.ts +150 -0
- package/dist/components/responsive-panel/responsive-panel.js +365 -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 +44 -0
- package/dist/components/result-card/result-card.js +83 -0
- package/dist/components/result-card/result-card.styles.d.ts +1 -0
- package/dist/components/result-card/result-card.styles.js +50 -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 +45 -1
- package/dist/components/select/select.js +114 -17
- package/dist/components/select/select.styles.js +26 -2
- package/dist/components/slider/slider.d.ts +89 -0
- package/dist/components/slider/slider.js +352 -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 +92 -0
- package/dist/components/source-card/source-card.js +148 -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 +122 -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 +27 -13
- package/dist/components/split/split.d.ts +93 -1
- package/dist/components/split/split.js +284 -15
- package/dist/components/split/split.styles.js +30 -0
- package/dist/components/stat/stat.d.ts +22 -1
- package/dist/components/stat/stat.js +49 -3
- package/dist/components/stat/stat.styles.js +20 -0
- package/dist/components/stream-status/stream-status.d.ts +110 -0
- package/dist/components/stream-status/stream-status.js +210 -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 +98 -0
- package/dist/components/streaming-text/streaming-text.js +209 -0
- package/dist/components/streaming-text/streaming-text.styles.d.ts +1 -0
- package/dist/components/streaming-text/streaming-text.styles.js +62 -0
- package/dist/components/switch/switch.d.ts +58 -0
- package/dist/components/switch/switch.js +179 -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 +73 -4
- package/dist/components/table/table.js +169 -20
- package/dist/components/table/table.styles.js +6 -1
- package/dist/components/tabs/tabs.d.ts +51 -0
- package/dist/components/tabs/tabs.js +190 -0
- package/dist/components/tabs/tabs.styles.d.ts +1 -0
- package/dist/components/tabs/tabs.styles.js +63 -0
- package/dist/components/thinking-panel/thinking-panel.d.ts +121 -0
- package/dist/components/thinking-panel/thinking-panel.js +235 -0
- package/dist/components/thinking-panel/thinking-panel.styles.d.ts +1 -0
- package/dist/components/thinking-panel/thinking-panel.styles.js +117 -0
- package/dist/components/toast/toast-item.d.ts +1 -0
- package/dist/components/toast/toast-item.js +31 -6
- package/dist/components/tool-approval-dialog/tool-approval-dialog.d.ts +130 -0
- package/dist/components/tool-approval-dialog/tool-approval-dialog.js +403 -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 +89 -0
- package/dist/components/tool-call-chip/tool-call-chip.js +288 -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 +145 -0
- package/dist/components/tool-param-form/tool-param-form.js +366 -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 +102 -0
- package/dist/components/tool-result-dialog/tool-result-dialog.js +393 -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 +81 -0
- package/dist/components/tool-result-view/registry.js +84 -0
- package/dist/components/tool-result-view/tool-result-view.d.ts +55 -0
- package/dist/components/tool-result-view/tool-result-view.js +138 -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 +439 -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 +182 -0
- package/dist/components/tree/tree-node.d.ts +11 -2
- package/dist/components/tree/tree-node.js +16 -6
- package/dist/components/tree/tree.d.ts +8 -2
- package/dist/components/tree/tree.js +18 -11
- package/dist/components/typing-indicator/typing-indicator.d.ts +60 -0
- package/dist/components/typing-indicator/typing-indicator.js +96 -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 +173 -0
- package/dist/components/virtual-list/virtual-list.js +461 -0
- package/dist/components/virtual-list/virtual-list.styles.d.ts +1 -0
- package/dist/components/virtual-list/virtual-list.styles.js +44 -0
- package/dist/components/widget/widget.d.ts +10 -0
- package/dist/components/widget/widget.js +24 -1
- package/dist/components/widget/widget.styles.js +9 -2
- package/dist/components/word-cloud/word-cloud-layout.js +14 -1
- package/dist/components/word-cloud/word-cloud.d.ts +6 -0
- package/dist/components/word-cloud/word-cloud.js +25 -14
- package/dist/components/word-cloud/word-cloud.styles.js +4 -2
- package/dist/internal/announcer.d.ts +57 -0
- package/dist/internal/announcer.js +71 -0
- package/dist/internal/form-associated.d.ts +1 -0
- package/dist/internal/form-associated.js +55 -11
- package/dist/internal/group-by-recency.d.ts +50 -0
- package/dist/internal/group-by-recency.js +80 -0
- package/dist/internal/rtl.d.ts +23 -0
- package/dist/internal/rtl.js +28 -0
- package/dist/internal/scroll-lock.d.ts +10 -5
- package/dist/internal/scroll-lock.js +30 -14
- package/dist/internal/tokens.styles.js +6 -0
- package/dist/lyra.d.ts +130 -31
- package/dist/lyra.js +94 -26
- package/llms-full.txt +3921 -32
- package/llms.txt +16 -1
- package/package.json +23 -5
- 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 -12
- package/dist/components/chart/lite-chart.stories.js +0 -98
- 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 -5
- package/dist/components/flag/flag.stories.js +0 -17
- 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 -22
- package/dist/components/heatmap/heatmap.stories.js +0 -154
- 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 -19
- package/dist/components/select/select.stories.js +0 -75
- 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 -8
- package/dist/components/stat/stat.stories.js +0 -64
- 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 -7
- package/dist/components/widget/widget.stories.js +0 -41
- package/dist/components/word-cloud/word-cloud.stories.d.ts +0 -10
- package/dist/components/word-cloud/word-cloud.stories.js +0 -55
|
@@ -75,6 +75,17 @@ function niceDomain(dataLo, dataHi, beginAtZero, count) {
|
|
|
75
75
|
* `getComputedStyle()`-based re-theming step is needed the way `chart.ts`
|
|
76
76
|
* needs one for its canvas.
|
|
77
77
|
*
|
|
78
|
+
* By default (`layout="fit"`) the plot always squeezes to the measured host
|
|
79
|
+
* width. Three independent, opt-in escape hatches for dense/aligned data:
|
|
80
|
+
* `layout="scroll"` (+ `barWidth`) gives every bar a fixed pixel width and
|
|
81
|
+
* lets the plot overflow the host horizontally (scrollable) instead of
|
|
82
|
+
* squeezing; `maxLabels` decimates which x-axis text labels render (bars
|
|
83
|
+
* always still render) once there are more categories than that; and
|
|
84
|
+
* `barX` lets a consumer hand in its own per-category x-coordinate function
|
|
85
|
+
* — e.g. to pixel-align this chart's bars with a sibling `lyra-heatmap`'s
|
|
86
|
+
* calendar columns — overriding the internal slot math for both bars and
|
|
87
|
+
* their labels. All three are additive and no-ops when left unset.
|
|
88
|
+
*
|
|
78
89
|
* @customElement lyra-lite-chart
|
|
79
90
|
* @event lyra-point-click - Fired when a bar/point is activated (click, or
|
|
80
91
|
* Enter/Space while focused). `detail: { datasetIndex: number, index:
|
|
@@ -104,8 +115,19 @@ export class LyraLiteChart extends LyraElement {
|
|
|
104
115
|
this.beginAtZero = true;
|
|
105
116
|
/** Stacks each category's bars into one segmented bar. Ignored for `type="line"`. */
|
|
106
117
|
this.stacked = false;
|
|
118
|
+
/** `'fit'` (default) squeezes the plot into the measured host width, unchanged from before this
|
|
119
|
+
* property existed. `'scroll'` gives every bar a fixed `barWidth` instead, letting the plot's
|
|
120
|
+
* content width exceed the host's — the host becomes horizontally scrollable
|
|
121
|
+
* (`overflow-x: auto`) so every bar stays exactly `barWidth` wide regardless of category count.
|
|
122
|
+
* Reflects to the `layout` attribute (e.g. for `:host([layout='scroll'])` host styling). */
|
|
123
|
+
this.layout = 'fit';
|
|
124
|
+
/** Fixed per-category bar width in px, used only when `layout="scroll"`. Ignored (as before this
|
|
125
|
+
* property existed) in `layout="fit"`, the default. */
|
|
126
|
+
this.barWidth = 32;
|
|
107
127
|
this.plotWidth = 0;
|
|
108
128
|
this.plotHeight = 0;
|
|
129
|
+
this.visible = true;
|
|
130
|
+
this.lastSignature = '';
|
|
109
131
|
}
|
|
110
132
|
static { this.styles = [LyraElement.styles, styles]; }
|
|
111
133
|
connectedCallback() {
|
|
@@ -124,11 +146,36 @@ export class LyraLiteChart extends LyraElement {
|
|
|
124
146
|
}
|
|
125
147
|
}
|
|
126
148
|
});
|
|
149
|
+
if (typeof IntersectionObserver !== 'undefined') {
|
|
150
|
+
this.intersectionObserver = new IntersectionObserver((entries) => {
|
|
151
|
+
this.visible = entries[0]?.isIntersecting ?? true;
|
|
152
|
+
});
|
|
153
|
+
this.intersectionObserver.observe(this);
|
|
154
|
+
}
|
|
155
|
+
// A reconnect re-creates the observer above but the `<svg>` render root
|
|
156
|
+
// content survives across disconnect/reconnect (Lit doesn't tear down the
|
|
157
|
+
// shadow root) — re-observe it here (firstUpdated() only ever runs once,
|
|
158
|
+
// on the very first render, so it can't be relied on for a reconnect).
|
|
159
|
+
if (this.svgEl)
|
|
160
|
+
this.resizeObserver.observe(this.svgEl);
|
|
127
161
|
}
|
|
128
162
|
disconnectedCallback() {
|
|
129
163
|
super.disconnectedCallback();
|
|
130
164
|
this.resizeObserver?.disconnect();
|
|
165
|
+
this.intersectionObserver?.disconnect();
|
|
131
166
|
}
|
|
167
|
+
// Kept (not deleted, despite the "delete it" alternative the fix brief
|
|
168
|
+
// offered): connectedCallback() fires *before* Lit's first render, so on
|
|
169
|
+
// the very first mount `this.svgEl` (a `@query('svg')`) is still
|
|
170
|
+
// undefined there and its guarded `observe()` call is a no-op — verified
|
|
171
|
+
// empirically: deleting firstUpdated() here hung every existing test that
|
|
172
|
+
// waits for the ResizeObserver's initial measurement. firstUpdated() runs
|
|
173
|
+
// once, after that first render, and is what actually arms the observer
|
|
174
|
+
// for the initial mount; connectedCallback()'s own observe() call (added
|
|
175
|
+
// above) only ever succeeds on a *reconnect*, when the shadow DOM (and
|
|
176
|
+
// svgEl) already exists from before the disconnect. Together the two
|
|
177
|
+
// cover first-mount and reconnect without ever double-observing the same
|
|
178
|
+
// element from the same callback path.
|
|
132
179
|
firstUpdated() {
|
|
133
180
|
if (this.svgEl)
|
|
134
181
|
this.resizeObserver?.observe(this.svgEl);
|
|
@@ -179,6 +226,28 @@ export class LyraLiteChart extends LyraElement {
|
|
|
179
226
|
}
|
|
180
227
|
return niceDomain(lo, hi, this.beginAtZero, TICK_COUNT);
|
|
181
228
|
}
|
|
229
|
+
computeSignature() {
|
|
230
|
+
return JSON.stringify([
|
|
231
|
+
this.type,
|
|
232
|
+
this.labels,
|
|
233
|
+
this.datasets,
|
|
234
|
+
this.legend,
|
|
235
|
+
this.xLabel,
|
|
236
|
+
this.yLabel,
|
|
237
|
+
this.beginAtZero,
|
|
238
|
+
this.stacked,
|
|
239
|
+
this.plotWidth,
|
|
240
|
+
this.plotHeight,
|
|
241
|
+
this.layout,
|
|
242
|
+
this.barWidth,
|
|
243
|
+
this.maxLabels,
|
|
244
|
+
// `tickFormat`/`barX` are functions -- JSON.stringify() silently drops
|
|
245
|
+
// function-valued entries, so (matching tickFormat's existing,
|
|
246
|
+
// pre-this-change exclusion) they can't be included here anyway; a
|
|
247
|
+
// consumer swapping one in/out post-mount should also change some
|
|
248
|
+
// other signature input, same pre-existing caveat as tickFormat.
|
|
249
|
+
]);
|
|
250
|
+
}
|
|
182
251
|
emitPoint(datasetIndex, index) {
|
|
183
252
|
const label = this.labels[index];
|
|
184
253
|
const value = this.datasets[datasetIndex]?.data[index] ?? null;
|
|
@@ -196,32 +265,43 @@ export class LyraLiteChart extends LyraElement {
|
|
|
196
265
|
const y = plotY + plotH - ((t - lo) / span) * plotH;
|
|
197
266
|
return svg `
|
|
198
267
|
<line part="grid-line" x1=${plotX} y1=${y} x2=${plotX + plotW} y2=${y}></line>
|
|
199
|
-
<text part="axis-label" x=${plotX - 6} y=${y} text-anchor="end" dominant-baseline="middle">${formatTick(t)}</text>
|
|
268
|
+
<text part="axis-label" x=${plotX - 6} y=${y} text-anchor="end" dominant-baseline="middle">${this.tickFormat ? this.tickFormat(t) : formatTick(t)}</text>
|
|
200
269
|
`;
|
|
201
270
|
});
|
|
202
271
|
}
|
|
203
|
-
|
|
272
|
+
/**
|
|
273
|
+
* `slot` is the per-category width to lay bars out against — either the
|
|
274
|
+
* measured-width-derived `plotW / n` (`layout="fit"`) or the fixed
|
|
275
|
+
* `barWidth` (`layout="scroll"`), computed once by the caller
|
|
276
|
+
* (`renderChart()`) and handed to both this method and the category-label
|
|
277
|
+
* x-position calc so the two can never drift apart from each other.
|
|
278
|
+
*/
|
|
279
|
+
renderBars(plotX, plotY, plotH, slot, lo, hi) {
|
|
204
280
|
const span = hi - lo || 1;
|
|
205
281
|
const n = this.labels.length;
|
|
206
|
-
const slot = n > 0 ? plotW / n : 0;
|
|
207
282
|
const groupCount = this.stacked ? 1 : Math.max(1, this.datasets.length);
|
|
208
283
|
const groupW = slot * (1 - BAR_GROUP_GAP);
|
|
209
284
|
const barW = (groupW - BAR_GAP * slot * (groupCount - 1)) / groupCount;
|
|
210
285
|
const bars = [];
|
|
211
286
|
for (let i = 0; i < n; i++) {
|
|
212
|
-
|
|
287
|
+
// `this.barX`, when set, overrides just the category's own x-origin
|
|
288
|
+
// (what an unset `barX` would compute as `plotX + i * slot`) -- the
|
|
289
|
+
// group-centering/per-dataset-offset math below still layers on top of
|
|
290
|
+
// it, same as it does on top of the internal formula.
|
|
291
|
+
const origin = this.barX ? this.barX(i) : plotX + i * slot;
|
|
292
|
+
const slotStart = origin + (slot - groupW) / 2;
|
|
213
293
|
let stackPos = 0; // running positive-side offset (in value units) for stacked bars
|
|
214
294
|
let stackNeg = 0; // running negative-side offset
|
|
215
295
|
this.datasets.forEach((s, di) => {
|
|
216
296
|
const v = s.data[i];
|
|
217
|
-
if (v == null)
|
|
297
|
+
if (v == null || !Number.isFinite(v))
|
|
218
298
|
return;
|
|
219
299
|
const color = this.colorFor(di, s);
|
|
220
|
-
let
|
|
300
|
+
let rectX;
|
|
221
301
|
let barValLo;
|
|
222
302
|
let barValHi;
|
|
223
303
|
if (this.stacked) {
|
|
224
|
-
|
|
304
|
+
rectX = slotStart;
|
|
225
305
|
if (v >= 0) {
|
|
226
306
|
barValLo = stackPos;
|
|
227
307
|
barValHi = stackPos + v;
|
|
@@ -234,9 +314,10 @@ export class LyraLiteChart extends LyraElement {
|
|
|
234
314
|
}
|
|
235
315
|
}
|
|
236
316
|
else {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
317
|
+
rectX = slotStart + di * (barW + BAR_GAP * slot);
|
|
318
|
+
const zeroClamped = Math.min(hi, Math.max(lo, 0));
|
|
319
|
+
barValLo = Math.min(zeroClamped, v);
|
|
320
|
+
barValHi = Math.max(zeroClamped, v);
|
|
240
321
|
}
|
|
241
322
|
const y1 = plotY + plotH - ((barValHi - lo) / span) * plotH;
|
|
242
323
|
const y2 = plotY + plotH - ((barValLo - lo) / span) * plotH;
|
|
@@ -244,7 +325,7 @@ export class LyraLiteChart extends LyraElement {
|
|
|
244
325
|
bars.push(svg `
|
|
245
326
|
<rect
|
|
246
327
|
part="bar"
|
|
247
|
-
x=${
|
|
328
|
+
x=${rectX}
|
|
248
329
|
y=${y1}
|
|
249
330
|
width=${Math.max(0, barW)}
|
|
250
331
|
height=${Math.max(0, y2 - y1)}
|
|
@@ -267,12 +348,19 @@ export class LyraLiteChart extends LyraElement {
|
|
|
267
348
|
const yFor = (v) => plotY + plotH - ((v - lo) / span) * plotH;
|
|
268
349
|
return this.datasets.map((s, di) => {
|
|
269
350
|
const color = this.colorFor(di, s);
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
351
|
+
let d = '';
|
|
352
|
+
let penDown = false;
|
|
353
|
+
s.data.forEach((v, i) => {
|
|
354
|
+
if (v == null || !Number.isFinite(v)) {
|
|
355
|
+
penDown = false;
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
const cmd = penDown ? 'L' : 'M';
|
|
359
|
+
d += `${cmd}${xFor(i)},${yFor(v)} `;
|
|
360
|
+
penDown = true;
|
|
361
|
+
});
|
|
274
362
|
const dots = s.data.map((v, i) => {
|
|
275
|
-
if (v == null)
|
|
363
|
+
if (v == null || !Number.isFinite(v))
|
|
276
364
|
return nothing;
|
|
277
365
|
const label = this.labels[i];
|
|
278
366
|
return svg `
|
|
@@ -290,32 +378,84 @@ export class LyraLiteChart extends LyraElement {
|
|
|
290
378
|
><title>${s.label} — ${label}: ${v}</title></circle>
|
|
291
379
|
`;
|
|
292
380
|
});
|
|
293
|
-
return svg `<path part="line" d=${d} stroke=${color}></path>${dots}`;
|
|
381
|
+
return svg `<path part="line" d=${d.trim()} stroke=${color}></path>${dots}`;
|
|
294
382
|
});
|
|
295
383
|
}
|
|
296
384
|
render() {
|
|
297
|
-
|
|
385
|
+
if (!this.visible && this.lastResult)
|
|
386
|
+
return this.lastResult;
|
|
387
|
+
const signature = this.computeSignature();
|
|
388
|
+
if (signature === this.lastSignature && this.lastResult)
|
|
389
|
+
return this.lastResult;
|
|
390
|
+
this.lastSignature = signature;
|
|
391
|
+
const result = this.renderChart();
|
|
392
|
+
this.lastResult = result;
|
|
393
|
+
return result;
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Step size for `maxLabels` decimation: 1 (show every label, today's
|
|
397
|
+
* unchanged default) when `maxLabels` is unset or already >= the label
|
|
398
|
+
* count, otherwise the ceil-divide spacing that lands close to
|
|
399
|
+
* `maxLabels` shown labels while always keeping index 0 and the last
|
|
400
|
+
* index (enforced by the caller, not here).
|
|
401
|
+
*/
|
|
402
|
+
labelStep(n) {
|
|
403
|
+
const max = this.maxLabels;
|
|
404
|
+
if (max == null || n <= max)
|
|
405
|
+
return 1;
|
|
406
|
+
return Math.max(1, Math.ceil((n - 1) / Math.max(1, max - 1)));
|
|
407
|
+
}
|
|
408
|
+
renderChart() {
|
|
409
|
+
const n = this.labels.length;
|
|
298
410
|
const h = this.plotHeight || 200;
|
|
299
411
|
const padLeft = PAD_LEFT + (this.yLabel ? AXIS_TITLE_SPACE : 0);
|
|
300
412
|
const padBottom = PAD_BOTTOM + (this.xLabel ? AXIS_TITLE_SPACE : 0);
|
|
301
413
|
const plotX = padLeft;
|
|
302
414
|
const plotY = PAD_TOP;
|
|
303
|
-
const plotW = Math.max(0, w - padLeft - PAD_RIGHT);
|
|
304
415
|
const plotH = Math.max(0, h - plotY - padBottom);
|
|
416
|
+
let w;
|
|
417
|
+
let plotW;
|
|
418
|
+
let slot;
|
|
419
|
+
if (this.layout === 'scroll') {
|
|
420
|
+
// Fixed-width bars: content width is driven by category count ×
|
|
421
|
+
// barWidth instead of the measured host width, and CAN exceed it --
|
|
422
|
+
// the svg gets an explicit inline-size below (not 100%) and
|
|
423
|
+
// `:host([layout='scroll']) [part='base']` (lite-chart.styles.ts)
|
|
424
|
+
// turns on `overflow-x: auto` so the host scrolls to reveal the rest.
|
|
425
|
+
slot = this.barWidth;
|
|
426
|
+
plotW = Math.max(0, n * slot);
|
|
427
|
+
w = plotX + plotW + PAD_RIGHT;
|
|
428
|
+
}
|
|
429
|
+
else {
|
|
430
|
+
// 'fit' (default): squeeze to the measured host width, byte-for-byte
|
|
431
|
+
// the same computation as before `layout` existed.
|
|
432
|
+
w = this.plotWidth || 400;
|
|
433
|
+
plotW = Math.max(0, w - plotX - PAD_RIGHT);
|
|
434
|
+
slot = n > 0 ? plotW / n : 0;
|
|
435
|
+
}
|
|
305
436
|
const { lo, hi, ticks } = this.domain();
|
|
306
437
|
const grid = this.renderGrid(plotX, plotY, plotW, plotH, ticks, lo, hi);
|
|
307
438
|
const marks = this.type === 'bar'
|
|
308
|
-
? this.renderBars(plotX, plotY,
|
|
439
|
+
? this.renderBars(plotX, plotY, plotH, slot, lo, hi)
|
|
309
440
|
: this.renderLines(plotX, plotY, plotW, plotH, lo, hi);
|
|
441
|
+
const step = this.labelStep(n);
|
|
310
442
|
const categoryLabels = this.labels.map((label, i) => {
|
|
311
|
-
|
|
312
|
-
|
|
443
|
+
if (i !== 0 && i !== n - 1 && i % step !== 0)
|
|
444
|
+
return nothing; // maxLabels decimation
|
|
445
|
+
const x = this.type === 'bar' && n > 0
|
|
446
|
+
? (this.barX ? this.barX(i) : plotX + i * slot) + slot / 2 // matches renderBars()'s own per-category slot center (or the barX override, when set)
|
|
447
|
+
: plotX + (n > 1 ? (i / (n - 1)) * plotW : plotW / 2);
|
|
313
448
|
return svg `<text part="axis-label" x=${x} y=${plotY + plotH + 14} text-anchor="middle">${label}</text>`;
|
|
314
449
|
});
|
|
315
450
|
const chartLabel = this.datasets.map((d) => d.label).join(', ') || 'Chart';
|
|
316
451
|
return html `
|
|
317
452
|
<div part="base">
|
|
318
|
-
<svg
|
|
453
|
+
<svg
|
|
454
|
+
viewBox="0 0 ${w} ${h}"
|
|
455
|
+
style=${this.layout === 'scroll' ? `inline-size: ${w}px` : nothing}
|
|
456
|
+
role="group"
|
|
457
|
+
aria-label=${chartLabel}
|
|
458
|
+
>
|
|
319
459
|
${grid}
|
|
320
460
|
${categoryLabels}
|
|
321
461
|
${marks}
|
|
@@ -367,12 +507,30 @@ __decorate([
|
|
|
367
507
|
__decorate([
|
|
368
508
|
property({ type: Boolean })
|
|
369
509
|
], LyraLiteChart.prototype, "stacked", void 0);
|
|
510
|
+
__decorate([
|
|
511
|
+
property({ attribute: false })
|
|
512
|
+
], LyraLiteChart.prototype, "tickFormat", void 0);
|
|
513
|
+
__decorate([
|
|
514
|
+
property({ reflect: true })
|
|
515
|
+
], LyraLiteChart.prototype, "layout", void 0);
|
|
516
|
+
__decorate([
|
|
517
|
+
property({ type: Number, attribute: 'bar-width' })
|
|
518
|
+
], LyraLiteChart.prototype, "barWidth", void 0);
|
|
519
|
+
__decorate([
|
|
520
|
+
property({ type: Number, attribute: 'max-labels' })
|
|
521
|
+
], LyraLiteChart.prototype, "maxLabels", void 0);
|
|
522
|
+
__decorate([
|
|
523
|
+
property({ attribute: false })
|
|
524
|
+
], LyraLiteChart.prototype, "barX", void 0);
|
|
370
525
|
__decorate([
|
|
371
526
|
state()
|
|
372
527
|
], LyraLiteChart.prototype, "plotWidth", void 0);
|
|
373
528
|
__decorate([
|
|
374
529
|
state()
|
|
375
530
|
], LyraLiteChart.prototype, "plotHeight", void 0);
|
|
531
|
+
__decorate([
|
|
532
|
+
state()
|
|
533
|
+
], LyraLiteChart.prototype, "visible", void 0);
|
|
376
534
|
__decorate([
|
|
377
535
|
query('svg')
|
|
378
536
|
], LyraLiteChart.prototype, "svgEl", void 0);
|
|
@@ -23,6 +23,15 @@ export const styles = css `
|
|
|
23
23
|
flex-direction: column;
|
|
24
24
|
gap: var(--lyra-space-xs);
|
|
25
25
|
}
|
|
26
|
+
/* layout="scroll": the svg below gets an explicit inline-size (its
|
|
27
|
+
computed content width, set inline per-render since it depends on
|
|
28
|
+
category count/barWidth) instead of the 100% below, and can end up
|
|
29
|
+
wider than this container -- scroll to reveal the rest instead of
|
|
30
|
+
squeezing. Scoped strictly to the reflected [layout='scroll'] attribute
|
|
31
|
+
so layout="fit" (the default) never triggers this rule. */
|
|
32
|
+
:host([layout='scroll']) [part='base'] {
|
|
33
|
+
overflow-x: auto;
|
|
34
|
+
}
|
|
26
35
|
svg {
|
|
27
36
|
flex: 1 1 auto;
|
|
28
37
|
inline-size: 100%;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { type TemplateResult, type PropertyValues } from 'lit';
|
|
2
|
+
import { LyraElement } from '../../internal/lyra-element.js';
|
|
3
|
+
export type ChatComposerStatus = 'idle' | 'sending' | 'streaming';
|
|
4
|
+
declare const LyraChatComposer_base: typeof LyraElement & (new (...args: any[]) => import("../../internal/form-associated.js").FormAssociatedInterface);
|
|
5
|
+
/**
|
|
6
|
+
* `<lyra-chat-composer>` — the message input for a chat/agent conversation
|
|
7
|
+
* surface: an auto-resizing textarea plus a send/stop button. Form-
|
|
8
|
+
* associated via the `FormAssociated` mixin (see `<lyra-date-input>` for the
|
|
9
|
+
* same shape), so it participates in native `<form>` submission/validation/
|
|
10
|
+
* reset like any other text control — `name`/`value`/`disabled`/`required`/
|
|
11
|
+
* `checkValidity()`/`reportValidity()` all come from that mixin.
|
|
12
|
+
*
|
|
13
|
+
* Auto-resize reads the textarea's own *computed* line-height/padding/
|
|
14
|
+
* border at runtime (`resizeTextarea()`) rather than assuming a fixed
|
|
15
|
+
* px-per-row constant, so it stays correct under a consumer's own font-size/
|
|
16
|
+
* line-height overrides. It grows between `min-rows` and `max-rows`, then
|
|
17
|
+
* switches to internal scrolling.
|
|
18
|
+
*
|
|
19
|
+
* Enter-to-send (only active while `submit-on-enter` is true, the default):
|
|
20
|
+
* plain Enter submits and is prevented from inserting a newline; Shift+Enter
|
|
21
|
+
* always inserts a newline no matter what; an IME composition step (checked
|
|
22
|
+
* via `isComposing`, with `keyCode === 229` as a defense-in-depth fallback
|
|
23
|
+
* for browsers that report `isComposing` inconsistently on the
|
|
24
|
+
* compositionend-adjacent keydown) is never treated as a submit trigger;
|
|
25
|
+
* and while `status` isn't `"idle"` Enter is left alone to insert a newline
|
|
26
|
+
* too, rather than trying to submit again -- there is nothing meaningful to
|
|
27
|
+
* submit while a previous message is still sending/streaming, and the
|
|
28
|
+
* textarea deliberately stays interactive (see `disabled` below) so a user
|
|
29
|
+
* can keep composing their next message in the meantime.
|
|
30
|
+
*
|
|
31
|
+
* `lyra-submit`'s `detail.value` is always the exact, untrimmed current
|
|
32
|
+
* value (`detail.value === value` at the moment it fires) -- trimming is
|
|
33
|
+
* left to the consumer so it never silently diverges from what `value`
|
|
34
|
+
* itself reports. Submitting does not clear `value`; the consumer clears it
|
|
35
|
+
* once the submission has actually been accepted (so e.g. a failed send can
|
|
36
|
+
* leave the text in place for retry).
|
|
37
|
+
*
|
|
38
|
+
* @customElement lyra-chat-composer
|
|
39
|
+
* @slot leading - Content rendered before the textarea (e.g. an attach-file trigger button).
|
|
40
|
+
* @slot chips - An attachment tray rendered above the input row (e.g. files queued for this message).
|
|
41
|
+
* @slot trailing - Overrides the built-in send/stop button entirely when it has assigned content.
|
|
42
|
+
* @event lyra-input - Fired on every user-driven edit of the textarea (not a programmatic `.value` assignment). `detail: { value }`.
|
|
43
|
+
* @event lyra-submit - Fired by Enter (per `submit-on-enter`) or the built-in button while `status="idle"`. `detail: { value }`.
|
|
44
|
+
* @event lyra-stop - Fired by the built-in button while `status` is `"sending"` or `"streaming"`. No detail.
|
|
45
|
+
* @csspart base - The bordered root container.
|
|
46
|
+
* @csspart chips - The wrapper around the `chips` slot. Hidden entirely when the slot is empty.
|
|
47
|
+
* @csspart row - The row holding the leading slot, textarea, and trailing slot/button.
|
|
48
|
+
* @csspart leading - The wrapper around the `leading` slot. Hidden entirely when the slot is empty.
|
|
49
|
+
* @csspart textarea - The auto-resizing `<textarea>` itself.
|
|
50
|
+
* @csspart trailing - The wrapper around the `trailing` slot and the built-in `action-button`.
|
|
51
|
+
* @csspart action-button - The built-in send/stop button. Absent from the accessibility tree's meaningful content whenever `trailing` has assigned content. Style its busy treatment via `:host([status='sending'])`/`:host([status='streaming'])`.
|
|
52
|
+
*/
|
|
53
|
+
export declare class LyraChatComposer extends LyraChatComposer_base {
|
|
54
|
+
static styles: import("lit").CSSResultGroup[];
|
|
55
|
+
placeholder: string;
|
|
56
|
+
minRows: number;
|
|
57
|
+
maxRows: number;
|
|
58
|
+
status: ChatComposerStatus;
|
|
59
|
+
submitOnEnter: boolean;
|
|
60
|
+
private hasLeadingSlot;
|
|
61
|
+
private hasChipsSlot;
|
|
62
|
+
private hasTrailingSlot;
|
|
63
|
+
private textareaEl?;
|
|
64
|
+
protected willUpdate(): void;
|
|
65
|
+
protected firstUpdated(changed: PropertyValues): void;
|
|
66
|
+
protected updated(changed: PropertyValues): void;
|
|
67
|
+
private hasSlotted;
|
|
68
|
+
/**
|
|
69
|
+
* Grows/shrinks the textarea between `min-rows` and `max-rows`, reading
|
|
70
|
+
* the *computed* line-height/padding/border back out of the element at
|
|
71
|
+
* call time instead of assuming a fixed px-per-row figure -- correct
|
|
72
|
+
* whatever font-size/line-height a consumer's own CSS ends up applying.
|
|
73
|
+
* Past `max-rows` the box stops growing and switches to internal
|
|
74
|
+
* scrolling (`overflow-y: auto`).
|
|
75
|
+
*/
|
|
76
|
+
private resizeTextarea;
|
|
77
|
+
private onTextareaInput;
|
|
78
|
+
private onTextareaKeyDown;
|
|
79
|
+
private onActionClick;
|
|
80
|
+
private submit;
|
|
81
|
+
private onLeadingSlotChange;
|
|
82
|
+
private onChipsSlotChange;
|
|
83
|
+
private onTrailingSlotChange;
|
|
84
|
+
private renderActionButton;
|
|
85
|
+
render(): TemplateResult;
|
|
86
|
+
}
|
|
87
|
+
declare global {
|
|
88
|
+
interface HTMLElementTagNameMap {
|
|
89
|
+
'lyra-chat-composer': LyraChatComposer;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
export {};
|