@aceshooting/lyra-ui 2.3.0 → 2.5.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 +32 -3
- package/custom-elements.json +552 -90
- package/dist/components/app-rail/app-rail-item.class.d.ts.map +1 -1
- package/dist/components/app-rail/app-rail-item.class.js +6 -1
- package/dist/components/app-rail/app-rail-item.class.js.map +1 -1
- package/dist/components/app-rail/app-rail.class.js +1 -1
- package/dist/components/app-rail/app-rail.class.js.map +1 -1
- package/dist/components/attachment-chip/attachment-chip.class.d.ts +9 -1
- package/dist/components/attachment-chip/attachment-chip.class.d.ts.map +1 -1
- package/dist/components/attachment-chip/attachment-chip.class.js +31 -9
- package/dist/components/attachment-chip/attachment-chip.class.js.map +1 -1
- package/dist/components/attachment-trigger/attachment-trigger.class.d.ts +4 -4
- package/dist/components/attachment-trigger/attachment-trigger.class.d.ts.map +1 -1
- package/dist/components/attachment-trigger/attachment-trigger.class.js +8 -7
- package/dist/components/attachment-trigger/attachment-trigger.class.js.map +1 -1
- package/dist/components/avatar/avatar.class.d.ts +26 -12
- package/dist/components/avatar/avatar.class.d.ts.map +1 -1
- package/dist/components/avatar/avatar.class.js +60 -13
- package/dist/components/avatar/avatar.class.js.map +1 -1
- package/dist/components/avatar/avatar.styles.d.ts.map +1 -1
- package/dist/components/avatar/avatar.styles.js +16 -1
- package/dist/components/avatar/avatar.styles.js.map +1 -1
- package/dist/components/chart/box-plot.class.d.ts.map +1 -1
- package/dist/components/chart/box-plot.class.js +26 -14
- package/dist/components/chart/box-plot.class.js.map +1 -1
- package/dist/components/chart/chart.class.d.ts.map +1 -1
- package/dist/components/chart/chart.class.js +24 -9
- package/dist/components/chart/chart.class.js.map +1 -1
- package/dist/components/chart/histogram.class.d.ts +1 -0
- package/dist/components/chart/histogram.class.d.ts.map +1 -1
- package/dist/components/chart/histogram.class.js +8 -2
- package/dist/components/chart/histogram.class.js.map +1 -1
- package/dist/components/chart/lite-chart.class.d.ts +5 -3
- package/dist/components/chart/lite-chart.class.d.ts.map +1 -1
- package/dist/components/chart/lite-chart.class.js +27 -18
- package/dist/components/chart/lite-chart.class.js.map +1 -1
- package/dist/components/chart/lite-chart.d.ts +1 -0
- package/dist/components/chart/lite-chart.d.ts.map +1 -1
- package/dist/components/chart/lite-chart.js +1 -0
- package/dist/components/chart/lite-chart.js.map +1 -1
- package/dist/components/chart/lite-chart.styles.js +7 -7
- package/dist/components/chat-composer/chat-composer.class.d.ts +6 -1
- package/dist/components/chat-composer/chat-composer.class.d.ts.map +1 -1
- package/dist/components/chat-composer/chat-composer.class.js +18 -6
- package/dist/components/chat-composer/chat-composer.class.js.map +1 -1
- package/dist/components/chat-message/chat-message.class.d.ts +1 -0
- package/dist/components/chat-message/chat-message.class.d.ts.map +1 -1
- package/dist/components/chat-message/chat-message.class.js +12 -11
- package/dist/components/chat-message/chat-message.class.js.map +1 -1
- package/dist/components/chat-message/chat-message.styles.d.ts.map +1 -1
- package/dist/components/chat-message/chat-message.styles.js +15 -0
- package/dist/components/chat-message/chat-message.styles.js.map +1 -1
- package/dist/components/checkbox/checkbox.class.d.ts.map +1 -1
- package/dist/components/checkbox/checkbox.class.js +1 -1
- package/dist/components/checkbox/checkbox.class.js.map +1 -1
- package/dist/components/chip/chip-group.class.d.ts +4 -1
- package/dist/components/chip/chip-group.class.d.ts.map +1 -1
- package/dist/components/chip/chip-group.class.js +3 -1
- package/dist/components/chip/chip-group.class.js.map +1 -1
- package/dist/components/chip/chip.class.d.ts +31 -13
- package/dist/components/chip/chip.class.d.ts.map +1 -1
- package/dist/components/chip/chip.class.js +46 -18
- package/dist/components/chip/chip.class.js.map +1 -1
- package/dist/components/citation-badge/citation-badge.class.d.ts +5 -1
- package/dist/components/citation-badge/citation-badge.class.d.ts.map +1 -1
- package/dist/components/citation-badge/citation-badge.class.js +15 -12
- package/dist/components/citation-badge/citation-badge.class.js.map +1 -1
- package/dist/components/code-block/code-block-core.class.d.ts +3 -0
- package/dist/components/code-block/code-block-core.class.d.ts.map +1 -1
- package/dist/components/code-block/code-block-core.class.js +4 -3
- package/dist/components/code-block/code-block-core.class.js.map +1 -1
- package/dist/components/code-block/code-block-shared.d.ts +18 -0
- package/dist/components/code-block/code-block-shared.d.ts.map +1 -0
- package/dist/components/code-block/code-block-shared.js +21 -0
- package/dist/components/code-block/code-block-shared.js.map +1 -0
- package/dist/components/code-block/code-block.class.d.ts +3 -0
- package/dist/components/code-block/code-block.class.d.ts.map +1 -1
- package/dist/components/code-block/code-block.class.js +4 -3
- package/dist/components/code-block/code-block.class.js.map +1 -1
- package/dist/components/code-block/code-block.styles.d.ts.map +1 -1
- package/dist/components/code-block/code-block.styles.js +9 -0
- package/dist/components/code-block/code-block.styles.js.map +1 -1
- package/dist/components/combobox/combobox.class.d.ts +3 -2
- package/dist/components/combobox/combobox.class.d.ts.map +1 -1
- package/dist/components/combobox/combobox.class.js +15 -13
- package/dist/components/combobox/combobox.class.js.map +1 -1
- package/dist/components/combobox/combobox.styles.d.ts.map +1 -1
- package/dist/components/combobox/combobox.styles.js +3 -0
- package/dist/components/combobox/combobox.styles.js.map +1 -1
- package/dist/components/context-meter/context-meter.class.d.ts +7 -0
- package/dist/components/context-meter/context-meter.class.d.ts.map +1 -1
- package/dist/components/context-meter/context-meter.class.js +30 -12
- package/dist/components/context-meter/context-meter.class.js.map +1 -1
- package/dist/components/conversation-item/conversation-item.class.js +2 -2
- package/dist/components/conversation-item/conversation-item.class.js.map +1 -1
- package/dist/components/date-picker/date-input.class.d.ts +3 -1
- package/dist/components/date-picker/date-input.class.d.ts.map +1 -1
- package/dist/components/date-picker/date-input.class.js +16 -9
- package/dist/components/date-picker/date-input.class.js.map +1 -1
- package/dist/components/date-picker/date-picker.class.d.ts +6 -2
- package/dist/components/date-picker/date-picker.class.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.class.js +23 -6
- package/dist/components/date-picker/date-picker.class.js.map +1 -1
- package/dist/components/date-picker/date-picker.styles.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.styles.js +16 -1
- package/dist/components/date-picker/date-picker.styles.js.map +1 -1
- package/dist/components/dialog/confirm.d.ts +2 -2
- package/dist/components/dialog/confirm.d.ts.map +1 -1
- package/dist/components/dialog/confirm.js +10 -7
- package/dist/components/dialog/confirm.js.map +1 -1
- package/dist/components/diff-view/diff-view.class.d.ts +3 -0
- package/dist/components/diff-view/diff-view.class.d.ts.map +1 -1
- package/dist/components/diff-view/diff-view.class.js +24 -3
- package/dist/components/diff-view/diff-view.class.js.map +1 -1
- package/dist/components/dock-panel/dock-panel.class.js +2 -2
- package/dist/components/dock-panel/dock-panel.class.js.map +1 -1
- package/dist/components/document-preview/document-preview.class.d.ts.map +1 -1
- package/dist/components/document-preview/document-preview.class.js +11 -11
- package/dist/components/document-preview/document-preview.class.js.map +1 -1
- package/dist/components/document-preview/document-preview.styles.d.ts.map +1 -1
- package/dist/components/document-preview/document-preview.styles.js +6 -1
- package/dist/components/document-preview/document-preview.styles.js.map +1 -1
- package/dist/components/export-button/export-button.class.d.ts +17 -1
- package/dist/components/export-button/export-button.class.d.ts.map +1 -1
- package/dist/components/export-button/export-button.class.js +36 -4
- package/dist/components/export-button/export-button.class.js.map +1 -1
- package/dist/components/file-input/file-input.class.d.ts +4 -0
- package/dist/components/file-input/file-input.class.d.ts.map +1 -1
- package/dist/components/file-input/file-input.class.js +18 -8
- package/dist/components/file-input/file-input.class.js.map +1 -1
- package/dist/components/file-input/file-input.styles.d.ts.map +1 -1
- package/dist/components/file-input/file-input.styles.js +0 -7
- package/dist/components/file-input/file-input.styles.js.map +1 -1
- package/dist/components/gauge/gauge.class.d.ts.map +1 -1
- package/dist/components/gauge/gauge.class.js +16 -6
- package/dist/components/gauge/gauge.class.js.map +1 -1
- package/dist/components/generation-status/generation-status.class.d.ts.map +1 -1
- package/dist/components/generation-status/generation-status.class.js +39 -20
- package/dist/components/generation-status/generation-status.class.js.map +1 -1
- package/dist/components/graph/graph.class.d.ts +10 -0
- package/dist/components/graph/graph.class.d.ts.map +1 -1
- package/dist/components/graph/graph.class.js +35 -9
- package/dist/components/graph/graph.class.js.map +1 -1
- package/dist/components/graph/graph.styles.d.ts.map +1 -1
- package/dist/components/graph/graph.styles.js +4 -0
- package/dist/components/graph/graph.styles.js.map +1 -1
- package/dist/components/heatmap/heatmap.class.d.ts +12 -10
- package/dist/components/heatmap/heatmap.class.d.ts.map +1 -1
- package/dist/components/heatmap/heatmap.class.js +43 -25
- package/dist/components/heatmap/heatmap.class.js.map +1 -1
- package/dist/components/heatmap/heatmap.styles.js +1 -1
- package/dist/components/json-viewer/json-viewer.class.d.ts.map +1 -1
- package/dist/components/json-viewer/json-viewer.class.js +26 -6
- package/dist/components/json-viewer/json-viewer.class.js.map +1 -1
- package/dist/components/kbd/kbd.class.d.ts +13 -3
- package/dist/components/kbd/kbd.class.d.ts.map +1 -1
- package/dist/components/kbd/kbd.class.js +57 -33
- package/dist/components/kbd/kbd.class.js.map +1 -1
- package/dist/components/map/map.class.d.ts +4 -0
- package/dist/components/map/map.class.d.ts.map +1 -1
- package/dist/components/map/map.class.js +24 -2
- package/dist/components/map/map.class.js.map +1 -1
- package/dist/components/map/map.styles.d.ts.map +1 -1
- package/dist/components/map/map.styles.js +5 -0
- package/dist/components/map/map.styles.js.map +1 -1
- package/dist/components/markdown/markdown.class.d.ts +3 -0
- package/dist/components/markdown/markdown.class.d.ts.map +1 -1
- package/dist/components/markdown/markdown.class.js +3 -0
- package/dist/components/markdown/markdown.class.js.map +1 -1
- package/dist/components/media-card/media-card.class.d.ts +4 -1
- package/dist/components/media-card/media-card.class.d.ts.map +1 -1
- package/dist/components/media-card/media-card.class.js +6 -4
- package/dist/components/media-card/media-card.class.js.map +1 -1
- package/dist/components/mention-popover/mention-popover.class.d.ts +9 -0
- package/dist/components/mention-popover/mention-popover.class.d.ts.map +1 -1
- package/dist/components/mention-popover/mention-popover.class.js +14 -2
- package/dist/components/mention-popover/mention-popover.class.js.map +1 -1
- package/dist/components/menu/menu.class.d.ts +21 -2
- package/dist/components/menu/menu.class.d.ts.map +1 -1
- package/dist/components/menu/menu.class.js +40 -9
- package/dist/components/menu/menu.class.js.map +1 -1
- package/dist/components/model-select/model-select.class.d.ts +9 -0
- package/dist/components/model-select/model-select.class.d.ts.map +1 -1
- package/dist/components/model-select/model-select.class.js +20 -5
- package/dist/components/model-select/model-select.class.js.map +1 -1
- package/dist/components/model-settings-panel/model-settings-panel.class.d.ts.map +1 -1
- package/dist/components/model-settings-panel/model-settings-panel.class.js +4 -3
- package/dist/components/model-settings-panel/model-settings-panel.class.js.map +1 -1
- package/dist/components/playback/playback.class.d.ts +4 -0
- package/dist/components/playback/playback.class.d.ts.map +1 -1
- package/dist/components/playback/playback.class.js +6 -2
- package/dist/components/playback/playback.class.js.map +1 -1
- package/dist/components/poll-status/poll-status.class.d.ts +3 -2
- package/dist/components/poll-status/poll-status.class.d.ts.map +1 -1
- package/dist/components/poll-status/poll-status.class.js +10 -7
- package/dist/components/poll-status/poll-status.class.js.map +1 -1
- package/dist/components/poll-status/poll-status.styles.d.ts.map +1 -1
- package/dist/components/poll-status/poll-status.styles.js +8 -1
- package/dist/components/poll-status/poll-status.styles.js.map +1 -1
- package/dist/components/segmented/segmented.class.d.ts +6 -0
- package/dist/components/segmented/segmented.class.d.ts.map +1 -1
- package/dist/components/segmented/segmented.class.js +12 -2
- package/dist/components/segmented/segmented.class.js.map +1 -1
- package/dist/components/select/select.class.d.ts +7 -1
- package/dist/components/select/select.class.d.ts.map +1 -1
- package/dist/components/select/select.class.js +14 -4
- package/dist/components/select/select.class.js.map +1 -1
- package/dist/components/skeleton/skeleton.class.d.ts.map +1 -1
- package/dist/components/skeleton/skeleton.class.js +2 -1
- package/dist/components/skeleton/skeleton.class.js.map +1 -1
- package/dist/components/source-card/source-card.class.d.ts +5 -1
- package/dist/components/source-card/source-card.class.d.ts.map +1 -1
- package/dist/components/source-card/source-card.class.js +4 -2
- package/dist/components/source-card/source-card.class.js.map +1 -1
- package/dist/components/source-list/source-list.class.d.ts +8 -7
- package/dist/components/source-list/source-list.class.d.ts.map +1 -1
- package/dist/components/source-list/source-list.class.js +9 -8
- package/dist/components/source-list/source-list.class.js.map +1 -1
- package/dist/components/source-list/source-list.styles.d.ts.map +1 -1
- package/dist/components/source-list/source-list.styles.js +10 -0
- package/dist/components/source-list/source-list.styles.js.map +1 -1
- package/dist/components/sparkline/sparkline.styles.js +2 -2
- package/dist/components/split/split.class.d.ts +1 -1
- package/dist/components/split/split.class.d.ts.map +1 -1
- package/dist/components/split/split.class.js +50 -2
- package/dist/components/split/split.class.js.map +1 -1
- package/dist/components/stat/stat.class.js +2 -2
- package/dist/components/stat/stat.class.js.map +1 -1
- package/dist/components/stepper/stepper.class.d.ts +6 -1
- package/dist/components/stepper/stepper.class.d.ts.map +1 -1
- package/dist/components/stepper/stepper.class.js +4 -1
- package/dist/components/stepper/stepper.class.js.map +1 -1
- package/dist/components/stream-status/stream-status.class.d.ts.map +1 -1
- package/dist/components/stream-status/stream-status.class.js +5 -11
- package/dist/components/stream-status/stream-status.class.js.map +1 -1
- package/dist/components/switch/switch.class.d.ts.map +1 -1
- package/dist/components/switch/switch.class.js +1 -1
- package/dist/components/switch/switch.class.js.map +1 -1
- package/dist/components/table/table.class.d.ts +7 -5
- package/dist/components/table/table.class.d.ts.map +1 -1
- package/dist/components/table/table.class.js +41 -9
- package/dist/components/table/table.class.js.map +1 -1
- package/dist/components/table/table.styles.d.ts.map +1 -1
- package/dist/components/table/table.styles.js +9 -0
- package/dist/components/table/table.styles.js.map +1 -1
- package/dist/components/thinking-panel/thinking-panel.class.d.ts +2 -1
- package/dist/components/thinking-panel/thinking-panel.class.d.ts.map +1 -1
- package/dist/components/thinking-panel/thinking-panel.class.js +14 -5
- package/dist/components/thinking-panel/thinking-panel.class.js.map +1 -1
- package/dist/components/time-range/time-range.class.d.ts +8 -3
- package/dist/components/time-range/time-range.class.d.ts.map +1 -1
- package/dist/components/time-range/time-range.class.js +10 -5
- package/dist/components/time-range/time-range.class.js.map +1 -1
- package/dist/components/time-range/time-range.styles.d.ts.map +1 -1
- package/dist/components/time-range/time-range.styles.js +16 -0
- package/dist/components/time-range/time-range.styles.js.map +1 -1
- package/dist/components/toast/toast-item.class.js +2 -2
- package/dist/components/toast/toast-item.class.js.map +1 -1
- package/dist/components/tool-approval-dialog/tool-approval-dialog.class.d.ts.map +1 -1
- package/dist/components/tool-approval-dialog/tool-approval-dialog.class.js +11 -6
- package/dist/components/tool-approval-dialog/tool-approval-dialog.class.js.map +1 -1
- package/dist/components/tool-call-chip/tool-call-chip.class.d.ts +8 -4
- package/dist/components/tool-call-chip/tool-call-chip.class.d.ts.map +1 -1
- package/dist/components/tool-call-chip/tool-call-chip.class.js +46 -16
- package/dist/components/tool-call-chip/tool-call-chip.class.js.map +1 -1
- package/dist/components/tool-param-form/tool-param-form.class.d.ts +3 -0
- package/dist/components/tool-param-form/tool-param-form.class.d.ts.map +1 -1
- package/dist/components/tool-param-form/tool-param-form.class.js +21 -16
- package/dist/components/tool-param-form/tool-param-form.class.js.map +1 -1
- package/dist/components/tool-param-form/tool-param-form.styles.d.ts.map +1 -1
- package/dist/components/tool-param-form/tool-param-form.styles.js +5 -0
- package/dist/components/tool-param-form/tool-param-form.styles.js.map +1 -1
- package/dist/components/tool-result-dialog/tool-result-dialog.class.d.ts +5 -5
- package/dist/components/tool-result-dialog/tool-result-dialog.class.d.ts.map +1 -1
- package/dist/components/tool-result-dialog/tool-result-dialog.class.js +34 -14
- package/dist/components/tool-result-dialog/tool-result-dialog.class.js.map +1 -1
- package/dist/components/tool-result-view/registry.d.ts +3 -3
- package/dist/components/tool-result-view/registry.js +3 -3
- package/dist/components/tool-select-dialog/tool-select-dialog.class.d.ts.map +1 -1
- package/dist/components/tool-select-dialog/tool-select-dialog.class.js +27 -9
- package/dist/components/tool-select-dialog/tool-select-dialog.class.js.map +1 -1
- package/dist/components/tree/tree-node.class.d.ts +1 -0
- package/dist/components/tree/tree-node.class.d.ts.map +1 -1
- package/dist/components/tree/tree-node.class.js +3 -66
- package/dist/components/tree/tree-node.class.js.map +1 -1
- package/dist/components/tree/tree-node.styles.d.ts +2 -0
- package/dist/components/tree/tree-node.styles.d.ts.map +1 -0
- package/dist/components/tree/tree-node.styles.js +68 -0
- package/dist/components/tree/tree-node.styles.js.map +1 -0
- package/dist/components/tree/tree.class.d.ts +3 -1
- package/dist/components/tree/tree.class.d.ts.map +1 -1
- package/dist/components/tree/tree.class.js +6 -1
- package/dist/components/tree/tree.class.js.map +1 -1
- package/dist/components/typing-indicator/typing-indicator.class.d.ts +14 -11
- package/dist/components/typing-indicator/typing-indicator.class.d.ts.map +1 -1
- package/dist/components/typing-indicator/typing-indicator.class.js +16 -12
- package/dist/components/typing-indicator/typing-indicator.class.js.map +1 -1
- package/dist/components/widget/widget.class.d.ts +34 -8
- package/dist/components/widget/widget.class.d.ts.map +1 -1
- package/dist/components/widget/widget.class.js +36 -16
- package/dist/components/widget/widget.class.js.map +1 -1
- package/dist/components/word-cloud/word-cloud.class.d.ts +6 -0
- package/dist/components/word-cloud/word-cloud.class.d.ts.map +1 -1
- package/dist/components/word-cloud/word-cloud.class.js +23 -9
- package/dist/components/word-cloud/word-cloud.class.js.map +1 -1
- package/dist/internal/group-by-recency.d.ts +3 -2
- package/dist/internal/group-by-recency.d.ts.map +1 -1
- package/dist/internal/group-by-recency.js.map +1 -1
- package/dist/internal/localization.d.ts +1 -1
- package/dist/internal/localization.d.ts.map +1 -1
- package/dist/internal/localization.js +245 -0
- package/dist/internal/localization.js.map +1 -1
- package/dist/lyra.d.ts +13 -0
- package/dist/lyra.d.ts.map +1 -1
- package/dist/lyra.js.map +1 -1
- package/package.json +1 -1
|
@@ -29,9 +29,10 @@ export type TypingIndicatorSize = 'sm' | 'md';
|
|
|
29
29
|
* accessible name derived from `label` is sufficient, set both as an
|
|
30
30
|
* `aria-label` on the host *and* as a visually-hidden text node in the
|
|
31
31
|
* shadow tree, so the name survives even if only one of the two is picked up
|
|
32
|
-
* by a given assistive-tech/browser pairing. An empty or
|
|
33
|
-
* `label` falls back to the
|
|
34
|
-
* than leaving the component with no accessible name at
|
|
32
|
+
* by a given assistive-tech/browser pairing. An untouched-default, empty, or
|
|
33
|
+
* whitespace-only `label` falls back to the localized "Thinking…" copy in
|
|
34
|
+
* both places, rather than leaving the component with no accessible name at
|
|
35
|
+
* all. The animated dots/pulse/cursor
|
|
35
36
|
* shape is `aria-hidden="true"` — it's decorative; `label` is the entire
|
|
36
37
|
* accessible content, so nothing narrates individual animation frames.
|
|
37
38
|
*
|
|
@@ -47,17 +48,19 @@ export declare class LyraTypingIndicator extends LyraElement {
|
|
|
47
48
|
variant: TypingIndicatorVariant;
|
|
48
49
|
/** Accessible name, exposed via `role="status"`. Not re-announced on every
|
|
49
50
|
* animation frame — only mount (and any later change to this property)
|
|
50
|
-
* produces a new announcement. An empty or
|
|
51
|
-
* back to the
|
|
52
|
-
* component never loses its accessible name. */
|
|
51
|
+
* produces a new announcement. An untouched-default, empty, or
|
|
52
|
+
* whitespace-only value falls back to the localized "Thinking…" copy (see
|
|
53
|
+
* `accessibleLabel`) so the component never loses its accessible name. */
|
|
53
54
|
label: string;
|
|
54
55
|
/** Compact sizing for dense layouts (e.g. inline with a message bubble). */
|
|
55
56
|
size: TypingIndicatorSize;
|
|
56
|
-
/** The accessible name actually used, falling back to the
|
|
57
|
-
* "Thinking…"
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
57
|
+
/** The accessible name actually used, falling back to the localized
|
|
58
|
+
* `'thinking'` message (`"Thinking…"` in English) when `label` is left at
|
|
59
|
+
* its untouched default or set to an empty/whitespace-only string --
|
|
60
|
+
* otherwise both the `aria-label` and the sr-only text node would go
|
|
61
|
+
* blank, leaving this purely-decorative component with no accessible name
|
|
62
|
+
* at all. A caller-customized `label` is used verbatim (not a translation
|
|
63
|
+
* concern), same convention as `<lyra-date-picker>`'s `previousLabel`. */
|
|
61
64
|
private get accessibleLabel();
|
|
62
65
|
protected willUpdate(changed: PropertyValues): void;
|
|
63
66
|
render(): TemplateResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typing-indicator.class.d.ts","sourceRoot":"","sources":["../../../src/components/typing-indicator/typing-indicator.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAI7D,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AACjE,MAAM,MAAM,mBAAmB,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9C
|
|
1
|
+
{"version":3,"file":"typing-indicator.class.d.ts","sourceRoot":"","sources":["../../../src/components/typing-indicator/typing-indicator.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAI7D,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AACjE,MAAM,MAAM,mBAAmB,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;IAClD,MAAM,CAAC,MAAM,iCAAwC;IAErD,+CAA+C;IAClB,OAAO,EAAE,sBAAsB,CAAU;IAEtE;;;;+EAI2E;IAC/D,KAAK,SAAe;IAEhC,4EAA4E;IAC/C,IAAI,EAAE,mBAAmB,CAAQ;IAE9D;;;;;;+EAM2E;IAC3E,OAAO,KAAK,eAAe,GAG1B;IAED,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAKlD;IAED,MAAM,IAAI,cAAc,CAKvB;IAED,OAAO,CAAC,WAAW;CAWpB;AAGD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,uBAAuB,EAAE,mBAAmB,CAAC;KAC9C;CACF"}
|
|
@@ -36,9 +36,10 @@ import { styles } from './typing-indicator.styles.js';
|
|
|
36
36
|
* accessible name derived from `label` is sufficient, set both as an
|
|
37
37
|
* `aria-label` on the host *and* as a visually-hidden text node in the
|
|
38
38
|
* shadow tree, so the name survives even if only one of the two is picked up
|
|
39
|
-
* by a given assistive-tech/browser pairing. An empty or
|
|
40
|
-
* `label` falls back to the
|
|
41
|
-
* than leaving the component with no accessible name at
|
|
39
|
+
* by a given assistive-tech/browser pairing. An untouched-default, empty, or
|
|
40
|
+
* whitespace-only `label` falls back to the localized "Thinking…" copy in
|
|
41
|
+
* both places, rather than leaving the component with no accessible name at
|
|
42
|
+
* all. The animated dots/pulse/cursor
|
|
42
43
|
* shape is `aria-hidden="true"` — it's decorative; `label` is the entire
|
|
43
44
|
* accessible content, so nothing narrates individual animation frames.
|
|
44
45
|
*
|
|
@@ -55,21 +56,24 @@ export class LyraTypingIndicator extends LyraElement {
|
|
|
55
56
|
this.variant = 'dots';
|
|
56
57
|
/** Accessible name, exposed via `role="status"`. Not re-announced on every
|
|
57
58
|
* animation frame — only mount (and any later change to this property)
|
|
58
|
-
* produces a new announcement. An empty or
|
|
59
|
-
* back to the
|
|
60
|
-
* component never loses its accessible name. */
|
|
59
|
+
* produces a new announcement. An untouched-default, empty, or
|
|
60
|
+
* whitespace-only value falls back to the localized "Thinking…" copy (see
|
|
61
|
+
* `accessibleLabel`) so the component never loses its accessible name. */
|
|
61
62
|
this.label = 'Thinking…';
|
|
62
63
|
/** Compact sizing for dense layouts (e.g. inline with a message bubble). */
|
|
63
64
|
this.size = 'md';
|
|
64
65
|
}
|
|
65
66
|
static { this.styles = [LyraElement.styles, styles, srOnly]; }
|
|
66
|
-
/** The accessible name actually used, falling back to the
|
|
67
|
-
* "Thinking…"
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
67
|
+
/** The accessible name actually used, falling back to the localized
|
|
68
|
+
* `'thinking'` message (`"Thinking…"` in English) when `label` is left at
|
|
69
|
+
* its untouched default or set to an empty/whitespace-only string --
|
|
70
|
+
* otherwise both the `aria-label` and the sr-only text node would go
|
|
71
|
+
* blank, leaving this purely-decorative component with no accessible name
|
|
72
|
+
* at all. A caller-customized `label` is used verbatim (not a translation
|
|
73
|
+
* concern), same convention as `<lyra-date-picker>`'s `previousLabel`. */
|
|
71
74
|
get accessibleLabel() {
|
|
72
|
-
|
|
75
|
+
const trimmed = this.label.trim();
|
|
76
|
+
return this.localize('thinking', trimmed === '' || trimmed === 'Thinking…' ? undefined : trimmed);
|
|
73
77
|
}
|
|
74
78
|
willUpdate(changed) {
|
|
75
79
|
this.setAttribute('role', 'status');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typing-indicator.class.js","sourceRoot":"","sources":["../../../src/components/typing-indicator/typing-indicator.class.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAA4C,MAAM,KAAK,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAKtD
|
|
1
|
+
{"version":3,"file":"typing-indicator.class.js","sourceRoot":"","sources":["../../../src/components/typing-indicator/typing-indicator.class.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAA4C,MAAM,KAAK,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,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,CAAA,0EAA0E,CAAC;QAC1F,CAAC;IACH,CAAC;CACF;AAjD8B;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oDAA0C;AAO1D;IAAX,QAAQ,EAAE;kDAAqB;AAGH;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAAkC"}
|
|
@@ -2,13 +2,27 @@ import { type TemplateResult, type PropertyValues } from 'lit';
|
|
|
2
2
|
import { LyraElement } from '../../internal/lyra-element.js';
|
|
3
3
|
export interface WidgetView {
|
|
4
4
|
id: string;
|
|
5
|
-
label
|
|
5
|
+
/** Visible label text. Optional so a toggle can be icon-only (`icon` set, `label` omitted) --
|
|
6
|
+
* set `ariaLabel` too in that case so the button keeps a real accessible name; see `ariaLabel`'s
|
|
7
|
+
* own doc for what happens if both are left unset. */
|
|
8
|
+
label?: string;
|
|
6
9
|
icon?: TemplateResult;
|
|
10
|
+
/** Accessible name for the toggle button, used only when `label` is omitted -- ignored otherwise,
|
|
11
|
+
* since the visible label text already supplies the accessible name. If both `label` and
|
|
12
|
+
* `ariaLabel` are omitted, the button falls back to its own `id` as a last-resort accessible name:
|
|
13
|
+
* not silently unlabeled, but not a good name either, so set one of the two for any icon-only view. */
|
|
14
|
+
ariaLabel?: string;
|
|
7
15
|
}
|
|
8
16
|
export interface LyraWidgetEventMap {
|
|
9
|
-
'lyra-collapse-change': CustomEvent<
|
|
10
|
-
|
|
11
|
-
|
|
17
|
+
'lyra-collapse-change': CustomEvent<{
|
|
18
|
+
collapsed: boolean;
|
|
19
|
+
}>;
|
|
20
|
+
'lyra-fullscreen-change': CustomEvent<{
|
|
21
|
+
fullscreen: boolean;
|
|
22
|
+
}>;
|
|
23
|
+
'lyra-view-change': CustomEvent<{
|
|
24
|
+
viewId: string;
|
|
25
|
+
}>;
|
|
12
26
|
}
|
|
13
27
|
/**
|
|
14
28
|
* `<lyra-widget>` — a titled panel shell with an optional collapse toggle and
|
|
@@ -22,10 +36,21 @@ export interface LyraWidgetEventMap {
|
|
|
22
36
|
* @slot label - Rich label content (overrides the `label` attribute).
|
|
23
37
|
* @slot sublabel - Rich sublabel content (overrides the `sublabel` attribute).
|
|
24
38
|
* @slot actions - Header action controls, rendered before the collapse/expand buttons.
|
|
25
|
-
* @
|
|
26
|
-
*
|
|
39
|
+
* @slot collapse-icon - Overrides the built-in chevron glyph inside the collapse/expand toggle
|
|
40
|
+
* button entirely, via the platform's own slot-fallback-content mechanism (same convention as
|
|
41
|
+
* `<lyra-tool-call-chip>`'s `icon` slot): whatever is assigned wins, otherwise the default chevron
|
|
42
|
+
* renders. Only meaningful while `collapsible`.
|
|
43
|
+
* @slot fullscreen-icon - Overrides the built-in expand/close glyph inside the fullscreen toggle
|
|
44
|
+
* button entirely, using the same mechanism -- the override replaces *both* the "expand" and
|
|
45
|
+
* "exit fullscreen" default icons, so a consumer supplying one is responsible for its own
|
|
46
|
+
* expand/exit distinction (e.g. by reading the `fullscreen` attribute). Only meaningful while
|
|
47
|
+
* `expandable`.
|
|
48
|
+
* @slot view-{id} - Content for the view whose `WidgetView.id` matches `{id}`, rendered when
|
|
49
|
+
* `views` is non-empty.
|
|
50
|
+
* @event lyra-collapse-change - `detail: { collapsed }` (the new `collapsed` state).
|
|
51
|
+
* @event lyra-fullscreen-change - `detail: { fullscreen }` (the new `fullscreen` state).
|
|
27
52
|
* @event lyra-view-change - Fired when the active view changes via a header toggle click.
|
|
28
|
-
* `detail:
|
|
53
|
+
* `detail: { viewId }` (the new view's `id`).
|
|
29
54
|
* @csspart base - The panel root (dialog role + backdrop when fullscreen).
|
|
30
55
|
* @csspart header - The header row containing the title, actions, and toggle buttons.
|
|
31
56
|
* @csspart title - The wrapper around the label/sublabel.
|
|
@@ -61,7 +86,8 @@ export declare class LyraWidget extends LyraElement<LyraWidgetEventMap> {
|
|
|
61
86
|
compact: boolean;
|
|
62
87
|
/** Named alternate views for the panel body -- e.g. a chart/table toggle inside the same card
|
|
63
88
|
* chrome. Each entry gets a header toggle button and a `<slot name="view-${id}">`. Empty (the
|
|
64
|
-
* default) renders today's single unnamed default slot as the sole view, unchanged.
|
|
89
|
+
* default) renders today's single unnamed default slot as the sole view, unchanged. An entry's
|
|
90
|
+
* `label` is optional -- see `WidgetView`'s own doc for the icon-only (`ariaLabel`) case. */
|
|
65
91
|
views: WidgetView[];
|
|
66
92
|
/** The currently active view's `id` -- defaults to the first entry of `views` (or `''` when
|
|
67
93
|
* `views` is empty). Settable directly by a consumer wanting to control the active view
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget.class.d.ts","sourceRoot":"","sources":["../../../src/components/widget/widget.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAE9E,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAY7D,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"widget.class.d.ts","sourceRoot":"","sources":["../../../src/components/widget/widget.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAE9E,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAY7D,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX;;2DAEuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;;4GAGwG;IACxG,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,sBAAsB,EAAE,WAAW,CAAC;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC5D,wBAAwB,EAAE,WAAW,CAAC;QAAE,UAAU,EAAE,OAAO,CAAA;KAAE,C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AAC,eAAe,CAGrB;IAEF,OAAO,CAAC,gBAAgB,CAItB;IAEF,OAAO,CAAC,iBAAiB,CAIvB;IAEF,OAAO,CAAC,eAAe,CAErB;IAEF,MAAM,IAAI,cAAc,CAwFvB;CACF;AAGD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
|
@@ -24,10 +24,21 @@ import { styles } from './widget.styles.js';
|
|
|
24
24
|
* @slot label - Rich label content (overrides the `label` attribute).
|
|
25
25
|
* @slot sublabel - Rich sublabel content (overrides the `sublabel` attribute).
|
|
26
26
|
* @slot actions - Header action controls, rendered before the collapse/expand buttons.
|
|
27
|
-
* @
|
|
28
|
-
*
|
|
27
|
+
* @slot collapse-icon - Overrides the built-in chevron glyph inside the collapse/expand toggle
|
|
28
|
+
* button entirely, via the platform's own slot-fallback-content mechanism (same convention as
|
|
29
|
+
* `<lyra-tool-call-chip>`'s `icon` slot): whatever is assigned wins, otherwise the default chevron
|
|
30
|
+
* renders. Only meaningful while `collapsible`.
|
|
31
|
+
* @slot fullscreen-icon - Overrides the built-in expand/close glyph inside the fullscreen toggle
|
|
32
|
+
* button entirely, using the same mechanism -- the override replaces *both* the "expand" and
|
|
33
|
+
* "exit fullscreen" default icons, so a consumer supplying one is responsible for its own
|
|
34
|
+
* expand/exit distinction (e.g. by reading the `fullscreen` attribute). Only meaningful while
|
|
35
|
+
* `expandable`.
|
|
36
|
+
* @slot view-{id} - Content for the view whose `WidgetView.id` matches `{id}`, rendered when
|
|
37
|
+
* `views` is non-empty.
|
|
38
|
+
* @event lyra-collapse-change - `detail: { collapsed }` (the new `collapsed` state).
|
|
39
|
+
* @event lyra-fullscreen-change - `detail: { fullscreen }` (the new `fullscreen` state).
|
|
29
40
|
* @event lyra-view-change - Fired when the active view changes via a header toggle click.
|
|
30
|
-
* `detail:
|
|
41
|
+
* `detail: { viewId }` (the new view's `id`).
|
|
31
42
|
* @csspart base - The panel root (dialog role + backdrop when fullscreen).
|
|
32
43
|
* @csspart header - The header row containing the title, actions, and toggle buttons.
|
|
33
44
|
* @csspart title - The wrapper around the label/sublabel.
|
|
@@ -64,7 +75,8 @@ export class LyraWidget extends LyraElement {
|
|
|
64
75
|
this.compact = false;
|
|
65
76
|
/** Named alternate views for the panel body -- e.g. a chart/table toggle inside the same card
|
|
66
77
|
* chrome. Each entry gets a header toggle button and a `<slot name="view-${id}">`. Empty (the
|
|
67
|
-
* default) renders today's single unnamed default slot as the sole view, unchanged.
|
|
78
|
+
* default) renders today's single unnamed default slot as the sole view, unchanged. An entry's
|
|
79
|
+
* `label` is optional -- see `WidgetView`'s own doc for the icon-only (`ariaLabel`) case. */
|
|
68
80
|
this.views = [];
|
|
69
81
|
/** The currently active view's `id` -- defaults to the first entry of `views` (or `''` when
|
|
70
82
|
* `views` is empty). Settable directly by a consumer wanting to control the active view
|
|
@@ -91,23 +103,23 @@ export class LyraWidget extends LyraElement {
|
|
|
91
103
|
if (id === this.activeView)
|
|
92
104
|
return;
|
|
93
105
|
this.activeView = id;
|
|
94
|
-
this.emit('lyra-view-change', id);
|
|
106
|
+
this.emit('lyra-view-change', { viewId: id });
|
|
95
107
|
};
|
|
96
108
|
this.toggleCollapsed = () => {
|
|
97
109
|
this.collapsed = !this.collapsed;
|
|
98
|
-
this.emit('lyra-collapse-change', this.collapsed);
|
|
110
|
+
this.emit('lyra-collapse-change', { collapsed: this.collapsed });
|
|
99
111
|
};
|
|
100
112
|
this.toggleFullscreen = (e) => {
|
|
101
113
|
if (!this.fullscreen)
|
|
102
114
|
this.explicitTrigger = e.currentTarget;
|
|
103
115
|
this.fullscreen = !this.fullscreen;
|
|
104
|
-
this.emit('lyra-fullscreen-change', this.fullscreen);
|
|
116
|
+
this.emit('lyra-fullscreen-change', { fullscreen: this.fullscreen });
|
|
105
117
|
};
|
|
106
118
|
this.dismissFullscreen = () => {
|
|
107
119
|
if (!this.fullscreen)
|
|
108
120
|
return;
|
|
109
121
|
this.fullscreen = false;
|
|
110
|
-
this.emit('lyra-fullscreen-change', false);
|
|
122
|
+
this.emit('lyra-fullscreen-change', { fullscreen: false });
|
|
111
123
|
};
|
|
112
124
|
this.onBackdropClick = () => {
|
|
113
125
|
this.overlayHandle?.dismissBackdrop();
|
|
@@ -217,7 +229,7 @@ export class LyraWidget extends LyraElement {
|
|
|
217
229
|
part="base"
|
|
218
230
|
role=${this.fullscreen ? 'dialog' : nothing}
|
|
219
231
|
aria-modal=${this.fullscreen ? 'true' : nothing}
|
|
220
|
-
aria-label=${this.fullscreen ? (hasLabel ? this.label : '
|
|
232
|
+
aria-label=${this.fullscreen ? (hasLabel ? this.label : this.localize('widgetFullscreenPanel')) : nothing}
|
|
221
233
|
tabindex=${this.fullscreen ? '-1' : nothing}
|
|
222
234
|
style=${this.fullscreenInset ? `--lyra-widget-fullscreen-inset:${this.fullscreenInset}` : nothing}
|
|
223
235
|
>
|
|
@@ -239,13 +251,21 @@ export class LyraWidget extends LyraElement {
|
|
|
239
251
|
<slot name="actions" @slotchange=${this.onActionsSlotChange}></slot>
|
|
240
252
|
</div>
|
|
241
253
|
${this.views.length > 0
|
|
242
|
-
? html `<div part="view-toggles" role="group" aria-label
|
|
243
|
-
${this.views.map((v) =>
|
|
254
|
+
? html `<div part="view-toggles" role="group" aria-label=${this.localize('widgetViewGroup')}>
|
|
255
|
+
${this.views.map((v) => {
|
|
256
|
+
// `label` supplies the accessible name via its own visible text, same as
|
|
257
|
+
// before -- aria-label is only ever added for an icon-only toggle (`label`
|
|
258
|
+
// omitted), where `ariaLabel` is the intended name and `id` is the last-resort
|
|
259
|
+
// fallback if even that's missing (see WidgetView's doc).
|
|
260
|
+
const hasLabel = !!v.label;
|
|
261
|
+
return html `<button
|
|
244
262
|
part="view-toggle"
|
|
245
263
|
type="button"
|
|
246
264
|
aria-pressed=${v.id === this.activeView ? 'true' : 'false'}
|
|
265
|
+
aria-label=${hasLabel ? nothing : v.ariaLabel || v.id}
|
|
247
266
|
@click=${() => this.setActiveView(v.id)}
|
|
248
|
-
>${v.icon ?? nothing}${v.label}</button
|
|
267
|
+
>${v.icon ?? nothing}${v.label ?? nothing}</button>`;
|
|
268
|
+
})}
|
|
249
269
|
</div>`
|
|
250
270
|
: nothing}
|
|
251
271
|
${this.collapsible
|
|
@@ -253,12 +273,12 @@ export class LyraWidget extends LyraElement {
|
|
|
253
273
|
part="collapse-button"
|
|
254
274
|
type="button"
|
|
255
275
|
aria-expanded=${this.collapsed ? 'false' : 'true'}
|
|
256
|
-
aria-label=${this.collapsed ? '
|
|
276
|
+
aria-label=${this.collapsed ? this.localize('dockPanelExpand') : this.localize('dockPanelCollapse')}
|
|
257
277
|
aria-controls=${this.bodyId}
|
|
258
278
|
style="transform:rotate(${this.collapsed ? '0deg' : '90deg'})"
|
|
259
279
|
@click=${this.toggleCollapsed}
|
|
260
280
|
>
|
|
261
|
-
|
|
281
|
+
<slot name="collapse-icon">${chevronIcon()}</slot>
|
|
262
282
|
</button>`
|
|
263
283
|
: nothing}
|
|
264
284
|
${this.expandable
|
|
@@ -266,10 +286,10 @@ export class LyraWidget extends LyraElement {
|
|
|
266
286
|
part="fullscreen-button"
|
|
267
287
|
type="button"
|
|
268
288
|
aria-pressed=${this.fullscreen ? 'true' : 'false'}
|
|
269
|
-
aria-label=${this.fullscreen ? '
|
|
289
|
+
aria-label=${this.fullscreen ? this.localize('widgetExitFullscreen') : this.localize('widgetExpandToFullscreen')}
|
|
270
290
|
@click=${this.toggleFullscreen}
|
|
271
291
|
>
|
|
272
|
-
|
|
292
|
+
<slot name="fullscreen-icon">${this.fullscreen ? closeIcon() : expandIcon()}</slot>
|
|
273
293
|
</button>`
|
|
274
294
|
: nothing}
|
|
275
295
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget.class.js","sourceRoot":"","sources":["../../../src/components/widget/widget.class.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAA4C,MAA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AAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAoB;AAIlB;IAA5C,QAAQ,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;mDAAsB;AAEtB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAAiB;AAK5B;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;yCAA0B;AAKzB;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;8CAAiB;AAE/B;IAAhB,KAAK,EAAE;kDAAgC;AACvB;IAAhB,KAAK,EAAE;+CAA6B;AACpB;IAAhB,KAAK,EAAE;gDAA8B;AACrB;IAAhB,KAAK,EAAE;mDAAiC"}
|
|
@@ -72,6 +72,12 @@ export declare class LyraWordCloud extends LyraElement<LyraWordCloudEventMap> {
|
|
|
72
72
|
private authorSuppliedAriaLabel;
|
|
73
73
|
private measureText;
|
|
74
74
|
private fontFamily;
|
|
75
|
+
/** Reads the actual `--lyra-font-weight-semibold` value the same way
|
|
76
|
+
* `fontFamily()` reads `--lyra-font` -- must match `[part='word']`'s
|
|
77
|
+
* `font-weight` in word-cloud.styles.ts, so a theme/consumer override of
|
|
78
|
+
* that token can't silently desync canvas text measurement (used for the
|
|
79
|
+
* spiral layout's collision boxes) from the actually rendered glyph width. */
|
|
80
|
+
private fontWeight;
|
|
75
81
|
private paletteColors;
|
|
76
82
|
/** Stable keyboard tab order -- the order words were declared in `words`,
|
|
77
83
|
* independent of the weight-sorted placement order. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"word-cloud.class.d.ts","sourceRoot":"","sources":["../../../src/components/word-cloud/word-cloud.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAEnF,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;
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lB;;;;mFAI+E;IAC/E,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,aAAa;IAUrB;4DACwD;IACxD,OAAO,CAAC,QAAQ;IAIhB,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CA4BlD;IAED,OAAO,CAAC,QAAQ;IAehB;;;+EAG2E;IAC3E,YAAY,IAAI,IAAI,CAGnB;IAED,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,WAAW,CAOjB;IAEF,OAAO,CAAC,SAAS,CA+Bf;IAEF,iFAAiF;IACjF,OAAO,CAAC,aAAa;IAWrB,MAAM,IAAI,cAAc,CAkDvB;CACF;AAGD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,aAAa,CAAC;KAClC;CACF"}
|
|
@@ -8,17 +8,17 @@ import { html, nothing, svg } from 'lit';
|
|
|
8
8
|
import { property, query, state } from 'lit/decorators.js';
|
|
9
9
|
import { LyraElement } from '../../internal/lyra-element.js';
|
|
10
10
|
import { srOnly } from '../../internal/a11y.js';
|
|
11
|
+
import { isRtl } from '../../internal/rtl.js';
|
|
11
12
|
import { layoutWordCloud, MAX_WORDS } from './word-cloud-layout.js';
|
|
12
13
|
import { styles } from './word-cloud.styles.js';
|
|
13
14
|
const DEFAULT_MIN_FONT_SIZE = 12;
|
|
14
15
|
const DEFAULT_MAX_FONT_SIZE = 48;
|
|
15
16
|
const PALETTE_SIZE = 8;
|
|
16
17
|
const FALLBACK_PALETTE = ['#0969da', '#1a7f37', '#9a6700', '#cf222e', '#8250df', '#bf3989', '#0a7d91', '#57606a'];
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
const WORD_FONT_WEIGHT = 600;
|
|
18
|
+
/** Fallback for `fontWeight()` below when `--lyra-font-weight-semibold`
|
|
19
|
+
* can't be read (e.g. no computed style available). Must match `[part='word']`'s
|
|
20
|
+
* default `font-weight` in word-cloud.styles.ts. */
|
|
21
|
+
const DEFAULT_WORD_FONT_WEIGHT = '600';
|
|
22
22
|
const NAV_KEYS = new Set(['ArrowRight', 'ArrowDown', 'ArrowLeft', 'ArrowUp', 'Home', 'End']);
|
|
23
23
|
/** Padding, in px, between a focused word's glyph box and its drawn focus ring. */
|
|
24
24
|
const FOCUS_RING_PAD = 2;
|
|
@@ -101,7 +101,7 @@ export class LyraWordCloud extends LyraElement {
|
|
|
101
101
|
const ctx = getScratchCtx();
|
|
102
102
|
if (!ctx)
|
|
103
103
|
return text.length * fontSize * 0.6;
|
|
104
|
-
ctx.font = `${
|
|
104
|
+
ctx.font = `${this.fontWeight()} ${fontSize}px ${this.fontFamily()}`;
|
|
105
105
|
return ctx.measureText(text).width;
|
|
106
106
|
};
|
|
107
107
|
this.onWordClick = (word) => {
|
|
@@ -131,10 +131,16 @@ export class LyraWordCloud extends LyraElement {
|
|
|
131
131
|
this.announce(order[0]);
|
|
132
132
|
return;
|
|
133
133
|
}
|
|
134
|
+
// Left/Right swap under RTL, matching lyra-tabs's/lyra-tree's identical
|
|
135
|
+
// physical-direction handling; Up/Down are direction-agnostic and always
|
|
136
|
+
// mean next/previous through the same stable nav order.
|
|
137
|
+
const rtl = isRtl(this);
|
|
138
|
+
const forwardKey = rtl ? 'ArrowLeft' : 'ArrowRight';
|
|
139
|
+
const backwardKey = rtl ? 'ArrowRight' : 'ArrowLeft';
|
|
134
140
|
let next = this.focusedIndex;
|
|
135
|
-
if (e.key ===
|
|
141
|
+
if (e.key === forwardKey || e.key === 'ArrowDown')
|
|
136
142
|
next = Math.min(order.length - 1, this.focusedIndex + 1);
|
|
137
|
-
else if (e.key ===
|
|
143
|
+
else if (e.key === backwardKey || e.key === 'ArrowUp')
|
|
138
144
|
next = Math.max(0, this.focusedIndex - 1);
|
|
139
145
|
else if (e.key === 'Home')
|
|
140
146
|
next = 0;
|
|
@@ -148,6 +154,14 @@ export class LyraWordCloud extends LyraElement {
|
|
|
148
154
|
fontFamily() {
|
|
149
155
|
return getComputedStyle(this).getPropertyValue('--lyra-font').trim() || 'sans-serif';
|
|
150
156
|
}
|
|
157
|
+
/** Reads the actual `--lyra-font-weight-semibold` value the same way
|
|
158
|
+
* `fontFamily()` reads `--lyra-font` -- must match `[part='word']`'s
|
|
159
|
+
* `font-weight` in word-cloud.styles.ts, so a theme/consumer override of
|
|
160
|
+
* that token can't silently desync canvas text measurement (used for the
|
|
161
|
+
* spiral layout's collision boxes) from the actually rendered glyph width. */
|
|
162
|
+
fontWeight() {
|
|
163
|
+
return getComputedStyle(this).getPropertyValue('--lyra-font-weight-semibold').trim() || DEFAULT_WORD_FONT_WEIGHT;
|
|
164
|
+
}
|
|
151
165
|
paletteColors() {
|
|
152
166
|
if (this.palette?.length)
|
|
153
167
|
return this.palette;
|
|
@@ -184,7 +198,7 @@ export class LyraWordCloud extends LyraElement {
|
|
|
184
198
|
if (!this.authorSuppliedAriaLabel) {
|
|
185
199
|
this.setAttribute('aria-label', this.localize('wordCloud', undefined, {
|
|
186
200
|
count: this.cachedLayout.placed.length,
|
|
187
|
-
word: this.cachedLayout.placed.length === 1 ? '
|
|
201
|
+
word: this.localize(this.cachedLayout.placed.length === 1 ? 'wordCloudWord' : 'wordCloudWords'),
|
|
188
202
|
}));
|
|
189
203
|
}
|
|
190
204
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"word-cloud.class.js","sourceRoot":"","sources":["../../../src/components/word-cloud/word-cloud.class.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAA4C,MAAM,KAAK,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EA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CAAC;kDAAqC;AAGpC;IAAvD,QAAQ,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAqC;AAGhF;IAAX,QAAQ,EAAE;4CAAqC;AAGpC;IAAX,QAAQ,EAAE;mDAAqD;AAGhC;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;8CAAoB;AAEpB;IAA9B,KAAK,CAAC,cAAc,CAAC;4CAA+B;AAKpC;IAAhB,KAAK,EAAE;mDAA4C;AAEnC;IAAhB,KAAK,EAAE;+CAAuB"}
|
|
@@ -12,8 +12,9 @@ export interface GroupByRecencyOptions<T> {
|
|
|
12
12
|
* itself *is* a `Date` — the simplest possible default for the common
|
|
13
13
|
* case of grouping a plain array of dates. A returned `number` is treated
|
|
14
14
|
* as a standard JS epoch-milliseconds value (`Date.prototype.getTime()`'s
|
|
15
|
-
* own unit) — not
|
|
16
|
-
*
|
|
15
|
+
* own unit) — not a microsecond-epoch `time` type some backends use; a
|
|
16
|
+
* caller bridging from such data converts in its own `getTimestamp`
|
|
17
|
+
* callback. */
|
|
17
18
|
getTimestamp?: (item: T) => Date | number | string;
|
|
18
19
|
/** The "current" instant bucket boundaries are computed relative to.
|
|
19
20
|
* Defaults to `new Date()`. Overridable for deterministic tests (and for
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-by-recency.d.ts","sourceRoot":"","sources":["../../src/internal/group-by-recency.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAC/D,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC
|
|
1
|
+
{"version":3,"file":"group-by-recency.d.ts","sourceRoot":"","sources":["../../src/internal/group-by-recency.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAC/D,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC;;;;;;oBAMgB;IAChB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;IACnD;;;qEAGiE;IACjE,GAAG,CAAC,EAAE,IAAI,CAAC;IACX;2CACuC;IACvC,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,CAAC,EAAE,CAAC;CACZ;AAkBD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,OAAO,GAAE,qBAAqB,CAAC,CAAC,CAAM,GAAG,aAAa,CAAC,CAAC,CAAC,EAAE,CA6CxG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-by-recency.js","sourceRoot":"","sources":["../../src/internal/group-by-recency.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"group-by-recency.js","sourceRoot":"","sources":["../../src/internal/group-by-recency.ts"],"names":[],"mappings":"AAkCA,MAAM,UAAU,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEvC,MAAM,cAAc,GAA4B;IAC9C,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,WAAW;IACtB,YAAY,EAAE,iBAAiB;IAC/B,KAAK,EAAE,OAAO;CACf,CAAC;AAEF;;kEAEkE;AAClE,SAAS,eAAe,CAAC,CAAO;IAC9B,OAAO,IAAI,I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AI,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC;QAC9E,IAAI,OAAO,IAAI,CAAC,EAAE,CAAC;YACjB,+DAA+D;YAC/D,oEAAoE;YACpE,8DAA8D;YAC9D,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC;aAAM,IAAI,OAAO,KAAK,CAAC,EAAE,CAAC;YACzB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC;aAAM,IAAI,OAAO,IAAI,CAAC,EAAE,CAAC;YACxB,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IAED,MAAM,OAAO,GAAuB,EAAE,CAAC;IACvC,IAAI,KAAK,CAAC,MAAM;QAAE,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IACtE,IAAI,SAAS,CAAC,MAAM;QAAE,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAClF,IAAI,YAAY,CAAC,MAAM;QAAE,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;IAC3F,IAAI,KAAK,CAAC,MAAM;QAAE,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IACtE,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* additional keys as well; components may use a component-specific key when
|
|
4
4
|
* a message is not part of this common set.
|
|
5
5
|
*/
|
|
6
|
-
export type LyraMessageKey = 'noData' | 'noColumns' | 'loadMore' | 'showAllColumns' | 'showFewerColumns' | 'clear' | 'openCalendar' | 'open' | 'close' | 'closeNavigation' | 'openNavigation' | 'resizeNavigation' | 'copy' | 'copyJson' | 'copied' | 'expand' | 'collapse' | 'expandMessage' | 'collapseMessage' | 'showMore' | 'showMoreCount' | 'showLess' | 'retry' | 'remove' | 'loading' | 'loadingDocument' | 'noMatches' | 'previous' | 'next' | 'cancel' | 'confirm' | 'search' | 'circularReference' | 'items' | 'item' | 'keys' | 'key' | 'trendOf' | 'wordCloud';
|
|
6
|
+
export type LyraMessageKey = 'noData' | 'noColumns' | 'loadMore' | 'showAllColumns' | 'showFewerColumns' | 'clear' | 'openCalendar' | 'open' | 'close' | 'closeNavigation' | 'openNavigation' | 'resizeNavigation' | 'copy' | 'copyJson' | 'copied' | 'expand' | 'collapse' | 'expandMessage' | 'collapseMessage' | 'showMore' | 'showMoreCount' | 'showLess' | 'retry' | 'remove' | 'removeWithContext' | 'loading' | 'loadingDocument' | 'noMatches' | 'previous' | 'next' | 'cancel' | 'confirm' | 'search' | 'circularReference' | 'items' | 'item' | 'keys' | 'key' | 'trendOf' | 'wordCloud' | 'notInCatalog' | 'sendMessage' | 'stopGenerating' | 'dropzoneReleaseToAdd' | 'dropzoneRejectedType' | 'fileSizeUnitB' | 'fileSizeUnitKb' | 'fileSizeUnitMb' | 'fileSizeUnitGb' | 'fileSizeUnitTb' | 'chartCategory' | 'chartPointLabel' | 'resetZoom' | 'chatSending' | 'chatResponding' | 'chatFailedToSend' | 'chatFailedAnnounce' | 'chatCompleteAnnounce' | 'showMoreCollapsed' | 'expandCode' | 'collapseCode' | 'copyCode' | 'copiedToClipboard' | 'codeRegion' | 'codeRegionWithLanguage' | 'copyDiff' | 'jsonArray' | 'jsonObject' | 'jsonValue' | 'jsonCopyLabel' | 'jsonExpandLabel' | 'jsonCollapseLabel' | 'jsonItemCount' | 'jsonItemCountPlural' | 'jsonKeyCount' | 'jsonKeyCountPlural' | 'untitledSource' | 'sourcePageSuffix' | 'toolCall' | 'statusPending' | 'statusRunning' | 'statusSuccess' | 'statusError' | 'statusDenied' | 'maximize' | 'restore' | 'wordCloudWord' | 'wordCloudWords' | 'pollPause' | 'pollResume' | 'pollRefreshing' | 'pollPaused' | 'pollPausedAnnounce' | 'pollResumedAnnounce' | 'pollRefreshingAnnounce' | 'attachmentAdd' | 'attachmentTriggerFiles' | 'attachmentTriggerImage' | 'attachmentTriggerCamera' | 'attachmentMenuFiles' | 'attachmentMenuImage' | 'attachmentMenuCamera' | 'checkboxRequired' | 'switchRequired' | 'citationHighConfidence' | 'citationMediumConfidence' | 'citationLowConfidence' | 'citationVerified' | 'citationUnverified' | 'contextMeterUsed' | 'contextMeterUsedOfTotal' | 'untitledConversation' | 'dockPanelCollapse' | 'dockPanelExpand' | 'dockPanelResize' | 'documentPreviewAlt' | 'documentPreviewUrlNotAllowed' | 'documentPreviewFailedToLoad' | 'documentPreviewGenericError' | 'exportButtonLabel' | 'generationStatusToken' | 'generationStatusTokens' | 'graphDataList' | 'navigation' | 'attachmentUploading' | 'attachmentUploadFailed' | 'attachmentUntitledFile' | 'chartTrendIncreasing' | 'chartTrendDecreasing' | 'chartTrendFlat' | 'chartSummary' | 'chartSeriesNoData' | 'chartSummaryWithData' | 'chartSummaryEmpty' | 'chartData' | 'chart' | 'boxPlotSeriesSummary' | 'boxPlotSummaryWithData' | 'boxPlotSummaryEmpty' | 'boxPlotData' | 'chartSeriesLabel' | 'boxPlotMin' | 'boxPlotQ1' | 'boxPlotMedian' | 'boxPlotQ3' | 'boxPlotMax' | 'boxPlot' | 'histogramFrequency' | 'liteChartMarkPosition' | 'composerLabel' | 'citation' | 'comboboxOverflow' | 'comboboxRequired' | 'comboboxLabel' | 'rename' | 'previousMonth' | 'nextMonth' | 'chooseDate' | 'date' | 'dateInputMinMessage' | 'dateInputMaxMessage' | 'dateInputPastDisabled' | 'dateInputFutureDisabled' | 'dateInputInvalid' | 'documentPreviewEmpty' | 'convertingDocument' | 'documentPreviewNotAvailable' | 'documentPreviewGenericFile' | 'documentPreviewTypeDocument' | 'documentPreviewTypeImage' | 'download' | 'exportFormatMenuLabel' | 'fileInputDefaultLabel' | 'fileInputAccepted' | 'fileInputRejected' | 'elapsedSecondsUnit' | 'elapsedMinutesSecondsTemplate' | 'tokensPerSecondUnit' | 'graphNode' | 'graphLink' | 'graphDiagram' | 'heatmapMatrixCellLabel' | 'heatmapCalendarLabel' | 'heatmapMatrixLabel' | 'heatmapCalendarCellLabel' | 'heatmapNoDataValue' | 'heatmapDefaultRowLabel' | 'heatmapDefaultColLabel' | 'mediaCardUntitledFile' | 'mediaCardOpenName' | 'mediaCardOpenAttachment' | 'mediaCardImageAttachment' | 'mediaCardVideoAttachment' | 'mentionSuggestions' | 'map' | 'model' | 'selectModel' | 'modelSelectNoModels' | 'modelSelectRequired' | 'temperature' | 'play' | 'playbackPosition' | 'selectValueMissing' | 'select' | 'sourceListDefaultLabel' | 'resizeDivider' | 'trendUnchanged' | 'trendIncreased' | 'trendDecreased' | 'trendGoodSuffix' | 'trendBadSuffix' | 'streamStalled' | 'streamStallAnnounce' | 'streamRecoverAnnounce' | 'streamStallClearedAnnounce' | 'thinkingPanelLabel' | 'thoughtFor' | 'thinking' | 'rangeStart' | 'rangeEnd' | 'closeWithContext' | 'toolApprovalHeading' | 'toolApprovalGenericTool' | 'toolApprovalArgsLabel' | 'deny' | 'edit' | 'approve' | 'invalidJson' | 'fieldRequired' | 'fieldMustBeString' | 'fieldMustBeNumber' | 'fieldMustBeInteger' | 'fieldMustBeBoolean' | 'unsupportedFieldType' | 'fieldMustBeOneOf' | 'fieldMustEqual' | 'schemaMustBeObject' | 'schemaPropertiesMustBeFlat' | 'valueMustBeSerializable' | 'valueInvalid' | 'durationUnitMs' | 'durationUnitS' | 'selectTools' | 'searchToolsPlaceholder' | 'useDefaultTools' | 'toolSelectCustomizeHint' | 'noMatchesQuery' | 'toolSelectNoneAvailable' | 'toolSelectSummary' | 'toolCount' | 'toolCountPlural' | 'otherCategory' | 'widgetFullscreenPanel' | 'widgetViewGroup' | 'widgetExitFullscreen' | 'widgetExpandToFullscreen' | 'menuLabel' | 'pause' | 'kbdEscapeVisual' | 'kbdEscapeWord' | 'kbdTabWord' | 'kbdSpaceWord' | 'kbdDeleteVisual' | 'kbdDeleteWord' | 'kbdHomeWord' | 'kbdEndWord' | 'kbdPageUpVisual' | 'kbdPageUpWord' | 'kbdPageDownVisual' | 'kbdPageDownWord' | 'kbdEnterWord' | 'kbdBackspaceWord' | 'kbdArrowUpWord' | 'kbdArrowDownWord' | 'kbdArrowLeftWord' | 'kbdArrowRightWord' | 'kbdPlusWord' | 'kbdMinusWord' | 'kbdCommandWord' | 'kbdControlVisual' | 'kbdControlWord' | 'kbdOptionWord' | 'kbdAltWord' | 'kbdShiftWord';
|
|
7
7
|
export type LyraLocaleStrings = Partial<Record<LyraMessageKey, string>> & Record<string, string | undefined>;
|
|
8
8
|
/** Register or extend messages for a locale. */
|
|
9
9
|
export declare function registerLyraLocale(locale: string, strings: LyraLocaleStrings): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization.d.ts","sourceRoot":"","sources":["../../src/internal/localization.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,cAAc,GACtB,QAAQ,GACR,WAAW,GACX,UAAU,GACV,gBAAgB,GAChB,kBAAkB,GAClB,OAAO,GACP,cAAc,GACd,MAAM,GACN,OAAO,GACP,iBAAiB,GACjB,gBAAgB,GAChB,kBAAkB,GAClB,MAAM,GACN,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,eAAe,GACf,iBAAiB,GACjB,UAAU,GACV,eAAe,GACf,UAAU,GACV,OAAO,GACP,QAAQ,GACR,SAAS,GACT,iBAAiB,GACjB,WAAW,GACX,UAAU,GACV,MAAM,GACN,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,mBAAmB,GACnB,OAAO,GACP,MAAM,GACN,MAAM,GACN,KAAK,GACL,SAAS,GACT,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"localization.d.ts","sourceRoot":"","sources":["../../src/internal/localization.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,cAAc,GACtB,QAAQ,GACR,WAAW,GACX,UAAU,GACV,gBAAgB,GAChB,kBAAkB,GAClB,OAAO,GACP,cAAc,GACd,MAAM,GACN,OAAO,GACP,iBAAiB,GACjB,gBAAgB,GAChB,kBAAkB,GAClB,MAAM,GACN,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,eAAe,GACf,iBAAiB,GACjB,UAAU,GACV,eAAe,GACf,UAAU,GACV,OAAO,GACP,QAAQ,GACR,mBAAmB,GACnB,SAAS,GACT,iBAAiB,GACjB,WAAW,GACX,UAAU,GACV,MAAM,GACN,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,mBAAmB,GACnB,OAAO,GACP,MAAM,GACN,MAAM,GACN,KAAK,GACL,SAAS,GACT,WAAW,GACX,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,sBAAsB,GACtB,sBAAsB,GACtB,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,eAAe,GACf,iBAAiB,GACjB,WAAW,GACX,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,oBAAoB,GACpB,sBAAsB,GACtB,mBAAmB,GACnB,YAAY,GACZ,cAAc,GACd,UAAU,GACV,mBAAmB,GACnB,YAAY,GACZ,wBAAwB,GACxB,UAAU,GACV,WAAW,GACX,YAAY,GACZ,WAAW,GACX,eAAe,GACf,iBAAiB,GACjB,mBAAmB,GACnB,eAAe,GACf,qBAAqB,GACrB,cAAc,GACd,oBAAoB,GACpB,gBAAgB,GAChB,kBAAkB,GAClB,UAAU,GACV,eAAe,GACf,eAAe,GACf,eAAe,GACf,aAAa,GACb,cAAc,GACd,UAAU,GACV,SAAS,GACT,eAAe,GACf,gBAA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