@aceshooting/lyra-ui 9.1.1 → 10.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +597 -0
- package/custom-elements.json +1 -1
- package/dist/cli/migrate-wa.mjs +52 -0
- package/dist/cli/migration-contract.json +1 -1
- package/dist/components/agent-tools/activity-feed/activity-feed.class.js +1 -1
- package/dist/components/agent-tools/activity-feed/activity-feed.styles.js +0 -16
- package/dist/components/agent-tools/agent-eval-dashboard/agent-eval-dashboard.class.js +1 -1
- package/dist/components/agent-tools/agent-eval-dashboard/agent-eval-dashboard.styles.js +7 -5
- package/dist/components/agent-tools/agent-run/agent-run.class.js +2 -2
- package/dist/components/agent-tools/agent-run/agent-run.styles.js +0 -13
- package/dist/components/agent-tools/agent-trace/agent-trace.styles.js +7 -4
- package/dist/components/agent-tools/approval-queue/approval-queue.styles.js +7 -5
- package/dist/components/agent-tools/artifact-panel/artifact-panel.styles.js +0 -3
- package/dist/components/agent-tools/browser-frame/browser-frame.styles.js +3 -5
- package/dist/components/agent-tools/commit-card/commit-card.styles.js +0 -10
- package/dist/components/agent-tools/compare-panel/compare-panel.styles.js +11 -6
- package/dist/components/agent-tools/confirm-bar/confirm-bar.styles.js +0 -46
- package/dist/components/agent-tools/eval-dataset/eval-dataset.styles.js +0 -7
- package/dist/components/agent-tools/evaluation-run/evaluation-run.class.js +2 -2
- package/dist/components/agent-tools/prompt-studio/prompt-studio.styles.js +0 -15
- package/dist/components/agent-tools/result-card/result-card.styles.js +0 -7
- package/dist/components/agent-tools/result-card/result-field.styles.js +0 -5
- package/dist/components/agent-tools/schema-viewer/schema-viewer.styles.js +0 -3
- package/dist/components/agent-tools/span-waterfall/span-waterfall.styles.js +0 -15
- package/dist/components/agent-tools/stack-trace/stack-trace.styles.js +0 -20
- package/dist/components/agent-tools/subagent-panel/subagent-panel.class.js +2 -2
- package/dist/components/agent-tools/subagent-panel/subagent-panel.styles.js +0 -3
- package/dist/components/agent-tools/task-list/task-list.styles.js +0 -15
- package/dist/components/agent-tools/terminal/terminal.class.d.ts +11 -6
- package/dist/components/agent-tools/terminal/terminal.class.js +4 -4
- package/dist/components/agent-tools/terminal/terminal.styles.js +0 -46
- package/dist/components/agent-tools/test-results/test-results.class.js +2 -2
- package/dist/components/agent-tools/test-results/test-results.styles.js +0 -5
- package/dist/components/agent-tools/thinking-panel/thinking-panel.styles.js +0 -41
- package/dist/components/agent-tools/tool-approval-dialog/tool-approval-dialog.styles.js +0 -41
- package/dist/components/agent-tools/tool-call-chip/tool-call-chip.styles.js +0 -30
- package/dist/components/agent-tools/tool-param-form/tool-param-form.class.js +6 -6
- package/dist/components/agent-tools/tool-param-form/tool-param-form.styles.js +0 -5
- package/dist/components/agent-tools/tool-result-dialog/tool-result-dialog.styles.js +0 -20
- package/dist/components/agent-tools/tool-result-view/tool-result-view.styles.js +0 -4
- package/dist/components/agent-tools/tool-select-dialog/tool-select-dialog.styles.js +0 -21
- package/dist/components/agent-tools/trace-tree/trace-tree.styles.js +7 -31
- package/dist/components/charts/chart/box-plot.styles.js +0 -20
- package/dist/components/charts/chart/chart-colors.d.ts +1 -1
- package/dist/components/charts/chart/chart-colors.js +1 -1
- package/dist/components/charts/chart/chart-core-loader.d.ts +1 -0
- package/dist/components/charts/chart/chart-core-loader.js +1 -1
- package/dist/components/charts/chart/chart-feature-loader.d.ts +35 -0
- package/dist/components/charts/chart/chart-feature-loader.js +1 -1
- package/dist/components/charts/chart/chart.class.d.ts +93 -0
- package/dist/components/charts/chart/chart.class.js +3 -3
- package/dist/components/charts/chart/chart.styles.js +0 -27
- package/dist/components/charts/chart/lite-chart.class.d.ts +20 -1
- package/dist/components/charts/chart/lite-chart.class.js +4 -4
- package/dist/components/charts/chart/lite-chart.styles.js +0 -27
- package/dist/components/conversation/agent-workspace/agent-workspace.class.d.ts +20 -0
- package/dist/components/conversation/agent-workspace/agent-workspace.class.js +3 -1
- package/dist/components/conversation/agent-workspace/agent-workspace.styles.js +3 -0
- package/dist/components/conversation/audio-visualizer/audio-visualizer.styles.js +0 -7
- package/dist/components/conversation/branch-picker/branch-picker.styles.js +0 -3
- package/dist/components/conversation/chat-composer/chat-composer.styles.js +0 -51
- package/dist/components/conversation/chat-message/chat-message.styles.js +7 -35
- package/dist/components/conversation/chat-viewport/chat-viewport.class.js +1 -1
- package/dist/components/conversation/chat-viewport/chat-viewport.styles.js +0 -33
- package/dist/components/conversation/checkpoint/checkpoint.class.js +1 -1
- package/dist/components/conversation/checkpoint/checkpoint.styles.js +0 -3
- package/dist/components/conversation/code-block/code-block-shared.d.ts +5 -2
- package/dist/components/conversation/code-block/code-block.class.js +1 -1
- package/dist/components/conversation/code-block/code-block.styles.js +4 -95
- package/dist/components/conversation/code-block/code-loader.d.ts +11 -0
- package/dist/components/conversation/code-block/code-loader.js +1 -1
- package/dist/components/conversation/code-block/shiki-types.d.ts +12 -0
- package/dist/components/conversation/code-block/shiki-types.js +1 -1
- package/dist/components/conversation/conversation-item/conversation-item.styles.js +8 -54
- package/dist/components/conversation/generation-metrics/generation-metrics.class.js +2 -2
- package/dist/components/conversation/generation-metrics/generation-metrics.styles.js +0 -17
- package/dist/components/conversation/markdown/markdown-base.class.js +1 -1
- package/dist/components/conversation/markdown/markdown.styles.js +0 -41
- package/dist/components/conversation/message-actions/message-actions.styles.js +0 -3
- package/dist/components/conversation/message-feedback/message-feedback.styles.js +0 -35
- package/dist/components/conversation/message-parts/message-parts.class.d.ts +1 -1
- package/dist/components/conversation/message-parts/message-parts.styles.js +0 -5
- package/dist/components/conversation/model-select/model-select.class.js +3 -3
- package/dist/components/conversation/model-select/model-select.styles.js +12 -47
- package/dist/components/conversation/model-settings-panel/model-settings-panel.styles.js +0 -6
- package/dist/components/conversation/prompt-input/prompt-input.class.d.ts +3 -0
- package/dist/components/conversation/prompt-input/prompt-input.styles.js +0 -10
- package/dist/components/conversation/push-to-talk/push-to-talk.styles.js +0 -8
- package/dist/components/conversation/selection-toolbar/selection-toolbar.styles.js +1 -11
- package/dist/components/conversation/stream-status/stream-status.styles.js +0 -16
- package/dist/components/conversation/streaming-text/streaming-text.styles.js +0 -15
- package/dist/components/conversation/suggestion-chips/suggestion-chips.styles.js +0 -5
- package/dist/components/conversation/thread-list/thread-list.styles.js +0 -23
- package/dist/components/conversation/transcript-feed/transcript-feed.class.d.ts +16 -4
- package/dist/components/conversation/transcript-feed/transcript-feed.class.js +1 -1
- package/dist/components/conversation/transcript-feed/transcript-feed.styles.js +0 -1
- package/dist/components/conversation/typing-indicator/typing-indicator.styles.js +0 -23
- package/dist/components/conversation/usage-badge/usage-badge.styles.js +0 -3
- package/dist/components/conversation/voice-picker/voice-picker.class.js +3 -3
- package/dist/components/conversation/voice-picker/voice-picker.styles.js +9 -29
- package/dist/components/conversation/widget-renderer/resolve.d.ts +2 -0
- package/dist/components/conversation/widget-renderer/resolve.js +1 -1
- package/dist/components/data/calendar/calendar.class.d.ts +15 -2
- package/dist/components/data/calendar/calendar.class.js +2 -2
- package/dist/components/data/calendar/calendar.styles.js +2 -28
- package/dist/components/data/condition-builder/condition-builder.class.d.ts +10 -6
- package/dist/components/data/condition-builder/condition-builder.class.js +2 -2
- package/dist/components/data/condition-builder/condition-builder.styles.js +0 -6
- package/dist/components/data/context-meter/context-meter.styles.js +0 -24
- package/dist/components/data/data-grid/data-grid.class.js +3 -3
- package/dist/components/data/data-grid/data-grid.styles.js +0 -22
- package/dist/components/data/document-library/document-library.class.js +2 -2
- package/dist/components/data/document-library/document-library.styles.js +0 -4
- package/dist/components/data/env-list/env-list.class.js +1 -1
- package/dist/components/data/env-list/env-list.styles.js +7 -4
- package/dist/components/data/file-tree/file-tree.class.d.ts +12 -0
- package/dist/components/data/flow-canvas/flow-canvas.styles.js +12 -19
- package/dist/components/data/flow-controls/flow-controls.class.js +2 -2
- package/dist/components/data/flow-controls/flow-controls.styles.js +3 -36
- package/dist/components/data/flow-minimap/flow-minimap.class.js +1 -1
- package/dist/components/data/flow-minimap/flow-minimap.styles.js +0 -9
- package/dist/components/data/flow-node/flow-node.styles.js +0 -23
- package/dist/components/data/flow-run-status/flow-run-status.class.js +1 -1
- package/dist/components/data/flow-run-status/flow-run-status.styles.js +0 -7
- package/dist/components/data/graph-query-builder/graph-query-builder.class.d.ts +0 -7
- package/dist/components/data/graph-query-builder/graph-query-builder.class.js +1 -1
- package/dist/components/data/graph-query-builder/graph-query-builder.styles.js +0 -10
- package/dist/components/data/heatmap/heatmap-scale.d.ts +20 -0
- package/dist/components/data/heatmap/heatmap-scale.js +1 -1
- package/dist/components/data/heatmap/heatmap.class.d.ts +84 -1
- package/dist/components/data/heatmap/heatmap.class.js +2 -2
- package/dist/components/data/heatmap/heatmap.styles.js +0 -54
- package/dist/components/data/pagination/pagination.styles.js +23 -46
- package/dist/components/data/sequence-strip/sequence-strip.class.d.ts +34 -1
- package/dist/components/data/sequence-strip/sequence-strip.class.js +5 -2
- package/dist/components/data/sequence-strip/sequence-strip.styles.js +14 -20
- package/dist/components/data/sparkline/sparkline.class.js +1 -1
- package/dist/components/data/stat/stat.styles.js +0 -67
- package/dist/components/data/table/table.class.d.ts +42 -3
- package/dist/components/data/table/table.class.js +4 -4
- package/dist/components/data/table/table.styles.js +20 -91
- package/dist/components/data/timeline/timeline-item.styles.js +0 -30
- package/dist/components/data/timeline/timeline.class.d.ts +89 -1
- package/dist/components/data/timeline/timeline.class.js +2 -2
- package/dist/components/data/timeline/timeline.styles.js +111 -31
- package/dist/components/data/tree/tree-item.styles.js +1 -28
- package/dist/components/data/tree/tree.class.js +2 -2
- package/dist/components/data/tree/tree.styles.js +0 -6
- package/dist/components/data/word-cloud/word-cloud.styles.js +0 -5
- package/dist/components/forms/button/button.class.js +1 -1
- package/dist/components/forms/button/button.styles.js +0 -105
- package/dist/components/forms/checkbox/checkbox.class.d.ts +3 -0
- package/dist/components/forms/checkbox/checkbox.class.js +1 -1
- package/dist/components/forms/checkbox/checkbox.styles.js +0 -39
- package/dist/components/forms/checkbox-group/checkbox-group.class.d.ts +21 -2
- package/dist/components/forms/checkbox-group/checkbox-group.class.js +1 -1
- package/dist/components/forms/checkbox-group/checkbox-group.styles.js +0 -18
- package/dist/components/forms/code-editor/code-editor.styles.js +0 -30
- package/dist/components/forms/color-picker/color-picker.class.js +2 -2
- package/dist/components/forms/color-picker/color-picker.styles.js +0 -69
- package/dist/components/forms/combobox/combobox.class.js +2 -2
- package/dist/components/forms/combobox/combobox.styles.js +22 -111
- package/dist/components/forms/combobox/option.styles.js +7 -1
- package/dist/components/forms/date-picker/date-input.class.js +1 -1
- package/dist/components/forms/date-picker/date-input.styles.js +12 -67
- package/dist/components/forms/date-picker/date-picker.class.d.ts +1 -0
- package/dist/components/forms/date-picker/date-picker.class.js +22 -20
- package/dist/components/forms/date-picker/date-picker.styles.js +36 -29
- package/dist/components/forms/emoji-picker/emoji-data-loader.d.ts +6 -3
- package/dist/components/forms/emoji-picker/emoji-data-loader.js +1 -1
- package/dist/components/forms/emoji-picker/emoji-picker.class.d.ts +8 -1
- package/dist/components/forms/emoji-picker/emoji-picker.class.js +1 -1
- package/dist/components/forms/emoji-picker/emoji-picker.styles.js +3 -41
- package/dist/components/forms/icon-button/icon-button.class.js +1 -1
- package/dist/components/forms/icon-button/icon-button.styles.js +0 -16
- package/dist/components/forms/input/input.styles.js +0 -54
- package/dist/components/forms/input/number-input.styles.d.ts +4 -5
- package/dist/components/forms/input/number-input.styles.js +0 -11
- package/dist/components/forms/input/time-input-shared.d.ts +11 -0
- package/dist/components/forms/input/time-input-shared.js +1 -1
- package/dist/components/forms/input/time-input.class.d.ts +11 -2
- package/dist/components/forms/input/time-input.class.js +1 -1
- package/dist/components/forms/input/time-input.styles.js +0 -6
- package/dist/components/forms/locale-picker/locale-picker.class.js +2 -2
- package/dist/components/forms/locale-picker/locale-picker.styles.js +1 -26
- package/dist/components/forms/otp-input/otp-input.class.js +3 -3
- package/dist/components/forms/otp-input/otp-input.styles.js +0 -16
- package/dist/components/forms/phone-input/phone-input.class.d.ts +9 -1
- package/dist/components/forms/phone-input/phone-input.class.js +2 -2
- package/dist/components/forms/phone-input/phone-input.styles.js +0 -37
- package/dist/components/forms/radio/radio-button.styles.js +1 -30
- package/dist/components/forms/radio/radio-group.styles.js +0 -4
- package/dist/components/forms/radio/radio.styles.js +0 -44
- package/dist/components/forms/rubric-form/rubric-form.styles.js +0 -5
- package/dist/components/forms/select/select.class.js +1 -1
- package/dist/components/forms/select/select.styles.js +14 -114
- package/dist/components/forms/slider/slider.styles.js +0 -55
- package/dist/components/forms/swatch-picker/swatch-picker.class.d.ts +0 -11
- package/dist/components/forms/swatch-picker/swatch-picker.class.js +2 -2
- package/dist/components/forms/swatch-picker/swatch-picker.styles.js +0 -77
- package/dist/components/forms/switch/switch.class.d.ts +3 -0
- package/dist/components/forms/switch/switch.class.js +1 -1
- package/dist/components/forms/switch/switch.styles.js +0 -37
- package/dist/components/forms/textarea/textarea.styles.js +0 -28
- package/dist/components/forms/time-range/time-range.styles.js +12 -84
- package/dist/components/forms/token-input/token-input.class.d.ts +23 -9
- package/dist/components/forms/token-input/token-input.class.js +1 -1
- package/dist/components/forms/token-input/token-input.styles.js +1 -54
- package/dist/components/layout/app-rail/app-rail-item.class.js +2 -2
- package/dist/components/layout/app-rail/app-rail-item.styles.js +0 -13
- package/dist/components/layout/app-rail/app-rail.class.d.ts +5 -0
- package/dist/components/layout/app-rail/app-rail.class.js +1 -1
- package/dist/components/layout/app-rail/app-rail.styles.js +0 -46
- package/dist/components/layout/button-group/button-group.styles.js +0 -6
- package/dist/components/layout/card/card.class.d.ts +12 -0
- package/dist/components/layout/card/card.styles.js +3 -11
- package/dist/components/layout/carousel/carousel.styles.js +0 -1
- package/dist/components/layout/command-palette/command-palette.class.d.ts +8 -0
- package/dist/components/layout/command-palette/command-palette.class.js +3 -1
- package/dist/components/layout/command-palette/command-palette.styles.js +1 -13
- package/dist/components/layout/control-group/control-group.styles.js +0 -7
- package/dist/components/layout/dashboard-grid/dashboard-grid.styles.js +6 -25
- package/dist/components/layout/details/accordion.class.d.ts +13 -0
- package/dist/components/layout/details/accordion.class.js +1 -1
- package/dist/components/layout/details/details.class.js +1 -1
- package/dist/components/layout/details/details.styles.js +0 -12
- package/dist/components/layout/dock-panel/dock-panel.styles.js +0 -45
- package/dist/components/layout/drilldown-panel/drilldown-panel.class.d.ts +2 -0
- package/dist/components/layout/drilldown-panel/drilldown-panel.class.js +2 -2
- package/dist/components/layout/drilldown-panel/drilldown-panel.styles.js +0 -4
- package/dist/components/layout/filter-bar/filter-bar.class.js +1 -1
- package/dist/components/layout/filter-bar/filter-bar.styles.js +0 -9
- package/dist/components/layout/menu/menu-item.class.d.ts +5 -0
- package/dist/components/layout/menu/menu-item.class.js +1 -1
- package/dist/components/layout/menu/menu-item.styles.js +0 -49
- package/dist/components/layout/menu/menu-label.styles.js +0 -2
- package/dist/components/layout/menu/menu.styles.js +0 -18
- package/dist/components/layout/multi-split/multi-split.styles.js +0 -63
- package/dist/components/layout/page/page.class.d.ts +4 -0
- package/dist/components/layout/page/page.class.js +1 -1
- package/dist/components/layout/reorder-list/reorder-item.styles.js +0 -4
- package/dist/components/layout/responsive-panel/responsive-panel.styles.js +0 -27
- package/dist/components/layout/scroller/scroller.styles.js +0 -20
- package/dist/components/layout/segmented/segmented.class.d.ts +7 -1
- package/dist/components/layout/segmented/segmented.class.js +1 -1
- package/dist/components/layout/segmented/segmented.styles.js +69 -37
- package/dist/components/layout/split-panel/split-panel.styles.js +1 -7
- package/dist/components/layout/stepper/stepper.class.d.ts +8 -1
- package/dist/components/layout/stepper/stepper.class.js +1 -1
- package/dist/components/layout/stepper/stepper.styles.js +140 -41
- package/dist/components/layout/tab-group/tab-group.class.d.ts +4 -1
- package/dist/components/layout/tab-group/tab-group.styles.js +9 -75
- package/dist/components/layout/tab-group/tab.styles.js +0 -2
- package/dist/components/layout/virtual-list/virtual-list.class.d.ts +4 -4
- package/dist/components/layout/virtual-list/virtual-list.class.js +1 -1
- package/dist/components/layout/virtual-list/virtual-list.styles.js +0 -68
- package/dist/components/layout/widget/widget.class.d.ts +5 -1
- package/dist/components/layout/widget/widget.class.js +1 -1
- package/dist/components/layout/widget/widget.styles.js +97 -40
- package/dist/components/media/animated-image/animated-image.class.d.ts +3 -0
- package/dist/components/media/animated-image/animated-image.class.js +1 -1
- package/dist/components/media/animated-image/animated-image.styles.js +0 -28
- package/dist/components/media/attachment-chip/attachment-chip.class.d.ts +1 -1
- package/dist/components/media/attachment-chip/attachment-chip.class.js +1 -1
- package/dist/components/media/attachment-chip/attachment-chip.styles.js +0 -31
- package/dist/components/media/attachment-trigger/attachment-trigger.class.js +3 -3
- package/dist/components/media/attachment-trigger/attachment-trigger.styles.js +0 -40
- package/dist/components/media/av-player/av-player.class.d.ts +5 -6
- package/dist/components/media/av-player/av-player.class.js +1 -1
- package/dist/components/media/av-player/av-player.styles.js +0 -45
- package/dist/components/media/avatar/avatar.styles.js +3 -16
- package/dist/components/media/file-icon/file-icon.class.d.ts +1 -2
- package/dist/components/media/file-icon/file-icon.class.js +1 -1
- package/dist/components/media/file-input/file-input.class.d.ts +12 -0
- package/dist/components/media/file-input/file-input.styles.js +3 -24
- package/dist/components/media/flag/flag.class.d.ts +20 -0
- package/dist/components/media/flag/flag.class.js +4 -2
- package/dist/components/media/flag/flag.styles.js +7 -1
- package/dist/components/media/flag/language-map.d.ts +10 -0
- package/dist/components/media/flag/language-map.js +1 -1
- package/dist/components/media/image-comparer/image-comparer.styles.js +4 -33
- package/dist/components/media/image-viewer/image-viewer.class.js +0 -2
- package/dist/components/media/image-viewer/image-viewer.styles.js +7 -27
- package/dist/components/media/lightbox/lightbox.class.js +0 -2
- package/dist/components/media/lightbox/lightbox.styles.js +0 -21
- package/dist/components/media/map/map-loader.d.ts +19 -1
- package/dist/components/media/map/map-loader.js +1 -1
- package/dist/components/media/map/map.class.d.ts +141 -1
- package/dist/components/media/map/map.class.js +15 -3
- package/dist/components/media/map/map.styles.js +20 -17
- package/dist/components/media/media-card/media-card.class.d.ts +14 -3
- package/dist/components/media/media-card/media-card.class.js +1 -1
- package/dist/components/media/media-card/media-card.styles.js +2 -28
- package/dist/components/media/pan-zoom/pan-zoom.styles.js +0 -3
- package/dist/components/media/qr-code/qr-code.class.d.ts +3 -2
- package/dist/components/media/qr-code/qr-code.class.js +2 -2
- package/dist/components/media/qr-code/qr-code.styles.js +0 -3
- package/dist/components/media/sequence-playback/sequence-playback.class.d.ts +2 -0
- package/dist/components/media/sequence-playback/sequence-playback.class.js +2 -1
- package/dist/components/media/sequence-playback/sequence-playback.styles.js +0 -19
- package/dist/components/media/video/video.class.d.ts +23 -2
- package/dist/components/media/video/video.class.js +3 -3
- package/dist/components/media/video/video.styles.js +4 -2
- package/dist/components/media/zoomable-frame/zoomable-frame.class.d.ts +3 -2
- package/dist/components/media/zoomable-frame/zoomable-frame.class.js +2 -2
- package/dist/components/media/zoomable-frame/zoomable-frame.styles.js +0 -5
- package/dist/components/overlays/alert/alert.styles.js +4 -2
- package/dist/components/overlays/badge/badge.styles.js +4 -48
- package/dist/components/overlays/badge/tag.styles.js +0 -14
- package/dist/components/overlays/callout/callout.styles.js +0 -11
- package/dist/components/overlays/chip/chip-group.styles.js +0 -18
- package/dist/components/overlays/chip/chip.styles.js +6 -69
- package/dist/components/overlays/dialog/confirm.d.ts +1 -4
- package/dist/components/overlays/dialog/confirm.js +1 -1
- package/dist/components/overlays/dialog/dialog.class.d.ts +12 -9
- package/dist/components/overlays/dialog/dialog.class.js +1 -1
- package/dist/components/overlays/dialog/dialog.styles.js +0 -43
- package/dist/components/overlays/drawer/drawer.class.d.ts +2 -2
- package/dist/components/overlays/drawer/drawer.styles.js +0 -9
- package/dist/components/overlays/empty/empty.styles.js +0 -12
- package/dist/components/overlays/kbd/kbd.styles.js +0 -8
- package/dist/components/overlays/overlay/dropdown.class.d.ts +1 -6
- package/dist/components/overlays/overlay/dropdown.class.js +2 -2
- package/dist/components/overlays/overlay/overlay.styles.js +0 -28
- package/dist/components/overlays/overlay/popover.class.d.ts +9 -1
- package/dist/components/overlays/overlay/popover.class.js +2 -2
- package/dist/components/overlays/overlay/tooltip.class.d.ts +10 -0
- package/dist/components/overlays/overlay/tooltip.class.js +1 -1
- package/dist/components/overlays/popup/popup.class.d.ts +1 -0
- package/dist/components/overlays/popup/popup.class.js +1 -1
- package/dist/components/overlays/popup/popup.styles.js +0 -15
- package/dist/components/overlays/progress/progress-ring.class.d.ts +9 -1
- package/dist/components/overlays/progress/progress-ring.class.js +3 -3
- package/dist/components/overlays/progress/progress.styles.js +0 -21
- package/dist/components/overlays/rating/rating.styles.js +0 -25
- package/dist/components/overlays/skeleton/skeleton.styles.js +0 -4
- package/dist/components/overlays/spinner/spinner.styles.js +0 -3
- package/dist/components/overlays/toast/toast-item.styles.js +3 -45
- package/dist/components/retrieval/chunk-inspector/chunk-inspector.styles.js +0 -35
- package/dist/components/retrieval/citation-badge/citation-badge.class.d.ts +2 -2
- package/dist/components/retrieval/citation-badge/citation-badge.class.js +3 -3
- package/dist/components/retrieval/citation-badge/citation-badge.styles.js +0 -20
- package/dist/components/retrieval/claim-evidence/claim-evidence.styles.js +0 -8
- package/dist/components/retrieval/community-card/community-card.class.d.ts +1 -0
- package/dist/components/retrieval/community-card/community-card.styles.js +0 -6
- package/dist/components/retrieval/embedding-explorer/embedding-explorer.styles.js +8 -12
- package/dist/components/retrieval/entity-card/entity-card.class.d.ts +4 -3
- package/dist/components/retrieval/entity-card/entity-card.class.js +1 -1
- package/dist/components/retrieval/entity-card/entity-card.styles.js +0 -12
- package/dist/components/retrieval/entity-chip/entity-chip.class.d.ts +10 -4
- package/dist/components/retrieval/entity-chip/entity-chip.class.js +3 -3
- package/dist/components/retrieval/entity-chip/entity-chip.styles.js +6 -9
- package/dist/components/retrieval/entity-dossier/entity-dossier.class.d.ts +19 -5
- package/dist/components/retrieval/graph/graph.class.d.ts +5 -0
- package/dist/components/retrieval/graph/graph.class.js +1 -1
- package/dist/components/retrieval/graph/graph.styles.js +0 -30
- package/dist/components/retrieval/graph-legend/graph-legend.styles.js +0 -3
- package/dist/components/retrieval/ingestion-queue/ingestion-queue.styles.js +0 -25
- package/dist/components/retrieval/knowledge-base-admin/knowledge-base-admin.class.d.ts +2 -0
- package/dist/components/retrieval/knowledge-base-admin/knowledge-base-admin.styles.js +0 -7
- package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.class.d.ts +20 -6
- package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.class.js +2 -2
- package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.styles.js +0 -16
- package/dist/components/retrieval/mind-map/mind-map.class.d.ts +5 -3
- package/dist/components/retrieval/mind-map/mind-map.class.js +1 -1
- package/dist/components/retrieval/mind-map/mind-map.styles.js +0 -2
- package/dist/components/retrieval/neighbor-list/neighbor-list.class.d.ts +3 -2
- package/dist/components/retrieval/neighbor-list/neighbor-list.class.js +1 -1
- package/dist/components/retrieval/neighbor-list/neighbor-list.styles.js +0 -30
- package/dist/components/retrieval/node-palette/node-palette.styles.js +0 -11
- package/dist/components/retrieval/path-strip/path-strip.styles.js +0 -10
- package/dist/components/retrieval/provenance-panel/provenance-panel.class.d.ts +12 -3
- package/dist/components/retrieval/provenance-panel/provenance-panel.styles.js +0 -2
- package/dist/components/retrieval/rag-eval-dashboard/rag-eval-dashboard.class.d.ts +3 -2
- package/dist/components/retrieval/rag-eval-dashboard/rag-eval-dashboard.class.js +2 -2
- package/dist/components/retrieval/retrieval-results/retrieval-results.styles.js +0 -28
- package/dist/components/retrieval/retrieval-search/retrieval-search.styles.js +0 -4
- package/dist/components/retrieval/retrieval-trace/retrieval-trace.styles.js +0 -2
- package/dist/components/retrieval/source-card/source-card.styles.js +0 -13
- package/dist/components/retrieval/source-list/source-list.styles.js +0 -7
- package/dist/components/retrieval/source-picker/source-picker.styles.js +0 -7
- package/dist/components/utility/copy-button/copy-button.styles.js +0 -10
- package/dist/components/utility/diff-view/diff-view.styles.js +0 -14
- package/dist/components/utility/export-button/export-button.styles.js +0 -22
- package/dist/components/utility/icon/icon.styles.js +0 -6
- package/dist/components/utility/json-viewer/json-viewer.styles.js +2 -48
- package/dist/components/utility/known-date/known-date.class.d.ts +7 -3
- package/dist/components/utility/known-date/known-date.styles.js +10 -51
- package/dist/components/utility/live-region/live-region.styles.js +0 -4
- package/dist/components/utility/mention-popover/mention-popover.styles.js +0 -25
- package/dist/components/utility/poll-status/poll-status.styles.js +0 -4
- package/dist/components/utility/random-content/random-content.class.d.ts +22 -0
- package/dist/components/utility/random-content/random-content.class.js +3 -2
- package/dist/components/utility/random-content/random-content.styles.js +6 -13
- package/dist/components/utility/tour/tour.class.d.ts +4 -2
- package/dist/components/utility/tour/tour.class.js +3 -3
- package/dist/components/utility/tour/tour.styles.js +0 -13
- package/dist/components/utility/visually-hidden/visually-hidden.styles.js +0 -5
- package/dist/components/viewers/archive-viewer/archive-viewer.class.js +1 -1
- package/dist/components/viewers/archive-viewer/archive-viewer.styles.d.ts +2 -2
- package/dist/components/viewers/archive-viewer/archive-viewer.styles.js +0 -10
- package/dist/components/viewers/csv-viewer/csv-viewer.class.js +1 -1
- package/dist/components/viewers/csv-viewer/csv-viewer.styles.js +0 -19
- package/dist/components/viewers/dataset-viewer/dataset-viewer.class.js +1 -1
- package/dist/components/viewers/dataset-viewer/dataset-viewer.styles.js +0 -15
- package/dist/components/viewers/document-compare/document-compare.styles.js +0 -3
- package/dist/components/viewers/document-preview/document-preview.styles.js +0 -25
- package/dist/components/viewers/document-viewer/document-viewer.class.d.ts +2 -1
- package/dist/components/viewers/document-viewer/document-viewer.class.js +1 -1
- package/dist/components/viewers/document-viewer/document-viewer.styles.js +0 -5
- package/dist/components/viewers/docx-viewer/docx-viewer.styles.js +0 -17
- package/dist/components/viewers/ebook-viewer/ebook-viewer.styles.js +0 -4
- package/dist/components/viewers/email-viewer/email-viewer.styles.js +0 -7
- package/dist/components/viewers/geojson-view/geojson-view.styles.js +0 -5
- package/dist/components/viewers/highlight-layer/highlight-layer.styles.js +0 -3
- package/dist/components/viewers/notebook-viewer/notebook-viewer.class.js +1 -1
- package/dist/components/viewers/notebook-viewer/notebook-viewer.styles.js +0 -38
- package/dist/components/viewers/page-rail/page-rail.class.js +1 -1
- package/dist/components/viewers/page-rail/page-rail.styles.js +0 -13
- package/dist/components/viewers/pdf-viewer/pdf-loader.d.ts +13 -2
- package/dist/components/viewers/pdf-viewer/pdf-loader.js +1 -1
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.d.ts +32 -2
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.js +4 -4
- package/dist/components/viewers/pdf-viewer/pdf-viewer.styles.js +1 -27
- package/dist/components/viewers/pptx-viewer/pptx-viewer.styles.js +0 -3
- package/dist/components/viewers/spreadsheet-viewer/spreadsheet-viewer.class.js +1 -1
- package/dist/components/viewers/spreadsheet-viewer/spreadsheet-viewer.styles.js +0 -14
- package/dist/components/viewers/svg-viewer/svg-viewer.styles.js +0 -7
- package/dist/components/viewers/xml-viewer/xml-viewer.styles.js +2 -24
- package/dist/custom-elements-jsx.d.ts +56 -37
- package/dist/events.d.ts +43 -33
- package/dist/internal/agent-status-variants.d.ts +18 -0
- package/dist/internal/agent-status-variants.js +1 -0
- package/dist/internal/announcer.d.ts +8 -3
- package/dist/internal/announcer.js +1 -1
- package/dist/internal/autoloader-manifest.js +1 -1
- package/dist/internal/canvas-color.d.ts +16 -0
- package/dist/internal/canvas-color.js +1 -1
- package/dist/internal/catalog-picker.d.ts +0 -1
- package/dist/internal/catalog-picker.js +1 -1
- package/dist/internal/default-strings.generated.d.ts +1 -0
- package/dist/internal/default-strings.generated.js +1 -1
- package/dist/internal/dev-mode-attribute-warning.d.ts +27 -4
- package/dist/internal/dev-mode-attribute-warning.js +1 -1
- package/dist/internal/localization-runtime.js +1 -1
- package/dist/internal/localization-types.d.ts +1 -1
- package/dist/internal/localization.js +1 -1
- package/dist/internal/lyra-element.d.ts +13 -0
- package/dist/internal/lyra-element.js +1 -1
- package/dist/internal/media-controller.js +1 -1
- package/dist/internal/package-metadata.d.ts +1 -1
- package/dist/internal/package-metadata.js +1 -1
- package/dist/internal/scroll-overflow.d.ts +35 -13
- package/dist/internal/scroll-overflow.js +1 -1
- package/dist/internal/sizes.styles.js +0 -2
- package/dist/internal/specialist-tokens.styles.js +6 -11
- package/dist/internal/text-highlights.d.ts +4 -1
- package/dist/internal/text-highlights.js +1 -1
- package/dist/internal/tokens/palette.styles.js +0 -15
- package/dist/internal/tokens.styles.js +19 -113
- package/dist/lyra.d.ts +8 -5
- package/dist/styles/reservations.css +82 -0
- package/dist/svelte.d.ts +56 -37
- package/dist/translations/ar.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/pt-BR.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/zh-CN.js +1 -1
- package/dist/vue.d.ts +56 -37
- package/llms/components/lr-accordion-item.md +12 -3
- package/llms/components/lr-accordion.md +11 -2
- package/llms/components/lr-agent-eval-dashboard.md +1 -1
- package/llms/components/lr-agent-trace.md +3 -1
- package/llms/components/lr-agent-workspace.md +20 -0
- package/llms/components/lr-artifact-panel.md +10 -4
- package/llms/components/lr-attachment-chip.md +7 -4
- package/llms/components/lr-attachment-trigger.md +7 -4
- package/llms/components/lr-av-player.md +3 -1
- package/llms/components/lr-avatar.md +6 -6
- package/llms/components/lr-bar-chart.md +4 -3
- package/llms/components/lr-box-plot.md +1 -1
- package/llms/components/lr-browser-frame.md +7 -3
- package/llms/components/lr-bubble-chart.md +4 -3
- package/llms/components/lr-calendar.md +9 -2
- package/llms/components/lr-card.md +24 -0
- package/llms/components/lr-chart.md +32 -8
- package/llms/components/lr-chat-viewport.md +7 -2
- package/llms/components/lr-checkbox-group.md +13 -5
- package/llms/components/lr-checkbox.md +5 -2
- package/llms/components/lr-checkpoint.md +6 -2
- package/llms/components/lr-combobox.md +5 -2
- package/llms/components/lr-command-palette.md +4 -1
- package/llms/components/lr-confirm-bar.md +7 -3
- package/llms/components/lr-context-meter.md +12 -11
- package/llms/components/lr-conversation-item.md +7 -4
- package/llms/components/lr-details.md +11 -2
- package/llms/components/lr-dialog.md +15 -10
- package/llms/components/lr-dock-panel.md +7 -10
- package/llms/components/lr-document-preview.md +6 -1
- package/llms/components/lr-document-viewer.md +3 -2
- package/llms/components/lr-doughnut-chart.md +4 -3
- package/llms/components/lr-drawer.md +3 -3
- package/llms/components/lr-entity-card.md +3 -3
- package/llms/components/lr-entity-chip.md +1 -1
- package/llms/components/lr-entity-dossier.md +4 -1
- package/llms/components/lr-file-input.md +2 -2
- package/llms/components/lr-flag.md +20 -5
- package/llms/components/lr-heatmap.md +28 -0
- package/llms/components/lr-histogram.md +3 -1
- package/llms/components/lr-icon.md +1 -1
- package/llms/components/lr-json-schema-viewer.md +2 -1
- package/llms/components/lr-knowledge-graph-explorer.md +8 -3
- package/llms/components/lr-known-date.md +4 -2
- package/llms/components/lr-line-chart.md +4 -3
- package/llms/components/lr-lite-chart.md +16 -6
- package/llms/components/lr-map.md +72 -8
- package/llms/components/lr-markdown-core.md +3 -2
- package/llms/components/lr-media-card.md +28 -12
- package/llms/components/lr-message-parts.md +2 -1
- package/llms/components/lr-model-select.md +9 -10
- package/llms/components/lr-model-settings-panel.md +9 -9
- package/llms/components/lr-neighbor-list.md +1 -1
- package/llms/components/lr-notebook-viewer.md +6 -3
- package/llms/components/lr-option.md +5 -2
- package/llms/components/lr-pdf-viewer.md +62 -2
- package/llms/components/lr-pie-chart.md +4 -3
- package/llms/components/lr-polar-area-chart.md +4 -3
- package/llms/components/lr-popover.md +5 -0
- package/llms/components/lr-progress-ring.md +8 -1
- package/llms/components/lr-prompt-studio.md +1 -1
- package/llms/components/lr-provenance-panel.md +4 -2
- package/llms/components/lr-qr-code.md +1 -1
- package/llms/components/lr-radar-chart.md +4 -3
- package/llms/components/lr-rag-eval-dashboard.md +2 -2
- package/llms/components/lr-random-content.md +13 -0
- package/llms/components/lr-reorder-item.md +6 -1
- package/llms/components/lr-reorder-list.md +6 -1
- package/llms/components/lr-responsive-panel.md +11 -7
- package/llms/components/lr-scatter-chart.md +4 -3
- package/llms/components/lr-sequence-strip.md +16 -2
- package/llms/components/lr-slider.md +12 -5
- package/llms/components/lr-sparkline.md +1 -1
- package/llms/components/lr-suggestion-chips.md +7 -2
- package/llms/components/lr-swatch-picker.md +5 -5
- package/llms/components/lr-switch.md +5 -2
- package/llms/components/lr-table.md +30 -4
- package/llms/components/lr-terminal.md +3 -1
- package/llms/components/lr-thread-list.md +8 -8
- package/llms/components/lr-time-input.md +6 -1
- package/llms/components/lr-timeline-item.md +24 -0
- package/llms/components/lr-timeline.md +25 -1
- package/llms/components/lr-token-input.md +7 -2
- package/llms/components/lr-tool-approval-dialog.md +7 -8
- package/llms/components/lr-tool-call-chip.md +5 -1
- package/llms/components/lr-tool-param-form.md +14 -12
- package/llms/components/lr-tool-result-dialog.md +11 -9
- package/llms/components/lr-tool-result-view.md +7 -6
- package/llms/components/lr-tool-select-dialog.md +18 -16
- package/llms/components/lr-trace-tree.md +3 -1
- package/llms/components/lr-usage-badge.md +4 -1
- package/llms/components/lr-video-playlist.md +1 -1
- package/llms/components/lr-virtual-list.md +22 -14
- package/llms/components/lr-voice-picker.md +8 -5
- package/llms/components/lr-widget-renderer.md +3 -3
- package/llms/components/lr-widget.md +1 -1
- package/llms/components/lr-word-cloud.md +6 -2
- package/llms/peers.md +12 -2
- package/llms/shared.md +70 -2
- package/llms-full.txt +1143 -285
- package/package.json +17 -5
- package/vscode-css-data.json +37 -2
- package/vscode-html-data.json +401 -44
- package/web-types.json +299 -55
|
@@ -24,9 +24,6 @@ import{css}from"lit";const styles=css`
|
|
|
24
24
|
justify-content: center;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/* The custom-content slot is an assignment target only: syncCustomNodes() clones its trusted SVG
|
|
28
|
-
nodes into the component-owned svg above, where they have a real SVG parent and actually
|
|
29
|
-
paint. Rendering the slot itself would place the originals a second time, outside that svg. */
|
|
30
27
|
slot {
|
|
31
28
|
display: none;
|
|
32
29
|
}
|
|
@@ -46,8 +43,6 @@ import{css}from"lit";const styles=css`
|
|
|
46
43
|
block-size: var(--lr-icon-size, var(--lr-size-1-5em));
|
|
47
44
|
}
|
|
48
45
|
|
|
49
|
-
/* Rotate and flip are deliberately physical, not direction-relative. Directional glyphs are
|
|
50
|
-
mirrored by the wrapping part of the component that owns their reading-order semantics. */
|
|
51
46
|
:host(:where([rotate], [flip])) {
|
|
52
47
|
transform: rotate(var(--lr-icon-rotate, 0deg))
|
|
53
48
|
scale(
|
|
@@ -69,7 +64,6 @@ import{css}from"lit";const styles=css`
|
|
|
69
64
|
--_lr-icon-flip-y: -1;
|
|
70
65
|
}
|
|
71
66
|
|
|
72
|
-
/* Legacy Lyra alignment knob retained alongside the mirrored canvas vocabulary. */
|
|
73
67
|
:host(:where([fixed-width])) {
|
|
74
68
|
inline-size: var(--lr-icon-fixed-width, var(--lr-size-1-5em));
|
|
75
69
|
block-size: var(--lr-icon-size, var(--lr-size-1em));
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import{css}from"lit";const styles=css`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
|
-
/* Consumer-tunable scroll cap -- 'none' means the viewer grows with its
|
|
5
|
-
content, matching every other block-level component in this library
|
|
6
|
-
until a caller opts into an internal scrollbar via the max-height
|
|
7
|
-
attribute. */
|
|
8
4
|
--_lr-json-viewer-max-height: none;
|
|
9
|
-
/* Contained here (rather than left as a bare font-family literal) so a
|
|
10
|
-
host page can retheme it, same rationale as --lr-widget-overlay-color
|
|
11
|
-
in widget.styles.ts -- no shared --lr-* monospace token exists
|
|
12
|
-
to resolve through. */
|
|
13
5
|
--_lr-json-viewer-font: var(--lr-font-mono);
|
|
14
6
|
--_lr-json-viewer-active-outline: var(--lr-focus-ring-color);
|
|
15
7
|
--_lr-json-viewer-string-color: var(--lr-color-success);
|
|
@@ -43,13 +35,6 @@ import{css}from"lit";const styles=css`
|
|
|
43
35
|
}
|
|
44
36
|
[part="tree"] {
|
|
45
37
|
padding: var(--lr-space-s);
|
|
46
|
-
/* A JSON tree's structure -- key, colon, value, brackets, indentation -- reads
|
|
47
|
-
left-to-right regardless of the surrounding document direction, exactly like
|
|
48
|
-
code and like every JSON view (devtools, VS Code). Without this, an ancestor
|
|
49
|
-
dir="rtl" reverses each row to value-colon-key order, right-aligns the tree, and
|
|
50
|
-
flips the disclosure chevrons, so the data reads backwards. A key/value that
|
|
51
|
-
itself contains RTL text still renders that run correctly via the bidi algorithm;
|
|
52
|
-
only the LTR scaffolding is pinned. Matches code-block's [part='pre'] lock. */
|
|
53
38
|
direction: ltr;
|
|
54
39
|
}
|
|
55
40
|
.row {
|
|
@@ -62,17 +47,11 @@ import{css}from"lit";const styles=css`
|
|
|
62
47
|
.row:hover {
|
|
63
48
|
background: var(--lr-json-viewer-row-hover-bg, var(--lr-color-brand-quiet));
|
|
64
49
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
override ((0,1,1)) wins without needing !important -- same fix shape as
|
|
68
|
-
lr-attachment-trigger's/lr-copy-button's own :where()-wrapped hover rule. */
|
|
69
|
-
:where(.row):hover :where([part="copy-button"]),
|
|
70
|
-
:where(.row):focus-within :where([part="copy-button"]) {
|
|
50
|
+
.row:hover [part="copy-button"],
|
|
51
|
+
.row:focus-within [part="copy-button"] {
|
|
71
52
|
opacity: 1;
|
|
72
53
|
}
|
|
73
54
|
[part="toggle"] {
|
|
74
|
-
/* Keep the glyph compact while giving the interactive box the shared
|
|
75
|
-
minimum target size, even for deeply nested rows. */
|
|
76
55
|
inline-size: var(--lr-size-1-25rem);
|
|
77
56
|
block-size: var(--lr-size-1-25rem);
|
|
78
57
|
min-inline-size: var(--lr-icon-button-size);
|
|
@@ -89,12 +68,6 @@ import{css}from"lit";const styles=css`
|
|
|
89
68
|
border-radius: var(--lr-radius);
|
|
90
69
|
cursor: pointer;
|
|
91
70
|
}
|
|
92
|
-
/* The UA '[hidden] { display: none }' rule is author-overridable by any
|
|
93
|
-
same-origin declaration for that element regardless of specificity --
|
|
94
|
-
author rules always win over user-agent rules unless !important is
|
|
95
|
-
involved -- so this only needs to add visibility, not re-declare
|
|
96
|
-
display. Keeping the box (rather than display:none) preserves this
|
|
97
|
-
leaf/empty row's alignment with sibling rows that do have a chevron. */
|
|
98
71
|
[part="toggle"][hidden] {
|
|
99
72
|
visibility: hidden;
|
|
100
73
|
}
|
|
@@ -106,13 +79,6 @@ import{css}from"lit";const styles=css`
|
|
|
106
79
|
[part="toggle"][aria-expanded="true"] .chevron {
|
|
107
80
|
transform: rotate(90deg);
|
|
108
81
|
}
|
|
109
|
-
/* No RTL chevron override: [part='tree'] above is pinned direction:ltr, so a collapsed
|
|
110
|
-
row's disclosure chevron always points at the LTR-positioned children (to the right),
|
|
111
|
-
the same as it does in an LTR document. */
|
|
112
|
-
/* :where() zeroes the wrapped selectors' specificity contribution, leaving only :hover itself
|
|
113
|
-
-- (0,1,0) total, so a consumer's own ::part(toggle):hover override ((0,1,1)) wins without
|
|
114
|
-
needing !important -- same fix shape as lr-attachment-trigger's/lr-copy-button's own
|
|
115
|
-
:where()-wrapped hover rule. */
|
|
116
82
|
:where([part="toggle"]):hover:where(:not([hidden])) {
|
|
117
83
|
background: var(--lr-color-brand-quiet);
|
|
118
84
|
color: var(--lr-color-brand);
|
|
@@ -130,9 +96,6 @@ import{css}from"lit";const styles=css`
|
|
|
130
96
|
outline: var(--lr-focus-ring-width) solid var(--lr-focus-ring-color);
|
|
131
97
|
outline-offset: var(--lr-focus-ring-offset);
|
|
132
98
|
}
|
|
133
|
-
/* Stands in for [part='toggle'] on the closing-bracket row, so it must match the toggle's
|
|
134
|
-
actual used inline-size -- min-inline-size wins over the toggle's own smaller inline-size,
|
|
135
|
-
so the real box is --lr-icon-button-size, not --lr-size-1-25rem. */
|
|
136
99
|
.toggle-space {
|
|
137
100
|
inline-size: var(--lr-icon-button-size);
|
|
138
101
|
flex: 0 0 auto;
|
|
@@ -153,9 +116,6 @@ import{css}from"lit";const styles=css`
|
|
|
153
116
|
flex: 0 0 auto;
|
|
154
117
|
color: var(--lr-color-text-quiet);
|
|
155
118
|
}
|
|
156
|
-
/* --lr-json-viewer-match-bg indirection (rather than the bare --lr-color-warning-quiet token)
|
|
157
|
-
lets a consumer retheme just this component's search-match highlight without repainting
|
|
158
|
-
every other warning-toned surface on the page that reads the same shared token. */
|
|
159
119
|
[part="key"][data-match],
|
|
160
120
|
[part="value"][data-match] {
|
|
161
121
|
background: var(--lr-json-viewer-match-bg, var(--lr-color-warning-quiet));
|
|
@@ -227,9 +187,6 @@ import{css}from"lit";const styles=css`
|
|
|
227
187
|
background: var(--lr-color-brand-quiet);
|
|
228
188
|
color: var(--lr-color-brand);
|
|
229
189
|
}
|
|
230
|
-
/* This is also the pressed state for the row-hover reveal rule further up: that rule only fades
|
|
231
|
-
the button in when its row is hovered, it is not itself a hover treatment on the button, and the
|
|
232
|
-
button's own held state belongs here next to its hover. */
|
|
233
190
|
[part="copy-button"]:active {
|
|
234
191
|
background: color-mix(
|
|
235
192
|
in oklab,
|
|
@@ -238,9 +195,6 @@ import{css}from"lit";const styles=css`
|
|
|
238
195
|
);
|
|
239
196
|
color: var(--lr-color-brand);
|
|
240
197
|
}
|
|
241
|
-
/* Per-node copy buttons stay out of the way until the row is actually
|
|
242
|
-
being interacted with -- the toolbar's own top-level copy button is
|
|
243
|
-
exempt (it has no ancestor .row, so this rule never matches it). */
|
|
244
198
|
.row [part="copy-button"] {
|
|
245
199
|
opacity: 0;
|
|
246
200
|
}
|
|
@@ -99,8 +99,9 @@ declare const LyraKnownDate_base: typeof LyraKnownDateBase & (new (...args: any[
|
|
|
99
99
|
* @csspart fieldset - The `<fieldset>` grouping the three fields.
|
|
100
100
|
* @csspart legend - The `<legend>` element.
|
|
101
101
|
* @csspart form-control-label - The visible label wrapper inside the legend.
|
|
102
|
-
* @csspart label - Deprecated in 8.0.0; compatibility alias for `form-control-label
|
|
103
|
-
*
|
|
102
|
+
* @csspart label - Deprecated in 8.0.0; compatibility alias for `form-control-label`. Web Awesome
|
|
103
|
+
* still publishes its own deprecated `label` part on `<wa-known-date>`, so this alias stays on
|
|
104
|
+
* the same node until upstream drops it.
|
|
104
105
|
* @csspart fields - The row wrapping the three field blocks.
|
|
105
106
|
* @csspart form-control-input - Alias on the fields row matching other form controls.
|
|
106
107
|
* @csspart field - Each field block (label + input), repeated three times; distinguished by
|
|
@@ -233,7 +234,10 @@ export declare class LyraKnownDate extends LyraKnownDate_base {
|
|
|
233
234
|
private readonly dayId;
|
|
234
235
|
private readonly monthId;
|
|
235
236
|
private readonly yearId;
|
|
236
|
-
/** Hidden native date mirror used by integrations that inspect native constraints directly.
|
|
237
|
+
/** Hidden native date mirror used by integrations that inspect native constraints directly.
|
|
238
|
+
* Stays a writable `@query` field rather than a readonly `get`: `wa-known-date` declares it
|
|
239
|
+
* writable, and check-pinned-upstream-manifests treats a readonly-vs-writable difference on a
|
|
240
|
+
* mirrored member as an `unsupported` surface drift -- a release blocker. */
|
|
237
241
|
valueInput: HTMLInputElement;
|
|
238
242
|
private validationTargetOverride?;
|
|
239
243
|
constructor();
|
|
@@ -1,52 +1,33 @@
|
|
|
1
1
|
import{css}from"lit";const styles=css`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
|
-
/* Every per-tier value below comes from the library's one shared size ladder
|
|
5
|
-
(internal/sizes.styles.ts), which re-points --lr-form-control-* per :host([size='...']) and
|
|
6
|
-
matches BOTH spellings of every tier in the same selector list -- so small/medium/large work
|
|
7
|
-
here for free. This component's own --lr-known-date-field-* surface is unchanged and still
|
|
8
|
-
the documented override point; only the values behind it moved, which is what keeps a
|
|
9
|
-
birthdate field the same height as the <lr-input>/<lr-date-input> beside it in a form row at
|
|
10
|
-
every tier instead of drifting from a hand-kept copy of that scale. */
|
|
11
4
|
--_lr-known-date-field-padding-block: var(--lr-form-control-padding-block);
|
|
12
5
|
--_lr-known-date-field-padding-inline: var(
|
|
13
6
|
--lr-form-control-padding-inline
|
|
14
7
|
);
|
|
15
8
|
--_lr-known-date-field-font-size: var(--lr-form-control-font-size);
|
|
16
|
-
/* Not --lr-form-control-gap: that knob is the rhythm between one control's own inline
|
|
17
|
-
affordances, an order of magnitude tighter than the gap between three separate field
|
|
18
|
-
blocks. Constant across tiers by design. */
|
|
19
9
|
--_lr-known-date-field-gap: var(--lr-space-s);
|
|
10
|
+
--_lr-known-date-field-fill: var(--lr-color-surface);
|
|
11
|
+
--_lr-known-date-field-border-color: var(--lr-color-border);
|
|
20
12
|
--_lr-known-date-year-field-width: var(--lr-size-5em);
|
|
21
13
|
--_lr-known-date-day-field-width: var(--lr-size-3-5em);
|
|
22
14
|
--_lr-known-date-month-field-width: var(--lr-size-3-5em);
|
|
23
|
-
/* max() rather than the bare ladder height: the ladder's 2xs tier resolves to 1.25rem/20px,
|
|
24
|
-
and a field a pointer has to hit floors at WCAG 2.2 SC 2.5.8's 24px minimum. Above that the
|
|
25
|
-
floor tracks the ladder exactly. At the small tiers the floor exceeds the field's own
|
|
26
|
-
padding/font-driven content height and actively pins the rendered box; at l/xl the content
|
|
27
|
-
height stays under it, so the floor is inert there. */
|
|
28
15
|
--_lr-known-date-field-min-height: max(
|
|
29
16
|
var(--lr-form-control-height),
|
|
30
17
|
var(--lr-size-24px)
|
|
31
18
|
);
|
|
32
|
-
/* --lr-known-date-field-height is intentionally NOT declared here. It is a consumer-facing
|
|
33
|
-
exact-height escape hatch consumed only through the var() fallbacks on [part='field-input']
|
|
34
|
-
below; declaring any value for it (even 'auto') would make those fallback arms unreachable
|
|
35
|
-
and turn --lr-known-date-field-min-height into dead code (the lr-select trap). Left
|
|
36
|
-
undeclared, both arms stay live: the per-tier floor falls out of the fallback, and setting
|
|
37
|
-
the property pins an exact height. */
|
|
38
19
|
}
|
|
39
20
|
|
|
40
21
|
[part~="form-control"] {
|
|
41
22
|
min-inline-size: 0;
|
|
42
23
|
}
|
|
43
24
|
|
|
44
|
-
:host([appearance="filled"])
|
|
45
|
-
border-color: transparent;
|
|
46
|
-
|
|
25
|
+
:host([appearance="filled"]) {
|
|
26
|
+
--_lr-known-date-field-border-color: transparent;
|
|
27
|
+
--_lr-known-date-field-fill: var(--lr-color-surface-raised);
|
|
47
28
|
}
|
|
48
|
-
:host([appearance="filled-outlined"])
|
|
49
|
-
|
|
29
|
+
:host([appearance="filled-outlined"]) {
|
|
30
|
+
--_lr-known-date-field-fill: var(--lr-color-surface-raised);
|
|
50
31
|
}
|
|
51
32
|
:host([pill]) [part="field-input"] {
|
|
52
33
|
border-radius: var(--lr-radius-pill);
|
|
@@ -68,22 +49,9 @@ import{css}from"lit";const styles=css`
|
|
|
68
49
|
font-weight: var(--lr-font-weight-semibold);
|
|
69
50
|
overflow-wrap: anywhere;
|
|
70
51
|
}
|
|
71
|
-
/* [part] always contains a literal <slot> child regardless of assigned
|
|
72
|
-
content, so :empty never matches -- real emptiness is tracked in JS
|
|
73
|
-
(hasLabelSlot) and reflected via [hidden] instead (same fix as every
|
|
74
|
-
other lyra form control's label/hint/error chrome). Without this the
|
|
75
|
-
required marker below (attached to this box) would render a stray glyph
|
|
76
|
-
with nothing before it whenever no label is set. */
|
|
77
52
|
[part="legend"][hidden] {
|
|
78
53
|
display: none;
|
|
79
54
|
}
|
|
80
|
-
/* The one component that does NOT take its marker rule from
|
|
81
|
-
internal/form-control.styles.ts, only its custom properties. That sheet
|
|
82
|
-
attaches the marker to [part~="form-control-label"], which here is a span
|
|
83
|
-
INSIDE this legend; the marker belongs to the legend box itself, after the
|
|
84
|
-
whole label, so the selector is local while the glyph, colour and offset
|
|
85
|
-
stay the same three consumer-settable properties every other control
|
|
86
|
-
resolves. Keep these declarations identical to that sheet's. */
|
|
87
55
|
:host([required]) [part="legend"]::after {
|
|
88
56
|
content: var(--lr-form-control-required-content, ' *');
|
|
89
57
|
color: var(--lr-form-control-required-color, var(--lr-color-danger));
|
|
@@ -117,8 +85,6 @@ import{css}from"lit";const styles=css`
|
|
|
117
85
|
var(--_lr-known-date-field-min-height)
|
|
118
86
|
)
|
|
119
87
|
);
|
|
120
|
-
/* Pinned only when --lr-known-date-field-height is set; 'auto' otherwise, so the field keeps
|
|
121
|
-
growing to fit its own padding/font content. */
|
|
122
88
|
block-size: var(--lr-known-date-field-height, auto);
|
|
123
89
|
padding-block: var(
|
|
124
90
|
--lr-known-date-field-padding-block,
|
|
@@ -128,9 +94,10 @@ import{css}from"lit";const styles=css`
|
|
|
128
94
|
--lr-known-date-field-padding-inline,
|
|
129
95
|
var(--_lr-known-date-field-padding-inline)
|
|
130
96
|
);
|
|
131
|
-
border: var(--lr-border-width-thin) solid
|
|
97
|
+
border: var(--lr-border-width-thin) solid
|
|
98
|
+
var(--_lr-known-date-field-border-color);
|
|
132
99
|
border-radius: var(--lr-form-control-radius);
|
|
133
|
-
background: var(--
|
|
100
|
+
background: var(--_lr-known-date-field-fill);
|
|
134
101
|
color: var(--lr-color-text);
|
|
135
102
|
font-family: inherit;
|
|
136
103
|
font-size: var(
|
|
@@ -157,11 +124,6 @@ import{css}from"lit";const styles=css`
|
|
|
157
124
|
var(--_lr-known-date-year-field-width)
|
|
158
125
|
);
|
|
159
126
|
}
|
|
160
|
-
/* Mouse-hover parity with the keyboard :focus-visible ring below -- same border-retint
|
|
161
|
-
treatment as lr-color-picker's own bordered [part='input']:hover.
|
|
162
|
-
no-pressed-state: a press on a number field lands the caret rather than activating a control,
|
|
163
|
-
so a pressed tint would show only for the length of the mousedown and then be replaced by the
|
|
164
|
-
:focus-visible ring below, which is the state that actually persists and communicates. */
|
|
165
127
|
[part="field-input"]:hover {
|
|
166
128
|
border-color: var(--lr-color-brand);
|
|
167
129
|
}
|
|
@@ -169,9 +131,6 @@ import{css}from"lit";const styles=css`
|
|
|
169
131
|
outline: var(--lr-focus-ring-width) solid var(--lr-focus-ring-color);
|
|
170
132
|
outline-offset: var(--lr-focus-ring-offset);
|
|
171
133
|
}
|
|
172
|
-
/* --lr-known-date-invalid-border-color indirection (rather than the bare --lr-color-danger
|
|
173
|
-
token) lets a consumer retheme just this component's invalid-field border without
|
|
174
|
-
repainting every other component in the app that reads the same shared danger token. */
|
|
175
134
|
:host([data-invalid]) [part="field-input"] {
|
|
176
135
|
border-color: var(
|
|
177
136
|
--lr-known-date-invalid-border-color,
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import{css}from"lit";const styles=css`
|
|
2
|
-
/* The host contributes no box of its own -- \`.sr-only\` (composed in via
|
|
3
|
-
internal/a11y.ts's shared \`srOnly\`) already takes the single child out
|
|
4
|
-
of flow via absolute positioning, so a wrapping host box would just be
|
|
5
|
-
an empty, purposeless inline element sitting in the document. */
|
|
6
2
|
:host {
|
|
7
3
|
display: contents;
|
|
8
4
|
}
|
|
@@ -3,17 +3,10 @@ import{css}from"lit";const styles=css`
|
|
|
3
3
|
display: contents;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
/* Positioned by internal/positioner.js's place() -- same fixed/z-index
|
|
7
|
-
shape as lr-combobox's/lr-select's own [part='listbox']. Closed
|
|
8
|
-
state: invisible + slightly raised, transitioning in on :host([open]),
|
|
9
|
-
same as those two. */
|
|
10
6
|
[part='listbox'] {
|
|
11
7
|
position: fixed;
|
|
12
8
|
z-index: var(--lr-layer-dropdown);
|
|
13
9
|
box-sizing: border-box;
|
|
14
|
-
/* Clamped against internal/positioner.js's place()-published available-space custom
|
|
15
|
-
properties (see menu.styles.ts's/combobox.styles.ts's identical [part='listbox']
|
|
16
|
-
treatment) so this popup can't overflow off-screen on a short/keyboard-shrunk viewport. */
|
|
17
10
|
max-block-size: min(var(--lr-size-16rem), var(--lr-positioner-available-block-size, var(--lr-size-16rem)));
|
|
18
11
|
overflow-y: auto;
|
|
19
12
|
overflow-x: clip;
|
|
@@ -24,7 +17,6 @@ import{css}from"lit";const styles=css`
|
|
|
24
17
|
background: var(--lr-color-surface);
|
|
25
18
|
border: var(--lr-border-width-thin) solid var(--lr-color-border);
|
|
26
19
|
border-radius: var(--lr-radius);
|
|
27
|
-
/* Anchored overlay: a positioner-placed listbox floating over page content, not a modal layer. */
|
|
28
20
|
box-shadow: var(--lr-shadow-m);
|
|
29
21
|
visibility: hidden;
|
|
30
22
|
opacity: 0;
|
|
@@ -56,19 +48,10 @@ import{css}from"lit";const styles=css`
|
|
|
56
48
|
border-radius: var(--lr-radius);
|
|
57
49
|
cursor: pointer;
|
|
58
50
|
}
|
|
59
|
-
/* --lr-mention-popover-option-active-bg indirection (rather than the bare --lr-color-brand-quiet
|
|
60
|
-
token) lets a consumer retheme just this component's highlighted/active suggestion row
|
|
61
|
-
without repainting every other component that reuses the same shared brand-quiet token --
|
|
62
|
-
same indirection lr-select's/lr-combobox's identical-looking [part='option'][data-active]
|
|
63
|
-
background is missing (checklist's own named example for this check). */
|
|
64
51
|
[part='option']:hover,
|
|
65
52
|
[part='option'][data-active] {
|
|
66
53
|
background: var(--lr-mention-popover-option-active-bg, var(--lr-color-brand-quiet));
|
|
67
54
|
}
|
|
68
|
-
/* Mixed from the same overridable highlight the hover/active-row rule uses, so a consumer who
|
|
69
|
-
retints --lr-mention-popover-option-active-bg gets a matching pressed state for free. This also
|
|
70
|
-
serves the [part='option-description'] hover rule below, which is a descendant treatment of this
|
|
71
|
-
same row rather than a hover state of its own. */
|
|
72
55
|
[part='option']:active {
|
|
73
56
|
background: color-mix(
|
|
74
57
|
in oklab,
|
|
@@ -104,14 +87,6 @@ import{css}from"lit";const styles=css`
|
|
|
104
87
|
text-overflow: ellipsis;
|
|
105
88
|
white-space: nowrap;
|
|
106
89
|
}
|
|
107
|
-
/* --lr-color-text-quiet-on-brand-quiet fails WCAG AA (~4.24:1, needs
|
|
108
|
-
4.5:1) -- unlike lr-combobox's/lr-select's identical-looking
|
|
109
|
-
[part='option'][data-active] background (which never has this problem
|
|
110
|
-
in practice, since those default their active index to -1/none until a
|
|
111
|
-
user actually arrows through the list), this component always opens
|
|
112
|
-
with row 0 pre-highlighted (see the activeIndex field's own doc), so the
|
|
113
|
-
active/quiet-text combination is the default state, not an edge case --
|
|
114
|
-
it must pass contrast on its own. */
|
|
115
90
|
[part='option']:hover [part='option-description'],
|
|
116
91
|
[part='option'][data-active] [part='option-description'] {
|
|
117
92
|
color: var(--lr-color-text);
|
|
@@ -15,10 +15,6 @@ import{css}from"lit";const styles=css`
|
|
|
15
15
|
block-size: var(--lr-size-0-375rem);
|
|
16
16
|
border-radius: var(--lr-radius-pill);
|
|
17
17
|
background: var(--lr-color-brand);
|
|
18
|
-
/* Same token/rationale as lr-stream-status's and lr-typing-indicator's
|
|
19
|
-
own looping pulse: --lr-transition-ambient is the length the library
|
|
20
|
-
reserves for ambient "still alive" motion, so every looping indicator
|
|
21
|
-
shares one calm rhythm instead of hand-rolling its own duration. */
|
|
22
18
|
animation: lr-poll-status-pulse var(--lr-transition-ambient) infinite;
|
|
23
19
|
}
|
|
24
20
|
[part='indicator'][data-due] {
|
|
@@ -43,6 +43,16 @@ export interface LyraRandomContentEventMap {
|
|
|
43
43
|
* Reactive selection changes written while detached and rendered during reconnection are part of
|
|
44
44
|
* that silent baseline; a later explicit `randomize()` is still announced.
|
|
45
45
|
*
|
|
46
|
+
* **Before script runs, the first candidate is the one that shows.** Selection happens in
|
|
47
|
+
* `firstUpdated()`, which a server renderer never executes, and it works by setting
|
|
48
|
+
* `hidden`/`aria-hidden` on light-DOM siblings — something Lit's hydration diffing never inspects,
|
|
49
|
+
* so no amount of first-render seeding can make the server agree. The shadow stylesheet therefore
|
|
50
|
+
* hides every candidate after the first until a selection has actually been applied: a
|
|
51
|
+
* server-rendered page (and a page whose script never runs at all) paints one candidate rather
|
|
52
|
+
* than the entire pool, and hydration swaps that one for the chosen one instead of collapsing N
|
|
53
|
+
* down to one. Randomness itself is genuinely unavailable server-side — there is no seed to share
|
|
54
|
+
* — so authors who need a *specific* pre-hydration candidate order the pool accordingly.
|
|
55
|
+
*
|
|
46
56
|
* `fade-left`/`fade-right` are physical-direction transforms (matching the
|
|
47
57
|
* upstream naming this component mirrors), not "previous/next" navigational
|
|
48
58
|
* semantics like a carousel chevron, so they are deliberately **not**
|
|
@@ -98,6 +108,18 @@ export declare class LyraRandomContent extends LyraElement<LyraRandomContentEven
|
|
|
98
108
|
get mode(): LyraRandomContentMode;
|
|
99
109
|
set mode(next: LyraRandomContentMode);
|
|
100
110
|
private slotEl?;
|
|
111
|
+
private baseEl?;
|
|
112
|
+
/**
|
|
113
|
+
* Whether a selection has ever been applied to the pool. Drives `[part='base']`'s
|
|
114
|
+
* `data-unselected` marker, which is what keeps a server-rendered page from painting the whole
|
|
115
|
+
* candidate pool (see the class doc's SSR note).
|
|
116
|
+
*
|
|
117
|
+
* Deliberately NOT a reactive `@state`: it flips inside `applySelection()`, reached from
|
|
118
|
+
* `firstUpdated()`, and a reactive write there schedules a second update purely to drop one
|
|
119
|
+
* attribute -- Lit's change-in-update warning, for no rendered difference. The attribute is
|
|
120
|
+
* removed imperatively instead; every later render commits the same `false` and leaves it off.
|
|
121
|
+
*/
|
|
122
|
+
private hasAppliedSelection;
|
|
101
123
|
private timer?;
|
|
102
124
|
private timerWindow?;
|
|
103
125
|
private reduceMotion;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r};import{html,nothing}from"lit";import{property,query}from"lit/decorators.js";import{acquireAnnouncementSink}from"../../../internal/announcer.js";import{composedAccessibilityText}from"../../../internal/announcement-text.js";import{pauseIcon,playIcon}from"../../../internal/icons.js";import{LyraElement}from"../../../internal/lyra-element.js";import{finiteDuration,finiteInteger}from"../../../internal/numbers.js";import{composedContains,deepActiveElement}from"../../../internal/overlay-manager.js";import{literalSetConverter}from"../../../internal/converters.js";import{styles}from"./random-content.styles.js";import{LYRA_DEFAULT_randomContentPause,LYRA_DEFAULT_randomContentResume}from"../../../internal/default-strings.generated.js";const RANDOM_CONTENT_MODE=literalSetConverter(["unique","random","sequence"],"unique");class LyraRandomContent extends LyraElement{constructor(){super(...arguments),this.animation="none",this.autoplay=!1,this.paused=!1,this.autoplayInterval=3e3,this.items=1,this._mode="unique",this.reduceMotion=!1,this.sequenceCursor=0,this.lastPool=[],this.managedPool=new Set,this.authorState=new WeakMap,this.authorStateObserverPauseDepth=0,this.focusWithin=!1,this.connectionGeneration=0,this.selectionAnnouncementsArmed=!1,this.lastAnnouncementText="",this.hasUpdatedOnce=!1,this.onMotionPreferenceChange=event=>{this.reduceMotion=event.matches,this.restartAutoplay()},this.onForwardedSlotChange=event=>{const slot=event.target;if(this.contains(slot)){if(this.observeAnnouncementContent(),!this.poolsEqual(this.eligible(),this.lastPool)){this.onSlotChange();return}this.announceCurrentSelectionIfChanged()}},this.onSlotChange=()=>{if(!this.isConnected)return;const pool=this.eligible();this.poolsEqual(pool,this.lastPool)||(this.reselect({resetPrevious:!0,announce:this.selectionAnnouncementsArmed}),this.restartAutoplay())},this.onFocusIn=()=>{this.focusWithin=!0,this.stopAutoplay()},this.onFocusOut=()=>{const ownerWindow=this.ownerDocument.defaultView,connectionGeneration=this.connectionGeneration,finishFocusOut=()=>{connectionGeneration!==this.connectionGeneration||!this.isConnected||(this.focusWithin=composedContains(this,deepActiveElement(this.ownerDocument)),this.focusWithin||this.restartAutoplay())};ownerWindow?ownerWindow.queueMicrotask(finishFocusOut):queueMicrotask(finishFocusOut)},this.togglePaused=()=>{this.paused=!this.paused,this.emit("lr-pause-change",Object.freeze({paused:this.paused}))}}static{this.defaultStrings={...super.defaultStrings,randomContentPause:LYRA_DEFAULT_randomContentPause,randomContentResume:LYRA_DEFAULT_randomContentResume}}static{this.immutableEventDetails=Object.freeze(["lr-content-change"])}static{this.identityEventDetailProperties=Object.freeze({"lr-content-change":Object.freeze(["items"])})}static{this.styles=[LyraElement.styles,styles]}get mode(){return this._mode}set mode(next){const normalized=RANDOM_CONTENT_MODE.normalizeReflected(this,"mode",next),old=this._mode;old!==normalized&&(this._mode=normalized,this.requestUpdate("mode",old))}connectedCallback(){this.connectionGeneration+=1;const connectionGeneration=this.connectionGeneration;super.connectedCallback(),this.addEventListener("slotchange",this.onForwardedSlotChange),this.selectionAnnouncementsArmed=!1,this.announcementSink??=acquireAnnouncementSink("polite",{document:this.ownerDocument,source:this}),this.startAuthorStateObserver(),this.startAnnouncementContentObserver();const ownerWindow=this.ownerDocument.defaultView;this.mediaQuery=ownerWindow?.matchMedia?.("(prefers-reduced-motion: reduce)"),this.reduceMotion=this.mediaQuery?.matches??!1,this.mediaQuery?.addEventListener("change",this.onMotionPreferenceChange),this.hasUpdated&&this.reselect({announce:!1}),this.restartAutoplay(),this.updateComplete.then(()=>{this.isConnected&&connectionGeneration===this.connectionGeneration&&(this.lastAnnouncementText=this.selectionAnnouncement(this.previousSelection??[]),this.selectionAnnouncementsArmed=!0)})}disconnectedCallback(){this.connectionGeneration+=1,this.selectionAnnouncementsArmed=!1,this.announcementSink?.release(),this.announcementSink=void 0,this.stopAutoplay(),this.stopAuthorStateObserver(),this.stopAnnouncementContentObserver(),this.removeEventListener("slotchange",this.onForwardedSlotChange),this.focusWithin=!1,this.restoreManagedPool(),this.mediaQuery?.removeEventListener("change",this.onMotionPreferenceChange),this.mediaQuery=void 0,super.disconnectedCallback()}firstUpdated(changed){super.firstUpdated(changed),this.reselect({announce:!1}),this.restartAutoplay()}updated(changed){super.updated(changed),this.hasUpdatedOnce&&(changed.has("items")&&this.reselect({announce:this.selectionAnnouncementsArmed}),(changed.has("autoplay")||changed.has("autoplayInterval")||changed.has("paused"))&&this.restartAutoplay()),this.hasUpdatedOnce=!0}eligible(){return this.slotEl?.assignedElements({flatten:!0})??[]}clampedCount(poolSize){return finiteInteger(this.items,1,1,poolSize)}poolsEqual(a,b){return a.length!==b.length?!1:a.every((el,index)=>el===b[index])}shuffledPick(pool,count){const arr=pool.slice(),n=Math.min(count,arr.length);for(let i=0;i<n;i+=1){const j=i+Math.floor(Math.random()*(arr.length-i)),swap=arr[i];arr[i]=arr[j],arr[j]=swap}return arr.slice(0,n)}sameAsPrevious(selection){const previous=this.previousSelection;if(!previous||previous.length!==selection.length)return!1;const previousSet=new Set(previous);return selection.every(el=>previousSet.has(el))}selectUnique(pool,count){let picked=this.shuffledPick(pool,count);if(pool.length>count){let attempts=0;for(;attempts<10&&this.sameAsPrevious(picked);)picked=this.shuffledPick(pool,count),attempts+=1}return picked}selectSequence(pool,count){const total=pool.length,start=this.sequenceCursor%total,picked=[];for(let k=0;k<count;k+=1)picked.push(pool[(start+k)%total]);return this.sequenceCursor=(start+count)%total,picked}computeSelectionForMode(pool,count){switch(this.mode){case"sequence":return this.selectSequence(pool,count);case"random":return this.shuffledPick(pool,count);default:return this.selectUnique(pool,count)}}preserveFocusedSubtree(pool,selected){const active=deepActiveElement(this.ownerDocument),focusedItem=pool.find(item=>composedContains(item,active));return!focusedItem||selected.includes(focusedItem)?selected:[...selected.slice(0,-1),focusedItem]}reconcileManagedPool(pool){const nextPool=new Set(pool);for(const item of this.managedPool)nextPool.has(item)||this.restoreAuthorState(item);for(const item of pool)this.authorState.has(item)||this.authorState.set(item,{hiddenAttribute:item.getAttribute("hidden"),ariaHidden:item.getAttribute("aria-hidden")});this.managedPool=nextPool}restoreAuthorState(item){const original=this.authorState.get(item);original&&(original.hiddenAttribute===null?item.removeAttribute("hidden"):item.setAttribute("hidden",original.hiddenAttribute),original.ariaHidden===null?item.removeAttribute("aria-hidden"):item.setAttribute("aria-hidden",original.ariaHidden),this.authorState.delete(item))}restoreManagedPool(){for(const item of this.managedPool)this.restoreAuthorState(item);this.managedPool.clear(),this.lastPool=[],this.previousSelection=void 0,this.lastAnnouncementText=""}applyManagedSelection(pool,selected){const selectedSet=new Set(selected);for(const el of pool){const shown=selectedSet.has(el);el.toggleAttribute("hidden",!shown),el.setAttribute("aria-hidden",shown?"false":"true")}}applySelection(pool,selected){this.withAuthorStateObserverPaused(()=>{this.reconcileManagedPool(pool),this.applyManagedSelection(pool,selected)})}captureAuthorStateMutations(records){for(const record of records){if(record.type!=="attributes")continue;const item=record.target;if(!this.managedPool.has(item))continue;const state=this.authorState.get(item);state&&(record.attributeName==="hidden"&&(state.hiddenAttribute=item.getAttribute("hidden")),record.attributeName==="aria-hidden"&&(state.ariaHidden=item.getAttribute("aria-hidden")))}}observeAuthorState(){const observer=this.authorStateObserver;if(!observer)return;const options={attributes:!0,attributeFilter:["hidden","aria-hidden"],subtree:!0};observer.observe(this,options);for(const item of this.eligible())this.contains(item)||observer.observe(item,options)}startAuthorStateObserver(){if(this.authorStateObserver)return;const MutationObserverCtor=this.ownerDocument.defaultView?.MutationObserver;MutationObserverCtor&&(this.authorStateObserver=new MutationObserverCtor(records=>{this.captureAuthorStateMutations(records),this.withAuthorStateObserverPaused(()=>{const selected=this.preserveFocusedSubtree(this.lastPool,this.previousSelection??[]);this.applyManagedSelection(this.lastPool,selected),this.previousSelection=selected})}),this.observeAuthorState())}stopAuthorStateObserver(){const observer=this.authorStateObserver;observer&&(this.captureAuthorStateMutations(observer.takeRecords()),observer.disconnect(),this.authorStateObserver=void 0,this.authorStateObserverPauseDepth=0)}withAuthorStateObserverPaused(operation){const observer=this.authorStateObserver,outermost=this.authorStateObserverPauseDepth===0;outermost&&observer&&(this.captureAuthorStateMutations(observer.takeRecords()),observer.disconnect()),this.authorStateObserverPauseDepth+=1;try{return operation()}finally{this.authorStateObserverPauseDepth-=1,outermost&&observer&&this.isConnected&&this.observeAuthorState()}}selectionAnnouncement(selected){const content=selected.map(item=>composedAccessibilityText(item).replace(/\s+/g," ").trim()).filter(Boolean).join(" "),context=this.getAttribute("aria-label")?.trim()??"";return!context||context===content?content:content?`${context}: ${content}`:context}announcementObservationOptions(){return{attributes:!0,attributeFilter:["alt","aria-hidden","aria-label","class","hidden","inert","open","slot","style"],characterData:!0,childList:!0,subtree:!0}}observeAnnouncementContent(){const observer=this.announcementContentObserver;if(!observer)return;observer.disconnect();const options=this.announcementObservationOptions();observer.observe(this,options);for(const slot of this.querySelectorAll("slot"))if(slot.assignedNodes().length!==0)for(const assigned of slot.assignedNodes({flatten:!0}))observer.observe(assigned,options)}startAnnouncementContentObserver(){if(this.announcementContentObserver)return;const MutationObserverCtor=this.ownerDocument.defaultView?.MutationObserver;MutationObserverCtor&&(this.announcementContentObserver=new MutationObserverCtor(()=>{this.observeAnnouncementContent(),this.announceCurrentSelectionIfChanged()}),this.observeAnnouncementContent())}stopAnnouncementContentObserver(){this.announcementContentObserver?.disconnect(),this.announcementContentObserver=void 0}announceCurrentSelectionIfChanged(){const text=this.selectionAnnouncement(this.previousSelection??[]);if(!this.selectionAnnouncementsArmed){this.lastAnnouncementText=text;return}text!==this.lastAnnouncementText&&(this.lastAnnouncementText=text,text&&this.announcementSink?.announce(text))}reselect(options={}){const pool=this.eligible();if(this.lastPool=pool,pool.length===0)return this.withAuthorStateObserverPaused(()=>this.reconcileManagedPool(pool)),this.previousSelection=void 0,this.lastAnnouncementText="",Object.freeze([]);options.resetPrevious&&(this.previousSelection=void 0);const count=this.clampedCount(pool.length),selected=this.preserveFocusedSubtree(pool,this.computeSelectionForMode(pool,count));this.applySelection(pool,selected),this.previousSelection=selected;const announcement=this.selectionAnnouncement(selected);this.lastAnnouncementText=announcement,options.announce!==!1&&this.announcementSink?.announce(announcement);const exposedSelection=Object.freeze([...selected]);return this.emit("lr-content-change",Object.freeze({items:exposedSelection})),exposedSelection}randomize(){return this.reselect()}stopAutoplay(){this.timer!==void 0&&this.timerWindow?.clearInterval(this.timer),this.timer=void 0,this.timerWindow=void 0}restartAutoplay(){if(this.stopAutoplay(),!this.isConnected||!this.autoplay||this.paused||this.focusWithin||this.reduceMotion||this.eligible().length<2)return;const ownerWindow=this.ownerDocument.defaultView;if(!ownerWindow)return;const interval=finiteDuration(this.autoplayInterval,3e3,1e3),connectionGeneration=this.connectionGeneration;this.timerWindow=ownerWindow,this.timer=ownerWindow.setInterval(()=>{if(connectionGeneration!==this.connectionGeneration||!this.isConnected||this.ownerDocument.defaultView!==ownerWindow){this.stopAutoplay();return}this.reselect({announce:!1})},interval)}render(){const hostLabel=this.getAttribute("aria-label"),multiple=finiteInteger(this.items,1,1,Number.MAX_SAFE_INTEGER)>1;return html`
|
|
1
|
+
var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r};import{html,nothing}from"lit";import{property,query}from"lit/decorators.js";import{acquireAnnouncementSink}from"../../../internal/announcer.js";import{composedAccessibilityText}from"../../../internal/announcement-text.js";import{pauseIcon,playIcon}from"../../../internal/icons.js";import{LyraElement}from"../../../internal/lyra-element.js";import{finiteDuration,finiteInteger}from"../../../internal/numbers.js";import{composedContains,deepActiveElement}from"../../../internal/overlay-manager.js";import{literalSetConverter}from"../../../internal/converters.js";import{styles}from"./random-content.styles.js";import{LYRA_DEFAULT_randomContentPause,LYRA_DEFAULT_randomContentResume}from"../../../internal/default-strings.generated.js";const RANDOM_CONTENT_MODE=literalSetConverter(["unique","random","sequence"],"unique");class LyraRandomContent extends LyraElement{constructor(){super(...arguments),this.animation="none",this.autoplay=!1,this.paused=!1,this.autoplayInterval=3e3,this.items=1,this._mode="unique",this.hasAppliedSelection=!1,this.reduceMotion=!1,this.sequenceCursor=0,this.lastPool=[],this.managedPool=new Set,this.authorState=new WeakMap,this.authorStateObserverPauseDepth=0,this.focusWithin=!1,this.connectionGeneration=0,this.selectionAnnouncementsArmed=!1,this.lastAnnouncementText="",this.hasUpdatedOnce=!1,this.onMotionPreferenceChange=event=>{this.reduceMotion=event.matches,this.restartAutoplay()},this.onForwardedSlotChange=event=>{const slot=event.target;if(this.contains(slot)){if(this.observeAnnouncementContent(),!this.poolsEqual(this.eligible(),this.lastPool)){this.onSlotChange();return}this.announceCurrentSelectionIfChanged()}},this.onSlotChange=()=>{if(!this.isConnected)return;const pool=this.eligible();this.poolsEqual(pool,this.lastPool)||(this.reselect({resetPrevious:!0,announce:this.selectionAnnouncementsArmed}),this.restartAutoplay())},this.onFocusIn=()=>{this.focusWithin=!0,this.stopAutoplay()},this.onFocusOut=()=>{const ownerWindow=this.ownerDocument.defaultView,connectionGeneration=this.connectionGeneration,finishFocusOut=()=>{connectionGeneration!==this.connectionGeneration||!this.isConnected||(this.focusWithin=composedContains(this,deepActiveElement(this.ownerDocument)),this.focusWithin||this.restartAutoplay())};ownerWindow?ownerWindow.queueMicrotask(finishFocusOut):queueMicrotask(finishFocusOut)},this.togglePaused=()=>{this.paused=!this.paused,this.emit("lr-pause-change",Object.freeze({paused:this.paused}))}}static{this.defaultStrings={...super.defaultStrings,randomContentPause:LYRA_DEFAULT_randomContentPause,randomContentResume:LYRA_DEFAULT_randomContentResume}}static{this.immutableEventDetails=Object.freeze(["lr-content-change"])}static{this.identityEventDetailProperties=Object.freeze({"lr-content-change":Object.freeze(["items"])})}static{this.styles=[LyraElement.styles,styles]}get mode(){return this._mode}set mode(next){const normalized=RANDOM_CONTENT_MODE.normalizeReflected(this,"mode",next),old=this._mode;old!==normalized&&(this._mode=normalized,this.requestUpdate("mode",old))}connectedCallback(){this.connectionGeneration+=1;const connectionGeneration=this.connectionGeneration;super.connectedCallback(),this.addEventListener("slotchange",this.onForwardedSlotChange),this.selectionAnnouncementsArmed=!1,this.announcementSink??=acquireAnnouncementSink("polite",{document:this.ownerDocument,source:this}),this.startAuthorStateObserver(),this.startAnnouncementContentObserver();const ownerWindow=this.ownerDocument.defaultView;this.mediaQuery=ownerWindow?.matchMedia?.("(prefers-reduced-motion: reduce)"),this.reduceMotion=this.mediaQuery?.matches??!1,this.mediaQuery?.addEventListener("change",this.onMotionPreferenceChange),this.hasUpdated&&this.reselect({announce:!1}),this.restartAutoplay(),this.updateComplete.then(()=>{this.isConnected&&connectionGeneration===this.connectionGeneration&&(this.lastAnnouncementText=this.selectionAnnouncement(this.previousSelection??[]),this.selectionAnnouncementsArmed=!0)})}disconnectedCallback(){this.connectionGeneration+=1,this.selectionAnnouncementsArmed=!1,this.announcementSink?.release(),this.announcementSink=void 0,this.stopAutoplay(),this.stopAuthorStateObserver(),this.stopAnnouncementContentObserver(),this.removeEventListener("slotchange",this.onForwardedSlotChange),this.focusWithin=!1,this.restoreManagedPool(),this.mediaQuery?.removeEventListener("change",this.onMotionPreferenceChange),this.mediaQuery=void 0,super.disconnectedCallback()}firstUpdated(changed){super.firstUpdated(changed),this.reselect({announce:!1}),this.restartAutoplay()}updated(changed){super.updated(changed),this.hasUpdatedOnce&&(changed.has("items")&&this.reselect({announce:this.selectionAnnouncementsArmed}),(changed.has("autoplay")||changed.has("autoplayInterval")||changed.has("paused"))&&this.restartAutoplay()),this.hasUpdatedOnce=!0}eligible(){return this.slotEl?.assignedElements({flatten:!0})??[]}clampedCount(poolSize){return finiteInteger(this.items,1,1,poolSize)}poolsEqual(a,b){return a.length!==b.length?!1:a.every((el,index)=>el===b[index])}shuffledPick(pool,count){const arr=pool.slice(),n=Math.min(count,arr.length);for(let i=0;i<n;i+=1){const j=i+Math.floor(Math.random()*(arr.length-i)),swap=arr[i];arr[i]=arr[j],arr[j]=swap}return arr.slice(0,n)}sameAsPrevious(selection){const previous=this.previousSelection;if(!previous||previous.length!==selection.length)return!1;const previousSet=new Set(previous);return selection.every(el=>previousSet.has(el))}selectUnique(pool,count){let picked=this.shuffledPick(pool,count);if(pool.length>count){let attempts=0;for(;attempts<10&&this.sameAsPrevious(picked);)picked=this.shuffledPick(pool,count),attempts+=1}return picked}selectSequence(pool,count){const total=pool.length,start=this.sequenceCursor%total,picked=[];for(let k=0;k<count;k+=1)picked.push(pool[(start+k)%total]);return this.sequenceCursor=(start+count)%total,picked}computeSelectionForMode(pool,count){switch(this.mode){case"sequence":return this.selectSequence(pool,count);case"random":return this.shuffledPick(pool,count);default:return this.selectUnique(pool,count)}}preserveFocusedSubtree(pool,selected){const active=deepActiveElement(this.ownerDocument),focusedItem=pool.find(item=>composedContains(item,active));return!focusedItem||selected.includes(focusedItem)?selected:[...selected.slice(0,-1),focusedItem]}reconcileManagedPool(pool){const nextPool=new Set(pool);for(const item of this.managedPool)nextPool.has(item)||this.restoreAuthorState(item);for(const item of pool)this.authorState.has(item)||this.authorState.set(item,{hiddenAttribute:item.getAttribute("hidden"),ariaHidden:item.getAttribute("aria-hidden")});this.managedPool=nextPool}restoreAuthorState(item){const original=this.authorState.get(item);original&&(original.hiddenAttribute===null?item.removeAttribute("hidden"):item.setAttribute("hidden",original.hiddenAttribute),original.ariaHidden===null?item.removeAttribute("aria-hidden"):item.setAttribute("aria-hidden",original.ariaHidden),this.authorState.delete(item))}restoreManagedPool(){for(const item of this.managedPool)this.restoreAuthorState(item);this.managedPool.clear(),this.lastPool=[],this.previousSelection=void 0,this.lastAnnouncementText=""}applyManagedSelection(pool,selected){const selectedSet=new Set(selected);for(const el of pool){const shown=selectedSet.has(el);el.toggleAttribute("hidden",!shown),el.setAttribute("aria-hidden",shown?"false":"true")}}applySelection(pool,selected){this.withAuthorStateObserverPaused(()=>{this.reconcileManagedPool(pool),this.applyManagedSelection(pool,selected)}),this.hasAppliedSelection=!0,this.baseEl?.removeAttribute("data-unselected")}captureAuthorStateMutations(records){for(const record of records){if(record.type!=="attributes")continue;const item=record.target;if(!this.managedPool.has(item))continue;const state=this.authorState.get(item);state&&(record.attributeName==="hidden"&&(state.hiddenAttribute=item.getAttribute("hidden")),record.attributeName==="aria-hidden"&&(state.ariaHidden=item.getAttribute("aria-hidden")))}}observeAuthorState(){const observer=this.authorStateObserver;if(!observer)return;const options={attributes:!0,attributeFilter:["hidden","aria-hidden"],subtree:!0};observer.observe(this,options);for(const item of this.eligible())this.contains(item)||observer.observe(item,options)}startAuthorStateObserver(){if(this.authorStateObserver)return;const MutationObserverCtor=this.ownerDocument.defaultView?.MutationObserver;MutationObserverCtor&&(this.authorStateObserver=new MutationObserverCtor(records=>{this.captureAuthorStateMutations(records),this.withAuthorStateObserverPaused(()=>{const selected=this.preserveFocusedSubtree(this.lastPool,this.previousSelection??[]);this.applyManagedSelection(this.lastPool,selected),this.previousSelection=selected})}),this.observeAuthorState())}stopAuthorStateObserver(){const observer=this.authorStateObserver;observer&&(this.captureAuthorStateMutations(observer.takeRecords()),observer.disconnect(),this.authorStateObserver=void 0,this.authorStateObserverPauseDepth=0)}withAuthorStateObserverPaused(operation){const observer=this.authorStateObserver,outermost=this.authorStateObserverPauseDepth===0;outermost&&observer&&(this.captureAuthorStateMutations(observer.takeRecords()),observer.disconnect()),this.authorStateObserverPauseDepth+=1;try{return operation()}finally{this.authorStateObserverPauseDepth-=1,outermost&&observer&&this.isConnected&&this.observeAuthorState()}}selectionAnnouncement(selected){const content=selected.map(item=>composedAccessibilityText(item).replace(/\s+/g," ").trim()).filter(Boolean).join(" "),context=this.getAttribute("aria-label")?.trim()??"";return!context||context===content?content:content?`${context}: ${content}`:context}announcementObservationOptions(){return{attributes:!0,attributeFilter:["alt","aria-hidden","aria-label","class","hidden","inert","open","slot","style"],characterData:!0,childList:!0,subtree:!0}}observeAnnouncementContent(){const observer=this.announcementContentObserver;if(!observer)return;observer.disconnect();const options=this.announcementObservationOptions();observer.observe(this,options);for(const slot of this.querySelectorAll("slot"))if(slot.assignedNodes().length!==0)for(const assigned of slot.assignedNodes({flatten:!0}))observer.observe(assigned,options)}startAnnouncementContentObserver(){if(this.announcementContentObserver)return;const MutationObserverCtor=this.ownerDocument.defaultView?.MutationObserver;MutationObserverCtor&&(this.announcementContentObserver=new MutationObserverCtor(()=>{this.observeAnnouncementContent(),this.announceCurrentSelectionIfChanged()}),this.observeAnnouncementContent())}stopAnnouncementContentObserver(){this.announcementContentObserver?.disconnect(),this.announcementContentObserver=void 0}announceCurrentSelectionIfChanged(){const text=this.selectionAnnouncement(this.previousSelection??[]);if(!this.selectionAnnouncementsArmed){this.lastAnnouncementText=text;return}text!==this.lastAnnouncementText&&(this.lastAnnouncementText=text,text&&this.announcementSink?.announce(text))}reselect(options={}){const pool=this.eligible();if(this.lastPool=pool,pool.length===0)return this.withAuthorStateObserverPaused(()=>this.reconcileManagedPool(pool)),this.previousSelection=void 0,this.lastAnnouncementText="",Object.freeze([]);options.resetPrevious&&(this.previousSelection=void 0);const count=this.clampedCount(pool.length),selected=this.preserveFocusedSubtree(pool,this.computeSelectionForMode(pool,count));this.applySelection(pool,selected),this.previousSelection=selected;const announcement=this.selectionAnnouncement(selected);this.lastAnnouncementText=announcement,options.announce!==!1&&this.announcementSink?.announce(announcement);const exposedSelection=Object.freeze([...selected]);return this.emit("lr-content-change",Object.freeze({items:exposedSelection})),exposedSelection}randomize(){return this.reselect()}stopAutoplay(){this.timer!==void 0&&this.timerWindow?.clearInterval(this.timer),this.timer=void 0,this.timerWindow=void 0}restartAutoplay(){if(this.stopAutoplay(),!this.isConnected||!this.autoplay||this.paused||this.focusWithin||this.reduceMotion||this.eligible().length<2)return;const ownerWindow=this.ownerDocument.defaultView;if(!ownerWindow)return;const interval=finiteDuration(this.autoplayInterval,3e3,1e3),connectionGeneration=this.connectionGeneration;this.timerWindow=ownerWindow,this.timer=ownerWindow.setInterval(()=>{if(connectionGeneration!==this.connectionGeneration||!this.isConnected||this.ownerDocument.defaultView!==ownerWindow){this.stopAutoplay();return}this.reselect({announce:!1})},interval)}render(){const hostLabel=this.getAttribute("aria-label"),multiple=finiteInteger(this.items,1,1,Number.MAX_SAFE_INTEGER)>1;return html`
|
|
2
2
|
<div
|
|
3
3
|
part="base"
|
|
4
4
|
?data-multiple=${multiple}
|
|
5
|
+
?data-unselected=${!this.hasAppliedSelection}
|
|
5
6
|
role=${hostLabel===null?nothing:"group"}
|
|
6
7
|
aria-label=${hostLabel===null?nothing:hostLabel}
|
|
7
8
|
@focusin=${this.onFocusIn}
|
|
@@ -20,4 +21,4 @@ var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3
|
|
|
20
21
|
>
|
|
21
22
|
${this.paused?playIcon():pauseIcon()}
|
|
22
23
|
</button>`:nothing}
|
|
23
|
-
`}}__decorate([property({reflect:!0})],LyraRandomContent.prototype,"animation",void 0),__decorate([property({type:Boolean,reflect:!0})],LyraRandomContent.prototype,"autoplay",void 0),__decorate([property({type:Boolean,reflect:!0})],LyraRandomContent.prototype,"paused",void 0),__decorate([property({type:Number,attribute:"autoplay-interval"})],LyraRandomContent.prototype,"autoplayInterval",void 0),__decorate([property({type:Number})],LyraRandomContent.prototype,"items",void 0),__decorate([property({reflect:!0,converter:RANDOM_CONTENT_MODE})],LyraRandomContent.prototype,"mode",null),__decorate([query("slot")],LyraRandomContent.prototype,"slotEl",void 0);export{LyraRandomContent};
|
|
24
|
+
`}}__decorate([property({reflect:!0})],LyraRandomContent.prototype,"animation",void 0),__decorate([property({type:Boolean,reflect:!0})],LyraRandomContent.prototype,"autoplay",void 0),__decorate([property({type:Boolean,reflect:!0})],LyraRandomContent.prototype,"paused",void 0),__decorate([property({type:Number,attribute:"autoplay-interval"})],LyraRandomContent.prototype,"autoplayInterval",void 0),__decorate([property({type:Number})],LyraRandomContent.prototype,"items",void 0),__decorate([property({reflect:!0,converter:RANDOM_CONTENT_MODE})],LyraRandomContent.prototype,"mode",null),__decorate([query("slot")],LyraRandomContent.prototype,"slotEl",void 0),__decorate([query('[part="base"]')],LyraRandomContent.prototype,"baseEl",void 0);export{LyraRandomContent};
|
|
@@ -3,13 +3,12 @@ import{css}from"lit";const styles=css`
|
|
|
3
3
|
display: block;
|
|
4
4
|
min-inline-size: 0;
|
|
5
5
|
}
|
|
6
|
-
/* Consumers needing an inline text-fragment swap inside a sentence can override
|
|
7
|
-
"lr-random-content { display: inline; }" from outside -- not baked in here, since
|
|
8
|
-
"display: contents" on the host risks a11y-tree inconsistencies across engines and every
|
|
9
|
-
other component in this family defaults to "display: block". */
|
|
10
6
|
[part='base'] {
|
|
11
7
|
min-inline-size: 0;
|
|
12
8
|
}
|
|
9
|
+
[part='base'][data-unselected] ::slotted(:not(:first-child)) {
|
|
10
|
+
display: none;
|
|
11
|
+
}
|
|
13
12
|
[part='base'][data-multiple] {
|
|
14
13
|
display: flex;
|
|
15
14
|
flex-wrap: wrap;
|
|
@@ -44,9 +43,6 @@ import{css}from"lit";const styles=css`
|
|
|
44
43
|
outline-offset: var(--lr-focus-ring-offset);
|
|
45
44
|
}
|
|
46
45
|
::slotted(*) {
|
|
47
|
-
/* Inline candidates must establish a transformable box for directional entrance effects.
|
|
48
|
-
inline-block preserves their ordinary inline sizing while the base's flex formatting
|
|
49
|
-
context owns multi-item layout. */
|
|
50
46
|
display: inline-block;
|
|
51
47
|
min-inline-size: 0;
|
|
52
48
|
max-inline-size: 100%;
|
|
@@ -60,6 +56,9 @@ import{css}from"lit";const styles=css`
|
|
|
60
56
|
var(--lr-animation-easing, var(--lr-random-content-animation-easing, ease))
|
|
61
57
|
);
|
|
62
58
|
}
|
|
59
|
+
::slotted([hidden]:not([hidden='until-found' i])) {
|
|
60
|
+
display: none;
|
|
61
|
+
}
|
|
63
62
|
:host(:where([animation='fade'])) ::slotted(:not([hidden])) {
|
|
64
63
|
animation-name: lr-random-content-fade-in;
|
|
65
64
|
}
|
|
@@ -112,9 +111,6 @@ import{css}from"lit";const styles=css`
|
|
|
112
111
|
transform: translateY(0);
|
|
113
112
|
}
|
|
114
113
|
}
|
|
115
|
-
/* fade-left/fade-right are physical-direction transforms (matching the upstream naming this
|
|
116
|
-
component mirrors), not "previous/next" navigational semantics like a carousel chevron, so
|
|
117
|
-
they are deliberately not flipped under :host(:dir(rtl)). */
|
|
118
114
|
@keyframes lr-random-content-fade-in-left {
|
|
119
115
|
from {
|
|
120
116
|
opacity: 0;
|
|
@@ -144,9 +140,6 @@ import{css}from"lit";const styles=css`
|
|
|
144
140
|
transform: translateX(0);
|
|
145
141
|
}
|
|
146
142
|
}
|
|
147
|
-
/* The shared reduced-motion rule in tokens.styles.ts (:host *, :host *::before, ...) only
|
|
148
|
-
reaches the *shadow* tree -- it does not reach ::slotted() content, since slotted elements
|
|
149
|
-
live in the host's light DOM, not its shadow tree. Guard the entrance animation explicitly. */
|
|
150
143
|
@media (prefers-reduced-motion: reduce) {
|
|
151
144
|
::slotted(*) {
|
|
152
145
|
animation: none !important;
|
|
@@ -133,7 +133,7 @@ export interface LyraTourEventMap {
|
|
|
133
133
|
* @event lr-tour-end - Fired by `end()` (and by `next()` on the last step, with reason
|
|
134
134
|
* `'completed'`). `detail: LyraTourEndReason`. Conditionally cancelable: every ordinary end can be
|
|
135
135
|
* vetoed, while `'unmount'` cannot because the element is already being removed -- mirrors
|
|
136
|
-
* `lr-dialog-close` exactly.
|
|
136
|
+
* `lr-dialog`'s own `lr-close` exactly.
|
|
137
137
|
* @event lr-tour-target-missing - The active step's `target` did not resolve to a connected
|
|
138
138
|
* element. `detail: { index, step }`. Not cancelable -- informational. The tour does not
|
|
139
139
|
* auto-end; it renders that step's popover unanchored (viewport-centered, no spotlight cutout)
|
|
@@ -208,7 +208,9 @@ export declare class LyraTour extends LyraElement<LyraTourEventMap> {
|
|
|
208
208
|
* step's own `heading`, matching `lr-dialog`'s `accessibleLabel` pattern. Most consumers
|
|
209
209
|
* won't need this since each step already has a meaningful name via `heading`; setting it
|
|
210
210
|
* makes the *same* string name every step's panel. Set as a plain `aria-label` attribute on
|
|
211
|
-
* `<lr-tour>` itself, not a public JS property.
|
|
211
|
+
* `<lr-tour>` itself, not a public JS property. An explicitly empty `aria-label=""` suppresses
|
|
212
|
+
* the panel's accessible name outright rather than falling back to the heading or step count --
|
|
213
|
+
* again as `lr-dialog` does. */
|
|
212
214
|
private accessibleLabel;
|
|
213
215
|
private unanchored;
|
|
214
216
|
private hasSlotContent;
|