@linkdlab/funcnodes_react_flow 0.1.0 → 0.1.2
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/frontend/datarenderer/images.d.ts +11 -0
- package/dist/frontend/datarenderer/images.js +13 -0
- package/dist/frontend/datarenderer/images.js.map +1 -0
- package/dist/frontend/datarenderer/index.d.ts +16 -0
- package/dist/frontend/datarenderer/index.js +26 -0
- package/dist/frontend/datarenderer/index.js.map +1 -0
- package/dist/frontend/datarenderer/plotly.d.ts +14 -0
- package/dist/frontend/datarenderer/plotly.js +53 -0
- package/dist/frontend/datarenderer/plotly.js.map +1 -0
- package/dist/frontend/dialog.d.ts +17 -0
- package/dist/frontend/dialog.js +26 -0
- package/dist/frontend/dialog.js.map +1 -0
- package/dist/frontend/edge.d.ts +5 -0
- package/dist/frontend/edge.js +40 -0
- package/dist/frontend/edge.js.map +1 -0
- package/dist/frontend/funcnodesreactflow/index.d.ts +6 -0
- package/dist/frontend/funcnodesreactflow/index.js +94 -0
- package/dist/frontend/funcnodesreactflow/index.js.map +1 -0
- package/dist/frontend/funcnodesreactflow/react_flow_layer.d.ts +5 -0
- package/dist/frontend/funcnodesreactflow/react_flow_layer.js +149 -0
- package/dist/frontend/funcnodesreactflow/react_flow_layer.js.map +1 -0
- package/dist/frontend/header/index.d.ts +4 -0
- package/dist/frontend/header/index.js +227 -0
- package/dist/frontend/header/index.js.map +1 -0
- package/{src/frontend/index.tsx → dist/frontend/index.d.ts} +0 -1
- package/dist/frontend/index.js +4 -0
- package/dist/frontend/index.js.map +1 -0
- package/dist/frontend/lib.d.ts +10 -0
- package/dist/frontend/lib.js +107 -0
- package/dist/frontend/lib.js.map +1 -0
- package/{src/frontend/node/index.tsx → dist/frontend/node/index.d.ts} +0 -1
- package/dist/frontend/node/index.js +3 -0
- package/dist/frontend/node/index.js.map +1 -0
- package/dist/frontend/node/io/default_input_renderer.d.ts +11 -0
- package/dist/frontend/node/io/default_input_renderer.js +235 -0
- package/dist/frontend/node/io/default_input_renderer.js.map +1 -0
- package/dist/frontend/node/io/default_output_render.d.ts +6 -0
- package/dist/frontend/node/io/default_output_render.js +23 -0
- package/dist/frontend/node/io/default_output_render.js.map +1 -0
- package/dist/frontend/node/io/handle_renderer.d.ts +6 -0
- package/dist/frontend/node/io/handle_renderer.js +70 -0
- package/dist/frontend/node/io/handle_renderer.js.map +1 -0
- package/{src/frontend/node/io/index.tsx → dist/frontend/node/io/index.d.ts} +0 -1
- package/dist/frontend/node/io/index.js +4 -0
- package/dist/frontend/node/io/index.js.map +1 -0
- package/dist/frontend/node/io/io.d.ts +16 -0
- package/dist/frontend/node/io/io.js +98 -0
- package/dist/frontend/node/io/io.js.map +1 -0
- package/dist/frontend/node/io/nodeinput.d.ts +6 -0
- package/dist/frontend/node/io/nodeinput.js +74 -0
- package/dist/frontend/node/io/nodeinput.js.map +1 -0
- package/dist/frontend/node/io/nodeoutput.d.ts +6 -0
- package/dist/frontend/node/io/nodeoutput.js +19 -0
- package/dist/frontend/node/io/nodeoutput.js.map +1 -0
- package/dist/frontend/node/node.d.ts +20 -0
- package/dist/frontend/node/node.js +118 -0
- package/dist/frontend/node/node.js.map +1 -0
- package/dist/frontend/utils/colorpicker.d.ts +19 -0
- package/dist/frontend/utils/colorpicker.js +209 -0
- package/dist/frontend/utils/colorpicker.js.map +1 -0
- package/dist/frontend/utils/jsondata.d.ts +6 -0
- package/dist/frontend/utils/jsondata.js +8 -0
- package/dist/frontend/utils/jsondata.js.map +1 -0
- package/dist/frontend/utils/table.d.ts +11 -0
- package/dist/frontend/utils/table.js +108 -0
- package/dist/frontend/utils/table.js.map +1 -0
- package/dist/funcnodes/funcnodesworker.d.ts +72 -0
- package/dist/funcnodes/funcnodesworker.js +532 -0
- package/dist/funcnodes/funcnodesworker.js.map +1 -0
- package/dist/funcnodes/index.js +5 -0
- package/dist/funcnodes/index.js.map +1 -0
- package/dist/funcnodes/websocketworker.d.ts +27 -0
- package/dist/funcnodes/websocketworker.js +224 -0
- package/dist/funcnodes/websocketworker.js.map +1 -0
- package/dist/funcnodes/workermanager.d.ts +32 -0
- package/dist/funcnodes/workermanager.js +241 -0
- package/dist/funcnodes/workermanager.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/states/edge.d.ts +7 -0
- package/dist/states/edge.js +6 -0
- package/dist/states/edge.js.map +1 -0
- package/dist/states/edge.t.d.ts +16 -0
- package/dist/states/edge.t.js +2 -0
- package/dist/states/edge.t.js.map +1 -0
- package/dist/states/fnrfzst.d.ts +10 -0
- package/dist/states/fnrfzst.js +378 -0
- package/dist/states/fnrfzst.js.map +1 -0
- package/dist/states/fnrfzst.t.d.ts +100 -0
- package/dist/states/fnrfzst.t.js +2 -0
- package/dist/states/fnrfzst.t.js.map +1 -0
- package/dist/states/index.d.ts +7 -0
- package/dist/states/index.js +6 -0
- package/dist/states/index.js.map +1 -0
- package/dist/states/lib.d.ts +3 -0
- package/dist/states/lib.js +14 -0
- package/dist/states/lib.js.map +1 -0
- package/dist/states/lib.t.d.ts +24 -0
- package/dist/states/lib.t.js +2 -0
- package/dist/states/lib.t.js.map +1 -0
- package/dist/states/node.d.ts +4 -0
- package/dist/states/node.js +43 -0
- package/dist/states/node.js.map +1 -0
- package/dist/states/node.t.d.ts +73 -0
- package/dist/states/node.t.js +2 -0
- package/dist/states/node.t.js.map +1 -0
- package/dist/states/nodeio.t.d.ts +67 -0
- package/dist/states/nodeio.t.js +2 -0
- package/dist/states/nodeio.t.js.map +1 -0
- package/dist/states/nodespace.d.ts +3 -0
- package/dist/states/nodespace.js +77 -0
- package/dist/states/nodespace.js.map +1 -0
- package/dist/states/nodespace.t.d.ts +16 -0
- package/dist/states/nodespace.t.js +2 -0
- package/dist/states/nodespace.t.js.map +1 -0
- package/dist/states/reactflow.d.ts +8 -0
- package/dist/states/reactflow.js +33 -0
- package/dist/states/reactflow.js.map +1 -0
- package/dist/states/reactflow.t.d.ts +11 -0
- package/dist/states/reactflow.t.js +2 -0
- package/dist/states/reactflow.t.js.map +1 -0
- package/dist/types/rendering.t.d.ts +10 -0
- package/dist/types/rendering.t.js +2 -0
- package/dist/types/rendering.t.js.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/objects.d.ts +19 -0
- package/dist/utils/objects.js +118 -0
- package/dist/utils/objects.js.map +1 -0
- package/package.json +52 -21
- package/package copy.json +0 -63
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -43
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +0 -25
- package/public/robots.txt +0 -3
- package/public/worker_manager +0 -1
- package/src/App.css +0 -38
- package/src/App.test.tsx +0 -9
- package/src/App.tsx +0 -22
- package/src/frontend/datarenderer/images.tsx +0 -28
- package/src/frontend/datarenderer/index.tsx +0 -53
- package/src/frontend/datarenderer/plotly.tsx +0 -82
- package/src/frontend/dialog.scss +0 -88
- package/src/frontend/dialog.tsx +0 -70
- package/src/frontend/edge.scss +0 -15
- package/src/frontend/edge.tsx +0 -31
- package/src/frontend/funcnodesreactflow.scss +0 -63
- package/src/frontend/funcnodesreactflow.tsx +0 -283
- package/src/frontend/header/header.scss +0 -48
- package/src/frontend/header/index.tsx +0 -268
- package/src/frontend/layout/htmlelements.scss +0 -63
- package/src/frontend/lib.scss +0 -157
- package/src/frontend/lib.tsx +0 -198
- package/src/frontend/node/io/default_input_renderer.tsx +0 -327
- package/src/frontend/node/io/default_output_render.tsx +0 -26
- package/src/frontend/node/io/handle_renderer.tsx +0 -89
- package/src/frontend/node/io/io.scss +0 -91
- package/src/frontend/node/io/io.tsx +0 -114
- package/src/frontend/node/io/nodeinput.tsx +0 -125
- package/src/frontend/node/io/nodeoutput.tsx +0 -37
- package/src/frontend/node/node.scss +0 -265
- package/src/frontend/node/node.tsx +0 -208
- package/src/frontend/nodecontextmenu.scss +0 -18
- package/src/frontend/utils/colorpicker.scss +0 -37
- package/src/frontend/utils/colorpicker.tsx +0 -342
- package/src/frontend/utils/jsondata.tsx +0 -19
- package/src/frontend/utils/table.scss +0 -22
- package/src/frontend/utils/table.tsx +0 -159
- package/src/funcnodes/funcnodesworker.ts +0 -455
- package/src/funcnodes/websocketworker.ts +0 -153
- package/src/funcnodes/workermanager.ts +0 -229
- package/src/index.css +0 -13
- package/src/index.tsx +0 -19
- package/src/logo.svg +0 -1
- package/src/react-app-env.d.ts +0 -1
- package/src/reportWebVitals.ts +0 -15
- package/src/setupTests.ts +0 -5
- package/src/state/edge.ts +0 -35
- package/src/state/fnrfzst.ts +0 -440
- package/src/state/index.ts +0 -139
- package/src/state/lib.ts +0 -26
- package/src/state/node.ts +0 -118
- package/src/state/nodespace.ts +0 -151
- package/src/state/reactflow.ts +0 -65
- package/src/types/lib.d.ts +0 -16
- package/src/types/node.d.ts +0 -29
- package/src/types/nodeio.d.ts +0 -82
- package/src/types/worker.d.ts +0 -56
- package/tsconfig.json +0 -20
- /package/{src/funcnodes/index.ts → dist/funcnodes/index.d.ts} +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { UseBoundStore, StoreApi } from "zustand";
|
|
2
|
+
import { DeepPartial } from "../utils";
|
|
3
|
+
import { IOType } from "./nodeio.t";
|
|
4
|
+
import { DataRenderOptions } from "../types/rendering.t";
|
|
5
|
+
/**
|
|
6
|
+
* Interface for the NodeActionAdd.
|
|
7
|
+
* This interface is used when a new node is being added.
|
|
8
|
+
* It has a type property set to "add" and a node property of NodeType.
|
|
9
|
+
*/
|
|
10
|
+
interface BaseNodeAction {
|
|
11
|
+
type: string;
|
|
12
|
+
from_remote: boolean;
|
|
13
|
+
id: string;
|
|
14
|
+
immediate?: boolean;
|
|
15
|
+
}
|
|
16
|
+
interface NodeActionAdd extends BaseNodeAction {
|
|
17
|
+
type: "add";
|
|
18
|
+
node: NodeType;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Interface for the NodeActionUpdate.
|
|
22
|
+
* This interface is used when an existing node is being updated.
|
|
23
|
+
* It has a type property set to "update", an id property for the node to be updated,
|
|
24
|
+
* and a node property of PartialNodeType which contains the properties to be updated.
|
|
25
|
+
*/
|
|
26
|
+
interface NodeActionUpdate extends BaseNodeAction {
|
|
27
|
+
type: "update";
|
|
28
|
+
node: PartialNodeType;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Interface for the NodeActionDelete.
|
|
32
|
+
* This interface is used when a node is being deleted.
|
|
33
|
+
* It has a type property set to "delete" and an id property for the node to be deleted.
|
|
34
|
+
*/
|
|
35
|
+
interface NodeActionDelete extends BaseNodeAction {
|
|
36
|
+
type: "delete";
|
|
37
|
+
}
|
|
38
|
+
interface NodeActionError extends BaseNodeAction {
|
|
39
|
+
type: "error";
|
|
40
|
+
errortype: string;
|
|
41
|
+
error: string;
|
|
42
|
+
}
|
|
43
|
+
interface NodeTrigger extends BaseNodeAction {
|
|
44
|
+
type: "trigger";
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Type alias for NodeAction.
|
|
48
|
+
* A NodeAction can be either a NodeActionAdd, NodeActionUpdate, or NodeActionDelete.
|
|
49
|
+
*/
|
|
50
|
+
type NodeAction = NodeActionAdd | NodeActionUpdate | NodeActionDelete | NodeActionError | NodeTrigger;
|
|
51
|
+
type NodeStore = UseBoundStore<StoreApi<NodeType>>;
|
|
52
|
+
interface NodeRenderOptions {
|
|
53
|
+
data?: DataRenderOptions;
|
|
54
|
+
}
|
|
55
|
+
interface NodeType {
|
|
56
|
+
id: string;
|
|
57
|
+
node_name: string;
|
|
58
|
+
io: {
|
|
59
|
+
[key: string]: IOType;
|
|
60
|
+
};
|
|
61
|
+
frontend: {
|
|
62
|
+
pos: [number, number];
|
|
63
|
+
size: [number, number];
|
|
64
|
+
collapsed: boolean;
|
|
65
|
+
};
|
|
66
|
+
name: string;
|
|
67
|
+
in_trigger: boolean;
|
|
68
|
+
error?: string;
|
|
69
|
+
render_options?: NodeRenderOptions;
|
|
70
|
+
io_order: string[];
|
|
71
|
+
}
|
|
72
|
+
type PartialNodeType = DeepPartial<NodeType>;
|
|
73
|
+
export type { NodeStore, NodeAction, NodeActionUpdate, NodeActionDelete, NodeActionAdd, NodeActionError, PartialNodeType, NodeType, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.t.js","sourceRoot":"","sources":["../../src/states/node.t.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BaseRenderOptions } from "../types/rendering.t";
|
|
3
|
+
import { DeepPartial } from "../utils";
|
|
4
|
+
interface AllOf {
|
|
5
|
+
allOf: SerializedType[];
|
|
6
|
+
}
|
|
7
|
+
interface AnyOf {
|
|
8
|
+
anyOf: SerializedType[];
|
|
9
|
+
}
|
|
10
|
+
interface ArrayOf {
|
|
11
|
+
type: "array";
|
|
12
|
+
items: SerializedType;
|
|
13
|
+
uniqueItems: boolean;
|
|
14
|
+
}
|
|
15
|
+
interface DictOf {
|
|
16
|
+
type: "object";
|
|
17
|
+
keys: SerializedType;
|
|
18
|
+
values: SerializedType;
|
|
19
|
+
}
|
|
20
|
+
interface EnumOf {
|
|
21
|
+
type: "enum";
|
|
22
|
+
values: (number | string | boolean | null)[];
|
|
23
|
+
keys: string[];
|
|
24
|
+
nullable: boolean;
|
|
25
|
+
}
|
|
26
|
+
interface TypeOf {
|
|
27
|
+
type: "type";
|
|
28
|
+
value: SerializedType;
|
|
29
|
+
}
|
|
30
|
+
type SerializedType = string | AllOf | AnyOf | ArrayOf | DictOf | EnumOf | TypeOf;
|
|
31
|
+
interface IORenderOptions extends BaseRenderOptions {
|
|
32
|
+
step?: number;
|
|
33
|
+
set_default?: boolean;
|
|
34
|
+
}
|
|
35
|
+
interface IOValueOptions {
|
|
36
|
+
min?: number;
|
|
37
|
+
max?: number;
|
|
38
|
+
step?: number;
|
|
39
|
+
options?: (string | number)[] | EnumOf;
|
|
40
|
+
colorspace?: string;
|
|
41
|
+
}
|
|
42
|
+
interface IOType {
|
|
43
|
+
connected: boolean;
|
|
44
|
+
does_trigger: boolean;
|
|
45
|
+
full_id: string;
|
|
46
|
+
id: string;
|
|
47
|
+
is_input: boolean;
|
|
48
|
+
name: string;
|
|
49
|
+
node: string;
|
|
50
|
+
type: SerializedType;
|
|
51
|
+
value: any;
|
|
52
|
+
fullvalue?: any;
|
|
53
|
+
render_options?: IORenderOptions;
|
|
54
|
+
value_options?: IOValueOptions;
|
|
55
|
+
valuepreview_type?: string;
|
|
56
|
+
try_get_full_value: () => void;
|
|
57
|
+
}
|
|
58
|
+
type OutputRendererType = ({ io }: {
|
|
59
|
+
io: IOType;
|
|
60
|
+
}) => JSX.Element;
|
|
61
|
+
interface InputRendererProps {
|
|
62
|
+
io: IOType;
|
|
63
|
+
inputconverter: (v: any) => any;
|
|
64
|
+
}
|
|
65
|
+
type InputRendererType = ({ io, inputconverter, }: InputRendererProps) => JSX.Element;
|
|
66
|
+
type PartialIOType = DeepPartial<IOType>;
|
|
67
|
+
export type { AllOf, AnyOf, ArrayOf, DictOf, EnumOf, TypeOf, SerializedType, IORenderOptions, IOValueOptions, IOType, OutputRendererType, InputRendererProps, InputRendererType, PartialIOType, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodeio.t.js","sourceRoot":"","sources":["../../src/states/nodeio.t.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
var NodeSpaceZustand = function (_a) {
|
|
2
|
+
var nodesstates = new Map();
|
|
3
|
+
// const update_node = ({
|
|
4
|
+
// nid,
|
|
5
|
+
// node,
|
|
6
|
+
// from_remote,
|
|
7
|
+
// }: {
|
|
8
|
+
// nid: string;
|
|
9
|
+
// node: PartialNodeType;
|
|
10
|
+
// from_remote: boolean;
|
|
11
|
+
// }) => {};
|
|
12
|
+
// const add_node = ({
|
|
13
|
+
// node,
|
|
14
|
+
// from_remote,
|
|
15
|
+
// }: {
|
|
16
|
+
// node: NodeType;
|
|
17
|
+
// from_remote: boolean;
|
|
18
|
+
// }) => {
|
|
19
|
+
// node = assert_full_node(node);
|
|
20
|
+
// const store = nodesstates.get(node.id);
|
|
21
|
+
// if (store) {
|
|
22
|
+
// update_node({ nid: node.id, node: node, from_remote });
|
|
23
|
+
// } else {
|
|
24
|
+
// nodesstates.set(node.id, createNodeStore(node));
|
|
25
|
+
// _on_node_action({
|
|
26
|
+
// type: "add",
|
|
27
|
+
// node: node,
|
|
28
|
+
// id: node.id,
|
|
29
|
+
// from_remote: from_remote,
|
|
30
|
+
// });
|
|
31
|
+
// }
|
|
32
|
+
// };
|
|
33
|
+
// const set_value = ({
|
|
34
|
+
// node,
|
|
35
|
+
// io,
|
|
36
|
+
// value,
|
|
37
|
+
// set_default,
|
|
38
|
+
// }: {
|
|
39
|
+
// node: string;
|
|
40
|
+
// io: string;
|
|
41
|
+
// value: any;
|
|
42
|
+
// set_default?: boolean;
|
|
43
|
+
// }) => {
|
|
44
|
+
// const store = nodesstates.get(node);
|
|
45
|
+
// if (store) {
|
|
46
|
+
// const state = store.getState();
|
|
47
|
+
// if (!state.io[io]) {
|
|
48
|
+
// throw new Error(`IO ${io} not found in node ${node}`);
|
|
49
|
+
// }
|
|
50
|
+
// const new_state: PartialNodeType = {
|
|
51
|
+
// io: {
|
|
52
|
+
// [io]: {
|
|
53
|
+
// value: value,
|
|
54
|
+
// },
|
|
55
|
+
// },
|
|
56
|
+
// };
|
|
57
|
+
// update_node({ nid: node, node: new_state, from_remote: false });
|
|
58
|
+
// }
|
|
59
|
+
// };
|
|
60
|
+
return {
|
|
61
|
+
nodesstates: nodesstates,
|
|
62
|
+
get_node: function (nid, raise) {
|
|
63
|
+
if (raise === void 0) { raise = true; }
|
|
64
|
+
var store = nodesstates.get(nid);
|
|
65
|
+
if (!store && raise) {
|
|
66
|
+
var keys = nodesstates.keys();
|
|
67
|
+
throw new Error("Node ".concat(nid, " not found, available nodes: ").concat(Array.from(keys)));
|
|
68
|
+
}
|
|
69
|
+
return store;
|
|
70
|
+
},
|
|
71
|
+
// add_node: add_node,
|
|
72
|
+
// update_node: update_node,
|
|
73
|
+
// set_value: set_value,
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export default NodeSpaceZustand;
|
|
77
|
+
//# sourceMappingURL=nodespace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodespace.js","sourceRoot":"","sources":["../../src/states/nodespace.ts"],"names":[],"mappings":"AAKA,IAAM,gBAAgB,GACpB,UAAC,EAAyB;IACxB,IAAM,WAAW,GAAG,IAAI,GAAG,EAAqB,CAAC;IAEjD,yBAAyB;IACzB,SAAS;IACT,UAAU;IACV,iBAAiB;IACjB,OAAO;IACP,iBAAiB;IACjB,2BAA2B;IAC3B,0BAA0B;IAC1B,YAAY;IACZ,sBAAsB;IACtB,UAAU;IACV,iBAAiB;IACjB,OAAO;IACP,oBAAoB;IACpB,0BAA0B;IAC1B,UAAU;IACV,mCAAmC;IACnC,4CAA4C;IAE5C,iBAAiB;IACjB,8DAA8D;IAC9D,aAAa;IACb,uDAAuD;IAEvD,wBAAwB;IACxB,qBAAqB;IACrB,oBAAoB;IACpB,qBAAqB;IACrB,kCAAkC;IAClC,UAAU;IACV,MAAM;IACN,KAAK;IAEL,uBAAuB;IACvB,UAAU;IACV,QAAQ;IACR,WAAW;IACX,iBAAiB;IACjB,OAAO;IACP,kBAAkB;IAClB,gBAAgB;IAChB,gBAAgB;IAChB,2BAA2B;IAC3B,UAAU;IACV,yCAAyC;IACzC,iBAAiB;IACjB,sCAAsC;IACtC,2BAA2B;IAC3B,+DAA+D;IAC/D,QAAQ;IACR,2CAA2C;IAC3C,cAAc;IACd,kBAAkB;IAClB,0BAA0B;IAC1B,aAAa;IACb,WAAW;IACX,SAAS;IAET,uEAAuE;IACvE,MAAM;IACN,KAAK;IAEL,OAAO;QACL,WAAW,EAAE,WAAW;QACxB,QAAQ,EAAE,UAAC,GAAW,EAAE,KAAqB;YAArB,sBAAA,EAAA,YAAqB;YAC3C,IAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACnC,IAAI,CAAC,KAAK,IAAI,KAAK,EAAE,CAAC;gBACpB,IAAM,IAAI,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC;gBAChC,MAAM,IAAI,KAAK,CACb,eAAQ,GAAG,0CAAgC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAE,CAC9D,CAAC;YACJ,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;QACD,sBAAsB;QACtB,4BAA4B;QAC5B,wBAAwB;KACzB,CAAC;AACJ,CAAC,CAAC;AAEJ,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { NodeStore } from "./node.t";
|
|
2
|
+
/**
|
|
3
|
+
* Interface for the NodeSpaceZustand state management.
|
|
4
|
+
* This interface is used to define the shape of the state and the actions that can be performed on it.
|
|
5
|
+
*/
|
|
6
|
+
interface NodeSpaceZustandInterface {
|
|
7
|
+
nodesstates: Map<string, NodeStore>;
|
|
8
|
+
get_node: (nid: string, raise?: boolean) => NodeStore | undefined;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Interface for the NodeSpaceZustandProps.
|
|
12
|
+
* This interface is used to define the properties that can be passed to the NodeSpaceZustand component.
|
|
13
|
+
*/
|
|
14
|
+
interface NodeSpaceZustandProps {
|
|
15
|
+
}
|
|
16
|
+
export type { NodeSpaceZustandProps, NodeSpaceZustandInterface };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodespace.t.js","sourceRoot":"","sources":["../../src/states/nodespace.t.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Connection, EdgeChange, NodeChange } from "reactflow";
|
|
2
|
+
import { RFStore } from "./reactflow.t";
|
|
3
|
+
declare const reactflowstore: ({ on_node_change, on_edge_change, on_connect, }: {
|
|
4
|
+
on_node_change?: (changes: NodeChange[]) => void;
|
|
5
|
+
on_edge_change?: (changes: EdgeChange[]) => void;
|
|
6
|
+
on_connect?: (connection: Connection) => void;
|
|
7
|
+
}) => RFStore;
|
|
8
|
+
export default reactflowstore;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { create } from "zustand";
|
|
2
|
+
import { applyNodeChanges, applyEdgeChanges, } from "reactflow";
|
|
3
|
+
var reactflowstore = function (_a) {
|
|
4
|
+
var on_node_change = _a.on_node_change, on_edge_change = _a.on_edge_change, on_connect = _a.on_connect;
|
|
5
|
+
var _on_node_change = on_node_change || (function (changes) { });
|
|
6
|
+
var _on_edge_change = on_edge_change || (function (changes) { });
|
|
7
|
+
var _on_connect = on_connect || (function (connection) { });
|
|
8
|
+
var useStore = create(function (set, get) { return ({
|
|
9
|
+
nodes: [],
|
|
10
|
+
edges: [],
|
|
11
|
+
onNodesChange: function (changes) {
|
|
12
|
+
set({
|
|
13
|
+
nodes: applyNodeChanges(changes, get().nodes),
|
|
14
|
+
});
|
|
15
|
+
_on_node_change(changes);
|
|
16
|
+
},
|
|
17
|
+
onEdgesChange: function (changes) {
|
|
18
|
+
set({
|
|
19
|
+
edges: applyEdgeChanges(changes, get().edges),
|
|
20
|
+
});
|
|
21
|
+
_on_edge_change(changes);
|
|
22
|
+
},
|
|
23
|
+
onConnect: function (connection) {
|
|
24
|
+
if (connection.source == null || connection.target == null) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
_on_connect(connection);
|
|
28
|
+
},
|
|
29
|
+
}); });
|
|
30
|
+
return useStore;
|
|
31
|
+
};
|
|
32
|
+
export default reactflowstore;
|
|
33
|
+
//# sourceMappingURL=reactflow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactflow.js","sourceRoot":"","sources":["../../src/states/reactflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAIL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,WAAW,CAAC;AAGnB,IAAM,cAAc,GAAG,UAAC,EAQvB;QAPC,cAAc,oBAAA,EACd,cAAc,oBAAA,EACd,UAAU,gBAAA;IAMV,IAAM,eAAe,GAAG,cAAc,IAAI,CAAC,UAAC,OAAqB,IAAM,CAAC,CAAC,CAAC;IAC1E,IAAM,eAAe,GAAG,cAAc,IAAI,CAAC,UAAC,OAAqB,IAAM,CAAC,CAAC,CAAC;IAC1E,IAAM,WAAW,GAAG,UAAU,IAAI,CAAC,UAAC,UAAsB,IAAM,CAAC,CAAC,CAAC;IACnE,IAAM,QAAQ,GAAG,MAAM,CAAU,UAAC,GAAG,EAAE,GAAG,IAAK,OAAA,CAAC;QAC9C,KAAK,EAAE,EAAE;QACT,KAAK,EAAE,EAAE;QACT,aAAa,EAAE,UAAC,OAAqB;YACnC,GAAG,CAAC;gBACF,KAAK,EAAE,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;aAC9C,CAAC,CAAC;YACH,eAAe,CAAC,OAAO,CAAC,CAAC;QAC3B,CAAC;QACD,aAAa,EAAE,UAAC,OAAqB;YACnC,GAAG,CAAC;gBACF,KAAK,EAAE,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;aAC9C,CAAC,CAAC;YACH,eAAe,CAAC,OAAO,CAAC,CAAC;QAC3B,CAAC;QACD,SAAS,EAAE,UAAC,UAAsB;YAChC,IAAI,UAAU,CAAC,MAAM,IAAI,IAAI,IAAI,UAAU,CAAC,MAAM,IAAI,IAAI,EAAE,CAAC;gBAC3D,OAAO;YACT,CAAC;YAED,WAAW,CAAC,UAAU,CAAC,CAAC;QAC1B,CAAC;KACF,CAAC,EAtB6C,CAsB7C,CAAC,CAAC;IACJ,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { UseBoundStore, StoreApi } from "zustand";
|
|
2
|
+
import { Edge, Node, OnNodesChange, OnEdgesChange, OnConnect } from "reactflow";
|
|
3
|
+
type RFState = {
|
|
4
|
+
nodes: Node[];
|
|
5
|
+
edges: Edge[];
|
|
6
|
+
onNodesChange: OnNodesChange;
|
|
7
|
+
onEdgesChange: OnEdgesChange;
|
|
8
|
+
onConnect: OnConnect;
|
|
9
|
+
};
|
|
10
|
+
type RFStore = UseBoundStore<StoreApi<RFState>>;
|
|
11
|
+
export type { RFState, RFStore };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactflow.t.js","sourceRoot":"","sources":["../../src/states/reactflow.t.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type RenderType = "string" | "number" | "boolean" | "image";
|
|
2
|
+
interface BaseRenderOptions {
|
|
3
|
+
type?: RenderType;
|
|
4
|
+
}
|
|
5
|
+
interface DataRenderOptions extends BaseRenderOptions {
|
|
6
|
+
src?: string;
|
|
7
|
+
type?: RenderType;
|
|
8
|
+
preview_type?: string;
|
|
9
|
+
}
|
|
10
|
+
export type { DataRenderOptions, RenderType, BaseRenderOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rendering.t.js","sourceRoot":"","sources":["../../src/types/rendering.t.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAe,MAAM,WAAW,CAAC;AAE1E,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type DeepPartial<T> = T extends object ? {
|
|
2
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
3
|
+
} : T;
|
|
4
|
+
declare function deep_compare_objects(a: any, b: any): boolean;
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* function to deeply merge two objects of type T.
|
|
8
|
+
*
|
|
9
|
+
* @param {T} target - The target object to be merged.
|
|
10
|
+
* @param {DeepPartial<T>} source - The source object to merge into the target. All properties of this object are optional.
|
|
11
|
+
*
|
|
12
|
+
* @returns {T} An object containing the merged object (new_obj) and a boolean indicating if there was a change (change).
|
|
13
|
+
*/
|
|
14
|
+
declare const deep_merge: <T extends {}>(target: T, source: DeepPartial<T>) => {
|
|
15
|
+
new_obj: T;
|
|
16
|
+
change: boolean;
|
|
17
|
+
};
|
|
18
|
+
export { deep_merge, deep_compare_objects };
|
|
19
|
+
export type { DeepPartial };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Checks if the given item is a plain object.
|
|
14
|
+
* @param item The item to check.
|
|
15
|
+
* @returns true if the item is a plain object, false otherwise.
|
|
16
|
+
*/
|
|
17
|
+
function isPlainObject(item) {
|
|
18
|
+
return Object.prototype.toString.call(item) === "[object Object]";
|
|
19
|
+
}
|
|
20
|
+
function deep_compare_objects(a, b) {
|
|
21
|
+
// Check for strict equality first
|
|
22
|
+
if (a === b)
|
|
23
|
+
return true;
|
|
24
|
+
// If either is null or not an object, they're not equal (strict equality would have caught `a === b` if both were null)
|
|
25
|
+
if (typeof a !== "object" ||
|
|
26
|
+
a === null ||
|
|
27
|
+
typeof b !== "object" ||
|
|
28
|
+
b === null)
|
|
29
|
+
return false;
|
|
30
|
+
// If they're not the same type of object, they're not equal
|
|
31
|
+
if (a.constructor !== b.constructor)
|
|
32
|
+
return false;
|
|
33
|
+
if (a.constructor === Object || a.constructor === Array) {
|
|
34
|
+
var keysA = Object.keys(a);
|
|
35
|
+
var keysB = Object.keys(b);
|
|
36
|
+
// If their property lengths are different, they're different objects
|
|
37
|
+
if (keysA.length !== keysB.length)
|
|
38
|
+
return false;
|
|
39
|
+
// Check each key in 'a' to ensure it exists in 'b' and is equal; recurse if value is an object
|
|
40
|
+
for (var _i = 0, keysA_1 = keysA; _i < keysA_1.length; _i++) {
|
|
41
|
+
var key = keysA_1[_i];
|
|
42
|
+
if (!keysB.includes(key))
|
|
43
|
+
return false;
|
|
44
|
+
if (!deep_compare_objects(a[key], b[key]))
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// Dates comparison
|
|
49
|
+
if (a instanceof Date && b instanceof Date)
|
|
50
|
+
return a.getTime() === b.getTime();
|
|
51
|
+
// If we've made it this far, objects must be considered equal
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* function to deeply merge two objects of type T.
|
|
57
|
+
*
|
|
58
|
+
* @param {T} target - The target object to be merged.
|
|
59
|
+
* @param {DeepPartial<T>} source - The source object to merge into the target. All properties of this object are optional.
|
|
60
|
+
*
|
|
61
|
+
* @returns {T} An object containing the merged object (new_obj) and a boolean indicating if there was a change (change).
|
|
62
|
+
*/
|
|
63
|
+
var deep_merge = function (target, source) {
|
|
64
|
+
var change = false;
|
|
65
|
+
if (!isPlainObject(target)) {
|
|
66
|
+
throw new Error("Target must be a plain object");
|
|
67
|
+
}
|
|
68
|
+
if (!isPlainObject(source)) {
|
|
69
|
+
throw new Error("Source must be a plain object");
|
|
70
|
+
}
|
|
71
|
+
var new_obj = __assign({}, target);
|
|
72
|
+
Object.keys(source).forEach(function (key) {
|
|
73
|
+
// @ts-ignore: Type 'string' cannot be used to index type 'T
|
|
74
|
+
var sourceValue = source[key];
|
|
75
|
+
// @ts-ignore: Type 'string' cannot be used to index type 'T
|
|
76
|
+
var targetValue = target[key];
|
|
77
|
+
if (isPlainObject(sourceValue) && isPlainObject(targetValue)) {
|
|
78
|
+
// If both the target and source values are plain objects, merge them
|
|
79
|
+
var _a = deep_merge(targetValue, sourceValue), mergedObj = _a.new_obj, didChange = _a.change;
|
|
80
|
+
if (didChange) {
|
|
81
|
+
change = true;
|
|
82
|
+
// @ts-ignore: Type 'string' cannot be used to index type 'T
|
|
83
|
+
new_obj[key] = mergedObj;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
else if (!deep_compare_objects(targetValue, sourceValue)) {
|
|
87
|
+
change = true;
|
|
88
|
+
// @ts-ignore: Type 'string' cannot be used to index type 'T
|
|
89
|
+
new_obj[key] = sourceValue;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
return { new_obj: new_obj, change: change };
|
|
93
|
+
// for (const key in source) {
|
|
94
|
+
// // @ts-ignore: Type 'string' cannot be used to index type 'T
|
|
95
|
+
// if (typeof source[key] === "object" && target[key]) {
|
|
96
|
+
// const { new_obj: new_obj2, change: change2 } = deep_merge(
|
|
97
|
+
// // @ts-ignore: Type 'string' cannot be used to index type 'T
|
|
98
|
+
// target[key],
|
|
99
|
+
// source[key]
|
|
100
|
+
// );
|
|
101
|
+
// if (change2) {
|
|
102
|
+
// change = true;
|
|
103
|
+
// // @ts-ignore: Type 'string' cannot be used to index type 'T
|
|
104
|
+
// new_obj[key] = new_obj2;
|
|
105
|
+
// }
|
|
106
|
+
// } else {
|
|
107
|
+
// // @ts-ignore: Type 'string' cannot be used to index type 'T'
|
|
108
|
+
// if (target[key] !== source[key]) {
|
|
109
|
+
// change = true;
|
|
110
|
+
// }
|
|
111
|
+
// // @ts-ignore: Type 'string' cannot be used to index type 'T'
|
|
112
|
+
// new_obj[key] = source[key];
|
|
113
|
+
// }
|
|
114
|
+
// }
|
|
115
|
+
// return { new_obj, change };
|
|
116
|
+
};
|
|
117
|
+
export { deep_merge, deep_compare_objects };
|
|
118
|
+
//# sourceMappingURL=objects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objects.js","sourceRoot":"","sources":["../../src/utils/objects.ts"],"names":[],"mappings":";;;;;;;;;;;AAOA;;;;GAIG;AACH,SAAS,aAAa,CAAC,IAAS;IAC9B,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,iBAAiB,CAAC;AACpE,CAAC;AAED,SAAS,oBAAoB,CAAC,CAAM,EAAE,CAAM;IAC1C,kCAAkC;IAClC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAEzB,wHAAwH;IACxH,IACE,OAAO,CAAC,KAAK,QAAQ;QACrB,CAAC,KAAK,IAAI;QACV,OAAO,CAAC,KAAK,QAAQ;QACrB,CAAC,KAAK,IAAI;QAEV,OAAO,KAAK,CAAC;IAEf,4DAA4D;IAC5D,IAAI,CAAC,CAAC,WAAW,KAAK,CAAC,CAAC,WAAW;QAAE,OAAO,KAAK,CAAC;IAElD,IAAI,CAAC,CAAC,WAAW,KAAK,MAAM,IAAI,CAAC,CAAC,WAAW,KAAK,KAAK,EAAE,CAAC;QACxD,IAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC7B,IAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAE7B,qEAAqE;QACrE,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM;YAAE,OAAO,KAAK,CAAC;QAEhD,+FAA+F;QAC/F,KAAkB,UAAK,EAAL,eAAK,EAAL,mBAAK,EAAL,IAAK,EAAE,CAAC;YAArB,IAAM,GAAG,cAAA;YACZ,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC;gBAAE,OAAO,KAAK,CAAC;YACvC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;gBAAE,OAAO,KAAK,CAAC;QAC1D,CAAC;IACH,CAAC;IAED,mBAAmB;IACnB,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,IAAI;QACxC,OAAO,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;IAErC,8DAA8D;IAC9D,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;GAQG;AACH,IAAM,UAAU,GAAG,UACjB,MAAS,EACT,MAAsB;IAKtB,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IACD,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IACD,IAAM,OAAO,gBAAW,MAAM,CAAE,CAAC;IAEjC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,UAAC,GAAG;QAC9B,4DAA4D;QAC5D,IAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAChC,4DAA4D;QAC5D,IAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAEhC,IAAI,aAAa,CAAC,WAAW,CAAC,IAAI,aAAa,CAAC,WAAW,CAAC,EAAE,CAAC;YAC7D,qEAAqE;YAC/D,IAAA,KAA4C,UAAU,CAC1D,WAAW,EACX,WAAW,CACZ,EAHgB,SAAS,aAAA,EAAU,SAAS,YAG5C,CAAC;YACF,IAAI,SAAS,EAAE,CAAC;gBACd,MAAM,GAAG,IAAI,CAAC;gBACd,4DAA4D;gBAC5D,OAAO,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;YAC3B,CAAC;QACH,CAAC;aAAM,IAAI,CAAC,oBAAoB,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,CAAC;YAC3D,MAAM,GAAG,IAAI,CAAC;YACd,4DAA4D;YAC5D,OAAO,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC;QAC7B,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,OAAO,SAAA,EAAE,MAAM,QAAA,EAAE,CAAC;IAE3B,8BAA8B;IAC9B,iEAAiE;IACjE,0DAA0D;IAC1D,iEAAiE;IACjE,qEAAqE;IACrE,qBAAqB;IACrB,oBAAoB;IACpB,SAAS;IACT,qBAAqB;IACrB,uBAAuB;IACvB,qEAAqE;IACrE,iCAAiC;IACjC,QAAQ;IACR,aAAa;IACb,oEAAoE;IACpE,yCAAyC;IACzC,uBAAuB;IACvB,QAAQ;IACR,oEAAoE;IACpE,kCAAkC;IAClC,MAAM;IACN,IAAI;IACJ,8BAA8B;AAChC,CAAC,CAAC;AACF,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linkdlab/funcnodes_react_flow",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/Linkdlab/FuncNodesReact.git"
|
|
8
|
+
},
|
|
9
|
+
"author": "Julian Kimmig",
|
|
10
|
+
"license": "ISC",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/Linkdlab/FuncNodesReact/issues"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/Linkdlab/FuncNodesReact#readme",
|
|
15
|
+
"main": "dist/index.js",
|
|
16
|
+
"source": "src/index.tsx",
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=10"
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"start": "react-scripts start",
|
|
22
|
+
"build": "react-scripts build",
|
|
23
|
+
"test": "react-scripts test",
|
|
24
|
+
"eject": "react-scripts eject",
|
|
25
|
+
"buildmod": "tsc -p tsconfig.esm.json",
|
|
26
|
+
"webpack": "cd app && webpack",
|
|
27
|
+
"serve": "cd app && webpack serve --mode=development"
|
|
28
|
+
},
|
|
4
29
|
"dependencies": {
|
|
5
30
|
"@emotion/react": "^11.11.3",
|
|
6
31
|
"@emotion/styled": "^11.11.0",
|
|
@@ -28,19 +53,16 @@
|
|
|
28
53
|
"react-plotly.js": "^2.6.0",
|
|
29
54
|
"react-scripts": "5.0.1",
|
|
30
55
|
"reactflow": "^11.10.3",
|
|
31
|
-
"sass": "^1.
|
|
56
|
+
"sass": "^1.75.0",
|
|
32
57
|
"scss": "^0.2.4",
|
|
33
58
|
"typescript": "^4.4.2",
|
|
34
59
|
"uuid": "^9.0.1",
|
|
35
60
|
"web-vitals": "^2.1.0",
|
|
36
61
|
"zustand": "^4.5.0"
|
|
37
62
|
},
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
"test": "react-scripts test",
|
|
42
|
-
"eject": "react-scripts eject"
|
|
43
|
-
},
|
|
63
|
+
"files": [
|
|
64
|
+
"dist"
|
|
65
|
+
],
|
|
44
66
|
"eslintConfig": {
|
|
45
67
|
"extends": [
|
|
46
68
|
"react-app",
|
|
@@ -59,17 +81,26 @@
|
|
|
59
81
|
"last 1 safari version"
|
|
60
82
|
]
|
|
61
83
|
},
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
|
|
74
|
-
|
|
84
|
+
"devDependencies": {
|
|
85
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
86
|
+
"autoprefixer": "^10.4.19",
|
|
87
|
+
"babel-loader": "^9.1.3",
|
|
88
|
+
"css-loader": "^7.1.1",
|
|
89
|
+
"cssnano": "^6.1.2",
|
|
90
|
+
"html-webpack-plugin": "^5.6.0",
|
|
91
|
+
"microbundle-crl": "^0.13.11",
|
|
92
|
+
"mini-css-extract-plugin": "^2.9.0",
|
|
93
|
+
"postcss": "^8.4.38",
|
|
94
|
+
"postcss-loader": "^8.1.1",
|
|
95
|
+
"purgecss-webpack-plugin": "^6.0.0",
|
|
96
|
+
"rollup": "^4.16.3",
|
|
97
|
+
"rollup-plugin-import-css": "^3.5.0",
|
|
98
|
+
"rollup-plugin-scss": "^4.0.0",
|
|
99
|
+
"rollup-plugin-typescript2": "^0.36.0",
|
|
100
|
+
"sass-loader": "^14.2.1",
|
|
101
|
+
"ts-loader": "^9.5.1",
|
|
102
|
+
"tsup": "^8.0.2",
|
|
103
|
+
"webpack": "^5.91.0",
|
|
104
|
+
"webpack-cli": "^5.1.4"
|
|
105
|
+
}
|
|
75
106
|
}
|