@ariakit/core 0.2.7 → 0.2.8

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 (58) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/cjs/__chunks/{ZXPKRPGY.cjs → DPHJ32KR.cjs} +8 -7
  3. package/cjs/__chunks/{SXMUYOXB.cjs → F5DMXFQ2.cjs} +30 -31
  4. package/cjs/__chunks/{5AWPMH4S.cjs → FS2K2N7U.cjs} +72 -25
  5. package/cjs/__chunks/{NVEPU4WA.cjs → MCCIH6SG.cjs} +4 -4
  6. package/cjs/__chunks/{PR7FUI5D.cjs → OQIG5VE3.cjs} +16 -16
  7. package/cjs/__chunks/{K2LZWNNX.cjs → PIEJYPN7.cjs} +2 -2
  8. package/cjs/__chunks/{RS4LBZRZ.cjs → V7OHZPBO.cjs} +28 -32
  9. package/cjs/checkbox/checkbox-store.cjs +2 -2
  10. package/cjs/collection/collection-store.cjs +3 -3
  11. package/cjs/combobox/combobox-store.cjs +53 -56
  12. package/cjs/combobox/combobox-store.d.ts +1 -1
  13. package/cjs/composite/composite-overflow-store.cjs +5 -5
  14. package/cjs/composite/composite-store.cjs +4 -4
  15. package/cjs/dialog/dialog-store.cjs +4 -4
  16. package/cjs/disclosure/disclosure-store.cjs +3 -3
  17. package/cjs/form/form-store.cjs +4 -4
  18. package/cjs/hovercard/hovercard-store.cjs +6 -6
  19. package/cjs/menu/menu-bar-store.cjs +4 -4
  20. package/cjs/menu/menu-store.cjs +23 -22
  21. package/cjs/popover/popover-store.cjs +5 -5
  22. package/cjs/radio/radio-store.cjs +5 -5
  23. package/cjs/select/select-store.cjs +65 -67
  24. package/cjs/tab/tab-store.cjs +55 -56
  25. package/cjs/toolbar/toolbar-store.cjs +4 -4
  26. package/cjs/tooltip/tooltip-store.cjs +7 -7
  27. package/cjs/tsconfig.build.tsbuildinfo +1 -1
  28. package/cjs/utils/store.cjs +16 -2
  29. package/cjs/utils/store.d.ts +19 -59
  30. package/esm/__chunks/{SHUO6V52.js → A7IMXABC.js} +29 -30
  31. package/esm/__chunks/{XJGRXN57.js → COUCUJML.js} +2 -2
  32. package/esm/__chunks/{UWW2ZP3K.js → LNMWV6UV.js} +1 -1
  33. package/esm/__chunks/{FQL4TRMX.js → OGOHEUXI.js} +71 -24
  34. package/esm/__chunks/{NRXA5QTV.js → ROY5BBHL.js} +15 -15
  35. package/esm/__chunks/{LM4QG55U.js → SOCHV2LZ.js} +6 -5
  36. package/esm/__chunks/{L5RO76KW.js → WSKDP2MG.js} +27 -31
  37. package/esm/checkbox/checkbox-store.js +1 -1
  38. package/esm/collection/collection-store.js +2 -2
  39. package/esm/combobox/combobox-store.d.ts +1 -1
  40. package/esm/combobox/combobox-store.js +50 -53
  41. package/esm/composite/composite-overflow-store.js +4 -4
  42. package/esm/composite/composite-store.js +3 -3
  43. package/esm/dialog/dialog-store.js +3 -3
  44. package/esm/disclosure/disclosure-store.js +2 -2
  45. package/esm/form/form-store.js +2 -2
  46. package/esm/hovercard/hovercard-store.js +5 -5
  47. package/esm/menu/menu-bar-store.js +3 -3
  48. package/esm/menu/menu-store.js +20 -19
  49. package/esm/popover/popover-store.js +4 -4
  50. package/esm/radio/radio-store.js +3 -3
  51. package/esm/select/select-store.js +62 -64
  52. package/esm/tab/tab-store.js +53 -54
  53. package/esm/toolbar/toolbar-store.js +3 -3
  54. package/esm/tooltip/tooltip-store.js +5 -5
  55. package/esm/tsconfig.build.tsbuildinfo +1 -1
  56. package/esm/utils/store.d.ts +19 -59
  57. package/esm/utils/store.js +17 -3
  58. package/package.json +1 -1
