@linkdlab/funcnodes_react_flow 1.1.0 → 2.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
@@ -9,6 +9,7 @@ import { NodePositionChange } from '@xyflow/react';
9
9
  import { OnConnect } from '@xyflow/react';
10
10
  import { OnEdgesChange } from '@xyflow/react';
11
11
  import { OnNodesChange } from '@xyflow/react';
12
+ import * as React_2 from 'react';
12
13
  import { ReactFlowInstance } from '@xyflow/react';
13
14
  import { RJSFSchema } from '@rjsf/utils';
14
15
  import { StoreApi } from 'zustand';
@@ -53,7 +54,7 @@ declare interface AllOf {
53
54
  allOf: SerializedType[];
54
55
  }
55
56
 
56
- declare type AnyDataType = JSONType | ArrayBufferLike;
57
+ declare type AnyDataType = JSONType | ArrayBuffer | Blob;
57
58
 
58
59
  declare interface AnyOf {
59
60
  anyOf: SerializedType[];
@@ -61,6 +62,10 @@ declare interface AnyOf {
61
62
 
62
63
  export declare class ArrayBufferDataStructure extends DataStructure<ArrayBuffer, string> {
63
64
  private _objectUrl;
65
+ constructor({ data, mime }: {
66
+ data: BinarySource;
67
+ mime: string;
68
+ });
64
69
  get objectUrl(): string;
65
70
  dispose(): void;
66
71
  get value(): string;
@@ -154,10 +159,15 @@ declare interface BasicNodeType {
154
159
 
155
160
  declare type BasicOutputRendererType = (props: OutputRendererProps) => JSX.Element;
156
161
 
157
- export declare class CTypeStructure extends DataStructure<ArrayBufferLike, string | number | boolean | null> {
162
+ declare type BinarySource = ArrayBufferLike | ArrayBufferView;
163
+
164
+ export declare class CTypeStructure extends DataStructure<ArrayBuffer, string | number | boolean | null> {
158
165
  private _cType;
159
166
  private _value;
160
- constructor({ data, mime }: DataStructureProps<ArrayBufferLike>);
167
+ constructor({ data, mime }: {
168
+ data: BinarySource;
169
+ mime: string;
170
+ });
161
171
  parse_value(): string | number | boolean | null;
162
172
  get value(): string | number | boolean | null;
163
173
  toString(): string;
@@ -405,6 +415,8 @@ declare interface ExternalWorkerInstance {
405
415
  name: string;
406
416
  }
407
417
 
418
+ export declare const FuncNodes: (props: LimitedDeepPartial<FuncnodesReactFlowProps>) => React_2.JSX.Element;
419
+
408
420
  declare class FuncNodesReactFlow implements FuncNodesReactFlowZustandInterface {
409
421
  options: FuncnodesReactFlowProps;
410
422
  reactflowRef: HTMLDivElement | null;
@@ -475,7 +487,7 @@ declare interface FuncnodesReactFlowLocalState {
475
487
  funcnodescontainerRef: HTMLDivElement | null;
476
488
  }
477
489
 
478
- declare interface FuncnodesReactFlowProps {
490
+ export declare interface FuncnodesReactFlowProps {
479
491
  id: string;
480
492
  debug: boolean;
481
493
  on_sync_complete?: (worker: FuncNodesWorker) => Promise<void>;
@@ -544,7 +556,7 @@ export declare type FuncNodesReactPlugin = VersionedFuncNodesReactPlugin<typeof
544
556
 
545
557
  export declare const FuncNodesRenderer: (id_or_element: string | HTMLElement, options?: Partial<FuncnodesReactFlowProps>) => void;
546
558
 
547
- declare class FuncNodesWorker {
559
+ export declare class FuncNodesWorker {
548
560
  _zustand?: FuncNodesReactFlow;
549
561
  uuid: string;
550
562
  private _connectionhealthManager;
@@ -692,15 +704,18 @@ declare type JSONMessage = ProgressStateMessage | ResultMessage | ErrorMessage |
692
704
 
693
705
  /**
694
706
  * Union type representing all supported data types for DataStructure instances.
695
- * Includes primitive types and ArrayBufferLike for binary data.
707
+ * Includes primitive types and binary data.
696
708
  */
697
709
  declare interface JSONObject {
698
710
  [key: string]: JSONType;
699
711
  }
700
712
 
701
- export declare class JSONStructure extends DataStructure<ArrayBufferLike, JSONType | undefined> {
713
+ export declare class JSONStructure extends DataStructure<ArrayBuffer, JSONType | undefined> {
702
714
  private _json;
703
- constructor({ data, mime }: DataStructureProps<any>);
715
+ constructor({ data, mime }: {
716
+ data: BinarySource;
717
+ mime: string;
718
+ });
704
719
  get value(): JSONType | undefined;
705
720
  static fromObject(obj: JSONType): JSONStructure;
706
721
  toString(): string;
@@ -1346,9 +1361,12 @@ declare interface StateManagerManagerAPI {
1346
1361
  toast?: ToastDispatcher;
1347
1362
  }
1348
1363
 
1349
- export declare class TextStructure extends DataStructure<ArrayBufferLike, string> {
1364
+ export declare class TextStructure extends DataStructure<ArrayBuffer, string> {
1350
1365
  private _value;
1351
- constructor({ data, mime }: DataStructureProps<ArrayBufferLike>);
1366
+ constructor({ data, mime }: {
1367
+ data: BinarySource;
1368
+ mime: string;
1369
+ });
1352
1370
  get value(): string;
1353
1371
  toString(): string;
1354
1372
  }
@@ -1786,7 +1804,7 @@ declare interface WorkerNodeManagerAPI {
1786
1804
  get_remote_node_state: (nid: string) => Promise<void>;
1787
1805
  }
1788
1806
 
1789
- declare interface WorkerProps {
1807
+ export declare interface WorkerProps {
1790
1808
  zustand?: FuncNodesReactFlow;
1791
1809
  uuid: string;
1792
1810
  on_error?: (error: string | Error) => void;