@folklore/ads 0.0.33 → 0.0.35

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/cjs.js CHANGED
@@ -260,7 +260,8 @@ class AdSlot extends EventEmitter__default["default"] {
260
260
  } = this.renderEvent;
261
261
  return size !== null ? {
262
262
  width: size[0],
263
- height: size[1]
263
+ height: size[1],
264
+ isFluid: size[0] === 0 && size[1] === 0
264
265
  } : null;
265
266
  }
266
267
  }
@@ -1072,6 +1073,7 @@ function Ad(_ref) {
1072
1073
  id,
1073
1074
  width,
1074
1075
  height,
1076
+ isFluid = false,
1075
1077
  isEmpty,
1076
1078
  isRendered,
1077
1079
  refObserver,
@@ -1103,10 +1105,10 @@ function Ad(_ref) {
1103
1105
  }
1104
1106
  let adStyle = null;
1105
1107
  if (isRendered) {
1106
- adStyle = {
1108
+ adStyle = !isFluid ? {
1107
1109
  width,
1108
1110
  height
1109
- };
1111
+ } : null;
1110
1112
  } else if (shouldKeepSize && (finalDisabled || waitingNextRender)) {
1111
1113
  adStyle = lastRenderedSize.current;
1112
1114
  } else if (!withoutMinimumSize) {
package/dist/es.js CHANGED
@@ -242,7 +242,8 @@ class AdSlot extends EventEmitter {
242
242
  } = this.renderEvent;
243
243
  return size !== null ? {
244
244
  width: size[0],
245
- height: size[1]
245
+ height: size[1],
246
+ isFluid: size[0] === 0 && size[1] === 0
246
247
  } : null;
247
248
  }
248
249
  }
@@ -1054,6 +1055,7 @@ function Ad(_ref) {
1054
1055
  id,
1055
1056
  width,
1056
1057
  height,
1058
+ isFluid = false,
1057
1059
  isEmpty,
1058
1060
  isRendered,
1059
1061
  refObserver,
@@ -1085,10 +1087,10 @@ function Ad(_ref) {
1085
1087
  }
1086
1088
  let adStyle = null;
1087
1089
  if (isRendered) {
1088
- adStyle = {
1090
+ adStyle = !isFluid ? {
1089
1091
  width,
1090
1092
  height
1091
- };
1093
+ } : null;
1092
1094
  } else if (shouldKeepSize && (finalDisabled || waitingNextRender)) {
1093
1095
  adStyle = lastRenderedSize.current;
1094
1096
  } else if (!withoutMinimumSize) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@folklore/ads",
3
- "version": "0.0.33",
3
+ "version": "0.0.35",
4
4
  "description": "Ads library",
5
5
  "keywords": [
6
6
  "javascript",
@@ -50,9 +50,9 @@
50
50
  "publishConfig": {
51
51
  "access": "public"
52
52
  },
53
- "gitHead": "9bd23dcb6eb2c28a53fa4d93326ed650a9a42393",
53
+ "gitHead": "157dafbef47cbe22779e58c62da89a0c46c06bc8",
54
54
  "dependencies": {
55
- "@folklore/hooks": "^0.0.43",
55
+ "@folklore/hooks": "^0.0.44",
56
56
  "@folklore/tracking": "^0.0.23",
57
57
  "classnames": "^2.5.1",
58
58
  "debug": "^4.3.4",