@aceshooting/lyra-ui 12.1.0 → 12.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 12.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 50754fa: Keep clone-owned collection properties referentially stable when a declarative renderer rebinds
8
+ the same unchanged input, avoiding redundant work such as resetting an unchanged map style while
9
+ preserving explicit change detectors and updates made by assigning a new collection.
10
+ - 92cdb49: Correct the first-release annotations for the 12.1 date preset, filter-bar, and map-layer APIs in
11
+ the packaged LLM reference.
12
+
3
13
  ## 12.1.0
4
14
 
5
15
  ### Minor Changes
@@ -1 +1 @@
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{LitElement}from"lit";import{property}from"lit/decorators.js";import{tokens}from"./tokens.styles.js";import{palette}from"./tokens/palette.styles.js";import{resolveIntlLocale}from"./intl-cache.js";import{warnUnknownAttributes}from"./dev-mode-attribute-warning.js";let formInternalsHook,externalLabelFactory;function registerFormControlLabelSupport(hook,factory){formInternalsHook=hook,externalLabelFactory=factory}import{observeInheritedContext,beginInheritedContextUpdate,finishInheritedContextUpdate,markInheritedContextUpdateRendered,queueInheritedDirectionChange,recordInheritedDirectionRead,recordInheritedLocaleRead}from"./inherited-context-observer.js";import{canonicalizeLyraLocale,enableLyraLocaleCache,invalidateLyraLocaleCache,lyraLocaleCatalogVersion,peekLyraLocale,recordLyraOwnerDocumentConnection,resolveLyraDirection,resolveLyraString,resolveLyraLocale,snapshotLyraLocaleStrings,subscribeLyraLocaleForHost}from"./localization-runtime.js";const PUBLIC_COLLECTION_ENTRY_LIMIT=1e4,PUBLIC_COLLECTION_NODE_LIMIT=5e4,PUBLIC_COLLECTION_DEPTH_LIMIT=256,OMIT_COLLECTION_VALUE=Symbol("omit-public-collection-value");function snapshotRealm(view){const candidate=view;return{Array:candidate?.Array??Array,Date:candidate?.Date??Date,Map:candidate?.Map??Map,Object:candidate?.Object??Object,Set:candidate?.Set??Set}}function isRealmNeutralPlainRecord(value){try{const prototype=Object.getPrototypeOf(value);if(prototype===null)return!0;const constructor=Object.getOwnPropertyDescriptor(prototype,"constructor");return!!(constructor&&"value"in constructor&&typeof constructor.value=="function"&&constructor.value.name==="Object"&&Object.getPrototypeOf(prototype)===null)}catch{return!1}}function isArrayValue(value){try{return Array.isArray(value)}catch{return!1}}function isNativeArrayBufferView(value){try{return ArrayBuffer.isView(value)}catch{return!1}}function isImmutableBlob(value){if(typeof Blob>"u")return!1;const sizeGetter=Object.getOwnPropertyDescriptor(Blob.prototype,"size")?.get;if(!sizeGetter)return!1;try{return sizeGetter.call(value),!0}catch{return!1}}const MUTATING_DATE_METHODS=new Set(["setDate","setFullYear","setHours","setMilliseconds","setMinutes","setMonth","setSeconds","setTime","setUTCDate","setUTCFullYear","setUTCHours","setUTCMilliseconds","setUTCMinutes","setUTCMonth","setUTCSeconds","setYear"]);function nativeDateTime(value){try{return Date.prototype.getTime.call(value)}catch{return OMIT_COLLECTION_VALUE}}function snapshotReadonlyDate(source,time,budget){const target=new budget.realm.Date(time),boundMethods=new Map,rejectMutation=()=>{throw new TypeError("Cannot mutate a readonly Date snapshot")},snapshot=new Proxy(target,{get(date,key){if(MUTATING_DATE_METHODS.has(key))return rejectMutation;if(key==="constructor")return budget.realm.Date;const value=Reflect.get(date,key,date);if(typeof value!="function")return value;const cached=boundMethods.get(key);if(cached)return cached;const bound=value.bind(date);return boundMethods.set(key,bound),bound}});return rememberSnapshot(budget,source,snapshot),Object.freeze(snapshot)}function rememberSnapshot(budget,source,snapshot){budget.seen.set(source,snapshot),budget.additions.push(source)}function snapshotTransaction(budget,create){const remaining=budget.remaining,additions=budget.additions.length,result=create();if(result!==OMIT_COLLECTION_VALUE)return result;budget.remaining=remaining;for(let index=budget.additions.length-1;index>=additions;index-=1)budget.seen.delete(budget.additions[index]);return budget.additions.length=additions,OMIT_COLLECTION_VALUE}function emptyRealmArray(realm){return Object.freeze(new realm.Array)}function*ownEnumerableStringKeys(value){for(const key in value)Object.getOwnPropertyDescriptor(value,key)?.enumerable&&(yield key)}function snapshotDataRecord(value,keys,prototype,budget,depth,preserveRecordKeys,preserveCollectionItemKeys){const output=budget.realm.Object.create(prototype);rememberSnapshot(budget,value,output);try{for(const key of keys){const descriptor=Object.getOwnPropertyDescriptor(value,key);if(!descriptor?.enumerable||!("value"in descriptor))continue;if(budget.remaining<=0)return OMIT_COLLECTION_VALUE;budget.remaining-=1;const entry=preserveRecordKeys?.has(key)?descriptor.value:preserveCollectionItemKeys?.has(key)?snapshotIdentityCollection(descriptor.value,budget.realm,budget):snapshotCollectionValue(descriptor.value,budget,depth+1);if(entry===OMIT_COLLECTION_VALUE)return OMIT_COLLECTION_VALUE;Object.defineProperty(output,key,{value:entry,enumerable:!0,configurable:!1,writable:!1})}}catch{return OMIT_COLLECTION_VALUE}return Object.freeze(output)}function snapshotCollectionValue(value,budget,depth,preserveRecordKeys,preserveCollectionItemKeys,allowArrayPrefixTruncation=!1){if(value===null||typeof value!="object"&&typeof value!="function"||typeof value=="function")return value;if(budget.seen.has(value))return budget.seen.get(value);if(depth>PUBLIC_COLLECTION_DEPTH_LIMIT||budget.remaining<=0)return OMIT_COLLECTION_VALUE;if(isArrayValue(value)){let lengthDescriptor;try{lengthDescriptor=Object.getOwnPropertyDescriptor(value,"length")}catch{return allowArrayPrefixTruncation?emptyRealmArray(budget.realm):OMIT_COLLECTION_VALUE}if(!lengthDescriptor||!("value"in lengthDescriptor)||typeof lengthDescriptor.value!="number"||!Number.isSafeInteger(lengthDescriptor.value)||lengthDescriptor.value<0)return allowArrayPrefixTruncation?emptyRealmArray(budget.realm):OMIT_COLLECTION_VALUE;const sourceLength=lengthDescriptor.value;if(!allowArrayPrefixTruncation&&sourceLength>PUBLIC_COLLECTION_ENTRY_LIMIT)return OMIT_COLLECTION_VALUE;const length=Math.min(sourceLength,PUBLIC_COLLECTION_ENTRY_LIMIT),output=new budget.realm.Array(length);rememberSnapshot(budget,value,output);for(let index=0;index<length;index+=1){if(budget.remaining<=0){if(!allowArrayPrefixTruncation)return OMIT_COLLECTION_VALUE;output.length=index;break}let descriptor;try{descriptor=Object.getOwnPropertyDescriptor(value,String(index))}catch{if(!allowArrayPrefixTruncation)return OMIT_COLLECTION_VALUE;output.length=index;break}if(!descriptor)continue;if(!("value"in descriptor)){if(!allowArrayPrefixTruncation)return OMIT_COLLECTION_VALUE;output.length=index;break}const entry=snapshotTransaction(budget,()=>(budget.remaining-=1,snapshotCollectionValue(descriptor.value,budget,depth+1)));if(entry===OMIT_COLLECTION_VALUE){if(!allowArrayPrefixTruncation)return OMIT_COLLECTION_VALUE;output.length=index;break}Object.defineProperty(output,index,{value:entry,enumerable:!0,configurable:!1,writable:!1})}return Object.freeze(output)}if(isRealmNeutralPlainRecord(value)){let prototype;try{prototype=Object.getPrototypeOf(value)}catch{return OMIT_COLLECTION_VALUE}return snapshotDataRecord(value,ownEnumerableStringKeys(value),prototype===null?null:budget.realm.Object.prototype,budget,depth,preserveRecordKeys,preserveCollectionItemKeys)}const dateTime=nativeDateTime(value);if(dateTime!==OMIT_COLLECTION_VALUE)return snapshotReadonlyDate(value,dateTime,budget);const entries=nativeMapEntries(value);if(entries)return snapshotDetachedMap(value,entries,budget,depth);const values=nativeSetValues(value);if(values)return snapshotDetachedSet(value,values,budget,depth);if(isNativeArrayBufferView(value))return OMIT_COLLECTION_VALUE;const rect=snapshotDOMRect(value,budget);return rect!==OMIT_COLLECTION_VALUE?rect:isImmutableBlob(value)?value:OMIT_COLLECTION_VALUE}function snapshotPublicCollection(value,view){if(value===null||typeof value!="object"&&typeof value!="function")return value;const realm=snapshotRealm(view),budget={remaining:PUBLIC_COLLECTION_NODE_LIMIT,seen:new WeakMap,additions:[],realm},snapshot=snapshotTransaction(budget,()=>snapshotCollectionValue(value,budget,0,void 0,void 0,!0));if(snapshot!==OMIT_COLLECTION_VALUE)return snapshot;if(isArrayValue(value)||isNativeArrayBufferView(value))return emptyRealmArray(realm);if(typeof value=="object"){if(nativeMapEntries(value))return readonlyMapFacade(new realm.Map,realm);if(nativeSetValues(value))return readonlySetFacade(new realm.Set,realm);if(isRealmNeutralPlainRecord(value)){const prototype=Object.getPrototypeOf(value);return Object.freeze(realm.Object.create(prototype===null?null:realm.Object.prototype))}}return emptyRealmArray(realm)}function nativeMapEntries(value){try{return Map.prototype.entries.call(value)}catch{return}}function nativeSetValues(value){try{return Set.prototype.values.call(value)}catch{return}}function snapshotDOMRect(value,budget){if(typeof DOMRectReadOnly>"u")return OMIT_COLLECTION_VALUE;const nativePrototype=DOMRectReadOnly.prototype,output=budget.realm.Object.create(budget.realm.Object.prototype);for(const key of["x","y","width","height","top","right","bottom","left"]){let coordinate;try{const getter=Object.getOwnPropertyDescriptor(nativePrototype,key)?.get;if(!getter)return OMIT_COLLECTION_VALUE;coordinate=getter.call(value)}catch{return OMIT_COLLECTION_VALUE}if(typeof coordinate!="number"||!Number.isFinite(coordinate))return OMIT_COLLECTION_VALUE;Object.defineProperty(output,key,{value:coordinate,enumerable:!0,configurable:!1,writable:!1})}return Object.freeze(output)}function readonlyMapFacade(backing,realm=snapshotRealm()){let facade;return facade=realm.Object.create(realm.Object.prototype),Object.defineProperties(facade,{size:{enumerable:!0,get:()=>backing.size},entries:{value:()=>backing.entries()},get:{value:key=>backing.get(key)},has:{value:key=>backing.has(key)},keys:{value:()=>backing.keys()},values:{value:()=>backing.values()},forEach:{value:(callback,thisArg)=>backing.forEach((entry,key)=>callback.call(thisArg,entry,key,facade))},[Symbol.iterator]:{value:()=>backing[Symbol.iterator]()}}),Object.freeze(facade)}function readonlySetFacade(backing,realm=snapshotRealm()){let facade;return facade=realm.Object.create(realm.Object.prototype),Object.defineProperties(facade,{size:{enumerable:!0,get:()=>backing.size},entries:{value:()=>backing.entries()},has:{value:entry=>backing.has(entry)},keys:{value:()=>backing.keys()},values:{value:()=>backing.values()},forEach:{value:(callback,thisArg)=>backing.forEach(entry=>callback.call(thisArg,entry,entry,facade))},[Symbol.iterator]:{value:()=>backing[Symbol.iterator]()}}),Object.freeze(facade)}function snapshotIdentityMap(entries,realm=snapshotRealm()){const backing=new realm.Map;for(let next=entries.next(),count=0;!next.done&&count<PUBLIC_COLLECTION_ENTRY_LIMIT;next=entries.next(),count+=1)backing.set(next.value[0],next.value[1]);return readonlyMapFacade(backing,realm)}function snapshotIdentitySet(values,realm=snapshotRealm()){const backing=new realm.Set;for(let next=values.next(),count=0;!next.done&&count<PUBLIC_COLLECTION_ENTRY_LIMIT;next=values.next(),count+=1)backing.add(next.value);return readonlySetFacade(backing,realm)}function snapshotDetachedMap(source,entries,budget,depth){const backing=new budget.realm.Map,facade=readonlyMapFacade(backing,budget.realm);rememberSnapshot(budget,source,facade);for(let count=0;count<PUBLIC_COLLECTION_ENTRY_LIMIT;count+=1){let next;try{next=entries.next()}catch{break}if(next.done||budget.remaining<=0)break;const pair=snapshotTransaction(budget,()=>{budget.remaining-=1;const key=snapshotCollectionValue(next.value[0],budget,depth+1);if(key===OMIT_COLLECTION_VALUE)return OMIT_COLLECTION_VALUE;const entry=snapshotCollectionValue(next.value[1],budget,depth+1);return entry===OMIT_COLLECTION_VALUE?OMIT_COLLECTION_VALUE:[key,entry]});pair!==OMIT_COLLECTION_VALUE&&backing.set(pair[0],pair[1])}return facade}function snapshotDetachedSet(source,values,budget,depth){const backing=new budget.realm.Set,facade=readonlySetFacade(backing,budget.realm);rememberSnapshot(budget,source,facade);for(let count=0;count<PUBLIC_COLLECTION_ENTRY_LIMIT;count+=1){let next;try{next=values.next()}catch{break}if(next.done||budget.remaining<=0)break;const entry=snapshotTransaction(budget,()=>(budget.remaining-=1,snapshotCollectionValue(next.value,budget,depth+1)));entry!==OMIT_COLLECTION_VALUE&&backing.add(entry)}return facade}function snapshotIdentityCollection(value,view,budget){const realm=snapshotRealm(view);if(budget&&value!==null&&(typeof value=="object"||typeof value=="function")&&budget.seen.has(value))return budget.seen.get(value);if(isArrayValue(value)){let lengthDescriptor;try{lengthDescriptor=Object.getOwnPropertyDescriptor(value,"length")}catch{return emptyRealmArray(realm)}const length=lengthDescriptor&&"value"in lengthDescriptor&&typeof lengthDescriptor.value=="number"&&Number.isSafeInteger(lengthDescriptor.value)&&lengthDescriptor.value>=0?Math.min(lengthDescriptor.value,PUBLIC_COLLECTION_ENTRY_LIMIT):0,output=new realm.Array(length);budget&&rememberSnapshot(budget,value,output);for(let index=0;index<length;index+=1){let descriptor;try{descriptor=Object.getOwnPropertyDescriptor(value,String(index))}catch{continue}!descriptor||!("value"in descriptor)||Object.defineProperty(output,index,{value:descriptor.value,enumerable:!0,configurable:!1,writable:!1})}return Object.freeze(output)}if(value===null||typeof value!="object")return value;const mapEntries=nativeMapEntries(value);if(mapEntries){const output=snapshotIdentityMap(mapEntries,realm);return budget&&rememberSnapshot(budget,value,output),output}const setValues=nativeSetValues(value);if(setValues){const output=snapshotIdentitySet(setValues,realm);return budget&&rememberSnapshot(budget,value,output),output}return emptyRealmArray(realm)}function snapshotEventDetail(value,view,preserveRootKeys,preserveCollectionItemKeys){if(value==null)return value;const budget={remaining:PUBLIC_COLLECTION_NODE_LIMIT,seen:new WeakMap,additions:[],realm:snapshotRealm(view)},snapshot=snapshotTransaction(budget,()=>snapshotCollectionValue(value,budget,0,preserveRootKeys,preserveCollectionItemKeys));return snapshot===OMIT_COLLECTION_VALUE?null:snapshot}const SEED_FIRST_RENDER_STATE=Symbol("lr-seed-first-render-state"),SLOT_PRESENCE_UNRESOLVED=Symbol("lr-slot-presence-unresolved"),REACTIVE_HOST_ATTRIBUTES=["aria-label","aria-describedby","lang","dir"],DIRECTION_HOST_ATTRIBUTES=["class","style","slot"];function trustedLyraConstructorChain(instance){const constructors=[];let prototype=Object.getPrototypeOf(instance);for(;prototype&&prototype!==LitElement.prototype;){const descriptor=Object.getOwnPropertyDescriptor(prototype,"constructor");typeof descriptor?.value=="function"&&constructors.push(descriptor.value),prototype=Object.getPrototypeOf(prototype)}return constructors}function lyraClassChain(ctor){const constructors=[];let current=ctor;for(;typeof current=="function"&&current!==LitElement;)constructors.push(current),current=Object.getPrototypeOf(current);return constructors}const collectionPolicyByConstructor=new WeakMap;function collectionPropertyPolicy(ctor,name){let policies=collectionPolicyByConstructor.get(ctor);policies||(policies=new Map,collectionPolicyByConstructor.set(ctor,policies));const cached=policies.get(name);if(cached)return cached;let owns=!1,preservesItemIdentity=!1,preservesObjectIdentity=!1;for(const constructor of lyraClassChain(ctor)){const declared=constructor;Object.prototype.hasOwnProperty.call(constructor,"ownedCollectionProperties")&&declared.ownedCollectionProperties.includes(name)&&(owns=!0),Object.prototype.hasOwnProperty.call(constructor,"identityCollectionProperties")&&declared.identityCollectionProperties.includes(name)&&(preservesItemIdentity=!0),Object.prototype.hasOwnProperty.call(constructor,"identityCollectionObjectProperties")&&declared.identityCollectionObjectProperties.includes(name)&&(preservesObjectIdentity=!0)}const policy=Object.freeze({owns,preservesItemIdentity,preservesObjectIdentity});return policies.set(name,policy),policy}const COLLECTION_ENROLLMENT_FIELDS=["ownedCollectionProperties","identityCollectionProperties","identityCollectionObjectProperties"];function enrolledCollectionPropertyNames(ctor){const names=new Set;for(const constructor of lyraClassChain(ctor))for(const field of COLLECTION_ENROLLMENT_FIELDS){if(!Object.prototype.hasOwnProperty.call(constructor,field))continue;const declared=constructor;for(const name of declared[field])names.add(name)}return names}function inheritedPropertyDescriptor(prototype,name){let current=prototype;for(;current;){const descriptor=Object.getOwnPropertyDescriptor(current,name);if(descriptor)return descriptor;current=Object.getPrototypeOf(current)}}const installedOwnershipBoundaries=new WeakSet,ownershipBoundarySetters=new WeakMap;function samePolicy(a,b){return a.owns===b.owns&&a.preservesItemIdentity===b.preservesItemIdentity&&a.preservesObjectIdentity===b.preservesObjectIdentity}function installOwnedCollectionAccessors(ctor){if(installedOwnershipBoundaries.has(ctor))return;installedOwnershipBoundaries.add(ctor);const prototype=ctor.prototype;for(const name of enrolledCollectionPropertyNames(ctor)){const policy=collectionPropertyPolicy(ctor,name);if(!policy.owns)continue;const declaration=ctor.elementProperties.get(name);if(!declaration||declaration.noAccessor)continue;const descriptor=inheritedPropertyDescriptor(prototype,name),inheritedSet=descriptor?.set;if(!inheritedSet)continue;const installed=ownershipBoundarySetters.get(inheritedSet);if(installed&&samePolicy(installed.policy,policy))continue;const originalSet=installed?.originalSet??inheritedSet,set=function(value){const ownerView=this.ownerDocument?.defaultView;originalSet.call(this,policy.preservesObjectIdentity&&value!==null&&typeof value=="object"&&!isArrayValue(value)?value:policy.preservesItemIdentity?snapshotIdentityCollection(value,ownerView):snapshotPublicCollection(value,ownerView))};ownershipBoundarySetters.set(set,{policy,originalSet}),Object.defineProperty(prototype,name,{...descriptor,set})}}class LyraElement extends LitElement{static{this.styles=[palette,tokens]}static{this.ownedCollectionProperties=Object.freeze([])}static{this.identityCollectionProperties=Object.freeze([])}static{this.identityCollectionObjectProperties=Object.freeze([])}static{this.immutableEventDetails=Object.freeze([])}static{this.identityEventDetailProperties=Object.freeze({})}static{this.identityEventDetailCollectionItems=Object.freeze({})}static{this.defaultStrings=Object.freeze({})}static get observedAttributes(){const attributes=[...new Set([...super.observedAttributes,...REACTIVE_HOST_ATTRIBUTES,...DIRECTION_HOST_ATTRIBUTES])];return installOwnedCollectionAccessors(this),attributes}get strings(){return this.stringsValue}set strings(value){const previous=this.stringsValue;this.stringsValue=snapshotLyraLocaleStrings(value),this.requestUpdate("strings",previous)}constructor(){if(super(),this.locale="",this.stringsValue=snapshotLyraLocaleStrings({}),this.localeSubscriptionNeeded=!1,this.constructor.formAssociated){const controller=externalLabelFactory?.(this);controller&&this.addController(controller)}}attachInternals(){const internals=super.attachInternals();return formInternalsHook?.(this,internals),internals}connectedCallback(){this.hydratingServerShadow??=typeof Node>"u"||!this.hasUpdated&&this.shadowRoot!==null,super.connectedCallback(),warnUnknownAttributes(this,this.constructor.observedAttributes,this.constructor.knownUnobservedAttributes??[]),recordLyraOwnerDocumentConnection(this),enableLyraLocaleCache(this),invalidateLyraLocaleCache(this),this.stopInheritedContextObservation?.(),this.stopInheritedContextObservation=observeInheritedContext(this),this.localeSubscriptionNeeded&&this.ensureLocaleSubscription(),this.lastLocalizedCatalogVersion!==void 0&&lyraLocaleCatalogVersion(resolveLyraLocale(this))!==this.lastLocalizedCatalogVersion&&this.requestUpdate();const deferred=this.deferredAfterUpdate;if(deferred){this.deferredAfterUpdate=void 0;for(const[key,callback]of deferred)this.scheduleAfterUpdate(callback,key)}}disconnectedCallback(){this.pendingLoadController?.abort(),this.pendingLoadController=void 0,this.stopLocaleSubscription?.(),this.stopLocaleSubscription=void 0,this.stopInheritedContextObservation?.(),this.stopInheritedContextObservation=void 0,invalidateLyraLocaleCache(this),super.disconnectedCallback()}adoptedCallback(){this.stopLocaleSubscription?.(),this.stopLocaleSubscription=void 0,invalidateLyraLocaleCache(this),this.isConnected&&this.localeSubscriptionNeeded&&this.ensureLocaleSubscription()}requestUpdate(name,oldValue,options){invalidateLyraLocaleCache(this),super.requestUpdate(name,oldValue,options)}performUpdate(){beginInheritedContextUpdate(this);try{super.performUpdate()}finally{finishInheritedContextUpdate(this)}}update(changedProperties){super.update(changedProperties),markInheritedContextUpdateRendered(this)}ensureLocaleSubscription(){this.localeSubscriptionNeeded=!0,!(!this.isConnected||this.stopLocaleSubscription)&&(this.stopLocaleSubscription=subscribeLyraLocaleForHost(this))}attributeChangedCallback(name,oldValue,value){const directionHostAttribute=oldValue!==value&&DIRECTION_HOST_ATTRIBUTES.includes(name);directionHostAttribute&&queueInheritedDirectionChange(this,name==="slot"),super.attributeChangedCallback(name,oldValue,value),oldValue!==value&&REACTIVE_HOST_ATTRIBUTES.includes(name)?this.requestUpdate():directionHostAttribute&&invalidateLyraLocaleCache(this)}seedFirstRenderState(seed){this.hasUpdated||this[SEED_FIRST_RENDER_STATE](seed)}[SEED_FIRST_RENDER_STATE](seed){if(!this.hydratingServerShadow){seed();return}const pending=this.deferredFirstRenderSeeds??=new Set;pending.add(seed),!(pending.size>1)&&this.updateComplete.then(()=>{setTimeout(()=>{this.hydratingServerShadow=!1;const seeds=this.deferredFirstRenderSeeds;this.deferredFirstRenderSeeds=void 0;for(const deferred of seeds??[])deferred();this.requestUpdate()},0)},()=>{this.hydratingServerShadow=!1,this.deferredFirstRenderSeeds=void 0})}updateBrowserDerivedState(update){this[SEED_FIRST_RENDER_STATE](update)}renderSlotPresence(present){return present||this[SLOT_PRESENCE_UNRESOLVED]()}[SLOT_PRESENCE_UNRESOLVED](){return typeof Node>"u"||this.hydratingServerShadow===!0}beginAbortableLoad(){this.pendingLoadController?.abort(),this.pendingLoadController=void 0;const AbortControllerCtor=this.ownerDocument?.defaultView?.AbortController;if(AbortControllerCtor)return this.pendingLoadController=new AbortControllerCtor,this.pendingLoadController.signal}scheduleAfterUpdate(callback,key="load"){const pending=this.afterUpdateCallbacks??=new Map;pending.has(key)||(pending.set(key,callback),!(pending.size>1)&&queueMicrotask(()=>{const due=this.afterUpdateCallbacks;if(this.afterUpdateCallbacks=void 0,!due)return;if(this.isConnected){for(const due_callback of due.values())due_callback();return}const held=this.deferredAfterUpdate??=new Map;for(const[heldKey,heldCallback]of due)held.has(heldKey)||held.set(heldKey,heldCallback)}))}localize(key,fallback,values){const message=resolveLyraString(this,key,this.strings,fallback,values,this.constructor.defaultStrings),locale=peekLyraLocale(this);return recordInheritedLocaleRead(this,locale),locale!==void 0&&(this.lastLocalizedCatalogVersion=lyraLocaleCatalogVersion(locale),this.ensureLocaleSubscription()),message}get effectiveMessageLocale(){if(this.locale)return canonicalizeLyraLocale(this.locale);const locale=resolveLyraLocale(this);return recordInheritedLocaleRead(this,locale),this.ensureLocaleSubscription(),locale}get effectiveLocale(){return resolveIntlLocale(this.effectiveMessageLocale)}get effectiveIntlLocale(){return this.effectiveLocale}get effectiveDirection(){const direction=resolveLyraDirection(this);return recordInheritedDirectionRead(this,direction),direction}addEventListener(type,listener,options){super.addEventListener(type,listener,options)}removeEventListener(type,listener,options){super.removeEventListener(type,listener,options)}emit(name,...args){const[detail,options]=args,ownerDocument=this.ownerDocument;let CustomEventCtor=ownerDocument?.defaultView?.CustomEvent;if(!CustomEventCtor&&ownerDocument)try{const candidate=ownerDocument.createEvent("CustomEvent").constructor;typeof candidate=="function"&&(CustomEventCtor=candidate)}catch{}CustomEventCtor??=globalThis.CustomEvent;let snapshotsDetail=!1;const identityDetailKeys=new Set,identityCollectionItemKeys=new Set;for(const constructor of trustedLyraConstructorChain(this)){if(Object.prototype.hasOwnProperty.call(constructor,"immutableEventDetails")&&constructor.immutableEventDetails.includes(name)&&(snapshotsDetail=!0),Object.prototype.hasOwnProperty.call(constructor,"identityEventDetailProperties"))for(const key of constructor.identityEventDetailProperties[name]??[])identityDetailKeys.add(key);if(Object.prototype.hasOwnProperty.call(constructor,"identityEventDetailCollectionItems"))for(const key of constructor.identityEventDetailCollectionItems[name]??[])identityCollectionItemKeys.add(key)}const event=new CustomEventCtor(name,{detail:detail===void 0?null:snapshotsDetail?snapshotEventDetail(detail,ownerDocument?.defaultView,identityDetailKeys,identityCollectionItemKeys):detail,bubbles:!0,composed:!0,cancelable:options?.cancelable??!1});return this.dispatchEvent(event),event}}__decorate([property({reflect:!0})],LyraElement.prototype,"locale",void 0),__decorate([property({attribute:!1})],LyraElement.prototype,"strings",null);export{LyraElement,SEED_FIRST_RENDER_STATE,SLOT_PRESENCE_UNRESOLVED,registerFormControlLabelSupport};
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{LitElement}from"lit";import{property}from"lit/decorators.js";import{tokens}from"./tokens.styles.js";import{palette}from"./tokens/palette.styles.js";import{resolveIntlLocale}from"./intl-cache.js";import{warnUnknownAttributes}from"./dev-mode-attribute-warning.js";let formInternalsHook,externalLabelFactory;function registerFormControlLabelSupport(hook,factory){formInternalsHook=hook,externalLabelFactory=factory}import{observeInheritedContext,beginInheritedContextUpdate,finishInheritedContextUpdate,markInheritedContextUpdateRendered,queueInheritedDirectionChange,recordInheritedDirectionRead,recordInheritedLocaleRead}from"./inherited-context-observer.js";import{canonicalizeLyraLocale,enableLyraLocaleCache,invalidateLyraLocaleCache,lyraLocaleCatalogVersion,peekLyraLocale,recordLyraOwnerDocumentConnection,resolveLyraDirection,resolveLyraString,resolveLyraLocale,snapshotLyraLocaleStrings,subscribeLyraLocaleForHost}from"./localization-runtime.js";const PUBLIC_COLLECTION_ENTRY_LIMIT=1e4,PUBLIC_COLLECTION_NODE_LIMIT=5e4,PUBLIC_COLLECTION_DEPTH_LIMIT=256,OMIT_COLLECTION_VALUE=Symbol("omit-public-collection-value");function snapshotRealm(view){const candidate=view;return{Array:candidate?.Array??Array,Date:candidate?.Date??Date,Map:candidate?.Map??Map,Object:candidate?.Object??Object,Set:candidate?.Set??Set}}function isRealmNeutralPlainRecord(value){try{const prototype=Object.getPrototypeOf(value);if(prototype===null)return!0;const constructor=Object.getOwnPropertyDescriptor(prototype,"constructor");return!!(constructor&&"value"in constructor&&typeof constructor.value=="function"&&constructor.value.name==="Object"&&Object.getPrototypeOf(prototype)===null)}catch{return!1}}function isArrayValue(value){try{return Array.isArray(value)}catch{return!1}}function isNativeArrayBufferView(value){try{return ArrayBuffer.isView(value)}catch{return!1}}function isImmutableBlob(value){if(typeof Blob>"u")return!1;const sizeGetter=Object.getOwnPropertyDescriptor(Blob.prototype,"size")?.get;if(!sizeGetter)return!1;try{return sizeGetter.call(value),!0}catch{return!1}}const MUTATING_DATE_METHODS=new Set(["setDate","setFullYear","setHours","setMilliseconds","setMinutes","setMonth","setSeconds","setTime","setUTCDate","setUTCFullYear","setUTCHours","setUTCMilliseconds","setUTCMinutes","setUTCMonth","setUTCSeconds","setYear"]);function nativeDateTime(value){try{return Date.prototype.getTime.call(value)}catch{return OMIT_COLLECTION_VALUE}}function snapshotReadonlyDate(source,time,budget){const target=new budget.realm.Date(time),boundMethods=new Map,rejectMutation=()=>{throw new TypeError("Cannot mutate a readonly Date snapshot")},snapshot=new Proxy(target,{get(date,key){if(MUTATING_DATE_METHODS.has(key))return rejectMutation;if(key==="constructor")return budget.realm.Date;const value=Reflect.get(date,key,date);if(typeof value!="function")return value;const cached=boundMethods.get(key);if(cached)return cached;const bound=value.bind(date);return boundMethods.set(key,bound),bound}});return rememberSnapshot(budget,source,snapshot),Object.freeze(snapshot)}function rememberSnapshot(budget,source,snapshot){budget.seen.set(source,snapshot),budget.additions.push(source)}function snapshotTransaction(budget,create){const remaining=budget.remaining,additions=budget.additions.length,result=create();if(result!==OMIT_COLLECTION_VALUE)return result;budget.remaining=remaining;for(let index=budget.additions.length-1;index>=additions;index-=1)budget.seen.delete(budget.additions[index]);return budget.additions.length=additions,OMIT_COLLECTION_VALUE}function emptyRealmArray(realm){return Object.freeze(new realm.Array)}function*ownEnumerableStringKeys(value){for(const key in value)Object.getOwnPropertyDescriptor(value,key)?.enumerable&&(yield key)}function snapshotDataRecord(value,keys,prototype,budget,depth,preserveRecordKeys,preserveCollectionItemKeys){const output=budget.realm.Object.create(prototype);rememberSnapshot(budget,value,output);try{for(const key of keys){const descriptor=Object.getOwnPropertyDescriptor(value,key);if(!descriptor?.enumerable||!("value"in descriptor))continue;if(budget.remaining<=0)return OMIT_COLLECTION_VALUE;budget.remaining-=1;const entry=preserveRecordKeys?.has(key)?descriptor.value:preserveCollectionItemKeys?.has(key)?snapshotIdentityCollection(descriptor.value,budget.realm,budget):snapshotCollectionValue(descriptor.value,budget,depth+1);if(entry===OMIT_COLLECTION_VALUE)return OMIT_COLLECTION_VALUE;Object.defineProperty(output,key,{value:entry,enumerable:!0,configurable:!1,writable:!1})}}catch{return OMIT_COLLECTION_VALUE}return Object.freeze(output)}function snapshotCollectionValue(value,budget,depth,preserveRecordKeys,preserveCollectionItemKeys,allowArrayPrefixTruncation=!1){if(value===null||typeof value!="object"&&typeof value!="function"||typeof value=="function")return value;if(budget.seen.has(value))return budget.seen.get(value);if(depth>PUBLIC_COLLECTION_DEPTH_LIMIT||budget.remaining<=0)return OMIT_COLLECTION_VALUE;if(isArrayValue(value)){let lengthDescriptor;try{lengthDescriptor=Object.getOwnPropertyDescriptor(value,"length")}catch{return allowArrayPrefixTruncation?emptyRealmArray(budget.realm):OMIT_COLLECTION_VALUE}if(!lengthDescriptor||!("value"in lengthDescriptor)||typeof lengthDescriptor.value!="number"||!Number.isSafeInteger(lengthDescriptor.value)||lengthDescriptor.value<0)return allowArrayPrefixTruncation?emptyRealmArray(budget.realm):OMIT_COLLECTION_VALUE;const sourceLength=lengthDescriptor.value;if(!allowArrayPrefixTruncation&&sourceLength>PUBLIC_COLLECTION_ENTRY_LIMIT)return OMIT_COLLECTION_VALUE;const length=Math.min(sourceLength,PUBLIC_COLLECTION_ENTRY_LIMIT),output=new budget.realm.Array(length);rememberSnapshot(budget,value,output);for(let index=0;index<length;index+=1){if(budget.remaining<=0){if(!allowArrayPrefixTruncation)return OMIT_COLLECTION_VALUE;output.length=index;break}let descriptor;try{descriptor=Object.getOwnPropertyDescriptor(value,String(index))}catch{if(!allowArrayPrefixTruncation)return OMIT_COLLECTION_VALUE;output.length=index;break}if(!descriptor)continue;if(!("value"in descriptor)){if(!allowArrayPrefixTruncation)return OMIT_COLLECTION_VALUE;output.length=index;break}const entry=snapshotTransaction(budget,()=>(budget.remaining-=1,snapshotCollectionValue(descriptor.value,budget,depth+1)));if(entry===OMIT_COLLECTION_VALUE){if(!allowArrayPrefixTruncation)return OMIT_COLLECTION_VALUE;output.length=index;break}Object.defineProperty(output,index,{value:entry,enumerable:!0,configurable:!1,writable:!1})}return Object.freeze(output)}if(isRealmNeutralPlainRecord(value)){let prototype;try{prototype=Object.getPrototypeOf(value)}catch{return OMIT_COLLECTION_VALUE}return snapshotDataRecord(value,ownEnumerableStringKeys(value),prototype===null?null:budget.realm.Object.prototype,budget,depth,preserveRecordKeys,preserveCollectionItemKeys)}const dateTime=nativeDateTime(value);if(dateTime!==OMIT_COLLECTION_VALUE)return snapshotReadonlyDate(value,dateTime,budget);const entries=nativeMapEntries(value);if(entries)return snapshotDetachedMap(value,entries,budget,depth);const values=nativeSetValues(value);if(values)return snapshotDetachedSet(value,values,budget,depth);if(isNativeArrayBufferView(value))return OMIT_COLLECTION_VALUE;const rect=snapshotDOMRect(value,budget);return rect!==OMIT_COLLECTION_VALUE?rect:isImmutableBlob(value)?value:OMIT_COLLECTION_VALUE}function snapshotPublicCollection(value,view){if(value===null||typeof value!="object"&&typeof value!="function")return value;const realm=snapshotRealm(view),budget={remaining:PUBLIC_COLLECTION_NODE_LIMIT,seen:new WeakMap,additions:[],realm},snapshot=snapshotTransaction(budget,()=>snapshotCollectionValue(value,budget,0,void 0,void 0,!0));if(snapshot!==OMIT_COLLECTION_VALUE)return snapshot;if(isArrayValue(value)||isNativeArrayBufferView(value))return emptyRealmArray(realm);if(typeof value=="object"){if(nativeMapEntries(value))return readonlyMapFacade(new realm.Map,realm);if(nativeSetValues(value))return readonlySetFacade(new realm.Set,realm);if(isRealmNeutralPlainRecord(value)){const prototype=Object.getPrototypeOf(value);return Object.freeze(realm.Object.create(prototype===null?null:realm.Object.prototype))}}return emptyRealmArray(realm)}function nativeMapEntries(value){try{return Map.prototype.entries.call(value)}catch{return}}function nativeSetValues(value){try{return Set.prototype.values.call(value)}catch{return}}function snapshotDOMRect(value,budget){if(typeof DOMRectReadOnly>"u")return OMIT_COLLECTION_VALUE;const nativePrototype=DOMRectReadOnly.prototype,output=budget.realm.Object.create(budget.realm.Object.prototype);for(const key of["x","y","width","height","top","right","bottom","left"]){let coordinate;try{const getter=Object.getOwnPropertyDescriptor(nativePrototype,key)?.get;if(!getter)return OMIT_COLLECTION_VALUE;coordinate=getter.call(value)}catch{return OMIT_COLLECTION_VALUE}if(typeof coordinate!="number"||!Number.isFinite(coordinate))return OMIT_COLLECTION_VALUE;Object.defineProperty(output,key,{value:coordinate,enumerable:!0,configurable:!1,writable:!1})}return Object.freeze(output)}function readonlyMapFacade(backing,realm=snapshotRealm()){let facade;return facade=realm.Object.create(realm.Object.prototype),Object.defineProperties(facade,{size:{enumerable:!0,get:()=>backing.size},entries:{value:()=>backing.entries()},get:{value:key=>backing.get(key)},has:{value:key=>backing.has(key)},keys:{value:()=>backing.keys()},values:{value:()=>backing.values()},forEach:{value:(callback,thisArg)=>backing.forEach((entry,key)=>callback.call(thisArg,entry,key,facade))},[Symbol.iterator]:{value:()=>backing[Symbol.iterator]()}}),Object.freeze(facade)}function readonlySetFacade(backing,realm=snapshotRealm()){let facade;return facade=realm.Object.create(realm.Object.prototype),Object.defineProperties(facade,{size:{enumerable:!0,get:()=>backing.size},entries:{value:()=>backing.entries()},has:{value:entry=>backing.has(entry)},keys:{value:()=>backing.keys()},values:{value:()=>backing.values()},forEach:{value:(callback,thisArg)=>backing.forEach(entry=>callback.call(thisArg,entry,entry,facade))},[Symbol.iterator]:{value:()=>backing[Symbol.iterator]()}}),Object.freeze(facade)}function snapshotIdentityMap(entries,realm=snapshotRealm()){const backing=new realm.Map;for(let next=entries.next(),count=0;!next.done&&count<PUBLIC_COLLECTION_ENTRY_LIMIT;next=entries.next(),count+=1)backing.set(next.value[0],next.value[1]);return readonlyMapFacade(backing,realm)}function snapshotIdentitySet(values,realm=snapshotRealm()){const backing=new realm.Set;for(let next=values.next(),count=0;!next.done&&count<PUBLIC_COLLECTION_ENTRY_LIMIT;next=values.next(),count+=1)backing.add(next.value);return readonlySetFacade(backing,realm)}function snapshotDetachedMap(source,entries,budget,depth){const backing=new budget.realm.Map,facade=readonlyMapFacade(backing,budget.realm);rememberSnapshot(budget,source,facade);for(let count=0;count<PUBLIC_COLLECTION_ENTRY_LIMIT;count+=1){let next;try{next=entries.next()}catch{break}if(next.done||budget.remaining<=0)break;const pair=snapshotTransaction(budget,()=>{budget.remaining-=1;const key=snapshotCollectionValue(next.value[0],budget,depth+1);if(key===OMIT_COLLECTION_VALUE)return OMIT_COLLECTION_VALUE;const entry=snapshotCollectionValue(next.value[1],budget,depth+1);return entry===OMIT_COLLECTION_VALUE?OMIT_COLLECTION_VALUE:[key,entry]});pair!==OMIT_COLLECTION_VALUE&&backing.set(pair[0],pair[1])}return facade}function snapshotDetachedSet(source,values,budget,depth){const backing=new budget.realm.Set,facade=readonlySetFacade(backing,budget.realm);rememberSnapshot(budget,source,facade);for(let count=0;count<PUBLIC_COLLECTION_ENTRY_LIMIT;count+=1){let next;try{next=values.next()}catch{break}if(next.done||budget.remaining<=0)break;const entry=snapshotTransaction(budget,()=>(budget.remaining-=1,snapshotCollectionValue(next.value,budget,depth+1)));entry!==OMIT_COLLECTION_VALUE&&backing.add(entry)}return facade}function snapshotIdentityCollection(value,view,budget){const realm=snapshotRealm(view);if(budget&&value!==null&&(typeof value=="object"||typeof value=="function")&&budget.seen.has(value))return budget.seen.get(value);if(isArrayValue(value)){let lengthDescriptor;try{lengthDescriptor=Object.getOwnPropertyDescriptor(value,"length")}catch{return emptyRealmArray(realm)}const length=lengthDescriptor&&"value"in lengthDescriptor&&typeof lengthDescriptor.value=="number"&&Number.isSafeInteger(lengthDescriptor.value)&&lengthDescriptor.value>=0?Math.min(lengthDescriptor.value,PUBLIC_COLLECTION_ENTRY_LIMIT):0,output=new realm.Array(length);budget&&rememberSnapshot(budget,value,output);for(let index=0;index<length;index+=1){let descriptor;try{descriptor=Object.getOwnPropertyDescriptor(value,String(index))}catch{continue}!descriptor||!("value"in descriptor)||Object.defineProperty(output,index,{value:descriptor.value,enumerable:!0,configurable:!1,writable:!1})}return Object.freeze(output)}if(value===null||typeof value!="object")return value;const mapEntries=nativeMapEntries(value);if(mapEntries){const output=snapshotIdentityMap(mapEntries,realm);return budget&&rememberSnapshot(budget,value,output),output}const setValues=nativeSetValues(value);if(setValues){const output=snapshotIdentitySet(setValues,realm);return budget&&rememberSnapshot(budget,value,output),output}return emptyRealmArray(realm)}function snapshotEventDetail(value,view,preserveRootKeys,preserveCollectionItemKeys){if(value==null)return value;const budget={remaining:PUBLIC_COLLECTION_NODE_LIMIT,seen:new WeakMap,additions:[],realm:snapshotRealm(view)},snapshot=snapshotTransaction(budget,()=>snapshotCollectionValue(value,budget,0,preserveRootKeys,preserveCollectionItemKeys));return snapshot===OMIT_COLLECTION_VALUE?null:snapshot}const SEED_FIRST_RENDER_STATE=Symbol("lr-seed-first-render-state"),SLOT_PRESENCE_UNRESOLVED=Symbol("lr-slot-presence-unresolved"),REACTIVE_HOST_ATTRIBUTES=["aria-label","aria-describedby","lang","dir"],DIRECTION_HOST_ATTRIBUTES=["class","style","slot"];function trustedLyraConstructorChain(instance){const constructors=[];let prototype=Object.getPrototypeOf(instance);for(;prototype&&prototype!==LitElement.prototype;){const descriptor=Object.getOwnPropertyDescriptor(prototype,"constructor");typeof descriptor?.value=="function"&&constructors.push(descriptor.value),prototype=Object.getPrototypeOf(prototype)}return constructors}function lyraClassChain(ctor){const constructors=[];let current=ctor;for(;typeof current=="function"&&current!==LitElement;)constructors.push(current),current=Object.getPrototypeOf(current);return constructors}const collectionPolicyByConstructor=new WeakMap;function collectionPropertyPolicy(ctor,name){let policies=collectionPolicyByConstructor.get(ctor);policies||(policies=new Map,collectionPolicyByConstructor.set(ctor,policies));const cached=policies.get(name);if(cached)return cached;let owns=!1,preservesItemIdentity=!1,preservesObjectIdentity=!1;for(const constructor of lyraClassChain(ctor)){const declared=constructor;Object.prototype.hasOwnProperty.call(constructor,"ownedCollectionProperties")&&declared.ownedCollectionProperties.includes(name)&&(owns=!0),Object.prototype.hasOwnProperty.call(constructor,"identityCollectionProperties")&&declared.identityCollectionProperties.includes(name)&&(preservesItemIdentity=!0),Object.prototype.hasOwnProperty.call(constructor,"identityCollectionObjectProperties")&&declared.identityCollectionObjectProperties.includes(name)&&(preservesObjectIdentity=!0)}const policy=Object.freeze({owns,preservesItemIdentity,preservesObjectIdentity});return policies.set(name,policy),policy}const COLLECTION_ENROLLMENT_FIELDS=["ownedCollectionProperties","identityCollectionProperties","identityCollectionObjectProperties"];function enrolledCollectionPropertyNames(ctor){const names=new Set;for(const constructor of lyraClassChain(ctor))for(const field of COLLECTION_ENROLLMENT_FIELDS){if(!Object.prototype.hasOwnProperty.call(constructor,field))continue;const declared=constructor;for(const name of declared[field])names.add(name)}return names}function inheritedPropertyDescriptor(prototype,name){let current=prototype;for(;current;){const descriptor=Object.getOwnPropertyDescriptor(current,name);if(descriptor)return descriptor;current=Object.getPrototypeOf(current)}}const installedOwnershipBoundaries=new WeakSet,ownershipBoundarySetters=new WeakMap;function samePolicy(a,b){return a.owns===b.owns&&a.preservesItemIdentity===b.preservesItemIdentity&&a.preservesObjectIdentity===b.preservesObjectIdentity}function installOwnedCollectionAccessors(ctor){if(installedOwnershipBoundaries.has(ctor))return;installedOwnershipBoundaries.add(ctor);const prototype=ctor.prototype;for(const name of enrolledCollectionPropertyNames(ctor)){const policy=collectionPropertyPolicy(ctor,name);if(!policy.owns)continue;const declaration=ctor.elementProperties.get(name);if(!declaration||declaration.noAccessor)continue;const descriptor=inheritedPropertyDescriptor(prototype,name),inheritedSet=descriptor?.set;if(!inheritedSet)continue;const installed=ownershipBoundarySetters.get(inheritedSet);if(installed&&samePolicy(installed.policy,policy))continue;const originalSet=installed?.originalSet??inheritedSet,lastAssignments=new WeakMap,set=function(value){const previous=lastAssignments.get(this);if(previous&&declaration.hasChanged===void 0&&!policy.preservesItemIdentity&&!policy.preservesObjectIdentity&&(Object.is(value,previous.source)||Object.is(value,previous.retained)))return;const ownerView=this.ownerDocument?.defaultView,snapshot=policy.preservesObjectIdentity&&value!==null&&typeof value=="object"&&!isArrayValue(value)?value:policy.preservesItemIdentity?snapshotIdentityCollection(value,ownerView):snapshotPublicCollection(value,ownerView);originalSet.call(this,snapshot),lastAssignments.set(this,{source:value,retained:descriptor.get?.call(this)??snapshot})};ownershipBoundarySetters.set(set,{policy,originalSet}),Object.defineProperty(prototype,name,{...descriptor,set})}}class LyraElement extends LitElement{static{this.styles=[palette,tokens]}static{this.ownedCollectionProperties=Object.freeze([])}static{this.identityCollectionProperties=Object.freeze([])}static{this.identityCollectionObjectProperties=Object.freeze([])}static{this.immutableEventDetails=Object.freeze([])}static{this.identityEventDetailProperties=Object.freeze({})}static{this.identityEventDetailCollectionItems=Object.freeze({})}static{this.defaultStrings=Object.freeze({})}static get observedAttributes(){const attributes=[...new Set([...super.observedAttributes,...REACTIVE_HOST_ATTRIBUTES,...DIRECTION_HOST_ATTRIBUTES])];return installOwnedCollectionAccessors(this),attributes}get strings(){return this.stringsValue}set strings(value){const previous=this.stringsValue;this.stringsValue=snapshotLyraLocaleStrings(value),this.requestUpdate("strings",previous)}constructor(){if(super(),this.locale="",this.stringsValue=snapshotLyraLocaleStrings({}),this.localeSubscriptionNeeded=!1,this.constructor.formAssociated){const controller=externalLabelFactory?.(this);controller&&this.addController(controller)}}attachInternals(){const internals=super.attachInternals();return formInternalsHook?.(this,internals),internals}connectedCallback(){this.hydratingServerShadow??=typeof Node>"u"||!this.hasUpdated&&this.shadowRoot!==null,super.connectedCallback(),warnUnknownAttributes(this,this.constructor.observedAttributes,this.constructor.knownUnobservedAttributes??[]),recordLyraOwnerDocumentConnection(this),enableLyraLocaleCache(this),invalidateLyraLocaleCache(this),this.stopInheritedContextObservation?.(),this.stopInheritedContextObservation=observeInheritedContext(this),this.localeSubscriptionNeeded&&this.ensureLocaleSubscription(),this.lastLocalizedCatalogVersion!==void 0&&lyraLocaleCatalogVersion(resolveLyraLocale(this))!==this.lastLocalizedCatalogVersion&&this.requestUpdate();const deferred=this.deferredAfterUpdate;if(deferred){this.deferredAfterUpdate=void 0;for(const[key,callback]of deferred)this.scheduleAfterUpdate(callback,key)}}disconnectedCallback(){this.pendingLoadController?.abort(),this.pendingLoadController=void 0,this.stopLocaleSubscription?.(),this.stopLocaleSubscription=void 0,this.stopInheritedContextObservation?.(),this.stopInheritedContextObservation=void 0,invalidateLyraLocaleCache(this),super.disconnectedCallback()}adoptedCallback(){this.stopLocaleSubscription?.(),this.stopLocaleSubscription=void 0,invalidateLyraLocaleCache(this),this.isConnected&&this.localeSubscriptionNeeded&&this.ensureLocaleSubscription()}requestUpdate(name,oldValue,options){invalidateLyraLocaleCache(this),super.requestUpdate(name,oldValue,options)}performUpdate(){beginInheritedContextUpdate(this);try{super.performUpdate()}finally{finishInheritedContextUpdate(this)}}update(changedProperties){super.update(changedProperties),markInheritedContextUpdateRendered(this)}ensureLocaleSubscription(){this.localeSubscriptionNeeded=!0,!(!this.isConnected||this.stopLocaleSubscription)&&(this.stopLocaleSubscription=subscribeLyraLocaleForHost(this))}attributeChangedCallback(name,oldValue,value){const directionHostAttribute=oldValue!==value&&DIRECTION_HOST_ATTRIBUTES.includes(name);directionHostAttribute&&queueInheritedDirectionChange(this,name==="slot"),super.attributeChangedCallback(name,oldValue,value),oldValue!==value&&REACTIVE_HOST_ATTRIBUTES.includes(name)?this.requestUpdate():directionHostAttribute&&invalidateLyraLocaleCache(this)}seedFirstRenderState(seed){this.hasUpdated||this[SEED_FIRST_RENDER_STATE](seed)}[SEED_FIRST_RENDER_STATE](seed){if(!this.hydratingServerShadow){seed();return}const pending=this.deferredFirstRenderSeeds??=new Set;pending.add(seed),!(pending.size>1)&&this.updateComplete.then(()=>{setTimeout(()=>{this.hydratingServerShadow=!1;const seeds=this.deferredFirstRenderSeeds;this.deferredFirstRenderSeeds=void 0;for(const deferred of seeds??[])deferred();this.requestUpdate()},0)},()=>{this.hydratingServerShadow=!1,this.deferredFirstRenderSeeds=void 0})}updateBrowserDerivedState(update){this[SEED_FIRST_RENDER_STATE](update)}renderSlotPresence(present){return present||this[SLOT_PRESENCE_UNRESOLVED]()}[SLOT_PRESENCE_UNRESOLVED](){return typeof Node>"u"||this.hydratingServerShadow===!0}beginAbortableLoad(){this.pendingLoadController?.abort(),this.pendingLoadController=void 0;const AbortControllerCtor=this.ownerDocument?.defaultView?.AbortController;if(AbortControllerCtor)return this.pendingLoadController=new AbortControllerCtor,this.pendingLoadController.signal}scheduleAfterUpdate(callback,key="load"){const pending=this.afterUpdateCallbacks??=new Map;pending.has(key)||(pending.set(key,callback),!(pending.size>1)&&queueMicrotask(()=>{const due=this.afterUpdateCallbacks;if(this.afterUpdateCallbacks=void 0,!due)return;if(this.isConnected){for(const due_callback of due.values())due_callback();return}const held=this.deferredAfterUpdate??=new Map;for(const[heldKey,heldCallback]of due)held.has(heldKey)||held.set(heldKey,heldCallback)}))}localize(key,fallback,values){const message=resolveLyraString(this,key,this.strings,fallback,values,this.constructor.defaultStrings),locale=peekLyraLocale(this);return recordInheritedLocaleRead(this,locale),locale!==void 0&&(this.lastLocalizedCatalogVersion=lyraLocaleCatalogVersion(locale),this.ensureLocaleSubscription()),message}get effectiveMessageLocale(){if(this.locale)return canonicalizeLyraLocale(this.locale);const locale=resolveLyraLocale(this);return recordInheritedLocaleRead(this,locale),this.ensureLocaleSubscription(),locale}get effectiveLocale(){return resolveIntlLocale(this.effectiveMessageLocale)}get effectiveIntlLocale(){return this.effectiveLocale}get effectiveDirection(){const direction=resolveLyraDirection(this);return recordInheritedDirectionRead(this,direction),direction}addEventListener(type,listener,options){super.addEventListener(type,listener,options)}removeEventListener(type,listener,options){super.removeEventListener(type,listener,options)}emit(name,...args){const[detail,options]=args,ownerDocument=this.ownerDocument;let CustomEventCtor=ownerDocument?.defaultView?.CustomEvent;if(!CustomEventCtor&&ownerDocument)try{const candidate=ownerDocument.createEvent("CustomEvent").constructor;typeof candidate=="function"&&(CustomEventCtor=candidate)}catch{}CustomEventCtor??=globalThis.CustomEvent;let snapshotsDetail=!1;const identityDetailKeys=new Set,identityCollectionItemKeys=new Set;for(const constructor of trustedLyraConstructorChain(this)){if(Object.prototype.hasOwnProperty.call(constructor,"immutableEventDetails")&&constructor.immutableEventDetails.includes(name)&&(snapshotsDetail=!0),Object.prototype.hasOwnProperty.call(constructor,"identityEventDetailProperties"))for(const key of constructor.identityEventDetailProperties[name]??[])identityDetailKeys.add(key);if(Object.prototype.hasOwnProperty.call(constructor,"identityEventDetailCollectionItems"))for(const key of constructor.identityEventDetailCollectionItems[name]??[])identityCollectionItemKeys.add(key)}const event=new CustomEventCtor(name,{detail:detail===void 0?null:snapshotsDetail?snapshotEventDetail(detail,ownerDocument?.defaultView,identityDetailKeys,identityCollectionItemKeys):detail,bubbles:!0,composed:!0,cancelable:options?.cancelable??!1});return this.dispatchEvent(event),event}}__decorate([property({reflect:!0})],LyraElement.prototype,"locale",void 0),__decorate([property({attribute:!1})],LyraElement.prototype,"strings",null);export{LyraElement,SEED_FIRST_RENDER_STATE,SLOT_PRESENCE_UNRESOLVED,registerFormControlLabelSupport};
@@ -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: '12.1.0';
6
+ export declare const LYRA_PACKAGE_VERSION: '12.1.1';
@@ -1 +1 @@
1
- const LYRA_PACKAGE_NAME="@aceshooting/lyra-ui",LYRA_PACKAGE_VERSION="12.1.0";export{LYRA_PACKAGE_NAME,LYRA_PACKAGE_VERSION};
1
+ const LYRA_PACKAGE_NAME="@aceshooting/lyra-ui",LYRA_PACKAGE_VERSION="12.1.1";export{LYRA_PACKAGE_NAME,LYRA_PACKAGE_VERSION};
@@ -136,7 +136,7 @@ Text field + calendar popover, **form-associated** via the shared `FormAssociate
136
136
  **Properties (44):**
137
137
 
138
138
  - `appearance: 'filled'|'outlined'|'filled-outlined' = 'outlined'` (reflected)
139
- - `appliedPreset: LyraDateRangePreset | undefined` (read-only, new in 11.3.0) — the `presets` entry
139
+ - `appliedPreset: LyraDateRangePreset | undefined` (read-only, new in 12.1.0) — the `presets` entry
140
140
  whose button produced the current `value`, or `undefined` when the value was picked on the
141
141
  calendar, typed into the field, cleared, or reset. Read it inside your own `change`/`input`
142
142
  handler; it is updated before those events are relayed, so a handler observes the preset that
@@ -136,7 +136,7 @@ Text field + calendar popover, **form-associated** via the shared `FormAssociate
136
136
  **Properties (44):**
