@decido/shell 1.0.0 → 4.0.2

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 (209) hide show
  1. package/README.md +31 -0
  2. package/package.json +27 -18
  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/index.ts +0 -97
  181. package/src/lib/debugLogger.ts +0 -80
  182. package/src/lib/networkInterceptor.ts +0 -100
  183. package/src/mocks/decido.tsx +0 -41
  184. package/src/plugins/pluginAPI.ts +0 -190
  185. package/src/store/McpStore.ts +0 -69
  186. package/src/store/UpdaterStore.ts +0 -60
  187. package/src/store/engine.ts +0 -392
  188. package/src/store/index.ts +0 -4
  189. package/src/store/layoutPresets.ts +0 -66
  190. package/src/store/playgroundTypes.ts +0 -98
  191. package/src/store/useActionTimelineStore.ts +0 -48
  192. package/src/store/useDebugPanelStore.ts +0 -98
  193. package/src/store/useDebugProfileStore.ts +0 -130
  194. package/src/store/useLayoutStore.ts +0 -205
  195. package/src/store/useMorphInstanceStore.ts +0 -289
  196. package/src/store/useMorphologyStore.ts +0 -103
  197. package/src/store/usePlaygroundStore.ts +0 -236
  198. package/src/store/useShellRegistry.ts +0 -123
  199. package/src/store/useSuggestionsStore.ts +0 -57
  200. package/src/store/useThemeStore.ts +0 -399
  201. package/src/store/useUIComponentStore.ts +0 -179
  202. package/src/types/DecidoStoryDefinition.ts +0 -43
  203. package/src/utils/ai/ai-architect.ts +0 -92
  204. package/src/utils/ai/ai-code.ts +0 -187
  205. package/src/utils/ai/ai-core.ts +0 -50
  206. package/src/utils/ai/ai-media.ts +0 -292
  207. package/src/utils/layoutGraph.ts +0 -67
  208. package/tsconfig.json +0 -17
  209. package/tsconfig.tsbuildinfo +0 -1
