chore: move some more components to svelte 5
Some checks failed
Deploy to GitHub Pages / build_site (push) Has been cancelled
Some checks failed
Deploy to GitHub Pages / build_site (push) Has been cancelled
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Graph, NodeDefinition, NodeId } from "./types";
|
||||
import { Graph, NodeDefinition, NodeType } from "./types";
|
||||
|
||||
export interface NodeRegistry {
|
||||
/**
|
||||
@@ -13,13 +13,13 @@ export interface NodeRegistry {
|
||||
* @throws An error if the nodes could not be loaded
|
||||
* @remarks This method should be called before calling getNode or getAllNodes
|
||||
*/
|
||||
load: (nodeIds: NodeId[]) => Promise<NodeDefinition[]>;
|
||||
load: (nodeIds: NodeType[]) => Promise<NodeDefinition[]>;
|
||||
/**
|
||||
* Get a node by id
|
||||
* @param id - The id of the node to get
|
||||
* @returns The node with the given id, or undefined if no such node exists
|
||||
*/
|
||||
getNode: (id: NodeId | string) => NodeDefinition | undefined;
|
||||
getNode: (id: NodeType | string) => NodeDefinition | undefined;
|
||||
/**
|
||||
* Get all nodes
|
||||
* @returns An array of all nodes
|
||||
|
||||
@@ -9,9 +9,9 @@ export type {
|
||||
Node,
|
||||
NodeDefinition,
|
||||
Socket,
|
||||
NodeType as NodeId,
|
||||
NodeType,
|
||||
Edge,
|
||||
Graph,
|
||||
} from "./types";
|
||||
export { NodeSchema, GraphSchema, NodeType } from "./types";
|
||||
export { NodeSchema, GraphSchema } from "./types";
|
||||
export { NodeDefinitionSchema } from "./types";
|
||||
|
||||
@@ -44,7 +44,7 @@ export type Node = {
|
||||
} & z.infer<typeof NodeSchema>;
|
||||
|
||||
export const NodeDefinitionSchema = z.object({
|
||||
id: z.string(),
|
||||
id: NodeTypeSchema,
|
||||
inputs: z.record(z.string(), NodeInputSchema).optional(),
|
||||
outputs: z.array(z.string()).optional(),
|
||||
meta: z
|
||||
|
||||
Reference in New Issue
Block a user