137
137
 
138
138
  - `appearance: 'filled'|'outlined'|'filled-outlined' = 'outlined'` (reflected)
139
- - `appliedPreset: LyraDateRangePreset | undefined` (read-only, new in 11.3.0) — the `presets` entry
139
+ - `appliedPreset: LyraDateRangePreset | undefined` (read-only, new in 12.1.0) — the `presets` entry
140
140
  whose button produced the current `value`, or `undefined` when the value was picked on the
141
141
  calendar, typed into the field, cleared, or reset. Read it inside your own `change`/`input`
142
142
  handler; it is updated before those events are relayed, so a handler observes the preset that
@@ -52,7 +52,7 @@ value therefore stays inside a 320px LTR or RTL bar, with the chip's own label e
52
52
  overflow ownership rather than widening the page.
53
53
 
54
54
  Each edit exposes one filter-bar `lr-input` carrying a detached, deeply frozen snapshot of the
55
- complete value object, plus the `filterId` that changed and (new in 11.3.0) `appliedPreset` — see
55
+ complete value object, plus the `filterId` that changed and (new in 12.1.0) `appliedPreset` — see
56
56
  "Date-range quick ranges" below. A built-in or
57
57
  custom control's own `lr-input`/`lr-change` aliases stay inside the wrapper so their incompatible
58
58
  detail shapes cannot escape as duplicate bar events; native-style `input`/`change` events from the
@@ -105,7 +105,7 @@ text the user typed, not a truncated or normalized form.
105
105
 
106
106
  ### Date-range quick ranges
107
107
 
108
- A `'date-range'` definition also accepts `presets?: readonly LyraDateRangePreset[]` (new in 11.3.0),
108
+ A `'date-range'` definition also accepts `presets?: readonly LyraDateRangePreset[]` (new in 12.1.0),
109
109
  forwarded to its composed `<lr-date-input>` exactly like `min`/`max`, so the quick-range row
110
110
  ("Today", "Last 7 days", "All time") renders inside that filter's own calendar popover. Entries are
111
111
  `LyraDateRangePreset { label, start?, end? }` with ISO `YYYY-MM-DD` bounds; an omitted bound is open
@@ -136,7 +136,7 @@ heatmap?: LyraMapHeatmapOptions; cluster?: LyraMapClusterOptions }`. `sourceId`
136
136
  its private source/layers removed, and a genuinely new `sourceId` gets new resources — nothing
137
137
  leaks on removal, style change, or disconnect.
138
138
 
139
- `cluster` and `kind` (both new in 11.3.0) opt one entry out of that three-layer geometry split.
139
+ `cluster` and `kind` (both new in 12.1.0) opt one entry out of that three-layer geometry split.
140
140
  **Both are strictly additive: an entry that sets neither renders exactly what it rendered before,
141
141
  down to the layer ids and the point layer's filter.**
142
142
 
package/llms-full.txt CHANGED
@@ -5114,7 +5114,7 @@ Text field + calendar popover, **form-associated** via the shared `FormAssociate
5114
5114
  **Properties (44):**
