@folklore/ads 0.0.71 → 0.0.73

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.
Files changed (3) hide show
  1. package/dist/cjs.js +30 -19
  2. package/dist/es.js +30 -19
  3. package/package.json +2 -2
package/dist/cjs.js CHANGED
@@ -631,16 +631,16 @@ const viewports = {
631
631
  };
632
632
  const slots = {
633
633
  top: {
634
- size: [[300, 100], [300, 150], [320, 50], [320, 100], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300], [1382, 300], [1382, 600], 'fluid'],
634
+ size: [[300, 100], [300, 150], [320, 50], [320, 100], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300], [1382, 300], [1382, 600]],
635
635
  sizeMapping: {
636
- default: [[300, 100], [300, 150], [320, 50], [320, 100], 'fluid'],
637
- tablet: [[300, 100], [300, 150], [320, 50], [320, 100], [728, 90], 'fluid'],
638
- desktop: [[300, 100], [300, 150], [320, 50], [320, 100], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300], 'fluid'],
639
- laptop: [[300, 100], [300, 150], [320, 50], [320, 100], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300], [1382, 300], [1382, 600], 'fluid']
636
+ default: [[300, 100], [300, 150], [320, 50], [320, 100]],
637
+ tablet: [[300, 100], [300, 150], [320, 50], [320, 100], [728, 90]],
638
+ desktop: [[300, 100], [300, 150], [320, 50], [320, 100], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300]],
639
+ laptop: [[300, 100], [300, 150], [320, 50], [320, 100], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300], [1382, 300], [1382, 600]]
640
640
  }
641
641
  },
642
642
  grid: {
643
- size: [[250, 250], [300, 250], 'fluid']
643
+ size: [[250, 250], [300, 250]]
644
644
  },
645
645
  sidebar: {
646
646
  size: [[120, 600], [160, 600], [300, 600], [300, 250]],
@@ -650,21 +650,21 @@ const slots = {
650
650
  }
651
651
  },
652
652
  fullwidth: {
653
- size: [[250, 250], [300, 100], [300, 150], [300, 250], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300], [1382, 300], [1382, 600], 'fluid'],
653
+ size: [[250, 250], [300, 100], [300, 150], [300, 250], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300], [1382, 300], [1382, 600]],
654
654
  sizeMapping: {
655
- default: [[300, 100], [300, 150], [320, 50], [320, 100], 'fluid'],
656
- tablet: [[300, 100], [300, 150], [320, 50], [320, 100], [728, 90], 'fluid'],
657
- desktop: [[250, 250], [300, 100], [300, 150], [300, 250], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300], 'fluid'],
658
- laptop: [[250, 250], [300, 100], [300, 150], [300, 250], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300], [1382, 300], [1382, 600], 'fluid']
655
+ default: [[300, 100], [300, 150], [320, 50], [320, 100]],
656
+ tablet: [[300, 100], [300, 150], [320, 50], [320, 100], [728, 90]],
657
+ desktop: [[250, 250], [300, 100], [300, 150], [300, 250], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300]],
658
+ laptop: [[250, 250], [300, 100], [300, 150], [300, 250], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300], [1382, 300], [1382, 600]]
659
659
  }
660
660
  },
661
661
  content: {
662
- size: [[120, 600], [160, 600], [250, 250], [300, 100], [300, 150], [300, 250], [300, 600], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90], 'fluid'],
662
+ size: [[120, 600], [160, 600], [250, 250], [300, 100], [300, 150], [300, 250], [300, 600], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90]],
663
663
  sizeMapping: {
664
- default: [[250, 250], [300, 100], [300, 150], [300, 250], [320, 50], [320, 100], [336, 280], 'fluid'],
665
- tablet: [[250, 250], [300, 100], [300, 150], [300, 250], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90], 'fluid'],
666
- desktop: [[120, 600], [160, 600], [250, 250], [300, 100], [300, 150], [300, 250], [300, 600], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90], 'fluid'],
667
- laptop: [[120, 600], [160, 600], [250, 250], [300, 100], [300, 150], [300, 250], [300, 600], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90], 'fluid']
664
+ default: [[250, 250], [300, 100], [300, 150], [300, 250], [320, 50], [320, 100], [336, 280]],
665
+ tablet: [[250, 250], [300, 100], [300, 150], [300, 250], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90]],
666
+ desktop: [[120, 600], [160, 600], [250, 250], [300, 100], [300, 150], [300, 250], [300, 600], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90]],
667
+ laptop: [[120, 600], [160, 600], [250, 250], [300, 100], [300, 150], [300, 250], [300, 600], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90]]
668
668
  }
669
669
  }
670
670
  };
@@ -853,7 +853,8 @@ const propTypes$1 = {
853
853
  const defaultProps$1 = {};
854
854
  function RichAd(_ref) {
855
855
  let {
856
- richAd
856
+ richAd,
857
+ ...props
857
858
  } = _ref;
858
859
  const {
859
860
  type = null,
@@ -864,6 +865,7 @@ function RichAd(_ref) {
864
865
  } = useAdsContext();
865
866
  const RichAdComponent = utils.getComponentFromName(richAdComponents, type);
866
867
  return RichAdComponent !== null ? /*#__PURE__*/jsxRuntime.jsx(RichAdComponent, {
868
+ ...props,
867
869
  ...richAdProps
868
870
  }) : null;
869
871
  }
@@ -1297,12 +1299,21 @@ function Ad(_ref) {
1297
1299
  ref: refObserver,
1298
1300
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
1299
1301
  className: adClassName,
1300
- style: adStyle,
1302
+ style: {
1303
+ position: 'relative',
1304
+ ...adStyle
1305
+ },
1301
1306
  ref: adContainerRef,
1302
1307
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
1303
- id: id
1308
+ id: id,
1309
+ style: {
1310
+ position: isRendered && richAd !== null ? 'absolute' : null
1311
+ }
1304
1312
  }), isRendered && richAd !== null ? /*#__PURE__*/jsxRuntime.jsx(RichAd, {
1305
1313
  richAd: richAd,
1314
+ isFluid: isFluid,
1315
+ width: width,
1316
+ height: height,
1306
1317
  className: richAdClassName
1307
1318
  }) : null]
1308
1319
  })
package/dist/es.js CHANGED
@@ -613,16 +613,16 @@ const viewports = {
613
613
  };
614
614
  const slots = {
615
615
  top: {
616
- size: [[300, 100], [300, 150], [320, 50], [320, 100], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300], [1382, 300], [1382, 600], 'fluid'],
616
+ size: [[300, 100], [300, 150], [320, 50], [320, 100], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300], [1382, 300], [1382, 600]],
617
617
  sizeMapping: {
618
- default: [[300, 100], [300, 150], [320, 50], [320, 100], 'fluid'],
619
- tablet: [[300, 100], [300, 150], [320, 50], [320, 100], [728, 90], 'fluid'],
620
- desktop: [[300, 100], [300, 150], [320, 50], [320, 100], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300], 'fluid'],
621
- laptop: [[300, 100], [300, 150], [320, 50], [320, 100], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300], [1382, 300], [1382, 600], 'fluid']
618
+ default: [[300, 100], [300, 150], [320, 50], [320, 100]],
619
+ tablet: [[300, 100], [300, 150], [320, 50], [320, 100], [728, 90]],
620
+ desktop: [[300, 100], [300, 150], [320, 50], [320, 100], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300]],
621
+ laptop: [[300, 100], [300, 150], [320, 50], [320, 100], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300], [1382, 300], [1382, 600]]
622
622
  }
623
623
  },
624
624
  grid: {
625
- size: [[250, 250], [300, 250], 'fluid']
625
+ size: [[250, 250], [300, 250]]
626
626
  },
627
627
  sidebar: {
628
628
  size: [[120, 600], [160, 600], [300, 600], [300, 250]],
@@ -632,21 +632,21 @@ const slots = {
632
632
  }
633
633
  },
634
634
  fullwidth: {
635
- size: [[250, 250], [300, 100], [300, 150], [300, 250], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300], [1382, 300], [1382, 600], 'fluid'],
635
+ size: [[250, 250], [300, 100], [300, 150], [300, 250], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300], [1382, 300], [1382, 600]],
636
636
  sizeMapping: {
637
- default: [[300, 100], [300, 150], [320, 50], [320, 100], 'fluid'],
638
- tablet: [[300, 100], [300, 150], [320, 50], [320, 100], [728, 90], 'fluid'],
639
- desktop: [[250, 250], [300, 100], [300, 150], [300, 250], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300], 'fluid'],
640
- laptop: [[250, 250], [300, 100], [300, 150], [300, 250], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300], [1382, 300], [1382, 600], 'fluid']
637
+ default: [[300, 100], [300, 150], [320, 50], [320, 100]],
638
+ tablet: [[300, 100], [300, 150], [320, 50], [320, 100], [728, 90]],
639
+ desktop: [[250, 250], [300, 100], [300, 150], [300, 250], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300]],
640
+ laptop: [[250, 250], [300, 100], [300, 150], [300, 250], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90], [970, 90], [970, 250], [1024, 300], [1382, 300], [1382, 600]]
641
641
  }
