@lumiastream/ui 0.6.5 → 0.6.6-beta.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.js +6 -1
- package/dist/se-import.js +6 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5759,6 +5759,11 @@ function mapTrain(widget, ctx) {
|
|
|
5759
5759
|
{ width: 540, height: 60 }
|
|
5760
5760
|
);
|
|
5761
5761
|
}
|
|
5762
|
+
function seTimerWantsContainerScaling(widget) {
|
|
5763
|
+
const fontSize = widget.text?.css?.["font-size"];
|
|
5764
|
+
if (typeof fontSize !== "string") return false;
|
|
5765
|
+
return /\d\s*(vw|vh|vmin|vmax|cqw|cqh|cqi|cqb)\s*$/i.test(fontSize.trim());
|
|
5766
|
+
}
|
|
5762
5767
|
function mapTimer(widget, ctx) {
|
|
5763
5768
|
const v = widget.variables ?? {};
|
|
5764
5769
|
const textValue = typeof widget.text?.value === "string" ? widget.text.value : void 0;
|
|
@@ -5828,7 +5833,7 @@ function mapTimer(widget, ctx) {
|
|
|
5828
5833
|
widget,
|
|
5829
5834
|
"timer",
|
|
5830
5835
|
{
|
|
5831
|
-
css: mapSeTextCssToModuleCss(widget),
|
|
5836
|
+
css: { ...mapSeTextCssToModuleCss(widget), ...seTimerWantsContainerScaling(widget) ? { scaleWithContainer: "true" } : {} },
|
|
5832
5837
|
content: {
|
|
5833
5838
|
version: 1,
|
|
5834
5839
|
type: "countdown",
|
package/dist/se-import.js
CHANGED
|
@@ -2679,6 +2679,11 @@ function mapTrain(widget, ctx) {
|
|
|
2679
2679
|
{ width: 540, height: 60 }
|
|
2680
2680
|
);
|
|
2681
2681
|
}
|
|
2682
|
+
function seTimerWantsContainerScaling(widget) {
|
|
2683
|
+
const fontSize = widget.text?.css?.["font-size"];
|
|
2684
|
+
if (typeof fontSize !== "string") return false;
|
|
2685
|
+
return /\d\s*(vw|vh|vmin|vmax|cqw|cqh|cqi|cqb)\s*$/i.test(fontSize.trim());
|
|
2686
|
+
}
|
|
2682
2687
|
function mapTimer(widget, ctx) {
|
|
2683
2688
|
const v = widget.variables ?? {};
|
|
2684
2689
|
const textValue = typeof widget.text?.value === "string" ? widget.text.value : void 0;
|
|
@@ -2748,7 +2753,7 @@ function mapTimer(widget, ctx) {
|
|
|
2748
2753
|
widget,
|
|
2749
2754
|
"timer",
|
|
2750
2755
|
{
|
|
2751
|
-
css: mapSeTextCssToModuleCss(widget),
|
|
2756
|
+
css: { ...mapSeTextCssToModuleCss(widget), ...seTimerWantsContainerScaling(widget) ? { scaleWithContainer: "true" } : {} },
|
|
2752
2757
|
content: {
|
|
2753
2758
|
version: 1,
|
|
2754
2759
|
type: "countdown",
|