@ariakit/core 0.3.10 → 0.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/cjs/__chunks/{ZXCB7MXN.cjs → BFE5R4EZ.cjs} +17 -17
  3. package/cjs/__chunks/{Y6PHIDP6.cjs → E53JW5BD.cjs} +12 -12
  4. package/cjs/__chunks/{5CBCKBZ2.cjs → F6HPKLO2.cjs} +12 -12
  5. package/cjs/__chunks/{MFSCSSBJ.cjs → I3Y4EXEF.cjs} +2 -2
  6. package/cjs/__chunks/{3UT5FE6K.cjs → KBNYGXWI.cjs} +3 -0
  7. package/cjs/__chunks/{YLMJBIQM.cjs → MI6NUQYQ.cjs} +22 -13
  8. package/cjs/__chunks/{CWDUO5EV.cjs → NOFH2BLB.cjs} +7 -7
  9. package/cjs/__chunks/{MWNFQD55.cjs → OTVLDMN2.cjs} +16 -16
  10. package/cjs/__chunks/{HMO4CKUP.cjs → TQTGWD5K.cjs} +10 -10
  11. package/cjs/checkbox/checkbox-store.cjs +5 -5
  12. package/cjs/collection/collection-store.cjs +4 -4
  13. package/cjs/combobox/combobox-store.cjs +32 -32
  14. package/cjs/composite/composite-overflow-store.cjs +6 -6
  15. package/cjs/composite/composite-store.cjs +5 -5
  16. package/cjs/dialog/dialog-store.cjs +5 -5
  17. package/cjs/disclosure/disclosure-store.cjs +4 -4
  18. package/cjs/form/form-store.cjs +23 -23
  19. package/cjs/form/form-store.d.cts +1 -1
  20. package/cjs/form/form-store.d.ts +1 -1
  21. package/cjs/hovercard/hovercard-store.cjs +7 -7
  22. package/cjs/hovercard/hovercard-store.d.cts +14 -7
  23. package/cjs/hovercard/hovercard-store.d.ts +14 -7
  24. package/cjs/menu/menu-bar-store.cjs +6 -6
  25. package/cjs/menu/menu-store.cjs +26 -26
  26. package/cjs/menu/menu-store.d.cts +16 -7
  27. package/cjs/menu/menu-store.d.ts +16 -7
  28. package/cjs/menubar/menubar-store.cjs +6 -6
  29. package/cjs/popover/popover-store.cjs +6 -6
  30. package/cjs/popover/popover-store.d.cts +31 -6
  31. package/cjs/popover/popover-store.d.ts +31 -6
  32. package/cjs/radio/radio-store.cjs +8 -8
  33. package/cjs/radio/radio-store.d.cts +2 -1
  34. package/cjs/radio/radio-store.d.ts +2 -1
  35. package/cjs/select/select-store.cjs +28 -28
  36. package/cjs/select/select-store.d.cts +2 -1
  37. package/cjs/select/select-store.d.ts +2 -1
  38. package/cjs/tab/tab-store.cjs +20 -20
  39. package/cjs/tab/tab-store.d.cts +5 -11
  40. package/cjs/tab/tab-store.d.ts +5 -11
  41. package/cjs/toolbar/toolbar-store.cjs +7 -7
  42. package/cjs/toolbar/toolbar-store.d.cts +2 -6
  43. package/cjs/toolbar/toolbar-store.d.ts +2 -6
  44. package/cjs/tooltip/tooltip-store.cjs +12 -12
  45. package/cjs/tooltip/tooltip-store.d.cts +6 -4
  46. package/cjs/tooltip/tooltip-store.d.ts +6 -4
  47. package/cjs/utils/misc.cjs +2 -2
  48. package/cjs/utils/store.cjs +3 -3
  49. package/esm/__chunks/{MYUKSFP5.js → 22K762VQ.js} +13 -4
  50. package/esm/__chunks/{AKMSZ36N.js → AF6IUUFN.js} +3 -3
  51. package/esm/__chunks/{K6ELJFXN.js → EAHJFCU4.js} +1 -1
  52. package/esm/__chunks/{VEUNYQYR.js → IERTEJ3A.js} +3 -3
  53. package/esm/__chunks/{QJ5CUA32.js → SOLWE6E5.js} +3 -3
  54. package/esm/__chunks/{25MEC56I.js → SX2XFD6A.js} +1 -1
  55. package/esm/__chunks/{UUFF4PQ6.js → XU3EOSCU.js} +3 -3
  56. package/esm/__chunks/{I2VQ3XGR.js → Y3OOHFCN.js} +3 -0
  57. package/esm/__chunks/{L5RYKTVQ.js → Z5IGYIPT.js} +2 -2
  58. package/esm/checkbox/checkbox-store.js +2 -2
  59. package/esm/collection/collection-store.js +3 -3
  60. package/esm/combobox/combobox-store.js +7 -7
  61. package/esm/composite/composite-overflow-store.js +5 -5
  62. package/esm/composite/composite-store.js +4 -4
  63. package/esm/dialog/dialog-store.js +4 -4
  64. package/esm/disclosure/disclosure-store.js +3 -3
  65. package/esm/form/form-store.d.ts +1 -1
  66. package/esm/form/form-store.js +3 -3
  67. package/esm/hovercard/hovercard-store.d.ts +14 -7
  68. package/esm/hovercard/hovercard-store.js +6 -6
  69. package/esm/menu/menu-bar-store.js +5 -5
  70. package/esm/menu/menu-store.d.ts +16 -7
  71. package/esm/menu/menu-store.js +8 -8
  72. package/esm/menubar/menubar-store.js +5 -5
  73. package/esm/popover/popover-store.d.ts +31 -6
  74. package/esm/popover/popover-store.js +5 -5
  75. package/esm/radio/radio-store.d.ts +2 -1
  76. package/esm/radio/radio-store.js +4 -4
  77. package/esm/select/select-store.d.ts +2 -1
  78. package/esm/select/select-store.js +7 -7
  79. package/esm/tab/tab-store.d.ts +5 -11
  80. package/esm/tab/tab-store.js +4 -4
  81. package/esm/toolbar/toolbar-store.d.ts +2 -6
  82. package/esm/toolbar/toolbar-store.js +4 -4
  83. package/esm/tooltip/tooltip-store.d.ts +6 -4
  84. package/esm/tooltip/tooltip-store.js +6 -6
  85. package/esm/utils/misc.js +1 -1
  86. package/esm/utils/store.js +2 -2
  87. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @ariakit/core