642
642
  },
643
643
  content: {
644
- size: [[120, 600], [160, 600], [250, 250], [300, 100], [300, 150], [300, 250], [300, 600], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90], 'fluid'],
644
+ size: [[120, 600], [160, 600], [250, 250], [300, 100], [300, 150], [300, 250], [300, 600], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90]],
645
645
  sizeMapping: {
646
- default: [[250, 250], [300, 100], [300, 150], [300, 250], [320, 50], [320, 100], [336, 280], 'fluid'],
647
- tablet: [[250, 250], [300, 100], [300, 150], [300, 250], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90], 'fluid'],
648
- desktop: [[120, 600], [160, 600], [250, 250], [300, 100], [300, 150], [300, 250], [300, 600], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90], 'fluid'],
649
- laptop: [[120, 600], [160, 600], [250, 250], [300, 100], [300, 150], [300, 250], [300, 600], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90], 'fluid']
646
+ default: [[250, 250], [300, 100], [300, 150], [300, 250], [320, 50], [320, 100], [336, 280]],
647
+ tablet: [[250, 250], [300, 100], [300, 150], [300, 250], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90]],
648
+ desktop: [[120, 600], [160, 600], [250, 250], [300, 100], [300, 150], [300, 250], [300, 600], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90]],
649
+ laptop: [[120, 600], [160, 600], [250, 250], [300, 100], [300, 150], [300, 250], [300, 600], [320, 50], [320, 100], [336, 280], [640, 350], [728, 90]]
650
650
  }
651
651
  }
652
652
  };
@@ -835,7 +835,8 @@ const propTypes$1 = {
835
835
  const defaultProps$1 = {};
836
836
  function RichAd(_ref) {
837
837
  let {
838
- richAd
838
+ richAd,
839
+ ...props
839
840
  } = _ref;
840
841
  const {
841
842
  type = null,
@@ -846,6 +847,7 @@ function RichAd(_ref) {
846
847
  } = useAdsContext();
847
848
  const RichAdComponent = getComponentFromName(richAdComponents, type);
848
849
  return RichAdComponent !== null ? /*#__PURE__*/jsx(RichAdComponent, {
850
+ ...props,
849
851
  ...richAdProps
850
852
  }) : null;
851
853
  }
@@ -1279,12 +1281,21 @@ function Ad(_ref) {
1279
1281
  ref: refObserver,
1280
1282
  children: /*#__PURE__*/jsxs("div", {
1281
1283
  className: adClassName,
1282
- style: adStyle,
1284
+ style: {
1285
+ position: 'relative',
1286
+ ...adStyle
1287
+ },
1283
1288
  ref: adContainerRef,
1284
1289
  children: [/*#__PURE__*/jsx("div", {
1285
- id: id
1290
+ id: id,
1291
+ style: {
1292
+ position: isRendered && richAd !== null ? 'absolute' : null
1293
+ }
1286
1294
  }), isRendered && richAd !== null ? /*#__PURE__*/jsx(RichAd, {
1287
1295
  richAd: richAd,
1296
+ isFluid: isFluid,
1297
+ width: width,
1298
+ height: height,
1288
1299
  className: richAdClassName
1289
1300
  }) : null]
1290
1301
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@folklore/ads",
3
- "version": "0.0.71",
3
+ "version": "0.0.73",
4
4
  "description": "Ads library",
5
5
  "keywords": [
6
6
  "javascript",
@@ -50,7 +50,7 @@
50
50
  "publishConfig": {
51
51
  "access": "public"
52
52
  },
53
- "gitHead": "6b7ef9741a35f131038120725fe0ed79851eb216",
53
+ "gitHead": "e81a61fe703e47e9725c6ad4bf36c5d95aea2899",
54
54
  "dependencies": {
55
55
  "@folklore/hooks": "^0.0.64",
56
56
  "@folklore/tracking": "^0.0.23",