@lumiastream/ui 0.5.0 → 0.5.2
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/index.js +37 -4
- package/dist/se-import.js +37 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3154,7 +3154,40 @@ var SE_TO_LUMIA_PLACEHOLDER = {
|
|
|
3154
3154
|
// tied to an alert payload), so we route it at the *global* template
|
|
3155
3155
|
// variable `{{streamer}}` populated by VariablesManager.refreshStreamerVariable
|
|
3156
3156
|
// (Twitch → Kick → YouTube → Facebook → TikTok fallback chain).
|
|
3157
|
-
streamer: "streamer"
|
|
3157
|
+
streamer: "streamer",
|
|
3158
|
+
// Sub / resub months — SL and SE both expose `{months}` inside sub-event
|
|
3159
|
+
// variation templates ("{name} just resubbed for {months} months!"). Lumia
|
|
3160
|
+
// surfaces this on the subscriber alert payload as `subMonths` (see
|
|
3161
|
+
// lumia-types/src/variables.types.ts). Mapping is global because `{months}`
|
|
3162
|
+
// only ever appears in subscriber-context templates in the wild — neither
|
|
3163
|
+
// SE nor SL emit it for follower / cheer / tip alerts.
|
|
3164
|
+
months: "subMonths",
|
|
3165
|
+
// Merch / loyalty redemption product name — SL emits `{product}` in
|
|
3166
|
+
// merch_message_template and loyalty_store_redemption_message_template,
|
|
3167
|
+
// SE emits it the same way. Lumia's shopOrder alert exposes the first
|
|
3168
|
+
// item's name as `firstItem.name`; alias to `item` (which already maps
|
|
3169
|
+
// there) so both tokens resolve identically.
|
|
3170
|
+
product: "firstItem.name",
|
|
3171
|
+
// Treatstream title — SL `treat_message_template`
|
|
3172
|
+
// ("{name} bought you a {title} treat"). Lumia's treat alert exposes the
|
|
3173
|
+
// gift name as `treat` (see treatstream entry in variables.types.ts).
|
|
3174
|
+
title: "treat",
|
|
3175
|
+
// SL custom-HTML alias for the chat message — `{userMessage}` and
|
|
3176
|
+
// `{message}` mean the same thing. Both should resolve to Lumia's
|
|
3177
|
+
// `{{message}}`.
|
|
3178
|
+
userMessage: "message",
|
|
3179
|
+
// Prime-gaming gift tier — SL `prime_sub_gift_message_template`
|
|
3180
|
+
// ("{name} gifted {giftType} Ultra subscription to {streamer}"). The gift
|
|
3181
|
+
// type carries the subscription tier ("1000" / "2000" / "3000" / "prime")
|
|
3182
|
+
// which Lumia exposes as `tier` on every sub-related alert payload.
|
|
3183
|
+
giftType: "tier",
|
|
3184
|
+
// TikTok-style jewel gift quantity — SL `jewel_gift_message_template`
|
|
3185
|
+
// ("{name} gifted {giftName} x{jewelsAmount} jewels!"). Lumia's tiktok-gift
|
|
3186
|
+
// alert exposes the quantity as `amount`. `{giftName}` (the gift's display
|
|
3187
|
+
// name) doesn't have a 1:1 Lumia variable — TikTok's gift catalog isn't
|
|
3188
|
+
// directly imported — so we leave it unmapped and the streamer can adjust
|
|
3189
|
+
// the template in the Lumia editor.
|
|
3190
|
+
jewelsAmount: "amount"
|
|
3158
3191
|
};
|
|
3159
3192
|
var TWITCH_CONTEXTS = {
|
|
3160
3193
|
"follower-latest": {
|
|
@@ -6886,9 +6919,9 @@ async function fetchWithProxyFallback(url, options = {}) {
|
|
|
6886
6919
|
}
|
|
6887
6920
|
|
|
6888
6921
|
// src/se-import/assets.ts
|
|
6889
|
-
var IMPORTABLE_CDN_REGEX = /https?:\/\/(?:(?:cdn|static)\.streamelements\.com|streamelements-cdn\.com|cdn\.streamlabs\.com|(?:cdn|uploads)\.twitchalerts\.com)\/[^\s"'\\)]+/g;
|
|
6922
|
+
var IMPORTABLE_CDN_REGEX = /https?:\/\/(?:(?:cdn|static)\.streamelements\.com|streamelements-cdn\.com|streamlabs\.com|cdn\.streamlabs\.com|(?:cdn|uploads)\.twitchalerts\.com)\/[^\s"'\\)]+/g;
|
|
6890
6923
|
var CSS_URL_REGEX = /url\(\s*['"]?([^'")]+)['"]?\s*\)/g;
|
|
6891
|
-
var IMPORTABLE_CDN_HOST_REGEX = /^https?:\/\/(?:(?:cdn|static)\.streamelements\.com|streamelements-cdn\.com|cdn\.streamlabs\.com|(?:cdn|uploads)\.twitchalerts\.com)\//;
|
|
6924
|
+
var IMPORTABLE_CDN_HOST_REGEX = /^https?:\/\/(?:(?:cdn|static)\.streamelements\.com|streamelements-cdn\.com|streamlabs\.com|cdn\.streamlabs\.com|(?:cdn|uploads)\.twitchalerts\.com)\//;
|
|
6892
6925
|
function isImportableAssetUrl(url) {
|
|
6893
6926
|
return IMPORTABLE_CDN_HOST_REGEX.test(url);
|
|
6894
6927
|
}
|
|
@@ -7631,7 +7664,7 @@ function absolutizeSLUrl(raw) {
|
|
|
7631
7664
|
if (typeof raw !== "string" || raw.length === 0) return "";
|
|
7632
7665
|
if (raw.startsWith("http://") || raw.startsWith("https://")) return raw;
|
|
7633
7666
|
if (raw.startsWith("//")) return `https:${raw}`;
|
|
7634
|
-
if (raw.startsWith("/")) return `https://
|
|
7667
|
+
if (raw.startsWith("/")) return `https://streamlabs.com${raw}`;
|
|
7635
7668
|
return raw;
|
|
7636
7669
|
}
|
|
7637
7670
|
function buildBaseAlertEvent(settings, prefix, defaultMessage) {
|
package/dist/se-import.js
CHANGED
|
@@ -20,7 +20,40 @@ var SE_TO_LUMIA_PLACEHOLDER = {
|
|
|
20
20
|
// tied to an alert payload), so we route it at the *global* template
|
|
21
21
|
// variable `{{streamer}}` populated by VariablesManager.refreshStreamerVariable
|
|
22
22
|
// (Twitch → Kick → YouTube → Facebook → TikTok fallback chain).
|
|
23
|
-
streamer: "streamer"
|
|
23
|
+
streamer: "streamer",
|
|
24
|
+
// Sub / resub months — SL and SE both expose `{months}` inside sub-event
|
|
25
|
+
// variation templates ("{name} just resubbed for {months} months!"). Lumia
|
|
26
|
+
// surfaces this on the subscriber alert payload as `subMonths` (see
|
|
27
|
+
// lumia-types/src/variables.types.ts). Mapping is global because `{months}`
|
|
28
|
+
// only ever appears in subscriber-context templates in the wild — neither
|
|
29
|
+
// SE nor SL emit it for follower / cheer / tip alerts.
|
|
30
|
+
months: "subMonths",
|
|
31
|
+
// Merch / loyalty redemption product name — SL emits `{product}` in
|
|
32
|
+
// merch_message_template and loyalty_store_redemption_message_template,
|
|
33
|
+
// SE emits it the same way. Lumia's shopOrder alert exposes the first
|
|
34
|
+
// item's name as `firstItem.name`; alias to `item` (which already maps
|
|
35
|
+
// there) so both tokens resolve identically.
|
|
36
|
+
product: "firstItem.name",
|
|
37
|
+
// Treatstream title — SL `treat_message_template`
|
|
38
|
+
// ("{name} bought you a {title} treat"). Lumia's treat alert exposes the
|
|
39
|
+
// gift name as `treat` (see treatstream entry in variables.types.ts).
|
|
40
|
+
title: "treat",
|
|
41
|
+
// SL custom-HTML alias for the chat message — `{userMessage}` and
|
|
42
|
+
// `{message}` mean the same thing. Both should resolve to Lumia's
|
|
43
|
+
// `{{message}}`.
|
|
44
|
+
userMessage: "message",
|
|
45
|
+
// Prime-gaming gift tier — SL `prime_sub_gift_message_template`
|
|
46
|
+
// ("{name} gifted {giftType} Ultra subscription to {streamer}"). The gift
|
|
47
|
+
// type carries the subscription tier ("1000" / "2000" / "3000" / "prime")
|
|
48
|
+
// which Lumia exposes as `tier` on every sub-related alert payload.
|
|
49
|
+
giftType: "tier",
|
|
50
|
+
// TikTok-style jewel gift quantity — SL `jewel_gift_message_template`
|
|
51
|
+
// ("{name} gifted {giftName} x{jewelsAmount} jewels!"). Lumia's tiktok-gift
|
|
52
|
+
// alert exposes the quantity as `amount`. `{giftName}` (the gift's display
|
|
53
|
+
// name) doesn't have a 1:1 Lumia variable — TikTok's gift catalog isn't
|
|
54
|
+
// directly imported — so we leave it unmapped and the streamer can adjust
|
|
55
|
+
// the template in the Lumia editor.
|
|
56
|
+
jewelsAmount: "amount"
|
|
24
57
|
};
|
|
25
58
|
var TWITCH_CONTEXTS = {
|
|
26
59
|
"follower-latest": {
|
|
@@ -3752,9 +3785,9 @@ async function fetchWithProxyFallback(url, options = {}) {
|
|
|
3752
3785
|
}
|
|
3753
3786
|
|
|
3754
3787
|
// src/se-import/assets.ts
|
|
3755
|
-
var IMPORTABLE_CDN_REGEX = /https?:\/\/(?:(?:cdn|static)\.streamelements\.com|streamelements-cdn\.com|cdn\.streamlabs\.com|(?:cdn|uploads)\.twitchalerts\.com)\/[^\s"'\\)]+/g;
|
|
3788
|
+
var IMPORTABLE_CDN_REGEX = /https?:\/\/(?:(?:cdn|static)\.streamelements\.com|streamelements-cdn\.com|streamlabs\.com|cdn\.streamlabs\.com|(?:cdn|uploads)\.twitchalerts\.com)\/[^\s"'\\)]+/g;
|
|
3756
3789
|
var CSS_URL_REGEX = /url\(\s*['"]?([^'")]+)['"]?\s*\)/g;
|
|
3757
|
-
var IMPORTABLE_CDN_HOST_REGEX = /^https?:\/\/(?:(?:cdn|static)\.streamelements\.com|streamelements-cdn\.com|cdn\.streamlabs\.com|(?:cdn|uploads)\.twitchalerts\.com)\//;
|
|
3790
|
+
var IMPORTABLE_CDN_HOST_REGEX = /^https?:\/\/(?:(?:cdn|static)\.streamelements\.com|streamelements-cdn\.com|streamlabs\.com|cdn\.streamlabs\.com|(?:cdn|uploads)\.twitchalerts\.com)\//;
|
|
3758
3791
|
function isImportableAssetUrl(url) {
|
|
3759
3792
|
return IMPORTABLE_CDN_HOST_REGEX.test(url);
|
|
3760
3793
|
}
|
|
@@ -6479,7 +6512,7 @@ function absolutizeSLUrl(raw) {
|
|
|
6479
6512
|
if (typeof raw !== "string" || raw.length === 0) return "";
|
|
6480
6513
|
if (raw.startsWith("http://") || raw.startsWith("https://")) return raw;
|
|
6481
6514
|
if (raw.startsWith("//")) return `https:${raw}`;
|
|
6482
|
-
if (raw.startsWith("/")) return `https://
|
|
6515
|
+
if (raw.startsWith("/")) return `https://streamlabs.com${raw}`;
|
|
6483
6516
|
return raw;
|
|
6484
6517
|
}
|
|
6485
6518
|
function buildBaseAlertEvent(settings, prefix, defaultMessage) {
|