@foodpilot/foods 0.5.26 → 0.5.27
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/main.js +11 -3
- package/dist/main.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -88945,10 +88945,18 @@ const $s = {
|
|
|
88945
88945
|
TEXT_PLACEHOLDER: "Link text"
|
|
88946
88946
|
}, vy = (e) => {
|
|
88947
88947
|
let t = e.trim();
|
|
88948
|
-
|
|
88949
|
-
isValid:
|
|
88948
|
+
if (!t)
|
|
88949
|
+
return { isValid: !1, parsedUrl: t };
|
|
88950
|
+
const n = /\.pdf$/i.test(t);
|
|
88951
|
+
!/^(?:f|ht)tps?:\/\//i.test(t) && !t.startsWith("file://") && (t = `http://${t}`);
|
|
88952
|
+
const o = /^(https?:\/\/|file:\/\/)(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9@:%_+~#?&//=.]*)$/;
|
|
88953
|
+
return n && !o.test(t) ? {
|
|
88954
|
+
isValid: /^(https?:\/\/|file:\/\/).+\.pdf$/i.test(t),
|
|
88955
|
+
parsedUrl: t
|
|
88956
|
+
} : {
|
|
88957
|
+
isValid: o.test(t),
|
|
88950
88958
|
parsedUrl: t
|
|
88951
|
-
}
|
|
88959
|
+
};
|
|
88952
88960
|
}, YCe = (e) => {
|
|
88953
88961
|
const t = ge(), { editor: n, open: o, onClose: r } = e, [i, s] = Ae(""), [a, c] = Ae(""), [d, u] = Ae("");
|
|
88954
88962
|
mt(() => {
|