@zag-js/toast 1.4.1 → 1.5.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.
package/dist/index.js CHANGED
@@ -819,7 +819,7 @@ function setHeight(parent, item) {
819
819
  });
820
820
  }
821
821
  var withDefaults = (options, defaults) => {
822
- return { ...defaults, ...options };
822
+ return { ...defaults, ...utils.compact(options) };
823
823
  };
824
824
  function createToastStore(props) {
825
825
  const attrs = withDefaults(props, {
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import { addDomEvent, raf, contains, dataAttr, MAX_Z_INDEX } from '@zag-js/dom-q
2
2
  import { createAnatomy } from '@zag-js/anatomy';
3
3
  import { createMachine, createGuards } from '@zag-js/core';
4
4
  import { trackDismissableBranch } from '@zag-js/dismissable';
5
- import { uuid, setRafTimeout, ensureProps, runIfFn } from '@zag-js/utils';
5
+ import { uuid, setRafTimeout, ensureProps, runIfFn, compact } from '@zag-js/utils';
6
6
 
7
7
  // src/toast-group.connect.ts
8
8
  var anatomy = createAnatomy("toast").parts(
@@ -817,7 +817,7 @@ function setHeight(parent, item) {
817
817
  });
818
818
  }
819
819
  var withDefaults = (options, defaults) => {
820
- return { ...defaults, ...options };
820
+ return { ...defaults, ...compact(options) };
821
821
  };
822
822
  function createToastStore(props) {
823
823
  const attrs = withDefaults(props, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/toast",
3
- "version": "1.4.1",
3
+ "version": "1.5.0",
4
4
  "description": "Core logic for the toast widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -26,12 +26,12 @@
26
26
  "url": "https://github.com/chakra-ui/zag/issues"
27
27
  },
28
28
  "dependencies": {
29
- "@zag-js/anatomy": "1.4.1",
30
- "@zag-js/core": "1.4.1",
31
- "@zag-js/dom-query": "1.4.1",
32
- "@zag-js/dismissable": "1.4.1",
33
- "@zag-js/utils": "1.4.1",
34
- "@zag-js/types": "1.4.1"
29
+ "@zag-js/anatomy": "1.5.0",
30
+ "@zag-js/dom-query": "1.5.0",
31
+ "@zag-js/core": "1.5.0",
32
+ "@zag-js/dismissable": "1.5.0",
33
+ "@zag-js/utils": "1.5.0",
34
+ "@zag-js/types": "1.5.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "clean-package": "2.2.0"