@ariakit/core 0.4.5 → 0.4.6

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 (119) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/cjs/__chunks/{KL74MAHB.cjs → 3HYNC3XA.cjs} +2 -2
  3. package/cjs/__chunks/{QD2A4YF6.cjs → 4W3OYRR3.cjs} +2 -2
  4. package/cjs/__chunks/{MHZQJPY3.cjs → B4AKUC4S.cjs} +2 -2
  5. package/cjs/__chunks/{2D5LEVE7.cjs → D7M2PCAQ.cjs} +6 -6
  6. package/cjs/__chunks/{IMYW2UAC.cjs → Q2WCPTYS.cjs} +4 -22
  7. package/cjs/checkbox/checkbox-store.d.cts +2 -2
  8. package/cjs/checkbox/checkbox-store.d.ts +2 -2
  9. package/cjs/collection/collection-store.cjs +3 -3
  10. package/cjs/collection/collection-store.d.cts +2 -2
  11. package/cjs/collection/collection-store.d.ts +2 -2
  12. package/cjs/combobox/combobox-store.cjs +16 -7
  13. package/cjs/combobox/combobox-store.d.cts +5 -5
  14. package/cjs/combobox/combobox-store.d.ts +5 -5
  15. package/cjs/composite/composite-overflow-store.d.cts +2 -2
  16. package/cjs/composite/composite-overflow-store.d.ts +2 -2
  17. package/cjs/composite/composite-store.cjs +4 -4
  18. package/cjs/composite/composite-store.d.cts +3 -3
  19. package/cjs/composite/composite-store.d.ts +3 -3
  20. package/cjs/dialog/dialog-store.d.cts +2 -2
  21. package/cjs/dialog/dialog-store.d.ts +2 -2
  22. package/cjs/disclosure/disclosure-store.d.cts +2 -2
  23. package/cjs/disclosure/disclosure-store.d.ts +2 -2
  24. package/cjs/form/form-store.cjs +3 -3
  25. package/cjs/form/form-store.d.cts +4 -4
  26. package/cjs/form/form-store.d.ts +4 -4
  27. package/cjs/form/types.d.cts +3 -3
  28. package/cjs/form/types.d.ts +3 -3
  29. package/cjs/hovercard/hovercard-store.d.cts +3 -3
  30. package/cjs/hovercard/hovercard-store.d.ts +3 -3
  31. package/cjs/menu/menu-bar-store.cjs +5 -5
  32. package/cjs/menu/menu-bar-store.d.cts +2 -2
  33. package/cjs/menu/menu-bar-store.d.ts +2 -2
  34. package/cjs/menu/menu-store.cjs +4 -4
  35. package/cjs/menu/menu-store.d.cts +6 -6
  36. package/cjs/menu/menu-store.d.ts +6 -6
  37. package/cjs/menubar/menubar-store.cjs +5 -5
  38. package/cjs/menubar/menubar-store.d.cts +2 -2
  39. package/cjs/menubar/menubar-store.d.ts +2 -2
  40. package/cjs/popover/popover-store.d.cts +3 -3
  41. package/cjs/popover/popover-store.d.ts +3 -3
  42. package/cjs/radio/radio-store.cjs +4 -4
  43. package/cjs/radio/radio-store.d.cts +3 -3
  44. package/cjs/radio/radio-store.d.ts +3 -3
  45. package/cjs/select/select-store.cjs +16 -6
  46. package/cjs/select/select-store.d.cts +17 -9
  47. package/cjs/select/select-store.d.ts +17 -9
  48. package/cjs/tab/tab-store.cjs +45 -12
  49. package/cjs/tab/tab-store.d.cts +7 -6
  50. package/cjs/tab/tab-store.d.ts +7 -6
  51. package/cjs/tag/tag-store.cjs +4 -4
  52. package/cjs/tag/tag-store.d.cts +3 -3
  53. package/cjs/tag/tag-store.d.ts +3 -3
  54. package/cjs/toolbar/toolbar-store.cjs +4 -4
  55. package/cjs/toolbar/toolbar-store.d.cts +2 -2
  56. package/cjs/toolbar/toolbar-store.d.ts +2 -2
  57. package/cjs/tooltip/tooltip-store.d.cts +2 -2
  58. package/cjs/tooltip/tooltip-store.d.ts +2 -2
  59. package/cjs/utils/dom.cjs +2 -6
  60. package/cjs/utils/dom.d.cts +1 -17
  61. package/cjs/utils/dom.d.ts +1 -17
  62. package/cjs/utils/events.cjs +20 -15
  63. package/cjs/utils/events.d.cts +1 -1
  64. package/cjs/utils/events.d.ts +1 -1
  65. package/cjs/utils/focus.cjs +13 -15
  66. package/cjs/utils/focus.d.cts +1 -1
  67. package/cjs/utils/focus.d.ts +1 -1
  68. package/cjs/utils/misc.d.cts +1 -1
  69. package/cjs/utils/misc.d.ts +1 -1
  70. package/cjs/utils/platform.cjs +3 -3
  71. package/cjs/utils/store.d.cts +3 -3
  72. package/cjs/utils/store.d.ts +3 -3
  73. package/esm/__chunks/{QAI5BPCY.js → CLSHHUGK.js} +1 -1
  74. package/esm/__chunks/{ABMC67JW.js → EQPTKGFA.js} +1 -1
  75. package/esm/__chunks/{IUORCTET.js → I2NJJ3XW.js} +3 -21
  76. package/esm/__chunks/{K7A7LTR3.js → P3MTNH46.js} +1 -1
  77. package/esm/__chunks/{YVUNPQHS.js → PBSSD2DM.js} +1 -1
  78. package/esm/checkbox/checkbox-store.d.ts +2 -2
  79. package/esm/collection/collection-store.d.ts +2 -2
  80. package/esm/collection/collection-store.js +2 -2
  81. package/esm/combobox/combobox-store.d.ts +5 -5
  82. package/esm/combobox/combobox-store.js +16 -7
  83. package/esm/composite/composite-overflow-store.d.ts +2 -2
  84. package/esm/composite/composite-store.d.ts +3 -3
  85. package/esm/composite/composite-store.js +3 -3
  86. package/esm/dialog/dialog-store.d.ts +2 -2
  87. package/esm/disclosure/disclosure-store.d.ts +2 -2
  88. package/esm/form/form-store.d.ts +4 -4
  89. package/esm/form/form-store.js +2 -2
  90. package/esm/form/types.d.ts +3 -3
  91. package/esm/hovercard/hovercard-store.d.ts +3 -3
  92. package/esm/menu/menu-bar-store.d.ts +2 -2
  93. package/esm/menu/menu-bar-store.js +4 -4
  94. package/esm/menu/menu-store.d.ts +6 -6
  95. package/esm/menu/menu-store.js +3 -3
  96. package/esm/menubar/menubar-store.d.ts +2 -2
  97. package/esm/menubar/menubar-store.js +4 -4
  98. package/esm/popover/popover-store.d.ts +3 -3
  99. package/esm/radio/radio-store.d.ts +3 -3
  100. package/esm/radio/radio-store.js +3 -3
  101. package/esm/select/select-store.d.ts +17 -9
  102. package/esm/select/select-store.js +15 -5
  103. package/esm/tab/tab-store.d.ts +7 -6
  104. package/esm/tab/tab-store.js +43 -10
  105. package/esm/tag/tag-store.d.ts +3 -3
  106. package/esm/tag/tag-store.js +3 -3
  107. package/esm/toolbar/toolbar-store.d.ts +2 -2
  108. package/esm/toolbar/toolbar-store.js +3 -3
  109. package/esm/tooltip/tooltip-store.d.ts +2 -2
  110. package/esm/utils/dom.d.ts +1 -17
  111. package/esm/utils/dom.js +1 -5
  112. package/esm/utils/events.d.ts +1 -1
  113. package/esm/utils/events.js +17 -12
  114. package/esm/utils/focus.d.ts +1 -1
  115. package/esm/utils/focus.js +5 -7
  116. package/esm/utils/misc.d.ts +1 -1
  117. package/esm/utils/platform.js +2 -2
  118. package/esm/utils/store.d.ts +3 -3
  119. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @ariakit/core
