@linkdlab/funcnodes_react_flow 0.4.6 → 0.4.8
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/funcnodes_react_flow.css +1 -1
- package/dist/index.cjs.js +60 -59
- package/dist/index.es.js +43 -26
- package/dist/index.umd.js +4 -3
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -34750,15 +34750,21 @@ const $7 = ({ value: e }) => /* @__PURE__ */ b.jsx(
|
|
|
34750
34750
|
onLoaded: n
|
|
34751
34751
|
}) => {
|
|
34752
34752
|
const [r, o] = k.useState(t || e);
|
|
34753
|
-
|
|
34753
|
+
if (k.useEffect(() => {
|
|
34754
34754
|
if (e === t) return;
|
|
34755
|
-
const
|
|
34756
|
-
return
|
|
34755
|
+
const a = new Image();
|
|
34756
|
+
return a.onload = () => {
|
|
34757
34757
|
n == null || n(), o(e);
|
|
34758
|
-
},
|
|
34759
|
-
|
|
34758
|
+
}, a.src = e, () => {
|
|
34759
|
+
a.onload = null;
|
|
34760
34760
|
};
|
|
34761
|
-
}, [e, t, n]), r === void 0
|
|
34761
|
+
}, [e, t, n]), r === void 0)
|
|
34762
|
+
return /* @__PURE__ */ b.jsx(b.Fragment, {});
|
|
34763
|
+
if (typeof r != "string")
|
|
34764
|
+
return console.error("ImageRenderer: value is not a string", r), /* @__PURE__ */ b.jsx(b.Fragment, {});
|
|
34765
|
+
const i = r.startsWith("data:") || r.startsWith("blob:");
|
|
34766
|
+
let s = r;
|
|
34767
|
+
return i || (s = "data:image/jpeg;base64," + r), /* @__PURE__ */ b.jsx("img", { src: s, style: { maxWidth: "100%", maxHeight: "100%" } });
|
|
34762
34768
|
}, jS = ({
|
|
34763
34769
|
value: e
|
|
34764
34770
|
}) => /* @__PURE__ */ b.jsx($7, { value: e }), LS = ({
|
|
@@ -38946,12 +38952,12 @@ const IE = ({
|
|
|
38946
38952
|
R = t[0](R);
|
|
38947
38953
|
} catch {
|
|
38948
38954
|
}
|
|
38949
|
-
(A = r.worker) == null || A.set_io_value({
|
|
38955
|
+
R !== (o == null ? void 0 : o.value) && ((A = r.worker) == null || A.set_io_value({
|
|
38950
38956
|
nid: i.node,
|
|
38951
38957
|
ioid: i.id,
|
|
38952
38958
|
value: R,
|
|
38953
38959
|
set_default: i.render_options.set_default
|
|
38954
|
-
});
|
|
38960
|
+
}));
|
|
38955
38961
|
}, c = (R) => {
|
|
38956
38962
|
l(R.target.value);
|
|
38957
38963
|
};
|
|
@@ -39066,30 +39072,37 @@ const IE = ({
|
|
|
39066
39072
|
k.useEffect(() => {
|
|
39067
39073
|
l(t[1](s));
|
|
39068
39074
|
}, [s]);
|
|
39069
|
-
const c = (
|
|
39070
|
-
var
|
|
39071
|
-
let
|
|
39072
|
-
|
|
39075
|
+
const c = (p) => {
|
|
39076
|
+
var h;
|
|
39077
|
+
let g = p.target.value;
|
|
39078
|
+
g || (g = "<NoValue>");
|
|
39073
39079
|
try {
|
|
39074
|
-
|
|
39080
|
+
g = t[0](g);
|
|
39075
39081
|
} catch {
|
|
39076
39082
|
}
|
|
39077
|
-
(
|
|
39083
|
+
g !== s && ((h = n.worker) == null || h.set_io_value({
|
|
39078
39084
|
nid: i.node,
|
|
39079
39085
|
ioid: i.id,
|
|
39080
|
-
value:
|
|
39086
|
+
value: g,
|
|
39081
39087
|
set_default: i.render_options.set_default
|
|
39082
|
-
});
|
|
39088
|
+
}));
|
|
39083
39089
|
};
|
|
39084
39090
|
let u = i.connected ? t[1](s) : a;
|
|
39085
|
-
|
|
39086
|
-
|
|
39091
|
+
u == null && (u = "");
|
|
39092
|
+
const d = (u.match(/\n/g) || []).length, f = Math.max(...u.split(`
|
|
39093
|
+
`).map((p) => p.length), 0);
|
|
39094
|
+
return /* @__PURE__ */ b.jsx(
|
|
39095
|
+
"textarea",
|
|
39087
39096
|
{
|
|
39088
39097
|
className: "nodedatainput styledinput stringinput",
|
|
39089
39098
|
value: u,
|
|
39090
|
-
onChange: (
|
|
39091
|
-
onBlur:
|
|
39092
|
-
|
|
39099
|
+
onChange: (p) => l(p.target.value),
|
|
39100
|
+
onBlur: (p) => {
|
|
39101
|
+
c(p);
|
|
39102
|
+
},
|
|
39103
|
+
disabled: i.connected,
|
|
39104
|
+
rows: d + 1,
|
|
39105
|
+
cols: f + 1
|
|
39093
39106
|
}
|
|
39094
39107
|
);
|
|
39095
39108
|
}, uJ = ({ iostore: e }) => {
|
|
@@ -39655,8 +39668,10 @@ const IE = ({
|
|
|
39655
39668
|
type: "target"
|
|
39656
39669
|
}
|
|
39657
39670
|
),
|
|
39658
|
-
|
|
39659
|
-
|
|
39671
|
+
/* @__PURE__ */ b.jsxs("div", { className: "inner_nodeio", children: [
|
|
39672
|
+
a && /* @__PURE__ */ b.jsx("div", { className: "iovaluefield nodrag", "data-type": o, children: /* @__PURE__ */ b.jsx(a, { iostore: e, inputconverter: l }) }),
|
|
39673
|
+
/* @__PURE__ */ b.jsx("div", { className: "ioname", children: r.name })
|
|
39674
|
+
] }),
|
|
39660
39675
|
/* @__PURE__ */ b.jsx(
|
|
39661
39676
|
Sf,
|
|
39662
39677
|
{
|
|
@@ -39679,8 +39694,10 @@ const IE = ({
|
|
|
39679
39694
|
type: "source"
|
|
39680
39695
|
}
|
|
39681
39696
|
),
|
|
39682
|
-
/* @__PURE__ */ b.
|
|
39683
|
-
|
|
39697
|
+
/* @__PURE__ */ b.jsxs("div", { className: "inner_nodeio", children: [
|
|
39698
|
+
/* @__PURE__ */ b.jsx("div", { className: "ioname", children: r.name }),
|
|
39699
|
+
s ? /* @__PURE__ */ b.jsx("div", { className: "iovaluefield nodrag", children: /* @__PURE__ */ b.jsx(s, { iostore: e }) }) : /* @__PURE__ */ b.jsx("div", { className: "iovaluefield", children: /* @__PURE__ */ b.jsx(bJ, { iostore: e, typestring: o }) })
|
|
39700
|
+
] })
|
|
39684
39701
|
] });
|
|
39685
39702
|
}, NJ = (e) => {
|
|
39686
39703
|
const t = xe(Se), n = AE(e), { DataPreviewViewRenderer: r, DataViewRenderer: o } = xe(or), i = t.render_options();
|
|
@@ -39885,7 +39902,7 @@ const MJ = ({ state: e, className: t = "reacttqdm", ...n }) => {
|
|
|
39885
39902
|
}, jJ = k.memo(({ node_data: e }) => {
|
|
39886
39903
|
var n, r, o, i;
|
|
39887
39904
|
const t = (r = (n = e.render_options) == null ? void 0 : n.data) != null && r.src ? e.io[(i = (o = e.render_options) == null ? void 0 : o.data) == null ? void 0 : i.src] : void 0;
|
|
39888
|
-
return /* @__PURE__ */ b.jsxs("div", { className: "nodebody", children: [
|
|
39905
|
+
return /* @__PURE__ */ b.jsxs("div", { className: "nodebody nowheel ", children: [
|
|
39889
39906
|
e.outputs.map((s) => /* @__PURE__ */ b.jsx(TJ, { iostore: e.io[s] }, s)),
|
|
39890
39907
|
t && /* @__PURE__ */ b.jsx(FJ, { node_data: e, iostore: t }),
|
|
39891
39908
|
e.inputs.map((s) => /* @__PURE__ */ b.jsx(RJ, { iostore: e.io[s] }, s))
|