@orangecheck/legal 0.1.0 → 0.1.1
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 +11 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -18
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -3
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Link from 'next/link';
|
|
3
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
3
|
|
|
5
4
|
// src/constants.ts
|
|
@@ -1778,23 +1777,17 @@ function renderInline(text) {
|
|
|
1778
1777
|
if (link) {
|
|
1779
1778
|
const label = link[1] ?? "";
|
|
1780
1779
|
const href = link[2] ?? "";
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
);
|
|
1793
|
-
}
|
|
1794
|
-
if (href.startsWith("mailto:")) {
|
|
1795
|
-
return /* @__PURE__ */ jsx("a", { href, className: "text-primary underline", children: label }, i);
|
|
1796
|
-
}
|
|
1797
|
-
return /* @__PURE__ */ jsx(Link, { href, className: "text-primary underline", children: label }, i);
|
|
1780
|
+
const external = /^https?:\/\//.test(href);
|
|
1781
|
+
return /* @__PURE__ */ jsx(
|
|
1782
|
+
"a",
|
|
1783
|
+
{
|
|
1784
|
+
href,
|
|
1785
|
+
className: "text-primary underline",
|
|
1786
|
+
...external ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
1787
|
+
children: label
|
|
1788
|
+
},
|
|
1789
|
+
i
|
|
1790
|
+
);
|
|
1798
1791
|
}
|
|
1799
1792
|
return /* @__PURE__ */ jsx(React.Fragment, { children: part }, i);
|
|
1800
1793
|
});
|