New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@uploadcare/react-uploader

Package Overview
Dependencies
Maintainers
4
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uploadcare/react-uploader - npm Package Compare versions

Comparing version 0.5.4 to 0.5.5-alpha.0

90

dist/react-uploader.js

@@ -10,8 +10,8 @@ import s, { useState as B, useEffect as F, useMemo as f } from "react";

]), b = (e = {}) => Object == null ? void 0 : Object.keys(e).reduce((r, o) => {
var a, n;
const t = e == null ? void 0 : e[o], l = `on${(n = (a = t == null ? void 0 : t.split("-")) == null ? void 0 : a.map((c) => c.charAt(0).toUpperCase() + c.slice(1))) == null ? void 0 : n.join("")}`;
return r[l] = t, r;
}, {}), h = /* @__PURE__ */ new WeakMap(), O = (e) => {
let r = h.get(e);
return r === void 0 && (r = /* @__PURE__ */ new Map(), h.set(e, r)), r;
var l, n;
const t = e == null ? void 0 : e[o], a = `on${(n = (l = t == null ? void 0 : t.split("-")) == null ? void 0 : l.map((c) => c.charAt(0).toUpperCase() + c.slice(1))) == null ? void 0 : n.join("")}`;
return r[a] = t, r;
}, {}), M = /* @__PURE__ */ new WeakMap(), O = (e) => {
let r = M.get(e);
return r === void 0 && (r = /* @__PURE__ */ new Map(), M.set(e, r)), r;
}, x = ({

@@ -21,13 +21,13 @@ node: e,

valueProp: o,
prevValueProp: a,
prevValueProp: l,
event: n
}) => {
if (n !== void 0) {
if (o !== a) {
const t = O(e), l = t.has(n);
if (o !== l) {
const t = O(e), a = t.has(n);
let c = t.get(n);
o !== void 0 ? l ? c.handleEvent = o : (c = { handleEvent: o }, t.set(n, c), e.addEventListener(
o !== void 0 ? a ? c.handleEvent = o : (c = { handleEvent: o }, t.set(n, c), e.addEventListener(
n,
(d) => c.handleEvent(d.detail)
)) : l && (t.delete(n), e.removeEventListener(n, c));
)) : a && (t.delete(n), e.removeEventListener(n, c));
}

@@ -38,6 +38,6 @@ return;

}, T = (e, r, o) => {
const a = {}, n = {};
return Object.entries(e).forEach(([t, l]) => {
R.has(t) ? a[t === "className" ? "class" : t] = l : r.has(t) || t in o.prototype ? n[t] = l : a[t] = l;
}), { reactProps: a, customElProps: n };
const l = {}, n = {};
return Object.entries(e).forEach(([t, a]) => {
R.has(t) ? l[t === "className" ? "class" : t] = a : r.has(t) || t in o.prototype ? n[t] = a : l[t] = a;
}), { reactProps: l, customElProps: n };
}, v = ({

@@ -48,7 +48,7 @@ react: e,

elClass: o,
schemaEvents: a
schemaEvents: l
}) => {
const n = b(a), t = new Set(Object.keys(n ?? {})), l = e.forwardRef(
const n = b(l), t = new Set(Object.keys(n ?? {})), a = e.forwardRef(
(c, d) => {
const u = e.useRef(/* @__PURE__ */ new Map()), g = e.useRef(null), { reactProps: I, customElProps: M } = T(c, t, o);
const u = e.useRef(/* @__PURE__ */ new Map()), g = e.useRef(null), { reactProps: I, customElProps: A } = T(c, t, o);
return e.useLayoutEffect(() => {

@@ -58,7 +58,7 @@ if (g.current === null)

const m = /* @__PURE__ */ new Map();
for (const p in M)
for (const p in A)
x({
node: g.current,
nameProp: p,
valueProp: M[p],
valueProp: A[p],
prevValueProp: u.current.get(p),

@@ -87,3 +87,3 @@ event: n[p]

);
return l.displayName = o.name, l;
return a.displayName = o.name, a;
}, E = v({

@@ -100,4 +100,4 @@ react: s,

const r = {}, o = {};
return Object.entries(e).forEach(([a, n]) => {
a.startsWith("on") ? r[a] = n : o[a] = n;
return Object.entries(e).forEach(([l, n]) => {
l.startsWith("on") ? r[l] = n : o[l] = n;
}), {

@@ -107,3 +107,3 @@ eventHandlers: r,

};
}, j = "0.5.3", L = "React-Uploader", U = () => `${L}/${j}`, w = ({ children: e }) => e, A = () => {
}, j = "0.5.5-alpha.0", L = "React-Uploader", U = () => `${L}/${j}`, w = ({ children: e }) => e, h = () => {
const [e, r] = B(!1);

@@ -123,18 +123,18 @@ return F(() => {

classNameUploader: o,
apiRef: a,
apiRef: l,
fallback: n,
...t
}) => {
const l = f(() => e ?? i.UID.generate(), [e]), { eventHandlers: c, config: d } = f(
const a = f(() => e ?? i.UID.generate(), [e]), { eventHandlers: c, config: d } = f(
() => C(t),
[t]
), u = A();
return /* @__PURE__ */ s.createElement(w, { condition: u, fallback: n }, /* @__PURE__ */ s.createElement("div", { className: r }, /* @__PURE__ */ s.createElement(E, { userAgentIntegration: U(), "ctx-name": l, ...d }), /* @__PURE__ */ s.createElement(
), u = h();
return /* @__PURE__ */ s.createElement(w, { condition: u, fallback: n }, /* @__PURE__ */ s.createElement("div", { className: r }, /* @__PURE__ */ s.createElement(E, { userAgentIntegration: U(), "ctx-name": a, ...d }), /* @__PURE__ */ s.createElement(
P,
{
ref: a,
"ctx-name": l,
ref: l,
"ctx-name": a,
...c
}
), /* @__PURE__ */ s.createElement(N, { class: o, "ctx-name": l })));
), /* @__PURE__ */ s.createElement(N, { class: o, "ctx-name": a })));
};

@@ -150,18 +150,18 @@ i.registerBlocks(i);

classNameUploader: o,
apiRef: a,
apiRef: l,
fallback: n,
...t
}) => {
const l = f(() => e ?? i.UID.generate(), [e]), { eventHandlers: c, config: d } = f(
const a = f(() => e ?? i.UID.generate(), [e]), { eventHandlers: c, config: d } = f(
() => C(t),
[t]
), u = A();
return /* @__PURE__ */ s.createElement(w, { condition: u, fallback: n }, /* @__PURE__ */ s.createElement("div", { className: r }, /* @__PURE__ */ s.createElement(E, { userAgentIntegration: U(), "ctx-name": l, ...d }), /* @__PURE__ */ s.createElement(
), u = h();
return /* @__PURE__ */ s.createElement(w, { condition: u, fallback: n }, /* @__PURE__ */ s.createElement("div", { className: r }, /* @__PURE__ */ s.createElement(E, { userAgentIntegration: U(), "ctx-name": a, ...d }), /* @__PURE__ */ s.createElement(
P,
{
ref: a,
"ctx-name": l,
ref: l,
"ctx-name": a,
...c
}
), /* @__PURE__ */ s.createElement(_, { class: o, "ctx-name": l })));
), /* @__PURE__ */ s.createElement(_, { class: o, "ctx-name": a })));
};

@@ -177,18 +177,18 @@ i.registerBlocks(i);

classNameUploader: o,
apiRef: a,
apiRef: l,
fallback: n,
...t
}) => {
const l = f(() => e ?? i.UID.generate(), [e]), { eventHandlers: c, config: d } = f(
const a = f(() => e ?? i.UID.generate(), [e]), { eventHandlers: c, config: d } = f(
() => C(t),
[t]
), u = A();
return /* @__PURE__ */ s.createElement(w, { condition: u, fallback: n }, /* @__PURE__ */ s.createElement("div", { className: r }, /* @__PURE__ */ s.createElement(E, { userAgentIntegration: U(), "ctx-name": l, ...d }), /* @__PURE__ */ s.createElement(
), u = h();
return /* @__PURE__ */ s.createElement(w, { condition: u, fallback: n }, /* @__PURE__ */ s.createElement("div", { className: r }, /* @__PURE__ */ s.createElement(E, { userAgentIntegration: U(), "ctx-name": a, ...d }), /* @__PURE__ */ s.createElement(
P,
{
ref: a,
"ctx-name": l,
ref: l,
"ctx-name": a,
...c
}
), /* @__PURE__ */ s.createElement(k, { class: o, "ctx-name": l })));
), /* @__PURE__ */ s.createElement(k, { class: o, "ctx-name": a })));
};

@@ -195,0 +195,0 @@ export {

{
"name": "@uploadcare/react-uploader",
"description": "React component for file uploads using Uploadcare",
"version": "0.5.4",
"version": "0.5.5-alpha.0",
"private": false,

@@ -30,3 +30,3 @@ "type": "module",

"dependencies": {
"@uploadcare/blocks": "^0.39.1",
"@uploadcare/blocks": "^0.43.0",
"@uploadcare/react-adapter": "^0.3.0"

@@ -84,4 +84,3 @@ },

"front-end"
],
"gitHead": "4e93391fad463da99edc41a4a2ae8e84d61b9c9c"
]
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc