@aceshooting/lyra-ui 30.3.0 → 30.4.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/components/conversation/message-actions/message-actions.class.d.ts +3 -3
  3. package/dist/components/conversation/voice-picker/voice-picker.class.d.ts +1 -1
  4. package/dist/components/data/flow-minimap/flow-minimap.class.d.ts +1 -1
  5. package/dist/components/layout/app-rail/app-rail.class.d.ts +1 -1
  6. package/dist/components/layout/app-rail/app-rail.class.js +1 -1
  7. package/dist/components/layout/multi-split/multi-split.class.d.ts +4 -1
  8. package/dist/components/layout/multi-split/multi-split.class.js +6 -3
  9. package/dist/components/layout/multi-split/multi-split.styles.js +1 -1
  10. package/dist/components/layout/navigation-menu/navigation-menu.class.js +1 -1
  11. package/dist/components/layout/page/page.class.d.ts +3 -1
  12. package/dist/components/layout/page/page.class.js +1 -1
  13. package/dist/components/layout/responsive-panel/responsive-panel.class.d.ts +6 -4
  14. package/dist/components/layout/responsive-panel/responsive-panel.class.js +1 -1
  15. package/dist/components/layout/scroller/scroller.class.d.ts +1 -1
  16. package/dist/components/layout/scroller/scroller.class.js +1 -1
  17. package/dist/components/layout/split-panel/split-panel.class.d.ts +1 -1
  18. package/dist/components/layout/split-panel/split-panel.class.js +1 -1
  19. package/dist/components/layout/stepper/stepper.class.d.ts +1 -1
  20. package/dist/components/layout/stepper/stepper.class.js +1 -1
  21. package/dist/components/layout/widget/widget.class.d.ts +1 -1
  22. package/dist/components/layout/widget/widget.class.js +1 -1
  23. package/dist/components/overlays/dialog/dialog.class.d.ts +2 -2
  24. package/dist/components/overlays/dialog/dialog.class.js +1 -1
  25. package/dist/components/utility/copy-button/copy-button.class.d.ts +13 -15
  26. package/dist/components/utility/copy-button/copy-button.class.js +3 -3
  27. package/dist/components/utility/copy-button/copy-button.styles.js +1 -1
  28. package/dist/components/utility/tour/tour.class.d.ts +2 -2
  29. package/dist/components/utility/tour/tour.class.js +1 -1
  30. package/dist/framework-types.d.ts +1 -1
  31. package/dist/internal/modal-host.styles.js +1 -0
  32. package/dist/internal/modal-surface-controller.js +1 -1
  33. package/dist/internal/overlay-stack.d.ts +1 -1
  34. package/dist/internal/overlay-stack.js +1 -1
  35. package/dist/internal/package-metadata.js +1 -1
  36. package/dist/internal/style-property-lease.js +1 -1
  37. package/llms/components/lr-app-rail.md +4 -0
  38. package/llms/components/lr-badge.md +3 -0
  39. package/llms/components/lr-copy-button.md +15 -7
  40. package/llms/components/lr-multi-split.md +4 -0
  41. package/llms/components/lr-page.md +5 -1
  42. package/llms/components/lr-responsive-panel.md +5 -1
  43. package/llms/components/lr-token-input.md +4 -3
  44. package/llms/components/lr-tooltip.md +4 -4
  45. package/llms/peers.md +1 -1
  46. package/llms/shared/ai-and-peers.md +11 -0
  47. package/llms/shared/styles-and-tokens.md +75 -14
  48. package/llms/shared.md +86 -14
  49. package/package.json +2 -2
  50. package/skills/compose-lyra-interfaces/references/composition-patterns.md +1 -1
  51. package/skills/lyra-ui/SKILL.md +3 -2
  52. package/skills/lyra-ui/lyra-gen.md +10 -1
@@ -0,0 +1 @@
1
+ import{css}from"lit";const modalHostStyles=css`:host(:popover-open){background:0 0;border:none;block-size:auto;inline-size:auto;margin:0;padding:0;inset:auto;overflow:visible}`;export{modalHostStyles};
@@ -1 +1 @@
1
- import{promoteToTopLayer,releaseTopLayer}from"./top-layer-escape.js";import{cancelDeferredFocusReturn,captureFocusReturnOpener,scheduleDeferredFocusReturn}from"./deferred-focus-return.js";class ModalSurfaceController{constructor(host,carrier,surface){this.host=host,this.carrier=carrier,this.surface=surface,this.opener=null}prepare(){this.carrier.prepare()}open(activate){cancelDeferredFocusReturn(this.host),this.opener=captureFocusReturnOpener(this.host),this.prepare(),activate()}close(hadOverlay,deactivate,isCurrent){this.hide(),deactivate();const opener=this.opener;this.opener=null,hadOverlay&&opener&&this.host.isConnected&&scheduleDeferredFocusReturn({host:this.host,candidates:()=>[opener],isCurrent})}disconnect(){this.hide(),cancelDeferredFocusReturn(this.host)}show(){if(!(!this.host.isConnected||this.carrier.show())){if(this.surface){const surface=this.surface();surface&&promoteToTopLayer(surface);return}if(typeof this.host.showPopover=="function"){this.host.getAttribute("popover")!=="manual"&&this.host.setAttribute("popover","manual");try{this.host.matches(":popover-open")||this.host.showPopover()}catch{}}}}hide(){if(this.carrier.hide(),this.surface){const surface=this.surface();surface&&releaseTopLayer(surface);return}try{this.host.matches(":popover-open")&&this.host.hidePopover()}catch{}}}export{ModalSurfaceController};
1
+ import{isLibraryPromotedAndShowing,promoteToTopLayer,releaseTopLayer}from"./top-layer-escape.js";import{observeOverlayStack}from"./overlay-stack.js";import{cancelDeferredFocusReturn,captureFocusReturnOpener,scheduleDeferredFocusReturn}from"./deferred-focus-return.js";const presentations=new WeakMap;class ModalSurfaceController{constructor(host,carrier,surface){this.host=host,this.carrier=carrier,this.surface=surface,this.opener=null,this.active=!1,this.generation=0,this.reconcileQueued=!1,this.closing=!1}prepare(){this.carrier.prepare()}open(activate){cancelDeferredFocusReturn(this.host),this.opener=captureFocusReturnOpener(this.host),this.prepare(),activate()}close(hadOverlay,deactivate,isCurrent){this.hide(),deactivate();const opener=this.opener;this.opener=null,hadOverlay&&opener&&this.host.isConnected&&scheduleDeferredFocusReturn({host:this.host,candidates:()=>[opener],isCurrent})}disconnect(){this.hide(),cancelDeferredFocusReturn(this.host)}show(){if(!this.host.isConnected)return;this.active=!0;const document=this.host.ownerDocument;if(this.closing=!1,this.presentationDocument!==document){this.releasePresentation();let owners=presentations.get(document);owners||(owners=new Set,presentations.set(document,owners)),owners.add(this),this.presentationDocument=document}this.observationDocument!==document&&(this.stopObservation(),this.observationDocument=document,this.releaseObservation=observeOverlayStack(document,({entries})=>{const own=entries.find(entry=>entry.host===this.host);own&&(this.activationOrder=own.order),this.highestModal=void 0;for(let index=entries.length-1;index>=0;index-=1){const entry=entries[index];if(entry.modal){this.highestModal=entry.host;break}}this.queueReconcile(document)}));try{if(this.carrier.show()){this.releaseSurface();return}}catch(error){throw this.active=!1,this.stopObservation(),this.releasePresentation(),error}this.reconcile()}beginClose(){this.active=!1,this.closing=this.presentedSurface!==void 0&&this.surfaceIsShowing(),this.stopObservation(),this.closing||this.releasePresentation()}queueReconcile(document){if(this.reconcileQueued)return;const view=document.defaultView;if(!view)return;this.reconcileQueued=!0;const generation=this.generation;view.queueMicrotask(()=>{generation!==this.generation||document!==this.host.ownerDocument||(this.reconcileQueued=!1,this.reconcile())})}reconcile(){if(!this.active||!this.host.isConnected||this.observationDocument!==this.host.ownerDocument||this.carrier.requested)return;const surface=this.surface?this.surface():this.host;if(this.presentedSurface!==surface&&this.releaseSurface(),!!surface&&!(this.surface?isLibraryPromotedAndShowing(surface):this.hostIsShowing())&&this.highestModal===this.host&&this.activationOrder!==void 0){for(const other of presentations.get(this.host.ownerDocument)??[])if(other.closing&&other.activationOrder!==void 0&&other.activationOrder>this.activationOrder)return;if(this.surface){promoteToTopLayer(surface)&&(this.presentedSurface=surface);return}if(typeof this.host.showPopover=="function"){this.previousHostPopover=this.host.getAttribute("popover"),this.host.setAttribute("popover","manual");try{this.host.showPopover(),this.presentedSurface=this.host}catch{this.restoreHostPopover()}}}}hostIsShowing(){try{return this.host.matches(":popover-open")}catch{return!1}}surfaceIsShowing(){const surface=this.presentedSurface;return surface!==void 0&&(this.surface?isLibraryPromotedAndShowing(surface):this.hostIsShowing())}releasePresentation(){const document=this.presentationDocument;if(this.presentationDocument=void 0,this.activationOrder=void 0,this.closing=!1,!document)return;const owners=presentations.get(document);if(owners?.delete(this),!owners?.size)presentations.delete(document);else for(const owner of owners)owner.queueReconcile(document)}restoreHostPopover(){const previous=this.previousHostPopover;this.previousHostPopover=void 0,!(previous===void 0||this.host.getAttribute("popover")!=="manual")&&(previous===null?this.host.removeAttribute("popover"):this.host.setAttribute("popover",previous))}stopObservation(){this.generation+=1,this.reconcileQueued=!1,this.releaseObservation?.(),this.releaseObservation=void 0,this.observationDocument=void 0,this.highestModal=void 0}releaseSurface(){const surface=this.presentedSurface;if(this.presentedSurface=void 0,!!surface){if(this.surface){releaseTopLayer(surface);return}try{this.hostIsShowing()&&surface.hidePopover()}catch{}finally{this.restoreHostPopover()}}}hide(){this.beginClose(),this.carrier.hide(),this.releaseSurface(),this.releasePresentation()}}export{ModalSurfaceController};
@@ -2,7 +2,7 @@ import{type OverlayOrderReservation}from'./overlay-order.js';import{composedCont
2
2
  /** Resolved right after the synchronous focus return of a deactivation that restores focus: the
3
3
  * deferred pass for a target the host only re-shows afterward, or `undefined` to skip it. Any
4
4
  * pass still pending for the host is abandoned by every activation and deactivation. */
5
- deferredReturn?:()=>DeferredFocusReturnPass|undefined;}export interface OverlayStackEntrySnapshot{readonly host:HTMLElement;readonly modal:boolean;readonly modalRoot?:()=>HTMLElement|null;readonly auxiliaryRoots?:()=>readonly HTMLElement[];}export interface OverlayStackSnapshot{readonly entries:readonly OverlayStackEntrySnapshot[];}type OverlayStackObserver=(snapshot:OverlayStackSnapshot)=>void;
5
+ deferredReturn?:()=>DeferredFocusReturnPass|undefined;}export interface OverlayStackEntrySnapshot{readonly host:HTMLElement;readonly order:number;readonly modal:boolean;readonly modalRoot?:()=>HTMLElement|null;readonly auxiliaryRoots?:()=>readonly HTMLElement[];}export interface OverlayStackSnapshot{readonly entries:readonly OverlayStackEntrySnapshot[];}type OverlayStackObserver=(snapshot:OverlayStackSnapshot)=>void;
6
6
  /** Returns the deepest focused descendant across open shadow roots, or `null` when no document
7
7
  * exists in the current realm. */
