@linkdlab/funcnodes_react_flow 1.0.3 → 2.0.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 +331 -351
- package/dist/index.d.ts +45 -10
- package/dist/index.es.js +65145 -36487
- package/dist/index.umd.js +331 -351
- package/package.json +44 -40
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
|
|
|
@@ -51,7 +53,7 @@ declare interface AllOf {
|
|
|
51
53
|
allOf: SerializedType[];
|
|
52
54
|
}
|
|
53
55
|
|
|
54
|
-
declare type AnyDataType = JSONType |
|
|
56
|
+
declare type AnyDataType = JSONType | ArrayBuffer | Blob;
|
|
55
57
|
|
|
56
58
|
declare interface AnyOf {
|
|
57
59
|
anyOf: SerializedType[];
|
|
@@ -59,6 +61,10 @@ declare interface AnyOf {
|
|
|
59
61
|
|
|
60
62
|
export declare class ArrayBufferDataStructure extends DataStructure<ArrayBuffer, string> {
|
|
61
63
|
private _objectUrl;
|
|
64
|
+
constructor({ data, mime }: {
|
|
65
|
+
data: BinarySource;
|
|
66
|
+
mime: string;
|
|
67
|
+
});
|
|
62
68
|
get objectUrl(): string;
|
|
63
69
|
dispose(): void;
|
|
64
70
|
get value(): string;
|
|
@@ -152,10 +158,15 @@ declare interface BasicNodeType {
|
|
|
152
158
|
|
|
153
159
|
declare type BasicOutputRendererType = (props: OutputRendererProps) => JSX.Element;
|
|
154
160
|
|
|
155
|
-
|
|
161
|
+
declare type BinarySource = ArrayBufferLike | ArrayBufferView;
|
|
162
|
+
|
|
163
|
+
export declare class CTypeStructure extends DataStructure<ArrayBuffer, string | number | boolean | null> {
|
|
156
164
|
private _cType;
|
|
157
165
|
private _value;
|
|
158
|
-
constructor({ data, mime }:
|
|
166
|
+
constructor({ data, mime }: {
|
|
167
|
+
data: BinarySource;
|
|
168
|
+
mime: string;
|
|
169
|
+
});
|
|
159
170
|
parse_value(): string | number | boolean | null;
|
|
160
171
|
get value(): string | number | boolean | null;
|
|
161
172
|
toString(): string;
|
|
@@ -588,6 +599,7 @@ declare class FuncNodesWorker {
|
|
|
588
599
|
stop(): Promise<void>;
|
|
589
600
|
update_external_worker(worker_id: string, class_id: string, data: {
|
|
590
601
|
name?: string;
|
|
602
|
+
config?: Record<string, any>;
|
|
591
603
|
}): Promise<any>;
|
|
592
604
|
export({ withFiles }: {
|
|
593
605
|
withFiles: boolean;
|
|
@@ -647,6 +659,8 @@ declare type IOGetFullValue = () => Promise<any> | undefined;
|
|
|
647
659
|
|
|
648
660
|
declare interface IORenderOptions extends BaseRenderOptions {
|
|
649
661
|
set_default: boolean;
|
|
662
|
+
schema?: RJSFSchema;
|
|
663
|
+
uiSchema?: UiSchema;
|
|
650
664
|
}
|
|
651
665
|
|
|
652
666
|
declare interface IOStore {
|
|
@@ -687,15 +701,18 @@ declare type JSONMessage = ProgressStateMessage | ResultMessage | ErrorMessage |
|
|
|
687
701
|
|
|
688
702
|
/**
|
|
689
703
|
* Union type representing all supported data types for DataStructure instances.
|
|
690
|
-
* Includes primitive types and
|
|
704
|
+
* Includes primitive types and binary data.
|
|
691
705
|
*/
|
|
692
706
|
declare interface JSONObject {
|
|
693
707
|
[key: string]: JSONType;
|
|
694
708
|
}
|
|
695
709
|
|
|
696
|
-
export declare class JSONStructure extends DataStructure<
|
|
710
|
+
export declare class JSONStructure extends DataStructure<ArrayBuffer, JSONType | undefined> {
|
|
697
711
|
private _json;
|
|
698
|
-
constructor({ data, mime }:
|
|
712
|
+
constructor({ data, mime }: {
|
|
713
|
+
data: BinarySource;
|
|
714
|
+
mime: string;
|
|
715
|
+
});
|
|
699
716
|
get value(): JSONType | undefined;
|
|
700
717
|
static fromObject(obj: JSONType): JSONStructure;
|
|
701
718
|
toString(): string;
|
|
@@ -1293,6 +1310,12 @@ declare type RFState = {
|
|
|
1293
1310
|
|
|
1294
1311
|
declare type RFStore = UseBoundStore<StoreApi<RFState>>;
|
|
1295
1312
|
|
|
1313
|
+
declare type SchemaResponse = {
|
|
1314
|
+
jsonSchema: RJSFSchema;
|
|
1315
|
+
uiSchema?: UiSchema;
|
|
1316
|
+
formData?: any;
|
|
1317
|
+
};
|
|
1318
|
+
|
|
1296
1319
|
declare interface SerializedIOType extends BasicIOType {
|
|
1297
1320
|
value: IOValueType;
|
|
1298
1321
|
fullvalue: IOValueType;
|
|
@@ -1335,9 +1358,12 @@ declare interface StateManagerManagerAPI {
|
|
|
1335
1358
|
toast?: ToastDispatcher;
|
|
1336
1359
|
}
|
|
1337
1360
|
|
|
1338
|
-
export declare class TextStructure extends DataStructure<
|
|
1361
|
+
export declare class TextStructure extends DataStructure<ArrayBuffer, string> {
|
|
1339
1362
|
private _value;
|
|
1340
|
-
constructor({ data, mime }:
|
|
1363
|
+
constructor({ data, mime }: {
|
|
1364
|
+
data: BinarySource;
|
|
1365
|
+
mime: string;
|
|
1366
|
+
});
|
|
1341
1367
|
get value(): string;
|
|
1342
1368
|
toString(): string;
|
|
1343
1369
|
}
|
|
@@ -1613,6 +1639,7 @@ declare interface WorkerHookProperties {
|
|
|
1613
1639
|
}
|
|
1614
1640
|
|
|
1615
1641
|
declare class WorkerLibraryManager extends AbstractWorkerHandler implements WorkerLibraryManagerAPI {
|
|
1642
|
+
private _available_modules_cache;
|
|
1616
1643
|
start(): void;
|
|
1617
1644
|
stop(): void;
|
|
1618
1645
|
add_external_worker({ module, cls_module, cls_name, }: {
|
|
@@ -1622,8 +1649,12 @@ declare class WorkerLibraryManager extends AbstractWorkerHandler implements Work
|
|
|
1622
1649
|
}): Promise<any>;
|
|
1623
1650
|
add_lib(lib: string, release: string): Promise<any>;
|
|
1624
1651
|
remove_lib(lib: string): Promise<any>;
|
|
1625
|
-
get_available_modules(
|
|
1652
|
+
get_available_modules({ wait_for_response, on_load, }: {
|
|
1653
|
+
wait_for_response?: boolean;
|
|
1654
|
+
on_load?: (modules: GroupedAvailableModules) => void;
|
|
1655
|
+
}): Promise<GroupedAvailableModules>;
|
|
1626
1656
|
remove_external_worker(worker_id: string, class_id: string): Promise<any>;
|
|
1657
|
+
get_external_worker_config(worker_id: string, class_id: string): Promise<SchemaResponse>;
|
|
1627
1658
|
}
|
|
1628
1659
|
|
|
1629
1660
|
declare interface WorkerLibraryManagerAPI {
|
|
@@ -1634,8 +1665,12 @@ declare interface WorkerLibraryManagerAPI {
|
|
|
1634
1665
|
}) => Promise<void>;
|
|
1635
1666
|
add_lib: (lib: string, release: string) => Promise<void>;
|
|
1636
1667
|
remove_lib: (lib: string) => Promise<void>;
|
|
1637
|
-
get_available_modules: (
|
|
1668
|
+
get_available_modules: (args: {
|
|
1669
|
+
wait_for_response?: boolean;
|
|
1670
|
+
on_load?: (modules: GroupedAvailableModules) => void;
|
|
1671
|
+
}) => Promise<GroupedAvailableModules>;
|
|
1638
1672
|
remove_external_worker: (worker_id: string, class_id: string) => Promise<void>;
|
|
1673
|
+
get_external_worker_config: (worker_id: string, class_id: string) => Promise<SchemaResponse>;
|
|
1639
1674
|
}
|
|
1640
1675
|
|
|
1641
1676
|
declare class WorkerManager {
|