@zag-js/popper 0.0.0-dev-20230612142955 → 0.0.0-dev-20230623143510

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.
@@ -34,7 +34,7 @@ function getPlacementImpl(reference, floating, opts = {}) {
34
34
  }
35
35
  if (options.gutter || options.offset) {
36
36
  const arrowOffset = arrowEl ? arrowEl.offsetHeight / 2 : 0;
37
- const data = options.gutter ? { mainAxis: options.gutter } : options.offset;
37
+ const data = options.offset ? options.offset : { mainAxis: options.gutter };
38
38
  if (data?.mainAxis != null)
39
39
  data.mainAxis += arrowOffset;
40
40
  middleware$1.push(dom.offset(data));
@@ -30,7 +30,7 @@ function getPlacementImpl(reference, floating, opts = {}) {
30
30
  }
31
31
  if (options.gutter || options.offset) {
32
32
  const arrowOffset = arrowEl ? arrowEl.offsetHeight / 2 : 0;
33
- const data = options.gutter ? { mainAxis: options.gutter } : options.offset;
33
+ const data = options.offset ? options.offset : { mainAxis: options.gutter };
34
34
  if (data?.mainAxis != null)
35
35
  data.mainAxis += arrowOffset;
36
36
  middleware.push(offset(data));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/popper",
3
- "version": "0.0.0-dev-20230612142955",
3
+ "version": "0.0.0-dev-20230623143510",
4
4
  "description": "Dynamic positioning logic for ui machines",
5
5
  "keywords": [
6
6
  "js",
@@ -24,9 +24,9 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@floating-ui/dom": "1.2.9",
27
- "@zag-js/dom-query": "0.0.0-dev-20230612142955",
28
- "@zag-js/element-rect": "0.0.0-dev-20230612142955",
29
- "@zag-js/utils": "0.0.0-dev-20230612142955"
27
+ "@zag-js/dom-query": "0.0.0-dev-20230623143510",
28
+ "@zag-js/element-rect": "0.0.0-dev-20230623143510",
29
+ "@zag-js/utils": "0.0.0-dev-20230623143510"
30
30
  },
31
31
  "devDependencies": {
32
32
  "clean-package": "2.2.0"
@@ -45,7 +45,7 @@ function getPlacementImpl(reference: MaybeRectElement, floating: MaybeElement, o
45
45
 
46
46
  if (options.gutter || options.offset) {
47
47
  const arrowOffset = arrowEl ? arrowEl.offsetHeight / 2 : 0
48
- const data = options.gutter ? { mainAxis: options.gutter } : options.offset
48
+ const data = options.offset ? options.offset : { mainAxis: options.gutter }
49
49
  if (data?.mainAxis != null) data.mainAxis += arrowOffset
50
50
  middleware.push(offset(data))
51
51
  }