@betarena/ad-engine 0.3.0 → 0.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betarena/ad-engine",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "private": false,
5
5
  "description": "Betarena ad-engine widget",
6
6
  "keywords": [
@@ -109,6 +109,10 @@
109
109
  isStandalone = true
110
110
  ;
111
111
 
112
+ // Retained as a supported public prop for API compatibility.
113
+ // Device detection is UA-based; this value is not consumed internally.
114
+ $: void deviceWidthList;
115
+
112
116
  /**
113
117
  * @description
114
118
  * 📝 Component Local Interface
@@ -903,7 +907,7 @@
903
907
  {
904
908
  deviceType,
905
909
  isoCountryCode: geoLocation?.country_code ?? 'EN',
906
- authorId,
910
+ authorId: authorId ?? undefined,
907
911
  tagIds: authorArticleTagIds,
908
912
  zoneIds: targetZoneIds
909
913
  },
@@ -1062,7 +1066,7 @@
1062
1066
 
1063
1067
  {#if isStandalone}
1064
1068
  <link rel="preconnect" href="https://fonts.googleapis.com">
1065
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
1069
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous">
1066
1070
  <link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
1067
1071
  {/if}
1068
1072
 
@@ -106,6 +106,7 @@
106
106
  width=250
107
107
  height=250
108
108
  src={adData.data.media}
109
+ title="Betarena advert"
109
110
  />
110
111
  <!--
111
112
  <video
@@ -262,10 +262,12 @@
262
262
  >
263
263
  <a
264
264
  target='_blank'
265
+ rel='noopener noreferrer'
265
266
  on:click=
266
267
  {
267
268
  () =>
268
269
  {
270
+ if (objectAdvertData.id === undefined) return;
269
271
  new ServiceAdEngine
270
272
  (
271
273
  betarenaEndpoint
@@ -114,11 +114,13 @@
114
114
 
115
115
  <a
116
116
  target='_blank'
117
+ rel='noopener noreferrer'
117
118
  href={objectAdvertData.data?.cta_link}
118
119
  on:click=
119
120
  {
120
121
  () =>
121
122
  {
123
+ if (objectAdvertData.id === undefined) return;
122
124
  new ServiceAdEngine
123
125
  (
124
126
  betarenaEndpoint
@@ -247,16 +247,11 @@
247
247
  ╰─────
248
248
  -->
249
249
  {#if isAdvertCloseBtnShown}
250
- <img
251
- id='close'
252
- src={iconClose}
253
- alt='icon-close'
254
- title='icon-close'
255
- loading='lazy'
256
- class=
257
- "
258
- cursor-pointer
259
- "
250
+ <button
251
+ type="button"
252
+ aria-label="Close advert"
253
+ class="cursor-pointer"
254
+ style="background:none;border:none;padding:0;"
260
255
  on:click=
261
256
  {
262
257
  () =>
@@ -274,7 +269,14 @@
274
269
  return;
275
270
  }
276
271
  }
277
- />
272
+ >
273
+ <img
274
+ class='close-btn'
275
+ src={iconClose}
276
+ alt=''
277
+ loading='lazy'
278
+ />
279
+ </button>
278
280
  {/if}
279
281
 
280
282
  <!--
@@ -295,6 +297,7 @@
295
297
  {
296
298
  () =>
297
299
  {
300
+ if (adData.id === undefined) return;
298
301
  new ServiceAdEngine
299
302
  (
300
303
  betarenaEndpoint
@@ -428,6 +431,7 @@
428
431
  {
429
432
  () =>
430
433
  {
434
+ if (adData.id === undefined) return;
431
435
  new ServiceAdEngine
432
436
  (
433
437
  betarenaEndpoint
@@ -520,7 +524,7 @@
520
524
 
521
525
  img
522
526
  {
523
- &#close
527
+ &.close-btn
524
528
  {
525
529
  /* 📌 position */
526
530
  position: absolute;