@surfside/ads-core-web 0.1.21 → 0.1.23
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/README.md +15 -15
- package/lib/cjs/BuildInfo.js +1 -1
- package/lib/cjs/BuildInfo.js.map +1 -1
- package/lib/cjs/Init.js +92 -0
- package/lib/cjs/Init.js.map +1 -0
- package/lib/cjs/helpers/WebTelemetryCollector.js +56 -0
- package/lib/cjs/helpers/WebTelemetryCollector.js.map +1 -0
- package/lib/cjs/rendering/Banner.js +28 -28
- package/lib/cjs/rendering/Carousel.js +120 -120
- package/lib/cjs/rendering/ProductCard.js +19 -19
- package/lib/cjs/rendering/Video.js +121 -121
- package/lib/cjs/rendering/Watermark.js +32 -32
- package/lib/esm/BuildInfo.js +1 -1
- package/lib/esm/BuildInfo.js.map +1 -1
- package/lib/esm/Init.js +85 -0
- package/lib/esm/Init.js.map +1 -0
- package/lib/esm/helpers/WebTelemetryCollector.js +52 -0
- package/lib/esm/helpers/WebTelemetryCollector.js.map +1 -0
- package/lib/esm/rendering/Banner.js +28 -28
- package/lib/esm/rendering/Carousel.js +120 -120
- package/lib/esm/rendering/ProductCard.js +19 -19
- package/lib/esm/rendering/Video.js +121 -121
- package/lib/esm/rendering/Watermark.js +32 -32
- package/lib/types/Init.d.ts +24 -0
- package/lib/types/helpers/WebTelemetryCollector.d.ts +24 -0
- package/package.json +41 -41
|
@@ -279,126 +279,126 @@ export class EmptyFirstPageError extends Error {
|
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
;
|
|
282
|
-
const template = `<div class="carousel-wrapper">
|
|
283
|
-
<div class="sponsored-carousel"></div>
|
|
284
|
-
<div class="surf-carousel">
|
|
285
|
-
<div class="items"></div>
|
|
286
|
-
<div class="arrows">
|
|
287
|
-
<div class="arrow left"></div>
|
|
288
|
-
<div class="arrow right"></div>
|
|
289
|
-
</div>
|
|
290
|
-
</div>
|
|
282
|
+
const template = `<div class="carousel-wrapper">
|
|
283
|
+
<div class="sponsored-carousel"></div>
|
|
284
|
+
<div class="surf-carousel">
|
|
285
|
+
<div class="items"></div>
|
|
286
|
+
<div class="arrows">
|
|
287
|
+
<div class="arrow left"></div>
|
|
288
|
+
<div class="arrow right"></div>
|
|
289
|
+
</div>
|
|
290
|
+
</div>
|
|
291
291
|
</div>`;
|
|
292
|
-
const style = `
|
|
293
|
-
.surf-carousel {
|
|
294
|
-
display: flex;
|
|
295
|
-
position: relative;
|
|
296
|
-
flex-grow: 1;
|
|
297
|
-
|
|
298
|
-
.sponsored-carousel {
|
|
299
|
-
font-family: 'Helvetica', Verdana, Geneva, Tahoma, sans-serif;
|
|
300
|
-
margin: 10px 0;
|
|
301
|
-
font-size: 24px;
|
|
302
|
-
|
|
303
|
-
&::before {
|
|
304
|
-
content: 'For you';
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
&.sponsoredByOne::before {
|
|
308
|
-
content: 'Sponsored by ';
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
&.recommended::before {
|
|
312
|
-
content: 'Recommended';
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
&.sponsoredByMany::before {
|
|
316
|
-
content: 'Sponsored';
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
.carousel-wrapper {
|
|
321
|
-
width: 100%;
|
|
322
|
-
overflow-x: clip;
|
|
323
|
-
position: relative;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
.items {
|
|
327
|
-
z-index: 1;
|
|
328
|
-
display: flex;
|
|
329
|
-
flex-direction: row;
|
|
330
|
-
flex-grow: 1;
|
|
331
|
-
flex-wrap: nowrap;
|
|
332
|
-
align-items: stretch;
|
|
333
|
-
padding: 0 37px;
|
|
334
|
-
box-sizing: border-box;
|
|
335
|
-
transition: transform 0.4s ease-out;
|
|
336
|
-
width: 100%;
|
|
337
|
-
|
|
338
|
-
.surf-product-card {
|
|
339
|
-
flex: 1;
|
|
340
|
-
display: flex;
|
|
341
|
-
padding: 5px;
|
|
342
|
-
box-sizing: border-box;
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
.arrows {
|
|
350
|
-
|
|
351
|
-
.arrow {
|
|
352
|
-
z-index: 2;
|
|
353
|
-
position: absolute;
|
|
354
|
-
top: 50%;
|
|
355
|
-
transform: translateY(-50%);
|
|
356
|
-
width: 40px;
|
|
357
|
-
height: 40px;
|
|
358
|
-
display: flex;
|
|
359
|
-
background-color: rgba(0, 0, 0, 0.5);
|
|
360
|
-
margin: 0 1rem;
|
|
361
|
-
justify-content: center;
|
|
362
|
-
align-items: center;
|
|
363
|
-
border-radius: 50%;
|
|
364
|
-
cursor: pointer;
|
|
365
|
-
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2),
|
|
366
|
-
0 2px 8px 0 rgba(0, 0, 0, 0.2);
|
|
367
|
-
|
|
368
|
-
&:hover {
|
|
369
|
-
background-color: rgba(0, 0, 0, 0.6);
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
&.disabled {
|
|
373
|
-
cursor: not-allowed;
|
|
374
|
-
filter: grayscale(100%);
|
|
375
|
-
opacity: 0.2;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
&.left {
|
|
379
|
-
left: -10px;
|
|
380
|
-
|
|
381
|
-
&:before {
|
|
382
|
-
content: "";
|
|
383
|
-
background: url('//cdn.surfside.io/icons/left-arrow.svg')
|
|
384
|
-
no-repeat center;
|
|
385
|
-
width: 40px;
|
|
386
|
-
height: 40px;
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
&.right {
|
|
391
|
-
right: 0;
|
|
392
|
-
|
|
393
|
-
&:before {
|
|
394
|
-
content: "";
|
|
395
|
-
background: url('//cdn.surfside.io/icons/right-arrow.svg')
|
|
396
|
-
no-repeat center;
|
|
397
|
-
width: 40px;
|
|
398
|
-
height: 40px;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
}
|
|
402
|
-
}
|
|
292
|
+
const style = `
|
|
293
|
+
.surf-carousel {
|
|
294
|
+
display: flex;
|
|
295
|
+
position: relative;
|
|
296
|
+
flex-grow: 1;
|
|
297
|
+
|
|
298
|
+
.sponsored-carousel {
|
|
299
|
+
font-family: 'Helvetica', Verdana, Geneva, Tahoma, sans-serif;
|
|
300
|
+
margin: 10px 0;
|
|
301
|
+
font-size: 24px;
|
|
302
|
+
|
|
303
|
+
&::before {
|
|
304
|
+
content: 'For you';
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
&.sponsoredByOne::before {
|
|
308
|
+
content: 'Sponsored by ';
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
&.recommended::before {
|
|
312
|
+
content: 'Recommended';
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
&.sponsoredByMany::before {
|
|
316
|
+
content: 'Sponsored';
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.carousel-wrapper {
|
|
321
|
+
width: 100%;
|
|
322
|
+
overflow-x: clip;
|
|
323
|
+
position: relative;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.items {
|
|
327
|
+
z-index: 1;
|
|
328
|
+
display: flex;
|
|
329
|
+
flex-direction: row;
|
|
330
|
+
flex-grow: 1;
|
|
331
|
+
flex-wrap: nowrap;
|
|
332
|
+
align-items: stretch;
|
|
333
|
+
padding: 0 37px;
|
|
334
|
+
box-sizing: border-box;
|
|
335
|
+
transition: transform 0.4s ease-out;
|
|
336
|
+
width: 100%;
|
|
337
|
+
|
|
338
|
+
.surf-product-card {
|
|
339
|
+
flex: 1;
|
|
340
|
+
display: flex;
|
|
341
|
+
padding: 5px;
|
|
342
|
+
box-sizing: border-box;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.arrows {
|
|
350
|
+
|
|
351
|
+
.arrow {
|
|
352
|
+
z-index: 2;
|
|
353
|
+
position: absolute;
|
|
354
|
+
top: 50%;
|
|
355
|
+
transform: translateY(-50%);
|
|
356
|
+
width: 40px;
|
|
357
|
+
height: 40px;
|
|
358
|
+
display: flex;
|
|
359
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
360
|
+
margin: 0 1rem;
|
|
361
|
+
justify-content: center;
|
|
362
|
+
align-items: center;
|
|
363
|
+
border-radius: 50%;
|
|
364
|
+
cursor: pointer;
|
|
365
|
+
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2),
|
|
366
|
+
0 2px 8px 0 rgba(0, 0, 0, 0.2);
|
|
367
|
+
|
|
368
|
+
&:hover {
|
|
369
|
+
background-color: rgba(0, 0, 0, 0.6);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
&.disabled {
|
|
373
|
+
cursor: not-allowed;
|
|
374
|
+
filter: grayscale(100%);
|
|
375
|
+
opacity: 0.2;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
&.left {
|
|
379
|
+
left: -10px;
|
|
380
|
+
|
|
381
|
+
&:before {
|
|
382
|
+
content: "";
|
|
383
|
+
background: url('//cdn.surfside.io/icons/left-arrow.svg')
|
|
384
|
+
no-repeat center;
|
|
385
|
+
width: 40px;
|
|
386
|
+
height: 40px;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
&.right {
|
|
391
|
+
right: 0;
|
|
392
|
+
|
|
393
|
+
&:before {
|
|
394
|
+
content: "";
|
|
395
|
+
background: url('//cdn.surfside.io/icons/right-arrow.svg')
|
|
396
|
+
no-repeat center;
|
|
397
|
+
width: 40px;
|
|
398
|
+
height: 40px;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
403
|
}`;
|
|
404
404
|
//# sourceMappingURL=Carousel.js.map
|
|
@@ -105,24 +105,24 @@ export class MissingTrackersError extends Error {
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
;
|
|
108
|
-
const style = `.surf-product-card {
|
|
109
|
-
width: 100%;
|
|
110
|
-
|
|
111
|
-
&.sponsored {
|
|
112
|
-
position: relative;
|
|
113
|
-
|
|
114
|
-
&::after {
|
|
115
|
-
content: 'Sponsored';
|
|
116
|
-
position: absolute;
|
|
117
|
-
font-family: Verdana, Helvetica, 'sans-serif';
|
|
118
|
-
font-weight: 100;
|
|
119
|
-
color: #e0e0e0;
|
|
120
|
-
font-size: 12px;
|
|
121
|
-
box-sizing: border-box;
|
|
122
|
-
bottom: 0px;
|
|
123
|
-
width: 100%;
|
|
124
|
-
text-align: center;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
108
|
+
const style = `.surf-product-card {
|
|
109
|
+
width: 100%;
|
|
110
|
+
|
|
111
|
+
&.sponsored {
|
|
112
|
+
position: relative;
|
|
113
|
+
|
|
114
|
+
&::after {
|
|
115
|
+
content: 'Sponsored';
|
|
116
|
+
position: absolute;
|
|
117
|
+
font-family: Verdana, Helvetica, 'sans-serif';
|
|
118
|
+
font-weight: 100;
|
|
119
|
+
color: #e0e0e0;
|
|
120
|
+
font-size: 12px;
|
|
121
|
+
box-sizing: border-box;
|
|
122
|
+
bottom: 0px;
|
|
123
|
+
width: 100%;
|
|
124
|
+
text-align: center;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
127
|
}`;
|
|
128
128
|
//# sourceMappingURL=ProductCard.js.map
|
|
@@ -169,127 +169,127 @@ const toggleMute = (logger, videoElement, e) => {
|
|
|
169
169
|
element.classList.remove('muted');
|
|
170
170
|
}
|
|
171
171
|
};
|
|
172
|
-
const template = `<div>
|
|
173
|
-
<video id="surf-video-container" autoplay muted></video>
|
|
174
|
-
|
|
175
|
-
<div class="timer">
|
|
176
|
-
<svg
|
|
177
|
-
width="36"
|
|
178
|
-
height="36"
|
|
179
|
-
viewBox="-2 2 36 36"
|
|
180
|
-
>
|
|
181
|
-
<circle
|
|
182
|
-
cx="16"
|
|
183
|
-
cy="16"
|
|
184
|
-
r="15"
|
|
185
|
-
stroke="#7b4af4"
|
|
186
|
-
stroke-width="4"
|
|
187
|
-
fill="none"
|
|
188
|
-
class="timer-circle"
|
|
189
|
-
/>
|
|
190
|
-
</svg>
|
|
191
|
-
<div class="timer-value"></div>
|
|
192
|
-
</div>
|
|
193
|
-
|
|
194
|
-
<div class="watermark"></div>
|
|
195
|
-
<div class="mute-button muted"></div>
|
|
172
|
+
const template = `<div>
|
|
173
|
+
<video id="surf-video-container" autoplay muted></video>
|
|
174
|
+
|
|
175
|
+
<div class="timer">
|
|
176
|
+
<svg
|
|
177
|
+
width="36"
|
|
178
|
+
height="36"
|
|
179
|
+
viewBox="-2 2 36 36"
|
|
180
|
+
>
|
|
181
|
+
<circle
|
|
182
|
+
cx="16"
|
|
183
|
+
cy="16"
|
|
184
|
+
r="15"
|
|
185
|
+
stroke="#7b4af4"
|
|
186
|
+
stroke-width="4"
|
|
187
|
+
fill="none"
|
|
188
|
+
class="timer-circle"
|
|
189
|
+
/>
|
|
190
|
+
</svg>
|
|
191
|
+
<div class="timer-value"></div>
|
|
192
|
+
</div>
|
|
193
|
+
|
|
194
|
+
<div class="watermark"></div>
|
|
195
|
+
<div class="mute-button muted"></div>
|
|
196
196
|
</div>`;
|
|
197
|
-
const style = `@keyframes grow-arc {
|
|
198
|
-
0% {
|
|
199
|
-
stroke-dasharray: 0 94; /* 0% of the circumference */
|
|
200
|
-
stroke-dashoffset: 0;
|
|
201
|
-
}
|
|
202
|
-
50% {
|
|
203
|
-
stroke-dasharray: 47 94; /* 90 degrees of the circle */
|
|
204
|
-
stroke-dashoffset: 0;
|
|
205
|
-
}
|
|
206
|
-
100% {
|
|
207
|
-
stroke-dasharray: 94 94; /* Full circle */
|
|
208
|
-
stroke-dashoffset: 0;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
.surfside-video {
|
|
214
|
-
--icon-muted: url('//cdn.surfside.io/icons/muted.svg');
|
|
215
|
-
--icon-unmuted: url('//cdn.surfside.io/icons/unmuted.svg');
|
|
216
|
-
|
|
217
|
-
position: relative;
|
|
218
|
-
overflow: hidden;
|
|
219
|
-
|
|
220
|
-
video {
|
|
221
|
-
width: 100%;
|
|
222
|
-
height: auto;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
.timer {
|
|
226
|
-
position: absolute;
|
|
227
|
-
left: 5px;
|
|
228
|
-
top: 5px;
|
|
229
|
-
width: 32px;
|
|
230
|
-
height: 32px;
|
|
231
|
-
|
|
232
|
-
.timer-value {
|
|
233
|
-
position: absolute;
|
|
234
|
-
top: 0px;
|
|
235
|
-
left: 0;
|
|
236
|
-
width: 36px;
|
|
237
|
-
height: 36px;
|
|
238
|
-
|
|
239
|
-
color: white;
|
|
240
|
-
|
|
241
|
-
font-family: Poppins, Arial;
|
|
242
|
-
text-align: center;
|
|
243
|
-
font-size: 12px;
|
|
244
|
-
line-height: 36px;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.timer-circle {
|
|
248
|
-
fill: none;
|
|
249
|
-
stroke-width: 4;
|
|
250
|
-
animation-name: grow-arc;
|
|
251
|
-
animation-iteration-count: 1;
|
|
252
|
-
animation-timing-function: linear;
|
|
253
|
-
animation-fill-mode: forwards;
|
|
254
|
-
transform: rotate(-90deg);
|
|
255
|
-
transform-origin: 50% 50%;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
.mute-button {
|
|
261
|
-
position: absolute;
|
|
262
|
-
width: 24px;
|
|
263
|
-
height: 24px;
|
|
264
|
-
right: 5px;
|
|
265
|
-
bottom: 5px;
|
|
266
|
-
cursor: pointer;
|
|
267
|
-
transition: transform 0.2s;
|
|
268
|
-
filter: drop-shadow(0 0 2px white) drop-shadow(0 0 4px white);
|
|
269
|
-
|
|
270
|
-
&:hover {
|
|
271
|
-
transform: scale(1.3);
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
&:active {
|
|
275
|
-
transform: scale(0.8);
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
&.muted {
|
|
279
|
-
background-image: var(--icon-muted);
|
|
280
|
-
|
|
281
|
-
&:hover {
|
|
282
|
-
background-image: var(--icon-unmuted);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
&.unmuted {
|
|
287
|
-
background-image: var(--icon-unmuted);
|
|
288
|
-
|
|
289
|
-
&:hover {
|
|
290
|
-
background-image: var(--icon-muted);
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
}
|
|
197
|
+
const style = `@keyframes grow-arc {
|
|
198
|
+
0% {
|
|
199
|
+
stroke-dasharray: 0 94; /* 0% of the circumference */
|
|
200
|
+
stroke-dashoffset: 0;
|
|
201
|
+
}
|
|
202
|
+
50% {
|
|
203
|
+
stroke-dasharray: 47 94; /* 90 degrees of the circle */
|
|
204
|
+
stroke-dashoffset: 0;
|
|
205
|
+
}
|
|
206
|
+
100% {
|
|
207
|
+
stroke-dasharray: 94 94; /* Full circle */
|
|
208
|
+
stroke-dashoffset: 0;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
.surfside-video {
|
|
214
|
+
--icon-muted: url('//cdn.surfside.io/icons/muted.svg');
|
|
215
|
+
--icon-unmuted: url('//cdn.surfside.io/icons/unmuted.svg');
|
|
216
|
+
|
|
217
|
+
position: relative;
|
|
218
|
+
overflow: hidden;
|
|
219
|
+
|
|
220
|
+
video {
|
|
221
|
+
width: 100%;
|
|
222
|
+
height: auto;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.timer {
|
|
226
|
+
position: absolute;
|
|
227
|
+
left: 5px;
|
|
228
|
+
top: 5px;
|
|
229
|
+
width: 32px;
|
|
230
|
+
height: 32px;
|
|
231
|
+
|
|
232
|
+
.timer-value {
|
|
233
|
+
position: absolute;
|
|
234
|
+
top: 0px;
|
|
235
|
+
left: 0;
|
|
236
|
+
width: 36px;
|
|
237
|
+
height: 36px;
|
|
238
|
+
|
|
239
|
+
color: white;
|
|
240
|
+
|
|
241
|
+
font-family: Poppins, Arial;
|
|
242
|
+
text-align: center;
|
|
243
|
+
font-size: 12px;
|
|
244
|
+
line-height: 36px;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.timer-circle {
|
|
248
|
+
fill: none;
|
|
249
|
+
stroke-width: 4;
|
|
250
|
+
animation-name: grow-arc;
|
|
251
|
+
animation-iteration-count: 1;
|
|
252
|
+
animation-timing-function: linear;
|
|
253
|
+
animation-fill-mode: forwards;
|
|
254
|
+
transform: rotate(-90deg);
|
|
255
|
+
transform-origin: 50% 50%;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.mute-button {
|
|
261
|
+
position: absolute;
|
|
262
|
+
width: 24px;
|
|
263
|
+
height: 24px;
|
|
264
|
+
right: 5px;
|
|
265
|
+
bottom: 5px;
|
|
266
|
+
cursor: pointer;
|
|
267
|
+
transition: transform 0.2s;
|
|
268
|
+
filter: drop-shadow(0 0 2px white) drop-shadow(0 0 4px white);
|
|
269
|
+
|
|
270
|
+
&:hover {
|
|
271
|
+
transform: scale(1.3);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
&:active {
|
|
275
|
+
transform: scale(0.8);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
&.muted {
|
|
279
|
+
background-image: var(--icon-muted);
|
|
280
|
+
|
|
281
|
+
&:hover {
|
|
282
|
+
background-image: var(--icon-unmuted);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
&.unmuted {
|
|
287
|
+
background-image: var(--icon-unmuted);
|
|
288
|
+
|
|
289
|
+
&:hover {
|
|
290
|
+
background-image: var(--icon-muted);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
294
|
}`;
|
|
295
295
|
//# sourceMappingURL=Video.js.map
|
|
@@ -18,38 +18,38 @@ export const RenderWatermark = (logger) => {
|
|
|
18
18
|
}
|
|
19
19
|
return Ok(wrapper);
|
|
20
20
|
};
|
|
21
|
-
const template = `<div class="watermark">
|
|
22
|
-
<a href="https://surfside.io/contact" target="_blank">
|
|
23
|
-
<div class="watermark-svg">
|
|
24
|
-
<img src="https://cdn.surfside.io/assets/surfside-logo.svg" alt="Surfside logo"/>
|
|
25
|
-
</div>
|
|
26
|
-
</a>
|
|
27
|
-
</div>
|
|
21
|
+
const template = `<div class="watermark">
|
|
22
|
+
<a href="https://surfside.io/contact" target="_blank">
|
|
23
|
+
<div class="watermark-svg">
|
|
24
|
+
<img src="https://cdn.surfside.io/assets/surfside-logo.svg" alt="Surfside logo"/>
|
|
25
|
+
</div>
|
|
26
|
+
</a>
|
|
27
|
+
</div>
|
|
28
28
|
`;
|
|
29
|
-
const style = `.watermark {
|
|
30
|
-
background: rgba(255, 255, 255, 0.7);
|
|
31
|
-
|
|
32
|
-
position: absolute;
|
|
33
|
-
right: -67px;
|
|
34
|
-
width: 85px;
|
|
35
|
-
/* transform: scale(0.8); */
|
|
36
|
-
transform-origin: bottom right;
|
|
37
|
-
bottom: 0;
|
|
38
|
-
|
|
39
|
-
padding: 3px 2px 0px 6px;
|
|
40
|
-
border-radius: 5px 0 0 5px !important;
|
|
41
|
-
transition: right 300ms ease-out;
|
|
42
|
-
|
|
43
|
-
&:hover {
|
|
44
|
-
right: 0
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.surfside-video .watermark {
|
|
49
|
-
top: 0;
|
|
50
|
-
height: auto;
|
|
51
|
-
bottom: initial;
|
|
52
|
-
overflow: hidden;
|
|
53
|
-
}
|
|
29
|
+
const style = `.watermark {
|
|
30
|
+
background: rgba(255, 255, 255, 0.7);
|
|
31
|
+
|
|
32
|
+
position: absolute;
|
|
33
|
+
right: -67px;
|
|
34
|
+
width: 85px;
|
|
35
|
+
/* transform: scale(0.8); */
|
|
36
|
+
transform-origin: bottom right;
|
|
37
|
+
bottom: 0;
|
|
38
|
+
|
|
39
|
+
padding: 3px 2px 0px 6px;
|
|
40
|
+
border-radius: 5px 0 0 5px !important;
|
|
41
|
+
transition: right 300ms ease-out;
|
|
42
|
+
|
|
43
|
+
&:hover {
|
|
44
|
+
right: 0
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.surfside-video .watermark {
|
|
49
|
+
top: 0;
|
|
50
|
+
height: auto;
|
|
51
|
+
bottom: initial;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
}
|
|
54
54
|
`;
|
|
55
55
|
//# sourceMappingURL=Watermark.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ILoadSurfAdsClientConfiguration, type ISurfAdsCoreConfiguration, type Result, type AsyncResult, type ISurfAdsClientDependencies, type ILogger, type ISurfAdsClientConfigurationOverrides } from '@surfside/ads-core-client';
|
|
2
|
+
import { type ISurfsideWebApi } from '.';
|
|
3
|
+
export interface ISurfAdsWebConfigurationOverrides extends ISurfAdsClientConfigurationOverrides {
|
|
4
|
+
}
|
|
5
|
+
export interface ISurfAdsWebConfiguration extends ISurfAdsCoreConfiguration {
|
|
6
|
+
overrides?: {
|
|
7
|
+
services?: Partial<ISurfAdsWebConfigurationOverrides>;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface ILoadSurfAdsWebConfiguration extends ILoadSurfAdsClientConfiguration {
|
|
11
|
+
overrides?: {
|
|
12
|
+
services?: Partial<ISurfAdsWebConfigurationOverrides>;
|
|
13
|
+
dependencies?: Partial<ISurfAdsWebDependencies>;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export interface ISurfAdsWebDependencies extends ISurfAdsClientDependencies {
|
|
17
|
+
}
|
|
18
|
+
export declare const CreateSurfAdsWeb: (config: ISurfAdsWebConfiguration) => Result<ISurfsideWebApi>;
|
|
19
|
+
export declare const LoadSurfAdsWebDependencies: (config: ILoadSurfAdsWebConfiguration) => AsyncResult<ISurfAdsWebDependencies>;
|
|
20
|
+
export declare const LoadSurfAdsWeb: (config: ILoadSurfAdsWebConfiguration) => AsyncResult<ISurfsideWebApi>;
|
|
21
|
+
export declare const LoadSurfAdsWebSimple: (accountId: string, siteId: string, channelId: string, locationId: string, userId?: string, logger?: ILogger, telemetry?: boolean, overrides?: {
|
|
22
|
+
services?: Partial<ISurfAdsWebConfigurationOverrides>;
|
|
23
|
+
dependencies?: Partial<ISurfAdsWebDependencies>;
|
|
24
|
+
}) => AsyncResult<ISurfsideWebApi>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ITelemetryCollector, type ITelemetryDevice, type ITelemetryEntry } from '@surfside/ads-core-client';
|
|
2
|
+
export interface IWebTelemetryCollectorOptions {
|
|
3
|
+
accountId: string;
|
|
4
|
+
siteId: string;
|
|
5
|
+
channelId: string;
|
|
6
|
+
locationId: string;
|
|
7
|
+
endpoint: string;
|
|
8
|
+
tags?: Record<string, string>;
|
|
9
|
+
batchIntervalMs?: number;
|
|
10
|
+
url?: string;
|
|
11
|
+
device: ITelemetryDevice | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare class WebTelemetryCollector extends ITelemetryCollector {
|
|
14
|
+
private readonly _endpoint;
|
|
15
|
+
private readonly _tags;
|
|
16
|
+
private readonly _batchIntervalMs;
|
|
17
|
+
private readonly _pageUrl;
|
|
18
|
+
private _queue;
|
|
19
|
+
private _flushTimer;
|
|
20
|
+
private _device;
|
|
21
|
+
constructor(options: IWebTelemetryCollectorOptions);
|
|
22
|
+
record(entry: ITelemetryEntry): void;
|
|
23
|
+
flush(): void;
|
|
24
|
+
}
|