8
8
  export declare function deepActiveElement(doc?:Document|null|undefined):Element|null;export{composedContains};
@@ -1 +1 @@
1
- import{getActiveNativeModal}from"./native-modal-context.js";import{takeOverlayOrder}from"./overlay-order.js";import{deepActiveElementIn}from"./active-element.js";import{composedContains,flattenedParentElement}from"./composed-tree.js";import{scheduleDeferredFocusReturn,cancelDeferredFocusReturn}from"./deferred-focus-return.js";import{collectComposedAutofocusElements,collectComposedFocusTargets,isComposedFocusAvailable}from"./focus-navigation.js";import{isHtmlElement}from"./dom-guards.js";import{leaseInlineStyleProperty}from"./style-property-lease.js";const STACK_PROPERTY="--lr-overlay-stack-index",STACK_BASE=1e3,STACK_STEP=2,states=new WeakMap,hostEntries=new WeakMap;function createInactiveOverlayHandle(){return{focusInitial:()=>{},focusAutofocus:()=>!1,updateRestoreFocusTo:()=>{},deactivate:()=>{},suspend:()=>{},resume:()=>{},isTopmost:()=>!1,isActive:()=>!1,dismissBackdrop:()=>!1}}function deepActiveElement(doc=typeof document>"u"?void 0:document){return deepActiveElementIn(doc)}function collectFocusableElements(root){return collectComposedFocusTargets(root).elements}function collectAutofocusElements(root){return collectComposedAutofocusElements(root).elements}function tryFocus(target){if(!target||!isComposedFocusAvailable(target))return!1;target.focus();const active=deepActiveElement(target.ownerDocument);return active===target||composedContains(target,active)}function focusAutofocusTarget(panel){for(const candidate of collectAutofocusElements(panel)){if(tryFocus(candidate))return!0;for(const inner of collectFocusableElements(candidate))if(tryFocus(inner))return!0}return!1}function auxiliaryRoots(entry){const panel=entry.options.panel();return[...new Set(entry.options.auxiliaryRoots?.()??[])].filter(root=>root.isConnected&&root.ownerDocument===entry.state.document&&(!panel||!composedContains(panel,root)))}function entryContainsFocus(entry,panel,active){return entry.options.auxiliaryRoots?active!==null&&isComposedFocusAvailable(active)&&[panel,...auxiliaryRoots(entry)].some(root=>composedContains(root,active)):composedContains(panel,active)}function entryTabStops(entry,panel){const roots=entry.options.auxiliaryRoots?[panel,...auxiliaryRoots(entry)]:[panel];return[...new Set(roots.flatMap(root=>collectComposedFocusTargets(root,{browserTabOrder:!0}).elements))]}function composedPath(element){const path=[];for(let current=element;current;current=flattenedParentElement(current))path.unshift(current);return path}function precedes(first,second){let index=0;for(;first[index]&&first[index]===second[index];)index+=1;return first[index]?!!(second[index]&&first[index].compareDocumentPosition(second[index])&4):!!second[index]}function focusEntry(entry,preserveCurrent=!0){const panel=entry.options.panel();if(!panel)return;const active=deepActiveElement(entry.state.document);if(preserveCurrent&&entryContainsFocus(entry,panel,active)||(entry.initialFocusDecision===void 0&&(entry.initialFocusDecision=entry.options.beforeInitialFocus?.()!==!1),!entry.initialFocusDecision)||focusAutofocusTarget(panel))return;const preferred=entry.options.preferredInitialFocus?.()??null;if(!(preferred&&composedContains(panel,preferred)&&tryFocus(preferred))){for(const target of collectFocusableElements(panel))if(tryFocus(target))return;panel.focus()}}function handleTab(state,entry,event){const panel=entry.options.panel();if(!panel)return;const focusable=entryTabStops(entry,panel);if(focusable.length===0){event.preventDefault(),panel.focus();return}const active=deepActiveElement(state.document),first=focusable[0],last=focusable[focusable.length-1],activeIndex=active?focusable.indexOf(active):-1;if(activeIndex===-1){let target;const roots=entry.options.auxiliaryRoots?[panel,...auxiliaryRoots(entry)]:[panel];if(active&&roots.some(root=>composedContains(root,active))){const activePath=composedPath(active);if(event.shiftKey)for(let index=focusable.length-1;index>=0&&!target;index-=1)precedes(composedPath(focusable[index]),activePath)&&(target=focusable[index]);else target=focusable.find(stop=>precedes(activePath,composedPath(stop)));if(target&&target.tabIndex>=0&&!entry.options.auxiliaryRoots)return}event.preventDefault(),(target??(event.shiftKey?last:first)).focus()}else if(event.shiftKey&&active===first)event.preventDefault(),last.focus();else if(!event.shiftKey&&active===last)event.preventDefault(),first.focus();else{const next=focusable[activeIndex+(event.shiftKey?-1:1)];next&&(next.tabIndex<0||auxiliaryRoots(entry).length>0)&&(event.preventDefault(),next.focus())}}function nearestTrappingEntryBelowTop(state){for(let index=state.stack.length-2;index>=0;index-=1){const entry=state.stack[index];if(entry&&entry.options.trapFocus!==!1)return entry}}function snapshotFor(state){return{entries:state.stack.map(entry=>({host:entry.options.host,modal:entry.options.modal,modalRoot:entry.options.modalRoot,auxiliaryRoots:entry.options.auxiliaryRoots}))}}function notifyStackObservers(state){if(state.observers.size===0)return;const snapshot=snapshotFor(state);for(const observer of state.observers)observer(snapshot)}function startState(state){state.started||(state.started=!0,state.document.addEventListener("keydown",state.onKeyDown))}function stopState(state){state.started&&(state.started=!1,state.document.removeEventListener("keydown",state.onKeyDown))}function stopStateIfIdle(state){state.stack.length===0&&stopState(state)}function createState(doc){const state={};return state.document=doc,state.stack=[],state.routingSuspensions=new Set,state.observers=new Set,state.started=!1,state.onKeyDown=event=>{if(event.defaultPrevented||event.isComposing||event.keyCode===229||state.routingSuspensions.size>0)return;const entry=state.stack[state.stack.length-1];if(!entry||event.key!=="Escape"&&event.key!=="Tab")return;const nativeModal=getActiveNativeModal(doc),panel=entry.options.panel();if(!(nativeModal&&(!panel||!composedContains(nativeModal,panel)))){if(event.key==="Escape")event.preventDefault(),entry.options.onEscape();else if(event.key==="Tab"){if(entry.options.trapFocus!==!1){handleTab(state,entry,event);return}entry.options.onTab?.();const trapping=nearestTrappingEntryBelowTop(state),trappingPanel=trapping?.options.panel();trapping&&trappingPanel&&!event.defaultPrevented&&(!nativeModal||composedContains(nativeModal,trappingPanel))&&entryContainsFocus(trapping,trappingPanel,deepActiveElement(doc))&&handleTab(state,trapping,event)}}},states.set(doc,state),state}function stateFor(doc){return states.get(doc)??createState(doc)}function observeOverlayStack(doc,observer){const state=stateFor(doc);return state.observers.add(observer),observer(snapshotFor(state)),()=>{state.observers.delete(observer)}}function acquireOverlayRoutingSuspension(doc){const state=stateFor(doc),token=Symbol();let active=!0;return state.routingSuspensions.add(token),()=>{active&&(active=!1,state.routingSuspensions.delete(token))}}function restoreStackStyle(entry){entry.stackStyleLease?.release(),entry.stackStyleLease=void 0}function updateStackStyles(state){state.stack.forEach((entry,index)=>{const value=String(STACK_BASE+index*STACK_STEP);entry.stackStyleLease?entry.stackStyleLease.set(value):entry.stackStyleLease=leaseInlineStyleProperty(entry.options.host,STACK_PROPERTY,value)})}function registerEntry(entry,state,preserveStackOrder=!1){if(entry.registered)return;startState(state),(!preserveStackOrder||entry.state!==state)&&(entry.stackOrder=takeOverlayOrder(state.document)),entry.state=state,entry.registered=!0,entry.options.onRegistered?.(state.document);const nextIndex=state.stack.findIndex(candidate=>candidate.stackOrder>entry.stackOrder);nextIndex===-1?state.stack.push(entry):state.stack.splice(nextIndex,0,entry),updateStackStyles(state),notifyStackObservers(state)}function unregisterEntry(entry,deferResourceRelease=!1){if(!entry.registered){const hasHigherEntry=entry.state.stack.some(candidate=>candidate.stackOrder>entry.stackOrder);return entry.state.routingSuspensions.size===0&&entry.wasTopmostOnSuspend&&!hasHigherEntry}const state=entry.state,index=state.stack.indexOf(entry),wasTopmost=state.routingSuspensions.size===0&&index===state.stack.length-1;return index!==-1&&state.stack.splice(index,1),entry.registered=!1,entry.wasTopmostOnSuspend=wasTopmost,entry.deferredResourceRelease=entry.options.onUnregistered?.(state.document,deferResourceRelease),restoreStackStyle(entry),updateStackStyles(state),notifyStackObservers(state),stopStateIfIdle(state),wasTopmost}function syncEntryRegistration(entry){if(!entry.active||entry.manuallySuspended){unregisterEntry(entry);return}const state=stateFor(entry.options.host.ownerDocument);registerEntry(entry,state,entry.state===state)}function validRestoreFocusElement(value,doc){return isHtmlElement(value)&&value.ownerDocument===doc?value:null}function resolveRestoreFocusTarget(entry){const source=entry.restoreFocusTo;if(typeof source!="function")return validRestoreFocusElement(source,entry.state.document);try{return validRestoreFocusElement(source(),entry.state.document)}catch{return null}}function rebaseReturnTargets(entry){for(const candidate of entry.state.stack){if(candidate===entry||candidate.stackOrder<=entry.stackOrder)continue;const candidateTarget=typeof candidate.restoreFocusTo=="function"?null:validRestoreFocusElement(candidate.restoreFocusTo,entry.state.document);candidateTarget&&composedContains(entry.options.host,candidateTarget)&&(candidate.restoreFocusTo=entry.restoreFocusTo)}}function restoreEntryFocus(entry){if(tryFocus(resolveRestoreFocusTarget(entry)))return;const next=entry.state.stack[entry.state.stack.length-1];next&&focusEntry(next,!1)}function deactivateEntry(entry,restoreFocus,deferResourceRelease=!1){if(!entry.active)return;const host=entry.options.host;cancelDeferredFocusReturn(host);const release=deactivateActiveEntry(entry,restoreFocus,deferResourceRelease);if(restoreFocus){const pass=entry.options.deferredReturn?.();pass&&scheduleDeferredFocusReturn({...pass,host})}return release}function deactivateActiveEntry(entry,restoreFocus,deferResourceRelease){const heldFocus=panelHoldsFocus(entry);rebaseReturnTargets(entry);const wasTopmost=unregisterEntry(entry,deferResourceRelease),deferredResourceRelease=entry.deferredResourceRelease;if(entry.deferredResourceRelease=void 0,entry.active=!1,entry.manuallySuspended=!1,entry.suspendGeneration++,entry.options.onDeactivate?.(),hostEntries.get(entry.options.host)===entry&&hostEntries.delete(entry.options.host),!wasTopmost)return deferredResourceRelease;if(restoreFocus)return restoreEntryFocus(entry),deferredResourceRelease;const next=entry.state.stack[entry.state.stack.length-1];if(!next)return deferredResourceRelease;if(heldFocus)focusEntry(next);else if(next.options.trapFocus){const doc=entry.state.document,active=deepActiveElement(doc);!entry.options.host.isConnected||active&&active!==doc.body&&active!==doc.documentElement?focusEntry(next):setTimeout(()=>{next.active&&next.registered&&entry.state.stack[entry.state.stack.length-1]===next&&focusEntry(next)},0)}return deferredResourceRelease}function panelHoldsFocus(entry){const panel=entry.options.panel();return panel!==null&&entryContainsFocus(entry,panel,deepActiveElement(entry.state.document))}function activateOverlayStack(options){cancelDeferredFocusReturn(options.host);const previous=hostEntries.get(options.host),inheritedReturnTarget=previous?.active?previous.restoreFocusTo:void 0;previous?.active&&previous.handle.deactivate({restoreFocus:!1});const doc=options.host.ownerDocument;if(!doc)return createInactiveOverlayHandle();const active=deepActiveElement(doc),captured=active&&typeof active.focus=="function"?active:null,entry={};return entry.options=options,entry.restoreFocusTo=options.restoreFocusTo!==void 0?options.restoreFocusTo:inheritedReturnTarget??captured,entry.active=!0,entry.registered=!1,entry.manuallySuspended=options.initiallySuspended===!0,entry.initialFocusDecision=void 0,entry.wasTopmostOnSuspend=!1,entry.suspendGeneration=0,entry.state=stateFor(doc),entry.stackOrder=takeOverlayOrder(doc,options.orderReservation),entry.handle={focusInitial:()=>{entry.active&&entry.registered&&entry.state.routingSuspensions.size===0&&entry.state.stack[entry.state.stack.length-1]===entry&&focusEntry(entry)},focusAutofocus:()=>{if(!entry.active||!entry.registered||entry.state.routingSuspensions.size>0)return!1;const panel=entry.options.panel();if(!panel)return!1;const active2=deepActiveElement(entry.state.document);return entryContainsFocus(entry,panel,active2)?!1:focusAutofocusTarget(panel)},updateRestoreFocusTo:target=>{entry.active&&(entry.restoreFocusTo=target)},deactivate:(deactivateOptions={})=>deactivateEntry(entry,deactivateOptions.restoreFocus!==!1,deactivateOptions.deferScrollLockRelease===!0),suspend:()=>{if(!entry.active||entry.manuallySuspended)return;entry.manuallySuspended=!0,syncEntryRegistration(entry);const generation=++entry.suspendGeneration;queueMicrotask(()=>{entry.active&&!entry.registered&&entry.suspendGeneration===generation&&!entry.options.host.isConnected&&deactivateEntry(entry,!0)})},resume:()=>{!entry.active||!entry.manuallySuspended||(entry.suspendGeneration++,entry.manuallySuspended=!1,syncEntryRegistration(entry))},isTopmost:()=>entry.active&&entry.registered&&entry.state.routingSuspensions.size===0&&entry.state.stack[entry.state.stack.length-1]===entry,isActive:()=>entry.active,dismissBackdrop:()=>!entry.handle.isTopmost()||!entry.options.onBackdrop?!1:(entry.options.onBackdrop(),!0)},hostEntries.set(options.host,entry),entry.manuallySuspended||registerEntry(entry,entry.state,!0),entry.handle}export{acquireOverlayRoutingSuspension,activateOverlayStack,collectAutofocusElements,collectFocusableElements,composedContains,deepActiveElement,observeOverlayStack};
1
+ import{getActiveNativeModal}from"./native-modal-context.js";import{takeOverlayOrder}from"./overlay-order.js";import{deepActiveElementIn}from"./active-element.js";import{composedContains,flattenedParentElement}from"./composed-tree.js";import{scheduleDeferredFocusReturn,cancelDeferredFocusReturn}from"./deferred-focus-return.js";import{collectComposedAutofocusElements,collectComposedFocusTargets,isComposedFocusAvailable}from"./focus-navigation.js";import{isHtmlElement}from"./dom-guards.js";import{leaseInlineStyleProperty}from"./style-property-lease.js";const STACK_PROPERTY="--lr-overlay-stack-index",STACK_BASE=1e3,STACK_STEP=2,states=new WeakMap,hostEntries=new WeakMap;function createInactiveOverlayHandle(){return{focusInitial:()=>{},focusAutofocus:()=>!1,updateRestoreFocusTo:()=>{},deactivate:()=>{},suspend:()=>{},resume:()=>{},isTopmost:()=>!1,isActive:()=>!1,dismissBackdrop:()=>!1}}function deepActiveElement(doc=typeof document>"u"?void 0:document){return deepActiveElementIn(doc)}function collectFocusableElements(root){return collectComposedFocusTargets(root).elements}function collectAutofocusElements(root){return collectComposedAutofocusElements(root).elements}function tryFocus(target){if(!target||!isComposedFocusAvailable(target))return!1;target.focus();const active=deepActiveElement(target.ownerDocument);return active===target||composedContains(target,active)}function focusAutofocusTarget(panel){for(const candidate of collectAutofocusElements(panel)){if(tryFocus(candidate))return!0;for(const inner of collectFocusableElements(candidate))if(tryFocus(inner))return!0}return!1}function auxiliaryRoots(entry){const panel=entry.options.panel();return[...new Set(entry.options.auxiliaryRoots?.()??[])].filter(root=>root.isConnected&&root.ownerDocument===entry.state.document&&(!panel||!composedContains(panel,root)))}function entryContainsFocus(entry,panel,active){return entry.options.auxiliaryRoots?active!==null&&isComposedFocusAvailable(active)&&[panel,...auxiliaryRoots(entry)].some(root=>composedContains(root,active)):composedContains(panel,active)}function entryTabStops(entry,panel){const roots=entry.options.auxiliaryRoots?[panel,...auxiliaryRoots(entry)]:[panel];return[...new Set(roots.flatMap(root=>collectComposedFocusTargets(root,{browserTabOrder:!0}).elements))]}function composedPath(element){const path=[];for(let current=element;current;current=flattenedParentElement(current))path.unshift(current);return path}function precedes(first,second){let index=0;for(;first[index]&&first[index]===second[index];)index+=1;return first[index]?!!(second[index]&&first[index].compareDocumentPosition(second[index])&4):!!second[index]}function focusEntry(entry,preserveCurrent=!0){const panel=entry.options.panel();if(!panel)return;const active=deepActiveElement(entry.state.document);if(preserveCurrent&&entryContainsFocus(entry,panel,active)||(entry.initialFocusDecision===void 0&&(entry.initialFocusDecision=entry.options.beforeInitialFocus?.()!==!1),!entry.initialFocusDecision)||focusAutofocusTarget(panel))return;const preferred=entry.options.preferredInitialFocus?.()??null;if(!(preferred&&composedContains(panel,preferred)&&tryFocus(preferred))){for(const target of collectFocusableElements(panel))if(tryFocus(target))return;panel.focus()}}function handleTab(state,entry,event){const panel=entry.options.panel();if(!panel)return;const focusable=entryTabStops(entry,panel);if(focusable.length===0){event.preventDefault(),panel.focus();return}const active=deepActiveElement(state.document),first=focusable[0],last=focusable[focusable.length-1],activeIndex=active?focusable.indexOf(active):-1;if(activeIndex===-1){let target;const roots=entry.options.auxiliaryRoots?[panel,...auxiliaryRoots(entry)]:[panel];if(active&&roots.some(root=>composedContains(root,active))){const activePath=composedPath(active);if(event.shiftKey)for(let index=focusable.length-1;index>=0&&!target;index-=1)precedes(composedPath(focusable[index]),activePath)&&(target=focusable[index]);else target=focusable.find(stop=>precedes(activePath,composedPath(stop)));if(target&&target.tabIndex>=0&&!entry.options.auxiliaryRoots)return}event.preventDefault(),(target??(event.shiftKey?last:first)).focus()}else if(event.shiftKey&&active===first)event.preventDefault(),last.focus();else if(!event.shiftKey&&active===last)event.preventDefault(),first.focus();else{const next=focusable[activeIndex+(event.shiftKey?-1:1)];next&&(next.tabIndex<0||auxiliaryRoots(entry).length>0)&&(event.preventDefault(),next.focus())}}function nearestTrappingEntryBelowTop(state){for(let index=state.stack.length-2;index>=0;index-=1){const entry=state.stack[index];if(entry&&entry.options.trapFocus!==!1)return entry}}function snapshotFor(state){return{entries:state.stack.map(entry=>({host:entry.options.host,order:entry.stackOrder,modal:entry.options.modal,modalRoot:entry.options.modalRoot,auxiliaryRoots:entry.options.auxiliaryRoots}))}}function notifyStackObservers(state){if(state.observers.size===0)return;const snapshot=snapshotFor(state);for(const observer of state.observers)observer(snapshot)}function startState(state){state.started||(state.started=!0,state.document.addEventListener("keydown",state.onKeyDown))}function stopState(state){state.started&&(state.started=!1,state.document.removeEventListener("keydown",state.onKeyDown))}function stopStateIfIdle(state){state.stack.length===0&&stopState(state)}function createState(doc){const state={};return state.document=doc,state.stack=[],state.routingSuspensions=new Set,state.observers=new Set,state.started=!1,state.onKeyDown=event=>{if(event.defaultPrevented||event.isComposing||event.keyCode===229||state.routingSuspensions.size>0)return;const entry=state.stack[state.stack.length-1];if(!entry||event.key!=="Escape"&&event.key!=="Tab")return;const nativeModal=getActiveNativeModal(doc),panel=entry.options.panel();if(!(nativeModal&&(!panel||!composedContains(nativeModal,panel)))){if(event.key==="Escape")event.preventDefault(),entry.options.onEscape();else if(event.key==="Tab"){if(entry.options.trapFocus!==!1){handleTab(state,entry,event);return}entry.options.onTab?.();const trapping=nearestTrappingEntryBelowTop(state),trappingPanel=trapping?.options.panel();trapping&&trappingPanel&&!event.defaultPrevented&&(!nativeModal||composedContains(nativeModal,trappingPanel))&&entryContainsFocus(trapping,trappingPanel,deepActiveElement(doc))&&handleTab(state,trapping,event)}}},states.set(doc,state),state}function stateFor(doc){return states.get(doc)??createState(doc)}function observeOverlayStack(doc,observer){const state=stateFor(doc);return state.observers.add(observer),observer(snapshotFor(state)),()=>{state.observers.delete(observer)}}function acquireOverlayRoutingSuspension(doc){const state=stateFor(doc),token=Symbol();let active=!0;return state.routingSuspensions.add(token),()=>{active&&(active=!1,state.routingSuspensions.delete(token))}}function restoreStackStyle(entry){entry.stackStyleLease?.release(),entry.stackStyleLease=void 0}function updateStackStyles(state){state.stack.forEach((entry,index)=>{const value=String(STACK_BASE+index*STACK_STEP);entry.stackStyleLease?entry.stackStyleLease.set(value):entry.stackStyleLease=leaseInlineStyleProperty(entry.options.host,STACK_PROPERTY,value)})}function registerEntry(entry,state,preserveStackOrder=!1){if(entry.registered)return;startState(state),(!preserveStackOrder||entry.state!==state)&&(entry.stackOrder=takeOverlayOrder(state.document)),entry.state=state,entry.registered=!0,entry.options.onRegistered?.(state.document);const nextIndex=state.stack.findIndex(candidate=>candidate.stackOrder>entry.stackOrder);nextIndex===-1?state.stack.push(entry):state.stack.splice(nextIndex,0,entry),updateStackStyles(state),notifyStackObservers(state)}function unregisterEntry(entry,deferResourceRelease=!1){if(!entry.registered){const hasHigherEntry=entry.state.stack.some(candidate=>candidate.stackOrder>entry.stackOrder);return entry.state.routingSuspensions.size===0&&entry.wasTopmostOnSuspend&&!hasHigherEntry}const state=entry.state,index=state.stack.indexOf(entry),wasTopmost=state.routingSuspensions.size===0&&index===state.stack.length-1;return index!==-1&&state.stack.splice(index,1),entry.registered=!1,entry.wasTopmostOnSuspend=wasTopmost,entry.deferredResourceRelease=entry.options.onUnregistered?.(state.document,deferResourceRelease),restoreStackStyle(entry),updateStackStyles(state),notifyStackObservers(state),stopStateIfIdle(state),wasTopmost}function syncEntryRegistration(entry){if(!entry.active||entry.manuallySuspended){unregisterEntry(entry);return}const state=stateFor(entry.options.host.ownerDocument);registerEntry(entry,state,entry.state===state)}function validRestoreFocusElement(value,doc){return isHtmlElement(value)&&value.ownerDocument===doc?value:null}function resolveRestoreFocusTarget(entry){const source=entry.restoreFocusTo;if(typeof source!="function")return validRestoreFocusElement(source,entry.state.document);try{return validRestoreFocusElement(source(),entry.state.document)}catch{return null}}function rebaseReturnTargets(entry){for(const candidate of entry.state.stack){if(candidate===entry||candidate.stackOrder<=entry.stackOrder)continue;const candidateTarget=typeof candidate.restoreFocusTo=="function"?null:validRestoreFocusElement(candidate.restoreFocusTo,entry.state.document);candidateTarget&&composedContains(entry.options.host,candidateTarget)&&(candidate.restoreFocusTo=entry.restoreFocusTo)}}function restoreEntryFocus(entry){if(tryFocus(resolveRestoreFocusTarget(entry)))return;const next=entry.state.stack[entry.state.stack.length-1];next&&focusEntry(next,!1)}function deactivateEntry(entry,restoreFocus,deferResourceRelease=!1){if(!entry.active)return;const host=entry.options.host;cancelDeferredFocusReturn(host);const release=deactivateActiveEntry(entry,restoreFocus,deferResourceRelease);if(restoreFocus){const pass=entry.options.deferredReturn?.();pass&&scheduleDeferredFocusReturn({...pass,host})}return release}function deactivateActiveEntry(entry,restoreFocus,deferResourceRelease){const heldFocus=panelHoldsFocus(entry);rebaseReturnTargets(entry);const wasTopmost=unregisterEntry(entry,deferResourceRelease),deferredResourceRelease=entry.deferredResourceRelease;if(entry.deferredResourceRelease=void 0,entry.active=!1,entry.manuallySuspended=!1,entry.suspendGeneration++,entry.options.onDeactivate?.(),hostEntries.get(entry.options.host)===entry&&hostEntries.delete(entry.options.host),!wasTopmost)return deferredResourceRelease;if(restoreFocus)return restoreEntryFocus(entry),deferredResourceRelease;const next=entry.state.stack[entry.state.stack.length-1];if(!next)return deferredResourceRelease;if(heldFocus)focusEntry(next);else if(next.options.trapFocus){const doc=entry.state.document,active=deepActiveElement(doc);!entry.options.host.isConnected||active&&active!==doc.body&&active!==doc.documentElement?focusEntry(next):setTimeout(()=>{next.active&&next.registered&&entry.state.stack[entry.state.stack.length-1]===next&&focusEntry(next)},0)}return deferredResourceRelease}function panelHoldsFocus(entry){const panel=entry.options.panel();return panel!==null&&entryContainsFocus(entry,panel,deepActiveElement(entry.state.document))}function activateOverlayStack(options){cancelDeferredFocusReturn(options.host);const previous=hostEntries.get(options.host),inheritedReturnTarget=previous?.active?previous.restoreFocusTo:void 0;previous?.active&&previous.handle.deactivate({restoreFocus:!1});const doc=options.host.ownerDocument;if(!doc)return createInactiveOverlayHandle();const active=deepActiveElement(doc),captured=active&&typeof active.focus=="function"?active:null,entry={};return entry.options=options,entry.restoreFocusTo=options.restoreFocusTo!==void 0?options.restoreFocusTo:inheritedReturnTarget??captured,entry.active=!0,entry.registered=!1,entry.manuallySuspended=options.initiallySuspended===!0,entry.initialFocusDecision=void 0,entry.wasTopmostOnSuspend=!1,entry.suspendGeneration=0,entry.state=stateFor(doc),entry.stackOrder=takeOverlayOrder(doc,options.orderReservation),entry.handle={focusInitial:()=>{entry.active&&entry.registered&&entry.state.routingSuspensions.size===0&&entry.state.stack[entry.state.stack.length-1]===entry&&focusEntry(entry)},focusAutofocus:()=>{if(!entry.active||!entry.registered||entry.state.routingSuspensions.size>0)return!1;const panel=entry.options.panel();if(!panel)return!1;const active2=deepActiveElement(entry.state.document);return entryContainsFocus(entry,panel,active2)?!1:focusAutofocusTarget(panel)},updateRestoreFocusTo:target=>{entry.active&&(entry.restoreFocusTo=target)},deactivate:(deactivateOptions={})=>deactivateEntry(entry,deactivateOptions.restoreFocus!==!1,deactivateOptions.deferScrollLockRelease===!0),suspend:()=>{if(!entry.active||entry.manuallySuspended)return;entry.manuallySuspended=!0,syncEntryRegistration(entry);const generation=++entry.suspendGeneration;queueMicrotask(()=>{entry.active&&!entry.registered&&entry.suspendGeneration===generation&&!entry.options.host.isConnected&&deactivateEntry(entry,!0)})},resume:()=>{!entry.active||!entry.manuallySuspended||(entry.suspendGeneration++,entry.manuallySuspended=!1,syncEntryRegistration(entry))},isTopmost:()=>entry.active&&entry.registered&&entry.state.routingSuspensions.size===0&&entry.state.stack[entry.state.stack.length-1]===entry,isActive:()=>entry.active,dismissBackdrop:()=>!entry.handle.isTopmost()||!entry.options.onBackdrop?!1:(entry.options.onBackdrop(),!0)},hostEntries.set(options.host,entry),entry.manuallySuspended||registerEntry(entry,entry.state,!0),entry.handle}export{acquireOverlayRoutingSuspension,activateOverlayStack,collectAutofocusElements,collectFocusableElements,composedContains,deepActiveElement,observeOverlayStack};
@@ -1 +1 @@
1
- const LYRA_PACKAGE_NAME="@aceshooting/lyra-ui",LYRA_PACKAGE_VERSION="30.3.0";export{LYRA_PACKAGE_NAME,LYRA_PACKAGE_VERSION};
1
+ const LYRA_PACKAGE_NAME="@aceshooting/lyra-ui",LYRA_PACKAGE_VERSION="30.4.0";export{LYRA_PACKAGE_NAME,LYRA_PACKAGE_VERSION};
@@ -1 +1 @@
1
- function readProperty(element,property){return{value:element.style.getPropertyValue(property),priority:element.style.getPropertyPriority(property)}}function sameProperty(left,right){return left.value===right.value&&left.priority===right.priority}function writeProperty(element,property,next){element.style.removeProperty(property),next.value&&element.style.setProperty(property,next.value,next.priority)}function leaseInlineStyleProperty(element,property,value,priority="",resolveOwned){let external=readProperty(element,property),owned={value,priority},released=!1;const MutationObserverConstructor=element.ownerDocument.defaultView?.MutationObserver??(typeof globalThis.MutationObserver=="function"?globalThis.MutationObserver:void 0);let observer;const observe=()=>{observer?.observe(element,{attributeFilter:["style"],attributes:!0})},applyOwned=()=>{observer?.disconnect(),writeProperty(element,property,owned),observe()},captureExternal=()=>{const current=readProperty(element,property);sameProperty(current,owned)||(external=current)};return MutationObserverConstructor&&(observer=new MutationObserverConstructor(()=>{if(released)return;const current=readProperty(element,property);if(sameProperty(current,owned))return;external=current;const resolved=resolveOwned?.(external.value,external.priority);resolved&&(owned={value:resolved.value,priority:resolved.priority??""}),applyOwned()})),applyOwned(),{set(nextValue,nextPriority=""){released||(captureExternal(),owned={value:nextValue,priority:nextPriority},applyOwned())},release(){released||(captureExternal(),released=!0,observer?.disconnect(),observer=void 0,writeProperty(element,property,external))}}}export{leaseInlineStyleProperty};
1
+ function readProperty(element,property){return{value:element.style.getPropertyValue(property),priority:element.style.getPropertyPriority(property)}}function sameProperty(left,right){return left.value===right.value&&left.priority===right.priority}function writeProperty(element,property,next){element.style.removeProperty(property),next.value&&element.style.setProperty(property,next.value,next.priority)}function leaseInlineStyleProperty(element,property,value,priority="",resolveOwned){let external=readProperty(element,property),owned={value,priority},released=!1;const MutationObserverConstructor=element.ownerDocument.defaultView?.MutationObserver??(typeof globalThis.MutationObserver=="function"?globalThis.MutationObserver:void 0);let observer;const observe=()=>{observer?.observe(element,{attributeFilter:["style"],attributes:!0})},applyOwned=()=>{observer?.disconnect(),writeProperty(element,property,owned),owned=readProperty(element,property),observe()},captureExternal=()=>{const current=readProperty(element,property);sameProperty(current,owned)||(external=current)};return MutationObserverConstructor&&(observer=new MutationObserverConstructor(()=>{if(released)return;const current=readProperty(element,property);if(sameProperty(current,owned))return;external=current;const resolved=resolveOwned?.(external.value,external.priority);resolved&&(owned={value:resolved.value,priority:resolved.priority??""}),applyOwned()})),applyOwned(),{set(nextValue,nextPriority=""){released||(captureExternal(),owned={value:nextValue,priority:nextPriority},applyOwned())},release(){released||(captureExternal(),released=!0,observer?.disconnect(),observer=void 0,writeProperty(element,property,external))}}}export{leaseInlineStyleProperty};
@@ -703,6 +703,10 @@ library-wide `--lr-color-brand-quiet`/`--lr-color-brand`/`--lr-font-weight-semib
703
703
  repainted every other element reading them. Unset, each falls back to the token its rule used
704
704
  before. `--lr-app-rail-item-current-font-weight` mirrors `<lr-stepper>`'s
705
705
  `--lr-stepper-current-font-weight` and `<lr-segmented>`'s `--lr-segmented-selected-font-weight`.
706
+ The default current and hover treatments pair brand loud-fill text with brand quiet fill, which
707
+ requires 4.5:1 contrast. Custom brand inputs and item foreground/background overrides must preserve
708
+ the rendered pair across pointer states; see the
709
+ [semantic colour contrast contract](../shared/styles-and-tokens.md#semantic-colour-contrast-contract).
706
710
  `--lr-app-rail-item-current-indicator-color` (default `var(--lr-color-brand)`),
707
711
  `--lr-app-rail-item-current-indicator-width` (default `var(--lr-size-2px)`), and
708
712
  `--lr-app-rail-item-current-indicator-inset-inline` (default `0 auto`; set `auto 0` to place the
@@ -41,6 +41,9 @@ other author-supplied role remain authoritative across updates, hydration, and r
41
41
  border, `outlined` drops the fill, `accent` fills solidly with on-loud text, and `plain` drops both
42
42
  fill and border while keeping the label color. The border-less appearances use a `transparent`
43
43
  border rather than `none`, so switching appearance never changes the badge's layout box.
44
+ For non-neutral variants, loud-fill text needs 4.5:1 contrast with the quiet tint for
45
+ `filled`/`filled-outlined`, and with the surrounding surface for `outlined`/`plain`; custom
46
+ palettes must satisfy the [semantic colour contrast contract](../shared/styles-and-tokens.md#semantic-colour-contrast-contract).
44
47
  - `pill: boolean = false` (reflected) — Fully-rounded ends instead of the default
45
48
  rounded rectangle; see the visual break above. Since it defaults to `false`, `pill="false"` is not
46
49
  a way to switch it off — remove the attribute, or assign `.pill = false`.
@@ -53,6 +53,10 @@ buttons.
53
53
  icon-only trigger always remains named; remove the attribute or assign `null` for the same
54
54
  fallback.
55
55
  - `disabled: boolean = false` (reflected)
56
+ - `size?: LyraSize` (reflected) — optional built-in trigger density on the shared `2xs` through
57
+ `xl` ladder; `small`/`medium`/`large` alias `s`/`m`/`l`. Scales the minimum hit area, glyph font
58
+ and corner radius. Unset preserves the established icon-button footprint and inherited font;
59
+ custom default-slot triggers keep their own geometry.
56
60
  - `feedbackDuration: number = 1500` (attribute `feedback-duration`) — milliseconds before the
57
61
  confirmation **or** the failure state returns to the copy icon. A non-finite value falls back to
58
62
  `1500` rather than leaving the state stuck; a negative one clamps to `0`.
@@ -188,12 +192,16 @@ import type {
188
192
  `copyFailed` (`'Copy failed'`), overridable per instance through `.strings` or app-wide through
189
193
  `registerLyraLocale()` (see `llms/shared.md`). Explicit `*-label` properties take precedence.
190
194
  - Native `dir`/`lang` remain inherited global attributes. The component is not form-associated.
191
- - No `size`/`compact` property: the built-in trigger's hit area is `<lr-icon-button>`'s shared
192
- `--lr-icon-button-size` floor (2.25rem by default). For a dense action row, lower
193
- `--lr-theme-icon-button-size` (not `--lr-icon-button-size`, which every `LyraElement` re-declares
194
- on its own `:host` and so never reaches a composed child) on this element or an ancestor, or reach
195
- the composed native control directly through `::part(base-control)`. A coarse-pointer/no-hover
196
- media rule then floors the rendered hit area at 2.75rem/44px regardless of how far a dense-row
197
- override lowered it, so the shrink is safe on a touch device.
195
+ - Use `size="2xs"` or `size="xs"` for dense metadata or action rows. A selected tier follows the
196
+ shared form-control height, font and radius inputs (`--lr-theme-form-control-height-<tier>`,
197
+ `--lr-theme-font-size-*`, `--lr-theme-form-control-radius`); larger icon content still grows the
198
+ trigger beyond its minimum box. The composed icon button retains its coarse-pointer/no-hover
199
+ floor of 2.75rem/44px for every tier. Public `--lr-icon-button-*` paint tokens and
200
+ `::part(base-control)` still reach the native control.
201
+ - With `size` unset, the built-in trigger uses the shared `--lr-icon-button-size` floor
202
+ (2.25rem by default). Ancestor `--lr-icon-button-size-scope` or `--lr-theme-icon-button-size`
203
+ inputs keep working; setting `--lr-icon-button-size` on the copy-button host does not cross the
204
+ composed child's token declaration. Removing `size` or assigning an unsupported value restores
205
+ that established geometry and ancestor override behavior.
198
206
 
199
207
  ---
@@ -16,6 +16,10 @@
16
16
 
17
17
  ## `lr-multi-split`
18
18
 
19
+ The floating drawer enters the browser top layer within the split's allocation. An intrinsically
20
+ sized split reserves its opening block-size footprint until the drawer closes; definite parent
21
+ sizes, scrolling, and resizing remain live.
22
+
19
23
  The floating pane remains interactive when opened outside an existing native `dialog.showModal()`. An internal native modal surface preserves the authored host and content; Escape, close vetoes, and focus return keep their usual behavior. Ordinary inline rendering is unchanged.
20
24
 
21
25
  Resizable panels for dashboard layouts. Direct **light-DOM children are the panels**; a divider is
@@ -16,7 +16,11 @@
16
16
 
17
17
  ## `lr-page`
18
18
 
19
- The mobile navigation drawer remains interactive when opened outside an existing native `dialog.showModal()`. An internal native modal surface preserves the authored host and content; Escape, close vetoes, and focus return keep their usual behavior. Ordinary inline rendering is unchanged.
19
+ The mobile navigation drawer enters the browser top layer, escaping fixed headers and transformed
20
+ or clipped ancestors while keeping its host and navigation content in place. It also remains
21
+ interactive when opened outside an existing native `dialog.showModal()`, using an internal native
22
+ modal surface. Escape, close vetoes, and focus return keep their usual behavior; desktop navigation
23
+ remains in the page grid.
20
24
 
21
25
  Semantic application/page shell with page-wide banner/header/subheader/footer regions, a compact
22
26
  menu, primary navigation, main header/content/footer, and an aside. It derives mobile versus
@@ -16,7 +16,11 @@
16
16
 
17
17
  ## `lr-responsive-panel`
18
18
 
19
- The overlay presentation remains interactive when opened outside an existing native `dialog.showModal()`. An internal native modal surface preserves the authored host and content; Escape, close vetoes, and focus return keep their usual behavior. Ordinary inline rendering is unchanged.
19
+ The overlay surface enters the browser top layer, so sticky headers, clipped ancestors, and
20
+ stacking contexts cannot cover it. The host stays in its authored slot, and ordinary inline/overlay
21
+ transitions retain the same body and slotted content. When opened outside an existing native
22
+ `dialog.showModal()`, an internal native modal surface preserves interactivity. Escape, close
23
+ vetoes, and focus return keep their usual behavior.
20
24
 
21
25
  The same slotted content either docked inline in its containing layout or presented as a
22
26
  full-screen/bottom-sheet/side-anchored overlay, depending on the panel's allocated inline size.
@@ -51,7 +51,8 @@ token editor. The former camel-case `autoCorrect` property is removed; use the n
51
51
  lowercase IDL. `size: '2xs' | 'xs' | 's' | 'm' | 'l' | 'xl' = 'm'` (reflected —
52
52
  same scale as `lr-input`'s `size`, scaling the input-wrapper's row height and text size across six
53
53
  tiers, and both `2xs`/`xs`/`s`/`m`/`l`/`xl` and `small`/`medium`/`large` are accepted; the remove
54
- button's hit area stays fixed at `40px` across all sizes), `pill` (reflected, default `false` —
54
+ button retains the shared `--lr-icon-button-size` minimum hit area across all sizes), `pill`
55
+ (reflected, default `false` —
55
56
  rounds the token row's corners by changing the private radius default to `--lr-radius-pill`; the
56
57
  chips share the public `--lr-token-input-radius` hook with the row, and an inherited or direct
57
58
  value remains authoritative),
@@ -167,8 +168,8 @@ text the part is hidden and no glyph is painted.
167
168
  `--lr-token-input-control-min-height` floor only; set it to a length to both floor and cap the row,
168
169
  e.g. to pixel-match a sibling field in the same toolbar row). An uncapped row grows as tokens wrap.
169
170
  A capped row explicitly clips inline overflow and becomes a block-axis scrollport, preserving every
170
- wrapped token and 40px-floored remove/edit action instead of clipping them; keyboard focus scrolls
171
- the destination token into view. `--lr-token-input-input-inline-size`
171
+ wrapped token and remove/edit action with its shared `--lr-icon-button-size` floor instead of
172
+ clipping them; keyboard focus scrolls the destination token into view. `--lr-token-input-input-inline-size`
172
173
  (the editable input's `flex-basis` inside the wrapped token row; undeclared by default, falling back
173
174
  inline to `--lr-size-8rem`), `--lr-token-input-min-input-inline-size` (default `--lr-size-4rem`, the
174
175
  floor that input keeps once tokens have consumed the row), and `--lr-token-input-editor-inline-size`
@@ -44,8 +44,8 @@ later text renders normally.
44
44
  leaves the tooltip entirely under programmatic control. Note the name collision: this string
45
45
  property and the `trigger` _slot_ are different things — the slot holds the element, this property
46
46
  says which of its interactions count.
47
- - `manual: boolean = false` — equivalent to including `manual` in `trigger`; kept because it reads
48
- better on a tooltip that is only ever driven from script
47
+ - `manual: boolean = false` (attribute `manual`, not reflected) — equivalent to including `manual`
48
+ in `trigger`; use `<lr-tooltip manual>` for a tooltip driven only from script
49
49
  - `showDelay: number = 150` (attribute `show-delay`) and `hideDelay: number = 0` (attribute
50
50
  `hide-delay`) — independent milliseconds values, so a tooltip can linger after the pointer leaves without also
51
51
  being slow to appear; `hideDelay` `0` closes the tooltip at once. A non-finite value falls back to the default; a negative one clamps to
@@ -208,7 +208,7 @@ or cross-document adoption cancels the old realm, and reconnect creates fresh ob
208
208
  `lr-popover` when click-to-open ownership is desired.
209
209
 
210
210
  **`showAt()` composed with `lr-graph`** — anchoring a popover to a clicked graph node. Note:
211
- `lr-graph.getNodePosition()` and the `lr-node-click` event's `{ x, y }` are in the graph's own
211
+ `lr-graph.getNodePosition()` and the `lr-node-activate` event's `{ x, y }` are in the graph's own
212
212
  _local drawing space_ (pre pan/zoom), not viewport pixels, so they can't be passed to `showAt()`
213
213
  directly. For `renderer="svg"` (the default), read the clicked node's own rendered element instead,
214
214
  whose `getBoundingClientRect()` is already viewport-relative; for `renderer="canvas"` (no per-node
@@ -225,7 +225,7 @@ graph.addEventListener("click", (event) => {
225
225
  if (!nodeEl) return; // clicked empty canvas/background, not a node
226
226
  const rect = nodeEl.getBoundingClientRect();
227
227
  detail.showAt({
228
- x: rect.left + rect.width / 2,
228
+ x: rect.left,
229
229
  y: rect.top,
230
230
  width: rect.width,
231
231
  height: rect.height,
package/llms/peers.md CHANGED
@@ -40,7 +40,7 @@ for the page.
40
40
  | `@aceshooting/lyra-3d` | `^1.0.0` | `lr-chart-3d`, `lr-embedding-explorer`, `lr-graph`, `lr-image-viewer`, `lr-knowledge-graph-explorer`, `lr-model-viewer`, `lr-video` |
41
41
  | `@aceshooting/lyra-flags` | `^2.3.1` | _(loaded by a shared internal module)_ |
42
42
  | `@aceshooting/lyra-map` | `^1.3.0` | `lr-geojson-viewer`, `lr-map` |
43
- | `@aceshooting/lyra-translations` | `^30.3.0` | _(not referenced by any component)_ |
43
+ | `@aceshooting/lyra-translations` | `^30.4.0` | _(not referenced by any component)_ |
44
44
  | `@aiden0z/pptx-renderer` | `^1.4.0` | `lr-pptx-viewer` |
45
45
  | `@sgratzl/chartjs-chart-boxplot` | `^4.0.0` | `lr-box-plot` |
46
46
  | `chart.js` | `^4.0.1` | `lr-bar-chart`, `lr-box-plot`, `lr-bubble-chart`, `lr-chart`, `lr-doughnut-chart`, `lr-histogram`, `lr-line-chart`, `lr-pie-chart`, `lr-polar-area-chart`, `lr-radar-chart`, `lr-scatter-chart` |
@@ -185,6 +185,17 @@ state = reduceAgentStream(state, {
185
185
  - **Build voice sessions:** `lr-realtime-session`; it composes the existing audio visualizer,
186
186
  push-to-talk control, and transcript feed while leaving transport ownership with the host.
187
187
 
188
+ For catalog-bound generated views, use the independently versioned `@aceshooting/lyra-gen`
189
+ companion; its format differs from widget-v2. Read its
190
+ [integration guide](https://github.com/aceshooting/lyra-ui/blob/main/packages/lyra-gen/README.md)
191
+ and installed explicit `exports` map before importing runtime modules. The
192
+ [compatibility guide](https://github.com/aceshooting/lyra-ui/blob/main/packages/lyra-gen/docs/compatibility.md)
193
+ defines its 1.x contract and qualification limits; only the A2UI candidate entry is separately
194
+ experimental. Its
195
+ [guided demo](https://github.com/aceshooting/lyra-ui/blob/main/packages/lyra-gen/docs/guided-demo.md)
196
+ is shipped application source with simulated data and scripted en/fr/ar replies, not an exported
197
+ runtime entry or a model service. Core locale catalogs do not translate that example-owned copy.
198
+
188
199
  Family registration entry points are additive: importing
189
200
  `@aceshooting/lyra-ui/components/conversation`, `/agent-tools`, or `/retrieval` registers and
190
201
  exports that complete family. Granular component entry points remain the smallest bundles and are
@@ -323,8 +323,9 @@ needs to sit inside a Lyra UI without looking foreign, and the file's header lis
323
323
  | Typography | `--lr-font`, `--lr-font-mono`, the ten `--lr-font-size-*` steps, the four `--lr-font-weight-*` steps |
324
324
  | State and motion | `--lr-focus-ring`, `--lr-focus-ring-color`, `--lr-focus-ring-width`, `--lr-focus-ring-offset`, `--lr-opacity-disabled`, `--lr-opacity-muted`, `--lr-duration-fast`, `--lr-duration-base`, `--lr-easing-standard`, `--lr-easing-emphasized`, `--lr-transition-fast`, `--lr-transition-base`, `--lr-transition-interactive` |
325
325
 
326
- The grid is stable as a whole because its contrast guarantee is **per tier** — a `fill-quiet`
327
- background is only guaranteed legible under the matching `on-quiet` foreground.
326
+ The grid is stable as a whole because its [contrast contract](#semantic-colour-contrast-contract)
327
+ covers matching `on`/`fill` tiers **and** the loud-fill accent text used on quiet fills and page
328
+ surfaces. Custom palettes must preserve both kinds of pairing.
328
329
 
329
330
  **Visible but internal** (read them at your own risk; they may change in any release): `--lr-size-*`,
330
331
  `--lr-layer-*`, `--lr-color-mix-*`, `--lr-hover-brightness`, `--lr-line-height-*`,
@@ -460,19 +461,32 @@ the semantic grid instead; it picks the right value per mode and supports theme
460
461
  layer to build on. Its _shape_ is identical in light and dark; the generator resolves different
461
462
  ramp steps into each mode's literal fallback, so a rule written against it is mode-independent.
462
463
 
463
- - `fill` — a background. `on` — text and icons that sit **on** the matching `fill`. `border` — an
464
- outline.
464
+ - `fill` — a background; `fill-loud` also supplies accent text and icons. `on` — text and icons
465
+ that sit **on** the matching `fill`. `border` — an outline.
465
466
  - `emphasis` runs `quiet → normal → loud`. Louder means more prominent, not lighter or darker: in
466
467
  light mode it descends the ramp and in dark mode it climbs it.
467
468
 
468
- **The contrast guarantee is what makes the grid usable without thinking.** For every variant, in
469
- both modes: `on-<e>` clears WCAG 1.4.3's 4.5:1 against `fill-<e>` at the _same_ emphasis — so
470
- `background: var(--lr-color-danger-fill-loud); color: var(--lr-color-danger-on-loud)` is legible by
471
- construction, and no other pairing is promised. `border-normal` and `border-loud` clear 1.4.11's
472
- 3:1 against the page surface, so a control's visible bounds are always discernible. `border-quiet`
473
- is deliberately exempt: it exists for decoration that is not load-bearing — a rule between table
474
- rows, a hairline inside an already-bounded card — so never use it as a control's only boundary.
475
- These guarantees apply in both modes.
469
+ #### Semantic colour contrast contract
470
+
471
+ The built-in palettes and looks meet these minimum ratios
472
+ for every variant in both modes:
473
+
474
+ | Foreground or boundary | Background | Minimum contrast |
475
+ | --- | --- | --- |
476
+ | `on-quiet`, `on-normal`, `on-loud` | The matching `fill-quiet`, `fill-normal`, `fill-loud` | 4.5:1 |
477
+ | `fill-loud`, when used as accent text | The same variant's `fill-quiet` | 4.5:1 |
478
+ | `fill-loud`, when used as accent text | Page and raised surfaces | 4.5:1 |
479
+ | `border-normal`, `border-loud` | Page surface | 3:1 |
480
+
481
+ For example, a non-neutral `lr-badge` with `appearance="filled-outlined"` or `"filled"` uses
482
+ `fill-loud` text on `fill-quiet`; its `"outlined"` and `"plain"` appearances use that text on the
483
+ surrounding surface. A current `lr-app-rail-item` uses brand loud-fill text on the brand quiet
484
+ fill. The flat `--lr-color-brand` alias is the loud fill, so it inherits these accent-text
485
+ requirements. A matching `on-loud`/`fill-loud` pair alone does not qualify a custom palette.
486
+
487
+ `border-quiet` is deliberately exempt: it exists for decoration that is not load-bearing — a rule
488
+ between table rows, a hairline inside an already-bounded card — so never use it as a control's only
489
+ boundary. Other cross-tier pairings require their own contrast check.
476
490
 
477
491
  **Every slot has its own `--lr-theme-*` override**, named after the slot, so one decision can be
478
492
  rethemed without forking anything beneath it:
@@ -487,7 +501,44 @@ rethemed without forking anything beneath it:
487
501
 
488
502
  The full runtime chain for one colour is your `--lr-theme-*` input, else the grid slot's generated
489
503
  fallback. To move a whole tone, set its nine `--lr-theme-color-<variant>-*` inputs; the ramp remains
490
- a design-tool input rather than a consumer override point.
504
+ a design-tool input rather than a consumer override point. Static CSS inputs are applied as
505
+ authored: Lyra does not repair their contrast. Qualify every affected pairing above in light and
506
+ dark mode, including inherited slots when overriding only part of a row. Also check the actual
507
+ surrounding surface and rendered hover/press states, especially with component foreground or
508
+ background overrides and translucent surfaces.
509
+
510
+ For a complete static brand row, this example meets the contract on the **Lyra look with a solid
511
+ surface**: its page/raised colours are `#ffffff`/`#f6f8fa` in light mode and
512
+ `#1a1a1a`/`#22272e` in dark mode. Put the inputs on an explicit scope such as
513
+ `<section class="app-brand" data-lr-look="lyra" data-lr-surface="solid" data-lr-accent="custom" data-lr-theme="light" data-lr-theme-scope>`;
514
+ change `data-lr-theme` to `dark` to select the second row. Import `theme.css` as usual.
515
+
516
+ ```css
517
+ .app-brand[data-lr-theme='light'] {
518
+ --lr-theme-color-brand-fill-quiet: #eef2ff;
519
+ --lr-theme-color-brand-fill-normal: #c7d2fe;
520
+ --lr-theme-color-brand-fill-loud: #4338ca;
521
+ --lr-theme-color-brand-on-quiet: #312e81;
522
+ --lr-theme-color-brand-on-normal: #312e81;
523
+ --lr-theme-color-brand-on-loud: #ffffff;
524
+ --lr-theme-color-brand-border-quiet: #c7d2fe;
525
+ --lr-theme-color-brand-border-normal: #6366f1;
526
+ --lr-theme-color-brand-border-loud: #4338ca;
527
+ }
528
+ .app-brand[data-lr-theme='dark'] {
529
+ --lr-theme-color-brand-fill-quiet: #1e1b4b;
530
+ --lr-theme-color-brand-fill-normal: #3730a3;
531
+ --lr-theme-color-brand-fill-loud: #a5b4fc;
532
+ --lr-theme-color-brand-on-quiet: #e0e7ff;
533
+ --lr-theme-color-brand-on-normal: #ffffff;
534
+ --lr-theme-color-brand-on-loud: #1e1b4b;
535
+ --lr-theme-color-brand-border-quiet: #3730a3;
536
+ --lr-theme-color-brand-border-normal: #818cf8;
537
+ --lr-theme-color-brand-border-loud: #a5b4fc;
538
+ }
539
+ ```
540
+
541
+ Recheck these values when changing the look, surfaces, interaction fills or component overrides.
491
542
 
