@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
@@ -1,15 +1,15 @@
1
1
  "use client";
2
2
  import {
3
3
  createHovercardStore
4
- } from "../__chunks/E4HA32QI.js";
4
+ } from "../__chunks/EACLTACN.js";
5
5
  import {
6
6
  createCompositeStore
7
- } from "../__chunks/VH2P7HEP.js";
8
- import "../__chunks/I2WJ7JBQ.js";
7
+ } from "../__chunks/D7EIQZAU.js";
8
+ import "../__chunks/6DHTHWXD.js";
9
9
  import "../__chunks/7PRQYBBV.js";
10
- import "../__chunks/SAZZJI72.js";
11
- import "../__chunks/NWACXGIN.js";
12
- import "../__chunks/KDSZSVV5.js";
10
+ import "../__chunks/3UYWTADI.js";
11
+ import "../__chunks/YOHCVXJB.js";
12
+ import "../__chunks/6E4KKOSB.js";
13
13
  import {
14
14
  createStore,
15
15
  mergeStore,
@@ -18,17 +18,17 @@ import {
18
18
  setup,
19
19
  sync,
20
20
  throwOnConflictingProps
21
- } from "../__chunks/KLPDXTDE.js";
21
+ } from "../__chunks/EQQLU3CG.js";
22
22
  import {
23
23
  applyState,
24
24
  defaultValue
25
- } from "../__chunks/22HHDS5F.js";
26
- import "../__chunks/I2NJJ3XW.js";
25
+ } from "../__chunks/PBFD2E7P.js";
26
+ import "../__chunks/HWOIWM4O.js";
27
27
  import {
28
28
  __objRest,
29
29
  __spreadProps,
30
30
  __spreadValues
31
- } from "../__chunks/4R3V3JGP.js";
31
+ } from "../__chunks/3YLGPPWQ.js";
32
32
 
33
33
  // src/menu/menu-store.ts
34
34
  function createMenuStore(_a = {}) {
@@ -90,8 +90,7 @@ function createMenuStore(_a = {}) {
90
90
  setup(
91
91
  menu,
92
92
  () => sync(menu, ["mounted"], (state) => {
93
- if (state.mounted)
94
- return;
93
+ if (state.mounted) return;
95
94
  menu.setState("activeId", null);
96
95
  })
97
96
  );
@@ -115,17 +114,13 @@ function createMenuStore(_a = {}) {
115
114
  setInitialFocus: (value) => menu.setState("initialFocus", value),
116
115
  setValues: (values) => menu.setState("values", values),
117
116
  setValue: (name, value) => {
118
- if (name === "__proto__")
119
- return;
120
- if (name === "constructor")
121
- return;
122
- if (Array.isArray(name))
123
- return;
117
+ if (name === "__proto__") return;
118
+ if (name === "constructor") return;
119
+ if (Array.isArray(name)) return;
124
120
  menu.setState("values", (values) => {
125
121
  const prevValue = values[name];
126
122
  const nextValue = applyState(value, prevValue);
127
- if (nextValue === prevValue)
128
- return values;
123
+ if (nextValue === prevValue) return values;
129
124
  return __spreadProps(__spreadValues({}, values), {
130
125
  [name]: nextValue !== void 0 && nextValue
131
126
  });
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import {
3
3
  createMenubarStore
4
- } from "../__chunks/RCLYDUHE.js";
5
- import "../__chunks/VH2P7HEP.js";
6
- import "../__chunks/I2WJ7JBQ.js";
4
+ } from "../__chunks/PIWLWQMB.js";
5
+ import "../__chunks/D7EIQZAU.js";
6
+ import "../__chunks/6DHTHWXD.js";
7
7
  import "../__chunks/7PRQYBBV.js";
8
- import "../__chunks/KLPDXTDE.js";
9
- import "../__chunks/22HHDS5F.js";
10
- import "../__chunks/I2NJJ3XW.js";
11
- import "../__chunks/4R3V3JGP.js";
8
+ import "../__chunks/EQQLU3CG.js";
9
+ import "../__chunks/PBFD2E7P.js";
10
+ import "../__chunks/HWOIWM4O.js";
11
+ import "../__chunks/3YLGPPWQ.js";
12
12
  export {
13
13
  createMenubarStore
14
14
  };
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import {
3
3
  createPopoverStore
4
- } from "../__chunks/SAZZJI72.js";
5
- import "../__chunks/NWACXGIN.js";
6
- import "../__chunks/KDSZSVV5.js";
7
- import "../__chunks/KLPDXTDE.js";
8
- import "../__chunks/22HHDS5F.js";
9
- import "../__chunks/4R3V3JGP.js";
4
+ } from "../__chunks/3UYWTADI.js";
5
+ import "../__chunks/YOHCVXJB.js";
6
+ import "../__chunks/6E4KKOSB.js";
7
+ import "../__chunks/EQQLU3CG.js";
8
+ import "../__chunks/PBFD2E7P.js";
9
+ import "../__chunks/3YLGPPWQ.js";
10
10
  export {
11
11
  createPopoverStore
12
12
  };
@@ -1,21 +1,21 @@
1
1
  "use client";
2
2
  import {
3
3
  createCompositeStore
4
- } from "../__chunks/VH2P7HEP.js";
5
- import "../__chunks/I2WJ7JBQ.js";
4
+ } from "../__chunks/D7EIQZAU.js";
5
+ import "../__chunks/6DHTHWXD.js";
6
6
  import "../__chunks/7PRQYBBV.js";
7
7
  import {
8
8
  createStore
9
- } from "../__chunks/KLPDXTDE.js";
9
+ } from "../__chunks/EQQLU3CG.js";
10
10
  import {
11
11
  defaultValue
12
- } from "../__chunks/22HHDS5F.js";
13
- import "../__chunks/I2NJJ3XW.js";
12
+ } from "../__chunks/PBFD2E7P.js";
13
+ import "../__chunks/HWOIWM4O.js";
14
14
  import {
15
15
  __objRest,
16
16
  __spreadProps,
17
17
  __spreadValues
18
- } from "../__chunks/4R3V3JGP.js";
18
+ } from "../__chunks/3YLGPPWQ.js";
19
19
 
