@yunlefun-home/air-conditioner-core 0.4.1 → 0.4.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.
package/dist/index.cjs CHANGED
@@ -718,7 +718,7 @@ function observeAcScale(target, designWidth, onScale) {
718
718
  onScale(scale);
719
719
  }
720
720
  };
721
- update(target.getBoundingClientRect().width);
721
+ update(target.offsetWidth ?? target.getBoundingClientRect().width);
722
722
  const observer = new ResizeObserver((entries) => {
723
723
  for (const entry of entries) update(entry.contentRect.width);
724
724
  });
package/dist/index.js CHANGED
@@ -717,7 +717,7 @@ function observeAcScale(target, designWidth, onScale) {
717
717
  onScale(scale);
718
718
  }
719
719
  };
720
- update(target.getBoundingClientRect().width);
720
+ update(target.offsetWidth ?? target.getBoundingClientRect().width);
721
721
  const observer = new ResizeObserver((entries) => {
722
722
  for (const entry of entries) update(entry.contentRect.width);
723
723
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yunlefun-home/air-conditioner-core",
3
3
  "type": "module",
4
- "version": "0.4.1",
4
+ "version": "0.4.3",
5
5
  "description": "Framework-agnostic air conditioner state and runtime helpers.",
6
6
  "author": {
7
7
  "url": "https://www.yunyoujun.cn",