@four-leaf-studios/rl-overlay 1.0.4 → 1.1.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.
Files changed (51) hide show
  1. package/.github/copilot-instructions.md +70 -0
  2. package/dist/index.cjs.js +271 -10567
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.esm.js +300 -10579
  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 +43 -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 +15 -3
  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/public/mock-css.css +294 -372
  37. package/test-overlay/src/App.jsx +28 -28
  38. package/tests/BroadcastContext.test.tsx +41 -0
  39. package/tests/Overlay.test.tsx +106 -0
  40. package/tests/OverlaySlot.test.tsx +79 -0
  41. package/tests/PlayerBoost.test.tsx +47 -0
  42. package/tests/Replay.test.tsx +29 -0
  43. package/tests/ScoreboardGameBox.test.tsx +35 -0
  44. package/tests/ScoreboardSeriesBox.test.tsx +48 -0
  45. package/tests/StatItem.test.tsx +33 -0
  46. package/tests/__mocks__/@four-leaf-studios/rl-socket-hook.ts +10 -0
  47. package/tests/fixtures.ts +96 -0
  48. package/tests/registry.test.ts +27 -0
  49. package/tests/setup.ts +1 -0
  50. package/tsconfig.json +16 -20
  51. package/vitest.config.ts +9 -0
@@ -0,0 +1,594 @@
1
+ /* ShadedBlocks Theme */
2
+ /* latin */
3
+ @font-face {
4
+ font-family: "Aldrich";
5
+ font-style: normal;
6
+ font-weight: 400;
7
+ font-display: swap;
8
+ src: url(https://fonts.gstatic.com/s/aldrich/v21/MCoTzAn-1s3IGyJMVacY3w.woff2)
9
+ format("woff2");
10
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
11
+ U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
12
+ U+2212, U+2215, U+FEFF, U+FFFD;
13
+ }
14
+ /* vietnamese */
15
+ @font-face {
16
+ font-family: "Big Shoulders Text";
17
+ font-style: normal;
18
+ font-weight: 100 900;
19
+ font-display: swap;
20
+ src: url(https://fonts.gstatic.com/s/bigshoulderstext/v24/55xxezRtP9G3CGPIf49hxc8P0eytUxBclIZ6cMI.woff2)
21
+ format("woff2");
22
+ unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
23
+ U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
24
+ U+1EA0-1EF9, U+20AB;
25
+ }
26
+ /* latin-ext */
27
+ @font-face {
28
+ font-family: "Big Shoulders Text";
29
+ font-style: normal;
30
+ font-weight: 100 900;
31
+ font-display: swap;
32
+ src: url(https://fonts.gstatic.com/s/bigshoulderstext/v24/55xxezRtP9G3CGPIf49hxc8P0eytUxBclYZ6cMI.woff2)
33
+ format("woff2");
34
+ unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
35
+ U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
36
+ U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
37
+ }
38
+ /* latin */
39
+ @font-face {
40
+ font-family: "Big Shoulders Text";
41
+ font-style: normal;
42
+ font-weight: 100 900;
43
+ font-display: swap;
44
+ src: url(https://fonts.gstatic.com/s/bigshoulderstext/v24/55xxezRtP9G3CGPIf49hxc8P0eytUxBcm4Z6.woff2)
45
+ format("woff2");
46
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
47
+ U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
48
+ U+2212, U+2215, U+FEFF, U+FFFD;
49
+ }
50
+ /* vietnamese */
51
+ @font-face {
52
+ font-family: "Reddit Mono";
53
+ font-style: normal;
54
+ font-weight: 200 900;
55
+ font-display: swap;
56
+ src: url(https://fonts.gstatic.com/s/redditmono/v3/oPWL_kRmmu4oQ88oo13o4-rERjtPRw.woff2)
57
+ format("woff2");
58
+ unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
59
+ U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
60
+ U+1EA0-1EF9, U+20AB;
61
+ }
62
+ /* latin-ext */
63
+ @font-face {
64
+ font-family: "Reddit Mono";
65
+ font-style: normal;
66
+ font-weight: 200 900;
67
+ font-display: swap;
68
+ src: url(https://fonts.gstatic.com/s/redditmono/v3/oPWL_kRmmu4oQ88oo13o4-rFRjtPRw.woff2)
69
+ format("woff2");
70
+ unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
71
+ U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
72
+ U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
73
+ }
74
+ /* latin */
75
+ @font-face {
76
+ font-family: "Reddit Mono";
77
+ font-style: normal;
78
+ font-weight: 200 900;
79
+ font-display: swap;
80
+ src: url(https://fonts.gstatic.com/s/redditmono/v3/oPWL_kRmmu4oQ88oo13o4-rLRjs.woff2)
81
+ format("woff2");
82
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
83
+ U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
84
+ U+2212, U+2215, U+FEFF, U+FFFD;
85
+ }
86
+ /* cyrillic-ext */
87
+ @font-face {
88
+ font-family: "Roboto Slab";
89
+ font-style: normal;
90
+ font-weight: 100 900;
91
+ font-display: swap;
92
+ src: url(https://fonts.gstatic.com/s/robotoslab/v34/BngMUXZYTXPIvIBgJJSb6ufA5qW54A.woff2)
93
+ format("woff2");
94
+ unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F,
95
+ U+FE2E-FE2F;
96
+ }
97
+ /* cyrillic */
98
+ @font-face {
99
+ font-family: "Roboto Slab";
100
+ font-style: normal;
101
+ font-weight: 100 900;
102
+ font-display: swap;
103
+ src: url(https://fonts.gstatic.com/s/robotoslab/v34/BngMUXZYTXPIvIBgJJSb6ufJ5qW54A.woff2)
104
+ format("woff2");
105
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
106
+ }
107
+ /* greek-ext */
108
+ @font-face {
109
+ font-family: "Roboto Slab";
110
+ font-style: normal;
111
+ font-weight: 100 900;
112
+ font-display: swap;
113
+ src: url(https://fonts.gstatic.com/s/robotoslab/v34/BngMUXZYTXPIvIBgJJSb6ufB5qW54A.woff2)
114
+ format("woff2");
115
+ unicode-range: U+1F00-1FFF;
116
+ }
117
+ /* greek */
118
+ @font-face {
119
+ font-family: "Roboto Slab";
120
+ font-style: normal;
121
+ font-weight: 100 900;
122
+ font-display: swap;
123
+ src: url(https://fonts.gstatic.com/s/robotoslab/v34/BngMUXZYTXPIvIBgJJSb6ufO5qW54A.woff2)
124
+ format("woff2");
125
+ unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1,
126
+ U+03A3-03FF;
127
+ }
128
+ /* vietnamese */
129
+ @font-face {
130
+ font-family: "Roboto Slab";
131
+ font-style: normal;
132
+ font-weight: 100 900;
133
+ font-display: swap;
134
+ src: url(https://fonts.gstatic.com/s/robotoslab/v34/BngMUXZYTXPIvIBgJJSb6ufC5qW54A.woff2)
135
+ format("woff2");
136
+ unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
137
+ U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
138
+ U+1EA0-1EF9, U+20AB;
139
+ }
140
+ /* latin-ext */
141
+ @font-face {
142
+ font-family: "Roboto Slab";
143
+ font-style: normal;
144
+ font-weight: 100 900;
145
+ font-display: swap;
146
+ src: url(https://fonts.gstatic.com/s/robotoslab/v34/BngMUXZYTXPIvIBgJJSb6ufD5qW54A.woff2)
147
+ format("woff2");
148
+ unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
149
+ U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
150
+ U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
151
+ }
152
+ /* latin */
153
+ @font-face {
154
+ font-family: "Roboto Slab";
155
+ font-style: normal;
156
+ font-weight: 100 900;
157
+ font-display: swap;
158
+ src: url(https://fonts.gstatic.com/s/robotoslab/v34/BngMUXZYTXPIvIBgJJSb6ufN5qU.woff2)
159
+ format("woff2");
160
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
161
+ U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
162
+ U+2212, U+2215, U+FEFF, U+FFFD;
163
+ }
164
+
165
+ /* Default overlay variable */
166
+ .overlay {
167
+ --fallback-darker-mutual: black;
168
+ }
169
+
170
+ body,
171
+ .overlay {
172
+ font-family: "Aldrich", sans-serif;
173
+ }
174
+
175
+ .main_bar {
176
+ /* Empty */
177
+ }
178
+
179
+ .name_box {
180
+ font-size: 28px;
181
+ height: 62px;
182
+ width: 280px;
183
+ padding-left: 10px;
184
+ padding-right: 10px;
185
+ font-weight: 800;
186
+ line-height: 0.9;
187
+ background: #1e1e1e;
188
+ padding-bottom: 15px;
189
+ }
190
+
191
+ .left_name_box {
192
+ justify-content: end;
193
+ padding-right: 15px;
194
+ }
195
+
196
+ .right_name_box {
197
+ justify-content: start;
198
+ padding-left: 15px;
199
+ }
200
+
201
+ .logo_box {
202
+ padding: 15px;
203
+ width: 77px;
204
+ height: 77px;
205
+ background: #121212;
206
+ }
207
+
208
+ .left_logo_box {
209
+ /* Empty */
210
+ }
211
+
212
+ .right_logo_box {
213
+ /* Empty */
214
+ }
215
+
216
+ .score_box {
217
+ font-size: 52px;
218
+ height: 77px;
219
+ width: 77px;
220
+ color: white;
221
+ }
222
+
223
+ .left_score_box {
224
+ background: var(--team-left-primary);
225
+ }
226
+
227
+ .right_score_box {
228
+ background: var(--team-right-primary);
229
+ }
230
+
231
+ .time_box {
232
+ color: white;
233
+ font-size: 42px;
234
+ height: 57px;
235
+ width: 274px;
236
+ background: #121212;
237
+ padding-bottom: 20px;
238
+ }
239
+
240
+ .top_bar {
241
+ display: none;
242
+ }
243
+ .bottom_bar {
244
+ /* Empty */
245
+ }
246
+
247
+ .series_box {
248
+ /* Empty */
249
+ }
250
+
251
+ .left_series_box {
252
+ transform: translate(-100px, -20px);
253
+ }
254
+
255
+ .right_series_box {
256
+ transform: translate(100px, -20px);
257
+ }
258
+
259
+ .series_score_box {
260
+ margin-left: 2px;
261
+ margin-right: 2px;
262
+ height: 8px;
263
+ width: 36px;
264
+ }
265
+
266
+ .series_score_box_point {
267
+ /* Empty */
268
+ }
269
+
270
+ .series_score_box_empty {
271
+ background-color: var(--team-left-mutual);
272
+ }
273
+
274
+ .left_series_score_box_point {
275
+ background-color: var(--team-left-primary);
276
+ }
277
+
278
+ .left_series_score_box_empty {
279
+ /* Empty */
280
+ }
281
+
282
+ .right_series_score_box_point {
283
+ background-color: var(--team-right-primary);
284
+ }
285
+
286
+ .right_series_score_box_empty {
287
+ /* Empty */
288
+ }
289
+
290
+ .game_box {
291
+ font-size: 20px;
292
+ width: 254px;
293
+ margin-top: -27px;
294
+ }
295
+
296
+ .series_info_box {
297
+ display: none;
298
+ }
299
+
300
+ .team_box {
301
+ color: white;
302
+ position: absolute; /* changed */
303
+ top: 0px;
304
+ }
305
+
306
+ .left_team_box {
307
+ left: 0;
308
+ }
309
+
310
+ .right_team_box {
311
+ right: 0;
312
+ }
313
+
314
+ .player_box {
315
+ height: 38px;
316
+ width: 290px;
317
+ margin-bottom: 0px;
318
+ background-color: #1e1e1e;
319
+ }
320
+
321
+ .left_player_box {
322
+ /* Empty */
323
+ }
324
+
325
+ .right_player_box {
326
+ /* Empty */
327
+ }
328
+
329
+ .player_name {
330
+ font-size: 20px;
331
+ position: absolute;
332
+ top: 5px;
333
+ text-transform: uppercase;
334
+ text-overflow: ellipsis;
335
+ max-width: 190px;
336
+ white-space: nowrap;
337
+ overflow: hidden;
338
+ }
339
+
340
+ .left_player_name {
341
+ left: 5px;
342
+ }
343
+
344
+ .right_player_name {
345
+ right: 5px;
346
+ }
347
+
348
+ .player_boost {
349
+ font-size: 20px;
350
+ position: absolute;
351
+ top: 5px;
352
+ opacity: 0.7;
353
+ }
354
+
355
+ .left_player_boost {
356
+ right: 5px;
357
+ }
358
+
359
+ .right_player_boost {
360
+ left: 5px;
361
+ }
362
+
363
+ .boost_meter {
364
+ width: 100%;
365
+ height: 6px;
366
+ margin-top: auto;
367
+ margin-left: auto;
368
+ margin-right: auto;
369
+ background-color: var(--team-left-mutual);
370
+ }
371
+
372
+ .left_boost_meter {
373
+ /* Empty */
374
+ }
375
+
376
+ .right_boost_meter {
377
+ /* Empty */
378
+ }
379
+
380
+ .left_boost_meter_bar {
381
+ background-color: var(--team-left-primary);
382
+ }
383
+
384
+ .right_boost_meter_bar {
385
+ background-color: var(--team-right-primary);
386
+ }
387
+
388
+ .stat_box {
389
+ background-color: #1e1e1e;
390
+ height: 40px;
391
+ display: flex;
392
+ }
393
+
394
+ .stat_box_player {
395
+ padding-left: 20px;
396
+ padding-right: 20px;
397
+ padding-top: 6px;
398
+ font-size: 24px;
399
+ height: 34px;
400
+ background: var(--team-left-mutual);
401
+ text-transform: uppercase;
402
+ text-overflow: ellipsis;
403
+ width: 240px;
404
+ text-align: center;
405
+ white-space: nowrap;
406
+ overflow: hidden;
407
+ }
408
+
409
+ .stat_box_statistic {
410
+ display: flex;
411
+ justify-content: flex-end;
412
+ margin: auto;
413
+ white-space: nowrap;
414
+ padding-left: 10px;
415
+ padding-right: 10px;
416
+ }
417
+
418
+ /* Renamed class */
419
+ .stat_box_statistic_value {
420
+ font-size: 22px;
421
+ margin-right: 3px;
422
+ min-width: 25px;
423
+ text-align: right;
424
+ }
425
+
426
+ .stat_box_statistic_name {
427
+ padding-top: 5px;
428
+ opacity: 0.5;
429
+ }
430
+
431
+ .stat_box_statistic_player_id,
432
+ .stat_box_statistic_player_team,
433
+ .stat_box_statistic_player_location,
434
+ .stat_box_statistic_player_touches {
435
+ display: none;
436
+ }
437
+
438
+ /* Target Boost (the circular meter) */
439
+ .target_boost {
440
+ font-size: 3rem;
441
+ font-weight: bold;
442
+ position: absolute;
443
+ bottom: 0;
444
+ right: 0;
445
+ margin-left: auto;
446
+ left: unset;
447
+ width: 200px;
448
+ height: 200px;
449
+ margin-bottom: 50px;
450
+ margin-right: 50px;
451
+ border-radius: 50%;
452
+ display: flex;
453
+ flex-direction: column;
454
+ align-items: center;
455
+ justify-content: center;
456
+ color: white;
457
+ overflow: hidden;
458
+ transition: opacity 0.3s ease, transform 0.3s ease;
459
+ }
460
+
461
+ .left_target_boost.target_boost {
462
+ color: var(--team-0-secondary);
463
+ }
464
+
465
+ .right_target_boost.target_boost {
466
+ color: var(--team-1-secondary);
467
+ }
468
+
469
+ .target_boost.entering {
470
+ animation: fadeIn 0.5s ease-in-out;
471
+ }
472
+
473
+ .target_boost.exiting {
474
+ animation: fadeOut 0.5s ease-in-out;
475
+ }
476
+
477
+ .left_target_boost {
478
+ border: 5px solid var(--team-left-mutual);
479
+ background: #07132d;
480
+ }
481
+
482
+ .right_target_boost {
483
+ border: 5px solid var(--team-left-mutual);
484
+ background: var(--team-left-mutual);
485
+ }
486
+
487
+ .target_boost_container {
488
+ width: 100%;
489
+ height: 100%;
490
+ display: flex;
491
+ flex-direction: column;
492
+ align-items: center;
493
+ justify-content: center;
494
+ border-radius: 50%;
495
+ }
496
+
497
+ .left_target_boost_container {
498
+ }
499
+
500
+ .right_target_boost_container {
501
+ }
502
+
503
+ .target_boost_meter {
504
+ position: absolute;
505
+ height: 100%;
506
+ width: 100%;
507
+ border-radius: 50%;
508
+ display: flex;
509
+ justify-content: center;
510
+ align-items: center;
511
+ transition: all 0.5s ease-in-out;
512
+ }
513
+
514
+ .left_target_boost_meter {
515
+ background: conic-gradient(
516
+ var(--team-left-primary-dark) calc(90deg * var(--target_boost) / 100),
517
+ var(--team-left-primary-light) calc(180deg * var(--target_boost) / 100),
518
+ var(--team-left-primary-light) calc(30deg * var(--target_boost) / 100),
519
+ var(--team-left-primary) calc(270deg * var(--target_boost) / 100),
520
+ var(--team-left-primary-dark) calc(360deg * var(--target_boost) / 100),
521
+ var(--fallback-darker-mutual) calc(0deg * var(--target_boost) / 100)
522
+ ) !important;
523
+ transition: all 0.5s ease-in-out;
524
+ }
525
+
526
+ .right_target_boost_meter {
527
+ background: conic-gradient(
528
+ var(--team-right-primary-dark) calc(90deg * var(--target_boost) / 100),
529
+ var(--team-right-primary-light) calc(180deg * var(--target_boost) / 100),
530
+ var(--team-right-primary-light) calc(30deg * var(--target_boost) / 100),
531
+ var(--team-right-primary) calc(270deg * var(--target_boost) / 100),
532
+ var(--team-right-primary-dark) calc(360deg * var(--target_boost) / 100),
533
+ var(--fallback-darker-mutual) calc(0deg * var(--target_boost) / 100)
534
+ ) !important;
535
+
536
+ transition: all 0.5s ease-in-out;
537
+ }
538
+
539
+ .target_boost_meter_inner {
540
+ position: absolute;
541
+ margin: auto;
542
+ width: 80%;
543
+ height: 80%;
544
+ border-radius: 50%;
545
+ z-index: 50;
546
+ }
547
+
548
+ .left_target_boost_meter_inner {
549
+ background: var(--team-left-mutual);
550
+ }
551
+
552
+ .right_target_boost_meter_inner {
553
+ background: var(--team-left-mutual);
554
+ }
555
+
556
+ .target_boost_svg {
557
+ position: absolute;
558
+ width: 100%;
559
+ height: 100%;
560
+ z-index: 500;
561
+ display: flex;
562
+ justify-content: center;
563
+ align-items: center;
564
+ }
565
+
566
+ .target_boost_svg_circle {
567
+ stroke-dasharray: 4 25%;
568
+ stroke-width: 41;
569
+ stroke-dashoffset: 18;
570
+ fill: transparent;
571
+ }
572
+
573
+ .left_target_boost_svg_circle {
574
+ stroke: var(--team-left-mutual);
575
+ }
576
+
577
+ .right_target_boost_svg_circle {
578
+ stroke: var(--team-left-mutual);
579
+ }
580
+
581
+ .target_boost_value {
582
+ position: absolute;
583
+ z-index: 500;
584
+ color: white;
585
+ }
586
+
587
+ .left_target_boost_value {
588
+ color: var(--team-left-secondary);
589
+ }
590
+
591
+ .right_target_boost_value {
592
+ color: var(--team-right-secondary);
593
+ }
594
+ /* Target Boost END */
package/src/index.ts CHANGED
@@ -13,5 +13,7 @@ export * from "./TargetPlayerLocation";
13
13
  export * from "./TargetPlayerStats";
14
14
  export * from "./Team";
15
15
  export * from "./Timer";
16
+ export * from "./OverlaySlot";
16
17
  export * from "@four-leaf-studios/rl-socket-hook";
17
18
  export * from "./hooks/index";
19
+ export * from "./registry";
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+ import PlayerBoost from "./PlayerBoost";
3
+ import Replay from "./Replay";
4
+ import Scoreboard from "./Scoreboard";
5
+ import TargetBoost from "./TargetBoost";
6
+ import TargetPlayer from "./TargetPlayer";
7
+ import Teams from "./Teams";
8
+ import Timer from "./Timer";
9
+
10
+ // Component registry mapping code_id -> React component
11
+ export const componentRegistry: Record<string, React.ComponentType<any>> = {
12
+ Scoreboard,
13
+ Teams,
14
+ TargetPlayer,
15
+ TargetBoost,
16
+ Replay,
17
+ Timer,
18
+ PlayerBoost,
19
+ };
package/src/types.d.ts CHANGED
@@ -57,3 +57,23 @@ export type Broadcast = {
57
57
  teams: Team[];
58
58
  overlay?: Overlay;
59
59
  };
60
+
61
+ // Each overlay component
62
+ export type Position = {
63
+ top?: number;
64
+ left?: number;
65
+ width?: number | string;
66
+ height?: number | string;
67
+ };
68
+
69
+ export type OverlayComponentData = {
70
+ id: string;
71
+ name: string;
72
+ css: string;
73
+ code_id: string;
74
+ position?: Position;
75
+ };
76
+
77
+ export type OverlayObject = {
78
+ components: OverlayComponentData[];
79
+ };