@decido/shell 1.0.0 → 4.0.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.
Files changed (208) hide show
  1. package/README.md +31 -0
  2. package/package.json +17 -14
  3. package/.turbo/turbo-build.log +0 -13
  4. package/src/AgentPlayer.tsx +0 -105
  5. package/src/DecidoPlayer.tsx +0 -117
  6. package/src/bridge/BridgeAgent.ts +0 -443
  7. package/src/components/DecidoIcon.tsx +0 -56
  8. package/src/components/JsonTreeEditor.tsx +0 -117
  9. package/src/components/PanelSplitter.tsx +0 -71
  10. package/src/components/PluginErrorBoundary.tsx +0 -69
  11. package/src/components/SafeLiquidUI.tsx +0 -114
  12. package/src/components/TransientLayer.tsx +0 -92
  13. package/src/components/agent/AgentChat.tsx +0 -134
  14. package/src/components/chat-extensions/IntentCatalogPanel.tsx +0 -81
  15. package/src/components/chat-extensions/chatSlashCommands.ts +0 -101
  16. package/src/components/controls/CreatorInputBar.tsx +0 -144
  17. package/src/components/controls/OSToolbar.tsx +0 -90
  18. package/src/components/controls/TimelineTape.tsx +0 -43
  19. package/src/components/debug/ActionTimelineTab.tsx +0 -111
  20. package/src/components/debug/CSSInspectorTab.tsx +0 -436
  21. package/src/components/debug/ExportTab.tsx +0 -192
  22. package/src/components/debug/FlowHealthTab.tsx +0 -86
  23. package/src/components/debug/LogsTab.tsx +0 -110
  24. package/src/components/debug/MorphStackTab.tsx +0 -241
  25. package/src/components/debug/NetworkTab.tsx +0 -173
  26. package/src/components/debug/PerformanceTab.tsx +0 -171
  27. package/src/components/debug/ProfilesTab.tsx +0 -238
  28. package/src/components/debug/ReplayTab.tsx +0 -70
  29. package/src/components/debug/StoresTab.tsx +0 -255
  30. package/src/components/debug/TopologyTab.tsx +0 -59
  31. package/src/components/debug/debugConfig.tsx +0 -66
  32. package/src/components/playground/DebugPanel.tsx +0 -112
  33. package/src/components/playground/HeaderCenterControls.tsx +0 -92
  34. package/src/components/playground/KeyframeListItem.tsx +0 -70
  35. package/src/components/playground/PlaygroundAppSidebar.tsx +0 -171
  36. package/src/components/playground/PlaygroundBottomControls.tsx +0 -132
  37. package/src/components/playground/PlaygroundCanvas.tsx +0 -87
  38. package/src/components/playground/PlaygroundChat.tsx +0 -236
  39. package/src/components/playground/PlaygroundErrorBoundary.tsx +0 -63
  40. package/src/components/playground/PlaygroundFloatingInput.tsx +0 -352
  41. package/src/components/playground/PlaygroundHeader.tsx +0 -222
  42. package/src/components/playground/PlaygroundSidebar.tsx +0 -136
  43. package/src/components/playground/PlaygroundTerminal.tsx +0 -44
  44. package/src/components/playground/SuggestionCards.tsx +0 -29
  45. package/src/components/playground/demos/ClinicaAINode.tsx +0 -221
  46. package/src/components/playground/demos/FinanceAINode.tsx +0 -226
  47. package/src/components/playground/demos/KiaAcademyNode.tsx +0 -250
  48. package/src/components/playground/demos/KiaBotNode.tsx +0 -207
  49. package/src/components/playground/demos/KiaCampaignNode.tsx +0 -191
  50. package/src/components/playground/demos/KiaComplianceNode.tsx +0 -140
  51. package/src/components/playground/demos/KiaCustomerJourneyNode.tsx +0 -220
  52. package/src/components/playground/demos/KiaCyberNode.tsx +0 -203
  53. package/src/components/playground/demos/KiaDashboardNode.tsx +0 -399
  54. package/src/components/playground/demos/KiaEmbudoOverviewNode.tsx +0 -168
  55. package/src/components/playground/demos/KiaExecutiveNode.tsx +0 -169
  56. package/src/components/playground/demos/KiaGamificationNode.tsx +0 -229
  57. package/src/components/playground/demos/KiaIntelligenceHubNode.tsx +0 -165
  58. package/src/components/playground/demos/KiaInventoryNode.tsx +0 -183
  59. package/src/components/playground/demos/KiaLeadScoringNode.tsx +0 -226
  60. package/src/components/playground/demos/KiaLiveSimulationNode.tsx +0 -177
  61. package/src/components/playground/demos/KiaMultiDealerNode.tsx +0 -223
  62. package/src/components/playground/demos/KiaNPSVoiceNode.tsx +0 -214
  63. package/src/components/playground/demos/KiaOmnichannelNode.tsx +0 -162
  64. package/src/components/playground/demos/KiaPBIBudgetNode.tsx +0 -152
  65. package/src/components/playground/demos/KiaPBIConversionNode.tsx +0 -206
  66. package/src/components/playground/demos/KiaPBIFunnelNode.tsx +0 -184
  67. package/src/components/playground/demos/KiaPBIOwnershipNode.tsx +0 -113
  68. package/src/components/playground/demos/KiaPBIPartnerNode.tsx +0 -143
  69. package/src/components/playground/demos/KiaPBIPreciosNode.tsx +0 -120
  70. package/src/components/playground/demos/KiaPBIRuntNode.tsx +0 -205
  71. package/src/components/playground/demos/KiaPartnerScoreNode.tsx +0 -206
  72. package/src/components/playground/demos/KiaPredictiveNode.tsx +0 -226
  73. package/src/components/playground/demos/KiaShowroomNode.tsx +0 -194
  74. package/src/components/playground/demos/KiaStoreNode.tsx +0 -215
  75. package/src/components/playground/demos/KiaSustainabilityNode.tsx +0 -173
  76. package/src/components/playground/demos/KiaUsedVehiclesNode.tsx +0 -163
  77. package/src/components/playground/demos/KiaWorkshopNode.tsx +0 -221
  78. package/src/components/playground/demos/SmartCityNode.tsx +0 -205
  79. package/src/components/playground/demos/kia_campaign_manifest.json +0 -112
  80. package/src/components/playground/input-parts/AIModelSelector.tsx +0 -156
  81. package/src/components/playground/input-parts/InputActions.tsx +0 -80
  82. package/src/components/playground/input-parts/InputToolbar.tsx +0 -245
  83. package/src/components/playground/input-parts/ResourceLibraryPanel.tsx +0 -287
  84. package/src/components/playground/sidebarDsdIO.ts +0 -82
  85. package/src/components/settings/SettingsPanel.tsx +0 -267
  86. package/src/components/shell/AppHeader.tsx +0 -9
  87. package/src/components/shell/AppShell.tsx +0 -139
  88. package/src/components/shell/ArtifactBar.tsx +0 -97
  89. package/src/components/shell/BootScreen.tsx +0 -19
  90. package/src/components/shell/CenterComposite.tsx +0 -87
  91. package/src/components/shell/CodeEditorPanel.tsx +0 -88
  92. package/src/components/shell/GlobalOverlays.tsx +0 -228
  93. package/src/components/shell/LayoutConfigurator.tsx +0 -209
  94. package/src/components/shell/LayoutGrid.tsx +0 -178
  95. package/src/components/shell/MorphShell.tsx +0 -368
  96. package/src/components/shell/PluginViewer.tsx +0 -147
  97. package/src/components/shell/ShellNexusPreview.tsx +0 -458
  98. package/src/components/shell/SlotRenderer.tsx +0 -115
  99. package/src/components/shell/TabBar.tsx +0 -94
  100. package/src/components/shell/TemplateLibrary.tsx +0 -195
  101. package/src/components/shell/layoutConstants.ts +0 -35
  102. package/src/components/shell/morphStageMeta.ts +0 -15
  103. package/src/components/shell/shells/BuiltInShells.tsx +0 -443
  104. package/src/components/shell/shells/DatawayChatShell.tsx +0 -42
  105. package/src/components/shell/shells/TokenPreview.tsx +0 -339
  106. package/src/components/shell/shells/bootShells.ts +0 -31
  107. package/src/components/shells/CreatorShell.tsx +0 -37
  108. package/src/components/shells/DecidoShell.tsx +0 -447
  109. package/src/components/shells/ExperimentalChatShell.tsx +0 -245
  110. package/src/components/shells/UserCanvas.tsx +0 -44
  111. package/src/components/studio/BlueprintManagerPanel.tsx +0 -137
  112. package/src/components/studio/DependencyTreePanel.tsx +0 -192
  113. package/src/components/studio/NodePalette.tsx +0 -92
  114. package/src/components/studio/NodePropertiesPanel.tsx +0 -81
  115. package/src/components/studio/ReactFlowEditor.tsx +0 -242
  116. package/src/components/studio/TimelineEditor.tsx +0 -122
  117. package/src/components/studio/TimelineKeyframeCard.tsx +0 -99
  118. package/src/components/studio/VariablePanel.tsx +0 -181
  119. package/src/components/studio/blueprint/BlueprintCard.tsx +0 -82
  120. package/src/components/studio/editor/CanvasContextMenu.tsx +0 -107
  121. package/src/components/studio/editor/EditorToolbar.tsx +0 -80
  122. package/src/components/studio/editor/StageContentRenderer.tsx +0 -134
  123. package/src/components/studio/editor/TrackPropertyEditors.tsx +0 -133
  124. package/src/components/studio/editor/TreeNodeItem.tsx +0 -91
  125. package/src/components/studio/editor/edgeStyles.ts +0 -43
  126. package/src/components/studio/editor/editorKeyHandler.ts +0 -95
  127. package/src/components/studio/editor/nodeTypeRegistry.ts +0 -137
  128. package/src/components/studio/editor/paletteCatalog.tsx +0 -84
  129. package/src/components/studio/nodes/shell/InteractionNodes.tsx +0 -82
  130. package/src/components/studio/nodes/shell/LayoutControlNodes.tsx +0 -69
  131. package/src/components/studio/nodes/shell/RegisterActionNode.tsx +0 -20
  132. package/src/components/studio/nodes/shell/RegisterButtonNode.tsx +0 -22
  133. package/src/components/studio/nodes/shell/RegisterPanelNode.tsx +0 -19
  134. package/src/components/studio/nodes/shell/RegisterSidebarNode.tsx +0 -19
  135. package/src/components/studio/nodes/shell/RegisterStatusBarNode.tsx +0 -22
  136. package/src/components/studio/nodes/shell/RegisterTabNode.tsx +0 -21
  137. package/src/components/studio/nodes/shell/RegisterTopBarNode.tsx +0 -22
  138. package/src/components/studio/nodes/shell/ShellConfigNode.tsx +0 -51
  139. package/src/components/studio/nodes/shell/ShellNodeBase.tsx +0 -100
  140. package/src/components/studio/nodes/shell/ThemeNodes.tsx +0 -51
  141. package/src/components/studio/nodes/shell/index.ts +0 -12
  142. package/src/components/widgets/BroadcastWidget.tsx +0 -93
  143. package/src/components/widgets/MarketplaceWidget.tsx +0 -298
  144. package/src/components/widgets/McpToolsWidget.tsx +0 -231
  145. package/src/components/widgets/OpsDashboard.tsx +0 -59
  146. package/src/components/widgets/QuickActionsWidget.tsx +0 -60
  147. package/src/components/widgets/UsageWidget.tsx +0 -112
  148. package/src/components/widgets/WidgetRenderer.tsx +0 -892
  149. package/src/components/widgets/WidgetSlotPanel.tsx +0 -213
  150. package/src/config/IconRegistry.ts +0 -126
  151. package/src/contexts/NetworkProvider.tsx +0 -162
  152. package/src/core/AIDirector.ts +0 -71
  153. package/src/core/EventBus.ts +0 -37
  154. package/src/core/PluginContext.tsx +0 -141
  155. package/src/hooks/listeners/useUIStateListener.ts +0 -59
  156. package/src/hooks/listeners/useWhatsAppListener.ts +0 -110
  157. package/src/hooks/morphBridge.ts +0 -82
  158. package/src/hooks/useAIModelSelector.ts +0 -144
  159. package/src/hooks/useAgentStream.ts +0 -220
  160. package/src/hooks/useAutoUpdater.ts +0 -89
  161. package/src/hooks/useBootSequence.ts +0 -20
  162. package/src/hooks/useExportDSD.ts +0 -53
  163. package/src/hooks/useFullscreen.ts +0 -35
  164. package/src/hooks/useGeminiStream.ts +0 -282
  165. package/src/hooks/useIntentLens.ts +0 -224
  166. package/src/hooks/useKeyboardShortcuts.ts +0 -69
  167. package/src/hooks/useLoggerBridge.ts +0 -32
  168. package/src/hooks/useMcpClient.ts +0 -112
  169. package/src/hooks/useNexusaiDeploy.ts +0 -118
  170. package/src/hooks/usePlaybackEngine.ts +0 -21
  171. package/src/hooks/usePlaygroundCommander.ts +0 -475
  172. package/src/hooks/usePluginEngine.ts +0 -165
  173. package/src/hooks/useScreenRecorder.ts +0 -73
  174. package/src/hooks/useShellKeyboard.ts +0 -40
  175. package/src/hooks/useShellShortcuts.ts +0 -118
  176. package/src/hooks/useSoundEffects.ts +0 -35
  177. package/src/hooks/useStudioConfig.ts +0 -72
  178. package/src/hooks/useSystemBoot.ts +0 -84
  179. package/src/hooks/useSystemTelemetry.ts +0 -62
  180. package/src/lib/debugLogger.ts +0 -80
  181. package/src/lib/networkInterceptor.ts +0 -100
  182. package/src/mocks/decido.tsx +0 -41
  183. package/src/plugins/pluginAPI.ts +0 -190
  184. package/src/store/McpStore.ts +0 -69
  185. package/src/store/UpdaterStore.ts +0 -60
  186. package/src/store/engine.ts +0 -392
  187. package/src/store/index.ts +0 -4
  188. package/src/store/layoutPresets.ts +0 -66
  189. package/src/store/playgroundTypes.ts +0 -98
  190. package/src/store/useActionTimelineStore.ts +0 -48
  191. package/src/store/useDebugPanelStore.ts +0 -98
  192. package/src/store/useDebugProfileStore.ts +0 -130
  193. package/src/store/useLayoutStore.ts +0 -205
  194. package/src/store/useMorphInstanceStore.ts +0 -289
  195. package/src/store/useMorphologyStore.ts +0 -103
  196. package/src/store/usePlaygroundStore.ts +0 -236
  197. package/src/store/useShellRegistry.ts +0 -123
  198. package/src/store/useSuggestionsStore.ts +0 -57
  199. package/src/store/useThemeStore.ts +0 -399
  200. package/src/store/useUIComponentStore.ts +0 -179
  201. package/src/types/DecidoStoryDefinition.ts +0 -43
  202. package/src/utils/ai/ai-architect.ts +0 -92
  203. package/src/utils/ai/ai-code.ts +0 -187
  204. package/src/utils/ai/ai-core.ts +0 -50
  205. package/src/utils/ai/ai-media.ts +0 -292
  206. package/src/utils/layoutGraph.ts +0 -67
  207. package/tsconfig.json +0 -17
  208. package/tsconfig.tsbuildinfo +0 -1
