@linkdlab/funcnodes_react_flow 0.4.3 → 0.4.4
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/browser_index.d.ts +8 -0
- package/dist/frontend/assets/fontawsome.d.ts +21 -0
- package/dist/frontend/assets/mui.d.ts +8 -0
- package/dist/frontend/datarenderer/data_renderer_overlay.d.ts +3 -0
- package/dist/frontend/datarenderer/default_data_overlay_views.d.ts +6 -0
- package/dist/frontend/datarenderer/default_data_preview_renderer.d.ts +5 -0
- package/dist/frontend/datarenderer/default_data_view_renderer.d.ts +13 -0
- package/dist/frontend/datarenderer/default_handle_previews.d.ts +4 -0
- package/dist/frontend/datarenderer/default_inline_renderer.d.ts +5 -0
- package/dist/frontend/datarenderer/default_input_renderer.d.ts +17 -0
- package/dist/frontend/datarenderer/default_output_renderer.d.ts +9 -0
- package/dist/frontend/datarenderer/images.d.ts +19 -0
- package/dist/frontend/datarenderer/rendermappings.d.ts +204 -0
- package/dist/frontend/dialog.d.ts +20 -0
- package/dist/frontend/edge.d.ts +4 -0
- package/dist/frontend/funcnodesreactflow/index.d.ts +8 -0
- package/dist/frontend/funcnodesreactflow/react_flow_layer.d.ts +7 -0
- package/dist/frontend/header/index.d.ts +4 -0
- package/dist/frontend/index.d.ts +0 -0
- package/dist/frontend/layout/components.d.ts +36 -0
- package/dist/frontend/layout/fullscreenelement.d.ts +17 -0
- package/dist/frontend/layout/smoothexpand.d.ts +22 -0
- package/dist/frontend/lib.d.ts +10 -0
- package/dist/frontend/node/body_data_renderer.d.ts +3 -0
- package/dist/frontend/node/index.d.ts +4 -0
- package/dist/frontend/node/io/handle_renderer.d.ts +3 -0
- package/dist/frontend/node/io/index.d.ts +3 -0
- package/dist/frontend/node/io/io.d.ts +15 -0
- package/dist/frontend/node/io/iodataoverlay.d.ts +10 -0
- package/dist/frontend/node/io/nodeinput.d.ts +10 -0
- package/dist/frontend/node/io/nodeoutput.d.ts +6 -0
- package/dist/frontend/node/node.d.ts +25 -0
- package/dist/frontend/node/nodesettings.d.ts +3 -0
- package/dist/frontend/utils/colorpicker.d.ts +22 -0
- package/dist/frontend/utils/jsondata.d.ts +5 -0
- package/dist/frontend/utils/progressbar.d.ts +46 -0
- package/dist/frontend/utils/select.d.ts +17 -0
- package/dist/frontend/utils/table.d.ts +10 -0
- package/dist/funcnodes/datastructures.d.ts +51 -0
- package/dist/funcnodes/funcnodesworker.d.ts +147 -0
- package/dist/funcnodes/index.d.ts +4 -0
- package/dist/funcnodes/websocketworker.d.ts +45 -0
- package/dist/funcnodes/workermanager.d.ts +34 -0
- package/dist/funcnodes_react_flow.css +1 -0
- package/dist/index.cjs.js +865 -0
- package/dist/index.d.ts +16 -1224
- package/dist/index.es.js +40601 -0
- package/dist/index.umd.js +865 -0
- package/dist/plugin/helper.d.ts +2 -0
- package/dist/plugin/index.d.ts +7 -0
- package/dist/plugin/v0/index.d.ts +2 -0
- package/dist/plugin/v1/index.d.ts +2 -0
- package/dist/plugin/v1/upgrader.d.ts +34 -0
- package/dist/states/edge.d.ts +7 -0
- package/dist/states/edge.t.d.ts +16 -0
- package/dist/states/fnrfzst.d.ts +9 -0
- package/dist/states/fnrfzst.t.d.ts +182 -0
- package/dist/states/index.d.ts +7 -0
- package/dist/states/lib.d.ts +3 -0
- package/dist/states/lib.t.d.ts +45 -0
- package/dist/states/node/newnode.d.ts +4 -0
- package/dist/states/node/update_funcs.d.ts +9 -0
- package/dist/states/node/update_io.d.ts +3 -0
- package/dist/states/node/update_node.d.ts +6 -0
- package/dist/states/nodespace.d.ts +3 -0
- package/dist/states/nodespace.t.d.ts +16 -0
- package/dist/states/reactflow.d.ts +8 -0
- package/dist/states/reactflow.t.d.ts +11 -0
- package/dist/types/versioned/v0/index.d.ts +5 -0
- package/dist/types/versioned/v0/io.t.d.ts +29 -0
- package/dist/types/versioned/v0/node.t.d.ts +75 -0
- package/dist/types/versioned/v0/plugins.t.d.ts +37 -0
- package/dist/types/versioned/v0/rendering.t.d.ts +42 -0
- package/dist/types/versioned/v0/rendermappings.t.d.ts +27 -0
- package/dist/types/versioned/v1/index.d.ts +5 -0
- package/dist/types/versioned/v1/io.t.d.ts +51 -0
- package/dist/types/versioned/v1/node.t.d.ts +64 -0
- package/dist/types/versioned/v1/plugins.t.d.ts +39 -0
- package/dist/types/versioned/v1/rendering.t.d.ts +1 -0
- package/dist/types/versioned/v1/rendermappings.t.d.ts +53 -0
- package/dist/types/versioned/versions.t.d.ts +3 -0
- package/dist/utils/autolayout/force.d.ts +2 -0
- package/dist/utils/autolayout/index.d.ts +2 -0
- package/dist/utils/autolayout/txt.d.ts +15 -0
- package/dist/utils/data.d.ts +12 -0
- package/dist/utils/debugger.d.ts +5 -0
- package/dist/utils/helperfunctions.d.ts +16 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/logger.d.ts +26 -0
- package/dist/utils/objects.d.ts +142 -0
- package/package.json +36 -70
- package/dist/esm/index.esm.mjs +0 -105
- package/dist/esm/index.esm.mjs.map +0 -1
- package/dist/style.css +0 -1
- package/dist/umd/index.umd.js +0 -105
- package/dist/umd/index.umd.js.map +0 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { UseBoundStore, StoreApi } from 'zustand';
|
|
2
|
+
import { LimitedDeepPartial } from '../../../utils/objects';
|
|
3
|
+
import { IORenderOptions, IOValueOptions } from '../v0/io.t';
|
|
4
|
+
import { SerializedType } from './rendering.t';
|
|
5
|
+
import { NodeStore } from './node.t';
|
|
6
|
+
import { DataStructure } from '../../../funcnodes/datastructures';
|
|
7
|
+
export * from '../v0/io.t';
|
|
8
|
+
export interface ValueStoreInterface {
|
|
9
|
+
preview: DataStructure<any, any> | undefined;
|
|
10
|
+
full: DataStructure<any, any> | undefined;
|
|
11
|
+
}
|
|
12
|
+
export interface IOStore {
|
|
13
|
+
_state: UseBoundStore<StoreApi<IOType>>;
|
|
14
|
+
use: () => IOType;
|
|
15
|
+
getState: () => IOType;
|
|
16
|
+
setState: (new_state: Partial<IOType>) => void;
|
|
17
|
+
update: (new_state: PartialSerializedIOType) => void;
|
|
18
|
+
valuestore: UseBoundStore<StoreApi<ValueStoreInterface>>;
|
|
19
|
+
node: NodeStore;
|
|
20
|
+
updateValueStore: (newData: Partial<ValueStoreInterface>) => void;
|
|
21
|
+
}
|
|
22
|
+
export interface BasicIOType {
|
|
23
|
+
connected: boolean;
|
|
24
|
+
does_trigger: boolean;
|
|
25
|
+
full_id: string;
|
|
26
|
+
id: string;
|
|
27
|
+
is_input: boolean;
|
|
28
|
+
name: string;
|
|
29
|
+
node: string;
|
|
30
|
+
type: SerializedType;
|
|
31
|
+
render_options: IORenderOptions;
|
|
32
|
+
value_options?: IOValueOptions;
|
|
33
|
+
valuepreview_type?: string;
|
|
34
|
+
hidden: boolean;
|
|
35
|
+
emit_value_set: boolean;
|
|
36
|
+
default?: any;
|
|
37
|
+
required: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface SerializedIOType extends BasicIOType {
|
|
40
|
+
value: string | number | boolean | undefined | DataStructure<any, any>;
|
|
41
|
+
fullvalue: string | number | boolean | undefined | DataStructure<any, any>;
|
|
42
|
+
}
|
|
43
|
+
export interface IOType extends BasicIOType {
|
|
44
|
+
try_get_full_value: () => void;
|
|
45
|
+
set_hidden: (v: boolean) => void;
|
|
46
|
+
}
|
|
47
|
+
export type PartialSerializedIOType = LimitedDeepPartial<SerializedIOType>;
|
|
48
|
+
export interface UpdateableIOOptions {
|
|
49
|
+
name?: string;
|
|
50
|
+
hidden?: boolean;
|
|
51
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { StoreApi, UseBoundStore } from 'zustand';
|
|
2
|
+
import { LimitedDeepPartial } from '../../../utils/objects';
|
|
3
|
+
import { IOStore, PartialSerializedIOType, SerializedIOType } from './io.t';
|
|
4
|
+
import { TqdmState } from '../../../frontend/utils/progressbar';
|
|
5
|
+
import { v0 as v0_types } from '../../../types/versioned/versions.t';
|
|
6
|
+
export * from '../v0/node.t';
|
|
7
|
+
export interface NodeProperties {
|
|
8
|
+
"frontend:size": [number, number];
|
|
9
|
+
"frontend:pos": [number, number];
|
|
10
|
+
"frontend:collapsed": boolean;
|
|
11
|
+
[key: string]: any | undefined;
|
|
12
|
+
}
|
|
13
|
+
export interface NodeActionUpdate extends v0_types.BaseNodeAction {
|
|
14
|
+
type: "update";
|
|
15
|
+
node: PartialSerializedNodeType;
|
|
16
|
+
}
|
|
17
|
+
export interface NodeActionAdd extends v0_types.BaseNodeAction {
|
|
18
|
+
type: "add";
|
|
19
|
+
node: SerializedNodeType;
|
|
20
|
+
}
|
|
21
|
+
export type NodeAction = NodeActionAdd | NodeActionUpdate | v0_types.NodeActionDelete | v0_types.NodeActionError | v0_types.NodeActionTrigger;
|
|
22
|
+
export type PartialSerializedNodeType = LimitedDeepPartial<SerializedNodeType>;
|
|
23
|
+
export interface BasicNodeType {
|
|
24
|
+
id: string;
|
|
25
|
+
node_id: string;
|
|
26
|
+
node_name: string;
|
|
27
|
+
name: string;
|
|
28
|
+
error?: string;
|
|
29
|
+
render_options?: v0_types.NodeRenderOptions;
|
|
30
|
+
description?: string;
|
|
31
|
+
properties: NodeProperties;
|
|
32
|
+
status?: {
|
|
33
|
+
[key: string]: any | undefined;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export type SerializedNodeIOMappingType = {
|
|
37
|
+
[key: string]: SerializedIOType | undefined;
|
|
38
|
+
};
|
|
39
|
+
export type PartialSerializedNodeIOMappingType = {
|
|
40
|
+
[key: string]: PartialSerializedIOType | undefined;
|
|
41
|
+
};
|
|
42
|
+
export interface SerializedNodeType extends BasicNodeType {
|
|
43
|
+
in_trigger: boolean;
|
|
44
|
+
io: SerializedNodeIOMappingType;
|
|
45
|
+
io_order?: string[];
|
|
46
|
+
progress: TqdmState;
|
|
47
|
+
}
|
|
48
|
+
export interface NodeType extends Omit<BasicNodeType, "in_trigger" | "io"> {
|
|
49
|
+
in_trigger: UseBoundStore<StoreApi<boolean>>;
|
|
50
|
+
io: {
|
|
51
|
+
[key: string]: IOStore | undefined;
|
|
52
|
+
};
|
|
53
|
+
inputs: string[];
|
|
54
|
+
outputs: string[];
|
|
55
|
+
io_order: string[];
|
|
56
|
+
progress: UseBoundStore<StoreApi<TqdmState>>;
|
|
57
|
+
}
|
|
58
|
+
export interface NodeStore {
|
|
59
|
+
_state: UseBoundStore<StoreApi<NodeType>>;
|
|
60
|
+
use: () => NodeType;
|
|
61
|
+
getState: () => NodeType;
|
|
62
|
+
setState: (new_state: Partial<NodeType>) => void;
|
|
63
|
+
update: (new_state: PartialSerializedNodeType) => void;
|
|
64
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { RenderPluginFactoryProps, FuncNodesReactPlugin as FuncNodesReactPlugin_v0, RendererPlugin as RendererPlugin_v0, RenderPluginFactoryProps as RenderPluginFactoryProps_v0 } from '../v0/plugins.t';
|
|
2
|
+
import { DataOverlayRendererType, DataPreviewViewRendererType, DataViewRendererType, HandlePreviewRendererType, InputRendererType, NodeContextExtenderType, NodeHooksType, NodeRendererType, OutputRendererType } from './rendermappings.t';
|
|
3
|
+
export * from '../v0/plugins.t';
|
|
4
|
+
export interface RendererPlugin {
|
|
5
|
+
input_renderers?: {
|
|
6
|
+
[key: string]: InputRendererType | undefined;
|
|
7
|
+
};
|
|
8
|
+
output_renderers?: {
|
|
9
|
+
[key: string]: OutputRendererType | undefined;
|
|
10
|
+
};
|
|
11
|
+
handle_preview_renderers?: {
|
|
12
|
+
[key: string]: HandlePreviewRendererType | undefined;
|
|
13
|
+
};
|
|
14
|
+
data_overlay_renderers?: {
|
|
15
|
+
[key: string]: DataOverlayRendererType | undefined;
|
|
16
|
+
};
|
|
17
|
+
data_preview_renderers?: {
|
|
18
|
+
[key: string]: DataPreviewViewRendererType | undefined;
|
|
19
|
+
};
|
|
20
|
+
data_view_renderers?: {
|
|
21
|
+
[key: string]: DataViewRendererType | undefined;
|
|
22
|
+
};
|
|
23
|
+
node_renderers?: {
|
|
24
|
+
[key: string]: NodeRendererType | undefined;
|
|
25
|
+
};
|
|
26
|
+
node_context_extenders?: {
|
|
27
|
+
[key: string]: NodeContextExtenderType | undefined;
|
|
28
|
+
};
|
|
29
|
+
node_hooks?: {
|
|
30
|
+
[key: string]: NodeHooksType[] | undefined;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export interface FuncNodesReactPlugin {
|
|
34
|
+
renderpluginfactory?: (props: RenderPluginFactoryProps) => RendererPlugin;
|
|
35
|
+
v: 1 | "1";
|
|
36
|
+
}
|
|
37
|
+
export type AnyFuncNodesReactPlugin = FuncNodesReactPlugin_v0 | FuncNodesReactPlugin;
|
|
38
|
+
export type AnyRendererPlugin = RendererPlugin_v0 | RendererPlugin;
|
|
39
|
+
export type AnyRenderPluginFactoryProps = RenderPluginFactoryProps_v0 | RenderPluginFactoryProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../v0/rendering.t';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { IOStore } from './io.t';
|
|
3
|
+
import { NodeType } from './node.t';
|
|
4
|
+
import { NodeContextType } from '../../../frontend/node/node';
|
|
5
|
+
export interface DataOverlayRendererProps {
|
|
6
|
+
iostore: IOStore;
|
|
7
|
+
value: any;
|
|
8
|
+
preValue?: any;
|
|
9
|
+
onLoaded?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export type DataOverlayRendererType = ({ iostore, value, preValue, onLoaded, }: DataOverlayRendererProps) => JSX.Element;
|
|
12
|
+
export interface InputRendererProps {
|
|
13
|
+
iostore: IOStore;
|
|
14
|
+
inputconverter: [(v: any) => any, (v: any) => any];
|
|
15
|
+
}
|
|
16
|
+
export type InputRendererType = ({ iostore, inputconverter, }: InputRendererProps) => JSX.Element;
|
|
17
|
+
export type OutputRendererProps = {
|
|
18
|
+
iostore: IOStore;
|
|
19
|
+
};
|
|
20
|
+
export type OutputRendererType = ({ iostore, }: OutputRendererProps) => JSX.Element;
|
|
21
|
+
export type DataViewRendererProps = {
|
|
22
|
+
iostore: IOStore;
|
|
23
|
+
value: any;
|
|
24
|
+
preValue?: any;
|
|
25
|
+
onLoaded?: () => void;
|
|
26
|
+
};
|
|
27
|
+
export type DataViewRendererType = ({ iostore, value, preValue, onLoaded, }: DataViewRendererProps) => JSX.Element;
|
|
28
|
+
export type HandlePreviewRendererProps = {
|
|
29
|
+
iostore: IOStore;
|
|
30
|
+
};
|
|
31
|
+
export type HandlePreviewRendererType = ({ iostore, }: HandlePreviewRendererProps) => JSX.Element;
|
|
32
|
+
export type DataPreviewViewRendererProps = {
|
|
33
|
+
iostore: IOStore;
|
|
34
|
+
};
|
|
35
|
+
export type DataPreviewViewRendererType = ({ iostore, }: DataPreviewViewRendererProps) => JSX.Element;
|
|
36
|
+
export interface NodeContextExtenderProps {
|
|
37
|
+
node_data: NodeType;
|
|
38
|
+
}
|
|
39
|
+
export type NodeContextExtenderType = ({ node_data, }: NodeContextExtenderProps) => {
|
|
40
|
+
[key: string]: any | undefined;
|
|
41
|
+
};
|
|
42
|
+
export interface NodeRendererProps {
|
|
43
|
+
node_data: NodeType;
|
|
44
|
+
}
|
|
45
|
+
export type NodeRendererType = ({ node_data, }: NodeRendererProps) => JSX.Element;
|
|
46
|
+
export interface InLineRendererProps {
|
|
47
|
+
iostore: IOStore;
|
|
48
|
+
}
|
|
49
|
+
export type InLineRendererType = ({ iostore }: InLineRendererProps) => string;
|
|
50
|
+
export type NodeHooksProps = {
|
|
51
|
+
nodecontext: NodeContextType;
|
|
52
|
+
};
|
|
53
|
+
export type NodeHooksType = ({ nodecontext }: NodeHooksProps) => void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface ResizeTextOptions {
|
|
2
|
+
maxFontSize?: number;
|
|
3
|
+
minFontSize?: number;
|
|
4
|
+
decrementFactor?: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Dynamically adjusts the font size of a text element so that it fits within its container.
|
|
8
|
+
*
|
|
9
|
+
* @param container - The container element that defines the maximum space.
|
|
10
|
+
* @param textElement - The element whose text needs to be resized.
|
|
11
|
+
* @param options - Optional configuration (maxFontSize, minFontSize, decrementFactor).
|
|
12
|
+
*/
|
|
13
|
+
declare function fitTextToContainer(container: HTMLElement, textElement: HTMLElement, options?: ResizeTextOptions): void;
|
|
14
|
+
export { fitTextToContainer };
|
|
15
|
+
export type { ResizeTextOptions };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare function base64ToUint8Array(base64: string): Uint8Array;
|
|
2
|
+
declare function uint8ArrayToBase64(data: Uint8Array): string;
|
|
3
|
+
declare function Uint8ArrayToBlob(data: Uint8Array, type: string): Blob;
|
|
4
|
+
declare function blobToUint8Array(blob: Blob): Promise<Uint8Array>;
|
|
5
|
+
declare function base64ToBlob(base64: string, type: string): Blob;
|
|
6
|
+
declare function blobToBase64(blob: Blob): Promise<string>;
|
|
7
|
+
declare function downloadBase64(base64: string, filename: string, type: string): void;
|
|
8
|
+
declare function FileToBase64(file: File, remove_prefix?: boolean): Promise<string>;
|
|
9
|
+
declare function fileDialogToFile(accept?: string): Promise<File>;
|
|
10
|
+
declare function fileDialogToBase64(accept?: string): Promise<string>;
|
|
11
|
+
declare function remoteUrlToBase64(url: string, remove_prefix?: boolean): Promise<string>;
|
|
12
|
+
export { base64ToUint8Array, uint8ArrayToBase64, Uint8ArrayToBlob, blobToUint8Array, base64ToBlob, blobToBase64, downloadBase64, FileToBase64, fileDialogToFile, fileDialogToBase64, remoteUrlToBase64, };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FuncNodesReactFlowZustandInterface } from '../states/fnrfzst.t';
|
|
2
|
+
declare const development: boolean;
|
|
3
|
+
declare const print_object_size: (obj: any, message: string, fnrf_zst: FuncNodesReactFlowZustandInterface | undefined) => void;
|
|
4
|
+
declare const print_object: (obj: any, fnrf_zst: FuncNodesReactFlowZustandInterface | undefined) => void;
|
|
5
|
+
export { print_object_size, print_object, development };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const set_io_value: ({ nid, ioid, value, set_default, }: {
|
|
2
|
+
nid: string;
|
|
3
|
+
ioid: string;
|
|
4
|
+
value: any;
|
|
5
|
+
set_default?: boolean;
|
|
6
|
+
}) => void;
|
|
7
|
+
declare const helperfunctions: {
|
|
8
|
+
set_io_value: ({ nid, ioid, value, set_default, }: {
|
|
9
|
+
nid: string;
|
|
10
|
+
ioid: string;
|
|
11
|
+
value: any;
|
|
12
|
+
set_default?: boolean;
|
|
13
|
+
}) => void;
|
|
14
|
+
};
|
|
15
|
+
export default helperfunctions;
|
|
16
|
+
export { set_io_value };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
interface Logger {
|
|
2
|
+
level: number;
|
|
3
|
+
set_level: (level: number) => void;
|
|
4
|
+
debug: (message: string, ...args: any[]) => void;
|
|
5
|
+
info: (message: string, ...args: any[]) => void;
|
|
6
|
+
warn: (message: string, ...args: any[]) => void;
|
|
7
|
+
error: (message: string, ...args: any[]) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const DEBUG: number;
|
|
10
|
+
declare const INFO: number;
|
|
11
|
+
declare const WARN: number;
|
|
12
|
+
declare const ERROR: number;
|
|
13
|
+
declare class ConsoleLogger implements Logger {
|
|
14
|
+
name: string;
|
|
15
|
+
level: number;
|
|
16
|
+
private _level_name;
|
|
17
|
+
constructor(name: string, level?: number | string);
|
|
18
|
+
set_level(level: number): void;
|
|
19
|
+
private _fomat_message;
|
|
20
|
+
debug(message: string, ...args: any[]): void;
|
|
21
|
+
info(message: string, ...args: any[]): void;
|
|
22
|
+
warn(message: string, ...args: any[]): void;
|
|
23
|
+
error(message: string, ...args: any[]): void;
|
|
24
|
+
}
|
|
25
|
+
export { ConsoleLogger, DEBUG, INFO, WARN, ERROR };
|
|
26
|
+
export type { Logger };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
type DeepPartial<T> = T extends object ? {
|
|
2
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
3
|
+
} : T;
|
|
4
|
+
type Prev = [
|
|
5
|
+
never,
|
|
6
|
+
0,
|
|
7
|
+
1,
|
|
8
|
+
2,
|
|
9
|
+
3,
|
|
10
|
+
4,
|
|
11
|
+
5,
|
|
12
|
+
6,
|
|
13
|
+
7,
|
|
14
|
+
8,
|
|
15
|
+
9,
|
|
16
|
+
10,
|
|
17
|
+
11,
|
|
18
|
+
12,
|
|
19
|
+
13,
|
|
20
|
+
14,
|
|
21
|
+
15,
|
|
22
|
+
16,
|
|
23
|
+
17,
|
|
24
|
+
18,
|
|
25
|
+
19,
|
|
26
|
+
20,
|
|
27
|
+
21,
|
|
28
|
+
22,
|
|
29
|
+
23,
|
|
30
|
+
24,
|
|
31
|
+
25,
|
|
32
|
+
26,
|
|
33
|
+
27,
|
|
34
|
+
28,
|
|
35
|
+
29,
|
|
36
|
+
30,
|
|
37
|
+
31,
|
|
38
|
+
32,
|
|
39
|
+
33,
|
|
40
|
+
34,
|
|
41
|
+
35,
|
|
42
|
+
36,
|
|
43
|
+
37,
|
|
44
|
+
38,
|
|
45
|
+
39,
|
|
46
|
+
40,
|
|
47
|
+
41,
|
|
48
|
+
42,
|
|
49
|
+
43,
|
|
50
|
+
44,
|
|
51
|
+
45,
|
|
52
|
+
46,
|
|
53
|
+
47,
|
|
54
|
+
48,
|
|
55
|
+
49,
|
|
56
|
+
50,
|
|
57
|
+
51,
|
|
58
|
+
52,
|
|
59
|
+
53,
|
|
60
|
+
54,
|
|
61
|
+
55,
|
|
62
|
+
56,
|
|
63
|
+
57,
|
|
64
|
+
58,
|
|
65
|
+
59,
|
|
66
|
+
60,
|
|
67
|
+
61,
|
|
68
|
+
62,
|
|
69
|
+
63,
|
|
70
|
+
64,
|
|
71
|
+
65,
|
|
72
|
+
66,
|
|
73
|
+
67,
|
|
74
|
+
68,
|
|
75
|
+
69,
|
|
76
|
+
70,
|
|
77
|
+
71,
|
|
78
|
+
72,
|
|
79
|
+
73,
|
|
80
|
+
74,
|
|
81
|
+
75,
|
|
82
|
+
76,
|
|
83
|
+
77,
|
|
84
|
+
78,
|
|
85
|
+
79,
|
|
86
|
+
80,
|
|
87
|
+
81,
|
|
88
|
+
82,
|
|
89
|
+
83,
|
|
90
|
+
84,
|
|
91
|
+
85,
|
|
92
|
+
86,
|
|
93
|
+
87,
|
|
94
|
+
88,
|
|
95
|
+
89,
|
|
96
|
+
90,
|
|
97
|
+
91,
|
|
98
|
+
92,
|
|
99
|
+
93,
|
|
100
|
+
94,
|
|
101
|
+
95,
|
|
102
|
+
96,
|
|
103
|
+
97,
|
|
104
|
+
98,
|
|
105
|
+
99
|
|
106
|
+
];
|
|
107
|
+
type LimitedDeepPartial<T, D extends number = 10> = D extends 0 ? T : T extends object ? {
|
|
108
|
+
[K in keyof T]?: LimitedDeepPartial<T[K], Prev[D]>;
|
|
109
|
+
} : T;
|
|
110
|
+
/**
|
|
111
|
+
* Checks if the given item is a plain object.
|
|
112
|
+
* @param item The item to check.
|
|
113
|
+
* @returns true if the item is a plain object, false otherwise.
|
|
114
|
+
*/
|
|
115
|
+
declare function isPlainObject(item: any): boolean;
|
|
116
|
+
declare function deep_compare_objects(a: any, b: any): boolean;
|
|
117
|
+
/**
|
|
118
|
+
*
|
|
119
|
+
* function to deeply merge two objects of type T.
|
|
120
|
+
*
|
|
121
|
+
* @param {T} target - The target object to be merged.
|
|
122
|
+
* @param {DeepPartial<T>} source - The source object to merge into the target. All properties of this object are optional.
|
|
123
|
+
*
|
|
124
|
+
* @returns {T} An object containing the merged object (new_obj) and a boolean indicating if there was a change (change).
|
|
125
|
+
*/
|
|
126
|
+
declare const deep_merge: <T extends {}>(target: T, source: DeepPartial<T>) => {
|
|
127
|
+
new_obj: T;
|
|
128
|
+
change: boolean;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* Deeply updates the target object with missing keys from the source object.
|
|
132
|
+
* @param target The target object to be updated.
|
|
133
|
+
* @param source The source object containing keys to add to the target.
|
|
134
|
+
* @returns An object containing the updated target object (new_obj) and a boolean indicating if there was a change (change).
|
|
135
|
+
*/
|
|
136
|
+
declare const deep_update: <T extends {}>(target: LimitedDeepPartial<T>, source: T) => {
|
|
137
|
+
new_obj: T;
|
|
138
|
+
change: boolean;
|
|
139
|
+
};
|
|
140
|
+
declare function printDiff(obj1: any, obj2: any, path?: string): void;
|
|
141
|
+
export { deep_merge, deep_update, deep_compare_objects, printDiff, isPlainObject, };
|
|
142
|
+
export type { DeepPartial, LimitedDeepPartial };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linkdlab/funcnodes_react_flow",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Frontend with React Flow for FuncNodes",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,91 +14,57 @@
|
|
|
14
14
|
"homepage": "https://github.com/Linkdlab/FuncNodesReact#readme",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"source": "src/index.tsx",
|
|
17
|
-
"
|
|
18
|
-
"
|
|
17
|
+
"module": "dist/index.es.js",
|
|
18
|
+
"main": "dist/index.cjs.js",
|
|
19
|
+
"umd:main": "dist/index.umd.js",
|
|
19
20
|
"types": "dist/index.d.ts",
|
|
20
|
-
"style": "dist/
|
|
21
|
+
"style": "dist/funcnodes_react_flow.css",
|
|
21
22
|
"files": [
|
|
22
23
|
"dist"
|
|
23
24
|
],
|
|
24
25
|
"scripts": {
|
|
25
26
|
"typecheck": "tsc --noEmit --watch",
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"build": "rollup -c --bundleConfigAsCjs",
|
|
30
|
-
"watch": "rollup -c -w --bundleConfigAsCjs ",
|
|
31
|
-
"watchbuild": "rollup -c -w --bundleConfigAsCjs "
|
|
27
|
+
"build": " vite build && vite build --config vite.browser.config.js",
|
|
28
|
+
"watch": "vite --config vite.browser.config.js",
|
|
29
|
+
"preview": "vite build --config vite.browser.config.js && vite preview --config vite.browser.config.js"
|
|
32
30
|
},
|
|
33
31
|
"dependencies": {
|
|
34
|
-
"@emotion/react": "^11.
|
|
35
|
-
"@emotion/styled": "^11.
|
|
32
|
+
"@emotion/react": "^11.14.0",
|
|
33
|
+
"@emotion/styled": "^11.14.0",
|
|
36
34
|
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
|
37
35
|
"@fortawesome/free-solid-svg-icons": "^6.7.2",
|
|
38
36
|
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
39
|
-
"@mui/
|
|
40
|
-
"@
|
|
41
|
-
"@radix-ui/react-
|
|
42
|
-
"@radix-ui/react-
|
|
43
|
-
"@radix-ui/react-
|
|
44
|
-
"@
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"react-
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"react-svg": "^16.1.34",
|
|
54
|
-
"reactflow": "^11.11.4",
|
|
55
|
-
"remark-gfm": "^4.0.0",
|
|
56
|
-
"uuid": "^9.0.1"
|
|
37
|
+
"@mui/material": "7.0.2",
|
|
38
|
+
"@radix-ui/react-dialog": "^1.1.7",
|
|
39
|
+
"@radix-ui/react-dropdown-menu": "^2.1.7",
|
|
40
|
+
"@radix-ui/react-popover": "^1.1.7",
|
|
41
|
+
"@radix-ui/react-slider": "^1.2.4",
|
|
42
|
+
"@xyflow/react": "^12.5.5",
|
|
43
|
+
"axios": "^1.8.4",
|
|
44
|
+
"color-convert": "^3.0.1",
|
|
45
|
+
"react-json-view-lite": "^2.4.1",
|
|
46
|
+
"react-markdown": "^10.1.0",
|
|
47
|
+
"react-select": "^5.10.1",
|
|
48
|
+
"react-svg": "^16.3.0",
|
|
49
|
+
"remark-gfm": "^4.0.1",
|
|
50
|
+
"uuid": "^11.1.0"
|
|
57
51
|
},
|
|
58
52
|
"devDependencies": {
|
|
59
|
-
"@
|
|
60
|
-
"@
|
|
61
|
-
"@
|
|
62
|
-
"@
|
|
63
|
-
"@
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"@types/react": "*",
|
|
71
|
-
"@types/react-dom": "^19.0.4",
|
|
72
|
-
"@types/uuid": "^9.0.8",
|
|
73
|
-
"autoprefixer": "^10.4.19",
|
|
74
|
-
"babel-loader": "^9.1.3",
|
|
75
|
-
"css-loader": "^7.1.2",
|
|
76
|
-
"cssnano": "^7.0.1",
|
|
77
|
-
"mini-css-extract-plugin": "^2.9.0",
|
|
78
|
-
"postcss": "^8.4.38",
|
|
79
|
-
"postcss-loader": "^8.1.1",
|
|
80
|
-
"react": "^19.0",
|
|
81
|
-
"react-dom": "^19.0",
|
|
82
|
-
"rollup": "^4.34.6",
|
|
83
|
-
"rollup-plugin-copy": "^3.5.0",
|
|
84
|
-
"rollup-plugin-dts": "^6.1.1",
|
|
85
|
-
"rollup-plugin-import-css": "^3.5.8",
|
|
86
|
-
"rollup-plugin-node-polyfills": "^0.2.1",
|
|
87
|
-
"rollup-plugin-sass": "^1.15.2",
|
|
88
|
-
"rollup-plugin-scss": "^4.0.1",
|
|
89
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
90
|
-
"sass": "^1.77.2",
|
|
91
|
-
"sass-loader": "^14.2.1",
|
|
92
|
-
"ts-loader": "^9.5.1",
|
|
93
|
-
"tslib": "^2.8.1",
|
|
94
|
-
"typescript": "^5.4.5",
|
|
95
|
-
"webpack": "^5.91.0",
|
|
96
|
-
"webpack-cli": "^5.1.4",
|
|
97
|
-
"webpack-merge": "^5.10.0"
|
|
53
|
+
"@types/color-convert": "^2.0.4",
|
|
54
|
+
"@types/react": "^19.1.0",
|
|
55
|
+
"@types/react-dom": "^19.1.2",
|
|
56
|
+
"@types/uuid": "^10.0.0",
|
|
57
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
58
|
+
"react": "^19.1.0",
|
|
59
|
+
"react-dom": "^19.1.0",
|
|
60
|
+
"sass": "^1.86.3",
|
|
61
|
+
"typescript": "^5.8.3",
|
|
62
|
+
"vite": "^6.2.6",
|
|
63
|
+
"vite-plugin-dts": "^4.5.3"
|
|
98
64
|
},
|
|
99
65
|
"peerDependencies": {
|
|
100
66
|
"react": "^19.0",
|
|
101
67
|
"react-dom": "^19.0"
|
|
102
68
|
},
|
|
103
69
|
"packageManager": "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447"
|
|
104
|
-
}
|
|
70
|
+
}
|