@lumiastream/ui 0.5.7 → 0.5.8

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 CHANGED
@@ -5121,10 +5121,10 @@ function defaultChatboxBackgroundForSeTheme(seTheme) {
5121
5121
  const t = (seTheme ?? "").toString().toLowerCase();
5122
5122
  if (!t || t === "default") return "transparent";
5123
5123
  if (t === "custom") return "transparent";
5124
+ if (t.includes("white")) return "#ffffff";
5124
5125
  if (t.includes("glass") || t.includes("transparent") || t.includes("flipin") || t.includes("bubble") || t.includes("bubbly"))
5125
5126
  return "transparent";
5126
- if (t.includes("white") || t.includes("light") || t.includes("clean") && !t.includes("dark"))
5127
- return "transparent";
5127
+ if (t.includes("light") || t.includes("clean") && !t.includes("dark")) return "transparent";
5128
5128
  if (t.includes("dark") || t.includes("boxy") || t.includes("checker") || t.includes("black"))
5129
5129
  return "#1e1e1e";
5130
5130
  return "#1e1e1e";
@@ -5194,11 +5194,18 @@ function mapChatbox(widget, ctx) {
5194
5194
  } else if (rawColor != null) {
5195
5195
  moduleCss.color = rawColor;
5196
5196
  }
5197
- const textShadow = messageWins("text-shadow");
5198
- if (textShadow != null) moduleCss.textShadow = textShadow;
5197
+ const messageTextShadow = messageCss["text-shadow"];
5198
+ if (typeof messageTextShadow === "string" && messageTextShadow.length > 0) {
5199
+ moduleCss.textShadow = messageTextShadow;
5200
+ }
5199
5201
  const textAlign = messageWins("text-align");
5200
5202
  if (textAlign != null) moduleCss.textAlign = textAlign;
5201
- if (textCss["font-weight"] != null) moduleCss.fontWeight = textCss["font-weight"];
5203
+ const messageFontWeight = messageCss["font-weight"];
5204
+ if (typeof messageFontWeight === "string" && messageFontWeight.length > 0) {
5205
+ moduleCss.fontWeight = messageFontWeight;
5206
+ } else if (typeof messageFontWeight === "number") {
5207
+ moduleCss.fontWeight = messageFontWeight;
5208
+ }
5202
5209
  if (textCss["line-height"] != null) moduleCss.lineHeight = textCss["line-height"];
5203
5210
  const messageBackground = typeof messageCss["background"] === "string" && messageCss["background"].length > 0 ? messageCss["background"] : defaultChatboxBackgroundForSeTheme(v.theme);
5204
5211
  moduleCss.background = messageBackground;
@@ -5216,7 +5223,13 @@ function mapChatbox(widget, ctx) {
5216
5223
  fadeOutAfterDelay: fadeOutSeconds > 0,
5217
5224
  fadeOutDelayTime: fadeOutSeconds,
5218
5225
  showAvatar: true,
5219
- breakLine: false,
5226
+ // SE's `.chat-line` renders with `word-break: break-word` and inline
5227
+ // badges/emotes flowing inline-with-wrap. Lumia's chatbox container
5228
+ // already has `word-break: break-word` + `overflow-wrap: anywhere`,
5229
+ // and `breakLine: true` adds the `flex-wrap: wrap; align-items: center`
5230
+ // layout that lets badges/emotes wrap alongside text — which is what
5231
+ // SE does. Forcing `false` here was suppressing wrap on long lines.
5232
+ breakLine: true,
5220
5233
  ...accentColor ? {
5221
5234
  chatboxStreamingSite: {
5222
5235
  ...chatboxDefaults.chatboxStreamingSite,
@@ -5746,7 +5759,11 @@ function mapTimer(widget, ctx) {
5746
5759
  {
5747
5760
  // Carry the streamer's SE text styling (font/size/color/shadow) so an
5748
5761
  // imported countdown doesn't render in Lumia's default Roboto/24px.
5749
- css: mapSeTextCssToModuleCss(widget),
5762
+ // scaleWithContainer: SE renders the countdown at the literal font-size and lets
5763
+ // `widget { overflow:hidden }` clip the overflow (visually masked by the canvas-level
5764
+ // transform). Lumia has no equivalent clip on the layer, so a 150px font in a 162px
5765
+ // box overflows visibly. Opt the imported timer into Lumia's container-query auto-fit.
5766
+ css: { ...mapSeTextCssToModuleCss(widget), scaleWithContainer: true },
5750
5767
  content: {
5751
5768
  version: 1,
5752
5769
  type: "countdown",
package/dist/se-import.js CHANGED
@@ -2041,10 +2041,10 @@ function defaultChatboxBackgroundForSeTheme(seTheme) {
2041
2041
  const t = (seTheme ?? "").toString().toLowerCase();
2042
2042
  if (!t || t === "default") return "transparent";
2043
2043
  if (t === "custom") return "transparent";
2044
+ if (t.includes("white")) return "#ffffff";
2044
2045
  if (t.includes("glass") || t.includes("transparent") || t.includes("flipin") || t.includes("bubble") || t.includes("bubbly"))
2045
2046
  return "transparent";
2046
- if (t.includes("white") || t.includes("light") || t.includes("clean") && !t.includes("dark"))
2047
- return "transparent";
2047
+ if (t.includes("light") || t.includes("clean") && !t.includes("dark")) return "transparent";
2048
2048
  if (t.includes("dark") || t.includes("boxy") || t.includes("checker") || t.includes("black"))
2049
2049
  return "#1e1e1e";
2050
2050
  return "#1e1e1e";
@@ -2114,11 +2114,18 @@ function mapChatbox(widget, ctx) {
2114
2114
  } else if (rawColor != null) {
2115
2115
  moduleCss.color = rawColor;
2116
2116
  }
2117
- const textShadow = messageWins("text-shadow");
2118
- if (textShadow != null) moduleCss.textShadow = textShadow;
2117
+ const messageTextShadow = messageCss["text-shadow"];
2118
+ if (typeof messageTextShadow === "string" && messageTextShadow.length > 0) {
2119
+ moduleCss.textShadow = messageTextShadow;
2120
+ }
2119
2121
  const textAlign = messageWins("text-align");
2120
2122
  if (textAlign != null) moduleCss.textAlign = textAlign;
2121
- if (textCss["font-weight"] != null) moduleCss.fontWeight = textCss["font-weight"];
2123
+ const messageFontWeight = messageCss["font-weight"];
2124
+ if (typeof messageFontWeight === "string" && messageFontWeight.length > 0) {
2125
+ moduleCss.fontWeight = messageFontWeight;
2126
+ } else if (typeof messageFontWeight === "number") {
2127
+ moduleCss.fontWeight = messageFontWeight;
2128
+ }
2122
2129
  if (textCss["line-height"] != null) moduleCss.lineHeight = textCss["line-height"];
2123
2130
  const messageBackground = typeof messageCss["background"] === "string" && messageCss["background"].length > 0 ? messageCss["background"] : defaultChatboxBackgroundForSeTheme(v.theme);
2124
2131
  moduleCss.background = messageBackground;
@@ -2136,7 +2143,13 @@ function mapChatbox(widget, ctx) {
2136
2143
  fadeOutAfterDelay: fadeOutSeconds > 0,
2137
2144
  fadeOutDelayTime: fadeOutSeconds,
2138
2145
  showAvatar: true,
2139
- breakLine: false,
2146
+ // SE's `.chat-line` renders with `word-break: break-word` and inline
2147
+ // badges/emotes flowing inline-with-wrap. Lumia's chatbox container
2148
+ // already has `word-break: break-word` + `overflow-wrap: anywhere`,
2149
+ // and `breakLine: true` adds the `flex-wrap: wrap; align-items: center`
2150
+ // layout that lets badges/emotes wrap alongside text — which is what
2151
+ // SE does. Forcing `false` here was suppressing wrap on long lines.
2152
+ breakLine: true,
2140
2153
  ...accentColor ? {
2141
2154
  chatboxStreamingSite: {
2142
2155
  ...chatboxDefaults.chatboxStreamingSite,
@@ -2666,7 +2679,11 @@ function mapTimer(widget, ctx) {
2666
2679
  {
2667
2680
  // Carry the streamer's SE text styling (font/size/color/shadow) so an
2668
2681
  // imported countdown doesn't render in Lumia's default Roboto/24px.
2669
- css: mapSeTextCssToModuleCss(widget),
2682
+ // scaleWithContainer: SE renders the countdown at the literal font-size and lets
2683
+ // `widget { overflow:hidden }` clip the overflow (visually masked by the canvas-level
2684
+ // transform). Lumia has no equivalent clip on the layer, so a 150px font in a 162px
2685
+ // box overflows visibly. Opt the imported timer into Lumia's container-query auto-fit.
2686
+ css: { ...mapSeTextCssToModuleCss(widget), scaleWithContainer: true },
2670
2687
  content: {
2671
2688
  version: 1,
2672
2689
  type: "countdown",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumiastream/ui",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "author": "Lumia Stream",
5
5
  "license": "ISC",
6
6
  "description": "Lumia UI Kit",