5115
5115
 
5116
5116
  - `appearance: 'filled'|'outlined'|'filled-outlined' = 'outlined'` (reflected)
5117
- - `appliedPreset: LyraDateRangePreset | undefined` (read-only, new in 11.3.0) — the `presets` entry
5117
+ - `appliedPreset: LyraDateRangePreset | undefined` (read-only, new in 12.1.0) — the `presets` entry
5118
5118
  whose button produced the current `value`, or `undefined` when the value was picked on the
5119
5119
  calendar, typed into the field, cleared, or reset. Read it inside your own `change`/`input`
5120
5120
  handler; it is updated before those events are relayed, so a handler observes the preset that
@@ -16922,7 +16922,7 @@ value therefore stays inside a 320px LTR or RTL bar, with the chip's own label e
16922
16922
  overflow ownership rather than widening the page.
16923
16923
 
16924
16924
  Each edit exposes one filter-bar `lr-input` carrying a detached, deeply frozen snapshot of the
16925
- complete value object, plus the `filterId` that changed and (new in 11.3.0) `appliedPreset` — see
16925
+ complete value object, plus the `filterId` that changed and (new in 12.1.0) `appliedPreset` — see
16926
16926
  "Date-range quick ranges" below. A built-in or
16927
16927
  custom control's own `lr-input`/`lr-change` aliases stay inside the wrapper so their incompatible
16928
16928
  detail shapes cannot escape as duplicate bar events; native-style `input`/`change` events from the
@@ -16975,7 +16975,7 @@ text the user typed, not a truncated or normalized form.
16975
16975
 
16976
16976
  ### Date-range quick ranges
16977
16977
 
16978
- A `'date-range'` definition also accepts `presets?: readonly LyraDateRangePreset[]` (new in 11.3.0),
16978
+ A `'date-range'` definition also accepts `presets?: readonly LyraDateRangePreset[]` (new in 12.1.0),
16979
16979
  forwarded to its composed `<lr-date-input>` exactly like `min`/`max`, so the quick-range row
16980
16980
  ("Today", "Last 7 days", "All time") renders inside that filter's own calendar popover. Entries are
16981
16981
  `LyraDateRangePreset { label, start?, end? }` with ISO `YYYY-MM-DD` bounds; an omitted bound is open
@@ -22609,7 +22609,7 @@ heatmap?: LyraMapHeatmapOptions; cluster?: LyraMapClusterOptions }`. `sourceId`
22609
22609
  its private source/layers removed, and a genuinely new `sourceId` gets new resources — nothing
22610
22610
  leaks on removal, style change, or disconnect.
22611
22611
 
22612
- `cluster` and `kind` (both new in 11.3.0) opt one entry out of that three-layer geometry split.
22612
+ `cluster` and `kind` (both new in 12.1.0) opt one entry out of that three-layer geometry split.
22613
22613
  **Both are strictly additive: an entry that sets neither renders exactly what it rendered before,
22614
22614
  down to the layer ids and the point layer's filter.**
22615
22615
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aceshooting/lyra-ui",
3
- "version": "12.1.0",
3
+ "version": "12.1.1",
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",
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": "12.1.0",
4
+ "version": "12.1.1",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {