@ariakit/core 0.1.1 → 0.1.3

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 (66) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/cjs/__chunks/{NX5OHIMM.cjs → 4DQ3OTE7.cjs} +8 -9
  3. package/cjs/__chunks/{EIDN2CWH.cjs → DQHU5K4Q.cjs} +10 -10
  4. package/cjs/__chunks/{3KP2MDG6.cjs → HLVPXX7H.cjs} +21 -21
  5. package/cjs/__chunks/{5D5Y5EI4.cjs → QNEPGQLL.cjs} +8 -1
  6. package/cjs/__chunks/{7ZXWQTAY.cjs → QYB6XH64.cjs} +7 -7
  7. package/cjs/__chunks/{AZVDLKO3.cjs → W5IHD6VG.cjs} +15 -15
  8. package/cjs/__chunks/{EFEGT32M.cjs → ZJEEK57E.cjs} +2 -2
  9. package/cjs/__chunks/{3BBA3Z5G.cjs → ZPOXPO2L.cjs} +11 -11
  10. package/cjs/checkbox/checkbox-store.cjs +4 -4
  11. package/cjs/collection/collection-store.cjs +4 -4
  12. package/cjs/combobox/combobox-store.cjs +20 -20
  13. package/cjs/composite/composite-overflow-store.cjs +6 -6
  14. package/cjs/composite/composite-store.cjs +5 -5
  15. package/cjs/dialog/dialog-store.cjs +5 -5
  16. package/cjs/disclosure/disclosure-store.cjs +4 -4
  17. package/cjs/form/form-store.cjs +28 -28
  18. package/cjs/hovercard/hovercard-store.cjs +7 -7
  19. package/cjs/menu/menu-bar-store.cjs +7 -7
  20. package/cjs/menu/menu-store.cjs +18 -18
  21. package/cjs/popover/popover-store.cjs +6 -6
  22. package/cjs/radio/radio-store.cjs +8 -8
  23. package/cjs/select/select-store.cjs +20 -20
  24. package/cjs/tab/tab-store.cjs +11 -11
  25. package/cjs/toolbar/toolbar-store.cjs +7 -7
  26. package/cjs/tooltip/tooltip-store.cjs +13 -13
  27. package/cjs/tsconfig.build.tsbuildinfo +1 -1
  28. package/cjs/utils/focus.cjs +29 -1
  29. package/cjs/utils/focus.d.ts +1 -1
  30. package/cjs/utils/misc.cjs +4 -2
  31. package/cjs/utils/misc.d.ts +6 -0
  32. package/cjs/utils/store.cjs +3 -3
  33. package/cjs/utils/store.d.ts +7 -0
  34. package/esm/__chunks/{ADRUFBEO.js → 4T5RHRE5.js} +1 -1
  35. package/esm/__chunks/{RX3ZUQ6U.js → 6HMPWUDT.js} +3 -3
  36. package/esm/__chunks/{6UPCMUXT.js → 6PEWNRTN.js} +3 -3
  37. package/esm/__chunks/{HCKYJLMC.js → IOAGNCXX.js} +2 -2
  38. package/esm/__chunks/{UOJSZ35L.js → NA5BK7DD.js} +1 -1
  39. package/esm/__chunks/{KLKI3AIB.js → RMD7SNCC.js} +7 -0
  40. package/esm/__chunks/{L7KN5AYP.js → WFGVC6LE.js} +3 -4
  41. package/esm/__chunks/{6U25WEDX.js → X7MJ3FB5.js} +3 -3
  42. package/esm/checkbox/checkbox-store.js +2 -2
  43. package/esm/collection/collection-store.js +3 -3
  44. package/esm/combobox/combobox-store.js +7 -7
  45. package/esm/composite/composite-overflow-store.js +5 -5
  46. package/esm/composite/composite-store.js +4 -4
  47. package/esm/dialog/dialog-store.js +4 -4
  48. package/esm/disclosure/disclosure-store.js +3 -3
  49. package/esm/form/form-store.js +11 -11
  50. package/esm/hovercard/hovercard-store.js +6 -6
  51. package/esm/menu/menu-bar-store.js +4 -4
  52. package/esm/menu/menu-store.js +8 -8
  53. package/esm/popover/popover-store.js +5 -5
  54. package/esm/radio/radio-store.js +4 -4
  55. package/esm/select/select-store.js +7 -7
  56. package/esm/tab/tab-store.js +4 -4
  57. package/esm/toolbar/toolbar-store.js +4 -4
  58. package/esm/tooltip/tooltip-store.js +5 -5
  59. package/esm/tsconfig.build.tsbuildinfo +1 -1
  60. package/esm/utils/focus.d.ts +1 -1
  61. package/esm/utils/focus.js +29 -1
  62. package/esm/utils/misc.d.ts +6 -0
  63. package/esm/utils/misc.js +3 -1
  64. package/esm/utils/store.d.ts +7 -0
  65. package/esm/utils/store.js +2 -2
  66. package/package.json +1 -1