2
2
 
3
+ ## 0.4.6
4
+
5
+ - Ensured [Combobox](https://ariakit.org/components/combobox) uses roving tabindex to manage focus on mobile Safari.
6
+ - Added a new `listElement` state to the Select store.
7
+ - Removed unnecessary utility functions: `closest`, `matches`.
8
+ - Improved use of [Tab](https://ariakit.org/components/tab) components within [Select](https://ariakit.org/components/select) widgets.
9
+ - Improved JSDocs.
10
+
3
11
  ## 0.4.5
4
12
 
5
13
  - Added new `undo` utils.
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _QD2A4YF6cjs = require('./QD2A4YF6.cjs');
4
+ var _4W3OYRR3cjs = require('./4W3OYRR3.cjs');
5
5
 
6
6
 
7
7
 
@@ -124,7 +124,7 @@ 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 = _QD2A4YF6cjs.createCollectionStore.call(void 0, props);
127
+ const collection = _4W3OYRR3cjs.createCollectionStore.call(void 0, props);
128
128
  const activeId = _EEDWPDM2cjs.defaultValue.call(void 0,
129
129
  props.activeId,
130
130
  syncState == null ? void 0 : syncState.activeId,
@@ -12,7 +12,7 @@ var _B4LYZ4EMcjs = require('./B4LYZ4EM.cjs');
12
12
  var _EEDWPDM2cjs = require('./EEDWPDM2.cjs');
13
13
 
14
14
 
15
- var _IMYW2UACcjs = require('./IMYW2UAC.cjs');
15
+ var _Q2WCPTYScjs = require('./Q2WCPTYS.cjs');
16
16
 
17
17
 
18
18
 
@@ -62,7 +62,7 @@ function getCommonParent(items) {
62
62
  }
63
63
  parentElement = parentElement.parentElement;
64
64
  }
65
- return _IMYW2UACcjs.getDocument.call(void 0, parentElement).body;
65
+ return _Q2WCPTYScjs.getDocument.call(void 0, parentElement).body;
66
66
  }
67
67
  function getPrivateStore(store) {
68
68
  return store == null ? void 0 : store.__unstablePrivateStore;
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _KL74MAHBcjs = require('./KL74MAHB.cjs');
4
+ var _3HYNC3XAcjs = require('./3HYNC3XA.cjs');
5
5
 
6
6
 
7
7
  var _B4LYZ4EMcjs = require('./B4LYZ4EM.cjs');
@@ -17,7 +17,7 @@ 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 = _KL74MAHBcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
20
+ const composite = _3HYNC3XAcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
21
21
  orientation: _EEDWPDM2cjs.defaultValue.call(void 0,
22
22
  props.orientation,
23
23
  syncState == null ? void 0 : syncState.orientation,
@@ -1,25 +1,25 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _IMYW2UACcjs = require('./IMYW2UAC.cjs');
4
+ var _Q2WCPTYScjs = require('./Q2WCPTYS.cjs');
5
5
 
6
6
  // src/utils/platform.ts
7
7
  function isTouchDevice() {
8
- return _IMYW2UACcjs.canUseDOM && !!navigator.maxTouchPoints;
8
+ return _Q2WCPTYScjs.canUseDOM && !!navigator.maxTouchPoints;
9
9
  }
10
10
  function isApple() {
11
- if (!_IMYW2UACcjs.canUseDOM)
11
+ if (!_Q2WCPTYScjs.canUseDOM)
12
12
  return false;
13
13
  return /mac|iphone|ipad|ipod/i.test(navigator.platform);
14
14
  }
15
15
  function isSafari() {
16
- return _IMYW2UACcjs.canUseDOM && isApple() && /apple/i.test(navigator.vendor);
16
+ return _Q2WCPTYScjs.canUseDOM && isApple() && /apple/i.test(navigator.vendor);
17
17
  }
18
18
  function isFirefox() {
19
- return _IMYW2UACcjs.canUseDOM && /firefox\//i.test(navigator.userAgent);
19
+ return _Q2WCPTYScjs.canUseDOM && /firefox\//i.test(navigator.userAgent);
20
20
  }
21
21
  function isMac() {
22
- return _IMYW2UACcjs.canUseDOM && navigator.platform.startsWith("Mac") && !isTouchDevice();
22
+ return _Q2WCPTYScjs.canUseDOM && navigator.platform.startsWith("Mac") && !isTouchDevice();
23
23
  }
24
24
 
25
25
 
@@ -57,29 +57,13 @@ var buttonInputTypes = [
57
57
  "reset",
58
58
  "submit"
59
59
  ];
60
- function matches(element, selectors) {
61
- if ("matches" in element) {
62
- return element.matches(selectors);
63
- }
64
- if ("msMatchesSelector" in element) {
65
- return element.msMatchesSelector(selectors);
66
- }
67
- return element.webkitMatchesSelector(selectors);
68
- }
69
60
  function isVisible(element) {
61
+ if (typeof element.checkVisibility === "function") {
62
+ return element.checkVisibility();
63
+ }
70
64
  const htmlElement = element;
71
65
  return htmlElement.offsetWidth > 0 || htmlElement.offsetHeight > 0 || element.getClientRects().length > 0;
72
66
  }
73
- function closest(element, selectors) {
74
- if ("closest" in element)
75
- return element.closest(selectors);
76
- do {
77
- if (matches(element, selectors))
78
- return element;
79
- element = element.parentElement || element.parentNode;
80
- } while (element !== null && element.nodeType === 1);
81
- return null;
82
- }
83
67
  function isTextField(element) {
84
68
  try {
85
69
  const isTextInput = element instanceof HTMLInputElement && element.selectionStart !== null;
@@ -207,6 +191,4 @@ function setSelectionRange(element, ...args) {
207
191
 
208
192
 
209
193
 
210
-
211
-
212
- exports.canUseDOM = canUseDOM; exports.getDocument = getDocument; exports.getWindow = getWindow; exports.getActiveElement = getActiveElement; exports.contains = contains; exports.isFrame = isFrame; exports.isButton = isButton; exports.matches = matches; exports.isVisible = isVisible; exports.closest = closest; exports.isTextField = isTextField; exports.isTextbox = isTextbox; exports.getTextboxValue = getTextboxValue; exports.getTextboxSelection = getTextboxSelection; exports.getPopupRole = getPopupRole; exports.getPopupItemRole = getPopupItemRole; exports.scrollIntoViewIfNeeded = scrollIntoViewIfNeeded; exports.getScrollingElement = getScrollingElement; exports.isPartiallyHidden = isPartiallyHidden; exports.setSelectionRange = setSelectionRange;
194
+ exports.canUseDOM = canUseDOM; exports.getDocument = getDocument; exports.getWindow = getWindow; exports.getActiveElement = getActiveElement; exports.contains = contains; exports.isFrame = isFrame; exports.isButton = isButton; exports.isVisible = isVisible; exports.isTextField = isTextField; exports.isTextbox = isTextbox; exports.getTextboxValue = getTextboxValue; exports.getTextboxSelection = getTextboxSelection; exports.getPopupRole = getPopupRole; exports.getPopupItemRole = getPopupItemRole; exports.scrollIntoViewIfNeeded = scrollIntoViewIfNeeded; exports.getScrollingElement = getScrollingElement; exports.isPartiallyHidden = isPartiallyHidden; exports.setSelectionRange = setSelectionRange;
@@ -1,5 +1,5 @@
1
- import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
2
- import type { PickRequired, SetState, ToPrimitive } from "../utils/types.js";
1
+ import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
2
+ import type { PickRequired, SetState, ToPrimitive } from "../utils/types.ts";
3
3
  /**
4
4
  * Creates a checkbox store.
5
5
  */
@@ -1,5 +1,5 @@
1
- import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
2
- import type { PickRequired, SetState, ToPrimitive } from "../utils/types.js";
1
+ import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
2
+ import type { PickRequired, SetState, ToPrimitive } from "../utils/types.ts";
3
3
  /**
4
4
  * Creates a checkbox store.
5
5
  */
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _QD2A4YF6cjs = require('../__chunks/QD2A4YF6.cjs');
4
+ var _4W3OYRR3cjs = require('../__chunks/4W3OYRR3.cjs');
5
5
  require('../__chunks/B4LYZ4EM.cjs');
6
6
  require('../__chunks/EEDWPDM2.cjs');
7
- require('../__chunks/IMYW2UAC.cjs');
7
+ require('../__chunks/Q2WCPTYS.cjs');
8
8
  require('../__chunks/AV6KTKLE.cjs');
9
9
 
10
10
 
11
- exports.createCollectionStore = _QD2A4YF6cjs.createCollectionStore;
11
+ exports.createCollectionStore = _4W3OYRR3cjs.createCollectionStore;
@@ -1,5 +1,5 @@
1
- import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
2
- import type { BivariantCallback } from "../utils/types.js";
1
+ import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
2
+ import type { BivariantCallback } from "../utils/types.ts";
3
3
  /**
4
4
  * Creates a collection store.
5
5
  */
@@ -1,5 +1,5 @@
1
- import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
2
- import type { BivariantCallback } from "../utils/types.js";
1
+ import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
2
+ import type { BivariantCallback } from "../utils/types.ts";
3
3
  /**
4
4
  * Creates a collection store.
5
5
  */
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _KL74MAHBcjs = require('../__chunks/KL74MAHB.cjs');
5
- require('../__chunks/QD2A4YF6.cjs');
4
+ var _3HYNC3XAcjs = require('../__chunks/3HYNC3XA.cjs');
5
+ require('../__chunks/4W3OYRR3.cjs');
6
6
  require('../__chunks/ULSPM3Y3.cjs');
7
7
 
8
8
 
@@ -24,8 +24,9 @@ var _B4LYZ4EMcjs = require('../__chunks/B4LYZ4EM.cjs');
24
24
  var _EEDWPDM2cjs = require('../__chunks/EEDWPDM2.cjs');
25
25
 
26
26
 
27
- var _2D5LEVE7cjs = require('../__chunks/2D5LEVE7.cjs');
28
- require('../__chunks/IMYW2UAC.cjs');
27
+
28
+ var _D7M2PCAQcjs = require('../__chunks/D7M2PCAQ.cjs');
29
+ require('../__chunks/Q2WCPTYS.cjs');
29
30
 
30
31
 
31
32
 
@@ -33,7 +34,7 @@ require('../__chunks/IMYW2UAC.cjs');
33
34
  var _AV6KTKLEcjs = require('../__chunks/AV6KTKLE.cjs');
34
35
 
35
36
  // src/combobox/combobox-store.ts
36
- var isSafariOnMobile = _2D5LEVE7cjs.isSafari.call(void 0, ) && matchMedia("(hover:none)").matches;
37
+ var isTouchSafari = _D7M2PCAQcjs.isSafari.call(void 0, ) && _D7M2PCAQcjs.isTouchDevice.call(void 0, );
37
38
  function createComboboxStore(_a = {}) {
38
39
  var _b = _a, {
39
40
  tag
@@ -50,7 +51,7 @@ function createComboboxStore(_a = {}) {
50
51
  props.defaultActiveId,
51
52
  null
52
53
  );
53
- const composite = _KL74MAHBcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
54
+ const composite = _3HYNC3XAcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
54
55
  activeId,
55
56
  includesBaseElement: _EEDWPDM2cjs.defaultValue.call(void 0,
56
57
  props.includesBaseElement,
@@ -67,7 +68,7 @@ function createComboboxStore(_a = {}) {
67
68
  virtualFocus: _EEDWPDM2cjs.defaultValue.call(void 0,
68
69
  props.virtualFocus,
69
70
  syncState == null ? void 0 : syncState.virtualFocus,
70
- !isSafariOnMobile
71
+ true
71
72
  )
72
73
  }));
73
74
  const popover = _5JEQEZFRcjs.createPopoverStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
@@ -107,6 +108,14 @@ function createComboboxStore(_a = {}) {
107
108
  activeValue: syncState == null ? void 0 : syncState.activeValue
108
109
  });
109
110
  const combobox = _B4LYZ4EMcjs.createStore.call(void 0, initialState, composite, popover, store);
111
+ if (isTouchSafari) {
112
+ _B4LYZ4EMcjs.setup.call(void 0,
113
+ combobox,
114
+ () => _B4LYZ4EMcjs.sync.call(void 0, combobox, ["virtualFocus"], () => {
115
+ combobox.setState("virtualFocus", false);
116
+ })
117
+ );
118
+ }
110
119
  _B4LYZ4EMcjs.setup.call(void 0, combobox, () => {
111
120
  if (!tag)
112
121
  return;
@@ -1,8 +1,8 @@
1
- import type { CompositeStoreFunctions, CompositeStoreItem, CompositeStoreOptions, CompositeStoreState } from "../composite/composite-store.js";
2
- import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.js";
3
- import type { TagStore } from "../tag/tag-store.js";
4
- import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
5
- import type { PickRequired, SetState } from "../utils/types.js";
1
+ import type { CompositeStoreFunctions, CompositeStoreItem, CompositeStoreOptions, CompositeStoreState } from "../composite/composite-store.ts";
2
+ import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.ts";
3
+ import type { TagStore } from "../tag/tag-store.ts";
4
+ import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
5
+ import type { PickRequired, SetState } from "../utils/types.ts";
6
6
  type MutableValue<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> = T extends string ? string : T;
7
7
  /**
8
8
  * Creates a combobox store.
@@ -1,8 +1,8 @@
1
- import type { CompositeStoreFunctions, CompositeStoreItem, CompositeStoreOptions, CompositeStoreState } from "../composite/composite-store.js";
2
- import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.js";
3
- import type { TagStore } from "../tag/tag-store.js";
4
- import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
5
- import type { PickRequired, SetState } from "../utils/types.js";
1
+ import type { CompositeStoreFunctions, CompositeStoreItem, CompositeStoreOptions, CompositeStoreState } from "../composite/composite-store.ts";
2
+ import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.ts";
3
+ import type { TagStore } from "../tag/tag-store.ts";
4
+ import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
5
+ import type { PickRequired, SetState } from "../utils/types.ts";
6
6
  type MutableValue<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> = T extends string ? string : T;
7
7
  /**
8
8
  * Creates a combobox store.
@@ -1,5 +1,5 @@
1
- import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.js";
2
- import type { Store, StoreProps } from "../utils/store.js";
1
+ import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.ts";
2
+ import type { Store, StoreProps } from "../utils/store.ts";
3
3
  /**
4
4
  * Creates a compositeOverflow store.
5
5
  */
@@ -1,5 +1,5 @@
1
- import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.js";
2
- import type { Store, StoreProps } from "../utils/store.js";
1
+ import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.ts";
2
+ import type { Store, StoreProps } from "../utils/store.ts";
3
3
  /**
4
4
  * Creates a compositeOverflow store.
5
5
  */
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _KL74MAHBcjs = require('../__chunks/KL74MAHB.cjs');
5
- require('../__chunks/QD2A4YF6.cjs');
4
+ var _3HYNC3XAcjs = require('../__chunks/3HYNC3XA.cjs');
5
+ require('../__chunks/4W3OYRR3.cjs');
6
6
  require('../__chunks/ULSPM3Y3.cjs');
7
7
  require('../__chunks/B4LYZ4EM.cjs');
8
8
  require('../__chunks/EEDWPDM2.cjs');
9
- require('../__chunks/IMYW2UAC.cjs');
9
+ require('../__chunks/Q2WCPTYS.cjs');
10
10
  require('../__chunks/AV6KTKLE.cjs');
11
11
 
12
12
 
13
- exports.createCompositeStore = _KL74MAHBcjs.createCompositeStore;
13
+ exports.createCompositeStore = _3HYNC3XAcjs.createCompositeStore;
@@ -1,6 +1,6 @@
1
- import type { CollectionStoreFunctions, CollectionStoreItem, CollectionStoreOptions, CollectionStoreState } from "../collection/collection-store.js";
2
- import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
3
- import type { SetState } from "../utils/types.js";
1
+ import type { CollectionStoreFunctions, CollectionStoreItem, CollectionStoreOptions, CollectionStoreState } from "../collection/collection-store.ts";
2
+ import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
3
+ import type { SetState } from "../utils/types.ts";
4
4
  type Orientation = "horizontal" | "vertical" | "both";
5
5
  /**
6
6
  * Creates a composite store.
@@ -1,6 +1,6 @@
1
- import type { CollectionStoreFunctions, CollectionStoreItem, CollectionStoreOptions, CollectionStoreState } from "../collection/collection-store.js";
2
- import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
3
- import type { SetState } from "../utils/types.js";
1
+ import type { CollectionStoreFunctions, CollectionStoreItem, CollectionStoreOptions, CollectionStoreState } from "../collection/collection-store.ts";
2
+ import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
3
+ import type { SetState } from "../utils/types.ts";
4
4
  type Orientation = "horizontal" | "vertical" | "both";
5
5
  /**
6
6
  * Creates a composite store.
@@ -1,5 +1,5 @@
1
- import type { DisclosureStoreFunctions, DisclosureStoreOptions, DisclosureStoreState } from "../disclosure/disclosure-store.js";
2
- import type { Store, StoreProps } from "../utils/store.js";
1
+ import type { DisclosureStoreFunctions, DisclosureStoreOptions, DisclosureStoreState } from "../disclosure/disclosure-store.ts";
2
+ import type { Store, StoreProps } from "../utils/store.ts";
3
3
  /**
4
4
  * Creates a dialog store.
5
5
  */
@@ -1,5 +1,5 @@
1
- import type { DisclosureStoreFunctions, DisclosureStoreOptions, DisclosureStoreState } from "../disclosure/disclosure-store.js";
2
- import type { Store, StoreProps } from "../utils/store.js";
1
+ import type { DisclosureStoreFunctions, DisclosureStoreOptions, DisclosureStoreState } from "../disclosure/disclosure-store.ts";
2
+ import type { Store, StoreProps } from "../utils/store.ts";
3
3
  /**
4
4
  * Creates a dialog store.
5
5
  */
@@ -1,5 +1,5 @@
1
- import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
2
- import type { SetState } from "../utils/types.js";
1
+ import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
2
+ import type { SetState } from "../utils/types.ts";
3
3
  /**
4
4
  * Creates a disclosure store.
5
5
  */
@@ -1,5 +1,5 @@
1
- import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
2
- import type { SetState } from "../utils/types.js";
1
+ import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
2
+ import type { SetState } from "../utils/types.ts";
3
3
  /**
4
4
  * Creates a disclosure store.
5
5
  */
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _QD2A4YF6cjs = require('../__chunks/QD2A4YF6.cjs');
4
+ var _4W3OYRR3cjs = require('../__chunks/4W3OYRR3.cjs');
5
5
 
6
6
 
7
7
 
@@ -14,7 +14,7 @@ var _B4LYZ4EMcjs = require('../__chunks/B4LYZ4EM.cjs');
14
14
 
15
15
 
16
16
  var _EEDWPDM2cjs = require('../__chunks/EEDWPDM2.cjs');
17
- require('../__chunks/IMYW2UAC.cjs');
17
+ require('../__chunks/Q2WCPTYS.cjs');
18
18
 
19
19
 
20
20
 
@@ -116,7 +116,7 @@ function createFormStore(props = {}) {
116
116
  var _a;
117
117
  _B4LYZ4EMcjs.throwOnConflictingProps.call(void 0, props, props.store);
118
118
  const syncState = (_a = props.store) == null ? void 0 : _a.getState();
119
- const collection = _QD2A4YF6cjs.createCollectionStore.call(void 0, props);
119
+ const collection = _4W3OYRR3cjs.createCollectionStore.call(void 0, props);
120
120
  const values = _EEDWPDM2cjs.defaultValue.call(void 0,
121
121
  props.values,
122
122
  syncState == null ? void 0 : syncState.values,
@@ -1,7 +1,7 @@
1
- import type { CollectionStoreFunctions, CollectionStoreItem, CollectionStoreOptions, CollectionStoreState } from "../collection/collection-store.js";
2
- import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
3
- import type { AnyObject, PickRequired, SetState, SetStateAction } from "../utils/types.js";
4
- import type { DeepMap, DeepPartial, Names, StringLike } from "./types.js";
1
+ import type { CollectionStoreFunctions, CollectionStoreItem, CollectionStoreOptions, CollectionStoreState } from "../collection/collection-store.ts";
2
+ import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
3
+ import type { AnyObject, PickRequired, SetState, SetStateAction } from "../utils/types.ts";
4
+ import type { DeepMap, DeepPartial, Names, StringLike } from "./types.ts";
5
5
  type ErrorMessage = string | undefined | null;
6
6
  export declare function hasMessages(object: FormStoreValues): boolean;
7
7
  export declare function get<T>(values: FormStoreValues, path: StringLike | string[], defaultValue?: T): T;
@@ -1,7 +1,7 @@
1
- import type { CollectionStoreFunctions, CollectionStoreItem, CollectionStoreOptions, CollectionStoreState } from "../collection/collection-store.js";
2
- import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
3
- import type { AnyObject, PickRequired, SetState, SetStateAction } from "../utils/types.js";
4
- import type { DeepMap, DeepPartial, Names, StringLike } from "./types.js";
1
+ import type { CollectionStoreFunctions, CollectionStoreItem, CollectionStoreOptions, CollectionStoreState } from "../collection/collection-store.ts";
2
+ import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
3
+ import type { AnyObject, PickRequired, SetState, SetStateAction } from "../utils/types.ts";
4
+ import type { DeepMap, DeepPartial, Names, StringLike } from "./types.ts";
5
5
  type ErrorMessage = string | undefined | null;
6
6
  export declare function hasMessages(object: FormStoreValues): boolean;
7
7
  export declare function get<T>(values: FormStoreValues, path: StringLike | string[], defaultValue?: T): T;
@@ -1,11 +1,11 @@
1
- import type { AnyObject } from "../utils/types.js";
1
+ import type { AnyObject } from "../utils/types.ts";
2
2
  /**
3
3
  * An object or primitive value that can be converted to a string.
4
4
  */
5
- export type StringLike = {
5
+ export interface StringLike {
6
6
  toString: () => string;
7
7
  valueOf: () => string;
8
- };
8
+ }
9
9
  /**
10
10
  * Maps through an object `T` or array and defines the leaf values to the given
11
11
  * type `V`.
@@ -1,11 +1,11 @@
1
- import type { AnyObject } from "../utils/types.js";
1
+ import type { AnyObject } from "../utils/types.ts";
2
2
  /**
3
3
  * An object or primitive value that can be converted to a string.
4
4
  */
5
- export type StringLike = {
5
+ export interface StringLike {
6
6
  toString: () => string;
7
7
  valueOf: () => string;
8
- };
8
+ }
9
9
  /**
10
10
  * Maps through an object `T` or array and defines the leaf values to the given
11
11
  * type `V`.
@@ -1,6 +1,6 @@
1
- import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.js";
2
- import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
3
- import type { SetState } from "../utils/types.js";
1
+ import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.ts";
2
+ import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
3
+ import type { SetState } from "../utils/types.ts";
4
4
  /**
5
5
  * Creates a hovercard store.
6
6
  */
@@ -1,6 +1,6 @@
1
- import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.js";
2
- import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
3
- import type { SetState } from "../utils/types.js";
1
+ import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.ts";
2
+ import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
3
+ import type { SetState } from "../utils/types.ts";
4
4
  /**
5
5
  * Creates a hovercard store.
6
6
  */
@@ -1,18 +1,18 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _MHZQJPY3cjs = require('../__chunks/MHZQJPY3.cjs');
5
- require('../__chunks/KL74MAHB.cjs');
6
- require('../__chunks/QD2A4YF6.cjs');
4
+ var _B4AKUC4Scjs = require('../__chunks/B4AKUC4S.cjs');
5
+ require('../__chunks/3HYNC3XA.cjs');
6
+ require('../__chunks/4W3OYRR3.cjs');
7
7
  require('../__chunks/ULSPM3Y3.cjs');
8
8
  require('../__chunks/B4LYZ4EM.cjs');
9
9
  require('../__chunks/EEDWPDM2.cjs');
10
- require('../__chunks/IMYW2UAC.cjs');
10
+ require('../__chunks/Q2WCPTYS.cjs');
11
11
  require('../__chunks/AV6KTKLE.cjs');
12
12
 
13
13
  // src/menu/menu-bar-store.ts
14
14
  function createMenuBarStore(props = {}) {
15
- return _MHZQJPY3cjs.createMenubarStore.call(void 0, props);
15
+ return _B4AKUC4Scjs.createMenubarStore.call(void 0, props);
16
16
  }
17
17
 
18
18
 
@@ -1,5 +1,5 @@
1
- import type { MenubarStoreFunctions, MenubarStoreOptions, MenubarStoreState } from "../menubar/menubar-store.js";
2
- import type { Store, StoreProps } from "../utils/store.js";
1
+ import type { MenubarStoreFunctions, MenubarStoreOptions, MenubarStoreState } from "../menubar/menubar-store.ts";
2
+ import type { Store, StoreProps } from "../utils/store.ts";
3
3
  /**
4
4
  * Creates a menu bar store.
5
5
  */
@@ -1,5 +1,5 @@
1
- import type { MenubarStoreFunctions, MenubarStoreOptions, MenubarStoreState } from "../menubar/menubar-store.js";
2
- import type { Store, StoreProps } from "../utils/store.js";
1
+ import type { MenubarStoreFunctions, MenubarStoreOptions, MenubarStoreState } from "../menubar/menubar-store.ts";
2
+ import type { Store, StoreProps } from "../utils/store.ts";
3
3
  /**
4
4
  * Creates a menu bar store.
5
5
  */
@@ -4,8 +4,8 @@
4
4
  var _UEZLSKZ4cjs = require('../__chunks/UEZLSKZ4.cjs');
5
5
 
6
6
 
7
- var _KL74MAHBcjs = require('../__chunks/KL74MAHB.cjs');
8
- require('../__chunks/QD2A4YF6.cjs');
7
+ var _3HYNC3XAcjs = require('../__chunks/3HYNC3XA.cjs');
8
+ require('../__chunks/4W3OYRR3.cjs');
9
9
  require('../__chunks/ULSPM3Y3.cjs');
10
10
  require('../__chunks/5JEQEZFR.cjs');
11
11
  require('../__chunks/LTLFSC4X.cjs');
@@ -23,7 +23,7 @@ var _B4LYZ4EMcjs = require('../__chunks/B4LYZ4EM.cjs');
23
23
 
24
24
 
25
25
  var _EEDWPDM2cjs = require('../__chunks/EEDWPDM2.cjs');
26
- require('../__chunks/IMYW2UAC.cjs');
26
+ require('../__chunks/Q2WCPTYS.cjs');
27
27
 
28
28
 
29
29
 
@@ -55,7 +55,7 @@ function createMenuStore(_a = {}) {
55
55
  );
56
56
  _B4LYZ4EMcjs.throwOnConflictingProps.call(void 0, props, store);
57
57
  const syncState = store.getState();
58
- const composite = _KL74MAHBcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
58
+ const composite = _3HYNC3XAcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
59
59
  store,
60
60
  orientation: _EEDWPDM2cjs.defaultValue.call(void 0,
61
61
  props.orientation,
@@ -1,9 +1,9 @@
1
- import type { ComboboxStore } from "../combobox/combobox-store.js";
2
- import type { CompositeStoreFunctions, CompositeStoreOptions, CompositeStoreState } from "../composite/composite-store.js";
3
- import type { HovercardStoreFunctions, HovercardStoreOptions, HovercardStoreState } from "../hovercard/hovercard-store.js";
4
- import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
5
- import type { BivariantCallback, PickRequired, SetState, SetStateAction } from "../utils/types.js";
6
- import type { MenuBarStore } from "./menu-bar-store.js";
1
+ import type { ComboboxStore } from "../combobox/combobox-store.ts";
2
+ import type { CompositeStoreFunctions, CompositeStoreOptions, CompositeStoreState } from "../composite/composite-store.ts";
3
+ import type { HovercardStoreFunctions, HovercardStoreOptions, HovercardStoreState } from "../hovercard/hovercard-store.ts";
4
+ import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
5
+ import type { BivariantCallback, PickRequired, SetState, SetStateAction } from "../utils/types.ts";
6
+ import type { MenuBarStore } from "./menu-bar-store.ts";
7
7
  export declare function createMenuStore<T extends MenuStoreValues = MenuStoreValues>(props: PickRequired<MenuStoreProps<T>, "values" | "defaultValues">): MenuStore<T>;
8
8
  export declare function createMenuStore(props?: MenuStoreProps): MenuStore;
9
9
  export type MenuStoreValues = Record<string, string | boolean | number | Array<string | number>>;
@@ -1,9 +1,9 @@
1
- import type { ComboboxStore } from "../combobox/combobox-store.js";
2
- import type { CompositeStoreFunctions, CompositeStoreOptions, CompositeStoreState } from "../composite/composite-store.js";
3
- import type { HovercardStoreFunctions, HovercardStoreOptions, HovercardStoreState } from "../hovercard/hovercard-store.js";
4
- import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
5
- import type { BivariantCallback, PickRequired, SetState, SetStateAction } from "../utils/types.js";
6
- import type { MenuBarStore } from "./menu-bar-store.js";
1
+ import type { ComboboxStore } from "../combobox/combobox-store.ts";
2
+ import type { CompositeStoreFunctions, CompositeStoreOptions, CompositeStoreState } from "../composite/composite-store.ts";
3
+ import type { HovercardStoreFunctions, HovercardStoreOptions, HovercardStoreState } from "../hovercard/hovercard-store.ts";
4
+ import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
5
+ import type { BivariantCallback, PickRequired, SetState, SetStateAction } from "../utils/types.ts";
6
+ import type { MenuBarStore } from "./menu-bar-store.ts";
7
7
  export declare function createMenuStore<T extends MenuStoreValues = MenuStoreValues>(props: PickRequired<MenuStoreProps<T>, "values" | "defaultValues">): MenuStore<T>;
8
8
  export declare function createMenuStore(props?: MenuStoreProps): MenuStore;
9
9
  export type MenuStoreValues = Record<string, string | boolean | number | Array<string | number>>;