@zag-js/popper 0.0.0-dev-20221018140542 → 0.0.0-dev-20221031080845

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
@@ -43,7 +43,7 @@ var import_dom = require("@floating-ui/dom");
43
43
  // ../dom/dist/index.mjs
44
44
  var runIfFn = (v, ...a) => {
45
45
  const res = typeof v === "function" ? v(...a) : v;
46
- return res ?? void 0;
46
+ return res != null ? res : void 0;
47
47
  };
48
48
  var hasProp = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
49
49
  function isHTMLElement(v) {
@@ -112,11 +112,12 @@ function isEqual(rect1, rect2) {
112
112
 
113
113
  // src/auto-update.ts
114
114
  function resolveOptions(option) {
115
+ var _a, _b, _c;
115
116
  const bool = isBoolean(option);
116
117
  return {
117
- ancestorResize: bool ? option : option.ancestorResize ?? true,
118
- ancestorScroll: bool ? option : option.ancestorScroll ?? true,
119
- referenceResize: bool ? option : option.referenceResize ?? true
118
+ ancestorResize: bool ? option : (_a = option.ancestorResize) != null ? _a : true,
119
+ ancestorScroll: bool ? option : (_b = option.ancestorScroll) != null ? _b : true,
120
+ referenceResize: bool ? option : (_c = option.referenceResize) != null ? _c : true
120
121
  };
121
122
  }
122
123
  function autoUpdate(reference, floating, update, options = false) {
package/dist/index.mjs CHANGED
@@ -15,7 +15,7 @@ import { getOverflowAncestors } from "@floating-ui/dom";
15
15
  // ../dom/dist/index.mjs
16
16
  var runIfFn = (v, ...a) => {
17
17
  const res = typeof v === "function" ? v(...a) : v;
18
- return res ?? void 0;
18
+ return res != null ? res : void 0;
19
19
  };
20
20
  var hasProp = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
21
21
  function isHTMLElement(v) {
@@ -84,11 +84,12 @@ function isEqual(rect1, rect2) {
84
84
 
85
85
  // src/auto-update.ts
86
86
  function resolveOptions(option) {
87
+ var _a, _b, _c;
87
88
  const bool = isBoolean(option);
88
89
  return {
89
- ancestorResize: bool ? option : option.ancestorResize ?? true,
90
- ancestorScroll: bool ? option : option.ancestorScroll ?? true,
91
- referenceResize: bool ? option : option.referenceResize ?? true
90
+ ancestorResize: bool ? option : (_a = option.ancestorResize) != null ? _a : true,
91
+ ancestorScroll: bool ? option : (_b = option.ancestorScroll) != null ? _b : true,
92
+ referenceResize: bool ? option : (_c = option.referenceResize) != null ? _c : true
92
93
  };
93
94
  }
94
95
  function autoUpdate(reference, floating, update, options = false) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/popper",
3
- "version": "0.0.0-dev-20221018140542",
3
+ "version": "0.0.0-dev-20221031080845",
4
4
  "description": "Dynamic positioning logic for ui machines",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -28,8 +28,8 @@
28
28
  "@floating-ui/dom": "1.0.2"
29
29
  },
30
30
  "devDependencies": {
31
- "@zag-js/dom-utils": "0.0.0-dev-20221018140542",
32
- "@zag-js/utils": "0.1.6"
31
+ "@zag-js/dom-utils": "0.0.0-dev-20221031080845",
32
+ "@zag-js/utils": "0.0.0-dev-20221031080845"
33
33
  },
34
34
  "scripts": {
35
35
  "build-fast": "tsup src/index.ts --format=esm,cjs",