@new-black/lyra 1.30.1 → 1.31.0-next.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/dist/components/lists/shared-list.styles.d.ts +1 -0
- package/dist/components/lists/shared-list.styles.d.ts.map +1 -1
- package/dist/components/menu/menu.d.ts +3 -10
- package/dist/components/menu/menu.d.ts.map +1 -1
- package/dist/components/menu/menu.mock.d.ts +2 -0
- package/dist/components/menu/menu.mock.d.ts.map +1 -1
- package/dist/components/menu/menu.types.d.ts +30 -3
- package/dist/components/menu/menu.types.d.ts.map +1 -1
- package/dist/lyra1113.cjs +1 -1
- package/dist/lyra1113.cjs.map +1 -1
- package/dist/lyra1114.js +9 -3
- package/dist/lyra1114.js.map +1 -1
- package/dist/lyra1149.cjs +1 -1
- package/dist/lyra1149.cjs.map +1 -1
- package/dist/lyra1150.js +59 -48
- package/dist/lyra1150.js.map +1 -1
- package/dist/lyra39.cjs +1 -1
- package/dist/lyra39.cjs.map +1 -1
- package/dist/lyra4.cjs +1 -1
- package/dist/lyra4.cjs.map +1 -1
- package/dist/lyra4.js +10 -14
- package/dist/lyra4.js.map +1 -1
- package/dist/lyra40.js +12 -8
- package/dist/lyra40.js.map +1 -1
- package/dist/lyra660.cjs +1 -1
- package/dist/lyra660.cjs.map +1 -1
- package/dist/lyra661.js +12 -3
- package/dist/lyra661.js.map +1 -1
- package/dist/lyra682.cjs +1 -1
- package/dist/lyra682.cjs.map +1 -1
- package/dist/lyra683.js +124 -124
- package/dist/lyra683.js.map +1 -1
- package/package.json +1 -1
package/dist/lyra4.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=class{constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}},t=class extends e{filter(e,t,n){let[r,i]=
|
|
1
|
+
var e=class{constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}},t=class extends e{filter(e,t,n){let[r,i]=s(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},n=class extends e{static{this.type=`header`}},r=class extends e{static{this.type=`loader`}},i=class extends t{static{this.type=`item`}filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}},a=class extends t{static{this.type=`section`}filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}},o=class{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey==null?void 0:this.keyMap.get(this.firstKey);for(;e;)yield e,e=e.nextKey==null?void 0:this.keyMap.get(e.nextKey)}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=n?.firstChildKey==null?null:t.get(n.firstChildKey);for(;r;)yield r,r=r.nextKey==null?void 0:t.get(r.nextKey)}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!==`item`&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!==`item`&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey==null?null:this.keyMap.get(this.lastKey);for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw Error(`Not implemented`)}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw Error(`Cannot add a node to a frozen collection`);e.type===`item`&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let n=t.getChildren(e.key);for(let e of n)this.addDescendants(e,t)}removeNode(e){if(this.frozen)throw Error(`Cannot remove a node to a frozen collection`);let t=this.keyMap.get(e);t!=null&&t.type===`item`&&this.itemCount--,this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error(`Cannot commit a frozen collection`);this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(e){let t=new this.constructor,[n,r]=s(this,t,this.firstKey,e);return t?.commit(n,r),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}};function s(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey==null?null:e.getItem(o.nextKey)}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e==null?a=null:(a=t.getItem(e),a.nextKey=null)}return[i?.key??null,a?.key??null]}exports.BaseCollection=o,exports.CollectionNode=e,exports.FilterableNode=t,exports.HeaderNode=n,exports.ItemNode=i,exports.LoaderNode=r,exports.SectionNode=a;
|
package/dist/lyra4.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lyra4.cjs","names":["$6f0c29017aeec335$export$d68d59712b04d9d1","key","node","clone","newCollection","collection","$6f0c29017aeec335$export$b1918e978f1ee46f","firstKey","lastKey","$6f0c29017aeec335$var$filterChildren","filterFn","newNode","$6f0c29017aeec335$export$8258a0665a675899","$6f0c29017aeec335$export$fd11f34e1d07f134","filteredSection","lastChild","$6f0c29017aeec335$export$408d25a4e12db025","keyMap","parent","Constructor","children","oldCollection","child","isSSR","firstChildKey","firstNode","lastNode","currentNode","prevKey"],"sources":["../node_modules/react-aria/dist/private/collections/BaseCollection.mjs"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ class $6f0c29017aeec335$export$d68d59712b04d9d1 {\n constructor(key){\n this.value = null;\n this.level = 0;\n this.hasChildNodes = false;\n this.rendered = null;\n this.textValue = '';\n this['aria-label'] = undefined;\n this.index = 0;\n this.parentKey = null;\n this.prevKey = null;\n this.nextKey = null;\n this.firstChildKey = null;\n this.lastChildKey = null;\n this.props = {};\n this.colSpan = null;\n this.colIndex = null;\n this.type = this.constructor.type;\n this.key = key;\n }\n get childNodes() {\n throw new Error('childNodes is not supported');\n }\n clone() {\n let node = new this.constructor(this.key);\n node.value = this.value;\n node.level = this.level;\n node.hasChildNodes = this.hasChildNodes;\n node.rendered = this.rendered;\n node.textValue = this.textValue;\n node['aria-label'] = this['aria-label'];\n node.index = this.index;\n node.parentKey = this.parentKey;\n node.prevKey = this.prevKey;\n node.nextKey = this.nextKey;\n node.firstChildKey = this.firstChildKey;\n node.lastChildKey = this.lastChildKey;\n node.props = this.props;\n node.render = this.render;\n node.colSpan = this.colSpan;\n node.colIndex = this.colIndex;\n return node;\n }\n filter(collection, newCollection, // eslint-disable-next-line @typescript-eslint/no-unused-vars\n filterFn) {\n let clone = this.clone();\n newCollection.addDescendants(clone, collection);\n return clone;\n }\n}\nclass $6f0c29017aeec335$export$b1918e978f1ee46f extends $6f0c29017aeec335$export$d68d59712b04d9d1 {\n filter(collection, newCollection, filterFn) {\n let [firstKey, lastKey] = $6f0c29017aeec335$var$filterChildren(collection, newCollection, this.firstChildKey, filterFn);\n let newNode = this.clone();\n newNode.firstChildKey = firstKey;\n newNode.lastChildKey = lastKey;\n return newNode;\n }\n}\nclass $6f0c29017aeec335$export$5ae2504e948afce5 extends $6f0c29017aeec335$export$d68d59712b04d9d1 {\n static{\n this.type = 'header';\n }\n}\nclass $6f0c29017aeec335$export$8258a0665a675899 extends $6f0c29017aeec335$export$d68d59712b04d9d1 {\n static{\n this.type = 'loader';\n }\n}\nclass $6f0c29017aeec335$export$fd11f34e1d07f134 extends $6f0c29017aeec335$export$b1918e978f1ee46f {\n static{\n this.type = 'item';\n }\n filter(collection, newCollection, filterFn) {\n if (filterFn(this.textValue, this)) {\n let clone = this.clone();\n newCollection.addDescendants(clone, collection);\n return clone;\n }\n return null;\n }\n}\nclass $6f0c29017aeec335$export$437f11dc9b403b78 extends $6f0c29017aeec335$export$b1918e978f1ee46f {\n static{\n this.type = 'section';\n }\n filter(collection, newCollection, filterFn) {\n let filteredSection = super.filter(collection, newCollection, filterFn);\n if (filteredSection) {\n if (filteredSection.lastChildKey !== null) {\n let lastChild = collection.getItem(filteredSection.lastChildKey);\n if (lastChild && lastChild.type !== 'header') return filteredSection;\n }\n }\n return null;\n }\n}\nclass $6f0c29017aeec335$export$408d25a4e12db025 {\n get size() {\n return this.itemCount;\n }\n getKeys() {\n return this.keyMap.keys();\n }\n *[Symbol.iterator]() {\n let node = this.firstKey != null ? this.keyMap.get(this.firstKey) : undefined;\n while(node){\n yield node;\n node = node.nextKey != null ? this.keyMap.get(node.nextKey) : undefined;\n }\n }\n getChildren(key) {\n let keyMap = this.keyMap;\n return {\n *[Symbol.iterator] () {\n let parent = keyMap.get(key);\n let node = parent?.firstChildKey != null ? keyMap.get(parent.firstChildKey) : null;\n while(node){\n yield node;\n node = node.nextKey != null ? keyMap.get(node.nextKey) : undefined;\n }\n }\n };\n }\n getKeyBefore(key) {\n let node = this.keyMap.get(key);\n if (!node) return null;\n if (node.prevKey != null) {\n node = this.keyMap.get(node.prevKey);\n while(node && node.type !== 'item' && node.lastChildKey != null)node = this.keyMap.get(node.lastChildKey);\n return node?.key ?? null;\n }\n return node.parentKey;\n }\n getKeyAfter(key) {\n let node = this.keyMap.get(key);\n if (!node) return null;\n if (node.type !== 'item' && node.firstChildKey != null) return node.firstChildKey;\n while(node){\n if (node.nextKey != null) return node.nextKey;\n if (node.parentKey != null) node = this.keyMap.get(node.parentKey);\n else return null;\n }\n return null;\n }\n getFirstKey() {\n return this.firstKey;\n }\n getLastKey() {\n let node = this.lastKey != null ? this.keyMap.get(this.lastKey) : null;\n while(node?.lastChildKey != null)node = this.keyMap.get(node.lastChildKey);\n return node?.key ?? null;\n }\n getItem(key) {\n return this.keyMap.get(key) ?? null;\n }\n at() {\n throw new Error('Not implemented');\n }\n clone() {\n // We need to clone using this.constructor so that subclasses have the right prototype.\n // TypeScript isn't happy about this yet.\n // https://github.com/microsoft/TypeScript/issues/3841\n let Constructor = this.constructor;\n let collection = new Constructor();\n collection.keyMap = new Map(this.keyMap);\n collection.firstKey = this.firstKey;\n collection.lastKey = this.lastKey;\n collection.itemCount = this.itemCount;\n return collection;\n }\n addNode(node) {\n if (this.frozen) throw new Error('Cannot add a node to a frozen collection');\n if (node.type === 'item' && this.keyMap.get(node.key) == null) this.itemCount++;\n this.keyMap.set(node.key, node);\n }\n // Deeply add a node and its children to the collection from another collection, primarily used when filtering a collection\n addDescendants(node, oldCollection) {\n this.addNode(node);\n let children = oldCollection.getChildren(node.key);\n for (let child of children)this.addDescendants(child, oldCollection);\n }\n removeNode(key) {\n if (this.frozen) throw new Error('Cannot remove a node to a frozen collection');\n let node = this.keyMap.get(key);\n if (node != null && node.type === 'item') this.itemCount--;\n this.keyMap.delete(key);\n }\n commit(firstKey, lastKey, isSSR = false) {\n if (this.frozen) throw new Error('Cannot commit a frozen collection');\n this.firstKey = firstKey;\n this.lastKey = lastKey;\n this.frozen = !isSSR;\n }\n filter(filterFn) {\n let newCollection = new this.constructor();\n let [firstKey, lastKey] = $6f0c29017aeec335$var$filterChildren(this, newCollection, this.firstKey, filterFn);\n newCollection?.commit(firstKey, lastKey);\n return newCollection;\n }\n constructor(){\n this.keyMap = new Map();\n this.firstKey = null;\n this.lastKey = null;\n this.frozen = false;\n this.itemCount = 0;\n }\n}\nfunction $6f0c29017aeec335$var$filterChildren(collection, newCollection, firstChildKey, filterFn) {\n // loop over the siblings for firstChildKey\n // create new nodes based on calling node.filter for each child\n // if it returns null then don't include it, otherwise update its prev/next keys\n // add them to the newCollection\n if (firstChildKey == null) return [\n null,\n null\n ];\n let firstNode = null;\n let lastNode = null;\n let currentNode = collection.getItem(firstChildKey);\n while(currentNode != null){\n let newNode = currentNode.filter(collection, newCollection, filterFn);\n if (newNode != null) {\n newNode.nextKey = null;\n if (lastNode) {\n newNode.prevKey = lastNode.key;\n lastNode.nextKey = newNode.key;\n }\n if (firstNode == null) firstNode = newNode;\n newCollection.addNode(newNode);\n lastNode = newNode;\n }\n currentNode = currentNode.nextKey != null ? collection.getItem(currentNode.nextKey) : null;\n }\n // TODO: this is pretty specific to dividers but doesn't feel like there is a good way to get around it since we only can know\n // to filter the last separator in a collection only after performing a filter for the rest of the contents after it\n // Its gross that it needs to live here, might be nice if somehow we could have this live in the separator code\n if (lastNode && lastNode.type === 'separator') {\n let prevKey = lastNode.prevKey;\n newCollection.removeNode(lastNode.key);\n if (prevKey != null) {\n lastNode = newCollection.getItem(prevKey);\n lastNode.nextKey = null;\n } else lastNode = null;\n }\n return [\n firstNode?.key ?? null,\n lastNode?.key ?? null\n ];\n}\n\n\nexport {$6f0c29017aeec335$export$d68d59712b04d9d1 as CollectionNode, $6f0c29017aeec335$export$b1918e978f1ee46f as FilterableNode, $6f0c29017aeec335$export$5ae2504e948afce5 as HeaderNode, $6f0c29017aeec335$export$8258a0665a675899 as LoaderNode, $6f0c29017aeec335$export$fd11f34e1d07f134 as ItemNode, $6f0c29017aeec335$export$437f11dc9b403b78 as SectionNode, $6f0c29017aeec335$export$408d25a4e12db025 as BaseCollection};\n//# sourceMappingURL=BaseCollection.mjs.map\n"],"ignoreList":[0],"mappings":"AAUI,IAAMA,EAAN,KAAgD,CAChD,YAAY,EAAI,CACZ,KAAK,MAAQ,KACb,KAAK,MAAQ,EACb,KAAK,cAAgB,GACrB,KAAK,SAAW,KAChB,KAAK,UAAY,GACjB,KAAK,cAAgB,IAAA,GACrB,KAAK,MAAQ,EACb,KAAK,UAAY,KACjB,KAAK,QAAU,KACf,KAAK,QAAU,KACf,KAAK,cAAgB,KACrB,KAAK,aAAe,KACpB,KAAK,MAAQ,CAAC,EACd,KAAK,QAAU,KACf,KAAK,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GAAG,EACjCE,GAAW,KAGR,EAAW,MAFd,EAAWxB,EAAc,QAAQwB,CAAO,EACxC,EAAS,QAAU,KAE3B,CACA,MAAO,CACHH,GAAW,KAAO,KAClBC,GAAU,KAAO,IACrB,CACJ,C"}
|
|
1
|
+
{"version":3,"file":"lyra4.cjs","names":["$6f0c29017aeec335$export$d68d59712b04d9d1","key","node","clone","newCollection","collection","$6f0c29017aeec335$export$b1918e978f1ee46f","firstKey","lastKey","$6f0c29017aeec335$var$filterChildren","filterFn","newNode","$6f0c29017aeec335$export$5ae2504e948afce5","$6f0c29017aeec335$export$8258a0665a675899","$6f0c29017aeec335$export$fd11f34e1d07f134","$6f0c29017aeec335$export$437f11dc9b403b78","filteredSection","lastChild","$6f0c29017aeec335$export$408d25a4e12db025","keyMap","parent","Constructor","children","oldCollection","child","isSSR","firstChildKey","firstNode","lastNode","currentNode","prevKey"],"sources":["../node_modules/react-aria/dist/private/collections/BaseCollection.mjs"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ class $6f0c29017aeec335$export$d68d59712b04d9d1 {\n constructor(key){\n this.value = null;\n this.level = 0;\n this.hasChildNodes = false;\n this.rendered = null;\n this.textValue = '';\n this['aria-label'] = undefined;\n this.index = 0;\n this.parentKey = null;\n this.prevKey = null;\n this.nextKey = null;\n this.firstChildKey = null;\n this.lastChildKey = null;\n this.props = {};\n this.colSpan = null;\n this.colIndex = null;\n this.type = this.constructor.type;\n this.key = key;\n }\n get childNodes() {\n throw new Error('childNodes is not supported');\n }\n clone() {\n let node = new this.constructor(this.key);\n node.value = this.value;\n node.level = this.level;\n node.hasChildNodes = this.hasChildNodes;\n node.rendered = this.rendered;\n node.textValue = this.textValue;\n node['aria-label'] = this['aria-label'];\n node.index = this.index;\n node.parentKey = this.parentKey;\n node.prevKey = this.prevKey;\n node.nextKey = this.nextKey;\n node.firstChildKey = this.firstChildKey;\n node.lastChildKey = this.lastChildKey;\n node.props = this.props;\n node.render = this.render;\n node.colSpan = this.colSpan;\n node.colIndex = this.colIndex;\n return node;\n }\n filter(collection, newCollection, // eslint-disable-next-line @typescript-eslint/no-unused-vars\n filterFn) {\n let clone = this.clone();\n newCollection.addDescendants(clone, collection);\n return clone;\n }\n}\nclass $6f0c29017aeec335$export$b1918e978f1ee46f extends $6f0c29017aeec335$export$d68d59712b04d9d1 {\n filter(collection, newCollection, filterFn) {\n let [firstKey, lastKey] = $6f0c29017aeec335$var$filterChildren(collection, newCollection, this.firstChildKey, filterFn);\n let newNode = this.clone();\n newNode.firstChildKey = firstKey;\n newNode.lastChildKey = lastKey;\n return newNode;\n }\n}\nclass $6f0c29017aeec335$export$5ae2504e948afce5 extends $6f0c29017aeec335$export$d68d59712b04d9d1 {\n static{\n this.type = 'header';\n }\n}\nclass $6f0c29017aeec335$export$8258a0665a675899 extends $6f0c29017aeec335$export$d68d59712b04d9d1 {\n static{\n this.type = 'loader';\n }\n}\nclass $6f0c29017aeec335$export$fd11f34e1d07f134 extends $6f0c29017aeec335$export$b1918e978f1ee46f {\n static{\n this.type = 'item';\n }\n filter(collection, newCollection, filterFn) {\n if (filterFn(this.textValue, this)) {\n let clone = this.clone();\n newCollection.addDescendants(clone, collection);\n return clone;\n }\n return null;\n }\n}\nclass $6f0c29017aeec335$export$437f11dc9b403b78 extends $6f0c29017aeec335$export$b1918e978f1ee46f {\n static{\n this.type = 'section';\n }\n filter(collection, newCollection, filterFn) {\n let filteredSection = super.filter(collection, newCollection, filterFn);\n if (filteredSection) {\n if (filteredSection.lastChildKey !== null) {\n let lastChild = collection.getItem(filteredSection.lastChildKey);\n if (lastChild && lastChild.type !== 'header') return filteredSection;\n }\n }\n return null;\n }\n}\nclass $6f0c29017aeec335$export$408d25a4e12db025 {\n get size() {\n return this.itemCount;\n }\n getKeys() {\n return this.keyMap.keys();\n }\n *[Symbol.iterator]() {\n let node = this.firstKey != null ? this.keyMap.get(this.firstKey) : undefined;\n while(node){\n yield node;\n node = node.nextKey != null ? this.keyMap.get(node.nextKey) : undefined;\n }\n }\n getChildren(key) {\n let keyMap = this.keyMap;\n return {\n *[Symbol.iterator] () {\n let parent = keyMap.get(key);\n let node = parent?.firstChildKey != null ? keyMap.get(parent.firstChildKey) : null;\n while(node){\n yield node;\n node = node.nextKey != null ? keyMap.get(node.nextKey) : undefined;\n }\n }\n };\n }\n getKeyBefore(key) {\n let node = this.keyMap.get(key);\n if (!node) return null;\n if (node.prevKey != null) {\n node = this.keyMap.get(node.prevKey);\n while(node && node.type !== 'item' && node.lastChildKey != null)node = this.keyMap.get(node.lastChildKey);\n return node?.key ?? null;\n }\n return node.parentKey;\n }\n getKeyAfter(key) {\n let node = this.keyMap.get(key);\n if (!node) return null;\n if (node.type !== 'item' && node.firstChildKey != null) return node.firstChildKey;\n while(node){\n if (node.nextKey != null) return node.nextKey;\n if (node.parentKey != null) node = this.keyMap.get(node.parentKey);\n else return null;\n }\n return null;\n }\n getFirstKey() {\n return this.firstKey;\n }\n getLastKey() {\n let node = this.lastKey != null ? this.keyMap.get(this.lastKey) : null;\n while(node?.lastChildKey != null)node = this.keyMap.get(node.lastChildKey);\n return node?.key ?? null;\n }\n getItem(key) {\n return this.keyMap.get(key) ?? null;\n }\n at() {\n throw new Error('Not implemented');\n }\n clone() {\n // We need to clone using this.constructor so that subclasses have the right prototype.\n // TypeScript isn't happy about this yet.\n // https://github.com/microsoft/TypeScript/issues/3841\n let Constructor = this.constructor;\n let collection = new Constructor();\n collection.keyMap = new Map(this.keyMap);\n collection.firstKey = this.firstKey;\n collection.lastKey = this.lastKey;\n collection.itemCount = this.itemCount;\n return collection;\n }\n addNode(node) {\n if (this.frozen) throw new Error('Cannot add a node to a frozen collection');\n if (node.type === 'item' && this.keyMap.get(node.key) == null) this.itemCount++;\n this.keyMap.set(node.key, node);\n }\n // Deeply add a node and its children to the collection from another collection, primarily used when filtering a collection\n addDescendants(node, oldCollection) {\n this.addNode(node);\n let children = oldCollection.getChildren(node.key);\n for (let child of children)this.addDescendants(child, oldCollection);\n }\n removeNode(key) {\n if (this.frozen) throw new Error('Cannot remove a node to a frozen collection');\n let node = this.keyMap.get(key);\n if (node != null && node.type === 'item') this.itemCount--;\n this.keyMap.delete(key);\n }\n commit(firstKey, lastKey, isSSR = false) {\n if (this.frozen) throw new Error('Cannot commit a frozen collection');\n this.firstKey = firstKey;\n this.lastKey = lastKey;\n this.frozen = !isSSR;\n }\n filter(filterFn) {\n let newCollection = new this.constructor();\n let [firstKey, lastKey] = $6f0c29017aeec335$var$filterChildren(this, newCollection, this.firstKey, filterFn);\n newCollection?.commit(firstKey, lastKey);\n return newCollection;\n }\n constructor(){\n this.keyMap = new Map();\n this.firstKey = null;\n this.lastKey = null;\n this.frozen = false;\n this.itemCount = 0;\n }\n}\nfunction $6f0c29017aeec335$var$filterChildren(collection, newCollection, firstChildKey, filterFn) {\n // loop over the siblings for firstChildKey\n // create new nodes based on calling node.filter for each child\n // if it returns null then don't include it, otherwise update its prev/next keys\n // add them to the newCollection\n if (firstChildKey == null) return [\n null,\n null\n ];\n let firstNode = null;\n let lastNode = null;\n let currentNode = collection.getItem(firstChildKey);\n while(currentNode != null){\n let newNode = currentNode.filter(collection, newCollection, filterFn);\n if (newNode != null) {\n newNode.nextKey = null;\n if (lastNode) {\n newNode.prevKey = lastNode.key;\n lastNode.nextKey = newNode.key;\n }\n if (firstNode == null) firstNode = newNode;\n newCollection.addNode(newNode);\n lastNode = newNode;\n }\n currentNode = currentNode.nextKey != null ? collection.getItem(currentNode.nextKey) : null;\n }\n // TODO: this is pretty specific to dividers but doesn't feel like there is a good way to get around it since we only can know\n // to filter the last separator in a collection only after performing a filter for the rest of the contents after it\n // Its gross that it needs to live here, might be nice if somehow we could have this live in the separator code\n if (lastNode && lastNode.type === 'separator') {\n let prevKey = lastNode.prevKey;\n newCollection.removeNode(lastNode.key);\n if (prevKey != null) {\n lastNode = newCollection.getItem(prevKey);\n lastNode.nextKey = null;\n } else lastNode = null;\n }\n return [\n firstNode?.key ?? null,\n lastNode?.key ?? null\n ];\n}\n\n\nexport {$6f0c29017aeec335$export$d68d59712b04d9d1 as CollectionNode, $6f0c29017aeec335$export$b1918e978f1ee46f as FilterableNode, $6f0c29017aeec335$export$5ae2504e948afce5 as HeaderNode, $6f0c29017aeec335$export$8258a0665a675899 as LoaderNode, $6f0c29017aeec335$export$fd11f34e1d07f134 as ItemNode, $6f0c29017aeec335$export$437f11dc9b403b78 as SectionNode, $6f0c29017aeec335$export$408d25a4e12db025 as BaseCollection};\n//# sourceMappingURL=BaseCollection.mjs.map\n"],"ignoreList":[0],"mappings":"AAUI,IAAMA,EAAN,KAAgD,CAChD,YAAY,EAAI,CACZ,KAAK,MAAQ,KACb,KAAK,MAAQ,EACb,KAAK,cAAgB,GACrB,KAAK,SAAW,KAChB,KAAK,UAAY,GACjB,KAAK,cAAgB,IAAA,GACrB,KAAK,MAAQ,EACb,KAAK,UAAY,KACjB,KAAK,QAAU,KACf,KAAK,QAAU,KACf,KAAK,cAAgB,KACrB,KAAK,aAAe,KACpB,KAAK,MAAQ,CAAC,EACd,KAAK,QAAU,KACf,KAAK,SAAW,KAChB,KAAK,KAAO,KAAK,YAAY,KAC7B,KAAK,IAAMC,CACf,CACA,IAAI,YAAa,CACb,MAAU,MAAM,6BAA6B,CACjD,CACA,OAAQ,CACJ,IAAIC,EAAO,IAAI,KAAK,YAAY,KAAK,GAAG,EAiBxC,MAhBA,GAAK,MAAQ,KAAK,MAClB,EAAK,MAAQ,KAAK,MAClB,EAAK,cAAgB,KAAK,cAC1B,EAAK,SAAW,KAAK,SACrB,EAAK,UAAY,KAAK,UACtB,EAAK,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, i] =
|
|
20
|
-
return
|
|
19
|
+
let [r, i] = s(e, t, this.firstChildKey, n), a = this.clone();
|
|
20
|
+
return a.firstChildKey = r, a.lastChildKey = i, a;
|
|
21
21
|
}
|
|
22
|
-
}
|
|
23
|
-
(class extends e {
|
|
22
|
+
}, n = class extends e {
|
|
24
23
|
static {
|
|
25
24
|
this.type = "header";
|
|
26
25
|
}
|
|
27
|
-
}
|
|
28
|
-
var n = class extends e {
|
|
26
|
+
}, r = class extends e {
|
|
29
27
|
static {
|
|
30
28
|
this.type = "loader";
|
|
31
29
|
}
|
|
32
|
-
},
|
|
30
|
+
}, i = class extends t {
|
|
33
31
|
static {
|
|
34
32
|
this.type = "item";
|
|
35
33
|
}
|
|
@@ -40,8 +38,7 @@ var n = class extends e {
|
|
|
40
38
|
}
|
|
41
39
|
return null;
|
|
42
40
|
}
|
|
43
|
-
}
|
|
44
|
-
(class extends t {
|
|
41
|
+
}, a = class extends t {
|
|
45
42
|
static {
|
|
46
43
|
this.type = "section";
|
|
47
44
|
}
|
|
@@ -53,8 +50,7 @@ var n = class extends e {
|
|
|
53
50
|
}
|
|
54
51
|
return null;
|
|
55
52
|
}
|
|
56
|
-
}
|
|
57
|
-
var i = class {
|
|
53
|
+
}, o = class {
|
|
58
54
|
get size() {
|
|
59
55
|
return this.itemCount;
|
|
60
56
|
}
|
|
@@ -129,14 +125,14 @@ var i = class {
|
|
|
129
125
|
this.firstKey = e, this.lastKey = t, this.frozen = !n;
|
|
130
126
|
}
|
|
131
127
|
filter(e) {
|
|
132
|
-
let t = new this.constructor(), [n, r] =
|
|
128
|
+
let t = new this.constructor(), [n, r] = s(this, t, this.firstKey, e);
|
|
133
129
|
return t?.commit(n, r), t;
|
|
134
130
|
}
|
|
135
131
|
constructor() {
|
|
136
132
|
this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.frozen = !1, this.itemCount = 0;
|
|
137
133
|
}
|
|
138
134
|
};
|
|
139
|
-
function
|
|
135
|
+
function s(e, t, n, r) {
|
|
140
136
|
if (n == null) return [null, null];
|
|
141
137
|
let i = null, a = null, o = e.getItem(n);
|
|
142
138
|
for (; o != null;) {
|
|
@@ -149,4 +145,4 @@ function a(e, t, n, r) {
|
|
|
149
145
|
}
|
|
150
146
|
return [i?.key ?? null, a?.key ?? null];
|
|
151
147
|
}
|
|
152
|
-
export {
|
|
148
|
+
export { o as BaseCollection, e as CollectionNode, t as FilterableNode, n as HeaderNode, i as ItemNode, r as LoaderNode, a as SectionNode };
|
package/dist/lyra4.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lyra4.js","names":["$6f0c29017aeec335$export$d68d59712b04d9d1","key","node","clone","newCollection","collection","$6f0c29017aeec335$export$b1918e978f1ee46f","firstKey","lastKey","$6f0c29017aeec335$var$filterChildren","filterFn","newNode","$6f0c29017aeec335$export$8258a0665a675899","$6f0c29017aeec335$export$fd11f34e1d07f134","filteredSection","lastChild","$6f0c29017aeec335$export$408d25a4e12db025","keyMap","parent","Constructor","children","oldCollection","child","isSSR","firstChildKey","firstNode","lastNode","currentNode","prevKey"],"sources":["../node_modules/react-aria/dist/private/collections/BaseCollection.mjs"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ class $6f0c29017aeec335$export$d68d59712b04d9d1 {\n constructor(key){\n this.value = null;\n this.level = 0;\n this.hasChildNodes = false;\n this.rendered = null;\n this.textValue = '';\n this['aria-label'] = undefined;\n this.index = 0;\n this.parentKey = null;\n this.prevKey = null;\n this.nextKey = null;\n this.firstChildKey = null;\n this.lastChildKey = null;\n this.props = {};\n this.colSpan = null;\n this.colIndex = null;\n this.type = this.constructor.type;\n this.key = key;\n }\n get childNodes() {\n throw new Error('childNodes is not supported');\n }\n clone() {\n let node = new this.constructor(this.key);\n node.value = this.value;\n node.level = this.level;\n node.hasChildNodes = this.hasChildNodes;\n node.rendered = this.rendered;\n node.textValue = this.textValue;\n node['aria-label'] = this['aria-label'];\n node.index = this.index;\n node.parentKey = this.parentKey;\n node.prevKey = this.prevKey;\n node.nextKey = this.nextKey;\n node.firstChildKey = this.firstChildKey;\n node.lastChildKey = this.lastChildKey;\n node.props = this.props;\n node.render = this.render;\n node.colSpan = this.colSpan;\n node.colIndex = this.colIndex;\n return node;\n }\n filter(collection, newCollection, // eslint-disable-next-line @typescript-eslint/no-unused-vars\n filterFn) {\n let clone = this.clone();\n newCollection.addDescendants(clone, collection);\n return clone;\n }\n}\nclass $6f0c29017aeec335$export$b1918e978f1ee46f extends $6f0c29017aeec335$export$d68d59712b04d9d1 {\n filter(collection, newCollection, filterFn) {\n let [firstKey, lastKey] = $6f0c29017aeec335$var$filterChildren(collection, newCollection, this.firstChildKey, filterFn);\n let newNode = this.clone();\n newNode.firstChildKey = firstKey;\n newNode.lastChildKey = lastKey;\n return newNode;\n }\n}\nclass $6f0c29017aeec335$export$5ae2504e948afce5 extends $6f0c29017aeec335$export$d68d59712b04d9d1 {\n static{\n this.type = 'header';\n }\n}\nclass $6f0c29017aeec335$export$8258a0665a675899 extends $6f0c29017aeec335$export$d68d59712b04d9d1 {\n static{\n this.type = 'loader';\n }\n}\nclass $6f0c29017aeec335$export$fd11f34e1d07f134 extends $6f0c29017aeec335$export$b1918e978f1ee46f {\n static{\n this.type = 'item';\n }\n filter(collection, newCollection, filterFn) {\n if (filterFn(this.textValue, this)) {\n let clone = this.clone();\n newCollection.addDescendants(clone, collection);\n return clone;\n }\n return null;\n }\n}\nclass $6f0c29017aeec335$export$437f11dc9b403b78 extends $6f0c29017aeec335$export$b1918e978f1ee46f {\n static{\n this.type = 'section';\n }\n filter(collection, newCollection, filterFn) {\n let filteredSection = super.filter(collection, newCollection, filterFn);\n if (filteredSection) {\n if (filteredSection.lastChildKey !== null) {\n let lastChild = collection.getItem(filteredSection.lastChildKey);\n if (lastChild && lastChild.type !== 'header') return filteredSection;\n }\n }\n return null;\n }\n}\nclass $6f0c29017aeec335$export$408d25a4e12db025 {\n get size() {\n return this.itemCount;\n }\n getKeys() {\n return this.keyMap.keys();\n }\n *[Symbol.iterator]() {\n let node = this.firstKey != null ? this.keyMap.get(this.firstKey) : undefined;\n while(node){\n yield node;\n node = node.nextKey != null ? this.keyMap.get(node.nextKey) : undefined;\n }\n }\n getChildren(key) {\n let keyMap = this.keyMap;\n return {\n *[Symbol.iterator] () {\n let parent = keyMap.get(key);\n let node = parent?.firstChildKey != null ? keyMap.get(parent.firstChildKey) : null;\n while(node){\n yield node;\n node = node.nextKey != null ? keyMap.get(node.nextKey) : undefined;\n }\n }\n };\n }\n getKeyBefore(key) {\n let node = this.keyMap.get(key);\n if (!node) return null;\n if (node.prevKey != null) {\n node = this.keyMap.get(node.prevKey);\n while(node && node.type !== 'item' && node.lastChildKey != null)node = this.keyMap.get(node.lastChildKey);\n return node?.key ?? null;\n }\n return node.parentKey;\n }\n getKeyAfter(key) {\n let node = this.keyMap.get(key);\n if (!node) return null;\n if (node.type !== 'item' && node.firstChildKey != null) return node.firstChildKey;\n while(node){\n if (node.nextKey != null) return node.nextKey;\n if (node.parentKey != null) node = this.keyMap.get(node.parentKey);\n else return null;\n }\n return null;\n }\n getFirstKey() {\n return this.firstKey;\n }\n getLastKey() {\n let node = this.lastKey != null ? this.keyMap.get(this.lastKey) : null;\n while(node?.lastChildKey != null)node = this.keyMap.get(node.lastChildKey);\n return node?.key ?? null;\n }\n getItem(key) {\n return this.keyMap.get(key) ?? null;\n }\n at() {\n throw new Error('Not implemented');\n }\n clone() {\n // We need to clone using this.constructor so that subclasses have the right prototype.\n // TypeScript isn't happy about this yet.\n // https://github.com/microsoft/TypeScript/issues/3841\n let Constructor = this.constructor;\n let collection = new Constructor();\n collection.keyMap = new Map(this.keyMap);\n collection.firstKey = this.firstKey;\n collection.lastKey = this.lastKey;\n collection.itemCount = this.itemCount;\n return collection;\n }\n addNode(node) {\n if (this.frozen) throw new Error('Cannot add a node to a frozen collection');\n if (node.type === 'item' && this.keyMap.get(node.key) == null) this.itemCount++;\n this.keyMap.set(node.key, node);\n }\n // Deeply add a node and its children to the collection from another collection, primarily used when filtering a collection\n addDescendants(node, oldCollection) {\n this.addNode(node);\n let children = oldCollection.getChildren(node.key);\n for (let child of children)this.addDescendants(child, oldCollection);\n }\n removeNode(key) {\n if (this.frozen) throw new Error('Cannot remove a node to a frozen collection');\n let node = this.keyMap.get(key);\n if (node != null && node.type === 'item') this.itemCount--;\n this.keyMap.delete(key);\n }\n commit(firstKey, lastKey, isSSR = false) {\n if (this.frozen) throw new Error('Cannot commit a frozen collection');\n this.firstKey = firstKey;\n this.lastKey = lastKey;\n this.frozen = !isSSR;\n }\n filter(filterFn) {\n let newCollection = new this.constructor();\n let [firstKey, lastKey] = $6f0c29017aeec335$var$filterChildren(this, newCollection, this.firstKey, filterFn);\n newCollection?.commit(firstKey, lastKey);\n return newCollection;\n }\n constructor(){\n this.keyMap = new Map();\n this.firstKey = null;\n this.lastKey = null;\n this.frozen = false;\n this.itemCount = 0;\n }\n}\nfunction $6f0c29017aeec335$var$filterChildren(collection, newCollection, firstChildKey, filterFn) {\n // loop over the siblings for firstChildKey\n // create new nodes based on calling node.filter for each child\n // if it returns null then don't include it, otherwise update its prev/next keys\n // add them to the newCollection\n if (firstChildKey == null) return [\n null,\n null\n ];\n let firstNode = null;\n let lastNode = null;\n let currentNode = collection.getItem(firstChildKey);\n while(currentNode != null){\n let newNode = currentNode.filter(collection, newCollection, filterFn);\n if (newNode != null) {\n newNode.nextKey = null;\n if (lastNode) {\n newNode.prevKey = lastNode.key;\n lastNode.nextKey = newNode.key;\n }\n if (firstNode == null) firstNode = newNode;\n newCollection.addNode(newNode);\n lastNode = newNode;\n }\n currentNode = currentNode.nextKey != null ? collection.getItem(currentNode.nextKey) : null;\n }\n // TODO: this is pretty specific to dividers but doesn't feel like there is a good way to get around it since we only can know\n // to filter the last separator in a collection only after performing a filter for the rest of the contents after it\n // Its gross that it needs to live here, might be nice if somehow we could have this live in the separator code\n if (lastNode && lastNode.type === 'separator') {\n let prevKey = lastNode.prevKey;\n newCollection.removeNode(lastNode.key);\n if (prevKey != null) {\n lastNode = newCollection.getItem(prevKey);\n lastNode.nextKey = null;\n } else lastNode = null;\n }\n return [\n firstNode?.key ?? null,\n lastNode?.key ?? null\n ];\n}\n\n\nexport {$6f0c29017aeec335$export$d68d59712b04d9d1 as CollectionNode, $6f0c29017aeec335$export$b1918e978f1ee46f as FilterableNode, $6f0c29017aeec335$export$5ae2504e948afce5 as HeaderNode, $6f0c29017aeec335$export$8258a0665a675899 as LoaderNode, $6f0c29017aeec335$export$fd11f34e1d07f134 as ItemNode, $6f0c29017aeec335$export$437f11dc9b403b78 as SectionNode, $6f0c29017aeec335$export$408d25a4e12db025 as BaseCollection};\n//# sourceMappingURL=BaseCollection.mjs.map\n"],"ignoreList":[0],"mappings":";AAUI,IAAMA,IAAN,MAAgD;CAChD,YAAY,GAAI;EAiBZ,AAhBA,KAAK,QAAQ,MACb,KAAK,QAAQ,GACb,KAAK,gBAAgB,IACrB,KAAK,WAAW,MAChB,KAAK,YAAY,IACjB,KAAK,gBAAgB,KAAA,GACrB,KAAK,QAAQ,GACb,KAAK,YAAY,MACjB,KAAK,UAAU,MACf,KAAK,UAAU,MACf,KAAK,gBAAgB,MACrB,KAAK,eAAe,MACpB,KAAK,QAAQ,CAAC,GACd,KAAK,UAAU,MACf,KAAK,WAAW,MAChB,KAAK,OAAO,KAAK,YAAY,MAC7B,KAAK,MAAMC;CACf;CACA,IAAI,aAAa;EACb,MAAU,MAAM,6BAA6B;CACjD;CACA,QAAQ;EACJ,IAAIC,IAAO,IAAI,KAAK,YAAY,K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AAU;CAE3B;CACA,OAAO,CACHH,GAAW,OAAO,MAClBC,GAAU,OAAO,IACrB;AACJ"}
|
|
1
|
+
{"version":3,"file":"lyra4.js","names":["$6f0c29017aeec335$export$d68d59712b04d9d1","key","node","clone","newCollection","collection","$6f0c29017aeec335$export$b1918e978f1ee46f","firstKey","lastKey","$6f0c29017aeec335$var$filterChildren","filterFn","newNode","$6f0c29017aeec335$export$5ae2504e948afce5","$6f0c29017aeec335$export$8258a0665a675899","$6f0c29017aeec335$export$fd11f34e1d07f134","$6f0c29017aeec335$export$437f11dc9b403b78","filteredSection","lastChild","$6f0c29017aeec335$export$408d25a4e12db025","keyMap","parent","Constructor","children","oldCollection","child","isSSR","firstChildKey","firstNode","lastNode","currentNode","prevKey"],"sources":["../node_modules/react-aria/dist/private/collections/BaseCollection.mjs"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ class $6f0c29017aeec335$export$d68d59712b04d9d1 {\n constructor(key){\n this.value = null;\n this.level = 0;\n this.hasChildNodes = false;\n this.rendered = null;\n this.textValue = '';\n this['aria-label'] = undefined;\n this.index = 0;\n this.parentKey = null;\n this.prevKey = null;\n this.nextKey = null;\n this.firstChildKey = null;\n this.lastChildKey = null;\n this.props = {};\n this.colSpan = null;\n this.colIndex = null;\n this.type = this.constructor.type;\n this.key = key;\n }\n get childNodes() {\n throw new Error('childNodes is not supported');\n }\n clone() {\n let node = new this.constructor(this.key);\n node.value = this.value;\n node.level = this.level;\n node.hasChildNodes = this.hasChildNodes;\n node.rendered = this.rendered;\n node.textValue = this.textValue;\n node['aria-label'] = this['aria-label'];\n node.index = this.index;\n node.parentKey = this.parentKey;\n node.prevKey = this.prevKey;\n node.nextKey = this.nextKey;\n node.firstChildKey = this.firstChildKey;\n node.lastChildKey = this.lastChildKey;\n node.props = this.props;\n node.render = this.render;\n node.colSpan = this.colSpan;\n node.colIndex = this.colIndex;\n return node;\n }\n filter(collection, newCollection, // eslint-disable-next-line @typescript-eslint/no-unused-vars\n filterFn) {\n let clone = this.clone();\n newCollection.addDescendants(clone, collection);\n return clone;\n }\n}\nclass $6f0c29017aeec335$export$b1918e978f1ee46f extends $6f0c29017aeec335$export$d68d59712b04d9d1 {\n filter(collection, newCollection, filterFn) {\n let [firstKey, lastKey] = $6f0c29017aeec335$var$filterChildren(collection, newCollection, this.firstChildKey, filterFn);\n let newNode = this.clone();\n newNode.firstChildKey = firstKey;\n newNode.lastChildKey = lastKey;\n return newNode;\n }\n}\nclass $6f0c29017aeec335$export$5ae2504e948afce5 extends $6f0c29017aeec335$export$d68d59712b04d9d1 {\n static{\n this.type = 'header';\n }\n}\nclass $6f0c29017aeec335$export$8258a0665a675899 extends $6f0c29017aeec335$export$d68d59712b04d9d1 {\n static{\n this.type = 'loader';\n }\n}\nclass $6f0c29017aeec335$export$fd11f34e1d07f134 extends $6f0c29017aeec335$export$b1918e978f1ee46f {\n static{\n this.type = 'item';\n }\n filter(collection, newCollection, filterFn) {\n if (filterFn(this.textValue, this)) {\n let clone = this.clone();\n newCollection.addDescendants(clone, collection);\n return clone;\n }\n return null;\n }\n}\nclass $6f0c29017aeec335$export$437f11dc9b403b78 extends $6f0c29017aeec335$export$b1918e978f1ee46f {\n static{\n this.type = 'section';\n }\n filter(collection, newCollection, filterFn) {\n let filteredSection = super.filter(collection, newCollection, filterFn);\n if (filteredSection) {\n if (filteredSection.lastChildKey !== null) {\n let lastChild = collection.getItem(filteredSection.lastChildKey);\n if (lastChild && lastChild.type !== 'header') return filteredSection;\n }\n }\n return null;\n }\n}\nclass $6f0c29017aeec335$export$408d25a4e12db025 {\n get size() {\n return this.itemCount;\n }\n getKeys() {\n return this.keyMap.keys();\n }\n *[Symbol.iterator]() {\n let node = this.firstKey != null ? this.keyMap.get(this.firstKey) : undefined;\n while(node){\n yield node;\n node = node.nextKey != null ? this.keyMap.get(node.nextKey) : undefined;\n }\n }\n getChildren(key) {\n let keyMap = this.keyMap;\n return {\n *[Symbol.iterator] () {\n let parent = keyMap.get(key);\n let node = parent?.firstChildKey != null ? keyMap.get(parent.firstChildKey) : null;\n while(node){\n yield node;\n node = node.nextKey != null ? keyMap.get(node.nextKey) : undefined;\n }\n }\n };\n }\n getKeyBefore(key) {\n let node = this.keyMap.get(key);\n if (!node) return null;\n if (node.prevKey != null) {\n node = this.keyMap.get(node.prevKey);\n while(node && node.type !== 'item' && node.lastChildKey != null)node = this.keyMap.get(node.lastChildKey);\n return node?.key ?? null;\n }\n return node.parentKey;\n }\n getKeyAfter(key) {\n let node = this.keyMap.get(key);\n if (!node) return null;\n if (node.type !== 'item' && node.firstChildKey != null) return node.firstChildKey;\n while(node){\n if (node.nextKey != null) return node.nextKey;\n if (node.parentKey != null) node = this.keyMap.get(node.parentKey);\n else return null;\n }\n return null;\n }\n getFirstKey() {\n return this.firstKey;\n }\n getLastKey() {\n let node = this.lastKey != null ? this.keyMap.get(this.lastKey) : null;\n while(node?.lastChildKey != null)node = this.keyMap.get(node.lastChildKey);\n return node?.key ?? null;\n }\n getItem(key) {\n return this.keyMap.get(key) ?? null;\n }\n at() {\n throw new Error('Not implemented');\n }\n clone() {\n // We need to clone using this.constructor so that subclasses have the right prototype.\n // TypeScript isn't happy about this yet.\n // https://github.com/microsoft/TypeScript/issues/3841\n let Constructor = this.constructor;\n let collection = new Constructor();\n collection.keyMap = new Map(this.keyMap);\n collection.firstKey = this.firstKey;\n collection.lastKey = this.lastKey;\n collection.itemCount = this.itemCount;\n return collection;\n }\n addNode(node) {\n if (this.frozen) throw new Error('Cannot add a node to a frozen collection');\n if (node.type === 'item' && this.keyMap.get(node.key) == null) this.itemCount++;\n this.keyMap.set(node.key, node);\n }\n // Deeply add a node and its children to the collection from another collection, primarily used when filtering a collection\n addDescendants(node, oldCollection) {\n this.addNode(node);\n let children = oldCollection.getChildren(node.key);\n for (let child of children)this.addDescendants(child, oldCollection);\n }\n removeNode(key) {\n if (this.frozen) throw new Error('Cannot remove a node to a frozen collection');\n let node = this.keyMap.get(key);\n if (node != null && node.type === 'item') this.itemCount--;\n this.keyMap.delete(key);\n }\n commit(firstKey, lastKey, isSSR = false) {\n if (this.frozen) throw new Error('Cannot commit a frozen collection');\n this.firstKey = firstKey;\n this.lastKey = lastKey;\n this.frozen = !isSSR;\n }\n filter(filterFn) {\n let newCollection = new this.constructor();\n let [firstKey, lastKey] = $6f0c29017aeec335$var$filterChildren(this, newCollection, this.firstKey, filterFn);\n newCollection?.commit(firstKey, lastKey);\n return newCollection;\n }\n constructor(){\n this.keyMap = new Map();\n this.firstKey = null;\n this.lastKey = null;\n this.frozen = false;\n this.itemCount = 0;\n }\n}\nfunction $6f0c29017aeec335$var$filterChildren(collection, newCollection, firstChildKey, filterFn) {\n // loop over the siblings for firstChildKey\n // create new nodes based on calling node.filter for each child\n // if it returns null then don't include it, otherwise update its prev/next keys\n // add them to the newCollection\n if (firstChildKey == null) return [\n null,\n null\n ];\n let firstNode = null;\n let lastNode = null;\n let currentNode = collection.getItem(firstChildKey);\n while(currentNode != null){\n let newNode = currentNode.filter(collection, newCollection, filterFn);\n if (newNode != null) {\n newNode.nextKey = null;\n if (lastNode) {\n newNode.prevKey = lastNode.key;\n lastNode.nextKey = newNode.key;\n }\n if (firstNode == null) firstNode = newNode;\n newCollection.addNode(newNode);\n lastNode = newNode;\n }\n currentNode = currentNode.nextKey != null ? collection.getItem(currentNode.nextKey) : null;\n }\n // TODO: this is pretty specific to dividers but doesn't feel like there is a good way to get around it since we only can know\n // to filter the last separator in a collection only after performing a filter for the rest of the contents after it\n // Its gross that it needs to live here, might be nice if somehow we could have this live in the separator code\n if (lastNode && lastNode.type === 'separator') {\n let prevKey = lastNode.prevKey;\n newCollection.removeNode(lastNode.key);\n if (prevKey != null) {\n lastNode = newCollection.getItem(prevKey);\n lastNode.nextKey = null;\n } else lastNode = null;\n }\n return [\n firstNode?.key ?? null,\n lastNode?.key ?? null\n ];\n}\n\n\nexport {$6f0c29017aeec335$export$d68d59712b04d9d1 as CollectionNode, $6f0c29017aeec335$export$b1918e978f1ee46f as FilterableNode, $6f0c29017aeec335$export$5ae2504e948afce5 as HeaderNode, $6f0c29017aeec335$export$8258a0665a675899 as LoaderNode, $6f0c29017aeec335$export$fd11f34e1d07f134 as ItemNode, $6f0c29017aeec335$export$437f11dc9b403b78 as SectionNode, $6f0c29017aeec335$export$408d25a4e12db025 as BaseCollection};\n//# sourceMappingURL=BaseCollection.mjs.map\n"],"ignoreList":[0],"mappings":";AAUI,IAAMA,IAAN,MAAgD;CAChD,YAAY,GAAI;EAiBZ,AAhBA,KAAK,QAAQ,MACb,KAAK,QAAQ,GACb,KAAK,gBAAgB,IACrB,KAAK,WAAW,MAChB,KAAK,YAAY,IACjB,KAAK,gBAAgB,KAAA,GACrB,KAAK,QAAQ,GACb,KAAK,YAAY,MACjB,KAAK,UAAU,MACf,KAAK,UAAU,MACf,KAAK,gBAAgB,MACrB,KAAK,eAAe,MACpB,KAAK,QAAQ,CAAC,GACd,KAAK,UAAU,MACf,KAAK,WAAW,MAChB,KAAK,OAAO,KAAK,YAAY,MAC7B,KAAK,MAAMC;CACf;CACA,IAAI,aAAa;EACb,MAAU,MAAM,6BAA6B;CACjD;CACA,QAAQ;EACJ,IAAIC,IAAO,IAAI,KAAK,YAAY,KAAK,GAAG;EAiBxC,OAhBA,EAAK,QAAQ,KAAK,OAClB,EAAK,QAAQ,KAAK,OAClB,EAAK,gBAAgB,KAAK,eAC1B,EAAK,WAAW,KAAK,UACrB,EAAK,YAAY,KAAK,WACtB,EAAK,gBAAgB,KAAK,eAC1B,EAAK,QAAQ,KAAK,OAClB,EAAK,YAAY,KAAK,WACtB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
function k(e) {
|
|
76
|
+
function k(e, t, n = A) {
|
|
77
|
+
let r = ({ node: e }) => t(e.props, e.props.ref, e), i = u((t, i) => D(e, t, i, null, n(t), (e) => /*#__PURE__*/ c.createElement(r, { node: e })) ?? /*#__PURE__*/ c.createElement(c.Fragment, null));
|
|
78
|
+
return i.displayName = t.name, i;
|
|
79
|
+
}
|
|
80
|
+
function A(e) {
|
|
77
81
|
return r({
|
|
78
82
|
...e,
|
|
79
83
|
addIdAndValue: !0
|
|
80
84
|
});
|
|
81
85
|
}
|
|
82
|
-
var
|
|
83
|
-
function
|
|
84
|
-
let t = f(
|
|
86
|
+
var j = /*#__PURE__*/ l(null);
|
|
87
|
+
function M(e) {
|
|
88
|
+
let t = f(j), n = (t?.dependencies || []).concat(e.dependencies), r = e.idScope ?? t?.idScope, i = A({
|
|
85
89
|
...e,
|
|
86
90
|
idScope: r,
|
|
87
91
|
dependencies: n
|
|
88
92
|
});
|
|
89
|
-
return f(y) && (i = /*#__PURE__*/ c.createElement(
|
|
93
|
+
return f(y) && (i = /*#__PURE__*/ c.createElement(N, null, i)), t = p(() => ({
|
|
90
94
|
dependencies: n,
|
|
91
95
|
idScope: r
|
|
92
|
-
}), [r, ...n]), /*#__PURE__*/ c.createElement(
|
|
96
|
+
}), [r, ...n]), /*#__PURE__*/ c.createElement(j.Provider, { value: t }, i);
|
|
93
97
|
}
|
|
94
|
-
function
|
|
98
|
+
function N({ children: e }) {
|
|
95
99
|
let t = f(y), n = p(() => /*#__PURE__*/ c.createElement(y.Provider, { value: null }, /*#__PURE__*/ c.createElement(v.Provider, { value: !0 }, e)), [e]);
|
|
96
100
|
return i() ? /*#__PURE__*/ c.createElement(T.Provider, { value: t }, n) : /*#__PURE__*/ g(n, t);
|
|
97
101
|
}
|
|
98
|
-
export {
|
|
102
|
+
export { M as Collection, b as CollectionBuilder, k as createBranchComponent, O as createLeafComponent };
|
package/dist/lyra40.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lyra40.js","names":["$kT5Ur$createContext","$kT5Ur$useContext","$kT5Ur$react","$kT5Ur$useRef","$kT5Ur$useCallback","$kT5Ur$useSyncExternalStore","$kT5Ur$useState","$kT5Ur$forwardRef","$kT5Ur$useMemo","$kT5Ur$createPortal","$6f0c29017aeec335$export$408d25a4e12db025","$6f0c29017aeec335$export$d68d59712b04d9d1","$96ead35620b8fd36$export$b34a105447964f9f","$a80bd3e9349588e7$export$727c8fc270210f13","$c7eafbbe1ea5834e$export$535bd6ca7f90a273","$d1116acdf220c2da$export$f9762fab77588ecb","$d7f64c32b702fe2c$export$8dc98ba7eadeaa56","$3ARPR$react","import_shim","require_shim","$42ceafc619f9c3ba$var$ShallowRenderContext","$42ceafc619f9c3ba$var$CollectionDocumentContext","$42ceafc619f9c3ba$export$bf788dd355e3a401","useContext","props","$42ceafc619f9c3ba$var$useCollectionDocument","document","$42ceafc619f9c3ba$var$CollectionInner","render","collection","$42ceafc619f9c3ba$var$useSyncExternalStoreFallback","isSSR","isSSRRef","useRef","getSnapshotWrapper","useCallback","getServerSnapshot","getSnapshot","subscribe","$42ceafc619f9c3ba$var$useSyncExternalStore","\"useSyncExternalStore\"","useState","createCollection","fn","$42ceafc619f9c3ba$var$SSRContext","$42ceafc619f9c3ba$var$createCollectionNodeClass","type","$42ceafc619f9c3ba$var$useSSRCollectionNode","CollectionNodeClass","itemRef","ref","rendered","parentNode","element","children","$42ceafc619f9c3ba$export$18af5c7a9e9b3664","Component","node","Result","forwardRef","focusableProps","$42ceafc619f9c3ba$var$useCollectionChildren","options","$42ceafc619f9c3ba$var$CollectionContext","$42ceafc619f9c3ba$export$fb8073518f34e6ec","ctx","dependencies","idScope","$42ceafc619f9c3ba$var$CollectionRoot","useMemo","doc","wrappedChildren"],"sources":["../node_modules/react-aria/dist/private/collections/CollectionBuilder.mjs"],"sourcesContent":["import {BaseCollection as $6f0c29017aeec335$export$408d25a4e12db025, CollectionNode as $6f0c29017aeec335$export$d68d59712b04d9d1} from \"./BaseCollection.mjs\";\nimport {Document as $96ead35620b8fd36$export$b34a105447964f9f} from \"./Document.mjs\";\nimport {useCachedChildren as $a80bd3e9349588e7$export$727c8fc270210f13} from \"./useCachedChildren.mjs\";\nimport {FocusableContext as $d1116acdf220c2da$export$f9762fab77588ecb} from \"../interactions/useFocusable.mjs\";\nimport {Hidden as $d7f64c32b702fe2c$export$8dc98ba7eadeaa56} from \"./Hidden.mjs\";\nimport {useIsSSR as $c7eafbbe1ea5834e$export$535bd6ca7f90a273} from \"../ssr/SSRProvider.mjs\";\nimport {createPortal as $kT5Ur$createPortal} from \"react-dom\";\nimport $kT5Ur$react, {createContext as $kT5Ur$createContext, useContext as $kT5Ur$useContext, useRef as $kT5Ur$useRef, useCallback as $kT5Ur$useCallback, useState as $kT5Ur$useState, forwardRef as $kT5Ur$forwardRef, useMemo as $kT5Ur$useMemo} from \"react\";\nimport {useSyncExternalStore as $kT5Ur$useSyncExternalStore} from \"use-sync-external-store/shim/index.js\";\n\n/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n\n\n\n\nconst $42ceafc619f9c3ba$var$ShallowRenderContext = /*#__PURE__*/ (0, $kT5Ur$createContext)(false);\nconst $42ceafc619f9c3ba$var$CollectionDocumentContext = /*#__PURE__*/ (0, $kT5Ur$createContext)(null);\nfunction $42ceafc619f9c3ba$export$bf788dd355e3a401(props) {\n // If a document was provided above us, we're already in a hidden tree. Just render the content.\n let doc = (0, $kT5Ur$useContext)($42ceafc619f9c3ba$var$CollectionDocumentContext);\n if (doc) // The React types prior to 18 did not allow returning ReactNode from components\n // even though the actual implementation since React 16 did.\n // We must return ReactElement so that TS does not complain that <CollectionBuilder>\n // is not a valid JSX element with React 16 and 17 types.\n // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/20544\n return props.content;\n // Otherwise, render a hidden copy of the children so that we can build the collection before constructing the state.\n // This should always come before the real DOM content so we have built the collection by the time it renders during SSR.\n // This is fine. CollectionDocumentContext never changes after mounting.\n // oxlint-disable-next-line react/react-compiler, react-hooks/rules-of-hooks\n let { collection: collection, document: document } = $42ceafc619f9c3ba$var$useCollectionDocument(props.createCollection);\n return /*#__PURE__*/ (0, $kT5Ur$react).createElement((0, $kT5Ur$react).Fragment, null, /*#__PURE__*/ (0, $kT5Ur$react).createElement((0, $d7f64c32b702fe2c$export$8dc98ba7eadeaa56), null, /*#__PURE__*/ (0, $kT5Ur$react).createElement($42ceafc619f9c3ba$var$CollectionDocumentContext.Provider, {\n value: document\n }, props.content)), /*#__PURE__*/ (0, $kT5Ur$react).createElement($42ceafc619f9c3ba$var$CollectionInner, {\n render: props.children,\n collection: collection\n }));\n}\nfunction $42ceafc619f9c3ba$var$CollectionInner({ collection: collection, render: render }) {\n return render(collection);\n}\n// React 16 and 17 don't support useSyncExternalStore natively, and the shim provided by React does not support getServerSnapshot.\n// This wrapper uses the shim, but additionally calls getServerSnapshot during SSR (according to SSRProvider).\nfunction $42ceafc619f9c3ba$var$useSyncExternalStoreFallback(subscribe, getSnapshot, getServerSnapshot) {\n let isSSR = (0, $c7eafbbe1ea5834e$export$535bd6ca7f90a273)();\n let isSSRRef = (0, $kT5Ur$useRef)(isSSR);\n // This is read immediately inside the wrapper, which also runs during render.\n // We just need a ref to avoid invalidating the callback itself, which\n // would cause React to re-run the callback more than necessary.\n // eslint-disable-next-line rsp-rules/pure-render\n // oxlint-disable-next-line react/react-compiler, rsp-rules/pure-render\n isSSRRef.current = isSSR;\n let getSnapshotWrapper = (0, $kT5Ur$useCallback)(()=>{\n return isSSRRef.current ? getServerSnapshot() : getSnapshot();\n }, [\n getSnapshot,\n getServerSnapshot\n ]);\n return (0, $kT5Ur$useSyncExternalStore)(subscribe, getSnapshotWrapper);\n}\nconst $42ceafc619f9c3ba$var$useSyncExternalStore = typeof (0, $kT5Ur$react)['useSyncExternalStore'] === 'function' ? (0, $kT5Ur$react)['useSyncExternalStore'] : $42ceafc619f9c3ba$var$useSyncExternalStoreFallback;\nfunction $42ceafc619f9c3ba$var$useCollectionDocument(createCollection) {\n // The document instance is mutable, and should never change between renders.\n // useSyncExternalStore is used to subscribe to updates, which vends immutable Collection objects.\n let [document] = (0, $kT5Ur$useState)(()=>new (0, $96ead35620b8fd36$export$b34a105447964f9f)(createCollection?.() || new (0, $6f0c29017aeec335$export$408d25a4e12db025)()));\n let subscribe = (0, $kT5Ur$useCallback)((fn)=>document.subscribe(fn), [\n document\n ]);\n let getSnapshot = (0, $kT5Ur$useCallback)(()=>{\n let collection = document.getCollection();\n if (document.isSSR) // After SSR is complete, reset the document to empty so it is ready for React to render the portal into.\n // We do this _after_ getting the collection above so that the collection still has content in it from SSR\n // during the current render, before React has finished the client render.\n document.resetAfterSSR();\n return collection;\n }, [\n document\n ]);\n let getServerSnapshot = (0, $kT5Ur$useCallback)(()=>{\n // oxlint-disable-next-line react/react-compiler\n document.isSSR = true;\n return document.getCollection();\n }, [\n document\n ]);\n let collection = $42ceafc619f9c3ba$var$useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n return {\n collection: collection,\n document: document\n };\n}\nconst $42ceafc619f9c3ba$var$SSRContext = /*#__PURE__*/ (0, $kT5Ur$createContext)(null);\nfunction $42ceafc619f9c3ba$var$createCollectionNodeClass(type) {\n let NodeClass = class extends (0, $6f0c29017aeec335$export$d68d59712b04d9d1) {\n static{\n this.type = type;\n }\n };\n return NodeClass;\n}\nfunction $42ceafc619f9c3ba$var$useSSRCollectionNode(CollectionNodeClass, props, ref, rendered, children, render) {\n // To prevent breaking change, if CollectionNodeClass is a string, create a CollectionNodeClass using the string as the type\n if (typeof CollectionNodeClass === 'string') // oxlint-disable-next-line react/react-compiler\n CollectionNodeClass = $42ceafc619f9c3ba$var$createCollectionNodeClass(CollectionNodeClass);\n // During SSR, portals are not supported, so the collection children will be wrapped in an SSRContext.\n // Since SSR occurs only once, we assume that the elements are rendered in order and never re-render.\n // Therefore we can create elements in our collection document during render so that they are in the\n // collection by the time we need to use the collection to render to the real DOM.\n // After hydration, we switch to client rendering using the portal.\n let itemRef = (0, $kT5Ur$useCallback)((element)=>{\n element?.setProps(props, ref, CollectionNodeClass, rendered, render);\n }, [\n props,\n ref,\n rendered,\n render,\n CollectionNodeClass\n ]);\n let parentNode = (0, $kT5Ur$useContext)($42ceafc619f9c3ba$var$SSRContext);\n if (parentNode) {\n // Guard against double rendering in strict mode.\n let element = parentNode.ownerDocument.nodesByProps.get(props);\n if (!element) {\n element = parentNode.ownerDocument.createElement(CollectionNodeClass.type);\n element.setProps(props, ref, CollectionNodeClass, rendered, render);\n parentNode.appendChild(element);\n parentNode.ownerDocument.updateCollection();\n parentNode.ownerDocument.nodesByProps.set(props, element);\n }\n return children ? /*#__PURE__*/ (0, $kT5Ur$react).createElement($42ceafc619f9c3ba$var$SSRContext.Provider, {\n value: element\n }, children) : null;\n }\n // @ts-ignore\n return /*#__PURE__*/ (0, $kT5Ur$react).createElement(CollectionNodeClass.type, {\n ref: itemRef\n }, children);\n}\nfunction $42ceafc619f9c3ba$export$18af5c7a9e9b3664(CollectionNodeClass, render) {\n let Component = ({ node: node })=>render(node.props, node.props.ref, node);\n let Result = (0, $kT5Ur$forwardRef)((props, ref)=>{\n let focusableProps = (0, $kT5Ur$useContext)((0, $d1116acdf220c2da$export$f9762fab77588ecb));\n let isShallow = (0, $kT5Ur$useContext)($42ceafc619f9c3ba$var$ShallowRenderContext);\n if (!isShallow) {\n if (render.length >= 3) throw new Error(render.name + ' cannot be rendered outside a collection.');\n return render(props, ref);\n }\n return $42ceafc619f9c3ba$var$useSSRCollectionNode(CollectionNodeClass, props, ref, 'children' in props ? props.children : null, null, (node)=>// Forward FocusableContext to real DOM tree so tooltips work.\n /*#__PURE__*/ (0, $kT5Ur$react).createElement((0, $d1116acdf220c2da$export$f9762fab77588ecb).Provider, {\n value: focusableProps\n }, /*#__PURE__*/ (0, $kT5Ur$react).createElement(Component, {\n node: node\n })));\n });\n // @ts-ignore\n Result.displayName = render.name;\n return Result;\n}\nfunction $42ceafc619f9c3ba$export$e953bb1cd0f19726(CollectionNodeClass, render, useChildren = $42ceafc619f9c3ba$var$useCollectionChildren) {\n let Component = ({ node: node })=>render(node.props, node.props.ref, node);\n let Result = (0, $kT5Ur$forwardRef)((props, ref)=>{\n let children = useChildren(props);\n return $42ceafc619f9c3ba$var$useSSRCollectionNode(CollectionNodeClass, props, ref, null, children, (node)=>/*#__PURE__*/ (0, $kT5Ur$react).createElement(Component, {\n node: node\n })) ?? /*#__PURE__*/ (0, $kT5Ur$react).createElement((0, $kT5Ur$react).Fragment, null);\n });\n // @ts-ignore\n Result.displayName = render.name;\n return Result;\n}\nfunction $42ceafc619f9c3ba$var$useCollectionChildren(options) {\n return (0, $a80bd3e9349588e7$export$727c8fc270210f13)({\n ...options,\n addIdAndValue: true\n });\n}\nconst $42ceafc619f9c3ba$var$CollectionContext = /*#__PURE__*/ (0, $kT5Ur$createContext)(null);\nfunction $42ceafc619f9c3ba$export$fb8073518f34e6ec(props) {\n let ctx = (0, $kT5Ur$useContext)($42ceafc619f9c3ba$var$CollectionContext);\n let dependencies = (ctx?.dependencies || []).concat(props.dependencies);\n let idScope = props.idScope ?? ctx?.idScope;\n let children = $42ceafc619f9c3ba$var$useCollectionChildren({\n ...props,\n idScope: idScope,\n dependencies: dependencies\n });\n let doc = (0, $kT5Ur$useContext)($42ceafc619f9c3ba$var$CollectionDocumentContext);\n if (doc) children = /*#__PURE__*/ (0, $kT5Ur$react).createElement($42ceafc619f9c3ba$var$CollectionRoot, null, children);\n // Propagate dependencies and idScope to child collections.\n ctx = (0, $kT5Ur$useMemo)(()=>({\n dependencies: // oxlint-disable-next-line react-hooks/exhaustive-deps\n dependencies,\n idScope: idScope\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n // oxlint-disable-next-line react/react-compiler, react-hooks/exhaustive-deps\n [\n idScope,\n ...dependencies\n ]);\n return /*#__PURE__*/ (0, $kT5Ur$react).createElement($42ceafc619f9c3ba$var$CollectionContext.Provider, {\n value: ctx\n }, children);\n}\nfunction $42ceafc619f9c3ba$var$CollectionRoot({ children: children }) {\n let doc = (0, $kT5Ur$useContext)($42ceafc619f9c3ba$var$CollectionDocumentContext);\n let wrappedChildren = (0, $kT5Ur$useMemo)(()=>/*#__PURE__*/ (0, $kT5Ur$react).createElement($42ceafc619f9c3ba$var$CollectionDocumentContext.Provider, {\n value: null\n }, /*#__PURE__*/ (0, $kT5Ur$react).createElement($42ceafc619f9c3ba$var$ShallowRenderContext.Provider, {\n value: true\n }, children)), [\n children\n ]);\n // During SSR, we render the content directly, and append nodes to the document during render.\n // The collection children return null so that nothing is actually rendered into the HTML.\n return (0, $c7eafbbe1ea5834e$export$535bd6ca7f90a273)() ? /*#__PURE__*/ (0, $kT5Ur$react).createElement($42ceafc619f9c3ba$var$SSRContext.Provider, {\n value: doc\n }, wrappedChildren) : /*#__PURE__*/ (0, $kT5Ur$createPortal)(wrappedChildren, doc);\n}\n\n\nexport {$42ceafc619f9c3ba$export$bf788dd355e3a401 as CollectionBuilder, $42ceafc619f9c3ba$export$18af5c7a9e9b3664 as createLeafComponent, $42ceafc619f9c3ba$export$e953bb1cd0f19726 as createBranchComponent, $42ceafc619f9c3ba$export$fb8073518f34e6ec as Collection};\n//# sourceMappingURL=CollectionBuilder.mjs.map\n"],"ignoreList":[0],"mappings":";;;;;;;;;;A,aA6BMoB,IAA+DpB,gBAAsB,EAAK,GAC1FqB,IAAoErB,gBAAsB,IAAI;AACpG,SAASsB,EAA0C,GAAO;CAGtD,IADcrB,EAAmBoB,CAC3B,GAKN,OAAOG,EAAM;CAKb,IAAI,EAAc,eAAsB,gBA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ur$react","$kT5Ur$useRef","$kT5Ur$useCallback","$kT5Ur$useSyncExternalStore","$kT5Ur$useState","$kT5Ur$forwardRef","$kT5Ur$useMemo","$kT5Ur$createPortal","$6f0c29017aeec335$export$408d25a4e12db025","$6f0c29017aeec335$export$d68d59712b04d9d1","$96ead35620b8fd36$export$b34a105447964f9f","$a80bd3e9349588e7$export$727c8fc270210f13","$c7eafbbe1ea5834e$export$535bd6ca7f90a273","$d1116acdf220c2da$export$f9762fab77588ecb","$d7f64c32b702fe2c$export$8dc98ba7eadeaa56","$3ARPR$react","import_shim","require_shim","$42ceafc619f9c3ba$var$ShallowRenderContext","$42ceafc619f9c3ba$var$CollectionDocumentContext","$42ceafc619f9c3ba$export$bf788dd355e3a401","useContext","props","$42ceafc619f9c3ba$var$useCollectionDocument","document","$42ceafc619f9c3ba$var$CollectionInner","render","collection","$42ceafc619f9c3ba$var$useSyncExternalStoreFallback","isSSR","isSSRRef","useRef","getSnapshotWrapper","useCallback","getServerSnapshot","getSnapshot","subscribe","$42ceafc619f9c3ba$var$useSyncExternalStore","\"useSyncExternalStore\"","useState","createCollection","fn","$42ceafc619f9c3ba$var$SSRContext","$42ceafc619f9c3ba$var$createCollectionNodeClass","type","$42ceafc619f9c3ba$var$useSSRCollectionNode","CollectionNodeClass","itemRef","ref","rendered","parentNode","element","children","$42ceafc619f9c3ba$export$18af5c7a9e9b3664","Component","node","Result","forwardRef","focusableProps","$42ceafc619f9c3ba$export$e953bb1cd0f19726","$42ceafc619f9c3ba$var$useCollectionChildren","useChildren","options","$42ceafc619f9c3ba$var$CollectionContext","$42ceafc619f9c3ba$export$fb8073518f34e6ec","ctx","dependencies","idScope","$42ceafc619f9c3ba$var$CollectionRoot","useMemo","doc","wrappedChildren"],"sources":["../node_modules/react-aria/dist/private/collections/CollectionBuilder.mjs"],"sourcesContent":["import {BaseCollection as $6f0c29017aeec335$export$408d25a4e12db025, CollectionNode as $6f0c29017aeec335$export$d68d59712b04d9d1} from \"./BaseCollection.mjs\";\nimport {Document as $96ead35620b8fd36$export$b34a105447964f9f} from \"./Document.mjs\";\nimport {useCachedChildren as $a80bd3e9349588e7$export$727c8fc270210f13} from \"./useCachedChildren.mjs\";\nimport {FocusableContext as $d1116acdf220c2da$export$f9762fab77588ecb} from \"../interactions/useFocusable.mjs\";\nimport {Hidden as $d7f64c32b702fe2c$export$8dc98ba7eadeaa56} from \"./Hidden.mjs\";\nimport {useIsSSR as $c7eafbbe1ea5834e$export$535bd6ca7f90a273} from \"../ssr/SSRProvider.mjs\";\nimport {createPortal as $kT5Ur$createPortal} from \"react-dom\";\nimport $kT5Ur$react, {createContext as $kT5Ur$createContext, useContext as $kT5Ur$useContext, useRef as $kT5Ur$useRef, useCallback as $kT5Ur$useCallback, useState as $kT5Ur$useState, forwardRef as $kT5Ur$forwardRef, useMemo as $kT5Ur$useMemo} from \"react\";\nimport {useSyncExternalStore as $kT5Ur$useSyncExternalStore} from \"use-sync-external-store/shim/index.js\";\n\n/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n\n\n\n\nconst $42ceafc619f9c3ba$var$ShallowRenderContext = /*#__PURE__*/ (0, $kT5Ur$createContext)(false);\nconst $42ceafc619f9c3ba$var$CollectionDocumentContext = /*#__PURE__*/ (0, $kT5Ur$createContext)(null);\nfunction $42ceafc619f9c3ba$export$bf788dd355e3a401(props) {\n // If a document was provided above us, we're already in a hidden tree. Just render the content.\n let doc = (0, $kT5Ur$useContext)($42ceafc619f9c3ba$var$CollectionDocumentContext);\n if (doc) // The React types prior to 18 did not allow returning ReactNode from components\n // even though the actual implementation since React 16 did.\n // We must return ReactElement so that TS does not complain that <CollectionBuilder>\n // is not a valid JSX element with React 16 and 17 types.\n // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/20544\n return props.content;\n // Otherwise, render a hidden copy of the children so that we can build the collection before constructing the state.\n // This should always come before the real DOM content so we have built the collection by the time it renders during SSR.\n // This is fine. CollectionDocumentContext never changes after mounting.\n // oxlint-disable-next-line react/react-compiler, react-hooks/rules-of-hooks\n let { collection: collection, document: document } = $42ceafc619f9c3ba$var$useCollectionDocument(props.createCollection);\n return /*#__PURE__*/ (0, $kT5Ur$react).createElement((0, $kT5Ur$react).Fragment, null, /*#__PURE__*/ (0, $kT5Ur$react).createElement((0, $d7f64c32b702fe2c$export$8dc98ba7eadeaa56), null, /*#__PURE__*/ (0, $kT5Ur$react).createElement($42ceafc619f9c3ba$var$CollectionDocumentContext.Provider, {\n value: document\n }, props.content)), /*#__PURE__*/ (0, $kT5Ur$react).createElement($42ceafc619f9c3ba$var$CollectionInner, {\n render: props.children,\n collection: collection\n }));\n}\nfunction $42ceafc619f9c3ba$var$CollectionInner({ collection: collection, render: render }) {\n return render(collection);\n}\n// React 16 and 17 don't support useSyncExternalStore natively, and the shim provided by React does not support getServerSnapshot.\n// This wrapper uses the shim, but additionally calls getServerSnapshot during SSR (according to SSRProvider).\nfunction $42ceafc619f9c3ba$var$useSyncExternalStoreFallback(subscribe, getSnapshot, getServerSnapshot) {\n let isSSR = (0, $c7eafbbe1ea5834e$export$535bd6ca7f90a273)();\n let isSSRRef = (0, $kT5Ur$useRef)(isSSR);\n // This is read immediately inside the wrapper, which also runs during render.\n // We just need a ref to avoid invalidating the callback itself, which\n // would cause React to re-run the callback more than necessary.\n // eslint-disable-next-line rsp-rules/pure-render\n // oxlint-disable-next-line react/react-compiler, rsp-rules/pure-render\n isSSRRef.current = isSSR;\n let getSnapshotWrapper = (0, $kT5Ur$useCallback)(()=>{\n return isSSRRef.current ? getServerSnapshot() : getSnapshot();\n }, [\n getSnapshot,\n getServerSnapshot\n ]);\n return (0, $kT5Ur$useSyncExternalStore)(subscribe, getSnapshotWrapper);\n}\nconst $42ceafc619f9c3ba$var$useSyncExternalStore = typeof (0, $kT5Ur$react)['useSyncExternalStore'] === 'function' ? (0, $kT5Ur$react)['useSyncExternalStore'] : $42ceafc619f9c3ba$var$useSyncExternalStoreFallback;\nfunction $42ceafc619f9c3ba$var$useCollectionDocument(createCollection) {\n // The document instance is mutable, and should never change between renders.\n // useSyncExternalStore is used to subscribe to updates, which vends immutable Collection objects.\n let [document] = (0, $kT5Ur$useState)(()=>new (0, $96ead35620b8fd36$export$b34a105447964f9f)(createCollection?.() || new (0, $6f0c29017aeec335$export$408d25a4e12db025)()));\n let subscribe = (0, $kT5Ur$useCallback)((fn)=>document.subscribe(fn), [\n document\n ]);\n let getSnapshot = (0, $kT5Ur$useCallback)(()=>{\n let collection = document.getCollection();\n if (document.isSSR) // After SSR is complete, reset the document to empty so it is ready for React to render the portal into.\n // We do this _after_ getting the collection above so that the collection still has content in it from SSR\n // during the current render, before React has finished the client render.\n document.resetAfterSSR();\n return collection;\n }, [\n document\n ]);\n let getServerSnapshot = (0, $kT5Ur$useCallback)(()=>{\n // oxlint-disable-next-line react/react-compiler\n document.isSSR = true;\n return document.getCollection();\n }, [\n document\n ]);\n let collection = $42ceafc619f9c3ba$var$useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n return {\n collection: collection,\n document: document\n };\n}\nconst $42ceafc619f9c3ba$var$SSRContext = /*#__PURE__*/ (0, $kT5Ur$createContext)(null);\nfunction $42ceafc619f9c3ba$var$createCollectionNodeClass(type) {\n let NodeClass = class extends (0, $6f0c29017aeec335$export$d68d59712b04d9d1) {\n static{\n this.type = type;\n }\n };\n return NodeClass;\n}\nfunction $42ceafc619f9c3ba$var$useSSRCollectionNode(CollectionNodeClass, props, ref, rendered, children, render) {\n // To prevent breaking change, if CollectionNodeClass is a string, create a CollectionNodeClass using the string as the type\n if (typeof CollectionNodeClass === 'string') // oxlint-disable-next-line react/react-compiler\n CollectionNodeClass = $42ceafc619f9c3ba$var$createCollectionNodeClass(CollectionNodeClass);\n // During SSR, portals are not supported, so the collection children will be wrapped in an SSRContext.\n // Since SSR occurs only once, we assume that the elements are rendered in order and never re-render.\n // Therefore we can create elements in our collection document during render so that they are in the\n // collection by the time we need to use the collection to render to the real DOM.\n // After hydration, we switch to client rendering using the portal.\n let itemRef = (0, $kT5Ur$useCallback)((element)=>{\n element?.setProps(props, ref, CollectionNodeClass, rendered, render);\n }, [\n props,\n ref,\n rendered,\n render,\n CollectionNodeClass\n ]);\n let parentNode = (0, $kT5Ur$useContext)($42ceafc619f9c3ba$var$SSRContext);\n if (parentNode) {\n // Guard against double rendering in strict mode.\n let element = parentNode.ownerDocument.nodesByProps.get(props);\n if (!element) {\n element = parentNode.ownerDocument.createElement(CollectionNodeClass.type);\n element.setProps(props, ref, CollectionNodeClass, rendered, render);\n parentNode.appendChild(element);\n parentNode.ownerDocument.updateCollection();\n parentNode.ownerDocument.nodesByProps.set(props, element);\n }\n return children ? /*#__PURE__*/ (0, $kT5Ur$react).createElement($42ceafc619f9c3ba$var$SSRContext.Provider, {\n value: element\n }, children) : null;\n }\n // @ts-ignore\n return /*#__PURE__*/ (0, $kT5Ur$react).createElement(CollectionNodeClass.type, {\n ref: itemRef\n }, children);\n}\nfunction $42ceafc619f9c3ba$export$18af5c7a9e9b3664(CollectionNodeClass, render) {\n let Component = ({ node: node })=>render(node.props, node.props.ref, node);\n let Result = (0, $kT5Ur$forwardRef)((props, ref)=>{\n let focusableProps = (0, $kT5Ur$useContext)((0, $d1116acdf220c2da$export$f9762fab77588ecb));\n let isShallow = (0, $kT5Ur$useContext)($42ceafc619f9c3ba$var$ShallowRenderContext);\n if (!isShallow) {\n if (render.length >= 3) throw new Error(render.name + ' cannot be rendered outside a collection.');\n return render(props, ref);\n }\n return $42ceafc619f9c3ba$var$useSSRCollectionNode(CollectionNodeClass, props, ref, 'children' in props ? props.children : null, null, (node)=>// Forward FocusableContext to real DOM tree so tooltips work.\n /*#__PURE__*/ (0, $kT5Ur$react).createElement((0, $d1116acdf220c2da$export$f9762fab77588ecb).Provider, {\n value: focusableProps\n }, /*#__PURE__*/ (0, $kT5Ur$react).createElement(Component, {\n node: node\n })));\n });\n // @ts-ignore\n Result.displayName = render.name;\n return Result;\n}\nfunction $42ceafc619f9c3ba$export$e953bb1cd0f19726(CollectionNodeClass, render, useChildren = $42ceafc619f9c3ba$var$useCollectionChildren) {\n let Component = ({ node: node })=>render(node.props, node.props.ref, node);\n let Result = (0, $kT5Ur$forwardRef)((props, ref)=>{\n let children = useChildren(props);\n return $42ceafc619f9c3ba$var$useSSRCollectionNode(CollectionNodeClass, props, ref, null, children, (node)=>/*#__PURE__*/ (0, $kT5Ur$react).createElement(Component, {\n node: node\n })) ?? /*#__PURE__*/ (0, $kT5Ur$react).createElement((0, $kT5Ur$react).Fragment, null);\n });\n // @ts-ignore\n Result.displayName = render.name;\n return Result;\n}\nfunction $42ceafc619f9c3ba$var$useCollectionChildren(options) {\n return (0, $a80bd3e9349588e7$export$727c8fc270210f13)({\n ...options,\n addIdAndValue: true\n });\n}\nconst $42ceafc619f9c3ba$var$CollectionContext = /*#__PURE__*/ (0, $kT5Ur$createContext)(null);\nfunction $42ceafc619f9c3ba$export$fb8073518f34e6ec(props) {\n let ctx = (0, $kT5Ur$useContext)($42ceafc619f9c3ba$var$CollectionContext);\n let dependencies = (ctx?.dependencies || []).concat(props.dependencies);\n let idScope = props.idScope ?? ctx?.idScope;\n let children = $42ceafc619f9c3ba$var$useCollectionChildren({\n ...props,\n idScope: idScope,\n dependencies: dependencies\n });\n let doc = (0, $kT5Ur$useContext)($42ceafc619f9c3ba$var$CollectionDocumentContext);\n if (doc) children = /*#__PURE__*/ (0, $kT5Ur$react).createElement($42ceafc619f9c3ba$var$CollectionRoot, null, children);\n // Propagate dependencies and idScope to child collections.\n ctx = (0, $kT5Ur$useMemo)(()=>({\n dependencies: // oxlint-disable-next-line react-hooks/exhaustive-deps\n dependencies,\n idScope: idScope\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n // oxlint-disable-next-line react/react-compiler, react-hooks/exhaustive-deps\n [\n idScope,\n ...dependencies\n ]);\n return /*#__PURE__*/ (0, $kT5Ur$react).createElement($42ceafc619f9c3ba$var$CollectionContext.Provider, {\n value: ctx\n }, children);\n}\nfunction $42ceafc619f9c3ba$var$CollectionRoot({ children: children }) {\n let doc = (0, $kT5Ur$useContext)($42ceafc619f9c3ba$var$CollectionDocumentContext);\n let wrappedChildren = (0, $kT5Ur$useMemo)(()=>/*#__PURE__*/ (0, $kT5Ur$react).createElement($42ceafc619f9c3ba$var$CollectionDocumentContext.Provider, {\n value: null\n }, /*#__PURE__*/ (0, $kT5Ur$react).createElement($42ceafc619f9c3ba$var$ShallowRenderContext.Provider, {\n value: true\n }, children)), [\n children\n ]);\n // During SSR, we render the content directly, and append nodes to the document during render.\n // The collection children return null so that nothing is actually rendered into the HTML.\n return (0, $c7eafbbe1ea5834e$export$535bd6ca7f90a273)() ? /*#__PURE__*/ (0, $kT5Ur$react).createElement($42ceafc619f9c3ba$var$SSRContext.Provider, {\n value: doc\n }, wrappedChildren) : /*#__PURE__*/ (0, $kT5Ur$createPortal)(wrappedChildren, doc);\n}\n\n\nexport {$42ceafc619f9c3ba$export$bf788dd355e3a401 as CollectionBuilder, $42ceafc619f9c3ba$export$18af5c7a9e9b3664 as createLeafComponent, $42ceafc619f9c3ba$export$e953bb1cd0f19726 as createBranchComponent, $42ceafc619f9c3ba$export$fb8073518f34e6ec as Collection};\n//# sourceMappingURL=CollectionBuilder.mjs.map\n"],"ignoreList":[0],"mappings":";;;;;;;;;;A,aA6BMoB,IAA+DpB,gBAAsB,EAAK,GAC1FqB,IAAoErB,gBAAsB,IAAI;AACpG,SAASsB,EAA0C,GAAO;CAGtD,IADcrB,EAAmBoB,CAC3B,GAKN,OAAOG,EAAM;CAKb,IAAI,EAAc,eAAsB,gBAAaC,EAA4CD,EAA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AAsCN,gBAAc,cAAcmB,EAAgD,UAAU,EAC9I,OAAO,KACX,GAAqBnB,gBAAc,cAAckB,EAA2C,UAAU,EAClG,OAAO,GACX,GAAGkC,CAAQ,CAAC,GAAG,CACfA,CACJ,CAAC;CAGD,OAAWxC,EAA2C,IAAsBZ,gBAAc,cAAc0C,EAAiC,UAAU,EAC/I,OAAO4B,EACX,GAAGC,CAAe,IAAsBhE,gBAAqBgE,GAAiBD,CAAG;AACrF"}
|
package/dist/lyra660.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./lyra2.cjs");let
|
|
1
|
+
const e=require("./lyra2.cjs"),t=require("./lyra4.cjs"),n=require("./lyra39.cjs"),r=require("./lyra603.cjs");let i=require("react");i=e.__toESM(i,1);var a=(0,i.createContext)({}),o=n.createLeafComponent(t.HeaderNode,function(e,t){return[e,t]=r.useContextProps(e,t,a),i.default.createElement(r.dom.header,{className:`react-aria-Header`,...e,ref:t},e.children)});exports.Header=o,exports.HeaderContext=a;
|
package/dist/lyra660.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lyra660.cjs","names":["$gfOZh$createContext","require_runtime","react","$53e61d82d8b8611d$export$e0e4026c12a8bdbb"],"sources":["../node_modules/react-aria-components/dist/private/Header.mjs"],"sourcesContent":["import {dom as $7230ffa83bc0c2cf$export$df3a06d6289f983e, useContextProps as $7230ffa83bc0c2cf$export$29f1550f4b0d4415} from \"./utils.mjs\";\nimport {createLeafComponent as $gfOZh$createLeafComponent} from \"react-aria/CollectionBuilder\";\nimport {HeaderNode as $gfOZh$HeaderNode} from \"react-aria/private/collections/BaseCollection\";\nimport $gfOZh$react, {createContext as $gfOZh$createContext} from \"react\";\n\n/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\nconst $53e61d82d8b8611d$export$e0e4026c12a8bdbb = /*#__PURE__*/ (0, $gfOZh$createContext)({});\nconst $53e61d82d8b8611d$export$8b251419efc915eb = /*#__PURE__*/ (0, $gfOZh$createLeafComponent)((0, $gfOZh$HeaderNode), function Header(props, ref) {\n [props, ref] = (0, $7230ffa83bc0c2cf$export$29f1550f4b0d4415)(props, ref, $53e61d82d8b8611d$export$e0e4026c12a8bdbb);\n return /*#__PURE__*/ (0, $gfOZh$react).createElement((0, $7230ffa83bc0c2cf$export$df3a06d6289f983e).header, {\n className: \"react-aria-Header\",\n ...props,\n ref: ref\n }, props.children);\n});\n\n\nexport {$53e61d82d8b8611d$export$e0e4026c12a8bdbb as HeaderContext, $53e61d82d8b8611d$export$8b251419efc915eb as Header};\n//# sourceMappingURL=Header.mjs.map\n"],"ignoreList":[0],"mappings":"A,
|
|
1
|
+
{"version":3,"file":"lyra660.cjs","names":["$gfOZh$createContext","$gfOZh$createLeafComponent","$gfOZh$HeaderNode","$7230ffa83bc0c2cf$export$29f1550f4b0d4415","$gfOZh$react","$7230ffa83bc0c2cf$export$df3a06d6289f983e","require_runtime","require_BaseCollection","require_CollectionBuilder","require_utils","react","$53e61d82d8b8611d$export$e0e4026c12a8bdbb","$53e61d82d8b8611d$export$8b251419efc915eb","props","ref"],"sources":["../node_modules/react-aria-components/dist/private/Header.mjs"],"sourcesContent":["import {dom as $7230ffa83bc0c2cf$export$df3a06d6289f983e, useContextProps as $7230ffa83bc0c2cf$export$29f1550f4b0d4415} from \"./utils.mjs\";\nimport {createLeafComponent as $gfOZh$createLeafComponent} from \"react-aria/CollectionBuilder\";\nimport {HeaderNode as $gfOZh$HeaderNode} from \"react-aria/private/collections/BaseCollection\";\nimport $gfOZh$react, {createContext as $gfOZh$createContext} from \"react\";\n\n/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\nconst $53e61d82d8b8611d$export$e0e4026c12a8bdbb = /*#__PURE__*/ (0, $gfOZh$createContext)({});\nconst $53e61d82d8b8611d$export$8b251419efc915eb = /*#__PURE__*/ (0, $gfOZh$createLeafComponent)((0, $gfOZh$HeaderNode), function Header(props, ref) {\n [props, ref] = (0, $7230ffa83bc0c2cf$export$29f1550f4b0d4415)(props, ref, $53e61d82d8b8611d$export$e0e4026c12a8bdbb);\n return /*#__PURE__*/ (0, $gfOZh$react).createElement((0, $7230ffa83bc0c2cf$export$df3a06d6289f983e).header, {\n className: \"react-aria-Header\",\n ...props,\n ref: ref\n }, props.children);\n});\n\n\nexport {$53e61d82d8b8611d$export$e0e4026c12a8bdbb as HeaderContext, $53e61d82d8b8611d$export$8b251419efc915eb as Header};\n//# sourceMappingURL=Header.mjs.map\n"],"ignoreList":[0],"mappings":"A,qJAmBA,IAAMW,GAA0D,EAAIX,EAAAA,cAAAA,CAAsB,CAAC,CAAC,EACtFY,EAA8DX,EAAAA,oBAAgCC,EAAAA,WAAoB,SAAgB,EAAO,EAAK,CAEhJ,MADA,CAACW,EAAOC,GAAWX,EAAAA,gBAA2CU,EAAOC,EAAKH,CAAyC,EAC1FP,EAAAA,QAAc,cAAkBC,EAAAA,IAA2C,OAAQ,CACxG,UAAW,oBACX,GAAGQ,EACE,KACT,EAAGA,EAAM,QAAQ,CACrB,CAAC,E"}
|
package/dist/lyra661.js
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HeaderNode as e } from "./lyra4.js";
|
|
2
|
+
import { createLeafComponent as t } from "./lyra40.js";
|
|
3
|
+
import { dom as n, useContextProps as r } from "./lyra604.js";
|
|
4
|
+
import i, { createContext as a } from "react";
|
|
2
5
|
// node_modules/react-aria-components/dist/private/Header.mjs
|
|
3
|
-
var
|
|
4
|
-
|
|
6
|
+
var o = /*#__PURE__*/ a({}), s = /*#__PURE__*/ t(e, function(e, t) {
|
|
7
|
+
return [e, t] = r(e, t, o), /*#__PURE__*/ i.createElement(n.header, {
|
|
8
|
+
className: "react-aria-Header",
|
|
9
|
+
...e,
|
|
10
|
+
ref: t
|
|
11
|
+
}, e.children);
|
|
12
|
+
});
|
|
13
|
+
export { s as Header, o as HeaderContext };
|
package/dist/lyra661.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lyra661.js","names":["$gfOZh$createContext","$53e61d82d8b8611d$export$e0e4026c12a8bdbb"],"sources":["../node_modules/react-aria-components/dist/private/Header.mjs"],"sourcesContent":["import {dom as $7230ffa83bc0c2cf$export$df3a06d6289f983e, useContextProps as $7230ffa83bc0c2cf$export$29f1550f4b0d4415} from \"./utils.mjs\";\nimport {createLeafComponent as $gfOZh$createLeafComponent} from \"react-aria/CollectionBuilder\";\nimport {HeaderNode as $gfOZh$HeaderNode} from \"react-aria/private/collections/BaseCollection\";\nimport $gfOZh$react, {createContext as $gfOZh$createContext} from \"react\";\n\n/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\nconst $53e61d82d8b8611d$export$e0e4026c12a8bdbb = /*#__PURE__*/ (0, $gfOZh$createContext)({});\nconst $53e61d82d8b8611d$export$8b251419efc915eb = /*#__PURE__*/ (0, $gfOZh$createLeafComponent)((0, $gfOZh$HeaderNode), function Header(props, ref) {\n [props, ref] = (0, $7230ffa83bc0c2cf$export$29f1550f4b0d4415)(props, ref, $53e61d82d8b8611d$export$e0e4026c12a8bdbb);\n return /*#__PURE__*/ (0, $gfOZh$react).createElement((0, $7230ffa83bc0c2cf$export$df3a06d6289f983e).header, {\n className: \"react-aria-Header\",\n ...props,\n ref: ref\n }, props.children);\n});\n\n\nexport {$53e61d82d8b8611d$export$e0e4026c12a8bdbb as HeaderContext, $53e61d82d8b8611d$export$8b251419efc915eb as Header};\n//# sourceMappingURL=Header.mjs.map\n"],"ignoreList":[0],"mappings":"
|
|
1
|
+
{"version":3,"file":"lyra661.js","names":["$gfOZh$createContext","$gfOZh$createLeafComponent","$gfOZh$HeaderNode","$gfOZh$react","$6f0c29017aeec335$export$5ae2504e948afce5","$42ceafc619f9c3ba$export$18af5c7a9e9b3664","$7230ffa83bc0c2cf$export$df3a06d6289f983e","$7230ffa83bc0c2cf$export$29f1550f4b0d4415","$3ARPR$react","$53e61d82d8b8611d$export$e0e4026c12a8bdbb","$53e61d82d8b8611d$export$8b251419efc915eb","props","ref"],"sources":["../node_modules/react-aria-components/dist/private/Header.mjs"],"sourcesContent":["import {dom as $7230ffa83bc0c2cf$export$df3a06d6289f983e, useContextProps as $7230ffa83bc0c2cf$export$29f1550f4b0d4415} from \"./utils.mjs\";\nimport {createLeafComponent as $gfOZh$createLeafComponent} from \"react-aria/CollectionBuilder\";\nimport {HeaderNode as $gfOZh$HeaderNode} from \"react-aria/private/collections/BaseCollection\";\nimport $gfOZh$react, {createContext as $gfOZh$createContext} from \"react\";\n\n/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\nconst $53e61d82d8b8611d$export$e0e4026c12a8bdbb = /*#__PURE__*/ (0, $gfOZh$createContext)({});\nconst $53e61d82d8b8611d$export$8b251419efc915eb = /*#__PURE__*/ (0, $gfOZh$createLeafComponent)((0, $gfOZh$HeaderNode), function Header(props, ref) {\n [props, ref] = (0, $7230ffa83bc0c2cf$export$29f1550f4b0d4415)(props, ref, $53e61d82d8b8611d$export$e0e4026c12a8bdbb);\n return /*#__PURE__*/ (0, $gfOZh$react).createElement((0, $7230ffa83bc0c2cf$export$df3a06d6289f983e).header, {\n className: \"react-aria-Header\",\n ...props,\n ref: ref\n }, props.children);\n});\n\n\nexport {$53e61d82d8b8611d$export$e0e4026c12a8bdbb as HeaderContext, $53e61d82d8b8611d$export$8b251419efc915eb as Header};\n//# sourceMappingURL=Header.mjs.map\n"],"ignoreList":[0],"mappings":";;;;;AAmBA,IAAMS,IAA8DT,gBAAsB,CAAC,CAAC,GACtFU,IAA8DT,gBAAgCC,GAAoB,SAAgB,GAAO,GAAK;CAEhJ,OADA,CAACS,GAAOC,KAAWL,EAA2CI,GAAOC,GAAKH,CAAyC,GAC1FN,gBAAc,cAAkBG,EAA2C,QAAQ;EACxG,WAAW;EACX,GAAGK;EACE;CACT,GAAGA,EAAM,QAAQ;AACrB,CAAC"}
|
package/dist/lyra682.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./lyra2.cjs"),t=require("./lyra4.cjs"),n=require("./lyra27.cjs"),r=require("./lyra32.cjs"),i=require("./lyra35.cjs"),a=require("./lyra39.cjs"),o=require("./lyra53.cjs"),s=require("./lyra98.cjs"),c=require("./lyra305.cjs"),l=require("./lyra354.cjs"),u=require("./lyra400.cjs"),d=require("./lyra449.cjs"),f=require("./lyra450.cjs"),p=require("./lyra451.cjs"),m=require("./lyra603.cjs"),h=require("./lyra604.cjs"),g=require("./lyra605.cjs"),_=require("./lyra612.cjs"),v=require("./lyra660.cjs"),y=require("./lyra661.cjs"),b=require("./lyra662.cjs"),x=require("./lyra663.cjs"),S=require("./lyra664.cjs"),C=require("./lyra667.cjs"),w=require("./lyra668.cjs"),T=require("./lyra672.cjs"),E=require("./lyra677.cjs"),D=require("./lyra678.cjs"),O=require("./lyra679.cjs"),k=require("./lyra681.cjs"),A=require("./lyra683.cjs");let j=require("react");j=e.__toESM(j,1);var M=(0,j.createContext)(null),N=(0,j.createContext)(null),P=(0,j.createContext)(null),F=(0,j.createContext)(null);function I(e){let t=O.useMenuTriggerState(e),n=(0,j.useRef)(null),{menuTriggerProps:r,menuProps:a}=c.useMenuTrigger({...e,type:`menu`},t,n),o=(0,j.useRef)(null);return i.useIsHidden()?null:j.default.createElement(m.Provider,{values:[[M,{...a,ref:o}],[A.OverlayTriggerStateContext,t],[P,t],[E.PopoverContext,{trigger:`MenuTrigger`,triggerRef:n,scrollRef:o,placement:`bottom start`,"aria-labelledby":a[`aria-labelledby`],offset:e.trigger===`contextMenu`?0:void 0}]]},j.default.createElement(l.PressResponder,{...r,ref:n,isPressed:t.isOpen},e.children))}var L=(0,j.createContext)(null);(class extends t.CollectionNode{static{this.type=`submenutrigger`}filter(e,t,n){let r=e.getItem(this.firstChildKey);if(r&&n(r.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}});var R=(0,j.forwardRef)(function(e,t){return[e,t]=m.useContextProps(e,t,M),j.default.createElement(a.CollectionBuilder,{content:j.default.createElement(a.Collection,e)},n=>j.default.createElement(z,{props:e,collection:n,menuRef:t}))});function z({props:e,collection:t,menuRef:r}){[e,r]=m.useContextProps(e,r,h.SelectableCollectionContext);let{filter:i,...a}=e,c=(0,j.useMemo)(()=>i?t.filter(i):t,[t,i]),l=k.useTreeState({...e,collection:c,children:void 0}),u=(0,j.useContext)(P),{isVirtualized:f,CollectionRoot:p}=(0,j.useContext)(g.CollectionRendererContext),{menuProps:_}=d.useMenu({...e,isVirtualized:f,onClose:e.onClose||u?.close},l,r),v=m.useRenderProps({...e,children:void 0,defaultClassName:`react-aria-Menu`,values:{isEmpty:l.collection.size===0}}),b=null;l.collection.size===0&&e.renderEmptyState&&(b=j.default.createElement(`div`,{role:`menuitem`,style:{display:`contents`}},e.renderEmptyState()));let S=o.filterDOMProps(e,{global:!0});return j.default.createElement(s.FocusScope,null,j.default.createElement(m.dom.div,{...n.mergeProps(S,v,_),ref:r,slot:e.slot||void 0,"data-empty":l.collection.size===0||void 0,onScroll:e.onScroll},j.default.createElement(m.Provider,{values:[[N,l],[x.SeparatorContext,{elementType:`div`}],[g.SectionContext,{name:`MenuSection`,render:V}],[L,{parentMenuRef:r,shouldUseVirtualFocus:a?.shouldUseVirtualFocus}],[
|
|
1
|
+
const e=require("./lyra2.cjs"),t=require("./lyra4.cjs"),n=require("./lyra27.cjs"),r=require("./lyra32.cjs"),i=require("./lyra35.cjs"),a=require("./lyra39.cjs"),o=require("./lyra53.cjs"),s=require("./lyra98.cjs"),c=require("./lyra305.cjs"),l=require("./lyra354.cjs"),u=require("./lyra400.cjs"),d=require("./lyra449.cjs"),f=require("./lyra450.cjs"),p=require("./lyra451.cjs"),m=require("./lyra603.cjs"),h=require("./lyra604.cjs"),g=require("./lyra605.cjs"),_=require("./lyra612.cjs"),v=require("./lyra660.cjs"),y=require("./lyra661.cjs"),b=require("./lyra662.cjs"),x=require("./lyra663.cjs"),S=require("./lyra664.cjs"),C=require("./lyra667.cjs"),w=require("./lyra668.cjs"),T=require("./lyra672.cjs"),E=require("./lyra677.cjs"),D=require("./lyra678.cjs"),O=require("./lyra679.cjs"),k=require("./lyra681.cjs"),A=require("./lyra683.cjs");let j=require("react");j=e.__toESM(j,1);var M=(0,j.createContext)(null),N=(0,j.createContext)(null),P=(0,j.createContext)(null),F=(0,j.createContext)(null);function I(e){let t=O.useMenuTriggerState(e),n=(0,j.useRef)(null),{menuTriggerProps:r,menuProps:a}=c.useMenuTrigger({...e,type:`menu`},t,n),o=(0,j.useRef)(null);return i.useIsHidden()?null:j.default.createElement(m.Provider,{values:[[M,{...a,ref:o}],[A.OverlayTriggerStateContext,t],[P,t],[E.PopoverContext,{trigger:`MenuTrigger`,triggerRef:n,scrollRef:o,placement:`bottom start`,"aria-labelledby":a[`aria-labelledby`],offset:e.trigger===`contextMenu`?0:void 0}]]},j.default.createElement(l.PressResponder,{...r,ref:n,isPressed:t.isOpen},e.children))}var L=(0,j.createContext)(null);(class extends t.CollectionNode{static{this.type=`submenutrigger`}filter(e,t,n){let r=e.getItem(this.firstChildKey);if(r&&n(r.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}});var R=(0,j.forwardRef)(function(e,t){return[e,t]=m.useContextProps(e,t,M),j.default.createElement(a.CollectionBuilder,{content:j.default.createElement(a.Collection,e)},n=>j.default.createElement(z,{props:e,collection:n,menuRef:t}))});function z({props:e,collection:t,menuRef:r}){[e,r]=m.useContextProps(e,r,h.SelectableCollectionContext);let{filter:i,...a}=e,c=(0,j.useMemo)(()=>i?t.filter(i):t,[t,i]),l=k.useTreeState({...e,collection:c,children:void 0}),u=(0,j.useContext)(P),{isVirtualized:f,CollectionRoot:p}=(0,j.useContext)(g.CollectionRendererContext),{menuProps:_}=d.useMenu({...e,isVirtualized:f,onClose:e.onClose||u?.close},l,r),v=m.useRenderProps({...e,children:void 0,defaultClassName:`react-aria-Menu`,values:{isEmpty:l.collection.size===0}}),b=null;l.collection.size===0&&e.renderEmptyState&&(b=j.default.createElement(`div`,{role:`menuitem`,style:{display:`contents`}},e.renderEmptyState()));let S=o.filterDOMProps(e,{global:!0});return j.default.createElement(s.FocusScope,null,j.default.createElement(m.dom.div,{...n.mergeProps(S,v,_),ref:r,slot:e.slot||void 0,"data-empty":l.collection.size===0||void 0,onScroll:e.onScroll},j.default.createElement(m.Provider,{values:[[N,l],[x.SeparatorContext,{elementType:`div`}],[g.SectionContext,{name:`MenuSection`,render:V}],[L,{parentMenuRef:r,shouldUseVirtualFocus:a?.shouldUseVirtualFocus}],[U,{shouldCloseOnSelect:e.shouldCloseOnSelect}],[h.SelectableCollectionContext,null],[h.FieldInputContext,null],[F,l.selectionManager],[P,u??O.useMenuTriggerState({})]]},j.default.createElement(y.SharedElementTransition,null,j.default.createElement(p,{collection:l.collection,persistedKeys:g.usePersistedKeys(l.selectionManager.focusedKey),scrollRef:r}))),b))}var B=class extends w.SelectionManager{constructor(e,t){super(e.collection,t),this.parent=e}get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,t){return this.parent.setFocusedKey(e,t)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}};function V(e,t,r,i=`react-aria-MenuSection`){let a=(0,j.useContext)(N),{CollectionBranch:s}=(0,j.useContext)(g.CollectionRendererContext),[c,l]=m.useSlot(),{headingProps:u,groupProps:d}=p.useMenuSection({heading:l,"aria-label":r.props[`aria-label`]??void 0}),f=m.useRenderProps({...e,id:void 0,children:void 0,defaultClassName:i,className:r.props?.className,style:r.props?.style,values:void 0}),h=(0,j.useContext)(F),_=C.useMultipleSelectionState(e),y=e.selectionMode==null?h:new B(h,_),b=m.useSlottedContext(U)?.shouldCloseOnSelect,x=o.filterDOMProps(e,{global:!0});return delete x.id,j.default.createElement(m.dom.section,{...n.mergeProps(x,f,d),ref:t},j.default.createElement(m.Provider,{values:[[v.HeaderContext,{...u,ref:c}],[F,y],[U,{shouldCloseOnSelect:e.shouldCloseOnSelect??b}]]},j.default.createElement(s,{collection:a.collection,parent:r})))}var H=a.createBranchComponent(t.SectionNode,V),U=(0,j.createContext)(null),W=a.createLeafComponent(t.ItemNode,function(e,t,i){[e,t]=m.useContextProps(e,t,U);let a=m.useSlottedContext(U)?.id,s=(0,j.useContext)(N),c=r.useObjectRef(t),l=(0,j.useContext)(F),{isVirtualized:d}=(0,j.useContext)(g.CollectionRendererContext),{menuItemProps:p,labelProps:h,descriptionProps:v,keyboardShortcutProps:y,...x}=f.useMenuItem({...e,id:a,key:i.key,selectionManager:l,isVirtualized:d},s,c),{hoverProps:S,isHovered:C}=u.useHover({isDisabled:x.isDisabled}),w=m.useRenderProps({...e,id:void 0,children:i.rendered,defaultClassName:`react-aria-MenuItem`,values:{...x,isHovered:C,isFocusVisible:x.isFocusVisible,selectionMode:l.selectionMode,selectionBehavior:l.selectionBehavior,hasSubmenu:!!e[`aria-haspopup`],isOpen:e[`aria-expanded`]===`true`}}),T=e.href?m.dom.a:m.dom.div,E=o.filterDOMProps(e,{global:!0});return delete E.id,delete E.onClick,j.default.createElement(T,{...n.mergeProps(E,w,p,S),ref:c,"data-disabled":x.isDisabled||void 0,"data-hovered":C||void 0,"data-focused":x.isFocused||void 0,"data-focus-visible":x.isFocusVisible||void 0,"data-pressed":x.isPressed||void 0,"data-selected":x.isSelected||void 0,"data-selection-mode":l.selectionMode===`none`?void 0:l.selectionMode,"data-has-submenu":!!e[`aria-haspopup`]||void 0,"data-open":e[`aria-expanded`]===`true`||void 0},j.default.createElement(m.Provider,{values:[[_.TextContext,{slots:{[m.DEFAULT_SLOT]:h,label:h,description:v}}],[D.KeyboardContext,y],[b.SelectionIndicatorContext,{isSelected:x.isSelected}]]},w.children))});a.createLeafComponent(t.LoaderNode,function(e,t,r){let i=(0,j.useContext)(N),{isLoading:a,onLoadMore:s,scrollOffset:c,...l}=e,u=(0,j.useRef)(null),d=(0,j.useMemo)(()=>({onLoadMore:s,collection:i?.collection,sentinelRef:u,scrollOffset:c}),[s,c,i?.collection]);T.useLoadMoreSentinel(d,u);let f=m.useRenderProps({...l,id:void 0,children:r.rendered,defaultClassName:`react-aria-MenuLoadingIndicator`,values:void 0});return j.default.createElement(j.default.Fragment,null,j.default.createElement(`div`,{style:{position:`relative`,width:0,height:0},inert:S.inertValue(!0)},j.default.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:u,style:{position:`absolute`,height:1,width:1}})),a&&f.children&&j.default.createElement(j.default.Fragment,null,j.default.createElement(m.dom.div,{...n.mergeProps(o.filterDOMProps(e,{global:!0}),{tabIndex:-1}),...f,role:`menuitem`,ref:t},f.children)))}),exports.Menu=R,exports.MenuContext=M,exports.MenuItem=W,exports.MenuSection=H,exports.MenuStateContext=N,exports.MenuTrigger=I,exports.RootMenuTriggerStateContext=P;
|