20
20
  // src/radio/radio-store.ts
21
21
  function createRadioStore(_a = {}) {
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  import {
3
3
  createCompositeStore
4
- } from "../__chunks/VH2P7HEP.js";
5
- import "../__chunks/I2WJ7JBQ.js";
4
+ } from "../__chunks/D7EIQZAU.js";
5
+ import "../__chunks/6DHTHWXD.js";
6
6
  import {
7
7
  toArray
8
8
  } from "../__chunks/7PRQYBBV.js";
9
9
  import {
10
10
  createPopoverStore
11
- } from "../__chunks/SAZZJI72.js";
12
- import "../__chunks/NWACXGIN.js";
13
- import "../__chunks/KDSZSVV5.js";
11
+ } from "../__chunks/3UYWTADI.js";
12
+ import "../__chunks/YOHCVXJB.js";
13
+ import "../__chunks/6E4KKOSB.js";
14
14
  import {
15
15
  batch,
16
16
  createStore,
@@ -19,16 +19,16 @@ import {
19
19
  setup,
20
20
  sync,
21
21
  throwOnConflictingProps
22
- } from "../__chunks/KLPDXTDE.js";
22
+ } from "../__chunks/EQQLU3CG.js";
23
23
  import {
24
24
  defaultValue
25
- } from "../__chunks/22HHDS5F.js";
26
- import "../__chunks/I2NJJ3XW.js";
25
+ } from "../__chunks/PBFD2E7P.js";
26
+ import "../__chunks/HWOIWM4O.js";
27
27
  import {
28
28
  __objRest,
29
29
  __spreadProps,
30
30
  __spreadValues
31
- } from "../__chunks/4R3V3JGP.js";
31
+ } from "../__chunks/3YLGPPWQ.js";
32
32
 
33
33
  // src/select/select-store.ts