@@ -1,191 +0,0 @@
1
- import React, { useState, useEffect } from 'react';
2
- import { BaseNode } from '@decido/macia-core';
3
- import {
4
- Megaphone, TrendingUp, DollarSign, Users, BarChart3,
5
- Target, Zap, Eye, MousePointer, ArrowRight, CheckCircle
6
- } from 'lucide-react';
7
-
8
- /* ═══════════════════════════════════════════════════════════════
9
- KIA CAMPAIGN NODE — Marketing Campaign Engine · Grecco Motors
10
- Campañas activas, A/B testing, ROI por canal, budget
11
- ═══════════════════════════════════════════════════════════════ */
12
-
13
- interface Campaign {
14
- name: string;
15
- channel: string;
16
- status: 'active' | 'paused' | 'completed';
17
- budget: number;
18
- spent: number;
19
- leads: number;
20
- conversions: number;
21
- cpl: number;
22
- roi: number;
23
- }
24
-
25
- const CAMPAIGNS: Campaign[] = [
26
- { name: 'EV6 Launch', channel: 'Meta Ads', status: 'active', budget: 15000000, spent: 11200000, leads: 234, conversions: 18, cpl: 47863, roi: 342 },
27
- { name: 'Sportage HEV Q1', channel: 'Google Ads', status: 'active', budget: 12000000, spent: 8600000, leads: 178, conversions: 14, cpl: 48315, roi: 285 },
28
- { name: 'Test Drive Weekend', channel: 'Instagram', status: 'active', budget: 5000000, spent: 4100000, leads: 89, conversions: 22, cpl: 46067, roi: 412 },
29
- { name: 'Posventa Fidelización', channel: 'WhatsApp', status: 'active', budget: 3000000, spent: 2100000, leads: 156, conversions: 45, cpl: 13462, roi: 890 },
30
- { name: 'EV9 Preventa', channel: 'LinkedIn', status: 'paused', budget: 8000000, spent: 2400000, leads: 34, conversions: 5, cpl: 70588, roi: 156 },
31
- ];
32
-
33
- const AB_TESTS = [
34
- { name: 'CTA Color Test', variantA: 'Rojo KIA', variantB: 'Azul Premium', liftA: 12.3, liftB: 8.7, winner: 'A', confidence: 94 },
35
- { name: 'Landing Page Test', variantA: 'Video Hero', variantB: 'Imagen Estática', liftA: 18.5, liftB: 11.2, winner: 'A', confidence: 97 },
36
- { name: 'Subject Line Email', variantA: 'Tu EV6 te espera', variantB: 'Oferta limitada', liftA: 22.1, liftB: 24.8, winner: 'B', confidence: 89 },
37
- ];
38
-
39
- const CHANNEL_ROI = [
40
- { channel: 'WhatsApp Bot', leads: 156, cost: 2100000, cpl: 13462, roi: 890, color: '#22c55e' },
41
- { channel: 'Instagram', leads: 89, cost: 4100000, cpl: 46067, roi: 412, color: '#e040fb' },
42
- { channel: 'Meta Ads', leads: 234, cost: 11200000, cpl: 47863, roi: 342, color: '#3b82f6' },
43
- { channel: 'Google Ads', leads: 178, cost: 8600000, cpl: 48315, roi: 285, color: '#f59e0b' },
44
- { channel: 'LinkedIn', leads: 34, cost: 2400000, cpl: 70588, roi: 156, color: '#06b6d4' },
45
- ];
46
-
47
- const fmtMoney = (n: number) => `$${(n / 1000000).toFixed(1)}M`;
48
-
49
- export const KiaCampaignNode = (props: any) => {
50
- const [tab, setTab] = useState<'campaigns' | 'ab' | 'roi'>('campaigns');
51
- const [campaigns, setCampaigns] = useState(CAMPAIGNS.map(c => ({ ...c })));
52
-
53
- const totalBudget = campaigns.reduce((s, c) => s + c.budget, 0);
54
- const totalSpent = campaigns.reduce((s, c) => s + c.spent, 0);
55
- const totalLeads = campaigns.reduce((s, c) => s + c.leads, 0);
56
- const totalConversions = campaigns.reduce((s, c) => s + c.conversions, 0);
57
-
58
- // Jitter
59
- useEffect(() => {
60
- const interval = setInterval(() => {
61
- setCampaigns(prev => prev.map(c => c.status === 'active' ? {
62
- ...c,
63
- spent: Math.min(c.budget, c.spent + Math.floor(Math.random() * 50000)),
64
- leads: c.leads + (Math.random() > 0.7 ? 1 : 0),
65
- } : c));
66
- }, 5000);
67
- return () => clearInterval(interval);
68
- }, []);
69
-
70
- return (
71
- <BaseNode {...props} title="Kia Campaign Engine" width={500} height={620}>
72
- <div className="flex flex-col h-full bg-slate-950 text-white overflow-hidden">
73
-
74
- {/* Header */}
75
- <div className="flex items-center gap-3 p-3 bg-slate-900 border-b border-slate-800">
76
- <div className="w-9 h-9 rounded-full bg-fuchsia-600/20 flex items-center justify-center border border-fuchsia-500/30">
77
- <Megaphone size={16} className="text-fuchsia-400" />
78
- </div>
79
- <div className="flex-1">
80
- <div className="text-xs font-bold tracking-wide">CAMPAIGN ENGINE</div>
81
- <div className="text-[10px] text-slate-400">Grecco Motors · {campaigns.filter(c => c.status === 'active').length} campañas activas</div>
82
- </div>
83
- </div>
84
-
85
- {/* Tabs */}
86
- <div className="flex gap-1 p-2 bg-slate-900/50 border-b border-slate-800">
87
- {([
88
- { key: 'campaigns' as const, label: '📢 Campañas' },
89
- { key: 'ab' as const, label: '🧪 A/B Tests' },
90
- { key: 'roi' as const, label: '💰 ROI Canal' },
91
- ]).map(t => (
92
- <button key={t.key} onClick={() => setTab(t.key)}
93
- className={`flex-1 py-1.5 rounded text-[9px] font-bold transition-all ${tab === t.key ? 'bg-fuchsia-600/20 text-fuchsia-400 border border-fuchsia-500/30' : 'text-slate-500'
94
- }`}>
95
- {t.label}
96
- </button>
97
- ))}
98
- </div>
99
-
100
- {/* KPIs */}
101
- <div className="flex gap-1 px-3 py-2 border-b border-slate-800">
102
- {[
103
- { label: 'Budget', val: fmtMoney(totalBudget), color: 'text-blue-400' },
104
- { label: 'Spent', val: fmtMoney(totalSpent), color: 'text-yellow-400' },
105
- { label: 'Leads', val: totalLeads.toString(), color: 'text-green-400' },
106
- { label: 'Conv', val: totalConversions.toString(), color: 'text-purple-400' },
107
- ].map(s => (
108
- <div key={s.label} className="flex-1 text-center bg-slate-900/50 rounded p-1.5 border border-slate-800/50">
109
- <div className={`text-sm font-bold ${s.color}`}>{s.val}</div>
110
- <div className="text-[8px] text-slate-500">{s.label}</div>
111
- </div>
112
- ))}
113
- </div>
114
-
115
- {/* Content */}
116
- <div className="flex-1 overflow-y-auto p-3 space-y-1.5">
117
-
118
- {tab === 'campaigns' && campaigns.map(c => (
119
- <div key={c.name} className="bg-slate-900/50 rounded-lg p-2.5 border border-slate-800">
120
- <div className="flex items-center justify-between mb-1">
121
- <div>
122
- <span className="text-[11px] font-bold">{c.name}</span>
123
- <span className="text-[9px] text-slate-500 ml-1.5">{c.channel}</span>
124
- </div>
125
- <span className={`text-[8px] px-1.5 py-0.5 rounded font-bold ${c.status === 'active' ? 'bg-green-500/20 text-green-400' :
126
- c.status === 'paused' ? 'bg-yellow-500/20 text-yellow-400' :
127
- 'bg-slate-700 text-slate-400'
128
- }`}>{c.status.toUpperCase()}</span>
129
- </div>
130
- <div className="flex items-center gap-2 mb-1">
131
- <div className="flex-1 h-1.5 bg-slate-800 rounded-full">
132
- <div className="h-full rounded-full bg-linear-to-r from-fuchsia-500 to-blue-500"
133
- style={{ width: `${(c.spent / c.budget) * 100}%` }} />
134
- </div>
135
- <span className="text-[8px] text-slate-500">{fmtMoney(c.spent)}/{fmtMoney(c.budget)}</span>
136
- </div>
137
- <div className="flex gap-3 text-[9px]">
138
- <span className="text-slate-400">Leads: <span className="font-bold text-blue-400">{c.leads}</span></span>
139
- <span className="text-slate-400">Conv: <span className="font-bold text-green-400">{c.conversions}</span></span>
140
- <span className="text-slate-400">CPL: <span className="font-bold text-yellow-400">{fmtMoney(c.cpl)}</span></span>
141
- <span className="text-slate-400">ROI: <span className="font-bold text-purple-400">{c.roi}%</span></span>
142
- </div>
143
- </div>
144
- ))}
145
-
146
- {tab === 'ab' && AB_TESTS.map(t => (
147
- <div key={t.name} className="bg-slate-900/50 rounded-lg p-3 border border-slate-800">
148
- <div className="text-[11px] font-bold mb-2">{t.name}</div>
149
- <div className="space-y-1.5">
150
- {['A', 'B'].map(v => {
151
- const isA = v === 'A';
152
- const variant = isA ? t.variantA : t.variantB;
153
- const lift = isA ? t.liftA : t.liftB;
154
- const isWinner = t.winner === v;
155
- return (
156
- <div key={v} className={`flex items-center gap-2 p-1.5 rounded ${isWinner ? 'bg-green-500/10 border border-green-500/20' : 'bg-slate-800/50'}`}>
157
- <span className={`text-[9px] font-bold w-4 ${isWinner ? 'text-green-400' : 'text-slate-500'}`}>{v}</span>
158
- <span className="text-[9px] flex-1">{variant}</span>
159
- <div className="w-16 h-1 bg-slate-800 rounded-full">
160
- <div className={`h-full rounded-full ${isWinner ? 'bg-green-500' : 'bg-slate-600'}`}
161
- style={{ width: `${lift * 3}%` }} />
162
- </div>
163
- <span className={`text-[9px] font-bold ${isWinner ? 'text-green-400' : 'text-slate-500'}`}>{lift}%</span>
164
- {isWinner && <CheckCircle size={10} className="text-green-400" />}
165
- </div>
166
- );
167
- })}
168
- </div>
169
- <div className="text-[8px] text-slate-500 mt-1">Confianza: {t.confidence}%</div>
170
- </div>
171
- ))}
172
-
173
- {tab === 'roi' && CHANNEL_ROI.map(ch => (
174
- <div key={ch.channel} className="bg-slate-900/50 rounded-lg p-2.5 border border-slate-800"
175
- style={{ borderLeftWidth: '2px', borderLeftColor: ch.color }}>
176
- <div className="flex items-center justify-between mb-1">
177
- <span className="text-[11px] font-bold">{ch.channel}</span>
178
- <span className="text-sm font-bold text-green-400">{ch.roi}%</span>
179
- </div>
180
- <div className="flex gap-3 text-[9px]">
181
- <span className="text-slate-400">Leads: <span className="font-bold" style={{ color: ch.color }}>{ch.leads}</span></span>
182
- <span className="text-slate-400">Costo: <span className="font-bold text-yellow-400">{fmtMoney(ch.cost)}</span></span>
183
- <span className="text-slate-400">CPL: <span className="font-bold text-orange-400">{fmtMoney(ch.cpl)}</span></span>
184
- </div>
185
- </div>
186
- ))}
187
- </div>
188
- </div>
189
- </BaseNode>
190
- );
191
- };
@@ -1,140 +0,0 @@
1
- import React, { useState } from 'react';
2
- import { BaseNode } from '@decido/macia-core';
3
- import {
4
- Shield, FileCheck, AlertTriangle, Clock, CheckCircle,
5
- Bell, Calendar, FileText, PenTool, Lock
6
- } from 'lucide-react';
7
-
8
- /* ═══════════════════════════════════════════════════════════════
9
- KIA COMPLIANCE NODE — Compliance & Docs · Grecco Motors
10
- SOAT, tecno-mecánica, garantías, firma digital, alertas
11
- ═══════════════════════════════════════════════════════════════ */
12
-
13
- const COMPLIANCE_ITEMS = [
14
- { vehicle: 'ABC-123 · Sportage 2023', soat: { exp: 'Mar 15, 2026', days: 26, status: 'ok' as const }, tecno: { exp: 'Jun 1, 2026', days: 104, status: 'ok' as const }, warranty: { exp: 'Sep 2027', km: '18.5k/100k', status: 'ok' as const } },
15
- { vehicle: 'DEF-456 · EV6 2024', soat: { exp: 'Feb 28, 2026', days: 11, status: 'warning' as const }, tecno: { exp: 'Ago 2026', days: 165, status: 'ok' as const }, warranty: { exp: 'Dic 2029', km: '5.2k/160k', status: 'ok' as const } },
16
- { vehicle: 'GHI-789 · K3 2021', soat: { exp: 'Feb 22, 2026', days: 5, status: 'critical' as const }, tecno: { exp: 'Mar 5, 2026', days: 16, status: 'warning' as const }, warranty: { exp: 'Feb 2024', km: 'N/A', status: 'expired' as const } },
17
- { vehicle: 'JKL-012 · Picanto 2022', soat: { exp: 'May 2026', days: 73, status: 'ok' as const }, tecno: { exp: 'Feb 20, 2026', days: 3, status: 'critical' as const }, warranty: { exp: 'Jul 2025', km: '35k/100k', status: 'ok' as const } },
18
- ];
19
-
20
- const DOCUMENTS = [
21
- { name: 'Contrato Compraventa — María Gómez', type: 'Contrato', date: 'Feb 15', signed: true, pages: 8 },
22
- { name: 'Acta Entrega — EV6 GT Moonscape', type: 'Acta', date: 'Feb 14', signed: true, pages: 4 },
23
- { name: 'Crédito Bancolombia — Carlos Ruiz', type: 'Crédito', date: 'Feb 13', signed: false, pages: 12 },
24
- { name: 'Póliza Todo-Riesgo — Sportage #ABC-123', type: 'Póliza', date: 'Feb 12', signed: true, pages: 6 },
25
- { name: 'Garantía Extendida — Seltos #DEF-456', type: 'Garantía', date: 'Feb 10', signed: false, pages: 3 },
26
- ];
27
-
28
- const RECALLS = [
29
- { id: 'RC-2026-003', model: 'Sportage 2023', issue: 'Actualización software ADAS v2.1', affected: 12, completed: 8, priority: 'media' as const },
30
- { id: 'RC-2026-001', model: 'EV6 2024', issue: 'Revisión conector carga DC', affected: 4, completed: 4, priority: 'alta' as const },
31
- ];
32
-
33
- export const KiaComplianceNode = (props: any) => {
34
- const [tab, setTab] = useState<'tracking' | 'docs' | 'recalls'>('tracking');
35
-
36
- const alerts = COMPLIANCE_ITEMS.reduce((s, c) => {
37
- if (c.soat.status === 'critical' || c.tecno.status === 'critical') return s + 1;
38
- return s;
39
- }, 0);
40
- const warnings = COMPLIANCE_ITEMS.reduce((s, c) => {
41
- if (c.soat.status === 'warning' || c.tecno.status === 'warning') return s + 1;
42
- return s;
43
- }, 0);
44
- const statusIcon = (s: string) =>
45
- s === 'ok' ? <CheckCircle size={10} className="text-green-400" /> :
46
- s === 'warning' ? <Clock size={10} className="text-yellow-400" /> :
47
- s === 'critical' ? <AlertTriangle size={10} className="text-red-400 animate-pulse" /> :
48
- <AlertTriangle size={10} className="text-slate-600" />;
49
-
50
- return (
51
- <BaseNode {...props} title="Kia Compliance" width={500} height={620}>
52
- <div className="flex flex-col h-full bg-slate-950 text-white overflow-hidden">
53
-
54
- {/* Header */}
55
- <div className="flex items-center gap-3 p-3 bg-slate-900 border-b border-slate-800">
56
- <div className="w-9 h-9 rounded-full bg-teal-600/20 flex items-center justify-center border border-teal-500/30">
57
- <Shield size={16} className="text-teal-400" />
58
- </div>
59
- <div className="flex-1">
60
- <div className="text-xs font-bold tracking-wide flex items-center gap-2">
61
- COMPLIANCE & DOCS
62
- {alerts > 0 && <span className="text-[8px] px-1.5 py-0.5 bg-red-500/20 text-red-400 rounded animate-pulse">{alerts} CRÍTICO</span>}
63
- </div>
64
- <div className="text-[10px] text-slate-400">Grecco Motors · {COMPLIANCE_ITEMS.length} vehículos · {DOCUMENTS.length} documentos</div>
65
- </div>
66
- </div>
67
-
68
- {/* Tabs */}
69
- <div className="flex gap-1 p-2 bg-slate-900/50 border-b border-slate-800">
70
- {([
71
- { key: 'tracking' as const, label: '🛡️ Tracking' },
72
- { key: 'docs' as const, label: '📄 Documentos' },
73
- { key: 'recalls' as const, label: '⚠️ Recalls' },
74
- ]).map(t => (
75
- <button key={t.key} onClick={() => setTab(t.key)}
76
- className={`flex-1 py-1.5 rounded text-[9px] font-bold transition-all ${tab === t.key ? 'bg-teal-600/20 text-teal-400 border border-teal-500/30' : 'text-slate-500'
77
- }`}>
78
- {t.label}
79
- </button>
80
- ))}
81
- </div>
82
-
83
- <div className="flex-1 overflow-y-auto p-3 space-y-1.5">
84
-
85
- {tab === 'tracking' && COMPLIANCE_ITEMS.map((c, i) => (
86
- <div key={i} className="bg-slate-900/50 rounded-lg p-2.5 border border-slate-800">
87
- <div className="text-[10px] font-bold mb-1.5">{c.vehicle}</div>
88
- <div className="grid grid-cols-3 gap-1.5 text-[8px]">
89
- <div className={`rounded p-1.5 text-center ${c.soat.status === 'ok' ? 'bg-green-500/10' : c.soat.status === 'warning' ? 'bg-yellow-500/10' : 'bg-red-500/10'}`}>
90
- <div className="flex items-center justify-center gap-0.5 mb-0.5">{statusIcon(c.soat.status)} SOAT</div>
91
- <div className="font-bold">{c.soat.days}d</div>
92
- </div>
93
- <div className={`rounded p-1.5 text-center ${c.tecno.status === 'ok' ? 'bg-green-500/10' : c.tecno.status === 'warning' ? 'bg-yellow-500/10' : 'bg-red-500/10'}`}>
94
- <div className="flex items-center justify-center gap-0.5 mb-0.5">{statusIcon(c.tecno.status)} Tecno</div>
95
- <div className="font-bold">{c.tecno.days}d</div>
96
- </div>
97
- <div className={`rounded p-1.5 text-center ${c.warranty.status === 'ok' ? 'bg-green-500/10' : c.warranty.status === 'expired' ? 'bg-slate-800/50' : 'bg-yellow-500/10'}`}>
98
- <div className="flex items-center justify-center gap-0.5 mb-0.5">{statusIcon(c.warranty.status)} Garantía</div>
99
- <div className="font-bold">{c.warranty.km}</div>
100
- </div>
101
- </div>
102
- </div>
103
- ))}
104
-
105
- {tab === 'docs' && DOCUMENTS.map((d, i) => (
106
- <div key={i} className="bg-slate-900/50 rounded-lg p-2.5 border border-slate-800 flex items-center gap-2">
107
- <FileText size={14} className="text-slate-600 shrink-0" />
108
- <div className="flex-1 min-w-0">
109
- <div className="text-[10px] font-bold truncate">{d.name}</div>
110
- <div className="text-[8px] text-slate-500">{d.type} · {d.pages}p · {d.date}</div>
111
- </div>
112
- {d.signed ? (
113
- <span className="text-[8px] px-1.5 py-0.5 bg-green-500/20 text-green-400 rounded flex items-center gap-0.5"><PenTool size={7} /> Firmado</span>
114
- ) : (
115
- <button className="text-[8px] px-1.5 py-0.5 bg-yellow-500/20 text-yellow-400 rounded font-bold animate-pulse">✍️ Firmar</button>
116
- )}
117
- </div>
118
- ))}
119
-
120
- {tab === 'recalls' && RECALLS.map(r => (
121
- <div key={r.id} className="bg-slate-900/50 rounded-lg p-3 border border-slate-800"
122
- style={{ borderLeftWidth: '2px', borderLeftColor: r.priority === 'alta' ? '#ef4444' : '#f59e0b' }}>
123
- <div className="flex items-center justify-between mb-1">
124
- <span className="text-[10px] font-bold">{r.id}</span>
125
- <span className={`text-[8px] px-1.5 py-0.5 rounded font-bold ${r.priority === 'alta' ? 'bg-red-500/20 text-red-400' : 'bg-yellow-500/20 text-yellow-400'}`}>{r.priority.toUpperCase()}</span>
126
- </div>
127
- <div className="text-[9px] text-slate-400 mb-1">{r.model} — {r.issue}</div>
128
- <div className="flex items-center gap-2">
129
- <div className="flex-1 h-1.5 bg-slate-800 rounded-full">
130
- <div className="h-full rounded-full bg-teal-500" style={{ width: `${(r.completed / r.affected) * 100}%` }} />
131
- </div>
132
- <span className="text-[9px] font-bold text-teal-400">{r.completed}/{r.affected}</span>
133
- </div>
134
- </div>
135
- ))}
136
- </div>
137
- </div>
138
- </BaseNode>
139
- );
140
- };
@@ -1,220 +0,0 @@
1
- import React, { useState, useEffect } from 'react';
2
- import { BaseNode } from '@decido/macia-core';
3
- import {
4
- MapPin, Clock, Phone, Car, Wrench, CreditCard, Star, Gift,
5
- ChevronRight, RefreshCw, Bell, Sparkles, TrendingUp, Heart
6
- } from 'lucide-react';
7
-
8
- /* ═══════════════════════════════════════════════════════════════
9
- KIA CUSTOMER JOURNEY NODE — Journey Orchestration · Grecco Motors
10
- Lead → Test Drive → Pedido → Entrega → Servicio → Recompra
11
- ═══════════════════════════════════════════════════════════════ */
12
-
13
- interface JourneyStage {
14
- id: string;
15
- label: string;
16
- icon: React.ElementType;
17
- color: string;
18
- timestamp: string;
19
- status: 'completed' | 'active' | 'pending';
20
- detail: string;
21
- }
22
-
23
- interface Trigger {
24
- condition: string;
25
- action: string;
26
- channel: string;
27
- color: string;
28
- active: boolean;
29
- }
30
-
31
- const CUSTOMERS = [
32
- { name: 'María Gómez', model: 'EV6 GT', avatar: '👩‍💼', retention: 92, ltv: '$185M', stage: 3, since: 'Nov 2025' },
33
- { name: 'Carlos Ruiz', model: 'Sportage HEV', avatar: '👨‍💼', retention: 78, ltv: '$124M', stage: 5, since: 'Jun 2024' },
34
- { name: 'Laura Mejía', model: 'Seltos', avatar: '👩', retention: 85, ltv: '$97M', stage: 4, since: 'Ene 2025' },
35
- { name: 'Andrés Vélez', model: 'K3 Cross', avatar: '👨', retention: 65, ltv: '$72M', stage: 2, since: 'Feb 2026' },
36
- ];
37
-
38
- const JOURNEY_STAGES: JourneyStage[] = [
39
- { id: 'lead', label: 'Lead', icon: Phone, color: '#3b82f6', timestamp: 'Día 1', status: 'completed', detail: 'Facebook Ads → WhatsApp Bot' },
40
- { id: 'contact', label: 'Contacto', icon: Bell, color: '#06b6d4', timestamp: 'Día 1', status: 'completed', detail: 'Asesor Johan llamó en < 30 min' },
41
- { id: 'showup', label: 'Show Up', icon: MapPin, color: '#a855f7', timestamp: 'Día 3', status: 'completed', detail: 'Visita showroom + Lucky Drive' },
42
- { id: 'testdrive', label: 'Test Drive', icon: Car, color: '#8b5cf6', timestamp: 'Día 3', status: 'active', detail: 'EV6 GT — Ruta premium 15 min' },
43
- { id: 'cotizacion', label: 'Cotización', icon: CreditCard, color: '#f59e0b', timestamp: 'Día 4', status: 'pending', detail: 'Leasing Bancolombia 1.18%' },
44
- { id: 'pedido', label: 'Pedido', icon: Star, color: '#22c55e', timestamp: 'Día 7', status: 'pending', detail: 'Pedido + separación $5M' },
45
- { id: 'entrega', label: 'Entrega', icon: Gift, color: '#ef4444', timestamp: 'Día 45', status: 'pending', detail: 'PDI + accesorios instalados' },
46
- { id: 'servicio', label: 'Servicio', icon: Wrench, color: '#14b8a6', timestamp: '5,000 km', status: 'pending', detail: 'Primer mantenimiento gratis' },
47
- { id: 'recompra', label: 'Recompra', icon: RefreshCw, color: '#ec4899', timestamp: '36 meses', status: 'pending', detail: 'Retoma + upgrade modelo' },
48
- ];
49
-
50
- const TRIGGERS: Trigger[] = [
51
- { condition: 'Lead sin contacto > 2h', action: 'WhatsApp auto + alerta asesor', channel: '📱 WhatsApp', color: '#ef4444', active: true },
52
- { condition: 'No show up after 5 días', action: 'Email con oferta exclusiva', channel: '📧 Email', color: '#f59e0b', active: true },
53
- { condition: 'Cotización sin cierre > 7 días', action: 'Llamada gerente comercial', channel: '📞 Llamada', color: '#a855f7', active: true },
54
- { condition: 'Vehículo a 5,000 km', action: 'Agendar mantenimiento auto', channel: '📱 Push', color: '#22c55e', active: true },
55
- { condition: 'NPS < 70 post-servicio', action: 'Escalación CX manager', channel: '🚨 Alerta', color: '#ef4444', active: false },
56
- { condition: '30 meses de antigüedad', action: 'Campaña retoma + upgrade', channel: '📧 Email', color: '#06b6d4', active: true },
57
- ];
58
-
59
- export const KiaCustomerJourneyNode = (props: any) => {
60
- const [selectedCustomer, setSelectedCustomer] = useState(0);
61
- const [tab, setTab] = useState<'journey' | 'triggers' | 'crosssell'>('journey');
62
- const [activeStage, setActiveStage] = useState(3);
63
-
64
- const customer = CUSTOMERS[selectedCustomer];
65
-
66
- // Animate active stage
67
- useEffect(() => {
68
- const interval = setInterval(() => {
69
- setActiveStage(prev => prev < JOURNEY_STAGES.length - 1 ? prev + 1 : 3);
70
- }, 12000);
71
- return () => clearInterval(interval);
72
- }, []);
73
-
74
- const stages = JOURNEY_STAGES.map((s, i) => ({
75
- ...s,
76
- status: i < activeStage ? 'completed' as const : i === activeStage ? 'active' as const : 'pending' as const,
77
- }));
78
-
79
- const CROSSSELL = [
80
- { product: 'Polarizado Nano-Cerámico', reason: 'Compró EV6 → 82% compran polarizado', prob: 94, value: '$1.2M' },
81
- { product: 'Seguro Premium Sura', reason: 'Ticket > $150M → Alta correlación', prob: 78, value: '$3.1M/año' },
82
- { product: 'Kit Carga Hogar 7.4kW', reason: 'EV owner sin cargador registrado', prob: 91, value: '$4.8M' },
83
- { product: 'Extensión Garantía 7 años', reason: 'Modelo > $100M → 67% aceptan', prob: 67, value: '$2.4M' },
84
- ];
85
-
86
- return (
87
- <BaseNode {...props} title="Kia Customer Journey" width={500} height={620}>
88
- <div className="flex flex-col h-full bg-[#060a12] text-white overflow-hidden">
89
-
90
- {/* Header */}
91
- <div className="flex items-center gap-3 p-3 bg-[#0c1222] border-b border-slate-800">
92
- <div className="w-9 h-9 rounded-full bg-red-600/20 flex items-center justify-center border border-red-500/30">
93
- <span className="text-red-500 font-bold text-[7px] tracking-widest">KIA</span>
94
- </div>
95
- <div className="flex-1">
96
- <div className="text-xs font-bold tracking-wide">CUSTOMER JOURNEY</div>
97
- <div className="text-[10px] text-slate-400">Grecco Motors · Orchestration 360° · {CUSTOMERS.length} clientes</div>
98
- </div>
99
- <div className="flex gap-1 bg-slate-900 rounded-lg p-0.5 border border-slate-800">
100
- {(['journey', 'triggers', 'crosssell'] as const).map(t => (
101
- <button key={t} onClick={() => setTab(t)}
102
- className={`px-2 py-1 rounded text-[9px] font-bold transition-all ${tab === t ? 'bg-red-600 text-white' : 'text-slate-500 hover:text-slate-300'
103
- }`}>
104
- {t === 'journey' ? '🗺️ Journey' : t === 'triggers' ? '⚡ Triggers' : '🎯 Cross-sell'}
105
- </button>
106
- ))}
107
- </div>
108
- </div>
109
-
110
- {/* Customer Selector */}
111
- <div className="flex gap-1 p-2 bg-[#0a0f1a] border-b border-slate-800 overflow-x-auto">
112
- {CUSTOMERS.map((c, i) => (
113
- <button key={c.name} onClick={() => setSelectedCustomer(i)}
114
- className={`flex items-center gap-1.5 px-2 py-1.5 rounded-lg text-[10px] whitespace-nowrap transition-all ${selectedCustomer === i
115
- ? 'bg-red-600/20 border border-red-500/30 text-white'
116
- : 'bg-slate-900 border border-slate-800 text-slate-400'
117
- }`}>
118
- <span>{c.avatar}</span>
119
- <div>
120
- <div className="font-semibold">{c.name}</div>
121
- <div className="text-[8px] text-slate-500">{c.model}</div>
122
- </div>
123
- </button>
124
- ))}
125
- </div>
126
-
127
- {/* Customer Stats */}
128
- <div className="flex gap-1 px-3 py-2 border-b border-slate-800">
129
- {[
130
- { label: 'Retention', val: `${customer.retention}%`, color: customer.retention > 80 ? 'text-green-400' : 'text-yellow-400' },
131
- { label: 'LTV', val: customer.ltv, color: 'text-blue-400' },
132
- { label: 'Stage', val: `${customer.stage}/9`, color: 'text-purple-400' },
133
- { label: 'Since', val: customer.since, color: 'text-slate-400' },
134
- ].map(s => (
135
- <div key={s.label} className="flex-1 text-center bg-slate-900/50 rounded p-1.5 border border-slate-800/50">
136
- <div className={`text-sm font-bold ${s.color}`}>{s.val}</div>
137
- <div className="text-[8px] text-slate-500">{s.label}</div>
138
- </div>
139
- ))}
140
- </div>
141
-
142
- {/* Content */}
143
- <div className="flex-1 overflow-y-auto p-3 space-y-2">
144
-
145
- {tab === 'journey' && stages.map((stage, i) => {
146
- const Icon = stage.icon;
147
- return (
148
- <div key={stage.id} className="flex items-start gap-2">
149
- {/* Timeline connector */}
150
- <div className="flex flex-col items-center w-6 flex-shrink-0">
151
- <div className={`w-5 h-5 rounded-full flex items-center justify-center border ${stage.status === 'completed' ? 'bg-green-500/20 border-green-500/40' :
152
- stage.status === 'active' ? 'bg-yellow-500/20 border-yellow-500/40 animate-pulse' :
153
- 'bg-slate-800 border-slate-700'
154
- }`}>
155
- <Icon size={10} className={
156
- stage.status === 'completed' ? 'text-green-400' :
157
- stage.status === 'active' ? 'text-yellow-400' :
158
- 'text-slate-500'
159
- } />
160
- </div>
161
- {i < stages.length - 1 && (
162
- <div className={`w-0.5 h-6 ${stage.status === 'completed' ? 'bg-green-500/30' : 'bg-slate-800'
163
- }`} />
164
- )}
165
- </div>
166
- {/* Stage content */}
167
- <div className={`flex-1 rounded-lg p-2 border ${stage.status === 'active'
168
- ? 'bg-yellow-500/5 border-yellow-500/20'
169
- : 'bg-slate-900/50 border-slate-800/50'
170
- }`}>
171
- <div className="flex items-center justify-between">
172
- <span className="text-[10px] font-bold" style={{ color: stage.color }}>{stage.label}</span>
173
- <span className="text-[8px] text-slate-500 font-mono">{stage.timestamp}</span>
174
- </div>
175
- <div className="text-[9px] text-slate-400 mt-0.5">{stage.detail}</div>
176
- </div>
177
- </div>
178
- );
179
- })}
180
-
181
- {tab === 'triggers' && TRIGGERS.map((trigger, i) => (
182
- <div key={i} className={`rounded-lg p-2.5 border ${trigger.active ? 'bg-slate-900/50 border-slate-800' : 'bg-slate-900/20 border-slate-800/30 opacity-50'
183
- }`}>
184
- <div className="flex items-center justify-between mb-1">
185
- <div className="flex items-center gap-1.5">
186
- <Sparkles size={10} style={{ color: trigger.color }} />
187
- <span className="text-[10px] font-semibold text-slate-300">{trigger.condition}</span>
188
- </div>
189
- <span className={`text-[8px] px-1.5 py-0.5 rounded ${trigger.active ? 'bg-green-500/20 text-green-400' : 'bg-slate-800 text-slate-500'}`}>
190
- {trigger.active ? 'ACTIVO' : 'OFF'}
191
- </span>
192
- </div>
193
- <div className="text-[9px] text-slate-400 flex items-center gap-1">
194
- <ChevronRight size={8} /> {trigger.action}
195
- </div>
196
- <div className="text-[8px] text-slate-500 mt-0.5">{trigger.channel}</div>
197
- </div>
198
- ))}
199
-
200
- {tab === 'crosssell' && CROSSSELL.map((item, i) => (
201
- <div key={i} className="bg-slate-900/50 rounded-lg p-2.5 border border-slate-800">
202
- <div className="flex items-center justify-between mb-1">
203
- <span className="text-[10px] font-bold text-white">{item.product}</span>
204
- <span className="text-[9px] font-bold text-green-400">{item.value}</span>
205
- </div>
206
- <div className="text-[9px] text-slate-400 mb-1.5">{item.reason}</div>
207
- <div className="flex items-center gap-2">
208
- <div className="flex-1 h-1.5 bg-slate-800 rounded-full">
209
- <div className="h-full rounded-full bg-linear-to-r from-blue-500 to-purple-500"
210
- style={{ width: `${item.prob}%` }} />
211
- </div>
212
- <span className="text-[9px] font-bold text-blue-400">{item.prob}%</span>
213
- </div>
214
- </div>
215
- ))}
216
- </div>
217
- </div>
218
- </BaseNode>
219
- );
220
- };