@fileverse-dev/ddoc 2.1.4-patch-16 → 2.1.4-patch-17

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.es.js CHANGED
@@ -140174,14 +140174,14 @@ const rF = ({
140174
140174
  favicon: c.favicon,
140175
140175
  link: t
140176
140176
  };
140177
- s.current.set(t, u), r(u);
140177
+ s.current.set(t, u), r(u), setTimeout(() => {
140178
+ a(!1);
140179
+ }, 1e3);
140178
140180
  } catch (l) {
140179
- console.error("Error fetching link preview:", l), r(null);
140180
- } finally {
140181
- a(!1);
140181
+ console.error("Error fetching link preview:", l), r(null), a(!1);
140182
140182
  }
140183
140183
  })();
140184
- }, [t]), /* @__PURE__ */ A.jsx("div", { className: "w-[250px] border color-border-default shadow-elevation-3 rounded p-3 flex flex-col gap-2 justify-center hover-link-popup bg-white", children: i ? /* @__PURE__ */ A.jsx("p", { className: "text-helper-text-sm color-text-secondary", children: "Loading preview..." }) : n ? /* @__PURE__ */ A.jsxs(A.Fragment, { children: [
140184
+ }, [t]), /* @__PURE__ */ A.jsx("div", { className: "w-[250px] border color-border-default shadow-elevation-3 rounded p-3 flex flex-col gap-2 justify-center hover-link-popup color-bg-default", children: i ? /* @__PURE__ */ A.jsx("p", { className: "text-helper-text-sm color-text-secondary", children: "Loading preview..." }) : n ? /* @__PURE__ */ A.jsxs(A.Fragment, { children: [
140185
140185
  n.image && /* @__PURE__ */ A.jsx(
140186
140186
  "img",
140187
140187
  {
@@ -140192,8 +140192,8 @@ const rF = ({
140192
140192
  ),
140193
140193
  /* @__PURE__ */ A.jsxs("div", { className: "flex flex-col gap-2", children: [
140194
140194
  (n.title || n.description) && /* @__PURE__ */ A.jsxs("div", { className: "flex flex-col gap-[2px]", children: [
140195
- n.title && /* @__PURE__ */ A.jsx("p", { className: "text-heading-xsm w-full truncate", children: n.title }),
140196
- n.description && /* @__PURE__ */ A.jsx("p", { className: "text-helper-text-sm color-text-secondary w-full truncate", children: n.description })
140195
+ n.title && /* @__PURE__ */ A.jsx("p", { className: "text-heading-xsm w-full truncate color-text-default select-text", children: n.title }),
140196
+ n.description && /* @__PURE__ */ A.jsx("p", { className: "text-helper-text-sm color-text-secondary w-full truncate select-text", children: n.description })
140197
140197
  ] }),
140198
140198
  /* @__PURE__ */ A.jsxs("div", { className: "flex gap-2", children: [
140199
140199
  n.favicon && /* @__PURE__ */ A.jsx(
@@ -140207,7 +140207,16 @@ const rF = ({
140207
140207
  }
140208
140208
  }
140209
140209
  ),
140210
- n.link && /* @__PURE__ */ A.jsx("p", { className: "text-helper-text-sm color-text-link w-full truncate", children: n.link })
140210
+ n.link && /* @__PURE__ */ A.jsx(
140211
+ "a",
140212
+ {
140213
+ href: n.link,
140214
+ target: "_blank",
140215
+ rel: "noopener noreferrer",
140216
+ className: "text-helper-text-sm color-text-link w-full truncate hover:underline hover:cursor-pointer",
140217
+ children: n.link
140218
+ }
140219
+ )
140211
140220
  ] })
140212
140221
  ] })
140213
140222
  ] }) : /* @__PURE__ */ A.jsx("p", { className: "text-helper-text-sm color-text-secondary", children: "No preview available" }) });
@@ -140228,19 +140237,22 @@ const rF = ({
140228
140237
  if (o) {
140229
140238
  const l = o.getAttribute("href");
140230
140239
  if (!l) return !1;
140231
- if (e || (e = document.createElement("div"), e.className = "hover-link-popup", e.style.position = "absolute", e.style.zIndex = "999", document.body.appendChild(e)), r === o)
140232
- return e.style.display = "block", !1;
140233
- r = o;
140240
+ e || (e = document.createElement("div"), e.className = "hover-link-popup", e.style.position = "absolute", e.style.zIndex = "999", document.body.appendChild(e)), r === o && setTimeout(() => {
140241
+ if (e)
140242
+ return e.style.display = "block", !1;
140243
+ }, 600), r = o;
140234
140244
  const c = o.getBoundingClientRect();
140235
- e.style.left = `${c.left}px`, e.style.top = `${c.bottom + 5}px`, e.style.display = "block", n || (n = P8(e)), n.render(
140236
- /* @__PURE__ */ A.jsx(
140237
- rF,
140238
- {
140239
- link: l,
140240
- metadataProxyUrl: this.options.metadataProxyUrl
140241
- }
140242
- )
140243
- );
140245
+ e.style.left = `${c.left}px`, e.style.top = `${c.bottom + 5}px`, setTimeout(() => {
140246
+ e && (e.style.display = "block", n || (n = P8(e))), n && n.render(
140247
+ /* @__PURE__ */ A.jsx(
140248
+ rF,
140249
+ {
140250
+ link: l,
140251
+ metadataProxyUrl: this.options.metadataProxyUrl
140252
+ }
140253
+ )
140254
+ );
140255
+ }, 600);
140244
140256
  }
140245
140257
  return !1;
140246
140258
  },