@ariakit/core 0.4.7 → 0.4.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 (89) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/cjs/__chunks/{M2NNCFIJ.cjs → 3QF3ODTR.cjs} +31 -50
  3. package/cjs/__chunks/{LPDHSEHU.cjs → 7CES7GVE.cjs} +4 -8
  4. package/cjs/__chunks/{Q2WCPTYS.cjs → 7WYII4AN.cjs} +6 -12
  5. package/cjs/__chunks/{EEDWPDM2.cjs → BTUHABP4.cjs} +16 -30
  6. package/cjs/__chunks/{3COGJMN3.cjs → CCI5VM7E.cjs} +24 -30
  7. package/cjs/__chunks/{MB5TLEVH.cjs → H6ZQSQQL.cjs} +16 -16
  8. package/cjs/__chunks/{D7M2PCAQ.cjs → KCEXELK7.cjs} +6 -7
  9. package/cjs/__chunks/{DIYYVJDK.cjs → N667HVED.cjs} +2 -2
  10. package/cjs/__chunks/{LBFF2BBK.cjs → PW36G76L.cjs} +25 -29
  11. package/cjs/__chunks/{LAYUSNGM.cjs → QLWAGBAQ.cjs} +20 -22
  12. package/cjs/__chunks/{5BQ2XS3R.cjs → VJAE2Y4T.cjs} +10 -10
  13. package/cjs/__chunks/XIZWLBI2.cjs +42 -0
  14. package/cjs/checkbox/checkbox-store.cjs +7 -7
  15. package/cjs/collection/collection-store.cjs +6 -6
  16. package/cjs/combobox/combobox-store.cjs +50 -56
  17. package/cjs/composite/composite-overflow-store.cjs +7 -7
  18. package/cjs/composite/composite-store.cjs +7 -7
  19. package/cjs/dialog/dialog-store.cjs +6 -6
  20. package/cjs/disclosure/disclosure-store.cjs +5 -5
  21. package/cjs/form/form-store.cjs +32 -36
  22. package/cjs/hovercard/hovercard-store.cjs +8 -8
  23. package/cjs/index.cjs +1 -1
  24. package/cjs/menu/menu-bar-store.cjs +8 -8
  25. package/cjs/menu/menu-store.cjs +37 -42
  26. package/cjs/menubar/menubar-store.cjs +8 -8
  27. package/cjs/popover/popover-store.cjs +7 -7
  28. package/cjs/radio/radio-store.cjs +13 -13
  29. package/cjs/select/select-store.cjs +49 -62
  30. package/cjs/tab/tab-store.cjs +49 -61
  31. package/cjs/tag/tag-store.cjs +23 -27
  32. package/cjs/toolbar/toolbar-store.cjs +9 -9
  33. package/cjs/tooltip/tooltip-store.cjs +15 -15
  34. package/cjs/utils/array.cjs +1 -1
  35. package/cjs/utils/dom.cjs +3 -3
  36. package/cjs/utils/events.cjs +22 -36
  37. package/cjs/utils/focus.cjs +34 -58
  38. package/cjs/utils/misc.cjs +3 -3
  39. package/cjs/utils/misc.d.cts +1 -1
  40. package/cjs/utils/misc.d.ts +1 -1
  41. package/cjs/utils/platform.cjs +4 -4
  42. package/cjs/utils/store.cjs +4 -4
  43. package/cjs/utils/undo.cjs +3 -3
  44. package/esm/__chunks/{SAZZJI72.js → 3UYWTADI.js} +4 -4
  45. package/esm/__chunks/{I2WJ7JBQ.js → 6DHTHWXD.js} +10 -16
  46. package/esm/__chunks/{KDSZSVV5.js → 6E4KKOSB.js} +5 -7
  47. package/esm/__chunks/{EKIWAN6A.js → 7LM4Q2XB.js} +4 -8
  48. package/esm/__chunks/{VH2P7HEP.js → D7EIQZAU.js} +8 -12
  49. package/esm/__chunks/{E4HA32QI.js → EACLTACN.js} +4 -4
  50. package/esm/__chunks/{KLPDXTDE.js → EQQLU3CG.js} +21 -40
  51. package/esm/__chunks/{I2NJJ3XW.js → HWOIWM4O.js} +6 -12
  52. package/esm/__chunks/{22HHDS5F.js → PBFD2E7P.js} +15 -29
  53. package/esm/__chunks/{RCLYDUHE.js → PIWLWQMB.js} +4 -4
  54. package/esm/__chunks/{CLSHHUGK.js → US4USQPI.js} +2 -3
  55. package/esm/__chunks/{NWACXGIN.js → YOHCVXJB.js} +1 -1
  56. package/esm/checkbox/checkbox-store.js +3 -3
  57. package/esm/collection/collection-store.js +5 -5
  58. package/esm/combobox/combobox-store.js +16 -22
  59. package/esm/composite/composite-overflow-store.js +6 -6
  60. package/esm/composite/composite-store.js +6 -6
  61. package/esm/dialog/dialog-store.js +5 -5
  62. package/esm/disclosure/disclosure-store.js +4 -4
  63. package/esm/form/form-store.js +9 -13
  64. package/esm/hovercard/hovercard-store.js +7 -7
  65. package/esm/index.js +1 -1
  66. package/esm/menu/menu-bar-store.js +7 -7
  67. package/esm/menu/menu-store.js +15 -20
  68. package/esm/menubar/menubar-store.js +7 -7
  69. package/esm/popover/popover-store.js +6 -6
  70. package/esm/radio/radio-store.js +6 -6
  71. package/esm/select/select-store.js +22 -35
  72. package/esm/tab/tab-store.js +18 -30
  73. package/esm/tag/tag-store.js +11 -15
  74. package/esm/toolbar/toolbar-store.js +6 -6
  75. package/esm/tooltip/tooltip-store.js +7 -7
  76. package/esm/utils/array.js +1 -1
  77. package/esm/utils/dom.js +2 -2
  78. package/esm/utils/events.js +17 -31
  79. package/esm/utils/focus.js +26 -50
  80. package/esm/utils/misc.d.ts +1 -1
  81. package/esm/utils/misc.js +2 -2
  82. package/esm/utils/platform.js +3 -3
  83. package/esm/utils/store.js +3 -3
  84. package/esm/utils/undo.js +2 -2
  85. package/package.json +1 -1
  86. package/readme.md +18 -0
  87. package/cjs/__chunks/XVL5HZ27.cjs +0 -42
  88. /package/cjs/__chunks/{AV6KTKLE.cjs → 3IVNQNIV.cjs} +0 -0
  89. /package/esm/__chunks/{4R3V3JGP.js → 3YLGPPWQ.js} +0 -0