34
34
  function createSelectStore(_a = {}) {
@@ -106,42 +106,34 @@ function createSelectStore(_a = {}) {
106
106
  setup(
107
107
  select,
108
108
  () => sync(select, ["value", "items"], (state) => {
109
- if (state.value !== initialValue)
110
- return;
111
- if (!state.items.length)
112
- return;
109
+ if (state.value !== initialValue) return;
110
+ if (!state.items.length) return;
113
111
  const item = state.items.find(
114
112
  (item2) => !item2.disabled && item2.value != null
115
113
  );
116
- if ((item == null ? void 0 : item.value) == null)
117
- return;
114
+ if ((item == null ? void 0 : item.value) == null) return;
118
115
  select.setState("value", item.value);
119
116
  })
120
117
  );
121
118
  setup(
122
119
  select,
123
120
  () => sync(select, ["mounted"], (state) => {
124
- if (state.mounted)
125
- return;
121
+ if (state.mounted) return;
126
122
  select.setState("activeId", initialState.activeId);
127
123
  })
128
124
  );
129
125
  setup(
130
126
  select,
131
127
  () => sync(select, ["mounted", "items", "value"], (state) => {
132
- if (combobox)
133
- return;
134
- if (state.mounted)
135
- return;
128
+ if (combobox) return;
129
+ if (state.mounted) return;
136
130
  const values = toArray(state.value);
137
131
  const lastValue = values[values.length - 1];
138
- if (lastValue == null)
139
- return;
132
+ if (lastValue == null) return;
140
133
  const item = state.items.find(
141
134
  (item2) => !item2.disabled && item2.value === lastValue
142
135
  );
143
- if (!item)
144
- return;
136
+ if (!item) return;
145
137
  select.setState("activeId", item.id);
146
138
  })
147
139
  );
@@ -149,17 +141,12 @@ function createSelectStore(_a = {}) {
149
141
  select,
150
142
  () => batch(select, ["setValueOnMove", "moves"], (state) => {
151
143
  const { mounted, value, activeId } = select.getState();
152
- if (!state.setValueOnMove && mounted)
153
- return;
154
- if (Array.isArray(value))
155
- return;
156
- if (!state.moves)
157
- return;
158
- if (!activeId)
159
- return;
144
+ if (!state.setValueOnMove && mounted) return;
145
+ if (Array.isArray(value)) return;
146
+ if (!state.moves) return;
147
+ if (!activeId) return;
160
148
  const item = composite.item(activeId);
161
- if (!item || item.disabled || item.value == null)
162
- return;
149
+ if (!item || item.disabled || item.value == null) return;
163
150
  select.setState("value", item.value);
164
151
  })
165
152
  );
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  createCompositeStore
4
- } from "../__chunks/VH2P7HEP.js";
4
+ } from "../__chunks/D7EIQZAU.js";
5
5
  import {
6
6
  createCollectionStore
7
- } from "../__chunks/I2WJ7JBQ.js";
7
+ } from "../__chunks/6DHTHWXD.js";
8
8
  import "../__chunks/7PRQYBBV.js";
9
9
  import {
10
10
  batch,
@@ -13,17 +13,17 @@ import {
13
13
  omit,
14
14
  setup,
15
15
  sync
16
- } from "../__chunks/KLPDXTDE.js";
16
+ } from "../__chunks/EQQLU3CG.js";
17
17
  import {
18
18
  chain,
19
19
  defaultValue
20
- } from "../__chunks/22HHDS5F.js";
21
- import "../__chunks/I2NJJ3XW.js";
20
+ } from "../__chunks/PBFD2E7P.js";
21
+ import "../__chunks/HWOIWM4O.js";
22
22
  import {
23
23
  __objRest,
24
24
  __spreadProps,
25
25
  __spreadValues
26
- } from "../__chunks/4R3V3JGP.js";
26
+ } from "../__chunks/3YLGPPWQ.js";
27
27
 
28
28
  // src/tab/tab-store.ts
