@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,171 @@
|
|
|
1
|
+
<!-- GENERATED by scripts/build-llms.mjs from llms/conversation.md — do not edit this file. -->
|
|
2
|
+
|
|
3
|
+
# `lr-markdown`
|
|
4
|
+
|
|
5
|
+
- **Import** `import '@aceshooting/lyra-ui/components/conversation/markdown/markdown.js';` (registers the tag; side-effect import)
|
|
6
|
+
- **Class** `LyraMarkdown`, also available unregistered from `@aceshooting/lyra-ui/components/conversation/markdown/markdown.class.js`
|
|
7
|
+
- **Family** `components/conversation/` — see `llms/index.md` for its siblings
|
|
8
|
+
- **Optional peers** `dompurify`, `katex`, `marked`, `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-markdown`
|
|
14
|
+
|
|
15
|
+
Sanitized Markdown-to-HTML rendering (GFM tables, fenced code blocks, links, blockquotes) built on
|
|
16
|
+
two optional peer dependencies — `marked` (parsing) and `dompurify` (sanitizing) — both lazy-loaded
|
|
17
|
+
independently via `markdown-loader.ts`'s `loadMarkdownDeps()` on first connect, cached per page the
|
|
18
|
+
same way `chart-loader.ts`/`map-loader.ts` cache their load promise so every `<lr-markdown>`
|
|
19
|
+
instance on a page shares one load. `heading`/`code`/`blockquote`/`table`/`link`/`image` tokens are
|
|
20
|
+
rendered through a `marked` renderer override that injects `part="..."` attributes directly into the
|
|
21
|
+
produced HTML in a single pass (no second DOM walk after insertion).
|
|
22
|
+
|
|
23
|
+
Fenced code blocks are also syntax-highlighted via the same optional `shiki` peer `<lr-code-block>`
|
|
24
|
+
uses, gated by `highlightCode` (default `true`). This is a pure upgrade, not a separate opt-in: it's
|
|
25
|
+
already transparently gated by whether `shiki` is installed at all, so an app that never installs the
|
|
26
|
+
peer sees byte-identical output to before this property existed. The very first render of any content
|
|
27
|
+
is always plain text/code (identical to today's output); highlighting arrives as an asynchronous
|
|
28
|
+
upgrade one render later once shiki resolves and the block's language is tokenized. No highlighting
|
|
29
|
+
is attempted while `streaming` is `true` — it applies once a stream settles, adding no per-chunk cost
|
|
30
|
+
while content is still arriving.
|
|
31
|
+
|
|
32
|
+
**Properties:**
|
|
33
|
+
- `content: string = ''` — the Markdown source to render
|
|
34
|
+
- `sanitize: boolean = true` — sanitize `marked`'s HTML output with DOMPurify before rendering
|
|
35
|
+
- `escapeHtml: boolean = false` (attribute `escape-html`) — when `true`, overrides `marked`'s `html`
|
|
36
|
+
renderer hook to emit the HTML-escaped source text instead of passing raw/sanitized markup through
|
|
37
|
+
— for rendering arbitrary already-written content (e.g. a historical chat/agent transcript full of
|
|
38
|
+
code/XML/HTML snippets) where a stray angle bracket should render as visible text, not a real DOM
|
|
39
|
+
element. GFM tables/lists/etc. still render normally — only raw embedded HTML is affected. `false`
|
|
40
|
+
(the default) reproduces the exact `marked`-default (sanitized-when-`sanitize`) passthrough
|
|
41
|
+
behavior.
|
|
42
|
+
- `gfm: boolean = true` — GitHub-flavored Markdown (tables, strikethrough, autolinks, task lists)
|
|
43
|
+
- `linkTarget: string | null = '_blank'` (attribute `link-target`) — `target` applied to every
|
|
44
|
+
rendered `<a>`, with `rel="noopener noreferrer"` always added alongside it whenever a `target` is
|
|
45
|
+
emitted. `'_blank'` (the default) preserves the original output; a falsy value (`null`, or the
|
|
46
|
+
empty string via `link-target=""`) omits `target`/`rel` entirely instead of always defaulting to
|
|
47
|
+
`_blank`, so rendered links open in the same tab
|
|
48
|
+
- `internalLinkPrefix: string = ''` (attribute `internal-link-prefix`) — when set, a rendered link
|
|
49
|
+
whose `href` *attribute* (not the browser-resolved `.href` property) starts with this prefix is
|
|
50
|
+
intercepted on click and reported via `lr-link-click` instead of navigating; empty (the default)
|
|
51
|
+
means every link is treated as external
|
|
52
|
+
- `headingOffset: number = 0` (attribute `heading-offset`) — added to every rendered heading's
|
|
53
|
+
source `token.depth` before emitting `<h${depth}>` (e.g. `heading-offset="2"` renders a source `#`
|
|
54
|
+
as `<h3>`); clamped to `[1, 6]` so a source `######` with a positive offset stays at `<h6>` rather
|
|
55
|
+
than overflowing past the HTML heading levels. `0` (the default) preserves the original
|
|
56
|
+
`<h${token.depth}>` output
|
|
57
|
+
- `eagerLoad: boolean = false` (attribute `eager-load`) — when `true`, `connectedCallback()` skips
|
|
58
|
+
awaiting the async `loadMarkdownDeps()` import and renders synchronously if the shared
|
|
59
|
+
`marked`/`dompurify` module cache is *already* warm (e.g. an earlier `<lr-markdown>` instance on
|
|
60
|
+
the page already finished loading); falls back to the normal async path (with its brief
|
|
61
|
+
plain-text-fallback first paint) when the cache isn't warm yet. `false` (the default) is
|
|
62
|
+
byte-identical to always taking the async path
|
|
63
|
+
- `streaming: boolean = false` (reflected) — marks the host `aria-busy="true"` while partial Markdown
|
|
64
|
+
is still arriving and lets consumers target `lr-markdown[streaming]`; content updates while it is
|
|
65
|
+
true are coalesced to at most one parse per animation frame, while the final `streaming=false`
|
|
66
|
+
update flushes the latest content immediately; busy state also remains true while parser
|
|
67
|
+
dependencies are loading
|
|
68
|
+
- `highlightCode: boolean = true` (attribute `highlight-code`) — syntax-highlights fenced code
|
|
69
|
+
blocks via the optional `shiki` peer. `true` (the default) upgrades every fenced block once the
|
|
70
|
+
peer is available; set `false` to keep plain output even when `shiki` is installed. No effect
|
|
71
|
+
while `streaming` is `true`
|
|
72
|
+
- `languages?: Record<string, ShikiLanguageInput>` (attribute: false) — same shape and purpose as
|
|
73
|
+
`<lr-code-block>`'s own `languages`: a fine-grained, explicit language-grammar bundle scoping
|
|
74
|
+
shiki's build output to just those grammars instead of its full ~200-language bundle. Forwarded
|
|
75
|
+
verbatim to `loadShikiHighlighterCore()`. Unset (the default) uses the default full-bundle loader
|
|
76
|
+
- `languagesOnly: boolean = false` (attribute `languages-only`) — same purpose as
|
|
77
|
+
`<lr-code-block>`'s own `languagesOnly`: skips the default full-bundle loader entirely, so a
|
|
78
|
+
fenced block whose language isn't in `languages` falls back to plain unhighlighted text rather
|
|
79
|
+
than reaching for the full bundle. No effect unless `languages` is also set
|
|
80
|
+
- `headingAnchors: boolean = false` (attribute `heading-anchors`) — stamps a computed
|
|
81
|
+
GitHub-slugger-style slug as `id` on every rendered heading.
|
|
82
|
+
- `math: boolean = false` — renders `$inline$` and `$$block$$` TeX via the optional `katex` peer,
|
|
83
|
+
lazy-loaded the same way as `marked`/`dompurify`/`shiki`.
|
|
84
|
+
- `anchorKinds: readonly ('fragment' | 'text-quote')[]` (readonly) — the anchor kinds this
|
|
85
|
+
component resolves for the shared anchor-target contract.
|
|
86
|
+
|
|
87
|
+
**Methods:** `getHeadingTree()` returns the document-ordered heading outline (`{ level, text, slug
|
|
88
|
+
}[]`) computed on every parse, regardless of `headingAnchors`.
|
|
89
|
+
|
|
90
|
+
**Events:**
|
|
91
|
+
- `lr-link-click` (`detail: { href: string; internal: true }`) — fired, with the click prevented,
|
|
92
|
+
when a rendered link's `href` starts with `internal-link-prefix`; ordinary external links navigate
|
|
93
|
+
normally and never fire this
|
|
94
|
+
- `lr-render-error` (`detail: { error: unknown }`) — rendering fell back to plain text (see the
|
|
95
|
+
fallback matrix below), or `math` is set but the `katex` peer isn't installed
|
|
96
|
+
- `lr-highlight-activate` (`detail: { id: string }`) — a painted `text-quote` highlight was clicked
|
|
97
|
+
- `lr-text-select` (`detail: { text: string; anchor: LyraAnchor | null; rects: DOMRect[] }`) — a text
|
|
98
|
+
selection inside the rendered content ended; `anchor` is a `text-quote` anchor scoped to the
|
|
99
|
+
rendered content, or `null` when the selection couldn't be anchored
|
|
100
|
+
- `lr-anchor-result` (`detail: { found: boolean }`) — fired after an `anchor` property assignment or
|
|
101
|
+
a `scrollToAnchor()` call is applied (the shared anchor-target contract)
|
|
102
|
+
|
|
103
|
+
**Slots:** none — content comes from the `content` property, not light-DOM children.
|
|
104
|
+
|
|
105
|
+
**CSS parts:** `content` (the wrapper around the rendered or plain-text-fallback output; carries
|
|
106
|
+
`data-fallback` while showing the plain-text fallback — still-loading peers or a failed render —
|
|
107
|
+
so a consumer can target `lr-markdown [part='content'][data-fallback]` to style it distinctly),
|
|
108
|
+
`heading` (every rendered `<h1>`–`<h6>`, shifted by `heading-offset`), `paragraph` (every rendered
|
|
109
|
+
`<p>`), `list` (every rendered `<ul>`/`<ol>`), `code-block` (every rendered fenced/indented `<pre>`),
|
|
110
|
+
`inline-code` (every rendered inline `<code>` span — backtick spans, not fenced blocks), `link`
|
|
111
|
+
(every rendered `<a>`), `table` (every rendered `<table>`), `blockquote` (every rendered
|
|
112
|
+
`<blockquote>`), `img` (every rendered `<img>`), `math` (a rendered inline or block math span,
|
|
113
|
+
carrying `data-display="inline"|"block"`)
|
|
114
|
+
|
|
115
|
+
**Themeable custom properties:** `--lr-markdown-font-mono` (default `ui-monospace, SFMono-Regular,
|
|
116
|
+
Menlo, Consolas, monospace` — the code/code-block font; component-specific since no shared
|
|
117
|
+
`--lr-*` monospace token exists), plus shared tokens `--lr-space-xs/-s/-m/-l`,
|
|
118
|
+
`--lr-color-brand-quiet`, `--lr-color-brand`, `--lr-color-border`, `--lr-color-text-quiet`,
|
|
119
|
+
`--lr-radius`.
|
|
120
|
+
|
|
121
|
+
**Optional peer deps:** `marked`, `dompurify` (both lazy-loaded via `markdown-loader.ts`'s
|
|
122
|
+
`loadMarkdownDeps()`, mirroring `chart-loader.ts`'s two-independent-optional-peers shape). Each half
|
|
123
|
+
is loaded and caught independently — a consumer who installs only `marked` and explicitly sets
|
|
124
|
+
`sanitize="false"` (so `dompurify` is never needed) is a valid, supported combination. Also `shiki`,
|
|
125
|
+
the same optional peer `<lr-code-block>` uses, for `highlightCode`'s fenced-block syntax
|
|
126
|
+
highlighting — independent of the `marked`/`dompurify` pair, and its absence never blocks rendering
|
|
127
|
+
(fenced blocks simply stay unhighlighted).
|
|
128
|
+
|
|
129
|
+
```html
|
|
130
|
+
<lr-markdown
|
|
131
|
+
content="# Report See the [setup guide](/docs/setup) for details."
|
|
132
|
+
internal-link-prefix="/docs/"
|
|
133
|
+
></lr-markdown>
|
|
134
|
+
<script>
|
|
135
|
+
document.querySelector('lr-markdown').addEventListener('lr-link-click', (e) => {
|
|
136
|
+
router.navigate(e.detail.href);
|
|
137
|
+
});
|
|
138
|
+
</script>
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Rendering never ships unsanitized or broken markup silently. If `marked` fails to load, or throws
|
|
142
|
+
while parsing malformed input, the component falls back to plain text (`white-space: pre-wrap`, no
|
|
143
|
+
HTML parsing at all — the raw `content` string itself) and fires `lr-render-error`. If `sanitize`
|
|
144
|
+
is `true` (the default) and `dompurify` fails to load, the component *also* falls back to plain text
|
|
145
|
+
+ `lr-render-error` — it never renders `marked`'s raw HTML output when sanitization was requested
|
|
146
|
+
(or defaulted to) but is unavailable, even though `marked` itself loaded fine. If `sanitize` is
|
|
147
|
+
explicitly `false`, `marked`'s raw output renders as-is regardless of whether `dompurify` is
|
|
148
|
+
installed. While the optional peers are still resolving, the host carries `aria-busy="true"` (set/
|
|
149
|
+
cleared in `updated()` based on whether the deps have loaded) and shows the same plain-text fallback
|
|
150
|
+
rendering — there's no separate loading skeleton, since the un-rendered Markdown source is already
|
|
151
|
+
legible text in the meantime.
|
|
152
|
+
|
|
153
|
+
**Known gotchas:**
|
|
154
|
+
- a malformed percent-escape or lone UTF-16 surrogate in a link's raw `href` makes the internal
|
|
155
|
+
`encodeURI`-based validity guard throw, silently dropping just that anchor (the link text still
|
|
156
|
+
renders, with no `href`) — mirrors `marked`'s own default `link()` renderer's defensive behavior.
|
|
157
|
+
- `target` is not in DOMPurify's default attribute allowlist (unlike `part`/`rel`/`class`, which
|
|
158
|
+
already are), so sanitization is called with `ADD_ATTR: ['target']` — without that, every rendered
|
|
159
|
+
link's `target` would be silently stripped by sanitization even though the anchor itself survives.
|
|
160
|
+
- a fresh `marked.Marked()` instance (with a fresh renderer) is built on every single parse rather
|
|
161
|
+
than cached, specifically so the renderer's `link()` override always closes over the *current*
|
|
162
|
+
`linkTarget` — `marked`'s `.use()` otherwise persists whatever renderer it was given for the
|
|
163
|
+
instance's lifetime, which would go stale if `linkTarget` changed after a cached instance's first use.
|
|
164
|
+
- `internal-link-prefix` matching compares against the raw `href` *attribute*, not the resolved
|
|
165
|
+
`.href` IDL property (always an absolute URL in the browser) — a prefix like `/docs/` matches a
|
|
166
|
+
relative markdown link but would never match against the resolved property.
|
|
167
|
+
- rendered output goes through `unsafeHTML`; with `sanitize="false"` the component renders whatever
|
|
168
|
+
HTML `marked` produces from `content` completely unsanitized, so untrusted `content` must never be
|
|
169
|
+
paired with `sanitize="false"`.
|
|
170
|
+
|
|
171
|
+
---
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<!-- GENERATED by scripts/build-llms.mjs from llms/media.md — do not edit this file. -->
|
|
2
|
+
|
|
3
|
+
# `lr-media-card`
|
|
4
|
+
|
|
5
|
+
- **Import** `import '@aceshooting/lyra-ui/components/media/media-card/media-card.js';` (registers the tag; side-effect import)
|
|
6
|
+
- **Class** `LyraMediaCard`, also available unregistered from `@aceshooting/lyra-ui/components/media/media-card/media-card.class.js`
|
|
7
|
+
- **Family** `components/media/` — 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-media-card`
|
|
14
|
+
|
|
15
|
+
A lightweight inline preview for one already-sent, already-available attachment inside a rendered
|
|
16
|
+
chat message body — distinct from `lr-document-preview` (a fuller viewer with an async
|
|
17
|
+
server-side-conversion state machine) and `lr-attachment-chip` (a pre-send queued-file chip with
|
|
18
|
+
upload progress). This component has neither concern; it only ever shows a `src` that's already
|
|
19
|
+
final.
|
|
20
|
+
|
|
21
|
+
**Properties:**
|
|
22
|
+
- `src: string = ''` — the media URL. Always re-validated against a safe-scheme allowlist before
|
|
23
|
+
use (see below) — never trust it unsanitized even though it's typed as a plain string.
|
|
24
|
+
- `kind?: 'image' | 'video' | 'file'` (reflected) — explicit format dispatch. Leave unset to
|
|
25
|
+
auto-detect from `mimeType`.
|
|
26
|
+
- `mimeType: string = ''` (attribute `mime-type`) — drives auto-detection when `kind` is unset.
|
|
27
|
+
- `filename: string = ''` — shown in the file-chip fallback, used as the download link's suggested
|
|
28
|
+
filename, and folded into the accessible name.
|
|
29
|
+
- `alt: string = ''` — alt text for the image case (and reused as a video label fallback). Falls
|
|
30
|
+
back to `filename`, then a generic per-kind description.
|
|
31
|
+
- `accessibleLabel: string = ''` (attribute `aria-label`) — overrides the localized action name on
|
|
32
|
+
the actual button/link without replacing image alt text or the video control's own label
|
|
33
|
+
- `maxHeight: string = ''` (attribute `max-height`) — a CSS length (e.g. `"16rem"`); once set,
|
|
34
|
+
overrides the `--lr-media-card-max-height` custom property for this instance only (applied
|
|
35
|
+
inline on `[part="base"]`, so it reliably wins over a `:host{}`-declared default from outside the
|
|
36
|
+
shadow root) — same contract as `<lr-document-preview>`'s identically-named prop.
|
|
37
|
+
|
|
38
|
+
**Events:** `lr-open` (`detail: { src: string; filename: string }`, cancelable) — fired when the
|
|
39
|
+
card (or, for `kind="video"`, its separate `open-button`) is activated. `detail.src` is whichever
|
|
40
|
+
safe-URL sink actually rendered (`safeMediaSrc(src) ?? safeLinkHref(src) ?? src.trim()`), not
|
|
41
|
+
necessarily the raw `src` property verbatim — a whitespace-padded value is trimmed, so `detail.src`
|
|
42
|
+
always matches what the DOM would show if it were safe. This component never navigates on its own
|
|
43
|
+
for `image`/`video` — a host decides what "open" means. The `file`-chip case is the exception: when
|
|
44
|
+
`src` passes the stricter href safety check, the chip is a real `<a href download>` so a bare
|
|
45
|
+
drop-in still does something useful, but `lr-open` fires first — a host calling
|
|
46
|
+
`preventDefault()` on it suppresses that default download/open so it can substitute its own
|
|
47
|
+
handling.
|
|
48
|
+
|
|
49
|
+
**Slots:** none.
|
|
50
|
+
|
|
51
|
+
**CSS parts:** `base` (a `<button>` for `kind="image"`, a plain wrapper `<div>` for `kind="video"`,
|
|
52
|
+
an `<a>` or `<span>` for the file-chip fallback depending on href safety), `media` (the `<img>`/
|
|
53
|
+
`<video>`), `file-icon`, `filename` (file-chip fallback only), `open-button` (video only — see
|
|
54
|
+
below).
|
|
55
|
+
|
|
56
|
+
**Themeable custom properties:** `--lr-media-card-max-height` (default `20rem` — caps `[part="media"]`'s
|
|
57
|
+
block-size so one oversized image/video can't blow out a chat bubble; same naming/contract as
|
|
58
|
+
`<lr-document-preview>`'s identical `--lr-document-preview-max-height`; override per-instance via
|
|
59
|
+
the `max-height` attribute instead of this property directly). Plus shared tokens
|
|
60
|
+
`--lr-space-xs`/`-s`, `--lr-color-border`, `--lr-color-surface`, `--lr-color-text`/`-text-quiet`,
|
|
61
|
+
`--lr-color-brand` (hover border), `--lr-radius`, `--lr-icon-button-size` (video's `open-button`
|
|
62
|
+
sizing), `--lr-focus-ring-*`, `--lr-transition-fast`.
|
|
63
|
+
|
|
64
|
+
**Optional peer deps:** none.
|
|
65
|
+
|
|
66
|
+
```html
|
|
67
|
+
<lr-media-card kind="image" src="https://example.com/photo.jpg" alt="Screenshot" filename="photo.jpg"
|
|
68
|
+
@lr-open=${(e) => openLightbox(e.detail.src)}
|
|
69
|
+
></lr-media-card>
|
|
70
|
+
<lr-media-card kind="file" src="https://example.com/report.pdf" filename="report.pdf"></lr-media-card>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Safe-URL checking.** `src` is validated (exported as `safeMediaSrc()`/`safeLinkHref()`) before it's
|
|
74
|
+
ever assigned to an `<img>`/`<video>` `src` or an `<a href>` — only `http:`/`https:`/`blob:` (plus
|
|
75
|
+
`data:` for a *media* `src` only) or a scheme-relative/relative URL with no scheme at all pass;
|
|
76
|
+
anything else (`javascript:`, `vbscript:`, and similarly suspicious schemes) is rejected. `data:` is
|
|
77
|
+
allowed for `safeMediaSrc()` (a browser never executes script from a media element's `src`) but
|
|
78
|
+
rejected by the stricter `safeLinkHref()` (a `data:text/html` URI navigated to via a clicked `<a
|
|
79
|
+
href>` runs as a full document and can execute script) — the same scheme gets a different verdict
|
|
80
|
+
depending on which DOM sink it's headed for. Both functions delegate to the platform's own `new
|
|
81
|
+
URL()` parser rather than a hand-rolled scheme regex, specifically because `new URL()` already
|
|
82
|
+
implements the WHATWG URL Standard's input normalization (stripping tab/newline/leading-trailing
|
|
83
|
+
space before looking for a scheme) — a naive regex is vulnerable to exactly the kind of
|
|
84
|
+
tab-injected-into-a-scheme bypass a browser attribute sink still normalizes and executes. An
|
|
85
|
+
`image`/`video` `kind` whose `src` fails the media-src check falls back to the generic file-chip
|
|
86
|
+
rendering, which then separately re-validates `src` against the stricter href allowlist for its own
|
|
87
|
+
download affordance.
|
|
88
|
+
|
|
89
|
+
`kind="video"` renders its open affordance as a separate `[part="open-button"]` next to
|
|
90
|
+
`[part="media"]` rather than wrapping the whole card in one `<button>`/`<a>` (the pattern
|
|
91
|
+
`image`/`file` use) — a `<video controls>` element is itself interactive content, and HTML forbids
|
|
92
|
+
nesting interactive content inside a `<button>`/`<a>`; doing so anyway would also make every click on
|
|
93
|
+
the video's own native controls bubble up and spuriously fire `lr-open`.
|
|
94
|
+
|
|
95
|
+
**Known gotchas:**
|
|
96
|
+
- Calling the real `.click()` (or dispatching a `click`/`MouseEvent`) on the file-chip's `<a href>`
|
|
97
|
+
in a test genuinely triggers real browser navigation — always `preventDefault()` on a `click`
|
|
98
|
+
listener registered before triggering it, the same precaution `lr-document-preview`'s own
|
|
99
|
+
download-link tests already take. A synthetic `dispatchEvent(new MouseEvent('click', {cancelable:
|
|
100
|
+
true}))` still invokes the anchor's native activation behavior if nothing calls
|
|
101
|
+
`preventDefault()` during dispatch — it is not a safe no-op.
|
|
102
|
+
- `kind` only reflects to the host attribute when explicitly set — CSS keying off the
|
|
103
|
+
auto-detected resolved kind should target the rendered `[part]`/element (e.g. `video[part="media"]`),
|
|
104
|
+
not `:host([kind=...])`, since the latter won't see an auto-detected kind.
|
|
105
|
+
|
|
106
|
+
---
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<!-- GENERATED by scripts/build-llms.mjs from llms/retrieval.md — do not edit this file. -->
|
|
2
|
+
|
|
3
|
+
# `lr-memory-panel`
|
|
4
|
+
|
|
5
|
+
- **Import** `import '@aceshooting/lyra-ui/components/retrieval/memory-panel/memory-panel.js';` (registers the tag; side-effect import)
|
|
6
|
+
- **Class** `LyraMemoryPanel`, also available unregistered from `@aceshooting/lyra-ui/components/retrieval/memory-panel/memory-panel.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-memory-panel`
|
|
14
|
+
|
|
15
|
+
Agent working-memory surface: short-term context and long-term memories, each with confidence and
|
|
16
|
+
optional grounding provenance, and add/remove/forget actions gated behind an explicit confirmation.
|
|
17
|
+
Composes `lr-provenance-panel` (per-item provenance, behind a disclosure toggle) and `lr-confirm-bar`
|
|
18
|
+
(every confirmation).
|
|
19
|
+
|
|
20
|
+
**Properties:**
|
|
21
|
+
- `shortTerm: LyraMemoryItem[] = []` / `longTerm: LyraMemoryItem[] = []` (both attribute: false) —
|
|
22
|
+
`LyraMemoryItem { id: string; text: string; confidence?: number; provenance?: LyraProvenance }`
|
|
23
|
+
(exported here). `text` renders as plain text. `confidence` is 0–1; omit it and the confidence
|
|
24
|
+
indicator is omitted entirely rather than showing 0%/unknown. `provenance` reuses
|
|
25
|
+
`lr-provenance-panel`'s own `LyraProvenance` shape verbatim (`{ entities?; relationships?;
|
|
26
|
+
communities?; chunks? }`); omit it and the disclosure toggle is omitted entirely. Both arrays are
|
|
27
|
+
controlled and never mutated here — approving an action only fires the matching event
|
|
28
|
+
- `types: NodeTypeStyle[] = []` (attribute: false) — `{ id: string; label: string; color?: string;
|
|
29
|
+
shape?: 'circle' | 'square' | 'diamond' }`, forwarded verbatim to every expanded item's
|
|
30
|
+
`lr-provenance-panel`
|
|
31
|
+
- `thresholds: { high: number; medium: number } = { high: 0.75, medium: 0.5 }` (attribute: false) —
|
|
32
|
+
confidence-tier boundaries (reusing `lr-citation-badge`'s high/medium/low confidence vocabulary and
|
|
33
|
+
success/warning/danger tones), also forwarded as the provenance relevance tiers
|
|
34
|
+
- `label: string = ''` — overall accessible label override
|
|
35
|
+
|
|
36
|
+
**Events:**
|
|
37
|
+
- `lr-add` (`detail: LyraMemoryAddDetail` = `{ item: LyraMemoryItem }`) — a pending "promote to
|
|
38
|
+
long-term" was approved; the short-term item as-is. Only offered on short-term items.
|
|
39
|
+
- `lr-remove` (`detail: LyraMemoryRemoveDetail` = `{ id: string; scope: 'short-term' | 'long-term' }`)
|
|
40
|
+
— a pending per-item removal was approved. Offered on every item.
|
|
41
|
+
- `lr-forget` (`detail: undefined`) — the pending "forget all long-term memories" bulk action was
|
|
42
|
+
approved. Only rendered while `longTerm` is non-empty.
|
|
43
|
+
- `lr-expand` (`detail: LyraMemoryExpandDetail` = `{ id: string; expanded: boolean }`) — an item's
|
|
44
|
+
provenance disclosure was toggled.
|
|
45
|
+
|
|
46
|
+
**Slots:** none.
|
|
47
|
+
|
|
48
|
+
**CSS parts:** `base`, `empty` (the all-empty `lr-empty`, shown when both lists are empty),
|
|
49
|
+
`section` (one of the two, carries `data-scope`), `section-header`, `heading` (a section's visible
|
|
50
|
+
heading text), `section-empty`, `list` (`role="list"`, omitted while that section is empty), `item`
|
|
51
|
+
(`role="listitem"`, carries `data-id`/`data-scope` and a stable `tabindex="-1"` so focus has
|
|
52
|
+
somewhere to land after a confirmation resolves), `item-row`, `item-text`, `confidence` (carries
|
|
53
|
+
`data-tone`; omitted when `confidence` is unset), `expand-toggle` / `item-body` (both omitted when
|
|
54
|
+
`provenance` is unset; `item-body` is `hidden` while collapsed), `item-actions`, `add-button`,
|
|
55
|
+
`remove-button`, `forget-all-button`.
|
|
56
|
+
|
|
57
|
+
**Themeable custom properties:** shared tokens only.
|
|
58
|
+
|
|
59
|
+
**Optional peer deps:** none.
|
|
60
|
+
|
|
61
|
+
**Known gotchas:**
|
|
62
|
+
- At most one confirmation is pending at a time — starting a new action (same item or not) silently
|
|
63
|
+
cancels whichever confirmation was already open.
|
|
64
|
+
- `remove` (one item, either list) and `forget` (the whole long-term list) are deliberately distinct
|
|
65
|
+
actions; there is no per-item forget and no bulk remove.
|
|
66
|
+
|
|
67
|
+
---
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
<!-- GENERATED by scripts/build-llms.mjs from llms/utility.md — do not edit this file. -->
|
|
2
|
+
|
|
3
|
+
# `lr-mention-popover`
|
|
4
|
+
|
|
5
|
+
- **Import** `import '@aceshooting/lyra-ui/components/utility/mention-popover/mention-popover.js';` (registers the tag; side-effect import)
|
|
6
|
+
- **Class** `LyraMentionPopover`, also available unregistered from `@aceshooting/lyra-ui/components/utility/mention-popover/mention-popover.class.js`
|
|
7
|
+
- **Family** `components/utility/` — 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-mention-popover`
|
|
14
|
+
|
|
15
|
+
A caret-anchored, keyboard-navigable popover for `@`-mention and `/`-slash-command autocomplete
|
|
16
|
+
inside a plain-text `<textarea>`/`<input>` the host owns. First-party invention (no Web Awesome
|
|
17
|
+
equivalent). It never takes DOM focus itself — the host's own input keeps focus, and this
|
|
18
|
+
component conveys the active row via `activeDescendantId` for the host to apply as its own
|
|
19
|
+
input's `aria-activedescendant`, the same pattern `<lr-select>`/`<lr-combobox>` use for their
|
|
20
|
+
own listbox.
|
|
21
|
+
|
|
22
|
+
**Properties:**
|
|
23
|
+
- `anchor?: HTMLElement` (attribute: false) — the element to position the popup relative to. A
|
|
24
|
+
plain `<textarea>` or single-line text `<input type="text"|"search">` gets caret-precise
|
|
25
|
+
positioning; any other element anchors the whole popup under that element's own box.
|
|
26
|
+
- `items: MentionItem[] = []` (attribute: false) — the full candidate set, pre-`query`-filtering.
|
|
27
|
+
- `query: string = ''` — the text typed since the trigger character; drives the built-in filtering
|
|
28
|
+
(see `filter`).
|
|
29
|
+
- `open: boolean = false` (reflected)
|
|
30
|
+
- `filter: MentionFilter | null = null` (attribute: false) — overrides the built-in
|
|
31
|
+
case-insensitive `label`/`description` substring match entirely.
|
|
32
|
+
- `emptyText: string = 'No matches'` (attribute `empty-text`)
|
|
33
|
+
- `label: string = 'Suggestions'` — accessible name for the `role="listbox"` popup. A host-level
|
|
34
|
+
plain `aria-label` attribute on `<lr-mention-popover>` itself takes priority over this property
|
|
35
|
+
when present (checked via a plain `getAttribute()` read, not a reactive property) — matches the
|
|
36
|
+
same fallback on `<lr-combobox>`/`<lr-table>`.
|
|
37
|
+
- `filteredItems: MentionItem[]` — read-only getter; `items` filtered by `query` via `filter` (or
|
|
38
|
+
the built-in default). Empty `query` returns `items` unfiltered.
|
|
39
|
+
- `activeDescendantId: string | null` — read-only getter; the `id` of the currently-highlighted
|
|
40
|
+
row, or `null` while closed or when `filteredItems` is empty.
|
|
41
|
+
- `listboxId: string` — read-only getter; the `id` of the `role="listbox"` element, for a host that
|
|
42
|
+
also wants to wire `aria-controls`.
|
|
43
|
+
|
|
44
|
+
**Methods:** `handleKeyDown(e: KeyboardEvent): boolean` — the host's own text-control `keydown`
|
|
45
|
+
handler calls this while the popover is open. Handles `ArrowDown`/`ArrowUp` (moves the highlight) and
|
|
46
|
+
`Enter`/`Tab` (commits the highlighted row) — both pairs return `false` with no `preventDefault()`
|
|
47
|
+
when `filteredItems` is empty, letting the keystroke fall through to the host's own control unchanged
|
|
48
|
+
(e.g. the textarea's caret still moves to the next line on ArrowDown when there's nothing to
|
|
49
|
+
navigate); `Escape` always closes with no selection and returns `true`. Returns `true` whenever the
|
|
50
|
+
key was intercepted (`preventDefault()` already called) and the host should not also act on it,
|
|
51
|
+
`false` otherwise (including for any key this method doesn't recognize).
|
|
52
|
+
|
|
53
|
+
**Exported types:** `MentionItem { id: string; label: string; description?: string; icon?: string
|
|
54
|
+
}`; `MentionFilter = (item: MentionItem, query: string) => boolean`; `MentionSelectDetail { id:
|
|
55
|
+
string; label: string }`.
|
|
56
|
+
|
|
57
|
+
**Events:** `lr-mention-select` (`detail: MentionSelectDetail`, `{ id, label }` of the row that
|
|
58
|
+
was committed via Enter/Tab/click), `lr-mention-close` (no detail payload —
|
|
59
|
+
`this.emit('lr-mention-close')` is called with no second argument, so `event.detail` is `null`,
|
|
60
|
+
not `undefined`; fires on Escape or any other `open: true -> false` transition, but never for the
|
|
61
|
+
close that immediately follows a `lr-mention-select` commit, and never for markup that simply
|
|
62
|
+
renders `open="false"` on first paint)
|
|
63
|
+
|
|
64
|
+
**Slots:** none.
|
|
65
|
+
|
|
66
|
+
**CSS parts:** `listbox`, `option`, `option-icon` (when `icon` is set), `option-label`,
|
|
67
|
+
`option-description` (when `description` is set), `empty`
|
|
68
|
+
|
|
69
|
+
**Themeable custom properties:** shared tokens only — `--lr-space-xs`/`-s`/`-m` (popup padding,
|
|
70
|
+
row padding/gap), `--lr-color-surface`/`-border` (popup background/border), `--lr-radius`
|
|
71
|
+
(popup and row corners), `--lr-shadow` (popup elevation), `--lr-transition-fast` (open/close
|
|
72
|
+
transition), `--lr-color-brand-quiet` (active-row background), `--lr-color-brand` (selected-row
|
|
73
|
+
text), `--lr-color-text-quiet`/`--lr-color-text` (description text, full-contrast on the active
|
|
74
|
+
row).
|
|
75
|
+
|
|
76
|
+
**Optional peer deps:** none.
|
|
77
|
+
|
|
78
|
+
```html
|
|
79
|
+
<textarea id="composer"></textarea>
|
|
80
|
+
<lr-mention-popover id="mentions" label="People" empty-text="No matches"></lr-mention-popover>
|
|
81
|
+
<script type="module">
|
|
82
|
+
const textarea = document.getElementById('composer');
|
|
83
|
+
const popover = document.getElementById('mentions');
|
|
84
|
+
|
|
85
|
+
textarea.addEventListener('keydown', (e) => {
|
|
86
|
+
if (popover.open && popover.handleKeyDown(e)) return; // consumed
|
|
87
|
+
});
|
|
88
|
+
textarea.addEventListener('input', () => {
|
|
89
|
+
popover.anchor = textarea;
|
|
90
|
+
popover.items = [
|
|
91
|
+
{ id: 'ada', label: 'Ada Lovelace', description: 'Engineering', icon: '👩💻' },
|
|
92
|
+
{ id: 'grace', label: 'Grace Hopper', description: 'Engineering' },
|
|
93
|
+
];
|
|
94
|
+
popover.query = 'a'; // detected since the trigger character
|
|
95
|
+
popover.open = true;
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
popover.addEventListener('lr-mention-select', (e) => {
|
|
99
|
+
// splice `${e.detail.label}` into the textarea at the trigger offset
|
|
100
|
+
});
|
|
101
|
+
</script>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Integration is entirely the host's responsibility: detect a mention/command trigger in the host's
|
|
105
|
+
own `input` handling, set `anchor`/`items`/`query` and flip `open = true`, forward every `keydown`
|
|
106
|
+
through `handleKeyDown()` while open, and keep the host's own input's `aria-activedescendant` (and
|
|
107
|
+
optionally `aria-controls`, via `listboxId`) in sync with `activeDescendantId`. Setting `open =
|
|
108
|
+
false` whenever the query stops looking like an active mention context (a space typed, the trigger
|
|
109
|
+
deleted, the input blurred, …) is also the host's job — `lr-mention-close` fires automatically
|
|
110
|
+
from that, there is no separate "tell it to close" call needed.
|
|
111
|
+
|
|
112
|
+
Positioning measures exactly where the caret currently paints via a hidden-mirror-element technique
|
|
113
|
+
(`caretClientRect()`) and positions against that single point with `internal/positioner.js`'s
|
|
114
|
+
`place()`, so the popup tracks the caret rather than sitting under the whole textarea. Re-measures
|
|
115
|
+
automatically only on an `anchor` or `query` change while open (a keystroke moves the caret, so a
|
|
116
|
+
fresh `query` is the proxy for "the caret may have moved").
|
|
117
|
+
|
|
118
|
+
**Known gotchas:**
|
|
119
|
+
- a host-level `aria-label` attribute on `<lr-mention-popover>` now takes priority over `label`
|
|
120
|
+
(and its localized default) when resolving `[part="listbox"]`'s accessible name — previously it
|
|
121
|
+
was silently ignored. Matches the same fallback on `<lr-combobox>`/`<lr-table>`.
|
|
122
|
+
- The popover opens pre-highlighted on the top match (index 0), unlike `<lr-combobox>`'s own
|
|
123
|
+
listbox which opens with nothing highlighted (`-1`) — a bare Enter right after opening commits
|
|
124
|
+
immediately.
|
|
125
|
+
- Caret-precise positioning only applies to a plain `<textarea>` or single-line text
|
|
126
|
+
`<input type="text"|"search">`; any other `anchor` element, or a text control whose caret rect
|
|
127
|
+
can't be measured (e.g. `display: none`), silently falls back to whole-element anchoring against
|
|
128
|
+
`anchor` itself.
|
|
129
|
+
- A caret that moves for a reason other than typing (e.g. a mouse click elsewhere in the text while
|
|
130
|
+
the popover happens to still be open) is not separately tracked — force a re-measure by toggling
|
|
131
|
+
`open` or reassigning `anchor`.
|
|
132
|
+
- `activeIndex` resets to `0` whenever `query` or `items` changes, but not when only `anchor`
|
|
133
|
+
changes — reassigning `anchor` alone preserves whatever row was last highlighted.
|
|
134
|
+
- There's no persisted "selection" the way `<lr-combobox>`'s own listbox has one — a mention is
|
|
135
|
+
either committed (closing the popover) or dismissed with nothing chosen. `aria-selected="true"`
|
|
136
|
+
here marks whichever row is currently *active* (what Enter/Tab would commit right now, per the
|
|
137
|
+
WAI-ARIA combobox-with-list-autocomplete pattern), not a separate persisted value.
|
|
138
|
+
|
|
139
|
+
---
|