@arch-atlas/server 0.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 +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +177 -0
- package/dist/index.js.map +1 -0
- package/dist/web/assets/index-B_cJr-f3.css +1 -0
- package/dist/web/assets/index-BxU0SF6N.js +195 -0
- package/dist/web/index.html +16 -0
- package/package.json +35 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ArchitectureGraph } from '@arch-atlas/core';
|
|
2
|
+
export interface ServerOptions {
|
|
3
|
+
projectRoot: string;
|
|
4
|
+
port?: number;
|
|
5
|
+
openBrowser?: boolean;
|
|
6
|
+
watch?: boolean;
|
|
7
|
+
webDistPath?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ServerInstance {
|
|
10
|
+
url: string;
|
|
11
|
+
port: number;
|
|
12
|
+
close: () => Promise<void>;
|
|
13
|
+
rescan: () => Promise<ArchitectureGraph>;
|
|
14
|
+
}
|
|
15
|
+
export declare function startServer(options: ServerOptions): Promise<ServerInstance>;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,OAAO,EAKL,KAAK,iBAAiB,EAEvB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,MAAM,EAAE,MAAM,OAAO,CAAC,iBAAiB,CAAC,CAAC;CAC1C;AAID,wBAAsB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,CAsLjF"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import Fastify from 'fastify';
|
|
5
|
+
import cors from '@fastify/cors';
|
|
6
|
+
import fastifyStatic from '@fastify/static';
|
|
7
|
+
import websocket from '@fastify/websocket';
|
|
8
|
+
import chokidar from 'chokidar';
|
|
9
|
+
import open from 'open';
|
|
10
|
+
import { scanProject, getFileDetail, getPackageDetail, getDependencyTree, } from '@arch-atlas/core';
|
|
11
|
+
const DEFAULT_PORT = 4578;
|
|
12
|
+
export async function startServer(options) {
|
|
13
|
+
const { projectRoot, port = DEFAULT_PORT, openBrowser = true, watch = true, webDistPath, } = options;
|
|
14
|
+
const app = Fastify({ logger: false });
|
|
15
|
+
let graph = null;
|
|
16
|
+
const fileCache = new Map();
|
|
17
|
+
const wsClients = new Set();
|
|
18
|
+
await app.register(cors, { origin: true });
|
|
19
|
+
await app.register(websocket);
|
|
20
|
+
const webPath = webDistPath ?? path.join(path.dirname(fileURLToPath(import.meta.url)), 'web');
|
|
21
|
+
if (webDistPath || pathExists(webPath)) {
|
|
22
|
+
await app.register(fastifyStatic, {
|
|
23
|
+
root: webPath,
|
|
24
|
+
prefix: '/',
|
|
25
|
+
wildcard: false,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
async function doScan(incremental = false, changedFiles) {
|
|
29
|
+
graph = await scanProject({
|
|
30
|
+
root: projectRoot,
|
|
31
|
+
incremental,
|
|
32
|
+
changedFiles,
|
|
33
|
+
cache: fileCache,
|
|
34
|
+
});
|
|
35
|
+
return graph;
|
|
36
|
+
}
|
|
37
|
+
// API routes
|
|
38
|
+
app.get('/api/health', async () => ({ status: 'ok', project: projectRoot }));
|
|
39
|
+
app.get('/api/graph', async () => {
|
|
40
|
+
if (!graph)
|
|
41
|
+
await doScan();
|
|
42
|
+
return graph;
|
|
43
|
+
});
|
|
44
|
+
app.get('/api/file/*', async (req) => {
|
|
45
|
+
if (!graph)
|
|
46
|
+
await doScan();
|
|
47
|
+
const wildcard = req.params['*'] ?? '';
|
|
48
|
+
const fileId = decodeURIComponent(wildcard);
|
|
49
|
+
const detail = getFileDetail(graph, `file:${fileId}`);
|
|
50
|
+
if (!detail) {
|
|
51
|
+
const altDetail = getFileDetail(graph, fileId.startsWith('file:') ? fileId : `file:${fileId}`);
|
|
52
|
+
return altDetail ?? { error: 'File not found' };
|
|
53
|
+
}
|
|
54
|
+
return detail;
|
|
55
|
+
});
|
|
56
|
+
app.get('/api/package/:name', async (req) => {
|
|
57
|
+
if (!graph)
|
|
58
|
+
await doScan();
|
|
59
|
+
return getPackageDetail(graph, req.params.name) ?? { error: 'Package not found' };
|
|
60
|
+
});
|
|
61
|
+
app.get('/api/dependencies/*', async (req) => {
|
|
62
|
+
if (!graph)
|
|
63
|
+
await doScan();
|
|
64
|
+
const wildcard = req.params['*'] ?? '';
|
|
65
|
+
const fileId = decodeURIComponent(wildcard);
|
|
66
|
+
const depth = parseInt(req.query.depth ?? '3', 10);
|
|
67
|
+
const id = fileId.startsWith('file:') ? fileId : `file:${fileId}`;
|
|
68
|
+
return getDependencyTree(graph, id, depth);
|
|
69
|
+
});
|
|
70
|
+
app.get('/api/search', async (req) => {
|
|
71
|
+
if (!graph)
|
|
72
|
+
await doScan();
|
|
73
|
+
const q = (req.query.q ?? '').toLowerCase();
|
|
74
|
+
if (!q)
|
|
75
|
+
return graph.searchIndex.slice(0, 50);
|
|
76
|
+
return graph.searchIndex
|
|
77
|
+
.filter((entry) => entry.keywords.some((k) => k.toLowerCase().includes(q)) ||
|
|
78
|
+
entry.label.toLowerCase().includes(q))
|
|
79
|
+
.slice(0, 50);
|
|
80
|
+
});
|
|
81
|
+
app.get('/api/dead-code', async () => {
|
|
82
|
+
if (!graph)
|
|
83
|
+
await doScan();
|
|
84
|
+
return graph.deadCode;
|
|
85
|
+
});
|
|
86
|
+
app.get('/api/circular', async () => {
|
|
87
|
+
if (!graph)
|
|
88
|
+
await doScan();
|
|
89
|
+
return graph.circularDependencies;
|
|
90
|
+
});
|
|
91
|
+
app.post('/api/rescan', async () => {
|
|
92
|
+
const result = await doScan();
|
|
93
|
+
broadcast({ type: 'graph-update', data: result });
|
|
94
|
+
return { ok: true, stats: result.stats };
|
|
95
|
+
});
|
|
96
|
+
// WebSocket for live updates
|
|
97
|
+
app.get('/ws', { websocket: true }, (socket) => {
|
|
98
|
+
wsClients.add(socket);
|
|
99
|
+
if (graph) {
|
|
100
|
+
socket.send(JSON.stringify({ type: 'graph-update', data: graph }));
|
|
101
|
+
}
|
|
102
|
+
socket.on('close', () => wsClients.delete(socket));
|
|
103
|
+
});
|
|
104
|
+
function broadcast(message) {
|
|
105
|
+
const data = JSON.stringify(message);
|
|
106
|
+
for (const client of wsClients) {
|
|
107
|
+
try {
|
|
108
|
+
client.send(data);
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
wsClients.delete(client);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
// Filesystem watcher
|
|
116
|
+
let watcher = null;
|
|
117
|
+
if (watch) {
|
|
118
|
+
watcher = chokidar.watch(projectRoot, {
|
|
119
|
+
ignored: /(node_modules|\.git|dist|build|\.expo|android|ios)/,
|
|
120
|
+
persistent: true,
|
|
121
|
+
ignoreInitial: true,
|
|
122
|
+
});
|
|
123
|
+
let debounceTimer = null;
|
|
124
|
+
const pendingChanges = new Set();
|
|
125
|
+
const handleChange = (filePath) => {
|
|
126
|
+
pendingChanges.add(filePath);
|
|
127
|
+
if (debounceTimer)
|
|
128
|
+
clearTimeout(debounceTimer);
|
|
129
|
+
debounceTimer = setTimeout(async () => {
|
|
130
|
+
const changed = [...pendingChanges];
|
|
131
|
+
pendingChanges.clear();
|
|
132
|
+
broadcast({ type: 'scanning', changed });
|
|
133
|
+
const result = await doScan(true, changed);
|
|
134
|
+
broadcast({ type: 'graph-update', data: result });
|
|
135
|
+
}, 500);
|
|
136
|
+
};
|
|
137
|
+
watcher.on('change', handleChange);
|
|
138
|
+
watcher.on('add', handleChange);
|
|
139
|
+
watcher.on('unlink', handleChange);
|
|
140
|
+
}
|
|
141
|
+
// SPA fallback
|
|
142
|
+
app.setNotFoundHandler(async (req, reply) => {
|
|
143
|
+
if (req.url.startsWith('/api/') || req.url.startsWith('/ws')) {
|
|
144
|
+
return reply.status(404).send({ error: 'Not found' });
|
|
145
|
+
}
|
|
146
|
+
if (pathExists(path.join(webPath, 'index.html'))) {
|
|
147
|
+
return reply.sendFile('index.html');
|
|
148
|
+
}
|
|
149
|
+
return reply.status(404).send({ error: 'Web UI not built. Run npm run build.' });
|
|
150
|
+
});
|
|
151
|
+
// Initial scan
|
|
152
|
+
await doScan();
|
|
153
|
+
await app.listen({ port, host: '127.0.0.1' });
|
|
154
|
+
const url = `http://localhost:${port}`;
|
|
155
|
+
if (openBrowser) {
|
|
156
|
+
await open(url);
|
|
157
|
+
}
|
|
158
|
+
return {
|
|
159
|
+
url,
|
|
160
|
+
port,
|
|
161
|
+
close: async () => {
|
|
162
|
+
if (watcher)
|
|
163
|
+
await watcher.close();
|
|
164
|
+
await app.close();
|
|
165
|
+
},
|
|
166
|
+
rescan: () => doScan(),
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
function pathExists(p) {
|
|
170
|
+
try {
|
|
171
|
+
return fs.existsSync(p);
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
return false;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources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AAC;IAEf,MAAM,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;IAC9C,MAAM,GAAG,GAAG,oBAAoB,IAAI,EAAE,CAAC;IAEvC,IAAI,WAAW,EAAE,CAAC;QAChB,MAAM,IAAI,CAAC,GAAG,CAAC,CAAC;IAClB,CAAC;IAED,OAAO;QACL,GAAG;QACH,IAAI;QACJ,KAAK,EAAE,KAAK,IAAI,EAAE;YAChB,IAAI,OAAO;gBAAE,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;YACnC,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC;QACpB,CAAC;QACD,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE;KACvB,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,CAAS;IAC3B,IAAI,CAAC;QACH,OAAO,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAC1B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.react-flow{direction:ltr;--xy-edge-stroke-default: #b1b1b7;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #555;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(255, 255, 255, .5);--xy-minimap-background-color-default: #fff;--xy-minimap-mask-background-color-default: rgba(240, 240, 240, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #e2e2e2;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: transparent;--xy-background-pattern-dots-color-default: #91919a;--xy-background-pattern-lines-color-default: #eee;--xy-background-pattern-cross-color-default: #e2e2e2;background-color:var(--xy-background-color, var(--xy-background-color-default));--xy-node-color-default: inherit;--xy-node-border-default: 1px solid #1a192b;--xy-node-background-color-default: #fff;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #1a192b;--xy-node-border-radius-default: 3px;--xy-handle-background-color-default: #1a192b;--xy-handle-border-color-default: #fff;--xy-selection-background-color-default: rgba(0, 89, 220, .08);--xy-selection-border-default: 1px dotted rgba(0, 89, 220, .8);--xy-controls-button-background-color-default: #fefefe;--xy-controls-button-background-color-hover-default: #f4f4f4;--xy-controls-button-color-default: inherit;--xy-controls-button-color-hover-default: inherit;--xy-controls-button-border-color-default: #eee;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #ffffff;--xy-edge-label-color-default: inherit;--xy-resize-background-color-default: #3367d9}.react-flow.dark{--xy-edge-stroke-default: #3e3e3e;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #727272;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(150, 150, 150, .25);--xy-minimap-background-color-default: #141414;--xy-minimap-mask-background-color-default: rgba(60, 60, 60, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #2b2b2b;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: #141414;--xy-background-pattern-dots-color-default: #555;--xy-background-pattern-lines-color-default: #333;--xy-background-pattern-cross-color-default: #333;--xy-node-color-default: #f8f8f8;--xy-node-border-default: 1px solid #3c3c3c;--xy-node-background-color-default: #1e1e1e;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #999;--xy-handle-background-color-default: #bebebe;--xy-handle-border-color-default: #1e1e1e;--xy-selection-background-color-default: rgba(200, 200, 220, .08);--xy-selection-border-default: 1px dotted rgba(200, 200, 220, .8);--xy-controls-button-background-color-default: #2b2b2b;--xy-controls-button-background-color-hover-default: #3e3e3e;--xy-controls-button-color-default: #f8f8f8;--xy-controls-button-color-hover-default: #fff;--xy-controls-button-border-color-default: #5b5b5b;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #141414;--xy-edge-label-color-default: #f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1;touch-action:none}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{overflow:visible;position:absolute;pointer-events:none}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}svg.react-flow__connectionline{z-index:1001;overflow:visible;position:absolute}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background-color:var(--xy-handle-background-color, var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));border-radius:100%}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:0;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px) translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px) translateY(-50%)}.react-flow__attribution{font-size:10px;background:var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;left:0;top:0}.react-flow__viewport-portal{position:absolute;width:100%;height:100%;left:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__minimap{background:var( --xy-minimap-background-color-props, var(--xy-minimap-background-color, var(--xy-minimap-background-color-default)) )}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var( --xy-minimap-mask-background-color-props, var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default)) );stroke:var( --xy-minimap-mask-stroke-color-props, var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default)) );stroke-width:var( --xy-minimap-mask-stroke-width-props, var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default)) )}.react-flow__minimap-node{fill:var( --xy-minimap-node-background-color-props, var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default)) );stroke:var( --xy-minimap-node-stroke-color-props, var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default)) );stroke-width:var( --xy-minimap-node-stroke-width-props, var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default)) )}.react-flow__background-pattern.dots{fill:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default)) )}.react-flow__background-pattern.lines{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default)) )}.react-flow__background-pattern.cross{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default)) )}.react-flow__controls{display:flex;flex-direction:column;box-shadow:var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default))}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{display:flex;justify-content:center;align-items:center;height:26px;width:26px;padding:4px;border:none;background:var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));border-bottom:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) );color:var( --xy-controls-button-color-props, var(--xy-controls-button-color, var(--xy-controls-button-color-default)) );cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px;fill:currentColor}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:var(--xy-node-border-radius, var(--xy-node-border-radius-default));width:150px;font-size:12px;color:var(--xy-node-color, var(--xy-node-color-default));text-align:center;border:var(--xy-node-border, var(--xy-node-border-default));background-color:var(--xy-node-background-color, var(--xy-node-background-color-default))}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default))}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default))}.react-flow__node-group{background-color:var(--xy-node-group-background-color, var(--xy-node-group-background-color-default))}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color, var(--xy-selection-background-color-default));border:var(--xy-selection-border, var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var( --xy-controls-button-background-color-hover-props, var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default)) );color:var( --xy-controls-button-color-hover-props, var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default)) )}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__controls.horizontal .react-flow__controls-button{border-bottom:none;border-right:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) )}.react-flow__controls.horizontal .react-flow__controls-button:last-child{border-right:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:5px;height:5px;border:1px solid #fff;border-radius:1px;background-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));translate:-50% -50%}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default))}.react-flow__edge-text{fill:var(--xy-edge-label-color, var(--xy-edge-label-color-default))}:root,[data-theme=dark]{--bg-primary: #0a0a0f;--bg-secondary: #12121a;--bg-tertiary: #1a1a26;--bg-glass: rgba(18, 18, 26, .75);--border: rgba(255, 255, 255, .08);--border-hover: rgba(255, 255, 255, .15);--text-primary: #f4f4f5;--text-secondary: #a1a1aa;--text-muted: #71717a;--accent: #8b5cf6;--accent-hover: #a78bfa;--accent-glow: rgba(139, 92, 246, .3);--success: #10b981;--warning: #f59e0b;--danger: #ef4444;--info: #06b6d4;--radius: 12px;--radius-sm: 8px;--shadow: 0 8px 32px rgba(0, 0, 0, .4);--font-sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;--font-mono: "JetBrains Mono", monospace;--edge-default: rgba(255, 255, 255, .15);--edge-dimmed: rgba(255, 255, 255, .04);--edge-outgoing: #a78bfa;--edge-incoming: #22d3ee;--node-dimmed-opacity: .3;--bg-dots: rgba(255, 255, 255, .05);--minimap-mask: rgba(0, 0, 0, .6);--node-shadow: rgba(0, 0, 0, .3);--node-border-default: rgba(255, 255, 255, .08)}[data-theme=light]{--bg-primary: #f8f9fc;--bg-secondary: #ffffff;--bg-tertiary: #f1f3f9;--bg-glass: rgba(255, 255, 255, .85);--border: rgba(0, 0, 0, .08);--border-hover: rgba(0, 0, 0, .15);--text-primary: #18181b;--text-secondary: #52525b;--text-muted: #a1a1aa;--accent: #7c3aed;--accent-hover: #6d28d9;--accent-glow: rgba(124, 58, 237, .2);--shadow: 0 8px 32px rgba(0, 0, 0, .08);--edge-default: rgba(0, 0, 0, .12);--edge-dimmed: rgba(0, 0, 0, .04);--edge-outgoing: #7c3aed;--edge-incoming: #0891b2;--node-dimmed-opacity: .35;--bg-dots: rgba(0, 0, 0, .06);--minimap-mask: rgba(255, 255, 255, .7);--node-shadow: rgba(0, 0, 0, .08);--node-border-default: rgba(0, 0, 0, .1)}*{margin:0;padding:0;box-sizing:border-box}html,body,#root{height:100%;overflow:hidden}body{font-family:var(--font-sans);background:var(--bg-primary);color:var(--text-primary);-webkit-font-smoothing:antialiased;transition:background-color .2s,color .2s}.react-flow__background{background:var(--bg-primary)!important}.react-flow__minimap{background:var(--bg-secondary)!important;border:1px solid var(--border)!important;border-radius:var(--radius-sm)!important}.react-flow__controls{background:var(--bg-glass)!important;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border:1px solid var(--border)!important;border-radius:var(--radius-sm)!important;box-shadow:var(--shadow)!important}.react-flow__controls-button{background:transparent!important;border-bottom:1px solid var(--border)!important;fill:var(--text-secondary)!important}.react-flow__controls-button:hover{background:var(--bg-tertiary)!important;fill:var(--text-primary)!important}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--border-hover)}
|