@betarena/ad-engine 0.0.60 → 0.0.62

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.0.60",
3
+ "version": "0.0.62",
4
4
  "private": false,
5
5
  "description": "Betarena ad-engine widget",
6
6
  "keywords": [
@@ -166,7 +166,7 @@
166
166
  const
167
167
  /**
168
168
  * @description
169
- * 📝 `List` of `HTMLElements` identified on `page` for a target `zone`.
169
+ * 📝 `List` of `HTMLElements` identified on `page` expecting a target `zone` advertisement injection.
170
170
  */
171
171
  listElementTarget = document.querySelectorAll('[data-betarena-zone-id]')
172
172
  ;
@@ -181,11 +181,11 @@
181
181
  );
182
182
 
183
183
  // ╭─────
184
- // │ NOTE: |:| loop over elements detected as betarena elegible ads (global/outer)
184
+ // │ NOTE: |:| loop over elements detected as betarena elegible advert injection (global/outer)
185
185
  // ╰─────
186
186
  for (const elem of listElementTarget)
187
187
  {
188
- const
188
+ let
189
189
  /**
190
190
  * @description
191
191
  * 📝 Value of Betarena Zone Id
@@ -195,9 +195,44 @@
195
195
 
196
196
  if (!value) continue;
197
197
 
198
- mapBetarenaAdvertStandardElement.set(parseInt(value), elem);
198
+ // [🐞]
199
+ logger
200
+ (
201
+ [
202
+ `🔹 [var] ➤ value ${value}`
203
+ ]
204
+ );
205
+
206
+ if (value.includes(','))
207
+ {
208
+ const
209
+ /**
210
+ * @description
211
+ * 📝 Split value by `,`
212
+ */
213
+ values = value.split(',')
214
+ ;
215
+
216
+ for (const val of values)
217
+ mapBetarenaAdvertStandardElement.set(parseInt(val), elem);
218
+ ;
219
+ }
220
+ else
221
+ {
222
+ mapBetarenaAdvertStandardElement.set(parseInt(value), elem);
223
+ }
199
224
  }
200
225
 
226
+ // [🐞]
227
+ logger
228
+ (
229
+ [
230
+ `🔹 [var] ➤ mapBetarenaAdvertStandardElement.keys ${[...mapBetarenaAdvertStandardElement.keys()]}`,
231
+ `🔹 [var] ➤ mapBetarenaAdvertStandardElement.size ${mapBetarenaAdvertStandardElement.size}`,
232
+ '🚏 checkpoint ➤ generateElementMap(..) // END'
233
+ ]
234
+ );
235
+
201
236
  return
202
237
  }
203
238
 
@@ -608,8 +643,8 @@
608
643
  (
609
644
  [
610
645
  '🚏 checkpoint ➤ initialize(..) // START',
611
- `🔹 [var] ➤ mapBetarenaAdvertStandardElement.size ${mapBetarenaAdvertStandardElement.size}`
612
- // `🔹 [var] ➤ zoneIds ${JSON.stringify(zoneIds)}`
646
+ `🔹 [var] ➤ deviceType ${deviceType}`,
647
+ `🔹 [var] ➤ geoLocation ${JSON.stringify(geoLocation)}`
613
648
  ]
614
649
  );
615
650
 
@@ -728,7 +763,7 @@
728
763
  <hr>
729
764
 
730
765
  <div
731
- data-betarena-zone-id=2
766
+ data-betarena-zone-id=2,3
732
767
  >
