@ariakit/core 0.3.5 → 0.3.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 (77) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/cjs/__chunks/{FJSZTIOU.cjs → 46BH65MC.cjs} +4 -6
  3. package/cjs/__chunks/{FTB5CXVB.cjs → 5F4DVUNS.cjs} +7 -1
  4. package/cjs/__chunks/{AR2VJ37F.cjs → 6WBY3ZZM.cjs} +6 -6
  5. package/cjs/__chunks/{HOEZKRUM.cjs → 7ZUFMSXJ.cjs} +7 -7
  6. package/cjs/__chunks/{F5YZIIEA.cjs → GXIZMD53.cjs} +8 -2
  7. package/cjs/__chunks/{MYTMMWXI.cjs → GZDVJEID.cjs} +2 -2
  8. package/cjs/__chunks/{FFY2GSOG.cjs → JLC5A6WF.cjs} +8 -8
  9. package/cjs/__chunks/{F6Q5QSXF.cjs → MEHGRTJ3.cjs} +11 -11
  10. package/cjs/__chunks/{XVR5QRC3.cjs → PD7XZBXC.cjs} +4 -4
  11. package/cjs/__chunks/{G5EW4WED.cjs → YIUPKKEK.cjs} +6 -6
  12. package/cjs/checkbox/checkbox-store.cjs +3 -3
  13. package/cjs/collection/collection-store.cjs +4 -4
  14. package/cjs/combobox/combobox-store.cjs +21 -21
  15. package/cjs/combobox/combobox-store.d.cts +4 -1
  16. package/cjs/combobox/combobox-store.d.ts +4 -1
  17. package/cjs/composite/composite-overflow-store.cjs +5 -5
  18. package/cjs/composite/composite-store.cjs +5 -5
  19. package/cjs/dialog/dialog-store.cjs +4 -4
  20. package/cjs/disclosure/disclosure-store.cjs +3 -3
  21. package/cjs/form/form-store.cjs +8 -8
  22. package/cjs/hovercard/hovercard-store.cjs +6 -6
  23. package/cjs/menu/menu-bar-store.cjs +6 -6
  24. package/cjs/menu/menu-store.cjs +19 -19
  25. package/cjs/menubar/menubar-store.cjs +6 -6
  26. package/cjs/menubar/menubar-store.d.cts +12 -6
  27. package/cjs/menubar/menubar-store.d.ts +12 -6
  28. package/cjs/popover/popover-store.cjs +5 -5
  29. package/cjs/radio/radio-store.cjs +6 -6
  30. package/cjs/select/select-store.cjs +19 -19
  31. package/cjs/tab/tab-store.cjs +16 -16
  32. package/cjs/toolbar/toolbar-store.cjs +5 -5
  33. package/cjs/tooltip/tooltip-store.cjs +7 -7
  34. package/cjs/utils/dom.cjs +4 -2
  35. package/cjs/utils/dom.d.cts +9 -0
  36. package/cjs/utils/dom.d.ts +9 -0
  37. package/cjs/utils/events.cjs +5 -5
  38. package/cjs/utils/focus.cjs +13 -13
  39. package/cjs/utils/platform.cjs +3 -3
  40. package/cjs/utils/store.cjs +2 -2
  41. package/esm/__chunks/{6LSGADQM.js → ANO6WJO4.js} +8 -2
  42. package/esm/__chunks/{EIFVU736.js → BXH3I7ML.js} +2 -2
  43. package/esm/__chunks/{6EMNXRG3.js → CCU5UHQ2.js} +2 -2
  44. package/esm/__chunks/{DREIYIMP.js → CL47ZAPY.js} +1 -1
  45. package/esm/__chunks/{NIF7E7VE.js → DLOEKDPY.js} +7 -1
  46. package/esm/__chunks/{PCA5ARZU.js → DYD4YNLE.js} +1 -1
  47. package/esm/__chunks/{HJS6GJT4.js → E7OQVGGY.js} +4 -6
  48. package/esm/__chunks/{5UJPJ37G.js → MHPO2BXA.js} +1 -1
  49. package/esm/__chunks/{5BWT4GY2.js → OGMLJYDV.js} +2 -2
  50. package/esm/__chunks/{MRBDYBGO.js → WY3EMTH6.js} +2 -2
  51. package/esm/checkbox/checkbox-store.js +1 -1
  52. package/esm/collection/collection-store.js +3 -3
  53. package/esm/combobox/combobox-store.d.ts +4 -1
  54. package/esm/combobox/combobox-store.js +8 -8
  55. package/esm/composite/composite-overflow-store.js +4 -4
  56. package/esm/composite/composite-store.js +4 -4
  57. package/esm/dialog/dialog-store.js +3 -3
  58. package/esm/disclosure/disclosure-store.js +2 -2
  59. package/esm/form/form-store.js +3 -3
  60. package/esm/hovercard/hovercard-store.js +5 -5
  61. package/esm/menu/menu-bar-store.js +5 -5
  62. package/esm/menu/menu-store.js +8 -8
  63. package/esm/menubar/menubar-store.d.ts +12 -6
  64. package/esm/menubar/menubar-store.js +5 -5
  65. package/esm/popover/popover-store.js +4 -4
  66. package/esm/radio/radio-store.js +4 -4
  67. package/esm/select/select-store.js +7 -7
  68. package/esm/tab/tab-store.js +4 -4
  69. package/esm/toolbar/toolbar-store.js +4 -4
  70. package/esm/tooltip/tooltip-store.js +5 -5
  71. package/esm/utils/dom.d.ts +9 -0
  72. package/esm/utils/dom.js +5 -3
  73. package/esm/utils/events.js +2 -2
  74. package/esm/utils/focus.js +1 -1
  75. package/esm/utils/platform.js +2 -2
  76. package/esm/utils/store.js +1 -1
  77. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