@@ -1,6 +1,8 @@
1
1
  import {
2
- createStore
3
- } from "./FQL4TRMX.js";
2
+ batch,
3
+ createStore,
4
+ setup
5
+ } from "./OGOHEUXI.js";
4
6
  import {
5
7
  chain,
6
8
  defaultValue
@@ -83,35 +85,32 @@ function createCollectionStore(props = {}) {
83
85
  privateStore.setState("renderedItems", renderedItems);
84
86
  collection.setState("renderedItems", renderedItems);
85
87
  };
86
- collection.setup(() => {
87
- return privateStore.syncBatch(
88
- (state) => {
89
- let firstRun = true;
90
- let raf = requestAnimationFrame(sortItems);
91
- if (typeof IntersectionObserver !== "function")
88
+ setup(collection, () => {
89
+ return batch(privateStore, ["renderedItems"], (state) => {
90
+ let firstRun = true;
91
+ let raf = requestAnimationFrame(sortItems);
92
+ if (typeof IntersectionObserver !== "function")
93
+ return;
94
+ const callback = () => {
95
+ if (firstRun) {
96
+ firstRun = false;
92
97
  return;
93
- const callback = () => {
94
- if (firstRun) {
95
- firstRun = false;
96
- return;
97
- }
98
- cancelAnimationFrame(raf);
99
- raf = requestAnimationFrame(sortItems);
100
- };
101
- const root = getCommonParent(state.renderedItems);
102
- const observer = new IntersectionObserver(callback, { root });
103
- state.renderedItems.forEach((item) => {
104
- if (!item.element)
105
- return;
106
- observer.observe(item.element);
107
- });
108
- return () => {
109
- cancelAnimationFrame(raf);
110
- observer.disconnect();
111
- };
112
- },
113
- ["renderedItems"]
114
- );
98
+ }
99
+ cancelAnimationFrame(raf);
100
+ raf = requestAnimationFrame(sortItems);
101
+ };
102
+ const root = getCommonParent(state.renderedItems);
103
+ const observer = new IntersectionObserver(callback, { root });
104
+ state.renderedItems.forEach((item) => {
105
+ if (!item.element)
106
+ return;
107
+ observer.observe(item.element);
108
+ });
109
+ return () => {
110
+ cancelAnimationFrame(raf);
111
+ observer.disconnect();
112
+ };
113
+ });
115
114
  });
116
115
  const mergeItem = (item, setItems, canDeleteFromMap = false) => {
117
116
  let prevItem;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createPopoverStore
3
- } from "./LM4QG55U.js";
3
+ } from "./SOCHV2LZ.js";
4
4
  import {
5
5
  createStore
6
- } from "./FQL4TRMX.js";
6
+ } from "./OGOHEUXI.js";
7
7
  import {
8
8
  defaultValue
9
9
  } from "./WVTCK5PV.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createDisclosureStore
3
- } from "./L5RO76KW.js";
3
+ } from "./WSKDP2MG.js";
4
4
 
5
5
  // src/dialog/dialog-store.ts
