@lumiastream/ui 0.7.5 → 0.7.7
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/LSButton.js +1 -1
- package/dist/LSCheckbox.js +1 -1
- package/dist/LSColorPicker.js +1 -1
- package/dist/LSDatePicker.js +1 -1
- package/dist/LSFontPicker.js +1 -1
- package/dist/LSInput.js +1 -1
- package/dist/LSMultiSelect.js +1 -1
- package/dist/LSRadio.js +1 -1
- package/dist/LSSelect.js +1 -1
- package/dist/LSSliderInput.js +1 -1
- package/dist/LSTextField.js +1 -1
- package/dist/LSVariableInputField.js +1 -1
- package/dist/components.js +1 -1
- package/dist/index.js +141 -15
- package/dist/se-import.js +140 -14
- package/package.json +3 -3
package/dist/se-import.js
CHANGED
|
@@ -2114,12 +2114,36 @@ var CHATBOX_DEFAULT_CONTENT_FIELDS = {
|
|
|
2114
2114
|
background: "transparent",
|
|
2115
2115
|
theme: "simple",
|
|
2116
2116
|
chatboxStreamingSite: {
|
|
2117
|
-
twitch: {
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2117
|
+
twitch: {
|
|
2118
|
+
message: "",
|
|
2119
|
+
icon: "",
|
|
2120
|
+
themeConfig: { primaryColor: "#915dff", showUsernameColors: true }
|
|
2121
|
+
},
|
|
2122
|
+
youtube: {
|
|
2123
|
+
message: "",
|
|
2124
|
+
icon: "",
|
|
2125
|
+
themeConfig: { primaryColor: "#ff0000", usePlatformColor: false }
|
|
2126
|
+
},
|
|
2127
|
+
facebook: {
|
|
2128
|
+
message: "",
|
|
2129
|
+
icon: "",
|
|
2130
|
+
themeConfig: { primaryColor: "#4267B2", usePlatformColor: false }
|
|
2131
|
+
},
|
|
2132
|
+
tiktok: {
|
|
2133
|
+
message: "",
|
|
2134
|
+
icon: "",
|
|
2135
|
+
themeConfig: { primaryColor: "#ff0050", usePlatformColor: false }
|
|
2136
|
+
},
|
|
2137
|
+
kick: {
|
|
2138
|
+
message: "",
|
|
2139
|
+
icon: "",
|
|
2140
|
+
themeConfig: { primaryColor: "#3AD305", usePlatformColor: false }
|
|
2141
|
+
},
|
|
2142
|
+
discord: {
|
|
2143
|
+
message: "",
|
|
2144
|
+
icon: "",
|
|
2145
|
+
themeConfig: { primaryColor: "#7289da", usePlatformColor: false }
|
|
2146
|
+
}
|
|
2123
2147
|
},
|
|
2124
2148
|
borderRadius: "10px",
|
|
2125
2149
|
bgOpacity: 0.4,
|
|
@@ -2135,7 +2159,17 @@ var CHATBOX_DEFAULT_CONTENT_FIELDS = {
|
|
|
2135
2159
|
hyperClickableLinks: true,
|
|
2136
2160
|
clickableChatterProfiles: false,
|
|
2137
2161
|
previewMediaInChat: true,
|
|
2138
|
-
previewMediaUserLevels: [
|
|
2162
|
+
previewMediaUserLevels: [
|
|
2163
|
+
"streamer",
|
|
2164
|
+
"moderators",
|
|
2165
|
+
"vips",
|
|
2166
|
+
"tier3",
|
|
2167
|
+
"tier2",
|
|
2168
|
+
"subscribers",
|
|
2169
|
+
"regular",
|
|
2170
|
+
"follower",
|
|
2171
|
+
"anyone"
|
|
2172
|
+
],
|
|
2139
2173
|
breakLine: true,
|
|
2140
2174
|
fadeOutAfterDelay: false,
|
|
2141
2175
|
fadeOutDelayTime: 5,
|
|
@@ -2210,11 +2244,97 @@ var TIPJAR_DEFAULT_MODULE = {
|
|
|
2210
2244
|
version: 1,
|
|
2211
2245
|
content: TIPJAR_DEFAULT_CONTENT_FIELDS
|
|
2212
2246
|
};
|
|
2247
|
+
var EVENTLIST_TYPE_BG_BASE = "#262541";
|
|
2248
|
+
var EVENTLIST_TYPE_COLORS = {
|
|
2249
|
+
follower: "#22c55e",
|
|
2250
|
+
subscribers: "#a855f7",
|
|
2251
|
+
gifts: "#ec4899",
|
|
2252
|
+
donation: "#10b981",
|
|
2253
|
+
charity: "#f97316",
|
|
2254
|
+
bits: "#facc15",
|
|
2255
|
+
points: "#3b82f6",
|
|
2256
|
+
redemption: "#06b6d4",
|
|
2257
|
+
extension: "#8b5cf6",
|
|
2258
|
+
raids: "#ef4444",
|
|
2259
|
+
spells: "#7c3aed",
|
|
2260
|
+
retweets: "#0ea5e9",
|
|
2261
|
+
likes: "#f472b6",
|
|
2262
|
+
shares: "#14b8a6",
|
|
2263
|
+
purchases: "#eab308",
|
|
2264
|
+
superstickers: "#fb923c",
|
|
2265
|
+
superchats: "#f59e0b",
|
|
2266
|
+
stars: "#fde047",
|
|
2267
|
+
fans: "#d946ef"
|
|
2268
|
+
};
|
|
2269
|
+
var EVENTLIST_DEFAULT_EVENT_TYPES = [
|
|
2270
|
+
"follower",
|
|
2271
|
+
"bits",
|
|
2272
|
+
"extension",
|
|
2273
|
+
"points",
|
|
2274
|
+
"donation",
|
|
2275
|
+
"subscribers",
|
|
2276
|
+
"gifts",
|
|
2277
|
+
"purchases",
|
|
2278
|
+
"raids",
|
|
2279
|
+
"superstickers",
|
|
2280
|
+
"superchats",
|
|
2281
|
+
"stars",
|
|
2282
|
+
"fans",
|
|
2283
|
+
"shares",
|
|
2284
|
+
"spells",
|
|
2285
|
+
"redemption",
|
|
2286
|
+
"retweets",
|
|
2287
|
+
"likes",
|
|
2288
|
+
"charity"
|
|
2289
|
+
];
|
|
2290
|
+
var muteEventColor = (hex) => {
|
|
2291
|
+
const ratio = 0.22;
|
|
2292
|
+
const blend = (offset) => Math.round(
|
|
2293
|
+
parseInt(hex.slice(1 + offset, 3 + offset), 16) * ratio + parseInt(EVENTLIST_TYPE_BG_BASE.slice(1 + offset, 3 + offset), 16) * (1 - ratio)
|
|
2294
|
+
).toString(16).padStart(2, "0");
|
|
2295
|
+
return `#${blend(0)}${blend(2)}${blend(4)}`;
|
|
2296
|
+
};
|
|
2297
|
+
var darkenHex = (hex, factor) => {
|
|
2298
|
+
const channel = (offset) => Math.round(parseInt(hex.slice(1 + offset, 3 + offset), 16) * factor).toString(16).padStart(2, "0");
|
|
2299
|
+
return `#${channel(0)}${channel(2)}${channel(4)}`;
|
|
2300
|
+
};
|
|
2301
|
+
var eventlistDefaultThemeConfig = {
|
|
2302
|
+
backgroundColor: "#262541",
|
|
2303
|
+
borderColor: "#FFFFFF1F",
|
|
2304
|
+
primaryColor: "#FF4076",
|
|
2305
|
+
showBorder: true,
|
|
2306
|
+
secondaryColor: "#ffffff",
|
|
2307
|
+
iconColor: "#ffffff",
|
|
2308
|
+
titleColor: "#ffffff",
|
|
2309
|
+
subtitleColor: "#ffffff",
|
|
2310
|
+
highlightColor: "inherit",
|
|
2311
|
+
useGlobalThemeConfig: true
|
|
2312
|
+
};
|
|
2313
|
+
var buildEventlistTypeDefaults = (base) => Object.fromEntries(
|
|
2314
|
+
EVENTLIST_DEFAULT_EVENT_TYPES.map((type) => {
|
|
2315
|
+
const color = EVENTLIST_TYPE_COLORS[type];
|
|
2316
|
+
const background = muteEventColor(color);
|
|
2317
|
+
return [
|
|
2318
|
+
type,
|
|
2319
|
+
{
|
|
2320
|
+
message: "",
|
|
2321
|
+
icon: "",
|
|
2322
|
+
themeConfig: {
|
|
2323
|
+
...base,
|
|
2324
|
+
backgroundColor: background,
|
|
2325
|
+
primaryColor: darkenHex(background, 0.7),
|
|
2326
|
+
iconColor: color,
|
|
2327
|
+
useGlobalThemeConfig: false
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
2330
|
+
];
|
|
2331
|
+
})
|
|
2332
|
+
);
|
|
2213
2333
|
var EVENTLIST_DEFAULT_CONTENT_FIELDS = {
|
|
2214
2334
|
version: 2,
|
|
2215
|
-
eventListType:
|
|
2335
|
+
eventListType: buildEventlistTypeDefaults(eventlistDefaultThemeConfig),
|
|
2216
2336
|
theme: "basic",
|
|
2217
|
-
themeConfig:
|
|
2337
|
+
themeConfig: eventlistDefaultThemeConfig,
|
|
2218
2338
|
borderRadius: "10px",
|
|
2219
2339
|
condensedText: true,
|
|
2220
2340
|
src: "",
|
|
@@ -2243,7 +2363,7 @@ var EVENTLIST_DEFAULT_CONTENT_FIELDS = {
|
|
|
2243
2363
|
fadeOutAfterDelay: false,
|
|
2244
2364
|
fadeOutDelayTime: 5,
|
|
2245
2365
|
image: "",
|
|
2246
|
-
itemGap:
|
|
2366
|
+
itemGap: 8,
|
|
2247
2367
|
audio: {
|
|
2248
2368
|
enter: "",
|
|
2249
2369
|
volume: 1
|
|
@@ -2486,6 +2606,8 @@ function ensureCheermoteTemplate(template) {
|
|
|
2486
2606
|
return `${template.replace(/\s+$/, "")} {{cheermote}}{{amount}} `;
|
|
2487
2607
|
}
|
|
2488
2608
|
function mapEventList(widget, ctx) {
|
|
2609
|
+
const eventlistDefaults = EVENTLIST_DEFAULT_MODULE.content;
|
|
2610
|
+
const eventlistVersion = EVENTLIST_DEFAULT_MODULE.version;
|
|
2489
2611
|
const v = widget.variables ?? {};
|
|
2490
2612
|
const allowedEvents = computeAllowedEventsFromSEListeners(widget.listeners, widget.listener);
|
|
2491
2613
|
const maxItems = v.visibleEvents ?? v.visibleItems ?? 5;
|
|
@@ -2502,10 +2624,12 @@ function mapEventList(widget, ctx) {
|
|
|
2502
2624
|
widget,
|
|
2503
2625
|
"eventlist",
|
|
2504
2626
|
{
|
|
2627
|
+
version: eventlistVersion,
|
|
2505
2628
|
// SE event-list widgets style per-event lines via widget.text.css; the
|
|
2506
2629
|
// Lumia eventlist reads font/size/color from module.css.
|
|
2507
|
-
css: mapSeTextCssToModuleCss(widget,
|
|
2630
|
+
css: { ...mapSeTextCssToModuleCss(widget), fontSize: 18, scaleWithContainer: "true" },
|
|
2508
2631
|
content: {
|
|
2632
|
+
...eventlistDefaults,
|
|
2509
2633
|
theme,
|
|
2510
2634
|
direction: v.direction ?? "top",
|
|
2511
2635
|
maxItemsToShow: maxItems,
|
|
@@ -2523,8 +2647,7 @@ function mapEventList(widget, ctx) {
|
|
|
2523
2647
|
// `itemTemplate` off either currentThemeConfig or themeConfig — stash
|
|
2524
2648
|
// SE's per-item template here so the imported widget reproduces the
|
|
2525
2649
|
// original (e.g. "{name} " → "{username} ").
|
|
2526
|
-
themeConfig: isMarquee && itemTemplate ? { itemTemplate } :
|
|
2527
|
-
eventListType: {},
|
|
2650
|
+
themeConfig: isMarquee && itemTemplate ? { ...eventlistDefaults.themeConfig, itemTemplate } : eventlistDefaults.themeConfig,
|
|
2528
2651
|
condensedText: false,
|
|
2529
2652
|
// `horizontal` keeps non-marquee widgets that had scrolling enabled in
|
|
2530
2653
|
// SE laid out on a single row (eventlist already supports this); for
|
|
@@ -2935,7 +3058,10 @@ function mapTimer(widget, ctx) {
|
|
|
2935
3058
|
widget,
|
|
2936
3059
|
"timer",
|
|
2937
3060
|
{
|
|
2938
|
-
css: {
|
|
3061
|
+
css: {
|
|
3062
|
+
...mapSeTextCssToModuleCss(widget),
|
|
3063
|
+
...seTimerWantsContainerScaling(widget) ? { scaleWithContainer: "true" } : {}
|
|
3064
|
+
},
|
|
2939
3065
|
content: {
|
|
2940
3066
|
version: 1,
|
|
2941
3067
|
type: "countdown",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumiastream/ui",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.7",
|
|
4
4
|
"author": "Lumia Stream",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"description": "Lumia UI Kit",
|
|
@@ -128,8 +128,8 @@
|
|
|
128
128
|
"vitest": "^4.1.6"
|
|
129
129
|
},
|
|
130
130
|
"dependencies": {
|
|
131
|
-
"@lumiastream/lumia-translations": "1.16.
|
|
132
|
-
"@lumiastream/lumia-types": "3.
|
|
131
|
+
"@lumiastream/lumia-translations": "1.16.8",
|
|
132
|
+
"@lumiastream/lumia-types": "3.7.0",
|
|
133
133
|
"classnames": "^2.5.1",
|
|
134
134
|
"globals": "^17.4.0",
|
|
135
135
|
"nanoid": "^5.1.11",
|