29
29
  function createTabStore(_a = {}) {
@@ -88,33 +88,26 @@ function createTabStore(_a = {}) {
88
88
  tab,
89
89
  () => sync(tab, ["moves"], () => {
90
90
  const { activeId, selectOnMove } = tab.getState();
91
- if (!selectOnMove)
92
- return;
93
- if (!activeId)
94
- return;
91
+ if (!selectOnMove) return;
92
+ if (!activeId) return;
95
93
  const tabItem = composite.item(activeId);
96
- if (!tabItem)
97
- return;
98
- if (tabItem.dimmed)
99
- return;
100
- if (tabItem.disabled)
101
- return;
94
+ if (!tabItem) return;
95
+ if (tabItem.dimmed) return;
96
+ if (tabItem.disabled) return;
102
97
  tab.setState("selectedId", tabItem.id);
103
98
  })
104
99
  );
105
100
  setup(
106
101
  tab,
107
102
  () => batch(tab, ["selectedId"], (state, prev) => {
108
- if (parentComposite && state.selectedId === prev.selectedId)
109
- return;
103
+ if (parentComposite && state.selectedId === prev.selectedId) return;
110
104
  tab.setState("activeId", state.selectedId);
111
105
  })
112
106
  );
113
107
  setup(
114
108
  tab,
115
109
  () => sync(tab, ["selectedId", "renderedItems"], (state) => {
116
- if (state.selectedId !== void 0)
117
- return;
110
+ if (state.selectedId !== void 0) return;
118
111
  const { activeId, renderedItems } = tab.getState();
119
112
  const tabItem = composite.item(activeId);
120
113
  if (tabItem && !tabItem.disabled && !tabItem.dimmed) {
@@ -131,19 +124,15 @@ function createTabStore(_a = {}) {
131
124
  tab,
132
125
  () => sync(tab, ["renderedItems"], (state) => {
133
126
  const tabs = state.renderedItems;
134
- if (!tabs.length)
135
- return;
127
+ if (!tabs.length) return;
136
128
  return sync(panels, ["renderedItems"], (state2) => {
137
129
  const items = state2.renderedItems;
138
130
  const hasOrphanPanels = items.some((panel) => !panel.tabId);
139
- if (!hasOrphanPanels)
140
- return;
131
+ if (!hasOrphanPanels) return;
141
132
  items.forEach((panel, i) => {
142
- if (panel.tabId)
143
- return;
133
+ if (panel.tabId) return;
144
134
  const tabItem = tabs[i];
145
- if (!tabItem)
146
- return;
135
+ if (!tabItem) return;
147
136
  panels.renderItem(__spreadProps(__spreadValues({}, panel), { tabId: tabItem.id }));
148
137
  });
149
138
  });
@@ -163,8 +152,7 @@ function createTabStore(_a = {}) {
163
152
  sync(parentComposite, ["open"], restoreSelectedId)
164
153
  );
165
154
  }
166
- if (!combobox)
167
- return;
155
+ if (!combobox) return;
168
156
  return chain(
169
157
  sync(combobox, ["selectedValue"], backupSelectedId),
170
158
  sync(combobox, ["open"], restoreSelectedId)
@@ -1,26 +1,26 @@
1
1
  "use client";
2
2
  import {
3
3
  createCompositeStore
4
- } from "../__chunks/VH2P7HEP.js";
5
- import "../__chunks/I2WJ7JBQ.js";
4
+ } from "../__chunks/D7EIQZAU.js";
5
+ import "../__chunks/6DHTHWXD.js";
6
6
  import "../__chunks/7PRQYBBV.js";
7
7
  import {
8
8
  UndoManager
9
- } from "../__chunks/EKIWAN6A.js";
9
+ } from "../__chunks/7LM4Q2XB.js";
10
10
  import {
11
11
  createStore,
12
12
  setup,
13
13
  sync
14
- } from "../__chunks/KLPDXTDE.js";
14
+ } from "../__chunks/EQQLU3CG.js";
15
15
  import {
16
16
  applyState,
17
17
  defaultValue
18
- } from "../__chunks/22HHDS5F.js";
19
- import "../__chunks/I2NJJ3XW.js";
18
+ } from "../__chunks/PBFD2E7P.js";
19
+ import "../__chunks/HWOIWM4O.js";
20
20
  import {
21
21
  __spreadProps,
22
22
  __spreadValues
23
- } from "../__chunks/4R3V3JGP.js";
23
+ } from "../__chunks/3YLGPPWQ.js";
24
24
 
25
25
  // src/tag/tag-store.ts
26
26
  function createTagStore(props = {}) {
@@ -42,10 +42,8 @@ function createTagStore(props = {}) {
42
42
  setup(
43
43
  tag,
44
44
  () => sync(tag, ["inputElement", "activeId"], (state) => {
45
- if (!state.inputElement)
46
- return;
47
- if (state.activeId !== void 0)
48
- return;
45
+ if (!state.inputElement) return;
46
+ if (state.activeId !== void 0) return;
49
47
  tag.setState("activeId", state.inputElement.id);
50
48
  })
51
49
  );
@@ -60,8 +58,7 @@ function createTagStore(props = {}) {
60
58
  }
61
59
  return next;
62
60
  });
63
- if (!changed)
64
- return;
61
+ if (!changed) return;
65
62
  return () => {
66
63
  var _a2;
67
64
  tag.setState("values", previousValues);
@@ -77,8 +74,7 @@ function createTagStore(props = {}) {
77
74
  setValues,
78
75
  addValue: (value) => {
79
76
  setValues((values) => {
80
- if (values.includes(value))
81
- return values;
77
+ if (values.includes(value)) return values;
82
78
  return [...values, value];
83
79
  });
84
80
  },
@@ -1,18 +1,18 @@
1
1
  "use client";
2
2
  import {
3
3
  createCompositeStore
4
- } from "../__chunks/VH2P7HEP.js";
5
- import "../__chunks/I2WJ7JBQ.js";
4
+ } from "../__chunks/D7EIQZAU.js";
5
+ import "../__chunks/6DHTHWXD.js";
6
6
  import "../__chunks/7PRQYBBV.js";
7
- import "../__chunks/KLPDXTDE.js";
7
+ import "../__chunks/EQQLU3CG.js";
8
8
  import {
9
9
  defaultValue
10
- } from "../__chunks/22HHDS5F.js";
11
- import "../__chunks/I2NJJ3XW.js";
10
+ } from "../__chunks/PBFD2E7P.js";
11
+ import "../__chunks/HWOIWM4O.js";
12
12
  import {
13
13
  __spreadProps,
14
14
  __spreadValues
15
- } from "../__chunks/4R3V3JGP.js";
15
+ } from "../__chunks/3YLGPPWQ.js";
16
16
 
17
17
  // src/toolbar/toolbar-store.ts
18
18
  function createToolbarStore(props = {}) {
@@ -1,20 +1,20 @@
1
1
  "use client";
2
2
  import {
3
3
  createHovercardStore
4
- } from "../__chunks/E4HA32QI.js";
5
- import "../__chunks/SAZZJI72.js";
6
- import "../__chunks/NWACXGIN.js";
7
- import "../__chunks/KDSZSVV5.js";
4
+ } from "../__chunks/EACLTACN.js";
5
+ import "../__chunks/3UYWTADI.js";
6
+ import "../__chunks/YOHCVXJB.js";
7
+ import "../__chunks/6E4KKOSB.js";
8
8
  import {
9
9
  createStore
10
- } from "../__chunks/KLPDXTDE.js";
10
+ } from "../__chunks/EQQLU3CG.js";
11
11
  import {
12
12
  defaultValue
13
- } from "../__chunks/22HHDS5F.js";
13
+ } from "../__chunks/PBFD2E7P.js";
14
14
  import {
15
15
  __spreadProps,
16
16
  __spreadValues
17
- } from "../__chunks/4R3V3JGP.js";
17
+ } from "../__chunks/3YLGPPWQ.js";
18
18
 
