@everymatrix/lottery-program-wof 1.28.8 → 1.29.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/lottery-program-wof",
3
- "version": "1.28.8",
3
+ "version": "1.29.0",
4
4
  "main": "dist/lottery-program-wof.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -39,5 +39,5 @@
39
39
  "publishConfig": {
40
40
  "access": "public"
41
41
  },
42
- "gitHead": "c7e4f0fb90648211b55dc99a72de2fe600016137"
42
+ "gitHead": "97cea3025cb353ba5ec695d9a2ac6fe4825d7fba"
43
43
  }
package/src/business.ts CHANGED
@@ -170,7 +170,7 @@ export const api = {
170
170
  export const getSpinContainerSelector = (pointerMode: PointerMode) => {
171
171
  switch(pointerMode){
172
172
  case PointerMode.Arrow: return 'g.PartitionsContainer'
173
- case PointerMode.Partition: return 'g.PointerContainer'
173
+ case PointerMode.Partition: return '.PointerArea > div'
174
174
  }
175
175
  }
176
176
 
@@ -113,7 +113,7 @@ svg {
113
113
  // Themed Bottom
114
114
 
115
115
  .theme1, .theme4, .theme5 {
116
- foreignObject.Bottom {
116
+ foreignObject.Bottom div {
117
117
  background-image: var(--img-theme1-bg3), var(--img-theme-BgBlackRing), var(--img-theme-BgHalo);
118
118
  background-position: center, center, center;
119
119
  background-size: calc(var(--radius) * 2px + var(--ratio) * 7px), calc(var(--radius) * 2px + var(--ratio) * 37px), calc(var(--radius) * 2px + var(--ratio) * 130px);
@@ -121,7 +121,7 @@ svg {
121
121
  }
122
122
 
123
123
  .theme2, .theme6 {
124
- foreignObject.Bottom {
124
+ foreignObject.Bottom div {
125
125
  background-image: var(--img-theme2-bg3), var(--img-theme-BgHalo), var(--img-theme-BgBlackRing);
126
126
  background-position: center, center, center;
127
127
  background-size: calc(var(--radius) * 2px + var(--ratio) * 8px), calc(var(--radius) * 2px + var(--ratio) * 123px), calc(var(--radius) * 2px + var(--ratio) * 37px);
@@ -129,7 +129,7 @@ svg {
129
129
  }
130
130
 
131
131
  .theme3 {
132
- foreignObject.Bottom {
132
+ foreignObject.Bottom div {
133
133
  background-image: var(--img-theme3-bg2), var(--img-theme3-bg1);
134
134
  background-position: center, center;
135
135
  background-size: calc(var(--radius) * 2px + var(--ratio) * 57px), calc(var(--radius) * 2px + var(--ratio) * 125px);
@@ -137,7 +137,7 @@ svg {
137
137
  }
138
138
 
139
139
  .theme7 {
140
- foreignObject.Bottom {
140
+ foreignObject.Bottom div {
141
141
  background-image: var(--img-theme7-bg3), var(--img-theme7-bg2), var(--img-theme7-bg1);
142
142
  background-position: center, center calc(var(--size) * 1px - var(--ratio) * 95px), calc(var(--ratio) * 42px) calc(var(--ratio) * -5px);
143
143
  background-size: calc(var(--radius) * 2px + 35px), calc(var(--radius) * 2px * 0.6), calc(var(--radius) * 2.7px);
@@ -146,35 +146,35 @@ svg {
146
146
 
147
147
  // Themed Middle
148
148
  .theme1, .theme4 {
149
- foreignObject.Middle {
149
+ foreignObject.Middle div {
150
150
  background-image: var(--img-theme-center1);
151
151
  background-position: center;
152
152
  }
153
153
  }
154
154
 
155
155
  .theme2 {
156
- foreignObject.Middle {
156
+ foreignObject.Middle div {
157
157
  background-image: var(--img-theme2-center), var(--img-theme2-arrow);
158
158
  background-position: center, center 60px;
159
159
  }
160
160
  }
161
161
 
162
162
  .theme3 {
163
- foreignObject.Middle {
163
+ foreignObject.Middle div {
164
164
  background-image: var(--img-theme3-center), var(--img-theme3-arrow);
165
165
  background-position: center, center 39px;
166
166
  }
167
167
  }
168
168
 
169
169
  .theme5, .theme6 {
170
- foreignObject.Middle {
170
+ foreignObject.Middle div {
171
171
  background-image: var(--img-theme-center2);
172
172
  background-position: center;
173
173
  }
174
174
  }
175
175
 
176
176
  .theme7 {
177
- foreignObject.Middle {
177
+ foreignObject.Middle div {
178
178
  background-image: var(--img-theme7-center), var(--img-theme7-arrow);
179
179
  background-position: center, center 36px;
180
180
  }
@@ -182,7 +182,7 @@ svg {
182
182
 
183
183
  // Themed Top
184
184
  .theme7 {
185
- foreignObject.Top {
185
+ foreignObject.Top div {
186
186
  background-image: var(--img-theme7-light);
187
187
  background-position: 294px 135px;
188
188
  }
@@ -190,9 +190,12 @@ svg {
190
190
 
191
191
  .theme1, .theme2, .theme3, .theme4, .theme5, .theme6 {
192
192
  foreignObject.Top {
193
+ mix-blend-mode: multiply;
194
+ }
195
+
196
+ foreignObject.Top div {
193
197
  background-image: var(--img-theme-shadow);
194
198
  background-position: center;
195
- mix-blend-mode: multiply;
196
199
  background-size: calc(var(--radius) * 2px);
197
200
  }
198
201
  }
@@ -200,12 +203,12 @@ svg {
200
203
  // Themed Partition
201
204
 
202
205
  .theme2 {
203
- foreignObject.Partition1 {
206
+ foreignObject.Partition1 div {
204
207
  background-image: var(--img-theme-partition-light);
205
208
  background-position: center calc((var(--size) / 2 - var(--radius)) * 1px - calc(var(--ratio) * 22px));
206
209
  transform: rotate(calc(var(--index) * 360deg / var(--length)));
207
210
  }
208
- foreignObject.Partition2 {
211
+ foreignObject.Partition2 div {
209
212
  background-image: var(--img-theme-partition-light);
210
213
  background-position: center calc((var(--size) / 2 - var(--radius)) * 1px - calc(var(--ratio) * 22px));
211
214
  transform: rotate(calc((var(--index) + 0.5) * 360deg / var(--length)));
@@ -213,16 +216,18 @@ svg {
213
216
  }
214
217
 
215
218
  foreignObject.PointerArea {
219
+ mix-blend-mode: screen;
220
+ }
221
+ foreignObject.PointerArea div {
216
222
  background-image: var(--img-theme-pointer-area);
217
223
  background-position: center -3px;
218
- mix-blend-mode: screen;
219
224
  background-size: 51%;
220
225
  }
221
226
 
222
- foreignObject.Partition1, foreignObject.Partition2 {
227
+ foreignObject.Partition1 div, foreignObject.Partition2 div {
223
228
  transform-origin: center;
224
229
  }
225
- .PartitionsCustomable1, .PartitionsCustomable2 {
230
+ .PartitionsCustomable1 div, .PartitionsCustomable2 div {
226
231
  visibility: hidden;
227
232
  &.active {
228
233
  visibility: visible;
@@ -231,41 +236,44 @@ foreignObject.Partition1, foreignObject.Partition2 {
231
236
 
232
237
  foreignObject.Customable {
233
238
  overflow: visible;
239
+ }
240
+
241
+ foreignObject.Customable div {
234
242
  background-repeat: no-repeat;
235
243
  }
236
244
 
237
- .PartitionBackground {
245
+ .PartitionBackground div {
238
246
  background-size: calc(var(--radius) * 2 / var(--size) * 100%) calc(var(--radius) * 2 / var(--size) * 100%);
239
247
  background-position: center;
240
248
  }
241
249
 
242
250
  .theme1, .theme2 {
243
- .PartitionBackground:nth-child(4n+1) { background-image: radial-gradient(#009C9C 0%, #002634 100%) }
244
- .PartitionBackground:nth-child(4n+2) { background-image: radial-gradient(#AA00BF 0%, #3B0031 100%) }
245
- .PartitionBackground:nth-child(4n+3) { background-image: radial-gradient(#0068CD 0%, #150D42 100%) }
246
- .PartitionBackground:nth-child(4n+4) { background-image: radial-gradient(#DA005B 0%, #400021 100%) }
251
+ .PartitionBackground:nth-child(4n+1) { div { background-image: radial-gradient(#009C9C 0%, #002634 100%) }}
252
+ .PartitionBackground:nth-child(4n+2) { div { background-image: radial-gradient(#AA00BF 0%, #3B0031 100%) }}
253
+ .PartitionBackground:nth-child(4n+3) { div { background-image: radial-gradient(#0068CD 0%, #150D42 100%) }}
254
+ .PartitionBackground:nth-child(4n+4) { div { background-image: radial-gradient(#DA005B 0%, #400021 100%) }}
247
255
  }
248
256
 
249
257
  .theme3 {
250
- .PartitionBackground:nth-child(4n+1) { background-image: radial-gradient(#066 0%, #007F76 13%, #00B59B 42%, #00DDB5 67.01%, #00F6C6 88.01%, #0FC 100.01%) }
251
- .PartitionBackground:nth-child(4n+2) { background-image: radial-gradient(#580065 22.67%, #D453FF 91.3%) }
252
- .PartitionBackground:nth-child(4n+3) { background-image: radial-gradient(#FFE767 -0.01%, #F28F00 100%) }
253
- .PartitionBackground:nth-child(4n+4) { background-image: radial-gradient(#900A42 22.59%, #960A44 23.94%, #B60B53 31.36%, #D00C5E 39.45%, #E40D67 48.22%, #F30D6E 57.66%, #FB0D71 69.8%, #FE0E73 90.03%) }
258
+ .PartitionBackground:nth-child(4n+1) { div { background-image: radial-gradient(#066 0%, #007F76 13%, #00B59B 42%, #00DDB5 67.01%, #00F6C6 88.01%, #0FC 100.01%) }}
259
+ .PartitionBackground:nth-child(4n+2) { div { background-image: radial-gradient(#580065 22.67%, #D453FF 91.3%) }}
260
+ .PartitionBackground:nth-child(4n+3) { div { background-image: radial-gradient(#FFE767 -0.01%, #F28F00 100%) }}
261
+ .PartitionBackground:nth-child(4n+4) { div { background-image: radial-gradient(#900A42 22.59%, #960A44 23.94%, #B60B53 31.36%, #D00C5E 39.45%, #E40D67 48.22%, #F30D6E 57.66%, #FB0D71 69.8%, #FE0E73 90.03%) }}
254
262
  }
255
263
 
256
264
  .theme4, .theme5, .theme6 {
257
- .PartitionBackground:nth-child(4n+1) { background: radial-gradient(#3B0031 0%, #7E008E 100.01%) }
258
- .PartitionBackground:nth-child(4n+2) { background: radial-gradient(#5A005F 22.67%, #EA53FF 91.3%) }
259
- .PartitionBackground:nth-child(4n+3) { background: radial-gradient(#B300C3 -0.01%, #4D003B 100%) }
260
- .PartitionBackground:nth-child(4n+4) { background: radial-gradient(#59007B 22.59%, #B753FF 90.03%) }
265
+ .PartitionBackground:nth-child(4n+1) div { background: radial-gradient(#3B0031 0%, #7E008E 100.01%) }
266
+ .PartitionBackground:nth-child(4n+2) div { background: radial-gradient(#5A005F 22.67%, #EA53FF 91.3%) }
267
+ .PartitionBackground:nth-child(4n+3) div { background: radial-gradient(#B300C3 -0.01%, #4D003B 100%) }
268
+ .PartitionBackground:nth-child(4n+4) div { background: radial-gradient(#59007B 22.59%, #B753FF 90.03%) }
261
269
  }
262
270
 
263
271
  .theme7 {
264
- .PartitionBackground:nth-child(2n+1) { background: linear-gradient(90.23deg, #F6AD3F 16.59%, #AF8531 99.8%) }
265
- .PartitionBackground:nth-child(2n+2) { background: linear-gradient(90deg, #323234 -0.01%, #272425 54.99%, #231F1F 99.99%) }
272
+ .PartitionBackground:nth-child(2n+1) div { background: linear-gradient(90.23deg, #F6AD3F 16.59%, #AF8531 99.8%) }
273
+ .PartitionBackground:nth-child(2n+2) div { background: linear-gradient(90deg, #323234 -0.01%, #272425 54.99%, #231F1F 99.99%) }
266
274
  }
267
275
 
268
- .PartitionBackground {
276
+ .PartitionBackground div {
269
277
  transform-origin: center;
270
278
  }
271
279
 
@@ -65,7 +65,11 @@
65
65
  let spinner = new Spinner({
66
66
  tick: (deg, _speed) => {
67
67
  setProps(spinContainer, {
68
- transform: `rotate(${deg})`,
68
+ style: [
69
+ `transform: rotate(${deg}deg)`,
70
+ `height: ${size}px`,
71
+ `width: ${size}px`,
72
+ ].join(';'), //mix-blend-mode: screen; background-blend-mode: screen;
69
73
  })
70
74
  speed = _speed * 0.5
71
75
  }
@@ -195,8 +199,12 @@
195
199
  node.appendChild(image)
196
200
  }
197
201
 
202
+
198
203
  $: optionFilter = theme.pointerMode === PointerMode.Arrow && speed > 0.3 ? `blur(${speed}px)` : null
199
204
  $: sizeProps = { height: size, width: size}
205
+ $: foreignObjectAgentProps = {
206
+ style: Object.keys(sizeProps).map(key => `${key}: ${sizeProps[key]}px`).join(';')
207
+ }
200
208
  </script>
201
209
 
202
210
  <div
@@ -212,7 +220,9 @@
212
220
  on:click={() => isSafari() && eventSpin()}
213
221
  style:opacity={messageShown ? '.3': ''}
214
222
  >
215
- <foreignObject {...sizeProps} class="Bottom Customable" />
223
+ <foreignObject {...sizeProps} class="Bottom Customable">
224
+ <div {...foreignObjectAgentProps} />
225
+ </foreignObject>
216
226
 
217
227
  <g class="PartitionsContainer" {...calc.getSpinnerProps()}>
218
228
  <g class="PartitionsBackgrounds">
@@ -223,7 +233,9 @@
223
233
  style={`--index: ${index}`}
224
234
  width={size}
225
235
  height={size}
226
- />
236
+ >
237
+ <div {...foreignObjectAgentProps} />
238
+ </foreignObject>
227
239
  {/each}
228
240
  </g>
229
241
  <g class="PartitionsBackgroundStrokes">
@@ -269,7 +281,9 @@
269
281
  class="Partition1 Customable"
270
282
  style={`--index: ${index}`}
271
283
  {...sizeProps}
272
- />
284
+ >
285
+ <div {...foreignObjectAgentProps} />
286
+ </foreignObject>
273
287
  {/each}
274
288
  </g>
275
289
  <g class="PartitionsCustomable2" class:active={isPartitionsCustomableReady}>
@@ -278,14 +292,18 @@
278
292
  class="Partition2 Customable"
279
293
  style={`--index: ${index}`}
280
294
  {...sizeProps}
281
- />
295
+ >
296
+ <div {...foreignObjectAgentProps} />
297
+ </foreignObject>
282
298
  {/each}
283
299
  </g>
284
300
 
285
301
  {#if theme.pointerMode === PointerMode.Partition}
286
302
  <g class="PointerContainer" {...calc.getSpinnerProps()}>
287
303
 
288
- <foreignObject class="PointerArea Customable" {...sizeProps} />
304
+ <foreignObject class="PointerArea Customable" {...sizeProps}>
305
+ <div {...foreignObjectAgentProps} />
306
+ </foreignObject>
289
307
 
290
308
  <path
291
309
  class="PointerPartitionFrame"
@@ -295,8 +313,12 @@
295
313
  </g>
296
314
  {/if}
297
315
 
298
- <foreignObject class="Middle Customable" {...sizeProps} />
299
- <foreignObject class="Top Customable" {...sizeProps} />
316
+ <foreignObject class="Middle Customable" {...sizeProps}>
317
+ <div {...foreignObjectAgentProps} />
318
+ </foreignObject>
319
+ <foreignObject class="Top Customable" {...sizeProps}>
320
+ <div {...foreignObjectAgentProps} />
321
+ </foreignObject>
300
322
 
301
323
  <g
302
324
  class="Center"