@lumiastream/ui 0.5.6 → 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
@@ -4126,7 +4126,7 @@ function mapText(widget, ctx) {
4126
4126
  fontWeight: seCss["font-weight"] ?? "bold",
4127
4127
  color: seCss["color"] ?? "#ffffff",
4128
4128
  textShadow: seCss["text-shadow"] ?? "rgb(0, 0, 0) 1px 1px 1px",
4129
- lineHeight: seCss["line-height"] ?? "normal",
4129
+ lineHeight: seCss["line-height"] ?? 1.5,
4130
4130
  background: "transparent",
4131
4131
  ...seExtraTextCss(seCss, widget.text?.scrolling)
4132
4132
  }
@@ -4245,7 +4245,7 @@ function mapReadout(widget, fallbackVar, ctx) {
4245
4245
  fontWeight: seCss["font-weight"] ?? "bold",
4246
4246
  color: seCss["color"] ?? "#ffffff",
4247
4247
  textShadow: seCss["text-shadow"] ?? "rgb(0, 0, 0) 1px 1px 1px",
4248
- lineHeight: seCss["line-height"] ?? "normal",
4248
+ lineHeight: seCss["line-height"] ?? 1.5,
4249
4249
  background: "transparent",
4250
4250
  ...seExtraTextCss(seCss, widget.text?.scrolling)
4251
4251
  }
@@ -5117,27 +5117,22 @@ var EVENTLIST_DEFAULT_MODULE = {
5117
5117
  };
5118
5118
 
5119
5119
  // src/se-import/mappers/misc.ts
5120
- function mapChatboxTheme(seTheme) {
5121
- const t = (seTheme ?? "").toString().toLowerCase();
5122
- if (!t || t === "default") return "simple";
5123
- if (t.includes("flipin") || t.includes("bubble") || t.includes("bubbly")) return "bubbly";
5124
- if (t.includes("glass") || t.includes("transparent")) return "glass";
5125
- if (t.includes("boxy") || t.includes("checker")) return "boxy";
5126
- if (t.includes("basic")) return "basic";
5127
- return "simple";
5128
- }
5129
5120
  function defaultChatboxBackgroundForSeTheme(seTheme) {
5130
5121
  const t = (seTheme ?? "").toString().toLowerCase();
5131
5122
  if (!t || t === "default") return "transparent";
5132
5123
  if (t === "custom") return "transparent";
5124
+ if (t.includes("white")) return "#ffffff";
5133
5125
  if (t.includes("glass") || t.includes("transparent") || t.includes("flipin") || t.includes("bubble") || t.includes("bubbly"))
5134
5126
  return "transparent";
5135
- if (t.includes("white") || t.includes("light") || t.includes("clean") && !t.includes("dark"))
5136
- return "transparent";
5127
+ if (t.includes("light") || t.includes("clean") && !t.includes("dark")) return "transparent";
5137
5128
  if (t.includes("dark") || t.includes("boxy") || t.includes("checker") || t.includes("black"))
5138
5129
  return "#1e1e1e";
5139
5130
  return "#1e1e1e";
5140
5131
  }
5132
+ function isDarkSurfaceSeTheme(seTheme) {
5133
+ const t = (seTheme ?? "").toString().toLowerCase();
5134
+ return t.includes("dark") || t.includes("boxy") || t.includes("checker") || t.includes("black");
5135
+ }
5141
5136
  var KAPPAGEN_EVENT_CATEGORIES = {
5142
5137
  tip: [LumiaEventListTypes.DONATION],
5143
5138
  cheer: [
@@ -5169,96 +5164,72 @@ function kappagenAlertTriggersFor(seEvent, provider) {
5169
5164
  const fallback = kappagenKeyFor(seEvent, provider);
5170
5165
  return fallback ? [fallback] : [];
5171
5166
  }
5172
- function paddingShorthand(message) {
5173
- const pick = (key) => {
5174
- const raw = message?.[key];
5175
- if (raw == null || raw === "") return null;
5176
- const n = typeof raw === "number" ? raw : parseFloat(String(raw));
5177
- return Number.isFinite(n) ? n : null;
5178
- };
5179
- const t = pick("padding-top");
5180
- const r = pick("padding-right");
5181
- const b = pick("padding-bottom");
5182
- const l = pick("padding-left");
5183
- if (t == null && r == null && b == null && l == null) return void 0;
5184
- const px = (n) => `${n ?? 0}px`;
5185
- return `${px(t)} ${px(r)} ${px(b)} ${px(l)}`;
5186
- }
5187
5167
  function mapChatbox(widget, ctx) {
5188
5168
  const chatboxDefaults = CHATBOX_DEFAULT_MODULE.content;
5189
5169
  const chatboxVersion = CHATBOX_DEFAULT_MODULE.version;
5190
5170
  const v = widget.variables ?? {};
5191
5171
  const textCss = widget.text?.css ?? {};
5192
5172
  const messageCss = textCss.message ?? {};
5193
- const isPermanent = v.fadeOut === true || v.permanent === true || v.showMessagesPermanently === true || v.displayPermanent === true || // SE CustomChat uses `hideAfter: 999` as the "never hide" sentinel; also
5194
- // accept any falsy / non-positive value defensively.
5195
- v.hideAfter === false || typeof v.hideAfter === "number" && (v.hideAfter <= 0 || v.hideAfter >= 999);
5173
+ const messageWins = (key) => {
5174
+ const m = messageCss[key];
5175
+ if (typeof m === "string" && m.length > 0) return m;
5176
+ if (typeof m === "number" && m > 0) return m;
5177
+ return textCss[key];
5178
+ };
5179
+ const isPermanent = v.fadeOut === true || v.permanent === true || v.showMessagesPermanently === true || v.displayPermanent === true || v.hideAfter === false || typeof v.hideAfter === "number" && (v.hideAfter <= 0 || v.hideAfter >= 999);
5196
5180
  const DEFAULT_FADE_SECONDS = 30;
5197
5181
  const fadeOutSeconds = isPermanent ? 0 : typeof v.fadeOut === "number" && v.fadeOut > 0 ? v.fadeOut : typeof v.delay === "number" && v.delay > 0 ? v.delay : DEFAULT_FADE_SECONDS;
5198
- const messagePadding = paddingShorthand(messageCss);
5199
5182
  const DEFAULT_CHATBOX_FONT_SIZE = 14;
5200
5183
  const moduleCss = {};
5201
- if (textCss["font-family"] != null) moduleCss.fontFamily = textCss["font-family"];
5202
- moduleCss.fontSize = textCss["font-size"] != null ? textCss["font-size"] : DEFAULT_CHATBOX_FONT_SIZE;
5203
- if (textCss["color"] != null) moduleCss.color = textCss["color"];
5204
- if (textCss["font-weight"] != null) moduleCss.fontWeight = textCss["font-weight"];
5205
- if (textCss["text-shadow"] != null) moduleCss.textShadow = textCss["text-shadow"];
5206
- if (textCss["text-align"] != null) moduleCss.textAlign = textCss["text-align"];
5184
+ const fontFamily = messageWins("font-family");
5185
+ if (fontFamily != null) moduleCss.fontFamily = fontFamily;
5186
+ const fontSize = messageWins("font-size");
5187
+ moduleCss.fontSize = fontSize != null ? fontSize : DEFAULT_CHATBOX_FONT_SIZE;
5188
+ const rawColor = messageWins("color");
5189
+ const isSeDefaultColor = rawColor == null || typeof rawColor === "string" && (rawColor === "" || rawColor.toLowerCase() === "#fff" || rawColor.toLowerCase() === "#ffffff");
5190
+ if (!isSeDefaultColor) {
5191
+ moduleCss.color = rawColor;
5192
+ } else if (!isDarkSurfaceSeTheme(v.theme)) {
5193
+ moduleCss.color = "rgba(0, 0, 0, 0.9)";
5194
+ } else if (rawColor != null) {
5195
+ moduleCss.color = rawColor;
5196
+ }
5197
+ const messageTextShadow = messageCss["text-shadow"];
5198
+ if (typeof messageTextShadow === "string" && messageTextShadow.length > 0) {
5199
+ moduleCss.textShadow = messageTextShadow;
5200
+ }
5201
+ const textAlign = messageWins("text-align");
5202
+ if (textAlign != null) moduleCss.textAlign = textAlign;
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
+ }
5207
5209
  if (textCss["line-height"] != null) moduleCss.lineHeight = textCss["line-height"];
5208
- if (messagePadding) moduleCss.padding = messagePadding;
5209
5210
  const messageBackground = typeof messageCss["background"] === "string" && messageCss["background"].length > 0 ? messageCss["background"] : defaultChatboxBackgroundForSeTheme(v.theme);
5210
5211
  moduleCss.background = messageBackground;
5211
- const messageFontFamily = typeof messageCss["font-family"] === "string" && messageCss["font-family"].length > 0 ? messageCss["font-family"] : void 0;
5212
5212
  const highlightBackground = v.highlight && typeof v.highlight === "object" && typeof v.highlight["background"] === "string" ? v.highlight["background"] : void 0;
5213
5213
  const accentColor = highlightBackground && highlightBackground.length > 0 ? highlightBackground : void 0;
5214
5214
  return buildUnit(
5215
5215
  widget,
5216
5216
  "chatbox",
5217
5217
  {
5218
- // Stamp the module version from the authoritative defaults so
5219
- // Overlay-UI's per-module Settings.tsx migration check
5220
- // (`module?.version !== currentVersion`) treats this import as
5221
- // already-current. Without this, every freshly-imported chatbox
5222
- // would trip the migration toast on first open even though the
5223
- // content is already complete.
5224
5218
  version: chatboxVersion,
5225
- // Visual styling (font / color / padding etc) lives on module.css, not
5226
- // content. Lumia's TextStyle settings panel + the chatbox renderer both
5227
- // read from here.
5228
5219
  css: moduleCss,
5229
5220
  content: {
5230
- // `chatboxDefaults` resolves host-injected first (preferred), then
5231
- // the local snapshot — see the top of this function. Spreading it
5232
- // here guarantees every field the chatbox renderer expects is
5233
- // present (`type`, `sites`, `useAnimatedEmotes`, etc.); the
5234
- // SE-specific override block below wins for the opinions that
5235
- // differ from a fresh-add.
5236
5221
  ...chatboxDefaults,
5237
- // ─── SE-specific overrides ────────────────────────────────────────
5238
- // The fresh-Lumia defaults assume the streamer is creating a new
5239
- // chatbox; SE-imported ones have opinions that differ. Override
5240
- // only those.
5241
- theme: mapChatboxTheme(v.theme),
5222
+ theme: "simple",
5242
5223
  fadeOutAfterDelay: fadeOutSeconds > 0,
5243
5224
  fadeOutDelayTime: fadeOutSeconds,
5244
- ignoredList: Array.isArray(v.ignored) ? v.ignored : [],
5245
- // SE chat widgets default to showing avatars + site icons + tight
5246
- // line wrapping; Lumia's fresh default is the opposite.
5247
5225
  showAvatar: true,
5248
- showSiteIcon: true,
5249
- breakLine: false,
5250
- clickableChatterProfiles: true,
5251
- hideAlertMessage: false,
5252
- // Carry the SE message-level font override and the streamer's
5253
- // accent color across so the imported chatbox looks right at
5254
- // first paint. Background lives on `module.css.background`
5255
- // above — `content.background` was a dead write the renderer
5256
- // never read.
5257
- ...messageFontFamily ? { messageFontFamily } : {},
5258
- // Twitch primary color override — deep-merge into the full
5259
- // chatboxStreamingSite map from the default (otherwise we'd
5260
- // clobber the youtube/kick/facebook/tiktok/discord entries the
5261
- // chatbox renderer reads for per-platform theming).
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,
5262
5233
  ...accentColor ? {
5263
5234
  chatboxStreamingSite: {
5264
5235
  ...chatboxDefaults.chatboxStreamingSite,
@@ -5270,18 +5241,7 @@ function mapChatbox(widget, ctx) {
5270
5241
  }
5271
5242
  }
5272
5243
  }
5273
- } : {},
5274
- // Source-side knobs preserved under the generic importMeta envelope —
5275
- // no native Lumia equivalent today. `messageDelay` is per-message
5276
- // hold, `initialDelay` is the show-after-connect delay, and we
5277
- // stash the raw highlight block + text css for any future feature
5278
- // that wants the fine-grained styling.
5279
- importMeta: buildImportMeta(widget, {
5280
- messageDelay: v.messageDelay,
5281
- initialDelay: v.delay,
5282
- highlightUsers: v.highlight,
5283
- textCss
5284
- })
5244
+ } : {}
5285
5245
  }
5286
5246
  },
5287
5247
  ctx
@@ -5799,7 +5759,11 @@ function mapTimer(widget, ctx) {
5799
5759
  {
5800
5760
  // Carry the streamer's SE text styling (font/size/color/shadow) so an
5801
5761
  // imported countdown doesn't render in Lumia's default Roboto/24px.
5802
- 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 },
5803
5767
  content: {
5804
5768
  version: 1,
5805
5769
  type: "countdown",
package/dist/se-import.js CHANGED
@@ -1046,7 +1046,7 @@ function mapText(widget, ctx) {
1046
1046
  fontWeight: seCss["font-weight"] ?? "bold",
1047
1047
  color: seCss["color"] ?? "#ffffff",
1048
1048
  textShadow: seCss["text-shadow"] ?? "rgb(0, 0, 0) 1px 1px 1px",
1049
- lineHeight: seCss["line-height"] ?? "normal",
1049
+ lineHeight: seCss["line-height"] ?? 1.5,
1050
1050
  background: "transparent",
1051
1051
  ...seExtraTextCss(seCss, widget.text?.scrolling)
1052
1052
  }
@@ -1165,7 +1165,7 @@ function mapReadout(widget, fallbackVar, ctx) {
1165
1165
  fontWeight: seCss["font-weight"] ?? "bold",
1166
1166
  color: seCss["color"] ?? "#ffffff",
1167
1167
  textShadow: seCss["text-shadow"] ?? "rgb(0, 0, 0) 1px 1px 1px",
1168
- lineHeight: seCss["line-height"] ?? "normal",
1168
+ lineHeight: seCss["line-height"] ?? 1.5,
1169
1169
  background: "transparent",
1170
1170
  ...seExtraTextCss(seCss, widget.text?.scrolling)
1171
1171
  }
@@ -2037,27 +2037,22 @@ var EVENTLIST_DEFAULT_MODULE = {
2037
2037
  };
2038
2038
 
2039
2039
  // src/se-import/mappers/misc.ts
2040
- function mapChatboxTheme(seTheme) {
2041
- const t = (seTheme ?? "").toString().toLowerCase();
2042
- if (!t || t === "default") return "simple";
2043
- if (t.includes("flipin") || t.includes("bubble") || t.includes("bubbly")) return "bubbly";
2044
- if (t.includes("glass") || t.includes("transparent")) return "glass";
2045
- if (t.includes("boxy") || t.includes("checker")) return "boxy";
2046
- if (t.includes("basic")) return "basic";
2047
- return "simple";
2048
- }
2049
2040
  function defaultChatboxBackgroundForSeTheme(seTheme) {
2050
2041
  const t = (seTheme ?? "").toString().toLowerCase();
2051
2042
  if (!t || t === "default") return "transparent";
2052
2043
  if (t === "custom") return "transparent";
2044
+ if (t.includes("white")) return "#ffffff";
2053
2045
  if (t.includes("glass") || t.includes("transparent") || t.includes("flipin") || t.includes("bubble") || t.includes("bubbly"))
2054
2046
  return "transparent";
2055
- if (t.includes("white") || t.includes("light") || t.includes("clean") && !t.includes("dark"))
2056
- return "transparent";
2047
+ if (t.includes("light") || t.includes("clean") && !t.includes("dark")) return "transparent";
2057
2048
  if (t.includes("dark") || t.includes("boxy") || t.includes("checker") || t.includes("black"))
2058
2049
  return "#1e1e1e";
2059
2050
  return "#1e1e1e";
2060
2051
  }
2052
+ function isDarkSurfaceSeTheme(seTheme) {
2053
+ const t = (seTheme ?? "").toString().toLowerCase();
2054
+ return t.includes("dark") || t.includes("boxy") || t.includes("checker") || t.includes("black");
2055
+ }
2061
2056
  var KAPPAGEN_EVENT_CATEGORIES = {
2062
2057
  tip: [LumiaEventListTypes.DONATION],
2063
2058
  cheer: [
@@ -2089,96 +2084,72 @@ function kappagenAlertTriggersFor(seEvent, provider) {
2089
2084
  const fallback = kappagenKeyFor(seEvent, provider);
2090
2085
  return fallback ? [fallback] : [];
2091
2086
  }
2092
- function paddingShorthand(message) {
2093
- const pick = (key) => {
2094
- const raw = message?.[key];
2095
- if (raw == null || raw === "") return null;
2096
- const n = typeof raw === "number" ? raw : parseFloat(String(raw));
2097
- return Number.isFinite(n) ? n : null;
2098
- };
2099
- const t = pick("padding-top");
2100
- const r = pick("padding-right");
2101
- const b = pick("padding-bottom");
2102
- const l = pick("padding-left");
2103
- if (t == null && r == null && b == null && l == null) return void 0;
2104
- const px = (n) => `${n ?? 0}px`;
2105
- return `${px(t)} ${px(r)} ${px(b)} ${px(l)}`;
2106
- }
2107
2087
  function mapChatbox(widget, ctx) {
2108
2088
  const chatboxDefaults = CHATBOX_DEFAULT_MODULE.content;
2109
2089
  const chatboxVersion = CHATBOX_DEFAULT_MODULE.version;
2110
2090
  const v = widget.variables ?? {};
2111
2091
  const textCss = widget.text?.css ?? {};
2112
2092
  const messageCss = textCss.message ?? {};
2113
- const isPermanent = v.fadeOut === true || v.permanent === true || v.showMessagesPermanently === true || v.displayPermanent === true || // SE CustomChat uses `hideAfter: 999` as the "never hide" sentinel; also
2114
- // accept any falsy / non-positive value defensively.
2115
- v.hideAfter === false || typeof v.hideAfter === "number" && (v.hideAfter <= 0 || v.hideAfter >= 999);
2093
+ const messageWins = (key) => {
2094
+ const m = messageCss[key];
2095
+ if (typeof m === "string" && m.length > 0) return m;
2096
+ if (typeof m === "number" && m > 0) return m;
2097
+ return textCss[key];
2098
+ };
2099
+ const isPermanent = v.fadeOut === true || v.permanent === true || v.showMessagesPermanently === true || v.displayPermanent === true || v.hideAfter === false || typeof v.hideAfter === "number" && (v.hideAfter <= 0 || v.hideAfter >= 999);
2116
2100
  const DEFAULT_FADE_SECONDS = 30;
2117
2101
  const fadeOutSeconds = isPermanent ? 0 : typeof v.fadeOut === "number" && v.fadeOut > 0 ? v.fadeOut : typeof v.delay === "number" && v.delay > 0 ? v.delay : DEFAULT_FADE_SECONDS;
2118
- const messagePadding = paddingShorthand(messageCss);
2119
2102
  const DEFAULT_CHATBOX_FONT_SIZE = 14;
2120
2103
  const moduleCss = {};
2121
- if (textCss["font-family"] != null) moduleCss.fontFamily = textCss["font-family"];
2122
- moduleCss.fontSize = textCss["font-size"] != null ? textCss["font-size"] : DEFAULT_CHATBOX_FONT_SIZE;
2123
- if (textCss["color"] != null) moduleCss.color = textCss["color"];
2124
- if (textCss["font-weight"] != null) moduleCss.fontWeight = textCss["font-weight"];
2125
- if (textCss["text-shadow"] != null) moduleCss.textShadow = textCss["text-shadow"];
2126
- if (textCss["text-align"] != null) moduleCss.textAlign = textCss["text-align"];
2104
+ const fontFamily = messageWins("font-family");
2105
+ if (fontFamily != null) moduleCss.fontFamily = fontFamily;
2106
+ const fontSize = messageWins("font-size");
2107
+ moduleCss.fontSize = fontSize != null ? fontSize : DEFAULT_CHATBOX_FONT_SIZE;
2108
+ const rawColor = messageWins("color");
2109
+ const isSeDefaultColor = rawColor == null || typeof rawColor === "string" && (rawColor === "" || rawColor.toLowerCase() === "#fff" || rawColor.toLowerCase() === "#ffffff");
2110
+ if (!isSeDefaultColor) {
2111
+ moduleCss.color = rawColor;
2112
+ } else if (!isDarkSurfaceSeTheme(v.theme)) {
2113
+ moduleCss.color = "rgba(0, 0, 0, 0.9)";
2114
+ } else if (rawColor != null) {
2115
+ moduleCss.color = rawColor;
2116
+ }
2117
+ const messageTextShadow = messageCss["text-shadow"];
2118
+ if (typeof messageTextShadow === "string" && messageTextShadow.length > 0) {
2119
+ moduleCss.textShadow = messageTextShadow;
2120
+ }
2121
+ const textAlign = messageWins("text-align");
2122
+ if (textAlign != null) moduleCss.textAlign = textAlign;
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
+ }
2127
2129
  if (textCss["line-height"] != null) moduleCss.lineHeight = textCss["line-height"];
2128
- if (messagePadding) moduleCss.padding = messagePadding;
2129
2130
  const messageBackground = typeof messageCss["background"] === "string" && messageCss["background"].length > 0 ? messageCss["background"] : defaultChatboxBackgroundForSeTheme(v.theme);
2130
2131
  moduleCss.background = messageBackground;
2131
- const messageFontFamily = typeof messageCss["font-family"] === "string" && messageCss["font-family"].length > 0 ? messageCss["font-family"] : void 0;
2132
2132
  const highlightBackground = v.highlight && typeof v.highlight === "object" && typeof v.highlight["background"] === "string" ? v.highlight["background"] : void 0;
2133
2133
  const accentColor = highlightBackground && highlightBackground.length > 0 ? highlightBackground : void 0;
2134
2134
  return buildUnit(
2135
2135
  widget,
2136
2136
  "chatbox",
2137
2137
  {
2138
- // Stamp the module version from the authoritative defaults so
2139
- // Overlay-UI's per-module Settings.tsx migration check
2140
- // (`module?.version !== currentVersion`) treats this import as
2141
- // already-current. Without this, every freshly-imported chatbox
2142
- // would trip the migration toast on first open even though the
2143
- // content is already complete.
2144
2138
  version: chatboxVersion,
2145
- // Visual styling (font / color / padding etc) lives on module.css, not
2146
- // content. Lumia's TextStyle settings panel + the chatbox renderer both
2147
- // read from here.
2148
2139
  css: moduleCss,
2149
2140
  content: {
2150
- // `chatboxDefaults` resolves host-injected first (preferred), then
2151
- // the local snapshot — see the top of this function. Spreading it
2152
- // here guarantees every field the chatbox renderer expects is
2153
- // present (`type`, `sites`, `useAnimatedEmotes`, etc.); the
2154
- // SE-specific override block below wins for the opinions that
2155
- // differ from a fresh-add.
2156
2141
  ...chatboxDefaults,
2157
- // ─── SE-specific overrides ────────────────────────────────────────
2158
- // The fresh-Lumia defaults assume the streamer is creating a new
2159
- // chatbox; SE-imported ones have opinions that differ. Override
2160
- // only those.
2161
- theme: mapChatboxTheme(v.theme),
2142
+ theme: "simple",
2162
2143
  fadeOutAfterDelay: fadeOutSeconds > 0,
2163
2144
  fadeOutDelayTime: fadeOutSeconds,
2164
- ignoredList: Array.isArray(v.ignored) ? v.ignored : [],
2165
- // SE chat widgets default to showing avatars + site icons + tight
2166
- // line wrapping; Lumia's fresh default is the opposite.
2167
2145
  showAvatar: true,
2168
- showSiteIcon: true,
2169
- breakLine: false,
2170
- clickableChatterProfiles: true,
2171
- hideAlertMessage: false,
2172
- // Carry the SE message-level font override and the streamer's
2173
- // accent color across so the imported chatbox looks right at
2174
- // first paint. Background lives on `module.css.background`
2175
- // above — `content.background` was a dead write the renderer
2176
- // never read.
2177
- ...messageFontFamily ? { messageFontFamily } : {},
2178
- // Twitch primary color override — deep-merge into the full
2179
- // chatboxStreamingSite map from the default (otherwise we'd
2180
- // clobber the youtube/kick/facebook/tiktok/discord entries the
2181
- // chatbox renderer reads for per-platform theming).
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,
2182
2153
  ...accentColor ? {
2183
2154
  chatboxStreamingSite: {
2184
2155
  ...chatboxDefaults.chatboxStreamingSite,
@@ -2190,18 +2161,7 @@ function mapChatbox(widget, ctx) {
2190
2161
  }
2191
2162
  }
2192
2163
  }
2193
- } : {},
2194
- // Source-side knobs preserved under the generic importMeta envelope —
2195
- // no native Lumia equivalent today. `messageDelay` is per-message
2196
- // hold, `initialDelay` is the show-after-connect delay, and we
2197
- // stash the raw highlight block + text css for any future feature
2198
- // that wants the fine-grained styling.
2199
- importMeta: buildImportMeta(widget, {
2200
- messageDelay: v.messageDelay,
2201
- initialDelay: v.delay,
2202
- highlightUsers: v.highlight,
2203
- textCss
2204
- })
2164
+ } : {}
2205
2165
  }
2206
2166
  },
2207
2167
  ctx
@@ -2719,7 +2679,11 @@ function mapTimer(widget, ctx) {
2719
2679
  {
2720
2680
  // Carry the streamer's SE text styling (font/size/color/shadow) so an
2721
2681
  // imported countdown doesn't render in Lumia's default Roboto/24px.
2722
- 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 },
2723
2687
  content: {
2724
2688
  version: 1,
2725
2689
  type: "countdown",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumiastream/ui",
3
- "version": "0.5.6",
3
+ "version": "0.5.8",
4
4
  "author": "Lumia Stream",
5
5
  "license": "ISC",
6
6
  "description": "Lumia UI Kit",