@tixyel/streamelements 7.11.0 → 7.12.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.
- package/dist/index.d.ts +2 -1
- package/dist/index.es.js +35 -11
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3125,7 +3125,7 @@ declare class UtilsHelper {
|
|
|
3125
3125
|
userId: string;
|
|
3126
3126
|
name: string;
|
|
3127
3127
|
broadcasterId?: string;
|
|
3128
|
-
}, session: StreamElements.Session.Data, checkWithAPI?: boolean): Promise<
|
|
3128
|
+
}, session: StreamElements.Session.Data, checkWithAPI?: boolean): Promise<1 | 2 | 3>;
|
|
3129
3129
|
/**
|
|
3130
3130
|
* Identifies a user based on the received event and session data, returning their ID, name, role, badges, and top status.
|
|
3131
3131
|
* @param receivedEvent - The event received from the provider (Twitch or YouTube) containing user information.
|
|
@@ -3621,6 +3621,7 @@ declare class SEHelper {
|
|
|
3621
3621
|
* @param text - The long text to split into multiple fields
|
|
3622
3622
|
* @param maxLabelLength - The maximum length for each field label (default is 31 characters, which is the maximum allowed by StreamElements)
|
|
3623
3623
|
* @returns An object containing the generated StreamElements custom field schemas with split labels
|
|
3624
|
+
* @example
|
|
3624
3625
|
*/
|
|
3625
3626
|
splitFieldLabel(keyPrefix: string, text: string, maxLabelLength?: number): {
|
|
3626
3627
|
[k: string]: StreamElements.CustomField.Schema;
|
package/dist/index.es.js
CHANGED
|
@@ -10434,7 +10434,19 @@ var j = class {
|
|
|
10434
10434
|
label: a.capitalize(d),
|
|
10435
10435
|
value: l
|
|
10436
10436
|
};
|
|
10437
|
-
else if ([
|
|
10437
|
+
else if (["gradient"].some((e) => n.endsWith(e))) {
|
|
10438
|
+
let t = l.match(ae);
|
|
10439
|
+
t && (e[`${n}-gradient`] = {
|
|
10440
|
+
type: "hidden",
|
|
10441
|
+
label: "• Gradient colors"
|
|
10442
|
+
}, t.forEach((t, r) => {
|
|
10443
|
+
e[`${n}-gradient-${r}`] = {
|
|
10444
|
+
type: "colorpicker",
|
|
10445
|
+
label: a.capitalize(d) + ` ${s.translate(r + 1, "suffix")} color`,
|
|
10446
|
+
value: t
|
|
10447
|
+
};
|
|
10448
|
+
}));
|
|
10449
|
+
} else if ([
|
|
10438
10450
|
"size",
|
|
10439
10451
|
"width",
|
|
10440
10452
|
"height",
|
|
@@ -10466,10 +10478,18 @@ var j = class {
|
|
|
10466
10478
|
800: "Extra Bold 800",
|
|
10467
10479
|
900: "Black 900"
|
|
10468
10480
|
}
|
|
10469
|
-
} : n.endsWith("font-family")
|
|
10481
|
+
} : n.endsWith("font-family") ? e[n] = {
|
|
10470
10482
|
type: "googleFont",
|
|
10471
10483
|
label: a.capitalize(d),
|
|
10472
10484
|
value: l.split(",")[0].trim().replaceAll("'", "")
|
|
10485
|
+
} : [
|
|
10486
|
+
"step",
|
|
10487
|
+
"min",
|
|
10488
|
+
"max"
|
|
10489
|
+
].some((e) => !n.endsWith(e)) && (e[n] = {
|
|
10490
|
+
type: "text",
|
|
10491
|
+
label: a.capitalize(d),
|
|
10492
|
+
value: String(l)
|
|
10473
10493
|
});
|
|
10474
10494
|
break;
|
|
10475
10495
|
case "value":
|
|
@@ -10480,16 +10500,16 @@ var j = class {
|
|
|
10480
10500
|
};
|
|
10481
10501
|
else if (l.startsWith("linear-gradient(") || l.startsWith("radial-gradient(")) {
|
|
10482
10502
|
let t = l.match(ae);
|
|
10483
|
-
t &&
|
|
10484
|
-
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10503
|
+
t && (e[`${n}-gradient`] = {
|
|
10504
|
+
type: "hidden",
|
|
10505
|
+
label: "• Gradient colors"
|
|
10506
|
+
}, t.forEach((t, r) => {
|
|
10507
|
+
e[`${n}-gradient-${r}`] = {
|
|
10488
10508
|
type: "colorpicker",
|
|
10489
10509
|
label: a.capitalize(d) + ` ${s.translate(r + 1, "suffix")} color`,
|
|
10490
10510
|
value: t
|
|
10491
10511
|
};
|
|
10492
|
-
});
|
|
10512
|
+
}));
|
|
10493
10513
|
} else if (l.endsWith("px")) {
|
|
10494
10514
|
var f = c[n + "-min"] ? parseFloat(c[n + "-min"]) : void 0, p = c[n + "-max"] ? parseFloat(c[n + "-max"]) : void 0, m = c[n + "-step"] ? parseFloat(c[n + "-step"]) : void 0;
|
|
10495
10515
|
e[n] = {
|
|
@@ -10510,11 +10530,15 @@ var j = class {
|
|
|
10510
10530
|
max: p,
|
|
10511
10531
|
step: m
|
|
10512
10532
|
};
|
|
10513
|
-
} else if (isNaN(parseFloat(l)))
|
|
10533
|
+
} else if (isNaN(parseFloat(l))) [
|
|
10534
|
+
"step",
|
|
10535
|
+
"min",
|
|
10536
|
+
"max"
|
|
10537
|
+
].some((e) => !n.endsWith(e)) && (e[n] = {
|
|
10514
10538
|
type: "text",
|
|
10515
10539
|
label: a.capitalize(d),
|
|
10516
|
-
value: l
|
|
10517
|
-
};
|
|
10540
|
+
value: String(l)
|
|
10541
|
+
});
|
|
10518
10542
|
else {
|
|
10519
10543
|
var f = c[n + "-min"] ? parseFloat(c[n + "-min"]) : void 0, p = c[n + "-max"] ? parseFloat(c[n + "-max"]) : void 0, m = c[n + "-step"] ? parseFloat(c[n + "-step"]) : void 0;
|
|
10520
10544
|
e[n] = {
|