@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.
- package/README.md +31 -0
- package/package.json +17 -14
- package/.turbo/turbo-build.log +0 -13
- package/src/AgentPlayer.tsx +0 -105
- package/src/DecidoPlayer.tsx +0 -117
- package/src/bridge/BridgeAgent.ts +0 -443
- package/src/components/DecidoIcon.tsx +0 -56
- package/src/components/JsonTreeEditor.tsx +0 -117
- package/src/components/PanelSplitter.tsx +0 -71
- package/src/components/PluginErrorBoundary.tsx +0 -69
- package/src/components/SafeLiquidUI.tsx +0 -114
- package/src/components/TransientLayer.tsx +0 -92
- package/src/components/agent/AgentChat.tsx +0 -134
- package/src/components/chat-extensions/IntentCatalogPanel.tsx +0 -81
- package/src/components/chat-extensions/chatSlashCommands.ts +0 -101
- package/src/components/controls/CreatorInputBar.tsx +0 -144
- package/src/components/controls/OSToolbar.tsx +0 -90
- package/src/components/controls/TimelineTape.tsx +0 -43
- package/src/components/debug/ActionTimelineTab.tsx +0 -111
- package/src/components/debug/CSSInspectorTab.tsx +0 -436
- package/src/components/debug/ExportTab.tsx +0 -192
- package/src/components/debug/FlowHealthTab.tsx +0 -86
- package/src/components/debug/LogsTab.tsx +0 -110
- package/src/components/debug/MorphStackTab.tsx +0 -241
- package/src/components/debug/NetworkTab.tsx +0 -173
- package/src/components/debug/PerformanceTab.tsx +0 -171
- package/src/components/debug/ProfilesTab.tsx +0 -238
- package/src/components/debug/ReplayTab.tsx +0 -70
- package/src/components/debug/StoresTab.tsx +0 -255
- package/src/components/debug/TopologyTab.tsx +0 -59
- package/src/components/debug/debugConfig.tsx +0 -66
- package/src/components/playground/DebugPanel.tsx +0 -112
- package/src/components/playground/HeaderCenterControls.tsx +0 -92
- package/src/components/playground/KeyframeListItem.tsx +0 -70
- package/src/components/playground/PlaygroundAppSidebar.tsx +0 -171
- package/src/components/playground/PlaygroundBottomControls.tsx +0 -132
- package/src/components/playground/PlaygroundCanvas.tsx +0 -87
- package/src/components/playground/PlaygroundChat.tsx +0 -236
- package/src/components/playground/PlaygroundErrorBoundary.tsx +0 -63
- package/src/components/playground/PlaygroundFloatingInput.tsx +0 -352
- package/src/components/playground/PlaygroundHeader.tsx +0 -222
- package/src/components/playground/PlaygroundSidebar.tsx +0 -136
- package/src/components/playground/PlaygroundTerminal.tsx +0 -44
- package/src/components/playground/SuggestionCards.tsx +0 -29
- package/src/components/playground/demos/ClinicaAINode.tsx +0 -221
- package/src/components/playground/demos/FinanceAINode.tsx +0 -226
- package/src/components/playground/demos/KiaAcademyNode.tsx +0 -250
- package/src/components/playground/demos/KiaBotNode.tsx +0 -207
- package/src/components/playground/demos/KiaCampaignNode.tsx +0 -191
- package/src/components/playground/demos/KiaComplianceNode.tsx +0 -140
- package/src/components/playground/demos/KiaCustomerJourneyNode.tsx +0 -220
- package/src/components/playground/demos/KiaCyberNode.tsx +0 -203
- package/src/components/playground/demos/KiaDashboardNode.tsx +0 -399
- package/src/components/playground/demos/KiaEmbudoOverviewNode.tsx +0 -168
- package/src/components/playground/demos/KiaExecutiveNode.tsx +0 -169
- package/src/components/playground/demos/KiaGamificationNode.tsx +0 -229
- package/src/components/playground/demos/KiaIntelligenceHubNode.tsx +0 -165
- package/src/components/playground/demos/KiaInventoryNode.tsx +0 -183
- package/src/components/playground/demos/KiaLeadScoringNode.tsx +0 -226
- package/src/components/playground/demos/KiaLiveSimulationNode.tsx +0 -177
- package/src/components/playground/demos/KiaMultiDealerNode.tsx +0 -223
- package/src/components/playground/demos/KiaNPSVoiceNode.tsx +0 -214
- package/src/components/playground/demos/KiaOmnichannelNode.tsx +0 -162
- package/src/components/playground/demos/KiaPBIBudgetNode.tsx +0 -152
- package/src/components/playground/demos/KiaPBIConversionNode.tsx +0 -206
- package/src/components/playground/demos/KiaPBIFunnelNode.tsx +0 -184
- package/src/components/playground/demos/KiaPBIOwnershipNode.tsx +0 -113
- package/src/components/playground/demos/KiaPBIPartnerNode.tsx +0 -143
- package/src/components/playground/demos/KiaPBIPreciosNode.tsx +0 -120
- package/src/components/playground/demos/KiaPBIRuntNode.tsx +0 -205
- package/src/components/playground/demos/KiaPartnerScoreNode.tsx +0 -206
- package/src/components/playground/demos/KiaPredictiveNode.tsx +0 -226
- package/src/components/playground/demos/KiaShowroomNode.tsx +0 -194
- package/src/components/playground/demos/KiaStoreNode.tsx +0 -215
- package/src/components/playground/demos/KiaSustainabilityNode.tsx +0 -173
- package/src/components/playground/demos/KiaUsedVehiclesNode.tsx +0 -163
- package/src/components/playground/demos/KiaWorkshopNode.tsx +0 -221
- package/src/components/playground/demos/SmartCityNode.tsx +0 -205
- package/src/components/playground/demos/kia_campaign_manifest.json +0 -112
- package/src/components/playground/input-parts/AIModelSelector.tsx +0 -156
- package/src/components/playground/input-parts/InputActions.tsx +0 -80
- package/src/components/playground/input-parts/InputToolbar.tsx +0 -245
- package/src/components/playground/input-parts/ResourceLibraryPanel.tsx +0 -287
- package/src/components/playground/sidebarDsdIO.ts +0 -82
- package/src/components/settings/SettingsPanel.tsx +0 -267
- package/src/components/shell/AppHeader.tsx +0 -9
- package/src/components/shell/AppShell.tsx +0 -139
- package/src/components/shell/ArtifactBar.tsx +0 -97
- package/src/components/shell/BootScreen.tsx +0 -19
- package/src/components/shell/CenterComposite.tsx +0 -87
- package/src/components/shell/CodeEditorPanel.tsx +0 -88
- package/src/components/shell/GlobalOverlays.tsx +0 -228
- package/src/components/shell/LayoutConfigurator.tsx +0 -209
- package/src/components/shell/LayoutGrid.tsx +0 -178
- package/src/components/shell/MorphShell.tsx +0 -368
- package/src/components/shell/PluginViewer.tsx +0 -147
- package/src/components/shell/ShellNexusPreview.tsx +0 -458
- package/src/components/shell/SlotRenderer.tsx +0 -115
- package/src/components/shell/TabBar.tsx +0 -94
- package/src/components/shell/TemplateLibrary.tsx +0 -195
- package/src/components/shell/layoutConstants.ts +0 -35
- package/src/components/shell/morphStageMeta.ts +0 -15
- package/src/components/shell/shells/BuiltInShells.tsx +0 -443
- package/src/components/shell/shells/DatawayChatShell.tsx +0 -42
- package/src/components/shell/shells/TokenPreview.tsx +0 -339
- package/src/components/shell/shells/bootShells.ts +0 -31
- package/src/components/shells/CreatorShell.tsx +0 -37
- package/src/components/shells/DecidoShell.tsx +0 -447
- package/src/components/shells/ExperimentalChatShell.tsx +0 -245
- package/src/components/shells/UserCanvas.tsx +0 -44
- package/src/components/studio/BlueprintManagerPanel.tsx +0 -137
- package/src/components/studio/DependencyTreePanel.tsx +0 -192
- package/src/components/studio/NodePalette.tsx +0 -92
- package/src/components/studio/NodePropertiesPanel.tsx +0 -81
- package/src/components/studio/ReactFlowEditor.tsx +0 -242
- package/src/components/studio/TimelineEditor.tsx +0 -122
- package/src/components/studio/TimelineKeyframeCard.tsx +0 -99
- package/src/components/studio/VariablePanel.tsx +0 -181
- package/src/components/studio/blueprint/BlueprintCard.tsx +0 -82
- package/src/components/studio/editor/CanvasContextMenu.tsx +0 -107
- package/src/components/studio/editor/EditorToolbar.tsx +0 -80
- package/src/components/studio/editor/StageContentRenderer.tsx +0 -134
- package/src/components/studio/editor/TrackPropertyEditors.tsx +0 -133
- package/src/components/studio/editor/TreeNodeItem.tsx +0 -91
- package/src/components/studio/editor/edgeStyles.ts +0 -43
- package/src/components/studio/editor/editorKeyHandler.ts +0 -95
- package/src/components/studio/editor/nodeTypeRegistry.ts +0 -137
- package/src/components/studio/editor/paletteCatalog.tsx +0 -84
- package/src/components/studio/nodes/shell/InteractionNodes.tsx +0 -82
- package/src/components/studio/nodes/shell/LayoutControlNodes.tsx +0 -69
- package/src/components/studio/nodes/shell/RegisterActionNode.tsx +0 -20
- package/src/components/studio/nodes/shell/RegisterButtonNode.tsx +0 -22
- package/src/components/studio/nodes/shell/RegisterPanelNode.tsx +0 -19
- package/src/components/studio/nodes/shell/RegisterSidebarNode.tsx +0 -19
- package/src/components/studio/nodes/shell/RegisterStatusBarNode.tsx +0 -22
- package/src/components/studio/nodes/shell/RegisterTabNode.tsx +0 -21
- package/src/components/studio/nodes/shell/RegisterTopBarNode.tsx +0 -22
- package/src/components/studio/nodes/shell/ShellConfigNode.tsx +0 -51
- package/src/components/studio/nodes/shell/ShellNodeBase.tsx +0 -100
- package/src/components/studio/nodes/shell/ThemeNodes.tsx +0 -51
- package/src/components/studio/nodes/shell/index.ts +0 -12
- package/src/components/widgets/BroadcastWidget.tsx +0 -93
- package/src/components/widgets/MarketplaceWidget.tsx +0 -298
- package/src/components/widgets/McpToolsWidget.tsx +0 -231
- package/src/components/widgets/OpsDashboard.tsx +0 -59
- package/src/components/widgets/QuickActionsWidget.tsx +0 -60
- package/src/components/widgets/UsageWidget.tsx +0 -112
- package/src/components/widgets/WidgetRenderer.tsx +0 -892
- package/src/components/widgets/WidgetSlotPanel.tsx +0 -213
- package/src/config/IconRegistry.ts +0 -126
- package/src/contexts/NetworkProvider.tsx +0 -162
- package/src/core/AIDirector.ts +0 -71
- package/src/core/EventBus.ts +0 -37
- package/src/core/PluginContext.tsx +0 -141
- package/src/hooks/listeners/useUIStateListener.ts +0 -59
- package/src/hooks/listeners/useWhatsAppListener.ts +0 -110
- package/src/hooks/morphBridge.ts +0 -82
- package/src/hooks/useAIModelSelector.ts +0 -144
- package/src/hooks/useAgentStream.ts +0 -220
- package/src/hooks/useAutoUpdater.ts +0 -89
- package/src/hooks/useBootSequence.ts +0 -20
- package/src/hooks/useExportDSD.ts +0 -53
- package/src/hooks/useFullscreen.ts +0 -35
- package/src/hooks/useGeminiStream.ts +0 -282
- package/src/hooks/useIntentLens.ts +0 -224
- package/src/hooks/useKeyboardShortcuts.ts +0 -69
- package/src/hooks/useLoggerBridge.ts +0 -32
- package/src/hooks/useMcpClient.ts +0 -112
- package/src/hooks/useNexusaiDeploy.ts +0 -118
- package/src/hooks/usePlaybackEngine.ts +0 -21
- package/src/hooks/usePlaygroundCommander.ts +0 -475
- package/src/hooks/usePluginEngine.ts +0 -165
- package/src/hooks/useScreenRecorder.ts +0 -73
- package/src/hooks/useShellKeyboard.ts +0 -40
- package/src/hooks/useShellShortcuts.ts +0 -118
- package/src/hooks/useSoundEffects.ts +0 -35
- package/src/hooks/useStudioConfig.ts +0 -72
- package/src/hooks/useSystemBoot.ts +0 -84
- package/src/hooks/useSystemTelemetry.ts +0 -62
- package/src/lib/debugLogger.ts +0 -80
- package/src/lib/networkInterceptor.ts +0 -100
- package/src/mocks/decido.tsx +0 -41
- package/src/plugins/pluginAPI.ts +0 -190
- package/src/store/McpStore.ts +0 -69
- package/src/store/UpdaterStore.ts +0 -60
- package/src/store/engine.ts +0 -392
- package/src/store/index.ts +0 -4
- package/src/store/layoutPresets.ts +0 -66
- package/src/store/playgroundTypes.ts +0 -98
- package/src/store/useActionTimelineStore.ts +0 -48
- package/src/store/useDebugPanelStore.ts +0 -98
- package/src/store/useDebugProfileStore.ts +0 -130
- package/src/store/useLayoutStore.ts +0 -205
- package/src/store/useMorphInstanceStore.ts +0 -289
- package/src/store/useMorphologyStore.ts +0 -103
- package/src/store/usePlaygroundStore.ts +0 -236
- package/src/store/useShellRegistry.ts +0 -123
- package/src/store/useSuggestionsStore.ts +0 -57
- package/src/store/useThemeStore.ts +0 -399
- package/src/store/useUIComponentStore.ts +0 -179
- package/src/types/DecidoStoryDefinition.ts +0 -43
- package/src/utils/ai/ai-architect.ts +0 -92
- package/src/utils/ai/ai-code.ts +0 -187
- package/src/utils/ai/ai-core.ts +0 -50
- package/src/utils/ai/ai-media.ts +0 -292
- package/src/utils/layoutGraph.ts +0 -67
- package/tsconfig.json +0 -17
- package/tsconfig.tsbuildinfo +0 -1
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import React, { useState, useMemo, useCallback, useEffect } from 'react';
|
|
2
|
-
import { AnimatePresence, motion } from 'motion/react';
|
|
3
|
-
import {
|
|
4
|
-
Wand2, Clock, Mic, MessageCircle, Terminal, Network,
|
|
5
|
-
Variable, Download, Layout, HelpCircle, Trash2
|
|
6
|
-
} from 'lucide-react';
|
|
7
|
-
import { useTimelineStore, useEngineStore } from '@decido/engine';
|
|
8
|
-
import { usePlaygroundStore } from '../../store/usePlaygroundStore';
|
|
9
|
-
import { useUIComponentStore } from '../../store/useUIComponentStore';
|
|
10
|
-
|
|
11
|
-
interface CreatorInputBarProps {
|
|
12
|
-
inputValue: string;
|
|
13
|
-
setInputValue: (val: string) => void;
|
|
14
|
-
isGenerating: boolean;
|
|
15
|
-
handleGeneratePlayground: () => void;
|
|
16
|
-
setIsVoiceActive: (active: boolean) => void;
|
|
17
|
-
prototypeBrand: string;
|
|
18
|
-
handleExport: () => void;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const CREATOR_COMMANDS = [
|
|
22
|
-
{ cmd: '/add', args: '<type> [label]', desc: 'Agregar nodo', icon: <MessageCircle size={14} className="text-blue-400" /> },
|
|
23
|
-
{ cmd: '/shell', args: '<action> [label]', desc: 'Nodo Shell', icon: <Terminal size={14} className="text-teal-400" /> },
|
|
24
|
-
{ cmd: '/connect', args: '<nodeA> <nodeB>', desc: 'Conectar nodos', icon: <Network size={14} className="text-violet-400" /> },
|
|
25
|
-
{ cmd: '/var', args: '<name> <value>', desc: 'Definir variable', icon: <Variable size={14} className="text-emerald-400" /> },
|
|
26
|
-
{ cmd: '/export', args: '', desc: 'Exportar DSD', icon: <Download size={14} className="text-cyan-400" /> },
|
|
27
|
-
{ cmd: '/ui', args: '[componentId]', desc: 'UI Components', icon: <Layout size={14} className="text-pink-400" /> },
|
|
28
|
-
{ cmd: '/clear', args: '', desc: 'Limpiar nodos', icon: <Trash2 size={14} className="text-red-400" /> },
|
|
29
|
-
{ cmd: '/help', args: '', desc: 'Ayuda', icon: <HelpCircle size={14} className="text-text-secondary" /> },
|
|
30
|
-
];
|
|
31
|
-
|
|
32
|
-
export const CreatorInputBar = React.memo(function CreatorInputBar({
|
|
33
|
-
inputValue = '', setInputValue, isGenerating = false, handleGeneratePlayground,
|
|
34
|
-
setIsVoiceActive, prototypeBrand = '', handleExport
|
|
35
|
-
}: CreatorInputBarProps) {
|
|
36
|
-
const [slashOpen, setSlashOpen] = useState(false);
|
|
37
|
-
const [slashIdx, setSlashIdx] = useState(0);
|
|
38
|
-
|
|
39
|
-
const filteredCmds = useMemo(() => {
|
|
40
|
-
if (!inputValue.startsWith('/')) return [];
|
|
41
|
-
const q = inputValue.split(' ')[0].toLowerCase();
|
|
42
|
-
return CREATOR_COMMANDS.filter(c => c.cmd.startsWith(q));
|
|
43
|
-
}, [inputValue]);
|
|
44
|
-
|
|
45
|
-
useEffect(() => {
|
|
46
|
-
setSlashOpen(inputValue.startsWith('/') && filteredCmds.length > 0);
|
|
47
|
-
setSlashIdx(0);
|
|
48
|
-
}, [inputValue, filteredCmds.length]);
|
|
49
|
-
|
|
50
|
-
const handleCreatorSlash = useCallback(() => {
|
|
51
|
-
const parts = inputValue.trim().split(/\s+/);
|
|
52
|
-
const cmd = parts[0]?.toLowerCase();
|
|
53
|
-
if (cmd === '/add' || cmd === '/shell') {
|
|
54
|
-
const rawType = parts[1] || (cmd === '/shell' ? 'config' : 'dialogue');
|
|
55
|
-
const label = parts.slice(2).join(' ') || rawType;
|
|
56
|
-
const trackMap: Record<string, string> = {
|
|
57
|
-
'dialogue': 'dialogue', 'logic': 'logic', 'ui': 'ui', 'render': 'render', 'subflow': 'subflow', 'entry': 'entry', 'return': 'return', 'trigger': 'trigger', 'condition': 'condition', 'set': 'set',
|
|
58
|
-
'registerButton': 'shell:registerButton', 'activitybar': 'shell:registerButton', 'registerTab': 'shell:registerTab', 'tab': 'shell:registerTab',
|
|
59
|
-
'registerPanel': 'shell:registerPanel', 'panel': 'shell:registerPanel', 'registerSidebar': 'shell:registerSidebar', 'sidebar': 'shell:registerSidebar',
|
|
60
|
-
'registerStatusBar': 'shell:registerStatusBar', 'statusbar': 'shell:registerStatusBar', 'registerTopBar': 'shell:registerTopBar', 'topbar': 'shell:registerTopBar',
|
|
61
|
-
'registerAction': 'shell:registerAction', 'command': 'shell:registerAction', 'toggleSidebar': 'shell:toggleSidebar', 'togglePanel': 'shell:togglePanel',
|
|
62
|
-
'splitPane': 'shell:splitPane', 'focusTab': 'shell:focusTab', 'closeTab': 'shell:closeTab', 'setTheme': 'shell:setTheme', 'theme': 'shell:setTheme',
|
|
63
|
-
'applyPalette': 'shell:applyPalette', 'palette': 'shell:applyPalette', 'updateToken': 'shell:updateToken', 'token': 'shell:updateToken',
|
|
64
|
-
'notification': 'shell:notification', 'notify': 'shell:notification', 'modal': 'shell:modal', 'execCommand': 'shell:execCommand', 'exec': 'shell:execCommand',
|
|
65
|
-
'shortcut': 'shell:shortcut', 'emitEvent': 'shell:emitEvent', 'emit': 'shell:emitEvent', 'config': 'shell:config', 'shellConfig': 'shell:config',
|
|
66
|
-
};
|
|
67
|
-
const shellActionMap: Record<string, string> = {
|
|
68
|
-
'shell:registerButton': 'registerActivityBarItem', 'shell:registerTab': 'openTab', 'shell:registerPanel': 'registerPanelView',
|
|
69
|
-
'shell:registerSidebar': 'registerSidebarView', 'shell:registerStatusBar': 'registerStatusBarItem', 'shell:registerTopBar': 'registerTopBarItem',
|
|
70
|
-
'shell:registerAction': 'registerCommand', 'shell:toggleSidebar': 'toggleSidebar', 'shell:togglePanel': 'togglePanel',
|
|
71
|
-
'shell:splitPane': 'splitPane', 'shell:focusTab': 'focusTab', 'shell:closeTab': 'closeTab', 'shell:setTheme': 'setTheme',
|
|
72
|
-
'shell:applyPalette': 'applyPalette', 'shell:updateToken': 'updateToken', 'shell:notification': 'showNotification',
|
|
73
|
-
'shell:modal': 'showModal', 'shell:execCommand': 'executeCommand', 'shell:shortcut': 'registerShortcut', 'shell:emitEvent': 'emitEvent', 'shell:config': 'shellConfig',
|
|
74
|
-
};
|
|
75
|
-
let resolvedType = rawType;
|
|
76
|
-
if (cmd === '/shell' && !rawType.startsWith('shell:')) resolvedType = trackMap[rawType] || `shell:${rawType}`;
|
|
77
|
-
else resolvedType = trackMap[rawType] || rawType;
|
|
78
|
-
|
|
79
|
-
const newKf: any = { t: Date.now(), track: resolvedType, position: { x: 200 + Math.random() * 600, y: 100 + Math.random() * 400 }, label, state: label };
|
|
80
|
-
if (resolvedType === 'dialogue') { newKf.speech = label; newKf.actorId = 'assistant'; }
|
|
81
|
-
else if (resolvedType === 'subflow') { newKf.targetBlueprintId = ''; }
|
|
82
|
-
if (resolvedType.startsWith('shell:')) { newKf.track = 'shell'; newKf.type = resolvedType; newKf.shellAction = shellActionMap[resolvedType] || resolvedType.replace('shell:', ''); }
|
|
83
|
-
useTimelineStore.getState().addKeyframe(prototypeBrand, newKf);
|
|
84
|
-
usePlaygroundStore.getState().addLog(`✅ Nodo "${label}" (${resolvedType}) agregado al canvas`, 'success');
|
|
85
|
-
} else if (cmd === '/var') {
|
|
86
|
-
const varName = parts[1]; const varValue = parts.slice(2).join(' ');
|
|
87
|
-
if (varName) { useEngineStore.getState().setVariable(varName, varValue || ''); usePlaygroundStore.getState().addLog(`📊 Variable "${varName}" = "${varValue}"`, 'info'); }
|
|
88
|
-
} else if (cmd === '/export') { handleExport(); }
|
|
89
|
-
else if (cmd === '/ui') {
|
|
90
|
-
const comps = Object.values(useUIComponentStore.getState().components);
|
|
91
|
-
if (parts[1]) {
|
|
92
|
-
const comp = comps.find(c => c.id === parts[1] || c.name.toLowerCase().includes(parts[1].toLowerCase()));
|
|
93
|
-
if (comp) { useTimelineStore.getState().addKeyframe(prototypeBrand, { t: Date.now(), track: 'render' as const, position: { x: 200 + Math.random() * 600, y: 100 + Math.random() * 400 }, label: comp.name, state: comp.name, uiSchema: comp.schema, autoComplete: false }); usePlaygroundStore.getState().addLog(`🖼️ UI Component "${comp.name}" agregado`, 'success'); }
|
|
94
|
-
} else { usePlaygroundStore.getState().addLog(`🎨 UI Components:\n${comps.map(c => `• ${c.name} (${c.source})`).join('\n') || 'Ninguno disponible'}`, 'info'); }
|
|
95
|
-
} else if (cmd === '/clear') {
|
|
96
|
-
useTimelineStore.getState().setDynamicTimelines((prev: any) => ({ ...prev, [prototypeBrand]: { ...prev[prototypeBrand], keyframes: [], edges: [] } }));
|
|
97
|
-
usePlaygroundStore.getState().addLog('🗑️ Canvas limpiado', 'warning');
|
|
98
|
-
} else if (cmd === '/help') {
|
|
99
|
-
usePlaygroundStore.getState().addLog(`📋 Comandos Creator:\n${CREATOR_COMMANDS.map(c => `${c.cmd} ${c.args} — ${c.desc}`).join('\n')}`, 'info');
|
|
100
|
-
} else { return false; }
|
|
101
|
-
setInputValue('');
|
|
102
|
-
return true;
|
|
103
|
-
}, [inputValue, prototypeBrand, handleExport, setInputValue]);
|
|
104
|
-
|
|
105
|
-
const handleCreatorSubmit = useCallback(() => { inputValue.startsWith('/') ? handleCreatorSlash() : handleGeneratePlayground(); }, [inputValue, handleCreatorSlash, handleGeneratePlayground]);
|
|
106
|
-
|
|
107
|
-
const handleCreatorKeyDown = useCallback((e: React.KeyboardEvent) => {
|
|
108
|
-
if (slashOpen) {
|
|
109
|
-
if (e.key === 'ArrowDown') { e.preventDefault(); setSlashIdx(i => Math.min(i + 1, filteredCmds.length - 1)); }
|
|
110
|
-
else if (e.key === 'ArrowUp') { e.preventDefault(); setSlashIdx(i => Math.max(i - 1, 0)); }
|
|
111
|
-
else if (e.key === 'Enter' && filteredCmds[slashIdx]) { e.preventDefault(); setInputValue(filteredCmds[slashIdx].cmd + ' '); setSlashOpen(false); return; }
|
|
112
|
-
else if (e.key === 'Escape') { setSlashOpen(false); return; }
|
|
113
|
-
}
|
|
114
|
-
if (e.key === 'Enter' && !slashOpen && !isGenerating) handleCreatorSubmit();
|
|
115
|
-
}, [slashOpen, slashIdx, filteredCmds, isGenerating, handleCreatorSubmit, setInputValue]);
|
|
116
|
-
|
|
117
|
-
return (
|
|
118
|
-
<div className="relative">
|
|
119
|
-
<AnimatePresence>
|
|
120
|
-
{slashOpen && (
|
|
121
|
-
<motion.div initial={{ opacity: 0, y: 8 }} animate={{ opacity: 1, y: 0 }} exit={{ opacity: 0, y: 8 }} className="absolute bottom-full left-0 mb-2 w-full bg-surface-secondary/95 backdrop-blur-xl border border-border-default rounded-xl shadow-2xl shadow-black/50 overflow-hidden z-50">
|
|
122
|
-
<div className="px-3 py-1.5 border-b border-border-subtle"><span className="text-[9px] font-bold text-text-muted uppercase tracking-widest">/ Comandos Creator</span></div>
|
|
123
|
-
<div className="max-h-[200px] overflow-y-auto py-1">
|
|
124
|
-
{filteredCmds.map((c, i) => (
|
|
125
|
-
<button key={c.cmd} onClick={() => { setInputValue(c.cmd + ' '); setSlashOpen(false); }} className={`w-full flex items-center gap-2.5 px-3 py-2 text-xs transition-colors ${i === slashIdx ? 'bg-purple-500/15 text-text-primary' : 'text-text-secondary hover:text-text-primary hover:bg-surface-glass'}`}>
|
|
126
|
-
{c.icon}<span className="font-mono font-bold text-purple-300">{c.cmd}</span><span className="text-text-muted font-mono">{c.args}</span><span className="ml-auto text-[10px] text-text-muted truncate max-w-[150px]">{c.desc}</span>
|
|
127
|
-
</button>
|
|
128
|
-
))}
|
|
129
|
-
</div>
|
|
130
|
-
</motion.div>
|
|
131
|
-
)}
|
|
132
|
-
</AnimatePresence>
|
|
133
|
-
<div className="flex items-center gap-2 sm:gap-3 w-full bg-surface-overlay p-1.5 sm:p-2 rounded-xl border border-border-subtle focus-within:border-cyan-500/30 transition-colors mt-2">
|
|
134
|
-
<Wand2 size={20} className="text-purple-400 ml-2" />
|
|
135
|
-
<input type="text" placeholder="Escribe / para comandos, o un prompt AI..." value={inputValue} onChange={(e) => setInputValue(e.target.value)} onKeyDown={handleCreatorKeyDown} className="w-full bg-transparent text-text-primary placeholder-text-muted outline-hidden text-sm h-10" />
|
|
136
|
-
<button onClick={handleCreatorSubmit} disabled={isGenerating} className="px-3 sm:px-4 py-2 rounded-lg font-bold text-xs sm:text-sm transition-colors disabled:opacity-50 min-w-[70px] sm:min-w-[100px] flex justify-center items-center bg-purple-500/20 text-purple-400 hover:bg-purple-500/30">
|
|
137
|
-
{isGenerating ? <Clock size={16} className="animate-spin" /> : "Enviar"}
|
|
138
|
-
</button>
|
|
139
|
-
<div className="w-px h-6 bg-surface-glass mx-1"></div>
|
|
140
|
-
<button onClick={() => setIsVoiceActive(true)} className="w-10 h-10 rounded-full flex items-center justify-center border transition-all shadow-[0_0_15px_rgba(6,182,212,0.15)] text-purple-400 bg-purple-500/10 border-purple-500/20 hover:bg-purple-500/20"><Mic size={18} /></button>
|
|
141
|
-
</div>
|
|
142
|
-
</div>
|
|
143
|
-
);
|
|
144
|
-
});
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
Layers, Terminal, Volume2, VolumeX,
|
|
4
|
-
Minimize, Maximize, FolderOpen, TreePine
|
|
5
|
-
} from 'lucide-react';
|
|
6
|
-
import { useTimelineStore } from '@decido/engine';
|
|
7
|
-
import { usePlaygroundStore } from '../../store/usePlaygroundStore';
|
|
8
|
-
|
|
9
|
-
interface OSToolbarProps {
|
|
10
|
-
dynamicTimelines: any;
|
|
11
|
-
prototypeBrand: string;
|
|
12
|
-
showCanvas: boolean;
|
|
13
|
-
setShowCanvas: (show: boolean) => void;
|
|
14
|
-
isTerminalOpen: boolean;
|
|
15
|
-
setIsTerminalOpen: (open: boolean) => void;
|
|
16
|
-
isMuted: boolean;
|
|
17
|
-
setIsMuted: (muted: boolean) => void;
|
|
18
|
-
selectedVoice: string;
|
|
19
|
-
setSelectedVoice: (voice: string) => void;
|
|
20
|
-
isFullscreen: boolean;
|
|
21
|
-
toggleFullscreen: () => void;
|
|
22
|
-
handleExport: () => void;
|
|
23
|
-
config: any;
|
|
24
|
-
isBlueprintManagerOpen: boolean;
|
|
25
|
-
setIsBlueprintManagerOpen: (open: boolean) => void;
|
|
26
|
-
isTreeOpen: boolean;
|
|
27
|
-
setIsTreeOpen: (open: boolean) => void;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export const OSToolbar = React.memo(function OSToolbar({
|
|
31
|
-
dynamicTimelines, prototypeBrand, showCanvas, setShowCanvas,
|
|
32
|
-
isTerminalOpen, setIsTerminalOpen, isMuted, setIsMuted,
|
|
33
|
-
selectedVoice, setSelectedVoice, isFullscreen, toggleFullscreen,
|
|
34
|
-
handleExport, config, isBlueprintManagerOpen, setIsBlueprintManagerOpen,
|
|
35
|
-
isTreeOpen, setIsTreeOpen
|
|
36
|
-
}: OSToolbarProps) {
|
|
37
|
-
return (
|
|
38
|
-
<div className="flex w-full overflow-x-auto custom-scrollbar pb-2 sm:pb-3 pt-1 mt-1 items-center justify-between gap-2 sm:gap-4">
|
|
39
|
-
<div className="flex items-center gap-1.5 sm:gap-2 min-w-max">
|
|
40
|
-
<button onClick={() => setIsBlueprintManagerOpen(!isBlueprintManagerOpen)} className="bg-surface-secondary hover:bg-surface-tertiary border border-border-default rounded-lg text-xs font-medium text-text-primary px-3 py-2 outline-hidden cursor-pointer hover:border-cyan-400/50 transition-colors flex items-center gap-2">
|
|
41
|
-
<FolderOpen size={14} className="text-cyan-400" />
|
|
42
|
-
<span className="max-w-[120px] truncate">{(dynamicTimelines[prototypeBrand] as any)?.name || prototypeBrand}</span>
|
|
43
|
-
<span className="text-[10px] text-text-muted font-mono">{(dynamicTimelines[prototypeBrand] as any)?.keyframes?.length || 0}</span>
|
|
44
|
-
</button>
|
|
45
|
-
<button onClick={() => setIsTreeOpen(!isTreeOpen)} className="bg-surface-secondary hover:bg-surface-tertiary border border-border-default rounded-lg text-xs font-medium text-text-primary px-2.5 py-2 outline-hidden cursor-pointer hover:border-emerald-400/50 transition-colors flex items-center gap-1.5" title="Jerarquía de dependencias">
|
|
46
|
-
<TreePine size={14} className="text-emerald-400" />
|
|
47
|
-
</button>
|
|
48
|
-
<div className="w-px h-6 bg-surface-glass mx-1"></div>
|
|
49
|
-
<button onClick={() => setShowCanvas(!showCanvas)} className={`px-3 py-2 rounded-lg transition-all text-xs font-medium flex items-center gap-2 shrink-0 ${showCanvas ? 'text-text-primary bg-surface-glass' : 'text-text-secondary hover:text-cyan-400 hover:bg-surface-glass border border-transparent'}`} title="Panel 3D / Diagrama">
|
|
50
|
-
<Layers size={14} /> <span className="hidden sm:inline">Visualizador</span>
|
|
51
|
-
</button>
|
|
52
|
-
<button onClick={() => setIsTerminalOpen(!isTerminalOpen)} className={`px-3 py-2 rounded-lg transition-all text-xs font-medium flex items-center gap-2 shrink-0 ${isTerminalOpen ? 'text-text-primary bg-surface-glass' : 'text-text-secondary hover:text-purple-400 hover:bg-surface-glass border border-transparent'}`} title="Panel de Logs">
|
|
53
|
-
<Terminal size={14} /> <span className="hidden sm:inline">Logs OS</span>
|
|
54
|
-
</button>
|
|
55
|
-
<div className="w-px h-6 bg-surface-glass mx-1"></div>
|
|
56
|
-
<button onClick={() => setIsMuted(!isMuted)} className={`px-3 py-2 rounded-lg transition-all text-xs font-medium flex items-center justify-center shrink-0 ${!isMuted ? 'text-text-primary bg-surface-glass' : 'text-text-muted hover:text-red-400 hover:bg-surface-glass border border-transparent'}`} title={isMuted ? "Activar Audio" : "Silenciar"}>
|
|
57
|
-
{!isMuted ? <Volume2 size={16} /> : <VolumeX size={16} />}
|
|
58
|
-
</button>
|
|
59
|
-
<select value={selectedVoice} onChange={(e) => setSelectedVoice(e.target.value)} className="bg-surface-secondary hover:bg-surface-tertiary border border-border-default rounded-lg text-xs font-medium text-text-primary px-3 py-2 outline-hidden cursor-pointer focus:border-cyan-400 transition-colors">
|
|
60
|
-
{config?.voices?.map((v: string) => <option key={v} value={v}>Voz: {v}</option>)}
|
|
61
|
-
</select>
|
|
62
|
-
<button onClick={toggleFullscreen} className="px-3 py-2 rounded-lg transition-all text-xs font-medium flex items-center justify-center shrink-0 text-text-muted hover:text-text-primary hover:bg-surface-glass border border-transparent" title="Pantalla Completa">
|
|
63
|
-
{isFullscreen ? <Minimize size={16} /> : <Maximize size={16} />}
|
|
64
|
-
</button>
|
|
65
|
-
</div>
|
|
66
|
-
<div className="flex items-center gap-2 sm:gap-3 shrink-0 pr-1">
|
|
67
|
-
<label className="flex items-center gap-2 shrink-0 px-4 py-2 rounded-xl font-medium text-sm transition-colors border bg-cyan-500/10 text-cyan-500 hover:bg-cyan-500/20 border-transparent cursor-pointer" title="Importar DSD">
|
|
68
|
-
<Layers size={16} /> <span className="hidden sm:inline">Importar DSD</span>
|
|
69
|
-
<input type="file" accept=".dsd,.json" className="hidden" onChange={(e) => {
|
|
70
|
-
const file = e.target.files?.[0]; if (!file) return;
|
|
71
|
-
const reader = new FileReader();
|
|
72
|
-
reader.onload = (ev) => {
|
|
73
|
-
try {
|
|
74
|
-
const json = JSON.parse(ev.target?.result as string);
|
|
75
|
-
if (json.format === 'decido-standard-document' && json.blueprint) {
|
|
76
|
-
useTimelineStore.getState().setDynamicTimelines((prev: any) => ({ ...prev, [json.brand || prototypeBrand]: json.blueprint }));
|
|
77
|
-
usePlaygroundStore.getState().addLog(`Se ha importado el blueprint de ${json.brand} (${json.blueprint.keyframes.length} nodos)`, 'success');
|
|
78
|
-
} else { usePlaygroundStore.getState().addLog("El archivo no es un DSD válido.", "error"); }
|
|
79
|
-
} catch { usePlaygroundStore.getState().addLog("Error al parsear archivo DSD.", "error"); }
|
|
80
|
-
};
|
|
81
|
-
reader.readAsText(file); e.target.value = '';
|
|
82
|
-
}} />
|
|
83
|
-
</label>
|
|
84
|
-
<button onClick={handleExport} className="flex items-center gap-2 shrink-0 px-4 py-2 rounded-xl font-medium text-sm transition-colors border bg-purple-500/10 text-purple-400 hover:bg-purple-500/20 border-transparent" title="Exportar DSD">
|
|
85
|
-
<Layers size={16} /> <span className="hidden sm:inline">Exportar DSD</span>
|
|
86
|
-
</button>
|
|
87
|
-
</div>
|
|
88
|
-
</div>
|
|
89
|
-
);
|
|
90
|
-
});
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Pause, Play, RotateCcw } from 'lucide-react';
|
|
3
|
-
|
|
4
|
-
interface TimelineTapeProps {
|
|
5
|
-
currentTime: number;
|
|
6
|
-
seekTime: (time: number) => void;
|
|
7
|
-
playbackSpeed: number;
|
|
8
|
-
setPlaybackSpeed: (speed: number) => void;
|
|
9
|
-
isPlaying: boolean;
|
|
10
|
-
setIsPlaying: (playing: boolean) => void;
|
|
11
|
-
handleResetPlayground: () => void;
|
|
12
|
-
currentTimeline: any;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const TimelineTape = React.memo(function TimelineTape({
|
|
16
|
-
currentTime, seekTime, playbackSpeed, setPlaybackSpeed,
|
|
17
|
-
isPlaying, setIsPlaying, handleResetPlayground, currentTimeline
|
|
18
|
-
}: TimelineTapeProps) {
|
|
19
|
-
return (
|
|
20
|
-
<div className="flex items-center gap-3 w-full bg-surface-overlay p-2 rounded-xl border border-border-subtle">
|
|
21
|
-
<span className="text-xs font-mono text-text-secondary w-10 text-right">{currentTime.toFixed(1)}s</span>
|
|
22
|
-
<div className="relative flex-1 h-6 flex items-center group cursor-pointer">
|
|
23
|
-
<div className="absolute w-full h-1.5 bg-surface-glass rounded-full overflow-hidden group-hover:bg-surface-glass transition-colors">
|
|
24
|
-
<div className="h-full bg-purple-500/50 group-hover:bg-purple-400 transition-colors" style={{ width: `${(currentTime / Math.max(currentTimeline.duration, 1)) * 100}%` }}></div>
|
|
25
|
-
</div>
|
|
26
|
-
<input type="range" min="0" max={currentTimeline.duration} step="0.1" value={currentTime} onChange={(e) => seekTime(parseFloat(e.target.value))} className="absolute w-full h-full opacity-0 cursor-pointer z-20" />
|
|
27
|
-
{currentTimeline.keyframes.map((kf: any, i: number) => (
|
|
28
|
-
<div key={i} className="absolute top-1/2 -translate-y-1/2 w-2 h-2 rounded-full border border-[#1e1e1f] z-10 pointer-events-none transition-all group-hover:scale-125"
|
|
29
|
-
style={{ left: `calc(${(kf.t / currentTimeline.duration) * 100}% - 4px)`, backgroundColor: currentTime >= kf.t ? '#a855f7' : '#52525b' }}>
|
|
30
|
-
</div>
|
|
31
|
-
))}
|
|
32
|
-
</div>
|
|
33
|
-
<span className="text-xs font-mono text-text-muted w-10">{currentTimeline.duration.toFixed(1)}s</span>
|
|
34
|
-
<div className="flex gap-1 border-l border-border-default pl-2 ml-1">
|
|
35
|
-
<button onClick={() => setIsPlaying(!isPlaying)} className="w-8 h-8 rounded-lg bg-surface-glass hover:bg-purple-500/20 text-text-primary flex items-center justify-center transition-colors">
|
|
36
|
-
{isPlaying ? <Pause size={14} /> : <Play size={14} className="ml-0.5" />}
|
|
37
|
-
</button>
|
|
38
|
-
<button onClick={() => setPlaybackSpeed(playbackSpeed === 1 ? 2 : 1)} className="w-8 h-8 rounded-lg hover:bg-surface-glass text-text-secondary flex items-center justify-center transition-colors text-[10px] font-bold">{playbackSpeed}x</button>
|
|
39
|
-
<button onClick={handleResetPlayground} className="w-8 h-8 rounded-lg hover:bg-surface-glass text-text-secondary flex items-center justify-center transition-colors" title="Rewind & Reset Engine"><RotateCcw size={14} /></button>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
);
|
|
43
|
-
});
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import React, { useMemo, useRef, useEffect } from 'react';
|
|
2
|
-
import { Clock, Pause, Play, RotateCcw, Search } from 'lucide-react';
|
|
3
|
-
import { useActionTimelineStore, type TimelineEvent } from '../../store/useActionTimelineStore';
|
|
4
|
-
|
|
5
|
-
const STORE_COLORS: Record<string, string> = {
|
|
6
|
-
morph: 'border-l-violet-500 bg-violet-500/5',
|
|
7
|
-
layout: 'border-l-emerald-500 bg-emerald-500/5',
|
|
8
|
-
gemini: 'border-l-blue-500 bg-blue-500/5',
|
|
9
|
-
chat: 'border-l-cyan-500 bg-cyan-500/5',
|
|
10
|
-
store: 'border-l-amber-500 bg-amber-500/5',
|
|
11
|
-
engine: 'border-l-orange-500 bg-orange-500/5',
|
|
12
|
-
network: 'border-l-teal-500 bg-teal-500/5',
|
|
13
|
-
shell: 'border-l-pink-500 bg-pink-500/5',
|
|
14
|
-
system: 'border-l-text-muted bg-surface-glass',
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
const STORE_BADGES: Record<string, string> = {
|
|
18
|
-
morph: 'bg-violet-500/20 text-violet-400',
|
|
19
|
-
layout: 'bg-emerald-500/20 text-emerald-400',
|
|
20
|
-
gemini: 'bg-blue-500/20 text-blue-400',
|
|
21
|
-
chat: 'bg-cyan-500/20 text-cyan-400',
|
|
22
|
-
store: 'bg-amber-500/20 text-amber-400',
|
|
23
|
-
engine: 'bg-orange-500/20 text-orange-400',
|
|
24
|
-
network: 'bg-teal-500/20 text-teal-400',
|
|
25
|
-
shell: 'bg-pink-500/20 text-pink-400',
|
|
26
|
-
system: 'bg-surface-glass text-text-secondary',
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
function TimelineCard({ event }: { event: TimelineEvent }) {
|
|
30
|
-
const colors = STORE_COLORS[event.storeName] || 'border-l-text-muted bg-surface-glass';
|
|
31
|
-
const badge = STORE_BADGES[event.storeName] || 'bg-surface-glass text-text-secondary';
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<div className={`border-l-2 ${colors} px-3 py-1.5 hover:bg-surface-glass transition-colors`}>
|
|
35
|
-
<div className="flex items-center gap-2 text-[10px]">
|
|
36
|
-
<span className="text-text-muted font-mono shrink-0 w-[65px]">{event.timestamp}</span>
|
|
37
|
-
<span className={`px-1.5 py-0.5 rounded text-[8px] font-bold uppercase tracking-wider ${badge}`}>{event.storeName}</span>
|
|
38
|
-
<span className="font-semibold text-text-primary truncate">{event.actionName}</span>
|
|
39
|
-
{event.level === 'warn' && <span className="text-[8px] text-amber-400">⚠</span>}
|
|
40
|
-
{event.level === 'error' && <span className="text-[8px] text-red-400">✕</span>}
|
|
41
|
-
</div>
|
|
42
|
-
{event.data && (
|
|
43
|
-
<div className="mt-0.5 text-[9px] text-text-muted font-mono truncate max-w-full">
|
|
44
|
-
{typeof event.data === 'object' ? JSON.stringify(event.data) : String(event.data)}
|
|
45
|
-
</div>
|
|
46
|
-
)}
|
|
47
|
-
</div>
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export function ActionTimelineTab() {
|
|
52
|
-
const events = useActionTimelineStore(s => s.events);
|
|
53
|
-
const isPaused = useActionTimelineStore(s => s.isPaused);
|
|
54
|
-
const filter = useActionTimelineStore(s => s.filter);
|
|
55
|
-
const { clear, togglePause, setFilter } = useActionTimelineStore();
|
|
56
|
-
const scrollRef = useRef<HTMLDivElement>(null);
|
|
57
|
-
|
|
58
|
-
const filtered = useMemo(() => {
|
|
59
|
-
if (!filter) return events;
|
|
60
|
-
const q = filter.toLowerCase();
|
|
61
|
-
return events.filter(e =>
|
|
62
|
-
e.storeName.includes(q) || e.actionName.toLowerCase().includes(q)
|
|
63
|
-
);
|
|
64
|
-
}, [events, filter]);
|
|
65
|
-
|
|
66
|
-
// Auto-scroll
|
|
67
|
-
useEffect(() => {
|
|
68
|
-
if (!isPaused && scrollRef.current) {
|
|
69
|
-
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
70
|
-
}
|
|
71
|
-
}, [filtered, isPaused]);
|
|
72
|
-
|
|
73
|
-
return (
|
|
74
|
-
<div className="flex flex-col h-full">
|
|
75
|
-
{/* Toolbar */}
|
|
76
|
-
<div className="flex items-center gap-2 px-3 py-1.5 border-b border-border-subtle shrink-0">
|
|
77
|
-
<Clock size={12} className="text-amber-400" />
|
|
78
|
-
<span className="text-[10px] font-bold text-text-secondary uppercase tracking-widest">Timeline</span>
|
|
79
|
-
<span className="text-[9px] text-text-muted font-mono">{filtered.length}/{events.length}</span>
|
|
80
|
-
{isPaused && <span className="px-1.5 py-0.5 rounded text-[8px] font-bold bg-amber-500/20 text-amber-400 animate-pulse">PAUSADO</span>}
|
|
81
|
-
<div className="flex-1" />
|
|
82
|
-
<div className="flex items-center bg-surface-secondary border border-border-default rounded px-1.5 gap-1">
|
|
83
|
-
<Search size={10} className="text-text-muted" />
|
|
84
|
-
<input
|
|
85
|
-
value={filter}
|
|
86
|
-
onChange={e => setFilter(e.target.value)}
|
|
87
|
-
placeholder="Filtrar..."
|
|
88
|
-
className="bg-transparent text-[9px] text-text-primary outline-hidden w-24 py-0.5"
|
|
89
|
-
/>
|
|
90
|
-
</div>
|
|
91
|
-
<button onClick={togglePause} className={`p-1 rounded transition-colors ${isPaused ? 'bg-amber-500/10 text-amber-400' : 'text-text-muted hover:text-text-secondary hover:bg-surface-glass'}`} title={isPaused ? 'Reanudar' : 'Pausar'}>
|
|
92
|
-
{isPaused ? <Play size={10} /> : <Pause size={10} />}
|
|
93
|
-
</button>
|
|
94
|
-
<button onClick={clear} className="p-0.5 rounded hover:bg-surface-glass text-text-muted hover:text-text-secondary" title="Limpiar">
|
|
95
|
-
<RotateCcw size={10} />
|
|
96
|
-
</button>
|
|
97
|
-
</div>
|
|
98
|
-
|
|
99
|
-
{/* Timeline */}
|
|
100
|
-
<div ref={scrollRef} className="flex-1 overflow-y-auto custom-scrollbar">
|
|
101
|
-
{filtered.length === 0 ? (
|
|
102
|
-
<div className="flex items-center justify-center h-full text-text-muted text-[10px] italic">
|
|
103
|
-
{events.length === 0 ? 'Esperando acciones...' : 'Sin resultados para el filtro'}
|
|
104
|
-
</div>
|
|
105
|
-
) : (
|
|
106
|
-
filtered.map(evt => <TimelineCard key={evt.id} event={evt} />)
|
|
107
|
-
)}
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
);
|
|
111
|
-
}
|