@aceshooting/lyra-ui 30.9.0 → 31.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +361 -335
- package/dist/ai/adapters/ag-ui.js +1 -1
- package/dist/autoloader-cdn.js +1 -1
- package/dist/components/agent-tools/activity-feed/activity-feed.class.js +1 -1
- package/dist/components/agent-tools/budget-meter/budget-meter.class.d.ts +12 -1
- package/dist/components/agent-tools/budget-meter/budget-meter.class.js +4 -4
- package/dist/components/agent-tools/compare-panel/compare-panel.class.js +1 -1
- package/dist/components/agent-tools/eval-dataset/eval-dataset.class.js +1 -1
- package/dist/components/agent-tools/thinking-panel/thinking-panel.class.js +1 -1
- package/dist/components/agent-tools/tool-select-dialog/tool-select-dialog.class.js +1 -1
- package/dist/components/charts/chart/box-plot.class.js +2 -2
- package/dist/components/charts/chart/chart-sync.js +1 -1
- package/dist/components/charts/chart/chart.class.d.ts +1 -1
- package/dist/components/charts/chart/chart.class.js +4 -4
- package/dist/components/charts/chart/lite-chart-axis-layout.js +1 -1
- package/dist/components/charts/chart/lite-chart.class.js +2 -2
- package/dist/components/conversation/chat-composer/chat-composer.class.d.ts +26 -11
- package/dist/components/conversation/chat-composer/chat-composer.class.js +11 -9
- package/dist/components/conversation/chat-composer/chat-composer.styles.js +1 -1
- package/dist/components/conversation/chat-message/chat-message.class.d.ts +27 -3
- package/dist/components/conversation/chat-message/chat-message.class.js +14 -12
- package/dist/components/conversation/chat-message/chat-message.styles.js +1 -1
- package/dist/components/conversation/chat-viewport/chat-viewport.class.d.ts +29 -2
- package/dist/components/conversation/chat-viewport/chat-viewport.class.js +2 -2
- package/dist/components/conversation/chat-viewport/chat-viewport.styles.js +1 -1
- package/dist/components/conversation/code-block/code-block-shared.js +1 -1
- package/dist/components/conversation/markdown/markdown-base.class.d.ts +1 -1
- package/dist/components/conversation/markdown/markdown-base.class.js +1 -1
- package/dist/components/conversation/markdown/markdown-code-header.js +1 -1
- package/dist/components/conversation/markdown/markdown-core.class.d.ts +10 -0
- package/dist/components/conversation/markdown/markdown-core.class.js +1 -1
- package/dist/components/conversation/markdown/markdown-shared.d.ts +7 -2
- package/dist/components/conversation/markdown/markdown-shared.js +3 -3
- package/dist/components/conversation/markdown/markdown.class.d.ts +10 -0
- package/dist/components/conversation/markdown/markdown.class.js +1 -1
- package/dist/components/conversation/message-feedback/message-feedback.class.d.ts +11 -3
- package/dist/components/conversation/message-feedback/message-feedback.class.js +12 -6
- package/dist/components/conversation/message-feedback/message-feedback.styles.js +1 -1
- package/dist/components/conversation/message-parts/message-parts.class.js +1 -1
- package/dist/components/conversation/prompt-input/prompt-input.class.d.ts +8 -4
- package/dist/components/conversation/prompt-input/prompt-input.class.js +3 -2
- package/dist/components/conversation/push-to-talk/push-to-talk.class.js +1 -1
- package/dist/components/conversation/streaming-text/streaming-text-base.class.d.ts +4 -0
- package/dist/components/conversation/streaming-text/streaming-text-base.class.js +1 -1
- package/dist/components/conversation/streaming-text/streaming-text-core.class.d.ts +1 -1
- package/dist/components/conversation/streaming-text/streaming-text-core.class.js +1 -0
- package/dist/components/conversation/streaming-text/streaming-text.class.d.ts +1 -1
- package/dist/components/conversation/streaming-text/streaming-text.class.js +1 -0
- package/dist/components/conversation/suggestion-chips/suggestion-chips.class.d.ts +17 -3
- package/dist/components/conversation/suggestion-chips/suggestion-chips.class.js +3 -3
- package/dist/components/conversation/suggestion-chips/suggestion-chips.d.ts +1 -1
- package/dist/components/conversation/suggestion-chips/suggestion-chips.js +1 -1
- package/dist/components/conversation/suggestion-chips/suggestion-chips.styles.js +1 -1
- package/dist/components/conversation/thread-list/thread-list.class.d.ts +1 -1
- package/dist/components/conversation/thread-list/thread-list.class.js +3 -3
- package/dist/components/conversation/transcript-feed/transcript-feed.class.js +1 -1
- package/dist/components/data/data-grid/data-grid.class.d.ts +10 -10
- package/dist/components/data/data-grid/data-grid.class.js +1 -1
- package/dist/components/data/document-library/document-library-cursor.js +1 -0
- package/dist/components/data/document-library/document-library-types.d.ts +20 -0
- package/dist/components/data/document-library/document-library.class.d.ts +37 -26
- package/dist/components/data/document-library/document-library.class.js +20 -11
- package/dist/components/data/document-library/document-library.styles.js +1 -1
- package/dist/components/data/file-tree/file-tree.class.js +1 -1
- package/dist/components/data/flow-canvas/flow-canvas.class.d.ts +1 -1
- package/dist/components/data/flow-canvas/flow-canvas.class.js +2 -2
- package/dist/components/data/heatmap/heatmap.class.d.ts +1 -1
- package/dist/components/data/heatmap/heatmap.class.js +1 -1
- package/dist/components/data/pagination/pagination.class.js +1 -1
- package/dist/components/data/table/table.class.d.ts +31 -2
- package/dist/components/data/table/table.class.js +3 -3
- package/dist/components/data/table/table.styles.js +1 -1
- package/dist/components/data/timeline/timeline-cluster.js +1 -1
- package/dist/components/data/timeline/timeline-item.class.d.ts +10 -3
- package/dist/components/data/timeline/timeline-item.class.js +16 -12
- package/dist/components/data/timeline/timeline-item.styles.js +1 -1
- package/dist/components/data/timeline/timeline.class.d.ts +14 -2
- package/dist/components/data/timeline/timeline.class.js +9 -5
- package/dist/components/data/tree/tree-item.class.js +1 -1
- package/dist/components/data/tree/tree.class.d.ts +2 -0
- package/dist/components/data/tree/tree.class.js +1 -1
- package/dist/components/forms/button/button.class.d.ts +8 -6
- package/dist/components/forms/button/button.class.js +2 -2
- package/dist/components/forms/checkbox-group/checkbox-group.class.js +1 -1
- package/dist/components/forms/color-picker/color-core.js +1 -1
- package/dist/components/forms/combobox/combobox.class.d.ts +20 -12
- package/dist/components/forms/combobox/combobox.class.js +2 -2
- package/dist/components/forms/date-picker/date-input.class.d.ts +1 -1
- package/dist/components/forms/date-picker/date-input.class.js +1 -1
- package/dist/components/forms/icon-button/icon-button.class.d.ts +4 -2
- package/dist/components/forms/icon-button/icon-button.class.js +2 -2
- package/dist/components/forms/input/input-shared.js +2 -2
- package/dist/components/forms/input/number-input-locale.js +1 -0
- package/dist/components/forms/input/number-input.class.d.ts +19 -2
- package/dist/components/forms/input/number-input.class.js +2 -2
- package/dist/components/forms/locale-picker/locale-picker.class.d.ts +3 -3
- package/dist/components/forms/locale-picker/locale-picker.class.js +1 -1
- package/dist/components/layout/app-rail-group/app-rail-group.class.js +1 -1
- package/dist/components/layout/details/accordion-item.class.js +1 -1
- package/dist/components/layout/dock-panel/dock-panel.class.d.ts +1 -1
- package/dist/components/layout/dock-panel/dock-panel.class.js +1 -1
- package/dist/components/layout/menu/menu.class.js +1 -1
- package/dist/components/layout/multi-split/multi-split.class.js +1 -1
- package/dist/components/layout/navigation-menu-item/navigation-menu-item.class.js +1 -1
- package/dist/components/layout/page/page.class.d.ts +3 -3
- package/dist/components/layout/page/page.class.js +1 -1
- package/dist/components/layout/segmented/segmented.class.d.ts +20 -7
- package/dist/components/layout/segmented/segmented.class.js +34 -24
- package/dist/components/layout/segmented/segmented.styles.js +1 -1
- package/dist/components/layout/stepper/stepper.styles.js +1 -1
- package/dist/components/layout/tab-group/tab-group.class.d.ts +8 -1
- package/dist/components/layout/tab-group/tab-group.class.js +1 -1
- package/dist/components/layout/tab-group/tab.class.d.ts +7 -1
- package/dist/components/layout/tab-group/tab.class.js +1 -1
- package/dist/components/layout/virtual-list/virtual-list.class.d.ts +2 -2
- package/dist/components/layout/virtual-list/virtual-list.class.js +1 -1
- package/dist/components/media/animated-image/animated-image.class.js +1 -1
- package/dist/components/media/attachment-chip/attachment-chip.class.d.ts +21 -14
- package/dist/components/media/attachment-chip/attachment-chip.class.js +1 -1
- package/dist/components/media/attachment-trigger/attachment-trigger.class.d.ts +36 -12
- package/dist/components/media/attachment-trigger/attachment-trigger.class.js +3 -3
- package/dist/components/media/drop-zone/drop-zone.class.d.ts +23 -5
- package/dist/components/media/drop-zone/drop-zone.class.js +2 -2
- package/dist/components/media/drop-zone/drop-zone.styles.js +1 -1
- package/dist/components/media/file-icon/file-icon.class.js +1 -1
- package/dist/components/media/flag/flag-url-resolver.js +1 -1
- package/dist/components/media/image-viewer/image-viewer.class.d.ts +2 -2
- package/dist/components/media/image-viewer/image-viewer.class.js +1 -1
- package/dist/components/media/map/map-anchor-controller.js +1 -1
- package/dist/components/media/map/map-canvas-target.js +1 -0
- package/dist/components/media/map/map-owned-features.js +1 -1
- package/dist/components/media/map/map-scene-elevated-lines.js +2 -2
- package/dist/components/media/map/map-scene-render-controller.js +1 -1
- package/dist/components/media/map/map.class.d.ts +15 -6
- package/dist/components/media/map/map.class.js +4 -4
- package/dist/components/media/map/map.styles.js +1 -1
- package/dist/components/media/pan-zoom/pan-zoom.class.js +1 -1
- package/dist/components/media/sequence-playback/sequence-playback.class.d.ts +21 -9
- package/dist/components/media/sequence-playback/sequence-playback.class.js +7 -6
- package/dist/components/media/sequence-playback/sequence-playback.styles.js +1 -1
- package/dist/components/media/video/video.class.d.ts +3 -3
- package/dist/components/media/video/video.class.js +3 -1
- package/dist/components/media/video-playlist/video-playlist.class.js +1 -1
- package/dist/components/overlays/chip/chip.class.js +1 -1
- package/dist/components/overlays/overlay/dropdown.class.js +1 -1
- package/dist/components/overlays/overlay/overlay.styles.js +1 -1
- package/dist/components/overlays/overlay/tooltip.class.d.ts +5 -1
- package/dist/components/overlays/overlay/tooltip.class.js +3 -3
- package/dist/components/retrieval/embedding-explorer/embedding-explorer-engine.js +1 -1
- package/dist/components/retrieval/graph/graph-node-renderer.js +1 -1
- package/dist/components/retrieval/graph/graph-spatial-controller.js +1 -1
- package/dist/components/retrieval/graph/graph.class.d.ts +1 -1
- package/dist/components/retrieval/graph/graph.class.js +1 -1
- package/dist/components/retrieval/ingestion-queue/ingestion-queue-presentation.d.ts +11 -0
- package/dist/components/retrieval/ingestion-queue/ingestion-queue-presentation.js +1 -0
- package/dist/components/retrieval/ingestion-queue/ingestion-queue.class.d.ts +18 -7
- package/dist/components/retrieval/ingestion-queue/ingestion-queue.class.js +13 -26
- package/dist/components/retrieval/ingestion-queue/ingestion-queue.styles.js +1 -1
- package/dist/components/retrieval/mind-map/mind-map.class.js +1 -1
- package/dist/components/retrieval/neighbor-list/neighbor-list.class.d.ts +1 -1
- package/dist/components/retrieval/neighbor-list/neighbor-list.class.js +3 -3
- package/dist/components/retrieval/retrieval-results/retrieval-results.class.js +1 -1
- package/dist/components/utility/diff-view/diff-view.class.d.ts +5 -5
- package/dist/components/utility/diff-view/diff-view.class.js +1 -1
- package/dist/components/utility/icon/icon.class.js +1 -1
- package/dist/components/utility/json-viewer/json-viewer.class.d.ts +16 -1
- package/dist/components/utility/json-viewer/json-viewer.class.js +4 -4
- package/dist/components/utility/json-viewer/json-viewer.styles.js +1 -1
- package/dist/components/utility/known-date/known-date.class.js +1 -1
- package/dist/components/utility/mention-popover/mention-popover.class.js +1 -1
- package/dist/components/viewers/archive-viewer/archive-viewer.class.js +1 -1
- package/dist/components/viewers/calendar-viewer/calendar-viewer.class.js +1 -1
- package/dist/components/viewers/contact-viewer/contact-viewer.class.js +1 -1
- package/dist/components/viewers/csv-viewer/csv-viewer.class.js +1 -1
- package/dist/components/viewers/dataset-viewer/dataset-viewer.class.js +1 -1
- package/dist/components/viewers/document-preview/document-preview.class.js +2 -2
- package/dist/components/viewers/docx-viewer/docx-viewer.class.d.ts +1 -1
- package/dist/components/viewers/docx-viewer/docx-viewer.class.js +2 -2
- package/dist/components/viewers/ebook-viewer/ebook-viewer.class.js +1 -1
- package/dist/components/viewers/email-viewer/email-viewer.class.d.ts +1 -1
- package/dist/components/viewers/email-viewer/email-viewer.class.js +2 -2
- package/dist/components/viewers/html-viewer/html-viewer.class.js +1 -1
- package/dist/components/viewers/include/include.class.js +1 -1
- package/dist/components/viewers/model-viewer/model-viewer.class.js +1 -1
- package/dist/components/viewers/notebook-viewer/notebook-viewer.class.js +2 -2
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.d.ts +2 -2
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.js +2 -2
- package/dist/components/viewers/pptx-viewer/pptx-viewer.class.js +1 -1
- package/dist/components/viewers/spreadsheet-viewer/spreadsheet-viewer.class.js +1 -1
- package/dist/components/viewers/svg-viewer/svg-viewer.class.js +1 -1
- package/dist/components/viewers/table-viewer-shared.js +4 -4
- package/dist/components/viewers/xml-viewer/xml-viewer.class.js +2 -2
- package/dist/data-sources.d.ts +10 -0
- package/dist/events.d.ts +9 -4
- package/dist/framework-types.d.ts +1 -1
- package/dist/internal/anchored-overlay-runtime.js +1 -1
- package/dist/internal/catalog-picker.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/retrieval.generated.js +1 -1
- package/dist/internal/document-tokens.js +2 -2
- package/dist/internal/drop-session-controller.js +1 -1
- package/dist/internal/engine-3d.js +1 -1
- package/dist/internal/icon-only-content.js +1 -1
- package/dist/internal/layered-layout.js +1 -1
- package/dist/internal/localization-types.d.ts +1 -1
- package/dist/internal/localization.js +1 -1
- package/dist/internal/lyra-element.js +2 -2
- package/dist/internal/map-custom-layer-controller.js +1 -1
- package/dist/internal/media-panorama.js +1 -1
- package/dist/internal/native-modal-context.js +1 -1
- package/dist/internal/overlay-manager.js +1 -1
- package/dist/internal/overlay-order.js +1 -1
- package/dist/internal/overlay-stack.js +1 -1
- package/dist/internal/package-metadata.js +1 -1
- package/dist/internal/runtime-diagnostics.js +1 -0
- package/dist/internal/safe-url.js +1 -1
- package/dist/internal/scoped-definitions.generated.js +1 -1
- package/dist/internal/scroll-overflow.js +1 -1
- package/dist/internal/source-cursor-controller.js +1 -0
- package/dist/internal/source-cursor-projection.js +1 -0
- package/dist/internal/source-page-scope.js +1 -1
- package/dist/internal/source-window-controller.js +1 -1
- package/dist/internal/text-quote.js +1 -1
- package/dist/internal/viewer-search.js +1 -1
- package/dist/lyra.d.ts +1 -1
- package/dist/sequence-time-binding.js +1 -1
- package/dist/simulation-clock.js +1 -1
- package/dist/styles/reservations.css +1 -1
- package/dist/styles/reservations.styles.js +1 -1
- package/dist/testing/happy-dom-shims.js +1 -1
- package/dist/theme/theme-bootstrap.js +1 -1
- package/dist/theme/theme.js +1 -1
- package/dist/utilities/overlay-manager.d.ts +2 -0
- package/llms/components/lr-attachment-chip.md +27 -12
- package/llms/components/lr-attachment-trigger.md +27 -7
- package/llms/components/lr-budget-meter.md +31 -0
- package/llms/components/lr-button.md +6 -4
- package/llms/components/lr-chat-composer.md +26 -9
- package/llms/components/lr-chat-message.md +44 -3
- package/llms/components/lr-chat-viewport.md +39 -2
- package/llms/components/lr-combobox.md +27 -1
- package/llms/components/lr-data-grid.md +2 -0
- package/llms/components/lr-dialog.md +10 -0
- package/llms/components/lr-diff-view.md +6 -0
- package/llms/components/lr-document-library.md +90 -6
- package/llms/components/lr-drop-zone.md +26 -2
- package/llms/components/lr-graph.md +5 -0
- package/llms/components/lr-icon-button.md +2 -1
- package/llms/components/lr-ingestion-queue.md +76 -8
- package/llms/components/lr-json-viewer.md +51 -0
- package/llms/components/lr-lite-chart.md +2 -1
- package/llms/components/lr-locale-picker.md +5 -0
- package/llms/components/lr-map.md +33 -0
- package/llms/components/lr-markdown-core.md +2 -1
- package/llms/components/lr-markdown.md +20 -4
- package/llms/components/lr-menu.md +3 -1
- package/llms/components/lr-message-feedback.md +38 -3
- package/llms/components/lr-number-input.md +28 -1
- package/llms/components/lr-page.md +4 -2
- package/llms/components/lr-prompt-input.md +6 -3
- package/llms/components/lr-segmented.md +30 -10
- package/llms/components/lr-sequence-playback.md +47 -12
- package/llms/components/lr-streaming-text-core.md +3 -2
- package/llms/components/lr-streaming-text.md +4 -1
- package/llms/components/lr-suggestion-chips.md +28 -5
- package/llms/components/lr-tab-group.md +13 -1
- package/llms/components/lr-tab.md +5 -0
- package/llms/components/lr-table.md +25 -4
- package/llms/components/lr-timeline-item.md +1 -1
- package/llms/components/lr-timeline.md +38 -4
- package/llms/components/lr-tooltip.md +3 -1
- package/llms/components/lr-tree.md +4 -0
- package/llms/components/lr-virtual-list.md +4 -1
- package/llms/peers.md +2 -2
- package/llms/shared/events-and-types.md +61 -2
- package/llms/shared/forms-and-accessibility.md +46 -4
- package/llms/shared/imports-and-registration.md +154 -110
- package/llms/shared/testing-and-utilities.md +5 -1
- package/llms/shared.md +266 -117
- package/locales.json +1 -1
- package/package.json +22 -21
- package/registrations.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{__decorate}from"tslib";import{html,nothing}from"lit";import{property,state}from"lit/decorators.js";import{ref}from"lit/directives/ref.js";import{lyraLocaleCatalogVersion}from"../../../internal/localization-runtime.js";import{styleMap}from"lit/directives/style-map.js";import{LyraElement}from"../../../internal/lyra-element.js";import{hostAriaLabel,srOnly}from"../../../internal/a11y.js";import{specialistTokens}from"../../../internal/specialist-host-tokens.styles.js";import{DocumentAnchorTarget,prioritizedHighlightCandidates}from"../../../internal/anchor-target.js";import{isAbortError,isResourceLimitError,readResponseText,LyraResourceLimitError,LyraUserFacingError,resolveOwnerFetchTarget,yieldViewerTask}from"../../../internal/resource-loader.js";import{chevronIcon}from"../../../internal/icons.js";import{prefersReducedMotion}from"../../../internal/motion.js";import{finiteCount}from"../../../internal/numbers.js";import{HierarchySourceController,hierarchyField}from"../../../internal/hierarchy-source-controller.js";import{hierarchySourceView}from"../../../internal/hierarchy-source-view.js";import{hierarchySourceStyles}from"../../../internal/hierarchy-source-view.styles.js";const INSPECTION_KINDS=new Set(["object","array","scalar","element","attribute","text","comment","processing-instruction"]);import{styles}from"./xml-viewer.styles.js";import{getNumberFormat}from"../../../internal/intl-cache.js";import{sanitizeCssLength}from"../../../internal/safe-css.js";import{viewerSemanticLabel,viewerSemanticRole}from"../viewer-semantic-owner.js";import{resolveViewerSource}from"../viewer-source.js";import{writeClipboardText,clipboardFailureReason}from"../../../internal/clipboard.js";import{renderViewerLoading,viewerLoadingStyles}from"../viewer-loading.js";import{ViewerAnnouncementController}from"../viewer-announcements.js";import{DeferredTeardown}from"../../../internal/deferred-teardown.js";import{boundedViewerSearchQuery,ViewerSearchWorkBudget}from"../viewer-search-limits.js";import{LYRA_DEFAULT_anchorJumped,LYRA_DEFAULT_anchorJumpedToPage,LYRA_DEFAULT_anchorNotFound,LYRA_DEFAULT_collapse,LYRA_DEFAULT_copied,LYRA_DEFAULT_copy,LYRA_DEFAULT_copyFailed,LYRA_DEFAULT_documentPreviewEmpty,LYRA_DEFAULT_expand,LYRA_DEFAULT_highlightOfTotal,LYRA_DEFAULT_highlightWithLabel,LYRA_DEFAULT_loading,LYRA_DEFAULT_noData,LYRA_DEFAULT_retry,LYRA_DEFAULT_sourceSearchUnavailable,LYRA_DEFAULT_treeSourceError,LYRA_DEFAULT_treeSourceSummary,LYRA_DEFAULT_viewerSearchMatchCount}from"../../../internal/default-strings/shared.generated.js";import{LYRA_DEFAULT_documentPreviewFailedToLoad,LYRA_DEFAULT_documentPreviewResourceTooLarge,LYRA_DEFAULT_documentPreviewTypeDocument,LYRA_DEFAULT_documentPreviewUrlNotAllowed,LYRA_DEFAULT_loadingDocument,LYRA_DEFAULT_xmlViewerChildCount,LYRA_DEFAULT_xmlViewerCollapseNode,LYRA_DEFAULT_xmlViewerCopyDocument,LYRA_DEFAULT_xmlViewerCopyNode,LYRA_DEFAULT_xmlViewerExpandNode,LYRA_DEFAULT_xmlViewerLabel,LYRA_DEFAULT_xmlViewerLimit,LYRA_DEFAULT_xmlViewerParseError,LYRA_DEFAULT_xmlViewerTooManyNodes}from"../../../internal/default-strings/viewers.generated.js";const MAX_NODES=5e4,MAX_RENDERED_ROWS=5e3,MAX_DEPTH=256,MAX_SEARCH_MATCHES=1e4,MAX_PAINTED_HIGHLIGHTS=100;function attrKey(pathKey,attrName){return`${pathKey}\0${attrName}`}const EMPTY_SEARCH={matches:new Set,tagMatches:new Set,attrMatches:new Set,textMatches:new Set,forceExpand:new Set,paths:new Set,ordered:[],matchCountExact:!0};function elementChildren(node){return Array.from(node.children)}function findParserError(doc){const root=doc.documentElement,onRoot=root?.tagName==="parsererror",onFirstChild=root?.firstElementChild?.tagName==="parsererror",errorEl=onRoot?root:onFirstChild?root.firstElementChild:null;return errorEl?errorEl.textContent??"XML parse error":null}class XmlDoctypeError extends Error{constructor(){super("XML document type declarations are not supported."),this.name="XmlDoctypeError"}}function preflightXml(raw,maxBytes=26214400,maxNodes=MAX_NODES){if(raw.length>maxBytes||new TextEncoder().encode(raw).byteLength>maxBytes)throw new LyraResourceLimitError;let nodes=1,depth=0;const count=()=>{if(++nodes>maxNodes)throw new LyraResourceLimitError};for(let offset=0;offset<raw.length;){const open=raw.indexOf("<",offset);if(open<0){depth>0&&offset<raw.length&&count();break}if(depth>0&&open>offset&&count(),raw.startsWith("<!--",open)||raw.startsWith("<![CDATA[",open)||raw.startsWith("<?",open)){const comment=raw.startsWith("<!--",open),cdata=raw.startsWith("<![CDATA[",open),terminator=comment?"-->":cdata?"]]>":"?>";(comment||cdata||!/^<\?xml(?:\s|\?)/.test(raw.slice(open,open+8)))&&count();const end2=raw.indexOf(terminator,open+(comment?4:cdata?9:2));if(end2<0)break;offset=end2+terminator.length;continue}if(raw.slice(open,open+9).toUpperCase()==="<!DOCTYPE")throw new XmlDoctypeError;let quote="",end=open+1;for(;end<raw.length;end++){const character=raw[end];if(quote)character===quote&&(quote="");else if(character==='"'||character==="'")quote=character;else{if(character==="<")throw new Error("Invalid XML markup");if(character===">")break}}if(end===raw.length)break;if(raw[open+1]==="/")depth=Math.max(0,depth-1);else{if(count(),depth+1>MAX_DEPTH)throw new LyraResourceLimitError;raw[end-1]!=="/"&&depth++}offset=end+1}}function parseXmlDocument(raw,ownerDocument,maxBytes,maxNodes,prepared=!1){prepared||preflightXml(raw,maxBytes,maxNodes);const DOMParserCtor=ownerDocument.defaultView?.DOMParser;if(!DOMParserCtor)throw new Error("DOMParser is unavailable without a browsing context.");return new DOMParserCtor().parseFromString(raw,"application/xml")}function isRenderedXmlChild(node){return node.nodeType===Node.ELEMENT_NODE||node.nodeType===Node.TEXT_NODE&&!!(node.textContent??"").trim()||node.nodeType===Node.COMMENT_NODE||node.nodeType===Node.CDATA_SECTION_NODE||node.nodeType===Node.PROCESSING_INSTRUCTION_NODE}function validateDocumentComplexity(node,maxNodes){const childCounts=new WeakMap,pending=[{node,depth:0}];let count=0;for(;pending.length;){const current=pending.pop();if(count++,count>maxNodes||current.depth>MAX_DEPTH)throw new LyraResourceLimitError;let child=current.node.lastChild,children=0;for(;child;){if(isRenderedXmlChild(child)&&children++,count+pending.length>=maxNodes)throw new LyraResourceLimitError;pending.push({node:child,depth:current.depth+1}),child=child.previousSibling}childCounts.set(current.node,children)}return childCounts}function resolvePath(root,path,budget){if(!Array.isArray(path)||budget&&budget.remaining--<=0)return null;let current=root;for(let i=0;i<path.length;i++){if(budget&&budget.remaining--<=0)return null;const segment=path[i];if(typeof segment=="string"){if(!segment.startsWith("@")||i!==path.length-1)return null;const attr=segment.slice(1);return!attr||!current.hasAttribute(attr)?null:{element:current,attr}}const children=current.children;if(!Number.isInteger(segment)||segment<0||segment>=children.length)return null;const child=children.item(segment);if(!child)return null;current=child}return{element:current}}class LyraXmlViewerBase extends LyraElement{}class LyraXmlViewer extends DocumentAnchorTarget(LyraXmlViewerBase){constructor(){super(...arguments),this.maxNodes=5e4,this.maxRows=5e3,this.maxBytes=26214400,this.sourceMode=!1,this.sourceSearchDirty=!0,this.sourceSearchIntent=0,this.sourceCopyIntent=0,this.sourceNavigationIntent=0,this.sourceSearchTask=Promise.resolve(0),this.sourceHitKeys=new Set,this.sourceSearchExact=!0,this.sourceSearchUnavailable=!1,this.hierarchy=new HierarchySourceController(this,{normalize:(value,key)=>this.normalizeSourceNode(value,key),onChange:()=>this.requestUpdate("sourceState",null),accepted:()=>{},payload:{maxUnits:2e6,maxRowUnits:327702,unitsOf:node=>node.name.length+node.path.length+(node.value?.length??0)+node.kind.length}}),this.src="",this.name="",this.copyable=!1,this.maxHeight="",this.anchorKinds=["node-path"],this.childCounts=new WeakMap,this.xmlState={kind:"idle"},this.expandedOverrides=new Map,this.activePath=null,this.activeAttr=null,this.activeSearchIndex=-1,this.searchQuery="",this.renderedHighlights=new Map,this.searchState=EMPTY_SEARCH,this.lastSearchLocale="",this.pendingSearchStateEvent=!1,this.generation=0,this.explicitRefresh=0,this.nodeElements=new Map,this.attributeElements=new Map,this.cursorElements=[],this.announcements=new ViewerAnnouncementController(this),this.copyFeedback=null,this.copyGeneration=0,this.detached=new DeferredTeardown(()=>this.releaseDetachedDocument()),this.cancelSourceAnchor=()=>{this.treeSource!==void 0&&(this.cancelPendingAnchor(),this.sourceNavigationIntent++,this.sourceAnchorTask&&(this.sourceAnchorTask=void 0,this.hierarchy.cancelPending()))}}static{this.defaultStrings={...super.defaultStrings,anchorJumped:LYRA_DEFAULT_anchorJumped,anchorJumpedToPage:LYRA_DEFAULT_anchorJumpedToPage,anchorNotFound:LYRA_DEFAULT_anchorNotFound,collapse:LYRA_DEFAULT_collapse,copied:LYRA_DEFAULT_copied,copy:LYRA_DEFAULT_copy,copyFailed:LYRA_DEFAULT_copyFailed,documentPreviewEmpty:LYRA_DEFAULT_documentPreviewEmpty,documentPreviewFailedToLoad:LYRA_DEFAULT_documentPreviewFailedToLoad,documentPreviewResourceTooLarge:LYRA_DEFAULT_documentPreviewResourceTooLarge,documentPreviewTypeDocument:LYRA_DEFAULT_documentPreviewTypeDocument,documentPreviewUrlNotAllowed:LYRA_DEFAULT_documentPreviewUrlNotAllowed,expand:LYRA_DEFAULT_expand,highlightOfTotal:LYRA_DEFAULT_highlightOfTotal,highlightWithLabel:LYRA_DEFAULT_highlightWithLabel,loading:LYRA_DEFAULT_loading,loadingDocument:LYRA_DEFAULT_loadingDocument,noData:LYRA_DEFAULT_noData,retry:LYRA_DEFAULT_retry,sourceSearchUnavailable:LYRA_DEFAULT_sourceSearchUnavailable,treeSourceError:LYRA_DEFAULT_treeSourceError,treeSourceSummary:LYRA_DEFAULT_treeSourceSummary,viewerSearchMatchCount:LYRA_DEFAULT_viewerSearchMatchCount,xmlViewerChildCount:LYRA_DEFAULT_xmlViewerChildCount,xmlViewerCollapseNode:LYRA_DEFAULT_xmlViewerCollapseNode,xmlViewerCopyDocument:LYRA_DEFAULT_xmlViewerCopyDocument,xmlViewerCopyNode:LYRA_DEFAULT_xmlViewerCopyNode,xmlViewerExpandNode:LYRA_DEFAULT_xmlViewerExpandNode,xmlViewerLabel:LYRA_DEFAULT_xmlViewerLabel,xmlViewerLimit:LYRA_DEFAULT_xmlViewerLimit,xmlViewerParseError:LYRA_DEFAULT_xmlViewerParseError,xmlViewerTooManyNodes:LYRA_DEFAULT_xmlViewerTooManyNodes}}static{this.styles=[LyraElement.styles,hierarchySourceStyles,specialistTokens,styles,viewerLoadingStyles,srOnly]}get treeSource(){return this._treeSource}set treeSource(value){const previous=this._treeSource;this._treeSource=value,this.cancelPendingAnchor(),this.generation++,this.beginAbortableLoad(),this.invalidateSourceSearch(),this.syncSource(!0),this.requestUpdate("treeSource",previous)}revealSourceKey(key){return this.sourceNavigationIntent++,this.sourceAnchorTask=void 0,this.cancelPendingAnchor(),this.treeSource===void 0?Promise.resolve(!1):this.hierarchy.reveal(key)}syncSource(force=!1){if(!this.hierarchy)return;const source=this.treeSource,query=this.searchQuery??"",locale=this.effectiveLocale,binding=this.sourceBinding;source===void 0&&!this.sourceMode&&binding?.source===void 0||!force&&binding&&binding.source===source&&binding.query===query&&binding.locale===locale||(this.cancelPendingAnchor(),this.invalidateSourceSearch(),this.hierarchy.update(source,locale,force,{search:query,hiddenKinds:[]}),source===this.treeSource&&query===(this.searchQuery??"")&&locale===this.effectiveLocale&&(this.sourceBinding={source,query,locale}))}normalizeSourceNode(value,key){const name=hierarchyField(value,"name"),path=hierarchyField(value,"path"),kind=hierarchyField(value,"kind"),text=hierarchyField(value,"value");if(typeof name!="string"||name.length>65536||typeof path!="string"||path.length>65536||path!==key||typeof kind!="string"||!INSPECTION_KINDS.has(kind)||text!==void 0&&(typeof text!="string"||text.length>65536))throw new TypeError("Invalid inspection node");return Object.freeze({name,path,kind,...text===void 0?{}:{value:text}})}invalidateSourceSearch(){this.sourceSearchIntent=(this.sourceSearchIntent??0)+1,this.sourceCopyIntent=(this.sourceCopyIntent??0)+1,this.sourceNavigationIntent=(this.sourceNavigationIntent??0)+1,this.sourceAnchorTask=void 0,this.sourceHits=void 0,this.sourceHitKeys?.clear(),this.sourceSearchExact=!0,this.sourceSearchUnavailable=!1,this.sourceSearchDirty=!0,this.activeSearchIndex!==void 0&&(this._treeSource!==void 0||this.sourceMode)&&(this.activeSearchIndex=-1),this.copyFeedback!==void 0&&this.resetCopyFeedback()}async searchSource(){this.sourceSearchDirty=!1;const intent=this.sourceSearchIntent,provider=this.treeSource;if(!(this.searchQuery??""))return this.hierarchy.cancelSearch(),this.hasUpdated&&this.emitSearchChange(),0;const result=await this.hierarchy.search();return intent!==this.sourceSearchIntent||provider!==this.treeSource||!this.isConnected||result.status==="stale"||result.status==="ready"&&!result.isCurrent()?0:(this.sourceHits=result.status==="ready"?result:void 0,this.sourceHitKeys=new Set(this.sourceHits?.value.hits.map(hit=>hit.key)??[]),this.sourceSearchExact=result.status==="ready"&&result.value.exhaustive,this.sourceSearchUnavailable=result.status!=="ready",this.activeSearchIndex=this.sourceHitKeys.size?0:-1,this.requestUpdate("sourceSearchResult",null),this.emitSearchChange(),this.sourceHits?.isCurrent()&&this.activeSearchIndex>=0&&await this.hierarchy.reveal(this.sourceHits.value.hits[0].key),await this.updateComplete,intent===this.sourceSearchIntent?this.sourceHitKeys.size:0)}async stepSourceSearch(direction){const navigation=++this.sourceNavigationIntent;this.sourceAnchorTask=void 0,this.cancelPendingAnchor();const hits=this.sourceHits;if(!hits?.isCurrent()||!hits.value.hits.length)return!1;const size=hits.value.hits.length;this.activeSearchIndex=this.activeSearchIndex<0?direction===1?0:size-1:(this.activeSearchIndex+direction+size)%size;const found=await this.hierarchy.reveal(hits.value.hits[this.activeSearchIndex].key);return!found||navigation!==this.sourceNavigationIntent||!hits.isCurrent()||this.sourceHits!==hits?!1:(this.emitSearchChange(),found)}sourceSummary(){const projection=this.hierarchy.projection;return projection?this.localize("treeSourceSummary",void 0,{visible:getNumberFormat(this.effectiveLocale).format(projection.rows.count),total:getNumberFormat(this.effectiveLocale).format(projection.total)}):""}hasSourceCopy(){const source=this.treeSource;try{const available=typeof source?.copy=="function";return source===this.treeSource&&available}catch{return!1}}async copySource(key,scope){const source=this.treeSource,epoch=this.hierarchy.epoch,owner=this.ownerDocument,intent=++this.sourceCopyIntent,current=()=>this.treeSource===source&&this.hierarchy.epoch===epoch&&this.ownerDocument===owner&&this.isConnected&&intent===this.sourceCopyIntent;this.resetCopyFeedback();const result=await this.hierarchy.copy(key,scope,this.effectiveMaxBytes);if(!current()||result.status==="stale")return;const feedback=key??"document";if(result.status!=="ready"){this.showSourceCopyFeedback(feedback,!1);const message=this.localize("copyFailed");current()&&this.announcements.announce(message);return}const accepted=()=>current()&&result.isCurrent();if(!accepted())return;let outcome;try{const clipboard=owner.defaultView?.navigator.clipboard,write=clipboard?.writeText;if(!accepted())return;typeof write!="function"?outcome=Object.freeze({ok:!1,text:result.value,reason:"unsupported",error:new Error("Clipboard is unavailable")}):(await write.call(clipboard,result.value),outcome=Object.freeze({ok:!0,text:result.value}))}catch(error){outcome=Object.freeze({ok:!1,text:result.value,reason:clipboardFailureReason(error),error})}if(accepted())if(this.showSourceCopyFeedback(feedback,outcome.ok),outcome.ok){const message=this.localize("copied");if(!accepted())return;this.announcements.announce(message),accepted()&&this.emit("lr-copy",outcome)}else{const message=this.localize("copyFailed");if(!accepted()||(this.announcements.announce(message),!accepted()))return;this.emit("lr-error"),accepted()&&this.emit("lr-copy-error",outcome)}}sourceCopyButton(node){if(!this.copyable||!this.hasSourceCopy())return nothing;const source=this.treeSource,epoch=this.hierarchy.epoch,key=node?.path??null,projection=this.hierarchy.projection,label=node?this.localize("xmlViewerCopyNode",void 0,{name:node.name}):this.localize("xmlViewerCopyDocument");return html`<button part="copy-button" type="button" aria-label=${this.copyButtonLabel(key??"document",label)}
|
|
1
|
+
import{__decorate}from"tslib";import{html,nothing}from"lit";import{property,state}from"lit/decorators.js";import{ref}from"lit/directives/ref.js";import{lyraLocaleCatalogVersion}from"../../../internal/localization-runtime.js";import{styleMap}from"lit/directives/style-map.js";import{LyraElement}from"../../../internal/lyra-element.js";import{hostAriaLabel,srOnly}from"../../../internal/a11y.js";import{specialistTokens}from"../../../internal/specialist-host-tokens.styles.js";import{DocumentAnchorTarget,prioritizedHighlightCandidates}from"../../../internal/anchor-target.js";import{isResourceLimitError,readResponseText,LyraResourceLimitError,LyraUserFacingError,resolveOwnerFetchTarget,yieldViewerTask}from"../../../internal/resource-loader.js";import{chevronIcon}from"../../../internal/icons.js";import{prefersReducedMotion}from"../../../internal/motion.js";import{finiteCount}from"../../../internal/numbers.js";import{HierarchySourceController,hierarchyField}from"../../../internal/hierarchy-source-controller.js";import{hierarchySourceView}from"../../../internal/hierarchy-source-view.js";import{hierarchySourceStyles}from"../../../internal/hierarchy-source-view.styles.js";const INSPECTION_KINDS=new Set(["object","array","scalar","element","attribute","text","comment","processing-instruction"]);import{styles}from"./xml-viewer.styles.js";import{getNumberFormat}from"../../../internal/intl-cache.js";import{sanitizeCssLength}from"../../../internal/safe-css.js";import{viewerSemanticLabel,viewerSemanticRole}from"../viewer-semantic-owner.js";import{resolveViewerSource}from"../viewer-source.js";import{writeClipboardText,clipboardFailureReason}from"../../../internal/clipboard.js";import{renderViewerLoading,viewerLoadingStyles}from"../viewer-loading.js";import{ViewerAnnouncementController}from"../viewer-announcements.js";import{DeferredTeardown}from"../../../internal/deferred-teardown.js";import{boundedViewerSearchQuery,ViewerSearchWorkBudget}from"../viewer-search-limits.js";import{LYRA_DEFAULT_anchorJumped,LYRA_DEFAULT_anchorJumpedToPage,LYRA_DEFAULT_anchorNotFound,LYRA_DEFAULT_collapse,LYRA_DEFAULT_copied,LYRA_DEFAULT_copy,LYRA_DEFAULT_copyFailed,LYRA_DEFAULT_documentPreviewEmpty,LYRA_DEFAULT_expand,LYRA_DEFAULT_highlightOfTotal,LYRA_DEFAULT_highlightWithLabel,LYRA_DEFAULT_loading,LYRA_DEFAULT_noData,LYRA_DEFAULT_retry,LYRA_DEFAULT_sourceSearchUnavailable,LYRA_DEFAULT_treeSourceError,LYRA_DEFAULT_treeSourceSummary,LYRA_DEFAULT_viewerSearchMatchCount}from"../../../internal/default-strings/shared.generated.js";import{LYRA_DEFAULT_documentPreviewFailedToLoad,LYRA_DEFAULT_documentPreviewResourceTooLarge,LYRA_DEFAULT_documentPreviewTypeDocument,LYRA_DEFAULT_documentPreviewUrlNotAllowed,LYRA_DEFAULT_loadingDocument,LYRA_DEFAULT_xmlViewerChildCount,LYRA_DEFAULT_xmlViewerCollapseNode,LYRA_DEFAULT_xmlViewerCopyDocument,LYRA_DEFAULT_xmlViewerCopyNode,LYRA_DEFAULT_xmlViewerExpandNode,LYRA_DEFAULT_xmlViewerLabel,LYRA_DEFAULT_xmlViewerLimit,LYRA_DEFAULT_xmlViewerParseError,LYRA_DEFAULT_xmlViewerTooManyNodes}from"../../../internal/default-strings/viewers.generated.js";const MAX_NODES=5e4,MAX_RENDERED_ROWS=5e3,MAX_DEPTH=256,MAX_SEARCH_MATCHES=1e4,MAX_PAINTED_HIGHLIGHTS=100;function attrKey(pathKey,attrName){return`${pathKey}\0${attrName}`}const EMPTY_SEARCH={matches:new Set,tagMatches:new Set,attrMatches:new Set,textMatches:new Set,forceExpand:new Set,paths:new Set,ordered:[],matchCountExact:!0};function elementChildren(node){return Array.from(node.children)}function findParserError(doc){const root=doc.documentElement,onRoot=root?.tagName==="parsererror",onFirstChild=root?.firstElementChild?.tagName==="parsererror",errorEl=onRoot?root:onFirstChild?root.firstElementChild:null;return errorEl?errorEl.textContent??"XML parse error":null}class XmlDoctypeError extends Error{constructor(){super("XML document type declarations are not supported."),this.name="XmlDoctypeError"}}function preflightXml(raw,maxBytes=26214400,maxNodes=MAX_NODES){if(raw.length>maxBytes||new TextEncoder().encode(raw).byteLength>maxBytes)throw new LyraResourceLimitError;let nodes=1,depth=0;const count=()=>{if(++nodes>maxNodes)throw new LyraResourceLimitError};for(let offset=0;offset<raw.length;){const open=raw.indexOf("<",offset);if(open<0){depth>0&&offset<raw.length&&count();break}if(depth>0&&open>offset&&count(),raw.startsWith("<!--",open)||raw.startsWith("<![CDATA[",open)||raw.startsWith("<?",open)){const comment=raw.startsWith("<!--",open),cdata=raw.startsWith("<![CDATA[",open),terminator=comment?"-->":cdata?"]]>":"?>";(comment||cdata||!/^<\?xml(?:\s|\?)/.test(raw.slice(open,open+8)))&&count();const end2=raw.indexOf(terminator,open+(comment?4:cdata?9:2));if(end2<0)break;offset=end2+terminator.length;continue}if(raw.slice(open,open+9).toUpperCase()==="<!DOCTYPE")throw new XmlDoctypeError;let quote="",end=open+1;for(;end<raw.length;end++){const character=raw[end];if(quote)character===quote&&(quote="");else if(character==='"'||character==="'")quote=character;else{if(character==="<")throw new Error("Invalid XML markup");if(character===">")break}}if(end===raw.length)break;if(raw[open+1]==="/")depth=Math.max(0,depth-1);else{if(count(),depth+1>MAX_DEPTH)throw new LyraResourceLimitError;raw[end-1]!=="/"&&depth++}offset=end+1}}function parseXmlDocument(raw,ownerDocument,maxBytes,maxNodes,prepared=!1){prepared||preflightXml(raw,maxBytes,maxNodes);const DOMParserCtor=ownerDocument.defaultView?.DOMParser;if(!DOMParserCtor)throw new Error("DOMParser is unavailable without a browsing context.");return new DOMParserCtor().parseFromString(raw,"application/xml")}function isRenderedXmlChild(node){return node.nodeType===Node.ELEMENT_NODE||node.nodeType===Node.TEXT_NODE&&!!(node.textContent??"").trim()||node.nodeType===Node.COMMENT_NODE||node.nodeType===Node.CDATA_SECTION_NODE||node.nodeType===Node.PROCESSING_INSTRUCTION_NODE}function validateDocumentComplexity(node,maxNodes){const childCounts=new WeakMap,pending=[{node,depth:0}];let count=0;for(;pending.length;){const current=pending.pop();if(count++,count>maxNodes||current.depth>MAX_DEPTH)throw new LyraResourceLimitError;let child=current.node.lastChild,children=0;for(;child;){if(isRenderedXmlChild(child)&&children++,count+pending.length>=maxNodes)throw new LyraResourceLimitError;pending.push({node:child,depth:current.depth+1}),child=child.previousSibling}childCounts.set(current.node,children)}return childCounts}function resolvePath(root,path,budget){if(!Array.isArray(path)||budget&&budget.remaining--<=0)return null;let current=root;for(let i=0;i<path.length;i++){if(budget&&budget.remaining--<=0)return null;const segment=path[i];if(typeof segment=="string"){if(!segment.startsWith("@")||i!==path.length-1)return null;const attr=segment.slice(1);return!attr||!current.hasAttribute(attr)?null:{element:current,attr}}const children=current.children;if(!Number.isInteger(segment)||segment<0||segment>=children.length)return null;const child=children.item(segment);if(!child)return null;current=child}return{element:current}}class LyraXmlViewerBase extends LyraElement{}class LyraXmlViewer extends DocumentAnchorTarget(LyraXmlViewerBase){constructor(){super(...arguments),this.maxNodes=5e4,this.maxRows=5e3,this.maxBytes=26214400,this.sourceMode=!1,this.sourceSearchDirty=!0,this.sourceSearchIntent=0,this.sourceCopyIntent=0,this.sourceNavigationIntent=0,this.sourceSearchTask=Promise.resolve(0),this.sourceHitKeys=new Set,this.sourceSearchExact=!0,this.sourceSearchUnavailable=!1,this.hierarchy=new HierarchySourceController(this,{normalize:(value,key)=>this.normalizeSourceNode(value,key),onChange:()=>this.requestUpdate("sourceState",null),accepted:()=>{},payload:{maxUnits:2e6,maxRowUnits:327702,unitsOf:node=>node.name.length+node.path.length+(node.value?.length??0)+node.kind.length}}),this.src="",this.name="",this.copyable=!1,this.maxHeight="",this.anchorKinds=["node-path"],this.childCounts=new WeakMap,this.xmlState={kind:"idle"},this.expandedOverrides=new Map,this.activePath=null,this.activeAttr=null,this.activeSearchIndex=-1,this.searchQuery="",this.renderedHighlights=new Map,this.searchState=EMPTY_SEARCH,this.lastSearchLocale="",this.pendingSearchStateEvent=!1,this.generation=0,this.explicitRefresh=0,this.nodeElements=new Map,this.attributeElements=new Map,this.cursorElements=[],this.announcements=new ViewerAnnouncementController(this),this.copyFeedback=null,this.copyGeneration=0,this.detached=new DeferredTeardown(()=>this.releaseDetachedDocument()),this.cancelSourceAnchor=()=>{this.treeSource!==void 0&&(this.cancelPendingAnchor(),this.sourceNavigationIntent++,this.sourceAnchorTask&&(this.sourceAnchorTask=void 0,this.hierarchy.cancelPending()))}}static{this.defaultStrings={...super.defaultStrings,anchorJumped:LYRA_DEFAULT_anchorJumped,anchorJumpedToPage:LYRA_DEFAULT_anchorJumpedToPage,anchorNotFound:LYRA_DEFAULT_anchorNotFound,collapse:LYRA_DEFAULT_collapse,copied:LYRA_DEFAULT_copied,copy:LYRA_DEFAULT_copy,copyFailed:LYRA_DEFAULT_copyFailed,documentPreviewEmpty:LYRA_DEFAULT_documentPreviewEmpty,documentPreviewFailedToLoad:LYRA_DEFAULT_documentPreviewFailedToLoad,documentPreviewResourceTooLarge:LYRA_DEFAULT_documentPreviewResourceTooLarge,documentPreviewTypeDocument:LYRA_DEFAULT_documentPreviewTypeDocument,documentPreviewUrlNotAllowed:LYRA_DEFAULT_documentPreviewUrlNotAllowed,expand:LYRA_DEFAULT_expand,highlightOfTotal:LYRA_DEFAULT_highlightOfTotal,highlightWithLabel:LYRA_DEFAULT_highlightWithLabel,loading:LYRA_DEFAULT_loading,loadingDocument:LYRA_DEFAULT_loadingDocument,noData:LYRA_DEFAULT_noData,retry:LYRA_DEFAULT_retry,sourceSearchUnavailable:LYRA_DEFAULT_sourceSearchUnavailable,treeSourceError:LYRA_DEFAULT_treeSourceError,treeSourceSummary:LYRA_DEFAULT_treeSourceSummary,viewerSearchMatchCount:LYRA_DEFAULT_viewerSearchMatchCount,xmlViewerChildCount:LYRA_DEFAULT_xmlViewerChildCount,xmlViewerCollapseNode:LYRA_DEFAULT_xmlViewerCollapseNode,xmlViewerCopyDocument:LYRA_DEFAULT_xmlViewerCopyDocument,xmlViewerCopyNode:LYRA_DEFAULT_xmlViewerCopyNode,xmlViewerExpandNode:LYRA_DEFAULT_xmlViewerExpandNode,xmlViewerLabel:LYRA_DEFAULT_xmlViewerLabel,xmlViewerLimit:LYRA_DEFAULT_xmlViewerLimit,xmlViewerParseError:LYRA_DEFAULT_xmlViewerParseError,xmlViewerTooManyNodes:LYRA_DEFAULT_xmlViewerTooManyNodes}}static{this.styles=[LyraElement.styles,hierarchySourceStyles,specialistTokens,styles,viewerLoadingStyles,srOnly]}get treeSource(){return this._treeSource}set treeSource(value){const previous=this._treeSource;this._treeSource=value,this.cancelPendingAnchor(),this.generation++,this.beginAbortableLoad(),this.invalidateSourceSearch(),this.syncSource(!0),this.requestUpdate("treeSource",previous)}revealSourceKey(key){return this.sourceNavigationIntent++,this.sourceAnchorTask=void 0,this.cancelPendingAnchor(),this.treeSource===void 0?Promise.resolve(!1):this.hierarchy.reveal(key)}syncSource(force=!1){if(!this.hierarchy)return;const source=this.treeSource,query=this.searchQuery??"",locale=this.effectiveLocale,binding=this.sourceBinding;source===void 0&&!this.sourceMode&&binding?.source===void 0||!force&&binding&&binding.source===source&&binding.query===query&&binding.locale===locale||(this.cancelPendingAnchor(),this.invalidateSourceSearch(),this.hierarchy.update(source,locale,force,{search:query,hiddenKinds:[]}),source===this.treeSource&&query===(this.searchQuery??"")&&locale===this.effectiveLocale&&(this.sourceBinding={source,query,locale}))}normalizeSourceNode(value,key){const name=hierarchyField(value,"name"),path=hierarchyField(value,"path"),kind=hierarchyField(value,"kind"),text=hierarchyField(value,"value");if(typeof name!="string"||name.length>65536||typeof path!="string"||path.length>65536||path!==key||typeof kind!="string"||!INSPECTION_KINDS.has(kind)||text!==void 0&&(typeof text!="string"||text.length>65536))throw new TypeError("Invalid inspection node");return Object.freeze({name,path,kind,...text===void 0?{}:{value:text}})}invalidateSourceSearch(){this.sourceSearchIntent=(this.sourceSearchIntent??0)+1,this.sourceCopyIntent=(this.sourceCopyIntent??0)+1,this.sourceNavigationIntent=(this.sourceNavigationIntent??0)+1,this.sourceAnchorTask=void 0,this.sourceHits=void 0,this.sourceHitKeys?.clear(),this.sourceSearchExact=!0,this.sourceSearchUnavailable=!1,this.sourceSearchDirty=!0,this.activeSearchIndex!==void 0&&(this._treeSource!==void 0||this.sourceMode)&&(this.activeSearchIndex=-1),this.copyFeedback!==void 0&&this.resetCopyFeedback()}async searchSource(){this.sourceSearchDirty=!1;const intent=this.sourceSearchIntent,provider=this.treeSource;if(!(this.searchQuery??""))return this.hierarchy.cancelSearch(),this.hasUpdated&&this.emitSearchChange(),0;const result=await this.hierarchy.search();return intent!==this.sourceSearchIntent||provider!==this.treeSource||!this.isConnected||result.status==="stale"||result.status==="ready"&&!result.isCurrent()?0:(this.sourceHits=result.status==="ready"?result:void 0,this.sourceHitKeys=new Set(this.sourceHits?.value.hits.map(hit=>hit.key)??[]),this.sourceSearchExact=result.status==="ready"&&result.value.exhaustive,this.sourceSearchUnavailable=result.status!=="ready",this.activeSearchIndex=this.sourceHitKeys.size?0:-1,this.requestUpdate("sourceSearchResult",null),this.emitSearchChange(),this.sourceHits?.isCurrent()&&this.activeSearchIndex>=0&&await this.hierarchy.reveal(this.sourceHits.value.hits[0].key),await this.updateComplete,intent===this.sourceSearchIntent?this.sourceHitKeys.size:0)}async stepSourceSearch(direction){const navigation=++this.sourceNavigationIntent;this.sourceAnchorTask=void 0,this.cancelPendingAnchor();const hits=this.sourceHits;if(!hits?.isCurrent()||!hits.value.hits.length)return!1;const size=hits.value.hits.length;this.activeSearchIndex=this.activeSearchIndex<0?direction===1?0:size-1:(this.activeSearchIndex+direction+size)%size;const found=await this.hierarchy.reveal(hits.value.hits[this.activeSearchIndex].key);return!found||navigation!==this.sourceNavigationIntent||!hits.isCurrent()||this.sourceHits!==hits?!1:(this.emitSearchChange(),found)}sourceSummary(){const projection=this.hierarchy.projection;return projection?this.localize("treeSourceSummary",void 0,{visible:getNumberFormat(this.effectiveLocale).format(projection.rows.count),total:getNumberFormat(this.effectiveLocale).format(projection.total)}):""}hasSourceCopy(){const source=this.treeSource;try{const available=typeof source?.copy=="function";return source===this.treeSource&&available}catch{return!1}}async copySource(key,scope){const source=this.treeSource,epoch=this.hierarchy.epoch,owner=this.ownerDocument,intent=++this.sourceCopyIntent,current=()=>this.treeSource===source&&this.hierarchy.epoch===epoch&&this.ownerDocument===owner&&this.isConnected&&intent===this.sourceCopyIntent;this.resetCopyFeedback();const result=await this.hierarchy.copy(key,scope,this.effectiveMaxBytes);if(!current()||result.status==="stale")return;const feedback=key??"document";if(result.status!=="ready"){this.showSourceCopyFeedback(feedback,!1);const message=this.localize("copyFailed");current()&&this.announcements.announce(message);return}const accepted=()=>current()&&result.isCurrent();if(!accepted())return;let outcome;try{const clipboard=owner.defaultView?.navigator.clipboard,write=clipboard?.writeText;if(!accepted())return;typeof write!="function"?outcome=Object.freeze({ok:!1,text:result.value,reason:"unsupported",error:new Error("Clipboard is unavailable")}):(await write.call(clipboard,result.value),outcome=Object.freeze({ok:!0,text:result.value}))}catch(error){outcome=Object.freeze({ok:!1,text:result.value,reason:clipboardFailureReason(error),error})}if(accepted())if(this.showSourceCopyFeedback(feedback,outcome.ok),outcome.ok){const message=this.localize("copied");if(!accepted())return;this.announcements.announce(message),accepted()&&this.emit("lr-copy",outcome)}else{const message=this.localize("copyFailed");if(!accepted()||(this.announcements.announce(message),!accepted()))return;this.emit("lr-error"),accepted()&&this.emit("lr-copy-error",outcome)}}sourceCopyButton(node){if(!this.copyable||!this.hasSourceCopy())return nothing;const source=this.treeSource,epoch=this.hierarchy.epoch,key=node?.path??null,projection=this.hierarchy.projection,label=node?this.localize("xmlViewerCopyNode",void 0,{name:node.name}):this.localize("xmlViewerCopyDocument");return html`<button part="copy-button" type="button" aria-label=${this.copyButtonLabel(key??"document",label)}
|
|
2
2
|
@keydown=${event=>event.stopPropagation()}
|
|
3
3
|
@click=${event=>{event.stopPropagation();const button=event.currentTarget;button.isConnected&&button.getRootNode()===this.renderRoot&&!this.hierarchy.loading&&projection===this.hierarchy.projection&&source===this.treeSource&&epoch===this.hierarchy.epoch&&this.copySource(key,node?node.kind==="object"||node.kind==="array"||node.kind==="element"?"subtree":"node":"document")}}>${this.copyButtonLabel(key??"document",this.localize("copy"))}</button>`}showSourceCopyFeedback(key,success){const owner=this.ownerDocument.defaultView;owner&&this.showCopyFeedback(key,success?"success":"error",this.copyGeneration,owner)}renderSourceNode(node){const match=this.sourceHits?.isCurrent()&&this.sourceHitKeys.has(node.path),active=this.sourceHits?.value.hits[this.activeSearchIndex]?.key===node.path,highlight=this.renderedHighlights.get(node.path),source=this.treeSource,epoch=this.hierarchy.epoch,projection=this.hierarchy.projection,highlights=this.highlights,part=node.kind==="element"?"tag":node.kind==="attribute"?"attribute":node.kind==="comment"?"comment":node.kind==="processing-instruction"?"pi":"text";return html`<span part=${part} ?data-match=${match} ?data-active-match=${active}
|
|
4
4
|
?data-active=${this.activePath===node.path}
|
|
@@ -11,7 +11,7 @@ import{__decorate}from"tslib";import{html,nothing}from"lit";import{property,stat
|
|
|
11
11
|
${this.copyable&&this.hasSourceCopy()?html`<div part="toolbar">${this.sourceCopyButton()}</div>`:nothing}
|
|
12
12
|
${hierarchySourceView(this.hierarchy,{label:hostAriaLabel(this)??(this.name||this.localize("xmlViewerLabel")),rtl:this.effectiveDirection==="rtl",multiple:!1,loading:this.localize("loading"),error:this.localize("treeSourceError"),empty:this.localize("noData"),retry:this.localize("retry"),expand:this.localize("expand"),collapse:this.localize("collapse"),summary:this.sourceSummary(),name:node=>node.name,content:node=>this.renderSourceNode(node),select:()=>{}})}
|
|
13
13
|
${partial?html`<div part="search-status">${this.sourceSearchUnavailable?this.localize("sourceSearchUnavailable"):this.localize("viewerSearchMatchCount",void 0,{count:`≥${getNumberFormat(this.effectiveLocale).format(count)}`,pluralCount:count})}</div>`:nothing}
|
|
14
|
-
</div>`}get effectiveMaxNodes(){return Math.max(1,finiteCount(this.maxNodes,MAX_NODES,5e5))}get effectiveMaxRows(){return Math.max(1,finiteCount(this.maxRows,MAX_RENDERED_ROWS,5e4))}get effectiveMaxBytes(){return Math.max(1,finiteCount(this.maxBytes,26214400,262144e3))}get xml(){return this._xml}set xml(value){if(value===this._xml)return;const old=this._xml;this._xml=value,this.requestUpdate("xml",old),value!==void 0&&this.parseInline(value)}get source(){return resolveViewerSource(this.src,this._xml)}set source(_value){}requestUpdate(...args){this._treeSource!==void 0&&args[0]===void 0&&(this.invalidateSourceSearch(),this.syncSource(!0)),args[0]===void 0&&(this.explicitRefresh=(this.explicitRefresh??0)+1),super.requestUpdate(...args)}syncCursors(){const next=[this.activePath===null?void 0:this.nodeElements.get(this.activePath),this.activeAttr===null?void 0:this.attributeElements.get(this.activeAttr),this.nodeElements.get(this.searchState.ordered[this.activeSearchIndex]??"")],attributes=["data-active","data-active","data-active-match"];next.forEach((element,index)=>{this.cursorElements[index]!==element&&this.cursorElements[index]?.removeAttribute(attributes[index]),element?.setAttribute(attributes[index],"")}),this.cursorElements=next}get safeExpandDepth(){return this.expandDepth===void 0?void 0:finiteCount(this.expandDepth)}willUpdate(changed){const wasSource=this.sourceMode;if(this.syncSource(),super.willUpdate(changed),this.treeSource!==void 0){this.sourceMode=!0,this.treeMemo=void 0,(changed.has("maxNodes")||changed.has("maxBytes"))&&this._xml!==void 0&&this.parseInline(this._xml),this.sourceSearchDirty&&(this.sourceSearchTask=this.searchSource());return}this.sourceMode=!1,wasSource&&(this.resetSearchForSourceReplacement(),this._xml!==void 0?this.parseInline(this._xml):this.scheduleAfterUpdate(()=>{this.loadFromSrc()})),(changed.has("maxNodes")||changed.has("maxBytes"))&&this._xml!==void 0&&this.parseInline(this._xml),this.hasUpdated&&(changed.has("src")||changed.has("xml"))&&this.resetCopyFeedback(),(changed.has("src")||changed.has("xml"))&&(this.pendingSearchStateEvent||=this.resetSearchForSourceReplacement());const locale=this.effectiveLocale;this.lastSearchLocale&&locale!==this.lastSearchLocale&&this.xmlState.kind==="loaded"&&(this.searchState=this.computeSearch(this.xmlState.doc),this.activeSearchIndex=this.searchState.ordered.length?Math.min(Math.max(0,this.activeSearchIndex),this.searchState.ordered.length-1):-1,this.searchQuery!==""&&(this.pendingSearchStateEvent=!0)),this.lastSearchLocale=locale}updated(changed){if(super.updated(changed),this.treeSource!==void 0){const source=this.treeSource,epoch=this.hierarchy.epoch,binding=this.sourceBinding,owner=this.ownerDocument,current=()=>this.isConnected&&this.ownerDocument===owner&&source===this.treeSource&&epoch===this.hierarchy.epoch&&binding===this.sourceBinding,error=this.hierarchy.error||this.hierarchy.rowError,message=error?this.localize("treeSourceError"):this.hierarchy.loading?this.localize("loading"):this.sourceSummary();if(!current()||(this.announcements.transition("source",error?"error":this.hierarchy.loading?"loading":"loaded",message),!current()))return;error&&this.sourceAnnouncement!==message&&this.emit("lr-render-error",{error}),current()&&(this.sourceAnnouncement=error?message:void 0);return}this.syncCursors(),this.announcements.transition("load",this.xmlState.kind,this.xmlState.kind==="error"?this.xmlState.message:this.localize("loadingDocument")),(changed.has("src")||changed.has("xml")||changed.has("maxNodes")||changed.has("maxBytes"))&&this._xml===void 0&&this.scheduleAfterUpdate(()=>{this.loadFromSrc()}),this.pendingSearchStateEvent&&(this.pendingSearchStateEvent=!1,this.emitSearchChange())}connectedCallback(){super.connectedCallback(),this.announcements.connect(),this.sourceBinding=void 0,this.requestUpdate("sourceReconnect",null),this.renderRoot.addEventListener("click",this.cancelSourceAnchor,!0),this.renderRoot.addEventListener("keydown",this.cancelSourceAnchor,!0);const moved=this.detached.cancel();this.hasUpdated&&this.src&&this._xml===void 0&&!moved&&this.scheduleAfterUpdate(()=>{this.loadFromSrc()})}disconnectedCallback(){this.invalidateSourceSearch(),this.sourceBinding=void 0,this.renderRoot.removeEventListener("click",this.cancelSourceAnchor,!0),this.renderRoot.removeEventListener("keydown",this.cancelSourceAnchor,!0),this.announcements.disconnect(),this.resetCopyFeedback(),super.disconnectedCallback(),this.detached.schedule()}releaseDetachedDocument(){this.generation++,this.beginAbortableLoad(),this._xml===void 0&&(this.xmlState={kind:"idle"})}adoptedCallback(){super.adoptedCallback(),this.invalidateSourceSearch(),this.sourceBinding=void 0,this.hierarchy.adopted(),this.detached.flush(),this.announcements.adopted(),this.resetCopyFeedback()}parseInline(raw){const generation=++this.generation;this.pendingSearchStateEvent||=this.resetSearchForSourceReplacement();try{this.setDoc(parseXmlDocument(raw,this.ownerDocument,this.effectiveMaxBytes,this.effectiveMaxNodes),generation)}catch(error){this.xmlState={kind:"error",message:this.localize(isResourceLimitError(error)?"xmlViewerTooManyNodes":"xmlViewerParseError")},this.emit("lr-render-error",{error})}}async loadFromSrc(){if(this.treeSource!==void 0||this._xml!==void 0)return;const generation=++this.generation,signal=this.beginAbortableLoad();if(this.pendingSearchStateEvent||=this.resetSearchForSourceReplacement(),!this.src){this.xmlState={kind:"idle"};return}const fetchTarget=resolveOwnerFetchTarget(this,this.src);if(!fetchTarget){const error=new LyraUserFacingError(this.localize("documentPreviewUrlNotAllowed"));this.xmlState={kind:"error",message:error.message},this.emit("lr-render-error",{error});return}this.xmlState={kind:"loading"};try{const response=await fetchTarget.view.fetch(fetchTarget.url,signal?{signal}:void 0);if(!this.isConnected||generation!==this.generation)return;if(!response.ok)throw new Error(`${response.status} ${response.statusText}`);const text=await readResponseText(response,this.effectiveMaxBytes);if(!this.isConnected||generation!==this.generation)return;preflightXml(text,this.effectiveMaxBytes,this.effectiveMaxNodes),await yieldViewerTask(this.ownerDocument.defaultView,()=>this.isConnected&&generation===this.generation),this.setDoc(parseXmlDocument(text,this.ownerDocument,this.effectiveMaxBytes,this.effectiveMaxNodes,!0),generation)}catch(error){if(isAbortError(error)||!this.isConnected||generation!==this.generation)return;this.xmlState={kind:"error",message:this.localize(error instanceof XmlDoctypeError?"xmlViewerParseError":isResourceLimitError(error)?"documentPreviewResourceTooLarge":"documentPreviewFailedToLoad")},this.emit("lr-render-error",{error})}}resetSearchForSourceReplacement(){if(this.treeSource!==void 0)return!1;const changed=this.searchQuery!==""||this.searchState.ordered.length>0||!this.searchState.matchCountExact||this.activeSearchIndex!==-1;return this.searchQuery="",this.searchState=EMPTY_SEARCH,this.activeSearchIndex=-1,changed}setDoc(doc,generation){if(generation!==this.generation)return;const parseError=findParserError(doc);if(parseError){this.xmlState={kind:"error",message:this.localize("xmlViewerParseError")},this.emit("lr-render-error",{error:new Error(parseError)});return}try{this.childCounts=validateDocumentComplexity(doc,this.effectiveMaxNodes)}catch(error){this.xmlState={kind:"error",message:this.localize("xmlViewerTooManyNodes")},this.emit("lr-render-error",{error});return}if(this.xmlState={kind:"loaded",doc},this.treeSource!==void 0)return;const next=this.computeSearch(doc);if(this.searchState=next,this.searchQuery.trim()&&(this.activeSearchIndex=next.ordered.length?Math.min(Math.max(this.activeSearchIndex,0),next.ordered.length-1):-1,this.emitSearchChange()),this.expandedOverrides.size){let pruned=null;for(const key of this.expandedOverrides.keys())next.paths.has(key)||(pruned??=new Map(this.expandedOverrides),pruned.delete(key));pruned&&(this.expandedOverrides=pruned)}}computeSearch(doc){const locale=this.effectiveLocale,boundedQuery=boundedViewerSearchQuery(this.searchQuery,locale),query=boundedQuery.needle,budget=new ViewerSearchWorkBudget,matches=new Set,tagMatches=new Set,attrMatches=new Set,textMatches=new Set,forceExpand=new Set,paths=new Set,ordered=[];let matchCountExact=boundedQuery.accepted;const markAncestors=path=>{for(let i=path.length-1;i>=0;i--)forceExpand.add(JSON.stringify(path.slice(0,i)))},walk=(el,path)=>{const pathKey=JSON.stringify(path);if(paths.add(pathKey),query&&matchCountExact){let hit=!1;budget.includes(el.tagName,query,locale)&&(tagMatches.add(pathKey),hit=!0);for(const attr of el.attributes)if((budget.includes(attr.name,query,locale)||budget.includes(attr.value,query,locale))&&(attrMatches.add(attrKey(pathKey,attr.name)),hit=!0),!budget.complete)break;const ownTextParts=function*(){for(const child of el.childNodes)child.nodeType===Node.TEXT_NODE&&(yield child.textContent??"")};if(budget.complete&&budget.includesJoined(ownTextParts(),query,locale)&&(textMatches.add(pathKey),hit=!0),budget.complete||(matchCountExact=!1),hit)if(ordered.length===MAX_SEARCH_MATCHES){matchCountExact=!1,tagMatches.delete(pathKey),textMatches.delete(pathKey);for(const attr of el.attributes)attrMatches.delete(attrKey(pathKey,attr.name))}else matches.add(pathKey),ordered.push(pathKey),forceExpand.add(pathKey),markAncestors(path)}elementChildren(el).forEach((child,i)=>walk(child,[...path,i]))};return doc.documentElement&&walk(doc.documentElement,[]),{matches,tagMatches,attrMatches,textMatches,forceExpand,paths,ordered,matchCountExact}}sourcePathKey(path){if(!Array.isArray(path)||path.length>MAX_DEPTH)return;const segments=[];for(let index=0;index<path.length;index++){const segment=hierarchyField(path,String(index));if(typeof segment=="number"&&Number.isSafeInteger(segment)&&segment>=0)segments.push(segment);else if(typeof segment=="string"&&index===path.length-1&&segment.startsWith("@")&&segment.length>1&&segment.length<=65536)segments.push(segment);else return}const key=JSON.stringify(segments);return key.length<=65536?key:void 0}async applyAnchor(anchor){if(this.treeSource!==void 0){const key=anchor.kind==="node-path"?this.sourcePathKey(anchor.path):void 0;if(key===void 0)return!1;const task={};this.sourceAnchorTask=task;try{return!await this.hierarchy.reveal(key)||this.sourceAnchorTask!==task?!1:(this.activePath=key,await this.updateComplete,this.sourceAnchorTask===task)}finally{this.sourceAnchorTask===task&&(this.sourceAnchorTask=void 0)}}if(anchor.kind!=="node-path"||this.xmlState.kind!=="loaded"||!this.xmlState.doc.documentElement)return!1;const resolved=resolvePath(this.xmlState.doc.documentElement,anchor.path);if(!resolved?.element)return!1;const numericPath=anchor.path.filter(s=>typeof s=="number");this.expandAncestors(anchor.path);const pathKey=JSON.stringify(numericPath);return this.activePath=pathKey,this.activeAttr=resolved.attr?attrKey(pathKey,resolved.attr):null,await this.updateComplete,this.renderRoot.querySelector('[part="node"][data-active]')!==null}resolveHighlights(){const byPath=new Map;if(this.treeSource!==void 0){const admitted=[],seen2=new Set;for(const highlight of prioritizedHighlightCandidates(this.highlights,this.activeHighlightId)){if(seen2.has(highlight.id))continue;seen2.add(highlight.id);const key=highlight.anchor.kind==="node-path"?this.sourcePathKey(highlight.anchor.path):void 0;if(key!==void 0&&admitted.push({highlight,key}),admitted.length>=MAX_PAINTED_HIGHLIGHTS)break}return admitted.forEach(({highlight,key},index)=>{byPath.has(key)||byPath.set(key,{highlight,index,total:admitted.length})}),byPath}if(this.xmlState.kind!=="loaded")return byPath;const root=this.xmlState.doc.documentElement;if(!root)return byPath;const seen=new Set,resolved=[],candidates=prioritizedHighlightCandidates(this.highlights,this.activeHighlightId),resolutionBudget={remaining:this.effectiveMaxNodes};for(const highlight of candidates)if(!seen.has(highlight.id)&&(seen.add(highlight.id),highlight.anchor.kind==="node-path"&&resolvePath(root,highlight.anchor.path,resolutionBudget)&&(resolved.push({highlight,pathKey:JSON.stringify(highlight.anchor.path.filter(s=>typeof s=="number"))}),resolved.length>=MAX_PAINTED_HIGHLIGHTS)))break;return resolved.forEach(({highlight,pathKey},index)=>{byPath.has(pathKey)||byPath.set(pathKey,{highlight,index,total:resolved.length})}),byPath}highlightActionLabel(highlight,index,total){if(highlight.label)return this.localize("highlightWithLabel",void 0,{label:highlight.label});const numberFormat=getNumberFormat(this.effectiveLocale);return this.localize("highlightOfTotal",void 0,{index:numberFormat.format(index+1),total:numberFormat.format(total)})}expandAncestors(path,includeSelf=!1){let next;const expand=(key,depth)=>{this.isExpanded(key,depth)||(next??=new Map(this.expandedOverrides),next.set(key,!0))};for(let i=0;i<path.length;i++)typeof path[i]=="number"&&expand(JSON.stringify(path.slice(0,i)),i);includeSelf&&expand(JSON.stringify(path),path.length),next&&(this.expandedOverrides=next)}async search(query){if(this.treeSource!==void 0){this.cancelPendingAnchor(),this.searchQuery=query,this.invalidateSourceSearch(),this.syncSource();const intent=this.sourceSearchIntent;return this.requestUpdate("sourceSearchIntent",null),await this.updateComplete,intent===this.sourceSearchIntent?this.sourceSearchTask:0}return this.searchQuery=query,this.searchState=this.xmlState.kind==="loaded"?this.computeSearch(this.xmlState.doc):EMPTY_SEARCH,this.activeSearchIndex=this.searchState.ordered.length?0:-1,this.requestUpdate(),this.emitSearchChange(),this.activeSearchIndex>=0&&await this.scrollActiveMatchIntoView(),this.searchState.ordered.length}async searchNext(){return this.treeSource!==void 0?this.stepSourceSearch(1):this.searchState.ordered.length?(this.activeSearchIndex=(this.activeSearchIndex+1)%this.searchState.ordered.length,this.emitSearchChange(),await this.scrollActiveMatchIntoView(),!0):!1}async searchPrevious(){return this.treeSource!==void 0?this.stepSourceSearch(-1):this.searchState.ordered.length?(this.activeSearchIndex=(this.activeSearchIndex-1+this.searchState.ordered.length)%this.searchState.ordered.length,this.emitSearchChange(),await this.scrollActiveMatchIntoView(),!0):!1}clearSearch(){if(this.cancelPendingAnchor(),this.treeSource!==void 0){this.searchQuery="",this.hierarchy.cancelSearch(),this.invalidateSourceSearch(),this.syncSource(),this.requestUpdate("sourceSearchIntent",null);return}this.searchQuery="",this.searchState=this.xmlState.kind==="loaded"?this.computeSearch(this.xmlState.doc):EMPTY_SEARCH,this.activeSearchIndex=-1,this.requestUpdate(),this.emitSearchChange()}async scrollActiveMatchIntoView(){const pathKey=this.searchState.ordered[this.activeSearchIndex];if(pathKey===void 0)return;this.expandAncestors(JSON.parse(pathKey),!0),await this.updateComplete,this.renderRoot.querySelector("[data-active-match]")?.scrollIntoView({behavior:prefersReducedMotion(this)?"auto":"smooth",block:"center"})}emitSearchChange(){this.emit("lr-search-change",{query:this.searchQuery,matchCount:this.treeSource!==void 0?this.sourceHitKeys.size:this.searchState.ordered.length,matchCountExact:this.treeSource!==void 0?this.sourceSearchExact:this.searchState.matchCountExact,activeIndex:this.activeSearchIndex})}toggleNode(pathKey,expanded){const next=new Map(this.expandedOverrides);next.set(pathKey,!expanded),this.expandedOverrides=next}isExpanded(pathKey,depth){const override=this.expandedOverrides.get(pathKey);if(override!==void 0)return override;if(this.searchState.forceExpand.has(pathKey))return!0;const expandDepth=this.safeExpandDepth;return!(expandDepth!==void 0&&depth>=expandDepth)}cancelCopyTimer(){const timer=this.copyTimer;this.copyTimer=void 0,timer&&timer.owner.clearTimeout(timer.handle)}resetCopyFeedback(){this.copyGeneration++,this.cancelCopyTimer(),this.copyFeedback=null}showCopyFeedback(key,status,generation,owner){this.copyFeedback={key,status},this.cancelCopyTimer();let handle=0;handle=owner.setTimeout(()=>{this.copyTimer?.owner!==owner||this.copyTimer.handle!==handle||this.copyTimer.generation!==generation||generation!==this.copyGeneration||!this.isConnected||this.ownerDocument.defaultView!==owner||(this.copyTimer=void 0,this.copyFeedback=null)},1500),this.copyTimer={owner,handle,generation}}async copyText(text,key){if(this.treeSource!==void 0)return;const owner=this.isConnected?this.ownerDocument.defaultView:null,generation=++this.copyGeneration;this.cancelCopyTimer(),this.copyFeedback=null;const outcome=await writeClipboardText(owner,text);if(!(!owner||!this.isConnected||generation!==this.copyGeneration||this.ownerDocument.defaultView!==owner)){if(outcome.ok){this.showCopyFeedback(key,"success",generation,owner),this.emit("lr-copy",outcome);return}this.showCopyFeedback(key,"error",generation,owner),this.emit("lr-error"),this.emit("lr-copy-error",outcome)}}serializeXml(node){const XMLSerializerCtor=this.isConnected?this.ownerDocument.defaultView?.XMLSerializer:void 0;return XMLSerializerCtor?new XMLSerializerCtor().serializeToString(node):null}copySerializedXml(node,key){const text=this.serializeXml(node);text!==null&&this.copyText(text,key)}copyButtonLabel(key,rest){const feedback=this.copyFeedback?.key===key?this.copyFeedback.status:void 0;return feedback==="success"?this.localize("copied"):feedback==="error"?this.localize("copyFailed"):rest}renderCopyButton(getNode,name,key){if(!this.copyable)return nothing;const label=this.copyButtonLabel(key,this.localize("xmlViewerCopyNode",void 0,{name}));return html`
|
|
14
|
+
</div>`}get effectiveMaxNodes(){return Math.max(1,finiteCount(this.maxNodes,MAX_NODES,5e5))}get effectiveMaxRows(){return Math.max(1,finiteCount(this.maxRows,MAX_RENDERED_ROWS,5e4))}get effectiveMaxBytes(){return Math.max(1,finiteCount(this.maxBytes,26214400,262144e3))}get xml(){return this._xml}set xml(value){if(value===this._xml)return;const old=this._xml;this._xml=value,this.requestUpdate("xml",old),value!==void 0&&this.parseInline(value)}get source(){return resolveViewerSource(this.src,this._xml)}set source(_value){}requestUpdate(...args){this._treeSource!==void 0&&args[0]===void 0&&(this.invalidateSourceSearch(),this.syncSource(!0)),args[0]===void 0&&(this.explicitRefresh=(this.explicitRefresh??0)+1),super.requestUpdate(...args)}syncCursors(){const next=[this.activePath===null?void 0:this.nodeElements.get(this.activePath),this.activeAttr===null?void 0:this.attributeElements.get(this.activeAttr),this.nodeElements.get(this.searchState.ordered[this.activeSearchIndex]??"")],attributes=["data-active","data-active","data-active-match"];next.forEach((element,index)=>{this.cursorElements[index]!==element&&this.cursorElements[index]?.removeAttribute(attributes[index]),element?.setAttribute(attributes[index],"")}),this.cursorElements=next}get safeExpandDepth(){return this.expandDepth===void 0?void 0:finiteCount(this.expandDepth)}willUpdate(changed){const wasSource=this.sourceMode;if(this.syncSource(),super.willUpdate(changed),this.treeSource!==void 0){this.sourceMode=!0,this.treeMemo=void 0,(changed.has("maxNodes")||changed.has("maxBytes"))&&this._xml!==void 0&&this.parseInline(this._xml),this.sourceSearchDirty&&(this.sourceSearchTask=this.searchSource());return}this.sourceMode=!1,wasSource&&(this.resetSearchForSourceReplacement(),this._xml!==void 0?this.parseInline(this._xml):this.scheduleAfterUpdate(()=>{this.loadFromSrc()})),(changed.has("maxNodes")||changed.has("maxBytes"))&&this._xml!==void 0&&this.parseInline(this._xml),this.hasUpdated&&(changed.has("src")||changed.has("xml"))&&this.resetCopyFeedback(),(changed.has("src")||changed.has("xml"))&&(this.pendingSearchStateEvent||=this.resetSearchForSourceReplacement());const locale=this.effectiveLocale;this.lastSearchLocale&&locale!==this.lastSearchLocale&&this.xmlState.kind==="loaded"&&(this.searchState=this.computeSearch(this.xmlState.doc),this.activeSearchIndex=this.searchState.ordered.length?Math.min(Math.max(0,this.activeSearchIndex),this.searchState.ordered.length-1):-1,this.searchQuery!==""&&(this.pendingSearchStateEvent=!0)),this.lastSearchLocale=locale}updated(changed){if(super.updated(changed),this.treeSource!==void 0){const source=this.treeSource,epoch=this.hierarchy.epoch,binding=this.sourceBinding,owner=this.ownerDocument,current=()=>this.isConnected&&this.ownerDocument===owner&&source===this.treeSource&&epoch===this.hierarchy.epoch&&binding===this.sourceBinding,error=this.hierarchy.error||this.hierarchy.rowError,message=error?this.localize("treeSourceError"):this.hierarchy.loading?this.localize("loading"):this.sourceSummary();if(!current()||(this.announcements.transition("source",error?"error":this.hierarchy.loading?"loading":"loaded",message),!current()))return;error&&this.sourceAnnouncement!==message&&this.emit("lr-render-error",{error}),current()&&(this.sourceAnnouncement=error?message:void 0);return}this.syncCursors(),this.announcements.transition("load",this.xmlState.kind,this.xmlState.kind==="error"?this.xmlState.message:this.localize("loadingDocument")),(changed.has("src")||changed.has("xml")||changed.has("maxNodes")||changed.has("maxBytes"))&&this._xml===void 0&&this.scheduleAfterUpdate(()=>{this.loadFromSrc()}),this.pendingSearchStateEvent&&(this.pendingSearchStateEvent=!1,this.emitSearchChange())}connectedCallback(){super.connectedCallback(),this.announcements.connect(),this.sourceBinding=void 0,this.requestUpdate("sourceReconnect",null),this.renderRoot.addEventListener("click",this.cancelSourceAnchor,!0),this.renderRoot.addEventListener("keydown",this.cancelSourceAnchor,!0);const moved=this.detached.cancel();this.hasUpdated&&this.src&&this._xml===void 0&&(!moved||this.xmlState.kind==="loading")&&this.scheduleAfterUpdate(()=>{this.loadFromSrc()})}disconnectedCallback(){this.xmlState.kind==="loading"&&this.generation++,this.invalidateSourceSearch(),this.sourceBinding=void 0,this.renderRoot.removeEventListener("click",this.cancelSourceAnchor,!0),this.renderRoot.removeEventListener("keydown",this.cancelSourceAnchor,!0),this.announcements.disconnect(),this.resetCopyFeedback(),super.disconnectedCallback(),this.detached.schedule()}releaseDetachedDocument(){this.generation++,this.beginAbortableLoad(),this._xml===void 0&&(this.xmlState={kind:"idle"})}adoptedCallback(){super.adoptedCallback(),this.invalidateSourceSearch(),this.sourceBinding=void 0,this.hierarchy.adopted(),this.detached.flush(),this.announcements.adopted(),this.resetCopyFeedback()}parseInline(raw){const generation=++this.generation;this.pendingSearchStateEvent||=this.resetSearchForSourceReplacement();try{this.setDoc(parseXmlDocument(raw,this.ownerDocument,this.effectiveMaxBytes,this.effectiveMaxNodes),generation)}catch(error){this.xmlState={kind:"error",message:this.localize(isResourceLimitError(error)?"xmlViewerTooManyNodes":"xmlViewerParseError")},this.emit("lr-render-error",{error})}}async loadFromSrc(){if(this.treeSource!==void 0||this._xml!==void 0)return;const generation=++this.generation,signal=this.beginAbortableLoad();if(this.pendingSearchStateEvent||=this.resetSearchForSourceReplacement(),!this.src){this.xmlState={kind:"idle"};return}const fetchTarget=resolveOwnerFetchTarget(this,this.src);if(!fetchTarget){const error=new LyraUserFacingError(this.localize("documentPreviewUrlNotAllowed"));this.xmlState={kind:"error",message:error.message},this.emit("lr-render-error",{error});return}this.xmlState={kind:"loading"};try{const response=await fetchTarget.view.fetch(fetchTarget.url,signal?{signal}:void 0);if(signal?.aborted||!this.isConnected||generation!==this.generation)return;if(!response.ok)throw new Error(`${response.status} ${response.statusText}`);const text=await readResponseText(response,this.effectiveMaxBytes);if(signal?.aborted||!this.isConnected||generation!==this.generation||(preflightXml(text,this.effectiveMaxBytes,this.effectiveMaxNodes),await yieldViewerTask(this.ownerDocument.defaultView,()=>!signal?.aborted&&this.isConnected&&generation===this.generation),signal?.aborted||!this.isConnected||generation!==this.generation))return;this.setDoc(parseXmlDocument(text,this.ownerDocument,this.effectiveMaxBytes,this.effectiveMaxNodes,!0),generation)}catch(error){if(signal?.aborted||!this.isConnected||generation!==this.generation)return;this.xmlState={kind:"error",message:this.localize(error instanceof XmlDoctypeError?"xmlViewerParseError":isResourceLimitError(error)?"documentPreviewResourceTooLarge":"documentPreviewFailedToLoad")},this.emit("lr-render-error",{error})}}resetSearchForSourceReplacement(){if(this.treeSource!==void 0)return!1;const changed=this.searchQuery!==""||this.searchState.ordered.length>0||!this.searchState.matchCountExact||this.activeSearchIndex!==-1;return this.searchQuery="",this.searchState=EMPTY_SEARCH,this.activeSearchIndex=-1,changed}setDoc(doc,generation){if(generation!==this.generation)return;const parseError=findParserError(doc);if(parseError){this.xmlState={kind:"error",message:this.localize("xmlViewerParseError")},this.emit("lr-render-error",{error:new Error(parseError)});return}try{this.childCounts=validateDocumentComplexity(doc,this.effectiveMaxNodes)}catch(error){this.xmlState={kind:"error",message:this.localize("xmlViewerTooManyNodes")},this.emit("lr-render-error",{error});return}if(this.xmlState={kind:"loaded",doc},this.treeSource!==void 0)return;const next=this.computeSearch(doc);if(this.searchState=next,this.searchQuery.trim()&&(this.activeSearchIndex=next.ordered.length?Math.min(Math.max(this.activeSearchIndex,0),next.ordered.length-1):-1,this.emitSearchChange()),this.expandedOverrides.size){let pruned=null;for(const key of this.expandedOverrides.keys())next.paths.has(key)||(pruned??=new Map(this.expandedOverrides),pruned.delete(key));pruned&&(this.expandedOverrides=pruned)}}computeSearch(doc){const locale=this.effectiveLocale,boundedQuery=boundedViewerSearchQuery(this.searchQuery,locale),query=boundedQuery.needle,budget=new ViewerSearchWorkBudget,matches=new Set,tagMatches=new Set,attrMatches=new Set,textMatches=new Set,forceExpand=new Set,paths=new Set,ordered=[];let matchCountExact=boundedQuery.accepted;const markAncestors=path=>{for(let i=path.length-1;i>=0;i--)forceExpand.add(JSON.stringify(path.slice(0,i)))},walk=(el,path)=>{const pathKey=JSON.stringify(path);if(paths.add(pathKey),query&&matchCountExact){let hit=!1;budget.includes(el.tagName,query,locale)&&(tagMatches.add(pathKey),hit=!0);for(const attr of el.attributes)if((budget.includes(attr.name,query,locale)||budget.includes(attr.value,query,locale))&&(attrMatches.add(attrKey(pathKey,attr.name)),hit=!0),!budget.complete)break;const ownTextParts=function*(){for(const child of el.childNodes)child.nodeType===Node.TEXT_NODE&&(yield child.textContent??"")};if(budget.complete&&budget.includesJoined(ownTextParts(),query,locale)&&(textMatches.add(pathKey),hit=!0),budget.complete||(matchCountExact=!1),hit)if(ordered.length===MAX_SEARCH_MATCHES){matchCountExact=!1,tagMatches.delete(pathKey),textMatches.delete(pathKey);for(const attr of el.attributes)attrMatches.delete(attrKey(pathKey,attr.name))}else matches.add(pathKey),ordered.push(pathKey),forceExpand.add(pathKey),markAncestors(path)}elementChildren(el).forEach((child,i)=>walk(child,[...path,i]))};return doc.documentElement&&walk(doc.documentElement,[]),{matches,tagMatches,attrMatches,textMatches,forceExpand,paths,ordered,matchCountExact}}sourcePathKey(path){if(!Array.isArray(path)||path.length>MAX_DEPTH)return;const segments=[];for(let index=0;index<path.length;index++){const segment=hierarchyField(path,String(index));if(typeof segment=="number"&&Number.isSafeInteger(segment)&&segment>=0)segments.push(segment);else if(typeof segment=="string"&&index===path.length-1&&segment.startsWith("@")&&segment.length>1&&segment.length<=65536)segments.push(segment);else return}const key=JSON.stringify(segments);return key.length<=65536?key:void 0}async applyAnchor(anchor){if(this.treeSource!==void 0){const key=anchor.kind==="node-path"?this.sourcePathKey(anchor.path):void 0;if(key===void 0)return!1;const task={};this.sourceAnchorTask=task;try{return!await this.hierarchy.reveal(key)||this.sourceAnchorTask!==task?!1:(this.activePath=key,await this.updateComplete,this.sourceAnchorTask===task)}finally{this.sourceAnchorTask===task&&(this.sourceAnchorTask=void 0)}}if(anchor.kind!=="node-path"||this.xmlState.kind!=="loaded"||!this.xmlState.doc.documentElement)return!1;const resolved=resolvePath(this.xmlState.doc.documentElement,anchor.path);if(!resolved?.element)return!1;const numericPath=anchor.path.filter(s=>typeof s=="number");this.expandAncestors(anchor.path);const pathKey=JSON.stringify(numericPath);return this.activePath=pathKey,this.activeAttr=resolved.attr?attrKey(pathKey,resolved.attr):null,await this.updateComplete,this.renderRoot.querySelector('[part="node"][data-active]')!==null}resolveHighlights(){const byPath=new Map;if(this.treeSource!==void 0){const admitted=[],seen2=new Set;for(const highlight of prioritizedHighlightCandidates(this.highlights,this.activeHighlightId)){if(seen2.has(highlight.id))continue;seen2.add(highlight.id);const key=highlight.anchor.kind==="node-path"?this.sourcePathKey(highlight.anchor.path):void 0;if(key!==void 0&&admitted.push({highlight,key}),admitted.length>=MAX_PAINTED_HIGHLIGHTS)break}return admitted.forEach(({highlight,key},index)=>{byPath.has(key)||byPath.set(key,{highlight,index,total:admitted.length})}),byPath}if(this.xmlState.kind!=="loaded")return byPath;const root=this.xmlState.doc.documentElement;if(!root)return byPath;const seen=new Set,resolved=[],candidates=prioritizedHighlightCandidates(this.highlights,this.activeHighlightId),resolutionBudget={remaining:this.effectiveMaxNodes};for(const highlight of candidates)if(!seen.has(highlight.id)&&(seen.add(highlight.id),highlight.anchor.kind==="node-path"&&resolvePath(root,highlight.anchor.path,resolutionBudget)&&(resolved.push({highlight,pathKey:JSON.stringify(highlight.anchor.path.filter(s=>typeof s=="number"))}),resolved.length>=MAX_PAINTED_HIGHLIGHTS)))break;return resolved.forEach(({highlight,pathKey},index)=>{byPath.has(pathKey)||byPath.set(pathKey,{highlight,index,total:resolved.length})}),byPath}highlightActionLabel(highlight,index,total){if(highlight.label)return this.localize("highlightWithLabel",void 0,{label:highlight.label});const numberFormat=getNumberFormat(this.effectiveLocale);return this.localize("highlightOfTotal",void 0,{index:numberFormat.format(index+1),total:numberFormat.format(total)})}expandAncestors(path,includeSelf=!1){let next;const expand=(key,depth)=>{this.isExpanded(key,depth)||(next??=new Map(this.expandedOverrides),next.set(key,!0))};for(let i=0;i<path.length;i++)typeof path[i]=="number"&&expand(JSON.stringify(path.slice(0,i)),i);includeSelf&&expand(JSON.stringify(path),path.length),next&&(this.expandedOverrides=next)}async search(query){if(this.treeSource!==void 0){this.cancelPendingAnchor(),this.searchQuery=query,this.invalidateSourceSearch(),this.syncSource();const intent=this.sourceSearchIntent;return this.requestUpdate("sourceSearchIntent",null),await this.updateComplete,intent===this.sourceSearchIntent?this.sourceSearchTask:0}return this.searchQuery=query,this.searchState=this.xmlState.kind==="loaded"?this.computeSearch(this.xmlState.doc):EMPTY_SEARCH,this.activeSearchIndex=this.searchState.ordered.length?0:-1,this.requestUpdate(),this.emitSearchChange(),this.activeSearchIndex>=0&&await this.scrollActiveMatchIntoView(),this.searchState.ordered.length}async searchNext(){return this.treeSource!==void 0?this.stepSourceSearch(1):this.searchState.ordered.length?(this.activeSearchIndex=(this.activeSearchIndex+1)%this.searchState.ordered.length,this.emitSearchChange(),await this.scrollActiveMatchIntoView(),!0):!1}async searchPrevious(){return this.treeSource!==void 0?this.stepSourceSearch(-1):this.searchState.ordered.length?(this.activeSearchIndex=(this.activeSearchIndex-1+this.searchState.ordered.length)%this.searchState.ordered.length,this.emitSearchChange(),await this.scrollActiveMatchIntoView(),!0):!1}clearSearch(){if(this.cancelPendingAnchor(),this.treeSource!==void 0){this.searchQuery="",this.hierarchy.cancelSearch(),this.invalidateSourceSearch(),this.syncSource(),this.requestUpdate("sourceSearchIntent",null);return}this.searchQuery="",this.searchState=this.xmlState.kind==="loaded"?this.computeSearch(this.xmlState.doc):EMPTY_SEARCH,this.activeSearchIndex=-1,this.requestUpdate(),this.emitSearchChange()}async scrollActiveMatchIntoView(){const pathKey=this.searchState.ordered[this.activeSearchIndex];if(pathKey===void 0)return;this.expandAncestors(JSON.parse(pathKey),!0),await this.updateComplete,this.renderRoot.querySelector("[data-active-match]")?.scrollIntoView({behavior:prefersReducedMotion(this)?"auto":"smooth",block:"center"})}emitSearchChange(){this.emit("lr-search-change",{query:this.searchQuery,matchCount:this.treeSource!==void 0?this.sourceHitKeys.size:this.searchState.ordered.length,matchCountExact:this.treeSource!==void 0?this.sourceSearchExact:this.searchState.matchCountExact,activeIndex:this.activeSearchIndex})}toggleNode(pathKey,expanded){const next=new Map(this.expandedOverrides);next.set(pathKey,!expanded),this.expandedOverrides=next}isExpanded(pathKey,depth){const override=this.expandedOverrides.get(pathKey);if(override!==void 0)return override;if(this.searchState.forceExpand.has(pathKey))return!0;const expandDepth=this.safeExpandDepth;return!(expandDepth!==void 0&&depth>=expandDepth)}cancelCopyTimer(){const timer=this.copyTimer;this.copyTimer=void 0,timer&&timer.owner.clearTimeout(timer.handle)}resetCopyFeedback(){this.copyGeneration++,this.cancelCopyTimer(),this.copyFeedback=null}showCopyFeedback(key,status,generation,owner){this.copyFeedback={key,status},this.cancelCopyTimer();let handle=0;handle=owner.setTimeout(()=>{this.copyTimer?.owner!==owner||this.copyTimer.handle!==handle||this.copyTimer.generation!==generation||generation!==this.copyGeneration||!this.isConnected||this.ownerDocument.defaultView!==owner||(this.copyTimer=void 0,this.copyFeedback=null)},1500),this.copyTimer={owner,handle,generation}}async copyText(text,key){if(this.treeSource!==void 0)return;const owner=this.isConnected?this.ownerDocument.defaultView:null,generation=++this.copyGeneration;this.cancelCopyTimer(),this.copyFeedback=null;const outcome=await writeClipboardText(owner,text);if(!(!owner||!this.isConnected||generation!==this.copyGeneration||this.ownerDocument.defaultView!==owner)){if(outcome.ok){this.showCopyFeedback(key,"success",generation,owner),this.emit("lr-copy",outcome);return}this.showCopyFeedback(key,"error",generation,owner),this.emit("lr-error"),this.emit("lr-copy-error",outcome)}}serializeXml(node){const XMLSerializerCtor=this.isConnected?this.ownerDocument.defaultView?.XMLSerializer:void 0;return XMLSerializerCtor?new XMLSerializerCtor().serializeToString(node):null}copySerializedXml(node,key){const text=this.serializeXml(node);text!==null&&this.copyText(text,key)}copyButtonLabel(key,rest){const feedback=this.copyFeedback?.key===key?this.copyFeedback.status:void 0;return feedback==="success"?this.localize("copied"):feedback==="error"?this.localize("copyFailed"):rest}renderCopyButton(getNode,name,key){if(!this.copyable)return nothing;const label=this.copyButtonLabel(key,this.localize("xmlViewerCopyNode",void 0,{name}));return html`
|
|
15
15
|
<button
|
|
16
16
|
part="copy-button"
|
|
17
17
|
type="button"
|
package/dist/data-sources.d.ts
CHANGED
|
@@ -32,3 +32,13 @@ readonly state:string;readonly total:number;readonly rows:LyraHierarchyView<Lyra
|
|
|
32
32
|
export interface LyraHierarchySource<T,Q,Summary=undefined>{readonly revision:LyraSourceRevision;project(request:LyraHierarchyRequest<Q>):Promise<LyraHierarchyProjection<T,Summary>>;search?(request:LyraSourceSearchRequest):Promise<LyraSourceSearchResult<{readonly key:string;}>>;copy?(request:LyraSourceContext&{readonly key:string|null;readonly scope:'node'|'subtree'|'document';readonly maxBytes:number;}):Promise<string>;}export interface LyraInspectionNode{readonly name:string;readonly kind:'object'|'array'|'scalar'|'element'|'attribute'|'text'|'comment'|'processing-instruction';readonly value?:string;readonly path:string;}export interface LyraHierarchyQuery{readonly search:string;readonly hiddenKinds:readonly string[];}export interface LyraTraceSourceSummary{readonly startMs:number;readonly endMs:number;}export interface LyraTaskSourceSummary{readonly total:number;readonly completed:number;}export interface LyraSourceBounds{readonly x:number;readonly y:number;readonly width:number;readonly height:number;}export interface LyraGraphSourceQuery{readonly kind:'nodes'|'edges';readonly search:string;readonly centerKey:string|null;readonly direction:'in'|'out'|'both';readonly nodeTypes:readonly string[];}export type LyraGraphRecord<N,E> ={readonly kind:'node';readonly value:N;}|{readonly kind:'edge';readonly value:E;};export interface LyraGraphSourceSummary{readonly nodes:number;readonly edges:number;}export interface LyraGraphSceneRequest extends LyraSourceContext{readonly mode:'neighborhood'|'viewport';readonly centerKey:string|null;readonly bounds:LyraSourceBounds|null;readonly nodeLimit:number;readonly edgeLimit:number;readonly includeKeys:readonly string[];}export interface LyraGraphScene<N,E>{readonly nodes:readonly{readonly key:string;readonly value:N;readonly position?:{readonly x:number;readonly y:number;readonly z?:number;};}[];readonly edges:readonly{readonly key:string;readonly value:E;readonly source:string;readonly target:string;}[];readonly total:LyraGraphSourceSummary;readonly coverage:'complete'|'neighborhood'|'aggregate';readonly worldBounds:LyraSourceBounds|null;}export interface LyraGraphOverview{readonly bounds:LyraSourceBounds;readonly bins:readonly{readonly bounds:LyraSourceBounds;readonly count:number;}[];}
|
|
33
33
|
/** Full-source record navigation with separately bounded diagram and aggregate queries.*/
|
|
34
34
|
export interface LyraGraphSource<N,E>{readonly revision:LyraSourceRevision;readonly records:LyraPageSource<LyraGraphRecord<N,E>,LyraGraphSourceQuery,LyraGraphSourceSummary>;scene(request:LyraGraphSceneRequest):Promise<LyraGraphScene<N,E>>;overview?(request:LyraSourceContext&{readonly limit:number;}):Promise<LyraGraphOverview>;}
|
|
35
|
+
/** One stable-key row in a bounded cursor result.*/
|
|
36
|
+
export interface LyraCursorRecord<T>{readonly key:string;readonly value:T;}
|
|
37
|
+
/** A provider-owned query with an opaque continuation; null starts the query.*/
|
|
38
|
+
export interface LyraCursorRequest<Q>extends LyraSourceContext{readonly scope:string;readonly query:Q;readonly cursor:string|null;readonly limit:number;}export interface LyraCursorResult<T>{readonly rows:readonly LyraCursorRecord<T>[];
|
|
39
|
+
/** Null is the only end marker; a token does not promise another row or an exact total.*/
|
|
40
|
+
readonly nextCursor:string|null;}
|
|
41
|
+
/** Bounded continuation navigation without a total, numeric order, or lookup requirement.*/
|
|
42
|
+
export interface LyraCursorSource<T,Q>{readonly revision:LyraSourceRevision;
|
|
43
|
+
/** Identity namespace and listing scope; changing it invalidates retained row identity.*/
|
|
44
|
+
readonly scope:string;query(request:LyraCursorRequest<Q>):Promise<LyraCursorResult<T>>;}export type LyraCursorSourceStatus='idle'|'loading'|'ready'|'error';export interface LyraCursorNavigationState{readonly status:LyraCursorSourceStatus;readonly canGoBack:boolean;readonly canGoForward:boolean;readonly atEnd:boolean;readonly historyTruncated:boolean;}
|
package/dist/events.d.ts
CHANGED
|
@@ -833,6 +833,11 @@ export type LyraIntersectionEvent=LyraIntersectionObserverEventMap['lr-intersect
|
|
|
833
833
|
*/
|
|
834
834
|
export type LyraInvalidEvent=LyraButtonEventMap['lr-invalid']|LyraCatalogPickerEventMap['lr-invalid']|LyraChatComposerEventMap['lr-invalid']|LyraCheckboxEventMap['lr-invalid']|LyraCheckboxGroupEventMap['lr-invalid']|LyraCodeEditorEventMap['lr-invalid']|LyraColorPickerEventMap['lr-invalid']|LyraComboboxEventMap['lr-invalid']|LyraDateInputEventMap['lr-invalid']|LyraEmojiPickerEventMap['lr-invalid']|LyraFileInputEventMap['lr-invalid']|LyraGraphQueryBuilderEventMap['lr-invalid']|LyraInputEventMap['lr-invalid']|LyraKnownDateEventMap['lr-invalid']|LyraLocalePickerEventMap['lr-invalid']|LyraModelSelectEventMap['lr-invalid']|LyraOtpInputEventMap['lr-invalid']|LyraPhoneInputEventMap['lr-invalid']|LyraRadioEventMap['lr-invalid']|LyraRadioGroupEventMap['lr-invalid']|LyraRatingEventMap['lr-invalid']|LyraRubricFormEventMap['lr-invalid']|LyraSelectEventMap['lr-invalid']|LyraSignaturePadEventMap['lr-invalid']|LyraSliderEventMap['lr-invalid']|LyraSwitchEventMap['lr-invalid']|LyraTextareaEventMap['lr-invalid']|LyraTimeInputEventMap['lr-invalid']|LyraTimeRangeEventMap['lr-invalid']|LyraTokenInputEventMap['lr-invalid']|LyraToolParamFormEventMap['lr-invalid']|LyraVoicePickerEventMap['lr-invalid'];
|
|
835
835
|
/**
|
|
836
|
+
* `lr-item-action` — dispatched by `<lr-ingestion-queue>`; detail
|
|
837
|
+
* `LyraIngestionQueueEventMap['lr-item-action']`.
|
|
838
|
+
*/
|
|
839
|
+
export type LyraItemActionEvent=LyraIngestionQueueEventMap['lr-item-action'];
|
|
840
|
+
/**
|
|
836
841
|
* `lr-item-activate` — dispatched by `<lr-sequence-strip>`; detail
|
|
837
842
|
* `LyraSequenceStripEventMap['lr-item-activate']`.
|
|
838
843
|
*/
|
|
@@ -1389,10 +1394,10 @@ export type LyraPreviewRequestEvent=LyraAttachmentChipEventMap['lr-preview-reque
|
|
|
1389
1394
|
*/
|
|
1390
1395
|
export type LyraPriorityColumnsVisibilityChangeEvent=LyraTableEventMap['lr-priority-columns-visibility-change'];
|
|
1391
1396
|
/**
|
|
1392
|
-
* `lr-query-change` — dispatched by `<lr-thread-list>`;
|
|
1393
|
-
* `
|
|
1397
|
+
* `lr-query-change` — dispatched by 2 components: `<lr-document-library>`, `<lr-thread-list>`;
|
|
1398
|
+
* detail union of 2, e.g. `LyraDocumentLibraryEventMap['lr-query-change']`.
|
|
1394
1399
|
*/
|
|
1395
|
-
export type LyraQueryChangeEvent=LyraThreadListEventMap['lr-query-change'];
|
|
1400
|
+
export type LyraQueryChangeEvent=LyraDocumentLibraryEventMap['lr-query-change']|LyraThreadListEventMap['lr-query-change'];
|
|
1396
1401
|
/**
|
|
1397
1402
|
* `lr-query-delete` — dispatched by `<lr-graph-query-builder>`; detail
|
|
1398
1403
|
* `LyraGraphQueryBuilderEventMap['lr-query-delete']`.
|
|
@@ -2235,7 +2240,7 @@ export type LyraZoomChangeEvent=LyraDocumentViewerEventMap['lr-zoom-change']|Lyr
|
|
|
2235
2240
|
* their standard types, and redeclaring them globally would either conflict or widen a built-in.
|
|
2236
2241
|
* Those stay typed per component through the component's own event map.
|
|
2237
2242
|
*/
|
|
2238
|
-
export interface LyraGlobalEventMap{'lr-activate':LyraActivateEvent;'lr-add':LyraAddEvent;'lr-add-condition':LyraAddConditionEvent;'lr-after-collapse':LyraAfterCollapseEvent;'lr-after-expand':LyraAfterExpandEvent;'lr-after-hide':LyraAfterHideEvent;'lr-after-show':LyraAfterShowEvent;'lr-anchor-result':LyraAnchorResultEvent;'lr-annotatable-change':LyraAnnotatableChangeEvent;'lr-annotation-create':LyraAnnotationCreateEvent;'lr-approval-close':LyraApprovalCloseEvent;'lr-approval-decision-request':LyraApprovalDecisionRequestEvent;'lr-approval-select':LyraApprovalSelectEvent;'lr-approve-request':LyraApproveRequestEvent;'lr-attachment-open':LyraAttachmentOpenEvent;'lr-attachment-preview-request':LyraAttachmentPreviewRequestEvent;'lr-attachment-remove':LyraAttachmentRemoveEvent;'lr-attachment-retry':LyraAttachmentRetryEvent;'lr-attachments-add':LyraAttachmentsAddEvent;'lr-audio-request':LyraAudioRequestEvent;'lr-autoload-error':LyraAutoloadErrorEvent;'lr-autoload-loaded':LyraAutoloadLoadedEvent;'lr-autoload-preload':LyraAutoloadPreloadEvent;'lr-autoload-traversal-error':LyraAutoloadTraversalErrorEvent;'lr-before-page-change':LyraBeforePageChangeEvent;'lr-branch-change':LyraBranchChangeEvent;'lr-calendar-geometry-change':LyraCalendarGeometryChangeEvent;'lr-camera-change':LyraCameraChangeEvent;'lr-camera-request':LyraCameraRequestEvent;'lr-cancel':LyraCancelEvent;'lr-card-activate':LyraCardActivateEvent;'lr-cell-activate':LyraCellActivateEvent;'lr-cell-click':LyraCellClickEvent;'lr-cell-contextmenu':LyraCellContextmenuEvent;'lr-cell-edit':LyraCellEditEvent;'lr-cell-move':LyraCellMoveEvent;'lr-cell-resize':LyraCellResizeEvent;'lr-change':LyraChangeEvent;'lr-change-decision-request':LyraChangeDecisionRequestEvent;'lr-change-request':LyraChangeRequestEvent;'lr-chart-row-select':LyraChartRowSelectEvent;'lr-checkbox-group-toggle-request':LyraCheckboxGroupToggleRequestEvent;'lr-checkbox-toggle-request':LyraCheckboxToggleRequestEvent;'lr-chip-change':LyraChipChangeEvent;'lr-chip-toggle-request':LyraChipToggleRequestEvent;'lr-chunk-open':LyraChunkOpenEvent;'lr-chunk-select':LyraChunkSelectEvent;'lr-citation-activate':LyraCitationActivateEvent;'lr-citation-open':LyraCitationOpenEvent;'lr-citation-select':LyraCitationSelectEvent;'lr-claim-select':LyraClaimSelectEvent;'lr-clear':LyraClearEvent;'lr-close':LyraCloseEvent;'lr-close-request':LyraCloseRequestEvent;'lr-cluster-activate':LyraClusterActivateEvent;'lr-collapse':LyraCollapseEvent;'lr-collision':LyraCollisionEvent;'lr-column-move':LyraColumnMoveEvent;'lr-column-pin':LyraColumnPinEvent;'lr-column-resize':LyraColumnResizeEvent;'lr-column-resize-request':LyraColumnResizeRequestEvent;'lr-column-visibility-change':LyraColumnVisibilityChangeEvent;'lr-community-activate':LyraCommunityActivateEvent;'lr-complete':LyraCompleteEvent;'lr-connect':LyraConnectEvent;'lr-connector-action':LyraConnectorActionEvent;'lr-content-change':LyraContentChangeEvent;'lr-content-settled':LyraContentSettledEvent;'lr-copy':LyraCopyEvent;'lr-copy-error':LyraCopyErrorEvent;'lr-create':LyraCreateEvent;'lr-cue-change':LyraCueChangeEvent;'lr-data-error':LyraDataErrorEvent;'lr-date-select':LyraDateSelectEvent;'lr-datum-activate':LyraDatumActivateEvent;'lr-datum-visibility-change':LyraDatumVisibilityChangeEvent;'lr-datum-visibility-change-request':LyraDatumVisibilityChangeRequestEvent;'lr-decision-settled':LyraDecisionSettledEvent;'lr-deny-request':LyraDenyRequestEvent;'lr-disconnect':LyraDisconnectEvent;'lr-dismiss':LyraDismissEvent;'lr-download':LyraDownloadEvent;'lr-download-request':LyraDownloadRequestEvent;'lr-drill':LyraDrillEvent;'lr-drilldown-category-change':LyraDrilldownCategoryChangeEvent;'lr-drilldown-document-download':LyraDrilldownDocumentDownloadEvent;'lr-drilldown-document-highlight-activate':LyraDrilldownDocumentHighlightActivateEvent;'lr-drilldown-document-render-error':LyraDrilldownDocumentRenderErrorEvent;'lr-drilldown-entity-activate':LyraDrilldownEntityActivateEvent;'lr-drilldown-evidence-expand':LyraDrilldownEvidenceExpandEvent;'lr-drilldown-evidence-open':LyraDrilldownEvidenceOpenEvent;'lr-drilldown-navigate':LyraDrilldownNavigateEvent;'lr-edge-activate':LyraEdgeActivateEvent;'lr-edge-enter':LyraEdgeEnterEvent;'lr-edge-leave':LyraEdgeLeaveEvent;'lr-edit':LyraEditEvent;'lr-engine-fallback':LyraEngineFallbackEvent;'lr-entity-open':LyraEntityOpenEvent;'lr-entity-select':LyraEntitySelectEvent;'lr-error':LyraErrorEvent;'lr-event-select':LyraEventSelectEvent;'lr-example-add-request':LyraExampleAddRequestEvent;'lr-example-citation-select':LyraExampleCitationSelectEvent;'lr-example-claim-select':LyraExampleClaimSelectEvent;'lr-example-remove-request':LyraExampleRemoveRequestEvent;'lr-example-select':LyraExampleSelectEvent;'lr-example-toggle':LyraExampleToggleEvent;'lr-example-tool-activate':LyraExampleToolActivateEvent;'lr-example-tool-approval-decide-request':LyraExampleToolApprovalDecideRequestEvent;'lr-example-tool-render-error':LyraExampleToolRenderErrorEvent;'lr-expand':LyraExpandEvent;'lr-export-complete':LyraExportCompleteEvent;'lr-export-error':LyraExportErrorEvent;'lr-export-request':LyraExportRequestEvent;'lr-feedback-change':LyraFeedbackChangeEvent;'lr-feedback-submit-request':LyraFeedbackSubmitRequestEvent;'lr-file-open':LyraFileOpenEvent;'lr-file-select':LyraFileSelectEvent;'lr-files':LyraFilesEvent;'lr-filter':LyraFilterEvent;'lr-filter-change':LyraFilterChangeEvent;'lr-filters-change':LyraFiltersChangeEvent;'lr-finish':LyraFinishEvent;'lr-fit-change':LyraFitChangeEvent;'lr-focus-day':LyraFocusDayEvent;'lr-follow-change':LyraFollowChangeEvent;'lr-forget':LyraForgetEvent;'lr-frame-select':LyraFrameSelectEvent;'lr-fullscreen-change':LyraFullscreenChangeEvent;'lr-fullscreen-request':LyraFullscreenRequestEvent;'lr-group-collapse':LyraGroupCollapseEvent;'lr-group-expand':LyraGroupExpandEvent;'lr-group-toggle':LyraGroupToggleEvent;'lr-group-toggle-request':LyraGroupToggleRequestEvent;'lr-hidden-types-change':LyraHiddenTypesChangeEvent;'lr-hide':LyraHideEvent;'lr-highlight-activate':LyraHighlightActivateEvent;'lr-hover':LyraHoverEvent;'lr-import-request':LyraImportRequestEvent;'lr-include-error':LyraIncludeErrorEvent;'lr-index-change':LyraIndexChangeEvent;'lr-ingestion-cancel':LyraIngestionCancelEvent;'lr-ingestion-retry':LyraIngestionRetryEvent;'lr-initial-focus':LyraInitialFocusEvent;'lr-input':LyraInputEvent;'lr-input-settled':LyraInputSettledEvent;'lr-interrupt':LyraInterruptEvent;'lr-intersect':LyraIntersectEvent;'lr-intersection':LyraIntersectionEvent;'lr-invalid':LyraInvalidEvent;'lr-item-activate':LyraItemActivateEvent;'lr-layout-change':LyraLayoutChangeEvent;'lr-lazy-change':LyraLazyChangeEvent;'lr-lazy-load':LyraLazyLoadEvent;'lr-legend-visibility-change':LyraLegendVisibilityChangeEvent;'lr-legend-visibility-change-request':LyraLegendVisibilityChangeRequestEvent;'lr-level':LyraLevelEvent;'lr-line-activate':LyraLineActivateEvent;'lr-link-activate':LyraLinkActivateEvent;'lr-load':LyraLoadEvent;'lr-load-children':LyraLoadChildrenEvent;'lr-load-error':LyraLoadErrorEvent;'lr-load-more':LyraLoadMoreEvent;'lr-location-change':LyraLocationChangeEvent;'lr-map-anchor-close':LyraMapAnchorCloseEvent;'lr-map-attribution-toggle':LyraMapAttributionToggleEvent;'lr-map-camera-interrupt':LyraMapCameraInterruptEvent;'lr-map-click':LyraMapClickEvent;'lr-map-contextmenu':LyraMapContextmenuEvent;'lr-map-draw-cancel':LyraMapDrawCancelEvent;'lr-map-draw-change':LyraMapDrawChangeEvent;'lr-map-draw-complete':LyraMapDrawCompleteEvent;'lr-map-draw-start':LyraMapDrawStartEvent;'lr-map-draw-vertex-end':LyraMapDrawVertexEndEvent;'lr-map-export-error':LyraMapExportErrorEvent;'lr-map-feature-enter':LyraMapFeatureEnterEvent;'lr-map-feature-leave':LyraMapFeatureLeaveEvent;'lr-map-geolocate':LyraMapGeolocateEvent;'lr-map-geolocate-error':LyraMapGeolocateErrorEvent;'lr-map-geolocate-out-of-bounds':LyraMapGeolocateOutOfBoundsEvent;'lr-map-idle':LyraMapIdleEvent;'lr-map-legend-panel-toggle-request':LyraMapLegendPanelToggleRequestEvent;'lr-map-legend-toggle-request':LyraMapLegendToggleRequestEvent;'lr-map-load':LyraMapLoadEvent;'lr-map-marker-activate':LyraMapMarkerActivateEvent;'lr-map-move':LyraMapMoveEvent;'lr-map-pick':LyraMapPickEvent;'lr-map-pointer-leave':LyraMapPointerLeaveEvent;'lr-map-pointer-move':LyraMapPointerMoveEvent;'lr-map-projection-change':LyraMapProjectionChangeEvent;'lr-map-scene-activate':LyraMapSceneActivateEvent;'lr-map-scene-state':LyraMapSceneStateEvent;'lr-map-style-load':LyraMapStyleLoadEvent;'lr-map-terrain-change':LyraMapTerrainChangeEvent;'lr-map-view-change':LyraMapViewChangeEvent;'lr-matrix-geometry-change':LyraMatrixGeometryChangeEvent;'lr-matrix-range-select':LyraMatrixRangeSelectEvent;'lr-maximize-change-request':LyraMaximizeChangeRequestEvent;'lr-mcp-initialized':LyraMcpInitializedEvent;'lr-mcp-log':LyraMcpLogEvent;'lr-mcp-open-link':LyraMcpOpenLinkEvent;'lr-mcp-ready':LyraMcpReadyEvent;'lr-mcp-request':LyraMcpRequestEvent;'lr-mcp-resize':LyraMcpResizeEvent;'lr-mcp-send-message':LyraMcpSendMessageEvent;'lr-mcp-tool-call':LyraMcpToolCallEvent;'lr-media-download-request':LyraMediaDownloadRequestEvent;'lr-media-open':LyraMediaOpenEvent;'lr-mention-close':LyraMentionCloseEvent;'lr-mention-select':LyraMentionSelectEvent;'lr-menu-item-change-request':LyraMenuItemChangeRequestEvent;'lr-menu-item-state-change':LyraMenuItemStateChangeEvent;'lr-message-reorder-request':LyraMessageReorderRequestEvent;'lr-message-retry':LyraMessageRetryEvent;'lr-metric-change-request':LyraMetricChangeRequestEvent;'lr-mode-change':LyraModeChangeEvent;'lr-model-change':LyraModelChangeEvent;'lr-move-request':LyraMoveRequestEvent;'lr-multi-split-collapse-change':LyraMultiSplitCollapseChangeEvent;'lr-multi-split-constraints-invalid':LyraMultiSplitConstraintsInvalidEvent;'lr-multi-split-orientation-change':LyraMultiSplitOrientationChangeEvent;'lr-multi-split-panel-collapse-change':LyraMultiSplitPanelCollapseChangeEvent;'lr-mutation':LyraMutationEvent;'lr-mute-change':LyraMuteChangeEvent;'lr-nav-open-change':LyraNavOpenChangeEvent;'lr-nav-toggle-request':LyraNavToggleRequestEvent;'lr-node-activate':LyraNodeActivateEvent;'lr-node-add':LyraNodeAddEvent;'lr-node-enter':LyraNodeEnterEvent;'lr-node-expand':LyraNodeExpandEvent;'lr-node-leave':LyraNodeLeaveEvent;'lr-node-move':LyraNodeMoveEvent;'lr-node-render-error':LyraNodeRenderErrorEvent;'lr-node-select':LyraNodeSelectEvent;'lr-node-toggle':LyraNodeToggleEvent;'lr-open':LyraOpenEvent;'lr-option-change':LyraOptionChangeEvent;'lr-overflow':LyraOverflowEvent;'lr-overflow-activate':LyraOverflowActivateEvent;'lr-overflow-toggle':LyraOverflowToggleEvent;'lr-page-change':LyraPageChangeEvent;'lr-page-select':LyraPageSelectEvent;'lr-page-viewer-state-change':LyraPageViewerStateChangeEvent;'lr-palette-place':LyraPalettePlaceEvent;'lr-panorama-camera-change':LyraPanoramaCameraChangeEvent;'lr-panorama-hotspot-select':LyraPanoramaHotspotSelectEvent;'lr-part-resume':LyraPartResumeEvent;'lr-part-retry':LyraPartRetryEvent;'lr-path-request':LyraPathRequestEvent;'lr-pause':LyraPauseEvent;'lr-pause-change':LyraPauseChangeEvent;'lr-peek-change':LyraPeekChangeEvent;'lr-permission-decision':LyraPermissionDecisionEvent;'lr-permission-rule-change':LyraPermissionRuleChangeEvent;'lr-pin-change':LyraPinChangeEvent;'lr-play':LyraPlayEvent;'lr-point-activate':LyraPointActivateEvent;'lr-point-select':LyraPointSelectEvent;'lr-poll-due':LyraPollDueEvent;'lr-preview-change':LyraPreviewChangeEvent;'lr-preview-request':LyraPreviewRequestEvent;'lr-priority-columns-visibility-change':LyraPriorityColumnsVisibilityChangeEvent;'lr-query-change':LyraQueryChangeEvent;'lr-query-delete':LyraQueryDeleteEvent;'lr-query-delete-request':LyraQueryDeleteRequestEvent;'lr-query-load':LyraQueryLoadEvent;'lr-query-load-request':LyraQueryLoadRequestEvent;'lr-query-run':LyraQueryRunEvent;'lr-query-run-request':LyraQueryRunRequestEvent;'lr-query-save':LyraQuerySaveEvent;'lr-query-save-request':LyraQuerySaveRequestEvent;'lr-question-input':LyraQuestionInputEvent;'lr-question-response':LyraQuestionResponseEvent;'lr-queue-change':LyraQueueChangeEvent;'lr-rail-resize':LyraRailResizeEvent;'lr-rail-resize-request':LyraRailResizeRequestEvent;'lr-rate-change':LyraRateChangeEvent;'lr-readonly-change':LyraReadonlyChangeEvent;'lr-record-cancel':LyraRecordCancelEvent;'lr-record-chunk':LyraRecordChunkEvent;'lr-record-error':LyraRecordErrorEvent;'lr-record-start':LyraRecordStartEvent;'lr-record-state-change':LyraRecordStateChangeEvent;'lr-record-stop':LyraRecordStopEvent;'lr-recover':LyraRecoverEvent;'lr-regenerate':LyraRegenerateEvent;'lr-relation-activate':LyraRelationActivateEvent;'lr-remove':LyraRemoveEvent;'lr-remove-condition':LyraRemoveConditionEvent;'lr-rename':LyraRenameEvent;'lr-render-error':LyraRenderErrorEvent;'lr-reorder':LyraReorderEvent;'lr-reorder-request':LyraReorderRequestEvent;'lr-reposition':LyraRepositionEvent;'lr-reposition-request':LyraRepositionRequestEvent;'lr-request':LyraRequestEvent;'lr-request-close':LyraRequestCloseEvent;'lr-reset':LyraResetEvent;'lr-resize':LyraResizeEvent;'lr-resize-change':LyraResizeChangeEvent;'lr-resize-input':LyraResizeInputEvent;'lr-resize-request':LyraResizeRequestEvent;'lr-restore':LyraRestoreEvent;'lr-resume':LyraResumeEvent;'lr-retrieval-select':LyraRetrievalSelectEvent;'lr-retry':LyraRetryEvent;'lr-retry-request':LyraRetryRequestEvent;'lr-reveal-change':LyraRevealChangeEvent;'lr-review-input':LyraReviewInputEvent;'lr-review-skip':LyraReviewSkipEvent;'lr-review-submit':LyraReviewSubmitEvent;'lr-review-validity-change':LyraReviewValidityChangeEvent;'lr-rotation-change':LyraRotationChangeEvent;'lr-row-activate':LyraRowActivateEvent;'lr-row-collapse':LyraRowCollapseEvent;'lr-row-expand':LyraRowExpandEvent;'lr-row-expand-request':LyraRowExpandRequestEvent;'lr-row-expand-toggle':LyraRowExpandToggleEvent;'lr-row-select':LyraRowSelectEvent;'lr-run':LyraRunEvent;'lr-run-activate':LyraRunActivateEvent;'lr-run-cancel':LyraRunCancelEvent;'lr-run-retry':LyraRunRetryEvent;'lr-save':LyraSaveEvent;'lr-schema-select':LyraSchemaSelectEvent;'lr-scroll':LyraScrollEvent;'lr-search':LyraSearchEvent;'lr-search-change':LyraSearchChangeEvent;'lr-segment-activate-request':LyraSegmentActivateRequestEvent;'lr-select':LyraSelectEvent;'lr-selection-action':LyraSelectionActionEvent;'lr-selection-change':LyraSelectionChangeEvent;'lr-selection-delete':LyraSelectionDeleteEvent;'lr-send-now':LyraSendNowEvent;'lr-sequence-step':LyraSequenceStepEvent;'lr-show':LyraShowEvent;'lr-skip':LyraSkipEvent;'lr-slice-change-request':LyraSliceChangeRequestEvent;'lr-slide-change':LyraSlideChangeEvent;'lr-sort':LyraSortEvent;'lr-sort-change':LyraSortChangeEvent;'lr-sort-request':LyraSortRequestEvent;'lr-source-category-select':LyraSourceCategorySelectEvent;'lr-source-create':LyraSourceCreateEvent;'lr-source-delete':LyraSourceDeleteEvent;'lr-source-error':LyraSourceErrorEvent;'lr-source-pause':LyraSourcePauseEvent;'lr-source-point-select':LyraSourcePointSelectEvent;'lr-source-selection-change':LyraSourceSelectionChangeEvent;'lr-source-sync':LyraSourceSyncEvent;'lr-sources-change':LyraSourcesChangeEvent;'lr-span-select':LyraSpanSelectEvent;'lr-span-toggle':LyraSpanToggleEvent;'lr-span-visibility-change':LyraSpanVisibilityChangeEvent;'lr-spatial-bin-select':LyraSpatialBinSelectEvent;'lr-spatial-point-select':LyraSpatialPointSelectEvent;'lr-stage-chunk-action':LyraStageChunkActionEvent;'lr-stage-select':LyraStageSelectEvent;'lr-stall':LyraStallEvent;'lr-start':LyraStartEvent;'lr-step-select':LyraStepSelectEvent;'lr-stepper-orientation-change':LyraStepperOrientationChangeEvent;'lr-stop':LyraStopEvent;'lr-submit':LyraSubmitEvent;'lr-suggestion-select':LyraSuggestionSelectEvent;'lr-switch-toggle-request':LyraSwitchToggleRequestEvent;'lr-tab-change':LyraTabChangeEvent;'lr-tab-hide':LyraTabHideEvent;'lr-tab-show':LyraTabShowEvent;'lr-take-over':LyraTakeOverEvent;'lr-test-select':LyraTestSelectEvent;'lr-text-select':LyraTextSelectEvent;'lr-thread-archive':LyraThreadArchiveEvent;'lr-thread-delete':LyraThreadDeleteEvent;'lr-thread-pin':LyraThreadPinEvent;'lr-thread-rename':LyraThreadRenameEvent;'lr-time-change':LyraTimeChangeEvent;'lr-toast-overflow':LyraToastOverflowEvent;'lr-toggle':LyraToggleEvent;'lr-toggle-group-toggle-request':LyraToggleGroupToggleRequestEvent;'lr-toggle-request':LyraToggleRequestEvent;'lr-toggle-toggle-request':LyraToggleToggleRequestEvent;'lr-token-add-request':LyraTokenAddRequestEvent;'lr-token-edit-request':LyraTokenEditRequestEvent;'lr-token-remove-request':LyraTokenRemoveRequestEvent;'lr-tool-activate':LyraToolActivateEvent;'lr-tool-approval-decide-request':LyraToolApprovalDecideRequestEvent;'lr-tool-call-chip-select':LyraToolCallChipSelectEvent;'lr-tool-render-error':LyraToolRenderErrorEvent;'lr-toolbar-actions-change':LyraToolbarActionsChangeEvent;'lr-topic-select':LyraTopicSelectEvent;'lr-topic-toggle':LyraTopicToggleEvent;'lr-tour-end':LyraTourEndEvent;'lr-tour-end-request':LyraTourEndRequestEvent;'lr-tour-start':LyraTourStartEvent;'lr-tour-step-change-request':LyraTourStepChangeRequestEvent;'lr-tour-target-missing':LyraTourTargetMissingEvent;'lr-validity-change':LyraValidityChangeEvent;'lr-version-change':LyraVersionChangeEvent;'lr-version-select':LyraVersionSelectEvent;'lr-video-change':LyraVideoChangeEvent;'lr-view-change':LyraViewChangeEvent;'lr-view-request':LyraViewRequestEvent;'lr-viewer-diagnostic':LyraViewerDiagnosticEvent;'lr-viewport-change':LyraViewportChangeEvent;'lr-virtual-scroll':LyraVirtualScrollEvent;'lr-visibility-change':LyraVisibilityChangeEvent;'lr-visibility-change-request':LyraVisibilityChangeRequestEvent;'lr-visible-range-change':LyraVisibleRangeChangeEvent;'lr-voice-change':LyraVoiceChangeEvent;'lr-vote-request':LyraVoteRequestEvent;'lr-widget-action':LyraWidgetActionEvent;'lr-widget-state-change':LyraWidgetStateChangeEvent;'lr-word-activate':LyraWordActivateEvent;'lr-zoom':LyraZoomEvent;'lr-zoom-change':LyraZoomChangeEvent;}declare global{
|
|
2243
|
+
export interface LyraGlobalEventMap{'lr-activate':LyraActivateEvent;'lr-add':LyraAddEvent;'lr-add-condition':LyraAddConditionEvent;'lr-after-collapse':LyraAfterCollapseEvent;'lr-after-expand':LyraAfterExpandEvent;'lr-after-hide':LyraAfterHideEvent;'lr-after-show':LyraAfterShowEvent;'lr-anchor-result':LyraAnchorResultEvent;'lr-annotatable-change':LyraAnnotatableChangeEvent;'lr-annotation-create':LyraAnnotationCreateEvent;'lr-approval-close':LyraApprovalCloseEvent;'lr-approval-decision-request':LyraApprovalDecisionRequestEvent;'lr-approval-select':LyraApprovalSelectEvent;'lr-approve-request':LyraApproveRequestEvent;'lr-attachment-open':LyraAttachmentOpenEvent;'lr-attachment-preview-request':LyraAttachmentPreviewRequestEvent;'lr-attachment-remove':LyraAttachmentRemoveEvent;'lr-attachment-retry':LyraAttachmentRetryEvent;'lr-attachments-add':LyraAttachmentsAddEvent;'lr-audio-request':LyraAudioRequestEvent;'lr-autoload-error':LyraAutoloadErrorEvent;'lr-autoload-loaded':LyraAutoloadLoadedEvent;'lr-autoload-preload':LyraAutoloadPreloadEvent;'lr-autoload-traversal-error':LyraAutoloadTraversalErrorEvent;'lr-before-page-change':LyraBeforePageChangeEvent;'lr-branch-change':LyraBranchChangeEvent;'lr-calendar-geometry-change':LyraCalendarGeometryChangeEvent;'lr-camera-change':LyraCameraChangeEvent;'lr-camera-request':LyraCameraRequestEvent;'lr-cancel':LyraCancelEvent;'lr-card-activate':LyraCardActivateEvent;'lr-cell-activate':LyraCellActivateEvent;'lr-cell-click':LyraCellClickEvent;'lr-cell-contextmenu':LyraCellContextmenuEvent;'lr-cell-edit':LyraCellEditEvent;'lr-cell-move':LyraCellMoveEvent;'lr-cell-resize':LyraCellResizeEvent;'lr-change':LyraChangeEvent;'lr-change-decision-request':LyraChangeDecisionRequestEvent;'lr-change-request':LyraChangeRequestEvent;'lr-chart-row-select':LyraChartRowSelectEvent;'lr-checkbox-group-toggle-request':LyraCheckboxGroupToggleRequestEvent;'lr-checkbox-toggle-request':LyraCheckboxToggleRequestEvent;'lr-chip-change':LyraChipChangeEvent;'lr-chip-toggle-request':LyraChipToggleRequestEvent;'lr-chunk-open':LyraChunkOpenEvent;'lr-chunk-select':LyraChunkSelectEvent;'lr-citation-activate':LyraCitationActivateEvent;'lr-citation-open':LyraCitationOpenEvent;'lr-citation-select':LyraCitationSelectEvent;'lr-claim-select':LyraClaimSelectEvent;'lr-clear':LyraClearEvent;'lr-close':LyraCloseEvent;'lr-close-request':LyraCloseRequestEvent;'lr-cluster-activate':LyraClusterActivateEvent;'lr-collapse':LyraCollapseEvent;'lr-collision':LyraCollisionEvent;'lr-column-move':LyraColumnMoveEvent;'lr-column-pin':LyraColumnPinEvent;'lr-column-resize':LyraColumnResizeEvent;'lr-column-resize-request':LyraColumnResizeRequestEvent;'lr-column-visibility-change':LyraColumnVisibilityChangeEvent;'lr-community-activate':LyraCommunityActivateEvent;'lr-complete':LyraCompleteEvent;'lr-connect':LyraConnectEvent;'lr-connector-action':LyraConnectorActionEvent;'lr-content-change':LyraContentChangeEvent;'lr-content-settled':LyraContentSettledEvent;'lr-copy':LyraCopyEvent;'lr-copy-error':LyraCopyErrorEvent;'lr-create':LyraCreateEvent;'lr-cue-change':LyraCueChangeEvent;'lr-data-error':LyraDataErrorEvent;'lr-date-select':LyraDateSelectEvent;'lr-datum-activate':LyraDatumActivateEvent;'lr-datum-visibility-change':LyraDatumVisibilityChangeEvent;'lr-datum-visibility-change-request':LyraDatumVisibilityChangeRequestEvent;'lr-decision-settled':LyraDecisionSettledEvent;'lr-deny-request':LyraDenyRequestEvent;'lr-disconnect':LyraDisconnectEvent;'lr-dismiss':LyraDismissEvent;'lr-download':LyraDownloadEvent;'lr-download-request':LyraDownloadRequestEvent;'lr-drill':LyraDrillEvent;'lr-drilldown-category-change':LyraDrilldownCategoryChangeEvent;'lr-drilldown-document-download':LyraDrilldownDocumentDownloadEvent;'lr-drilldown-document-highlight-activate':LyraDrilldownDocumentHighlightActivateEvent;'lr-drilldown-document-render-error':LyraDrilldownDocumentRenderErrorEvent;'lr-drilldown-entity-activate':LyraDrilldownEntityActivateEvent;'lr-drilldown-evidence-expand':LyraDrilldownEvidenceExpandEvent;'lr-drilldown-evidence-open':LyraDrilldownEvidenceOpenEvent;'lr-drilldown-navigate':LyraDrilldownNavigateEvent;'lr-edge-activate':LyraEdgeActivateEvent;'lr-edge-enter':LyraEdgeEnterEvent;'lr-edge-leave':LyraEdgeLeaveEvent;'lr-edit':LyraEditEvent;'lr-engine-fallback':LyraEngineFallbackEvent;'lr-entity-open':LyraEntityOpenEvent;'lr-entity-select':LyraEntitySelectEvent;'lr-error':LyraErrorEvent;'lr-event-select':LyraEventSelectEvent;'lr-example-add-request':LyraExampleAddRequestEvent;'lr-example-citation-select':LyraExampleCitationSelectEvent;'lr-example-claim-select':LyraExampleClaimSelectEvent;'lr-example-remove-request':LyraExampleRemoveRequestEvent;'lr-example-select':LyraExampleSelectEvent;'lr-example-toggle':LyraExampleToggleEvent;'lr-example-tool-activate':LyraExampleToolActivateEvent;'lr-example-tool-approval-decide-request':LyraExampleToolApprovalDecideRequestEvent;'lr-example-tool-render-error':LyraExampleToolRenderErrorEvent;'lr-expand':LyraExpandEvent;'lr-export-complete':LyraExportCompleteEvent;'lr-export-error':LyraExportErrorEvent;'lr-export-request':LyraExportRequestEvent;'lr-feedback-change':LyraFeedbackChangeEvent;'lr-feedback-submit-request':LyraFeedbackSubmitRequestEvent;'lr-file-open':LyraFileOpenEvent;'lr-file-select':LyraFileSelectEvent;'lr-files':LyraFilesEvent;'lr-filter':LyraFilterEvent;'lr-filter-change':LyraFilterChangeEvent;'lr-filters-change':LyraFiltersChangeEvent;'lr-finish':LyraFinishEvent;'lr-fit-change':LyraFitChangeEvent;'lr-focus-day':LyraFocusDayEvent;'lr-follow-change':LyraFollowChangeEvent;'lr-forget':LyraForgetEvent;'lr-frame-select':LyraFrameSelectEvent;'lr-fullscreen-change':LyraFullscreenChangeEvent;'lr-fullscreen-request':LyraFullscreenRequestEvent;'lr-group-collapse':LyraGroupCollapseEvent;'lr-group-expand':LyraGroupExpandEvent;'lr-group-toggle':LyraGroupToggleEvent;'lr-group-toggle-request':LyraGroupToggleRequestEvent;'lr-hidden-types-change':LyraHiddenTypesChangeEvent;'lr-hide':LyraHideEvent;'lr-highlight-activate':LyraHighlightActivateEvent;'lr-hover':LyraHoverEvent;'lr-import-request':LyraImportRequestEvent;'lr-include-error':LyraIncludeErrorEvent;'lr-index-change':LyraIndexChangeEvent;'lr-ingestion-cancel':LyraIngestionCancelEvent;'lr-ingestion-retry':LyraIngestionRetryEvent;'lr-initial-focus':LyraInitialFocusEvent;'lr-input':LyraInputEvent;'lr-input-settled':LyraInputSettledEvent;'lr-interrupt':LyraInterruptEvent;'lr-intersect':LyraIntersectEvent;'lr-intersection':LyraIntersectionEvent;'lr-invalid':LyraInvalidEvent;'lr-item-action':LyraItemActionEvent;'lr-item-activate':LyraItemActivateEvent;'lr-layout-change':LyraLayoutChangeEvent;'lr-lazy-change':LyraLazyChangeEvent;'lr-lazy-load':LyraLazyLoadEvent;'lr-legend-visibility-change':LyraLegendVisibilityChangeEvent;'lr-legend-visibility-change-request':LyraLegendVisibilityChangeRequestEvent;'lr-level':LyraLevelEvent;'lr-line-activate':LyraLineActivateEvent;'lr-link-activate':LyraLinkActivateEvent;'lr-load':LyraLoadEvent;'lr-load-children':LyraLoadChildrenEvent;'lr-load-error':LyraLoadErrorEvent;'lr-load-more':LyraLoadMoreEvent;'lr-location-change':LyraLocationChangeEvent;'lr-map-anchor-close':LyraMapAnchorCloseEvent;'lr-map-attribution-toggle':LyraMapAttributionToggleEvent;'lr-map-camera-interrupt':LyraMapCameraInterruptEvent;'lr-map-click':LyraMapClickEvent;'lr-map-contextmenu':LyraMapContextmenuEvent;'lr-map-draw-cancel':LyraMapDrawCancelEvent;'lr-map-draw-change':LyraMapDrawChangeEvent;'lr-map-draw-complete':LyraMapDrawCompleteEvent;'lr-map-draw-start':LyraMapDrawStartEvent;'lr-map-draw-vertex-end':LyraMapDrawVertexEndEvent;'lr-map-export-error':LyraMapExportErrorEvent;'lr-map-feature-enter':LyraMapFeatureEnterEvent;'lr-map-feature-leave':LyraMapFeatureLeaveEvent;'lr-map-geolocate':LyraMapGeolocateEvent;'lr-map-geolocate-error':LyraMapGeolocateErrorEvent;'lr-map-geolocate-out-of-bounds':LyraMapGeolocateOutOfBoundsEvent;'lr-map-idle':LyraMapIdleEvent;'lr-map-legend-panel-toggle-request':LyraMapLegendPanelToggleRequestEvent;'lr-map-legend-toggle-request':LyraMapLegendToggleRequestEvent;'lr-map-load':LyraMapLoadEvent;'lr-map-marker-activate':LyraMapMarkerActivateEvent;'lr-map-move':LyraMapMoveEvent;'lr-map-pick':LyraMapPickEvent;'lr-map-pointer-leave':LyraMapPointerLeaveEvent;'lr-map-pointer-move':LyraMapPointerMoveEvent;'lr-map-projection-change':LyraMapProjectionChangeEvent;'lr-map-scene-activate':LyraMapSceneActivateEvent;'lr-map-scene-state':LyraMapSceneStateEvent;'lr-map-style-load':LyraMapStyleLoadEvent;'lr-map-terrain-change':LyraMapTerrainChangeEvent;'lr-map-view-change':LyraMapViewChangeEvent;'lr-matrix-geometry-change':LyraMatrixGeometryChangeEvent;'lr-matrix-range-select':LyraMatrixRangeSelectEvent;'lr-maximize-change-request':LyraMaximizeChangeRequestEvent;'lr-mcp-initialized':LyraMcpInitializedEvent;'lr-mcp-log':LyraMcpLogEvent;'lr-mcp-open-link':LyraMcpOpenLinkEvent;'lr-mcp-ready':LyraMcpReadyEvent;'lr-mcp-request':LyraMcpRequestEvent;'lr-mcp-resize':LyraMcpResizeEvent;'lr-mcp-send-message':LyraMcpSendMessageEvent;'lr-mcp-tool-call':LyraMcpToolCallEvent;'lr-media-download-request':LyraMediaDownloadRequestEvent;'lr-media-open':LyraMediaOpenEvent;'lr-mention-close':LyraMentionCloseEvent;'lr-mention-select':LyraMentionSelectEvent;'lr-menu-item-change-request':LyraMenuItemChangeRequestEvent;'lr-menu-item-state-change':LyraMenuItemStateChangeEvent;'lr-message-reorder-request':LyraMessageReorderRequestEvent;'lr-message-retry':LyraMessageRetryEvent;'lr-metric-change-request':LyraMetricChangeRequestEvent;'lr-mode-change':LyraModeChangeEvent;'lr-model-change':LyraModelChangeEvent;'lr-move-request':LyraMoveRequestEvent;'lr-multi-split-collapse-change':LyraMultiSplitCollapseChangeEvent;'lr-multi-split-constraints-invalid':LyraMultiSplitConstraintsInvalidEvent;'lr-multi-split-orientation-change':LyraMultiSplitOrientationChangeEvent;'lr-multi-split-panel-collapse-change':LyraMultiSplitPanelCollapseChangeEvent;'lr-mutation':LyraMutationEvent;'lr-mute-change':LyraMuteChangeEvent;'lr-nav-open-change':LyraNavOpenChangeEvent;'lr-nav-toggle-request':LyraNavToggleRequestEvent;'lr-node-activate':LyraNodeActivateEvent;'lr-node-add':LyraNodeAddEvent;'lr-node-enter':LyraNodeEnterEvent;'lr-node-expand':LyraNodeExpandEvent;'lr-node-leave':LyraNodeLeaveEvent;'lr-node-move':LyraNodeMoveEvent;'lr-node-render-error':LyraNodeRenderErrorEvent;'lr-node-select':LyraNodeSelectEvent;'lr-node-toggle':LyraNodeToggleEvent;'lr-open':LyraOpenEvent;'lr-option-change':LyraOptionChangeEvent;'lr-overflow':LyraOverflowEvent;'lr-overflow-activate':LyraOverflowActivateEvent;'lr-overflow-toggle':LyraOverflowToggleEvent;'lr-page-change':LyraPageChangeEvent;'lr-page-select':LyraPageSelectEvent;'lr-page-viewer-state-change':LyraPageViewerStateChangeEvent;'lr-palette-place':LyraPalettePlaceEvent;'lr-panorama-camera-change':LyraPanoramaCameraChangeEvent;'lr-panorama-hotspot-select':LyraPanoramaHotspotSelectEvent;'lr-part-resume':LyraPartResumeEvent;'lr-part-retry':LyraPartRetryEvent;'lr-path-request':LyraPathRequestEvent;'lr-pause':LyraPauseEvent;'lr-pause-change':LyraPauseChangeEvent;'lr-peek-change':LyraPeekChangeEvent;'lr-permission-decision':LyraPermissionDecisionEvent;'lr-permission-rule-change':LyraPermissionRuleChangeEvent;'lr-pin-change':LyraPinChangeEvent;'lr-play':LyraPlayEvent;'lr-point-activate':LyraPointActivateEvent;'lr-point-select':LyraPointSelectEvent;'lr-poll-due':LyraPollDueEvent;'lr-preview-change':LyraPreviewChangeEvent;'lr-preview-request':LyraPreviewRequestEvent;'lr-priority-columns-visibility-change':LyraPriorityColumnsVisibilityChangeEvent;'lr-query-change':LyraQueryChangeEvent;'lr-query-delete':LyraQueryDeleteEvent;'lr-query-delete-request':LyraQueryDeleteRequestEvent;'lr-query-load':LyraQueryLoadEvent;'lr-query-load-request':LyraQueryLoadRequestEvent;'lr-query-run':LyraQueryRunEvent;'lr-query-run-request':LyraQueryRunRequestEvent;'lr-query-save':LyraQuerySaveEvent;'lr-query-save-request':LyraQuerySaveRequestEvent;'lr-question-input':LyraQuestionInputEvent;'lr-question-response':LyraQuestionResponseEvent;'lr-queue-change':LyraQueueChangeEvent;'lr-rail-resize':LyraRailResizeEvent;'lr-rail-resize-request':LyraRailResizeRequestEvent;'lr-rate-change':LyraRateChangeEvent;'lr-readonly-change':LyraReadonlyChangeEvent;'lr-record-cancel':LyraRecordCancelEvent;'lr-record-chunk':LyraRecordChunkEvent;'lr-record-error':LyraRecordErrorEvent;'lr-record-start':LyraRecordStartEvent;'lr-record-state-change':LyraRecordStateChangeEvent;'lr-record-stop':LyraRecordStopEvent;'lr-recover':LyraRecoverEvent;'lr-regenerate':LyraRegenerateEvent;'lr-relation-activate':LyraRelationActivateEvent;'lr-remove':LyraRemoveEvent;'lr-remove-condition':LyraRemoveConditionEvent;'lr-rename':LyraRenameEvent;'lr-render-error':LyraRenderErrorEvent;'lr-reorder':LyraReorderEvent;'lr-reorder-request':LyraReorderRequestEvent;'lr-reposition':LyraRepositionEvent;'lr-reposition-request':LyraRepositionRequestEvent;'lr-request':LyraRequestEvent;'lr-request-close':LyraRequestCloseEvent;'lr-reset':LyraResetEvent;'lr-resize':LyraResizeEvent;'lr-resize-change':LyraResizeChangeEvent;'lr-resize-input':LyraResizeInputEvent;'lr-resize-request':LyraResizeRequestEvent;'lr-restore':LyraRestoreEvent;'lr-resume':LyraResumeEvent;'lr-retrieval-select':LyraRetrievalSelectEvent;'lr-retry':LyraRetryEvent;'lr-retry-request':LyraRetryRequestEvent;'lr-reveal-change':LyraRevealChangeEvent;'lr-review-input':LyraReviewInputEvent;'lr-review-skip':LyraReviewSkipEvent;'lr-review-submit':LyraReviewSubmitEvent;'lr-review-validity-change':LyraReviewValidityChangeEvent;'lr-rotation-change':LyraRotationChangeEvent;'lr-row-activate':LyraRowActivateEvent;'lr-row-collapse':LyraRowCollapseEvent;'lr-row-expand':LyraRowExpandEvent;'lr-row-expand-request':LyraRowExpandRequestEvent;'lr-row-expand-toggle':LyraRowExpandToggleEvent;'lr-row-select':LyraRowSelectEvent;'lr-run':LyraRunEvent;'lr-run-activate':LyraRunActivateEvent;'lr-run-cancel':LyraRunCancelEvent;'lr-run-retry':LyraRunRetryEvent;'lr-save':LyraSaveEvent;'lr-schema-select':LyraSchemaSelectEvent;'lr-scroll':LyraScrollEvent;'lr-search':LyraSearchEvent;'lr-search-change':LyraSearchChangeEvent;'lr-segment-activate-request':LyraSegmentActivateRequestEvent;'lr-select':LyraSelectEvent;'lr-selection-action':LyraSelectionActionEvent;'lr-selection-change':LyraSelectionChangeEvent;'lr-selection-delete':LyraSelectionDeleteEvent;'lr-send-now':LyraSendNowEvent;'lr-sequence-step':LyraSequenceStepEvent;'lr-show':LyraShowEvent;'lr-skip':LyraSkipEvent;'lr-slice-change-request':LyraSliceChangeRequestEvent;'lr-slide-change':LyraSlideChangeEvent;'lr-sort':LyraSortEvent;'lr-sort-change':LyraSortChangeEvent;'lr-sort-request':LyraSortRequestEvent;'lr-source-category-select':LyraSourceCategorySelectEvent;'lr-source-create':LyraSourceCreateEvent;'lr-source-delete':LyraSourceDeleteEvent;'lr-source-error':LyraSourceErrorEvent;'lr-source-pause':LyraSourcePauseEvent;'lr-source-point-select':LyraSourcePointSelectEvent;'lr-source-selection-change':LyraSourceSelectionChangeEvent;'lr-source-sync':LyraSourceSyncEvent;'lr-sources-change':LyraSourcesChangeEvent;'lr-span-select':LyraSpanSelectEvent;'lr-span-toggle':LyraSpanToggleEvent;'lr-span-visibility-change':LyraSpanVisibilityChangeEvent;'lr-spatial-bin-select':LyraSpatialBinSelectEvent;'lr-spatial-point-select':LyraSpatialPointSelectEvent;'lr-stage-chunk-action':LyraStageChunkActionEvent;'lr-stage-select':LyraStageSelectEvent;'lr-stall':LyraStallEvent;'lr-start':LyraStartEvent;'lr-step-select':LyraStepSelectEvent;'lr-stepper-orientation-change':LyraStepperOrientationChangeEvent;'lr-stop':LyraStopEvent;'lr-submit':LyraSubmitEvent;'lr-suggestion-select':LyraSuggestionSelectEvent;'lr-switch-toggle-request':LyraSwitchToggleRequestEvent;'lr-tab-change':LyraTabChangeEvent;'lr-tab-hide':LyraTabHideEvent;'lr-tab-show':LyraTabShowEvent;'lr-take-over':LyraTakeOverEvent;'lr-test-select':LyraTestSelectEvent;'lr-text-select':LyraTextSelectEvent;'lr-thread-archive':LyraThreadArchiveEvent;'lr-thread-delete':LyraThreadDeleteEvent;'lr-thread-pin':LyraThreadPinEvent;'lr-thread-rename':LyraThreadRenameEvent;'lr-time-change':LyraTimeChangeEvent;'lr-toast-overflow':LyraToastOverflowEvent;'lr-toggle':LyraToggleEvent;'lr-toggle-group-toggle-request':LyraToggleGroupToggleRequestEvent;'lr-toggle-request':LyraToggleRequestEvent;'lr-toggle-toggle-request':LyraToggleToggleRequestEvent;'lr-token-add-request':LyraTokenAddRequestEvent;'lr-token-edit-request':LyraTokenEditRequestEvent;'lr-token-remove-request':LyraTokenRemoveRequestEvent;'lr-tool-activate':LyraToolActivateEvent;'lr-tool-approval-decide-request':LyraToolApprovalDecideRequestEvent;'lr-tool-call-chip-select':LyraToolCallChipSelectEvent;'lr-tool-render-error':LyraToolRenderErrorEvent;'lr-toolbar-actions-change':LyraToolbarActionsChangeEvent;'lr-topic-select':LyraTopicSelectEvent;'lr-topic-toggle':LyraTopicToggleEvent;'lr-tour-end':LyraTourEndEvent;'lr-tour-end-request':LyraTourEndRequestEvent;'lr-tour-start':LyraTourStartEvent;'lr-tour-step-change-request':LyraTourStepChangeRequestEvent;'lr-tour-target-missing':LyraTourTargetMissingEvent;'lr-validity-change':LyraValidityChangeEvent;'lr-version-change':LyraVersionChangeEvent;'lr-version-select':LyraVersionSelectEvent;'lr-video-change':LyraVideoChangeEvent;'lr-view-change':LyraViewChangeEvent;'lr-view-request':LyraViewRequestEvent;'lr-viewer-diagnostic':LyraViewerDiagnosticEvent;'lr-viewport-change':LyraViewportChangeEvent;'lr-virtual-scroll':LyraVirtualScrollEvent;'lr-visibility-change':LyraVisibilityChangeEvent;'lr-visibility-change-request':LyraVisibilityChangeRequestEvent;'lr-visible-range-change':LyraVisibleRangeChangeEvent;'lr-voice-change':LyraVoiceChangeEvent;'lr-vote-request':LyraVoteRequestEvent;'lr-widget-action':LyraWidgetActionEvent;'lr-widget-state-change':LyraWidgetStateChangeEvent;'lr-word-activate':LyraWordActivateEvent;'lr-zoom':LyraZoomEvent;'lr-zoom-change':LyraZoomChangeEvent;}declare global{
|
|
2239
2244
|
/**
|
|
2240
2245
|
* Extended rather than re-declared member by member so `LyraGlobalEventMap` remains the one
|
|
2241
2246
|
* definition. `HTMLElementEventMap`, `DocumentEventMap`, `WindowEventMap`, and
|