@utisha/graph-editor 1.0.0-beta.1

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.
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Generic graph node.
3
+ * Domain-specific data goes in the `data` payload.
4
+ */
5
+ export interface GraphNode {
6
+ id: string;
7
+ type: string;
8
+ data: Record<string, any>;
9
+ position: Position;
10
+ metadata?: NodeMetadata;
11
+ }
12
+ /**
13
+ * 2D position on canvas.
14
+ */
15
+ export interface Position {
16
+ x: number;
17
+ y: number;
18
+ }
19
+ /**
20
+ * Optional node metadata (fully extensible).
21
+ */
22
+ export interface NodeMetadata {
23
+ label?: string;
24
+ locked?: boolean;
25
+ hidden?: boolean;
26
+ [key: string]: any;
27
+ }
28
+ /**
29
+ * Generic graph edge (connection between nodes).
30
+ */
31
+ export interface GraphEdge {
32
+ id: string;
33
+ source: string;
34
+ target: string;
35
+ sourcePort?: string;
36
+ targetPort?: string;
37
+ direction?: 'forward' | 'backward' | 'bidirectional';
38
+ data?: Record<string, any>;
39
+ metadata?: EdgeMetadata;
40
+ }
41
+ /**
42
+ * Optional edge metadata.
43
+ */
44
+ export interface EdgeMetadata {
45
+ label?: string;
46
+ style?: EdgeStyle;
47
+ hidden?: boolean;
48
+ [key: string]: any;
49
+ }
50
+ /**
51
+ * Edge visual style.
52
+ */
53
+ export interface EdgeStyle {
54
+ stroke?: string;
55
+ strokeWidth?: number;
56
+ strokeDasharray?: string;
57
+ animated?: boolean;
58
+ markerEnd?: 'arrow' | 'circle' | 'none';
59
+ }
60
+ /**
61
+ * Complete graph structure.
62
+ */
63
+ export interface Graph {
64
+ nodes: GraphNode[];
65
+ edges: GraphEdge[];
66
+ metadata?: GraphMetadata;
67
+ }
68
+ /**
69
+ * Optional graph-level metadata.
70
+ */
71
+ export interface GraphMetadata {
72
+ name?: string;
73
+ description?: string;
74
+ version?: number;
75
+ [key: string]: any;
76
+ }
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@utisha/graph-editor",
3
+ "version": "1.0.0-beta.1",
4
+ "description": "Configuration-driven visual graph editor for Angular 19+",
5
+ "author": "Utisha",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/fidesit/graph-editor.git"
10
+ },
11
+ "homepage": "https://github.com/fidesit/graph-editor#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/fidesit/graph-editor/issues"
14
+ },
15
+ "keywords": [
16
+ "angular",
17
+ "graph",
18
+ "editor",
19
+ "visual",
20
+ "workflow",
21
+ "diagram",
22
+ "canvas",
23
+ "svg",
24
+ "directed-graph",
25
+ "dag",
26
+ "node-editor"
27
+ ],
28
+ "peerDependencies": {
29
+ "@angular/common": "^19.0.0",
30
+ "@angular/core": "^19.0.0"
31
+ },
32
+ "dependencies": {
33
+ "dagre": "^0.8.5",
34
+ "tslib": "^2.3.0"
35
+ },
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "sideEffects": false,
40
+ "module": "fesm2022/utisha-graph-editor.mjs",
41
+ "typings": "index.d.ts",
42
+ "exports": {
43
+ "./package.json": {
44
+ "default": "./package.json"
45
+ },
46
+ ".": {
47
+ "types": "./index.d.ts",
48
+ "default": "./fesm2022/utisha-graph-editor.mjs"
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,3 @@
1
+ export { GraphEditorComponent } from './lib/graph-editor.component';
2
+ export type { Graph, GraphNode, GraphEdge, Position, NodeMetadata, EdgeMetadata, EdgeStyle, GraphMetadata } from './lib/graph.model';
3
+ export type { GraphEditorConfig, NodesConfig, EdgesConfig, CanvasConfig, ValidationConfig, LayoutConfig, InteractionConfig, ThemeConfig, PaletteConfig, NodeTypeDefinition, PortConfig, PortDefinition, NodeConstraints, GridConfig, ZoomConfig, PanConfig, ValidationRule, ValidationError, LayoutOptions, ContextMenuConfig, ContextMenuItem, ContextMenuContext, SelectionState, ValidationResult, ContextMenuEvent } from './lib/graph-editor.config';