@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,339 +0,0 @@
1
- /**
2
- * TokenPreview — Design System Showroom v2.
3
- * Registered as 'shell-theme-editor'.
4
- *
5
- * Premium theme editor with live component preview,
6
- * powered by @decido/ui-kit useTheme store.
7
- */
8
- import React, { useState, useCallback } from 'react';
9
- import { useTheme, THEME_PRESETS, type ThemePreset, type ThemeTokens } from '../../../store/useThemeStore';
10
-
11
- // ── Token Groups for Editor ──
12
-
13
- interface TokenDef { key: keyof ThemeTokens; label: string; }
14
- interface TokenGroup { title: string; icon: string; tokens: TokenDef[]; }
15
-
16
- const TOKEN_GROUPS: TokenGroup[] = [
17
- {
18
- title: 'Surfaces', icon: '◻️', tokens: [
19
- { key: 'surface-primary', label: 'Primary' },
20
- { key: 'surface-secondary', label: 'Secondary' },
21
- { key: 'surface-tertiary', label: 'Tertiary' },
22
- { key: 'surface-elevated', label: 'Elevated' },
23
- ]
24
- },
25
- {
26
- title: 'Text', icon: '✏️', tokens: [
27
- { key: 'text-primary', label: 'Primary' },
28
- { key: 'text-secondary', label: 'Secondary' },
29
- { key: 'text-muted', label: 'Muted' },
30
- ]
31
- },
32
- {
33
- title: 'Accents', icon: '💎', tokens: [
34
- { key: 'accent-blue', label: 'Blue' },
35
- { key: 'accent-purple', label: 'Purple' },
36
- { key: 'accent-green', label: 'Green' },
37
- { key: 'accent-red', label: 'Red' },
38
- { key: 'accent-amber', label: 'Amber' },
39
- { key: 'accent-cyan', label: 'Cyan' },
40
- ]
41
- },
42
- {
43
- title: 'Borders', icon: '▬', tokens: [
44
- { key: 'border-subtle', label: 'Subtle' },
45
- { key: 'border-default', label: 'Default' },
46
- { key: 'border-strong', label: 'Strong' },
47
- { key: 'border-glow', label: 'Glow' },
48
- ]
49
- },
50
- {
51
- title: 'Status', icon: '●', tokens: [
52
- { key: 'status-ok', label: 'Success' },
53
- { key: 'status-warn', label: 'Warning' },
54
- { key: 'status-error', label: 'Error' },
55
- { key: 'status-info', label: 'Info' },
56
- ]
57
- },
58
- ];
59
-
60
- type TabId = 'themes' | 'tokens' | 'showroom';
61
-
62
- // ── Token Swatch ──
63
-
64
- function TokenSwatch({ tokenKey, label }: { tokenKey: keyof ThemeTokens; label: string }) {
65
- const { getCurrentPreset, setToken } = useTheme();
66
- const preset = getCurrentPreset();
67
- const value = preset.tokens[tokenKey];
68
-
69
- return (
70
- <div className="flex items-center gap-2 py-1.5 px-2 rounded-lg bg-surface-glass hover:bg-surface-elevated/50 transition-colors group">
71
- <div className="relative w-6 h-6 shrink-0">
72
- <div className="w-6 h-6 rounded-md border border-border-default" style={{ background: value }} />
73
- <input type="color"
74
- value={value.startsWith('#') ? value : '#888888'}
75
- onChange={e => setToken(tokenKey, e.target.value)}
76
- className="absolute inset-0 opacity-0 w-full h-full cursor-pointer" />
77
- </div>
78
- <div className="flex-1 min-w-0">
79
- <div className="text-[11px] font-semibold text-text-primary truncate">{label}</div>
80
- <div className="text-[9px] text-text-muted font-mono">--ds-{tokenKey}</div>
81
- </div>
82
- <span className="text-[10px] text-text-muted font-mono opacity-0 group-hover:opacity-100 transition-opacity">
83
- {value.slice(0, 9)}
84
- </span>
85
- </div>
86
- );
87
- }
88
-
89
- // ── Theme Preset Card ──
90
-
91
- function PresetCard({ preset, isActive, onSelect }: { preset: ThemePreset; isActive: boolean; onSelect: () => void }) {
92
- return (
93
- <button onClick={onSelect}
94
- className={`flex flex-col items-center gap-2 p-3 rounded-xl border transition-all duration-200 cursor-pointer ${isActive
95
- ? 'border-accent-purple bg-accent-purple/10 shadow-glow-sm'
96
- : 'border-border-subtle bg-surface-glass hover:border-border-default hover:bg-surface-elevated/30'
97
- }`}>
98
- {/* Color dots preview */}
99
- <div className="flex gap-1">
100
- {[preset.preview.bg, preset.preview.accent, preset.preview.text].map((c, i) => (
101
- <div key={i} className="w-3 h-3 rounded-full border border-border-subtle" style={{ background: c }} />
102
- ))}
103
- </div>
104
- <span className="text-[10px] font-medium text-text-secondary">{preset.name}</span>
105
- </button>
106
- );
107
- }
108
-
109
- // ── Component Showroom ──
110
-
111
- function ComponentShowroom() {
112
- return (
113
- <div className="flex flex-col gap-4 p-3">
114
- {/* Buttons */}
115
- <ShowSection title="Buttons">
116
- <div className="flex flex-wrap gap-2">
117
- <button className="px-4 py-2 bg-accent-purple text-text-inverse rounded-lg text-xs font-semibold hover:opacity-90 transition-opacity">
118
- Primary
119
- </button>
120
- <button className="px-4 py-2 bg-surface-glass border border-border-default text-text-primary rounded-lg text-xs font-semibold hover:bg-surface-elevated transition-colors">
121
- Secondary
122
- </button>
123
- <button className="px-4 py-2 bg-accent-red/10 text-accent-red border border-accent-red/20 rounded-lg text-xs font-semibold hover:bg-accent-red/20 transition-colors">
124
- Destructive
125
- </button>
126
- <button className="px-3 py-1.5 text-text-secondary text-xs hover:text-text-primary transition-colors">
127
- Ghost
128
- </button>
129
- </div>
130
- </ShowSection>
131
-
132
- {/* Cards */}
133
- <ShowSection title="Cards">
134
- <div className="surface-card p-4">
135
- <div className="text-sm font-semibold text-text-primary mb-1">Glass Card</div>
136
- <div className="text-xs text-text-secondary">Surface secondary con border subtle y hover.</div>
137
- </div>
138
- <div className="glass-panel rounded-xl p-4 mt-2">
139
- <div className="text-sm font-semibold text-text-primary mb-1">Glass Panel</div>
140
- <div className="text-xs text-text-secondary">Overlay + backdrop blur + border default.</div>
141
- </div>
142
- </ShowSection>
143
-
144
- {/* Inputs */}
145
- <ShowSection title="Inputs">
146
- <input type="text" placeholder="Escribe algo..."
147
- className="w-full px-3 py-2 bg-surface-primary border border-border-default rounded-lg text-sm text-text-primary placeholder:text-text-muted focus:border-accent-purple focus:ring-1 focus:ring-accent-purple/30 outline-hidden transition-all" />
148
- <div className="flex gap-2 mt-2">
149
- <input type="text" value="Readonly" readOnly
150
- className="flex-1 px-3 py-2 bg-surface-glass border border-border-subtle rounded-lg text-sm text-text-secondary" />
151
- <select className="px-3 py-2 bg-surface-primary border border-border-default rounded-lg text-sm text-text-primary outline-hidden">
152
- <option>Opción A</option>
153
- <option>Opción B</option>
154
- </select>
155
- </div>
156
- </ShowSection>
157
-
158
- {/* Badges */}
159
- <ShowSection title="Badges & Status">
160
- <div className="flex flex-wrap gap-2">
161
- <span className="px-2 py-0.5 bg-status-ok/10 text-status-ok border border-status-ok/20 rounded-full text-[10px] font-semibold">Active</span>
162
- <span className="px-2 py-0.5 bg-status-warn/10 text-status-warn border border-status-warn/20 rounded-full text-[10px] font-semibold">Pending</span>
163
- <span className="px-2 py-0.5 bg-status-error/10 text-status-error border border-status-error/20 rounded-full text-[10px] font-semibold">Error</span>
164
- <span className="px-2 py-0.5 bg-status-info/10 text-status-info border border-status-info/20 rounded-full text-[10px] font-semibold">Info</span>
165
- <span className="px-2 py-0.5 bg-accent-purple/10 text-accent-purple border border-accent-purple/20 rounded-full text-[10px] font-semibold">Plugin</span>
166
- </div>
167
- </ShowSection>
168
-
169
- {/* Chat Bubbles */}
170
- <ShowSection title="Chat Bubbles">
171
- <div className="flex flex-col gap-2">
172
- <div className="self-end max-w-[80%] px-3 py-2 bg-accent-purple/10 border border-accent-purple/20 rounded-2xl rounded-br-sm">
173
- <div className="text-xs text-text-primary">Hola, ¿cómo puedo ayudarte hoy?</div>
174
- </div>
175
- <div className="self-start max-w-[80%] px-3 py-2 bg-surface-glass border border-border-subtle rounded-2xl rounded-bl-sm">
176
- <div className="text-xs text-text-primary">Muestra el dashboard de ventas</div>
177
- </div>
178
- <div className="self-end max-w-[80%] px-3 py-2 bg-accent-blue/10 border border-accent-blue/20 rounded-2xl rounded-br-sm">
179
- <span className="inline-flex items-center gap-1 text-xs text-accent-blue font-medium">
180
- ● Generando diseño web...
181
- </span>
182
- </div>
183
- </div>
184
- </ShowSection>
185
-
186
- {/* Typography */}
187
- <ShowSection title="Typography">
188
- <h1 className="text-xl font-bold text-text-primary">Heading Primary</h1>
189
- <h2 className="text-base font-semibold text-text-secondary">Heading Secondary</h2>
190
- <p className="text-sm text-text-secondary mt-1">Body text con color secundario para contenido descriptivo.</p>
191
- <p className="text-xs text-text-muted mt-1">Caption text en muted para metadata y timestamps.</p>
192
- <p className="text-sm text-gradient font-bold mt-2">✦ Gradient text premium</p>
193
- </ShowSection>
194
-
195
- {/* Color Palette */}
196
- <ShowSection title="Accent Palette">
197
- <div className="grid grid-cols-6 gap-1">
198
- {['accent-blue', 'accent-purple', 'accent-green', 'accent-red', 'accent-amber', 'accent-cyan'].map(c => (
199
- <div key={c} className="flex flex-col items-center gap-1">
200
- <div className={`w-8 h-8 rounded-lg bg-${c}`} />
201
- <span className="text-[8px] text-text-muted">{c.split('-')[1]}</span>
202
- </div>
203
- ))}
204
- </div>
205
- </ShowSection>
206
-
207
- {/* Node Preview */}
208
- <ShowSection title="Graph Nodes">
209
- <div className="flex gap-2">
210
- {[
211
- { name: 'Dialogue', border: 'border-accent-purple/30', header: 'bg-accent-purple/10' },
212
- { name: 'Logic', border: 'border-accent-amber/30', header: 'bg-accent-amber/10' },
213
- { name: 'State', border: 'border-accent-cyan/30', header: 'bg-accent-cyan/10' },
214
- ].map(n => (
215
- <div key={n.name} className={`flex-1 bg-surface-tertiary ${n.border} border rounded-lg overflow-hidden`}>
216
- <div className={`${n.header} px-2 py-1 text-[10px] font-semibold text-text-primary`}>{n.name}</div>
217
- <div className="px-2 py-2 text-[9px] text-text-muted">Node content</div>
218
- </div>
219
- ))}
220
- </div>
221
- </ShowSection>
222
- </div>
223
- );
224
- }
225
-
226
- function ShowSection({ title, children }: { title: string; children: React.ReactNode }) {
227
- return (
228
- <div>
229
- <div className="text-[10px] font-bold uppercase tracking-wider text-text-muted mb-2">{title}</div>
230
- {children}
231
- </div>
232
- );
233
- }
234
-
235
- // ── Main Component ──
236
-
237
- export function TokenPreview() {
238
- const [tab, setTab] = useState<TabId>('themes');
239
- const { currentThemeId, setTheme, exportCSS, getAllPresets, getCurrentPreset } = useTheme();
240
-
241
- const handleExport = useCallback(() => {
242
- const css = exportCSS();
243
- navigator.clipboard.writeText(css);
244
- }, [exportCSS]);
245
-
246
- const tabs: { id: TabId; icon: string; label: string }[] = [
247
- { id: 'themes', icon: '🎨', label: 'Temas' },
248
- { id: 'tokens', icon: '🔧', label: 'Tokens' },
249
- { id: 'showroom', icon: '🏛️', label: 'Showroom' },
250
- ];
251
-
252
- return (
253
- <div className="flex flex-col h-full bg-surface-primary text-text-primary font-sans overflow-hidden">
254
- {/* Header */}
255
- <div className="flex items-center gap-2 px-3 py-2.5 border-b border-border-subtle bg-surface-glass">
256
- <span className="text-sm">🎨</span>
257
- <span className="text-xs font-bold flex-1">Design System</span>
258
- <span className="text-[9px] px-1.5 py-0.5 bg-accent-purple/10 text-accent-purple rounded font-mono">
259
- {getCurrentPreset().name}
260
- </span>
261
- <button onClick={handleExport}
262
- className="px-2.5 py-1 border border-border-default rounded-md bg-accent-purple hover:bg-accent-purple/80 text-[10px] text-text-primary font-medium cursor-pointer transition-colors">
263
- Export CSS
264
- </button>
265
- </div>
266
-
267
- {/* Tab Bar */}
268
- <div className="flex border-b border-border-subtle">
269
- {tabs.map(t => (
270
- <button key={t.id}
271
- onClick={() => setTab(t.id)}
272
- className={`flex-1 flex items-center justify-center gap-1.5 py-2 text-[10px] font-semibold transition-all cursor-pointer ${tab === t.id
273
- ? 'text-accent-purple border-b-2 border-accent-purple bg-accent-purple/5'
274
- : 'text-text-muted hover:text-text-secondary hover:bg-surface-glass'
275
- }`}>
276
- <span>{t.icon}</span>
277
- <span>{t.label}</span>
278
- </button>
279
- ))}
280
- </div>
281
-
282
- {/* Content */}
283
- <div className="flex-1 overflow-auto custom-scrollbar">
284
- {tab === 'themes' && (
285
- <div className="p-3 flex flex-col gap-3">
286
- <div className="text-[10px] font-bold uppercase tracking-wider text-text-muted">Presets</div>
287
- <div className="grid grid-cols-2 gap-2">
288
- {getAllPresets().map(p => (
289
- <PresetCard key={p.id} preset={p}
290
- isActive={currentThemeId === p.id}
291
- onSelect={() => setTheme(p.id)} />
292
- ))}
293
- </div>
294
-
295
- {/* Quick Preview */}
296
- <div className="mt-2">
297
- <div className="text-[10px] font-bold uppercase tracking-wider text-text-muted mb-2">Vista Rápida</div>
298
- <div className="surface-card p-3 flex flex-col gap-2">
299
- <div className="flex items-center gap-2">
300
- <div className="w-8 h-8 rounded-full bg-accent-purple flex items-center justify-center text-text-inverse text-[10px] font-bold">Z</div>
301
- <div>
302
- <div className="text-xs font-semibold text-text-primary">Zephyr AI</div>
303
- <div className="text-[10px] text-text-muted">Agente activo • ahora</div>
304
- </div>
305
- </div>
306
- <div className="px-3 py-2 bg-surface-glass rounded-xl text-xs text-text-secondary">
307
- ¿En qué puedo ayudarte hoy?
308
- </div>
309
- <div className="flex gap-1.5">
310
- <span className="px-2 py-0.5 bg-status-ok/10 text-status-ok rounded-full text-[9px] font-medium">Online</span>
311
- <span className="px-2 py-0.5 bg-accent-blue/10 text-accent-blue rounded-full text-[9px] font-medium">GPT-4</span>
312
- </div>
313
- </div>
314
- </div>
315
- </div>
316
- )}
317
-
318
- {tab === 'tokens' && (
319
- <div className="p-3 flex flex-col gap-3">
320
- {TOKEN_GROUPS.map(g => (
321
- <div key={g.title}>
322
- <div className="text-[10px] font-bold uppercase tracking-wider text-text-muted mb-1.5 flex items-center gap-1">
323
- <span>{g.icon}</span> {g.title}
324
- </div>
325
- <div className="flex flex-col gap-1">
326
- {g.tokens.map(t => (
327
- <TokenSwatch key={t.key} tokenKey={t.key} label={t.label} />
328
- ))}
329
- </div>
330
- </div>
331
- ))}
332
- </div>
333
- )}
334
-
335
- {tab === 'showroom' && <ComponentShowroom />}
336
- </div>
337
- </div>
338
- );
339
- }
@@ -1,31 +0,0 @@
1
- /**
2
- * Shell Boot Registration — Called once at app startup.
3
- *
4
- * Registers built-in shell types (markdown, iframe) into the ShellRegistry.
5
- *
6
- * NOTE: shell-vscode and shell-canvas are NOT registered here because they
7
- * depend on workspace packages (@decido/react-shell, @decido/node-engine).
8
- * The HOST APP must register them:
9
- *
10
- * import { registerShell } from '@decido/studio';
11
- * registerShell('shell-vscode', MyVscodeWrapper);
12
- * registerShell('shell-canvas', MyCanvasWrapper);
13
- */
14
- import { registerShell } from '../../../store/useShellRegistry';
15
- import { MarkdownShell, IframeShell } from './BuiltInShells';
16
- import { TokenPreview } from './TokenPreview';
17
- import { DatawayChatShell } from './DatawayChatShell';
18
- import { ShellNexusPreview } from '../ShellNexusPreview';
19
-
20
- let booted = false;
21
-
22
- export function bootShells() {
23
- if (booted) return;
24
- booted = true;
25
-
26
- registerShell('markdown', MarkdownShell);
27
- registerShell('iframe', IframeShell);
28
- registerShell('shell-theme-editor', TokenPreview);
29
- registerShell('nexusai-preview', ShellNexusPreview, { icon: '🌐', color: '#3b82f6', label: 'Web Preview' });
30
- registerShell('dataway-studio', DatawayChatShell, { icon: 'ƒ', color: '#14b8a6', label: 'Dataway M-Script Studio' });
31
- }
@@ -1,37 +0,0 @@
1
- import React from 'react';
2
- import { Omnibar } from '../Omnibar';
3
- import { TransientLayer } from '../TransientLayer';
4
- import { PanelSplitter } from '../PanelSplitter';
5
- import { ActivityBar } from '../ActivityBar';
6
- import { GodModePanel } from '../GodModePanel';
7
- import { OmniAgent } from '../OmniAgent';
8
- import { useShellStore } from '../../store/engine';
9
-
10
- export const CreatorShell: React.FC = () => {
11
- const isGodModePanelOpen = useShellStore(state => state.isGodModePanelOpen);
12
- const setGodModePanelOpen = useShellStore(state => state.setGodModePanelOpen);
13
-
14
- return (
15
- <div className="relative w-screen h-screen overflow-hidden bg-surface-primary text-text-primary flex flex-col font-sans selection:bg-purple-500/30">
16
- {/* Dynamic Background Noise & Gradients - Creator specific (Purple theme) */}
17
- <div className="absolute inset-x-0 top-0 h-[500px] w-full bg-linear-to-b from-purple-900/20 via-fuchsia-900/10 to-transparent pointer-events-none -translate-y-1/2 opacity-50 blur-[100px]" />
18
- <div className="w-full shrink-0 flex-none bg-surface-overlay backdrop-blur-md border-b border-border-subtle" style={{ height: 'max(env(safe-area-inset-top, 0px), 1.5rem)' }} />
19
-
20
- <Omnibar />
21
-
22
- {/* Creator layout relies heavily on the Splitter for IDE-like config */}
23
- <div className="flex-1 relative overflow-hidden z-10 w-full flex flex-row border-t border-purple-500/10">
24
- <ActivityBar />
25
- <div className="flex-1 relative p-4 pt-0">
26
- <PanelSplitter isRoot={true} />
27
- </div>
28
- </div>
29
-
30
- <div className="w-full shrink-0 flex-none" style={{ height: 'max(env(safe-area-inset-bottom, 0px), 1rem)' }} />
31
-
32
- <TransientLayer />
33
- {isGodModePanelOpen && <GodModePanel onClose={() => setGodModePanelOpen(false)} />}
34
- <OmniAgent />
35
- </div>
36
- );
37
- };