@betarena/ad-engine 0.4.0 → 1.0.0
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.js +15 -15
- package/package.json +4 -9
- package/src/App.svelte +2 -12
- package/src/lib/Advert-Engine-Widget.svelte +357 -643
- package/src/lib/Advert-General-Child.svelte +39 -22
- package/src/lib/Advert-InterScroller-Child.svelte +4 -3
- package/src/lib/Advert-Slide-Child.svelte +96 -63
- package/src/lib/misc/admin/Dev-Info-Box.svelte +11 -1
- package/src/lib/store/session.ts +5 -7
- package/src/lib/types/session.d.ts +0 -10
- package/src/style/app.css +0 -3024
- package/src/style/app.css.map +0 -1
- package/src/style/app.purged.min.scss +0 -137
- package/src/style/app.scss +0 -19
- package/src/style/scss/_document.scss +0 -41
- package/src/style/scss/_root.scss +0 -439
- package/src/style/scss/animation.scss +0 -36
- package/src/style/scss/button.scss +0 -266
- package/src/style/scss/common.scss +0 -40
- package/src/style/scss/font.scss +0 -296
- package/src/style/scss/layout.scss +0 -175
- package/src/style/scss/main.scss +0 -46
- package/src/style/scss/misc.scss +0 -189
- package/src/style/scss/spacing.scss +0 -41
|
@@ -187,21 +187,17 @@
|
|
|
187
187
|
noreferrer
|
|
188
188
|
"
|
|
189
189
|
>
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
{
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
m-l-10
|
|
202
|
-
"
|
|
203
|
-
/>
|
|
204
|
-
</button>
|
|
190
|
+
{adData.data?.cta_title ?? 'Receive Bonus'}
|
|
191
|
+
<img
|
|
192
|
+
src={iconArrow}
|
|
193
|
+
alt='icon-arrow'
|
|
194
|
+
title='icon-arrow'
|
|
195
|
+
loading='lazy'
|
|
196
|
+
class=
|
|
197
|
+
"
|
|
198
|
+
icon-arrow
|
|
199
|
+
"
|
|
200
|
+
/>
|
|
205
201
|
</a>
|
|
206
202
|
|
|
207
203
|
</div>
|
|
@@ -230,13 +226,27 @@
|
|
|
230
226
|
{
|
|
231
227
|
/* 🎨 style */
|
|
232
228
|
overflow: hidden;
|
|
233
|
-
border-radius: 10px
|
|
234
|
-
background-color: #
|
|
229
|
+
border-radius: 10px;
|
|
230
|
+
background-color: var(--colors-background-bg-tertiary, #EBEDEF);
|
|
231
|
+
|
|
232
|
+
*, *::before, *::after
|
|
233
|
+
{
|
|
234
|
+
box-sizing: border-box;
|
|
235
|
+
}
|
|
235
236
|
|
|
236
237
|
p
|
|
237
238
|
{
|
|
238
239
|
/* 🎨 style */
|
|
239
|
-
font-family: "Roboto
|
|
240
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
241
|
+
margin: 0;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
a
|
|
245
|
+
{
|
|
246
|
+
text-decoration: none;
|
|
247
|
+
color: inherit;
|
|
248
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
249
|
+
cursor: pointer;
|
|
240
250
|
}
|
|
241
251
|
|
|
242
252
|
img
|
|
@@ -253,6 +263,7 @@
|
|
|
253
263
|
{
|
|
254
264
|
/* 🎨 style */
|
|
255
265
|
width: 100%;
|
|
266
|
+
border: none;
|
|
256
267
|
}
|
|
257
268
|
|
|
258
269
|
div#main-box
|
|
@@ -265,19 +276,25 @@
|
|
|
265
276
|
&#title
|
|
266
277
|
{
|
|
267
278
|
/* 🎨 style */
|
|
268
|
-
color: var(--
|
|
279
|
+
color: var(--colors-text-text-primary-900, #1F2328);
|
|
269
280
|
}
|
|
270
281
|
}
|
|
271
282
|
|
|
272
|
-
|
|
283
|
+
a
|
|
273
284
|
{
|
|
274
285
|
/* 🎨 style */
|
|
286
|
+
display: block;
|
|
275
287
|
border-radius: 7.57px;
|
|
276
288
|
max-height: 50px;
|
|
277
289
|
width: 100%;
|
|
278
290
|
padding: 10px;
|
|
279
|
-
background: radial-gradient(97.9% 290.93% at 11.52% 99.71%, #
|
|
280
|
-
color: var(--
|
|
291
|
+
background: radial-gradient(97.9% 290.93% at 11.52% 99.71%, var(--colors-success-700, #087443) 0%, var(--colors-success-500, #17B26A) 100%);
|
|
292
|
+
color: var(--colors-foreground-fg-primary-900, #1F2328);
|
|
293
|
+
|
|
294
|
+
.icon-arrow
|
|
295
|
+
{
|
|
296
|
+
margin-left: 10px;
|
|
297
|
+
}
|
|
281
298
|
}
|
|
282
299
|
}
|
|
283
300
|
}
|
|
@@ -345,16 +345,16 @@
|
|
|
345
345
|
z-index: 1;
|
|
346
346
|
/* 🎨 style */
|
|
347
347
|
width: 100%;
|
|
348
|
-
color: var(--colors-text-text-primary-900, #
|
|
348
|
+
color: var(--colors-text-text-primary-900, #1F2328);
|
|
349
349
|
text-align: center;
|
|
350
|
-
font-family: Roboto;
|
|
350
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
351
351
|
font-size: 12px !important;
|
|
352
352
|
font-style: normal;
|
|
353
353
|
font-weight: 700 !important;
|
|
354
354
|
line-height: 38px !important; /* 190% */
|
|
355
355
|
text-transform: uppercase;
|
|
356
356
|
margin: 0 !important;
|
|
357
|
-
background: var(--colors-background-bg-secondary, #
|
|
357
|
+
background: var(--colors-background-bg-secondary, #F5F6F7);
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
.interscroller-bg-wrapper
|
|
@@ -387,6 +387,7 @@
|
|
|
387
387
|
{
|
|
388
388
|
/* 🎨 style */
|
|
389
389
|
text-decoration: none;
|
|
390
|
+
color: inherit;
|
|
390
391
|
height: inherit;
|
|
391
392
|
/* 🛝 layout */
|
|
392
393
|
display: block;
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
import { betarenaAdEngineStore } from './_store.js';
|
|
46
46
|
import { betarenaEndpoint } from './constants/instance.js';
|
|
47
47
|
import { storeAdmin } from './store/admin.js';
|
|
48
|
-
import { storeSession } from './store/session.js';
|
|
49
48
|
|
|
50
49
|
import iconClose from './assets/icon-close.svg';
|
|
51
50
|
import { logger } from './utils/debug.js';
|
|
@@ -116,7 +115,6 @@
|
|
|
116
115
|
;
|
|
117
116
|
|
|
118
117
|
$: ({ isBetarenaAdShownForToday } = { ...$betarenaAdEngineStore });
|
|
119
|
-
$: ({ isDarkTheme } = { ...$storeSession });
|
|
120
118
|
|
|
121
119
|
// #endregion ➤ 📌 VARIABLES
|
|
122
120
|
|
|
@@ -242,16 +240,9 @@
|
|
|
242
240
|
id={CNAME}
|
|
243
241
|
in:fly={{ y: 500, duration: 500 }}
|
|
244
242
|
out:fly={{ y: 500, duration: 500 }}
|
|
245
|
-
class:dark-theme={isDarkTheme}
|
|
246
243
|
>
|
|
247
244
|
<div
|
|
248
|
-
|
|
249
|
-
"
|
|
250
|
-
position: relative;
|
|
251
|
-
height: 280px;
|
|
252
|
-
width: auto;
|
|
253
|
-
margin: 20px 19.5px 0 19.5px;
|
|
254
|
-
"
|
|
245
|
+
class="ad-banner-wrapper"
|
|
255
246
|
>
|
|
256
247
|
|
|
257
248
|
<!--
|
|
@@ -263,8 +254,7 @@
|
|
|
263
254
|
<button
|
|
264
255
|
type="button"
|
|
265
256
|
aria-label="Close advert"
|
|
266
|
-
class="
|
|
267
|
-
style="background:none;border:none;padding:0;"
|
|
257
|
+
class="ad-close-btn"
|
|
268
258
|
on:click=
|
|
269
259
|
{
|
|
270
260
|
() =>
|
|
@@ -410,15 +400,7 @@
|
|
|
410
400
|
-->
|
|
411
401
|
<p
|
|
412
402
|
id="title"
|
|
413
|
-
class=
|
|
414
|
-
"
|
|
415
|
-
s-18
|
|
416
|
-
w-700
|
|
417
|
-
m-0
|
|
418
|
-
m-b-20
|
|
419
|
-
text-center
|
|
420
|
-
color-white
|
|
421
|
-
"
|
|
403
|
+
class="ad-title"
|
|
422
404
|
>
|
|
423
405
|
{@html adData.data?.title}
|
|
424
406
|
</p>
|
|
@@ -436,10 +418,7 @@
|
|
|
436
418
|
noopener
|
|
437
419
|
noreferrer
|
|
438
420
|
"
|
|
439
|
-
|
|
440
|
-
"
|
|
441
|
-
justify-content: center;
|
|
442
|
-
"
|
|
421
|
+
class="ad-cta-link ad-cta-btn"
|
|
443
422
|
on:click=
|
|
444
423
|
{
|
|
445
424
|
() =>
|
|
@@ -461,24 +440,11 @@
|
|
|
461
440
|
}
|
|
462
441
|
}
|
|
463
442
|
>
|
|
464
|
-
<
|
|
465
|
-
class=
|
|
466
|
-
"
|
|
467
|
-
btn-primary
|
|
468
|
-
"
|
|
443
|
+
<span
|
|
444
|
+
class="ad-cta-text"
|
|
469
445
|
>
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
"
|
|
473
|
-
s-16
|
|
474
|
-
w-500
|
|
475
|
-
color-white
|
|
476
|
-
uppercase
|
|
477
|
-
"
|
|
478
|
-
>
|
|
479
|
-
{adData.data?.cta_title ?? 'Recieve Bonus'}
|
|
480
|
-
</span>
|
|
481
|
-
</button>
|
|
446
|
+
{adData.data?.cta_title ?? 'Receive Bonus'}
|
|
447
|
+
</span>
|
|
482
448
|
</a>
|
|
483
449
|
|
|
484
450
|
</div>
|
|
@@ -504,6 +470,12 @@
|
|
|
504
470
|
╰──────────────────────────────────────────────────────────────────────────────╯
|
|
505
471
|
*/
|
|
506
472
|
|
|
473
|
+
:global(body.disable-scroll)
|
|
474
|
+
{
|
|
475
|
+
overflow: hidden !important;
|
|
476
|
+
height: 100%;
|
|
477
|
+
}
|
|
478
|
+
|
|
507
479
|
div#global⮕widget⮕betarenaAdEngine⮕main
|
|
508
480
|
{
|
|
509
481
|
/* 📌 position */
|
|
@@ -515,7 +487,35 @@
|
|
|
515
487
|
/* 🎨 style */
|
|
516
488
|
overflow: hidden;
|
|
517
489
|
border-radius: 20px 20px 0px 0px;
|
|
518
|
-
background-color: #
|
|
490
|
+
background-color: var(--colors-background-bg-secondary, #F5F6F7FF);
|
|
491
|
+
|
|
492
|
+
/* Shadows/shadow-xl */
|
|
493
|
+
box-shadow: 0 20px 24px -4px var(--colors-effects-shadows-shadow-xl_01, rgba(255, 255, 255, 0.00)), 0 8px 8px -4px var(--colors-effects-shadows-shadow-xl_02, rgba(255, 255, 255, 0.00)), 0 3px 3px -1.5px var(--colors-effects-shadows-shadow-xl_03, rgba(255, 255, 255, 0.00));
|
|
494
|
+
|
|
495
|
+
*, *::before, *::after
|
|
496
|
+
{
|
|
497
|
+
box-sizing: border-box;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
p
|
|
501
|
+
{
|
|
502
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
503
|
+
margin: 0;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
a
|
|
507
|
+
{
|
|
508
|
+
text-decoration: none;
|
|
509
|
+
color: inherit;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
button
|
|
513
|
+
{
|
|
514
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
515
|
+
border: none;
|
|
516
|
+
outline: none;
|
|
517
|
+
cursor: pointer;
|
|
518
|
+
}
|
|
519
519
|
|
|
520
520
|
@mixin banner
|
|
521
521
|
{
|
|
@@ -535,6 +535,22 @@
|
|
|
535
535
|
margin: 0;
|
|
536
536
|
}
|
|
537
537
|
|
|
538
|
+
.ad-banner-wrapper
|
|
539
|
+
{
|
|
540
|
+
position: relative;
|
|
541
|
+
height: 280px;
|
|
542
|
+
width: auto;
|
|
543
|
+
margin: 20px 19.5px 0 19.5px;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.ad-close-btn
|
|
547
|
+
{
|
|
548
|
+
background: none;
|
|
549
|
+
border: none;
|
|
550
|
+
padding: 0;
|
|
551
|
+
cursor: pointer;
|
|
552
|
+
}
|
|
553
|
+
|
|
538
554
|
img
|
|
539
555
|
{
|
|
540
556
|
&.close-btn
|
|
@@ -549,19 +565,16 @@
|
|
|
549
565
|
&#banner
|
|
550
566
|
{
|
|
551
567
|
@include banner;
|
|
552
|
-
/* 🎨 style */
|
|
553
568
|
}
|
|
554
569
|
}
|
|
555
570
|
|
|
556
571
|
iframe
|
|
557
572
|
{
|
|
558
|
-
/* 🎨 style */
|
|
559
573
|
@include banner;
|
|
560
574
|
}
|
|
561
575
|
|
|
562
576
|
video
|
|
563
577
|
{
|
|
564
|
-
/* 🎨 style */
|
|
565
578
|
@include banner;
|
|
566
579
|
}
|
|
567
580
|
|
|
@@ -570,25 +583,51 @@
|
|
|
570
583
|
/* 🎨 style */
|
|
571
584
|
padding: 20px 12.5px 60px 12.5px;
|
|
572
585
|
|
|
573
|
-
|
|
586
|
+
.ad-title
|
|
574
587
|
{
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
588
|
+
font-size: 18px;
|
|
589
|
+
font-weight: 700;
|
|
590
|
+
margin: 0 0 20px 0;
|
|
591
|
+
text-align: center;
|
|
592
|
+
color: var(--colors-text-text-primary-900, #1F2328);
|
|
580
593
|
}
|
|
581
594
|
|
|
582
|
-
|
|
595
|
+
.ad-cta-link
|
|
596
|
+
{
|
|
597
|
+
display: flex;
|
|
598
|
+
justify-content: center;
|
|
599
|
+
text-decoration: none;
|
|
600
|
+
color: inherit;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.ad-cta-btn
|
|
583
604
|
{
|
|
584
605
|
/* 🎨 style */
|
|
585
606
|
border-radius: 8px;
|
|
586
607
|
max-height: 48px;
|
|
587
608
|
min-height: 48px;
|
|
588
609
|
width: 100%;
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
610
|
+
text-align: center;
|
|
611
|
+
font-style: normal;
|
|
612
|
+
font-weight: 500;
|
|
613
|
+
padding: 9px 20px;
|
|
614
|
+
color: var(--colors-foreground-fg-primary-900, #161A28);
|
|
615
|
+
background: var(--colors-background-bg-brand-solid, #CFE61A);
|
|
616
|
+
border: 2px solid transparent;
|
|
617
|
+
border-image: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.00) 100%) 1;
|
|
618
|
+
|
|
619
|
+
&:hover {
|
|
620
|
+
background: var(--colors-background-bg-brand-solid_hover, #B3C912);
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
.ad-cta-text
|
|
626
|
+
{
|
|
627
|
+
font-size: 16px;
|
|
628
|
+
font-weight: 500;
|
|
629
|
+
color: var(--colors-foreground-fg-primary-900, #1F2328);
|
|
630
|
+
text-transform: uppercase;
|
|
592
631
|
}
|
|
593
632
|
}
|
|
594
633
|
|
|
@@ -597,15 +636,9 @@
|
|
|
597
636
|
span.custom-betarena-advert-x1
|
|
598
637
|
{
|
|
599
638
|
/* 🎨 style */
|
|
600
|
-
color: var(--
|
|
639
|
+
color: var(--colors-text-text-primary_on-brand, #E4FF30) !important;
|
|
601
640
|
}
|
|
602
641
|
}
|
|
603
642
|
}
|
|
604
643
|
|
|
605
|
-
/*
|
|
606
|
-
╭──────────────────────────────────────────────────────────────────────────────╮
|
|
607
|
-
│ 🌒 DARK-THEME │
|
|
608
|
-
╰──────────────────────────────────────────────────────────────────────────────╯
|
|
609
|
-
*/
|
|
610
|
-
|
|
611
644
|
</style>
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
<button
|
|
167
167
|
class=
|
|
168
168
|
"
|
|
169
|
-
btn
|
|
169
|
+
ad-debug-btn
|
|
170
170
|
"
|
|
171
171
|
on:click=
|
|
172
172
|
{
|
|
@@ -246,6 +246,16 @@
|
|
|
246
246
|
font-weight: bold;
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
+
|
|
250
|
+
.ad-debug-btn
|
|
251
|
+
{
|
|
252
|
+
padding: 10px 17px;
|
|
253
|
+
border-radius: 12px;
|
|
254
|
+
background-color: #e6e6e6;
|
|
255
|
+
cursor: pointer;
|
|
256
|
+
border: none;
|
|
257
|
+
outline: none;
|
|
258
|
+
}
|
|
249
259
|
}
|
|
250
260
|
}
|
|
251
261
|
|
package/src/lib/store/session.ts
CHANGED
|
@@ -30,14 +30,15 @@ const
|
|
|
30
30
|
*/
|
|
31
31
|
storeObject: IAdEngineSessionStore
|
|
32
32
|
= {
|
|
33
|
-
isDarkTheme: false,
|
|
34
33
|
data:
|
|
35
34
|
{
|
|
36
35
|
translation:
|
|
37
36
|
{
|
|
38
37
|
language: 'en',
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
translation: {
|
|
39
|
+
advertisement: 'ADVERTISEMENT',
|
|
40
|
+
scroll: 'SCROLL TO CONTINUE',
|
|
41
|
+
},
|
|
41
42
|
},
|
|
42
43
|
}
|
|
43
44
|
}
|
|
@@ -114,13 +115,10 @@ function createLocalStore
|
|
|
114
115
|
/**
|
|
115
116
|
* @description
|
|
116
117
|
*/
|
|
117
|
-
// eslint-disable-next-line no-unused-vars
|
|
118
118
|
dataPoint = iterator[1]
|
|
119
119
|
;
|
|
120
120
|
|
|
121
|
-
if (dataTarget == '
|
|
122
|
-
storeObject.isDarkTheme = !storeObject.isDarkTheme;
|
|
123
|
-
else if (dataTarget == 'setTranslation')
|
|
121
|
+
if (dataTarget == 'setTranslation')
|
|
124
122
|
storeObject.data.translation = dataPoint;
|
|
125
123
|
;
|
|
126
124
|
}
|
|
@@ -8,15 +8,6 @@ import type { IAdsServiceTranslations } from "@betarena/scores-lib/types/ad-engi
|
|
|
8
8
|
*/
|
|
9
9
|
export interface IAdEngineSessionStore
|
|
10
10
|
{
|
|
11
|
-
/**
|
|
12
|
-
* @description
|
|
13
|
-
* 📝 Wether theme is dark
|
|
14
|
-
* @example
|
|
15
|
-
* :: false
|
|
16
|
-
* @default
|
|
17
|
-
* :: false
|
|
18
|
-
*/
|
|
19
|
-
isDarkTheme: boolean;
|
|
20
11
|
/**
|
|
21
12
|
* @description
|
|
22
13
|
* 📝 store data proerty (to be updated)
|
|
@@ -36,6 +27,5 @@ export interface IAdEngineSessionStore
|
|
|
36
27
|
* 📝 store data proerty (to be updated)
|
|
37
28
|
*/
|
|
38
29
|
type IAdEngineSessionDataProp =
|
|
39
|
-
| 'darkTheme'
|
|
40
30
|
| 'setTranslation';
|
|
41
31
|
;
|