19
19
  // src/tooltip/tooltip-store.ts
20
20
  function createTooltipStore(props = {}) {
@@ -5,7 +5,7 @@ import {
5
5
  reverseArray,
6
6
  toArray
7
7
  } from "../__chunks/7PRQYBBV.js";
8
- import "../__chunks/4R3V3JGP.js";
8
+ import "../__chunks/3YLGPPWQ.js";
9
9
  export {
10
10
  addItemToArray,
11
11
  flatten2DArray,
package/esm/utils/dom.js CHANGED
@@ -18,8 +18,8 @@ import {
18
18
  isVisible,
19
19
  scrollIntoViewIfNeeded,
20
20
  setSelectionRange
21
- } from "../__chunks/I2NJJ3XW.js";
22
- import "../__chunks/4R3V3JGP.js";
21
+ } from "../__chunks/HWOIWM4O.js";
22
+ import "../__chunks/3YLGPPWQ.js";
23
23
  export {
24
24
  canUseDOM,
25
25
  contains,
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import {
3
3
  isApple
4
- } from "../__chunks/CLSHHUGK.js";
4
+ } from "../__chunks/US4USQPI.js";
5
5
  import {
6
6
  contains
7
- } from "../__chunks/I2NJJ3XW.js";
7
+ } from "../__chunks/HWOIWM4O.js";
8
8
  import {
9
9
  __spreadProps,
10
10
  __spreadValues
11
- } from "../__chunks/4R3V3JGP.js";
11
+ } from "../__chunks/3YLGPPWQ.js";
12
12
 
13
13
  // src/utils/events.ts
14
14
  function isPortalEvent(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;
24
+ if (!element) return false;
26
25
  const isAppleDevice = isApple();
27
- if (isAppleDevice && !event.metaKey)
28
- return false;
29
- if (!isAppleDevice && !event.ctrlKey)
30
- return false;
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) {
@@ -85,12 +74,9 @@ function isFocusEventOutside(event, container) {
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) {