@brndts/brndts-ads 1.11.2 → 1.11.4

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
@@ -71119,10 +71119,18 @@ var RegionBorderPlugin = /*#__PURE__*/ function() {
71119
71119
  var styles2 = window.getComputedStyle(region.content.view);
71120
71120
  var width = parseFloat(styles2.width);
71121
71121
  var height = parseFloat(styles2.height);
71122
- region.view.style.width = "".concat(region.boxWidth + 4, "px");
71123
- region.view.style.height = "".concat(region.boxHeight + 4, "px");
71124
- region.content.view.style.width = "".concat(width + 4, "px");
71125
- region.content.view.style.height = "".concat(height + 4, "px");
71122
+ if (region.view.style.width !== "fit-content") {
71123
+ region.view.style.width = "".concat(region.boxWidth + 4, "px");
71124
+ }
71125
+ if (region.view.style.height !== "fit-content") {
71126
+ region.view.style.height = "".concat(region.boxHeight + 4, "px");
71127
+ }
71128
+ if (region.content.view.style.width !== "fit-content") {
71129
+ region.content.view.style.width = "".concat(width + 4, "px");
71130
+ }
71131
+ if (region.content.view.style.height !== "fit-content") {
71132
+ region.content.view.style.height = "".concat(height + 4, "px");
71133
+ }
71126
71134
  return Promise.resolve();
71127
71135
  }
71128
71136
  },
@@ -71132,10 +71140,18 @@ var RegionBorderPlugin = /*#__PURE__*/ function() {
71132
71140
  var styles2 = window.getComputedStyle(region.content.view);
71133
71141
  var width = parseFloat(styles2.width);
71134
71142
  var height = parseFloat(styles2.height);
71135
- region.view.style.width = "".concat(region.boxWidth + 4, "px");
71136
- region.view.style.height = "".concat(region.boxHeight + 4, "px");
71137
- region.content.view.style.width = "".concat(width + 4, "px");
71138
- region.content.view.style.height = "".concat(height + 4, "px");
71143
+ if (region.view.style.width !== "fit-content") {
71144
+ region.view.style.width = "".concat(region.boxWidth + 4, "px");
71145
+ }
71146
+ if (region.view.style.height !== "fit-content") {
71147
+ region.view.style.height = "".concat(region.boxHeight + 4, "px");
71148
+ }
71149
+ if (region.content.view.style.width !== "fit-content") {
71150
+ region.content.view.style.width = "".concat(width + 4, "px");
71151
+ }
71152
+ if (region.content.view.style.height !== "fit-content") {
71153
+ region.content.view.style.height = "".concat(height + 4, "px");
71154
+ }
71139
71155
  return Promise.resolve();
71140
71156
  }
71141
71157
  },
@@ -71686,19 +71702,17 @@ var StaticRegionContent = /*#__PURE__*/ function(RegionContent) {
71686
71702
  {
71687
71703
  key: "render",
71688
71704
  value: function render(force) {
71689
- var _this = this;
71690
- var _this_content, _this_content_extra_sz, _this_content_extra, _this_content1, _this_content_extra_sz1, _this_content_extra1, _this_content2;
71705
+ var _this_content;
71691
71706
  if ((_this_content = this.content) === null || _this_content === void 0 ? void 0 : _this_content.pending) {
71692
71707
  return;
71693
71708
  }
71694
- this.container.style.width = "".concat((_this_content1 = this.content) === null || _this_content1 === void 0 ? void 0 : (_this_content_extra = _this_content1.extra) === null || _this_content_extra === void 0 ? void 0 : (_this_content_extra_sz = _this_content_extra.sz) === null || _this_content_extra_sz === void 0 ? void 0 : _this_content_extra_sz.w, "px");
71695
- this.container.style.height = "".concat((_this_content2 = this.content) === null || _this_content2 === void 0 ? void 0 : (_this_content_extra1 = _this_content2.extra) === null || _this_content_extra1 === void 0 ? void 0 : (_this_content_extra_sz1 = _this_content_extra1.sz) === null || _this_content_extra_sz1 === void 0 ? void 0 : _this_content_extra_sz1.h, "px");
71709
+ this.container.style.width = "fit-content";
71710
+ this.container.style.height = "fit-content";
71696
71711
  this.container.dataset.state = this.box.area(this.plane.size) > 0 ? "visible" : "hidden";
71697
71712
  this.container.childNodes.forEach(function(node) {
71698
71713
  if (_instanceof(node, HTMLElement)) {
71699
- var _this_content_extra_sz, _this_content_extra, _this_content, _this_content_extra_sz1, _this_content_extra1, _this_content1;
71700
- node.style.width = "".concat((_this_content = _this.content) === null || _this_content === void 0 ? void 0 : (_this_content_extra = _this_content.extra) === null || _this_content_extra === void 0 ? void 0 : (_this_content_extra_sz = _this_content_extra.sz) === null || _this_content_extra_sz === void 0 ? void 0 : _this_content_extra_sz.w, "px");
71701
- node.style.height = "".concat((_this_content1 = _this.content) === null || _this_content1 === void 0 ? void 0 : (_this_content_extra1 = _this_content1.extra) === null || _this_content_extra1 === void 0 ? void 0 : (_this_content_extra_sz1 = _this_content_extra1.sz) === null || _this_content_extra_sz1 === void 0 ? void 0 : _this_content_extra_sz1.h, "px");
71714
+ node.style.width = "fit-content";
71715
+ node.style.height = "fit-content";
71702
71716
  }
71703
71717
  });
71704
71718
  }