package/cjs/utils/dom.cjs CHANGED
@@ -18,8 +18,8 @@
18
18
 
19
19
 
20
20
 
21
- var _Q2WCPTYScjs = require('../__chunks/Q2WCPTYS.cjs');
22
- require('../__chunks/AV6KTKLE.cjs');
21
+ var _7WYII4ANcjs = require('../__chunks/7WYII4AN.cjs');
22
+ require('../__chunks/3IVNQNIV.cjs');
23
23
 
24
24
 
25
25
 
@@ -39,4 +39,4 @@ require('../__chunks/AV6KTKLE.cjs');
39
39
 
40
40
 
41
41
 
42
- exports.canUseDOM = _Q2WCPTYScjs.canUseDOM; exports.contains = _Q2WCPTYScjs.contains; exports.getActiveElement = _Q2WCPTYScjs.getActiveElement; exports.getDocument = _Q2WCPTYScjs.getDocument; exports.getPopupItemRole = _Q2WCPTYScjs.getPopupItemRole; exports.getPopupRole = _Q2WCPTYScjs.getPopupRole; exports.getScrollingElement = _Q2WCPTYScjs.getScrollingElement; exports.getTextboxSelection = _Q2WCPTYScjs.getTextboxSelection; exports.getTextboxValue = _Q2WCPTYScjs.getTextboxValue; exports.getWindow = _Q2WCPTYScjs.getWindow; exports.isButton = _Q2WCPTYScjs.isButton; exports.isFrame = _Q2WCPTYScjs.isFrame; exports.isPartiallyHidden = _Q2WCPTYScjs.isPartiallyHidden; exports.isTextField = _Q2WCPTYScjs.isTextField; exports.isTextbox = _Q2WCPTYScjs.isTextbox; exports.isVisible = _Q2WCPTYScjs.isVisible; exports.scrollIntoViewIfNeeded = _Q2WCPTYScjs.scrollIntoViewIfNeeded; exports.setSelectionRange = _Q2WCPTYScjs.setSelectionRange;
42
+ exports.canUseDOM = _7WYII4ANcjs.canUseDOM; exports.contains = _7WYII4ANcjs.contains; exports.getActiveElement = _7WYII4ANcjs.getActiveElement; exports.getDocument = _7WYII4ANcjs.getDocument; exports.getPopupItemRole = _7WYII4ANcjs.getPopupItemRole; exports.getPopupRole = _7WYII4ANcjs.getPopupRole; exports.getScrollingElement = _7WYII4ANcjs.getScrollingElement; exports.getTextboxSelection = _7WYII4ANcjs.getTextboxSelection; exports.getTextboxValue = _7WYII4ANcjs.getTextboxValue; exports.getWindow = _7WYII4ANcjs.getWindow; exports.isButton = _7WYII4ANcjs.isButton; exports.isFrame = _7WYII4ANcjs.isFrame; exports.isPartiallyHidden = _7WYII4ANcjs.isPartiallyHidden; exports.isTextField = _7WYII4ANcjs.isTextField; exports.isTextbox = _7WYII4ANcjs.isTextbox; exports.isVisible = _7WYII4ANcjs.isVisible; exports.scrollIntoViewIfNeeded = _7WYII4ANcjs.scrollIntoViewIfNeeded; exports.setSelectionRange = _7WYII4ANcjs.setSelectionRange;
@@ -1,19 +1,19 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _D7M2PCAQcjs = require('../__chunks/D7M2PCAQ.cjs');
4
+ var _KCEXELK7cjs = require('../__chunks/KCEXELK7.cjs');
5
5
 
6
6
 
7
- var _Q2WCPTYScjs = require('../__chunks/Q2WCPTYS.cjs');
7
+ var _7WYII4ANcjs = require('../__chunks/7WYII4AN.cjs');
8
8
 
9
9
 
10
10
 
11
- var _AV6KTKLEcjs = require('../__chunks/AV6KTKLE.cjs');
11
+ var _3IVNQNIVcjs = require('../__chunks/3IVNQNIV.cjs');
12
12
 
13
13
  // src/utils/events.ts
14
14
  function isPortalEvent(event) {
15
15
  return Boolean(
16
- event.currentTarget && !_Q2WCPTYScjs.contains.call(void 0, event.currentTarget, event.target)
16
+ event.currentTarget && !_7WYII4ANcjs.contains.call(void 0, event.currentTarget, event.target)
17
17
  );
18
18
  }
19
19
  function isSelfTarget(event) {
@@ -21,35 +21,24 @@ function isSelfTarget(event) {
21
21
  }
22
22
  function isOpeningInNewTab(event) {
23
23
  const element = event.currentTarget;
24
- if (!element)
25
- return false;
26
- const isAppleDevice = _D7M2PCAQcjs.isApple.call(void 0, );
27
- if (isAppleDevice && !event.metaKey)
28
- return false;
29
- if (!isAppleDevice && !event.ctrlKey)
30
- return false;
24
+ if (!element) return false;
25
+ const isAppleDevice = _KCEXELK7cjs.isApple.call(void 0, );
26
+ if (isAppleDevice && !event.metaKey) return false;
27
+ if (!isAppleDevice && !event.ctrlKey) return false;
31
28
  const tagName = element.tagName.toLowerCase();
32
- if (tagName === "a")
33
- return true;
34
- if (tagName === "button" && element.type === "submit")
35
- return true;
36
- if (tagName === "input" && element.type === "submit")
37
- return true;
29
+ if (tagName === "a") return true;
30
+ if (tagName === "button" && element.type === "submit") return true;
31
+ if (tagName === "input" && element.type === "submit") return true;
38
32
  return false;
39
33
  }
40
34
  function isDownloading(event) {
41
35
  const element = event.currentTarget;
42
- if (!element)
43
- return false;
36
+ if (!element) return false;
44
37
  const tagName = element.tagName.toLowerCase();
45
- if (!event.altKey)
46
- return false;
47
- if (tagName === "a")
48
- return true;
49
- if (tagName === "button" && element.type === "submit")
50
- return true;
51
- if (tagName === "input" && element.type === "submit")
52
- return true;
38
+ if (!event.altKey) return false;
39
+ if (tagName === "a") return true;
40
+ if (tagName === "button" && element.type === "submit") return true;
41
+ if (tagName === "input" && element.type === "submit") return true;
53
42
  return false;
54
43
  }
55
44
  function fireEvent(element, type, eventInit) {
@@ -59,14 +48,14 @@ function fireEvent(element, type, eventInit) {
59
48
  function fireBlurEvent(element, eventInit) {
60
49
  const event = new FocusEvent("blur", eventInit);
61
50
  const defaultAllowed = element.dispatchEvent(event);
62
- const bubbleInit = _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, eventInit), { bubbles: true });
51
+ const bubbleInit = _3IVNQNIVcjs.__spreadProps.call(void 0, _3IVNQNIVcjs.__spreadValues.call(void 0, {}, eventInit), { bubbles: true });
63
52
  element.dispatchEvent(new FocusEvent("focusout", bubbleInit));
64
53
  return defaultAllowed;
65
54
  }
66
55
  function fireFocusEvent(element, eventInit) {
67
56
  const event = new FocusEvent("focus", eventInit);
68
57
  const defaultAllowed = element.dispatchEvent(event);
69
- const bubbleInit = _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, eventInit), { bubbles: true });
58
+ const bubbleInit = _3IVNQNIVcjs.__spreadProps.call(void 0, _3IVNQNIVcjs.__spreadValues.call(void 0, {}, eventInit), { bubbles: true });
70
59
  element.dispatchEvent(new FocusEvent("focusin", bubbleInit));
71
60
  return defaultAllowed;
72
61
  }
@@ -81,16 +70,13 @@ function fireClickEvent(element, eventInit) {
81
70
  function isFocusEventOutside(event, container) {
82
71
  const containerElement = container || event.currentTarget;
83
72
  const relatedTarget = event.relatedTarget;
84
- return !relatedTarget || !_Q2WCPTYScjs.contains.call(void 0, containerElement, relatedTarget);
73
+ return !relatedTarget || !_7WYII4ANcjs.contains.call(void 0, containerElement, relatedTarget);
85
74
  }
86
75
  function getInputType(event) {
87
76
  const nativeEvent = "nativeEvent" in event ? event.nativeEvent : event;
88
- if (!nativeEvent)
89
- return;
90
- if (!("inputType" in nativeEvent))
91
- return;
92
- if (typeof nativeEvent.inputType !== "string")
93
- return;
77
+ if (!nativeEvent) return;
78
+ if (!("inputType" in nativeEvent)) return;
79
+ if (typeof nativeEvent.inputType !== "string") return;
94
80
  return nativeEvent.inputType;
95
81
  }
96
82
  function queueBeforeEvent(element, type, callback, timeout) {
@@ -4,10 +4,10 @@
4
4
 
5
5
 
6
6
 
7
- var _Q2WCPTYScjs = require('../__chunks/Q2WCPTYS.cjs');
7
+ var _7WYII4ANcjs = require('../__chunks/7WYII4AN.cjs');
8
8
 
9
9
 
10
- var _AV6KTKLEcjs = require('../__chunks/AV6KTKLE.cjs');
10
+ var _3IVNQNIVcjs = require('../__chunks/3IVNQNIV.cjs');
11
11
 
12
12
  // src/utils/focus.ts
13
13
  var selector = "input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";
@@ -16,43 +16,27 @@ function hasNegativeTabIndex(element) {
16
16
  return tabIndex < 0;
17
17
  }
18
18
  function isFocusable(element) {
19
- if (!element.matches(selector))
20
- return false;
21
- if (!_Q2WCPTYScjs.isVisible.call(void 0, element))
22
- return false;
23
- if (element.closest("[inert]"))
24
- return false;
19
+ if (!element.matches(selector)) return false;
20
+ if (!_7WYII4ANcjs.isVisible.call(void 0, element)) return false;
21
+ if (element.closest("[inert]")) return false;
25
22
  return true;
26
23
  }
27
24
  function isTabbable(element) {
28
- if (!isFocusable(element))
29
- return false;
30
- if (hasNegativeTabIndex(element))
31
- return false;
32
- if (!("form" in element))
33
- return true;
34
- if (!element.form)
35
- return true;
36
- if (element.checked)
37
- return true;
38
- if (element.type !== "radio")
39
- return true;
25
+ if (!isFocusable(element)) return false;
26
+ if (hasNegativeTabIndex(element)) return false;
27
+ if (!("form" in element)) return true;
28
+ if (!element.form) return true;
29
+ if (element.checked) return true;
30
+ if (element.type !== "radio") return true;
40
31
  const radioGroup = element.form.elements.namedItem(element.name);
41
- if (!radioGroup)
42
- return true;
43
- if (!("length" in radioGroup))
44
- return true;
45
- const activeElement = _Q2WCPTYScjs.getActiveElement.call(void 0, element);
46
- if (!activeElement)
47
- return true;
48
- if (activeElement === element)
49
- return true;
50
- if (!("form" in activeElement))
51
- return true;
52
- if (activeElement.form !== element.form)
53
- return true;
54
- if (activeElement.name !== element.name)
55
- return true;
32
+ if (!radioGroup) return true;
33
+ if (!("length" in radioGroup)) return true;
34
+ const activeElement = _7WYII4ANcjs.getActiveElement.call(void 0, element);
35
+ if (!activeElement) return true;
36
+ if (activeElement === element) return true;
37
+ if (!("form" in activeElement)) return true;
38
+ if (activeElement.form !== element.form) return true;
39
+ if (activeElement.name !== element.name) return true;
56
40
  return false;
57
41
  }
58
42
  function getAllFocusableIn(container, includeContainer) {
@@ -64,7 +48,7 @@ function getAllFocusableIn(container, includeContainer) {
64
48
  }
65
49
  const focusableElements = elements.filter(isFocusable);
66
50
  focusableElements.forEach((element, i) => {
67
- if (_Q2WCPTYScjs.isFrame.call(void 0, element) && element.contentDocument) {
51
+ if (_7WYII4ANcjs.isFrame.call(void 0, element) && element.contentDocument) {
68
52
  const frameBody = element.contentDocument.body;
69
53
  focusableElements.splice(i, 1, ...getAllFocusableIn(frameBody));
70
54
  }
@@ -90,7 +74,7 @@ function getAllTabbableIn(container, includeContainer, fallbackToFocusable) {
90
74
  tabbableElements.unshift(container);
91
75
  }
92
76
  tabbableElements.forEach((element, i) => {
93
- if (_Q2WCPTYScjs.isFrame.call(void 0, element) && element.contentDocument) {
77
+ if (_7WYII4ANcjs.isFrame.call(void 0, element) && element.contentDocument) {
94
78
  const frameBody = element.contentDocument.body;
95
79
  const allFrameTabbable = getAllTabbableIn(
96
80
  frameBody,
@@ -131,7 +115,7 @@ function getLastTabbable(fallbackToFocusable) {
131
115
  return getLastTabbableIn(document.body, false, fallbackToFocusable);
132
116
  }
133
117
  function getNextTabbableIn(container, includeContainer, fallbackToFirst, fallbackToFocusable) {
134
- const activeElement = _Q2WCPTYScjs.getActiveElement.call(void 0, container);
118
+ const activeElement = _7WYII4ANcjs.getActiveElement.call(void 0, container);
135
119
  const allFocusable = getAllFocusableIn(container, includeContainer);
136
120
  const activeIndex = allFocusable.indexOf(activeElement);
137
121
  const nextFocusableElements = allFocusable.slice(activeIndex + 1);
@@ -146,7 +130,7 @@ function getNextTabbable(fallbackToFirst, fallbackToFocusable) {
146
130
  );
147
131
  }
148
132
  function getPreviousTabbableIn(container, includeContainer, fallbackToLast, fallbackToFocusable) {
149
- const activeElement = _Q2WCPTYScjs.getActiveElement.call(void 0, container);
133
+ const activeElement = _7WYII4ANcjs.getActiveElement.call(void 0, container);
150
134
  const allFocusable = getAllFocusableIn(container, includeContainer).reverse();
151
135
  const activeIndex = allFocusable.indexOf(activeElement);
152
136
  const previousFocusableElements = allFocusable.slice(activeIndex + 1);
@@ -167,29 +151,21 @@ function getClosestFocusable(element) {
167
151
  return element || null;
168
152
  }
169
153
  function hasFocus(element) {
170
- const activeElement = _Q2WCPTYScjs.getActiveElement.call(void 0, element);
171
- if (!activeElement)
172
- return false;
173
- if (activeElement === element)
174
- return true;
154
+ const activeElement = _7WYII4ANcjs.getActiveElement.call(void 0, element);
155
+ if (!activeElement) return false;
156
+ if (activeElement === element) return true;
175
157
  const activeDescendant = activeElement.getAttribute("aria-activedescendant");
176
- if (!activeDescendant)
177
- return false;
158
+ if (!activeDescendant) return false;
178
159
  return activeDescendant === element.id;
179
160
  }
180
161
  function hasFocusWithin(element) {
181
- const activeElement = _Q2WCPTYScjs.getActiveElement.call(void 0, element);
182
- if (!activeElement)
183
- return false;
184
- if (_Q2WCPTYScjs.contains.call(void 0, element, activeElement))
185
- return true;
162
+ const activeElement = _7WYII4ANcjs.getActiveElement.call(void 0, element);
163
+ if (!activeElement) return false;
164
+ if (_7WYII4ANcjs.contains.call(void 0, element, activeElement)) return true;
186
165
  const activeDescendant = activeElement.getAttribute("aria-activedescendant");
187
- if (!activeDescendant)
188
- return false;
189
- if (!("id" in element))
190
- return false;
191
- if (activeDescendant === element.id)
192
- return true;
166
+ if (!activeDescendant) return false;
167
+ if (!("id" in element)) return false;
168
+ if (activeDescendant === element.id) return true;
193
169
  return !!element.querySelector(`#${CSS.escape(activeDescendant)}`);
194
170
  }
195
171
  function focusIfNeeded(element) {
@@ -232,7 +208,7 @@ function focusIntoView(element, options) {
232
208
  element.focus();
233
209
  } else {
234
210
  element.focus({ preventScroll: true });
235
- element.scrollIntoView(_AV6KTKLEcjs.__spreadValues.call(void 0, { block: "nearest", inline: "nearest" }, options));
211
+ element.scrollIntoView(_3IVNQNIVcjs.__spreadValues.call(void 0, { block: "nearest", inline: "nearest" }, options));
236
212
  }
237
213
  }
238
214
 
@@ -21,8 +21,8 @@
21
21
 
22
22
 
23
23
 
24
- var _EEDWPDM2cjs = require('../__chunks/EEDWPDM2.cjs');
25
- require('../__chunks/AV6KTKLE.cjs');
24
+ var _BTUHABP4cjs = require('../__chunks/BTUHABP4.cjs');
25
+ require('../__chunks/3IVNQNIV.cjs');
26
26
 
27
27
 
28
28
 
@@ -45,4 +45,4 @@ require('../__chunks/AV6KTKLE.cjs');
45
45
 
46
46
 
47
47
 
48
- exports.afterPaint = _EEDWPDM2cjs.afterPaint; exports.applyState = _EEDWPDM2cjs.applyState; exports.beforePaint = _EEDWPDM2cjs.beforePaint; exports.chain = _EEDWPDM2cjs.chain; exports.cx = _EEDWPDM2cjs.cx; exports.defaultValue = _EEDWPDM2cjs.defaultValue; exports.disabledFromProps = _EEDWPDM2cjs.disabledFromProps; exports.getKeys = _EEDWPDM2cjs.getKeys; exports.hasOwnProperty = _EEDWPDM2cjs.hasOwnProperty; exports.identity = _EEDWPDM2cjs.identity; exports.invariant = _EEDWPDM2cjs.invariant; exports.isEmpty = _EEDWPDM2cjs.isEmpty; exports.isFalsyBooleanCallback = _EEDWPDM2cjs.isFalsyBooleanCallback; exports.isInteger = _EEDWPDM2cjs.isInteger; exports.isObject = _EEDWPDM2cjs.isObject; exports.noop = _EEDWPDM2cjs.noop; exports.normalizeString = _EEDWPDM2cjs.normalizeString; exports.omit = _EEDWPDM2cjs.omit; exports.pick = _EEDWPDM2cjs.pick; exports.removeUndefinedValues = _EEDWPDM2cjs.removeUndefinedValues; exports.shallowEqual = _EEDWPDM2cjs.shallowEqual;
48
+ exports.afterPaint = _BTUHABP4cjs.afterPaint; exports.applyState = _BTUHABP4cjs.applyState; exports.beforePaint = _BTUHABP4cjs.beforePaint; exports.chain = _BTUHABP4cjs.chain; exports.cx = _BTUHABP4cjs.cx; exports.defaultValue = _BTUHABP4cjs.defaultValue; exports.disabledFromProps = _BTUHABP4cjs.disabledFromProps; exports.getKeys = _BTUHABP4cjs.getKeys; exports.hasOwnProperty = _BTUHABP4cjs.hasOwnProperty; exports.identity = _BTUHABP4cjs.identity; exports.invariant = _BTUHABP4cjs.invariant; exports.isEmpty = _BTUHABP4cjs.isEmpty; exports.isFalsyBooleanCallback = _BTUHABP4cjs.isFalsyBooleanCallback; exports.isInteger = _BTUHABP4cjs.isInteger; exports.isObject = _BTUHABP4cjs.isObject; exports.noop = _BTUHABP4cjs.noop; exports.normalizeString = _BTUHABP4cjs.normalizeString; exports.omit = _BTUHABP4cjs.omit; exports.pick = _BTUHABP4cjs.pick; exports.removeUndefinedValues = _BTUHABP4cjs.removeUndefinedValues; exports.shallowEqual = _BTUHABP4cjs.shallowEqual;
@@ -99,7 +99,7 @@ export declare function invariant(condition: any, message?: string | boolean): a
99
99
  /**
100
100
  * Similar to `Object.keys` but returns a type-safe array of keys.
101
101
  */
102
- export declare function getKeys<T extends object>(obj: T): (keyof T)[];
102
+ export declare function getKeys<T extends object>(obj: T): Array<keyof T>;
103
103
  /**
104
104
  * Checks whether a boolean event prop (e.g., hideOnInteractOutside) was
105
105
  * intentionally set to false, either with a boolean value or a callback that
@@ -99,7 +99,7 @@ export declare function invariant(condition: any, message?: string | boolean): a
99
99
  /**
100
100
  * Similar to `Object.keys` but returns a type-safe array of keys.
101
101
  */
102
- export declare function getKeys<T extends object>(obj: T): (keyof T)[];
102
+ export declare function getKeys<T extends object>(obj: T): Array<keyof T>;
103
103
  /**
104
104
  * Checks whether a boolean event prop (e.g., hideOnInteractOutside) was
105
105
  * intentionally set to false, either with a boolean value or a callback that
@@ -5,13 +5,13 @@
5
5
 
6
6
 
7
7
 
8
- var _D7M2PCAQcjs = require('../__chunks/D7M2PCAQ.cjs');
9
- require('../__chunks/Q2WCPTYS.cjs');
10
- require('../__chunks/AV6KTKLE.cjs');
8
+ var _KCEXELK7cjs = require('../__chunks/KCEXELK7.cjs');
9
+ require('../__chunks/7WYII4AN.cjs');
10
+ require('../__chunks/3IVNQNIV.cjs');
11
11
 
12
12
 
13
13
 
14
14
 
15
15
 
16
16
 
17
- exports.isApple = _D7M2PCAQcjs.isApple; exports.isFirefox = _D7M2PCAQcjs.isFirefox; exports.isMac = _D7M2PCAQcjs.isMac; exports.isSafari = _D7M2PCAQcjs.isSafari; exports.isTouchDevice = _D7M2PCAQcjs.isTouchDevice;
17
+ exports.isApple = _KCEXELK7cjs.isApple; exports.isFirefox = _KCEXELK7cjs.isFirefox; exports.isMac = _KCEXELK7cjs.isMac; exports.isSafari = _KCEXELK7cjs.isSafari; exports.isTouchDevice = _KCEXELK7cjs.isTouchDevice;
@@ -10,9 +10,9 @@
10
10
 
11
11
 
12
12
 
13
- var _M2NNCFIJcjs = require('../__chunks/M2NNCFIJ.cjs');
14
- require('../__chunks/EEDWPDM2.cjs');
15
- require('../__chunks/AV6KTKLE.cjs');
13
+ var _3QF3ODTRcjs = require('../__chunks/3QF3ODTR.cjs');
14
+ require('../__chunks/BTUHABP4.cjs');
15
+ require('../__chunks/3IVNQNIV.cjs');
16
16
 
17
17
 
18
18
 
@@ -24,4 +24,4 @@ require('../__chunks/AV6KTKLE.cjs');
24
24
 
25
25
 
26
26
 
27
- exports.batch = _M2NNCFIJcjs.batch; exports.createStore = _M2NNCFIJcjs.createStore; exports.init = _M2NNCFIJcjs.init; exports.mergeStore = _M2NNCFIJcjs.mergeStore; exports.omit = _M2NNCFIJcjs.omit; exports.pick = _M2NNCFIJcjs.pick; exports.setup = _M2NNCFIJcjs.setup; exports.subscribe = _M2NNCFIJcjs.subscribe; exports.sync = _M2NNCFIJcjs.sync; exports.throwOnConflictingProps = _M2NNCFIJcjs.throwOnConflictingProps;
27
+ exports.batch = _3QF3ODTRcjs.batch; exports.createStore = _3QF3ODTRcjs.createStore; exports.init = _3QF3ODTRcjs.init; exports.mergeStore = _3QF3ODTRcjs.mergeStore; exports.omit = _3QF3ODTRcjs.omit; exports.pick = _3QF3ODTRcjs.pick; exports.setup = _3QF3ODTRcjs.setup; exports.subscribe = _3QF3ODTRcjs.subscribe; exports.sync = _3QF3ODTRcjs.sync; exports.throwOnConflictingProps = _3QF3ODTRcjs.throwOnConflictingProps;
@@ -2,9 +2,9 @@
2
2
 
3
3
 
4
4
 
5
- var _LPDHSEHUcjs = require('../__chunks/LPDHSEHU.cjs');
6
- require('../__chunks/AV6KTKLE.cjs');
5
+ var _7CES7GVEcjs = require('../__chunks/7CES7GVE.cjs');
6
+ require('../__chunks/3IVNQNIV.cjs');
7
7
 
8
8
 
9
9
 
10
- exports.UndoManager = _LPDHSEHUcjs.UndoManager; exports.createUndoManager = _LPDHSEHUcjs.createUndoManager;
10
+ exports.UndoManager = _7CES7GVEcjs.UndoManager; exports.createUndoManager = _7CES7GVEcjs.createUndoManager;
@@ -1,21 +1,21 @@
1
1
  "use client";
2
2
  import {
3
3
  createDialogStore
4
- } from "./NWACXGIN.js";
4
+ } from "./YOHCVXJB.js";
5
5
  import {
6
6
  createStore,
7
7
  mergeStore,
8
8
  omit,
9
9
  throwOnConflictingProps
10
- } from "./KLPDXTDE.js";
10
+ } from "./EQQLU3CG.js";
11
11
  import {
12
12
  defaultValue
13
- } from "./22HHDS5F.js";
13
+ } from "./PBFD2E7P.js";
14
14
  import {
15
15
  __objRest,
16
16
  __spreadProps,
17
17
  __spreadValues
18
- } from "./4R3V3JGP.js";
18
+ } from "./3YLGPPWQ.js";
19
19
 
20
20
  // src/popover/popover-store.ts
21
21
  function createPopoverStore(_a = {}) {
@@ -5,18 +5,18 @@ import {
5
5
  init,
6
6
  setup,
7
7
  throwOnConflictingProps
8
- } from "./KLPDXTDE.js";
8
+ } from "./EQQLU3CG.js";
9
9
  import {
10
10
  chain,
11
11
  defaultValue
12
- } from "./22HHDS5F.js";
12
+ } from "./PBFD2E7P.js";
13
13
  import {
14
14
  getDocument
15
- } from "./I2NJJ3XW.js";
15
+ } from "./HWOIWM4O.js";
16
16
  import {
17
17
  __spreadProps,
18
18
  __spreadValues
19
- } from "./4R3V3JGP.js";
19
+ } from "./3YLGPPWQ.js";
20
20
 
21
21
  // src/collection/collection-store.ts
22
22
  function isElementPreceding(a, b) {
@@ -30,10 +30,8 @@ function sortBasedOnDOMPosition(items) {
30
30
  pairs.sort(([indexA, a], [indexB, b]) => {
31
31
  const elementA = a.element;
32
32
  const elementB = b.element;
33
- if (elementA === elementB)
34
- return 0;
35
- if (!elementA || !elementB)
36
- return 0;
33
+ if (elementA === elementB) return 0;
34
+ if (!elementA || !elementB) return 0;
37
35
  if (isElementPreceding(elementA, elementB)) {
38
36
  if (indexA > indexB) {
39
37
  isOrderDifferent = true;
@@ -104,8 +102,7 @@ function createCollectionStore(props = {}) {
104
102
  let firstRun = true;
105
103
  let raf = requestAnimationFrame(() => {
106
104
  const { renderedItems } = collection.getState();
107
- if (state.renderedItems === renderedItems)
108
- return;
105
+ if (state.renderedItems === renderedItems) return;
109
106
  sortItems(state.renderedItems);
110
107
  });
111
108
  if (typeof IntersectionObserver !== "function") {
@@ -122,8 +119,7 @@ function createCollectionStore(props = {}) {
122
119
  const root = getCommonParent(state.renderedItems);
123
120
  const observer = new IntersectionObserver(ioCallback, { root });
124
121
  for (const item of state.renderedItems) {
125
- if (!item.element)
126
- continue;
122
+ if (!item.element) continue;
127
123
  observer.observe(item.element);
128
124
  }
129
125
  return () => {
@@ -157,8 +153,7 @@ function createCollectionStore(props = {}) {
157
153
  return items2.filter(({ id }) => id !== item.id);
158
154
  }
159
155
  const index = items2.findIndex(({ id }) => id === item.id);
160
- if (index === -1)
161
- return items2;
156
+ if (index === -1) return items2;
162
157
  const nextItems = items2.slice();
163
158
  nextItems[index] = prevItem;
164
159
  itemsMap.set(item.id, prevItem);
@@ -182,8 +177,7 @@ function createCollectionStore(props = {}) {
182
177
  )
183
178
  ),
184
179
  item: (id) => {
185
- if (!id)
186
- return null;
180
+ if (!id) return null;
187
181
  let item = itemsMap.get(id);
188
182
  if (!item) {
189
183
  const { items: items2 } = collection.getState();
@@ -7,14 +7,14 @@ import {
7
7
  subscribe,
8
8
  sync,
9
9
  throwOnConflictingProps
10
- } from "./KLPDXTDE.js";
10
+ } from "./EQQLU3CG.js";
11
11
  import {
12
12
  defaultValue
13
- } from "./22HHDS5F.js";
13
+ } from "./PBFD2E7P.js";
14
14
  import {
15
15
  __spreadProps,
16
16
  __spreadValues
17
- } from "./4R3V3JGP.js";
17
+ } from "./3YLGPPWQ.js";
18
18
 
19
19
  // src/disclosure/disclosure-store.ts
20
20
  function createDisclosureStore(props = {}) {
@@ -43,16 +43,14 @@ function createDisclosureStore(props = {}) {
43
43
  setup(
44
44
  disclosure,
45
45
  () => sync(disclosure, ["animated", "animating"], (state) => {
46
- if (state.animated)
47
- return;
46
+ if (state.animated) return;
48
47
  disclosure.setState("animating", false);
49
48
  })
50
49
  );
51
50
  setup(
52
51
  disclosure,
53
52
  () => subscribe(disclosure, ["open"], () => {
54
- if (!disclosure.getState().animated)
55
- return;
53
+ if (!disclosure.getState().animated) return;
56
54
  disclosure.setState("animating", true);
57
55
  })
58
56
  );
@@ -21,21 +21,18 @@ function createUndoManager({
21
21
  const canRedo = () => redoStack.length > 0;
22
22
  const undo = async () => {
23
23
  var _a;
24
- if (!canUndo())
25
- return;
24
+ if (!canUndo()) return;
26
25
  currentGroup = null;
27
26
  redoStack.push(await ((_a = undoStack.pop()) == null ? void 0 : _a()));
28
27
  };
29
28
  const redo = async () => {
30
29
  var _a;
31
- if (!canRedo())
32
- return;
30
+ if (!canRedo()) return;
33
31
  currentGroup = null;
34
32
  undoStack.push(await ((_a = redoStack.pop()) == null ? void 0 : _a()));
35
33
  };
36
34
  const execute = async (callback, group) => {
37
- if (!callback)
38
- return;
35
+ if (!callback) return;
39
36
  while (undoStack.length > limit) {
40
37
  undoStack.shift();
41
38
  }
@@ -43,8 +40,7 @@ function createUndoManager({
43
40
  currentGroup = group != null ? group : null;
44
41
  const nextIndex = sameGroup ? Math.max(0, undoStack.length - 1) : undoStack.length;
45
42
  const undoCallback = await callback();
46
- if (!undoCallback)
47
- return;
43
+ if (!undoCallback) return;
48
44
  redoStack = [];
49
45
  const currentUndo = undoStack[nextIndex];
50
46
  undoStack[nextIndex] = createUndoCallback(async () => {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  createCollectionStore
4
- } from "./I2WJ7JBQ.js";
4
+ } from "./6DHTHWXD.js";
5
5
  import {
6
6
  flatten2DArray,
7
7
  reverseArray
@@ -10,14 +10,14 @@ import {
10
10
  createStore,
11
11
  setup,
12
12
  sync
13
- } from "./KLPDXTDE.js";
13
+ } from "./EQQLU3CG.js";
14
14
  import {
15
15
  defaultValue
16
- } from "./22HHDS5F.js";
16
+ } from "./PBFD2E7P.js";
17
17
  import {
18
18
  __spreadProps,
19
19
  __spreadValues
20
- } from "./4R3V3JGP.js";
20
+ } from "./3YLGPPWQ.js";
21
21
 
22
22
  // src/composite/composite-store.ts
23
23
  var NULL_ITEM = { id: null };
@@ -38,10 +38,8 @@ function getEnabledItems(items, excludeId) {
38
38
  });
39
39
  }
40
40
  function getOppositeOrientation(orientation) {
41
- if (orientation === "vertical")
42
- return "horizontal";
43
- if (orientation === "horizontal")
44
- return "vertical";
41
+ if (orientation === "vertical") return "horizontal";
42
+ if (orientation === "horizontal") return "vertical";
45
43
  return;
46
44
  }
47
45
  function getItemsInRow(items, rowId) {
@@ -160,8 +158,7 @@ function createCompositeStore(props = {}) {
160
158
  () => sync(composite, ["renderedItems", "activeId"], (state) => {
161
159
  composite.setState("activeId", (activeId2) => {
162
160
  var _a2;
163
- if (activeId2 !== void 0)
164
- return activeId2;
161
+ if (activeId2 !== void 0) return activeId2;
165
162
  return (_a2 = findFirstEnabledItem(state.renderedItems)) == null ? void 0 : _a2.id;
166
163
  });
167
164
  })
@@ -228,8 +225,7 @@ function createCompositeStore(props = {}) {
228
225
  setBaseElement: (element) => composite.setState("baseElement", element),
229
226
  setActiveId: (id) => composite.setState("activeId", id),
230
227
  move: (id) => {
231
- if (id === void 0)
232
- return;
228
+ if (id === void 0) return;
233
229
  composite.setState("activeId", id);
234
230
  composite.setState("moves", (moves) => moves + 1);
235
231
  },
@@ -1,17 +1,17 @@
1
1
  "use client";
2
2
  import {
3
3
  createPopoverStore
4
- } from "./SAZZJI72.js";
4
+ } from "./3UYWTADI.js";
5
5
  import {
6
6
  createStore
7
- } from "./KLPDXTDE.js";
7
+ } from "./EQQLU3CG.js";
8
8
  import {
9
9
  defaultValue
10
- } from "./22HHDS5F.js";
10
+ } from "./PBFD2E7P.js";
11
11
  import {
12
12
  __spreadProps,
13
13
  __spreadValues
14
- } from "./4R3V3JGP.js";
14
+ } from "./3YLGPPWQ.js";
15
15
 
16
16
  // src/hovercard/hovercard-store.ts
17
17
  function createHovercardStore(props = {}) {