492
543
  The flat names are aliases into the grid, kept because they read well at the call site:
493
544
 
@@ -914,7 +965,17 @@ accentBackground is an absolute CSS color used as the accent ramps' reference su
914
965
 
915
966
  A LyraLook is a named token definition. Define an application look with defineLyraLook({ id, tokens }), then pass it as the look choice. A look supplies --lr-theme-* inputs; overrides applies an independent map of those inputs to the document root. Both accept CSS strings or per-mode { light, dark } values. Overrides replace the previous map wholesale; compose them with object spread. Values are validated, trimmed, and deep-frozen. Invalid entries are ignored, and maps are limited to 512 entries.
916
967
 
917
- The token grammar rejects CSS-wide keywords, control characters, unsafe punctuation, unbalanced functions or quotes, and functions outside the documented color and layout set. Color families checked by the static contrast gate are corrected to meet their contrast floor before painting. The snapshot and stored record retain the normalized requested values. Inline style ownership records only properties Lyra wrote and restores an earlier author value when a choice is cleared.
968
+ The token grammar rejects CSS-wide keywords, control characters, unsafe punctuation, unbalanced
969
+ functions or quotes, and functions outside the documented color and layout set. For resolvable
970
+ colors and references, runtime token maps floor body/quiet text against page and raised surfaces;
971
+ synthesize or correct semantic on-colors when the corresponding fill is supplied; and qualify
972
+ strong-overlay text, boundaries, focus, chart series and terminal colors. This does not repair the
973
+ loud-fill accent-text cross-pairings in the [semantic contrast contract](#semantic-colour-contrast-contract):
974
+ explicit look/override maps and static CSS must supply compatible values. Runtime `accent`
975
+ derivation qualifies those cross-pairings when it generates the ramp; CSS or component overrides
976
+ of the resulting foreground/background still need checking. The snapshot and stored record retain
977
+ the normalized requested values. Inline style ownership records only properties Lyra wrote and
978
+ restores an earlier author value when a choice is cleared.
918
979
 
919
980
  **Saved styles and the no-flash bootstrap.** getLyraStyle() re-reads storage on each call, so a value written by another tab is visible. If storage is unavailable, the runtime reports its last applied style and continues applying changes without persistence. lyraThemeBootstrap is a self-contained IIFE string for a script in head before stylesheets; it restores the saved style before first paint. createLyraThemeBootstrap({ storageKey }) produces the same string for an application-owned key. Both runtime and bootstrap safely read v1 records using mode: "auto", surface, and tokens, translating them to the current style axes. Keep this reader when migrating old saved preferences; new writes use the current style record.
920
981
 
package/llms/shared.md CHANGED
@@ -1267,8 +1267,9 @@ needs to sit inside a Lyra UI without looking foreign, and the file's header lis
1267
1267
  | Typography | `--lr-font`, `--lr-font-mono`, the ten `--lr-font-size-*` steps, the four `--lr-font-weight-*` steps |
1268
1268
  | State and motion | `--lr-focus-ring`, `--lr-focus-ring-color`, `--lr-focus-ring-width`, `--lr-focus-ring-offset`, `--lr-opacity-disabled`, `--lr-opacity-muted`, `--lr-duration-fast`, `--lr-duration-base`, `--lr-easing-standard`, `--lr-easing-emphasized`, `--lr-transition-fast`, `--lr-transition-base`, `--lr-transition-interactive` |
1269
1269
 
1270
- The grid is stable as a whole because its contrast guarantee is **per tier** — a `fill-quiet`
1271
- background is only guaranteed legible under the matching `on-quiet` foreground.
1270
+ The grid is stable as a whole because its [contrast contract](#semantic-colour-contrast-contract)
1271
+ covers matching `on`/`fill` tiers **and** the loud-fill accent text used on quiet fills and page
1272
+ surfaces. Custom palettes must preserve both kinds of pairing.
1272
1273
 
1273
1274
  **Visible but internal** (read them at your own risk; they may change in any release): `--lr-size-*`,
1274
1275
  `--lr-layer-*`, `--lr-color-mix-*`, `--lr-hover-brightness`, `--lr-line-height-*`,
@@ -1404,19 +1405,32 @@ the semantic grid instead; it picks the right value per mode and supports theme
1404
1405
  layer to build on. Its _shape_ is identical in light and dark; the generator resolves different
1405
1406
  ramp steps into each mode's literal fallback, so a rule written against it is mode-independent.
1406
1407
 
1407
- - `fill` — a background. `on` — text and icons that sit **on** the matching `fill`. `border` — an
1408
- outline.
1408
+ - `fill` — a background; `fill-loud` also supplies accent text and icons. `on` — text and icons
1409
+ that sit **on** the matching `fill`. `border` — an outline.
1409
1410
  - `emphasis` runs `quiet → normal → loud`. Louder means more prominent, not lighter or darker: in
1410
1411
  light mode it descends the ramp and in dark mode it climbs it.
1411
1412
 
1412
- **The contrast guarantee is what makes the grid usable without thinking.** For every variant, in
1413
- both modes: `on-<e>` clears WCAG 1.4.3's 4.5:1 against `fill-<e>` at the _same_ emphasis — so
1414
- `background: var(--lr-color-danger-fill-loud); color: var(--lr-color-danger-on-loud)` is legible by
1415
- construction, and no other pairing is promised. `border-normal` and `border-loud` clear 1.4.11's
1416
- 3:1 against the page surface, so a control's visible bounds are always discernible. `border-quiet`
1417
- is deliberately exempt: it exists for decoration that is not load-bearing — a rule between table
1418
- rows, a hairline inside an already-bounded card — so never use it as a control's only boundary.
1419
- These guarantees apply in both modes.
1413
+ #### Semantic colour contrast contract
1414
+
1415
+ The built-in palettes and looks meet these minimum ratios
1416
+ for every variant in both modes:
1417
+
1418
+ | Foreground or boundary | Background | Minimum contrast |
1419
+ | --- | --- | --- |
1420
+ | `on-quiet`, `on-normal`, `on-loud` | The matching `fill-quiet`, `fill-normal`, `fill-loud` | 4.5:1 |
1421
+ | `fill-loud`, when used as accent text | The same variant's `fill-quiet` | 4.5:1 |
1422
+ | `fill-loud`, when used as accent text | Page and raised surfaces | 4.5:1 |
1423
+ | `border-normal`, `border-loud` | Page surface | 3:1 |
1424
+
1425
+ For example, a non-neutral `lr-badge` with `appearance="filled-outlined"` or `"filled"` uses
1426
+ `fill-loud` text on `fill-quiet`; its `"outlined"` and `"plain"` appearances use that text on the
1427
+ surrounding surface. A current `lr-app-rail-item` uses brand loud-fill text on the brand quiet
1428
+ fill. The flat `--lr-color-brand` alias is the loud fill, so it inherits these accent-text
1429
+ requirements. A matching `on-loud`/`fill-loud` pair alone does not qualify a custom palette.
1430
+
1431
+ `border-quiet` is deliberately exempt: it exists for decoration that is not load-bearing — a rule
1432
+ between table rows, a hairline inside an already-bounded card — so never use it as a control's only
1433
+ boundary. Other cross-tier pairings require their own contrast check.
1420
1434
 
1421
1435
  **Every slot has its own `--lr-theme-*` override**, named after the slot, so one decision can be
1422
1436
  rethemed without forking anything beneath it:
@@ -1431,7 +1445,44 @@ rethemed without forking anything beneath it:
1431
1445
 
1432
1446
  The full runtime chain for one colour is your `--lr-theme-*` input, else the grid slot's generated
1433
1447
  fallback. To move a whole tone, set its nine `--lr-theme-color-<variant>-*` inputs; the ramp remains
1434
- a design-tool input rather than a consumer override point.
1448
+ a design-tool input rather than a consumer override point. Static CSS inputs are applied as
1449
+ authored: Lyra does not repair their contrast. Qualify every affected pairing above in light and
1450
+ dark mode, including inherited slots when overriding only part of a row. Also check the actual
1451
+ surrounding surface and rendered hover/press states, especially with component foreground or
1452
+ background overrides and translucent surfaces.
1453
+
1454
+ For a complete static brand row, this example meets the contract on the **Lyra look with a solid
1455
+ surface**: its page/raised colours are `#ffffff`/`#f6f8fa` in light mode and
1456
+ `#1a1a1a`/`#22272e` in dark mode. Put the inputs on an explicit scope such as
1457
+ `<section class="app-brand" data-lr-look="lyra" data-lr-surface="solid" data-lr-accent="custom" data-lr-theme="light" data-lr-theme-scope>`;
1458
+ change `data-lr-theme` to `dark` to select the second row. Import `theme.css` as usual.
1459
+
1460
+ ```css
1461
+ .app-brand[data-lr-theme='light'] {
1462
+ --lr-theme-color-brand-fill-quiet: #eef2ff;
1463
+ --lr-theme-color-brand-fill-normal: #c7d2fe;
1464
+ --lr-theme-color-brand-fill-loud: #4338ca;
1465
+ --lr-theme-color-brand-on-quiet: #312e81;
1466
+ --lr-theme-color-brand-on-normal: #312e81;
1467
+ --lr-theme-color-brand-on-loud: #ffffff;
1468
+ --lr-theme-color-brand-border-quiet: #c7d2fe;
1469
+ --lr-theme-color-brand-border-normal: #6366f1;
1470
+ --lr-theme-color-brand-border-loud: #4338ca;
1471
+ }
1472
+ .app-brand[data-lr-theme='dark'] {
1473
+ --lr-theme-color-brand-fill-quiet: #1e1b4b;
1474
+ --lr-theme-color-brand-fill-normal: #3730a3;
1475
+ --lr-theme-color-brand-fill-loud: #a5b4fc;
1476
+ --lr-theme-color-brand-on-quiet: #e0e7ff;
1477
+ --lr-theme-color-brand-on-normal: #ffffff;
1478
+ --lr-theme-color-brand-on-loud: #1e1b4b;
1479
+ --lr-theme-color-brand-border-quiet: #3730a3;
1480
+ --lr-theme-color-brand-border-normal: #818cf8;
1481
+ --lr-theme-color-brand-border-loud: #a5b4fc;
1482
+ }
1483
+ ```
1484
+
1485
+ Recheck these values when changing the look, surfaces, interaction fills or component overrides.
1435
1486
 
1436
1487
  The flat names are aliases into the grid, kept because they read well at the call site:
1437
1488
 
@@ -1858,7 +1909,17 @@ accentBackground is an absolute CSS color used as the accent ramps' reference su
1858
1909
 
1859
1910
  A LyraLook is a named token definition. Define an application look with defineLyraLook({ id, tokens }), then pass it as the look choice. A look supplies --lr-theme-* inputs; overrides applies an independent map of those inputs to the document root. Both accept CSS strings or per-mode { light, dark } values. Overrides replace the previous map wholesale; compose them with object spread. Values are validated, trimmed, and deep-frozen. Invalid entries are ignored, and maps are limited to 512 entries.
1860
1911
 
1861
- The token grammar rejects CSS-wide keywords, control characters, unsafe punctuation, unbalanced functions or quotes, and functions outside the documented color and layout set. Color families checked by the static contrast gate are corrected to meet their contrast floor before painting. The snapshot and stored record retain the normalized requested values. Inline style ownership records only properties Lyra wrote and restores an earlier author value when a choice is cleared.
1912
+ The token grammar rejects CSS-wide keywords, control characters, unsafe punctuation, unbalanced
1913
+ functions or quotes, and functions outside the documented color and layout set. For resolvable
1914
+ colors and references, runtime token maps floor body/quiet text against page and raised surfaces;
1915
+ synthesize or correct semantic on-colors when the corresponding fill is supplied; and qualify
1916
+ strong-overlay text, boundaries, focus, chart series and terminal colors. This does not repair the
1917
+ loud-fill accent-text cross-pairings in the [semantic contrast contract](#semantic-colour-contrast-contract):
1918
+ explicit look/override maps and static CSS must supply compatible values. Runtime `accent`
1919
+ derivation qualifies those cross-pairings when it generates the ramp; CSS or component overrides
1920
+ of the resulting foreground/background still need checking. The snapshot and stored record retain
1921
+ the normalized requested values. Inline style ownership records only properties Lyra wrote and
1922
+ restores an earlier author value when a choice is cleared.
1862
1923
 
1863
1924
  **Saved styles and the no-flash bootstrap.** getLyraStyle() re-reads storage on each call, so a value written by another tab is visible. If storage is unavailable, the runtime reports its last applied style and continues applying changes without persistence. lyraThemeBootstrap is a self-contained IIFE string for a script in head before stylesheets; it restores the saved style before first paint. createLyraThemeBootstrap({ storageKey }) produces the same string for an application-owned key. Both runtime and bootstrap safely read v1 records using mode: "auto", surface, and tokens, translating them to the current style axes. Keep this reader when migrating old saved preferences; new writes use the current style record.
1864
1925
 
@@ -2927,6 +2988,17 @@ state = reduceAgentStream(state, {
2927
2988
  - **Build voice sessions:** `lr-realtime-session`; it composes the existing audio visualizer,
2928
2989
  push-to-talk control, and transcript feed while leaving transport ownership with the host.
2929
2990
 
2991
+ For catalog-bound generated views, use the independently versioned `@aceshooting/lyra-gen`
2992
+ companion; its format differs from widget-v2. Read its
2993
+ [integration guide](https://github.com/aceshooting/lyra-ui/blob/main/packages/lyra-gen/README.md)
2994
+ and installed explicit `exports` map before importing runtime modules. The
2995
+ [compatibility guide](https://github.com/aceshooting/lyra-ui/blob/main/packages/lyra-gen/docs/compatibility.md)
2996
+ defines its 1.x contract and qualification limits; only the A2UI candidate entry is separately
2997
+ experimental. Its
2998
+ [guided demo](https://github.com/aceshooting/lyra-ui/blob/main/packages/lyra-gen/docs/guided-demo.md)
2999
+ is shipped application source with simulated data and scripted en/fr/ar replies, not an exported
3000
+ runtime entry or a model service. Core locale catalogs do not translate that example-owned copy.
3001
+
2930
3002
  Family registration entry points are additive: importing
2931
3003
  `@aceshooting/lyra-ui/components/conversation`, `/agent-tools`, or `/retrieval` registers and
2932
3004
  exports that complete family. Granular component entry points remain the smallest bundles and are
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aceshooting/lyra-ui",
3
- "version": "30.3.0",
3
+ "version": "30.4.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",
@@ -2631,7 +2631,7 @@
2631
2631
  "@aceshooting/lyra-3d": "^1.0.0",
2632
2632
  "@aceshooting/lyra-flags": "^2.3.1",
2633
2633
  "@aceshooting/lyra-map": "^1.3.0",
2634
- "@aceshooting/lyra-translations": "^30.3.0",
2634
+ "@aceshooting/lyra-translations": "^30.4.0",
2635
2635
  "@aiden0z/pptx-renderer": "^1.4.0",
2636
2636
  "@sgratzl/chartjs-chart-boxplot": "^4.0.0",
2637
2637
  "chart.js": "^4.0.1",
@@ -14,7 +14,7 @@ contract in the `lyra-ui` skill or the package reference before emitting markup.
14
14
  | Data display | Native text/list for small static content | Table, data grid, tree, virtual list, chart, or viewer when their interaction contract is required |
15
15
  | Feedback | Inline text near the action | Alert, progress, skeleton, spinner, empty state, toast, or live announcement based on urgency and persistence |
16
16
  | Transient UI | Inline disclosure when space permits | Popover, dropdown, drawer, or dialog when focus/dismissal/stacking behavior is genuinely needed |
17
- | Generated answers | Existing widget-v2 renderer for widget-v2 documents | Experimental `lyra-gen` for catalog-bound views; follow the sibling skill's `lyra-gen.md` and installed guides |
17
+ | Generated answers | Existing widget-v2 renderer for widget-v2 documents | `lyra-gen` for catalog-bound views; follow the sibling skill's `lyra-gen.md` and installed `docs/compatibility.md` for the supported profile and limits |
18
18
 
19
19
  Do not nest a component merely to obtain padding or a border. Use layout utilities and semantic
20
20
  containers for visual grouping; reserve interactive components for interactions they own.