@surfside/ads-core-mock 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/mock/Bidder.js +52 -52
- package/lib/cjs/mock/Configuration.js +251 -251
- package/lib/esm/BuildInfo.js +1 -1
- package/lib/esm/BuildInfo.js.map +1 -1
- package/lib/esm/mock/Bidder.js +52 -52
- package/lib/esm/mock/Configuration.js +251 -251
- package/package.json +36 -36
|
@@ -6,257 +6,257 @@ import { Ctx, Ok } from '@surfside/ads-core';
|
|
|
6
6
|
/**
|
|
7
7
|
* A mock configuration service that returns a hard-coded configuration. Enables geo and IP targeting by default.
|
|
8
8
|
*/
|
|
9
|
-
const productCardTemplate = (data) => `
|
|
10
|
-
<div class="mock-product-card">
|
|
11
|
-
<div class="card-shadow-area"></div>
|
|
12
|
-
<div class="card-pattern-area"></div>
|
|
13
|
-
<div class="main-card-area">
|
|
14
|
-
<div class="product-image" _mousemove="moveImage" _mouseleave="stopMove">
|
|
15
|
-
<img src="${data.product.image}" />
|
|
16
|
-
</div>
|
|
17
|
-
<div class="product-data">
|
|
18
|
-
<h1>
|
|
19
|
-
${data.product.name}
|
|
20
|
-
<div class="filter"></div>
|
|
21
|
-
</h1>
|
|
22
|
-
<div class="brand">
|
|
23
|
-
<div class="horizontal-rule"></div>
|
|
24
|
-
<span>by ${data.product.brandName}</span>
|
|
25
|
-
</div>
|
|
26
|
-
<p>${data.product.details}</p>
|
|
27
|
-
</div>
|
|
28
|
-
<a _click="click" target="_blank">
|
|
29
|
-
<div class="cta">
|
|
30
|
-
Add To Cart
|
|
31
|
-
</div>
|
|
32
|
-
</a>
|
|
33
|
-
</div>
|
|
9
|
+
const productCardTemplate = (data) => `
|
|
10
|
+
<div class="mock-product-card">
|
|
11
|
+
<div class="card-shadow-area"></div>
|
|
12
|
+
<div class="card-pattern-area"></div>
|
|
13
|
+
<div class="main-card-area">
|
|
14
|
+
<div class="product-image" _mousemove="moveImage" _mouseleave="stopMove">
|
|
15
|
+
<img src="${data.product.image}" />
|
|
16
|
+
</div>
|
|
17
|
+
<div class="product-data">
|
|
18
|
+
<h1>
|
|
19
|
+
${data.product.name}
|
|
20
|
+
<div class="filter"></div>
|
|
21
|
+
</h1>
|
|
22
|
+
<div class="brand">
|
|
23
|
+
<div class="horizontal-rule"></div>
|
|
24
|
+
<span>by ${data.product.brandName}</span>
|
|
25
|
+
</div>
|
|
26
|
+
<p>${data.product.details}</p>
|
|
27
|
+
</div>
|
|
28
|
+
<a _click="click" target="_blank">
|
|
29
|
+
<div class="cta">
|
|
30
|
+
Add To Cart
|
|
31
|
+
</div>
|
|
32
|
+
</a>
|
|
33
|
+
</div>
|
|
34
34
|
</div>`;
|
|
35
|
-
const productCardStylesheet = `
|
|
36
|
-
@keyframes scrollBackground {
|
|
37
|
-
from {
|
|
38
|
-
background-position: 0px 0px;
|
|
39
|
-
}
|
|
40
|
-
to {
|
|
41
|
-
background-position: 50px 50px;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.mock-product-card {
|
|
46
|
-
display: none;
|
|
47
|
-
display: flex;
|
|
48
|
-
flex-grow: 1;
|
|
49
|
-
flex-direction: column;
|
|
50
|
-
position: relative;
|
|
51
|
-
margin-right: 30px;
|
|
52
|
-
|
|
53
|
-
.product-image {
|
|
54
|
-
|
|
55
|
-
width: calc(100% - 20px);
|
|
56
|
-
margin: 10px;
|
|
57
|
-
transition: transform 0.3s;
|
|
58
|
-
z-index: 3;
|
|
59
|
-
|
|
60
|
-
&:hover {
|
|
61
|
-
transform: scale(1.25);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
img {
|
|
65
|
-
box-shadow: 4px 4px 1px -1px rgba(0, 0, 0, 0.2), 0px 0px 4px 0px rgba(0, 0, 0, 0.2);
|
|
66
|
-
transition: transform 0.1s;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.product-data {
|
|
71
|
-
display: flex;
|
|
72
|
-
flex-direction: column;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.main-card-area {
|
|
76
|
-
width: 100%;
|
|
77
|
-
height: 100%;
|
|
78
|
-
background-color: rgb(244, 244, 244);
|
|
79
|
-
transform: translate(-10px, -10px);
|
|
80
|
-
transition: transform 0.1s ease-in, box-shadow 0.1s ease-in;
|
|
81
|
-
box-shadow: 0px 0px 3px 2px rgba(0, 0, 0, 0.2);
|
|
82
|
-
border: 2px dotted rgba(0, 0, 0, 0.4);
|
|
83
|
-
display: flex;
|
|
84
|
-
flex-direction: column;
|
|
85
|
-
justify-content: space-between;
|
|
86
|
-
|
|
87
|
-
.product-image {
|
|
88
|
-
img {
|
|
89
|
-
width: 100%;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
h1 {
|
|
94
|
-
font-family: 'Trebuchet MS', Helvetica, sans-serif;
|
|
95
|
-
letter-spacing: 3px;
|
|
96
|
-
text-transform: uppercase;
|
|
97
|
-
padding: 0 5px;
|
|
98
|
-
position: relative;
|
|
99
|
-
font-size: 22px;
|
|
100
|
-
margin-left: 5px;
|
|
101
|
-
text-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
|
|
102
|
-
|
|
103
|
-
.filter {
|
|
104
|
-
position: absolute;
|
|
105
|
-
background: #baf7db;
|
|
106
|
-
mix-blend-mode: multiply;
|
|
107
|
-
width: calc(4ch + 10px);
|
|
108
|
-
height: 1.5em;
|
|
109
|
-
top: 0;
|
|
110
|
-
left: 0;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.brand {
|
|
115
|
-
font-family: 'Tahoma', Helvetica, sans-serif;
|
|
116
|
-
text-transform: uppercase;
|
|
117
|
-
color: rgba(0, 0, 0, 0.4);
|
|
118
|
-
font-size: 12px;
|
|
119
|
-
width: 100%;
|
|
120
|
-
display: flex;
|
|
121
|
-
justify-content: flex-end;
|
|
122
|
-
text-align: right;
|
|
123
|
-
letter-spacing: 2px;
|
|
124
|
-
box-sizing: border-box;
|
|
125
|
-
padding: 0 10px;
|
|
126
|
-
gap: 5px;
|
|
127
|
-
text-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
.horizontal-rule {
|
|
131
|
-
height: 2px;
|
|
132
|
-
background: #baf7db;
|
|
133
|
-
mix-blend-mode: multiply;
|
|
134
|
-
flex-grow: 1;
|
|
135
|
-
box-sizing: border-box;
|
|
136
|
-
padding: 0 5px;
|
|
137
|
-
transform: translateY(6px);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
span {
|
|
141
|
-
flex-shrink: 2;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
p {
|
|
146
|
-
font-family: 'Tahoma', Helvetica, sans-serif;
|
|
147
|
-
padding: 0 10px;
|
|
148
|
-
margin: 10px auto;
|
|
149
|
-
font-size: 14px;
|
|
150
|
-
line-height: 32px;
|
|
151
|
-
display: -webkit-box;
|
|
152
|
-
-webkit-line-clamp: 3;
|
|
153
|
-
-webkit-box-orient: vertical;
|
|
154
|
-
overflow: hidden;
|
|
155
|
-
text-overflow: ellipsis " [...]";
|
|
156
|
-
color: rgb(59, 48, 68);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
> a {
|
|
160
|
-
text-decoration: none;
|
|
161
|
-
letter-spacing: 3px;
|
|
162
|
-
color: rgb(59, 48, 68);
|
|
163
|
-
padding: 10px 10px;
|
|
164
|
-
}
|
|
165
|
-
.cta {
|
|
166
|
-
width: 100%;
|
|
167
|
-
background: #baf7db;
|
|
168
|
-
padding: 5px 10px;
|
|
169
|
-
display: flex;
|
|
170
|
-
justify-content: space-around;
|
|
171
|
-
box-sizing: border-box;
|
|
172
|
-
font-family: 'Trebuchet MS', Helvetica, sans-serif;
|
|
173
|
-
border: 2px dotted grey;
|
|
174
|
-
transition: background 0.1s ease-in, color 0.1s ease-in;
|
|
175
|
-
font-weight: 100;
|
|
176
|
-
|
|
177
|
-
&:hover {
|
|
178
|
-
background: #c0abff;
|
|
179
|
-
color: #ecf0f1;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.card-shadow-area {
|
|
185
|
-
position: absolute;
|
|
186
|
-
left: 0;
|
|
187
|
-
top: 0;
|
|
188
|
-
width: 100%;
|
|
189
|
-
height: 100%;
|
|
190
|
-
background: #c0abff;
|
|
191
|
-
border: 2px dashed rgba(0, 0, 0, 0.8);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.card-pattern-area {
|
|
195
|
-
position: absolute;
|
|
196
|
-
left: 0;
|
|
197
|
-
top: 0;
|
|
198
|
-
width: 100%;
|
|
199
|
-
height: 100%;
|
|
200
|
-
|
|
201
|
-
background-color: #c0abff;
|
|
202
|
-
background-image: linear-gradient(#f4f4f4 2px, transparent 2px),
|
|
203
|
-
linear-gradient(90deg, #f4f4f4 2px, transparent 2px),
|
|
204
|
-
linear-gradient(#f4f4f4 1px, transparent 1px),
|
|
205
|
-
linear-gradient(90deg, #f4f4f4 1px, #c0abff 1px);
|
|
206
|
-
background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px;
|
|
207
|
-
background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px;
|
|
208
|
-
|
|
209
|
-
opacity: 0;
|
|
210
|
-
transition: opacity 0.4s ease-in;
|
|
211
|
-
animation: scrollBackground 2s linear infinite;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
&:hover {
|
|
215
|
-
.main-card-area {
|
|
216
|
-
transform: translate(-20px, -20px);
|
|
217
|
-
box-shadow: 10px 10px 7px 2px rgba(0, 0, 0, 0.2);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.card-pattern-area {
|
|
221
|
-
opacity: 0.7;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.surf-product-card.sponsored {
|
|
227
|
-
position: relative;
|
|
228
|
-
|
|
229
|
-
&::after {
|
|
230
|
-
left: -18px;
|
|
231
|
-
letter-spacing: 2px;
|
|
232
|
-
text-transform: uppercase;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
35
|
+
const productCardStylesheet = `
|
|
36
|
+
@keyframes scrollBackground {
|
|
37
|
+
from {
|
|
38
|
+
background-position: 0px 0px;
|
|
39
|
+
}
|
|
40
|
+
to {
|
|
41
|
+
background-position: 50px 50px;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.mock-product-card {
|
|
46
|
+
display: none;
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-grow: 1;
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
position: relative;
|
|
51
|
+
margin-right: 30px;
|
|
52
|
+
|
|
53
|
+
.product-image {
|
|
54
|
+
|
|
55
|
+
width: calc(100% - 20px);
|
|
56
|
+
margin: 10px;
|
|
57
|
+
transition: transform 0.3s;
|
|
58
|
+
z-index: 3;
|
|
59
|
+
|
|
60
|
+
&:hover {
|
|
61
|
+
transform: scale(1.25);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
img {
|
|
65
|
+
box-shadow: 4px 4px 1px -1px rgba(0, 0, 0, 0.2), 0px 0px 4px 0px rgba(0, 0, 0, 0.2);
|
|
66
|
+
transition: transform 0.1s;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.product-data {
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.main-card-area {
|
|
76
|
+
width: 100%;
|
|
77
|
+
height: 100%;
|
|
78
|
+
background-color: rgb(244, 244, 244);
|
|
79
|
+
transform: translate(-10px, -10px);
|
|
80
|
+
transition: transform 0.1s ease-in, box-shadow 0.1s ease-in;
|
|
81
|
+
box-shadow: 0px 0px 3px 2px rgba(0, 0, 0, 0.2);
|
|
82
|
+
border: 2px dotted rgba(0, 0, 0, 0.4);
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
justify-content: space-between;
|
|
86
|
+
|
|
87
|
+
.product-image {
|
|
88
|
+
img {
|
|
89
|
+
width: 100%;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
h1 {
|
|
94
|
+
font-family: 'Trebuchet MS', Helvetica, sans-serif;
|
|
95
|
+
letter-spacing: 3px;
|
|
96
|
+
text-transform: uppercase;
|
|
97
|
+
padding: 0 5px;
|
|
98
|
+
position: relative;
|
|
99
|
+
font-size: 22px;
|
|
100
|
+
margin-left: 5px;
|
|
101
|
+
text-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
|
|
102
|
+
|
|
103
|
+
.filter {
|
|
104
|
+
position: absolute;
|
|
105
|
+
background: #baf7db;
|
|
106
|
+
mix-blend-mode: multiply;
|
|
107
|
+
width: calc(4ch + 10px);
|
|
108
|
+
height: 1.5em;
|
|
109
|
+
top: 0;
|
|
110
|
+
left: 0;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.brand {
|
|
115
|
+
font-family: 'Tahoma', Helvetica, sans-serif;
|
|
116
|
+
text-transform: uppercase;
|
|
117
|
+
color: rgba(0, 0, 0, 0.4);
|
|
118
|
+
font-size: 12px;
|
|
119
|
+
width: 100%;
|
|
120
|
+
display: flex;
|
|
121
|
+
justify-content: flex-end;
|
|
122
|
+
text-align: right;
|
|
123
|
+
letter-spacing: 2px;
|
|
124
|
+
box-sizing: border-box;
|
|
125
|
+
padding: 0 10px;
|
|
126
|
+
gap: 5px;
|
|
127
|
+
text-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
.horizontal-rule {
|
|
131
|
+
height: 2px;
|
|
132
|
+
background: #baf7db;
|
|
133
|
+
mix-blend-mode: multiply;
|
|
134
|
+
flex-grow: 1;
|
|
135
|
+
box-sizing: border-box;
|
|
136
|
+
padding: 0 5px;
|
|
137
|
+
transform: translateY(6px);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
span {
|
|
141
|
+
flex-shrink: 2;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
p {
|
|
146
|
+
font-family: 'Tahoma', Helvetica, sans-serif;
|
|
147
|
+
padding: 0 10px;
|
|
148
|
+
margin: 10px auto;
|
|
149
|
+
font-size: 14px;
|
|
150
|
+
line-height: 32px;
|
|
151
|
+
display: -webkit-box;
|
|
152
|
+
-webkit-line-clamp: 3;
|
|
153
|
+
-webkit-box-orient: vertical;
|
|
154
|
+
overflow: hidden;
|
|
155
|
+
text-overflow: ellipsis " [...]";
|
|
156
|
+
color: rgb(59, 48, 68);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
> a {
|
|
160
|
+
text-decoration: none;
|
|
161
|
+
letter-spacing: 3px;
|
|
162
|
+
color: rgb(59, 48, 68);
|
|
163
|
+
padding: 10px 10px;
|
|
164
|
+
}
|
|
165
|
+
.cta {
|
|
166
|
+
width: 100%;
|
|
167
|
+
background: #baf7db;
|
|
168
|
+
padding: 5px 10px;
|
|
169
|
+
display: flex;
|
|
170
|
+
justify-content: space-around;
|
|
171
|
+
box-sizing: border-box;
|
|
172
|
+
font-family: 'Trebuchet MS', Helvetica, sans-serif;
|
|
173
|
+
border: 2px dotted grey;
|
|
174
|
+
transition: background 0.1s ease-in, color 0.1s ease-in;
|
|
175
|
+
font-weight: 100;
|
|
176
|
+
|
|
177
|
+
&:hover {
|
|
178
|
+
background: #c0abff;
|
|
179
|
+
color: #ecf0f1;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.card-shadow-area {
|
|
185
|
+
position: absolute;
|
|
186
|
+
left: 0;
|
|
187
|
+
top: 0;
|
|
188
|
+
width: 100%;
|
|
189
|
+
height: 100%;
|
|
190
|
+
background: #c0abff;
|
|
191
|
+
border: 2px dashed rgba(0, 0, 0, 0.8);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.card-pattern-area {
|
|
195
|
+
position: absolute;
|
|
196
|
+
left: 0;
|
|
197
|
+
top: 0;
|
|
198
|
+
width: 100%;
|
|
199
|
+
height: 100%;
|
|
200
|
+
|
|
201
|
+
background-color: #c0abff;
|
|
202
|
+
background-image: linear-gradient(#f4f4f4 2px, transparent 2px),
|
|
203
|
+
linear-gradient(90deg, #f4f4f4 2px, transparent 2px),
|
|
204
|
+
linear-gradient(#f4f4f4 1px, transparent 1px),
|
|
205
|
+
linear-gradient(90deg, #f4f4f4 1px, #c0abff 1px);
|
|
206
|
+
background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px;
|
|
207
|
+
background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px;
|
|
208
|
+
|
|
209
|
+
opacity: 0;
|
|
210
|
+
transition: opacity 0.4s ease-in;
|
|
211
|
+
animation: scrollBackground 2s linear infinite;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
&:hover {
|
|
215
|
+
.main-card-area {
|
|
216
|
+
transform: translate(-20px, -20px);
|
|
217
|
+
box-shadow: 10px 10px 7px 2px rgba(0, 0, 0, 0.2);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.card-pattern-area {
|
|
221
|
+
opacity: 0.7;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.surf-product-card.sponsored {
|
|
227
|
+
position: relative;
|
|
228
|
+
|
|
229
|
+
&::after {
|
|
230
|
+
left: -18px;
|
|
231
|
+
letter-spacing: 2px;
|
|
232
|
+
text-transform: uppercase;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
236
|
`;
|
|
237
|
-
const carouselStylesheet = `
|
|
238
|
-
.surf-carousel {
|
|
239
|
-
.sponsored-carousel {
|
|
240
|
-
font-family: 'Trebuchet MS', Verdana, Geneva, Tahoma, sans-serif;
|
|
241
|
-
margin: 0 0 20px 0;
|
|
242
|
-
padding: 0;
|
|
243
|
-
font-size: 26px;
|
|
244
|
-
font-weight: 100;
|
|
245
|
-
letter-spacing: 3px;
|
|
246
|
-
text-transform: uppercase;
|
|
247
|
-
text-decoration: underline dashed;
|
|
248
|
-
color: rgba(0, 0, 0, 0.7);
|
|
249
|
-
|
|
250
|
-
&.sponsoredByOne::before {
|
|
251
|
-
content: 'Brought to you by ';
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
&.recommended::before {
|
|
255
|
-
content: 'Suggested';
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
237
|
+
const carouselStylesheet = `
|
|
238
|
+
.surf-carousel {
|
|
239
|
+
.sponsored-carousel {
|
|
240
|
+
font-family: 'Trebuchet MS', Verdana, Geneva, Tahoma, sans-serif;
|
|
241
|
+
margin: 0 0 20px 0;
|
|
242
|
+
padding: 0;
|
|
243
|
+
font-size: 26px;
|
|
244
|
+
font-weight: 100;
|
|
245
|
+
letter-spacing: 3px;
|
|
246
|
+
text-transform: uppercase;
|
|
247
|
+
text-decoration: underline dashed;
|
|
248
|
+
color: rgba(0, 0, 0, 0.7);
|
|
249
|
+
|
|
250
|
+
&.sponsoredByOne::before {
|
|
251
|
+
content: 'Brought to you by ';
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
&.recommended::before {
|
|
255
|
+
content: 'Suggested';
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
260
|
`;
|
|
261
261
|
const clickThroughUrlTemplate = (data) => `https://surfside.io/${data.product.brandName}`;
|
|
262
262
|
export const MockGetConfiguration = async (logger) => {
|
|
@@ -284,8 +284,8 @@ export const MockGetConfiguration = async (logger) => {
|
|
|
284
284
|
(target.clientWidth / 2);
|
|
285
285
|
const dy = (offsetY - target.clientHeight / 2) /
|
|
286
286
|
(target.clientHeight / 2);
|
|
287
|
-
img.style.transform = `perspective(1000px)
|
|
288
|
-
rotateY(${dx * 40}deg)
|
|
287
|
+
img.style.transform = `perspective(1000px)
|
|
288
|
+
rotateY(${dx * 40}deg)
|
|
289
289
|
rotateX(${-dy * 40}deg)`;
|
|
290
290
|
},
|
|
291
291
|
'stopMove': (e) => {
|
package/package.json
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@surfside/ads-core-mock",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"module": "./lib/esm/index.js",
|
|
5
|
-
"main": "./lib/cjs/index.js",
|
|
6
|
-
"types": "./lib/types/index.d.ts",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"import": "./lib/esm/index.js",
|
|
10
|
-
"require": "./lib/cjs/index.js",
|
|
11
|
-
"types": "./lib/types/index.d.ts"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"type": "module",
|
|
15
|
-
"license": "UNLICENSED",
|
|
16
|
-
"files": [
|
|
17
|
-
"lib/",
|
|
18
|
-
"README.md"
|
|
19
|
-
],
|
|
20
|
-
"scripts": {
|
|
21
|
-
"clean": "rm -rf ./lib",
|
|
22
|
-
"prebuild": "echo \"export const SurfsideAdsCoreMockVersionInfo = { buildBranch: '$(git rev-parse --abbrev-ref HEAD)', buildHash: '$(git rev-parse --short HEAD)', buildVer: '$(bun -e 'console.log(require(\"./package.json\").version)')'};\" > src/BuildInfo.ts",
|
|
23
|
-
"build": "
|
|
24
|
-
"types": "tsc -p ./tsconfig.types.json",
|
|
25
|
-
"esm": "tsc -p ./tsconfig.esm.json",
|
|
26
|
-
"cjs": "tsc -p tsconfig.cjs.json",
|
|
27
|
-
"lint": "npx eslint"
|
|
28
|
-
},
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"@surfside/ads-core-client": "
|
|
31
|
-
},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@types/bun": "latest",
|
|
34
|
-
"typescript": "^5"
|
|
35
|
-
}
|
|
36
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@surfside/ads-core-mock",
|
|
3
|
+
"version": "0.1.23",
|
|
4
|
+
"module": "./lib/esm/index.js",
|
|
5
|
+
"main": "./lib/cjs/index.js",
|
|
6
|
+
"types": "./lib/types/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./lib/esm/index.js",
|
|
10
|
+
"require": "./lib/cjs/index.js",
|
|
11
|
+
"types": "./lib/types/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"license": "UNLICENSED",
|
|
16
|
+
"files": [
|
|
17
|
+
"lib/",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"clean": "rm -rf ./lib",
|
|
22
|
+
"prebuild": "echo \"export const SurfsideAdsCoreMockVersionInfo = { buildBranch: '$(git rev-parse --abbrev-ref HEAD)', buildHash: '$(git rev-parse --short HEAD)', buildVer: '$(bun -e 'console.log(require(\"./package.json\").version)')'};\" > src/BuildInfo.ts",
|
|
23
|
+
"build": "bun x npm-run-all --parallel \"types\" \"esm\" \"cjs\"",
|
|
24
|
+
"types": "tsc -p ./tsconfig.types.json",
|
|
25
|
+
"esm": "tsc -p ./tsconfig.esm.json",
|
|
26
|
+
"cjs": "tsc -p tsconfig.cjs.json",
|
|
27
|
+
"lint": "npx eslint"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@surfside/ads-core-client": "0.1.23"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/bun": "latest",
|
|
34
|
+
"typescript": "^5"
|
|
35
|
+
}
|
|
36
|
+
}
|