@linkdlab/funcnodes_react_flow 1.0.0 → 1.1.0
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 +371 -231
- package/dist/index.d.ts +28 -2
- package/dist/index.es.js +62276 -35747
- package/dist/index.umd.js +371 -231
- package/package.json +94 -89
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,9 @@ import { OnConnect } from '@xyflow/react';
|
|
|
10
10
|
import { OnEdgesChange } from '@xyflow/react';
|
|
11
11
|
import { OnNodesChange } from '@xyflow/react';
|
|
12
12
|
import { ReactFlowInstance } from '@xyflow/react';
|
|
13
|
+
import { RJSFSchema } from '@rjsf/utils';
|
|
13
14
|
import { StoreApi } from 'zustand';
|
|
15
|
+
import { UiSchema } from '@rjsf/utils';
|
|
14
16
|
import { UseBoundStore } from 'zustand';
|
|
15
17
|
import { useReactFlow } from '@xyflow/react';
|
|
16
18
|
|
|
@@ -588,6 +590,7 @@ declare class FuncNodesWorker {
|
|
|
588
590
|
stop(): Promise<void>;
|
|
589
591
|
update_external_worker(worker_id: string, class_id: string, data: {
|
|
590
592
|
name?: string;
|
|
593
|
+
config?: Record<string, any>;
|
|
591
594
|
}): Promise<any>;
|
|
592
595
|
export({ withFiles }: {
|
|
593
596
|
withFiles: boolean;
|
|
@@ -647,6 +650,8 @@ declare type IOGetFullValue = () => Promise<any> | undefined;
|
|
|
647
650
|
|
|
648
651
|
declare interface IORenderOptions extends BaseRenderOptions {
|
|
649
652
|
set_default: boolean;
|
|
653
|
+
schema?: RJSFSchema;
|
|
654
|
+
uiSchema?: UiSchema;
|
|
650
655
|
}
|
|
651
656
|
|
|
652
657
|
declare interface IOStore {
|
|
@@ -982,6 +987,12 @@ declare class NodeSpaceManager extends AbstractFuncNodesReactFlowHandleHandler i
|
|
|
982
987
|
_set_groups: (groups: NodeGroups) => void;
|
|
983
988
|
_add_node: (action: NodeActionAdd) => NodeType | undefined;
|
|
984
989
|
_update_node: (action: NodeActionUpdate) => NodeType | undefined;
|
|
990
|
+
/**
|
|
991
|
+
* Sync the nodes between the nodespace and the react zustand
|
|
992
|
+
* This is needed because e.g. deleting a node removes it from the react zustand but the nodespace still has it
|
|
993
|
+
* so we need to sync the nodes between the two
|
|
994
|
+
*/
|
|
995
|
+
_sync_nodes: () => void;
|
|
985
996
|
_delete_node: (action: NodeActionDelete) => undefined;
|
|
986
997
|
_error_action: (action: NodeActionError) => NodeType | undefined;
|
|
987
998
|
_trigger_action: (action: NodeActionTrigger) => NodeType | undefined;
|
|
@@ -1287,6 +1298,12 @@ declare type RFState = {
|
|
|
1287
1298
|
|
|
1288
1299
|
declare type RFStore = UseBoundStore<StoreApi<RFState>>;
|
|
1289
1300
|
|
|
1301
|
+
declare type SchemaResponse = {
|
|
1302
|
+
jsonSchema: RJSFSchema;
|
|
1303
|
+
uiSchema?: UiSchema;
|
|
1304
|
+
formData?: any;
|
|
1305
|
+
};
|
|
1306
|
+
|
|
1290
1307
|
declare interface SerializedIOType extends BasicIOType {
|
|
1291
1308
|
value: IOValueType;
|
|
1292
1309
|
fullvalue: IOValueType;
|
|
@@ -1607,6 +1624,7 @@ declare interface WorkerHookProperties {
|
|
|
1607
1624
|
}
|
|
1608
1625
|
|
|
1609
1626
|
declare class WorkerLibraryManager extends AbstractWorkerHandler implements WorkerLibraryManagerAPI {
|
|
1627
|
+
private _available_modules_cache;
|
|
1610
1628
|
start(): void;
|
|
1611
1629
|
stop(): void;
|
|
1612
1630
|
add_external_worker({ module, cls_module, cls_name, }: {
|
|
@@ -1616,8 +1634,12 @@ declare class WorkerLibraryManager extends AbstractWorkerHandler implements Work
|
|
|
1616
1634
|
}): Promise<any>;
|
|
1617
1635
|
add_lib(lib: string, release: string): Promise<any>;
|
|
1618
1636
|
remove_lib(lib: string): Promise<any>;
|
|
1619
|
-
get_available_modules(
|
|
1637
|
+
get_available_modules({ wait_for_response, on_load, }: {
|
|
1638
|
+
wait_for_response?: boolean;
|
|
1639
|
+
on_load?: (modules: GroupedAvailableModules) => void;
|
|
1640
|
+
}): Promise<GroupedAvailableModules>;
|
|
1620
1641
|
remove_external_worker(worker_id: string, class_id: string): Promise<any>;
|
|
1642
|
+
get_external_worker_config(worker_id: string, class_id: string): Promise<SchemaResponse>;
|
|
1621
1643
|
}
|
|
1622
1644
|
|
|
1623
1645
|
declare interface WorkerLibraryManagerAPI {
|
|
@@ -1628,8 +1650,12 @@ declare interface WorkerLibraryManagerAPI {
|
|
|
1628
1650
|
}) => Promise<void>;
|
|
1629
1651
|
add_lib: (lib: string, release: string) => Promise<void>;
|
|
1630
1652
|
remove_lib: (lib: string) => Promise<void>;
|
|
1631
|
-
get_available_modules: (
|
|
1653
|
+
get_available_modules: (args: {
|
|
1654
|
+
wait_for_response?: boolean;
|
|
1655
|
+
on_load?: (modules: GroupedAvailableModules) => void;
|
|
1656
|
+
}) => Promise<GroupedAvailableModules>;
|
|
1632
1657
|
remove_external_worker: (worker_id: string, class_id: string) => Promise<void>;
|
|
1658
|
+
get_external_worker_config: (worker_id: string, class_id: string) => Promise<SchemaResponse>;
|
|
1633
1659
|
}
|
|
1634
1660
|
|
|
1635
1661
|
declare class WorkerManager {
|