@wral/active-alerts 0.2.2 → 0.2.3

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/define.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { W as t } from "./wral-active-alerts-Cm01hLhV.js";
1
+ import { W as t } from "./wral-active-alerts-BG8GK-Nj.js";
2
2
  function i() {
3
3
  const e = globalThis?.customElements;
4
4
  e && (e.get("wral-active-alerts") || e.define("wral-active-alerts", t));
@@ -585,7 +585,7 @@ const Rt = {
585
585
  lg: 1366
586
586
  }, zt = "https://api.wral.com/alerts/v1/active/alerts", Lt = "https://assets.wral.com/a1cc0e86-adab-48e9-bd80-703cd2c56aff?w=1200&h=630", jt = (i) => String(i || "Alert").replace(/[^\p{L}\p{N}]/gu, " ").replace(/\s+/g, " ").trim() || "Alert", Dt = (i) => {
587
587
  if (!i) return null;
588
- const t = i.url || i.href || "", e = i.title || i.headline || "";
588
+ const t = i.link || i.url || i.href || "", e = i.title || i.headline || "";
589
589
  if (!e) return null;
590
590
  const s = String(i.topic || "").trim(), r = s.toLowerCase(), n = i.caption || s || "Alert", o = i.image || i.imageUrl || i.image_url || Lt;
591
591
  return {
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { W as r, n as s, s as l } from "./wral-active-alerts-Cm01hLhV.js";
1
+ import { W as r, n as s, s as l } from "./wral-active-alerts-BG8GK-Nj.js";
2
2
  export {
3
3
  r as WralActiveAlerts,
4
4
  s as normalizeAlert,
@@ -4,7 +4,7 @@ const p = {
4
4
  lg: 1366
5
5
  }, h = "https://api.wral.com/alerts/v1/active/alerts", g = "https://assets.wral.com/a1cc0e86-adab-48e9-bd80-703cd2c56aff?w=1200&h=630", u = (e) => String(e || "Alert").replace(/[^\p{L}\p{N}]/gu, " ").replace(/\s+/g, " ").trim() || "Alert", v = (e) => {
6
6
  if (!e) return null;
7
- const t = e.url || e.href || "", s = e.title || e.headline || "";
7
+ const t = e.link || e.url || e.href || "", s = e.title || e.headline || "";
8
8
  if (!s) return null;
9
9
  const a = String(e.topic || "").trim(), l = a.toLowerCase(), r = e.caption || a || "Alert", n = e.image || e.imageUrl || e.image_url || g;
10
10
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wral/active-alerts",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "type": "module",
5
5
  "description": "Lit web component for rendering the current set of active WRAL alerts.",
6
6
  "author": "Dominick Jones <djones@wral.com>",