2
2
 
3
+ ## 0.3.11
4
+
5
+ ### Improved performance of large collections
6
+
7
+ Components like [`MenuItem`](https://ariakit.org/reference/menu-item), [`ComboboxItem`](https://ariakit.org/reference/combobox-item), and [`SelectItem`](https://ariakit.org/reference/select-item) should now offer improved performance when rendering large collections.
8
+
9
+ ### Other updates
10
+
11
+ - Improved JSDocs.
12
+
3
13
  ## 0.3.10
4
14
 
5
15
  - Fixed [`CompositeItem`](https://ariakit.org/reference/composite-item) triggering blur on focus.
@@ -1,15 +1,15 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _YLMJBIQMcjs = require('./YLMJBIQM.cjs');
4
+ var _MI6NUQYQcjs = require('./MI6NUQYQ.cjs');
5
5
 
6
6
 
7
7
 
8
8
 
9
- var _5CBCKBZ2cjs = require('./5CBCKBZ2.cjs');
9
+ var _F6HPKLO2cjs = require('./F6HPKLO2.cjs');
10
10
 
11
11
 
12
- var _3UT5FE6Kcjs = require('./3UT5FE6K.cjs');
12
+ var _KBNYGXWIcjs = require('./KBNYGXWI.cjs');
13
13
 
14
14
 
15
15
 
@@ -124,40 +124,40 @@ function verticalizeItems(items) {
124
124
  function createCompositeStore(props = {}) {
125
125
  var _a;
126
126
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
127
- const collection = _YLMJBIQMcjs.createCollectionStore.call(void 0, props);
128
- const activeId = _3UT5FE6Kcjs.defaultValue.call(void 0,
127
+ const collection = _MI6NUQYQcjs.createCollectionStore.call(void 0, props);
128
+ const activeId = _KBNYGXWIcjs.defaultValue.call(void 0,
129
129
  props.activeId,
130
130
  syncState == null ? void 0 : syncState.activeId,
131
131
  props.defaultActiveId
132
132
  );
133
133
  const initialState = _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, collection.getState()), {
134
134
  activeId,
135
- baseElement: _3UT5FE6Kcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.baseElement, null),
136
- includesBaseElement: _3UT5FE6Kcjs.defaultValue.call(void 0,
135
+ baseElement: _KBNYGXWIcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.baseElement, null),
136
+ includesBaseElement: _KBNYGXWIcjs.defaultValue.call(void 0,
137
137
  props.includesBaseElement,
138
138
  syncState == null ? void 0 : syncState.includesBaseElement,
139
139
  activeId === null
140
140
  ),
141
- moves: _3UT5FE6Kcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.moves, 0),
142
- orientation: _3UT5FE6Kcjs.defaultValue.call(void 0,
141
+ moves: _KBNYGXWIcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.moves, 0),
142
+ orientation: _KBNYGXWIcjs.defaultValue.call(void 0,
143
143
  props.orientation,
144
144
  syncState == null ? void 0 : syncState.orientation,
145
145
  "both"
146
146
  ),
147
- rtl: _3UT5FE6Kcjs.defaultValue.call(void 0, props.rtl, syncState == null ? void 0 : syncState.rtl, false),
148
- virtualFocus: _3UT5FE6Kcjs.defaultValue.call(void 0,
147
+ rtl: _KBNYGXWIcjs.defaultValue.call(void 0, props.rtl, syncState == null ? void 0 : syncState.rtl, false),
148
+ virtualFocus: _KBNYGXWIcjs.defaultValue.call(void 0,
149
149
  props.virtualFocus,
150
150
  syncState == null ? void 0 : syncState.virtualFocus,
151
151
  false
152
152
  ),
153
- focusLoop: _3UT5FE6Kcjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, false),
154
- focusWrap: _3UT5FE6Kcjs.defaultValue.call(void 0, props.focusWrap, syncState == null ? void 0 : syncState.focusWrap, false),
155
- focusShift: _3UT5FE6Kcjs.defaultValue.call(void 0, props.focusShift, syncState == null ? void 0 : syncState.focusShift, false)
153
+ focusLoop: _KBNYGXWIcjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, false),
154
+ focusWrap: _KBNYGXWIcjs.defaultValue.call(void 0, props.focusWrap, syncState == null ? void 0 : syncState.focusWrap, false),
155
+ focusShift: _KBNYGXWIcjs.defaultValue.call(void 0, props.focusShift, syncState == null ? void 0 : syncState.focusShift, false)
156
156
  });
