@elmethis/core 1.0.0-alpha.164 → 1.0.0-alpha.165

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.
@@ -9,7 +9,7 @@ export interface ElmInlineLinkProps {
9
9
  *
10
10
  * e.g. `https://example.com`
11
11
  */
12
- href?: string;
12
+ href: string;
13
13
  /**
14
14
  * Specifies the font size of the text.
15
15
  */
@@ -20,7 +20,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20
20
  props.onClick();
21
21
  }
22
22
  }
23
- const src = ref(`https://logo.clearbit.com/${props.href}`);
23
+ const src = ref(`https://logo.clearbit.com/${new URL(props.href).hostname}`);
24
24
  const handleError = () => {
25
25
  src.value = `data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="gray" d="M17.9 17.39c-.26-.8-1.01-1.39-1.9-1.39h-1v-3a1 1 0 0 0-1-1H8v-2h2a1 1 0 0 0 1-1V7h2a2 2 0 0 0 2-2v-.41a7.984 7.984 0 0 1 2.9 12.8M11 19.93c-3.95-.49-7-3.85-7-7.93c0-.62.08-1.22.21-1.79L9 15v1a2 2 0 0 0 2 2m1-16A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2"/></svg>`;
26
26
  };
@@ -39,7 +39,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
39
39
  onError: handleError,
40
40
  class: normalizeClass(_ctx.$style.icon)
41
41
  }, null, 42, _hoisted_2),
42
- createTextVNode(" " + toDisplayString(_ctx.text) + " ", 1),
42
+ createTextVNode(" " + toDisplayString(_ctx.text ?? _ctx.href) + " ", 1),
43
43
  createVNode(unref(Icon), {
44
44
  icon: _ctx.iconType != null ? _ctx.iconType === "internal" ? "mdi:chevron-right" : "mdi:external-link" : _ctx.openInNewTab ? "mdi:external-link" : "mdi:chevron-right",
45
45
  class: normalizeClass(_ctx.$style.icon)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elmethis/core",
3
- "version": "1.0.0-alpha.164",
3
+ "version": "1.0.0-alpha.165",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },