mirror of
https://github.com/alam00000/bentopdf.git
synced 2026-11-07 00:28:39 +01:00
Add visual workflow builder, fix critical bugs, and add Arabic i18n support
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import { ClassicPreset } from 'rete';
|
||||
import type { NodeCategory, NodeMeta, SocketData } from '../types';
|
||||
|
||||
export abstract class BaseWorkflowNode extends ClassicPreset.Node {
|
||||
abstract readonly category: NodeCategory;
|
||||
abstract readonly icon: string;
|
||||
abstract readonly description: string;
|
||||
|
||||
width = 280;
|
||||
height = 140;
|
||||
execStatus: 'idle' | 'running' | 'completed' | 'error' = 'idle';
|
||||
|
||||
constructor(label: string) {
|
||||
super(label);
|
||||
}
|
||||
|
||||
abstract data(
|
||||
inputs: Record<string, SocketData[]>
|
||||
): Promise<Record<string, SocketData>>;
|
||||
|
||||
getMeta(): NodeMeta {
|
||||
return {
|
||||
id: this.id,
|
||||
label: this.label,
|
||||
category: this.category,
|
||||
icon: this.icon,
|
||||
description: this.description,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user