157
- const composite = _5CBCKBZ2cjs.createStore.call(void 0, initialState, collection, props.store);
158
- _5CBCKBZ2cjs.setup.call(void 0,
157
+ const composite = _F6HPKLO2cjs.createStore.call(void 0, initialState, collection, props.store);
158
+ _F6HPKLO2cjs.setup.call(void 0,
159
159
  composite,
160
- () => _5CBCKBZ2cjs.sync.call(void 0, composite, ["renderedItems", "activeId"], (state) => {
160
+ () => _F6HPKLO2cjs.sync.call(void 0, composite, ["renderedItems", "activeId"], (state) => {
161
161
  composite.setState("activeId", (activeId2) => {
162
162
  var _a2;
163
163
  if (activeId2 !== void 0)
@@ -1,16 +1,16 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _MFSCSSBJcjs = require('./MFSCSSBJ.cjs');
4
+ var _I3Y4EXEFcjs = require('./I3Y4EXEF.cjs');
5
5
 
6
6
 
7
7
 
8
8
 
9
9
 
10
- var _5CBCKBZ2cjs = require('./5CBCKBZ2.cjs');
10
+ var _F6HPKLO2cjs = require('./F6HPKLO2.cjs');
11
11
 
12
12
 
13
- var _3UT5FE6Kcjs = require('./3UT5FE6K.cjs');
13
+ var _KBNYGXWIcjs = require('./KBNYGXWI.cjs');
14
14
 
15
15
 
16
16
 
@@ -24,9 +24,9 @@ function createPopoverStore(_a = {}) {
24
24
  } = _b, props = _AV6KTKLEcjs.__objRest.call(void 0, _b, [
25
25
  "popover"
26
26
  ]);
27
- const store = _5CBCKBZ2cjs.mergeStore.call(void 0,
27
+ const store = _F6HPKLO2cjs.mergeStore.call(void 0,
28
28
  props.store,
29
- _5CBCKBZ2cjs.omit.call(void 0, otherPopover, [
29
+ _F6HPKLO2cjs.omit.call(void 0, otherPopover, [
30
30
  "arrowElement",
31
31
  "anchorElement",
32
32
  "contentElement",
@@ -34,10 +34,10 @@ function createPopoverStore(_a = {}) {
34
34
  "disclosureElement"
35
35
  ])
36
36
  );
37
- _5CBCKBZ2cjs.throwOnConflictingProps.call(void 0, props, store);
37
+ _F6HPKLO2cjs.throwOnConflictingProps.call(void 0, props, store);
38
38
  const syncState = store == null ? void 0 : store.getState();
39
- const dialog = _MFSCSSBJcjs.createDialogStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), { store }));
40
- const placement = _3UT5FE6Kcjs.defaultValue.call(void 0,
39
+ const dialog = _I3Y4EXEFcjs.createDialogStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), { store }));
40
+ const placement = _KBNYGXWIcjs.defaultValue.call(void 0,
41
41
  props.placement,
42
42
  syncState == null ? void 0 : syncState.placement,
43
43
  "bottom"
@@ -45,12 +45,12 @@ function createPopoverStore(_a = {}) {
45
45
  const initialState = _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, dialog.getState()), {
46
46
  placement,
47
47
  currentPlacement: placement,
48
- anchorElement: _3UT5FE6Kcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.anchorElement, null),
49
- popoverElement: _3UT5FE6Kcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.popoverElement, null),
50
- arrowElement: _3UT5FE6Kcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.arrowElement, null),
48
+ anchorElement: _KBNYGXWIcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.anchorElement, null),
49
+ popoverElement: _KBNYGXWIcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.popoverElement, null),
50
+ arrowElement: _KBNYGXWIcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.arrowElement, null),
51
51
  rendered: Symbol("rendered")
52
52
  });
53
- const popover = _5CBCKBZ2cjs.createStore.call(void 0, initialState, dialog, store);
53
+ const popover = _F6HPKLO2cjs.createStore.call(void 0, initialState, dialog, store);
54
54
  return _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, dialog), popover), {
55
55
  setAnchorElement: (element) => popover.setState("anchorElement", element),
56
56
  setPopoverElement: (element) => popover.setState("popoverElement", element),
@@ -8,7 +8,7 @@
8
8
 
9
9
 
10
10
 
11
- var _3UT5FE6Kcjs = require('./3UT5FE6K.cjs');
11
+ var _KBNYGXWIcjs = require('./KBNYGXWI.cjs');
12
12
 
13
13
 
14
14
 
@@ -17,14 +17,14 @@ var _AV6KTKLEcjs = require('./AV6KTKLE.cjs');
17
17
  // src/utils/store.ts
18
18
  function getInternal(store, key) {
19
19
  const internals = store.__unstableInternals;
20
- _3UT5FE6Kcjs.invariant.call(void 0, internals, "Invalid store");
20
+ _KBNYGXWIcjs.invariant.call(void 0, internals, "Invalid store");
21
21
  return internals[key];
22
22
  }
23
23
  function createStore(initialState, ...stores) {
24
24
  let state = initialState;
25
25
  let prevStateBatch = state;
26
26
  let lastUpdate = Symbol();
27
- let destroy = _3UT5FE6Kcjs.noop;
27
+ let destroy = _KBNYGXWIcjs.noop;
28
28
  const instances = /* @__PURE__ */ new Set();
29
29
  const updatedKeys = /* @__PURE__ */ new Set();
30
30
  const setups = /* @__PURE__ */ new Set();
@@ -48,14 +48,14 @@ function createStore(initialState, ...stores) {
48
48
  };
49
49
  if (initialized)
50
50
  return maybeDestroy;
51
- const desyncs = _3UT5FE6Kcjs.getKeys.call(void 0, state).map(
52
- (key) => _3UT5FE6Kcjs.chain.call(void 0,
51
+ const desyncs = _KBNYGXWIcjs.getKeys.call(void 0, state).map(
52
+ (key) => _KBNYGXWIcjs.chain.call(void 0,
53
53
  ...stores.map((store) => {
54
54
  var _a;
55
55
  const storeState = (_a = store == null ? void 0 : store.getState) == null ? void 0 : _a.call(store);
56
56
  if (!storeState)
57
57
  return;
58
- if (!_3UT5FE6Kcjs.hasOwnProperty.call(void 0, storeState, key))
58
+ if (!_KBNYGXWIcjs.hasOwnProperty.call(void 0, storeState, key))
59
59
  return;
60
60
  return sync(store, [key], (state2) => {
61
61
  setState(
@@ -72,7 +72,7 @@ function createStore(initialState, ...stores) {
72
72
  const teardowns = [];
73
73
  setups.forEach((setup2) => teardowns.push(setup2()));
74
74
  const cleanups = stores.map(init);
75
- destroy = _3UT5FE6Kcjs.chain.call(void 0, ...desyncs, ...teardowns, ...cleanups);
75
+ destroy = _KBNYGXWIcjs.chain.call(void 0, ...desyncs, ...teardowns, ...cleanups);
76
76
  return maybeDestroy;
77
77
  };
78
78
  const sub = (keys, listener, set = listeners) => {
@@ -95,13 +95,13 @@ function createStore(initialState, ...stores) {
95
95
  disposables.set(listener, listener(state, prevStateBatch));
96
96
  return sub(keys, listener, batchListeners);
97
97
  };
98
- const storePick = (keys) => createStore(_3UT5FE6Kcjs.pick.call(void 0, state, keys), finalStore);
99
- const storeOmit = (keys) => createStore(_3UT5FE6Kcjs.omit.call(void 0, state, keys), finalStore);
98
+ const storePick = (keys) => createStore(_KBNYGXWIcjs.pick.call(void 0, state, keys), finalStore);
99
+ const storeOmit = (keys) => createStore(_KBNYGXWIcjs.omit.call(void 0, state, keys), finalStore);
100
100
  const getState = () => state;
101
101
  const setState = (key, value, fromStores = false) => {
102
- if (!_3UT5FE6Kcjs.hasOwnProperty.call(void 0, state, key))
102
+ if (!_KBNYGXWIcjs.hasOwnProperty.call(void 0, state, key))
103
103
  return;
104
- const nextValue = _3UT5FE6Kcjs.applyState.call(void 0, value, state[key]);
104
+ const nextValue = _KBNYGXWIcjs.applyState.call(void 0, value, state[key]);
105
105
  if (nextValue === state[key])
106
106
  return;
107
107
  if (!fromStores) {
@@ -213,7 +213,7 @@ function throwOnConflictingProps(props, store) {
213
213
  return;
214
214
  const storeState = store.getState();
215
215
  const conflictingProps = defaultKeys.filter(
216
- (key) => _3UT5FE6Kcjs.hasOwnProperty.call(void 0, storeState, key)
216
+ (key) => _KBNYGXWIcjs.hasOwnProperty.call(void 0, storeState, key)
217
217
  );
218
218
  if (!conflictingProps.length)
219
219
  return;
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _MWNFQD55cjs = require('./MWNFQD55.cjs');
4
+ var _OTVLDMN2cjs = require('./OTVLDMN2.cjs');
5
5
 
6
6
  // src/dialog/dialog-store.ts
7
7
  function createDialogStore(props = {}) {
8
- return _MWNFQD55cjs.createDisclosureStore.call(void 0, props);
8
+ return _OTVLDMN2cjs.createDisclosureStore.call(void 0, props);
9
9
  }
10
10
 
11
11
 
@@ -63,6 +63,9 @@ function isInteger(arg) {
63
63
  return String(Math.floor(Number(arg))) === arg;
64
64
  }
65
65
  function hasOwnProperty(object, prop) {
66
+ if (typeof Object.hasOwn === "function") {
67
+ return Object.hasOwn(object, prop);
68
+ }
66
69
  return Object.prototype.hasOwnProperty.call(object, prop);
67
70
  }
68
71
  function chain(...fns) {
@@ -5,11 +5,11 @@
5
5
 
6
6
 
7
7
 
8
- var _5CBCKBZ2cjs = require('./5CBCKBZ2.cjs');
8
+ var _F6HPKLO2cjs = require('./F6HPKLO2.cjs');
9
9
 
10
10
 
11
11
 
12
- var _3UT5FE6Kcjs = require('./3UT5FE6K.cjs');
12
+ var _KBNYGXWIcjs = require('./KBNYGXWI.cjs');
13
13
 
14
14
 
15
15
  var _5F4DVUNScjs = require('./5F4DVUNS.cjs');
@@ -69,9 +69,9 @@ function getPrivateStore(store) {
69
69
  }
70
70
  function createCollectionStore(props = {}) {
71
71
  var _a;
72
- _5CBCKBZ2cjs.throwOnConflictingProps.call(void 0, props, props.store);
72
+ _F6HPKLO2cjs.throwOnConflictingProps.call(void 0, props, props.store);
73
73
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
74
- const items = _3UT5FE6Kcjs.defaultValue.call(void 0,
74
+ const items = _KBNYGXWIcjs.defaultValue.call(void 0,
75
75
  props.items,
76
76
  syncState == null ? void 0 : syncState.items,
77
77
  props.defaultItems,
@@ -80,22 +80,27 @@ function createCollectionStore(props = {}) {
80
80
  const itemsMap = new Map(items.map((item) => [item.id, item]));
81
81
  const initialState = {
82
82
  items,
83
- renderedItems: _3UT5FE6Kcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.renderedItems, [])
83
+ renderedItems: _KBNYGXWIcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.renderedItems, [])
84
84
  };
85
85
  const syncPrivateStore = getPrivateStore(props.store);
86
- const privateStore = _5CBCKBZ2cjs.createStore.call(void 0,
87
- { renderedItems: initialState.renderedItems },
86
+ const privateStore = _F6HPKLO2cjs.createStore.call(void 0,
87
+ { items, renderedItems: initialState.renderedItems },
88
88
  syncPrivateStore
89
89
  );
90
- const collection = _5CBCKBZ2cjs.createStore.call(void 0, initialState, props.store);
90
+ const collection = _F6HPKLO2cjs.createStore.call(void 0, initialState, props.store);
91
91
  const sortItems = (renderedItems) => {
92
92
  const sortedItems = sortBasedOnDOMPosition(renderedItems);
93
93
  privateStore.setState("renderedItems", sortedItems);
94
94
  collection.setState("renderedItems", sortedItems);
95
95
  };
96
- _5CBCKBZ2cjs.setup.call(void 0, collection, () => _5CBCKBZ2cjs.init.call(void 0, privateStore));
97
- _5CBCKBZ2cjs.setup.call(void 0, privateStore, () => {
98
- return _5CBCKBZ2cjs.batch.call(void 0, privateStore, ["renderedItems"], (state) => {
96
+ _F6HPKLO2cjs.setup.call(void 0, collection, () => _F6HPKLO2cjs.init.call(void 0, privateStore));
97
+ _F6HPKLO2cjs.setup.call(void 0, privateStore, () => {
98
+ return _F6HPKLO2cjs.batch.call(void 0, privateStore, ["items"], (state) => {
99
+ collection.setState("items", state.items);
100
+ });
101
+ });
102
+ _F6HPKLO2cjs.setup.call(void 0, privateStore, () => {
103
+ return _F6HPKLO2cjs.batch.call(void 0, privateStore, ["renderedItems"], (state) => {
99
104
  let firstRun = true;
100
105
  let raf = requestAnimationFrame(() => {
101
106
  const { renderedItems } = collection.getState();
@@ -162,10 +167,14 @@ function createCollectionStore(props = {}) {
162
167
  };
163
168
  return unmergeItem;
164
169
  };
165
- const registerItem = (item) => mergeItem(item, (getItems) => collection.setState("items", getItems), true);
170
+ const registerItem = (item) => mergeItem(
171
+ item,
172
+ (getItems) => privateStore.setState("items", getItems),
173
+ true
174
+ );
166
175
  return _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, collection), {
167
176
  registerItem,
168
- renderItem: (item) => _3UT5FE6Kcjs.chain.call(void 0,
177
+ renderItem: (item) => _KBNYGXWIcjs.chain.call(void 0,
169
178
  registerItem(item),
170
179
  mergeItem(
171
180
  item,
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _ZXCB7MXNcjs = require('./ZXCB7MXN.cjs');
4
+ var _BFE5R4EZcjs = require('./BFE5R4EZ.cjs');
5
5
 
6
6
 
7
- var _5CBCKBZ2cjs = require('./5CBCKBZ2.cjs');
7
+ var _F6HPKLO2cjs = require('./F6HPKLO2.cjs');
8
8
 
9
9
 
10
- var _3UT5FE6Kcjs = require('./3UT5FE6K.cjs');
10
+ var _KBNYGXWIcjs = require('./KBNYGXWI.cjs');
11
11
 
12
12
 
13
13
 
@@ -17,16 +17,16 @@ var _AV6KTKLEcjs = require('./AV6KTKLE.cjs');
17
17
  function createMenubarStore(props = {}) {
18
18
  var _a;
19
19
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
20
- const composite = _ZXCB7MXNcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
21
- orientation: _3UT5FE6Kcjs.defaultValue.call(void 0,
20
+ const composite = _BFE5R4EZcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
21
+ orientation: _KBNYGXWIcjs.defaultValue.call(void 0,
22
22
  props.orientation,
23
23
  syncState == null ? void 0 : syncState.orientation,
24
24
  "horizontal"
25
25
  ),
26
- focusLoop: _3UT5FE6Kcjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
26
+ focusLoop: _KBNYGXWIcjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
27
27
  }));
28
28
  const initialState = _AV6KTKLEcjs.__spreadValues.call(void 0, {}, composite.getState());
29
- const menubar = _5CBCKBZ2cjs.createStore.call(void 0, initialState, composite, props.store);
29
+ const menubar = _F6HPKLO2cjs.createStore.call(void 0, initialState, composite, props.store);
30
30
  return _AV6KTKLEcjs.__spreadValues.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, composite), menubar);
31
31
  }
32
32
 
@@ -7,10 +7,10 @@
7
7
 
8
8
 
9
9
 
10
- var _5CBCKBZ2cjs = require('./5CBCKBZ2.cjs');
10
+ var _F6HPKLO2cjs = require('./F6HPKLO2.cjs');
11
11
 
12
12
 
13
- var _3UT5FE6Kcjs = require('./3UT5FE6K.cjs');
13
+ var _KBNYGXWIcjs = require('./KBNYGXWI.cjs');
14
14
 
15
15
 
16
16
 
@@ -18,47 +18,47 @@ var _AV6KTKLEcjs = require('./AV6KTKLE.cjs');
18
18
 
19
19
  // src/disclosure/disclosure-store.ts
20
20
  function createDisclosureStore(props = {}) {
21
- const store = _5CBCKBZ2cjs.mergeStore.call(void 0,
21
+ const store = _F6HPKLO2cjs.mergeStore.call(void 0,
22
22
  props.store,
23
- _5CBCKBZ2cjs.omit.call(void 0, props.disclosure, ["contentElement", "disclosureElement"])
23
+ _F6HPKLO2cjs.omit.call(void 0, props.disclosure, ["contentElement", "disclosureElement"])
24
24
  );
25
- _5CBCKBZ2cjs.throwOnConflictingProps.call(void 0, props, store);
25
+ _F6HPKLO2cjs.throwOnConflictingProps.call(void 0, props, store);
26
26
  const syncState = store == null ? void 0 : store.getState();
27
- const open = _3UT5FE6Kcjs.defaultValue.call(void 0,
27
+ const open = _KBNYGXWIcjs.defaultValue.call(void 0,
28
28
  props.open,
29
29
  syncState == null ? void 0 : syncState.open,
30
30
  props.defaultOpen,
31
31
  false
32
32
  );
33
- const animated = _3UT5FE6Kcjs.defaultValue.call(void 0, props.animated, syncState == null ? void 0 : syncState.animated, false);
33
+ const animated = _KBNYGXWIcjs.defaultValue.call(void 0, props.animated, syncState == null ? void 0 : syncState.animated, false);
34
34
  const initialState = {
35
35
  open,
36
36
  animated,
37
37
  animating: !!animated && open,
38
38
  mounted: open,
39
- contentElement: _3UT5FE6Kcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.contentElement, null),
40
- disclosureElement: _3UT5FE6Kcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.disclosureElement, null)
39
+ contentElement: _KBNYGXWIcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.contentElement, null),
40
+ disclosureElement: _KBNYGXWIcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.disclosureElement, null)
41
41
  };
42
- const disclosure = _5CBCKBZ2cjs.createStore.call(void 0, initialState, store);
43
- _5CBCKBZ2cjs.setup.call(void 0,
42
+ const disclosure = _F6HPKLO2cjs.createStore.call(void 0, initialState, store);
43
+ _F6HPKLO2cjs.setup.call(void 0,
44
44
  disclosure,
45
- () => _5CBCKBZ2cjs.sync.call(void 0, disclosure, ["animated", "animating"], (state) => {
45
+ () => _F6HPKLO2cjs.sync.call(void 0, disclosure, ["animated", "animating"], (state) => {
46
46
  if (state.animated)
47
47
  return;
48
48
  disclosure.setState("animating", false);
49
49
  })
50
50
  );
51
- _5CBCKBZ2cjs.setup.call(void 0,
51
+ _F6HPKLO2cjs.setup.call(void 0,
52
52
  disclosure,
53
- () => _5CBCKBZ2cjs.subscribe.call(void 0, disclosure, ["open"], () => {
53
+ () => _F6HPKLO2cjs.subscribe.call(void 0, disclosure, ["open"], () => {
54
54
  if (!disclosure.getState().animated)
55
55
  return;
56
56
  disclosure.setState("animating", true);
57
57
  })
58
58
  );
59
- _5CBCKBZ2cjs.setup.call(void 0,
59
+ _F6HPKLO2cjs.setup.call(void 0,
60
60
  disclosure,
61
- () => _5CBCKBZ2cjs.sync.call(void 0, disclosure, ["open", "animating"], (state) => {
61
+ () => _F6HPKLO2cjs.sync.call(void 0, disclosure, ["open", "animating"], (state) => {
62
62
  disclosure.setState("mounted", state.open || state.animating);
63
63
  })
64
64
  );
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _Y6PHIDP6cjs = require('./Y6PHIDP6.cjs');
4
+ var _E53JW5BDcjs = require('./E53JW5BD.cjs');
5
5
 
6
6
 
7
- var _5CBCKBZ2cjs = require('./5CBCKBZ2.cjs');
7
+ var _F6HPKLO2cjs = require('./F6HPKLO2.cjs');
8
8
 
9
9
 
10
- var _3UT5FE6Kcjs = require('./3UT5FE6K.cjs');
10
+ var _KBNYGXWIcjs = require('./KBNYGXWI.cjs');
11
11
 
12
12
 
13
13
 
@@ -17,21 +17,21 @@ var _AV6KTKLEcjs = require('./AV6KTKLE.cjs');
17
17
  function createHovercardStore(props = {}) {
18
18
  var _a;
19
19
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
20
- const popover = _Y6PHIDP6cjs.createPopoverStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
21
- placement: _3UT5FE6Kcjs.defaultValue.call(void 0,
20
+ const popover = _E53JW5BDcjs.createPopoverStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
21
+ placement: _KBNYGXWIcjs.defaultValue.call(void 0,
22
22
  props.placement,
23
23
  syncState == null ? void 0 : syncState.placement,
24
24
  "bottom"
25
25
  )
26
26
  }));
27
- const timeout = _3UT5FE6Kcjs.defaultValue.call(void 0, props.timeout, syncState == null ? void 0 : syncState.timeout, 500);
27
+ const timeout = _KBNYGXWIcjs.defaultValue.call(void 0, props.timeout, syncState == null ? void 0 : syncState.timeout, 500);
28
28
  const initialState = _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, popover.getState()), {
29
29
  timeout,
30
- showTimeout: _3UT5FE6Kcjs.defaultValue.call(void 0, props.showTimeout, syncState == null ? void 0 : syncState.showTimeout),
31
- hideTimeout: _3UT5FE6Kcjs.defaultValue.call(void 0, props.hideTimeout, syncState == null ? void 0 : syncState.hideTimeout),
32
- autoFocusOnShow: _3UT5FE6Kcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.autoFocusOnShow, false)
30
+ showTimeout: _KBNYGXWIcjs.defaultValue.call(void 0, props.showTimeout, syncState == null ? void 0 : syncState.showTimeout),
31
+ hideTimeout: _KBNYGXWIcjs.defaultValue.call(void 0, props.hideTimeout, syncState == null ? void 0 : syncState.hideTimeout),
32
+ autoFocusOnShow: _KBNYGXWIcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.autoFocusOnShow, false)
33
33
  });
34
- const hovercard = _5CBCKBZ2cjs.createStore.call(void 0, initialState, popover, props.store);
34
+ const hovercard = _F6HPKLO2cjs.createStore.call(void 0, initialState, popover, props.store);
35
35
  return _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, popover), hovercard), {
36
36
  setAutoFocusOnShow: (value) => hovercard.setState("autoFocusOnShow", value)
37
37
  });
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _5CBCKBZ2cjs = require('../__chunks/5CBCKBZ2.cjs');
5
+ var _F6HPKLO2cjs = require('../__chunks/F6HPKLO2.cjs');
6
6
 
7
7
 
8
- var _3UT5FE6Kcjs = require('../__chunks/3UT5FE6K.cjs');
8
+ var _KBNYGXWIcjs = require('../__chunks/KBNYGXWI.cjs');
9
9
 
10
10
 
11
11
 
@@ -14,17 +14,17 @@ var _AV6KTKLEcjs = require('../__chunks/AV6KTKLE.cjs');
14
14
  // src/checkbox/checkbox-store.ts
15
15
  function createCheckboxStore(props = {}) {
16
16
  var _a;
17
- _5CBCKBZ2cjs.throwOnConflictingProps.call(void 0, props, props.store);
17
+ _F6HPKLO2cjs.throwOnConflictingProps.call(void 0, props, props.store);
18
18
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
19
19
  const initialState = {
20
- value: _3UT5FE6Kcjs.defaultValue.call(void 0,
20
+ value: _KBNYGXWIcjs.defaultValue.call(void 0,
21
21
  props.value,
22
22
  syncState == null ? void 0 : syncState.value,
23
23
  props.defaultValue,
24
24
  false
25
25
  )
26
26
  };
27
- const checkbox = _5CBCKBZ2cjs.createStore.call(void 0, initialState, props.store);
27
+ const checkbox = _F6HPKLO2cjs.createStore.call(void 0, initialState, props.store);
28
28
  return _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, checkbox), {
29
29
  setValue: (value) => checkbox.setState("value", value)
30
30
  });
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _YLMJBIQMcjs = require('../__chunks/YLMJBIQM.cjs');
5
- require('../__chunks/5CBCKBZ2.cjs');
6
- require('../__chunks/3UT5FE6K.cjs');
4
+ var _MI6NUQYQcjs = require('../__chunks/MI6NUQYQ.cjs');
5
+ require('../__chunks/F6HPKLO2.cjs');
6
+ require('../__chunks/KBNYGXWI.cjs');
7
7
  require('../__chunks/5F4DVUNS.cjs');
8
8
  require('../__chunks/AV6KTKLE.cjs');
9
9
 
10
10
 
11
- exports.createCollectionStore = _YLMJBIQMcjs.createCollectionStore;
11
+ exports.createCollectionStore = _MI6NUQYQcjs.createCollectionStore;