@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.
@@ -0,0 +1,460 @@
1
+ // src/hybrid-integration-tools.js
2
+ var HybridVisualizer = class {
3
+ constructor(options = {}) {
4
+ this.options = {
5
+ showStateFlow: options.showStateFlow !== false,
6
+ showComponentComposition: options.showComponentComposition !== false,
7
+ showPerformanceImpact: options.showPerformanceImpact !== false,
8
+ colorOutput: options.colorOutput !== false,
9
+ ...options
10
+ };
11
+ this.stateInstances = /* @__PURE__ */ new Map();
12
+ this.componentInstances = /* @__PURE__ */ new Map();
13
+ this.connections = [];
14
+ }
15
+ /**
16
+ * Register a state instance for tracking
17
+ */
18
+ registerState(name, stateInstance) {
19
+ this.stateInstances.set(name, {
20
+ instance: stateInstance,
21
+ type: this.getStateType(stateInstance),
22
+ methods: this.getStateMethods(stateInstance),
23
+ properties: this.getStateProperties(stateInstance),
24
+ connections: []
25
+ });
26
+ }
27
+ /**
28
+ * Register a component instance for tracking
29
+ */
30
+ registerComponent(name, componentFunction, usedStates = []) {
31
+ this.componentInstances.set(name, {
32
+ function: componentFunction,
33
+ usedStates,
34
+ composition: this.analyzeComposition(componentFunction),
35
+ complexity: this.assessComplexity(componentFunction)
36
+ });
37
+ usedStates.forEach((stateName) => {
38
+ if (this.stateInstances.has(stateName)) {
39
+ this.connections.push({
40
+ from: stateName,
41
+ to: name,
42
+ type: "state-to-component"
43
+ });
44
+ this.stateInstances.get(stateName).connections.push(name);
45
+ }
46
+ });
47
+ }
48
+ /**
49
+ * Visualize the entire hybrid architecture
50
+ */
51
+ visualizeHybridArchitecture() {
52
+ const lines = [];
53
+ if (this.options.colorOutput) {
54
+ lines.push("\n\u{1F3D7}\uFE0F Coherent.js Hybrid Architecture Visualization");
55
+ lines.push("\u2550".repeat(60));
56
+ } else {
57
+ lines.push("\nCoherent.js Hybrid Architecture Visualization");
58
+ lines.push("\u2550".repeat(60));
59
+ }
60
+ lines.push("\n\u{1F4CA} State Management Layer (OOP)");
61
+ lines.push("\u2500".repeat(35));
62
+ this.stateInstances.forEach((state, name) => {
63
+ lines.push(`
64
+ \u{1F527} ${name} (${state.type})`);
65
+ lines.push(` Methods: ${state.methods.join(", ")}`);
66
+ lines.push(` Properties: ${state.properties.join(", ")}`);
67
+ lines.push(` Connected to: ${state.connections.join(", ") || "None"}`);
68
+ });
69
+ lines.push("\n\u{1F3A8} Component Layer (FP)");
70
+ lines.push("\u2500".repeat(25));
71
+ this.componentInstances.forEach((component, name) => {
72
+ lines.push(`
73
+ \u26A1 ${name}`);
74
+ lines.push(` Complexity: ${component.complexity}`);
75
+ lines.push(` Uses states: ${component.usedStates.join(", ") || "None"}`);
76
+ lines.push(` Composition: ${component.composition.join(", ") || "Direct"}`);
77
+ });
78
+ if (this.options.showStateFlow) {
79
+ lines.push("\n\u{1F504} State-to-Component Flow");
80
+ lines.push("\u2500".repeat(30));
81
+ this.connections.forEach((connection) => {
82
+ lines.push(` ${connection.from} \u2192 ${connection.to}`);
83
+ });
84
+ }
85
+ if (this.options.showPerformanceImpact) {
86
+ lines.push("\n\u{1F4C8} Performance Impact Analysis");
87
+ lines.push("\u2500".repeat(32));
88
+ lines.push(this.generatePerformanceInsights());
89
+ }
90
+ return lines.join("\n");
91
+ }
92
+ /**
93
+ * Analyze component composition
94
+ */
95
+ analyzeComposition(componentFunction) {
96
+ const composition = [];
97
+ const funcString = componentFunction.toString();
98
+ if (funcString.includes("hoc.withProps")) composition.push("withProps");
99
+ if (funcString.includes("hoc.withMemo")) composition.push("withMemo");
100
+ if (funcString.includes("layout.stack")) composition.push("stack");
101
+ if (funcString.includes("layout.card")) composition.push("card");
102
+ if (funcString.includes("data.map")) composition.push("map");
103
+ if (funcString.includes("compose.combine")) composition.push("combine");
104
+ return composition;
105
+ }
106
+ /**
107
+ * Assess component complexity
108
+ */
109
+ assessComplexity(componentFunction) {
110
+ const funcString = componentFunction.toString();
111
+ let complexity = 1;
112
+ const objectMatches = funcString.match(/\{/g);
113
+ if (objectMatches) complexity += objectMatches.length;
114
+ const functionMatches = funcString.match(/\w+\(/g);
115
+ if (functionMatches) complexity += functionMatches.length * 0.5;
116
+ const conditionalMatches = funcString.match(/\?|if|switch/g);
117
+ if (conditionalMatches) complexity += conditionalMatches.length * 2;
118
+ return Math.round(complexity);
119
+ }
120
+ /**
121
+ * Get state type
122
+ */
123
+ getStateType(stateInstance) {
124
+ if (stateInstance.constructor.name === "FormState") return "Form";
125
+ if (stateInstance.constructor.name === "ListState") return "List";
126
+ if (stateInstance.constructor.name === "ModalState") return "Modal";
127
+ if (stateInstance.constructor.name === "RouterState") return "Router";
128
+ if (stateInstance.constructor.name === "ReactiveState") return "Reactive";
129
+ return "Unknown";
130
+ }
131
+ /**
132
+ * Get state methods
133
+ */
134
+ getStateMethods(stateInstance) {
135
+ const methods = [];
136
+ const prototype = Object.getPrototypeOf(stateInstance);
137
+ Object.getOwnPropertyNames(prototype).forEach((name) => {
138
+ if (typeof stateInstance[name] === "function" && name !== "constructor") {
139
+ methods.push(name);
140
+ }
141
+ });
142
+ return methods;
143
+ }
144
+ /**
145
+ * Get state properties
146
+ */
147
+ getStateProperties(stateInstance) {
148
+ const properties = [];
149
+ if (stateInstance._state) {
150
+ properties.push("reactive-state");
151
+ }
152
+ if (stateInstance._validators) {
153
+ properties.push("validators");
154
+ }
155
+ if (stateInstance._resolvers) {
156
+ properties.push("resolvers");
157
+ }
158
+ if (stateInstance._routes) {
159
+ properties.push("routes");
160
+ }
161
+ return properties;
162
+ }
163
+ /**
164
+ * Generate performance insights
165
+ */
166
+ generatePerformanceInsights() {
167
+ const insights = [];
168
+ const stateCount = this.stateInstances.size;
169
+ const componentCount = this.componentInstances.size;
170
+ const connectionCount = this.connections.length;
171
+ if (stateCount > 5) {
172
+ insights.push("\u26A0\uFE0F Many state instances - consider consolidating related state");
173
+ } else {
174
+ insights.push("\u2705 Good state organization");
175
+ }
176
+ const avgComplexity = Array.from(this.componentInstances.values()).reduce((sum, comp) => sum + comp.complexity, 0) / Math.max(componentCount, 1);
177
+ if (avgComplexity > 10) {
178
+ insights.push("\u26A0\uFE0F High average component complexity - consider breaking down components");
179
+ } else {
180
+ insights.push("\u2705 Reasonable component complexity");
181
+ }
182
+ const couplingRatio = connectionCount / Math.max(componentCount, 1);
183
+ if (couplingRatio > 2) {
184
+ insights.push("\u26A0\uFE0F High state-to-component coupling - consider using context");
185
+ } else {
186
+ insights.push("\u2705 Good state decoupling");
187
+ }
188
+ const compositionUsage = Array.from(this.componentInstances.values()).filter((comp) => comp.composition.length > 0).length / Math.max(componentCount, 1);
189
+ if (compositionUsage < 0.5) {
190
+ insights.push("\u{1F4A1} Consider using more composition utilities for better reusability");
191
+ } else {
192
+ insights.push("\u2705 Good use of composition patterns");
193
+ }
194
+ return insights.join("\n ");
195
+ }
196
+ /**
197
+ * Export architecture analysis
198
+ */
199
+ exportAnalysis() {
200
+ return {
201
+ timestamp: Date.now(),
202
+ stateInstances: Array.from(this.stateInstances.entries()).map(([name, state]) => ({
203
+ name,
204
+ type: state.type,
205
+ methods: state.methods,
206
+ properties: state.properties,
207
+ connections: state.connections
208
+ })),
209
+ componentInstances: Array.from(this.componentInstances.entries()).map(([name, comp]) => ({
210
+ name,
211
+ complexity: comp.complexity,
212
+ usedStates: comp.usedStates,
213
+ composition: comp.composition
214
+ })),
215
+ connections: this.connections,
216
+ insights: this.generatePerformanceInsights().split("\n ").filter(Boolean)
217
+ };
218
+ }
219
+ };
220
+ var StateFlowTracker = class {
221
+ constructor() {
222
+ this.flows = [];
223
+ this.activeFlows = /* @__PURE__ */ new Map();
224
+ }
225
+ /**
226
+ * Track state change and its impact on components
227
+ */
228
+ trackFlow(stateName, action, oldValue, newValue, affectedComponents = []) {
229
+ const flow = {
230
+ id: Date.now() + Math.random(),
231
+ timestamp: Date.now(),
232
+ stateName,
233
+ action,
234
+ oldValue,
235
+ newValue,
236
+ affectedComponents,
237
+ duration: null
238
+ };
239
+ this.flows.push(flow);
240
+ this.activeFlows.set(flow.id, flow);
241
+ return flow.id;
242
+ }
243
+ /**
244
+ * Complete a flow tracking
245
+ */
246
+ completeFlow(flowId, duration) {
247
+ const flow = this.activeFlows.get(flowId);
248
+ if (flow) {
249
+ flow.duration = duration;
250
+ this.activeFlows.delete(flowId);
251
+ }
252
+ }
253
+ /**
254
+ * Analyze flow patterns
255
+ */
256
+ analyzeFlows() {
257
+ const analysis = {
258
+ totalFlows: this.flows.length,
259
+ averageDuration: 0,
260
+ mostActiveStates: {},
261
+ bottleneckComponents: {},
262
+ recommendations: []
263
+ };
264
+ if (this.flows.length === 0) return analysis;
265
+ const completedFlows = this.flows.filter((flow) => flow.duration !== null);
266
+ analysis.averageDuration = completedFlows.reduce((sum, flow) => sum + flow.duration, 0) / completedFlows.length;
267
+ this.flows.forEach((flow) => {
268
+ analysis.mostActiveStates[flow.stateName] = (analysis.mostActiveStates[flow.stateName] || 0) + 1;
269
+ });
270
+ this.flows.forEach((flow) => {
271
+ flow.affectedComponents.forEach((component) => {
272
+ analysis.bottleneckComponents[component] = (analysis.bottleneckComponents[component] || 0) + 1;
273
+ });
274
+ });
275
+ if (analysis.averageDuration > 50) {
276
+ analysis.recommendations.push("Consider optimizing state updates - average duration is high");
277
+ }
278
+ const topState = Object.entries(analysis.mostActiveStates).sort(([, a], [, b]) => b - a)[0];
279
+ if (topState && topState[1] > 10) {
280
+ analysis.recommendations.push(`State "${topState[0]}" is very active - consider splitting or optimizing`);
281
+ }
282
+ return analysis;
283
+ }
284
+ /**
285
+ * Visualize flow patterns
286
+ */
287
+ visualizeFlows() {
288
+ const lines = [];
289
+ const analysis = this.analyzeFlows();
290
+ lines.push("\n\u{1F504} State Flow Analysis");
291
+ lines.push("\u2550".repeat(25));
292
+ lines.push(`Total Flows: ${analysis.totalFlows}`);
293
+ lines.push(`Average Duration: ${analysis.averageDuration.toFixed(2)}ms`);
294
+ if (Object.keys(analysis.mostActiveStates).length > 0) {
295
+ lines.push("\n\u{1F4CA} Most Active States:");
296
+ Object.entries(analysis.mostActiveStates).sort(([, a], [, b]) => b - a).slice(0, 5).forEach(([state, count]) => {
297
+ lines.push(` ${state}: ${count} updates`);
298
+ });
299
+ }
300
+ if (Object.keys(analysis.bottleneckComponents).length > 0) {
301
+ lines.push("\n\u26A0\uFE0F Most Affected Components:");
302
+ Object.entries(analysis.bottleneckComponents).sort(([, a], [, b]) => b - a).slice(0, 5).forEach(([component, count]) => {
303
+ lines.push(` ${component}: ${count} re-renders`);
304
+ });
305
+ }
306
+ if (analysis.recommendations.length > 0) {
307
+ lines.push("\n\u{1F4A1} Recommendations:");
308
+ analysis.recommendations.forEach((rec) => {
309
+ lines.push(` \u2022 ${rec}`);
310
+ });
311
+ }
312
+ return lines.join("\n");
313
+ }
314
+ };
315
+ var HybridPerformanceMonitor = class {
316
+ constructor() {
317
+ this.metrics = {
318
+ stateOperations: [],
319
+ componentRenders: [],
320
+ hybridInteractions: []
321
+ };
322
+ this.startTime = Date.now();
323
+ }
324
+ /**
325
+ * Track state operation
326
+ */
327
+ trackStateOperation(stateName, operation, duration, memoryDelta = 0) {
328
+ this.metrics.stateOperations.push({
329
+ timestamp: Date.now(),
330
+ stateName,
331
+ operation,
332
+ duration,
333
+ memoryDelta
334
+ });
335
+ }
336
+ /**
337
+ * Track component render
338
+ */
339
+ trackComponentRender(componentName, duration, usedStates = []) {
340
+ this.metrics.componentRenders.push({
341
+ timestamp: Date.now(),
342
+ componentName,
343
+ duration,
344
+ usedStates
345
+ });
346
+ }
347
+ /**
348
+ * Track hybrid interaction
349
+ */
350
+ trackHybridInteraction(stateName, componentName, action, duration) {
351
+ this.metrics.hybridInteractions.push({
352
+ timestamp: Date.now(),
353
+ stateName,
354
+ componentName,
355
+ action,
356
+ duration
357
+ });
358
+ }
359
+ /**
360
+ * Generate hybrid performance report
361
+ */
362
+ generateReport() {
363
+ const lines = [];
364
+ lines.push("\n\u{1F4C8} Hybrid Performance Report");
365
+ lines.push("\u2550".repeat(35));
366
+ const stateOps = this.metrics.stateOperations;
367
+ if (stateOps.length > 0) {
368
+ const avgStateDuration = stateOps.reduce((sum, op) => sum + op.duration, 0) / stateOps.length;
369
+ lines.push(`
370
+ \u{1F527} State Operations: ${stateOps.length}`);
371
+ lines.push(` Average Duration: ${avgStateDuration.toFixed(2)}ms`);
372
+ const stateCounts = {};
373
+ stateOps.forEach((op) => {
374
+ stateCounts[op.stateName] = (stateCounts[op.stateName] || 0) + 1;
375
+ });
376
+ const topState = Object.entries(stateCounts).sort(([, a], [, b]) => b - a)[0];
377
+ if (topState) {
378
+ lines.push(` Most Active: ${topState[0]} (${topState[1]} operations)`);
379
+ }
380
+ }
381
+ const componentRenders = this.metrics.componentRenders;
382
+ if (componentRenders.length > 0) {
383
+ const avgRenderDuration = componentRenders.reduce((sum, r) => sum + r.duration, 0) / componentRenders.length;
384
+ lines.push(`
385
+ \u26A1 Component Renders: ${componentRenders.length}`);
386
+ lines.push(` Average Duration: ${avgRenderDuration.toFixed(2)}ms`);
387
+ const renderCounts = {};
388
+ componentRenders.forEach((r) => {
389
+ renderCounts[r.componentName] = (renderCounts[r.componentName] || 0) + 1;
390
+ });
391
+ const topComponent = Object.entries(renderCounts).sort(([, a], [, b]) => b - a)[0];
392
+ if (topComponent) {
393
+ lines.push(` Most Rendered: ${topComponent[0]} (${topComponent[1]} times)`);
394
+ }
395
+ }
396
+ const interactions = this.metrics.hybridInteractions;
397
+ if (interactions.length > 0) {
398
+ lines.push(`
399
+ \u{1F504} Hybrid Interactions: ${interactions.length}`);
400
+ const actionCounts = {};
401
+ interactions.forEach((i) => {
402
+ actionCounts[i.action] = (actionCounts[i.action] || 0) + 1;
403
+ });
404
+ lines.push(" Actions:");
405
+ Object.entries(actionCounts).forEach(([action, count]) => {
406
+ lines.push(` ${action}: ${count}`);
407
+ });
408
+ }
409
+ return lines.join("\n");
410
+ }
411
+ /**
412
+ * Export metrics
413
+ */
414
+ exportMetrics() {
415
+ return {
416
+ timestamp: Date.now(),
417
+ uptime: Date.now() - this.startTime,
418
+ metrics: { ...this.metrics }
419
+ };
420
+ }
421
+ };
422
+ function createHybridVisualizer(options) {
423
+ return new HybridVisualizer(options);
424
+ }
425
+ function createStateFlowTracker() {
426
+ return new StateFlowTracker();
427
+ }
428
+ function createHybridPerformanceMonitor() {
429
+ return new HybridPerformanceMonitor();
430
+ }
431
+ function visualizeHybridArchitecture(stateInstances, componentInstances, options = {}) {
432
+ const visualizer = createHybridVisualizer(options);
433
+ Object.entries(stateInstances).forEach(([name, instance]) => {
434
+ visualizer.registerState(name, instance);
435
+ });
436
+ Object.entries(componentInstances).forEach(([name, { component, states }]) => {
437
+ visualizer.registerComponent(name, component, states);
438
+ });
439
+ return visualizer.visualizeHybridArchitecture();
440
+ }
441
+ var hybrid_integration_tools_default = {
442
+ HybridVisualizer,
443
+ StateFlowTracker,
444
+ HybridPerformanceMonitor,
445
+ createHybridVisualizer,
446
+ createStateFlowTracker,
447
+ createHybridPerformanceMonitor,
448
+ visualizeHybridArchitecture
449
+ };
450
+ export {
451
+ HybridPerformanceMonitor,
452
+ HybridVisualizer,
453
+ StateFlowTracker,
454
+ createHybridPerformanceMonitor,
455
+ createHybridVisualizer,
456
+ createStateFlowTracker,
457
+ hybrid_integration_tools_default as default,
458
+ visualizeHybridArchitecture
459
+ };
460
+ //# sourceMappingURL=hybrid-integration-tools.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/hybrid-integration-tools.js"],
4
+ "sourcesContent": ["/**\n * Hybrid FP/OOP Integration Tools for Coherent.js\n *\n * Enhanced developer tools that visualize and debug the hybrid approach:\n * - OOP state management visualization\n * - FP component composition analysis\n * - State-to-component flow tracking\n * - Performance insights for hybrid patterns\n */\n\n/**\n * Hybrid Architecture Visualizer\n */\nexport class HybridVisualizer {\n constructor(options = {}) {\n this.options = {\n showStateFlow: options.showStateFlow !== false,\n showComponentComposition: options.showComponentComposition !== false,\n showPerformanceImpact: options.showPerformanceImpact !== false,\n colorOutput: options.colorOutput !== false,\n ...options\n };\n\n this.stateInstances = new Map();\n this.componentInstances = new Map();\n this.connections = [];\n }\n\n /**\n * Register a state instance for tracking\n */\n registerState(name, stateInstance) {\n this.stateInstances.set(name, {\n instance: stateInstance,\n type: this.getStateType(stateInstance),\n methods: this.getStateMethods(stateInstance),\n properties: this.getStateProperties(stateInstance),\n connections: []\n });\n }\n\n /**\n * Register a component instance for tracking\n */\n registerComponent(name, componentFunction, usedStates = []) {\n this.componentInstances.set(name, {\n function: componentFunction,\n usedStates,\n composition: this.analyzeComposition(componentFunction),\n complexity: this.assessComplexity(componentFunction)\n });\n\n // Track connections\n usedStates.forEach(stateName => {\n if (this.stateInstances.has(stateName)) {\n this.connections.push({\n from: stateName,\n to: name,\n type: 'state-to-component'\n });\n\n this.stateInstances.get(stateName).connections.push(name);\n }\n });\n }\n\n /**\n * Visualize the entire hybrid architecture\n */\n visualizeHybridArchitecture() {\n const lines = [];\n\n if (this.options.colorOutput) {\n lines.push('\\n\uD83C\uDFD7\uFE0F Coherent.js Hybrid Architecture Visualization');\n lines.push('\u2550'.repeat(60));\n } else {\n lines.push('\\nCoherent.js Hybrid Architecture Visualization');\n lines.push('\u2550'.repeat(60));\n }\n\n // State Management Layer (OOP)\n lines.push('\\n\uD83D\uDCCA State Management Layer (OOP)');\n lines.push('\u2500'.repeat(35));\n this.stateInstances.forEach((state, name) => {\n lines.push(`\\n\uD83D\uDD27 ${name} (${state.type})`);\n lines.push(` Methods: ${state.methods.join(', ')}`);\n lines.push(` Properties: ${state.properties.join(', ')}`);\n lines.push(` Connected to: ${state.connections.join(', ') || 'None'}`);\n });\n\n // Component Layer (FP)\n lines.push('\\n\uD83C\uDFA8 Component Layer (FP)');\n lines.push('\u2500'.repeat(25));\n this.componentInstances.forEach((component, name) => {\n lines.push(`\\n\u26A1 ${name}`);\n lines.push(` Complexity: ${component.complexity}`);\n lines.push(` Uses states: ${component.usedStates.join(', ') || 'None'}`);\n lines.push(` Composition: ${component.composition.join(', ') || 'Direct'}`);\n });\n\n // Data Flow Visualization\n if (this.options.showStateFlow) {\n lines.push('\\n\uD83D\uDD04 State-to-Component Flow');\n lines.push('\u2500'.repeat(30));\n this.connections.forEach(connection => {\n lines.push(` ${connection.from} \u2192 ${connection.to}`);\n });\n }\n\n // Performance Analysis\n if (this.options.showPerformanceImpact) {\n lines.push('\\n\uD83D\uDCC8 Performance Impact Analysis');\n lines.push('\u2500'.repeat(32));\n lines.push(this.generatePerformanceInsights());\n }\n\n return lines.join('\\n');\n }\n\n /**\n * Analyze component composition\n */\n analyzeComposition(componentFunction) {\n const composition = [];\n\n // This is a simplified analysis - in real implementation,\n // we'd parse the function to detect HOCs, composition patterns\n const funcString = componentFunction.toString();\n\n if (funcString.includes('hoc.withProps')) composition.push('withProps');\n if (funcString.includes('hoc.withMemo')) composition.push('withMemo');\n if (funcString.includes('layout.stack')) composition.push('stack');\n if (funcString.includes('layout.card')) composition.push('card');\n if (funcString.includes('data.map')) composition.push('map');\n if (funcString.includes('compose.combine')) composition.push('combine');\n\n return composition;\n }\n\n /**\n * Assess component complexity\n */\n assessComplexity(componentFunction) {\n const funcString = componentFunction.toString();\n\n let complexity = 1; // Base complexity\n\n // Count nested objects\n const objectMatches = funcString.match(/\\{/g);\n if (objectMatches) complexity += objectMatches.length;\n\n // Count function calls\n const functionMatches = funcString.match(/\\w+\\(/g);\n if (functionMatches) complexity += functionMatches.length * 0.5;\n\n // Count conditional logic\n const conditionalMatches = funcString.match(/\\?|if|switch/g);\n if (conditionalMatches) complexity += conditionalMatches.length * 2;\n\n return Math.round(complexity);\n }\n\n /**\n * Get state type\n */\n getStateType(stateInstance) {\n if (stateInstance.constructor.name === 'FormState') return 'Form';\n if (stateInstance.constructor.name === 'ListState') return 'List';\n if (stateInstance.constructor.name === 'ModalState') return 'Modal';\n if (stateInstance.constructor.name === 'RouterState') return 'Router';\n if (stateInstance.constructor.name === 'ReactiveState') return 'Reactive';\n return 'Unknown';\n }\n\n /**\n * Get state methods\n */\n getStateMethods(stateInstance) {\n const methods = [];\n const prototype = Object.getPrototypeOf(stateInstance);\n\n Object.getOwnPropertyNames(prototype).forEach(name => {\n if (typeof stateInstance[name] === 'function' && name !== 'constructor') {\n methods.push(name);\n }\n });\n\n return methods;\n }\n\n /**\n * Get state properties\n */\n getStateProperties(stateInstance) {\n const properties = [];\n\n // Try to get internal state properties\n if (stateInstance._state) {\n properties.push('reactive-state');\n }\n if (stateInstance._validators) {\n properties.push('validators');\n }\n if (stateInstance._resolvers) {\n properties.push('resolvers');\n }\n if (stateInstance._routes) {\n properties.push('routes');\n }\n\n return properties;\n }\n\n /**\n * Generate performance insights\n */\n generatePerformanceInsights() {\n const insights = [];\n\n const stateCount = this.stateInstances.size;\n const componentCount = this.componentInstances.size;\n const connectionCount = this.connections.length;\n\n // State efficiency\n if (stateCount > 5) {\n insights.push('\u26A0\uFE0F Many state instances - consider consolidating related state');\n } else {\n insights.push('\u2705 Good state organization');\n }\n\n // Component complexity\n const avgComplexity = Array.from(this.componentInstances.values())\n .reduce((sum, comp) => sum + comp.complexity, 0) / Math.max(componentCount, 1);\n\n if (avgComplexity > 10) {\n insights.push('\u26A0\uFE0F High average component complexity - consider breaking down components');\n } else {\n insights.push('\u2705 Reasonable component complexity');\n }\n\n // State coupling\n const couplingRatio = connectionCount / Math.max(componentCount, 1);\n if (couplingRatio > 2) {\n insights.push('\u26A0\uFE0F High state-to-component coupling - consider using context');\n } else {\n insights.push('\u2705 Good state decoupling');\n }\n\n // Composition usage\n const compositionUsage = Array.from(this.componentInstances.values())\n .filter(comp => comp.composition.length > 0).length / Math.max(componentCount, 1);\n\n if (compositionUsage < 0.5) {\n insights.push('\uD83D\uDCA1 Consider using more composition utilities for better reusability');\n } else {\n insights.push('\u2705 Good use of composition patterns');\n }\n\n return insights.join('\\n ');\n }\n\n /**\n * Export architecture analysis\n */\n exportAnalysis() {\n return {\n timestamp: Date.now(),\n stateInstances: Array.from(this.stateInstances.entries()).map(([name, state]) => ({\n name,\n type: state.type,\n methods: state.methods,\n properties: state.properties,\n connections: state.connections\n })),\n componentInstances: Array.from(this.componentInstances.entries()).map(([name, comp]) => ({\n name,\n complexity: comp.complexity,\n usedStates: comp.usedStates,\n composition: comp.composition\n })),\n connections: this.connections,\n insights: this.generatePerformanceInsights().split('\\n ').filter(Boolean)\n };\n }\n}\n\n/**\n * State Flow Tracker\n */\nexport class StateFlowTracker {\n constructor() {\n this.flows = [];\n this.activeFlows = new Map();\n }\n\n /**\n * Track state change and its impact on components\n */\n trackFlow(stateName, action, oldValue, newValue, affectedComponents = []) {\n const flow = {\n id: Date.now() + Math.random(),\n timestamp: Date.now(),\n stateName,\n action,\n oldValue,\n newValue,\n affectedComponents,\n duration: null\n };\n\n this.flows.push(flow);\n this.activeFlows.set(flow.id, flow);\n\n return flow.id;\n }\n\n /**\n * Complete a flow tracking\n */\n completeFlow(flowId, duration) {\n const flow = this.activeFlows.get(flowId);\n if (flow) {\n flow.duration = duration;\n this.activeFlows.delete(flowId);\n }\n }\n\n /**\n * Analyze flow patterns\n */\n analyzeFlows() {\n const analysis = {\n totalFlows: this.flows.length,\n averageDuration: 0,\n mostActiveStates: {},\n bottleneckComponents: {},\n recommendations: []\n };\n\n if (this.flows.length === 0) return analysis;\n\n // Calculate average duration\n const completedFlows = this.flows.filter(flow => flow.duration !== null);\n analysis.averageDuration = completedFlows.reduce((sum, flow) => sum + flow.duration, 0) / completedFlows.length;\n\n // Most active states\n this.flows.forEach(flow => {\n analysis.mostActiveStates[flow.stateName] = (analysis.mostActiveStates[flow.stateName] || 0) + 1;\n });\n\n // Bottleneck components\n this.flows.forEach(flow => {\n flow.affectedComponents.forEach(component => {\n analysis.bottleneckComponents[component] = (analysis.bottleneckComponents[component] || 0) + 1;\n });\n });\n\n // Generate recommendations\n if (analysis.averageDuration > 50) {\n analysis.recommendations.push('Consider optimizing state updates - average duration is high');\n }\n\n const topState = Object.entries(analysis.mostActiveStates)\n .sort(([,a], [,b]) => b - a)[0];\n\n if (topState && topState[1] > 10) {\n analysis.recommendations.push(`State \"${topState[0]}\" is very active - consider splitting or optimizing`);\n }\n\n return analysis;\n }\n\n /**\n * Visualize flow patterns\n */\n visualizeFlows() {\n const lines = [];\n const analysis = this.analyzeFlows();\n\n lines.push('\\n\uD83D\uDD04 State Flow Analysis');\n lines.push('\u2550'.repeat(25));\n lines.push(`Total Flows: ${analysis.totalFlows}`);\n lines.push(`Average Duration: ${analysis.averageDuration.toFixed(2)}ms`);\n\n if (Object.keys(analysis.mostActiveStates).length > 0) {\n lines.push('\\n\uD83D\uDCCA Most Active States:');\n Object.entries(analysis.mostActiveStates)\n .sort(([,a], [,b]) => b - a)\n .slice(0, 5)\n .forEach(([state, count]) => {\n lines.push(` ${state}: ${count} updates`);\n });\n }\n\n if (Object.keys(analysis.bottleneckComponents).length > 0) {\n lines.push('\\n\u26A0\uFE0F Most Affected Components:');\n Object.entries(analysis.bottleneckComponents)\n .sort(([,a], [,b]) => b - a)\n .slice(0, 5)\n .forEach(([component, count]) => {\n lines.push(` ${component}: ${count} re-renders`);\n });\n }\n\n if (analysis.recommendations.length > 0) {\n lines.push('\\n\uD83D\uDCA1 Recommendations:');\n analysis.recommendations.forEach(rec => {\n lines.push(` \u2022 ${rec}`);\n });\n }\n\n return lines.join('\\n');\n }\n}\n\n/**\n * Hybrid Performance Monitor\n */\nexport class HybridPerformanceMonitor {\n constructor() {\n this.metrics = {\n stateOperations: [],\n componentRenders: [],\n hybridInteractions: []\n };\n\n this.startTime = Date.now();\n }\n\n /**\n * Track state operation\n */\n trackStateOperation(stateName, operation, duration, memoryDelta = 0) {\n this.metrics.stateOperations.push({\n timestamp: Date.now(),\n stateName,\n operation,\n duration,\n memoryDelta\n });\n }\n\n /**\n * Track component render\n */\n trackComponentRender(componentName, duration, usedStates = []) {\n this.metrics.componentRenders.push({\n timestamp: Date.now(),\n componentName,\n duration,\n usedStates\n });\n }\n\n /**\n * Track hybrid interaction\n */\n trackHybridInteraction(stateName, componentName, action, duration) {\n this.metrics.hybridInteractions.push({\n timestamp: Date.now(),\n stateName,\n componentName,\n action,\n duration\n });\n }\n\n /**\n * Generate hybrid performance report\n */\n generateReport() {\n const lines = [];\n\n lines.push('\\n\uD83D\uDCC8 Hybrid Performance Report');\n lines.push('\u2550'.repeat(35));\n\n // State operations summary\n const stateOps = this.metrics.stateOperations;\n if (stateOps.length > 0) {\n const avgStateDuration = stateOps.reduce((sum, op) => sum + op.duration, 0) / stateOps.length;\n lines.push(`\\n\uD83D\uDD27 State Operations: ${stateOps.length}`);\n lines.push(` Average Duration: ${avgStateDuration.toFixed(2)}ms`);\n\n const stateCounts = {};\n stateOps.forEach(op => {\n stateCounts[op.stateName] = (stateCounts[op.stateName] || 0) + 1;\n });\n\n const topState = Object.entries(stateCounts).sort(([,a], [,b]) => b - a)[0];\n if (topState) {\n lines.push(` Most Active: ${topState[0]} (${topState[1]} operations)`);\n }\n }\n\n // Component renders summary\n const componentRenders = this.metrics.componentRenders;\n if (componentRenders.length > 0) {\n const avgRenderDuration = componentRenders.reduce((sum, r) => sum + r.duration, 0) / componentRenders.length;\n lines.push(`\\n\u26A1 Component Renders: ${componentRenders.length}`);\n lines.push(` Average Duration: ${avgRenderDuration.toFixed(2)}ms`);\n\n const renderCounts = {};\n componentRenders.forEach(r => {\n renderCounts[r.componentName] = (renderCounts[r.componentName] || 0) + 1;\n });\n\n const topComponent = Object.entries(renderCounts).sort(([,a], [,b]) => b - a)[0];\n if (topComponent) {\n lines.push(` Most Rendered: ${topComponent[0]} (${topComponent[1]} times)`);\n }\n }\n\n // Hybrid interactions\n const interactions = this.metrics.hybridInteractions;\n if (interactions.length > 0) {\n lines.push(`\\n\uD83D\uDD04 Hybrid Interactions: ${interactions.length}`);\n\n const actionCounts = {};\n interactions.forEach(i => {\n actionCounts[i.action] = (actionCounts[i.action] || 0) + 1;\n });\n\n lines.push(' Actions:');\n Object.entries(actionCounts).forEach(([action, count]) => {\n lines.push(` ${action}: ${count}`);\n });\n }\n\n return lines.join('\\n');\n }\n\n /**\n * Export metrics\n */\n exportMetrics() {\n return {\n timestamp: Date.now(),\n uptime: Date.now() - this.startTime,\n metrics: { ...this.metrics }\n };\n }\n}\n\n/**\n * Factory functions\n */\nexport function createHybridVisualizer(options) {\n return new HybridVisualizer(options);\n}\n\nexport function createStateFlowTracker() {\n return new StateFlowTracker();\n}\n\nexport function createHybridPerformanceMonitor() {\n return new HybridPerformanceMonitor();\n}\n\n/**\n * Quick visualization function\n */\nexport function visualizeHybridArchitecture(stateInstances, componentInstances, options = {}) {\n const visualizer = createHybridVisualizer(options);\n\n // Register states\n Object.entries(stateInstances).forEach(([name, instance]) => {\n visualizer.registerState(name, instance);\n });\n\n // Register components\n Object.entries(componentInstances).forEach(([name, { component, states }]) => {\n visualizer.registerComponent(name, component, states);\n });\n\n return visualizer.visualizeHybridArchitecture();\n}\n\nexport default {\n HybridVisualizer,\n StateFlowTracker,\n HybridPerformanceMonitor,\n createHybridVisualizer,\n createStateFlowTracker,\n createHybridPerformanceMonitor,\n visualizeHybridArchitecture\n};\n"],
5
+ "mappings": ";AAaO,IAAM,mBAAN,MAAuB;AAAA,EAC5B,YAAY,UAAU,CAAC,GAAG;AACxB,SAAK,UAAU;AAAA,MACb,eAAe,QAAQ,kBAAkB;AAAA,MACzC,0BAA0B,QAAQ,6BAA6B;AAAA,MAC/D,uBAAuB,QAAQ,0BAA0B;AAAA,MACzD,aAAa,QAAQ,gBAAgB;AAAA,MACrC,GAAG;AAAA,IACL;AAEA,SAAK,iBAAiB,oBAAI,IAAI;AAC9B,SAAK,qBAAqB,oBAAI,IAAI;AAClC,SAAK,cAAc,CAAC;AAAA,EACtB;AAAA;AAAA;AAAA;AAAA,EAKA,cAAc,MAAM,eAAe;AACjC,SAAK,eAAe,IAAI,MAAM;AAAA,MAC5B,UAAU;AAAA,MACV,MAAM,KAAK,aAAa,aAAa;AAAA,MACrC,SAAS,KAAK,gBAAgB,aAAa;AA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B;AAAA,EACF;AACF;AAKO,SAAS,uBAAuB,SAAS;AAC9C,SAAO,IAAI,iBAAiB,OAAO;AACrC;AAEO,SAAS,yBAAyB;AACvC,SAAO,IAAI,iBAAiB;AAC9B;AAEO,SAAS,iCAAiC;AAC/C,SAAO,IAAI,yBAAyB;AACtC;AAKO,SAAS,4BAA4B,gBAAgB,oBAAoB,UAAU,CAAC,GAAG;AAC5F,QAAM,aAAa,uBAAuB,OAAO;AAGjD,SAAO,QAAQ,cAAc,EAAE,QAAQ,CAAC,CAAC,MAAM,QAAQ,MAAM;AAC3D,eAAW,cAAc,MAAM,QAAQ;AAAA,EACzC,CAAC;AAGD,SAAO,QAAQ,kBAAkB,EAAE,QAAQ,CAAC,CAAC,MAAM,EAAE,WAAW,OAAO,CAAC,MAAM;AAC5E,eAAW,kBAAkB,MAAM,WAAW,MAAM;AAAA,EACtD,CAAC;AAED,SAAO,WAAW,4BAA4B;AAChD;AAEA,IAAO,mCAAQ;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
6
+ "names": []
7
+ }
package/dist/index.js CHANGED
@@ -1339,8 +1339,7 @@ function createConsoleLogger(prefix = "") {
1339
1339
  }
1340
1340
 
1341
1341
  // src/dev-tools.js
1342
- import { performanceMonitor } from "@coherent.js/core/src/performance/monitor.js";
1343
- import { validateComponent as validateComponent2, isCoherentObject } from "@coherent.js/core/src/core/object-utils.js";
1342
+ import { performanceMonitor, validateComponent as validateComponent2, isCoherentObject } from "@coherent.js/core";
1344
1343
  var DevTools = class {
1345
1344
  constructor(coherentInstance) {
1346
1345
  this.coherent = coherentInstance;