@zag-js/popover 0.5.0 → 0.6.0

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.
@@ -195,10 +195,10 @@ function machine(userContext) {
195
195
  raf(() => dom.getTriggerEl(ctx2)?.focus());
196
196
  },
197
197
  invokeOnOpen(ctx2) {
198
- ctx2.onOpenChange?.(true);
198
+ ctx2.onOpen?.();
199
199
  },
200
200
  invokeOnClose(ctx2) {
201
- ctx2.onOpenChange?.(false);
201
+ ctx2.onClose?.();
202
202
  },
203
203
  toggleVisibility(ctx2, _evt, { send }) {
204
204
  send({ type: ctx2.open ? "OPEN" : "CLOSE", src: "controlled" });
package/dist/index.js CHANGED
@@ -375,10 +375,10 @@ function machine(userContext) {
375
375
  (0, import_dom_query3.raf)(() => dom.getTriggerEl(ctx2)?.focus());
376
376
  },
377
377
  invokeOnOpen(ctx2) {
378
- ctx2.onOpenChange?.(true);
378
+ ctx2.onOpen?.();
379
379
  },
380
380
  invokeOnClose(ctx2) {
381
- ctx2.onOpenChange?.(false);
381
+ ctx2.onClose?.();
382
382
  },
383
383
  toggleVisibility(ctx2, _evt, { send }) {
384
384
  send({ type: ctx2.open ? "OPEN" : "CLOSE", src: "controlled" });
package/dist/index.mjs CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-KTOPDXGV.mjs";
7
7
  import {
8
8
  machine
9
- } from "./chunk-I6GHRN6K.mjs";
9
+ } from "./chunk-D27LEJFX.mjs";
10
10
  import "./chunk-4IGGT6KB.mjs";
11
11
  export {
12
12
  anatomy,
@@ -253,10 +253,10 @@ function machine(userContext) {
253
253
  (0, import_dom_query2.raf)(() => dom.getTriggerEl(ctx2)?.focus());
254
254
  },
255
255
  invokeOnOpen(ctx2) {
256
- ctx2.onOpenChange?.(true);
256
+ ctx2.onOpen?.();
257
257
  },
258
258
  invokeOnClose(ctx2) {
259
- ctx2.onOpenChange?.(false);
259
+ ctx2.onClose?.();
260
260
  },
261
261
  toggleVisibility(ctx2, _evt, { send }) {
262
262
  send({ type: ctx2.open ? "OPEN" : "CLOSE", src: "controlled" });
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  machine
3
- } from "./chunk-I6GHRN6K.mjs";
3
+ } from "./chunk-D27LEJFX.mjs";
4
4
  import "./chunk-4IGGT6KB.mjs";
5
5
  export {
6
6
  machine
@@ -48,9 +48,13 @@ type PublicContext = DismissableElementHandlers & CommonProperties & {
48
48
  */
49
49
  closeOnEsc?: boolean;
50
50
  /**
51
- * Function invoked when the popover is opened.
51
+ * Function invoked when the popover is closed
52
52
  */
53
- onOpenChange?: (open: boolean) => void;
53
+ onClose?: VoidFunction;
54
+ /**
55
+ * Function invoked when the popover is opened
56
+ */
57
+ onOpen?: VoidFunction;
54
58
  /**
55
59
  * The user provided options used to position the popover content
56
60
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/popover",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Core logic for the popover widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -32,7 +32,7 @@
32
32
  "@zag-js/core": "0.5.0",
33
33
  "@zag-js/dom-query": "0.1.4",
34
34
  "@zag-js/utils": "0.3.4",
35
- "@zag-js/dismissable": "0.5.0",
35
+ "@zag-js/dismissable": "0.6.0",
36
36
  "@zag-js/tabbable": "0.1.1",
37
37
  "@zag-js/popper": "0.2.7",
38
38
  "@zag-js/remove-scroll": "0.2.4",