@lumiastream/ui 0.3.3 → 0.3.4
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/dist/LSFontPicker.js +37 -25
- package/dist/components.js +37 -25
- package/dist/index.js +619 -185
- package/dist/se-import.js +619 -185
- package/package.json +1 -1
package/dist/se-import.js
CHANGED
|
@@ -8,7 +8,7 @@ var SE_TO_LUMIA_PLACEHOLDER = {
|
|
|
8
8
|
displayName: "displayname",
|
|
9
9
|
sender: "gifter",
|
|
10
10
|
amount: "amount",
|
|
11
|
-
currency: "
|
|
11
|
+
currency: "currencySymbol",
|
|
12
12
|
message: "message",
|
|
13
13
|
items: "itemsDetailed",
|
|
14
14
|
item: "firstItem.name",
|
|
@@ -23,7 +23,10 @@ var SE_TO_LUMIA_PLACEHOLDER = {
|
|
|
23
23
|
streamer: "streamer"
|
|
24
24
|
};
|
|
25
25
|
var TWITCH_CONTEXTS = {
|
|
26
|
-
"follower-latest": {
|
|
26
|
+
"follower-latest": {
|
|
27
|
+
name: "twitch_last_follower",
|
|
28
|
+
username: "twitch_last_follower"
|
|
29
|
+
},
|
|
27
30
|
// Three SE listeners with genuinely distinct semantics — preserve the
|
|
28
31
|
// distinction in the variable mapping so a widget configured for "Latest
|
|
29
32
|
// new subscriber" doesn't render the latest *resub* (and vice versa).
|
|
@@ -31,9 +34,18 @@ var TWITCH_CONTEXTS = {
|
|
|
31
34
|
// are subtype-specific. The dedicated TWITCH_LAST_{NEW_SUBSCRIBER,
|
|
32
35
|
// RESUBSCRIBER} variables are written by the Twitch event pipeline on
|
|
33
36
|
// the matching sub.type event.
|
|
34
|
-
"subscriber-latest": {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
"subscriber-latest": {
|
|
38
|
+
name: "twitch_last_subscriber",
|
|
39
|
+
username: "twitch_last_subscriber"
|
|
40
|
+
},
|
|
41
|
+
"subscriber-new-latest": {
|
|
42
|
+
name: "twitch_last_new_subscriber",
|
|
43
|
+
username: "twitch_last_new_subscriber"
|
|
44
|
+
},
|
|
45
|
+
"subscriber-resub-latest": {
|
|
46
|
+
name: "twitch_last_resubscriber",
|
|
47
|
+
username: "twitch_last_resubscriber"
|
|
48
|
+
},
|
|
37
49
|
// `subscriber-gifted-latest`: SE uses `{sender}` for the giver and `{name}` for
|
|
38
50
|
// the recipient (e.g. "{sender} gifted to {name}"). The two roles must point
|
|
39
51
|
// at distinct Lumia variables — collapsing both onto `twitch_last_gifter`
|
|
@@ -41,12 +53,45 @@ var TWITCH_CONTEXTS = {
|
|
|
41
53
|
// nowhere. `sender` keeps the gifter; `name` / `username` switch to the
|
|
42
54
|
// dedicated recipient variable `twitch_last_gifted`. Amount stays on the
|
|
43
55
|
// gifter (it's the count of subs in that drop, owned by the gifter).
|
|
44
|
-
"subscriber-gifted-latest": {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
56
|
+
"subscriber-gifted-latest": {
|
|
57
|
+
name: "twitch_last_gifted",
|
|
58
|
+
username: "twitch_last_gifted",
|
|
59
|
+
sender: "twitch_last_gifter",
|
|
60
|
+
amount: "twitch_last_gifter_amount",
|
|
61
|
+
count: "twitch_last_gifter_amount"
|
|
62
|
+
},
|
|
63
|
+
"subscriber-alltime-gifter": {
|
|
64
|
+
name: "twitch_alltime_top_gifter",
|
|
65
|
+
username: "twitch_alltime_top_gifter",
|
|
66
|
+
amount: "twitch_alltime_top_gifter_amount",
|
|
67
|
+
count: "twitch_alltime_top_gifter_amount"
|
|
68
|
+
},
|
|
69
|
+
"cheer-latest": {
|
|
70
|
+
name: "twitch_last_bit",
|
|
71
|
+
username: "twitch_last_bit",
|
|
72
|
+
amount: "twitch_last_bit_amount",
|
|
73
|
+
count: "twitch_last_bit_amount"
|
|
74
|
+
},
|
|
75
|
+
"tip-latest": {
|
|
76
|
+
name: "latest_donator",
|
|
77
|
+
username: "latest_donator",
|
|
78
|
+
amount: "latest_donator_amount",
|
|
79
|
+
count: "latest_donator_amount",
|
|
80
|
+
currency: "latest_donator_currency_symbol"
|
|
81
|
+
},
|
|
82
|
+
latest_donator: {
|
|
83
|
+
name: "latest_donator",
|
|
84
|
+
username: "latest_donator",
|
|
85
|
+
amount: "latest_donator_amount",
|
|
86
|
+
count: "latest_donator_amount",
|
|
87
|
+
currency: "latest_donator_currency_symbol"
|
|
88
|
+
},
|
|
89
|
+
"raid-latest": {
|
|
90
|
+
name: "twitch_last_raider",
|
|
91
|
+
username: "twitch_last_raider",
|
|
92
|
+
amount: "twitch_last_raid_amount",
|
|
93
|
+
count: "twitch_last_raid_amount"
|
|
94
|
+
},
|
|
50
95
|
// Period counters: count/amount = the running counter for that window.
|
|
51
96
|
// SE lets the streamer pick session / week / month / total on the same widget
|
|
52
97
|
// type; the chosen period lands in `widget.listener` (e.g. `cheer-week`).
|
|
@@ -54,25 +99,86 @@ var TWITCH_CONTEXTS = {
|
|
|
54
99
|
// table only carried session+total and broke any widget configured for
|
|
55
100
|
// week/month because `{amount}` fell through to the unscoped placeholder
|
|
56
101
|
// and rendered blank.
|
|
57
|
-
"follower-session": {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
|
|
102
|
+
"follower-session": {
|
|
103
|
+
amount: "twitch_session_follower_count",
|
|
104
|
+
count: "twitch_session_follower_count"
|
|
105
|
+
},
|
|
106
|
+
"follower-week": {
|
|
107
|
+
amount: "twitch_week_follower_count",
|
|
108
|
+
count: "twitch_week_follower_count"
|
|
109
|
+
},
|
|
110
|
+
"follower-month": {
|
|
111
|
+
amount: "twitch_month_follower_count",
|
|
112
|
+
count: "twitch_month_follower_count"
|
|
113
|
+
},
|
|
114
|
+
"follower-total": {
|
|
115
|
+
amount: "twitch_total_follower_count",
|
|
116
|
+
count: "twitch_total_follower_count"
|
|
117
|
+
},
|
|
118
|
+
"subscriber-session": {
|
|
119
|
+
amount: "twitch_session_subscribers_count",
|
|
120
|
+
count: "twitch_session_subscribers_count"
|
|
121
|
+
},
|
|
122
|
+
"subscriber-week": {
|
|
123
|
+
amount: "twitch_week_subscriber_count",
|
|
124
|
+
count: "twitch_week_subscriber_count"
|
|
125
|
+
},
|
|
126
|
+
"subscriber-month": {
|
|
127
|
+
amount: "twitch_month_subscriber_count",
|
|
128
|
+
count: "twitch_month_subscriber_count"
|
|
129
|
+
},
|
|
130
|
+
"subscriber-total": {
|
|
131
|
+
amount: "twitch_total_subscriber_count",
|
|
132
|
+
count: "twitch_total_subscriber_count"
|
|
133
|
+
},
|
|
134
|
+
"subscriber-new-session": {
|
|
135
|
+
amount: "twitch_session_new_subscribers_count",
|
|
136
|
+
count: "twitch_session_new_subscribers_count"
|
|
137
|
+
},
|
|
138
|
+
"subscriber-resub-session": {
|
|
139
|
+
amount: "twitch_session_resub_subscribers_count",
|
|
140
|
+
count: "twitch_session_resub_subscribers_count"
|
|
141
|
+
},
|
|
142
|
+
"subscriber-gifted-session": {
|
|
143
|
+
amount: "twitch_session_gifted_subscribers_count",
|
|
144
|
+
count: "twitch_session_gifted_subscribers_count"
|
|
145
|
+
},
|
|
146
|
+
"cheer-session": {
|
|
147
|
+
amount: "twitch_session_bits_count",
|
|
148
|
+
count: "twitch_session_bits_count"
|
|
149
|
+
},
|
|
150
|
+
"cheer-week": {
|
|
151
|
+
amount: "twitch_week_bits_count",
|
|
152
|
+
count: "twitch_week_bits_count"
|
|
153
|
+
},
|
|
154
|
+
"cheer-month": {
|
|
155
|
+
amount: "twitch_month_bits_count",
|
|
156
|
+
count: "twitch_month_bits_count"
|
|
157
|
+
},
|
|
158
|
+
"cheer-total": {
|
|
159
|
+
amount: "twitch_total_bits_count",
|
|
160
|
+
count: "twitch_total_bits_count"
|
|
161
|
+
},
|
|
162
|
+
"tip-session": {
|
|
163
|
+
amount: "session_donation_amount",
|
|
164
|
+
count: "session_donation_count",
|
|
165
|
+
currency: "session_donation_amount_currency_symbol"
|
|
166
|
+
},
|
|
167
|
+
"tip-week": {
|
|
168
|
+
amount: "week_donation_amount",
|
|
169
|
+
count: "week_donation_count",
|
|
170
|
+
currency: "week_donation_amount_currency_symbol"
|
|
171
|
+
},
|
|
172
|
+
"tip-month": {
|
|
173
|
+
amount: "month_donation_amount",
|
|
174
|
+
count: "month_donation_count",
|
|
175
|
+
currency: "month_donation_amount_currency_symbol"
|
|
176
|
+
},
|
|
177
|
+
"tip-total": {
|
|
178
|
+
amount: "total_donation_amount",
|
|
179
|
+
count: "total_donation_amount",
|
|
180
|
+
currency: "total_donation_amount_currency_symbol"
|
|
181
|
+
},
|
|
76
182
|
"tip-count": { amount: "donation_count", count: "donation_count" },
|
|
77
183
|
// Top cheer / cheerer / donator readouts — per period. SE's `se-widget-top-*`
|
|
78
184
|
// widgets encode the chosen period (session / weekly / monthly / alltime) in
|
|
@@ -88,26 +194,118 @@ var TWITCH_CONTEXTS = {
|
|
|
88
194
|
// "the user who made the top donation", so the two rows below carry the
|
|
89
195
|
// same name/username mapping — anything else falls through to the unscoped
|
|
90
196
|
// `{{username}}` and renders blank.
|
|
91
|
-
"cheer-session-top-donation": {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"cheer-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
197
|
+
"cheer-session-top-donation": {
|
|
198
|
+
name: "twitch_session_top_cheerer",
|
|
199
|
+
username: "twitch_session_top_cheerer",
|
|
200
|
+
amount: "twitch_session_top_cheer_amount",
|
|
201
|
+
count: "twitch_session_top_cheer_amount"
|
|
202
|
+
},
|
|
203
|
+
"cheer-session-top-donator": {
|
|
204
|
+
name: "twitch_session_top_cheerer",
|
|
205
|
+
username: "twitch_session_top_cheerer",
|
|
206
|
+
amount: "twitch_session_top_cheerer_amount",
|
|
207
|
+
count: "twitch_session_top_cheerer_amount"
|
|
208
|
+
},
|
|
209
|
+
"cheer-weekly-top-donation": {
|
|
210
|
+
name: "twitch_week_top_cheerer",
|
|
211
|
+
username: "twitch_week_top_cheerer",
|
|
212
|
+
amount: "twitch_week_top_cheerer_amount",
|
|
213
|
+
count: "twitch_week_top_cheerer_amount"
|
|
214
|
+
},
|
|
215
|
+
"cheer-weekly-top-donator": {
|
|
216
|
+
name: "twitch_week_top_cheerer",
|
|
217
|
+
username: "twitch_week_top_cheerer",
|
|
218
|
+
amount: "twitch_week_top_cheerer_amount",
|
|
219
|
+
count: "twitch_week_top_cheerer_amount"
|
|
220
|
+
},
|
|
221
|
+
"cheer-monthly-top-donation": {
|
|
222
|
+
name: "twitch_month_top_cheerer",
|
|
223
|
+
username: "twitch_month_top_cheerer",
|
|
224
|
+
amount: "twitch_month_top_cheerer_amount",
|
|
225
|
+
count: "twitch_month_top_cheerer_amount"
|
|
226
|
+
},
|
|
227
|
+
"cheer-monthly-top-donator": {
|
|
228
|
+
name: "twitch_month_top_cheerer",
|
|
229
|
+
username: "twitch_month_top_cheerer",
|
|
230
|
+
amount: "twitch_month_top_cheerer_amount",
|
|
231
|
+
count: "twitch_month_top_cheerer_amount"
|
|
232
|
+
},
|
|
233
|
+
"cheer-alltime-top-donation": {
|
|
234
|
+
name: "twitch_alltime_top_cheerer",
|
|
235
|
+
username: "twitch_alltime_top_cheerer",
|
|
236
|
+
amount: "twitch_alltime_top_cheerer_amount",
|
|
237
|
+
count: "twitch_alltime_top_cheerer_amount"
|
|
238
|
+
},
|
|
239
|
+
"cheer-alltime-top-donator": {
|
|
240
|
+
name: "twitch_alltime_top_cheerer",
|
|
241
|
+
username: "twitch_alltime_top_cheerer",
|
|
242
|
+
amount: "twitch_alltime_top_cheerer_amount",
|
|
243
|
+
count: "twitch_alltime_top_cheerer_amount"
|
|
244
|
+
},
|
|
245
|
+
"tip-session-top-donation": {
|
|
246
|
+
name: "session_top_donator",
|
|
247
|
+
username: "session_top_donator",
|
|
248
|
+
amount: "session_top_donator_amount",
|
|
249
|
+
count: "session_top_donator_amount",
|
|
250
|
+
currency: "session_top_donator_currency_symbol"
|
|
251
|
+
},
|
|
252
|
+
"tip-session-top-donator": {
|
|
253
|
+
name: "session_top_donator",
|
|
254
|
+
username: "session_top_donator",
|
|
255
|
+
amount: "session_top_donator_amount",
|
|
256
|
+
count: "session_top_donator_amount",
|
|
257
|
+
currency: "session_top_donator_currency_symbol"
|
|
258
|
+
},
|
|
259
|
+
"tip-weekly-top-donation": {
|
|
260
|
+
name: "week_top_donator",
|
|
261
|
+
username: "week_top_donator",
|
|
262
|
+
amount: "week_top_donator_amount",
|
|
263
|
+
count: "week_top_donator_amount",
|
|
264
|
+
currency: "week_top_donator_currency_symbol"
|
|
265
|
+
},
|
|
266
|
+
"tip-weekly-top-donator": {
|
|
267
|
+
name: "week_top_donator",
|
|
268
|
+
username: "week_top_donator",
|
|
269
|
+
amount: "week_top_donator_amount",
|
|
270
|
+
count: "week_top_donator_amount",
|
|
271
|
+
currency: "week_top_donator_currency_symbol"
|
|
272
|
+
},
|
|
273
|
+
"tip-monthly-top-donation": {
|
|
274
|
+
name: "month_top_donator",
|
|
275
|
+
username: "month_top_donator",
|
|
276
|
+
amount: "month_top_donator_amount",
|
|
277
|
+
count: "month_top_donator_amount",
|
|
278
|
+
currency: "month_top_donator_currency_symbol"
|
|
279
|
+
},
|
|
280
|
+
"tip-monthly-top-donator": {
|
|
281
|
+
name: "month_top_donator",
|
|
282
|
+
username: "month_top_donator",
|
|
283
|
+
amount: "month_top_donator_amount",
|
|
284
|
+
count: "month_top_donator_amount",
|
|
285
|
+
currency: "month_top_donator_currency_symbol"
|
|
286
|
+
},
|
|
287
|
+
"tip-alltime-top-donation": {
|
|
288
|
+
name: "top_donator",
|
|
289
|
+
username: "top_donator",
|
|
290
|
+
amount: "top_donator_amount",
|
|
291
|
+
count: "top_donator_amount",
|
|
292
|
+
currency: "top_donator_currency_symbol"
|
|
293
|
+
},
|
|
294
|
+
"tip-alltime-top-donator": {
|
|
295
|
+
name: "top_donator",
|
|
296
|
+
username: "top_donator",
|
|
297
|
+
amount: "top_donator_amount",
|
|
298
|
+
count: "top_donator_amount",
|
|
299
|
+
currency: "top_donator_currency_symbol"
|
|
300
|
+
},
|
|
107
301
|
// Botcounter — SE uses `{wins}` for the running chat count; the dispatcher's
|
|
108
302
|
// fallbackVar for `se-widget-botcounter` is `twitch_session_chat_count`, so
|
|
109
303
|
// when the listener arg lands as that var name we treat it as the wins source.
|
|
110
|
-
twitch_session_chat_count: {
|
|
304
|
+
twitch_session_chat_count: {
|
|
305
|
+
wins: "twitch_session_chat_count",
|
|
306
|
+
count: "twitch_session_chat_count",
|
|
307
|
+
amount: "twitch_session_chat_count"
|
|
308
|
+
},
|
|
111
309
|
// Merch readouts — SE used to ship via their own shop, now most users route
|
|
112
310
|
// through Fourthwall. Lumia exposes `fourthwall_last_order` as a full object:
|
|
113
311
|
// { username, email, friendlyId, amount, currency, message, items,
|
|
@@ -136,45 +334,151 @@ var TWITCH_CONTEXTS = {
|
|
|
136
334
|
}
|
|
137
335
|
};
|
|
138
336
|
var KICK_CONTEXTS = {
|
|
139
|
-
"follower-latest": {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
337
|
+
"follower-latest": {
|
|
338
|
+
name: "kick_last_follower",
|
|
339
|
+
username: "kick_last_follower"
|
|
340
|
+
},
|
|
341
|
+
"subscriber-latest": {
|
|
342
|
+
name: "kick_last_subscriber",
|
|
343
|
+
username: "kick_last_subscriber"
|
|
344
|
+
},
|
|
345
|
+
"subscriber-new-latest": {
|
|
346
|
+
name: "kick_last_subscriber",
|
|
347
|
+
username: "kick_last_subscriber"
|
|
348
|
+
},
|
|
349
|
+
"subscriber-resub-latest": {
|
|
350
|
+
name: "kick_last_subscriber",
|
|
351
|
+
username: "kick_last_subscriber"
|
|
352
|
+
},
|
|
143
353
|
// Mirror the Twitch split: `{sender}` = giver, `{name}` = recipient.
|
|
144
354
|
// `kick_last_gifted` was added alongside this mapping; see twitch context
|
|
145
355
|
// above for the rationale (without the split, SE's "{sender} gifted to
|
|
146
356
|
// {name}" renders the gifter on both sides).
|
|
147
|
-
"subscriber-gifted-latest": {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
"
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
"
|
|
357
|
+
"subscriber-gifted-latest": {
|
|
358
|
+
name: "kick_last_gifted",
|
|
359
|
+
username: "kick_last_gifted",
|
|
360
|
+
sender: "kick_last_gifter",
|
|
361
|
+
amount: "kick_last_gifter_amount",
|
|
362
|
+
count: "kick_last_gifter_amount"
|
|
363
|
+
},
|
|
364
|
+
"cheer-latest": {
|
|
365
|
+
name: "kick_last_kicks",
|
|
366
|
+
username: "kick_last_kicks",
|
|
367
|
+
amount: "kick_last_kicks_amount",
|
|
368
|
+
count: "kick_last_kicks_amount"
|
|
369
|
+
},
|
|
370
|
+
"raid-latest": {
|
|
371
|
+
name: "kick_last_host",
|
|
372
|
+
username: "kick_last_host",
|
|
373
|
+
amount: "kick_last_host_amount",
|
|
374
|
+
count: "kick_last_host_amount"
|
|
375
|
+
},
|
|
376
|
+
"follower-session": {
|
|
377
|
+
amount: "kick_session_follower_count",
|
|
378
|
+
count: "kick_session_follower_count"
|
|
379
|
+
},
|
|
380
|
+
"subscriber-session": {
|
|
381
|
+
amount: "kick_session_subscriber_count",
|
|
382
|
+
count: "kick_session_subscriber_count"
|
|
383
|
+
},
|
|
384
|
+
"cheer-session": {
|
|
385
|
+
amount: "kick_session_kicks_count",
|
|
386
|
+
count: "kick_session_kicks_count"
|
|
387
|
+
},
|
|
388
|
+
"subscriber-gifted-session": {
|
|
389
|
+
amount: "kick_session_gifts_count",
|
|
390
|
+
count: "kick_session_gifts_count"
|
|
391
|
+
},
|
|
392
|
+
"follower-total": {
|
|
393
|
+
amount: "kick_total_follower_count",
|
|
394
|
+
count: "kick_total_follower_count"
|
|
395
|
+
},
|
|
396
|
+
"subscriber-total": {
|
|
397
|
+
amount: "kick_total_subscriber_count",
|
|
398
|
+
count: "kick_total_subscriber_count"
|
|
399
|
+
},
|
|
400
|
+
"cheer-total": {
|
|
401
|
+
amount: "kick_total_kicks_count",
|
|
402
|
+
count: "kick_total_kicks_count"
|
|
403
|
+
},
|
|
404
|
+
"follower-week": {
|
|
405
|
+
amount: "kick_week_follower_count",
|
|
406
|
+
count: "kick_week_follower_count"
|
|
407
|
+
},
|
|
408
|
+
"follower-month": {
|
|
409
|
+
amount: "kick_month_follower_count",
|
|
410
|
+
count: "kick_month_follower_count"
|
|
411
|
+
},
|
|
412
|
+
"subscriber-week": {
|
|
413
|
+
amount: "kick_week_subscriber_count",
|
|
414
|
+
count: "kick_week_subscriber_count"
|
|
415
|
+
},
|
|
416
|
+
"subscriber-month": {
|
|
417
|
+
amount: "kick_month_subscriber_count",
|
|
418
|
+
count: "kick_month_subscriber_count"
|
|
419
|
+
}
|
|
161
420
|
};
|
|
162
421
|
var YOUTUBE_CONTEXTS = {
|
|
163
|
-
"follower-latest": {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
"subscriber-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
"
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
"
|
|
176
|
-
|
|
177
|
-
|
|
422
|
+
"follower-latest": {
|
|
423
|
+
name: "youtube_last_subscriber",
|
|
424
|
+
username: "youtube_last_subscriber"
|
|
425
|
+
},
|
|
426
|
+
"subscriber-latest": {
|
|
427
|
+
name: "youtube_last_member",
|
|
428
|
+
username: "youtube_last_member"
|
|
429
|
+
},
|
|
430
|
+
"subscriber-new-latest": {
|
|
431
|
+
name: "youtube_last_member",
|
|
432
|
+
username: "youtube_last_member"
|
|
433
|
+
},
|
|
434
|
+
"subscriber-resub-latest": {
|
|
435
|
+
name: "youtube_last_member",
|
|
436
|
+
username: "youtube_last_member"
|
|
437
|
+
},
|
|
438
|
+
"subscriber-gifted-latest": {
|
|
439
|
+
name: "youtube_last_gift_member",
|
|
440
|
+
username: "youtube_last_gift_member"
|
|
441
|
+
},
|
|
442
|
+
"cheer-latest": {
|
|
443
|
+
name: "youtube_last_superchatter",
|
|
444
|
+
username: "youtube_last_superchatter"
|
|
445
|
+
},
|
|
446
|
+
"follower-session": {
|
|
447
|
+
amount: "youtube_session_subscriber_count",
|
|
448
|
+
count: "youtube_session_subscriber_count"
|
|
449
|
+
},
|
|
450
|
+
"subscriber-session": {
|
|
451
|
+
amount: "youtube_session_member_count",
|
|
452
|
+
count: "youtube_session_member_count"
|
|
453
|
+
},
|
|
454
|
+
"cheer-session": {
|
|
455
|
+
amount: "youtube_session_superchat_count",
|
|
456
|
+
count: "youtube_session_superchat_count"
|
|
457
|
+
},
|
|
458
|
+
"follower-total": {
|
|
459
|
+
amount: "youtube_total_subscriber_count",
|
|
460
|
+
count: "youtube_total_subscriber_count"
|
|
461
|
+
},
|
|
462
|
+
"subscriber-total": {
|
|
463
|
+
amount: "youtube_total_member_count",
|
|
464
|
+
count: "youtube_total_member_count"
|
|
465
|
+
},
|
|
466
|
+
"follower-week": {
|
|
467
|
+
amount: "youtube_week_subscriber_count",
|
|
468
|
+
count: "youtube_week_subscriber_count"
|
|
469
|
+
},
|
|
470
|
+
"follower-month": {
|
|
471
|
+
amount: "youtube_month_subscriber_count",
|
|
472
|
+
count: "youtube_month_subscriber_count"
|
|
473
|
+
},
|
|
474
|
+
"subscriber-week": {
|
|
475
|
+
amount: "youtube_week_member_count",
|
|
476
|
+
count: "youtube_week_member_count"
|
|
477
|
+
},
|
|
478
|
+
"subscriber-month": {
|
|
479
|
+
amount: "youtube_month_member_count",
|
|
480
|
+
count: "youtube_month_member_count"
|
|
481
|
+
}
|
|
178
482
|
};
|
|
179
483
|
var RECENT_TO_LATEST_LISTENER = {
|
|
180
484
|
"follower-recent": "follower-latest",
|
|
@@ -226,11 +530,14 @@ function translateSeText(input, listener, passthrough, provider, options) {
|
|
|
226
530
|
if (!input) return "";
|
|
227
531
|
const ctx = listener ? listenerPlaceholderContext(listener, provider) : {};
|
|
228
532
|
const useAlertFallback = (options?.context ?? "alert") === "alert";
|
|
229
|
-
return input.replace(
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
533
|
+
return input.replace(
|
|
534
|
+
/\{([a-zA-Z][a-zA-Z0-9_.]*)\}/g,
|
|
535
|
+
(_match, raw) => {
|
|
536
|
+
if (passthrough?.has(raw)) return `{{${raw}}}`;
|
|
537
|
+
const mapped = ctx[raw] ?? (useAlertFallback ? SE_TO_LUMIA_PLACEHOLDER[raw] : void 0) ?? raw;
|
|
538
|
+
return `{{${mapped}}}`;
|
|
539
|
+
}
|
|
540
|
+
);
|
|
234
541
|
}
|
|
235
542
|
var KICK_LISTENER_VARS = {
|
|
236
543
|
"follower-latest": "kick_last_follower",
|
|
@@ -273,8 +580,10 @@ var YOUTUBE_LISTENER_VARS = {
|
|
|
273
580
|
function listenerToLumiaVariable(listener, provider = "twitch") {
|
|
274
581
|
if (typeof listener !== "string" || !listener) return "username";
|
|
275
582
|
const resolvedListener = RECENT_TO_LATEST_LISTENER[listener] ?? listener;
|
|
276
|
-
if (provider === "kick" && KICK_LISTENER_VARS[resolvedListener])
|
|
277
|
-
|
|
583
|
+
if (provider === "kick" && KICK_LISTENER_VARS[resolvedListener])
|
|
584
|
+
return KICK_LISTENER_VARS[resolvedListener];
|
|
585
|
+
if (provider === "youtube" && YOUTUBE_LISTENER_VARS[resolvedListener])
|
|
586
|
+
return YOUTUBE_LISTENER_VARS[resolvedListener];
|
|
278
587
|
const m = {
|
|
279
588
|
// Latest events
|
|
280
589
|
"follower-latest": "twitch_last_follower",
|
|
@@ -367,7 +676,9 @@ function seCssToBounds(css, defaults = { width: 600, height: 200 }, canvas) {
|
|
|
367
676
|
let x = toPx(css.left, 0, "width");
|
|
368
677
|
let y = toPx(css.top, 0, "height");
|
|
369
678
|
if (typeof css.transform === "string" && css.transform.includes("translate")) {
|
|
370
|
-
const m = /translate\s*\(\s*([^,)]+)\s*(?:,\s*([^)]+))?\s*\)/i.exec(
|
|
679
|
+
const m = /translate\s*\(\s*([^,)]+)\s*(?:,\s*([^)]+))?\s*\)/i.exec(
|
|
680
|
+
css.transform
|
|
681
|
+
);
|
|
371
682
|
if (m) {
|
|
372
683
|
const parseShift = (raw, basis) => {
|
|
373
684
|
if (!raw) return 0;
|
|
@@ -437,21 +748,33 @@ var LUMIA_DEFAULT_SIZES = {
|
|
|
437
748
|
};
|
|
438
749
|
function translateVariationCondition(seType, seCondition, requirement, seEventType) {
|
|
439
750
|
if (seType === "gift") return { conditionType: "IS_GIFT", condition: 1 };
|
|
440
|
-
if (seType === "communityGift")
|
|
751
|
+
if (seType === "communityGift")
|
|
752
|
+
return { conditionType: "GIFT_SUB_GREATER", condition: requirement ?? 0 };
|
|
441
753
|
const isSubscriberEvent = seEventType === "subscriber";
|
|
442
754
|
if (isSubscriberEvent && seCondition === "ATLEAST" && requirement != null) {
|
|
443
|
-
return {
|
|
755
|
+
return {
|
|
756
|
+
conditionType: "SUBSCRIBED_MONTHS_GREATER",
|
|
757
|
+
condition: requirement
|
|
758
|
+
};
|
|
444
759
|
}
|
|
445
760
|
if (isSubscriberEvent && seCondition === "EXACT" && requirement != null) {
|
|
446
761
|
return { conditionType: "SUBSCRIBED_MONTHS_EQUAL", condition: requirement };
|
|
447
762
|
}
|
|
448
|
-
if (seCondition === "EXACT" && requirement != null)
|
|
763
|
+
if (seCondition === "EXACT" && requirement != null)
|
|
764
|
+
return { conditionType: "EQUAL_NUMBER", condition: requirement };
|
|
449
765
|
if (seCondition === "ATLEAST" && requirement != null) {
|
|
450
766
|
return { conditionType: "GREATER_NUMBER", condition: requirement };
|
|
451
767
|
}
|
|
452
768
|
return { conditionType: "RANDOM", condition: 100 };
|
|
453
769
|
}
|
|
454
|
-
var LUMIA_LAYOUTS = /* @__PURE__ */ new Set([
|
|
770
|
+
var LUMIA_LAYOUTS = /* @__PURE__ */ new Set([
|
|
771
|
+
"column",
|
|
772
|
+
"row",
|
|
773
|
+
"onlyImage",
|
|
774
|
+
"onlyText",
|
|
775
|
+
"imageOver",
|
|
776
|
+
"textOver"
|
|
777
|
+
]);
|
|
455
778
|
var SE_LAYOUT_ALIASES = {
|
|
456
779
|
behind: "textOver"
|
|
457
780
|
};
|
|
@@ -478,13 +801,27 @@ function mapSeTextCssToModuleCss(widget, defaults = {}) {
|
|
|
478
801
|
return fallback;
|
|
479
802
|
};
|
|
480
803
|
return {
|
|
481
|
-
lineHeight: asNumOrStr(
|
|
804
|
+
lineHeight: asNumOrStr(
|
|
805
|
+
seTextCss["line-height"],
|
|
806
|
+
defaults.lineHeight ?? "normal"
|
|
807
|
+
),
|
|
482
808
|
fontSize: asNumOrStr(seTextCss["font-size"], defaults.fontSize ?? 24),
|
|
483
809
|
textAlign: asStr(seTextCss["text-align"], defaults.textAlign ?? "center"),
|
|
484
|
-
fontFamily: asStr(
|
|
810
|
+
fontFamily: asStr(
|
|
811
|
+
seTextCss["font-family"],
|
|
812
|
+
defaults.fontFamily ?? "Roboto"
|
|
813
|
+
),
|
|
485
814
|
fontWeight: asStr(seTextCss["font-weight"], defaults.fontWeight ?? "bold"),
|
|
815
|
+
fontStyle: asStr(seTextCss["font-style"], defaults.fontStyle ?? "normal"),
|
|
816
|
+
textTransform: asStr(
|
|
817
|
+
seTextCss["text-transform"],
|
|
818
|
+
defaults.textTransform ?? "none"
|
|
819
|
+
),
|
|
486
820
|
color: asStr(seTextCss.color, defaults.color ?? "#ffffff"),
|
|
487
|
-
textShadow: asStr(
|
|
821
|
+
textShadow: asStr(
|
|
822
|
+
seTextCss["text-shadow"],
|
|
823
|
+
defaults.textShadow ?? "rgb(0, 0, 0) 1px 1px 1px"
|
|
824
|
+
),
|
|
488
825
|
background: defaults.background ?? "transparent"
|
|
489
826
|
};
|
|
490
827
|
}
|
|
@@ -533,10 +870,16 @@ function buildUnit(widget, lumiaType, moduleExtras, ctx, sizeOverride) {
|
|
|
533
870
|
// src/se-import/mappers/basic.ts
|
|
534
871
|
function seExtraTextCss(seCss, scrolling) {
|
|
535
872
|
const extra = {};
|
|
536
|
-
if (typeof seCss["text-decoration"] === "string")
|
|
537
|
-
|
|
538
|
-
if (seCss["
|
|
539
|
-
|
|
873
|
+
if (typeof seCss["text-decoration"] === "string")
|
|
874
|
+
extra.textDecoration = seCss["text-decoration"];
|
|
875
|
+
if (typeof seCss["text-transform"] === "string")
|
|
876
|
+
extra.textTransform = seCss["text-transform"];
|
|
877
|
+
if (typeof seCss["font-style"] === "string")
|
|
878
|
+
extra.fontStyle = seCss["font-style"];
|
|
879
|
+
if (seCss["-webkit-text-stroke-color"])
|
|
880
|
+
extra["-webkit-text-stroke-color"] = seCss["-webkit-text-stroke-color"];
|
|
881
|
+
if (seCss["-webkit-text-stroke-width"] != null)
|
|
882
|
+
extra["-webkit-text-stroke-width"] = seCss["-webkit-text-stroke-width"];
|
|
540
883
|
if (scrolling?.enabled) {
|
|
541
884
|
extra.scroll = true;
|
|
542
885
|
const speed = Number(scrolling.speed);
|
|
@@ -545,54 +888,82 @@ function seExtraTextCss(seCss, scrolling) {
|
|
|
545
888
|
return extra;
|
|
546
889
|
}
|
|
547
890
|
function mapText(widget, ctx) {
|
|
548
|
-
const value = translateSeText(
|
|
891
|
+
const value = translateSeText(
|
|
892
|
+
widget.text?.value ?? "",
|
|
893
|
+
null,
|
|
894
|
+
void 0,
|
|
895
|
+
ctx?.provider,
|
|
896
|
+
{ context: "static" }
|
|
897
|
+
);
|
|
549
898
|
const seCss = widget.text?.css ?? {};
|
|
550
|
-
return buildUnit(
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
899
|
+
return buildUnit(
|
|
900
|
+
widget,
|
|
901
|
+
"text",
|
|
902
|
+
{
|
|
903
|
+
content: {
|
|
904
|
+
value,
|
|
905
|
+
highlightColor: "inherit"
|
|
906
|
+
},
|
|
907
|
+
css: {
|
|
908
|
+
fontSize: seCss["font-size"] ?? 24,
|
|
909
|
+
textAlign: seCss["text-align"] ?? "center",
|
|
910
|
+
fontFamily: seCss["font-family"] ?? "Roboto",
|
|
911
|
+
fontWeight: seCss["font-weight"] ?? "bold",
|
|
912
|
+
color: seCss["color"] ?? "#ffffff",
|
|
913
|
+
textShadow: seCss["text-shadow"] ?? "rgb(0, 0, 0) 1px 1px 1px",
|
|
914
|
+
lineHeight: seCss["line-height"] ?? "normal",
|
|
915
|
+
background: "transparent",
|
|
916
|
+
...seExtraTextCss(seCss, widget.text?.scrolling)
|
|
917
|
+
}
|
|
554
918
|
},
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
textAlign: seCss["text-align"] ?? "center",
|
|
558
|
-
fontFamily: seCss["font-family"] ?? "Roboto",
|
|
559
|
-
fontWeight: seCss["font-weight"] ?? "bold",
|
|
560
|
-
color: seCss["color"] ?? "#ffffff",
|
|
561
|
-
textShadow: seCss["text-shadow"] ?? "rgb(0, 0, 0) 1px 1px 1px",
|
|
562
|
-
lineHeight: seCss["line-height"] ?? 1,
|
|
563
|
-
background: "transparent",
|
|
564
|
-
...seExtraTextCss(seCss, widget.text?.scrolling)
|
|
565
|
-
}
|
|
566
|
-
}, ctx);
|
|
919
|
+
ctx
|
|
920
|
+
);
|
|
567
921
|
}
|
|
568
922
|
function mapImage(widget, ctx) {
|
|
569
|
-
return buildUnit(
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
923
|
+
return buildUnit(
|
|
924
|
+
widget,
|
|
925
|
+
"image",
|
|
926
|
+
{
|
|
927
|
+
content: {
|
|
928
|
+
src: widget.image?.src ?? "",
|
|
929
|
+
loop: true
|
|
930
|
+
}
|
|
931
|
+
},
|
|
932
|
+
ctx
|
|
933
|
+
);
|
|
575
934
|
}
|
|
576
935
|
function mapVideo(widget, ctx) {
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
936
|
+
const unit = buildUnit(
|
|
937
|
+
widget,
|
|
938
|
+
"video",
|
|
939
|
+
{
|
|
940
|
+
content: {
|
|
941
|
+
src: widget.video?.src ?? "",
|
|
942
|
+
volume: widget.video?.volume ?? 0.5,
|
|
943
|
+
loop: true,
|
|
944
|
+
muted: false
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
ctx
|
|
948
|
+
);
|
|
949
|
+
unit.layer.bounds.autoHeight = true;
|
|
950
|
+
return unit;
|
|
585
951
|
}
|
|
586
952
|
var LUMIA_SNOW_WEBM = "https://storage.lumiastream.com/overlays/global/seasonal/snow.webm";
|
|
587
953
|
function mapSnow(widget, ctx) {
|
|
588
|
-
return buildUnit(
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
954
|
+
return buildUnit(
|
|
955
|
+
widget,
|
|
956
|
+
"video",
|
|
957
|
+
{
|
|
958
|
+
content: {
|
|
959
|
+
src: LUMIA_SNOW_WEBM,
|
|
960
|
+
volume: 0,
|
|
961
|
+
loop: true,
|
|
962
|
+
muted: true
|
|
963
|
+
}
|
|
964
|
+
},
|
|
965
|
+
ctx
|
|
966
|
+
);
|
|
596
967
|
}
|
|
597
968
|
function mapReadout(widget, fallbackVar, ctx) {
|
|
598
969
|
const explicitListener = widget.variables?.listener;
|
|
@@ -602,7 +973,9 @@ function mapReadout(widget, fallbackVar, ctx) {
|
|
|
602
973
|
const variable = listenerToLumiaVariable(listener, ctx?.provider);
|
|
603
974
|
const userTemplate = widget.text?.value ?? "";
|
|
604
975
|
const inheritsText = userTemplate.trim().length > 0 && /\{[a-zA-Z]/.test(userTemplate);
|
|
605
|
-
const value = inheritsText ? translateSeText(userTemplate, listener, void 0, ctx?.provider, {
|
|
976
|
+
const value = inheritsText ? translateSeText(userTemplate, listener, void 0, ctx?.provider, {
|
|
977
|
+
context: "static"
|
|
978
|
+
}) : `{{${variable}}}`;
|
|
606
979
|
const seCss = widget.text?.css ?? {};
|
|
607
980
|
return buildUnit(
|
|
608
981
|
widget,
|
|
@@ -616,7 +989,7 @@ function mapReadout(widget, fallbackVar, ctx) {
|
|
|
616
989
|
fontWeight: seCss["font-weight"] ?? "bold",
|
|
617
990
|
color: seCss["color"] ?? "#ffffff",
|
|
618
991
|
textShadow: seCss["text-shadow"] ?? "rgb(0, 0, 0) 1px 1px 1px",
|
|
619
|
-
lineHeight: seCss["line-height"] ??
|
|
992
|
+
lineHeight: seCss["line-height"] ?? "normal",
|
|
620
993
|
background: "transparent",
|
|
621
994
|
...seExtraTextCss(seCss, widget.text?.scrolling)
|
|
622
995
|
}
|
|
@@ -1487,15 +1860,13 @@ function computeAllowedEventsFromSEListeners(seListeners, explicitListener) {
|
|
|
1487
1860
|
});
|
|
1488
1861
|
return allowedAlerts;
|
|
1489
1862
|
}
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
const duration = 60 / clamped;
|
|
1494
|
-
return Math.min(120, Math.max(5, Math.round(duration * 10) / 10));
|
|
1863
|
+
var LUMIA_DEFAULT_MARQUEE_PIXELS_PER_SECOND = 20;
|
|
1864
|
+
function seScrollSpeedToPixelsPerSecond(_seSpeed) {
|
|
1865
|
+
return LUMIA_DEFAULT_MARQUEE_PIXELS_PER_SECOND;
|
|
1495
1866
|
}
|
|
1496
1867
|
function seTemplateToMarqueeTemplate(seTemplate) {
|
|
1497
1868
|
if (typeof seTemplate !== "string" || !seTemplate.trim()) return void 0;
|
|
1498
|
-
return seTemplate
|
|
1869
|
+
return translateSeText(seTemplate);
|
|
1499
1870
|
}
|
|
1500
1871
|
function mapEventList(widget, ctx) {
|
|
1501
1872
|
const v = widget.variables ?? {};
|
|
@@ -1508,7 +1879,7 @@ function mapEventList(widget, ctx) {
|
|
|
1508
1879
|
const scrolling = seText?.scrolling;
|
|
1509
1880
|
const isMarquee = !!(scrolling && scrolling.enabled === true);
|
|
1510
1881
|
const itemTemplate = isMarquee ? seTemplateToMarqueeTemplate(seText?.value) : void 0;
|
|
1511
|
-
const marqueeSpeed = isMarquee ?
|
|
1882
|
+
const marqueeSpeed = isMarquee ? seScrollSpeedToPixelsPerSecond(scrolling?.speed) : void 0;
|
|
1512
1883
|
const marqueeDirection = isMarquee ? scrolling?.direction === "right" ? "right" : "left" : void 0;
|
|
1513
1884
|
const theme = isMarquee ? "marquee" : v.theme ?? "simple";
|
|
1514
1885
|
return buildUnit(
|
|
@@ -1943,6 +2314,47 @@ function mapTimer(widget, ctx) {
|
|
|
1943
2314
|
function mapNowPlaying(widget, ctx) {
|
|
1944
2315
|
const v = widget.variables ?? {};
|
|
1945
2316
|
const source = v.provider === "youtube" ? "youtubemusic" : "spotify";
|
|
2317
|
+
const isMarquee = !!v.simpleDesign;
|
|
2318
|
+
const text = widget.text ?? {};
|
|
2319
|
+
const scrolling = text.scrolling ?? {};
|
|
2320
|
+
const seTextCss = text.css ?? {};
|
|
2321
|
+
const seTemplate = typeof text.value === "string" && text.value.trim().length > 0 ? text.value : "";
|
|
2322
|
+
const itemTemplate = seTemplate ? seTemplate.replace(/\{title\}/gi, "{{songTitle}}").replace(/\{artist\}/gi, "{{songArtist}}") : "{{songTitle}} - {{songArtist}}";
|
|
2323
|
+
const marqueeSpeed = 20;
|
|
2324
|
+
const marqueeDirection = scrolling.direction === "right" ? "right" : "left";
|
|
2325
|
+
const wantsShadow = text.enableShadow !== false;
|
|
2326
|
+
const importedCss = {
|
|
2327
|
+
borderRadius: "0px",
|
|
2328
|
+
borderStyle: "solid",
|
|
2329
|
+
borderWidth: "0px",
|
|
2330
|
+
borderColor: "transparent",
|
|
2331
|
+
fontSize: seTextCss["font-size"] ?? 24,
|
|
2332
|
+
textAlign: seTextCss["text-align"] ?? "left",
|
|
2333
|
+
fontFamily: seTextCss["font-family"] ?? "Be Vietnam Pro",
|
|
2334
|
+
fontWeight: seTextCss["font-weight"] ?? "bold",
|
|
2335
|
+
color: seTextCss["color"] ?? "#ffffff",
|
|
2336
|
+
textShadow: wantsShadow ? seTextCss["text-shadow"] ?? "rgb(0, 0, 0) 1px 1px 1px" : "none",
|
|
2337
|
+
// `normal` (not `1`) when SE didn't specify — see the same fix in
|
|
2338
|
+
// `build.ts::mapSeTextCssToModuleCss` and `basic.ts::mapText` for the
|
|
2339
|
+
// rationale. This path is the now-playing / current-song mapper, which
|
|
2340
|
+
// is the one the user noticed had a too-tight line-height in the
|
|
2341
|
+
// marquee render.
|
|
2342
|
+
lineHeight: seTextCss["line-height"] ?? "normal",
|
|
2343
|
+
background: "transparent"
|
|
2344
|
+
};
|
|
2345
|
+
if (typeof seTextCss["text-transform"] === "string")
|
|
2346
|
+
importedCss.textTransform = seTextCss["text-transform"];
|
|
2347
|
+
if (typeof seTextCss["font-style"] === "string")
|
|
2348
|
+
importedCss.fontStyle = seTextCss["font-style"];
|
|
2349
|
+
if (typeof seTextCss["text-decoration"] === "string")
|
|
2350
|
+
importedCss.textDecoration = seTextCss["text-decoration"];
|
|
2351
|
+
if (typeof seTextCss["letter-spacing"] === "string" || typeof seTextCss["letter-spacing"] === "number") {
|
|
2352
|
+
importedCss.letterSpacing = seTextCss["letter-spacing"];
|
|
2353
|
+
}
|
|
2354
|
+
if (seTextCss["-webkit-text-stroke-color"])
|
|
2355
|
+
importedCss["-webkit-text-stroke-color"] = seTextCss["-webkit-text-stroke-color"];
|
|
2356
|
+
if (seTextCss["-webkit-text-stroke-width"] != null)
|
|
2357
|
+
importedCss["-webkit-text-stroke-width"] = seTextCss["-webkit-text-stroke-width"];
|
|
1946
2358
|
return buildUnit(
|
|
1947
2359
|
widget,
|
|
1948
2360
|
"nowplaying",
|
|
@@ -1951,7 +2363,7 @@ function mapNowPlaying(widget, ctx) {
|
|
|
1951
2363
|
version: 1,
|
|
1952
2364
|
type: "nowplaying",
|
|
1953
2365
|
source,
|
|
1954
|
-
theme: "basic",
|
|
2366
|
+
theme: isMarquee ? "marquee" : "basic",
|
|
1955
2367
|
borderRadius: "30px",
|
|
1956
2368
|
songTitle: `{{${source}_now_playing_song=Lumia Dream}}`,
|
|
1957
2369
|
songArtist: `{{${source}_now_playing_artist}}`,
|
|
@@ -1959,20 +2371,14 @@ function mapNowPlaying(widget, ctx) {
|
|
|
1959
2371
|
showImg: true,
|
|
1960
2372
|
oneLineTitle: false,
|
|
1961
2373
|
highlightColor: "inherit",
|
|
2374
|
+
...isMarquee ? {
|
|
2375
|
+
marqueeSpeed,
|
|
2376
|
+
marqueeDirection,
|
|
2377
|
+
themeConfig: { itemTemplate }
|
|
2378
|
+
} : {},
|
|
1962
2379
|
importMeta: buildImportMeta(widget, { simpleDesign: !!v.simpleDesign })
|
|
1963
2380
|
},
|
|
1964
|
-
css:
|
|
1965
|
-
borderRadius: "0px",
|
|
1966
|
-
borderStyle: "solid",
|
|
1967
|
-
borderWidth: "0px",
|
|
1968
|
-
borderColor: "transparent",
|
|
1969
|
-
lineHeight: 1,
|
|
1970
|
-
textAlign: "left",
|
|
1971
|
-
fontFamily: "Be Vietnam Pro",
|
|
1972
|
-
color: "#ffffff",
|
|
1973
|
-
textShadow: "rgb(0, 0, 0) 1px 1px 1px",
|
|
1974
|
-
background: "transparent"
|
|
1975
|
-
}
|
|
2381
|
+
css: importedCss
|
|
1976
2382
|
},
|
|
1977
2383
|
ctx
|
|
1978
2384
|
);
|
|
@@ -2391,6 +2797,22 @@ function mapEmoteWall(widget, ctx) {
|
|
|
2391
2797
|
);
|
|
2392
2798
|
}
|
|
2393
2799
|
function mapUnsupportedAsText(widget, ctx) {
|
|
2800
|
+
const userTemplate = typeof widget.text?.value === "string" ? widget.text.value.trim() : "";
|
|
2801
|
+
const inheritsText = userTemplate.length > 0 && /\{[a-zA-Z]/.test(userTemplate);
|
|
2802
|
+
if (inheritsText) {
|
|
2803
|
+
return buildUnit(
|
|
2804
|
+
widget,
|
|
2805
|
+
"text",
|
|
2806
|
+
{
|
|
2807
|
+
css: mapSeTextCssToModuleCss(widget, { fontSize: 24 }),
|
|
2808
|
+
content: {
|
|
2809
|
+
value: translateSeText(userTemplate),
|
|
2810
|
+
highlightColor: "inherit"
|
|
2811
|
+
}
|
|
2812
|
+
},
|
|
2813
|
+
ctx
|
|
2814
|
+
);
|
|
2815
|
+
}
|
|
2394
2816
|
return buildUnit(
|
|
2395
2817
|
widget,
|
|
2396
2818
|
"text",
|
|
@@ -4050,12 +4472,12 @@ var LSFontPicker = memo(function LSFontPicker2({
|
|
|
4050
4472
|
transform: "rotate(180deg)"
|
|
4051
4473
|
}
|
|
4052
4474
|
}
|
|
4053
|
-
}
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4475
|
+
},
|
|
4476
|
+
listbox: {
|
|
4477
|
+
sx: {
|
|
4478
|
+
maxHeight: 300,
|
|
4479
|
+
padding: 0
|
|
4480
|
+
}
|
|
4059
4481
|
}
|
|
4060
4482
|
},
|
|
4061
4483
|
noOptionsText: "No fonts found",
|
|
@@ -4078,27 +4500,39 @@ var LSFontPicker = memo(function LSFontPicker2({
|
|
|
4078
4500
|
key
|
|
4079
4501
|
);
|
|
4080
4502
|
},
|
|
4081
|
-
renderInput: (params) =>
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4503
|
+
renderInput: (params) => {
|
|
4504
|
+
const {
|
|
4505
|
+
InputLabelProps: paramsInputLabelProps,
|
|
4506
|
+
InputProps: paramsInputProps,
|
|
4507
|
+
...restParams
|
|
4508
|
+
} = params;
|
|
4509
|
+
return /* @__PURE__ */ jsx8(
|
|
4510
|
+
TextFieldComponent,
|
|
4511
|
+
{
|
|
4512
|
+
...restParams,
|
|
4513
|
+
label,
|
|
4514
|
+
helperText,
|
|
4515
|
+
placeholder,
|
|
4516
|
+
fullWidth: true,
|
|
4517
|
+
className: "mui-ls-input",
|
|
4518
|
+
variant: "outlined",
|
|
4519
|
+
sx: {
|
|
4520
|
+
"& .MuiOutlinedInput-root": {
|
|
4521
|
+
paddingRight: "0.5rem"
|
|
4522
|
+
}
|
|
4523
|
+
},
|
|
4524
|
+
slotProps: {
|
|
4525
|
+
inputLabel: {
|
|
4526
|
+
shrink: true,
|
|
4527
|
+
...paramsInputLabelProps ?? {}
|
|
4528
|
+
},
|
|
4529
|
+
input: {
|
|
4530
|
+
...paramsInputProps ?? {}
|
|
4531
|
+
}
|
|
4094
4532
|
}
|
|
4095
|
-
},
|
|
4096
|
-
InputLabelProps: {
|
|
4097
|
-
shrink: true,
|
|
4098
|
-
...params.InputLabelProps ?? {}
|
|
4099
4533
|
}
|
|
4100
|
-
|
|
4101
|
-
|
|
4534
|
+
);
|
|
4535
|
+
}
|
|
4102
4536
|
}
|
|
4103
4537
|
) });
|
|
4104
4538
|
});
|