@aceshooting/lyra-ui 5.0.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -12
- package/custom-elements.json +2150 -220
- package/dist/components/agent-tools/activity-feed/activity-feed.class.d.ts +2 -0
- package/dist/components/agent-tools/activity-feed/activity-feed.class.d.ts.map +1 -1
- package/dist/components/agent-tools/activity-feed/activity-feed.class.js +2 -0
- package/dist/components/agent-tools/activity-feed/activity-feed.class.js.map +1 -1
- package/dist/components/agent-tools/agent-run/agent-run.class.d.ts +1 -0
- package/dist/components/agent-tools/agent-run/agent-run.class.d.ts.map +1 -1
- package/dist/components/agent-tools/agent-run/agent-run.class.js +1 -0
- package/dist/components/agent-tools/agent-run/agent-run.class.js.map +1 -1
- package/dist/components/agent-tools/compare-panel/compare-panel.class.d.ts +2 -0
- package/dist/components/agent-tools/compare-panel/compare-panel.class.d.ts.map +1 -1
- package/dist/components/agent-tools/compare-panel/compare-panel.class.js +2 -0
- package/dist/components/agent-tools/compare-panel/compare-panel.class.js.map +1 -1
- package/dist/components/agent-tools/stack-trace/stack-trace.class.d.ts +5 -0
- package/dist/components/agent-tools/stack-trace/stack-trace.class.d.ts.map +1 -1
- package/dist/components/agent-tools/stack-trace/stack-trace.class.js +5 -0
- package/dist/components/agent-tools/stack-trace/stack-trace.class.js.map +1 -1
- package/dist/components/agent-tools/terminal/terminal.class.d.ts +3 -0
- package/dist/components/agent-tools/terminal/terminal.class.d.ts.map +1 -1
- package/dist/components/agent-tools/terminal/terminal.class.js +3 -0
- package/dist/components/agent-tools/terminal/terminal.class.js.map +1 -1
- package/dist/components/agent-tools/thinking-panel/thinking-panel.class.d.ts +2 -0
- package/dist/components/agent-tools/thinking-panel/thinking-panel.class.d.ts.map +1 -1
- package/dist/components/agent-tools/thinking-panel/thinking-panel.class.js +2 -0
- package/dist/components/agent-tools/thinking-panel/thinking-panel.class.js.map +1 -1
- package/dist/components/agent-tools/tool-approval-dialog/tool-approval-dialog.class.d.ts +2 -0
- package/dist/components/agent-tools/tool-approval-dialog/tool-approval-dialog.class.d.ts.map +1 -1
- package/dist/components/agent-tools/tool-approval-dialog/tool-approval-dialog.class.js +2 -0
- package/dist/components/agent-tools/tool-approval-dialog/tool-approval-dialog.class.js.map +1 -1
- package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.d.ts +3 -0
- package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.d.ts.map +1 -1
- package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.js +3 -0
- package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.js.map +1 -1
- package/dist/components/agent-tools/tool-result-view/tool-result-view.class.d.ts +1 -0
- package/dist/components/agent-tools/tool-result-view/tool-result-view.class.d.ts.map +1 -1
- package/dist/components/agent-tools/tool-result-view/tool-result-view.class.js +1 -0
- package/dist/components/agent-tools/tool-result-view/tool-result-view.class.js.map +1 -1
- package/dist/components/agent-tools/tool-select-dialog/tool-select-dialog.class.d.ts +1 -0
- package/dist/components/agent-tools/tool-select-dialog/tool-select-dialog.class.d.ts.map +1 -1
- package/dist/components/agent-tools/tool-select-dialog/tool-select-dialog.class.js +1 -0
- package/dist/components/agent-tools/tool-select-dialog/tool-select-dialog.class.js.map +1 -1
- package/dist/components/agent-tools/tool-timeline/tool-timeline.class.d.ts +2 -0
- package/dist/components/agent-tools/tool-timeline/tool-timeline.class.d.ts.map +1 -1
- package/dist/components/agent-tools/tool-timeline/tool-timeline.class.js +2 -0
- package/dist/components/agent-tools/tool-timeline/tool-timeline.class.js.map +1 -1
- package/dist/components/charts/chart/chart.class.d.ts +15 -0
- package/dist/components/charts/chart/chart.class.d.ts.map +1 -1
- package/dist/components/charts/chart/chart.class.js +15 -0
- package/dist/components/charts/chart/chart.class.js.map +1 -1
- package/dist/components/conversation/audio-visualizer/audio-visualizer.class.d.ts +2 -0
- package/dist/components/conversation/audio-visualizer/audio-visualizer.class.d.ts.map +1 -1
- package/dist/components/conversation/audio-visualizer/audio-visualizer.class.js +2 -0
- package/dist/components/conversation/audio-visualizer/audio-visualizer.class.js.map +1 -1
- package/dist/components/conversation/branch-picker/branch-picker.class.d.ts +2 -0
- package/dist/components/conversation/branch-picker/branch-picker.class.d.ts.map +1 -1
- package/dist/components/conversation/branch-picker/branch-picker.class.js +2 -0
- package/dist/components/conversation/branch-picker/branch-picker.class.js.map +1 -1
- package/dist/components/conversation/chat-message/chat-message.class.d.ts +5 -1
- package/dist/components/conversation/chat-message/chat-message.class.d.ts.map +1 -1
- package/dist/components/conversation/chat-message/chat-message.class.js +5 -1
- package/dist/components/conversation/chat-message/chat-message.class.js.map +1 -1
- package/dist/components/conversation/chat-message/chat-message.styles.d.ts.map +1 -1
- package/dist/components/conversation/chat-message/chat-message.styles.js +15 -2
- package/dist/components/conversation/chat-message/chat-message.styles.js.map +1 -1
- package/dist/components/conversation/code-block/code-block.class.d.ts +4 -0
- package/dist/components/conversation/code-block/code-block.class.d.ts.map +1 -1
- package/dist/components/conversation/code-block/code-block.class.js +4 -0
- package/dist/components/conversation/code-block/code-block.class.js.map +1 -1
- package/dist/components/conversation/conversation-item/conversation-item.class.d.ts +2 -0
- package/dist/components/conversation/conversation-item/conversation-item.class.d.ts.map +1 -1
- package/dist/components/conversation/conversation-item/conversation-item.class.js +2 -0
- package/dist/components/conversation/conversation-item/conversation-item.class.js.map +1 -1
- package/dist/components/conversation/markdown/markdown.class.d.ts +2 -0
- package/dist/components/conversation/markdown/markdown.class.d.ts.map +1 -1
- package/dist/components/conversation/markdown/markdown.class.js +2 -0
- package/dist/components/conversation/markdown/markdown.class.js.map +1 -1
- package/dist/components/conversation/push-to-talk/push-to-talk.class.d.ts +2 -0
- package/dist/components/conversation/push-to-talk/push-to-talk.class.d.ts.map +1 -1
- package/dist/components/conversation/push-to-talk/push-to-talk.class.js +2 -0
- package/dist/components/conversation/push-to-talk/push-to-talk.class.js.map +1 -1
- package/dist/components/conversation/stream-status/stream-status.class.d.ts +5 -0
- package/dist/components/conversation/stream-status/stream-status.class.d.ts.map +1 -1
- package/dist/components/conversation/stream-status/stream-status.class.js +5 -0
- package/dist/components/conversation/stream-status/stream-status.class.js.map +1 -1
- package/dist/components/conversation/streaming-text/streaming-text.class.d.ts +2 -0
- package/dist/components/conversation/streaming-text/streaming-text.class.d.ts.map +1 -1
- package/dist/components/conversation/streaming-text/streaming-text.class.js +2 -0
- package/dist/components/conversation/streaming-text/streaming-text.class.js.map +1 -1
- package/dist/components/conversation/transcript-feed/transcript-feed.class.d.ts +1 -0
- package/dist/components/conversation/transcript-feed/transcript-feed.class.d.ts.map +1 -1
- package/dist/components/conversation/transcript-feed/transcript-feed.class.js +1 -0
- package/dist/components/conversation/transcript-feed/transcript-feed.class.js.map +1 -1
- package/dist/components/data/calendar/calendar.class.d.ts +6 -0
- package/dist/components/data/calendar/calendar.class.d.ts.map +1 -1
- package/dist/components/data/calendar/calendar.class.js +6 -0
- package/dist/components/data/calendar/calendar.class.js.map +1 -1
- package/dist/components/data/context-meter/context-meter.class.d.ts +1 -0
- package/dist/components/data/context-meter/context-meter.class.d.ts.map +1 -1
- package/dist/components/data/context-meter/context-meter.class.js +1 -0
- package/dist/components/data/context-meter/context-meter.class.js.map +1 -1
- package/dist/components/data/data-grid/data-grid.class.d.ts +1 -0
- package/dist/components/data/data-grid/data-grid.class.d.ts.map +1 -1
- package/dist/components/data/data-grid/data-grid.class.js +1 -0
- package/dist/components/data/data-grid/data-grid.class.js.map +1 -1
- package/dist/components/data/flow-canvas/flow-canvas.class.d.ts +3 -1
- package/dist/components/data/flow-canvas/flow-canvas.class.d.ts.map +1 -1
- package/dist/components/data/flow-canvas/flow-canvas.class.js +3 -1
- package/dist/components/data/flow-canvas/flow-canvas.class.js.map +1 -1
- package/dist/components/data/flow-minimap/flow-minimap.class.d.ts +2 -2
- package/dist/components/data/flow-minimap/flow-minimap.class.js +2 -2
- package/dist/components/data/flow-node/flow-node.class.d.ts +1 -1
- package/dist/components/data/flow-node/flow-node.class.js +1 -1
- package/dist/components/data/heatmap/heatmap.class.d.ts +51 -2
- package/dist/components/data/heatmap/heatmap.class.d.ts.map +1 -1
- package/dist/components/data/heatmap/heatmap.class.js +42 -6
- package/dist/components/data/heatmap/heatmap.class.js.map +1 -1
- package/dist/components/data/heatmap/heatmap.styles.d.ts.map +1 -1
- package/dist/components/data/heatmap/heatmap.styles.js +19 -0
- package/dist/components/data/heatmap/heatmap.styles.js.map +1 -1
- package/dist/components/data/sequence-strip/sequence-strip.class.d.ts +20 -0
- package/dist/components/data/sequence-strip/sequence-strip.class.d.ts.map +1 -1
- package/dist/components/data/sequence-strip/sequence-strip.class.js +35 -0
- package/dist/components/data/sequence-strip/sequence-strip.class.js.map +1 -1
- package/dist/components/data/sequence-strip/sequence-strip.styles.d.ts.map +1 -1
- package/dist/components/data/sequence-strip/sequence-strip.styles.js +29 -0
- package/dist/components/data/sequence-strip/sequence-strip.styles.js.map +1 -1
- package/dist/components/data/table/table.class.d.ts +11 -0
- package/dist/components/data/table/table.class.d.ts.map +1 -1
- package/dist/components/data/table/table.class.js +11 -0
- package/dist/components/data/table/table.class.js.map +1 -1
- package/dist/components/data/timeline/timeline-item.class.d.ts +17 -0
- package/dist/components/data/timeline/timeline-item.class.d.ts.map +1 -1
- package/dist/components/data/timeline/timeline-item.class.js +17 -0
- package/dist/components/data/timeline/timeline-item.class.js.map +1 -1
- package/dist/components/data/timeline/timeline.styles.d.ts.map +1 -1
- package/dist/components/data/timeline/timeline.styles.js +6 -3
- package/dist/components/data/timeline/timeline.styles.js.map +1 -1
- package/dist/components/data/tree/tree-node.class.d.ts +3 -0
- package/dist/components/data/tree/tree-node.class.d.ts.map +1 -1
- package/dist/components/data/tree/tree-node.class.js +3 -0
- package/dist/components/data/tree/tree-node.class.js.map +1 -1
- package/dist/components/forms/button/button.class.d.ts +24 -0
- package/dist/components/forms/button/button.class.d.ts.map +1 -1
- package/dist/components/forms/button/button.class.js +24 -0
- package/dist/components/forms/button/button.class.js.map +1 -1
- package/dist/components/forms/code-editor/code-editor.class.d.ts +28 -12
- package/dist/components/forms/code-editor/code-editor.class.d.ts.map +1 -1
- package/dist/components/forms/code-editor/code-editor.class.js +44 -14
- package/dist/components/forms/code-editor/code-editor.class.js.map +1 -1
- package/dist/components/forms/code-editor/code-editor.styles.d.ts.map +1 -1
- package/dist/components/forms/code-editor/code-editor.styles.js +4 -0
- package/dist/components/forms/code-editor/code-editor.styles.js.map +1 -1
- package/dist/components/forms/combobox/combobox.class.d.ts +10 -0
- package/dist/components/forms/combobox/combobox.class.d.ts.map +1 -1
- package/dist/components/forms/combobox/combobox.class.js +16 -0
- package/dist/components/forms/combobox/combobox.class.js.map +1 -1
- package/dist/components/forms/combobox/option.class.d.ts +3 -3
- package/dist/components/forms/combobox/option.class.d.ts.map +1 -1
- package/dist/components/forms/combobox/option.class.js +9 -0
- package/dist/components/forms/combobox/option.class.js.map +1 -1
- package/dist/components/forms/date-picker/date-input.class.d.ts +3 -0
- package/dist/components/forms/date-picker/date-input.class.d.ts.map +1 -1
- package/dist/components/forms/date-picker/date-input.class.js +3 -0
- package/dist/components/forms/date-picker/date-input.class.js.map +1 -1
- package/dist/components/forms/emoji-picker/emoji-picker.class.d.ts +37 -2
- package/dist/components/forms/emoji-picker/emoji-picker.class.d.ts.map +1 -1
- package/dist/components/forms/emoji-picker/emoji-picker.class.js +113 -10
- package/dist/components/forms/emoji-picker/emoji-picker.class.js.map +1 -1
- package/dist/components/forms/emoji-picker/emoji-picker.styles.d.ts.map +1 -1
- package/dist/components/forms/emoji-picker/emoji-picker.styles.js +30 -0
- package/dist/components/forms/emoji-picker/emoji-picker.styles.js.map +1 -1
- package/dist/components/forms/icon-button/icon-button.class.d.ts +4 -0
- package/dist/components/forms/icon-button/icon-button.class.d.ts.map +1 -1
- package/dist/components/forms/icon-button/icon-button.class.js +4 -0
- package/dist/components/forms/icon-button/icon-button.class.js.map +1 -1
- package/dist/components/forms/input/input.class.d.ts +11 -3
- package/dist/components/forms/input/input.class.d.ts.map +1 -1
- package/dist/components/forms/input/input.class.js +3 -0
- package/dist/components/forms/input/input.class.js.map +1 -1
- package/dist/components/forms/input/time-input.class.d.ts +12 -0
- package/dist/components/forms/input/time-input.class.d.ts.map +1 -1
- package/dist/components/forms/input/time-input.class.js +27 -0
- package/dist/components/forms/input/time-input.class.js.map +1 -1
- package/dist/components/forms/rubric-form/rubric-form.class.d.ts +7 -0
- package/dist/components/forms/rubric-form/rubric-form.class.d.ts.map +1 -1
- package/dist/components/forms/rubric-form/rubric-form.class.js +7 -0
- package/dist/components/forms/rubric-form/rubric-form.class.js.map +1 -1
- package/dist/components/forms/select/select.class.d.ts +8 -0
- package/dist/components/forms/select/select.class.d.ts.map +1 -1
- package/dist/components/forms/select/select.class.js +8 -0
- package/dist/components/forms/select/select.class.js.map +1 -1
- package/dist/components/forms/swatch-picker/swatch-picker.class.d.ts +1 -1
- package/dist/components/forms/swatch-picker/swatch-picker.class.js +1 -1
- package/dist/components/forms/switch/switch.class.d.ts +6 -0
- package/dist/components/forms/switch/switch.class.d.ts.map +1 -1
- package/dist/components/forms/switch/switch.class.js +6 -0
- package/dist/components/forms/switch/switch.class.js.map +1 -1
- package/dist/components/forms/token-input/token-input.class.d.ts +2 -0
- package/dist/components/forms/token-input/token-input.class.d.ts.map +1 -1
- package/dist/components/forms/token-input/token-input.class.js +2 -0
- package/dist/components/forms/token-input/token-input.class.js.map +1 -1
- package/dist/components/layout/app-rail/app-rail.class.d.ts +8 -0
- package/dist/components/layout/app-rail/app-rail.class.d.ts.map +1 -1
- package/dist/components/layout/app-rail/app-rail.class.js +8 -0
- package/dist/components/layout/app-rail/app-rail.class.js.map +1 -1
- package/dist/components/layout/button-group/button-group.class.d.ts +1 -1
- package/dist/components/layout/button-group/button-group.class.js +1 -1
- package/dist/components/layout/command-palette/command-palette.class.d.ts +12 -0
- package/dist/components/layout/command-palette/command-palette.class.d.ts.map +1 -1
- package/dist/components/layout/command-palette/command-palette.class.js +12 -0
- package/dist/components/layout/command-palette/command-palette.class.js.map +1 -1
- package/dist/components/layout/control-group/control-group.class.d.ts +1 -1
- package/dist/components/layout/control-group/control-group.class.js +1 -1
- package/dist/components/layout/dashboard-grid/dashboard-grid.class.d.ts +7 -0
- package/dist/components/layout/dashboard-grid/dashboard-grid.class.d.ts.map +1 -1
- package/dist/components/layout/dashboard-grid/dashboard-grid.class.js +7 -0
- package/dist/components/layout/dashboard-grid/dashboard-grid.class.js.map +1 -1
- package/dist/components/layout/dock-panel/dock-panel.class.d.ts +3 -0
- package/dist/components/layout/dock-panel/dock-panel.class.d.ts.map +1 -1
- package/dist/components/layout/dock-panel/dock-panel.class.js +3 -0
- package/dist/components/layout/dock-panel/dock-panel.class.js.map +1 -1
- package/dist/components/layout/responsive-panel/responsive-panel.class.d.ts +2 -0
- package/dist/components/layout/responsive-panel/responsive-panel.class.d.ts.map +1 -1
- package/dist/components/layout/responsive-panel/responsive-panel.class.js +2 -0
- package/dist/components/layout/responsive-panel/responsive-panel.class.js.map +1 -1
- package/dist/components/layout/scroller/scroller.class.d.ts +2 -2
- package/dist/components/layout/scroller/scroller.class.js +2 -2
- package/dist/components/layout/segmented/segmented.class.d.ts +6 -0
- package/dist/components/layout/segmented/segmented.class.d.ts.map +1 -1
- package/dist/components/layout/segmented/segmented.class.js +6 -0
- package/dist/components/layout/segmented/segmented.class.js.map +1 -1
- package/dist/components/layout/split/split.class.d.ts +68 -15
- package/dist/components/layout/split/split.class.d.ts.map +1 -1
- package/dist/components/layout/split/split.class.js +80 -21
- package/dist/components/layout/split/split.class.js.map +1 -1
- package/dist/components/layout/stepper/stepper.class.d.ts +52 -11
- package/dist/components/layout/stepper/stepper.class.d.ts.map +1 -1
- package/dist/components/layout/stepper/stepper.class.js +69 -17
- package/dist/components/layout/stepper/stepper.class.js.map +1 -1
- package/dist/components/layout/virtual-list/virtual-list.class.d.ts +3 -0
- package/dist/components/layout/virtual-list/virtual-list.class.d.ts.map +1 -1
- package/dist/components/layout/virtual-list/virtual-list.class.js +3 -0
- package/dist/components/layout/virtual-list/virtual-list.class.js.map +1 -1
- package/dist/components/layout/widget/widget.class.d.ts +6 -0
- package/dist/components/layout/widget/widget.class.d.ts.map +1 -1
- package/dist/components/layout/widget/widget.class.js +6 -0
- package/dist/components/layout/widget/widget.class.js.map +1 -1
- package/dist/components/media/attachment-chip/attachment-chip.class.d.ts +13 -0
- package/dist/components/media/attachment-chip/attachment-chip.class.d.ts.map +1 -1
- package/dist/components/media/attachment-chip/attachment-chip.class.js +13 -0
- package/dist/components/media/attachment-chip/attachment-chip.class.js.map +1 -1
- package/dist/components/media/avatar/avatar.class.d.ts +6 -0
- package/dist/components/media/avatar/avatar.class.d.ts.map +1 -1
- package/dist/components/media/avatar/avatar.class.js +6 -0
- package/dist/components/media/avatar/avatar.class.js.map +1 -1
- package/dist/components/media/media-card/media-card.class.d.ts +2 -0
- package/dist/components/media/media-card/media-card.class.d.ts.map +1 -1
- package/dist/components/media/media-card/media-card.class.js +2 -0
- package/dist/components/media/media-card/media-card.class.js.map +1 -1
- package/dist/components/media/playback/playback.class.d.ts +2 -0
- package/dist/components/media/playback/playback.class.d.ts.map +1 -1
- package/dist/components/media/playback/playback.class.js +2 -0
- package/dist/components/media/playback/playback.class.js.map +1 -1
- package/dist/components/media/zoomable-frame/zoomable-frame.class.d.ts +3 -0
- package/dist/components/media/zoomable-frame/zoomable-frame.class.d.ts.map +1 -1
- package/dist/components/media/zoomable-frame/zoomable-frame.class.js +3 -0
- package/dist/components/media/zoomable-frame/zoomable-frame.class.js.map +1 -1
- package/dist/components/overlays/badge/badge.class.d.ts +6 -0
- package/dist/components/overlays/badge/badge.class.d.ts.map +1 -1
- package/dist/components/overlays/badge/badge.class.js +6 -0
- package/dist/components/overlays/badge/badge.class.js.map +1 -1
- package/dist/components/overlays/callout/callout.class.d.ts +6 -0
- package/dist/components/overlays/callout/callout.class.d.ts.map +1 -1
- package/dist/components/overlays/callout/callout.class.js +6 -0
- package/dist/components/overlays/callout/callout.class.js.map +1 -1
- package/dist/components/overlays/chip/chip.class.d.ts +18 -0
- package/dist/components/overlays/chip/chip.class.d.ts.map +1 -1
- package/dist/components/overlays/chip/chip.class.js +18 -0
- package/dist/components/overlays/chip/chip.class.js.map +1 -1
- package/dist/components/overlays/dialog/dialog.class.d.ts +6 -0
- package/dist/components/overlays/dialog/dialog.class.d.ts.map +1 -1
- package/dist/components/overlays/dialog/dialog.class.js +6 -0
- package/dist/components/overlays/dialog/dialog.class.js.map +1 -1
- package/dist/components/overlays/drawer/drawer.class.d.ts +6 -0
- package/dist/components/overlays/drawer/drawer.class.d.ts.map +1 -1
- package/dist/components/overlays/drawer/drawer.class.js +6 -0
- package/dist/components/overlays/drawer/drawer.class.js.map +1 -1
- package/dist/components/overlays/progress/progress-ring.class.d.ts +1 -0
- package/dist/components/overlays/progress/progress-ring.class.d.ts.map +1 -1
- package/dist/components/overlays/progress/progress-ring.class.js +1 -0
- package/dist/components/overlays/progress/progress-ring.class.js.map +1 -1
- package/dist/components/overlays/skeleton/skeleton.class.d.ts +2 -0
- package/dist/components/overlays/skeleton/skeleton.class.d.ts.map +1 -1
- package/dist/components/overlays/skeleton/skeleton.class.js +2 -0
- package/dist/components/overlays/skeleton/skeleton.class.js.map +1 -1
- package/dist/components/overlays/spinner/spinner.class.d.ts +4 -0
- package/dist/components/overlays/spinner/spinner.class.d.ts.map +1 -1
- package/dist/components/overlays/spinner/spinner.class.js +4 -0
- package/dist/components/overlays/spinner/spinner.class.js.map +1 -1
- package/dist/components/overlays/toast/toast-item.class.d.ts +11 -0
- package/dist/components/overlays/toast/toast-item.class.d.ts.map +1 -1
- package/dist/components/overlays/toast/toast-item.class.js +11 -0
- package/dist/components/overlays/toast/toast-item.class.js.map +1 -1
- package/dist/components/overlays/toast/toast.class.d.ts +15 -0
- package/dist/components/overlays/toast/toast.class.d.ts.map +1 -1
- package/dist/components/overlays/toast/toast.class.js +15 -0
- package/dist/components/overlays/toast/toast.class.js.map +1 -1
- package/dist/components/retrieval/citation-badge/citation-badge.class.d.ts +8 -0
- package/dist/components/retrieval/citation-badge/citation-badge.class.d.ts.map +1 -1
- package/dist/components/retrieval/citation-badge/citation-badge.class.js +8 -0
- package/dist/components/retrieval/citation-badge/citation-badge.class.js.map +1 -1
- package/dist/components/retrieval/entity-chip/entity-chip.class.d.ts +1 -0
- package/dist/components/retrieval/entity-chip/entity-chip.class.d.ts.map +1 -1
- package/dist/components/retrieval/entity-chip/entity-chip.class.js +1 -0
- package/dist/components/retrieval/entity-chip/entity-chip.class.js.map +1 -1
- package/dist/components/retrieval/ingestion-queue/ingestion-queue.class.d.ts +2 -0
- package/dist/components/retrieval/ingestion-queue/ingestion-queue.class.d.ts.map +1 -1
- package/dist/components/retrieval/ingestion-queue/ingestion-queue.class.js +2 -0
- package/dist/components/retrieval/ingestion-queue/ingestion-queue.class.js.map +1 -1
- package/dist/components/retrieval/retrieval-trace/retrieval-trace.class.d.ts +1 -0
- package/dist/components/retrieval/retrieval-trace/retrieval-trace.class.d.ts.map +1 -1
- package/dist/components/retrieval/retrieval-trace/retrieval-trace.class.js +1 -0
- package/dist/components/retrieval/retrieval-trace/retrieval-trace.class.js.map +1 -1
- package/dist/components/utility/diff-view/diff-view.class.d.ts +1 -0
- package/dist/components/utility/diff-view/diff-view.class.d.ts.map +1 -1
- package/dist/components/utility/diff-view/diff-view.class.js +1 -0
- package/dist/components/utility/diff-view/diff-view.class.js.map +1 -1
- package/dist/components/utility/icon/icon.class.d.ts +1 -0
- package/dist/components/utility/icon/icon.class.d.ts.map +1 -1
- package/dist/components/utility/icon/icon.class.js +1 -0
- package/dist/components/utility/icon/icon.class.js.map +1 -1
- package/dist/components/utility/json-viewer/json-viewer.class.d.ts +3 -0
- package/dist/components/utility/json-viewer/json-viewer.class.d.ts.map +1 -1
- package/dist/components/utility/json-viewer/json-viewer.class.js +3 -0
- package/dist/components/utility/json-viewer/json-viewer.class.js.map +1 -1
- package/dist/components/utility/known-date/known-date.class.d.ts +11 -0
- package/dist/components/utility/known-date/known-date.class.d.ts.map +1 -1
- package/dist/components/utility/known-date/known-date.class.js +11 -0
- package/dist/components/utility/known-date/known-date.class.js.map +1 -1
- package/dist/components/viewers/calendar-viewer/calendar-viewer.class.d.ts +2 -0
- package/dist/components/viewers/calendar-viewer/calendar-viewer.class.d.ts.map +1 -1
- package/dist/components/viewers/calendar-viewer/calendar-viewer.class.js +2 -0
- package/dist/components/viewers/calendar-viewer/calendar-viewer.class.js.map +1 -1
- package/dist/components/viewers/dataset-viewer/dataset-viewer.class.d.ts +5 -0
- package/dist/components/viewers/dataset-viewer/dataset-viewer.class.d.ts.map +1 -1
- package/dist/components/viewers/dataset-viewer/dataset-viewer.class.js +5 -0
- package/dist/components/viewers/dataset-viewer/dataset-viewer.class.js.map +1 -1
- package/dist/components/viewers/document-compare/document-compare.class.d.ts +1 -1
- package/dist/components/viewers/document-compare/document-compare.class.js +1 -1
- package/dist/components/viewers/document-preview/document-preview.class.d.ts +3 -0
- package/dist/components/viewers/document-preview/document-preview.class.d.ts.map +1 -1
- package/dist/components/viewers/document-preview/document-preview.class.js +3 -0
- package/dist/components/viewers/document-preview/document-preview.class.js.map +1 -1
- package/dist/components/viewers/email-viewer/email-viewer.class.d.ts +2 -0
- package/dist/components/viewers/email-viewer/email-viewer.class.d.ts.map +1 -1
- package/dist/components/viewers/email-viewer/email-viewer.class.js +2 -0
- package/dist/components/viewers/email-viewer/email-viewer.class.js.map +1 -1
- package/dist/components/viewers/html-viewer/html-viewer.class.d.ts +2 -0
- package/dist/components/viewers/html-viewer/html-viewer.class.d.ts.map +1 -1
- package/dist/components/viewers/html-viewer/html-viewer.class.js +2 -0
- package/dist/components/viewers/html-viewer/html-viewer.class.js.map +1 -1
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.d.ts.map +1 -1
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.js +41 -9
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.js.map +1 -1
- package/dist/internal/css-length.d.ts +40 -0
- package/dist/internal/css-length.d.ts.map +1 -0
- package/dist/internal/css-length.js +72 -0
- package/dist/internal/css-length.js.map +1 -0
- package/dist/internal/orientation-breakpoint.d.ts +12 -0
- package/dist/internal/orientation-breakpoint.d.ts.map +1 -0
- package/dist/internal/orientation-breakpoint.js +127 -0
- package/dist/internal/orientation-breakpoint.js.map +1 -0
- package/dist/lyra.d.ts +2 -2
- package/dist/lyra.d.ts.map +1 -1
- package/dist/lyra.js.map +1 -1
- package/llms/components/lr-accordion-item.md +23 -0
- package/llms/components/lr-accordion.md +23 -0
- package/llms/components/lr-activity-feed.md +45 -0
- package/llms/components/lr-agent-run.md +66 -0
- package/llms/components/lr-agent-trace.md +42 -0
- package/llms/components/lr-agent-workspace.md +109 -0
- package/llms/components/lr-animated-image.md +66 -0
- package/llms/components/lr-animation.md +73 -0
- package/llms/components/lr-app-rail-item.md +218 -0
- package/llms/components/lr-app-rail.md +218 -0
- package/llms/components/lr-archive-viewer.md +36 -0
- package/llms/components/lr-artifact-panel.md +60 -0
- package/llms/components/lr-attachment-chip.md +131 -0
- package/llms/components/lr-attachment-trigger.md +90 -0
- package/llms/components/lr-audio-visualizer.md +43 -0
- package/llms/components/lr-av-player.md +50 -0
- package/llms/components/lr-avatar-group.md +69 -0
- package/llms/components/lr-avatar.md +69 -0
- package/llms/components/lr-badge.md +25 -0
- package/llms/components/lr-bar-chart.md +70 -0
- package/llms/components/lr-box-plot.md +67 -0
- package/llms/components/lr-branch-picker.md +32 -0
- package/llms/components/lr-breadcrumb-item.md +30 -0
- package/llms/components/lr-breadcrumb.md +30 -0
- package/llms/components/lr-browser-frame.md +51 -0
- package/llms/components/lr-bubble-chart.md +70 -0
- package/llms/components/lr-button-group.md +30 -0
- package/llms/components/lr-button.md +89 -0
- package/llms/components/lr-calendar-viewer.md +32 -0
- package/llms/components/lr-calendar.md +52 -0
- package/llms/components/lr-callout.md +37 -0
- package/llms/components/lr-card.md +67 -0
- package/llms/components/lr-carousel-item.md +29 -0
- package/llms/components/lr-carousel.md +43 -0
- package/llms/components/lr-chart.md +148 -0
- package/llms/components/lr-chat-composer.md +139 -0
- package/llms/components/lr-chat-message.md +145 -0
- package/llms/components/lr-chat-viewport.md +70 -0
- package/llms/components/lr-checkbox-group.md +21 -0
- package/llms/components/lr-checkbox.md +79 -0
- package/llms/components/lr-checkpoint.md +48 -0
- package/llms/components/lr-chip-group.md +152 -0
- package/llms/components/lr-chip.md +152 -0
- package/llms/components/lr-chunk-inspector.md +66 -0
- package/llms/components/lr-citation-badge.md +102 -0
- package/llms/components/lr-code-block-core.md +113 -0
- package/llms/components/lr-code-block.md +146 -0
- package/llms/components/lr-code-editor.md +72 -0
- package/llms/components/lr-color-picker.md +21 -0
- package/llms/components/lr-combobox.md +196 -0
- package/llms/components/lr-command-palette.md +50 -0
- package/llms/components/lr-commit-card.md +33 -0
- package/llms/components/lr-community-card.md +54 -0
- package/llms/components/lr-compare-panel.md +38 -0
- package/llms/components/lr-confirm-bar.md +48 -0
- package/llms/components/lr-contact-viewer.md +34 -0
- package/llms/components/lr-context-inspector.md +50 -0
- package/llms/components/lr-context-meter.md +92 -0
- package/llms/components/lr-control-group.md +46 -0
- package/llms/components/lr-conversation-item.md +118 -0
- package/llms/components/lr-copy-button.md +52 -0
- package/llms/components/lr-csv-viewer.md +49 -0
- package/llms/components/lr-dashboard-grid.md +34 -0
- package/llms/components/lr-data-grid.md +47 -0
- package/llms/components/lr-dataset-viewer.md +60 -0
- package/llms/components/lr-date-input.md +201 -0
- package/llms/components/lr-date-picker.md +201 -0
- package/llms/components/lr-details.md +23 -0
- package/llms/components/lr-dialog.md +185 -0
- package/llms/components/lr-diff-view.md +86 -0
- package/llms/components/lr-divider.md +28 -0
- package/llms/components/lr-dock-panel.md +110 -0
- package/llms/components/lr-document-compare.md +22 -0
- package/llms/components/lr-document-library.md +21 -0
- package/llms/components/lr-document-preview.md +179 -0
- package/llms/components/lr-document-viewer.md +84 -0
- package/llms/components/lr-docx-viewer.md +63 -0
- package/llms/components/lr-doughnut-chart.md +70 -0
- package/llms/components/lr-drawer.md +48 -0
- package/llms/components/lr-drilldown-panel.md +25 -0
- package/llms/components/lr-dropdown-item.md +171 -0
- package/llms/components/lr-dropdown.md +24 -0
- package/llms/components/lr-ebook-viewer.md +60 -0
- package/llms/components/lr-email-viewer.md +51 -0
- package/llms/components/lr-emoji-picker.md +71 -0
- package/llms/components/lr-empty.md +56 -0
- package/llms/components/lr-entity-card.md +64 -0
- package/llms/components/lr-entity-chip.md +50 -0
- package/llms/components/lr-entity-dossier.md +71 -0
- package/llms/components/lr-env-list.md +27 -0
- package/llms/components/lr-eval-dataset.md +45 -0
- package/llms/components/lr-eval-result.md +45 -0
- package/llms/components/lr-evaluation-run.md +50 -0
- package/llms/components/lr-export-button.md +104 -0
- package/llms/components/lr-file-icon.md +34 -0
- package/llms/components/lr-file-input.md +104 -0
- package/llms/components/lr-file-tree.md +29 -0
- package/llms/components/lr-filter-bar.md +20 -0
- package/llms/components/lr-flag.md +122 -0
- package/llms/components/lr-flow-canvas.md +112 -0
- package/llms/components/lr-flow-controls.md +47 -0
- package/llms/components/lr-flow-minimap.md +52 -0
- package/llms/components/lr-flow-node.md +56 -0
- package/llms/components/lr-flow-run-overlay.md +56 -0
- package/llms/components/lr-format-bytes.md +31 -0
- package/llms/components/lr-format-date.md +33 -0
- package/llms/components/lr-format-number.md +41 -0
- package/llms/components/lr-gauge.md +65 -0
- package/llms/components/lr-generation-status.md +105 -0
- package/llms/components/lr-geojson-view.md +43 -0
- package/llms/components/lr-graph-legend.md +64 -0
- package/llms/components/lr-graph-query-builder.md +27 -0
- package/llms/components/lr-graph.md +224 -0
- package/llms/components/lr-grounding-summary.md +57 -0
- package/llms/components/lr-handoff-divider.md +27 -0
- package/llms/components/lr-heatmap.md +232 -0
- package/llms/components/lr-highlight-layer.md +31 -0
- package/llms/components/lr-histogram.md +69 -0
- package/llms/components/lr-html-viewer.md +30 -0
- package/llms/components/lr-icon-button.md +39 -0
- package/llms/components/lr-icon.md +36 -0
- package/llms/components/lr-image-comparer.md +38 -0
- package/llms/components/lr-image-viewer.md +35 -0
- package/llms/components/lr-include.md +53 -0
- package/llms/components/lr-ingestion-queue.md +60 -0
- package/llms/components/lr-input.md +82 -0
- package/llms/components/lr-intersection-observer.md +25 -0
- package/llms/components/lr-json-viewer.md +98 -0
- package/llms/components/lr-kbd.md +74 -0
- package/llms/components/lr-knowledge-base.md +64 -0
- package/llms/components/lr-knowledge-graph-explorer.md +92 -0
- package/llms/components/lr-known-date.md +84 -0
- package/llms/components/lr-lightbox.md +79 -0
- package/llms/components/lr-line-chart.md +70 -0
- package/llms/components/lr-lite-chart.md +143 -0
- package/llms/components/lr-live-region.md +105 -0
- package/llms/components/lr-map.md +127 -0
- package/llms/components/lr-markdown-core.md +70 -0
- package/llms/components/lr-markdown.md +171 -0
- package/llms/components/lr-media-card.md +106 -0
- package/llms/components/lr-memory-panel.md +67 -0
- package/llms/components/lr-mention-popover.md +139 -0
- package/llms/components/lr-menu-item.md +171 -0
- package/llms/components/lr-menu.md +171 -0
- package/llms/components/lr-message-actions.md +48 -0
- package/llms/components/lr-message-feedback.md +37 -0
- package/llms/components/lr-mind-map.md +64 -0
- package/llms/components/lr-model-select.md +144 -0
- package/llms/components/lr-model-settings-panel.md +99 -0
- package/llms/components/lr-mutation-observer.md +27 -0
- package/llms/components/lr-neighbor-list.md +56 -0
- package/llms/components/lr-node-palette.md +67 -0
- package/llms/components/lr-notebook-viewer.md +65 -0
- package/llms/components/lr-number-input.md +44 -0
- package/llms/components/lr-option.md +196 -0
- package/llms/components/lr-page-rail.md +37 -0
- package/llms/components/lr-pagination.md +88 -0
- package/llms/components/lr-path-strip.md +55 -0
- package/llms/components/lr-pdf-viewer.md +78 -0
- package/llms/components/lr-phone-input.md +162 -0
- package/llms/components/lr-pie-chart.md +70 -0
- package/llms/components/lr-playback.md +74 -0
- package/llms/components/lr-polar-area-chart.md +70 -0
- package/llms/components/lr-policy-summary.md +33 -0
- package/llms/components/lr-poll-status.md +71 -0
- package/llms/components/lr-popover.md +31 -0
- package/llms/components/lr-pptx-viewer.md +35 -0
- package/llms/components/lr-progress-bar.md +22 -0
- package/llms/components/lr-progress-ring.md +26 -0
- package/llms/components/lr-provenance-panel.md +58 -0
- package/llms/components/lr-push-to-talk.md +50 -0
- package/llms/components/lr-qr-code.md +20 -0
- package/llms/components/lr-query-builder.md +21 -0
- package/llms/components/lr-radar-chart.md +70 -0
- package/llms/components/lr-radio-group.md +25 -0
- package/llms/components/lr-radio.md +31 -0
- package/llms/components/lr-random-content.md +62 -0
- package/llms/components/lr-rating.md +21 -0
- package/llms/components/lr-relative-time.md +31 -0
- package/llms/components/lr-resize-observer.md +25 -0
- package/llms/components/lr-responsive-panel.md +112 -0
- package/llms/components/lr-result-card.md +88 -0
- package/llms/components/lr-result-field.md +88 -0
- package/llms/components/lr-retrieval-results.md +84 -0
- package/llms/components/lr-retrieval-search.md +70 -0
- package/llms/components/lr-retrieval-trace.md +59 -0
- package/llms/components/lr-rubric-form.md +37 -0
- package/llms/components/lr-scatter-chart.md +70 -0
- package/llms/components/lr-scroller.md +47 -0
- package/llms/components/lr-segmented.md +74 -0
- package/llms/components/lr-select.md +113 -0
- package/llms/components/lr-sequence-strip.md +95 -0
- package/llms/components/lr-skeleton.md +53 -0
- package/llms/components/lr-slider.md +92 -0
- package/llms/components/lr-source-card.md +131 -0
- package/llms/components/lr-source-list.md +131 -0
- package/llms/components/lr-source-picker.md +63 -0
- package/llms/components/lr-span-waterfall.md +42 -0
- package/llms/components/lr-sparkline.md +60 -0
- package/llms/components/lr-spinner.md +32 -0
- package/llms/components/lr-split.md +191 -0
- package/llms/components/lr-spreadsheet-viewer.md +47 -0
- package/llms/components/lr-stack-trace.md +77 -0
- package/llms/components/lr-stat.md +89 -0
- package/llms/components/lr-stepper.md +118 -0
- package/llms/components/lr-stream-status.md +128 -0
- package/llms/components/lr-streaming-text.md +101 -0
- package/llms/components/lr-suggestion-chips.md +40 -0
- package/llms/components/lr-svg-viewer.md +47 -0
- package/llms/components/lr-swatch-picker.md +91 -0
- package/llms/components/lr-switch.md +82 -0
- package/llms/components/lr-table.md +201 -0
- package/llms/components/lr-tabs.md +80 -0
- package/llms/components/lr-tag.md +25 -0
- package/llms/components/lr-task-list.md +42 -0
- package/llms/components/lr-terminal.md +44 -0
- package/llms/components/lr-test-results.md +38 -0
- package/llms/components/lr-textarea.md +111 -0
- package/llms/components/lr-thinking-panel.md +93 -0
- package/llms/components/lr-thread-list.md +97 -0
- package/llms/components/lr-time-input.md +53 -0
- package/llms/components/lr-time-range.md +91 -0
- package/llms/components/lr-timeline-item.md +65 -0
- package/llms/components/lr-timeline.md +65 -0
- package/llms/components/lr-toast-item.md +123 -0
- package/llms/components/lr-toast.md +123 -0
- package/llms/components/lr-token-input.md +31 -0
- package/llms/components/lr-tool-approval-dialog.md +131 -0
- package/llms/components/lr-tool-call-chip.md +101 -0
- package/llms/components/lr-tool-param-form.md +148 -0
- package/llms/components/lr-tool-result-dialog.md +106 -0
- package/llms/components/lr-tool-result-view.md +162 -0
- package/llms/components/lr-tool-select-dialog.md +124 -0
- package/llms/components/lr-tool-timeline.md +56 -0
- package/llms/components/lr-tooltip.md +47 -0
- package/llms/components/lr-tour.md +100 -0
- package/llms/components/lr-trace-tree.md +35 -0
- package/llms/components/lr-transcript-feed.md +45 -0
- package/llms/components/lr-tree-node.md +133 -0
- package/llms/components/lr-tree.md +133 -0
- package/llms/components/lr-typing-indicator.md +80 -0
- package/llms/components/lr-usage-badge.md +44 -0
- package/llms/components/lr-virtual-list.md +145 -0
- package/llms/components/lr-voice-picker.md +78 -0
- package/llms/components/lr-widget-renderer.md +78 -0
- package/llms/components/lr-widget.md +104 -0
- package/llms/components/lr-word-cloud.md +112 -0
- package/llms/components/lr-xml-viewer.md +58 -0
- package/llms/components/lr-zoomable-frame.md +57 -0
- package/llms/index.md +301 -0
- package/llms/migration.md +86 -0
- package/llms/peers.md +41 -0
- package/llms/shared.md +321 -0
- package/llms/tokens.md +533 -0
- package/llms-full.txt +10731 -8563
- package/llms.txt +64 -121
- package/package.json +14 -2
- package/vscode-css-data.json +1424 -185
- package/vscode-html-data.json +128 -107
- package/web-types.json +853 -118
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
<!-- GENERATED by scripts/build-llms.mjs from llms/overlays.md — do not edit this file. -->
|
|
2
|
+
|
|
3
|
+
# `lr-chip`
|
|
4
|
+
|
|
5
|
+
- **Import** `import '@aceshooting/lyra-ui/components/overlays/chip/chip.js';` (registers the tag; side-effect import)
|
|
6
|
+
- **Class** `LyraChip`, also available unregistered from `@aceshooting/lyra-ui/components/overlays/chip/chip.class.js`
|
|
7
|
+
- **Family** `components/overlays/` — see `llms/index.md` for its siblings
|
|
8
|
+
- **Optional peers** none
|
|
9
|
+
- **Documented with** `lr-chip-group` (same section below)
|
|
10
|
+
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## `lr-chip` / `lr-chip-group`
|
|
15
|
+
|
|
16
|
+
A small, content-agnostic pill for a short label: a tag, an active-filter/scope indicator, etc.
|
|
17
|
+
Distinct from `<lr-attachment-chip>` (specifically file-shaped, with a thumbnail/size/upload-
|
|
18
|
+
progress) — this pair carries no domain assumptions at all. `<lr-chip>` is a controlled component:
|
|
19
|
+
clicking its remove (×) button only fires `lr-remove` — the chip never removes itself from the DOM
|
|
20
|
+
on its own interaction, the same contract `<lr-attachment-chip>`/`<lr-conversation-item>`
|
|
21
|
+
already follow.
|
|
22
|
+
|
|
23
|
+
### `lr-chip`
|
|
24
|
+
|
|
25
|
+
**Properties:**
|
|
26
|
+
- `size: '2xs' | 'xs' | 's' | 'm' | 'l' | 'xl' = 'm'` (reflected) — standard visual-density
|
|
27
|
+
scale for typography, padding, gap, and icon size; `m` preserves the original chip dimensions
|
|
28
|
+
- `tone: 'neutral' | 'brand' | 'success' | 'warning' | 'danger' = 'neutral'` (reflected — tints the
|
|
29
|
+
whole pill using a loud-color-on-quiet-tint convention; `neutral` has no dedicated token pair, so
|
|
30
|
+
it falls back to a plain bordered-surface look)
|
|
31
|
+
- `removable: boolean = false` (reflected — shows the remove (×) button)
|
|
32
|
+
- `selected: boolean = false` (reflected) — opt-in toggle/pressed mode: when set, `[part='base']`
|
|
33
|
+
itself becomes focusable and keyboard-activatable (Enter/Space, mirroring native `<button>`
|
|
34
|
+
behavior), reflects `aria-pressed` (explicitly `"false"`, not omitted, whenever toggle mode is
|
|
35
|
+
active but unpressed), and toggles on click/activation, emitting `lr-chip-select`.
|
|
36
|
+
Has no effect (no interactive semantics added to `[part='base']`) when combined with `removable`,
|
|
37
|
+
since the remove button already nests inside `[part='base']` — a focusable descendant of a
|
|
38
|
+
`role="button"` ancestor isn't allowed there, and this component's two real use cases (a
|
|
39
|
+
chart-series visibility toggle, a category filter chip) never need both at once. `false` (the
|
|
40
|
+
default, with `toggleable` also left at its default) reproduces the exact passive-label-pill
|
|
41
|
+
output.
|
|
42
|
+
- `toggleable: boolean = false` (reflected) — explicit opt-in into `selected`'s toggle/pressed
|
|
43
|
+
interactive mode, independent of `selected`'s own current value. Setting `selected` to `true` at
|
|
44
|
+
any point opts in automatically and keeps `toggleable` `true` from then on (enough for a chip that
|
|
45
|
+
starts already pressed) — set `toggleable` directly instead for a chip that must be clickable from
|
|
46
|
+
the outset while starting **unselected**, e.g. an initially-inactive category filter chip, since
|
|
47
|
+
`selected`'s own default (`false`) can't otherwise be distinguished from "never opted in".
|
|
48
|
+
- `value?: string` — opaque consumer bookkeeping value, never read, validated, or rendered by this
|
|
49
|
+
component itself, only ever echoed back verbatim (including `undefined` if never set) in
|
|
50
|
+
`lr-remove`'s detail
|
|
51
|
+
|
|
52
|
+
**Events:** `lr-remove` (`detail: { value }` — the remove (×) button was activated via click or
|
|
53
|
+
Enter/Space while focused; only rendered/reachable while `removable`), `lr-chip-select`
|
|
54
|
+
(`detail: { value, selected }` — fired on click, or Enter/Space while focused, when `selected` mode
|
|
55
|
+
is active and `removable` is not set; the chip has already toggled its own `selected` state by the
|
|
56
|
+
time this fires)
|
|
57
|
+
|
|
58
|
+
**Slots:** default (the chip's label content), `icon` (optional leading icon or status dot; nothing
|
|
59
|
+
reserved for it — no extra gap — when left empty)
|
|
60
|
+
|
|
61
|
+
**CSS parts:** `base` (the pill's root container), `icon` (wrapper around the `icon` slot; hidden
|
|
62
|
+
entirely while empty), `label` (wrapper around the default slot), `remove-button` (the remove (×)
|
|
63
|
+
affordance, only rendered while `removable`)
|
|
64
|
+
|
|
65
|
+
**Themeable custom properties:** `--lr-chip-accent`, `--lr-chip-bg`, `--lr-chip-border`
|
|
66
|
+
(component-local trio swapped per `tone` rather than repeating background/color/border per part per
|
|
67
|
+
tone; default `var(--lr-color-text)` / `var(--lr-color-surface)` / `var(--lr-color-border)` —
|
|
68
|
+
mirrors the same accent/bg/border vocabulary `<lr-tool-call-chip>`/`<lr-attachment-chip>` use),
|
|
69
|
+
`--lr-chip-pressed-border` (border color while pressed/selected — falls back to
|
|
70
|
+
`--lr-chip-accent`), `--lr-chip-pressed-bg` (background color while pressed/selected — falls
|
|
71
|
+
back to `--lr-chip-bg`), the density quintet `--lr-chip-font-size`, `--lr-chip-padding-block`,
|
|
72
|
+
`--lr-chip-padding-inline`, `--lr-chip-gap`, `--lr-chip-icon-size` (all five are rewritten by each
|
|
73
|
+
`:host([size])` rule, so setting one directly on the element overrides that step of the scale; the
|
|
74
|
+
`m` defaults are `--lr-font-size-sm` / `--lr-size-0-25rem` / `--lr-space-s` / `--lr-space-xs` /
|
|
75
|
+
`--lr-font-size-sm`), plus shared tokens (`--lr-space-xs`, `--lr-space-s`,
|
|
76
|
+
`--lr-color-brand`/`-brand-quiet`, `--lr-color-success`/`-success-quiet`,
|
|
77
|
+
`--lr-color-warning`/`-warning-quiet`, `--lr-color-danger`/`-danger-quiet`,
|
|
78
|
+
`--lr-icon-button-size`, `--lr-focus-ring-width`, `--lr-focus-ring-color`,
|
|
79
|
+
`--lr-focus-ring-offset`, `--lr-transition-fast`).
|
|
80
|
+
|
|
81
|
+
**Optional peer deps:** none.
|
|
82
|
+
|
|
83
|
+
```html
|
|
84
|
+
<lr-chip
|
|
85
|
+
toggleable
|
|
86
|
+
selected
|
|
87
|
+
style="--lr-chip-bg: var(--lr-color-surface); --lr-chip-pressed-bg: var(--lr-color-warning-quiet)"
|
|
88
|
+
>
|
|
89
|
+
Priority filter
|
|
90
|
+
</lr-chip>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### `lr-chip-group`
|
|
94
|
+
|
|
95
|
+
A flex-wrap container for a set of `<lr-chip>` children — plain light-DOM composition, direct
|
|
96
|
+
children are the chips (the same shape `<lr-split>`'s panels / `<lr-source-list>`'s cards take,
|
|
97
|
+
no `.items` array prop).
|
|
98
|
+
|
|
99
|
+
**Properties:**
|
|
100
|
+
- `maxVisible?: number` (attribute `max-visible`) — maximum number of assigned children shown before
|
|
101
|
+
the rest collapse behind a "+N" indicator; flattened slot-forwarded children count the same as
|
|
102
|
+
direct children. Unset means no limit
|
|
103
|
+
|
|
104
|
+
**Events:** `lr-overflow-toggle` (`detail: { expanded }` — the overflow indicator was activated,
|
|
105
|
+
revealing or re-collapsing the excess children; fires only from that click, i.e. only when
|
|
106
|
+
`max-visible` is actually causing an overflow state — never as a side effect of `max-visible`/
|
|
107
|
+
children changing on their own)
|
|
108
|
+
|
|
109
|
+
**Slots:** default (`<lr-chip>` elements, or any content, though the chip pairing is the intended
|
|
110
|
+
usage)
|
|
111
|
+
|
|
112
|
+
**CSS parts:** `base` (the flex-wrap container, holds both the slot and the overflow indicator),
|
|
113
|
+
`overflow-indicator` (the "+N" / "Show less" toggle button; only rendered while `max-visible` is
|
|
114
|
+
actively causing an overflow — a locally-styled pill, not an instantiated real `<lr-chip>`)
|
|
115
|
+
|
|
116
|
+
**Themeable custom properties:** shared tokens only (`--lr-space-xs`, `--lr-space-s`,
|
|
117
|
+
`--lr-color-border`, `--lr-color-surface`, `--lr-color-text-quiet`, `--lr-color-text`,
|
|
118
|
+
`--lr-color-brand`, `--lr-focus-ring-width`, `--lr-focus-ring-color`,
|
|
119
|
+
`--lr-focus-ring-offset`, `--lr-transition-fast`).
|
|
120
|
+
|
|
121
|
+
**Optional peer deps:** none.
|
|
122
|
+
|
|
123
|
+
```html
|
|
124
|
+
<lr-chip-group max-visible="3">
|
|
125
|
+
<lr-chip removable value="draft">Draft</lr-chip>
|
|
126
|
+
<lr-chip tone="success" removable value="reviewed">Reviewed</lr-chip>
|
|
127
|
+
<lr-chip tone="warning">Needs input</lr-chip>
|
|
128
|
+
<lr-chip tone="danger">Blocked</lr-chip>
|
|
129
|
+
</lr-chip-group>
|
|
130
|
+
<script type="module">
|
|
131
|
+
const group = document.querySelector('lr-chip-group');
|
|
132
|
+
group.addEventListener('lr-overflow-toggle', (e) => console.log(e.detail.expanded));
|
|
133
|
+
group.querySelectorAll('lr-chip').forEach((chip) => chip.addEventListener('lr-remove', (e) => console.log(e.detail.value)));
|
|
134
|
+
</script>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Since CSS alone can't parameterize `:nth-child` on a runtime prop, `<lr-chip-group>` reaches
|
|
138
|
+
directly into the light DOM and sets each excess child's own `hidden` property once `max-visible` is
|
|
139
|
+
exceeded — the same approach `<lr-split>` uses to set each panel's inline `flex`/`order`, rather
|
|
140
|
+
than a stylesheet-only solution.
|
|
141
|
+
|
|
142
|
+
**Known gotchas:**
|
|
143
|
+
- `<lr-chip>`'s accessible remove-button label ("Remove {text}") is computed only from the default
|
|
144
|
+
slot's own text content — text living inside the (decorative) `icon` slot doesn't leak into it.
|
|
145
|
+
- `<lr-chip-group>` silently un-expands (`expanded` resets to `false`, with no event firing) if a
|
|
146
|
+
consumer raises `max-visible` past the current child count while already expanded — only an actual
|
|
147
|
+
click on the overflow indicator fires `lr-overflow-toggle`.
|
|
148
|
+
- `<lr-chip-group>`'s overflow indicator is its own locally-styled pill, not an instantiated
|
|
149
|
+
`<lr-chip>` in its shadow DOM — don't expect `<lr-chip>`'s CSS parts or custom properties to
|
|
150
|
+
reach it.
|
|
151
|
+
|
|
152
|
+
---
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<!-- GENERATED by scripts/build-llms.mjs from llms/retrieval.md — do not edit this file. -->
|
|
2
|
+
|
|
3
|
+
# `lr-chunk-inspector`
|
|
4
|
+
|
|
5
|
+
- **Import** `import '@aceshooting/lyra-ui/components/retrieval/chunk-inspector/chunk-inspector.js';` (registers the tag; side-effect import)
|
|
6
|
+
- **Class** `LyraChunkInspector`, also available unregistered from `@aceshooting/lyra-ui/components/retrieval/chunk-inspector/chunk-inspector.class.js`
|
|
7
|
+
- **Family** `components/retrieval/` — see `llms/index.md` for its siblings
|
|
8
|
+
- **Optional peers** none
|
|
9
|
+
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## `lr-chunk-inspector`
|
|
14
|
+
|
|
15
|
+
A ranked retrieved-chunks list: relevance score bars with tier tones, expandable chunk text, and the
|
|
16
|
+
deep-link event that lands a chunk in `lr-document-viewer`. Never fetches, ranks, or dedupes; never
|
|
17
|
+
opens documents itself.
|
|
18
|
+
|
|
19
|
+
**Properties:**
|
|
20
|
+
- `chunks: LyraChunk[] = []` (attribute: false) — `LyraChunk { id: string; text: string; score:
|
|
21
|
+
number; sourceId: string; title?: string; page?: string | number; anchor?: LyraChunkAnchor }`;
|
|
22
|
+
`score` is 0–1, `title` falls back to a localized "untitled source", `anchor` (the same
|
|
23
|
+
discriminated union `lr-document-viewer.anchor` accepts — page/text-quote/fragment/line-range/
|
|
24
|
+
cell-range/cfi/time-range/region/node-path) is carried through `lr-chunk-open` verbatim
|
|
25
|
+
- `thresholds: { high: number; medium: number } = { high: 0.75, medium: 0.5 }` (attribute: false) —
|
|
26
|
+
score-bar tier cutoffs
|
|
27
|
+
- `sort: 'score' | 'none' = 'score'`
|
|
28
|
+
- `activeId: string = ''` (attribute `active-id`)
|
|
29
|
+
- `virtualizeAt: number = 50` (attribute `virtualize-at`)
|
|
30
|
+
- `compact: boolean = false` (reflected) — hides the text preview/toggle, title/score row only
|
|
31
|
+
- `label: string = ''`
|
|
32
|
+
|
|
33
|
+
**Events:** `lr-chunk-open` (`detail: { id, sourceId, anchor? }`, a chunk's title/open button was
|
|
34
|
+
activated — the event a host routes into `lr-document-viewer`, setting `src` from `sourceId` and
|
|
35
|
+
`anchor` from the chunk's own), `lr-expand` (`detail: { id, expanded }`, a chunk's text toggle was
|
|
36
|
+
activated).
|
|
37
|
+
|
|
38
|
+
**Slots:** none.
|
|
39
|
+
|
|
40
|
+
**CSS parts:** `base` (`role="group"`), `chunk` (`role="listitem"`), `score` (visible percent text),
|
|
41
|
+
`score-bar` (`aria-hidden` track), `score-fill` (tone-mapped fill), `open-button`, `title` (the
|
|
42
|
+
`<span>` inside `open-button` carrying the visible title text), `text` (line-clamped unless
|
|
43
|
+
expanded, omitted when `compact`), `toggle` ("Show more"/"Show less", omitted when `compact`),
|
|
44
|
+
`empty` (shown when `chunks` is empty).
|
|
45
|
+
|
|
46
|
+
**Themeable custom properties:** shared tokens only.
|
|
47
|
+
|
|
48
|
+
**Optional peer deps:** none.
|
|
49
|
+
|
|
50
|
+
```html
|
|
51
|
+
<lr-chunk-inspector></lr-chunk-inspector>
|
|
52
|
+
<script>
|
|
53
|
+
const inspector = document.querySelector('lr-chunk-inspector');
|
|
54
|
+
inspector.chunks = [
|
|
55
|
+
{ id: 'c1', text: 'Revenue grew 12% year over year…', score: 0.91, sourceId: 'doc-1', title: 'Q3 report', page: 4 },
|
|
56
|
+
];
|
|
57
|
+
inspector.addEventListener('lr-chunk-open', (e) => documentViewer.openAt(e.detail.sourceId, e.detail.anchor));
|
|
58
|
+
</script>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Known gotchas:**
|
|
62
|
+
- `title` and `open-button` are split into two separate parts (rather than one dual-part-name
|
|
63
|
+
element) because an exact-match `[part="..."]` CSS attribute selector — as this component's own
|
|
64
|
+
tests use — cannot match a multi-token `part` attribute value.
|
|
65
|
+
|
|
66
|
+
---
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<!-- GENERATED by scripts/build-llms.mjs from llms/retrieval.md — do not edit this file. -->
|
|
2
|
+
|
|
3
|
+
# `lr-citation-badge`
|
|
4
|
+
|
|
5
|
+
- **Import** `import '@aceshooting/lyra-ui/components/retrieval/citation-badge/citation-badge.js';` (registers the tag; side-effect import)
|
|
6
|
+
- **Class** `LyraCitationBadge`, also available unregistered from `@aceshooting/lyra-ui/components/retrieval/citation-badge/citation-badge.class.js`
|
|
7
|
+
- **Family** `components/retrieval/` — see `llms/index.md` for its siblings
|
|
8
|
+
- **Optional peers** none
|
|
9
|
+
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## `lr-citation-badge`
|
|
14
|
+
|
|
15
|
+
An inline `[n]` citation marker with a hover/focus preview popover and confidence/verification-status
|
|
16
|
+
coloring. First-party invention (no Web Awesome equivalent). Meant to sit inline in a chat message's
|
|
17
|
+
text, each badge carrying a `source-id` that matches a corresponding `<lr-source-card>` shown
|
|
18
|
+
elsewhere on the page (a sibling component in this family) — this component never imports or knows
|
|
19
|
+
anything about `<lr-source-card>`, it only carries the id through its event details.
|
|
20
|
+
|
|
21
|
+
**Properties:**
|
|
22
|
+
- `index: number = 1` — the citation number shown, e.g. `3` renders as `[3]`.
|
|
23
|
+
- `status: CitationBadgeStatus = 'default'` (reflected) — one of `'default' | 'high' | 'medium' |
|
|
24
|
+
'low' | 'verified' | 'unverified'`; drives the badge's color and (unless `label` is set) part of
|
|
25
|
+
its accessible name.
|
|
26
|
+
- `sourceId: string = ''` (attribute `source-id`) — id of a corresponding `<lr-source-card>`,
|
|
27
|
+
echoed back verbatim in both events; never read or validated by this component.
|
|
28
|
+
- `href: string = ''` — optional direct link target for the citation's source, carried into
|
|
29
|
+
`lr-citation-open`'s detail as-is; this component never navigates.
|
|
30
|
+
- `label: string = ''` — overrides the computed accessible name. The built-in citation/status
|
|
31
|
+
summary is a complete localized template; a host `aria-label` has highest precedence.
|
|
32
|
+
|
|
33
|
+
**Events:**
|
|
34
|
+
- `lr-citation-activate` (`detail: { sourceId: string; index: number }`) — fires on click, or on
|
|
35
|
+
Enter while focused (native `<button>` behavior, no listener needed for the Enter case). The
|
|
36
|
+
lightweight "jump to this source" signal.
|
|
37
|
+
- `lr-citation-open` (`detail: { sourceId: string; index: number; href?: string }`) — fires on
|
|
38
|
+
dblclick, or on Space while focused. A distinct "full preview" signal; `href` is `undefined` when
|
|
39
|
+
the `href` prop isn't set. A double-click also fires two `lr-citation-activate` events (one per
|
|
40
|
+
constituent click, standard browser `dblclick` behavior) in addition to the one `lr-citation-open`.
|
|
41
|
+
|
|
42
|
+
**Slots:** default — rich preview/tooltip content (e.g. a filename + excerpt), shown in a floating
|
|
43
|
+
popover on hover/focus. This is *not* the badge's visible content (the badge always renders
|
|
44
|
+
`[index]`); nothing renders at all (no hover affordance) when this slot is empty.
|
|
45
|
+
When populated, the button carries `aria-describedby` referencing the same-shadow-tree popover,
|
|
46
|
+
which owns `role="tooltip"` whether currently shown or hidden.
|
|
47
|
+
|
|
48
|
+
**CSS parts:** `base` (the clickable `<button>`), `bracket` (each of the two literal `[`/`]` glyphs),
|
|
49
|
+
`index` (the citation number), `popover` (the floating preview panel, only meaningful while open).
|
|
50
|
+
|
|
51
|
+
**Themeable custom properties:** `--lr-citation-badge-accent` / `--lr-citation-badge-bg` /
|
|
52
|
+
`--lr-citation-badge-border` (internal per-status accent variables, not typically overridden
|
|
53
|
+
directly — set instead by the `:host([status=...])` rules), plus shared tokens
|
|
54
|
+
`--lr-color-text-quiet`, `--lr-color-text`, `--lr-color-success` / `-success-quiet`,
|
|
55
|
+
`--lr-color-warning` / `-warning-quiet`, `--lr-color-danger` / `-danger-quiet`, `--lr-radius`,
|
|
56
|
+
`--lr-color-surface`, `--lr-color-border`, `--lr-shadow`, `--lr-space-s`/`-m`,
|
|
57
|
+
`--lr-transition-fast`, `--lr-focus-ring-*`.
|
|
58
|
+
|
|
59
|
+
**Optional peer deps:** none.
|
|
60
|
+
|
|
61
|
+
```html
|
|
62
|
+
<p>
|
|
63
|
+
Revenue grew 12% year over year
|
|
64
|
+
<lr-citation-badge index="1" status="verified" source-id="doc-1">
|
|
65
|
+
<strong>annual_report.pdf</strong> — "Revenue grew 12% year over year, driven primarily by..."
|
|
66
|
+
</lr-citation-badge>.
|
|
67
|
+
</p>
|
|
68
|
+
<script type="module">
|
|
69
|
+
document.addEventListener('lr-citation-activate', (e) => {
|
|
70
|
+
document.querySelector(`lr-source-card[source-id="${e.detail.sourceId}"]`)
|
|
71
|
+
?.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
72
|
+
});
|
|
73
|
+
</script>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The popover is positioned with the same internal `place()` helper (`top-start` placement) that
|
|
77
|
+
`<lr-tool-call-chip>` uses for its own detail tooltip, and never traps focus — it's supplementary
|
|
78
|
+
preview content, not a modal, so Tab continues past the badge normally even while the popover happens
|
|
79
|
+
to be visible from a mouse hover. Hovering and focus are tracked as independent "keep it open"
|
|
80
|
+
reasons (mirroring `<lr-toast-item>`'s hovering/focused pair), so the pointer leaving while the
|
|
81
|
+
badge still holds keyboard focus doesn't schedule a hide the focus is still holding open. There's a
|
|
82
|
+
200ms grace period before a hover/focus-out actually hides the popover, so moving the pointer from
|
|
83
|
+
the badge into the popover itself (to select/copy its text) doesn't make it vanish mid-move; Escape
|
|
84
|
+
and blur (Tab away) close it immediately instead, with no delay.
|
|
85
|
+
|
|
86
|
+
Status coloring follows a semantic scheme: `verified`/`high` use the success tones (a claim that's
|
|
87
|
+
been checked, or the model is confident in); `medium`/`low` use warning tones; `unverified` uses the
|
|
88
|
+
*danger* tone — deliberately distinct from `low`, since "hasn't been checked at all" is a different
|
|
89
|
+
(arguably riskier) claim than "checked but uncertain". `default` renders as plain neutral text with
|
|
90
|
+
no background tint, for citations that carry no confidence/verification signal at all.
|
|
91
|
+
|
|
92
|
+
**Known gotchas:**
|
|
93
|
+
- Enter and Space are given distinct meanings (Enter = activate via native `<button>` click, Space =
|
|
94
|
+
open) — Space's native click-on-keyup is pre-empted with `preventDefault()` on keydown so it fires
|
|
95
|
+
`lr-citation-open` instead of triggering a second `lr-citation-activate`.
|
|
96
|
+
- Escape closes the popover but calls `stopPropagation()`, so it won't also close a surrounding
|
|
97
|
+
`<lr-dialog>` that has its own Escape-to-close handler.
|
|
98
|
+
- The preview slot's presence is tracked in JS (`hasPreviewSlot`), not via CSS `:empty` — the
|
|
99
|
+
`[part="popover"]` always contains a literal `<slot>` child, so `:empty` would never match even
|
|
100
|
+
with nothing assigned.
|
|
101
|
+
|
|
102
|
+
---
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
<!-- GENERATED by scripts/build-llms.mjs from llms/conversation.md — do not edit this file. -->
|
|
2
|
+
|
|
3
|
+
# `lr-code-block-core`
|
|
4
|
+
|
|
5
|
+
- **Import** `import '@aceshooting/lyra-ui/components/conversation/code-block/code-block-core.js';` (registers the tag; side-effect import)
|
|
6
|
+
- **Class** `LyraCodeBlockCore`, also available unregistered from `@aceshooting/lyra-ui/components/conversation/code-block/code-block-core.class.js`
|
|
7
|
+
- **Family** `components/conversation/` — see `llms/index.md` for its siblings
|
|
8
|
+
- **Optional peers** `shiki` — see `llms/peers.md`
|
|
9
|
+
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## `lr-code-block-core`
|
|
14
|
+
|
|
15
|
+
A build-lean sibling of `<lr-code-block>` above, for a consumer whose `languages` map already
|
|
16
|
+
covers every language it will ever render. Where `<lr-code-block>` unconditionally calls
|
|
17
|
+
`loadShikiHighlighter()` — the default ~200-language dynamic-import table loader, whose bundled
|
|
18
|
+
lookup table a bundler can't statically narrow away even when a consumer never actually uses it —
|
|
19
|
+
this component's own module never imports or calls that function at all. It only ever calls
|
|
20
|
+
`loadShikiHighlighterCore(languages)` (shiki's "fine-grained bundle" recipe: `createHighlighterCore()`
|
|
21
|
+
plus an explicit oniguruma engine, seeded with *only* the grammars in `languages`), so a consumer
|
|
22
|
+
importing this entry point instead of `code-block.js` gets a build genuinely free of shiki's full
|
|
23
|
+
language table.
|
|
24
|
+
|
|
25
|
+
A `language` value absent from `languages` always renders the plain `<pre><code>` fallback — there is
|
|
26
|
+
no default/full-table highlighter here to fall back to, unlike `<lr-code-block>`'s dynamic-import
|
|
27
|
+
path for an unmapped language. That fallback is the *default* rendering path, not a degraded one,
|
|
28
|
+
same as `<lr-code-block>`'s own plain-text fallback. Everything else — `code`/`language`/
|
|
29
|
+
`filename`/`copyable`/`collapsible`/`collapsed`/`maxHeight`, the copy button, the collapse header
|
|
30
|
+
toggle, the loading-skeleton behavior while the fine-grained highlighter resolves — matches
|
|
31
|
+
`<lr-code-block>` exactly, including its CSS parts, themeable custom properties, and stylesheet
|
|
32
|
+
(this component reuses `code-block.styles.ts` directly).
|
|
33
|
+
|
|
34
|
+
**Properties:**
|
|
35
|
+
- `code: string = ''` — the raw source text.
|
|
36
|
+
- `language: string = ''` — a shiki-recognized language id or alias; when unset, or when it isn't a
|
|
37
|
+
key in `languages`, the code renders as plain unhighlighted text — this component has no
|
|
38
|
+
default/full-table highlighter to fall back to.
|
|
39
|
+
- `filename: string = ''` — shown in the header, when set.
|
|
40
|
+
- `accessibleLabel: string = ''` (attribute `aria-label`) — names the internal focusable code-body
|
|
41
|
+
region; otherwise a localized filename/language description is generated.
|
|
42
|
+
- `collapsible: boolean = false` (reflected) — shows the collapse/expand chevron button.
|
|
43
|
+
- `collapsed: boolean = false` (reflected) — only has a visible effect while `collapsible` is also
|
|
44
|
+
true.
|
|
45
|
+
- `copyable: boolean = true` (reflected) — shows the copy-to-clipboard button.
|
|
46
|
+
- `maxHeight: string = ''` (attribute `max-height`) — a CSS length (e.g. `"20rem"`); once set, the
|
|
47
|
+
code scrolls internally past this height instead of growing the page.
|
|
48
|
+
- `lineNumbers: boolean = false` (attribute `line-numbers`, reflected) — displays one-based line
|
|
49
|
+
numbers for highlighted and plain output.
|
|
50
|
+
- `highlightLines: string = ''` (attribute `highlight-lines`) — comma-separated 1-based inclusive
|
|
51
|
+
line ranges (e.g. `"3-5,7"`) to visually emphasize. Declarative sugar over `highlights` — merges
|
|
52
|
+
with, and renders identically to, any `line-range` entries there.
|
|
53
|
+
- `interactiveLines: boolean = false` (attribute `interactive-lines`) — turns the
|
|
54
|
+
(`lineNumbers`-gated) gutter into a roving-tabindex group of buttons emitting `lr-line-click`.
|
|
55
|
+
Has no effect while `lineNumbers` is unset.
|
|
56
|
+
- `highlights: LyraHighlight[] = []` (attribute: false) — host-supplied highlights to paint over the
|
|
57
|
+
code. Only `line-range` anchors are meaningful here — every other `LyraAnchor` kind is ignored.
|
|
58
|
+
- `activeHighlightId: string | null = null` (attribute `active-highlight-id`) — the `highlights`
|
|
59
|
+
entry, if any, currently treated as active (`data-active` on its lines).
|
|
60
|
+
- `anchorKinds: LyraAnchor['kind'][]` — readonly `['line-range']`, for the shared anchor-target
|
|
61
|
+
contract, identical to `<lr-code-block>`.
|
|
62
|
+
- `languages: Record<string, ShikiLanguageInput> = {}` (attribute: false) — grammar definitions this
|
|
63
|
+
instance can highlight, e.g. `{ json: jsonGrammar }` (import from `shiki/langs/<name>.mjs`). Empty
|
|
64
|
+
(the default) never highlights at all — every `language` renders the plain-text fallback.
|
|
65
|
+
|
|
66
|
+
**Methods:** `scrollToAnchor(target)` — resolves a `line-range` anchor (or a `highlights` id string
|
|
67
|
+
resolving to one) by scrolling its start line into view within `[part="body"]`; resolves `false`
|
|
68
|
+
when the anchor isn't a `line-range`, the id isn't found, or the start line is out of bounds.
|
|
69
|
+
Identical behavior to `<lr-code-block>`'s own method.
|
|
70
|
+
|
|
71
|
+
**Events:** `lr-copy` (`detail: { text: string }` — always the raw `code` value, never the
|
|
72
|
+
highlighted HTML, and always fires regardless of whether the actual OS clipboard write succeeded),
|
|
73
|
+
`lr-toggle` (`detail: { collapsed: boolean }` — fired when the built-in collapse/expand header
|
|
74
|
+
button is activated), `lr-line-click` (`detail: { line: number }` — a gutter line number was
|
|
75
|
+
activated while `interactiveLines` is set), `lr-highlight-activate` (`detail: { id: string }` —
|
|
76
|
+
declared for parity with this library's other anchor-target viewers; not currently emitted by this
|
|
77
|
+
component), `lr-text-select` (`detail: { text, anchor, rects }` — a text selection inside the code
|
|
78
|
+
body ended; `anchor` is a `line-range` anchor covering the selected lines).
|
|
79
|
+
|
|
80
|
+
**Slots:** none.
|
|
81
|
+
|
|
82
|
+
**CSS parts:** `base`, `header`, `filename`, `language`, `copy-button`, `toggle`, `body`, `pre`,
|
|
83
|
+
`code`, `line-highlight`, `line-button` — identical set to `<lr-code-block>`.
|
|
84
|
+
|
|
85
|
+
**Themeable custom properties:** identical to `<lr-code-block>` — `--lr-code-block-max-height`,
|
|
86
|
+
`--lr-code-block-font`, plus the same shared tokens.
|
|
87
|
+
|
|
88
|
+
**Optional peer deps:** `shiki` (specifically its `shiki/core`, `shiki/engine/oniguruma`,
|
|
89
|
+
`shiki/wasm`, and `shiki/themes/github-{light,dark}.mjs` subpaths — never `shiki`'s main entry point,
|
|
90
|
+
which is what carries the ~200-language table this component exists to avoid). Building the
|
|
91
|
+
fine-grained highlighter is cached per `languages` object identity (a `WeakMap`), so passing the same
|
|
92
|
+
module-level `languages` constant on every render builds it only once.
|
|
93
|
+
|
|
94
|
+
```html
|
|
95
|
+
<script type="module">
|
|
96
|
+
import jsonGrammar from 'shiki/langs/json.mjs';
|
|
97
|
+
</script>
|
|
98
|
+
<lr-code-block-core
|
|
99
|
+
language="json"
|
|
100
|
+
.languages=${{ json: jsonGrammar }}
|
|
101
|
+
.code=${'{"ok": true}'}
|
|
102
|
+
></lr-code-block-core>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**Known gotchas:**
|
|
106
|
+
- there is no default highlighter and no dynamic-import fallback table — a `language` you haven't
|
|
107
|
+
added to `languages` will never highlight, no matter how common that language is elsewhere. Reach
|
|
108
|
+
for `<lr-code-block>` instead if you need to support an open-ended set of languages without
|
|
109
|
+
pre-declaring each one.
|
|
110
|
+
- `languages` is keyed by object identity for caching purposes — pass a stable, module-level constant
|
|
111
|
+
(not a fresh object literal per render), or every render rebuilds its own fine-grained highlighter.
|
|
112
|
+
|
|
113
|
+
---
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
<!-- GENERATED by scripts/build-llms.mjs from llms/conversation.md — do not edit this file. -->
|
|
2
|
+
|
|
3
|
+
# `lr-code-block`
|
|
4
|
+
|
|
5
|
+
- **Import** `import '@aceshooting/lyra-ui/components/conversation/code-block/code-block.js';` (registers the tag; side-effect import)
|
|
6
|
+
- **Class** `LyraCodeBlock`, also available unregistered from `@aceshooting/lyra-ui/components/conversation/code-block/code-block.class.js`
|
|
7
|
+
- **Family** `components/conversation/` — see `llms/index.md` for its siblings
|
|
8
|
+
- **Optional peers** `shiki` — see `llms/peers.md`
|
|
9
|
+
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## `lr-code-block`
|
|
14
|
+
|
|
15
|
+
Fenced code display with optional lazy syntax highlighting and a copy button. First-party invention
|
|
16
|
+
(no Web Awesome equivalent). It lazy-loads the optional peer dependency `shiki` (see
|
|
17
|
+
`code-loader.ts`) for the actual tokenizing, and includes a compact GreyCat/GCL grammar because
|
|
18
|
+
Shiki does not bundle one. It falls back to a plain `<pre><code>` when that peer isn't installed or
|
|
19
|
+
`language` is unset/unrecognized. That
|
|
20
|
+
fallback is the *default* rendering path, not a degraded one: unhighlighted code is perfectly usable,
|
|
21
|
+
and it's what every instance renders at zero extra bytes until shiki resolves.
|
|
22
|
+
|
|
23
|
+
**Properties:**
|
|
24
|
+
- `code: string = ''` — the raw source text
|
|
25
|
+
- `language: string = ''` — a shiki-recognized language id or alias (e.g. `"javascript"`, `"python"`,
|
|
26
|
+
`"json"`); when unset, or when shiki doesn't recognize it, the code renders as plain unhighlighted
|
|
27
|
+
text regardless of whether shiki itself is available. Shiki's bundled catalog covers most common
|
|
28
|
+
programming, markup, data, and configuration languages, including Python, C, C++, C#, Java,
|
|
29
|
+
JavaScript, TypeScript, HTML, CSS, JSON, SQL, Go, Rust, YAML, Markdown, and shell scripts. Lyra
|
|
30
|
+
also includes a built-in GreyCat grammar; use `"gcl"` or `"greycat"` for GreyCat source.
|
|
31
|
+
- `filename: string = ''` — shown in the header, when set
|
|
32
|
+
- `accessibleLabel: string = ''` (attribute `aria-label`) — names the internal focusable code-body
|
|
33
|
+
region; otherwise a localized filename/language description is generated
|
|
34
|
+
- `collapsible: boolean = false` (reflected) — shows the collapse/expand chevron button
|
|
35
|
+
- `collapsed: boolean = false` (reflected) — only has a visible effect while `collapsible` is also
|
|
36
|
+
true
|
|
37
|
+
- `copyable: boolean = true` (reflected) — shows the copy-to-clipboard button (assign `false` via a
|
|
38
|
+
PROPERTY binding, e.g. `.copyable=${false}` — a `?copyable=${false}` boolean-attribute binding
|
|
39
|
+
cannot override a true default)
|
|
40
|
+
- `maxHeight: string = ''` (attribute `max-height`) — a CSS length (e.g. `"20rem"`); once set, the
|
|
41
|
+
code scrolls internally past this height instead of growing the page
|
|
42
|
+
- `lineNumbers: boolean = false` (attribute `line-numbers`, reflected) — displays one-based line
|
|
43
|
+
numbers for both highlighted output and the plain-text fallback
|
|
44
|
+
- `highlightLines: string = ''` (attribute `highlight-lines`) — comma-separated 1-based inclusive
|
|
45
|
+
line ranges (e.g. `"3-5,7"`) to visually emphasize. Declarative sugar over `highlights` — merges
|
|
46
|
+
with, and renders identically to, any `line-range` entries there.
|
|
47
|
+
- `interactiveLines: boolean = false` (attribute `interactive-lines`) — turns the
|
|
48
|
+
(`lineNumbers`-gated) gutter into a roving-tabindex group of buttons emitting `lr-line-click`.
|
|
49
|
+
Has no effect while `lineNumbers` is unset.
|
|
50
|
+
- `highlights: LyraHighlight[] = []` (attribute: false) — host-supplied highlights to paint over the
|
|
51
|
+
code (the shared anchor-target `LyraHighlight` contract from `document-viewer/anchors.ts`). Only
|
|
52
|
+
`line-range` anchors are meaningful here — every other `LyraAnchor` kind is ignored.
|
|
53
|
+
- `activeHighlightId: string | null = null` (attribute `active-highlight-id`) — the `highlights`
|
|
54
|
+
entry, if any, currently treated as active (`data-active` on its lines).
|
|
55
|
+
- `anchorKinds: LyraAnchor['kind'][]` — readonly `['line-range']`, for the shared anchor-target
|
|
56
|
+
contract.
|
|
57
|
+
- `languages?: Record<string, ShikiLanguageInput>` (attribute: false) — a map of language id to an
|
|
58
|
+
already-imported shiki grammar module (e.g. `{ bash: bashGrammar }` from a module-scope
|
|
59
|
+
`import bash from 'shiki/langs/bash.mjs'`). When `language` matches a key here, highlighting is
|
|
60
|
+
seeded from exactly that pre-supplied grammar via a fine-grained `createHighlighterCore()`
|
|
61
|
+
highlighter, bypassing the default ~200-language dynamic-import path (`loadShikiHighlighter()`)
|
|
62
|
+
for that language — an additive, opt-in escape hatch for a build scoped to just the languages a
|
|
63
|
+
consumer actually needs. A `language` absent from this map (or `languages` left unset) falls back
|
|
64
|
+
to the default dynamic-import path unchanged.
|
|
65
|
+
- `languagesOnly: boolean = false` (attribute `languages-only`) — skips the default shiki loader;
|
|
66
|
+
use when every requested language is supplied through `languages`
|
|
67
|
+
|
|
68
|
+
**Methods:** `scrollToAnchor(target)` — resolves a `line-range` anchor (or a `highlights` id string
|
|
69
|
+
resolving to one) by scrolling its start line into view within `[part="body"]`; resolves `false`
|
|
70
|
+
when the anchor isn't a `line-range`, the id isn't found, or the start line is out of bounds.
|
|
71
|
+
|
|
72
|
+
**Events:** `lr-copy` (`detail: { text: string }` — always the raw `code` value, never the
|
|
73
|
+
highlighted HTML, and always fires regardless of whether the actual OS clipboard write succeeded),
|
|
74
|
+
`lr-toggle` (`detail: { collapsed: boolean }` — fired when the built-in collapse/expand header
|
|
75
|
+
button is activated, same event name/shape convention as `<lr-thinking-panel>`'s own `lr-toggle`),
|
|
76
|
+
`lr-line-click` (`detail: { line: number }` — a gutter line number was activated while
|
|
77
|
+
`interactiveLines` is set), `lr-highlight-activate` (`detail: { id: string }` — declared for
|
|
78
|
+
parity with this library's other anchor-target viewers; not currently emitted by this component),
|
|
79
|
+
`lr-text-select` (`detail: { text, anchor, rects }` — a text selection inside the code body ended;
|
|
80
|
+
`anchor` is a `line-range` anchor covering the selected lines)
|
|
81
|
+
|
|
82
|
+
**Slots:** none.
|
|
83
|
+
|
|
84
|
+
**CSS parts:** `base`, `header`, `filename`, `language`, `copy-button`, `toggle`, `body`, `pre`,
|
|
85
|
+
`code`, `line-highlight` (a line marked by `highlightLines` or a `line-range` entry in `highlights`),
|
|
86
|
+
`line-button` (a gutter line-number button, only rendered while `interactiveLines` and `lineNumbers`
|
|
87
|
+
are both set)
|
|
88
|
+
|
|
89
|
+
**Themeable custom properties:** `--lr-code-block-max-height` (default `none` — the consumer-tunable
|
|
90
|
+
scroll cap; only takes effect once `max-height` is set), `--lr-code-block-font` (default
|
|
91
|
+
`ui-monospace, SFMono-Regular, Menlo, Consolas, monospace` — no shared `--lr-*` monospace
|
|
92
|
+
token exists to resolve through), plus shared tokens `--lr-color-border`, `--lr-radius`,
|
|
93
|
+
`--lr-color-surface`, `--lr-space-xs/-s/-m`, `--lr-font`, `--lr-color-text-quiet`,
|
|
94
|
+
`--lr-color-text`, `--lr-color-brand`/`-brand-quiet`, `--lr-transition-fast`,
|
|
95
|
+
`--lr-focus-ring-width/-color/-offset`.
|
|
96
|
+
|
|
97
|
+
**Optional peer deps:** `shiki` (lazy-loaded and cached once per page by `code-loader.ts`'s
|
|
98
|
+
`loadShikiHighlighter()`, which builds a single `Highlighter` seeded with the bundled `github-light`/
|
|
99
|
+
`github-dark` "dual themes" and *zero* language grammars up front; each `language` a
|
|
100
|
+
`<lr-code-block>` actually requests is loaded incrementally on first use via
|
|
101
|
+
`loadShikiLanguage()`, and a language id that fails to load once is remembered and never retried. If
|
|
102
|
+
`shiki` isn't installed, `loadShikiHighlighter()` resolves to `null` with a one-time `console.warn`
|
|
103
|
+
and every instance falls back to plain text — install it with `pnpm add shiki` to enable
|
|
104
|
+
highlighting).
|
|
105
|
+
|
|
106
|
+
```html
|
|
107
|
+
<lr-code-block
|
|
108
|
+
language="typescript"
|
|
109
|
+
filename="sum.ts"
|
|
110
|
+
collapsible
|
|
111
|
+
max-height="20rem"
|
|
112
|
+
.code=${`export function sum(a: number, b: number) {\n return a + b;\n}`}
|
|
113
|
+
@lr-copy=${(e) => console.log('copied', e.detail.text)}
|
|
114
|
+
></lr-code-block>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Set `line-numbers` when source context benefits from numbered lines. The option does not change the
|
|
118
|
+
raw `code` value or the `lr-copy` event payload.
|
|
119
|
+
|
|
120
|
+
A `<lr-skeleton variant="rect">` placeholder (with `aria-busy="true"` on the host) stands in only
|
|
121
|
+
while shiki itself is loading for the very first time on the page and `language` is set — it is
|
|
122
|
+
deliberately *not* shown again for a later per-language grammar fetch (that's typically fast, and the
|
|
123
|
+
plain-text fallback already reads fine as a placeholder for it). Internally, a shiki `transformer`
|
|
124
|
+
(`partTransformer`) rewrites shiki's generated `<pre>`/`<code>` nodes in a single pass to carry this
|
|
125
|
+
component's own `part="pre"`/`part="code"` hooks and strips shiki's default `tabindex="0"` from
|
|
126
|
+
`<pre>`, since `[part="body"]` is already the single scrollable/focusable region (`role="group"`,
|
|
127
|
+
`tabindex="0"`) for the code area. Dark mode is handled via shiki's own "dual themes" feature: every
|
|
128
|
+
token carries its light color as a plain inline `color`/`background-color` and its dark color in
|
|
129
|
+
`--shiki-dark`/`--shiki-dark-bg` custom properties, which an `!important` media-query rule in
|
|
130
|
+
`code-block.styles.ts` reassigns under `prefers-color-scheme: dark` — the one deliberate exception in
|
|
131
|
+
this component to every other color being a `--lr-*` token, since these values come from shiki's own
|
|
132
|
+
theme data.
|
|
133
|
+
|
|
134
|
+
**Known gotchas:**
|
|
135
|
+
- `copyable` defaults to `true` and reflects — see the property note above about overriding it with a
|
|
136
|
+
property binding, not a boolean-attribute binding.
|
|
137
|
+
- an in-flight per-language grammar load is guarded by an internal token so a `code`/`language` change
|
|
138
|
+
that arrives before a previous load resolves never applies a stale result — only the load matching
|
|
139
|
+
the *current* `language` is ever rendered.
|
|
140
|
+
- a malformed `code`/`language` combination that makes shiki's `codeToHtml()` throw falls back to
|
|
141
|
+
plain text silently, not a blank code block.
|
|
142
|
+
- the "Copied!" label reverts to "Copy" after a fixed 1500ms, regardless of whether the clipboard
|
|
143
|
+
write actually succeeded — `navigator.clipboard` is absent in insecure contexts/older browsers, and
|
|
144
|
+
`lr-copy` still fires either way.
|
|
145
|
+
|
|
146
|
+
---
|