@coherent.js/devtools 1.0.0-rc.2 → 1.0.0-rc.3
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/component-visualizer.js +374 -0
- package/dist/component-visualizer.js.map +7 -0
- package/dist/enhanced-errors.js +467 -0
- package/dist/enhanced-errors.js.map +7 -0
- package/dist/hybrid-integration-tools.js +460 -0
- package/dist/hybrid-integration-tools.js.map +7 -0
- package/dist/index.js +1 -2
- package/dist/index.js.map +2 -2
- package/package.json +15 -38
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
// src/component-visualizer.js
|
|
2
|
+
import {
|
|
3
|
+
isCoherentObject,
|
|
4
|
+
hasChildren,
|
|
5
|
+
normalizeChildren
|
|
6
|
+
} from "@coherent.js/core";
|
|
7
|
+
var ComponentVisualizer = class {
|
|
8
|
+
constructor(options = {}) {
|
|
9
|
+
this.options = {
|
|
10
|
+
maxDepth: options.maxDepth || 50,
|
|
11
|
+
showProps: options.showProps !== false,
|
|
12
|
+
showMetadata: options.showMetadata !== false,
|
|
13
|
+
colorOutput: options.colorOutput !== false,
|
|
14
|
+
compactMode: options.compactMode || false,
|
|
15
|
+
...options
|
|
16
|
+
};
|
|
17
|
+
this.stats = {
|
|
18
|
+
totalComponents: 0,
|
|
19
|
+
totalDepth: 0,
|
|
20
|
+
staticComponents: 0,
|
|
21
|
+
dynamicComponents: 0,
|
|
22
|
+
renderTime: 0
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Visualize a component tree
|
|
27
|
+
*/
|
|
28
|
+
visualize(component, name = "Root") {
|
|
29
|
+
const startTime = performance.now();
|
|
30
|
+
this.stats = { totalComponents: 0, totalDepth: 0, staticComponents: 0, dynamicComponents: 0, renderTime: 0 };
|
|
31
|
+
const tree = this.buildTree(component, name, 0);
|
|
32
|
+
const visualization = this.renderTree(tree);
|
|
33
|
+
this.stats.renderTime = performance.now() - startTime;
|
|
34
|
+
return {
|
|
35
|
+
visualization,
|
|
36
|
+
stats: { ...this.stats },
|
|
37
|
+
tree
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Build component tree structure
|
|
42
|
+
*/
|
|
43
|
+
buildTree(component, name, depth) {
|
|
44
|
+
if (depth > this.options.maxDepth) {
|
|
45
|
+
return {
|
|
46
|
+
name: "MAX_DEPTH_REACHED",
|
|
47
|
+
type: "warning",
|
|
48
|
+
depth,
|
|
49
|
+
children: [],
|
|
50
|
+
metadata: { message: `Maximum depth ${this.options.maxDepth} exceeded` }
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
this.stats.totalComponents++;
|
|
54
|
+
this.stats.totalDepth = Math.max(this.stats.totalDepth, depth);
|
|
55
|
+
const node = {
|
|
56
|
+
name,
|
|
57
|
+
depth,
|
|
58
|
+
children: [],
|
|
59
|
+
metadata: {}
|
|
60
|
+
};
|
|
61
|
+
if (component === null || component === void 0) {
|
|
62
|
+
node.type = "empty";
|
|
63
|
+
node.value = "";
|
|
64
|
+
this.stats.staticComponents++;
|
|
65
|
+
} else if (typeof component === "string") {
|
|
66
|
+
node.type = "text";
|
|
67
|
+
node.value = component;
|
|
68
|
+
node.metadata.length = component.length;
|
|
69
|
+
this.stats.staticComponents++;
|
|
70
|
+
} else if (typeof component === "number") {
|
|
71
|
+
node.type = "number";
|
|
72
|
+
node.value = component;
|
|
73
|
+
this.stats.staticComponents++;
|
|
74
|
+
} else if (typeof component === "boolean") {
|
|
75
|
+
node.type = "boolean";
|
|
76
|
+
node.value = component;
|
|
77
|
+
this.stats.staticComponents++;
|
|
78
|
+
} else if (typeof component === "function") {
|
|
79
|
+
node.type = "function";
|
|
80
|
+
node.value = `Function: ${component.name || "anonymous"}`;
|
|
81
|
+
node.metadata.arity = component.length;
|
|
82
|
+
node.metadata.isAsync = component.constructor.name === "AsyncFunction";
|
|
83
|
+
this.stats.dynamicComponents++;
|
|
84
|
+
} else if (Array.isArray(component)) {
|
|
85
|
+
node.type = "array";
|
|
86
|
+
node.metadata.length = component.length;
|
|
87
|
+
component.forEach((item, _index) => {
|
|
88
|
+
const childNode = this.buildTree(item, `[${_index}]`, depth + 1);
|
|
89
|
+
node.children.push(childNode);
|
|
90
|
+
});
|
|
91
|
+
this.stats.dynamicComponents++;
|
|
92
|
+
} else if (isCoherentObject(component)) {
|
|
93
|
+
const entries = Object.entries(component);
|
|
94
|
+
if (entries.length === 1) {
|
|
95
|
+
const [tagName, props] = entries;
|
|
96
|
+
node.type = "element";
|
|
97
|
+
node.tagName = tagName;
|
|
98
|
+
node.props = this.options.showProps ? this.analyzeProps(props) : {};
|
|
99
|
+
if (hasChildren(props)) {
|
|
100
|
+
const children = normalizeChildren(props.children);
|
|
101
|
+
children.forEach((child, _index) => {
|
|
102
|
+
const childNode = this.buildTree(child, `${tagName}[${_index}]`, depth + 1);
|
|
103
|
+
node.children.push(childNode);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
if (this.hasDynamicContent(props)) {
|
|
107
|
+
this.stats.dynamicComponents++;
|
|
108
|
+
node.metadata.dynamic = true;
|
|
109
|
+
} else {
|
|
110
|
+
this.stats.staticComponents++;
|
|
111
|
+
node.metadata.dynamic = false;
|
|
112
|
+
}
|
|
113
|
+
} else {
|
|
114
|
+
node.type = "complex";
|
|
115
|
+
node.metadata.keys = entries.map(([key]) => key);
|
|
116
|
+
this.stats.dynamicComponents++;
|
|
117
|
+
}
|
|
118
|
+
} else {
|
|
119
|
+
node.type = "unknown";
|
|
120
|
+
node.value = String(component);
|
|
121
|
+
node.metadata.constructor = component.constructor?.name || "Object";
|
|
122
|
+
this.stats.staticComponents++;
|
|
123
|
+
}
|
|
124
|
+
return node;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Analyze component props
|
|
128
|
+
*/
|
|
129
|
+
analyzeProps(props) {
|
|
130
|
+
const analyzed = {};
|
|
131
|
+
if (!props || typeof props !== "object") {
|
|
132
|
+
return analyzed;
|
|
133
|
+
}
|
|
134
|
+
Object.entries(props).forEach(([key, value]) => {
|
|
135
|
+
if (key === "children") return;
|
|
136
|
+
if (typeof value === "function") {
|
|
137
|
+
analyzed[key] = {
|
|
138
|
+
type: "function",
|
|
139
|
+
name: value.name || "anonymous",
|
|
140
|
+
isEvent: /^on[A-Z]/.test(key)
|
|
141
|
+
};
|
|
142
|
+
} else if (typeof value === "string") {
|
|
143
|
+
analyzed[key] = {
|
|
144
|
+
type: "string",
|
|
145
|
+
length: value.length,
|
|
146
|
+
preview: value.length > 50 ? `${value.substring(0, 47)}...` : value
|
|
147
|
+
};
|
|
148
|
+
} else if (typeof value === "object" && value !== null) {
|
|
149
|
+
analyzed[key] = {
|
|
150
|
+
type: "object",
|
|
151
|
+
keys: Object.keys(value),
|
|
152
|
+
constructor: value.constructor?.name || "Object"
|
|
153
|
+
};
|
|
154
|
+
} else {
|
|
155
|
+
analyzed[key] = {
|
|
156
|
+
type: typeof value,
|
|
157
|
+
value
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
return analyzed;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Check if component has dynamic content
|
|
165
|
+
*/
|
|
166
|
+
hasDynamicContent(props) {
|
|
167
|
+
if (typeof props === "object" && props !== null) {
|
|
168
|
+
for (const value of Object.values(props)) {
|
|
169
|
+
if (typeof value === "function") return true;
|
|
170
|
+
if (typeof value === "object" && this.hasDynamicContent(value)) return true;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Render tree as formatted text
|
|
177
|
+
*/
|
|
178
|
+
renderTree(tree) {
|
|
179
|
+
const lines = [];
|
|
180
|
+
if (this.options.colorOutput) {
|
|
181
|
+
lines.push(this.colorize("\u{1F333} Coherent.js Component Tree", "cyan"));
|
|
182
|
+
lines.push(this.colorize("\u2550".repeat(40), "cyan"));
|
|
183
|
+
} else {
|
|
184
|
+
lines.push("\u{1F333} Coherent.js Component Tree");
|
|
185
|
+
lines.push("\u2550".repeat(40));
|
|
186
|
+
}
|
|
187
|
+
this.renderNode(tree, lines, "", true);
|
|
188
|
+
if (this.options.showMetadata) {
|
|
189
|
+
lines.push("");
|
|
190
|
+
lines.push("\u{1F4CA} Tree Statistics:");
|
|
191
|
+
lines.push(` Total Components: ${this.stats.totalComponents}`);
|
|
192
|
+
lines.push(` Max Depth: ${this.stats.totalDepth}`);
|
|
193
|
+
lines.push(` Static Components: ${this.stats.staticComponents}`);
|
|
194
|
+
lines.push(` Dynamic Components: ${this.stats.dynamicComponents}`);
|
|
195
|
+
lines.push(` Render Time: ${this.stats.renderTime.toFixed(2)}ms`);
|
|
196
|
+
}
|
|
197
|
+
return lines.join("\n");
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Render individual node
|
|
201
|
+
*/
|
|
202
|
+
renderNode(node, lines, prefix = "", isLast = true) {
|
|
203
|
+
const connector = isLast ? "\u2514\u2500\u2500 " : "\u251C\u2500\u2500 ";
|
|
204
|
+
const childPrefix = prefix + (isLast ? " " : "\u2502 ");
|
|
205
|
+
let nodeLine = prefix + connector;
|
|
206
|
+
if (this.options.colorOutput) {
|
|
207
|
+
nodeLine += this.getNodeIcon(node.type);
|
|
208
|
+
nodeLine += this.colorize(node.name, this.getNodeColor(node.type));
|
|
209
|
+
} else {
|
|
210
|
+
nodeLine += this.getNodeIcon(node.type) + node.name;
|
|
211
|
+
}
|
|
212
|
+
if (!this.options.compactMode) {
|
|
213
|
+
nodeLine += ` (${node.type})`;
|
|
214
|
+
if (node.type === "element") {
|
|
215
|
+
nodeLine += ` <${node.tagName}>`;
|
|
216
|
+
} else if (node.type === "text" && node.value) {
|
|
217
|
+
nodeLine += `: "${node.value.substring(0, 30)}${node.value.length > 30 ? "..." : ""}"`;
|
|
218
|
+
} else if (node.type === "function") {
|
|
219
|
+
nodeLine += `(${node.metadata.arity || 0} args)`;
|
|
220
|
+
}
|
|
221
|
+
if (node.metadata.dynamic !== void 0) {
|
|
222
|
+
nodeLine += node.metadata.dynamic ? " \u{1F504}" : " \u{1F4CC}";
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
lines.push(nodeLine);
|
|
226
|
+
if (this.options.showProps && node.props && !this.options.compactMode) {
|
|
227
|
+
Object.entries(node.props).forEach(([key, prop], _index) => {
|
|
228
|
+
const isLastProp = _index === Object.keys(node.props).length - 1;
|
|
229
|
+
const propConnector = isLastProp ? "\u2514\u2500\u2500 " : "\u251C\u2500\u2500 ";
|
|
230
|
+
const _propPrefix = childPrefix + (isLastProp && node.children.length === 0 ? " " : "\u2502 ");
|
|
231
|
+
let propLine = childPrefix + propConnector;
|
|
232
|
+
if (this.options.colorOutput) {
|
|
233
|
+
propLine += this.colorize(key, "yellow");
|
|
234
|
+
} else {
|
|
235
|
+
propLine += key;
|
|
236
|
+
}
|
|
237
|
+
propLine += `: ${this.formatPropValue(prop)}`;
|
|
238
|
+
lines.push(propLine);
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
node.children.forEach((child, index) => {
|
|
242
|
+
const isLastChild = index === node.children.length - 1;
|
|
243
|
+
this.renderNode(child, lines, childPrefix, isLastChild);
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Get node icon based on type
|
|
248
|
+
*/
|
|
249
|
+
getNodeIcon(type) {
|
|
250
|
+
const icons = {
|
|
251
|
+
element: "\u{1F3F7}\uFE0F ",
|
|
252
|
+
text: "\u{1F4DD} ",
|
|
253
|
+
function: "\u26A1 ",
|
|
254
|
+
array: "\u{1F4CB} ",
|
|
255
|
+
empty: "\u2B55 ",
|
|
256
|
+
number: "\u{1F522} ",
|
|
257
|
+
boolean: "\u2611\uFE0F ",
|
|
258
|
+
complex: "\u{1F4E6} ",
|
|
259
|
+
unknown: "\u2753 ",
|
|
260
|
+
warning: "\u26A0\uFE0F "
|
|
261
|
+
};
|
|
262
|
+
return icons[type] || "\u{1F4C4} ";
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Get node color based on type
|
|
266
|
+
*/
|
|
267
|
+
getNodeColor(type) {
|
|
268
|
+
const colors = {
|
|
269
|
+
element: "green",
|
|
270
|
+
text: "blue",
|
|
271
|
+
function: "magenta",
|
|
272
|
+
array: "cyan",
|
|
273
|
+
empty: "gray",
|
|
274
|
+
number: "yellow",
|
|
275
|
+
boolean: "yellow",
|
|
276
|
+
complex: "red",
|
|
277
|
+
unknown: "red",
|
|
278
|
+
warning: "red"
|
|
279
|
+
};
|
|
280
|
+
return colors[type] || "white";
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Format property value for display
|
|
284
|
+
*/
|
|
285
|
+
formatPropValue(prop) {
|
|
286
|
+
if (prop.type === "function") {
|
|
287
|
+
return `\u26A1 ${prop.name}${prop.isEvent ? " (event)" : ""}`;
|
|
288
|
+
} else if (prop.type === "string") {
|
|
289
|
+
return `"${prop.preview}"`;
|
|
290
|
+
} else if (prop.type === "object") {
|
|
291
|
+
return `${prop.constructor} {${prop.keys.join(", ")}}`;
|
|
292
|
+
} else {
|
|
293
|
+
return String(prop.value);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Add color to text (ANSI colors)
|
|
298
|
+
*/
|
|
299
|
+
colorize(text, color) {
|
|
300
|
+
const colors = {
|
|
301
|
+
black: "\x1B[30m",
|
|
302
|
+
red: "\x1B[31m",
|
|
303
|
+
green: "\x1B[32m",
|
|
304
|
+
yellow: "\x1B[33m",
|
|
305
|
+
blue: "\x1B[34m",
|
|
306
|
+
magenta: "\x1B[35m",
|
|
307
|
+
cyan: "\x1B[36m",
|
|
308
|
+
white: "\x1B[37m",
|
|
309
|
+
gray: "\x1B[90m"
|
|
310
|
+
};
|
|
311
|
+
const reset = "\x1B[0m";
|
|
312
|
+
return `${colors[color] || ""}${text}${reset}`;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Export tree as JSON for further analysis
|
|
316
|
+
*/
|
|
317
|
+
exportAsJSON(tree) {
|
|
318
|
+
return JSON.stringify(tree, null, 2);
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Export tree as DOT format for Graphviz
|
|
322
|
+
*/
|
|
323
|
+
exportAsDOT(tree) {
|
|
324
|
+
const lines = ["digraph ComponentTree {"];
|
|
325
|
+
lines.push(" rankdir=TB;");
|
|
326
|
+
lines.push(" node [shape=box, style=rounded];");
|
|
327
|
+
this.generateDOTNodes(tree, lines, "root");
|
|
328
|
+
lines.push("}");
|
|
329
|
+
return lines.join("\n");
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Generate DOT nodes
|
|
333
|
+
*/
|
|
334
|
+
generateDOTNodes(node, lines, parentId) {
|
|
335
|
+
const nodeId = `${parentId}_${node.name.replace(/[^a-zA-Z0-9]/g, "_")}`;
|
|
336
|
+
let label = node.name;
|
|
337
|
+
if (node.type === "element") {
|
|
338
|
+
label = `<${node.tagName}>\\n${node.name}`;
|
|
339
|
+
}
|
|
340
|
+
lines.push(` "${nodeId}" [label="${label}"];`);
|
|
341
|
+
if (parentId !== "root") {
|
|
342
|
+
lines.push(` "${parentId}" -> "${nodeId}";`);
|
|
343
|
+
}
|
|
344
|
+
node.children.forEach((child, _index) => {
|
|
345
|
+
this.generateDOTNodes(child, lines, nodeId);
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
function createComponentVisualizer(options = {}) {
|
|
350
|
+
return new ComponentVisualizer(options);
|
|
351
|
+
}
|
|
352
|
+
function visualizeComponent(component, name = "Root", options = {}) {
|
|
353
|
+
const visualizer = createComponentVisualizer(options);
|
|
354
|
+
return visualizer.visualize(component, name);
|
|
355
|
+
}
|
|
356
|
+
function logComponentTree(component, name = "Root", options = {}) {
|
|
357
|
+
const result = visualizeComponent(component, name, options);
|
|
358
|
+
console.log(result.visualization);
|
|
359
|
+
return result;
|
|
360
|
+
}
|
|
361
|
+
var component_visualizer_default = {
|
|
362
|
+
ComponentVisualizer,
|
|
363
|
+
createComponentVisualizer,
|
|
364
|
+
visualizeComponent,
|
|
365
|
+
logComponentTree
|
|
366
|
+
};
|
|
367
|
+
export {
|
|
368
|
+
ComponentVisualizer,
|
|
369
|
+
createComponentVisualizer,
|
|
370
|
+
component_visualizer_default as default,
|
|
371
|
+
logComponentTree,
|
|
372
|
+
visualizeComponent
|
|
373
|
+
};
|
|
374
|
+
//# sourceMappingURL=component-visualizer.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/component-visualizer.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * Component Tree Visualizer for Coherent.js\n *\n * Provides beautiful visualization of functional component trees\n * making it easy to debug and understand pure JavaScript object components\n *\n * @module ComponentVisualizer\n */\n\nimport {\n isCoherentObject,\n hasChildren,\n normalizeChildren\n} from '@coherent.js/core';\n\n/**\n * Component tree visualizer with enhanced debugging\n */\nexport class ComponentVisualizer {\n constructor(options = {}) {\n this.options = {\n maxDepth: options.maxDepth || 50,\n showProps: options.showProps !== false,\n showMetadata: options.showMetadata !== false,\n colorOutput: options.colorOutput !== false,\n compactMode: options.compactMode || false,\n ...options\n };\n\n this.stats = {\n totalComponents: 0,\n totalDepth: 0,\n staticComponents: 0,\n dynamicComponents: 0,\n renderTime: 0\n };\n }\n\n /**\n * Visualize a component tree\n */\n visualize(component, name = 'Root') {\n const startTime = performance.now();\n this.stats = { totalComponents: 0, totalDepth: 0, staticComponents: 0, dynamicComponents: 0, renderTime: 0 };\n\n const tree = this.buildTree(component, name, 0);\n const visualization = this.renderTree(tree);\n\n this.stats.renderTime = performance.now() - startTime;\n\n return {\n visualization,\n stats: { ...this.stats },\n tree\n };\n }\n\n /**\n * Build component tree structure\n */\n buildTree(component, name, depth) {\n if (depth > this.options.maxDepth) {\n return {\n name: 'MAX_DEPTH_REACHED',\n type: 'warning',\n depth,\n children: [],\n metadata: { message: `Maximum depth ${this.options.maxDepth} exceeded` }\n };\n }\n\n this.stats.totalComponents++;\n this.stats.totalDepth = Math.max(this.stats.totalDepth, depth);\n\n const node = {\n name,\n depth,\n children: [],\n metadata: {}\n };\n\n // Handle different component types\n if (component === null || component === undefined) {\n node.type = 'empty';\n node.value = '';\n this.stats.staticComponents++;\n } else if (typeof component === 'string') {\n node.type = 'text';\n node.value = component;\n node.metadata.length = component.length;\n this.stats.staticComponents++;\n } else if (typeof component === 'number') {\n node.type = 'number';\n node.value = component;\n this.stats.staticComponents++;\n } else if (typeof component === 'boolean') {\n node.type = 'boolean';\n node.value = component;\n this.stats.staticComponents++;\n } else if (typeof component === 'function') {\n node.type = 'function';\n node.value = `Function: ${component.name || 'anonymous'}`;\n node.metadata.arity = component.length;\n node.metadata.isAsync = component.constructor.name === 'AsyncFunction';\n this.stats.dynamicComponents++;\n } else if (Array.isArray(component)) {\n node.type = 'array';\n node.metadata.length = component.length;\n component.forEach((item, _index) => {\n const childNode = this.buildTree(item, `[${_index}]`, depth + 1);\n node.children.push(childNode);\n });\n this.stats.dynamicComponents++;\n } else if (isCoherentObject(component)) {\n const entries = Object.entries(component);\n if (entries.length === 1) {\n const [tagName, props] = entries;\n node.type = 'element';\n node.tagName = tagName;\n node.props = this.options.showProps ? this.analyzeProps(props) : {};\n\n // Extract children\n if (hasChildren(props)) {\n const children = normalizeChildren(props.children);\n children.forEach((child, _index) => {\n const childNode = this.buildTree(child, `${tagName}[${_index}]`, depth + 1);\n node.children.push(childNode);\n });\n }\n\n // Analyze if static or dynamic\n if (this.hasDynamicContent(props)) {\n this.stats.dynamicComponents++;\n node.metadata.dynamic = true;\n } else {\n this.stats.staticComponents++;\n node.metadata.dynamic = false;\n }\n } else {\n node.type = 'complex';\n node.metadata.keys = entries.map(([key]) => key);\n this.stats.dynamicComponents++;\n }\n } else {\n node.type = 'unknown';\n node.value = String(component);\n node.metadata.constructor = component.constructor?.name || 'Object';\n this.stats.staticComponents++;\n }\n\n return node;\n }\n\n /**\n * Analyze component props\n */\n analyzeProps(props) {\n const analyzed = {};\n\n if (!props || typeof props !== 'object') {\n return analyzed;\n }\n\n Object.entries(props).forEach(([key, value]) => {\n if (key === 'children') return;\n\n if (typeof value === 'function') {\n analyzed[key] = {\n type: 'function',\n name: value.name || 'anonymous',\n isEvent: /^on[A-Z]/.test(key)\n };\n } else if (typeof value === 'string') {\n analyzed[key] = {\n type: 'string',\n length: value.length,\n preview: value.length > 50 ? `${value.substring(0, 47)}...` : value\n };\n } else if (typeof value === 'object' && value !== null) {\n analyzed[key] = {\n type: 'object',\n keys: Object.keys(value),\n constructor: value.constructor?.name || 'Object'\n };\n } else {\n analyzed[key] = {\n type: typeof value,\n value\n };\n }\n });\n\n return analyzed;\n }\n\n /**\n * Check if component has dynamic content\n */\n hasDynamicContent(props) {\n if (typeof props === 'object' && props !== null) {\n for (const value of Object.values(props)) {\n if (typeof value === 'function') return true;\n if (typeof value === 'object' && this.hasDynamicContent(value)) return true;\n }\n }\n return false;\n }\n\n /**\n * Render tree as formatted text\n */\n renderTree(tree) {\n const lines = [];\n\n if (this.options.colorOutput) {\n lines.push(this.colorize('\uD83C\uDF33 Coherent.js Component Tree', 'cyan'));\n lines.push(this.colorize('\u2550'.repeat(40), 'cyan'));\n } else {\n lines.push('\uD83C\uDF33 Coherent.js Component Tree');\n lines.push('\u2550'.repeat(40));\n }\n\n this.renderNode(tree, lines, '', true);\n\n if (this.options.showMetadata) {\n lines.push('');\n lines.push('\uD83D\uDCCA Tree Statistics:');\n lines.push(` Total Components: ${this.stats.totalComponents}`);\n lines.push(` Max Depth: ${this.stats.totalDepth}`);\n lines.push(` Static Components: ${this.stats.staticComponents}`);\n lines.push(` Dynamic Components: ${this.stats.dynamicComponents}`);\n lines.push(` Render Time: ${this.stats.renderTime.toFixed(2)}ms`);\n }\n\n return lines.join('\\n');\n }\n\n /**\n * Render individual node\n */\n renderNode(node, lines, prefix = '', isLast = true) {\n const connector = isLast ? '\u2514\u2500\u2500 ' : '\u251C\u2500\u2500 ';\n const childPrefix = prefix + (isLast ? ' ' : '\u2502 ');\n\n let nodeLine = prefix + connector;\n\n // Add node icon and name\n if (this.options.colorOutput) {\n nodeLine += this.getNodeIcon(node.type);\n nodeLine += this.colorize(node.name, this.getNodeColor(node.type));\n } else {\n nodeLine += this.getNodeIcon(node.type) + node.name;\n }\n\n // Add type information\n if (!this.options.compactMode) {\n nodeLine += ` (${node.type})`;\n\n // Add additional info based on type\n if (node.type === 'element') {\n nodeLine += ` <${node.tagName}>`;\n } else if (node.type === 'text' && node.value) {\n nodeLine += `: \"${node.value.substring(0, 30)}${node.value.length > 30 ? '...' : ''}\"`;\n } else if (node.type === 'function') {\n nodeLine += `(${node.metadata.arity || 0} args)`;\n }\n\n // Add dynamic indicator\n if (node.metadata.dynamic !== undefined) {\n nodeLine += node.metadata.dynamic ? ' \uD83D\uDD04' : ' \uD83D\uDCCC';\n }\n }\n\n lines.push(nodeLine);\n\n // Add props if enabled and not compact\n if (this.options.showProps && node.props && !this.options.compactMode) {\n Object.entries(node.props).forEach(([key, prop], _index) => {\n const isLastProp = _index === Object.keys(node.props).length - 1;\n const propConnector = isLastProp ? '\u2514\u2500\u2500 ' : '\u251C\u2500\u2500 ';\n const _propPrefix = childPrefix + (isLastProp && node.children.length === 0 ? ' ' : '\u2502 ');\n\n let propLine = childPrefix + propConnector;\n if (this.options.colorOutput) {\n propLine += this.colorize(key, 'yellow');\n } else {\n propLine += key;\n }\n\n propLine += `: ${ this.formatPropValue(prop)}`;\n lines.push(propLine);\n });\n }\n\n // Render children\n node.children.forEach((child, index) => {\n const isLastChild = index === node.children.length - 1;\n this.renderNode(child, lines, childPrefix, isLastChild);\n });\n }\n\n /**\n * Get node icon based on type\n */\n getNodeIcon(type) {\n const icons = {\n element: '\uD83C\uDFF7\uFE0F ',\n text: '\uD83D\uDCDD ',\n function: '\u26A1 ',\n array: '\uD83D\uDCCB ',\n empty: '\u2B55 ',\n number: '\uD83D\uDD22 ',\n boolean: '\u2611\uFE0F ',\n complex: '\uD83D\uDCE6 ',\n unknown: '\u2753 ',\n warning: '\u26A0\uFE0F '\n };\n return icons[type] || '\uD83D\uDCC4 ';\n }\n\n /**\n * Get node color based on type\n */\n getNodeColor(type) {\n const colors = {\n element: 'green',\n text: 'blue',\n function: 'magenta',\n array: 'cyan',\n empty: 'gray',\n number: 'yellow',\n boolean: 'yellow',\n complex: 'red',\n unknown: 'red',\n warning: 'red'\n };\n return colors[type] || 'white';\n }\n\n /**\n * Format property value for display\n */\n formatPropValue(prop) {\n if (prop.type === 'function') {\n return `\u26A1 ${prop.name}${prop.isEvent ? ' (event)' : ''}`;\n } else if (prop.type === 'string') {\n return `\"${prop.preview}\"`;\n } else if (prop.type === 'object') {\n return `${prop.constructor} {${prop.keys.join(', ')}}`;\n } else {\n return String(prop.value);\n }\n }\n\n /**\n * Add color to text (ANSI colors)\n */\n colorize(text, color) {\n const colors = {\n black: '\\x1b[30m',\n red: '\\x1b[31m',\n green: '\\x1b[32m',\n yellow: '\\x1b[33m',\n blue: '\\x1b[34m',\n magenta: '\\x1b[35m',\n cyan: '\\x1b[36m',\n white: '\\x1b[37m',\n gray: '\\x1b[90m'\n };\n\n const reset = '\\x1b[0m';\n return `${colors[color] || ''}${text}${reset}`;\n }\n\n /**\n * Export tree as JSON for further analysis\n */\n exportAsJSON(tree) {\n return JSON.stringify(tree, null, 2);\n }\n\n /**\n * Export tree as DOT format for Graphviz\n */\n exportAsDOT(tree) {\n const lines = ['digraph ComponentTree {'];\n lines.push(' rankdir=TB;');\n lines.push(' node [shape=box, style=rounded];');\n\n this.generateDOTNodes(tree, lines, 'root');\n\n lines.push('}');\n return lines.join('\\n');\n }\n\n /**\n * Generate DOT nodes\n */\n generateDOTNodes(node, lines, parentId) {\n const nodeId = `${parentId }_${ node.name.replace(/[^a-zA-Z0-9]/g, '_')}`;\n\n let label = node.name;\n if (node.type === 'element') {\n label = `<${node.tagName}>\\\\n${node.name}`;\n }\n\n lines.push(` \"${nodeId}\" [label=\"${label}\"];`);\n\n if (parentId !== 'root') {\n lines.push(` \"${parentId}\" -> \"${nodeId}\";`);\n }\n\n node.children.forEach((child, _index) => {\n this.generateDOTNodes(child, lines, nodeId);\n });\n }\n}\n\n/**\n * Create a component visualizer\n */\nexport function createComponentVisualizer(options = {}) {\n return new ComponentVisualizer(options);\n}\n\n/**\n * Quick visualize function\n */\nexport function visualizeComponent(component, name = 'Root', options = {}) {\n const visualizer = createComponentVisualizer(options);\n return visualizer.visualize(component, name);\n}\n\n/**\n * Visualize component and log to console\n */\nexport function logComponentTree(component, name = 'Root', options = {}) {\n const result = visualizeComponent(component, name, options);\n console.log(result.visualization);\n return result;\n}\n\nexport default {\n ComponentVisualizer,\n createComponentVisualizer,\n visualizeComponent,\n logComponentTree\n};\n"],
|
|
5
|
+
"mappings": ";AASA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAKA,IAAM,sBAAN,MAA0B;AAAA,EAC/B,YAAY,UAAU,CAAC,GAAG;AACxB,SAAK,UAAU;AAAA,MACb,UAAU,QAAQ,YAAY;AAAA,MAC9B,WAAW,QAAQ,cAAc;AAAA,MACjC,cAAc,QAAQ,iBAAiB;AAAA,MACvC,aAAa,QAAQ,gBAAgB;AAAA,MACrC,aAAa,QAAQ,eAAe;AAAA,MACpC,GAAG;AAAA,IACL;AAEA,SAAK,QAAQ;AAAA,MACX,iBAAiB;AAAA,MACjB,YAAY;AAAA,MACZ,kBAAkB;AAAA,MAClB,mBAAmB;AAAA,MACnB,YAAY;AAAA,IACd;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,UAAU,WAAW,OAAO,QAAQ;AAClC,UAAM,YAAY,YAAY,IAAI;AAClC,SAAK,QAAQ,EAAE,iBAAiB,GAAG,YAAY,GAAG,kBAAkB,GAAG,mBAAmB,GAAG,YAAY,EAAE;AAE3G,UAAM,OAAO,KAAK,UAAU,WAAW,MAAM,CAAC;AAC9C,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