@four-leaf-studios/rl-overlay 1.0.5 → 1.1.1

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.
Files changed (53) hide show
  1. package/.github/copilot-instructions.md +70 -0
  2. package/dist/index.cjs.js +298 -10599
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.esm.js +328 -10612
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/types/Overlay.d.ts +5 -6
  7. package/dist/types/OverlaySlot.d.ts +9 -0
  8. package/dist/types/index.d.ts +2 -0
  9. package/dist/types/registry.d.ts +2 -0
  10. package/package.json +12 -5
  11. package/src/Overlay.tsx +47 -41
  12. package/src/OverlaySlot.tsx +35 -0
  13. package/src/Player.tsx +1 -0
  14. package/src/PlayerBoost.tsx +4 -1
  15. package/src/Scoreboard.tsx +1 -0
  16. package/src/ScoreboardGameBox.tsx +2 -4
  17. package/src/ScoreboardSeriesBox.tsx +2 -3
  18. package/src/ScoreboardTeam.tsx +1 -0
  19. package/src/StatItem.tsx +4 -1
  20. package/src/TargetBoost.tsx +1 -0
  21. package/src/TargetPlayer.tsx +1 -0
  22. package/src/TargetPlayerLocation.tsx +1 -0
  23. package/src/TargetPlayerStats.tsx +1 -1
  24. package/src/Team.tsx +1 -0
  25. package/src/Timer.tsx +7 -4
  26. package/src/css/Florida_Tech.css +696 -0
  27. package/src/css/Horizon_Hues.css +618 -0
  28. package/src/css/Neo_Glass.css +674 -0
  29. package/src/css/Obsidian_Glide.css +646 -0
  30. package/src/css/RLCS_2024.css +566 -0
  31. package/src/css/RLCS_2025.css +524 -0
  32. package/src/css/Shaded_blocks.css +594 -0
  33. package/src/index.ts +2 -0
  34. package/src/registry.ts +19 -0
  35. package/src/types.d.ts +20 -0
  36. package/test-overlay/package-lock.json +2697 -0
  37. package/test-overlay/package.json +3 -0
  38. package/test-overlay/public/mock-css.css +259 -386
  39. package/test-overlay/src/App.jsx +78 -28
  40. package/tests/BroadcastContext.test.tsx +41 -0
  41. package/tests/Overlay.test.tsx +106 -0
  42. package/tests/OverlaySlot.test.tsx +79 -0
  43. package/tests/PlayerBoost.test.tsx +47 -0
  44. package/tests/Replay.test.tsx +29 -0
  45. package/tests/ScoreboardGameBox.test.tsx +35 -0
  46. package/tests/ScoreboardSeriesBox.test.tsx +48 -0
  47. package/tests/StatItem.test.tsx +33 -0
  48. package/tests/__mocks__/@four-leaf-studios/rl-socket-hook.ts +10 -0
  49. package/tests/fixtures.ts +96 -0
  50. package/tests/registry.test.ts +27 -0
  51. package/tests/setup.ts +1 -0
  52. package/tsconfig.json +16 -20
  53. package/vitest.config.ts +9 -0