6
6
  function createDialogStore(props = {}) {
@@ -3,6 +3,7 @@ import {
3
3
  chain,
4
4
  getKeys,
5
5
  hasOwnProperty,
6
+ invariant,
6
7
  noop,
7
8
  omit,
8
9
  pick
@@ -13,6 +14,11 @@ import {
13
14
  } from "./PNRLI7OV.js";
14
15
 
15
16
  // src/utils/store.ts
17
+ function getInternal(store, key) {
18
+ const internals = store.__unstableInternals;
19
+ invariant(internals, "Invalid store");
20
+ return internals[key];
21
+ }
16
22
  function createStore(initialState, ...stores) {
17
23
  let state = initialState;
18
24
  let prevStateBatch = state;
@@ -24,11 +30,11 @@ function createStore(initialState, ...stores) {
24
30
  const listenersBatch = /* @__PURE__ */ new Set();
25
31
  const disposables = /* @__PURE__ */ new WeakMap();
26
32
  const listenerKeys = /* @__PURE__ */ new WeakMap();
27
- const setup = (callback) => {
33
+ const storeSetup = (callback) => {
28
34
  setups.add(callback);
29
35
  return () => setups.delete(callback);
30
36
  };
31
- const init = () => {
37
+ const storeInit = () => {
32
38
  if (initialized)
33
39
  return noop;
34
40
  if (!stores.length)
@@ -37,28 +43,25 @@ function createStore(initialState, ...stores) {
37
43
  const desyncs = getKeys(state).map(
38
44
  (key) => chain(
39
45
  ...stores.map((store) => {
40
- var _a, _b;
46
+ var _a;
41
47
  const storeState = (_a = store == null ? void 0 : store.getState) == null ? void 0 : _a.call(store);
42
48
  if (!storeState)
43
49
  return;
44
50
  if (!hasOwnProperty(storeState, key))
45
51
  return;
46
- return (_b = store == null ? void 0 : store.sync) == null ? void 0 : _b.call(store, (state2) => setState(key, state2[key]), [key]);
52
+ return sync(store, [key], (state2) => setState(key, state2[key]));
47
53
  })
48
54
  )
49
55
  );
50
56
  const teardowns = [];
51
57
  setups.forEach((setup2) => teardowns.push(setup2()));
52
- const cleanups = stores.map((store) => {
53
- var _a;
54
- return (_a = store == null ? void 0 : store.init) == null ? void 0 : _a.call(store);
55
- });
58
+ const cleanups = stores.map(init);
56
59
  return chain(...desyncs, ...teardowns, ...cleanups, () => {
57
60
  initialized = false;
58
61
  });
59
62
  };
60
- const sub = (listener, keys, batch = false) => {
61
- const set = batch ? listenersBatch : listeners;
63
+ const sub = (keys, listener, batch2 = false) => {
64
+ const set = batch2 ? listenersBatch : listeners;
62
65
  set.add(listener);
63
66
  listenerKeys.set(listener, keys);
64
67
  return () => {
@@ -69,15 +72,17 @@ function createStore(initialState, ...stores) {
69
72
  set.delete(listener);
70
73
  };
71
74
  };
72
- const subscribe = (listener, keys) => sub(listener, keys);
73
- const sync = (listener, keys) => {
75
+ const storeSubscribe = (keys, listener) => sub(keys, listener);
76
+ const storeSync = (keys, listener) => {
74
77
  disposables.set(listener, listener(state, state));
75
- return sub(listener, keys);
78
+ return sub(keys, listener);
76
79
  };
77
- const syncBatch = (listener, keys) => {
80
+ const storeBatch = (keys, listener) => {
78
81
  disposables.set(listener, listener(state, prevStateBatch));
79
- return sub(listener, keys, true);
82
+ return sub(keys, listener, true);
80
83
  };
84
+ const storePick = (keys) => createStore(pick(state, keys), finalStore);
85
+ const storeOmit = (keys) => createStore(omit(state, keys), finalStore);
81
86
  const getState = () => state;
82
87
  const setState = (key, value) => {
83
88
  if (!hasOwnProperty(state, key))
@@ -115,21 +120,56 @@ function createStore(initialState, ...stores) {
115
120
  updatedKeys.clear();
116
121
  });
117
122
  };
118
- const pick2 = (...keys) => createStore(pick(state, keys), finalStore);
119
- const omit2 = (...keys) => createStore(omit(state, keys), finalStore);
120
123
  const finalStore = {
121
- setup,
122
- init,
123
- subscribe,
124
- sync,
125
- syncBatch,
126
124
  getState,
127
125
  setState,
128
- pick: pick2,
129
- omit: omit2
126
+ __unstableInternals: {
127
+ setup: storeSetup,
128
+ init: storeInit,
129
+ subscribe: storeSubscribe,
130
+ sync: storeSync,
131
+ batch: storeBatch,
132
+ pick: storePick,
133
+ omit: storeOmit
134
+ }
130
135
  };
131
136
  return finalStore;
132
137
  }
138
+ function setup(store, ...args) {
139
+ if (!store)
140
+ return;
141
+ return getInternal(store, "setup")(...args);
142
+ }
143
+ function init(store, ...args) {
144
+ if (!store)
145
+ return;
146
+ return getInternal(store, "init")(...args);
147
+ }
148
+ function subscribe(store, ...args) {
149
+ if (!store)
150
+ return;
151
+ return getInternal(store, "subscribe")(...args);
152
+ }
153
+ function sync(store, ...args) {
154
+ if (!store)
155
+ return;
156
+ return getInternal(store, "sync")(...args);
157
+ }
158
+ function batch(store, ...args) {
159
+ if (!store)
160
+ return;
161
+ return getInternal(store, "batch")(...args);
162
+ }
163
+ function omit2(store, ...args) {
164
+ if (!store)
165
+ return;
166
+ return getInternal(store, "omit")(...args);
167
+ }
168
+ function pick2(store, ...args) {
169
+ if (!store)
170
+ return;
171
+ return getInternal(store, "pick")(...args);
172
+ }
133
173
  function mergeStore(...stores) {
134
174
  const initialState = stores.reduce((state, store2) => {
135
175
  var _a;
@@ -144,5 +184,12 @@ function mergeStore(...stores) {
144
184
 
145
185
  export {
146
186
  createStore,
187
+ setup,
188
+ init,
189
+ subscribe,
190
+ sync,
191
+ batch,
192
+ omit2 as omit,
193
+ pick2 as pick,
147
194
  mergeStore
148
195
  };
@@ -1,9 +1,11 @@
1
1
  import {
2
2
  createCollectionStore
3
- } from "./SHUO6V52.js";
3
+ } from "./A7IMXABC.js";
4
4
  import {
5
- createStore
6
- } from "./FQL4TRMX.js";
5
+ createStore,
6
+ setup,
7
+ sync
8
+ } from "./OGOHEUXI.js";
7
9
  import {
8
10
  defaultValue
9
11
  } from "./WVTCK5PV.js";
@@ -152,18 +154,16 @@ function createCompositeStore(props = {}) {
152
154
  focusShift: defaultValue(props.focusShift, syncState == null ? void 0 : syncState.focusShift, false)
153
155
  });
154
156
  const composite = createStore(initialState, collection, props.store);
155
- composite.setup(
156
- () => composite.sync(
157
- (state) => {
158
- composite.setState("activeId", (activeId2) => {
159
- var _a2;
160
- if (activeId2 !== void 0)
161
- return activeId2;
162
- return (_a2 = findFirstEnabledItem(state.renderedItems)) == null ? void 0 : _a2.id;
163
- });
164
- },
165
- ["renderedItems", "activeId"]
166
- )
157
+ setup(
158
+ composite,
159
+ () => sync(composite, ["renderedItems", "activeId"], (state) => {
160
+ composite.setState("activeId", (activeId2) => {
161
+ var _a2;
162
+ if (activeId2 !== void 0)
163
+ return activeId2;
164
+ return (_a2 = findFirstEnabledItem(state.renderedItems)) == null ? void 0 : _a2.id;
165
+ });
166
+ })
167
167
  );
168
168
  const getNextId = (items, orientation, hasNullItem, skip) => {
169
169
  var _a2, _b;
@@ -1,10 +1,11 @@
1
1
  import {
2
2
  createDialogStore
3
- } from "./UWW2ZP3K.js";
3
+ } from "./LNMWV6UV.js";
4
4
  import {
5
5
  createStore,
6
- mergeStore
7
- } from "./FQL4TRMX.js";
6
+ mergeStore,
7
+ omit
8
+ } from "./OGOHEUXI.js";
8
9
  import {
9
10
  defaultValue
10
11
  } from "./WVTCK5PV.js";
@@ -23,13 +24,13 @@ function createPopoverStore(_a = {}) {
23
24
  ]);
24
25
  const store = mergeStore(
25
26
  props.store,
26
- otherPopover == null ? void 0 : otherPopover.omit(
27
+ omit(otherPopover, [
27
28
  "arrowElement",
28
29
  "anchorElement",
29
30
  "contentElement",
30
31
  "popoverElement",
31
32
  "disclosureElement"
32
- )
33
+ ])
33
34
  );
34
35
  const syncState = store == null ? void 0 : store.getState();
35
36
  const dialog = createDialogStore(__spreadProps(__spreadValues({}, props), { store }));
@@ -1,7 +1,10 @@
1
1
  import {
2
2
  createStore,
3
- mergeStore
4
- } from "./FQL4TRMX.js";
3
+ mergeStore,
4
+ omit,
5
+ setup,
6
+ sync
7
+ } from "./OGOHEUXI.js";
5
8
  import {
6
9
  defaultValue
7
10
  } from "./WVTCK5PV.js";
@@ -12,10 +15,9 @@ import {
12
15
 
13
16
  // src/disclosure/disclosure-store.ts
14
17
  function createDisclosureStore(props = {}) {
15
- var _a;
16
18
  const store = mergeStore(
17
19
  props.store,
18
- (_a = props.disclosure) == null ? void 0 : _a.omit("contentElement", "disclosureElement")
20
+ omit(props.disclosure, ["contentElement", "disclosureElement"])
19
21
  );
20
22
  const syncState = store == null ? void 0 : store.getState();
21
23
  const open = defaultValue(
@@ -34,35 +36,29 @@ function createDisclosureStore(props = {}) {
34
36
  disclosureElement: defaultValue(syncState == null ? void 0 : syncState.disclosureElement, null)
35
37
  };
36
38
  const disclosure = createStore(initialState, store);
37
- disclosure.setup(
38
- () => disclosure.sync(
39
- (state) => {
40
- if (state.animated)
41
- return;
42
- disclosure.setState("animating", false);
43
- },
44
- ["animated", "animating"]
45
- )
39
+ setup(
40
+ disclosure,
41
+ () => sync(disclosure, ["animated", "animating"], (state) => {
42
+ if (state.animated)
43
+ return;
44
+ disclosure.setState("animating", false);
45
+ })
46
46
  );
47
- disclosure.setup(
48
- () => disclosure.sync(
49
- (state, prev) => {
50
- if (!state.animated)
51
- return;
52
- const mounting = state === prev;
53
- const animating = mounting ? state.open : state.open !== prev.open;
54
- disclosure.setState("animating", animating);
55
- },
56
- ["open", "animated"]
57
- )
47
+ setup(
48
+ disclosure,
49
+ () => sync(disclosure, ["open", "animated"], (state, prev) => {
50
+ if (!state.animated)
51
+ return;
52
+ const mounting = state === prev;
53
+ const animating = mounting ? state.open : state.open !== prev.open;
54
+ disclosure.setState("animating", animating);
55
+ })
58
56
  );
59
- disclosure.setup(
60
- () => disclosure.sync(
61
- (state) => {
62
- disclosure.setState("mounted", state.open || state.animating);
63
- },
64
- ["open", "animating"]
65
- )
57
+ setup(
58
+ disclosure,
59
+ () => sync(disclosure, ["open", "animating"], (state) => {
60
+ disclosure.setState("mounted", state.open || state.animating);
61
+ })
66
62
  );
67
63
  return __spreadProps(__spreadValues({}, disclosure), {
68
64
  setOpen: (value) => disclosure.setState("open", value),
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createStore
3
- } from "../__chunks/FQL4TRMX.js";
3
+ } from "../__chunks/OGOHEUXI.js";
4
4
  import {
5
5
  defaultValue
6
6
  } from "../__chunks/WVTCK5PV.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createCollectionStore
3
- } from "../__chunks/SHUO6V52.js";
4
- import "../__chunks/FQL4TRMX.js";
3
+ } from "../__chunks/A7IMXABC.js";
4
+ import "../__chunks/OGOHEUXI.js";
5
5
  import "../__chunks/WVTCK5PV.js";
6
6
  import "../__chunks/O35LWD4W.js";
7
7
  import "../__chunks/PNRLI7OV.js";
@@ -23,7 +23,7 @@ export interface ComboboxStoreState extends CompositeStoreState<Item>, PopoverSt
23
23
  * Live examples:
24
24
  * - [ComboboxGroup](https://ariakit.org/examples/combobox-group)
25
25
  * - [Combobox with links](https://ariakit.org/examples/combobox-links)
26
- * - [Filterable Combobox](https://ariakit.org/examples/combobox-matches)
26
+ * - [Combobox filtering](https://ariakit.org/examples/combobox-filtering)
27
27
  * - [Multi-selectable
28
28
  * Combobox](https://ariakit.org/examples/combobox-multiple)
29
29
  * - [Textarea with inline
@@ -1,16 +1,20 @@
1
1
  import {
2
2
  createPopoverStore
3
- } from "../__chunks/LM4QG55U.js";
4
- import "../__chunks/UWW2ZP3K.js";
5
- import "../__chunks/L5RO76KW.js";
3
+ } from "../__chunks/SOCHV2LZ.js";
4
+ import "../__chunks/LNMWV6UV.js";
5
+ import "../__chunks/WSKDP2MG.js";
6
6
  import {
7
7
  createCompositeStore
8
- } from "../__chunks/NRXA5QTV.js";
9
- import "../__chunks/SHUO6V52.js";
8
+ } from "../__chunks/ROY5BBHL.js";
9
+ import "../__chunks/A7IMXABC.js";
10
10
  import {
11
+ batch,
11
12
  createStore,
12
- mergeStore
13
- } from "../__chunks/FQL4TRMX.js";
13
+ mergeStore,
14
+ omit,
15
+ setup,
16
+ sync
17
+ } from "../__chunks/OGOHEUXI.js";
14
18
  import {
15
19
  defaultValue
16
20
  } from "../__chunks/WVTCK5PV.js";
@@ -38,15 +42,16 @@ function createComboboxStore(_a = {}) {
38
42
  ]);
39
43
  const store = mergeStore(
40
44
  props.store,
41
- menu == null ? void 0 : menu.omit(
45
+ omit(menu, [
42
46
  "baseElement",
43
47
  "arrowElement",
44
48
  "anchorElement",
45
49
  "contentElement",
46
50
  "popoverElement",
47
- "disclosureElement"
48
- ),
49
- select == null ? void 0 : select.omit(
51
+ "disclosureElement",
52
+ "anchorElement"
53
+ ]),
54
+ omit(select, [
50
55
  "value",
51
56
  "items",
52
57
  "renderedItems",
@@ -56,7 +61,7 @@ function createComboboxStore(_a = {}) {
56
61
  "contentElement",
57
62
  "popoverElement",
58
63
  "disclosureElement"
59
- )
64
+ ])
60
65
  );
61
66
  const syncState = store.getState();
62
67
  const activeId = defaultValue(
@@ -110,50 +115,42 @@ function createComboboxStore(_a = {}) {
110
115
  activeValue: syncState.activeValue
111
116
  });
112
117
  const combobox = createStore(initialState, composite, popover, store);
113
- combobox.setup(
114
- () => combobox.sync(
115
- (state) => {
116
- if (!state.resetValueOnHide)
117
- return;
118
- if (state.mounted)
119
- return;
120
- combobox.setState("value", initialValue);
121
- },
122
- ["resetValueOnHide", "mounted"]
123
- )
118
+ setup(
119
+ combobox,
120
+ () => sync(combobox, ["resetValueOnHide", "mounted"], (state) => {
121
+ if (!state.resetValueOnHide)
122
+ return;
123
+ if (state.mounted)
124
+ return;
125
+ combobox.setState("value", initialValue);
126
+ })
124
127
  );
125
- combobox.setup(
126
- () => combobox.syncBatch(
127
- (state) => {
128
- if (state.mounted)
129
- return;
130
- combobox.setState("activeId", activeId);
131
- combobox.setState("moves", 0);
132
- },
133
- ["mounted"]
134
- )
128
+ setup(
129
+ combobox,
130
+ () => batch(combobox, ["mounted"], (state) => {
131
+ if (state.mounted)
132
+ return;
133
+ combobox.setState("activeId", activeId);
134
+ combobox.setState("moves", 0);
135
+ })
135
136
  );
136
- combobox.setup(
137
- () => combobox.sync(
138
- (state, prevState) => {
139
- if (state.moves === prevState.moves) {
140
- combobox.setState("activeValue", void 0);
141
- }
142
- },
143
- ["moves", "activeId"]
144
- )
137
+ setup(
138
+ combobox,
139
+ () => sync(combobox, ["moves", "activeId"], (state, prevState) => {
140
+ if (state.moves === prevState.moves) {
141
+ combobox.setState("activeValue", void 0);
142
+ }
143
+ })
145
144
  );
146
- combobox.setup(
147
- () => combobox.syncBatch(
148
- (state, prev) => {
149
- if (state.moves === prev.moves)
150
- return;
151
- const { activeId: activeId2 } = combobox.getState();
152
- const activeItem = composite.item(activeId2);
153
- combobox.setState("activeValue", activeItem == null ? void 0 : activeItem.value);
154
- },
155
- ["moves", "renderedItems"]
156
- )
145
+ setup(
146
+ combobox,
147
+ () => batch(combobox, ["moves", "renderedItems"], (state, prev) => {
148
+ if (state.moves === prev.moves)
149
+ return;
150
+ const { activeId: activeId2 } = combobox.getState();
151
+ const activeItem = composite.item(activeId2);
152
+ combobox.setState("activeValue", activeItem == null ? void 0 : activeItem.value);
153
+ })
157
154
  );
158
155
  return __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, popover), composite), combobox), {
159
156
  setValue: (value) => combobox.setState("value", value)
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createPopoverStore
3
- } from "../__chunks/LM4QG55U.js";
4
- import "../__chunks/UWW2ZP3K.js";
5
- import "../__chunks/L5RO76KW.js";
6
- import "../__chunks/FQL4TRMX.js";
3
+ } from "../__chunks/SOCHV2LZ.js";
4
+ import "../__chunks/LNMWV6UV.js";
5
+ import "../__chunks/WSKDP2MG.js";
6
+ import "../__chunks/OGOHEUXI.js";
7
7
  import "../__chunks/WVTCK5PV.js";
8
8
  import "../__chunks/PNRLI7OV.js";
9
9
 
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  createCompositeStore
3
- } from "../__chunks/NRXA5QTV.js";
4
- import "../__chunks/SHUO6V52.js";
5
- import "../__chunks/FQL4TRMX.js";
3
+ } from "../__chunks/ROY5BBHL.js";
4
+ import "../__chunks/A7IMXABC.js";
5
+ import "../__chunks/OGOHEUXI.js";
6
6
  import "../__chunks/WVTCK5PV.js";
7
7
  import "../__chunks/O35LWD4W.js";
8
8
  import "../__chunks/5XEKIOCW.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  createDialogStore
3
- } from "../__chunks/UWW2ZP3K.js";
4
- import "../__chunks/L5RO76KW.js";
5
- import "../__chunks/FQL4TRMX.js";
3
+ } from "../__chunks/LNMWV6UV.js";
4
+ import "../__chunks/WSKDP2MG.js";
5
+ import "../__chunks/OGOHEUXI.js";
6
6
  import "../__chunks/WVTCK5PV.js";
7
7
  import "../__chunks/PNRLI7OV.js";
8
8
  export {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createDisclosureStore
3
- } from "../__chunks/L5RO76KW.js";
4
- import "../__chunks/FQL4TRMX.js";
3
+ } from "../__chunks/WSKDP2MG.js";
4
+ import "../__chunks/OGOHEUXI.js";
5
5
  import "../__chunks/WVTCK5PV.js";
6
6
  import "../__chunks/PNRLI7OV.js";
7
7
  export {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createCollectionStore
3
- } from "../__chunks/SHUO6V52.js";
3
+ } from "../__chunks/A7IMXABC.js";
4
4
  import {
5
5
  createStore
6
- } from "../__chunks/FQL4TRMX.js";
6
+ } from "../__chunks/OGOHEUXI.js";
7
7
  import {
8
8
  applyState,
9
9
  defaultValue,