@aceshooting/lyra-ui 9.0.0 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  import type { LyraEventDetailSnapshot } from '../../../internal/lyra-element.js';
2
2
  import { type TemplateResult } from 'lit';
3
3
  import { LyraElement } from '../../../internal/lyra-element.js';
4
+ export type { LyraNodeTypeStyle } from '../../../internal/node-type-style.js';
4
5
  import { type LyraSpan } from '../trace-tree/span.js';
5
6
  export type { LyraSpan } from '../trace-tree/span.js';
6
7
  export interface LyraAgentTraceEventMap {
@@ -1,4 +1,4 @@
1
- var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r};import{html,svg,nothing}from"lit";import{property,state,query}from"lit/decorators.js";import{styleMap}from"lit/directives/style-map.js";import{LyraElement}from"../../../internal/lyra-element.js";import{specialistTokens}from"../../../internal/specialist-tokens.styles.js";import{nextId,srOnly}from"../../../internal/a11y.js";import{getListFormat,getNumberFormat}from"../../../internal/intl-cache.js";import{finiteAdd,finiteCount,finiteRange}from"../../../internal/numbers.js";import{escapeCsvField}from"../../utility/export-button/csv.js";import"../../utility/live-region/live-region.class.js";import{styles}from"./lite-chart.styles.js";import{forcedColorEncoding,forcedColorsActive}from"./chart-forced-colors.js";import{literalSetConverter,trueDefaultBooleanFromAttributeConverter as trueDefaultBooleanConverter}from"../../../internal/converters.js";import{sanitizeCssColor,sanitizeCssLength}from"../../../internal/safe-css.js";import{activeElementIn}from"../../../internal/active-element.js";import{acquireAnnouncementSink}from"../../../internal/announcer.js";import{MAX_RENDERED_CHART_RECORDS,sampleChartTableIndexes}from"./chart-table-sampling.js";import{chartChromeLegendPlacement,normalizeChartChromeLegendPosition}from"./chart-chrome.js";import{LYRA_DEFAULT_chart,LYRA_DEFAULT_chartCategory,LYRA_DEFAULT_chartData,LYRA_DEFAULT_chartDataSampled,LYRA_DEFAULT_chartSeriesLabel,LYRA_DEFAULT_chartTotal,LYRA_DEFAULT_liteChartBarLabel,LYRA_DEFAULT_liteChartCustomMarkSummary,LYRA_DEFAULT_liteChartMarkSummary}from"../../../internal/default-strings.generated.js";function normalizeLiteChartType(value){return value==="line"||value==="bar"?value:"bar"}const LITE_CHART_LAYOUT=literalSetConverter(["fit","scroll"],"fit"),DEFAULT_PALETTE=["var(--lr-chart-color-1, var(--lr-color-chart-1))","var(--lr-chart-color-2, var(--lr-color-chart-2))","var(--lr-chart-color-3, var(--lr-color-chart-3))","var(--lr-chart-color-4, var(--lr-color-chart-4))","var(--lr-chart-color-5, var(--lr-color-chart-5))","var(--lr-chart-color-6, var(--lr-color-chart-6))","var(--lr-chart-color-7, var(--lr-color-chart-7))","var(--lr-chart-color-8, var(--lr-color-chart-8))"],PAD_LEFT=36,PAD_RIGHT=8,PAD_TOP=8,PAD_BOTTOM=24,CATEGORY_LABEL_OFFSET=18,AXIS_TITLE_SPACE=14,TICK_COUNT=4,BAR_GROUP_GAP=.2,BAR_GAP=.08,BAR_CORNER_RADIUS=4,APPROX_LABEL_CHARACTER_WIDTH=7,MAX_SCROLL_CONTENT_WIDTH=1e6;function niceStep(span,count){const rough=span/Math.max(1,count),magnitude=10**Math.floor(Math.log10(rough)),residual=rough/magnitude;return(residual<1.5?1:residual<3?2:residual<7?5:10)*magnitude}function domainFraction(value,lo,hi){const span=hi-lo;if(Number.isFinite(span)&&span>0)return Math.min(1,Math.max(0,(value-lo)/span));const scale=Math.max(Math.abs(value),Math.abs(lo),Math.abs(hi),1),scaledSpan=hi/scale-lo/scale;if(!Number.isFinite(scaledSpan)||scaledSpan<=0)return 0;const fraction=(value/scale-lo/scale)/scaledSpan;return Number.isFinite(fraction)?Math.min(1,Math.max(0,fraction)):0}function safeDomainTicks(lo,hi,count){return Array.from({length:Math.max(1,count)+1},(_,index)=>{if(index===0)return lo;if(index===count)return hi;const ratio=index/count;return lo*(1-ratio)+hi*ratio}).filter(Number.isFinite)}function niceDomain(dataLo,dataHi,beginAtZero,count){let lo=beginAtZero?Math.min(0,dataLo):dataLo,hi=beginAtZero?Math.max(0,dataHi):dataHi;lo===hi&&(Math.abs(lo)>Number.MAX_VALUE/2?(lo=lo>0?lo/2:lo,hi=hi<0?hi/2:hi):(lo-=1,hi+=1));const span=hi-lo;if(!Number.isFinite(span))return{lo,hi,ticks:safeDomainTicks(lo,hi,count)};const step=niceStep(span,count);if(!Number.isFinite(step)||step<=0)return{lo,hi,ticks:safeDomainTicks(lo,hi,count)};const roundedLo=Math.floor(lo/step)*step,roundedHi=Math.ceil(hi/step)*step;Number.isFinite(roundedLo)&&(lo=roundedLo),Number.isFinite(roundedHi)&&(hi=roundedHi);const slots=Math.floor((hi-lo)/step);if(!Number.isFinite(slots)||slots<0||slots>100)return{lo,hi,ticks:safeDomainTicks(lo,hi,count)};const ticks=[];for(let index=0;index<=slots;index++){const value=lo+index*step;Number.isFinite(value)&&ticks.push(value)}return ticks.at(-1)!==hi&&ticks.push(hi),{lo,hi,ticks}}class LyraLiteChart extends LyraElement{constructor(){super(...arguments),this.type="bar",this.labels=[],this.datasets=[],this.legend=!1,this.legendPosition="bottom",this.height="280px",this.xLabel="",this.yLabel="",this.beginAtZero=!0,this.stacked=!1,this.tableTotals=!1,this._layout="fit",this.barWidth=32,this.roundedBars=!1,this.skipZero=!1,this.scale="linear",this.withoutValueAxis=!1,this.selectedIndices=[],this.label=null,this.description=null,this.forcedColorPatternId=nextId("lite-chart-pattern"),this.descriptionId=nextId("lite-chart-description"),this.plotWidth=0,this.plotHeight=0,this.fitMeasurementAvailable=!1,this.activeMarkIndex=0,this.resizeObserverGeneration=0,this.refocusMarkAfterUpdate=!1,this.refocusChartAfterUpdate=!1,this.lastDataTruncationAnnouncement="",this.isMounting=!0,this.onForcedColorsChange=()=>{!this.isConnected||this.ownerDocument.defaultView!==this.forcedColorsWindow||this.requestUpdate()}}static{this.defaultStrings={...super.defaultStrings,chart:LYRA_DEFAULT_chart,chartCategory:LYRA_DEFAULT_chartCategory,chartData:LYRA_DEFAULT_chartData,chartDataSampled:LYRA_DEFAULT_chartDataSampled,chartSeriesLabel:LYRA_DEFAULT_chartSeriesLabel,chartTotal:LYRA_DEFAULT_chartTotal,liteChartBarLabel:LYRA_DEFAULT_liteChartBarLabel,liteChartCustomMarkSummary:LYRA_DEFAULT_liteChartCustomMarkSummary,liteChartMarkSummary:LYRA_DEFAULT_liteChartMarkSummary}}static{this.ownedCollectionProperties=Object.freeze(["labels","datasets","selectedIndices"])}static{this.styles=[LyraElement.styles,specialistTokens,styles,srOnly]}get layout(){return this._layout}set layout(next){const normalized=LITE_CHART_LAYOUT.normalizeReflected(this,"layout",next),old=this._layout;old!==normalized&&(this._layout=normalized,this.requestUpdate("layout",old))}appendData(label,values,maxPoints=0){const limit=Math.max(0,finiteCount(maxPoints,0));let domainLength=this.labels.length;for(const series of this.datasets)domainLength=Math.max(domainLength,series.data.length);const labels=[...this.labels,...Array.from({length:Math.max(0,domainLength-this.labels.length)},()=>""),label],datasets=this.datasets.map((series,index)=>({...series,data:[...series.data,...Array.from({length:Math.max(0,domainLength-series.data.length)},()=>null),values[index]??null]}));this.labels=limit>0?labels.slice(-limit):labels,this.datasets=limit>0?datasets.map(series=>({...series,data:series.data.slice(-limit)})):datasets}exportData(format){if(format==="svg"){const XMLSerializerCtor=this.ownerDocument.defaultView?.XMLSerializer;return!this.svgEl||typeof XMLSerializerCtor!="function"?"":new XMLSerializerCtor().serializeToString(this.svgEl)}const header=["label",...this.datasets.map(series=>series.label)].map(escapeCsvField).join(","),rows=Array.from({length:this.recordCount()},(_,index)=>{const label=this.labels[index]??"";return[label,...this.datasets.map((series,datasetIndex)=>{const value=series.data[index];return typeof value=="number"&&Number.isFinite(value)?this.formatter?.({value,surface:"export",datasetIndex,index,label,seriesLabel:series.label})??value:""})].map(escapeCsvField).join(",")});return[header,...rows].join(`\r
1
+ var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r};import{html,svg,nothing}from"lit";import{property,state,query}from"lit/decorators.js";import{styleMap}from"lit/directives/style-map.js";import{LyraElement}from"../../../internal/lyra-element.js";import{specialistTokens}from"../../../internal/specialist-tokens.styles.js";import{nextId,srOnly}from"../../../internal/a11y.js";import{getListFormat,getNumberFormat}from"../../../internal/intl-cache.js";import{finiteAdd,finiteCount,finiteRange}from"../../../internal/numbers.js";import{escapeCsvField}from"../../utility/export-button/csv.js";import"../../utility/live-region/live-region.class.js";import{styles}from"./lite-chart.styles.js";import{forcedColorEncoding,forcedColorsActive}from"./chart-forced-colors.js";import{literalSetConverter,trueDefaultBooleanFromAttributeConverter as trueDefaultBooleanConverter}from"../../../internal/converters.js";import{sanitizeCssColor,sanitizeCssLength}from"../../../internal/safe-css.js";import{activeElementIn}from"../../../internal/active-element.js";import{acquireAnnouncementSink}from"../../../internal/announcer.js";import{MAX_RENDERED_CHART_RECORDS,sampleChartTableIndexes}from"./chart-table-sampling.js";import{chartChromeLegendPlacement,normalizeChartChromeLegendPosition}from"./chart-chrome.js";import{LYRA_DEFAULT_chart,LYRA_DEFAULT_chartCategory,LYRA_DEFAULT_chartData,LYRA_DEFAULT_chartDataSampled,LYRA_DEFAULT_chartSeriesLabel,LYRA_DEFAULT_chartTotal,LYRA_DEFAULT_liteChartBarLabel,LYRA_DEFAULT_liteChartCustomMarkSummary,LYRA_DEFAULT_liteChartMarkSummary}from"../../../internal/default-strings.generated.js";function normalizeLiteChartType(value){return value==="line"||value==="bar"?value:"bar"}const LITE_CHART_LAYOUT=literalSetConverter(["fit","scroll"],"fit"),DEFAULT_PALETTE=["var(--lr-chart-color-1, var(--lr-color-chart-1))","var(--lr-chart-color-2, var(--lr-color-chart-2))","var(--lr-chart-color-3, var(--lr-color-chart-3))","var(--lr-chart-color-4, var(--lr-color-chart-4))","var(--lr-chart-color-5, var(--lr-color-chart-5))","var(--lr-chart-color-6, var(--lr-color-chart-6))","var(--lr-chart-color-7, var(--lr-color-chart-7))","var(--lr-chart-color-8, var(--lr-color-chart-8))"],PAD_LEFT=36,PAD_RIGHT=8,PAD_TOP=8,PAD_BOTTOM=30,CATEGORY_LABEL_OFFSET=24,AXIS_TITLE_SPACE=14,TICK_COUNT=4,BAR_GROUP_GAP=.2,BAR_GAP=.08,BAR_CORNER_RADIUS=4,APPROX_LABEL_CHARACTER_WIDTH=7,MAX_SCROLL_CONTENT_WIDTH=1e6;function niceStep(span,count){const rough=span/Math.max(1,count),magnitude=10**Math.floor(Math.log10(rough)),residual=rough/magnitude;return(residual<1.5?1:residual<3?2:residual<7?5:10)*magnitude}function domainFraction(value,lo,hi){const span=hi-lo;if(Number.isFinite(span)&&span>0)return Math.min(1,Math.max(0,(value-lo)/span));const scale=Math.max(Math.abs(value),Math.abs(lo),Math.abs(hi),1),scaledSpan=hi/scale-lo/scale;if(!Number.isFinite(scaledSpan)||scaledSpan<=0)return 0;const fraction=(value/scale-lo/scale)/scaledSpan;return Number.isFinite(fraction)?Math.min(1,Math.max(0,fraction)):0}function safeDomainTicks(lo,hi,count){return Array.from({length:Math.max(1,count)+1},(_,index)=>{if(index===0)return lo;if(index===count)return hi;const ratio=index/count;return lo*(1-ratio)+hi*ratio}).filter(Number.isFinite)}function niceDomain(dataLo,dataHi,beginAtZero,count){let lo=beginAtZero?Math.min(0,dataLo):dataLo,hi=beginAtZero?Math.max(0,dataHi):dataHi;lo===hi&&(Math.abs(lo)>Number.MAX_VALUE/2?(lo=lo>0?lo/2:lo,hi=hi<0?hi/2:hi):(lo-=1,hi+=1));const span=hi-lo;if(!Number.isFinite(span))return{lo,hi,ticks:safeDomainTicks(lo,hi,count)};const step=niceStep(span,count);if(!Number.isFinite(step)||step<=0)return{lo,hi,ticks:safeDomainTicks(lo,hi,count)};const roundedLo=Math.floor(lo/step)*step,roundedHi=Math.ceil(hi/step)*step;Number.isFinite(roundedLo)&&(lo=roundedLo),Number.isFinite(roundedHi)&&(hi=roundedHi);const slots=Math.floor((hi-lo)/step);if(!Number.isFinite(slots)||slots<0||slots>100)return{lo,hi,ticks:safeDomainTicks(lo,hi,count)};const ticks=[];for(let index=0;index<=slots;index++){const value=lo+index*step;Number.isFinite(value)&&ticks.push(value)}return ticks.at(-1)!==hi&&ticks.push(hi),{lo,hi,ticks}}class LyraLiteChart extends LyraElement{constructor(){super(...arguments),this.type="bar",this.labels=[],this.datasets=[],this.legend=!1,this.legendPosition="bottom",this.height="280px",this.xLabel="",this.yLabel="",this.beginAtZero=!0,this.stacked=!1,this.tableTotals=!1,this._layout="fit",this.barWidth=32,this.roundedBars=!1,this.skipZero=!1,this.scale="linear",this.withoutValueAxis=!1,this.selectedIndices=[],this.label=null,this.description=null,this.forcedColorPatternId=nextId("lite-chart-pattern"),this.descriptionId=nextId("lite-chart-description"),this.plotWidth=0,this.plotHeight=0,this.fitMeasurementAvailable=!1,this.activeMarkIndex=0,this.resizeObserverGeneration=0,this.refocusMarkAfterUpdate=!1,this.refocusChartAfterUpdate=!1,this.lastDataTruncationAnnouncement="",this.isMounting=!0,this.onForcedColorsChange=()=>{!this.isConnected||this.ownerDocument.defaultView!==this.forcedColorsWindow||this.requestUpdate()}}static{this.defaultStrings={...super.defaultStrings,chart:LYRA_DEFAULT_chart,chartCategory:LYRA_DEFAULT_chartCategory,chartData:LYRA_DEFAULT_chartData,chartDataSampled:LYRA_DEFAULT_chartDataSampled,chartSeriesLabel:LYRA_DEFAULT_chartSeriesLabel,chartTotal:LYRA_DEFAULT_chartTotal,liteChartBarLabel:LYRA_DEFAULT_liteChartBarLabel,liteChartCustomMarkSummary:LYRA_DEFAULT_liteChartCustomMarkSummary,liteChartMarkSummary:LYRA_DEFAULT_liteChartMarkSummary}}static{this.ownedCollectionProperties=Object.freeze(["labels","datasets","selectedIndices"])}static{this.styles=[LyraElement.styles,specialistTokens,styles,srOnly]}get layout(){return this._layout}set layout(next){const normalized=LITE_CHART_LAYOUT.normalizeReflected(this,"layout",next),old=this._layout;old!==normalized&&(this._layout=normalized,this.requestUpdate("layout",old))}appendData(label,values,maxPoints=0){const limit=Math.max(0,finiteCount(maxPoints,0));let domainLength=this.labels.length;for(const series of this.datasets)domainLength=Math.max(domainLength,series.data.length);const labels=[...this.labels,...Array.from({length:Math.max(0,domainLength-this.labels.length)},()=>""),label],datasets=this.datasets.map((series,index)=>({...series,data:[...series.data,...Array.from({length:Math.max(0,domainLength-series.data.length)},()=>null),values[index]??null]}));this.labels=limit>0?labels.slice(-limit):labels,this.datasets=limit>0?datasets.map(series=>({...series,data:series.data.slice(-limit)})):datasets}exportData(format){if(format==="svg"){const XMLSerializerCtor=this.ownerDocument.defaultView?.XMLSerializer;return!this.svgEl||typeof XMLSerializerCtor!="function"?"":new XMLSerializerCtor().serializeToString(this.svgEl)}const header=["label",...this.datasets.map(series=>series.label)].map(escapeCsvField).join(","),rows=Array.from({length:this.recordCount()},(_,index)=>{const label=this.labels[index]??"";return[label,...this.datasets.map((series,datasetIndex)=>{const value=series.data[index];return typeof value=="number"&&Number.isFinite(value)?this.formatter?.({value,surface:"export",datasetIndex,index,label,seriesLabel:series.label})??value:""})].map(escapeCsvField).join(",")});return[header,...rows].join(`\r
2
2
  `)}connectedCallback(){super.connectedCallback(),this.syncAnnouncementSink(),this.armResizeObserver(),this.armForcedColorsWatcher()}armResizeObserver(){const target=this.svgEl,ownerDocument=this.ownerDocument;if(!this.isConnected||!target||this.resizeObserver&&this.resizeObserverDocument===ownerDocument&&this.resizeObserverTarget===target)return;this.resetResizeObserver();const ResizeObserverCtor=ownerDocument.defaultView?.ResizeObserver;if(!ResizeObserverCtor)return;const generation=this.resizeObserverGeneration,observer=new ResizeObserverCtor(entries=>{if(this.resizeObserver!==observer||this.resizeObserverGeneration!==generation||!this.isConnected||this.ownerDocument!==ownerDocument||this.resizeObserverTarget!==target)return;const box=entries[0]?.contentBoxSize?.[0];if(box)this.plotWidth=box.inlineSize,this.plotHeight=box.blockSize;else{const rect=this.svgEl?.getBoundingClientRect();rect&&(this.plotWidth=rect.width,this.plotHeight=rect.height)}});this.resizeObserver=observer,this.resizeObserverDocument=ownerDocument,this.resizeObserverTarget=target,target&&observer.observe(target)}disconnectedCallback(){super.disconnectedCallback(),this.releaseAnnouncementSink(),this.lastDataTruncationAnnouncement="",this.isMounting=!0,this.resetResizeObserver(),this.disarmForcedColorsWatcher()}adoptedCallback(){super.adoptedCallback(),this.resetResizeObserver(),this.releaseAnnouncementSink(),this.syncAnnouncementSink(),this.refreshFitMeasurementAvailability(),this.armForcedColorsWatcher()}armForcedColorsWatcher(){const ownerWindow=this.ownerDocument?.defaultView??void 0;ownerWindow?.matchMedia&&(this.forcedColorsWindow===ownerWindow&&this.forcedColorsQuery||(this.disarmForcedColorsWatcher(),this.forcedColorsWindow=ownerWindow,this.forcedColorsQuery=ownerWindow.matchMedia("(forced-colors: active)"),this.forcedColorsQuery.addEventListener("change",this.onForcedColorsChange)))}disarmForcedColorsWatcher(){this.forcedColorsQuery?.removeEventListener("change",this.onForcedColorsChange),this.forcedColorsQuery=void 0,this.forcedColorsWindow=void 0}syncAnnouncementSink(){this.isConnected&&this.politeAnnouncementSink?.element.ownerDocument!==this.ownerDocument&&(this.releaseAnnouncementSink(),this.politeAnnouncementSink=acquireAnnouncementSink("polite",{document:this.ownerDocument,source:this}))}releaseAnnouncementSink(){this.politeAnnouncementSink?.release(),this.politeAnnouncementSink=void 0}resetResizeObserver(){this.resizeObserverGeneration+=1,this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.resizeObserverDocument=void 0,this.resizeObserverTarget=void 0}firstUpdated(changed){super.firstUpdated(changed),this.armResizeObserver()}willUpdate(changed){if(super.willUpdate(changed),this.seedFirstRenderState(()=>{this.refreshFitMeasurementAvailability()}),!["type","labels","datasets","skipZero"].some(name=>changed.has(name)))return;const active=activeElementIn(this.shadowRoot)??null,hadFocusedMark=active?.matches('[part="bar"], [part="point"]')??!1,priorPosition=Number(active?.getAttribute("data-mark-index")??this.activeMarkIndex),datasetAttribute=active?.getAttribute("data-dataset-index"),indexAttribute=active?.getAttribute("data-index"),datasetIndex=Number(datasetAttribute),index=Number(indexAttribute),marks=this.interactiveMarks(),sameIdentity=datasetAttribute!=null&&indexAttribute!==null&&indexAttribute!==void 0?marks.findIndex(mark=>mark.datasetIndex===datasetIndex&&mark.index===index):-1;this.activeMarkIndex=marks.length?sameIdentity>=0?sameIdentity:Math.min(Math.max(priorPosition,0),marks.length-1):0,this.refocusMarkAfterUpdate=hadFocusedMark&&marks.length>0,this.refocusChartAfterUpdate=hadFocusedMark&&marks.length===0}updated(changed){super.updated(changed);const wasMounting=this.isMounting;if(this.isMounting=!1,changed.has("height")){const height=sanitizeCssLength(this.height,"height");height?this.style.setProperty("--_lr-chart-height",height):this.style.removeProperty("--_lr-chart-height")}const dataTruncation=this.dataTruncationMessage();wasMounting?this.lastDataTruncationAnnouncement=dataTruncation:dataTruncation!==this.lastDataTruncationAnnouncement&&(this.lastDataTruncationAnnouncement=dataTruncation,dataTruncation&&this.politeAnnouncementSink?.announce(dataTruncation)),this.refocusMarkAfterUpdate&&(this.refocusMarkAfterUpdate=!1,this.renderRoot.querySelectorAll('[part="bar"], [part="point"]')[this.normalizedMarkIndex()]?.focus()),this.refocusChartAfterUpdate&&(this.refocusChartAfterUpdate=!1,this.svgEl?.focus())}colorFor(index,series){return sanitizeCssColor(series.color)??DEFAULT_PALETTE[index%DEFAULT_PALETTE.length]}get effectiveType(){return normalizeLiteChartType(this.type)}forcedColors(){return forcedColorsActive(this.ownerDocument?.defaultView)}markPaint(index,series){const color=this.colorFor(index,series);return this.effectiveType==="bar"&&this.forcedColors()?`url(#${this.forcedColorPatternId}-${index})`:color}legendEncoding(index){return this.forcedColors()?forcedColorEncoding(index).name:nothing}markDash(index){if(!this.forcedColors())return nothing;const dash=forcedColorEncoding(index).dash;return dash.length?dash.join(" "):"none"}renderForcedColorPatterns(){if(this.effectiveType!=="bar"||!this.forcedColors())return nothing;const size=8,half=size/2,texture="var(--lr-color-surface)";return svg`<defs>
3
3
  ${this.recordSample().seriesIndexes.map(index=>{const series=this.datasets[index],encoding=forcedColorEncoding(index).name,shapes=(()=>{switch(encoding){case"horizontal":return svg`<rect y=${half} width=${size} height="1" fill=${texture}></rect>`;case"vertical":return svg`<rect x=${half} width="1" height=${size} fill=${texture}></rect>`;case"diagonal":return svg`<path
4
4
  d=${`M${-half},${size} L${half},0 M${half},${size} L${size+half},0`}
@@ -1,6 +1,7 @@
1
1
  import { type PropertyValues, type TemplateResult } from 'lit';
2
2
  import { LyraElement } from '../../../internal/lyra-element.js';
3
3
  import type { LyraNodeTypeStyle } from '../../../internal/node-type-style.js';
4
+ export type { LyraNodeTypeStyle } from '../../../internal/node-type-style.js';
4
5
  import '../breadcrumb/breadcrumb.class.js';
5
6
  import '../breadcrumb/breadcrumb-item.class.js';
6
7
  import '../tab-group/tab-group.class.js';
@@ -7,6 +7,7 @@ import '../../overlays/chip/chip.class.js';
7
7
  import '../../forms/button/button.class.js';
8
8
  import '../../overlays/empty/empty.class.js';
9
9
  import type { LyraNodeTypeStyle } from '../../../internal/node-type-style.js';
10
+ export type { LyraNodeTypeStyle } from '../../../internal/node-type-style.js';
10
11
  /** One knowledge-graph entity, as consumed by every knowledge-graph explorer component. Field
11
12
  * names deliberately mirror `lr-graph`'s node shape (`type`, `communityId`), so
12
13
  * `{ ...graphNode, label: graphNode.label ?? graphNode.id }` adapts a graph node into a
@@ -7,6 +7,7 @@ import type { LyraProvenance, LyraProvenancePanelEventMap } from '../provenance-
7
7
  import type { StatRow } from '../../data/stat/stat.class.js';
8
8
  import type { LyraVariant } from '../../../internal/variants.js';
9
9
  import type { LyraNodeTypeStyle } from '../../../internal/node-type-style.js';
10
+ export type { LyraNodeTypeStyle } from '../../../internal/node-type-style.js';
10
11
  import type { LyraTabGroupEventMap } from '../../layout/tab-group/tab-group.class.js';
11
12
  import '../entity-card/entity-card.class.js';
12
13
  import '../neighbor-list/neighbor-list.class.js';
@@ -2,6 +2,7 @@ import type { LyraEventDetailSnapshot } from '../../../internal/lyra-element.js'
2
2
  import { type TemplateResult, type PropertyValues } from 'lit';
3
3
  import { LyraElement } from '../../../internal/lyra-element.js';
4
4
  import type { LyraNodeTypeStyle } from '../../../internal/node-type-style.js';
5
+ export type { LyraNodeTypeStyle } from '../../../internal/node-type-style.js';
5
6
  import { type LyraGraphCommunity, type LyraGraphLink, type LyraGraphNode } from './graph-model.js';
6
7
  export type { LyraGraphCommunity, LyraGraphLink, LyraGraphNode, } from './graph-model.js';
7
8
  import '../../overlays/skeleton/skeleton.class.js';
@@ -2,6 +2,7 @@ import type { LyraEventDetailSnapshot } from '../../../internal/lyra-element.js'
2
2
  import { type TemplateResult } from 'lit';
3
3
  import { LyraElement } from '../../../internal/lyra-element.js';
4
4
  import type { LyraNodeTypeStyle } from '../../../internal/node-type-style.js';
5
+ export type { LyraNodeTypeStyle } from '../../../internal/node-type-style.js';
5
6
  export interface LyraGraphLegendVisibilityDetail {
6
7
  hiddenTypes: string[];
7
8
  }
@@ -2,6 +2,7 @@ import type { LyraEventDetailSnapshot } from '../../../internal/lyra-element.js'
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  import { LyraElement } from '../../../internal/lyra-element.js';
4
4
  import type { LyraNodeTypeStyle } from '../../../internal/node-type-style.js';
5
+ export type { LyraNodeTypeStyle } from '../../../internal/node-type-style.js';
5
6
  import type { LyraGraphCommunity, LyraGraphRenderer, LyraGraphLink, LyraGraphNode } from '../graph/graph.class.js';
6
7
  import type { LyraEntity } from '../entity-card/entity-card.class.js';
7
8
  import type { LyraPathElement } from '../path-strip/path-strip.class.js';
@@ -6,6 +6,7 @@ import '../provenance-panel/provenance-panel.class.js';
6
6
  import '../../agent-tools/confirm-bar/confirm-bar.class.js';
7
7
  import '../../overlays/empty/empty.class.js';
8
8
  import type { LyraNodeTypeStyle } from '../../../internal/node-type-style.js';
9
+ export type { LyraNodeTypeStyle } from '../../../internal/node-type-style.js';
9
10
  import type { LyraScoreThresholds } from '../graph/graph.class.js';
10
11
  /**
11
12
  * One item held in a memory panel's short-term or long-term list. `provenance` reuses
@@ -188,4 +189,3 @@ declare global {
188
189
  'lr-memory-panel': LyraMemoryPanel;
189
190
  }
190
191
  }
191
- export {};
@@ -11,6 +11,7 @@ import '../community-card/community-card.class.js';
11
11
  import '../chunk-inspector/chunk-inspector.class.js';
12
12
  import '../../overlays/empty/empty.class.js';
13
13
  import type { LyraNodeTypeStyle } from '../../../internal/node-type-style.js';
14
+ export type { LyraNodeTypeStyle } from '../../../internal/node-type-style.js';
14
15
  import type { LyraScoreThresholds } from '../graph/graph.class.js';
15
16
  export interface LyraProvenance {
16
17
  readonly entities?: readonly LyraEntity[];
@@ -98,4 +99,3 @@ declare global {
98
99
  'lr-provenance-panel': LyraProvenancePanel;
99
100
  }
100
101
  }
101
- export {};
@@ -3,4 +3,4 @@
3
3
  * Run `pnpm package-metadata` after changing package identity or version.
4
4
  */
5
5
  export declare const LYRA_PACKAGE_NAME: '@aceshooting/lyra-ui';
6
- export declare const LYRA_PACKAGE_VERSION: '9.0.0';
6
+ export declare const LYRA_PACKAGE_VERSION: '9.1.0';
@@ -1 +1 @@
1
- const LYRA_PACKAGE_NAME="@aceshooting/lyra-ui",LYRA_PACKAGE_VERSION="9.0.0";export{LYRA_PACKAGE_NAME,LYRA_PACKAGE_VERSION};
1
+ const LYRA_PACKAGE_NAME="@aceshooting/lyra-ui",LYRA_PACKAGE_VERSION="9.1.0";export{LYRA_PACKAGE_NAME,LYRA_PACKAGE_VERSION};
@@ -79,5 +79,10 @@ import. Opening a `.zip` through `<lr-document-viewer>` forwards `anchor`/`highl
79
79
  viewer, so a deep link into an entry name survives the registry hop. `.tar`, `.rar`, and other
80
80
  archive formats fall through to `<lr-document-preview>`'s generic download fallback.
81
81
 
82
+ A granular consumer (not importing the `all.js` compatibility bundle) must import
83
+ `@aceshooting/lyra-ui/components/viewers/archive-viewer/archive-viewer-register.js` once to install
84
+ this registration; without it `<lr-document-viewer>` never recognizes `.zip` files and falls
85
+ through to the generic download fallback described above.
86
+
82
87
  Remote resources are capped at 25 MB; exceeding it surfaces the localized
83
88
  `documentPreviewResourceTooLarge` message instead of the entry listing.
@@ -76,6 +76,9 @@ unambiguous beside other previous/next controls and are overridable through `.st
76
76
  matches `application/epub+zip` and `.epub` filenames, declaring `{ anchors: ['cfi', 'text-quote'],
77
77
  search: true, textSelect: true }` capabilities and forwarding `anchor`/`highlights` to the mounted
78
78
  viewer. The peer loader requires the callable EPUB factory; malformed module shapes fail closed.
79
+ A granular consumer (not importing the `all.js` compatibility bundle) must also import
80
+ `@aceshooting/lyra-ui/components/viewers/ebook-viewer/ebook-viewer-register.js` once to install
81
+ this registration; without it `<lr-document-viewer>` never recognizes `.epub` files.
79
82
 
80
83
  Remote resources are capped at 25 MB; exceeding it surfaces the localized
81
84
  `documentPreviewResourceTooLarge` message instead of the ebook.
package/llms/migration.md CHANGED
@@ -150,9 +150,9 @@ The pinned Web Awesome manifest is authoritative for this inventory; only rows m
150
150
  | `<wa-spinner>` | `<lr-spinner>` | `exact` | Automatic: tag and supported side-effect registration import. Localized indeterminate busy indicator with reduced-motion support. |
151
151
  | `<wa-split-panel>` | `<lr-split-panel>` | `rewritten` | Automatic: tag/import plus events: wa-reposition → lr-reposition. |
152
152
  | `<wa-switch>` | `<lr-switch>` | `rewritten` | Automatic: tag/import plus events: wa-invalid → lr-invalid. Equivalent surface representation: name defaults null ≡ ; no source rewrite. |
153
- | `<wa-tab>` | `<lr-tab>` | `exact` | Automatic: tag and supported side-effect registration import. Tab strip with `placement` (logical `start`/`end` turn it vertical) and `activation="auto"`/`"manual"`; accepts the upstream `<lr-tab>`/`<lr-tab-panel>` child pairs or this library's own `slot`/`label` panel-attribute shape. |
153
+ | `<wa-tab>` | `<lr-tab>` | `exact` | Automatic: tag and supported side-effect registration import. Tab strip with `placement` (logical `start`/`end` turn it vertical) and `activation="auto"`/`"manual"`; composed from the upstream `<lr-tab>`/`<lr-tab-panel>` child pairs. |
154
154
  | `<wa-tab-group>` | `<lr-tab-group>` | `rewritten` | Automatic: tag/import plus events: wa-tab-hide → lr-tab-hide; events: wa-tab-show → lr-tab-show. |
155
- | `<wa-tab-panel>` | `<lr-tab-panel>` | `exact` | Automatic: tag and supported side-effect registration import. Tab strip with `placement` (logical `start`/`end` turn it vertical) and `activation="auto"`/`"manual"`; accepts the upstream `<lr-tab>`/`<lr-tab-panel>` child pairs or this library's own `slot`/`label` panel-attribute shape. |
155
+ | `<wa-tab-panel>` | `<lr-tab-panel>` | `exact` | Automatic: tag and supported side-effect registration import. Tab strip with `placement` (logical `start`/`end` turn it vertical) and `activation="auto"`/`"manual"`; composed from the upstream `<lr-tab>`/`<lr-tab-panel>` child pairs. |
156
156
  | `<wa-tag>` | `<lr-tag>` | `rewritten` | Automatic: tag/import plus events: wa-remove → lr-remove. |
157
157
  | `<wa-textarea>` | `<lr-textarea>` | `rewritten` | Automatic: tag/import plus events: wa-invalid → lr-invalid. Equivalent surface representation: name defaults null ≡ ; no source rewrite. |
158
158
  | `<wa-time-input>` | `<lr-time-input>` | `rewritten` | Automatic: tag/import plus events: wa-after-hide → lr-after-hide; events: wa-after-show → lr-after-show; events: wa-clear → lr-clear; events: wa-hide → lr-hide; events: wa-invalid → lr-invalid; events: wa-show → lr-show. |
@@ -222,7 +222,7 @@ Shoelace relationships are classified independently; a same-suffix tag is never
222
222
  | `<sl-switch>` | `<lr-switch>` | `rewritten` | Automatic: tag/import plus events: sl-blur → blur; events: sl-change → lr-change; events: sl-focus → focus; events: sl-input → lr-input; events: sl-invalid → lr-invalid. Equivalent surface representation: form defaults ≡ null; size defaults medium ≡ m; no source rewrite. |
223
223
  | `<sl-tab>` | `<lr-tab>` | `rewritten` | Automatic: tag/import plus events: sl-close → lr-close. |
224
224
  | `<sl-tab-group>` | `<lr-tab-group>` | `rewritten` | Automatic: tag/import plus events: sl-tab-hide → lr-tab-hide; events: sl-tab-show → lr-tab-show. |
225
- | `<sl-tab-panel>` | `<lr-tab-panel>` | `exact` | Automatic: tag and supported side-effect registration import. Tab strip with `placement` (logical `start`/`end` turn it vertical) and `activation="auto"`/`"manual"`; accepts the upstream `<lr-tab>`/`<lr-tab-panel>` child pairs or this library's own `slot`/`label` panel-attribute shape. |
225
+ | `<sl-tab-panel>` | `<lr-tab-panel>` | `exact` | Automatic: tag and supported side-effect registration import. Tab strip with `placement` (logical `start`/`end` turn it vertical) and `activation="auto"`/`"manual"`; composed from the upstream `<lr-tab>`/`<lr-tab-panel>` child pairs. |
226
226
  | `<sl-tag>` | `<lr-tag>` | `rewritten` | Automatic: tag/import plus events: sl-remove → lr-remove. Equivalent surface representation: size defaults medium ≡ m; no source rewrite. |
227
227
  | `<sl-textarea>` | `<lr-textarea>` | `rewritten` | Automatic: tag/import plus events: sl-blur → blur; events: sl-change → lr-change; events: sl-focus → focus; events: sl-input → lr-input; events: sl-invalid → lr-invalid. Equivalent surface representation: form defaults ≡ null; size defaults medium ≡ m; no source rewrite. |
228
228
  | `<sl-tooltip>` | `<lr-tooltip>` | `warning-required` | Manual: Pinned runtime evidence shows Shoelace emits non-cancelable state-change lifecycle notifications while Lyra provides synchronous pre-state veto events; automatic migration therefore requires review of listener timing and preventDefault() behavior. |
package/llms-full.txt CHANGED
@@ -25551,6 +25551,11 @@ import. Opening a `.zip` through `<lr-document-viewer>` forwards `anchor`/`highl
25551
25551
  viewer, so a deep link into an entry name survives the registry hop. `.tar`, `.rar`, and other
25552
25552
  archive formats fall through to `<lr-document-preview>`'s generic download fallback.
25553
25553
 
25554
+ A granular consumer (not importing the `all.js` compatibility bundle) must import
25555
+ `@aceshooting/lyra-ui/components/viewers/archive-viewer/archive-viewer-register.js` once to install
25556
+ this registration; without it `<lr-document-viewer>` never recognizes `.zip` files and falls
25557
+ through to the generic download fallback described above.
25558
+
25554
25559
  Remote resources are capped at 25 MB; exceeding it surfaces the localized
25555
25560
  `documentPreviewResourceTooLarge` message instead of the entry listing.
25556
25561
 
@@ -25617,6 +25622,9 @@ unambiguous beside other previous/next controls and are overridable through `.st
25617
25622
  matches `application/epub+zip` and `.epub` filenames, declaring `{ anchors: ['cfi', 'text-quote'],
25618
25623
  search: true, textSelect: true }` capabilities and forwarding `anchor`/`highlights` to the mounted
25619
25624
  viewer. The peer loader requires the callable EPUB factory; malformed module shapes fail closed.
25625
+ A granular consumer (not importing the `all.js` compatibility bundle) must also import
25626
+ `@aceshooting/lyra-ui/components/viewers/ebook-viewer/ebook-viewer-register.js` once to install
25627
+ this registration; without it `<lr-document-viewer>` never recognizes `.epub` files.
25620
25628
 
25621
25629
  Remote resources are capped at 25 MB; exceeding it surfaces the localized
25622
25630
  `documentPreviewResourceTooLarge` message instead of the ebook.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aceshooting/lyra-ui",
3
- "version": "9.0.0",
3
+ "version": "9.1.0",
4
4
  "description": "Free, independent Lit web components: an open-source alternative to Shoelace and Web Awesome with accessible forms, dashboards, charts, and agent UI.",
5
5
  "keywords": [
6
6
  "web-components",
@@ -949,6 +949,7 @@
949
949
  "./components/utility/visually-hidden/visually-hidden.class.js": "./dist/components/utility/visually-hidden/visually-hidden.class.js",
950
950
  "./components/utility/visually-hidden/visually-hidden.js": "./dist/components/utility/visually-hidden/visually-hidden.js",
951
951
  "./components/viewers": "./dist/components/viewers/index.js",
952
+ "./components/viewers/archive-viewer/archive-viewer-register.js": "./dist/components/viewers/archive-viewer/archive-viewer-register.js",
952
953
  "./components/viewers/archive-viewer/archive-viewer.class.js": "./dist/components/viewers/archive-viewer/archive-viewer.class.js",
953
954
  "./components/viewers/archive-viewer/archive-viewer.js": "./dist/components/viewers/archive-viewer/archive-viewer.js",
954
955
  "./components/viewers/calendar-viewer/calendar-viewer.class.js": "./dist/components/viewers/calendar-viewer/calendar-viewer.class.js",
@@ -968,6 +969,7 @@
968
969
  "./components/viewers/document-viewer/registry.js": "./dist/components/viewers/document-viewer/registry.js",
969
970
  "./components/viewers/docx-viewer/docx-viewer.class.js": "./dist/components/viewers/docx-viewer/docx-viewer.class.js",
970
971
  "./components/viewers/docx-viewer/docx-viewer.js": "./dist/components/viewers/docx-viewer/docx-viewer.js",
972
+ "./components/viewers/ebook-viewer/ebook-viewer-register.js": "./dist/components/viewers/ebook-viewer/ebook-viewer-register.js",
971
973
  "./components/viewers/ebook-viewer/ebook-viewer.class.js": "./dist/components/viewers/ebook-viewer/ebook-viewer.class.js",
972
974
  "./components/viewers/ebook-viewer/ebook-viewer.js": "./dist/components/viewers/ebook-viewer/ebook-viewer.js",
973
975
  "./components/viewers/email-viewer/email-viewer.class.js": "./dist/components/viewers/email-viewer/email-viewer.class.js",
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@aceshooting/lyra-ui",
4
- "version": "9.0.0",
4
+ "version": "9.1.0",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {