UNPKG

@frontify/fondue

Version:
19 lines (18 loc) 659 B
import { ELEMENT_LINK as c } from "@udecode/plate-link"; import { getAboveNode as s } from "@udecode/slate"; const o = (r, e) => { const t = s(r, { match: { type: c } }); return Array.isArray(t) ? e(t[0]) : ""; }, u = (r) => o(r, (e) => { var t, n; return ((n = (t = e.chosenLink) == null ? void 0 : t.searchResult) == null ? void 0 : n.link) || ""; }), L = (r) => o(r, (e) => e.url || ""), a = (r) => { var e, t; return r.url || ((t = (e = r.chosenLink) == null ? void 0 : e.searchResult) == null ? void 0 : t.link) || ""; }; export { u as getLegacyUrl, L as getUrl, a as getUrlFromLinkOrLegacyLink }; //# sourceMappingURL=getUrl.es.js.map