1
  "use client";
2
2
  import {
3
3
  createCompositeStore
4
- } from "../__chunks/5BWT4GY2.js";
5
- import "../__chunks/6EMNXRG3.js";
4
+ } from "../__chunks/OGMLJYDV.js";
5
+ import "../__chunks/CCU5UHQ2.js";
6
6
  import {
7
7
  createStore
8
- } from "../__chunks/HJS6GJT4.js";
8
+ } from "../__chunks/E7OQVGGY.js";
9
9
  import {
10
10
  defaultValue
11
11
  } from "../__chunks/I2VQ3XGR.js";
12
- import "../__chunks/NIF7E7VE.js";
12
+ import "../__chunks/DLOEKDPY.js";
13
13
  import "../__chunks/7PRQYBBV.js";
14
14
  import {
15
15
  __objRest,
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import {
3
3
  createPopoverStore
4
- } from "../__chunks/MRBDYBGO.js";
5
- import "../__chunks/DREIYIMP.js";
6
- import "../__chunks/PCA5ARZU.js";
4
+ } from "../__chunks/WY3EMTH6.js";
5
+ import "../__chunks/CL47ZAPY.js";
6
+ import "../__chunks/DYD4YNLE.js";
7
7
  import {
8
8
  createCompositeStore
9
- } from "../__chunks/5BWT4GY2.js";
10
- import "../__chunks/6EMNXRG3.js";
9
+ } from "../__chunks/OGMLJYDV.js";
10
+ import "../__chunks/CCU5UHQ2.js";
11
11
  import {
12
12
  batch,
13
13
  createStore,
@@ -16,11 +16,11 @@ import {
16
16
  setup,
17
17
  sync,
18
18
  throwOnConflictingProps
19
- } from "../__chunks/HJS6GJT4.js";
19
+ } from "../__chunks/E7OQVGGY.js";
20
20
  import {
21
21
  defaultValue
22
22
  } from "../__chunks/I2VQ3XGR.js";
23
- import "../__chunks/NIF7E7VE.js";
23
+ import "../__chunks/DLOEKDPY.js";
24
24
  import {
25
25
  toArray
26
26
  } from "../__chunks/7PRQYBBV.js";
@@ -1,20 +1,20 @@
1
1
  "use client";
2
2
  import {
3
3
  createCompositeStore
4
- } from "../__chunks/5BWT4GY2.js";
4
+ } from "../__chunks/OGMLJYDV.js";
5
5
  import {
6
6
  createCollectionStore
7
- } from "../__chunks/6EMNXRG3.js";
7
+ } from "../__chunks/CCU5UHQ2.js";
8
8
  import {
9
9
  batch,
10
10
  createStore,
11
11
  setup,
12
12
  sync
13
- } from "../__chunks/HJS6GJT4.js";
13
+ } from "../__chunks/E7OQVGGY.js";
14
14
  import {
15
15
  defaultValue
16
16
  } from "../__chunks/I2VQ3XGR.js";
17
- import "../__chunks/NIF7E7VE.js";
17
+ import "../__chunks/DLOEKDPY.js";
18
18
  import "../__chunks/7PRQYBBV.js";