@@ -1,82 +0,0 @@
1
- import React from 'react';
2
- import { NodeProps } from '@xyflow/react';
3
- import { Bell, SquareStack, Play, Keyboard, Radio } from 'lucide-react';
4
- import { ShellNodeBase, ShellField } from './ShellNodeBase';
5
- import { useTimelineStore } from '@decido/engine';
6
- import { usePlaygroundStore } from '../../../../store/usePlaygroundStore';
7
-
8
- // ─── Show Notification ───
9
- export const ShowNotificationNode: React.FC<NodeProps> = ({ id, data }) => {
10
- const activeTimelineId = usePlaygroundStore(s => s.prototypeBrand);
11
- const updateKeyframe = useTimelineStore(s => s.updateKeyframe);
12
- const u = (field: string, val: any) => updateKeyframe(activeTimelineId, id, { [field]: val } as any);
13
-
14
- return (
15
- <ShellNodeBase id={id} label="Notification" icon={<Bell size={14} />} accentColor="emerald" isExecuting={data.isExecuting as boolean}>
16
- <ShellField label="Tipo" value={(data.shellNotifType as string) || 'info'} onChange={v => u('shellNotifType', v)} type="select"
17
- options={[
18
- { value: 'info', label: 'ℹ️ Info' }, { value: 'success', label: '✅ Success' },
19
- { value: 'warning', label: '⚠️ Warning' }, { value: 'error', label: '❌ Error' }
20
- ]} />
21
- <ShellField label="Título" value={(data.shellNotifTitle as string) || ''} onChange={v => u('shellNotifTitle', v)} placeholder="Operación exitosa" />
22
- <ShellField label="Mensaje" value={(data.shellNotifMessage as string) || ''} onChange={v => u('shellNotifMessage', v)} placeholder="Los cambios se guardaron" />
23
- </ShellNodeBase>
24
- );
25
- };
26
-
27
- // ─── Show Modal ───
28
- export const ShowModalNode: React.FC<NodeProps> = ({ id, data }) => {
29
- const activeTimelineId = usePlaygroundStore(s => s.prototypeBrand);
30
- const updateKeyframe = useTimelineStore(s => s.updateKeyframe);
31
- const u = (field: string, val: any) => updateKeyframe(activeTimelineId, id, { [field]: val } as any);
32
-
33
- return (
34
- <ShellNodeBase id={id} label="Show Modal" icon={<SquareStack size={14} />} accentColor="violet" isExecuting={data.isExecuting as boolean}>
35
- <ShellField label="Título" value={(data.shellModalTitle as string) || ''} onChange={v => u('shellModalTitle', v)} placeholder="Confirmación" />
36
- <ShellField label="Contenido HTML" value={(data.shellModalContent as string) || ''} onChange={v => u('shellModalContent', v)} placeholder="<p>¿Estás seguro?</p>" />
37
- </ShellNodeBase>
38
- );
39
- };
40
-
41
- // ─── Execute Command ───
42
- export const ExecuteCommandNode: React.FC<NodeProps> = ({ id, data }) => {
43
- const activeTimelineId = usePlaygroundStore(s => s.prototypeBrand);
44
- const updateKeyframe = useTimelineStore(s => s.updateKeyframe);
45
- const u = (field: string, val: any) => updateKeyframe(activeTimelineId, id, { [field]: val } as any);
46
-
47
- return (
48
- <ShellNodeBase id={id} label="Exec Command" icon={<Play size={14} />} accentColor="teal" isExecuting={data.isExecuting as boolean}>
49
- <ShellField label="Command ID" value={(data.shellCommandId as string) || ''} onChange={v => u('shellCommandId', v)} placeholder="palette.toggle" />
50
- <ShellField label="Argumento (JSON)" value={(data.shellCommandArg as string) || ''} onChange={v => u('shellCommandArg', v)} placeholder='{"key": "value"}' />
51
- </ShellNodeBase>
52
- );
53
- };
54
-
55
- // ─── Register Shortcut ───
56
- export const RegisterShortcutNode: React.FC<NodeProps> = ({ id, data }) => {
57
- const activeTimelineId = usePlaygroundStore(s => s.prototypeBrand);
58
- const updateKeyframe = useTimelineStore(s => s.updateKeyframe);
59
- const u = (field: string, val: any) => updateKeyframe(activeTimelineId, id, { [field]: val } as any);
60
-
61
- return (
62
- <ShellNodeBase id={id} label="Shortcut" icon={<Keyboard size={14} />} accentColor="amber" isExecuting={data.isExecuting as boolean}>
63
- <ShellField label="Keys" value={(data.shellKeys as string) || ''} onChange={v => u('shellKeys', v)} placeholder="Control+Shift+P" />
64
- <ShellField label="Command ID" value={(data.shellCommandId as string) || ''} onChange={v => u('shellCommandId', v)} placeholder="palette.toggle" />
65
- <ShellField label="Descripción" value={(data.shellShortcutDesc as string) || ''} onChange={v => u('shellShortcutDesc', v)} placeholder="Abrir paleta" />
66
- </ShellNodeBase>
67
- );
68
- };
69
-
70
- // ─── Emit Event ───
71
- export const EmitEventNode: React.FC<NodeProps> = ({ id, data }) => {
72
- const activeTimelineId = usePlaygroundStore(s => s.prototypeBrand);
73
- const updateKeyframe = useTimelineStore(s => s.updateKeyframe);
74
- const u = (field: string, val: any) => updateKeyframe(activeTimelineId, id, { [field]: val } as any);
75
-
76
- return (
77
- <ShellNodeBase id={id} label="Emit Event" icon={<Radio size={14} />} accentColor="rose" isExecuting={data.isExecuting as boolean}>
78
- <ShellField label="Evento" value={(data.shellEventName as string) || ''} onChange={v => u('shellEventName', v)} placeholder="app:customEvent" />
79
- <ShellField label="Data (JSON)" value={(data.shellEventData as string) || ''} onChange={v => u('shellEventData', v)} placeholder='{"msg": "hello"}' />
80
- </ShellNodeBase>
81
- );
82
- };
@@ -1,69 +0,0 @@
1
- import React from 'react';
2
- import { NodeProps } from '@xyflow/react';
3
- import { PanelLeftClose, PanelBottomClose, Columns2, Focus, X } from 'lucide-react';
4
- import { ShellNodeBase, ShellField } from './ShellNodeBase';
5
- import { useTimelineStore } from '@decido/engine';
6
- import { usePlaygroundStore } from '../../../../store/usePlaygroundStore';
7
-
8
- // ─── Toggle Sidebar ───
9
- export const ToggleSidebarNode: React.FC<NodeProps> = ({ id, data }) => {
10
- const activeTimelineId = usePlaygroundStore(s => s.prototypeBrand);
11
- const updateKeyframe = useTimelineStore(s => s.updateKeyframe);
12
- const u = (field: string, val: any) => updateKeyframe(activeTimelineId, id, { [field]: val } as any);
13
-
14
- return (
15
- <ShellNodeBase id={id} label="Toggle Sidebar" icon={<PanelLeftClose size={14} />} accentColor="sky" isExecuting={data.isExecuting as boolean}>
16
- <ShellField label="Estado" value={(data.shellVisible as string) || 'toggle'} onChange={v => u('shellVisible', v)} type="select"
17
- options={[{ value: 'toggle', label: '↔ Toggle' }, { value: 'true', label: '👁 Mostrar' }, { value: 'false', label: '🚫 Ocultar' }]} />
18
- </ShellNodeBase>
19
- );
20
- };
21
-
22
- // ─── Toggle Panel ───
23
- export const TogglePanelNode: React.FC<NodeProps> = ({ id, data }) => {
24
- const activeTimelineId = usePlaygroundStore(s => s.prototypeBrand);
25
- const updateKeyframe = useTimelineStore(s => s.updateKeyframe);
26
- const u = (field: string, val: any) => updateKeyframe(activeTimelineId, id, { [field]: val } as any);
27
-
28
- return (
29
- <ShellNodeBase id={id} label="Toggle Panel" icon={<PanelBottomClose size={14} />} accentColor="indigo" isExecuting={data.isExecuting as boolean}>
30
- <ShellField label="Estado" value={(data.shellVisible as string) || 'toggle'} onChange={v => u('shellVisible', v)} type="select"
31
- options={[{ value: 'toggle', label: '↔ Toggle' }, { value: 'true', label: '👁 Mostrar' }, { value: 'false', label: '🚫 Ocultar' }]} />
32
- </ShellNodeBase>
33
- );
34
- };
35
-
36
- // ─── Split Pane ───
37
- export const SplitPaneNode: React.FC<NodeProps> = ({ id, data }) => (
38
- <ShellNodeBase id={id} label="Split Pane" icon={<Columns2 size={14} />} accentColor="violet" isExecuting={data.isExecuting as boolean}>
39
- <div className="text-[10px] text-text-muted italic">Divide el editor en un nuevo panel</div>
40
- </ShellNodeBase>
41
- );
42
-
43
- // ─── Focus Tab ───
44
- export const FocusTabNode: React.FC<NodeProps> = ({ id, data }) => {
45
- const activeTimelineId = usePlaygroundStore(s => s.prototypeBrand);
46
- const updateKeyframe = useTimelineStore(s => s.updateKeyframe);
47
- const u = (field: string, val: any) => updateKeyframe(activeTimelineId, id, { [field]: val } as any);
48
-
49
- return (
50
- <ShellNodeBase id={id} label="Focus Tab" icon={<Focus size={14} />} accentColor="cyan" isExecuting={data.isExecuting as boolean}>
51
- <ShellField label="Pane ID" value={(data.shellPaneId as string) || ''} onChange={v => u('shellPaneId', v)} placeholder="pane-main" />
52
- <ShellField label="Tab ID" value={(data.shellTabId as string) || ''} onChange={v => u('shellTabId', v)} placeholder="settings-tab" />
53
- </ShellNodeBase>
54
- );
55
- };
56
-
57
- // ─── Close Tab ───
58
- export const CloseTabNode: React.FC<NodeProps> = ({ id, data }) => {
59
- const activeTimelineId = usePlaygroundStore(s => s.prototypeBrand);
60
- const updateKeyframe = useTimelineStore(s => s.updateKeyframe);
61
- const u = (field: string, val: any) => updateKeyframe(activeTimelineId, id, { [field]: val } as any);
62
-
63
- return (
64
- <ShellNodeBase id={id} label="Close Tab" icon={<X size={14} />} accentColor="rose" isExecuting={data.isExecuting as boolean}>
65
- <ShellField label="Pane ID" value={(data.shellPaneId as string) || ''} onChange={v => u('shellPaneId', v)} placeholder="pane-main" />
66
- <ShellField label="Tab ID" value={(data.shellTabId as string) || ''} onChange={v => u('shellTabId', v)} placeholder="settings-tab" />
67
- </ShellNodeBase>
68
- );
69
- };
@@ -1,20 +0,0 @@
1
- import React from 'react';
2
- import { NodeProps } from '@xyflow/react';
3
- import { Terminal } from 'lucide-react';
4
- import { ShellNodeBase, ShellField } from './ShellNodeBase';
5
- import { useTimelineStore } from '@decido/engine';
6
- import { usePlaygroundStore } from '../../../../store/usePlaygroundStore';
7
-
8
- export const RegisterActionNode: React.FC<NodeProps> = ({ id, data }) => {
9
- const activeTimelineId = usePlaygroundStore(s => s.prototypeBrand);
10
- const updateKeyframe = useTimelineStore(s => s.updateKeyframe);
11
- const u = (field: string, val: any) => updateKeyframe(activeTimelineId, id, { [field]: val } as any);
12
-
13
- return (
14
- <ShellNodeBase id={id} label="Register Cmd" icon={<Terminal size={14} />} accentColor="amber" isExecuting={data.isExecuting as boolean}>
15
- <ShellField label="Command ID" value={(data.shellCommandId as string) || ''} onChange={v => u('shellCommandId', v)} placeholder="myModule.doSomething" />
16
- <ShellField label="Título" value={(data.shellTitle as string) || ''} onChange={v => u('shellTitle', v)} placeholder="Hacer algo" />
17
- <ShellField label="Categoría" value={(data.shellCategory as string) || ''} onChange={v => u('shellCategory', v)} placeholder="General" />
18
- </ShellNodeBase>
19
- );
20
- };
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- import { NodeProps } from '@xyflow/react';
3
- import { PanelLeft } from 'lucide-react';
4
- import { ShellNodeBase, ShellField } from './ShellNodeBase';
5
- import { useTimelineStore } from '@decido/engine';
6
- import { usePlaygroundStore } from '../../../../store/usePlaygroundStore';
7
-
8
- export const RegisterButtonNode: React.FC<NodeProps> = ({ id, data }) => {
9
- const activeTimelineId = usePlaygroundStore(s => s.prototypeBrand);
10
- const updateKeyframe = useTimelineStore(s => s.updateKeyframe);
11
- const u = (field: string, val: any) => updateKeyframe(activeTimelineId, id, { [field]: val } as any);
12
-
13
- return (
14
- <ShellNodeBase id={id} label="Activity Bar" icon={<PanelLeft size={14} />} accentColor="teal" isExecuting={data.isExecuting as boolean}>
15
- <ShellField label="ID" value={(data.shellItemId as string) || ''} onChange={v => u('shellItemId', v)} placeholder="btn-explorer" />
16
- <ShellField label="Título" value={(data.shellTitle as string) || ''} onChange={v => u('shellTitle', v)} placeholder="Explorador" />
17
- <ShellField label="Ícono" value={(data.shellIcon as string) || ''} onChange={v => u('shellIcon', v)} placeholder="fas fa-folder" />
18
- <ShellField label="View ID" value={(data.shellViewId as string) || ''} onChange={v => u('shellViewId', v)} placeholder="explorer-view" />
19
- <ShellField label="Orden" value={String((data.shellOrder as number) || 0)} onChange={v => u('shellOrder', parseInt(v) || 0)} type="number" />
20
- </ShellNodeBase>
21
- );
22
- };
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- import { NodeProps } from '@xyflow/react';
3
- import { PanelBottom } from 'lucide-react';
4
- import { ShellNodeBase, ShellField } from './ShellNodeBase';
5
- import { useTimelineStore } from '@decido/engine';
6
- import { usePlaygroundStore } from '../../../../store/usePlaygroundStore';
7
-
8
- export const RegisterPanelNode: React.FC<NodeProps> = ({ id, data }) => {
9
- const activeTimelineId = usePlaygroundStore(s => s.prototypeBrand);
10
- const updateKeyframe = useTimelineStore(s => s.updateKeyframe);
11
- const u = (field: string, val: any) => updateKeyframe(activeTimelineId, id, { [field]: val } as any);
12
-
13
- return (
14
- <ShellNodeBase id={id} label="Panel View" icon={<PanelBottom size={14} />} accentColor="indigo" isExecuting={data.isExecuting as boolean}>
15
- <ShellField label="Panel ID" value={(data.shellPanelId as string) || ''} onChange={v => u('shellPanelId', v)} placeholder="output-panel" />
16
- <ShellField label="Título" value={(data.shellPanelTitle as string) || ''} onChange={v => u('shellPanelTitle', v)} placeholder="Output" />
17
- </ShellNodeBase>
18
- );
19
- };
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- import { NodeProps } from '@xyflow/react';
3
- import { Sidebar } from 'lucide-react';
4
- import { ShellNodeBase, ShellField } from './ShellNodeBase';
5
- import { useTimelineStore } from '@decido/engine';
6
- import { usePlaygroundStore } from '../../../../store/usePlaygroundStore';
7
-
8
- export const RegisterSidebarNode: React.FC<NodeProps> = ({ id, data }) => {
9
- const activeTimelineId = usePlaygroundStore(s => s.prototypeBrand);
10
- const updateKeyframe = useTimelineStore(s => s.updateKeyframe);
11
- const u = (field: string, val: any) => updateKeyframe(activeTimelineId, id, { [field]: val } as any);
12
-
13
- return (
14
- <ShellNodeBase id={id} label="Sidebar View" icon={<Sidebar size={14} />} accentColor="sky" isExecuting={data.isExecuting as boolean}>
15
- <ShellField label="View ID" value={(data.shellSidebarId as string) || ''} onChange={v => u('shellSidebarId', v)} placeholder="file-explorer" />
16
- <ShellField label="Título" value={(data.shellSidebarTitle as string) || ''} onChange={v => u('shellSidebarTitle', v)} placeholder="Archivos" />
17
- </ShellNodeBase>
18
- );
19
- };
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- import { NodeProps } from '@xyflow/react';
3
- import { Minus } from 'lucide-react';
4
- import { ShellNodeBase, ShellField } from './ShellNodeBase';
5
- import { useTimelineStore } from '@decido/engine';
6
- import { usePlaygroundStore } from '../../../../store/usePlaygroundStore';
7
-
8
- export const RegisterStatusBarNode: React.FC<NodeProps> = ({ id, data }) => {
9
- const activeTimelineId = usePlaygroundStore(s => s.prototypeBrand);
10
- const updateKeyframe = useTimelineStore(s => s.updateKeyframe);
11
- const u = (field: string, val: any) => updateKeyframe(activeTimelineId, id, { [field]: val } as any);
12
-
13
- return (
14
- <ShellNodeBase id={id} label="Status Bar" icon={<Minus size={14} />} accentColor="emerald" isExecuting={data.isExecuting as boolean}>
15
- <ShellField label="Item ID" value={(data.shellStatusId as string) || ''} onChange={v => u('shellStatusId', v)} placeholder="git-branch" />
16
- <ShellField label="Texto" value={(data.shellStatusText as string) || ''} onChange={v => u('shellStatusText', v)} placeholder="main ✓" />
17
- <ShellField label="Alineación" value={(data.shellStatusAlign as string) || 'left'} onChange={v => u('shellStatusAlign', v)} type="select"
18
- options={[{ value: 'left', label: '← Izquierda' }, { value: 'right', label: '→ Derecha' }]} />
19
- <ShellField label="Orden" value={String((data.shellOrder as number) || 0)} onChange={v => u('shellOrder', parseInt(v) || 0)} type="number" />
20
- </ShellNodeBase>
21
- );
22
- };
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- import { NodeProps } from '@xyflow/react';
3
- import { FileText } from 'lucide-react';
4
- import { ShellNodeBase, ShellField } from './ShellNodeBase';
5
- import { useTimelineStore } from '@decido/engine';
6
- import { usePlaygroundStore } from '../../../../store/usePlaygroundStore';
7
-
8
- export const RegisterTabNode: React.FC<NodeProps> = ({ id, data }) => {
9
- const activeTimelineId = usePlaygroundStore(s => s.prototypeBrand);
10
- const updateKeyframe = useTimelineStore(s => s.updateKeyframe);
11
- const u = (field: string, val: any) => updateKeyframe(activeTimelineId, id, { [field]: val } as any);
12
-
13
- return (
14
- <ShellNodeBase id={id} label="Open Tab" icon={<FileText size={14} />} accentColor="cyan" isExecuting={data.isExecuting as boolean}>
15
- <ShellField label="Tab ID" value={(data.shellTabId as string) || ''} onChange={v => u('shellTabId', v)} placeholder="settings-tab" />
16
- <ShellField label="Título" value={(data.shellTabTitle as string) || ''} onChange={v => u('shellTabTitle', v)} placeholder="Configuración" />
17
- <ShellField label="Componente" value={(data.shellTabComponent as string) || ''} onChange={v => u('shellTabComponent', v)} placeholder="settings-view" />
18
- <ShellField label="Ícono" value={(data.shellIcon as string) || ''} onChange={v => u('shellIcon', v)} placeholder="fas fa-cog" />
19
- </ShellNodeBase>
20
- );
21
- };
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- import { NodeProps } from '@xyflow/react';
3
- import { ArrowUpFromDot } from 'lucide-react';
4
- import { ShellNodeBase, ShellField } from './ShellNodeBase';
5
- import { useTimelineStore } from '@decido/engine';
6
- import { usePlaygroundStore } from '../../../../store/usePlaygroundStore';
7
-
8
- export const RegisterTopBarNode: React.FC<NodeProps> = ({ id, data }) => {
9
- const activeTimelineId = usePlaygroundStore(s => s.prototypeBrand);
10
- const updateKeyframe = useTimelineStore(s => s.updateKeyframe);
11
- const u = (field: string, val: any) => updateKeyframe(activeTimelineId, id, { [field]: val } as any);
12
-
13
- return (
14
- <ShellNodeBase id={id} label="Top Bar" icon={<ArrowUpFromDot size={14} />} accentColor="violet" isExecuting={data.isExecuting as boolean}>
15
- <ShellField label="Item ID" value={(data.shellTopBarId as string) || ''} onChange={v => u('shellTopBarId', v)} placeholder="toggle-sidebar" />
16
- <ShellField label="Título" value={(data.shellTitle as string) || ''} onChange={v => u('shellTitle', v)} placeholder="Panel Izquierdo" />
17
- <ShellField label="Ícono" value={(data.shellIcon as string) || ''} onChange={v => u('shellIcon', v)} placeholder="fas fa-bars" />
18
- <ShellField label="Command ID" value={(data.shellCommandId as string) || ''} onChange={v => u('shellCommandId', v)} placeholder="layout.toggleSidebar" />
19
- <ShellField label="Orden" value={String((data.shellOrder as number) || 0)} onChange={v => u('shellOrder', parseInt(v) || 0)} type="number" />
20
- </ShellNodeBase>
21
- );
22
- };
@@ -1,51 +0,0 @@
1
- import React from 'react';
2
- import { NodeProps } from '@xyflow/react';
3
- import { Settings2 } from 'lucide-react';
4
- import { ShellNodeBase, ShellField } from './ShellNodeBase';
5
- import { useTimelineStore } from '@decido/engine';
6
- import { usePlaygroundStore } from '../../../../store/usePlaygroundStore';
7
-
8
- /**
9
- * ShellConfig — Composite node that applies a complete shell configuration
10
- * in a single operation: theme, palette, layout visibility, and registrations.
11
- */
12
- export const ShellConfigNode: React.FC<NodeProps> = ({ id, data }) => {
13
- const activeTimelineId = usePlaygroundStore(s => s.prototypeBrand);
14
- const updateKeyframe = useTimelineStore(s => s.updateKeyframe);
15
- const u = (field: string, val: any) => updateKeyframe(activeTimelineId, id, { [field]: val } as any);
16
-
17
- return (
18
- <ShellNodeBase id={id} label="Shell Config" icon={<Settings2 size={14} />} accentColor="teal" isExecuting={data.isExecuting as boolean}>
19
- {/* Theme */}
20
- <ShellField label="Tema" value={(data.shellTheme as string) || ''} onChange={v => u('shellTheme', v)} type="select"
21
- options={[{ value: '', label: '— Sin cambio —' }, { value: 'dark', label: '🌙 Dark' }, { value: 'light', label: '☀️ Light' }]} />
22
-
23
- {/* Palette */}
24
- <ShellField label="Primary" value={(data.shellPrimary as string) || ''} onChange={v => u('shellPrimary', v)} placeholder="#6366f1" />
25
- <ShellField label="Accent" value={(data.shellAccent as string) || ''} onChange={v => u('shellAccent', v)} placeholder="#f59e0b" />
26
-
27
- {/* Layout */}
28
- <ShellField label="Sidebar" value={(data.shellSidebarState as string) || ''} onChange={v => u('shellSidebarState', v)} type="select"
29
- options={[{ value: '', label: '— Sin cambio —' }, { value: 'true', label: '👁 Visible' }, { value: 'false', label: '🚫 Oculto' }]} />
30
- <ShellField label="Panel" value={(data.shellPanelState as string) || ''} onChange={v => u('shellPanelState', v)} type="select"
31
- options={[{ value: '', label: '— Sin cambio —' }, { value: 'true', label: '👁 Visible' }, { value: 'false', label: '🚫 Oculto' }]} />
32
-
33
- {/* Config JSON (advanced overrides) */}
34
- <div className="flex flex-col gap-1">
35
- <label className="text-[10px] uppercase tracking-wider text-text-muted">Config Extra (JSON)</label>
36
- <textarea
37
- value={(data.shellConfigJson as string) || ''}
38
- onChange={(e) => u('shellConfigJson', e.target.value)}
39
- className="bg-surface-tertiary/50 border border-border-subtle rounded-lg px-2 py-1.5 text-xs text-text-primary w-full focus:outline-hidden focus:border-teal-500/50 transition-colors font-mono resize-y min-h-[40px]"
40
- placeholder='{"shortcuts": [{"id": "s1", "keys": "Ctrl+K", "commandId": "palette.toggle"}]}'
41
- rows={2}
42
- />
43
- </div>
44
-
45
- <div className="flex items-center gap-2 pt-1 border-t border-border-subtle">
46
- <Settings2 size={12} className="text-teal-400" />
47
- <span className="text-[10px] font-mono text-teal-400">Full Shell Configuration</span>
48
- </div>
49
- </ShellNodeBase>
50
- );
51
- };
@@ -1,100 +0,0 @@
1
- import React from 'react';
2
- import { Handle, Position, NodeProps } from '@xyflow/react';
3
- import { GripVertical } from 'lucide-react';
4
-
5
- /**
6
- * Base wrapper for all shell-control nodes.
7
- * Provides consistent styling, header, drag handle, and connection handles.
8
- */
9
- export interface ShellNodeBaseProps {
10
- id: string;
11
- label: string;
12
- icon: React.ReactNode;
13
- accentColor: string; // e.g. 'teal'
14
- isExecuting?: boolean;
15
- children: React.ReactNode;
16
- /** Extra source handles beyond the default 'success' */
17
- extraHandles?: { id: string; position: Position; className: string }[];
18
- }
19
-
20
- const COLOR_MAP: Record<string, { border: string; bg: string; text: string; ring: string; glow: string }> = {
21
- teal: { border: 'border-teal-500/30', bg: 'from-teal-500/15 to-cyan-500/10', text: 'text-teal-400', ring: 'ring-teal-400', glow: 'rgba(20,184,166,0.6)' },
22
- cyan: { border: 'border-cyan-500/30', bg: 'from-cyan-500/15 to-sky-500/10', text: 'text-cyan-400', ring: 'ring-cyan-400', glow: 'rgba(6,182,212,0.6)' },
23
- sky: { border: 'border-sky-500/30', bg: 'from-sky-500/15 to-blue-500/10', text: 'text-sky-400', ring: 'ring-sky-400', glow: 'rgba(14,165,233,0.6)' },
24
- indigo: { border: 'border-indigo-500/30', bg: 'from-indigo-500/15 to-violet-500/10', text: 'text-indigo-400', ring: 'ring-indigo-400', glow: 'rgba(99,102,241,0.6)' },
25
- rose: { border: 'border-rose-500/30', bg: 'from-rose-500/15 to-pink-500/10', text: 'text-rose-400', ring: 'ring-rose-400', glow: 'rgba(244,63,94,0.6)' },
26
- amber: { border: 'border-amber-500/30', bg: 'from-amber-500/15 to-orange-500/10', text: 'text-amber-400', ring: 'ring-amber-400', glow: 'rgba(245,158,11,0.6)' },
27
- emerald:{ border: 'border-emerald-500/30', bg: 'from-emerald-500/15 to-green-500/10', text: 'text-emerald-400', ring: 'ring-emerald-400', glow: 'rgba(16,185,129,0.6)' },
28
- violet: { border: 'border-violet-500/30', bg: 'from-violet-500/15 to-purple-500/10', text: 'text-violet-400', ring: 'ring-violet-400', glow: 'rgba(139,92,246,0.6)' },
29
- pink: { border: 'border-pink-500/30', bg: 'from-pink-500/15 to-rose-500/10', text: 'text-pink-400', ring: 'ring-pink-400', glow: 'rgba(236,72,153,0.6)' },
30
- orange: { border: 'border-orange-500/30', bg: 'from-orange-500/15 to-amber-500/10', text: 'text-orange-400', ring: 'ring-orange-400', glow: 'rgba(249,115,22,0.6)' },
31
- };
32
-
33
- export const ShellNodeBase: React.FC<ShellNodeBaseProps> = ({ label, icon, accentColor, isExecuting, children, extraHandles }) => {
34
- const c = COLOR_MAP[accentColor] || COLOR_MAP.teal;
35
- const executionStyle = isExecuting
36
- ? `ring-2 ${c.ring} shadow-[0_0_20px_${c.glow}] scale-105 z-50`
37
- : '';
38
-
39
- return (
40
- <div className={`bg-surface-tertiary ${c.border} border rounded-xl shadow-2xl w-[240px] overflow-hidden group hover:${c.border.replace('/30', '/60')} transition-all duration-300 ${executionStyle}`}>
41
- {/* Header */}
42
- <div className={`bg-linear-to-r ${c.bg} px-3 py-2 border-b ${c.border.replace('/30', '/20')} flex items-center justify-between`}>
43
- <div className="flex items-center gap-2">
44
- <span className={c.text}>{icon}</span>
45
- <span className={`text-xs font-bold ${c.text} uppercase tracking-widest`}>{label}</span>
46
- </div>
47
- <div className={`${c.text} opacity-30 cursor-grab active:cursor-grabbing hover:opacity-80 transition-colors custom-drag-handle`}>
48
- <GripVertical size={14} />
49
- </div>
50
- </div>
51
-
52
- {/* Body */}
53
- <div className="p-3 flex flex-col gap-3">
54
- {children}
55
- </div>
56
-
57
- {/* Handles */}
58
- <Handle type="target" position={Position.Top} className={`w-3! h-3! bg-teal-500! border-teal-400/50! -top-1.5!`} />
59
- <Handle type="source" id="success" position={Position.Bottom} className={`w-3! h-3! bg-emerald-500! border-emerald-400/50! -bottom-1.5!`} />
60
- {extraHandles?.map(h => (
61
- <Handle key={h.id} type="source" id={h.id} position={h.position} className={h.className} />
62
- ))}
63
- </div>
64
- );
65
- };
66
-
67
- /**
68
- * Reusable field input for shell node properties.
69
- */
70
- export const ShellField: React.FC<{
71
- label: string;
72
- value: string;
73
- onChange: (val: string) => void;
74
- placeholder?: string;
75
- type?: 'text' | 'select' | 'number';
76
- options?: { value: string; label: string }[];
77
- }> = ({ label, value, onChange, placeholder, type = 'text', options }) => (
78
- <div className="flex flex-col gap-1">
79
- <label className="text-[10px] uppercase tracking-wider text-text-muted">{label}</label>
80
- {type === 'select' && options ? (
81
- <select
82
- value={value}
83
- onChange={(e) => onChange(e.target.value)}
84
- className="bg-surface-tertiary/50 border border-border-subtle rounded-lg px-2 py-1.5 text-xs text-text-primary w-full focus:outline-hidden focus:border-teal-500/50 transition-colors appearance-none cursor-pointer"
85
- >
86
- {options.map(o => (
87
- <option key={o.value} value={o.value}>{o.label}</option>
88
- ))}
89
- </select>
90
- ) : (
91
- <input
92
- type={type}
93
- value={value}
94
- onChange={(e) => onChange(e.target.value)}
95
- className="bg-surface-tertiary/50 border border-border-subtle rounded-lg px-2 py-1.5 text-xs text-text-primary w-full focus:outline-hidden focus:border-teal-500/50 transition-colors font-mono"
96
- placeholder={placeholder}
97
- />
98
- )}
99
- </div>
100
- );
@@ -1,51 +0,0 @@
1
- import React from 'react';
2
- import { NodeProps } from '@xyflow/react';
3
- import { Palette, Paintbrush, Pipette } from 'lucide-react';
4
- import { ShellNodeBase, ShellField } from './ShellNodeBase';
5
- import { useTimelineStore } from '@decido/engine';
6
- import { usePlaygroundStore } from '../../../../store/usePlaygroundStore';
7
-
8
- // ─── Set Theme ───
9
- export const SetThemeNode: React.FC<NodeProps> = ({ id, data }) => {
10
- const activeTimelineId = usePlaygroundStore(s => s.prototypeBrand);
11
- const updateKeyframe = useTimelineStore(s => s.updateKeyframe);
12
- const u = (field: string, val: any) => updateKeyframe(activeTimelineId, id, { [field]: val } as any);
13
-
14
- return (
15
- <ShellNodeBase id={id} label="Set Theme" icon={<Palette size={14} />} accentColor="amber" isExecuting={data.isExecuting as boolean}>
16
- <ShellField label="Tema" value={(data.shellTheme as string) || 'dark'} onChange={v => u('shellTheme', v)} type="select"
17
- options={[{ value: 'dark', label: '🌙 Dark' }, { value: 'light', label: '☀️ Light' }]} />
18
- </ShellNodeBase>
19
- );
20
- };
21
-
22
- // ─── Apply Palette ───
23
- export const ApplyPaletteNode: React.FC<NodeProps> = ({ id, data }) => {
24
- const activeTimelineId = usePlaygroundStore(s => s.prototypeBrand);
25
- const updateKeyframe = useTimelineStore(s => s.updateKeyframe);
26
- const u = (field: string, val: any) => updateKeyframe(activeTimelineId, id, { [field]: val } as any);
27
-
28
- return (
29
- <ShellNodeBase id={id} label="Apply Palette" icon={<Paintbrush size={14} />} accentColor="pink" isExecuting={data.isExecuting as boolean}>
30
- <ShellField label="Primary" value={(data.shellPrimary as string) || ''} onChange={v => u('shellPrimary', v)} placeholder="#6366f1" />
31
- <ShellField label="Secondary" value={(data.shellSecondary as string) || ''} onChange={v => u('shellSecondary', v)} placeholder="#8b5cf6" />
32
- <ShellField label="Accent" value={(data.shellAccent as string) || ''} onChange={v => u('shellAccent', v)} placeholder="#f59e0b" />
33
- <ShellField label="BG Main" value={(data.shellBgMain as string) || ''} onChange={v => u('shellBgMain', v)} placeholder="#070720" />
34
- <ShellField label="BG Content" value={(data.shellBgContent as string) || ''} onChange={v => u('shellBgContent', v)} placeholder="#0F0F23" />
35
- </ShellNodeBase>
36
- );
37
- };
38
-
39
- // ─── Update Token ───
40
- export const UpdateTokenNode: React.FC<NodeProps> = ({ id, data }) => {
41
- const activeTimelineId = usePlaygroundStore(s => s.prototypeBrand);
42
- const updateKeyframe = useTimelineStore(s => s.updateKeyframe);
43
- const u = (field: string, val: any) => updateKeyframe(activeTimelineId, id, { [field]: val } as any);
44
-
45
- return (
46
- <ShellNodeBase id={id} label="CSS Token" icon={<Pipette size={14} />} accentColor="orange" isExecuting={data.isExecuting as boolean}>
47
- <ShellField label="Token" value={(data.shellToken as string) || ''} onChange={v => u('shellToken', v)} placeholder="--color-primary" />
48
- <ShellField label="Valor" value={(data.shellTokenValue as string) || ''} onChange={v => u('shellTokenValue', v)} placeholder="#6366f1" />
49
- </ShellNodeBase>
50
- );
51
- };
@@ -1,12 +0,0 @@
1
- // Shell Control Nodes — Barrel Export
2
- export { RegisterButtonNode } from './RegisterButtonNode';
3
- export { RegisterTabNode } from './RegisterTabNode';
4
- export { RegisterPanelNode } from './RegisterPanelNode';
5
- export { RegisterSidebarNode } from './RegisterSidebarNode';
6
- export { RegisterStatusBarNode } from './RegisterStatusBarNode';
7
- export { RegisterTopBarNode } from './RegisterTopBarNode';
8
- export { RegisterActionNode } from './RegisterActionNode';
9
- export { ToggleSidebarNode, TogglePanelNode, SplitPaneNode, FocusTabNode, CloseTabNode } from './LayoutControlNodes';
10
- export { SetThemeNode, ApplyPaletteNode, UpdateTokenNode } from './ThemeNodes';
11
- export { ShowNotificationNode, ShowModalNode, ExecuteCommandNode, RegisterShortcutNode, EmitEventNode } from './InteractionNodes';
12
- export { ShellConfigNode } from './ShellConfigNode';
@@ -1,93 +0,0 @@
1
- import { useState } from 'react';
2
- import { Send, Megaphone } from 'lucide-react';
3
-
4
-
5
- export const BroadcastWidget = () => {
6
- const [message, setMessage] = useState('');
7
- const [type, setType] = useState('INFO');
8
- const [action, setAction] = useState('NONE');
9
- const [loading, setLoading] = useState(false);
10
-
11
- const handleSend = async () => {
12
- if (!message) return;
13
- setLoading(true);
14
- try {
15
- const baseUrl = (import.meta as any).env?.VITE_API_URL || 'http://localhost:3001/api';
16
- await fetch(`${baseUrl}/admin/broadcast`, {
17
- method: 'POST',
18
- headers: { 'Content-Type': 'application/json' },
19
- body: JSON.stringify({
20
- message,
21
- type,
22
- action: action === 'NONE' ? undefined : action
23
- })
24
- });
25
- alert('Broadcast Sent!');
26
- setMessage('');
27
- } catch (e) {
28
- console.error(e);
29
- alert('Error sending broadcast');
30
- } finally {
31
- setLoading(false);
32
- }
33
- };
34
-
35
- return (
36
- <div className="bg-surface-tertiary rounded-xl border border-border-default p-6 shadow-lg">
37
- <h3 className="text-lg font-bold text-text-primary mb-4 flex items-center gap-2">
38
- <Megaphone size={20} className="text-purple-400" /> Broadcast Center
39
- </h3>
40
-
41
- <div className="space-y-4">
42
- <div>
43
- <label className="block text-xs font-bold text-text-secondary mb-1">Message</label>
44
- <input
45
- type="text"
46
- value={message}
47
- onChange={(e) => setMessage(e.target.value)}
48
- placeholder="e.g. System maintenance in 5 minutes"
49
- className="w-full bg-surface-secondary border border-border-default rounded-lg p-3 text-text-primary focus:border-purple-500 outline-hidden"
50
- />
51
- </div>
52
-
53
- <div className="grid grid-cols-2 gap-4">
54
- <div>
55
- <label className="block text-xs font-bold text-text-secondary mb-1">Alert Type</label>
56
- <select
57
- value={type}
58
- onChange={(e) => setType(e.target.value)}
59
- className="w-full bg-surface-secondary border border-border-default rounded-lg p-3 text-text-primary outline-hidden"
60
- >
61
- <option value="INFO">Info (Blue)</option>
62
- <option value="WARNING">Warning (Orange)</option>
63
- <option value="CRITICAL">Critical (Red)</option>
64
- <option value="SUCCESS">Success (Green)</option>
65
- </select>
66
- </div>
67
- <div>
68
- <label className="block text-xs font-bold text-text-secondary mb-1">Forced Action</label>
69
- <select
70
- value={action}
71
- onChange={(e) => setAction(e.target.value)}
72
- className="w-full bg-surface-secondary border border-border-default rounded-lg p-3 text-text-primary outline-hidden"
73
- >
74
- <option value="NONE">None</option>
75
- <option value="RELOAD">Force Reload</option>
76
- <option value="LINK">Open Link</option>
77
- </select>
78
- </div>
79
- </div>
80
-
81
- <div className="pt-2">
82
- <button
83
- onClick={handleSend}
84
- disabled={loading || !message}
85
- className="w-full py-3 bg-purple-600 hover:bg-purple-500 disabled:opacity-50 disabled:bg-surface-elevated text-text-primary font-bold rounded-lg transition-colors flex items-center justify-center gap-2"
86
- >
87
- {loading ? 'Sending...' : <><Send size={18} /> Broadcast Now</>}
88
- </button>
89
- </div>
90
- </div>
91
- </div>
92
- );
93
- };