@@ -0,0 +1,524 @@
1
+ /* latin */
2
+ @font-face {
3
+ font-family: "Aldrich";
4
+ font-style: normal;
5
+ font-weight: 400;
6
+ font-display: swap;
7
+ src: url(https://fonts.gstatic.com/s/aldrich/v21/MCoTzAn-1s3IGyJMVacY3w.woff2)
8
+ format("woff2");
9
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
10
+ U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
11
+ U+2212, U+2215, U+FEFF, U+FFFD;
12
+ }
13
+
14
+ * {
15
+ font-family: Aldrich;
16
+ }
17
+
18
+ .overlay {
19
+ --fallback-darker-mutual: black;
20
+ }
21
+
22
+ .main_bar {
23
+ }
24
+
25
+ .top_bar {
26
+ background-color: #282c34;
27
+ font-size: 17px;
28
+ min-width: 800px;
29
+ padding-left: 20px;
30
+ padding-right: 20px;
31
+ height: 34px;
32
+ color: #cacaca;
33
+ font-style: italic;
34
+ word-spacing: 3px;
35
+ }
36
+
37
+ .time_box {
38
+ color: #000000;
39
+ font-size: 44px;
40
+ height: 67px;
41
+ width: 150px;
42
+ background: #ffffff;
43
+ font-weight: 900;
44
+ }
45
+
46
+ .name_box {
47
+ font-size: 30px;
48
+ height: 67px;
49
+ width: 250px;
50
+ font-weight: 800;
51
+ line-height: 0.9;
52
+ color: #ffffff;
53
+ }
54
+
55
+ .left_name_box {
56
+ justify-content: end;
57
+ background: linear-gradient(
58
+ to top,
59
+ var(--team-left-primary),
60
+ var(--team-left-primary-dark)
61
+ );
62
+ border-right: 10px solid #191919;
63
+ padding-right: 15px;
64
+ }
65
+
66
+ .right_name_box {
67
+ justify-content: start;
68
+ background: linear-gradient(
69
+ to top,
70
+ var(--team-right-primary),
71
+ var(--team-right-primary-dark)
72
+ );
73
+ border-left: 10px solid #191919;
74
+ padding-left: 15px;
75
+ }
76
+
77
+ .logo_box {
78
+ padding: 3px;
79
+ width: 100px;
80
+ height: 67px;
81
+ background: #191919;
82
+ }
83
+
84
+ .left_logo_box {
85
+ border-left: 10px solid var(--team-left-primary);
86
+ order: 0;
87
+ border-left: 10px solid transparent;
88
+ border-image: linear-gradient(
89
+ to top,
90
+ var(--team-left-primary),
91
+ var(--team-left-primary-dark)
92
+ );
93
+ border-image-slice: 1;
94
+ }
95
+
96
+ .right_logo_box {
97
+ order: 10;
98
+ border-right: 10px solid transparent;
99
+ border-image: linear-gradient(
100
+ to top,
101
+ var(--team-right-primary),
102
+ var(--team-right-primary-dark)
103
+ );
104
+ border-image-slice: 1;
105
+ }
106
+
107
+ .score_box {
108
+ font-size: 48px;
109
+ height: 67px;
110
+ width: 70px;
111
+ color: white;
112
+ }
113
+
114
+ .left_score_box {
115
+ background: linear-gradient(
116
+ to top,
117
+ var(--team-left-primary),
118
+ var(--team-left-primary-dark)
119
+ );
120
+ }
121
+
122
+ .right_score_box {
123
+ background: linear-gradient(
124
+ to top,
125
+ var(--team-right-primary),
126
+ var(--team-right-primary-dark)
127
+ );
128
+ }
129
+
130
+ .series_box {
131
+ background-color: #262626;
132
+ width: 255px;
133
+ height: 22px;
134
+ padding-left: 5px;
135
+ padding-right: 5px;
136
+ }
137
+
138
+ .left_series_box {
139
+ justify-content: end;
140
+ }
141
+
142
+ .right_series_box {
143
+ justify-content: start;
144
+ }
145
+
146
+ .series_score_box {
147
+ margin-left: 5px;
148
+ margin-right: 5px;
149
+ height: 9px;
150
+ width: 40px;
151
+ }
152
+
153
+ .series_score_box_point {
154
+ }
155
+
156
+ .left_series_score_box_point {
157
+ background: var(--team-left-primary);
158
+ }
159
+
160
+ .right_series_score_box_point {
161
+ }
162
+
163
+ .series_score_box_empty {
164
+ background: #494949;
165
+ }
166
+
167
+ .left_series_score_box_empty {
168
+ }
169
+
170
+ .right_series_score_box_empty {
171
+ background: var(--team-right-primary);
172
+ }
173
+
174
+ .game_box {
175
+ background-color: #262626;
176
+ font-size: 20px;
177
+ height: 35px;
178
+ width: 290px;
179
+ color: #fdfdfd;
180
+ font-weight: 600;
181
+ word-spacing: 3px;
182
+ margin-left: 10px;
183
+ margin-right: 10px;
184
+ }
185
+
186
+ .team_box {
187
+ color: white;
188
+ position: absolute;
189
+ top: 16px;
190
+ }
191
+
192
+ .left_team_box {
193
+ left: 0;
194
+ }
195
+
196
+ .right_team_box {
197
+ right: 0;
198
+ }
199
+
200
+ .player_box {
201
+ height: 40px;
202
+ width: 307px;
203
+ margin-bottom: 6px;
204
+ background-color: #262626;
205
+ }
206
+
207
+ .left_player_box {
208
+ }
209
+ .right_player_box {
210
+ }
211
+
212
+ .player_name {
213
+ font-size: 20px;
214
+ position: absolute;
215
+ top: 6px;
216
+ text-transform: uppercase;
217
+ text-overflow: ellipsis;
218
+ max-width: 220px;
219
+ white-space: nowrap;
220
+ overflow: hidden;
221
+ }
222
+ .left_player_name {
223
+ left: 26px;
224
+ }
225
+ .right_player_name {
226
+ right: 26px;
227
+ }
228
+
229
+ .player_boost {
230
+ font-size: 20px;
231
+ position: absolute;
232
+ top: 6px;
233
+ color: white;
234
+ }
235
+ .left_player_boost {
236
+ right: 9px;
237
+ }
238
+ .right_player_boost {
239
+ left: 9px;
240
+ }
241
+
242
+ .boost_meter {
243
+ width: 272px;
244
+ height: 6px;
245
+ margin-top: 30px;
246
+ background-color: #000000;
247
+ }
248
+ .left_boost_meter {
249
+ margin-left: 26px;
250
+ margin-right: auto;
251
+ }
252
+ .right_boost_meter {
253
+ margin-left: auto;
254
+ margin-right: 26px;
255
+ }
256
+
257
+ .boost_meter_bar {
258
+ }
259
+ .left_boost_meter_bar {
260
+ background-color: var(--team-left-primary);
261
+ }
262
+ .right_boost_meter_bar {
263
+ background-color: var(--team-right-primary);
264
+ }
265
+
266
+ .stat_box {
267
+ background-color: #000000;
268
+ height: 41px;
269
+ padding-right: 15px;
270
+ display: flex;
271
+ border-bottom: 4px solid #262626;
272
+ }
273
+ .stat_box_player {
274
+ padding-left: 20px;
275
+ padding-right: 20px;
276
+ font-size: 28px;
277
+ height: 32px;
278
+ padding-top: 10px;
279
+ font-weight: bold;
280
+ overflow: hidden;
281
+ background: #262626;
282
+ font-size: 20px;
283
+ text-transform: uppercase;
284
+ text-overflow: ellipsis;
285
+ width: 280px;
286
+ white-space: nowrap;
287
+ overflow: hidden;
288
+ text-align: end;
289
+ }
290
+
291
+ .stat_box_statistics {
292
+ }
293
+
294
+ .stat_box_statistic {
295
+ display: flex;
296
+ justify-content: flex-end;
297
+ margin: auto;
298
+ padding-left: 10px;
299
+ padding-right: 10px;
300
+ }
301
+ .stat_box_statistic_value {
302
+ font-size: 24px;
303
+ font-style: italic;
304
+ font-weight: bold;
305
+ margin-right: 7px;
306
+ margin-bottom: 0px;
307
+ }
308
+ .stat_box_statistic_name {
309
+ font-size: 16px;
310
+ padding-top: 3px;
311
+ margin-top: 3px;
312
+ color: #cdcfd3;
313
+ }
314
+
315
+ .stat_box_statistic_player_id,
316
+ .stat_box_statistic_player_team,
317
+ .stat_box_statistic_player_location,
318
+ .stat_box_statistic_player_touches {
319
+ display: none;
320
+ }
321
+
322
+ .stat_box_player_boost {
323
+ position: absolute;
324
+ width: 39%;
325
+ height: 6px;
326
+ bottom: 0.5px;
327
+ left: 0;
328
+ }
329
+
330
+ .stat_box_player_boost .boost_meter,
331
+ .stat_box_player_boost .boost_meter_bar {
332
+ margin: unset;
333
+ }
334
+
335
+ /* Target Boost (the circular meter) */
336
+ .target_boost {
337
+ font-size: 3rem;
338
+ font-weight: bold;
339
+ position: absolute;
340
+ bottom: 0;
341
+ right: 0;
342
+ margin-left: auto;
343
+ width: 200px;
344
+ height: 200px;
345
+ margin-bottom: 50px;
346
+ margin-right: 50px;
347
+ border-radius: 50%;
348
+ display: flex;
349
+ flex-direction: column;
350
+ align-items: center;
351
+ justify-content: center;
352
+ color: white;
353
+ overflow: hidden;
354
+ transition: opacity 0.3s ease, transform 0.3s ease;
355
+ }
356
+
357
+ .left_target_boost.target_boost {
358
+ color: var(--team-0-secondary);
359
+ }
360
+
361
+ .right_target_boost.target_boost {
362
+ color: var(--team-1-secondary);
363
+ }
364
+
365
+ .target_boost.entering {
366
+ animation: fadeIn 0.5s ease-in-out;
367
+ }
368
+
369
+ .target_boost.exiting {
370
+ animation: fadeOut 0.5s ease-in-out;
371
+ }
372
+
373
+ .left_target_boost {
374
+ border: 5px solid var(--team-left-mutual);
375
+ background: #07132d;
376
+ }
377
+
378
+ .right_target_boost {
379
+ border: 5px solid var(--team-left-mutual);
380
+ background: var(--team-left-mutual);
381
+ }
382
+
383
+ .target_boost_container {
384
+ width: 100%;
385
+ height: 100%;
386
+ display: flex;
387
+ flex-direction: column;
388
+ align-items: center;
389
+ justify-content: center;
390
+ border-radius: 50%;
391
+ }
392
+
393
+ .left_target_boost_container {
394
+ }
395
+
396
+ .right_target_boost_container {
397
+ }
398
+
399
+ .target_boost_meter {
400
+ position: absolute;
401
+ height: 100%;
402
+ width: 100%;
403
+ border-radius: 50%;
404
+ display: flex;
405
+ justify-content: center;
406
+ align-items: center;
407
+ transition: all 0.5s ease-in-out;
408
+ }
409
+
410
+ .left_target_boost_meter {
411
+ background: conic-gradient(
412
+ var(--team-left-primary) calc(40deg * var(--target_boost) / 100),
413
+ var(--team-left-primary) calc(80deg * var(--target_boost) / 100),
414
+ var(--team-left-primary) calc(30deg * var(--target_boost) / 100),
415
+ var(--team-left-primary) calc(360deg * var(--target_boost) / 100),
416
+ var(--fallback-darker-mutual) calc(0deg * var(--target_boost) / 100)
417
+ ) !important;
418
+ transition: all 0.5s ease-in-out;
419
+ }
420
+
421
+ .right_target_boost_meter {
422
+ background: conic-gradient(
423
+ var(--team-right-primary) calc(40deg * var(--target_boost) / 100),
424
+ var(--team-right-primary) calc(80deg * var(--target_boost) / 100),
425
+ var(--team-right-primary) calc(30deg * var(--target_boost) / 100),
426
+ var(--team-right-primary) calc(360deg * var(--target_boost) / 100),
427
+ var(--fallback-darker-mutual) calc(0deg * var(--target_boost) / 100)
428
+ ) !important;
429
+
430
+ transition: all 0.5s ease-in-out;
431
+ }
432
+
433
+ .target_boost_meter_inner {
434
+ position: absolute;
435
+ margin: auto;
436
+ width: 80%;
437
+ height: 80%;
438
+ border-radius: 50%;
439
+ z-index: 50;
440
+ }
441
+
442
+ .left_target_boost_meter_inner {
443
+ background: var(--team-left-mutual);
444
+ }
445
+
446
+ .right_target_boost_meter_inner {
447
+ background: var(--team-left-mutual);
448
+ }
449
+
450
+ .target_boost_svg {
451
+ position: absolute;
452
+ width: 100%;
453
+ height: 100%;
454
+ z-index: 500;
455
+ display: flex;
456
+ justify-content: center;
457
+ align-items: center;
458
+ }
459
+
460
+ .target_boost_svg_circle {
461
+ stroke-dasharray: 4 25%;
462
+ stroke-width: 41;
463
+ stroke-dashoffset: 18;
464
+ fill: transparent;
465
+ }
466
+
467
+ .left_target_boost_svg_circle {
468
+ stroke: var(--team-left-mutual);
469
+ }
470
+
471
+ .right_target_boost_svg_circle {
472
+ stroke: var(--team-left-mutual);
473
+ }
474
+
475
+ .target_boost_value {
476
+ position: absolute;
477
+ z-index: 500;
478
+ color: white;
479
+ }
480
+
481
+ .left_target_boost_value {
482
+ /* additional left value styles if needed */
483
+ }
484
+
485
+ .right_target_boost_value {
486
+ /* additional right value styles if needed */
487
+ }
488
+
489
+ /* Replay Section */
490
+ .replay_box {
491
+ position: absolute;
492
+ margin: auto;
493
+ left: 0px;
494
+ right: 0px;
495
+ z-index: 500;
496
+ width: 449px;
497
+ height: 101px;
498
+ background-color: #1d1d21;
499
+ clip-path: polygon(0 0, 100% 0, 85% 100%, 15% 100%);
500
+
501
+ display: flex;
502
+ justify-content: center;
503
+ align-items: center;
504
+ gap: 12px;
505
+ }
506
+
507
+ .replay_box::after {
508
+ content: "";
509
+ width: 20px;
510
+ height: 20px;
511
+ background-color: rgb(255, 79, 79);
512
+ border-radius: 50%;
513
+ clip-path: circle(50% at 50% 50%);
514
+ }
515
+
516
+ .replay_text {
517
+ color: rgb(255, 79, 79);
518
+ text-align: center;
519
+ font-family: Lato;
520
+ font-size: 48px;
521
+ font-style: normal;
522
+ font-weight: 800;
523
+ line-height: normal;
524
+ }