@brndts/brndts-ads 1.0.0 → 1.0.1

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
@@ -18597,7 +18597,7 @@ var Reporter = /*#__PURE__*/ function() {
18597
18597
  function Reporter() {
18598
18598
  _class_call_check(this, Reporter);
18599
18599
  this.client = new BrowserClient({
18600
- dsn: "https://9daab8406cc1b1fe1efed336d838ee57@o4507460056317952.ingest.de.sentry.io/4507730907299920",
18600
+ dsn: "https://bc8a1d82ad7d35b0c7566cf343e4bdb5@o4507460056317952.ingest.de.sentry.io/4507900315238480",
18601
18601
  transport: makeFetchTransport,
18602
18602
  stackParser: defaultStackParser,
18603
18603
  integrations: [
@@ -18908,7 +18908,7 @@ var Config = /*#__PURE__*/ function() {
18908
18908
  if (!((_providedConfigs_auth = providedConfigs.auth) === null || _providedConfigs_auth === void 0 ? void 0 : _providedConfigs_auth.host)) {
18909
18909
  throw new InternalError("No authority configuration provided!");
18910
18910
  }
18911
- if (!providedConfigs.host || !providedConfigs.key) {
18911
+ if (!providedConfigs.key) {
18912
18912
  throw new InternalError("No host or key provided!");
18913
18913
  }
18914
18914
  this.configs = defaults;
@@ -19676,6 +19676,18 @@ var Region = /*#__PURE__*/ function() {
19676
19676
  this.render(this.contours, this.box.coords);
19677
19677
  }
19678
19678
  },
19679
+ {
19680
+ key: "boundingBox",
19681
+ get: function get() {
19682
+ return this.box;
19683
+ }
19684
+ },
19685
+ {
19686
+ key: "referencePlane",
19687
+ get: function get() {
19688
+ return this.plane;
19689
+ }
19690
+ },
19679
19691
  {
19680
19692
  key: "view",
19681
19693
  get: function get() {
@@ -20186,7 +20198,11 @@ var CooldownPresentation = /*#__PURE__*/ function(AbstractPresentation) {
20186
20198
  }
20187
20199
  },
20188
20200
  {
20189
- key: "startedPresentation",
20201
+ /**
20202
+ * Starts the presentation strategy.
20203
+ *
20204
+ * @param stopPace - Indicates whether to stop the pacing before starting the presentation.
20205
+ */ key: "startedPresentation",
20190
20206
  value: function startedPresentation() {
20191
20207
  var _this = this;
20192
20208
  var stopPace = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
@@ -20199,20 +20215,26 @@ var CooldownPresentation = /*#__PURE__*/ function(AbstractPresentation) {
20199
20215
  }
20200
20216
  },
20201
20217
  {
20202
- key: "start",
20218
+ /**
20219
+ * Starts the cooldown presentation.
20220
+ */ key: "start",
20203
20221
  value: function start() {
20204
20222
  this.clearAll();
20205
20223
  this.enablePresentation();
20206
20224
  }
20207
20225
  },
20208
20226
  {
20209
- key: "stop",
20227
+ /**
20228
+ * Stops the cooldown presentation strategy.
20229
+ */ key: "stop",
20210
20230
  value: function stop() {
20211
20231
  this.clearAll();
20212
20232
  }
20213
20233
  },
20214
20234
  {
20215
- key: "destroy",
20235
+ /**
20236
+ * Destroys the instance of the CooldownPresentation class.
20237
+ */ key: "destroy",
20216
20238
  value: function destroy() {
20217
20239
  this.clearAll();
20218
20240
  }
@@ -20390,7 +20412,7 @@ var AdsTerraProvider = /*#__PURE__*/ function(ContentProvider) {
20390
20412
  ]);
20391
20413
  return AdsTerraProvider;
20392
20414
  }(ContentProvider);
20393
- // src/Ads/Providers/BRNDTSDefaultProvider.ts
20415
+ // src/Ads/Providers/BRNDTSDefault/BRNDTSDefaultProvider.ts
20394
20416
  var BRNDTSDefaultProvider = /*#__PURE__*/ function(ContentProvider) {
20395
20417
  "use strict";
20396
20418
  _inherits(BRNDTSDefaultProvider, ContentProvider);
@@ -20499,7 +20521,6 @@ var KevelProvider = /*#__PURE__*/ function(ContentProvider) {
20499
20521
  var _this;
20500
20522
  _this = _super.call(this, context, options);
20501
20523
  _this.kevel = new KevelSDK(_this.options.networkId, _this.options.siteId);
20502
- _this.requestContent();
20503
20524
  return _this;
20504
20525
  }
20505
20526
  _create_class(KevelProvider, [
@@ -20545,10 +20566,12 @@ var KevelProvider = /*#__PURE__*/ function(ContentProvider) {
20545
20566
  {
20546
20567
  key: "request",
20547
20568
  value: function request() {
20569
+ var _this = this;
20548
20570
  return _async_to_generator(function() {
20549
20571
  return _ts_generator(this, function(_state) {
20550
20572
  return [
20551
- 2
20573
+ 2,
20574
+ _this.requestContent()
20552
20575
  ];
20553
20576
  });
20554
20577
  })();
@@ -20557,7 +20580,7 @@ var KevelProvider = /*#__PURE__*/ function(ContentProvider) {
20557
20580
  ]);
20558
20581
  return KevelProvider;
20559
20582
  }(ContentProvider);
20560
- // src/Ads/Providers/SmartyadsProvider.ts
20583
+ // src/Ads/Providers/SmartyAds/SmartyAdsSDK.ts
20561
20584
  var SmartyadsSDK = /*#__PURE__*/ function() {
20562
20585
  "use strict";
20563
20586
  function SmartyadsSDK() {
@@ -20609,6 +20632,7 @@ var SmartyadsSDK = /*#__PURE__*/ function() {
20609
20632
  ]);
20610
20633
  return SmartyadsSDK;
20611
20634
  }();
20635
+ // src/Ads/Providers/SmartyAds/SmartyadsProvider.ts
20612
20636
  var SmartyadsProvider = /*#__PURE__*/ function(ContentProvider) {
20613
20637
  "use strict";
20614
20638
  _inherits(SmartyadsProvider, ContentProvider);
@@ -20625,14 +20649,14 @@ var SmartyadsProvider = /*#__PURE__*/ function(ContentProvider) {
20625
20649
  {
20626
20650
  key: "getPlacement",
20627
20651
  value: function getPlacement(regionId) {
20628
- var availablePlacements = Object.keys(this.options.placements).map(parseInt);
20652
+ var availablePlacements = Object.keys(this.placements).map(parseInt);
20629
20653
  if (!availablePlacements) {
20630
20654
  throw new Error("No available placements!");
20631
20655
  }
20632
20656
  if (!regionId) {
20633
- return this.options.placements[availablePlacements[0]];
20657
+ return this.placements[availablePlacements[0]];
20634
20658
  }
20635
- return this.options.placements[regionId];
20659
+ return this.placements[regionId];
20636
20660
  }
20637
20661
  },
20638
20662
  {
@@ -20644,7 +20668,7 @@ var SmartyadsProvider = /*#__PURE__*/ function(ContentProvider) {
20644
20668
  return _ts_generator(this, function(_state) {
20645
20669
  switch(_state.label){
20646
20670
  case 0:
20647
- if (!params || params.size.width === void 0 || params.size.height === void 0) {
20671
+ if (!params || params.size.width === void 0 || params.size.width === 0 || params.size.height === void 0 || params.size.height === 0) {
20648
20672
  throw new InternalError("No Params!");
20649
20673
  }
20650
20674
  return [
@@ -20684,7 +20708,7 @@ var SmartyadsProvider = /*#__PURE__*/ function(ContentProvider) {
20684
20708
  ]);
20685
20709
  return SmartyadsProvider;
20686
20710
  }(ContentProvider);
20687
- // src/Ads/Providers/StaticImageProvider.ts
20711
+ // src/Ads/Providers/StaticImage/StaticImageProvider.ts
20688
20712
  var StaticImageProvider = /*#__PURE__*/ function(ContentProvider) {
20689
20713
  "use strict";
20690
20714
  _inherits(StaticImageProvider, ContentProvider);
@@ -28672,6 +28696,14 @@ var BRNDTSService = /*#__PURE__*/ function(_import_events4_default) {
28672
28696
  });
28673
28697
  _this.socket.on("connect", _this.handleOpen.bind(_assert_this_initialized(_this)));
28674
28698
  _this.socket.on("disconnect", _this.handleClose.bind(_assert_this_initialized(_this)));
28699
+ _this.socket.on("connect_error", function(error) {
28700
+ var _this_logger;
28701
+ (_this_logger = _this.logger) === null || _this_logger === void 0 ? void 0 : _this_logger.error("Connection error:", error);
28702
+ });
28703
+ _this.socket.on("error", function(error) {
28704
+ var _this_logger;
28705
+ (_this_logger = _this.logger) === null || _this_logger === void 0 ? void 0 : _this_logger.error("Socket error:", error);
28706
+ });
28675
28707
  return _this;
28676
28708
  }
28677
28709
  _create_class(BRNDTSService, [