@@ -100,6 +100,12 @@ export declare function invariant(condition: any, message?: string | boolean): a
100
100
  * Similar to `Object.keys` but returns a type-safe array of keys.
101
101
  */
102
102
  export declare function getKeys<T extends object>(obj: T): (keyof T)[];
103
+ /**
104
+ * Checks whether a boolean event prop (e.g., hideOnInteractOutside) was
105
+ * intentionally set to false, either with a boolean value or a callback that
106
+ * returns false.
107
+ */
108
+ export declare function isFalsyBooleanCallback<T extends unknown[]>(booleanOrCallback?: boolean | ((...args: T) => boolean), ...args: T): boolean;
103
109
  /**
104
110
  * Returns the first value that is not `undefined`.
105
111
  */
package/esm/utils/misc.js CHANGED
@@ -10,6 +10,7 @@ import {
10
10
  identity,
11
11
  invariant,
12
12
  isEmpty,
13
+ isFalsyBooleanCallback,
13
14
  isInteger,
14
15
  isObject,
15
16
  noop,
@@ -17,7 +18,7 @@ import {
17
18
  omit,
18
19
  pick,
19
20
  shallowEqual
20
- } from "../__chunks/KLKI3AIB.js";
21
+ } from "../__chunks/RMD7SNCC.js";
21
22
  export {
22
23
  afterPaint,
23
24
  applyState,
@@ -30,6 +31,7 @@ export {
30
31
  identity,
31
32
  invariant,
32
33
  isEmpty,
34
+ isFalsyBooleanCallback,
33
35
  isInteger,
34
36
  isObject,
35
37
  noop,
@@ -65,35 +65,42 @@ export interface Store<S = State> {
65
65
  setState<K extends keyof S>(key: K, value: SetStateAction<S[K]>): void;
66
66
  /**
67
67
  * Register a callback function that's called when the store is initialized.
68
+ * @deprecated Experimental. This API may change in minor or patch releases.
68
69
  */
69
70
  setup: (callback: () => void | (() => void)) => () => void;
70
71
  /**
71
72
  * Function that should be called when the store is initialized.
73
+ * @deprecated Experimental. This API may change in minor or patch releases.
72
74
  */
73
75
  init: () => () => void;
74
76
  /**
75
77
  * Registers a listener function that's called immediately and synchronously
76
78
  * whenever the store state changes.
79
+ * @deprecated Experimental. This API may change in minor or patch releases.
77
80
  */
78
81
  sync: Sync<S>;
79
82
  /**
80
83
  * Registers a listener function that's called after state changes in the
81
84
  * store.
85
+ * @deprecated Experimental. This API may change in minor or patch releases.
82
86
  */
83
87
  subscribe: Sync<S>;
84
88
  /**
85
89
  * Registers a listener function that's called immediately and after a batch
86
90
  * of state changes in the store.
91
+ * @deprecated Experimental. This API may change in minor or patch releases.
87
92
  */
88
93
  syncBatch: Sync<S>;
89
94
  /**
90
95
  * Creates a new store with a subset of the current store state and keeps them
91
96
  * in sync.
97
+ * @deprecated Experimental. This API may change in minor or patch releases.
92
98
  */
93
99
  pick<K extends Array<keyof S>>(...keys: K): Store<Pick<S, K[number]>>;
94
100
  /**
95
101
  * Creates a new store with a subset of the current store state and keeps them
96
102
  * in sync.
103
+ * @deprecated Experimental. This API may change in minor or patch releases.
97
104
  */
98
105
  omit<K extends Array<keyof S>>(...keys: K): Store<Omit<S, K[number]>>;
99
106
  }
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  createStore,
3
3
  mergeStore
4
- } from "../__chunks/UOJSZ35L.js";
5
- import "../__chunks/KLKI3AIB.js";
4
+ } from "../__chunks/NA5BK7DD.js";
5
+ import "../__chunks/RMD7SNCC.js";
6
6
  export {
7
7
  createStore,
8
8
  mergeStore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ariakit/core",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Ariakit core",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",