@linkdlab/funcnodes_react_flow 1.0.3 → 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/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 {
@@ -1293,6 +1298,12 @@ declare type RFState = {
1293
1298
 
1294
1299
  declare type RFStore = UseBoundStore<StoreApi<RFState>>;
1295
1300
 
1301
+ declare type SchemaResponse = {
1302
+ jsonSchema: RJSFSchema;
1303
+ uiSchema?: UiSchema;
1304
+ formData?: any;
1305
+ };
1306
+
1296
1307
  declare interface SerializedIOType extends BasicIOType {
1297
1308
  value: IOValueType;
1298
1309
  fullvalue: IOValueType;
@@ -1613,6 +1624,7 @@ declare interface WorkerHookProperties {
1613
1624
  }
1614
1625
 
1615
1626
  declare class WorkerLibraryManager extends AbstractWorkerHandler implements WorkerLibraryManagerAPI {
1627
+ private _available_modules_cache;
1616
1628
  start(): void;
1617
1629
  stop(): void;
1618
1630
  add_external_worker({ module, cls_module, cls_name, }: {
@@ -1622,8 +1634,12 @@ declare class WorkerLibraryManager extends AbstractWorkerHandler implements Work
1622
1634
  }): Promise<any>;
1623
1635
  add_lib(lib: string, release: string): Promise<any>;
1624
1636
  remove_lib(lib: string): Promise<any>;
1625
- get_available_modules(): Promise<GroupedAvailableModules>;
1637
+ get_available_modules({ wait_for_response, on_load, }: {
1638
+ wait_for_response?: boolean;
1639
+ on_load?: (modules: GroupedAvailableModules) => void;
1640
+ }): Promise<GroupedAvailableModules>;
1626
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>;
1627
1643
  }
1628
1644
 
1629
1645
  declare interface WorkerLibraryManagerAPI {
@@ -1634,8 +1650,12 @@ declare interface WorkerLibraryManagerAPI {
1634
1650
  }) => Promise<void>;
1635
1651
  add_lib: (lib: string, release: string) => Promise<void>;
1636
1652
  remove_lib: (lib: string) => Promise<void>;
1637
- get_available_modules: () => Promise<GroupedAvailableModules>;
1653
+ get_available_modules: (args: {
1654
+ wait_for_response?: boolean;
1655
+ on_load?: (modules: GroupedAvailableModules) => void;
1656
+ }) => Promise<GroupedAvailableModules>;
1638
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>;
1639
1659
  }
1640
1660
 
1641
1661
  declare class WorkerManager {