@react-stately/collections 3.0.0-nightly.1394 → 3.0.0-nightly.1395

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/main.js CHANGED
@@ -1,4 +1,4 @@
1
- var $3uugW$react = require("react");
1
+ var $3QYD8$react = require("react");
2
2
 
3
3
  function $parcel$exportWildcard(dest, source) {
4
4
  Object.keys(source).forEach(function(key) {
@@ -22,14 +22,14 @@ function $parcel$interopDefault(a) {
22
22
  function $parcel$export(e, n, v, s) {
23
23
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
24
24
  }
25
- var $37e0ebfb06ba9a87$exports = {};
25
+ var $67609abe41544c2f$exports = {};
26
26
 
27
- $parcel$export($37e0ebfb06ba9a87$exports, "Item", () => $37e0ebfb06ba9a87$export$6d08773d2e66f8f2);
27
+ $parcel$export($67609abe41544c2f$exports, "Item", () => $67609abe41544c2f$export$6d08773d2e66f8f2);
28
28
 
29
- function $37e0ebfb06ba9a87$var$Item(props) {
29
+ function $67609abe41544c2f$var$Item(props) {
30
30
  return null;
31
31
  }
32
- $37e0ebfb06ba9a87$var$Item.getCollectionNode = function* getCollectionNode(props, context) {
32
+ $67609abe41544c2f$var$Item.getCollectionNode = function* getCollectionNode(props, context) {
33
33
  let { childItems: childItems , title: title , children: children } = props;
34
34
  let rendered = props.title || props.children;
35
35
  let textValue = props.textValue || (typeof rendered === 'string' ? rendered : '') || props['aria-label'] || '';
@@ -41,7 +41,7 @@ $37e0ebfb06ba9a87$var$Item.getCollectionNode = function* getCollectionNode(props
41
41
  rendered: rendered,
42
42
  textValue: textValue,
43
43
  'aria-label': props['aria-label'],
44
- hasChildNodes: $37e0ebfb06ba9a87$var$hasChildItems(props),
44
+ hasChildNodes: $67609abe41544c2f$var$hasChildItems(props),
45
45
  *childNodes () {
46
46
  if (childItems) for (let child1 of childItems)yield {
47
47
  type: 'item',
@@ -49,7 +49,7 @@ $37e0ebfb06ba9a87$var$Item.getCollectionNode = function* getCollectionNode(props
49
49
  };
50
50
  else if (title) {
51
51
  let items = [];
52
- ($parcel$interopDefault($3uugW$react)).Children.forEach(children, (child)=>{
52
+ ($parcel$interopDefault($3QYD8$react)).Children.forEach(children, (child)=>{
53
53
  items.push({
54
54
  type: 'item',
55
55
  element: child
@@ -60,24 +60,24 @@ $37e0ebfb06ba9a87$var$Item.getCollectionNode = function* getCollectionNode(props
60
60
  }
61
61
  };
62
62
  };
63
- function $37e0ebfb06ba9a87$var$hasChildItems(props) {
63
+ function $67609abe41544c2f$var$hasChildItems(props) {
64
64
  if (props.hasChildItems != null) return props.hasChildItems;
65
65
  if (props.childItems) return true;
66
- if (props.title && ($parcel$interopDefault($3uugW$react)).Children.count(props.children) > 0) return true;
66
+ if (props.title && ($parcel$interopDefault($3QYD8$react)).Children.count(props.children) > 0) return true;
67
67
  return false;
68
68
  }
69
69
  // We don't want getCollectionNode to show up in the type definition
70
- let $37e0ebfb06ba9a87$export$6d08773d2e66f8f2 = $37e0ebfb06ba9a87$var$Item;
70
+ let $67609abe41544c2f$export$6d08773d2e66f8f2 = $67609abe41544c2f$var$Item;
71
71
 
72
72
 
73
- var $6f449c58ea5788c8$exports = {};
73
+ var $7613fe6c851d27af$exports = {};
74
74
 
75
- $parcel$export($6f449c58ea5788c8$exports, "Section", () => $6f449c58ea5788c8$export$6e2c8f0811a474ce);
75
+ $parcel$export($7613fe6c851d27af$exports, "Section", () => $7613fe6c851d27af$export$6e2c8f0811a474ce);
76
76
 
77
- function $6f449c58ea5788c8$var$Section(props) {
77
+ function $7613fe6c851d27af$var$Section(props) {
78
78
  return null;
79
79
  }
80
- $6f449c58ea5788c8$var$Section.getCollectionNode = function* getCollectionNode(props) {
80
+ $7613fe6c851d27af$var$Section.getCollectionNode = function* getCollectionNode(props) {
81
81
  let { children: children , title: title , items: items1 } = props;
82
82
  yield {
83
83
  type: 'section',
@@ -94,7 +94,7 @@ $6f449c58ea5788c8$var$Section.getCollectionNode = function* getCollectionNode(pr
94
94
  };
95
95
  } else {
96
96
  let items = [];
97
- ($parcel$interopDefault($3uugW$react)).Children.forEach(children, (child)=>{
97
+ ($parcel$interopDefault($3QYD8$react)).Children.forEach(children, (child)=>{
98
98
  items.push({
99
99
  type: 'item',
100
100
  element: child
@@ -106,20 +106,20 @@ $6f449c58ea5788c8$var$Section.getCollectionNode = function* getCollectionNode(pr
106
106
  };
107
107
  };
108
108
  // We don't want getCollectionNode to show up in the type definition
109
- let $6f449c58ea5788c8$export$6e2c8f0811a474ce = $6f449c58ea5788c8$var$Section;
109
+ let $7613fe6c851d27af$export$6e2c8f0811a474ce = $7613fe6c851d27af$var$Section;
110
110
 
111
111
 
112
- var $d3a2d2e50150250a$exports = {};
112
+ var $f0c95e4ecd513714$exports = {};
113
113
 
114
114
 
115
- var $69b0cc1932e5e4e0$exports = {};
115
+ var $df8a726ef7511d2e$exports = {};
116
116
 
117
- $parcel$export($69b0cc1932e5e4e0$exports, "useCollection", () => $69b0cc1932e5e4e0$export$6cd28814d92fa9c9);
117
+ $parcel$export($df8a726ef7511d2e$exports, "useCollection", () => $df8a726ef7511d2e$export$6cd28814d92fa9c9);
118
118
 
119
- class $adf5083e1044b4ca$export$bf788dd355e3a401 {
119
+ class $99f43427f9c89ffa$export$bf788dd355e3a401 {
120
120
  build(props, context) {
121
121
  this.context = context;
122
- return $adf5083e1044b4ca$var$iterable(()=>this.iterateCollection(props)
122
+ return $99f43427f9c89ffa$var$iterable(()=>this.iterateCollection(props)
123
123
  );
124
124
  }
125
125
  *iterateCollection(props) {
@@ -133,7 +133,7 @@ class $adf5083e1044b4ca$export$bf788dd355e3a401 {
133
133
  });
134
134
  } else {
135
135
  let items = [];
136
- ($parcel$interopDefault($3uugW$react)).Children.forEach(children, (child)=>{
136
+ ($parcel$interopDefault($3QYD8$react)).Children.forEach(children, (child)=>{
137
137
  items.push(child);
138
138
  });
139
139
  let index = 0;
@@ -182,7 +182,7 @@ class $adf5083e1044b4ca$export$bf788dd355e3a401 {
182
182
  }
183
183
  // If there's an element with a getCollectionNode function on its type, then it's a supported component.
184
184
  // Call this function to get a partial node, and recursively build a full node from there.
185
- if (($parcel$interopDefault($3uugW$react)).isValidElement(element)) {
185
+ if (($parcel$interopDefault($3QYD8$react)).isValidElement(element)) {
186
186
  let type = element.type;
187
187
  if (typeof type !== 'function' && typeof type.getCollectionNode !== 'function') {
188
188
  let name = typeof element.type === 'function' ? element.type.name : element.type;
@@ -200,7 +200,7 @@ class $adf5083e1044b4ca$export$bf788dd355e3a401 {
200
200
  ...childNode,
201
201
  key: nodeKey,
202
202
  index: index,
203
- wrapper: $adf5083e1044b4ca$var$compose(partialNode.wrapper, childNode.wrapper)
203
+ wrapper: $99f43427f9c89ffa$var$compose(partialNode.wrapper, childNode.wrapper)
204
204
  }, this.getChildState(state, childNode), parentKey ? `${parentKey}${element.key}` : element.key, parentNode);
205
205
  let children = [
206
206
  ...nodes
@@ -211,7 +211,7 @@ class $adf5083e1044b4ca$export$bf788dd355e3a401 {
211
211
  if (node.value) this.cache.set(node.value, node);
212
212
  // The partial node may have specified a type for the child in order to specify a constraint.
213
213
  // Verify that the full node that was built recursively matches this type.
214
- if (partialNode.type && node.type !== partialNode.type) throw new Error(`Unsupported type <${$adf5083e1044b4ca$var$capitalize(node.type)}> in <${$adf5083e1044b4ca$var$capitalize(parentNode.type)}>. Only <${$adf5083e1044b4ca$var$capitalize(partialNode.type)}> is supported.`);
214
+ if (partialNode.type && node.type !== partialNode.type) throw new Error(`Unsupported type <${$99f43427f9c89ffa$var$capitalize(node.type)}> in <${$99f43427f9c89ffa$var$capitalize(parentNode.type)}>. Only <${$99f43427f9c89ffa$var$capitalize(partialNode.type)}> is supported.`);
215
215
  index++;
216
216
  yield node;
217
217
  }
@@ -237,7 +237,7 @@ class $adf5083e1044b4ca$export$bf788dd355e3a401 {
237
237
  wrapper: partialNode.wrapper,
238
238
  shouldInvalidate: partialNode.shouldInvalidate,
239
239
  hasChildNodes: partialNode.hasChildNodes,
240
- childNodes: $adf5083e1044b4ca$var$iterable(function*() {
240
+ childNodes: $99f43427f9c89ffa$var$iterable(function*() {
241
241
  if (!partialNode.hasChildNodes) return;
242
242
  let index = 0;
243
243
  for (let child of partialNode.childNodes()){
@@ -259,7 +259,7 @@ class $adf5083e1044b4ca$export$bf788dd355e3a401 {
259
259
  }
260
260
  }
261
261
  // Wraps an iterator function as an iterable object, and caches the results.
262
- function $adf5083e1044b4ca$var$iterable(iterator) {
262
+ function $99f43427f9c89ffa$var$iterable(iterator) {
263
263
  let cache = [];
264
264
  let iterable = null;
265
265
  return {
@@ -273,23 +273,23 @@ function $adf5083e1044b4ca$var$iterable(iterator) {
273
273
  }
274
274
  };
275
275
  }
276
- function $adf5083e1044b4ca$var$compose(outer, inner) {
276
+ function $99f43427f9c89ffa$var$compose(outer, inner) {
277
277
  if (outer && inner) return (element)=>outer(inner(element))
278
278
  ;
279
279
  if (outer) return outer;
280
280
  if (inner) return inner;
281
281
  }
282
- function $adf5083e1044b4ca$var$capitalize(str) {
282
+ function $99f43427f9c89ffa$var$capitalize(str) {
283
283
  return str[0].toUpperCase() + str.slice(1);
284
284
  }
285
285
 
286
286
 
287
287
 
288
- function $69b0cc1932e5e4e0$export$6cd28814d92fa9c9(props, factory, context, invalidators = []) {
289
- let builder = $3uugW$react.useMemo(()=>new $adf5083e1044b4ca$export$bf788dd355e3a401()
288
+ function $df8a726ef7511d2e$export$6cd28814d92fa9c9(props, factory, context, invalidators = []) {
289
+ let builder = $3QYD8$react.useMemo(()=>new $99f43427f9c89ffa$export$bf788dd355e3a401()
290
290
  , []);
291
- let prev = $3uugW$react.useRef(null);
292
- return $3uugW$react.useMemo(()=>{
291
+ let prev = $3QYD8$react.useRef(null);
292
+ return $3QYD8$react.useMemo(()=>{
293
293
  let nodes = builder.build(props, context);
294
294
  prev.current = factory(nodes, prev.current);
295
295
  return prev.current;
@@ -305,26 +305,26 @@ function $69b0cc1932e5e4e0$export$6cd28814d92fa9c9(props, factory, context, inva
305
305
  }
306
306
 
307
307
 
308
- var $211c7c3899f4d75b$exports = {};
308
+ var $d80f40b5562dcac9$exports = {};
309
309
 
310
- $parcel$export($211c7c3899f4d75b$exports, "getItemCount", () => $211c7c3899f4d75b$export$77d5aafae4e095b2);
311
- const $211c7c3899f4d75b$var$cache = new WeakMap();
312
- function $211c7c3899f4d75b$export$77d5aafae4e095b2(collection) {
313
- let count = $211c7c3899f4d75b$var$cache.get(collection);
310
+ $parcel$export($d80f40b5562dcac9$exports, "getItemCount", () => $d80f40b5562dcac9$export$77d5aafae4e095b2);
311
+ const $d80f40b5562dcac9$var$cache = new WeakMap();
312
+ function $d80f40b5562dcac9$export$77d5aafae4e095b2(collection) {
313
+ let count = $d80f40b5562dcac9$var$cache.get(collection);
314
314
  if (count != null) return count;
315
315
  count = 0;
316
- for (let item of collection)if (item.type === 'section') count += $211c7c3899f4d75b$export$77d5aafae4e095b2(item.childNodes);
316
+ for (let item of collection)if (item.type === 'section') count += $d80f40b5562dcac9$export$77d5aafae4e095b2(item.childNodes);
317
317
  else count++;
318
- $211c7c3899f4d75b$var$cache.set(collection, count);
318
+ $d80f40b5562dcac9$var$cache.set(collection, count);
319
319
  return count;
320
320
  }
321
321
 
322
322
 
323
- $parcel$exportWildcard(module.exports, $37e0ebfb06ba9a87$exports);
324
- $parcel$exportWildcard(module.exports, $6f449c58ea5788c8$exports);
325
- $parcel$exportWildcard(module.exports, $d3a2d2e50150250a$exports);
326
- $parcel$exportWildcard(module.exports, $69b0cc1932e5e4e0$exports);
327
- $parcel$exportWildcard(module.exports, $211c7c3899f4d75b$exports);
323
+ $parcel$exportWildcard(module.exports, $67609abe41544c2f$exports);
324
+ $parcel$exportWildcard(module.exports, $7613fe6c851d27af$exports);
325
+ $parcel$exportWildcard(module.exports, $f0c95e4ecd513714$exports);
326
+ $parcel$exportWildcard(module.exports, $df8a726ef7511d2e$exports);
327
+ $parcel$exportWildcard(module.exports, $d80f40b5562dcac9$exports);
328
328
 
329
329
 
330
330
  //# sourceMappingURL=main.js.map
package/dist/module.js CHANGED
@@ -1,16 +1,16 @@
1
- import $bkJrn$react, {useMemo as $bkJrn$useMemo, useRef as $bkJrn$useRef} from "react";
1
+ import $hGDng$react, {useMemo as $hGDng$useMemo, useRef as $hGDng$useRef} from "react";
2
2
 
3
3
  function $parcel$export(e, n, v, s) {
4
4
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
5
5
  }
6
- var $6d3916c252bf594d$exports = {};
6
+ var $d80587bf41d0fb18$exports = {};
7
7
 
8
- $parcel$export($6d3916c252bf594d$exports, "Item", () => $6d3916c252bf594d$export$6d08773d2e66f8f2);
8
+ $parcel$export($d80587bf41d0fb18$exports, "Item", () => $d80587bf41d0fb18$export$6d08773d2e66f8f2);
9
9
 
10
- function $6d3916c252bf594d$var$Item(props) {
10
+ function $d80587bf41d0fb18$var$Item(props) {
11
11
  return null;
12
12
  }
13
- $6d3916c252bf594d$var$Item.getCollectionNode = function* getCollectionNode(props, context) {
13
+ $d80587bf41d0fb18$var$Item.getCollectionNode = function* getCollectionNode(props, context) {
14
14
  let { childItems: childItems , title: title , children: children } = props;
15
15
  let rendered = props.title || props.children;
16
16
  let textValue = props.textValue || (typeof rendered === 'string' ? rendered : '') || props['aria-label'] || '';
@@ -22,7 +22,7 @@ $6d3916c252bf594d$var$Item.getCollectionNode = function* getCollectionNode(props
22
22
  rendered: rendered,
23
23
  textValue: textValue,
24
24
  'aria-label': props['aria-label'],
25
- hasChildNodes: $6d3916c252bf594d$var$hasChildItems(props),
25
+ hasChildNodes: $d80587bf41d0fb18$var$hasChildItems(props),
26
26
  *childNodes () {
27
27
  if (childItems) for (let child1 of childItems)yield {
28
28
  type: 'item',
@@ -30,7 +30,7 @@ $6d3916c252bf594d$var$Item.getCollectionNode = function* getCollectionNode(props
30
30
  };
31
31
  else if (title) {
32
32
  let items = [];
33
- $bkJrn$react.Children.forEach(children, (child)=>{
33
+ $hGDng$react.Children.forEach(children, (child)=>{
34
34
  items.push({
35
35
  type: 'item',
36
36
  element: child
@@ -41,24 +41,24 @@ $6d3916c252bf594d$var$Item.getCollectionNode = function* getCollectionNode(props
41
41
  }
42
42
  };
43
43
  };
44
- function $6d3916c252bf594d$var$hasChildItems(props) {
44
+ function $d80587bf41d0fb18$var$hasChildItems(props) {
45
45
  if (props.hasChildItems != null) return props.hasChildItems;
46
46
  if (props.childItems) return true;
47
- if (props.title && $bkJrn$react.Children.count(props.children) > 0) return true;
47
+ if (props.title && $hGDng$react.Children.count(props.children) > 0) return true;
48
48
  return false;
49
49
  }
50
50
  // We don't want getCollectionNode to show up in the type definition
51
- let $6d3916c252bf594d$export$6d08773d2e66f8f2 = $6d3916c252bf594d$var$Item;
51
+ let $d80587bf41d0fb18$export$6d08773d2e66f8f2 = $d80587bf41d0fb18$var$Item;
52
52
 
53
53
 
54
- var $4f7c4e79589b00fc$exports = {};
54
+ var $591e4228be66f7fb$exports = {};
55
55
 
56
- $parcel$export($4f7c4e79589b00fc$exports, "Section", () => $4f7c4e79589b00fc$export$6e2c8f0811a474ce);
56
+ $parcel$export($591e4228be66f7fb$exports, "Section", () => $591e4228be66f7fb$export$6e2c8f0811a474ce);
57
57
 
58
- function $4f7c4e79589b00fc$var$Section(props) {
58
+ function $591e4228be66f7fb$var$Section(props) {
59
59
  return null;
60
60
  }
61
- $4f7c4e79589b00fc$var$Section.getCollectionNode = function* getCollectionNode(props) {
61
+ $591e4228be66f7fb$var$Section.getCollectionNode = function* getCollectionNode(props) {
62
62
  let { children: children , title: title , items: items1 } = props;
63
63
  yield {
64
64
  type: 'section',
@@ -75,7 +75,7 @@ $4f7c4e79589b00fc$var$Section.getCollectionNode = function* getCollectionNode(pr
75
75
  };
76
76
  } else {
77
77
  let items = [];
78
- $bkJrn$react.Children.forEach(children, (child)=>{
78
+ $hGDng$react.Children.forEach(children, (child)=>{
79
79
  items.push({
80
80
  type: 'item',
81
81
  element: child
@@ -87,20 +87,20 @@ $4f7c4e79589b00fc$var$Section.getCollectionNode = function* getCollectionNode(pr
87
87
  };
88
88
  };
89
89
  // We don't want getCollectionNode to show up in the type definition
90
- let $4f7c4e79589b00fc$export$6e2c8f0811a474ce = $4f7c4e79589b00fc$var$Section;
90
+ let $591e4228be66f7fb$export$6e2c8f0811a474ce = $591e4228be66f7fb$var$Section;
91
91
 
92
92
 
93
- var $4f269d7f0f8629e4$exports = {};
93
+ var $b8582cc7aa33d0e8$exports = {};
94
94
 
95
95
 
96
- var $9bac41136ddb5831$exports = {};
96
+ var $b0e94ff142179e1f$exports = {};
97
97
 
98
- $parcel$export($9bac41136ddb5831$exports, "useCollection", () => $9bac41136ddb5831$export$6cd28814d92fa9c9);
98
+ $parcel$export($b0e94ff142179e1f$exports, "useCollection", () => $b0e94ff142179e1f$export$6cd28814d92fa9c9);
99
99
 
100
- class $8ebb3d5cda0884fa$export$bf788dd355e3a401 {
100
+ class $0ef13e8a225e58db$export$bf788dd355e3a401 {
101
101
  build(props, context) {
102
102
  this.context = context;
103
- return $8ebb3d5cda0884fa$var$iterable(()=>this.iterateCollection(props)
103
+ return $0ef13e8a225e58db$var$iterable(()=>this.iterateCollection(props)
104
104
  );
105
105
  }
106
106
  *iterateCollection(props) {
@@ -114,7 +114,7 @@ class $8ebb3d5cda0884fa$export$bf788dd355e3a401 {
114
114
  });
115
115
  } else {
116
116
  let items = [];
117
- $bkJrn$react.Children.forEach(children, (child)=>{
117
+ $hGDng$react.Children.forEach(children, (child)=>{
118
118
  items.push(child);
119
119
  });
120
120
  let index = 0;
@@ -163,7 +163,7 @@ class $8ebb3d5cda0884fa$export$bf788dd355e3a401 {
163
163
  }
164
164
  // If there's an element with a getCollectionNode function on its type, then it's a supported component.
165
165
  // Call this function to get a partial node, and recursively build a full node from there.
166
- if ($bkJrn$react.isValidElement(element)) {
166
+ if ($hGDng$react.isValidElement(element)) {
167
167
  let type = element.type;
168
168
  if (typeof type !== 'function' && typeof type.getCollectionNode !== 'function') {
169
169
  let name = typeof element.type === 'function' ? element.type.name : element.type;
@@ -181,7 +181,7 @@ class $8ebb3d5cda0884fa$export$bf788dd355e3a401 {
181
181
  ...childNode,
182
182
  key: nodeKey,
183
183
  index: index,
184
- wrapper: $8ebb3d5cda0884fa$var$compose(partialNode.wrapper, childNode.wrapper)
184
+ wrapper: $0ef13e8a225e58db$var$compose(partialNode.wrapper, childNode.wrapper)
185
185
  }, this.getChildState(state, childNode), parentKey ? `${parentKey}${element.key}` : element.key, parentNode);
186
186
  let children = [
187
187
  ...nodes
@@ -192,7 +192,7 @@ class $8ebb3d5cda0884fa$export$bf788dd355e3a401 {
192
192
  if (node.value) this.cache.set(node.value, node);
193
193
  // The partial node may have specified a type for the child in order to specify a constraint.
194
194
  // Verify that the full node that was built recursively matches this type.
195
- if (partialNode.type && node.type !== partialNode.type) throw new Error(`Unsupported type <${$8ebb3d5cda0884fa$var$capitalize(node.type)}> in <${$8ebb3d5cda0884fa$var$capitalize(parentNode.type)}>. Only <${$8ebb3d5cda0884fa$var$capitalize(partialNode.type)}> is supported.`);
195
+ if (partialNode.type && node.type !== partialNode.type) throw new Error(`Unsupported type <${$0ef13e8a225e58db$var$capitalize(node.type)}> in <${$0ef13e8a225e58db$var$capitalize(parentNode.type)}>. Only <${$0ef13e8a225e58db$var$capitalize(partialNode.type)}> is supported.`);
196
196
  index++;
197
197
  yield node;
198
198
  }
@@ -218,7 +218,7 @@ class $8ebb3d5cda0884fa$export$bf788dd355e3a401 {
218
218
  wrapper: partialNode.wrapper,
219
219
  shouldInvalidate: partialNode.shouldInvalidate,
220
220
  hasChildNodes: partialNode.hasChildNodes,
221
- childNodes: $8ebb3d5cda0884fa$var$iterable(function*() {
221
+ childNodes: $0ef13e8a225e58db$var$iterable(function*() {
222
222
  if (!partialNode.hasChildNodes) return;
223
223
  let index = 0;
224
224
  for (let child of partialNode.childNodes()){
@@ -240,7 +240,7 @@ class $8ebb3d5cda0884fa$export$bf788dd355e3a401 {
240
240
  }
241
241
  }
242
242
  // Wraps an iterator function as an iterable object, and caches the results.
243
- function $8ebb3d5cda0884fa$var$iterable(iterator) {
243
+ function $0ef13e8a225e58db$var$iterable(iterator) {
244
244
  let cache = [];
245
245
  let iterable = null;
246
246
  return {
@@ -254,23 +254,23 @@ function $8ebb3d5cda0884fa$var$iterable(iterator) {
254
254
  }
255
255
  };
256
256
  }
257
- function $8ebb3d5cda0884fa$var$compose(outer, inner) {
257
+ function $0ef13e8a225e58db$var$compose(outer, inner) {
258
258
  if (outer && inner) return (element)=>outer(inner(element))
259
259
  ;
260
260
  if (outer) return outer;
261
261
  if (inner) return inner;
262
262
  }
263
- function $8ebb3d5cda0884fa$var$capitalize(str) {
263
+ function $0ef13e8a225e58db$var$capitalize(str) {
264
264
  return str[0].toUpperCase() + str.slice(1);
265
265
  }
266
266
 
267
267
 
268
268
 
269
- function $9bac41136ddb5831$export$6cd28814d92fa9c9(props, factory, context, invalidators = []) {
270
- let builder = $bkJrn$useMemo(()=>new $8ebb3d5cda0884fa$export$bf788dd355e3a401()
269
+ function $b0e94ff142179e1f$export$6cd28814d92fa9c9(props, factory, context, invalidators = []) {
270
+ let builder = $hGDng$useMemo(()=>new $0ef13e8a225e58db$export$bf788dd355e3a401()
271
271
  , []);
272
- let prev = $bkJrn$useRef(null);
273
- return $bkJrn$useMemo(()=>{
272
+ let prev = $hGDng$useRef(null);
273
+ return $hGDng$useMemo(()=>{
274
274
  let nodes = builder.build(props, context);
275
275
  prev.current = factory(nodes, prev.current);
276
276
  return prev.current;
@@ -286,22 +286,22 @@ function $9bac41136ddb5831$export$6cd28814d92fa9c9(props, factory, context, inva
286
286
  }
287
287
 
288
288
 
289
- var $971e16ca5268614a$exports = {};
289
+ var $a5bc6066b2ba167e$exports = {};
290
290
 
291
- $parcel$export($971e16ca5268614a$exports, "getItemCount", () => $971e16ca5268614a$export$77d5aafae4e095b2);
292
- const $971e16ca5268614a$var$cache = new WeakMap();
293
- function $971e16ca5268614a$export$77d5aafae4e095b2(collection) {
294
- let count = $971e16ca5268614a$var$cache.get(collection);
291
+ $parcel$export($a5bc6066b2ba167e$exports, "getItemCount", () => $a5bc6066b2ba167e$export$77d5aafae4e095b2);
292
+ const $a5bc6066b2ba167e$var$cache = new WeakMap();
293
+ function $a5bc6066b2ba167e$export$77d5aafae4e095b2(collection) {
294
+ let count = $a5bc6066b2ba167e$var$cache.get(collection);
295
295
  if (count != null) return count;
296
296
  count = 0;
297
- for (let item of collection)if (item.type === 'section') count += $971e16ca5268614a$export$77d5aafae4e095b2(item.childNodes);
297
+ for (let item of collection)if (item.type === 'section') count += $a5bc6066b2ba167e$export$77d5aafae4e095b2(item.childNodes);
298
298
  else count++;
299
- $971e16ca5268614a$var$cache.set(collection, count);
299
+ $a5bc6066b2ba167e$var$cache.set(collection, count);
300
300
  return count;
301
301
  }
302
302
 
303
303
 
304
304
 
305
305
 
306
- export {$6d3916c252bf594d$export$6d08773d2e66f8f2 as Item, $4f7c4e79589b00fc$export$6e2c8f0811a474ce as Section, $9bac41136ddb5831$export$6cd28814d92fa9c9 as useCollection, $971e16ca5268614a$export$77d5aafae4e095b2 as getItemCount};
306
+ export {$d80587bf41d0fb18$export$6d08773d2e66f8f2 as Item, $591e4228be66f7fb$export$6e2c8f0811a474ce as Section, $b0e94ff142179e1f$export$6cd28814d92fa9c9 as useCollection, $a5bc6066b2ba167e$export$77d5aafae4e095b2 as getItemCount};
307
307
  //# sourceMappingURL=module.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-stately/collections",
3
- "version": "3.0.0-nightly.1394+dfe72ee07",
3
+ "version": "3.0.0-nightly.1395+b2abc5d94",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@babel/runtime": "^7.6.2",
21
- "@react-types/shared": "3.0.0-nightly.1394+dfe72ee07"
21
+ "@react-types/shared": "3.0.0-nightly.1395+b2abc5d94"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "react": "^16.8.0 || ^17.0.0-rc.1"
@@ -26,5 +26,5 @@
26
26
  "publishConfig": {
27
27
  "access": "public"
28
28
  },
29
- "gitHead": "dfe72ee076f7ca27728d0b6b4c1ef86e11191ece"
29
+ "gitHead": "b2abc5d94162a7bd614fffcdf11e3d3754dc7d9f"
30
30
  }