19
19
  import {
20
20
  __spreadProps,
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import {
3
3
  createCompositeStore
4
- } from "../__chunks/5BWT4GY2.js";
5
- import "../__chunks/6EMNXRG3.js";
6
- import "../__chunks/HJS6GJT4.js";
4
+ } from "../__chunks/OGMLJYDV.js";
5
+ import "../__chunks/CCU5UHQ2.js";
6
+ import "../__chunks/E7OQVGGY.js";
7
7
  import {
8
8
  defaultValue
9
9
  } from "../__chunks/I2VQ3XGR.js";
10
- import "../__chunks/NIF7E7VE.js";
10
+ import "../__chunks/DLOEKDPY.js";
11
11
  import "../__chunks/7PRQYBBV.js";
12
12
  import {
13
13
  __spreadProps,
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import {
3
3
  createHovercardStore
4
- } from "../__chunks/EIFVU736.js";
5
- import "../__chunks/MRBDYBGO.js";
6
- import "../__chunks/DREIYIMP.js";
7
- import "../__chunks/PCA5ARZU.js";
4
+ } from "../__chunks/BXH3I7ML.js";
5
+ import "../__chunks/WY3EMTH6.js";
6
+ import "../__chunks/CL47ZAPY.js";
7
+ import "../__chunks/DYD4YNLE.js";
8
8
  import {
9
9
  createStore
10
- } from "../__chunks/HJS6GJT4.js";
10
+ } from "../__chunks/E7OQVGGY.js";
11
11
  import {
12
12
  defaultValue
13
13
  } from "../__chunks/I2VQ3XGR.js";
@@ -103,3 +103,12 @@ export declare function getScrollingElement(element?: Element | null): HTMLEleme
103
103
  * Determines whether an element is hidden or partially hidden in the viewport.
104
104
  */
105
105
  export declare function isPartiallyHidden(element: Element): boolean;
106
+ /**
107
+ * SelectionRange only works on a few types of input.
108
+ * Calling `setSelectionRange` on a unsupported input type may throw an error on certain browsers.
109
+ * To avoid it, we check if its type supports SelectionRange first.
110
+ * It will be a noop to non-supported types until we find a workaround.
111
+ *
112
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
113
+ */
114
+ export declare function setSelectionRange(element: HTMLInputElement, ...args: Parameters<typeof HTMLInputElement.prototype.setSelectionRange>): void;
package/esm/utils/dom.js CHANGED
@@ -16,8 +16,9 @@ import {
16
16
  isTextField,
17
17
  isVisible,
18
18
  matches,
19
- scrollIntoViewIfNeeded
20
- } from "../__chunks/NIF7E7VE.js";
19
+ scrollIntoViewIfNeeded,
20
+ setSelectionRange
21
+ } from "../__chunks/DLOEKDPY.js";
21
22
  import "../__chunks/4R3V3JGP.js";
22
23
  export {
23
24
  canUseDOM,
@@ -36,5 +37,6 @@ export {
36
37
  isTextField,
37
38
  isVisible,
38
39
  matches,
39
- scrollIntoViewIfNeeded
40
+ scrollIntoViewIfNeeded,
41
+ setSelectionRange
40
42
  };
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  isApple
4
- } from "../__chunks/5UJPJ37G.js";
4
+ } from "../__chunks/MHPO2BXA.js";
5
5
  import {
6
6
  contains
7
- } from "../__chunks/NIF7E7VE.js";
7
+ } from "../__chunks/DLOEKDPY.js";
8
8
  import {
9
9
  __spreadProps,
10
10
  __spreadValues
@@ -6,7 +6,7 @@ import {
6
6
  isFrame,
7
7
  isVisible,
8
8
  matches
9
- } from "../__chunks/NIF7E7VE.js";
9
+ } from "../__chunks/DLOEKDPY.js";
10
10
  import {
11
11
  __spreadValues
12
12
  } from "../__chunks/4R3V3JGP.js";
@@ -5,8 +5,8 @@ import {
5
5
  isMac,
6
6
  isSafari,
7
7
  isTouchDevice
8
- } from "../__chunks/5UJPJ37G.js";
9
- import "../__chunks/NIF7E7VE.js";
8
+ } from "../__chunks/MHPO2BXA.js";
9
+ import "../__chunks/DLOEKDPY.js";
10
10
  import "../__chunks/4R3V3JGP.js";
11
11
  export {
12
12
  isApple,
@@ -10,7 +10,7 @@ import {
10
10
  subscribe,
11
11
  sync,
12
12
  throwOnConflictingProps
13
- } from "../__chunks/HJS6GJT4.js";
13
+ } from "../__chunks/E7OQVGGY.js";
14
14
  import "../__chunks/I2VQ3XGR.js";
15
15
  import "../__chunks/4R3V3JGP.js";
16
16
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ariakit/core",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "Ariakit core",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",