@brndts/brndts-ads 1.14.7 → 1.14.9

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.mjs CHANGED
@@ -70136,6 +70136,13 @@ var REGIONS = [
70136
70136
  h: 150,
70137
70137
  name: "Generic - 150x150",
70138
70138
  type: "medium-rectangle"
70139
+ },
70140
+ {
70141
+ id: 1014,
70142
+ w: 160,
70143
+ h: 600,
70144
+ name: "Generic - 160x600",
70145
+ type: "large-rectangle"
70139
70146
  }
70140
70147
  ];
70141
70148
  var RegionDefinitions = /*#__PURE__*/ function() {
@@ -72262,6 +72269,15 @@ var GPT = /*#__PURE__*/ function() {
72262
72269
  ]);
72263
72270
  return GPT;
72264
72271
  }();
72272
+ var tcf_ready = false;
72273
+ function handleTCFApiEvent(data, success) {
72274
+ if (!success) return;
72275
+ var ready = (data === null || data === void 0 ? void 0 : data.eventStatus) === "tcloaded" || (data === null || data === void 0 ? void 0 : data.eventStatus) === "useractioncomplete";
72276
+ var hasTC = !!(data === null || data === void 0 ? void 0 : data.tcString);
72277
+ if (ready && hasTC) {
72278
+ tcf_ready = true;
72279
+ }
72280
+ }
72265
72281
  var PrebidGAM = /*#__PURE__*/ function() {
72266
72282
  "use strict";
72267
72283
  function _PrebidGAM() {
@@ -72296,6 +72312,13 @@ var PrebidGAM = /*#__PURE__*/ function() {
72296
72312
  key: "configure",
72297
72313
  value: function configure(context, options) {
72298
72314
  var _window_pbjs_que, _window_pbjs;
72315
+ if (window.__tcfApi) {
72316
+ var _window___tcfapi, _window, _window___tcfapi1, _window1;
72317
+ (_window___tcfapi = (_window = window).__tcfapi) === null || _window___tcfapi === void 0 ? void 0 : _window___tcfapi.call(_window, "getTCData", 2, handleTCFApiEvent);
72318
+ (_window___tcfapi1 = (_window1 = window).__tcfapi) === null || _window___tcfapi1 === void 0 ? void 0 : _window___tcfapi1.call(_window1, "addEventListener", 2, handleTCFApiEvent);
72319
+ } else {
72320
+ tcf_ready = true;
72321
+ }
72299
72322
  (_window_pbjs = window.pbjs) === null || _window_pbjs === void 0 ? void 0 : (_window_pbjs_que = _window_pbjs.que) === null || _window_pbjs_que === void 0 ? void 0 : _window_pbjs_que.push(function() {
72300
72323
  var _context_config_getAdsConfig_general_debug_mode, _context_config_getAdsConfig_general, _window_pbjs, _window_pbjs1, _window_pbjs2;
72301
72324
  var configBuilder = new PrebidConfigBuilder();
@@ -82013,12 +82036,32 @@ var TYPES = {
82013
82036
  [
82014
82037
  300,
82015
82038
  250
82039
+ ],
82040
+ [
82041
+ 250,
82042
+ 250
82043
+ ],
82044
+ [
82045
+ 200,
82046
+ 200
82047
+ ],
82048
+ [
82049
+ 180,
82050
+ 150
82051
+ ],
82052
+ [
82053
+ 150,
82054
+ 150
82016
82055
  ]
82017
82056
  ],
82018
82057
  "large-rectangle": [
82019
82058
  [
82020
82059
  300,
82021
82060
  600
82061
+ ],
82062
+ [
82063
+ 160,
82064
+ 600
82022
82065
  ]
82023
82066
  ],
82024
82067
  "billboard": [
@@ -82092,7 +82135,7 @@ var DefaultTemplate = /*#__PURE__*/ function() {
82092
82135
  height: plane.height - (this.margin.t + this.margin.b)
82093
82136
  }),
82094
82137
  name: "A",
82095
- maxSlots: 3
82138
+ maxSlots: 1
82096
82139
  });
82097
82140
  }
82098
82141
  if (plane.height - (cutout.y + cutout.height) > 0) {
@@ -82142,7 +82185,7 @@ var FullscreenTemplate = /*#__PURE__*/ function() {
82142
82185
  height: plane.height - (this.margin.t + this.margin.b)
82143
82186
  }),
82144
82187
  name: "A",
82145
- maxSlots: 3
82188
+ maxSlots: 1
82146
82189
  });
82147
82190
  }
82148
82191
  if (plane.height - (cutout.y + cutout.height) > 0) {
@@ -82288,8 +82331,13 @@ var RegionPacker = /*#__PURE__*/ function(_import_events8_default) {
82288
82331
  for(var _iterator = this.areas[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
82289
82332
  var region = _step.value;
82290
82333
  var _packed;
82291
- this.packedByArea[region.name] = this.fillRegion(_object_spread({}, region));
82292
- (_packed = packed).push.apply(_packed, _to_consumable_array(this.packedByArea[region.name]));
82334
+ var regionSlots = this.fillRegion(_object_spread({}, region));
82335
+ this.packedByArea[region.name] = regionSlots;
82336
+ (_packed = packed).push.apply(_packed, _to_consumable_array(regionSlots));
82337
+ if (regionSlots.length > 0) {
82338
+ updated = true;
82339
+ break;
82340
+ }
82293
82341
  }
82294
82342
  } catch (err) {
82295
82343
  _didIteratorError = true;
@@ -82523,12 +82571,16 @@ var BasicAdRegion = /*#__PURE__*/ function(Region) {
82523
82571
  },
82524
82572
  {
82525
82573
  key: "updateVisibility",
82526
- value: function updateVisibility(value2) {}
82574
+ value: function updateVisibility(value2) {
82575
+ var _this_deps_recorder;
82576
+ (_this_deps_recorder = this.deps.recorder) === null || _this_deps_recorder === void 0 ? void 0 : _this_deps_recorder.displayStateChanged(this);
82577
+ }
82527
82578
  },
82528
82579
  {
82529
82580
  key: "hideRegion",
82530
82581
  value: function hideRegion() {
82531
82582
  return _async_to_generator(function() {
82583
+ var _this_deps_recorder;
82532
82584
  return _ts_generator(this, function(_state) {
82533
82585
  switch(_state.label){
82534
82586
  case 0:
@@ -82547,6 +82599,7 @@ var BasicAdRegion = /*#__PURE__*/ function(Region) {
82547
82599
  this.applyPlugins("afterHide");
82548
82600
  this.visible = false;
82549
82601
  this.hidden.resolve(true);
82602
+ (_this_deps_recorder = this.deps.recorder) === null || _this_deps_recorder === void 0 ? void 0 : _this_deps_recorder.presentationStateChanged(this, true);
82550
82603
  return [
82551
82604
  2
82552
82605
  ];