733
768
  {#each { length: 25 } as _, i}
734
769
  <p>
@@ -234,45 +234,31 @@
234
234
  -->
235
235
 
236
236
  <div
237
- id="inter-outer"
237
+ id='inter-outer'
238
238
  bind:this={instanceAdvertInterscroller}
239
- class="interscroller-wrapper"
240
- style=
241
- "
242
- display: none;
243
- height: 100vh;
244
- right: 0px;
245
- width: 100vw;
246
- max-width: 100vw;
247
- background-color: var(--betarena-ad-engine-interscroller-advert-background-image-);
248
- "
239
+ class=
240
+ '
241
+ interscroller-wrapper
242
+ '
249
243
  >
250
- <h2 class="info-box">
244
+ <h2 class='info-box'>
251
245
  Advertisement
252
246
  </h2>
253
247
 
254
248
  <div
255
- id="intscdiv"
256
- class="interscroller-bg-wrapper"
257
- style="height: 100%; right: 0px; clip-path: rect(0px 100vw 100vh 0px); width: 100vw;"
249
+ class=
250
+ '
251
+ interscroller-bg-wrapper
252
+ '
258
253
  >
259
254
  <div
260
- id="nxtads"
261
255
  class=
262
- "
256
+ '
263
257
  interscroller-bg
264
- "
265
- style=
266
- "
267
- height: 100%;
268
- width: 100%;
269
- padding: 0px;
270
- overflow: hidden;
271
- text-align: center;
272
- "
258
+ '
273
259
  >
274
260
  <a
275
- target="_blank"
261
+ target='_blank'
276
262
  on:click=
277
263
  {
278
264
  () =>
@@ -289,19 +275,19 @@
289
275
  href={objectAdverData.data?.cta_link}
290
276
  >
291
277
  <div
278
+ id='advert'
292
279
  style=
293
- "
294
- height: 100vh;
295
- width: 100vw;
280
+ '
281
+ background: url({objectAdverData.data?.media});
296
282
  background-repeat: no-repeat;
297
- background-size: contain;
298
- "
283
+ background-size: 100vw 100vh;
284
+ '
299
285
  />
300
286
  </a>
301
287
  </div>
302
288
  </div>
303
289
 
304
- <h2 class="info-box">
290
+ <h2 class='info-box'>
305
291
  Scroll to continue
306
292
  </h2>
307
293
  </div>
@@ -330,15 +316,24 @@
330
316
  position: relative !important;
331
317
  cursor: pointer !important;
332
318
  z-index: 10000000 !important;
319
+ right: 0px;
333
320
  /* 🛝 layout */
334
321
  flex-direction: column;
335
322
  justify-content: space-between;
323
+ display: none;
324
+ /* 🎨 style */
325
+ min-width: 100vw;
326
+ max-width: 100vw;
327
+ height: 100vh;
328
+ min-height: 100vh;
329
+ background-color: var(--betarena-ad-engine-interscroller-advert-background-image-);
336
330
 
337
331
  .info-box
338
332
  {
339
333
  /* 📌 position */
340
334
  z-index: 1;
341
335
  /* 🎨 style */
336
+ width: 100%;
342
337
  color: var(--colors-text-text-primary-900, #fbfbfb);
343
338
  text-align: center;
344
339
  font-family: Roboto;
@@ -347,7 +342,6 @@
347
342
  font-weight: 700 !important;
348
343
  line-height: 38px !important; /* 190% */
349
344
  text-transform: uppercase;
350
- width: 100%;
351
345
  margin: 0 !important;
352
346
  background: var(--colors-background-bg-secondary, #313131);
353
347
  }
@@ -355,34 +349,47 @@
355
349
  .interscroller-bg-wrapper
356
350
  {
357
351
  /* 📌 position */
358
- position: absolute !important;
359
- left: 0 !important;
352
+ position: absolute;
353
+ left: 0;
354
+ right: 0;
360
355
  /* 🎨 style */
361
- width: 100% !important;
356
+ width: 100vw;
357
+ height: 100vh;
358
+ clip-path: rect(0 100vw 100vh 0);
362
359
 
363
360
  .interscroller-bg
364
361
  {
365
362
  /* 📌 position */
366
- position: fixed !important;
367
- top: 30px;
363
+ position: fixed;
364
+ top: 50%;
365
+ left: 50%;
366
+ transform: translate(-50%, -50%);
368
367
  /* 🎨 style */
369
- height: 100% !important;
370
- backface-visibility: hidden !important;
371
- -webkit-backface-visibility: hidden !important;
372
- border: 0 !important;
373
- }
368
+ width: 100vw;
369
+ height: 100vh;
370
+ backface-visibility: hidden;
371
+ -webkit-backface-visibility: hidden;
372
+ border: 0;
373
+ text-align: center;
374
+
375
+ a
376
+ {
377
+ /* 🎨 style */
378
+ display: block;
379
+ width: 100vw;
380
+ height: 100vh;
381
+ text-decoration: none;
374
382
 
375
- .ad_image
376
- {
377
- /* 🎨 style */
378
- width: 100% !important;
379
- height: 100% !important;
380
- max-width: 100vw !important;
381
- max-height: 100% !important;
382
- touch-action: manipulation;
383
- user-select: none;
384
- -webkit-user-drag: none;
385
- -webkit-touch-callout: none;
383
+ div#advert
384
+ {
385
+ /* 📌 position */
386
+ position: relative;
387
+ /* 🎨 style */
388
+ margin-top: -30px;
389
+ max-width: 100vw;
390
+ height: 100vh;
391
+ }
392
+ }
386
393
  }
387
394
  }
388
395
  }