@aceshooting/lyra-ui 29.0.2 → 29.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/CHANGELOG.md +37 -0
- package/README.md +19 -26
- package/design-tokens.json +1 -1
- package/dist/cli/migrate-wa.mjs +2 -0
- package/dist/components/agent-tools/activity-feed/activity-feed.class.d.ts +5 -3
- package/dist/components/agent-tools/activity-feed/activity-feed.class.js +4 -3
- package/dist/components/agent-tools/activity-feed/activity-feed.styles.js +1 -1
- package/dist/components/agent-tools/agent-trace/agent-trace.class.d.ts +21 -5
- package/dist/components/agent-tools/agent-trace/agent-trace.class.js +14 -11
- package/dist/components/agent-tools/agent-trace/agent-trace.styles.js +1 -1
- package/dist/components/agent-tools/confirm-bar/confirm-bar.class.js +2 -2
- package/dist/components/agent-tools/eval-dataset/eval-dataset.class.d.ts +34 -7
- package/dist/components/agent-tools/eval-dataset/eval-dataset.class.js +25 -11
- package/dist/components/agent-tools/eval-result/eval-result-source.js +1 -0
- package/dist/components/agent-tools/eval-result/eval-result.class.d.ts +31 -11
- package/dist/components/agent-tools/eval-result/eval-result.class.js +29 -15
- package/dist/components/agent-tools/eval-result/eval-result.styles.js +1 -1
- package/dist/components/agent-tools/eval-result/eval-run-result.d.ts +10 -0
- package/dist/components/agent-tools/span-waterfall/span-waterfall.class.d.ts +26 -5
- package/dist/components/agent-tools/span-waterfall/span-waterfall.class.js +16 -6
- package/dist/components/agent-tools/span-waterfall/span-waterfall.d.ts +1 -1
- package/dist/components/agent-tools/span-waterfall/span-waterfall.js +1 -1
- package/dist/components/agent-tools/span-waterfall/span-waterfall.styles.js +1 -1
- package/dist/components/agent-tools/task-list/task-list.class.d.ts +29 -6
- package/dist/components/agent-tools/task-list/task-list.class.js +13 -7
- package/dist/components/agent-tools/task-list/task-list.d.ts +1 -1
- package/dist/components/agent-tools/task-list/task-list.js +1 -1
- package/dist/components/agent-tools/task-list/task-list.styles.js +1 -1
- package/dist/components/agent-tools/terminal/terminal.class.d.ts +9 -5
- package/dist/components/agent-tools/terminal/terminal.class.js +8 -8
- package/dist/components/agent-tools/test-results/test-results.class.d.ts +16 -4
- package/dist/components/agent-tools/test-results/test-results.class.js +15 -6
- package/dist/components/agent-tools/test-results/test-results.d.ts +1 -0
- package/dist/components/agent-tools/test-results/test-results.js +1 -1
- package/dist/components/agent-tools/test-results/test-results.styles.js +1 -1
- package/dist/components/agent-tools/tool-timeline/tool-timeline.class.d.ts +7 -4
- package/dist/components/agent-tools/tool-timeline/tool-timeline.class.js +2 -1
- package/dist/components/agent-tools/trace-tree/span-projection.js +1 -0
- package/dist/components/agent-tools/trace-tree/span-shared.d.ts +29 -0
- package/dist/components/agent-tools/trace-tree/span-shared.js +1 -0
- package/dist/components/agent-tools/trace-tree/span.d.ts +5 -35
- package/dist/components/agent-tools/trace-tree/span.js +1 -1
- package/dist/components/agent-tools/trace-tree/trace-tree.class.d.ts +27 -5
- package/dist/components/agent-tools/trace-tree/trace-tree.class.js +19 -9
- package/dist/components/agent-tools/trace-tree/trace-tree.d.ts +1 -1
- package/dist/components/agent-tools/trace-tree/trace-tree.js +1 -1
- package/dist/components/agent-tools/trace-tree/trace-tree.styles.js +1 -1
- package/dist/components/charts/chart/bar-chart.class.d.ts +5 -1
- package/dist/components/charts/chart/box-plot.class.d.ts +2 -2
- package/dist/components/charts/chart/box-plot.class.js +3 -3
- package/dist/components/charts/chart/bubble-chart.class.d.ts +5 -1
- package/dist/components/charts/chart/chart-prepared-data.d.ts +9 -0
- package/dist/components/charts/chart/chart-prepared-data.js +1 -0
- package/dist/components/charts/chart/chart-spatial-data.js +2 -0
- package/dist/components/charts/chart/chart-sync.js +1 -1
- package/dist/components/charts/chart/chart-table-sampling.js +1 -1
- package/dist/components/charts/chart/chart.class.d.ts +56 -6
- package/dist/components/charts/chart/chart.class.js +18 -8
- package/dist/components/charts/chart/chart.styles.js +1 -1
- package/dist/components/charts/chart/doughnut-chart.class.d.ts +5 -1
- package/dist/components/charts/chart/histogram-buckets.d.ts +1 -1
- package/dist/components/charts/chart/histogram-buckets.js +1 -1
- package/dist/components/charts/chart/histogram.class.d.ts +19 -4
- package/dist/components/charts/chart/histogram.class.js +1 -1
- package/dist/components/charts/chart/line-chart.class.d.ts +5 -1
- package/dist/components/charts/chart/lite-chart.class.d.ts +51 -11
- package/dist/components/charts/chart/lite-chart.class.js +33 -27
- package/dist/components/charts/chart/lite-chart.styles.js +1 -1
- package/dist/components/charts/chart/pie-chart.class.d.ts +5 -1
- package/dist/components/charts/chart/polar-area-chart.class.d.ts +5 -1
- package/dist/components/charts/chart/radar-chart.class.d.ts +5 -1
- package/dist/components/charts/chart/scatter-chart.class.d.ts +5 -1
- package/dist/components/conversation/agent-workspace/agent-workspace.class.d.ts +6 -3
- package/dist/components/conversation/agent-workspace/agent-workspace.class.js +6 -5
- package/dist/components/conversation/agent-workspace/agent-workspace.styles.js +1 -1
- package/dist/components/conversation/chat-viewport/chat-viewport.class.d.ts +8 -0
- package/dist/components/conversation/chat-viewport/chat-viewport.class.js +1 -1
- package/dist/components/conversation/code-block/code-block-base.class.d.ts +5 -3
- package/dist/components/conversation/code-block/code-block-base.class.js +1 -1
- package/dist/components/conversation/code-block/code-block-core.class.d.ts +4 -1
- package/dist/components/conversation/code-block/code-block-core.class.js +1 -1
- package/dist/components/conversation/code-block/code-block-shared.d.ts +6 -4
- package/dist/components/conversation/code-block/code-block-shared.js +3 -2
- package/dist/components/conversation/code-block/code-block.class.d.ts +11 -4
- package/dist/components/conversation/code-block/code-block.class.js +1 -1
- package/dist/components/conversation/code-block/code-block.d.ts +1 -1
- package/dist/components/conversation/code-block/code-block.styles.js +1 -1
- package/dist/components/conversation/code-block/shiki-types.d.ts +2 -0
- package/dist/components/conversation/code-block/shiki-types.js +1 -1
- package/dist/components/conversation/markdown/markdown-base.class.d.ts +6 -4
- package/dist/components/conversation/markdown/markdown-base.class.js +1 -1
- package/dist/components/conversation/markdown/markdown-code-header.d.ts +2 -2
- package/dist/components/conversation/markdown/markdown-code-header.js +1 -1
- package/dist/components/conversation/markdown/markdown-core.class.d.ts +8 -3
- package/dist/components/conversation/markdown/markdown-progressive.js +2 -2
- package/dist/components/conversation/markdown/markdown-shared.d.ts +5 -10
- package/dist/components/conversation/markdown/markdown-shared.js +5 -5
- package/dist/components/conversation/markdown/markdown-streaming-tail.js +1 -1
- package/dist/components/conversation/markdown/markdown.class.d.ts +17 -10
- package/dist/components/conversation/markdown/markdown.class.js +1 -1
- package/dist/components/conversation/markdown/markdown.styles.js +1 -1
- package/dist/components/conversation/model-select/model-select.class.d.ts +4 -3
- package/dist/components/conversation/model-select/model-select.class.js +3 -2
- package/dist/components/conversation/model-select/model-select.styles.js +1 -1
- package/dist/components/conversation/model-settings-panel/model-settings-panel.class.d.ts +2 -1
- package/dist/components/conversation/model-settings-panel/model-settings-panel.class.js +2 -1
- package/dist/components/conversation/model-settings-panel/model-settings-panel.styles.js +1 -1
- package/dist/components/conversation/prompt-input/prompt-input.class.d.ts +3 -2
- package/dist/components/conversation/prompt-input/prompt-input.class.js +2 -1
- package/dist/components/conversation/prompt-input/prompt-input.styles.js +1 -1
- package/dist/components/conversation/prompt-queue/prompt-queue.class.d.ts +10 -2
- package/dist/components/conversation/prompt-queue/prompt-queue.class.js +15 -6
- package/dist/components/conversation/prompt-queue/prompt-queue.styles.js +1 -1
- package/dist/components/conversation/realtime-session/realtime-session.class.d.ts +3 -1
- package/dist/components/conversation/realtime-session/realtime-session.class.js +2 -1
- package/dist/components/conversation/realtime-session/realtime-session.styles.js +1 -1
- package/dist/components/conversation/streaming-text/markdown-detection.d.ts +2 -0
- package/dist/components/conversation/streaming-text/markdown-detection.js +4 -1
- package/dist/components/conversation/streaming-text/streaming-text-base.class.d.ts +6 -2
- package/dist/components/conversation/streaming-text/streaming-text-base.class.js +3 -3
- package/dist/components/conversation/streaming-text/streaming-text-core.class.js +1 -1
- package/dist/components/conversation/streaming-text/streaming-text.class.js +1 -0
- package/dist/components/conversation/thread-list/thread-list.class.d.ts +34 -4
- package/dist/components/conversation/thread-list/thread-list.class.js +22 -15
- package/dist/components/conversation/thread-list/thread-list.d.ts +1 -1
- package/dist/components/conversation/thread-list/thread-list.js +1 -1
- package/dist/components/conversation/thread-list/thread-list.styles.js +1 -1
- package/dist/components/conversation/transcript-feed/transcript-feed.class.d.ts +6 -2
- package/dist/components/conversation/transcript-feed/transcript-feed.class.js +3 -2
- package/dist/components/conversation/transcript-feed/transcript-feed.styles.js +1 -1
- package/dist/components/conversation/voice-picker/voice-picker.class.d.ts +3 -2
- package/dist/components/conversation/voice-picker/voice-picker.class.js +3 -2
- package/dist/components/conversation/voice-picker/voice-picker.styles.js +1 -1
- package/dist/components/data/calendar/calendar.class.d.ts +5 -2
- package/dist/components/data/calendar/calendar.class.js +1 -1
- package/dist/components/data/data-grid/data-grid-processing.js +2 -2
- package/dist/components/data/data-grid/data-grid.class.d.ts +22 -8
- package/dist/components/data/data-grid/data-grid.class.js +20 -19
- package/dist/components/data/data-grid/data-grid.styles.js +1 -1
- package/dist/components/data/document-library/document-library.class.d.ts +31 -4
- package/dist/components/data/document-library/document-library.class.js +25 -12
- package/dist/components/data/document-library/document-library.styles.js +1 -1
- package/dist/components/data/file-tree/file-tree.class.d.ts +30 -6
- package/dist/components/data/file-tree/file-tree.class.js +4 -3
- package/dist/components/data/file-tree/file-tree.d.ts +1 -0
- package/dist/components/data/file-tree/file-tree.js +1 -1
- package/dist/components/data/flow-canvas/flow-canvas.class.d.ts +31 -6
- package/dist/components/data/flow-canvas/flow-canvas.class.js +40 -19
- package/dist/components/data/flow-canvas/flow-canvas.styles.js +1 -1
- package/dist/components/data/flow-canvas/flow-model.js +1 -1
- package/dist/components/data/flow-canvas/flow-source.js +1 -0
- package/dist/components/data/flow-canvas/flow-types.d.ts +4 -2
- package/dist/components/data/flow-canvas/flow-viewport-index.js +1 -0
- package/dist/components/data/flow-minimap/flow-minimap.class.d.ts +9 -3
- package/dist/components/data/flow-minimap/flow-minimap.class.js +11 -2
- package/dist/components/data/flow-minimap/flow-minimap.styles.js +1 -1
- package/dist/components/data/funnel/funnel.class.d.ts +7 -3
- package/dist/components/data/funnel/funnel.class.js +2 -2
- package/dist/components/data/heatmap/calendar-grid.d.ts +1 -1
- package/dist/components/data/heatmap/calendar-grid.js +1 -1
- package/dist/components/data/heatmap/heatmap-grid-navigation.js +1 -1
- package/dist/components/data/heatmap/heatmap-limits.d.ts +1 -1
- package/dist/components/data/heatmap/heatmap-matrix-source-controller.js +1 -0
- package/dist/components/data/heatmap/heatmap-matrix-source.d.ts +5 -0
- package/dist/components/data/heatmap/heatmap-matrix-source.js +1 -0
- package/dist/components/data/heatmap/heatmap-scale.d.ts +0 -16
- package/dist/components/data/heatmap/heatmap-scale.js +1 -1
- package/dist/components/data/heatmap/heatmap.class.d.ts +40 -11
- package/dist/components/data/heatmap/heatmap.class.js +26 -6
- package/dist/components/data/heatmap/heatmap.styles.js +1 -1
- package/dist/components/data/pagination/pagination.class.js +1 -1
- package/dist/components/data/sequence-strip/sequence-strip-item.d.ts +17 -0
- package/dist/components/data/sequence-strip/sequence-strip-source-controller.js +1 -0
- package/dist/components/data/sequence-strip/sequence-strip-source.d.ts +5 -0
- package/dist/components/data/sequence-strip/sequence-strip-source.js +1 -0
- package/dist/components/data/sequence-strip/sequence-strip.class.d.ts +24 -19
- package/dist/components/data/sequence-strip/sequence-strip.class.js +23 -4
- package/dist/components/data/sequence-strip/sequence-strip.styles.js +1 -1
- package/dist/components/data/sparkline/sparkline.class.d.ts +17 -4
- package/dist/components/data/sparkline/sparkline.class.js +3 -3
- package/dist/components/data/sparkline/sparkline.styles.js +1 -1
- package/dist/components/data/table/table.class.d.ts +14 -10
- package/dist/components/data/table/table.class.js +17 -16
- package/dist/components/data/timeline/timeline.class.d.ts +5 -2
- package/dist/components/data/timeline/timeline.class.js +1 -1
- package/dist/components/data/tree/tree-item.class.js +1 -1
- package/dist/components/data/tree/tree-owner-controller.js +1 -1
- package/dist/components/data/tree/tree.class.d.ts +28 -6
- package/dist/components/data/tree/tree.class.js +3 -3
- package/dist/components/data/tree/tree.d.ts +1 -0
- package/dist/components/data/tree/tree.js +1 -1
- package/dist/components/data/word-cloud/word-cloud.class.d.ts +17 -7
- package/dist/components/data/word-cloud/word-cloud.class.js +6 -4
- package/dist/components/data/word-cloud/word-cloud.styles.js +1 -1
- package/dist/components/forms/catalog-picker-base.d.ts +1 -1
- package/dist/components/forms/catalog-picker-base.js +6 -6
- package/dist/components/forms/catalog-picker-base.styles.js +1 -1
- package/dist/components/forms/combobox/combobox.class.d.ts +7 -3
- package/dist/components/forms/combobox/combobox.class.js +1 -1
- package/dist/components/forms/combobox/option.class.d.ts +4 -2
- package/dist/components/forms/combobox/option.class.js +2 -2
- package/dist/components/forms/country-picker/country-picker.class.d.ts +3 -1
- package/dist/components/forms/country-picker/country-picker.class.js +1 -1
- package/dist/components/forms/currency-picker/currency-picker.class.d.ts +2 -0
- package/dist/components/forms/currency-picker/currency-picker.class.js +1 -1
- package/dist/components/forms/currency-picker/currency-presentation.js +1 -1
- package/dist/components/forms/emoji-picker/emoji-picker.class.d.ts +6 -2
- package/dist/components/forms/emoji-picker/emoji-picker.class.js +3 -2
- package/dist/components/forms/emoji-picker/emoji-picker.styles.js +1 -1
- package/dist/components/forms/locale-picker/locale-picker.class.d.ts +8 -2
- package/dist/components/forms/locale-picker/locale-picker.class.js +5 -4
- package/dist/components/forms/locale-picker/locale-picker.styles.js +1 -1
- package/dist/components/forms/select/select.class.d.ts +11 -3
- package/dist/components/forms/select/select.class.js +4 -4
- package/dist/components/forms/time-zone-picker/time-zone-picker.class.d.ts +2 -0
- package/dist/components/forms/time-zone-picker/time-zone-picker.class.js +1 -1
- package/dist/components/forms/token-input/token-input.class.d.ts +6 -1
- package/dist/components/forms/token-input/token-input.class.js +15 -13
- package/dist/components/forms/unit-picker/unit-picker.class.d.ts +2 -0
- package/dist/components/forms/unit-picker/unit-picker.class.js +1 -1
- package/dist/components/layout/app-rail/app-rail.class.d.ts +1 -1
- package/dist/components/layout/app-rail/app-rail.class.js +1 -1
- package/dist/components/layout/command-palette/command-palette.class.d.ts +5 -2
- package/dist/components/layout/command-palette/command-palette.class.js +2 -1
- package/dist/components/layout/command-palette/command-palette.styles.js +1 -1
- package/dist/components/layout/menu/menu-item.class.d.ts +2 -2
- package/dist/components/layout/menu/menu-item.class.js +2 -2
- package/dist/components/layout/menu/menu.class.d.ts +1 -1
- package/dist/components/layout/menu/menu.class.js +1 -1
- package/dist/components/layout/menubar/menubar.class.d.ts +1 -1
- package/dist/components/layout/menubar/menubar.class.js +1 -1
- package/dist/components/layout/reorder-list/reorder-item.class.d.ts +2 -2
- package/dist/components/layout/reorder-list/reorder-item.class.js +2 -2
- package/dist/components/layout/reorder-list/reorder-list.class.d.ts +1 -1
- package/dist/components/layout/reorder-list/reorder-list.class.js +1 -1
- package/dist/components/layout/virtual-list/virtual-list.class.d.ts +13 -9
- package/dist/components/layout/virtual-list/virtual-list.class.js +21 -17
- package/dist/components/media/av-player/av-cue-index.js +1 -0
- package/dist/components/media/av-player/av-cue-source.d.ts +13 -0
- package/dist/components/media/av-player/av-cue-source.js +1 -0
- package/dist/components/media/av-player/av-metadata.d.ts +2 -2
- package/dist/components/media/av-player/av-metadata.js +1 -1
- package/dist/components/media/av-player/av-player-cue-source-controller.js +1 -0
- package/dist/components/media/av-player/av-player.class.d.ts +34 -12
- package/dist/components/media/av-player/av-player.class.js +15 -10
- package/dist/components/media/flag/flag.class.js +1 -1
- package/dist/components/media/flag/language-map.js +1 -1
- package/dist/components/media/lightbox/lightbox-source.js +1 -0
- package/dist/components/media/lightbox/lightbox-types.d.ts +15 -0
- package/dist/components/media/lightbox/lightbox.class.d.ts +22 -21
- package/dist/components/media/lightbox/lightbox.class.js +6 -4
- package/dist/components/media/lightbox/lightbox.styles.js +1 -1
- package/dist/components/media/map/map-geojson-diff.d.ts +6 -6
- package/dist/components/media/map/map-geojson-diff.js +1 -1
- package/dist/components/media/map/map-loader.d.ts +5 -1
- package/dist/components/media/map/map.class.d.ts +24 -6
- package/dist/components/media/map/map.class.js +2 -2
- package/dist/components/media/map/map.styles.js +1 -1
- package/dist/components/media/video-playlist/video-playlist.class.d.ts +2 -1
- package/dist/components/media/video-playlist/video-playlist.class.js +1 -1
- package/dist/components/overlays/chip/chip.class.d.ts +1 -1
- package/dist/components/overlays/chip/chip.class.js +1 -1
- package/dist/components/retrieval/embedding-explorer/embedding-explorer.class.d.ts +30 -8
- package/dist/components/retrieval/embedding-explorer/embedding-explorer.class.js +22 -8
- package/dist/components/retrieval/embedding-explorer/embedding-explorer.styles.js +1 -1
- package/dist/components/retrieval/graph/graph-canvas.js +1 -1
- package/dist/components/retrieval/graph/graph-source-composition.js +1 -0
- package/dist/components/retrieval/graph/graph-source-controller.js +1 -0
- package/dist/components/retrieval/graph/graph-spatial-controller.js +2 -2
- package/dist/components/retrieval/graph/graph-spatial-model.js +1 -0
- package/dist/components/retrieval/graph/graph-spatial.js +1 -1
- package/dist/components/retrieval/graph/graph.class.d.ts +31 -6
- package/dist/components/retrieval/graph/graph.class.js +26 -5
- package/dist/components/retrieval/graph/graph.d.ts +1 -1
- package/dist/components/retrieval/graph/graph.js +1 -1
- package/dist/components/retrieval/graph/graph.styles.js +1 -1
- package/dist/components/retrieval/ingestion-queue/ingestion-queue.class.d.ts +33 -4
- package/dist/components/retrieval/ingestion-queue/ingestion-queue.class.js +27 -17
- package/dist/components/retrieval/ingestion-queue/ingestion-queue.d.ts +1 -1
- package/dist/components/retrieval/ingestion-queue/ingestion-queue.js +1 -1
- package/dist/components/retrieval/ingestion-queue/ingestion-queue.styles.js +1 -1
- package/dist/components/retrieval/knowledge-base/knowledge-base.class.d.ts +27 -4
- package/dist/components/retrieval/knowledge-base/knowledge-base.class.js +29 -14
- package/dist/components/retrieval/knowledge-base/knowledge-base.styles.js +1 -1
- package/dist/components/retrieval/knowledge-base-admin/knowledge-base-admin.class.d.ts +17 -3
- package/dist/components/retrieval/knowledge-base-admin/knowledge-base-admin.class.js +15 -10
- package/dist/components/retrieval/knowledge-base-admin/knowledge-base-admin.styles.js +1 -1
- package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.class.d.ts +24 -5
- package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.class.js +17 -10
- package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.d.ts +1 -1
- package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.js +1 -1
- package/dist/components/retrieval/knowledge-graph-explorer/knowledge-graph-explorer.styles.js +1 -1
- package/dist/components/retrieval/mind-map/mind-map-layout.js +1 -1
- package/dist/components/retrieval/mind-map/mind-map-model.js +1 -0
- package/dist/components/retrieval/mind-map/mind-map.class.d.ts +27 -4
- package/dist/components/retrieval/mind-map/mind-map.class.js +11 -7
- package/dist/components/retrieval/mind-map/mind-map.d.ts +1 -0
- package/dist/components/retrieval/mind-map/mind-map.js +1 -1
- package/dist/components/retrieval/mind-map/mind-map.styles.js +1 -1
- package/dist/components/retrieval/neighbor-list/neighbor-list.class.d.ts +24 -2
- package/dist/components/retrieval/neighbor-list/neighbor-list.class.js +17 -3
- package/dist/components/retrieval/neighbor-list/neighbor-list.d.ts +1 -1
- package/dist/components/retrieval/neighbor-list/neighbor-list.js +1 -1
- package/dist/components/retrieval/neighbor-list/neighbor-list.styles.js +1 -1
- package/dist/components/retrieval/rag-eval-dashboard/rag-eval-dashboard.class.d.ts +8 -4
- package/dist/components/retrieval/rag-eval-dashboard/rag-eval-dashboard.class.js +11 -7
- package/dist/components/retrieval/rag-eval-dashboard/rag-eval-dashboard.styles.js +1 -1
- package/dist/components/retrieval/retrieval-compare/retrieval-compare.class.d.ts +12 -6
- package/dist/components/retrieval/retrieval-compare/retrieval-compare.class.js +30 -17
- package/dist/components/retrieval/retrieval-compare/retrieval-compare.styles.js +1 -1
- package/dist/components/retrieval/retrieval-results/retrieval-results-model.js +1 -0
- package/dist/components/retrieval/retrieval-results/retrieval-results.class.d.ts +46 -5
- package/dist/components/retrieval/retrieval-results/retrieval-results.class.js +31 -9
- package/dist/components/retrieval/retrieval-results/retrieval-results.d.ts +1 -1
- package/dist/components/retrieval/retrieval-results/retrieval-results.js +1 -1
- package/dist/components/retrieval/retrieval-results/retrieval-results.styles.js +1 -1
- package/dist/components/utility/diff-view/diff-view.class.d.ts +16 -8
- package/dist/components/utility/diff-view/diff-view.class.js +3 -2
- package/dist/components/utility/diff-view/diff-view.styles.js +1 -1
- package/dist/components/utility/json-viewer/json-viewer.class.d.ts +31 -3
- package/dist/components/utility/json-viewer/json-viewer.class.js +13 -4
- package/dist/components/utility/json-viewer/json-viewer.d.ts +1 -0
- package/dist/components/utility/json-viewer/json-viewer.js +1 -1
- package/dist/components/utility/json-viewer/json-viewer.styles.js +1 -1
- package/dist/components/utility/mention-popover/mention-popover.class.d.ts +6 -4
- package/dist/components/utility/mention-popover/mention-popover.class.js +6 -5
- package/dist/components/viewers/csv-viewer/csv-viewer.class.d.ts +34 -7
- package/dist/components/viewers/csv-viewer/csv-viewer.class.js +9 -7
- package/dist/components/viewers/dataset-viewer/dataset-viewer.class.d.ts +28 -4
- package/dist/components/viewers/dataset-viewer/dataset-viewer.class.js +12 -11
- package/dist/components/viewers/geojson-view/geojson-viewer.class.d.ts +3 -1
- package/dist/components/viewers/geojson-view/geojson-viewer.class.js +17 -16
- package/dist/components/viewers/geojson-view/geojson-viewer.d.ts +1 -1
- package/dist/components/viewers/geojson-view/geojson-viewer.js +1 -1
- package/dist/components/viewers/spreadsheet-viewer/spreadsheet-viewer.class.d.ts +31 -5
- package/dist/components/viewers/spreadsheet-viewer/spreadsheet-viewer.class.js +11 -8
- package/dist/components/viewers/table-viewer-shared.js +19 -3
- package/dist/components/viewers/viewer-search-limits.js +1 -1
- package/dist/components/viewers/xml-viewer/xml-viewer.class.d.ts +35 -3
- package/dist/components/viewers/xml-viewer/xml-viewer.class.js +20 -5
- package/dist/components/viewers/xml-viewer/xml-viewer.d.ts +1 -1
- package/dist/components/viewers/xml-viewer/xml-viewer.js +1 -1
- package/dist/components/viewers/xml-viewer/xml-viewer.styles.js +1 -1
- package/dist/countries.js +1 -1
- package/dist/data-sources.d.ts +34 -0
- package/dist/data-sources.js +1 -0
- package/dist/events.d.ts +51 -7
- package/dist/framework-types.d.ts +1 -1
- package/dist/internal/accessibility-visibility.d.ts +4 -2
- package/dist/internal/accessibility-visibility.js +1 -1
- package/dist/internal/accessible-text-controller.js +1 -1
- package/dist/internal/anchor-target.js +2 -2
- package/dist/internal/catalog-picker.d.ts +1 -7
- package/dist/internal/catalog-picker.js +1 -1
- package/dist/internal/collection-snapshot.js +1 -1
- package/dist/internal/default-strings/agent-tools.generated.js +1 -1
- package/dist/internal/default-strings/charts.generated.js +1 -1
- package/dist/internal/default-strings/conversation.generated.js +1 -1
- package/dist/internal/default-strings/data.generated.js +1 -1
- package/dist/internal/default-strings/forms.generated.js +1 -1
- package/dist/internal/default-strings/layout.generated.js +1 -1
- package/dist/internal/default-strings/media.generated.js +1 -1
- package/dist/internal/default-strings/retrieval.generated.js +1 -1
- package/dist/internal/default-strings/shared.generated.js +1 -1
- package/dist/internal/default-strings/utility.generated.js +1 -1
- package/dist/internal/delimited-data.js +1 -1
- package/dist/internal/fixed-containing-block.js +1 -1
- package/dist/internal/flow-scene-envelope.js +1 -0
- package/dist/internal/graph-scene-controller.js +1 -0
- package/dist/internal/hierarchy-source-controller.js +1 -0
- package/dist/internal/hierarchy-source-view.js +29 -0
- package/dist/internal/hierarchy-source-view.styles.js +1 -0
- package/dist/internal/inherited-attribute-hub.d.ts +6 -0
- package/dist/internal/inherited-attribute-hub.js +1 -1
- package/dist/internal/intl-cache.js +1 -1
- package/dist/internal/keyed-index.js +1 -0
- package/dist/internal/localization-types.d.ts +1 -1
- package/dist/internal/localization.js +2 -2
- package/dist/internal/lyra-element.d.ts +2 -2
- package/dist/internal/lyra-element.js +3 -2
- package/dist/internal/native-modal-context.js +1 -1
- package/dist/internal/option-selection.js +1 -1
- package/dist/internal/package-metadata.js +1 -1
- package/dist/internal/positioner.js +1 -1
- package/dist/internal/resource-loader.d.ts +2 -0
- package/dist/internal/resource-loader.js +1 -1
- package/dist/internal/scoped-definitions.generated.js +1 -1
- package/dist/internal/search-haystack.js +1 -0
- package/dist/internal/selection-catalog.d.ts +5 -0
- package/dist/internal/selection-catalog.js +1 -1
- package/dist/internal/shiki-language-sources.js +1 -0
- package/dist/internal/source-page-controller.js +1 -0
- package/dist/internal/source-page-scope.js +1 -0
- package/dist/internal/source-request-controller.js +1 -0
- package/dist/internal/source-window-controller.js +1 -0
- package/dist/internal/spatial-source-controller.js +1 -0
- package/dist/internal/text-quote.d.ts +2 -6
- package/dist/internal/text-quote.js +1 -1
- package/dist/internal/theme-watcher.js +1 -1
- package/dist/internal/virtual-list-composition.js +1 -0
- package/dist/lyra.d.ts +1 -1
- package/dist/lyra.js +1 -1
- package/dist/testing/interaction-drivers.js +1 -1
- package/dist/testing/lyra-tag-event-map.js +1 -1
- package/dist/units.js +1 -1
- package/dist/utilities/data-preparation.d.ts +56 -0
- package/dist/utilities/data-preparation.js +1 -0
- package/dist/utilities/data-spatial.d.ts +26 -0
- package/dist/utilities/data-spatial.js +1 -0
- package/dist/utilities/index.d.ts +1 -1
- package/dist/utilities/index.js +1 -1
- package/llms/components/lr-activity-feed.md +7 -2
- package/llms/components/lr-agent-trace.md +49 -9
- package/llms/components/lr-agent-workspace.md +15 -8
- package/llms/components/lr-av-player.md +180 -10
- package/llms/components/lr-bar-chart.md +1 -1
- package/llms/components/lr-box-plot.md +8 -0
- package/llms/components/lr-bubble-chart.md +1 -1
- package/llms/components/lr-calendar.md +26 -3
- package/llms/components/lr-chart.md +310 -23
- package/llms/components/lr-chat-viewport.md +6 -0
- package/llms/components/lr-code-block-core.md +12 -7
- package/llms/components/lr-code-block.md +23 -9
- package/llms/components/lr-combobox.md +27 -15
- package/llms/components/lr-command-palette.md +16 -3
- package/llms/components/lr-country-picker.md +23 -6
- package/llms/components/lr-csv-viewer.md +95 -12
- package/llms/components/lr-currency-picker.md +23 -3
- package/llms/components/lr-data-grid.md +24 -6
- package/llms/components/lr-dataset-viewer.md +92 -11
- package/llms/components/lr-dialog.md +1 -1
- package/llms/components/lr-diff-view.md +19 -6
- package/llms/components/lr-document-library.md +60 -5
- package/llms/components/lr-doughnut-chart.md +1 -1
- package/llms/components/lr-embedding-explorer.md +89 -9
- package/llms/components/lr-emoji-picker.md +7 -2
- package/llms/components/lr-eval-dataset.md +56 -7
- package/llms/components/lr-eval-result.md +89 -4
- package/llms/components/lr-export-button.md +1 -1
- package/llms/components/lr-file-tree.md +60 -6
- package/llms/components/lr-flag.md +5 -2
- package/llms/components/lr-flow-canvas.md +152 -14
- package/llms/components/lr-flow-minimap.md +32 -4
- package/llms/components/lr-funnel.md +14 -0
- package/llms/components/lr-geojson-viewer.md +27 -10
- package/llms/components/lr-graph.md +43 -7
- package/llms/components/lr-heatmap.md +161 -5
- package/llms/components/lr-histogram.md +55 -9
- package/llms/components/lr-ingestion-queue.md +54 -3
- package/llms/components/lr-json-viewer.md +87 -7
- package/llms/components/lr-knowledge-base-admin.md +60 -4
- package/llms/components/lr-knowledge-base.md +121 -9
- package/llms/components/lr-knowledge-graph-explorer.md +106 -11
- package/llms/components/lr-lightbox.md +42 -6
- package/llms/components/lr-line-chart.md +28 -5
- package/llms/components/lr-lite-chart.md +96 -31
- package/llms/components/lr-locale-picker.md +6 -4
- package/llms/components/lr-map.md +67 -8
- package/llms/components/lr-markdown-core.md +10 -5
- package/llms/components/lr-markdown.md +23 -6
- package/llms/components/lr-mention-popover.md +11 -6
- package/llms/components/lr-mind-map.md +91 -10
- package/llms/components/lr-model-select.md +8 -4
- package/llms/components/lr-model-settings-panel.md +10 -2
- package/llms/components/lr-navigation-menu.md +1 -1
- package/llms/components/lr-neighbor-list.md +69 -2
- package/llms/components/lr-pie-chart.md +1 -1
- package/llms/components/lr-polar-area-chart.md +1 -1
- package/llms/components/lr-prompt-input.md +9 -2
- package/llms/components/lr-prompt-queue.md +11 -3
- package/llms/components/lr-radar-chart.md +1 -1
- package/llms/components/lr-rag-eval-dashboard.md +9 -2
- package/llms/components/lr-realtime-session.md +6 -2
- package/llms/components/lr-reorder-list.md +4 -0
- package/llms/components/lr-retrieval-compare.md +9 -4
- package/llms/components/lr-retrieval-results.md +104 -6
- package/llms/components/lr-scatter-chart.md +1 -1
- package/llms/components/lr-select.md +20 -10
- package/llms/components/lr-sequence-strip.md +92 -2
- package/llms/components/lr-span-waterfall.md +78 -8
- package/llms/components/lr-sparkline.md +42 -11
- package/llms/components/lr-spreadsheet-viewer.md +109 -14
- package/llms/components/lr-streaming-text-core.md +4 -2
- package/llms/components/lr-streaming-text.md +5 -1
- package/llms/components/lr-table.md +96 -115
- package/llms/components/lr-task-list.md +93 -9
- package/llms/components/lr-terminal.md +9 -0
- package/llms/components/lr-test-results.md +77 -3
- package/llms/components/lr-thread-list.md +86 -1
- package/llms/components/lr-time-zone-picker.md +8 -3
- package/llms/components/lr-timeline.md +5 -0
- package/llms/components/lr-token-input.md +7 -2
- package/llms/components/lr-tool-timeline.md +13 -4
- package/llms/components/lr-trace-tree.md +96 -10
- package/llms/components/lr-transcript-feed.md +9 -2
- package/llms/components/lr-tree.md +87 -15
- package/llms/components/lr-unit-picker.md +8 -3
- package/llms/components/lr-video-playlist.md +2 -0
- package/llms/components/lr-virtual-list.md +17 -8
- package/llms/components/lr-voice-picker.md +8 -3
- package/llms/components/lr-word-cloud.md +128 -12
- package/llms/components/lr-xml-viewer.md +106 -9
- package/llms/index.md +1 -1
- package/llms/peers.md +1 -1
- package/llms/shared/events-and-types.md +725 -264
- package/llms/shared/forms-and-accessibility.md +3 -17
- package/llms/shared/imports-and-registration.md +3 -17
- package/llms/shared/localization-and-rtl.md +0 -2
- package/llms/shared/styles-and-tokens.md +27 -36
- package/llms/shared/testing-and-utilities.md +4 -5
- package/llms/shared.md +770 -349
- package/llms.txt +1 -2
- package/locales.json +139 -139
- package/package.json +13 -4
- package/registrations.json +1 -1
- package/skills/compose-lyra-interfaces/SKILL.md +6 -8
- package/skills/lyra-ui/SKILL.md +20 -51
- package/skills/lyra-ui/commands/review.md +16 -33
- package/skills/lyra-ui/commands/update.md +6 -5
- package/skills/lyra-ui/online-api.md +15 -0
- package/skills/lyra-ui/reporting.md +2 -1
package/dist/units.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getNumberFormat}from"./internal/intl-cache.js";import{snapshotSelectionCatalog}from"./internal/selection-catalog.js";const unitCodes=["acre","bit","byte","celsius","centimeter","day","degree","fahrenheit","fluid-ounce","foot","gallon","gigabit","gigabyte","gram","hectare","hour","inch","kilobit","kilobyte","kilogram","kilometer","liter","megabit","megabyte","meter","microsecond","mile","mile-scandinavian","milliliter","millimeter","millisecond","minute","month","nanosecond","ounce","percent","petabyte","pound","second","stone","terabit","terabyte","week","yard","year"],UNIT_CODES=Object.freeze(unitCodes),unitNames=new Map;function unitNamesFor(locale,code){const key=`${locale}\0${code}`;let names=unitNames.get(key);if(!names){let name=code,symbol=code;const part=unitDisplay=>getNumberFormat(locale,{style:"unit",unit:code,unitDisplay}).formatToParts(1).filter(entry=>entry.type==="unit").map(entry=>entry.value).join("")||code;try{name=part("long"),symbol=part("short")}catch{}unitNames.size>=1024&&unitNames.clear(),unitNames.set(key,names=[name,symbol])}return names}function resolveUnitNames(units,locale){const entries=snapshotSelectionCatalog(units,
|
|
1
|
+
import{getNumberFormat}from"./internal/intl-cache.js";import{snapshotSelectionCatalog,normalizeSelectionValue}from"./internal/selection-catalog.js";const unitCodes=["acre","bit","byte","celsius","centimeter","day","degree","fahrenheit","fluid-ounce","foot","gallon","gigabit","gigabyte","gram","hectare","hour","inch","kilobit","kilobyte","kilogram","kilometer","liter","megabit","megabyte","meter","microsecond","mile","mile-scandinavian","milliliter","millimeter","millisecond","minute","month","nanosecond","ounce","percent","petabyte","pound","second","stone","terabit","terabyte","week","yard","year"],UNIT_CODES=Object.freeze(unitCodes),unitNames=new Map;function unitNamesFor(locale,code){const key=`${locale}\0${code}`;let names=unitNames.get(key);if(!names){let name=code,symbol=code;const part=unitDisplay=>getNumberFormat(locale,{style:"unit",unit:code,unitDisplay},!1).formatToParts(1).filter(entry=>entry.type==="unit").map(entry=>entry.value).join("")||code;try{name=part("long"),symbol=part("short")}catch{}unitNames.size>=1024&&unitNames.clear(),unitNames.set(key,names=[name,symbol])}return names}function resolveUnitNames(units,locale){const entries=snapshotSelectionCatalog(units,normalizeSelectionValue)??[];return Object.freeze(entries.map(entry=>{const[name,symbol]=unitNamesFor(locale,entry.code),label=entry.label??name;return Object.freeze({...entry,label,symbol:entry.symbol??symbol,searchText:[entry.code,name,label,symbol,entry.symbol??""].join(" ")})}))}export{UNIT_CODES,resolveUnitNames};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type{LyraSourceRevision}from'../data-sources.js';export type LyraSourceValue<T> =T|PromiseLike<T>;export interface LyraSourceRequest{readonly signal:AbortSignal;}
|
|
2
|
+
/**
|
|
3
|
+
* Immutable, replayable source positions. Count is a safe nonnegative integer. Each read returns
|
|
4
|
+
* an array of exactly the requested size (at most 8,192); holes remain invalid positions, and
|
|
5
|
+
* non-array/short/long responses reject. Revision and payload must stay unchanged while reading.
|
|
6
|
+
* Source-owned storage is never copied wholesale. Observed count/revision changes reject.
|
|
7
|
+
*/
|
|
8
|
+
export interface LyraIndexedInput<T>{readonly revision:LyraSourceRevision;readonly count:number;read(start:number,count:number,request:LyraSourceRequest):LyraSourceValue<readonly T[]>;}
|
|
9
|
+
/**
|
|
10
|
+
* Preparation inspects all positions in chunks, default 2,048, clamped to 1–8,192. Chunk sizes
|
|
11
|
+
* must be positive safe integers. Tasks yield between chunks and abort before/after each await
|
|
12
|
+
* and before publication. Reader/selector exceptions reject; results are deeply immutable.
|
|
13
|
+
*/
|
|
14
|
+
export interface LyraPreparationOptions{readonly signal?:AbortSignal;readonly batchSize?:number;}export interface LyraObservationCounts{readonly sourceCount:number;readonly validCount:number;readonly invalidCount:number;}export interface LyraNumericDomain{readonly min:number;readonly max:number;}export interface LyraSeriesObservation{readonly x:number;readonly y:number|null;}export interface LyraSeriesSample extends LyraSeriesObservation{readonly sourceIndex:number;readonly breakBefore:boolean;}export interface LyraPreparedSeries{readonly id:string;readonly label:string;readonly counts:LyraObservationCounts;readonly xDomain:LyraNumericDomain|null;readonly yDomain:LyraNumericDomain|null;readonly samples:readonly LyraSeriesSample[];}export interface LyraSeriesRangeRequest extends LyraSourceRequest{readonly seriesId:string;readonly startIndex:number;readonly endIndex:number;readonly maxPoints:number;}export interface LyraSeriesPointRef{readonly seriesId:string;readonly sourceIndex:number;}export interface LyraPreparedSeriesData{readonly kind:'series';readonly revision:LyraSourceRevision;readonly series:readonly LyraPreparedSeries[];getPoint(ref:LyraSeriesPointRef,request:LyraSourceRequest):LyraSourceValue<LyraSeriesObservation|null>;queryRange?(request:LyraSeriesRangeRequest):LyraSourceValue<readonly LyraSeriesSample[]>;}export interface LyraPreparedCategoryData{readonly kind:'categories';readonly revision:LyraSourceRevision;readonly counts:LyraObservationCounts;readonly categories:readonly{readonly id:string;readonly label:string;}[];readonly categoryCounts:readonly number[];readonly series:readonly{readonly id:string;readonly label:string;readonly values:readonly number[];}[];readonly aggregation:'count'|'sum'|'mean'|'host-defined';}export interface LyraHistogramDistribution{readonly revision:LyraSourceRevision;readonly counts:LyraObservationCounts;readonly domain:LyraNumericDomain|null;readonly edges:readonly number[];readonly binCounts:readonly number[];readonly belowCount:number;readonly aboveCount:number;}export interface LyraWeightedWord{readonly id:string;readonly text:string;readonly weight:number;}export interface LyraPreparedWordCloud{readonly revision:LyraSourceRevision;readonly counts:LyraObservationCounts;readonly totalWeight:number;readonly retainedWeight:number;readonly words:readonly LyraWeightedWord[];}export interface LyraPreparedWaveform{readonly revision:LyraSourceRevision;readonly counts:LyraObservationCounts;readonly sampleCount:number;readonly duration:number;readonly buckets:readonly{readonly startIndex:number;readonly endIndex:number;readonly maxAmplitude:number;}[];readonly firstAmplitude:number|null;readonly lastAmplitude:number|null;}
|
|
15
|
+
/**
|
|
16
|
+
* Prepares an extrema-preserving overview, not an exact reconstruction. All observations are
|
|
17
|
+
* inspected in bounded, yielding chunks. Invalid positions remain gaps; x is never renumbered.
|
|
18
|
+
* Budgets default to 500 points per series, require at least 4, and clamp to 1,000. Requested
|
|
19
|
+
* aggregate capacity must fit 9,000 samples (45,000 snapshot nodes at five nodes per sample).
|
|
20
|
+
* IDs are nonblank and at most 256 code units; labels at most 1,024, with 65,536 combined units.
|
|
21
|
+
* Inputs must share one immutable revision. The returned handle intentionally retains their
|
|
22
|
+
* readers/backing storage for exact one-position getPoint reads; it does not implement queryRange.
|
|
23
|
+
*/
|
|
24
|
+
export declare function prepareLyraSeriesData(series:readonly{readonly id:string;readonly label:string;readonly input:LyraIndexedInput<LyraSeriesObservation>;}[],options?:LyraPreparationOptions&{readonly maxPointsPerSeries?:number;}):Promise<LyraPreparedSeriesData>;
|
|
25
|
+
/**
|
|
26
|
+
* Reduces every source position into at most 1,000 declared categories and one result series.
|
|
27
|
+
* Unknown/null categories and nonfinite sum/mean values are invalid, unless an unknown ID maps
|
|
28
|
+
* to the declared Other category. Empty categories have value zero. Means use sums/counts;
|
|
29
|
+
* overflowing finite sums reject. IDs/labels use the same bounds as series preparation.
|
|
30
|
+
* Sum/mean require an own numeric valueOf callback; count ignores valueOf entirely.
|
|
31
|
+
* Selectors must be synchronous scalar functions; their arbitrary computation cost is caller-owned.
|
|
32
|
+
*/
|
|
33
|
+
export declare function prepareLyraCategoryData<T>(input:LyraIndexedInput<T>,options:LyraPreparationOptions&{readonly categories:readonly{readonly id:string;readonly label:string;}[];readonly seriesId:string;readonly seriesLabel:string;readonly categoryOf:(value:T,sourceIndex:number)=>string|null;readonly otherCategoryId?:string;}&({readonly aggregation:'count';readonly valueOf?:(value:T,sourceIndex:number)=>unknown;}|{readonly aggregation:'sum'|'mean';readonly valueOf:(value:T,sourceIndex:number)=>number|null;})):Promise<LyraPreparedCategoryData>;
|
|
34
|
+
/**
|
|
35
|
+
* Builds an exact full-source distribution: half-open bins, with an inclusive last upper edge.
|
|
36
|
+
* Explicit finite increasing edges use one pass; automatic bins use two replayable passes of
|
|
37
|
+
* one immutable revision. Bin counts clamp to 1,000. Unrepresentable distinct edges reject.
|
|
38
|
+
* Constant domains get a finite nonzero display interval; the observed domain stays unchanged.
|
|
39
|
+
*/
|
|
40
|
+
export declare function prepareLyraHistogram(input:LyraIndexedInput<number>,options:LyraPreparationOptions&({readonly edges:readonly number[];}|{readonly binCount:number;})):Promise<LyraHistogramDistribution>;
|
|
41
|
+
/**
|
|
42
|
+
* Selects exact global top-K (default/max 150) from an already aggregated unique-ID word catalog.
|
|
43
|
+
* Stable ties favor earlier positions. Global ID uniqueness is the caller's contract; only
|
|
44
|
+
* duplicates among retained candidates can be detected with bounded memory. Blank or >256-unit
|
|
45
|
+
* text, invalid IDs (>256 units/blank), and negative/nonfinite weights are invalid observations.
|
|
46
|
+
* Valid total weight includes omitted words. If chosen labels exceed 16,384 code units the call
|
|
47
|
+
* rejects; lower maxWords rather than silently clipping labels or dropping selected words.
|
|
48
|
+
*/
|
|
49
|
+
export declare function prepareLyraWordCloud(input:LyraIndexedInput<LyraWeightedWord>,options?:LyraPreparationOptions&{readonly maxWords?:number;}):Promise<LyraPreparedWordCloud>;
|
|
50
|
+
/**
|
|
51
|
+
* Summarizes the complete duration with positional interval maxima, default/max 65,536 buckets.
|
|
52
|
+
* Finite samples clamp to [0,1]; invalid samples contribute no peak but retain their positions.
|
|
53
|
+
* Endpoint amplitudes refer to the original first/last positions (null when invalid/absent).
|
|
54
|
+
* Source storage remains caller-owned; only bounded chunks and output buckets are retained.
|
|
55
|
+
*/
|
|
56
|
+
export declare function prepareLyraWaveform(input:LyraIndexedInput<number>,options:LyraPreparationOptions&{readonly duration:number;readonly maxBuckets?:number;}):Promise<LyraPreparedWaveform>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{sourceCount,sourceRevision}from"../internal/source-request-controller.js";function budget(value,fallback,minimum,maximum){if(value===void 0)return fallback;if(typeof value!="number"||!Number.isSafeInteger(value)||value<minimum)throw new RangeError("Invalid preparation budget");return Math.min(value,maximum)}function preparation(options={}){const signal=options.signal??new AbortController().signal;return signal.throwIfAborted(),{signal,batchSize:budget(options.batchSize,2048,1,8192)}}function snapshot(input){const revision=sourceRevision(input.revision),count=sourceCount(input.count),read2=input.read;if(typeof read2!="function")throw new TypeError("Invalid source reader");return{input,revision,count,read:read2}}function current(source,signal){if(signal.throwIfAborted(),source.input.revision!==source.revision||source.input.count!==source.count)throw new Error("Source snapshot revision or count changed")}function abortable(value,signal){return new Promise((resolve,reject)=>{const aborted=()=>{signal.removeEventListener("abort",aborted),reject(signal.reason)};signal.addEventListener("abort",aborted,{once:!0}),Promise.resolve(value).then(result=>{signal.removeEventListener("abort",aborted),signal.aborted?reject(signal.reason):resolve(result)},error=>{signal.removeEventListener("abort",aborted),reject(error)}),signal.aborted&&aborted()})}async function read(source,start,count,signal){current(source,signal);const values=await abortable(source.read.call(source.input,start,count,{signal}),signal);if(current(source,signal),!Array.isArray(values)||values.length!==count)throw new TypeError("Invalid source range response");return values}async function scan(source,state,visit){current(source,state.signal);for(let start=0;start<source.count;){const size=Math.min(state.batchSize,source.count-start),values=await read(source,start,size,state.signal);for(let offset=0;offset<size;offset++){state.signal.throwIfAborted();const present=Object.hasOwn(values,offset);visit(present?values[offset]:void 0,start+offset,present)}start+=size,current(source,state.signal),start<source.count&&(await abortable(new Promise(resolve=>setTimeout(resolve,0)),state.signal),current(source,state.signal))}current(source,state.signal)}function finite(value){return typeof value=="number"&&Number.isFinite(value)}function sum(a,b){const value=a+b;if(!Number.isFinite(value))throw new RangeError("Numeric accumulation overflow");return value}function counts(sourceCount2,validCount){return Object.freeze({sourceCount:sourceCount2,validCount,invalidCount:sourceCount2-validCount})}function domain(min,max){return min===1/0?null:Object.freeze({min,max})}function metadata(id,label){if(typeof id!="string"||id.length>256||!id.trim())throw new TypeError("Invalid metadata ID");if(typeof label!="string"||label.length>1024)throw new TypeError("Invalid metadata label");return Object.freeze({id,label})}function metadataBudget(entries){let units=0;for(const entry of entries)units+=entry.id.length+entry.label.length;if(units>65536)throw new RangeError("Metadata label budget exceeded")}function boundary(count,partitions,index){return Math.floor(count/partitions)*index+Math.min(index,count%partitions)}function observation(value){if(!value||typeof value!="object")return null;const x=value.x,y=value.y;return finite(x)&&finite(y)?{x,y}:null}async function prepareLyraSeriesData(series,options={}){const state=preparation(options),capacity=budget(options.maxPointsPerSeries,500,4,1e3);if(!Array.isArray(series)||!series.length)throw new RangeError("At least one series is required");if(series.length>Math.floor(9e3/capacity))throw new RangeError("Series snapshot capacity budget exceeded");const sources=new Map,entries=series.map(entry=>{const meta=metadata(entry.id,entry.label);if(sources.has(meta.id))throw new TypeError("Duplicate series ID");return sources.set(meta.id,snapshot(entry.input)),meta});metadataBudget(entries);const revision=sources.get(entries[0].id).revision;for(const source of sources.values())if(source.revision!==revision)throw new Error("Series revision mismatch");const prepared=[];for(const entry of entries){const source=sources.get(entry.id);let valid=0,gaps=0,xMin=1/0,xMax=-1/0,yMin=1/0,yMax=-1/0,first,last,low,high;const candidates=[],exact=source.count<=capacity,partitions=Math.floor((capacity-2)/2);let partition=0;const flush=()=>{low&&candidates.push(low),high&&high!==low&&candidates.push(high),low=high=void 0};await scan(source,state,(value,sourceIndex)=>{!exact&&sourceIndex>=boundary(source.count,partitions,partition+1)&&(flush(),partition++);const point=observation(value);if(!point){gaps++;return}valid++,xMin=Math.min(xMin,point.x),xMax=Math.max(xMax,point.x),yMin=Math.min(yMin,point.y),yMax=Math.max(yMax,point.y);const candidate={...point,sourceIndex,gaps};first??=candidate,last=candidate,exact?candidates.push(candidate):((!low||point.y<low.y)&&(low=candidate),(!high||point.y>high.y)&&(high=candidate))}),exact||(flush(),first&&candidates.push(first),last&&last!==first&&candidates.push(last)),candidates.sort((a,b)=>a.sourceIndex-b.sourceIndex);const samples=[];let previous;for(const point of candidates)point.sourceIndex!==previous?.sourceIndex&&(samples.push(Object.freeze({x:point.x,y:point.y,sourceIndex:point.sourceIndex,breakBefore:!previous||point.gaps!==previous.gaps})),previous=point);prepared.push(Object.freeze({...entry,counts:counts(source.count,valid),xDomain:domain(xMin,xMax),yDomain:domain(yMin,yMax),samples:Object.freeze(samples)}))}for(const source of sources.values())current(source,state.signal);return Object.freeze({kind:"series",revision,series:Object.freeze(prepared),async getPoint(ref,request){const source=sources.get(ref.seriesId);if(!source)throw new RangeError("Unknown series ID");if(!Number.isSafeInteger(ref.sourceIndex)||ref.sourceIndex<0||ref.sourceIndex>=source.count)throw new RangeError("Source index out of range");const values=await read(source,ref.sourceIndex,1,request.signal),point=Object.hasOwn(values,0)?observation(values[0]):null;return current(source,request.signal),point?Object.freeze(point):null}})}async function prepareLyraCategoryData(input,options){const state=preparation(options),source=snapshot(input),aggregation=options.aggregation,categoryOf=options.categoryOf,valueOf=aggregation==="count"?void 0:options.valueOf;if(!["count","sum","mean"].includes(aggregation)||typeof categoryOf!="function"||aggregation!=="count"&&(!Object.hasOwn(options,"valueOf")||typeof valueOf!="function"||Object.is(valueOf,Object.prototype.valueOf)))throw new TypeError("Invalid category reducer");if(!Array.isArray(options.categories)||options.categories.length>1e3)throw new RangeError("Category budget exceeded");const categories=options.categories.map(entry=>metadata(entry.id,entry.label)),meta=metadata(options.seriesId,options.seriesLabel);metadataBudget([...categories,meta]);const positions=new Map;categories.forEach((entry,index)=>{if(positions.has(entry.id))throw new TypeError("Duplicate category ID");positions.set(entry.id,index)});const other=options.otherCategoryId===void 0?void 0:positions.get(options.otherCategoryId);if(options.otherCategoryId!==void 0&&other===void 0)throw new TypeError("Unknown Other category ID");const totals=new Array(categories.length).fill(0),categoryCounts=new Array(categories.length).fill(0);let valid=0;if(await scan(source,state,(value,index,present)=>{if(!present)return;const id=categoryOf(value,index);if(typeof id!="string"||!id||id.length>256)return;const position=positions.get(id)??other;if(position===void 0)return;const amount=aggregation==="count"?1:valueOf(value,index);finite(amount)&&(totals[position]=sum(totals[position],amount),categoryCounts[position]=categoryCounts[position]+1,valid++)}),aggregation==="mean")for(let index=0;index<totals.length;index++)categoryCounts[index]&&(totals[index]=totals[index]/categoryCounts[index]);return current(source,state.signal),Object.freeze({kind:"categories",revision:source.revision,counts:counts(source.count,valid),categories:Object.freeze(categories),categoryCounts:Object.freeze(categoryCounts),series:Object.freeze([Object.freeze({...meta,values:Object.freeze(totals)})]),aggregation})}function checkedEdges(edges){if(!Array.isArray(edges)||edges.length<2||edges.length>1001)throw new RangeError("Invalid histogram edge budget");const result=[];for(const edge of edges){if(!finite(edge)||result.length&&edge<=result[result.length-1])throw new RangeError("Histogram edges must be finite and strictly increasing");result.push(edge)}return result}function automaticEdges(min,max,bins){if(min===1/0)return[];let low=min,high=max;if(low===high){const padding=Math.max(.5,Math.abs(low)*.01);Number.isFinite(low-padding)&&(low-=padding),Number.isFinite(high+padding)&&(high+=padding)}const edges=[low],width=high-low;for(let index=1;index<bins;index++){const fraction=index/bins;edges.push(Number.isFinite(width)?low+width*fraction:low*(1-fraction)+high*fraction)}return edges.push(high),checkedEdges(edges)}async function prepareLyraHistogram(input,options){const state=preparation(options),source=snapshot(input);let min=1/0,max=-1/0,valid=0;const explicit="edges"in options;let edges;if(explicit)edges=checkedEdges(options.edges);else{const bins=budget(options.binCount,10,1,1e3);await scan(source,state,value=>{finite(value)&&(min=Math.min(min,value),max=Math.max(max,value))}),edges=automaticEdges(min,max,bins)}const binCounts=new Array(Math.max(0,edges.length-1)).fill(0);let belowCount=0,aboveCount=0;return await scan(source,state,value=>{if(!finite(value))return;if(valid++,explicit&&(min=Math.min(min,value),max=Math.max(max,value)),!edges.length)throw new Error("Source snapshot values changed between passes");if(value<edges[0]){belowCount++;return}if(value>edges[edges.length-1]){aboveCount++;return}let low=0,high=edges.length-1;for(;low+1<high;){const middle=Math.floor((low+high)/2);value<edges[middle]?high=middle:low=middle}const position=Math.min(low,binCounts.length-1);binCounts[position]=binCounts[position]+1}),current(source,state.signal),Object.freeze({revision:source.revision,counts:counts(source.count,valid),domain:domain(min,max),edges:Object.freeze(edges),binCounts:Object.freeze(binCounts),belowCount,aboveCount})}function worse(a,b){return a.word.weight<b.word.weight||a.word.weight===b.word.weight&&a.index>b.index}async function prepareLyraWordCloud(input,options={}){const state=preparation(options),source=snapshot(input),capacity=budget(options.maxWords,150,1,150),heap=[],ids=new Set;let valid=0,totalWeight=0;await scan(source,state,(value,index)=>{if(!value||typeof value!="object")return;const{id,text,weight}=value;if(typeof id!="string"||id.length>256||!id.trim()||typeof text!="string"||text.length>256||!text.trim()||!finite(weight)||weight<0)return;if(valid++,totalWeight=sum(totalWeight,weight),ids.has(id))throw new TypeError("Duplicate retained word ID");const candidate={word:Object.freeze({id,text,weight}),index};if(heap.length<capacity){ids.add(id),heap.push(candidate);let position=heap.length-1;for(;position>0;){const parent=Math.floor((position-1)/2);if(!worse(heap[position],heap[parent]))break;[heap[position],heap[parent]]=[heap[parent],heap[position]],position=parent}}else if(worse(heap[0],candidate)){ids.delete(heap[0].word.id),ids.add(id),heap[0]=candidate;let position=0;for(;;){const left=2*position+1,right=left+1;if(left>=heap.length)break;const child=right<heap.length&&worse(heap[right],heap[left])?right:left;if(!worse(heap[child],heap[position]))break;[heap[position],heap[child]]=[heap[child],heap[position]],position=child}}}),heap.sort((a,b)=>b.word.weight-a.word.weight||a.index-b.index);let retainedWeight=0,textUnits=0;const words=heap.map(({word})=>(retainedWeight=sum(retainedWeight,word.weight),textUnits+=word.text.length,word));if(textUnits>16384)throw new RangeError("Selected word label budget exceeded");return current(source,state.signal),Object.freeze({revision:source.revision,counts:counts(source.count,valid),totalWeight,retainedWeight,words:Object.freeze(words)})}async function prepareLyraWaveform(input,options){const state=preparation(options),source=snapshot(input),duration=options.duration;if(!finite(duration)||duration<0)throw new RangeError("Invalid waveform duration");const size=Math.min(source.count,budget(options.maxBuckets,65536,1,65536)),buckets=Array.from({length:size},(_,index)=>({startIndex:boundary(source.count,size,index),endIndex:boundary(source.count,size,index+1),maxAmplitude:0}));let position=0,valid=0,firstAmplitude=null,lastAmplitude=null;return await scan(source,state,(value,index)=>{index>=buckets[position].endIndex&&position++;const amplitude=finite(value)?Math.min(1,Math.max(0,value)):null;amplitude!==null&&(valid++,buckets[position].maxAmplitude=Math.max(buckets[position].maxAmplitude,amplitude)),index===0&&(firstAmplitude=amplitude),index===source.count-1&&(lastAmplitude=amplitude)}),current(source,state.signal),Object.freeze({revision:source.revision,counts:counts(source.count,valid),sampleCount:source.count,duration,buckets:Object.freeze(buckets.map(bucket=>Object.freeze(bucket))),firstAmplitude,lastAmplitude})}export{prepareLyraCategoryData,prepareLyraHistogram,prepareLyraSeriesData,prepareLyraWaveform,prepareLyraWordCloud};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type{LyraSourceRevision}from'../data-sources.js';import type{LyraNumericDomain,LyraSourceRequest,LyraSourceValue}from'./data-preparation.js';
|
|
2
|
+
/** Finite full-source or viewport coordinates; an equal pair denotes a collapsed global axis. */
|
|
3
|
+
export interface LyraSpatialBounds{readonly minX:number;readonly maxX:number;readonly minY:number;readonly maxY:number;}
|
|
4
|
+
/** Stable identity in a source revision, independent of representative-array position. */
|
|
5
|
+
export interface LyraSpatialPoint{readonly id:string;readonly sourceIndex:number;readonly x:number;readonly y:number;}
|
|
6
|
+
/** A positive-count density region. Adjacent regions may share boundaries, never interiors. */
|
|
7
|
+
export interface LyraSpatialBin{readonly bounds:LyraSpatialBounds;readonly count:number;}
|
|
8
|
+
/** Bins account for every match; representative points are overlays, not additional counts. */
|
|
9
|
+
export interface LyraSpatialQuery<T extends LyraSpatialPoint>{readonly points:readonly T[];readonly bins:readonly LyraSpatialBin[];readonly matchedCount:number;}
|
|
10
|
+
/**
|
|
11
|
+
* Host-owned spatial index with globally unique IDs. Query returns bounded complete density
|
|
12
|
+
* bins and optional representative overlays; getPoint resolves an exact original ID. Source
|
|
13
|
+
* metadata/payload stay immutable within a revision. Replacement or explicit refresh rebinds it.
|
|
14
|
+
* Methods and payload fields must be own data properties, not accessors. Storage stays host-owned.
|
|
15
|
+
*/
|
|
16
|
+
export interface LyraSpatialPointSource<T extends LyraSpatialPoint>{readonly revision:LyraSourceRevision;readonly count:number;readonly bounds:LyraSpatialBounds|null;query(request:LyraSourceRequest&{readonly bounds:LyraSpatialBounds;readonly maxPoints:number;readonly maxBins:number;}):LyraSourceValue<LyraSpatialQuery<T>>;getPoint(id:string,request:LyraSourceRequest):LyraSourceValue<T|null>;}
|
|
17
|
+
/** Immutable activation of a density region, not an individual observation. */
|
|
18
|
+
export interface LyraSpatialBinSelectDetail{readonly revision:LyraSourceRevision;readonly bounds:LyraSpatialBounds;readonly count:number;}
|
|
19
|
+
/** Declared full-source series metadata, independent of the current representatives. */
|
|
20
|
+
export interface LyraSpatialChartSeries{readonly id:string;readonly label:string;readonly color?:string;}
|
|
21
|
+
/** Original chart observation; radius is semantic data, not a renderer-clamped value. */
|
|
22
|
+
export interface LyraSpatialChartPoint extends LyraSpatialPoint{readonly seriesId:string;readonly radius?:number;readonly label?:string;}
|
|
23
|
+
/** Bounded spatial chart source with exact full-source series and radius metadata. */
|
|
24
|
+
export interface LyraSpatialChartSource extends LyraSpatialPointSource<LyraSpatialChartPoint>{readonly kind:'spatial';readonly series:readonly LyraSpatialChartSeries[];readonly radiusDomain?:LyraNumericDomain|null;}
|
|
25
|
+
/** Activation preserves the original observation identity and scalar chart metadata. */
|
|
26
|
+
export interface LyraChartSpatialPointSelectDetail{readonly revision:LyraSourceRevision;readonly point:LyraSpatialChartPoint;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{LyraElement}from'./lyra-element.js';export{installDeprecatedAliases}from'./deprecated-aliases.js';export type{LyraAliasMapping,LyraDeprecatedAliases}from'./deprecated-aliases.js';export type{LyraEmitArgs,LyraEmittedEvent,LyraEmitOptions,LyraEventMap,}from'./lyra-element.js';export{defineElement,LYRA_PREFIX,tag}from'./prefix.js';export{nextId,srOnly}from'./a11y.js';export{calendarIcon,chevronIcon,closeIcon,expandIcon,eyeIcon,eyeOffIcon,fileIcon,folderIcon,pauseIcon,playIcon,spinnerIcon,}from'./icons.js';export{place,trackRect,virtualAnchorFromRect}from'./positioner.js';export type{PlacementResult,PlaceAutoSize,PlaceBoundary,PlaceFlipFallbackStrategy,PlaceOptions,PlaceStrategy,PlaceSync,VirtualAnchor,}from'./positioner.js';export{activateOverlay,suspendLyraModalsFor}from'./overlay-manager.js';export type{OverlayActivationOptions,OverlayDeactivateOptions,OverlayHandle,OverlayRestoreFocusTarget,}from'./overlay-manager.js';export{lockScroll}from'./scroll-lock.js';export{acquireAnnouncementSink,ANNOUNCEMENT_SINK_ATTRIBUTE,Announcer,}from'./announcer.js';export type{AnnounceOptions,AnnouncementPoliteness,AnnouncementSink,AnnouncementSinkOptions,AnnouncerOptions,AnnouncerTimerHost,}from'./announcer.js';export{layeredLayout}from'./layered-layout.js';export type{LayeredLayoutEdge,LayeredLayoutNode,LayeredLayoutOptions,LayeredLayoutResult,}from'./layered-layout.js';export{attachInternalsSafely,createFallbackInternals,createStringArrayFormDataState,FormAssociated,isEmptyFormValue,readStringArrayFormDataState,stringFormValueAdapter,}from'./form-associated.js';export type{FormAssociatedInterface,FormAssociatedSubclassInterface,FormOwnerValue,FormSubmissionValue,FormValueAdapter,}from'./form-associated.js';export{groupByRecency}from'./group-by-recency.js';export type{GroupByRecencyOptions,RecencyBucket,RecencyLabels,}from'./group-by-recency.js';export{bridgeLyraLocale,resolveLyraScopedString}from'../localization.js';export{subscribeLyraLocale}from'../internal/localization-runtime.js';export type{LyraLocaleBridgeCleanup,LyraLocaleBridgeOptions,}from'../localization.js';export{getAnimation,setAnimation,setDefaultAnimation}from'./animation-registry.js';export type{LyraAnimationCleanup,LyraElementAnimation,LyraGetAnimationOptions,LyraResolvedElementAnimation,}from'./animation-registry.js';export{allDefined}from'./defined.js';export type{AllDefinedOptions,LyraDefinitionRoot}from'./defined.js';export{resolveCssLength}from'./css-length.js';export type{ResolveCssLengthOptions}from'./css-length.js';export{formatBytes,formatDate,formatNumber,formatRelativeTime}from'./format.js';export type{LyraFormatBytesOptions,LyraFormatRelativeTimeOptions,LyraFormattableNumber,}from'./format.js';export{invalidateLyraTheme}from'./theme.js';export type{LyraThemeRoot}from'./theme.js';export{adoptLyraTokens}from'./tokens.js';export{findUnscopedThemeInputs}from'./theme-scopes.js';export type{LyraCatalog,LyraCatalogEntry}from'./catalog.js';export type{LyraAnchorTarget,LyraAnchorTargetEventMap,}from'./anchor-target.js';
|
|
1
|
+
export{LyraElement}from'./lyra-element.js';export{installDeprecatedAliases}from'./deprecated-aliases.js';export type{LyraAliasMapping,LyraDeprecatedAliases}from'./deprecated-aliases.js';export type{LyraEmitArgs,LyraEmittedEvent,LyraEmitOptions,LyraEventMap,}from'./lyra-element.js';export{defineElement,LYRA_PREFIX,tag}from'./prefix.js';export{nextId,srOnly}from'./a11y.js';export{calendarIcon,chevronIcon,closeIcon,expandIcon,eyeIcon,eyeOffIcon,fileIcon,folderIcon,pauseIcon,playIcon,spinnerIcon,}from'./icons.js';export{place,trackRect,virtualAnchorFromRect}from'./positioner.js';export type{PlacementResult,PlaceAutoSize,PlaceBoundary,PlaceFlipFallbackStrategy,PlaceOptions,PlaceStrategy,PlaceSync,VirtualAnchor,}from'./positioner.js';export{activateOverlay,suspendLyraModalsFor}from'./overlay-manager.js';export type{OverlayActivationOptions,OverlayDeactivateOptions,OverlayHandle,OverlayRestoreFocusTarget,}from'./overlay-manager.js';export{lockScroll}from'./scroll-lock.js';export{acquireAnnouncementSink,ANNOUNCEMENT_SINK_ATTRIBUTE,Announcer,}from'./announcer.js';export type{AnnounceOptions,AnnouncementPoliteness,AnnouncementSink,AnnouncementSinkOptions,AnnouncerOptions,AnnouncerTimerHost,}from'./announcer.js';export{layeredLayout}from'./layered-layout.js';export type{LayeredLayoutEdge,LayeredLayoutNode,LayeredLayoutOptions,LayeredLayoutResult,}from'./layered-layout.js';export{attachInternalsSafely,createFallbackInternals,createStringArrayFormDataState,FormAssociated,isEmptyFormValue,readStringArrayFormDataState,stringFormValueAdapter,}from'./form-associated.js';export type{FormAssociatedInterface,FormAssociatedSubclassInterface,FormOwnerValue,FormSubmissionValue,FormValueAdapter,}from'./form-associated.js';export{groupByRecency}from'./group-by-recency.js';export type{GroupByRecencyOptions,RecencyBucket,RecencyLabels,}from'./group-by-recency.js';export{bridgeLyraLocale,resolveLyraScopedString}from'../localization.js';export{subscribeLyraLocale}from'../internal/localization-runtime.js';export type{LyraLocaleBridgeCleanup,LyraLocaleBridgeOptions,}from'../localization.js';export{getAnimation,setAnimation,setDefaultAnimation}from'./animation-registry.js';export type{LyraAnimationCleanup,LyraElementAnimation,LyraGetAnimationOptions,LyraResolvedElementAnimation,}from'./animation-registry.js';export{allDefined}from'./defined.js';export type{AllDefinedOptions,LyraDefinitionRoot}from'./defined.js';export{resolveCssLength}from'./css-length.js';export type{ResolveCssLengthOptions}from'./css-length.js';export{formatBytes,formatDate,formatNumber,formatRelativeTime}from'./format.js';export type{LyraFormatBytesOptions,LyraFormatRelativeTimeOptions,LyraFormattableNumber,}from'./format.js';export{invalidateLyraTheme}from'./theme.js';export type{LyraThemeRoot}from'./theme.js';export{adoptLyraTokens}from'./tokens.js';export{findUnscopedThemeInputs}from'./theme-scopes.js';export type{LyraCatalog,LyraCatalogEntry}from'./catalog.js';export type{LyraAnchorTarget,LyraAnchorTargetEventMap,}from'./anchor-target.js';export{prepareLyraSeriesData,prepareLyraCategoryData,prepareLyraHistogram,prepareLyraWordCloud,prepareLyraWaveform,}from'./data-preparation.js';export type{LyraSourceValue,LyraSourceRequest,LyraIndexedInput,LyraPreparationOptions,LyraObservationCounts,LyraNumericDomain,LyraSeriesObservation,LyraSeriesSample,LyraPreparedSeries,LyraSeriesRangeRequest,LyraSeriesPointRef,LyraPreparedSeriesData,LyraPreparedCategoryData,LyraHistogramDistribution,LyraWeightedWord,LyraPreparedWordCloud,LyraPreparedWaveform,}from'./data-preparation.js';
|
package/dist/utilities/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{LyraElement}from"./lyra-element.js";import{installDeprecatedAliases}from"./deprecated-aliases.js";import{defineElement,LYRA_PREFIX,tag}from"./prefix.js";import{nextId,srOnly}from"./a11y.js";import{calendarIcon,chevronIcon,closeIcon,expandIcon,eyeIcon,eyeOffIcon,fileIcon,folderIcon,pauseIcon,playIcon,spinnerIcon}from"./icons.js";import{place,trackRect,virtualAnchorFromRect}from"./positioner.js";import{activateOverlay,suspendLyraModalsFor}from"./overlay-manager.js";import{lockScroll}from"./scroll-lock.js";import{acquireAnnouncementSink,ANNOUNCEMENT_SINK_ATTRIBUTE,Announcer}from"./announcer.js";import{layeredLayout}from"./layered-layout.js";import{attachInternalsSafely,createFallbackInternals,createStringArrayFormDataState,FormAssociated,isEmptyFormValue,readStringArrayFormDataState,stringFormValueAdapter}from"./form-associated.js";import{groupByRecency}from"./group-by-recency.js";import{bridgeLyraLocale,resolveLyraScopedString}from"../localization.js";import{subscribeLyraLocale}from"../internal/localization-runtime.js";import{getAnimation,setAnimation,setDefaultAnimation}from"./animation-registry.js";import{allDefined}from"./defined.js";import{resolveCssLength}from"./css-length.js";import{formatBytes,formatDate,formatNumber,formatRelativeTime}from"./format.js";import{invalidateLyraTheme}from"./theme.js";import{adoptLyraTokens}from"./tokens.js";import{findUnscopedThemeInputs}from"./theme-scopes.js";export{ANNOUNCEMENT_SINK_ATTRIBUTE,Announcer,FormAssociated,LYRA_PREFIX,LyraElement,acquireAnnouncementSink,activateOverlay,adoptLyraTokens,allDefined,attachInternalsSafely,bridgeLyraLocale,calendarIcon,chevronIcon,closeIcon,createFallbackInternals,createStringArrayFormDataState,defineElement,expandIcon,eyeIcon,eyeOffIcon,fileIcon,findUnscopedThemeInputs,folderIcon,formatBytes,formatDate,formatNumber,formatRelativeTime,getAnimation,groupByRecency,installDeprecatedAliases,invalidateLyraTheme,isEmptyFormValue,layeredLayout,lockScroll,nextId,pauseIcon,place,playIcon,readStringArrayFormDataState,resolveCssLength,resolveLyraScopedString,setAnimation,setDefaultAnimation,spinnerIcon,srOnly,stringFormValueAdapter,subscribeLyraLocale,suspendLyraModalsFor,tag,trackRect,virtualAnchorFromRect};
|
|
1
|
+
import{LyraElement}from"./lyra-element.js";import{installDeprecatedAliases}from"./deprecated-aliases.js";import{defineElement,LYRA_PREFIX,tag}from"./prefix.js";import{nextId,srOnly}from"./a11y.js";import{calendarIcon,chevronIcon,closeIcon,expandIcon,eyeIcon,eyeOffIcon,fileIcon,folderIcon,pauseIcon,playIcon,spinnerIcon}from"./icons.js";import{place,trackRect,virtualAnchorFromRect}from"./positioner.js";import{activateOverlay,suspendLyraModalsFor}from"./overlay-manager.js";import{lockScroll}from"./scroll-lock.js";import{acquireAnnouncementSink,ANNOUNCEMENT_SINK_ATTRIBUTE,Announcer}from"./announcer.js";import{layeredLayout}from"./layered-layout.js";import{attachInternalsSafely,createFallbackInternals,createStringArrayFormDataState,FormAssociated,isEmptyFormValue,readStringArrayFormDataState,stringFormValueAdapter}from"./form-associated.js";import{groupByRecency}from"./group-by-recency.js";import{bridgeLyraLocale,resolveLyraScopedString}from"../localization.js";import{subscribeLyraLocale}from"../internal/localization-runtime.js";import{getAnimation,setAnimation,setDefaultAnimation}from"./animation-registry.js";import{allDefined}from"./defined.js";import{resolveCssLength}from"./css-length.js";import{formatBytes,formatDate,formatNumber,formatRelativeTime}from"./format.js";import{invalidateLyraTheme}from"./theme.js";import{adoptLyraTokens}from"./tokens.js";import{findUnscopedThemeInputs}from"./theme-scopes.js";import{prepareLyraSeriesData,prepareLyraCategoryData,prepareLyraHistogram,prepareLyraWordCloud,prepareLyraWaveform}from"./data-preparation.js";export{ANNOUNCEMENT_SINK_ATTRIBUTE,Announcer,FormAssociated,LYRA_PREFIX,LyraElement,acquireAnnouncementSink,activateOverlay,adoptLyraTokens,allDefined,attachInternalsSafely,bridgeLyraLocale,calendarIcon,chevronIcon,closeIcon,createFallbackInternals,createStringArrayFormDataState,defineElement,expandIcon,eyeIcon,eyeOffIcon,fileIcon,findUnscopedThemeInputs,folderIcon,formatBytes,formatDate,formatNumber,formatRelativeTime,getAnimation,groupByRecency,installDeprecatedAliases,invalidateLyraTheme,isEmptyFormValue,layeredLayout,lockScroll,nextId,pauseIcon,place,playIcon,prepareLyraCategoryData,prepareLyraHistogram,prepareLyraSeriesData,prepareLyraWaveform,prepareLyraWordCloud,readStringArrayFormDataState,resolveCssLength,resolveLyraScopedString,setAnimation,setDefaultAnimation,spinnerIcon,srOnly,stringFormValueAdapter,subscribeLyraLocale,suspendLyraModalsFor,tag,trackRect,virtualAnchorFromRect};
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md); family-wide breaking-change summaries: [agent-tools](https://github.com/aceshooting/lyra-ui/blob/main/packages/lyra-ui/llms/agent-tools.md)
|
|
10
10
|
- **Deprecations** none
|
|
11
11
|
- **Optional peers** none
|
|
12
|
-
- **Themeable via**
|
|
12
|
+
- **Themeable via** 18 parts, 10 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
13
13
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
14
14
|
|
|
15
15
|
---
|
|
@@ -28,6 +28,11 @@ left alone — appending a live entry never steals focus from an unrelated, stil
|
|
|
28
28
|
Above `virtualizeAt`
|
|
29
29
|
entries, the body renders through an internal `<lr-virtual-list>` instead of a plain keyed list.
|
|
30
30
|
|
|
31
|
+
`entries` retains the newest 10,000 identities. The visible `limit` part discloses omitted entries
|
|
32
|
+
through `activityFeedInputLimit`, with `count` and `total` placeholders. The existing follow and
|
|
33
|
+
tail controls reach the newest retained entry. After changing external state read by a stable
|
|
34
|
+
`renderText` or `formatTimestamp` callback, call `requestUpdate()` to refresh rendered rows.
|
|
35
|
+
|
|
31
36
|
**Properties:** `entries: ActivityEntry[] = []` (attribute: false) — `ActivityEntry { id: string;
|
|
32
37
|
text: string; icon?: string; timestamp?: Date | string; variant?: LyraVariant; data?: unknown }`
|
|
33
38
|
(exported here). `icon` is a literal glyph hint (e.g. an emoji), the same convention
|
|
@@ -73,7 +78,7 @@ outer card goes.
|
|
|
73
78
|
**Toggle request, follow and threshold:** `lr-toggle-request` (`detail: { expanded }`) is a cancelable proposal dispatched before the header toggles. `follow` reflects like every `true`-defaulting boolean: absent while following, `follow="false"` once released. The body virtualizes when entries exceed (not equal) `virtualize-at`.
|
|
74
79
|
|
|
75
80
|
**CSS parts:** `base`, `header` (a `<button>`), `status-dot` (pulses while `mode="live"`), `label`,
|
|
76
|
-
`summary`, `toggle`, `body` (the scrollable region, or the internal virtual-list), `entry` (carries
|
|
81
|
+
`summary`, `toggle`, `limit` (input-loss notice), `body` (the scrollable region, or the internal virtual-list), `entry` (carries
|
|
77
82
|
`data-variant`), `entry-icon`, `variant-dot` (the dot rendered inside `entry-icon` when the entry
|
|
78
83
|
sets no literal `icon`), `variant-dot-neutral`/`variant-dot-brand`/`variant-dot-success`/
|
|
79
84
|
`variant-dot-warning`/`variant-dot-danger` (each also carries `variant-dot`), `entry-text`, and
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md); family-wide breaking-change summaries: [agent-tools](https://github.com/aceshooting/lyra-ui/blob/main/packages/lyra-ui/llms/agent-tools.md)
|
|
10
10
|
- **Deprecations** none
|
|
11
11
|
- **Optional peers** none
|
|
12
|
-
- **Themeable via**
|
|
12
|
+
- **Themeable via** 6 parts, 1 custom property — see this component's own `@csspart`/`@cssprop` list below
|
|
13
13
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
14
14
|
|
|
15
15
|
---
|
|
@@ -19,18 +19,54 @@
|
|
|
19
19
|
Provider-neutral agent/LLM trace view combining span-kind filters, handoff quick-jumps, and a
|
|
20
20
|
hierarchical trace tree from one shared `spans` array.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
With `treeSource` unset, span views omit whitespace-only IDs and preserve every nonblank business ID exactly, including
|
|
23
23
|
surrounding whitespace. The first valid admitted duplicate continues to win.
|
|
24
24
|
|
|
25
|
+
**Complete provider trace:** `treeSource: TraceTreeSource | undefined` (attribute:
|
|
26
|
+
false) forwards the exact trace-tree provider contract above to the existing single child. It takes
|
|
27
|
+
precedence over `spans`; invalid defined input fails visibly without restoring legacy content.
|
|
28
|
+
Setting `undefined` restores current legacy spans, kind inventory and handoff quick-jumps.
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import type { TraceTreeSource } from
|
|
32
|
+
"@aceshooting/lyra-ui/components/agent-tools/agent-trace/agent-trace.class.js";
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The child owns the complete preorder, authoritative topology, required global trace extent,
|
|
36
|
+
provider actions and bounded 400-row cache plus focused row/301 mounted rows/two range-read
|
|
37
|
+
permits. The wrapper creates no second provider controller, loaded-span collection, topology index
|
|
38
|
+
or window-derived summary. It never scans source rows to discover kinds or handoffs. Provider mode
|
|
39
|
+
shows the fixed six public choices, in order: `agent`, `llm`, `tool`, `retriever`, `embedding`,
|
|
40
|
+
`other`. Existing `hiddenKinds` is forwarded globally to the child. Handoff quick-jumps and the
|
|
41
|
+
outer legacy admission notice are absent; provider rows and key reveal provide global navigation.
|
|
42
|
+
|
|
43
|
+
`revealSourceKey(key: string): Promise<boolean>` waits for the current child binding and delegates
|
|
44
|
+
to that child once, resolving `false` for missing, invalid, disabled, failed, obsolete, disconnected
|
|
45
|
+
or unset-source targets. It does not activate or change selection. Same-identity assignment and
|
|
46
|
+
keyless `requestUpdate()` forward a single refresh; named presentation/active-ID paints reuse the
|
|
47
|
+
child. Source replacement/removal and lifecycle changes revoke obsolete child and wrapper controls.
|
|
48
|
+
`label`, `withTokens`, `withCost`, `withoutBars`, `activeSpanId` and strings forward to the child;
|
|
49
|
+
locale and direction inherit normally.
|
|
50
|
+
|
|
51
|
+
The child remains caller-controlled when used alone. This wrapper preserves its two-way active
|
|
52
|
+
binding: an accepted child's `lr-span-select` updates wrapper `activeSpanId` before that original
|
|
53
|
+
event bubbles to external listeners, without re-emission. `lr-span-toggle` also bubbles once.
|
|
54
|
+
Kind filtering keeps the existing veto/containment behavior and emits only the domain
|
|
55
|
+
`lr-span-visibility-change { hiddenKinds }` after a current accepted change. No second source event
|
|
56
|
+
or provider summary/filter API is added. The following span-array projection/handoff details apply
|
|
57
|
+
with `treeSource` unset.
|
|
58
|
+
|
|
25
59
|
**Properties:**
|
|
26
60
|
|
|
27
61
|
- `spans: LyraSpan[] = []` (attribute: false) — the full, unfiltered array; identical contract to
|
|
28
62
|
`lr-trace-tree.spans` (see `lr-span-waterfall` above for the `LyraSpan` shape). Controlled and
|
|
29
63
|
never mutated
|
|
30
64
|
- `activeSpanId: string | null = null` (attribute `active-span-id`) — controlled selection forwarded
|
|
31
|
-
into the composed `lr-trace-tree`;
|
|
32
|
-
span
|
|
33
|
-
binding
|
|
65
|
+
into the composed `lr-trace-tree`; tree activation updates it before the original
|
|
66
|
+
`lr-span-select` bubbles, while a legacy handoff quick-jump updates it and emits that event.
|
|
67
|
+
Both routes support two-way binding
|
|
68
|
+
- `maxNodes: number = 500` (attribute `max-nodes`) — projected span budget forwarded to the tree,
|
|
69
|
+
normalized to `1..5000`; unset or non-finite values restore 500
|
|
34
70
|
- `hiddenKinds: LyraSpan['kind'][] = []` (attribute: false) — span kinds hidden from the tree
|
|
35
71
|
(`'agent' | 'llm' | 'tool' | 'retriever' | 'embedding' | 'other'`). Empty shows every kind;
|
|
36
72
|
pre-settable (e.g. to hide `retriever`/`embedding` by default) and readable back after
|
|
@@ -47,15 +83,19 @@ expanded: boolean }`), and `lr-span-visibility-change` (`detail: { hiddenKinds:
|
|
|
47
83
|
LyraSpan['kind'][] }`). The internal graph legend's generic `lr-visibility-change` event is
|
|
48
84
|
contained; consumers receive this trace-domain event instead.
|
|
49
85
|
|
|
50
|
-
`spans` is normalized through the same
|
|
86
|
+
With `treeSource` unset, `spans` is normalized through the same bounded projection as `<lr-trace-tree>` before
|
|
51
87
|
filtering, handoff lookup, and tree rendering. The controlled active span and its ancestor path
|
|
52
88
|
reserve positions, and malformed records plus later duplicate ids are omitted, so the composed
|
|
53
|
-
surfaces cannot disagree.
|
|
89
|
+
surfaces cannot disagree. The first 10,000 outer entries are admitted without traversing opaque
|
|
90
|
+
provider metadata; active reservation stays inside admitted data and `maxNodes`. A visible limit
|
|
91
|
+
notice discloses source or projection loss without duplicating the composed tree's notice. It is
|
|
92
|
+
silent on initial mount; a later transition into truncation is announced politely.
|
|
54
93
|
|
|
55
94
|
**CSS parts:** `base`, `filter` (the composed `lr-graph-legend` filter row, only rendered while
|
|
56
|
-
`spans` is non-empty), `handoffs` (the quick-jump list wrapper, only rendered while at least one
|
|
95
|
+
legacy `spans` is non-empty, or while a provider is defined), `handoffs` (the quick-jump list wrapper, only rendered while at least one
|
|
57
96
|
visible span has `kind: 'agent'`), `handoff` (one entry — a `<button>` wrapping an
|
|
58
|
-
`lr-handoff-divider`, carrying `data-active`), `tree` (the composed `lr-trace-tree`)
|
|
97
|
+
`lr-handoff-divider`, carrying `data-active`), `tree` (the composed `lr-trace-tree`), and `limit`
|
|
98
|
+
(source truncation notice when the tree does not already show its own notice).
|
|
59
99
|
|
|
60
100
|
**Themeable custom properties:** `--lr-agent-trace-handoff-active-bg` (default
|
|
61
101
|
`var(--lr-color-brand-quiet)`) — the background of the active (`activeSpanId`) handoff quick-jump
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md); family-wide breaking-change summaries: [conversation](https://github.com/aceshooting/lyra-ui/blob/main/packages/lyra-ui/llms/conversation.md)
|
|
10
10
|
- **Deprecations** none
|
|
11
11
|
- **Optional peers** `dompurify`, `katex`, `marked`, `shiki` — see `llms/peers.md`
|
|
12
|
-
- **Themeable via**
|
|
12
|
+
- **Themeable via** 17 parts, 0 custom properties — see this component's own `@csspart`/`@cssprop` list below
|
|
13
13
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
14
14
|
|
|
15
15
|
---
|
|
@@ -41,11 +41,13 @@ metadata?: Record<string, unknown> }`. Each entry renders as an `lr-chat-message
|
|
|
41
41
|
`role`/`status`/`timestamp` come straight across. A nonempty `parts` array renders in order through
|
|
42
42
|
`lr-message-parts` and takes precedence over the legacy `text` shortcut; otherwise `text` renders
|
|
43
43
|
as sanitized Markdown through `lr-markdown`. Replace the whole region with the `messages` slot for
|
|
44
|
-
richer bodies.
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
richer bodies. Within the admitted input tail, empty ids and later duplicates are omitted
|
|
45
|
+
first-wins before the latest 500 valid identities are chosen. Host owns ordering, updates, and
|
|
46
|
+
persistence
|
|
47
47
|
- `follow: boolean = true` (reflected) — forwarded to the internal `lr-chat-viewport`
|
|
48
|
-
- `unreadStartIndex: number | null = null` (attribute `unread-start-index`) —
|
|
48
|
+
- `unreadStartIndex: number | null = null` (attribute `unread-start-index`) — an index in the
|
|
49
|
+
original assigned message array, translated into the retained rendered message window while
|
|
50
|
+
preserving positions occupied by invalid or duplicate records
|
|
49
51
|
|
|
50
52
|
**Properties (details pane):**
|
|
51
53
|
|
|
@@ -157,12 +159,17 @@ directly, or exactly one `lr-virtual-list` when the slot itself owns virtualizat
|
|
|
157
159
|
built-in run/tool/retrieval/grounding/context details pane while keeping the responsive shell),
|
|
158
160
|
`composer` (replaces the built-in plain-frame `lr-chat-composer`; supplied content keeps its own
|
|
159
161
|
frame), `header-actions` (model selection, settings, export controls).
|
|
162
|
+
Supplying `messages` or `details` suppresses evaluation and mounting of that region's built-in
|
|
163
|
+
fallback; removing the slot content restores it. Messages and tool calls retain a bounded newest
|
|
164
|
+
tail, while retrieval, context, and citation inputs retain a bounded prefix. Localized
|
|
165
|
+
`input-limit` notes disclose the original collection count when admission drops entries. Initial
|
|
166
|
+
and reconnect notices are quiet; a later changed omission is politely announced.
|
|
160
167
|
|
|
161
168
|
**CSS parts:** `base`, `header`, `heading`, `header-actions`, `body`, `conversation`, `viewport` (the
|
|
162
169
|
composed `lr-chat-viewport`), `messages`, `messages-empty`, `details`, `details-content`, `section`
|
|
163
|
-
(one run/tools/retrieval/grounding/context section), `section-heading`, `composer`,
|
|
164
|
-
`message`
|
|
165
|
-
|
|
170
|
+
(one run/tools/retrieval/grounding/context section), `section-heading`, `composer`,
|
|
171
|
+
`composer-input` (the composed `lr-chat-composer`), `message`, `input-limit` (original collection
|
|
172
|
+
admission-loss notes).
|
|
166
173
|
|
|
167
174
|
**Themeable custom properties:** shared tokens only.
|
|
168
175
|
|
|
@@ -36,10 +36,12 @@ Removing `mime-type` consumes the absent hint safely and restores automatic vide
|
|
|
36
36
|
`kind` explicitly selects audio. Attribute removal keeps its `null` property readback; an explicit
|
|
37
37
|
empty hint remains empty, and a later audio MIME value restores audio detection.
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
With `cueSource` null, a cue with no `end` extends to the next strictly chronological applicable start, or remains
|
|
40
40
|
open-ended when none exists. Equal starts do not end each other. The player indexes starts on cue
|
|
41
|
-
assignment in
|
|
42
|
-
|
|
41
|
+
assignment/duration changes in O(n log n) work with O(n) retained intervals. Seek/time updates
|
|
42
|
+
resolve the interval in O(log n), or O(1) while the previous answer interval still applies. Overlaps
|
|
43
|
+
choose the greatest effective start, then the later original index. Caller order, first ID
|
|
44
|
+
admission and explicit ends are retained; a paused seek uses
|
|
43
45
|
replacement cues immediately, even before rendering. Duration changes preserve the same
|
|
44
46
|
effective-start rules.
|
|
45
47
|
|
|
@@ -49,7 +51,116 @@ seeking retains token-driven pointer feedback.
|
|
|
49
51
|
The default document-viewer renderer advertises `time-range` anchors but not search: the generic
|
|
50
52
|
document payload has no cue/transcript field, so advertising search there would expose a control
|
|
51
53
|
whose result is always empty. Standalone `<lr-av-player>` search remains available whenever the
|
|
52
|
-
consumer supplies `cues` directly.
|
|
54
|
+
consumer supplies `cues` or a complete `cueSource` directly.
|
|
55
|
+
|
|
56
|
+
**Complete indexed transcript:** `cueSource: LyraAvCueSource | null = null` (attribute: false)
|
|
57
|
+
takes display precedence over `cues`, bypassing the legacy snapshot, tick index and search scans.
|
|
58
|
+
Invalid non-null providers fail visibly; setting `null` restores the current legacy cue input and
|
|
59
|
+
recomputes its retained search. The legacy `cues` route retains its 10,000-cue cap. Provider storage,
|
|
60
|
+
interval indexing and full-text/speaker search remain host-owned; no complete transcript array,
|
|
61
|
+
all-ID index or match array is retained by the player.
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
import type { LyraAvCueSource, LyraAvActiveCue, LyraAvCueSearch, LyraAvCue } from
|
|
65
|
+
"@aceshooting/lyra-ui/components/media/av-player/av-player.class.js";
|
|
66
|
+
import type { LyraSourceRequest, LyraSourceValue } from
|
|
67
|
+
"@aceshooting/lyra-ui/utilities/data-preparation.js";
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
`LyraAvCueSource` supplies immutable `revision` (a nonempty string or finite number), safe
|
|
71
|
+
nonnegative integer `count`, and four required own-data methods. Methods may return values or
|
|
72
|
+
PromiseLike results; requests include an abort `signal`:
|
|
73
|
+
|
|
74
|
+
- `getCue(index, request): LyraSourceValue<LyraAvCue | null>` returns the cue at its exact original
|
|
75
|
+
zero-based source index. An unavailable/null in-range position stays an unavailable,
|
|
76
|
+
noninteractive row; it never deletes or compacts a logical position.
|
|
77
|
+
- `findCue(cueId, request): LyraSourceValue<{ index, cue } | null>` resolves a globally unique ID
|
|
78
|
+
directly, without scanning cached rows. Returned identity/index must agree with the request.
|
|
79
|
+
- `activeAt(time, request): LyraSourceValue<LyraAvActiveCue>` resolves the complete source's active
|
|
80
|
+
cue and its exact validity interval.
|
|
81
|
+
- `search(query, request): LyraSourceValue<LyraAvCueSearch>` searches the complete index; this
|
|
82
|
+
request additionally includes the effective `locale`.
|
|
83
|
+
|
|
84
|
+
Provider cue records are closed, cloned and frozen own-data values:
|
|
85
|
+
`{ cueId, start, end?, text, speaker? }`. `cueId` must already be trimmed, nonempty and at most
|
|
86
|
+
256 UTF-16 units; `text` is at most 100,000 units and `speaker` at most 4,096. Start is finite and
|
|
87
|
+
nonnegative; an explicit end is finite and at least start. Malformed, accessor-backed, oversized,
|
|
88
|
+
duplicate or contradictory locally observed records fail without silent coercion/truncation.
|
|
89
|
+
The provider guarantees global ID uniqueness and immutable agreement among row, lookup, active
|
|
90
|
+
and search replies; the player checks only its bounded observable records. Source timestamps are
|
|
91
|
+
absolute media seconds and are never clamped into invented end-of-media active cues. Committed
|
|
92
|
+
row activation seeks that row's original start through the existing media seek contract.
|
|
93
|
+
|
|
94
|
+
`LyraAvActiveCue` is `{ index: number | null, cue: LyraAvCue | null, validFrom, validUntil }`.
|
|
95
|
+
Index/cue must both be null or both valid; a real index is below source count. The half-open
|
|
96
|
+
`[validFrom, validUntil)` interval must be nonempty and contain the requested time; infinities
|
|
97
|
+
are allowed only as interval bounds. Explicit cue start/end must also contain the requested time.
|
|
98
|
+
The provider resolves omitted ends and overlaps using greatest start, then later original source
|
|
99
|
+
index, including complete no-active intervals. The player retains one completed answer interval;
|
|
100
|
+
ticks inside it make no active request. Seeks invalidate that interval even when they stay within
|
|
101
|
+
its bounds. Out-of-interval ticks coalesce to the latest desired time; returning to a cached answer
|
|
102
|
+
revokes an obsolete pending intent. `lr-cue-change` retains `{ cueId, index }` with the original
|
|
103
|
+
source index, or `null`/`-1`, and emits only on an actual active identity/index transition.
|
|
104
|
+
|
|
105
|
+
The transcript uses 32-row pages, at most 128 ready cues/four pages, and at most two staged pages
|
|
106
|
+
(64 cues). `getCue` calls are sequential within each page, with at most two physically pending
|
|
107
|
+
calls across pages. At most two additional active/selected-or-transient-match records are retained.
|
|
108
|
+
The resulting 194-record payload ceiling is 20,244,288 UTF-16 units at maximum field sizes,
|
|
109
|
+
separate from object overhead, validation temporaries, query strings and opaque provider storage.
|
|
110
|
+
The list exposes the full logical `count`; cache size does not redefine transcript length.
|
|
111
|
+
|
|
112
|
+
Existing `search(query): Promise<number>` trims its query and matches locale-aware,
|
|
113
|
+
case-insensitive substrings of complete cue text OR speaker. `LyraAvCueSearch` supplies exact safe
|
|
114
|
+
`count <= source.count` and own-data `getMatch(matchIndex, request)`, returning `{ index, cue }`
|
|
115
|
+
for an original row. Each source index occurs at most once in provider match order. The player
|
|
116
|
+
captures this indexed handle without enumerating hits, reveals the first match before resolving,
|
|
117
|
+
and retains only the count, match ordinal and one selected record. `searchNext()`/`searchPrevious()`
|
|
118
|
+
wrap the complete match ordinal and reveal the original list row without seeking media. Returned
|
|
119
|
+
matches must satisfy the query and agree with subsequently loaded rows before scroll/highlight
|
|
120
|
+
commit. Visible ready-row highlighting checks only bounded cue text/speaker.
|
|
121
|
+
|
|
122
|
+
`lr-search-change` keeps `{ query, matchCount, matchCountExact: true, activeIndex }`, where
|
|
123
|
+
`activeIndex` is the match ordinal, not the cue's original row index. Only authoritative completed
|
|
124
|
+
matches, exact-zero results and explicit clears emit. Empty queries/`clearSearch()` clear state
|
|
125
|
+
without provider work; canceled/unavailable search resolves `0` and navigation resolves `false`
|
|
126
|
+
without fabricating an exact-zero event. Unavailable text uses the existing localized `error`
|
|
127
|
+
surface and light-DOM failure announcements; loading uses the existing loading label. Locale
|
|
128
|
+
changes restart the current query;
|
|
129
|
+
ordinary playback ticks do not repeat search.
|
|
130
|
+
|
|
131
|
+
One physical `activeAt`, one `findCue`, one `search` and one `getMatch` may run alongside the two
|
|
132
|
+
`getCue` calls: six fixed physical permits, each with only the latest logical demand. Ignored aborts
|
|
133
|
+
hold permits until actual settlement; cancellation settles obsolete search/navigation promises
|
|
134
|
+
promptly without allowing overlapping replacement calls. Reassign even the same source, or call
|
|
135
|
+
a keyless `requestUpdate()`, after revision/state changes. Named presentation updates reuse admitted
|
|
136
|
+
data. Rebind, replacement, clearing, disconnect and adoption revoke old rows, intervals, search
|
|
137
|
+
handles and effects; reconnect recaptures current input. Existing transcript/cue/state parts and
|
|
138
|
+
time-range anchor methods apply; no new cue-ID anchor kind or cue-selection event is added.
|
|
139
|
+
|
|
140
|
+
**Exported cue-source declarations:**
|
|
141
|
+
|
|
142
|
+
These types are exported from the granular AV class entry shown above.
|
|
143
|
+
|
|
144
|
+
`LyraAvCueSource {
|
|
145
|
+
readonly revision: LyraSourceRevision;
|
|
146
|
+
readonly count: number;
|
|
147
|
+
getCue(index: number, request: LyraSourceRequest): LyraSourceValue<LyraAvCue | null>;
|
|
148
|
+
findCue(cueId: string, request: LyraSourceRequest): LyraSourceValue<{ readonly index: number; readonly cue: LyraAvCue } | null>;
|
|
149
|
+
activeAt(time: number, request: LyraSourceRequest): LyraSourceValue<LyraAvActiveCue>;
|
|
150
|
+
search(query: string, request: LyraSourceRequest & { readonly locale: string }): LyraSourceValue<LyraAvCueSearch>;
|
|
151
|
+
}`
|
|
152
|
+
|
|
153
|
+
`LyraAvActiveCue {
|
|
154
|
+
readonly index: number | null;
|
|
155
|
+
readonly cue: LyraAvCue | null;
|
|
156
|
+
readonly validFrom: number;
|
|
157
|
+
readonly validUntil: number;
|
|
158
|
+
}`
|
|
159
|
+
|
|
160
|
+
`LyraAvCueSearch {
|
|
161
|
+
readonly count: number;
|
|
162
|
+
getMatch(matchIndex: number, request: LyraSourceRequest): LyraSourceValue<{ readonly index: number; readonly cue: LyraAvCue }>;
|
|
163
|
+
}`
|
|
53
164
|
|
|
54
165
|
**Properties:** `src: string = ''`, `name: string = ''`, `kind?: 'audio' | 'video'`
|
|
55
166
|
(attribute-backed auto-detection override), `mimeType: string = ''` (attribute `mime-type`), `poster: string =
|
|
@@ -62,8 +173,8 @@ gradient scrim, while browser-owned native media controls are unchanged,
|
|
|
62
173
|
`rates: readonly number[] = [0.75, 1, 1.25, 1.5, 2]` (attribute: false),
|
|
63
174
|
`cues: readonly LyraAvCue[] = []` (attribute: false), `peaks: readonly number[] = []`
|
|
64
175
|
(attribute: false), and `tracks: readonly LyraAvTrack[] = []` (attribute: false). Each collection is
|
|
65
|
-
normalized synchronously on assignment into a bounded, cloned, frozen snapshot
|
|
66
|
-
new collection. The inherited
|
|
176
|
+
normalized synchronously on assignment into a bounded, cloned, frozen snapshot when its legacy
|
|
177
|
+
route is active; mutate by assigning a new collection. The inherited
|
|
67
178
|
anchor-target surface is `highlights: readonly LyraHighlight[] = []` (property only; assign a new
|
|
68
179
|
collection to update), `activeHighlightId: string | null = null` (attribute `active-highlight-id`),
|
|
69
180
|
`anchor: LyraAnchor | string | null = null` (property only), and readonly
|
|
@@ -81,12 +192,71 @@ renders video) and never appears in `lr-load`'s `detail.kind`.
|
|
|
81
192
|
`poster` is ignored for audio and is validated with the same safe media-source allowlist as `src`
|
|
82
193
|
before reaching the native video element; an unsafe poster URL is omitted.
|
|
83
194
|
|
|
84
|
-
Runtime
|
|
195
|
+
Runtime legacy input is normalized before it reaches media, canvas, or `Intl`: cue/highlight times
|
|
85
196
|
and waveform peaks are clamped to their valid ranges; non-finite native duration/current time
|
|
86
197
|
cannot leak into state or events. `rates` keeps only unique finite values in the supported
|
|
87
198
|
`0.0625..16` range, while always including the normalized current `playbackRate`.
|
|
88
199
|
|
|
89
|
-
**
|
|
200
|
+
**Prepared whole-duration waveform:** `waveform: LyraPreparedWaveform | null = null`
|
|
201
|
+
(attribute: false) takes precedence over `peaks` for waveform presence, painting and failure state.
|
|
202
|
+
Set `null` to restore current legacy peaks/validity. The supplied descriptor remains caller-owned
|
|
203
|
+
and retained by identity; the player clones/freezes only its bounded accepted fields/buckets.
|
|
204
|
+
It never decodes media, calls a sample reader or materializes original samples.
|
|
205
|
+
|
|
206
|
+
```ts
|
|
207
|
+
import { prepareLyraWaveform } from "@aceshooting/lyra-ui/utilities/data-preparation.js";
|
|
208
|
+
import type { LyraPreparedWaveform, LyraIndexedInput } from
|
|
209
|
+
"@aceshooting/lyra-ui/utilities/data-preparation.js";
|
|
210
|
+
|
|
211
|
+
player.waveform = await prepareLyraWaveform(samples, {
|
|
212
|
+
duration: durationSeconds,
|
|
213
|
+
maxBuckets: 1000,
|
|
214
|
+
});
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
`prepareLyraWaveform(input: LyraIndexedInput<number>, options: LyraPreparationOptions &
|
|
218
|
+
{ duration: number; maxBuckets?: number }): Promise<LyraPreparedWaveform>` asynchronously scans
|
|
219
|
+
every original position once. Its immutable reader supplies `revision`, safe nonnegative `count`,
|
|
220
|
+
and `read(start, count, { signal })`; each response must be an array of exactly the requested size.
|
|
221
|
+
Preparation yields between chunks, supports `signal`, defaults `batchSize` to 2,048 and clamps it
|
|
222
|
+
to at most 8,192. Budgets must be positive safe integers; `maxBuckets` defaults/clamps to 65,536.
|
|
223
|
+
Finite samples clamp to `[0, 1]`; nonfinite/missing samples preserve their positions and contribute
|
|
224
|
+
no peak. Revision/count changes or reader failures reject. Only bounded chunks and output buckets
|
|
225
|
+
are retained; source storage/index construction remains caller-owned. Hosts may also author a
|
|
226
|
+
complete bounded envelope directly, with responsibility for truthful full-source statistics.
|
|
227
|
+
|
|
228
|
+
`LyraPreparedWaveform` has `{ revision, counts: { sourceCount, validCount, invalidCount },
|
|
229
|
+
sampleCount, duration, buckets, firstAmplitude, lastAmplitude }`. Counts/sampleCount are safe
|
|
230
|
+
nonnegative integers, `sampleCount === sourceCount`, and valid/invalid counts conserve the source.
|
|
231
|
+
Revision is a nonempty string or finite number; duration is finite nonnegative seconds.
|
|
232
|
+
At most 65,536 own-data buckets `{ startIndex, endIndex, maxAmplitude }` must form ordered,
|
|
233
|
+
contiguous, nonempty half-open intervals partitioning `[0, sampleCount)`. Maxima are finite in
|
|
234
|
+
`[0, 1]`. Endpoint amplitudes describe the original first/last samples, each null when invalid or
|
|
235
|
+
absent, otherwise finite `[0, 1]` and no larger than its covering bucket's maximum. Empty input
|
|
236
|
+
requires zero counts, empty buckets and null endpoints; all-invalid input has zero bucket maxima
|
|
237
|
+
and null endpoints. Accessors, sparse fields, gaps/overlaps and malformed counts/amplitudes reject
|
|
238
|
+
without clipping or legacy fallback.
|
|
239
|
+
|
|
240
|
+
Painting maps each original index interval across the complete duration; unequal intervals retain
|
|
241
|
+
their actual proportions. A monotone O(bucketCount + barCount) pass merges overlapping interval
|
|
242
|
+
maxima into at most 4,096 physical bars. Final-bucket energy survives even when the final endpoint
|
|
243
|
+
amplitude is quiet. Canvas backing stores stay within 4,096 per dimension and 8,388,608 pixels.
|
|
244
|
+
Once positive native media metadata is authoritative, envelope duration must agree within
|
|
245
|
+
`0.001 + 4 * Number.EPSILON * max(mediaDuration, envelopeDuration)` seconds. Mismatch shows a
|
|
246
|
+
localized `error` and plain seek rail until metadata/envelope agree, without changing native
|
|
247
|
+
duration or seek coordinates. Before metadata the envelope may show proportions, but cannot enable
|
|
248
|
+
native seeking. Source/kind/MIME changes reset old metadata authority; duration changes recheck it.
|
|
249
|
+
|
|
250
|
+
Malformed/mismatched waveforms use localized `avPlayerWaveformUnavailable` feedback and a fresh
|
|
251
|
+
post-mount assertive light-DOM announcement, without a new waveform event or `lr-render-error`.
|
|
252
|
+
Reassign even the same descriptor, or call a keyless `requestUpdate()`, after changing it; named
|
|
253
|
+
playback/presentation updates reuse the accepted snapshot. Legacy `peaks` must already represent
|
|
254
|
+
the whole recording: arrays over 65,536 entries reject before reading any entry, retaining no
|
|
255
|
+
prefix. Valid bounded peaks keep their existing normalization and endpoint-preserving downsampling.
|
|
256
|
+
Prepared presence hides inactive legacy admission errors; clearing it exposes current legacy
|
|
257
|
+
validity again.
|
|
258
|
+
|
|
259
|
+
**Waveform lifecycle:** with `peaks` or `waveform`, waveform canvas painting is gated by player visibility when
|
|
90
260
|
`IntersectionObserver` is available. Peak, theme, and resize changes while the player is
|
|
91
261
|
off-screen coalesce into one paint on re-entry; environments without that API retain eager
|
|
92
262
|
painting.
|
|
@@ -109,8 +279,8 @@ unsupported or unresolved targets report `false` through the return value and `l
|
|
|
109
279
|
(`detail: { readonly cueId, readonly index }`; `cueId` is `null` and `index` is `-1` when no cue is active),
|
|
110
280
|
`lr-highlight-activate` (`detail: { highlightId }`), `lr-anchor-result` (`detail: {
|
|
111
281
|
found }`), `lr-search-change` (`detail: { query, matchCount, matchCountExact, activeIndex }`;
|
|
112
|
-
`matchCountExact` is always `true` —
|
|
113
|
-
additional ceiling), and
|
|
282
|
+
`matchCountExact` is always `true` for emitted results — legacy search covers the admitted `cues`
|
|
283
|
+
array with no additional ceiling, while source search reports the complete indexed count), and
|
|
114
284
|
`lr-render-error` (`detail: { error }`). The native `ended`, `error`, `loadedmetadata`, `pause`,
|
|
115
285
|
`play`, `timeupdate`, and `volumechange`
|
|
116
286
|
events are also relayed exactly once from the host as native `Event` instances. Like the original
|
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
- **Release history** [CHANGELOG.md](../../CHANGELOG.md); family-wide breaking-change summaries: [charts](https://github.com/aceshooting/lyra-ui/blob/main/packages/lyra-ui/llms/charts.md)
|
|
10
10
|
- **Deprecations** none
|
|
11
11
|
- **Optional peers** `chart.js`, `chartjs-plugin-annotation`, `chartjs-plugin-datalabels`, `chartjs-plugin-zoom` — see `llms/peers.md`
|
|
12
|
-
- **Themeable via**
|
|
12
|
+
- **Themeable via** 18 parts, 39 custom properties — see `lr-line-chart.md`
|
|
13
13
|
- **Documented with** `lr-line-chart`: see [lr-line-chart.md](./lr-line-chart.md).
|
|
14
14
|
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`
|
|
@@ -19,6 +19,14 @@
|
|
|
19
19
|
Box-and-whisker chart from a precomputed five-number summary (no raw sample data sent to the
|
|
20
20
|
browser). Does **not** extend `LyraChart` — a deliberately bespoke API.
|
|
21
21
|
|
|
22
|
+
A bounded set of group summaries can cover every observation in a much larger population: four
|
|
23
|
+
groups can, for example, summarize one million observations. Compute each group's five numbers on
|
|
24
|
+
the host or server, and keep its sample count, quantile definition, and exact or approximate
|
|
25
|
+
provenance in the surrounding description or data table. Raw observation access and quantile
|
|
26
|
+
computation remain with the host; the component consumes the summaries. Distinct group counts
|
|
27
|
+
still obey the collection and rendering bounds below. Query a bounded group window or use a
|
|
28
|
+
paged data browser to traverse a large group catalogue.
|
|
29
|
+
|
|
22
30
|
If the browser cannot acquire a 2D canvas context, a localized visible message replaces the plot
|
|
23
31
|
and the generated or slotted data table becomes visible. No failed Chart.js instance is retained.
|
|
24
32
|
Changing the data or calling `refreshTheme()` retries rendering, so the plot recovers when the
|