@tpitre/story-ui 3.4.0 → 3.4.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/dist/cli/index.js +0 -0
- package/dist/mcp-server/index.js +32 -0
- package/package.json +2 -1
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/setup.js.map +0 -1
- package/dist/cloudflare-edge/src/mcp-session.js +0 -462
- package/dist/cloudflare-edge/src/types.js +0 -4
- package/dist/cloudflare-edge/src/worker.js +0 -106
- package/dist/cloudflare-pages/vite.config.js +0 -14
- package/dist/index.d.ts +0 -13
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -12
- package/dist/index.js.map +0 -1
- package/dist/mcp-server/index.js.map +0 -1
- package/dist/mcp-server/mcp-stdio-server.js.map +0 -1
- package/dist/mcp-server/routes/claude.js.map +0 -1
- package/dist/mcp-server/routes/components.js.map +0 -1
- package/dist/mcp-server/routes/generateStory.js.map +0 -1
- package/dist/mcp-server/routes/hybridStories.d.ts +0 -18
- package/dist/mcp-server/routes/hybridStories.d.ts.map +0 -1
- package/dist/mcp-server/routes/hybridStories.js +0 -216
- package/dist/mcp-server/routes/hybridStories.js.map +0 -1
- package/dist/mcp-server/routes/memoryStories.d.ts +0 -26
- package/dist/mcp-server/routes/memoryStories.d.ts.map +0 -1
- package/dist/mcp-server/routes/memoryStories.js +0 -158
- package/dist/mcp-server/routes/memoryStories.js.map +0 -1
- package/dist/mcp-server/routes/storySync.d.ts +0 -26
- package/dist/mcp-server/routes/storySync.d.ts.map +0 -1
- package/dist/mcp-server/routes/storySync.js +0 -147
- package/dist/mcp-server/routes/storySync.js.map +0 -1
- package/dist/mcp-server/routes/updateStory.js +0 -246
- package/dist/mcp-server/sessionManager.d.ts +0 -50
- package/dist/mcp-server/sessionManager.d.ts.map +0 -1
- package/dist/mcp-server/sessionManager.js +0 -125
- package/dist/mcp-server/sessionManager.js.map +0 -1
- package/dist/playground/components/AIAssistant/AIAssistant.d.ts +0 -6
- package/dist/playground/components/AIAssistant/AIAssistant.d.ts.map +0 -1
- package/dist/playground/components/AIAssistant/AIAssistant.js +0 -109
- package/dist/playground/components/AIAssistant/AIAssistant.js.map +0 -1
- package/dist/playground/components/AIAssistant/AIAssistant.module.css +0 -166
- package/dist/playground/components/Canvas/Canvas.d.ts +0 -9
- package/dist/playground/components/Canvas/Canvas.d.ts.map +0 -1
- package/dist/playground/components/Canvas/Canvas.js +0 -58
- package/dist/playground/components/Canvas/Canvas.js.map +0 -1
- package/dist/playground/components/Canvas/Canvas.module.css +0 -189
- package/dist/playground/components/Canvas/CanvasWithDnd.d.ts +0 -9
- package/dist/playground/components/Canvas/CanvasWithDnd.d.ts.map +0 -1
- package/dist/playground/components/Canvas/CanvasWithDnd.js +0 -158
- package/dist/playground/components/Canvas/CanvasWithDnd.js.map +0 -1
- package/dist/playground/components/Canvas/ComponentRenderer.d.ts +0 -15
- package/dist/playground/components/Canvas/ComponentRenderer.d.ts.map +0 -1
- package/dist/playground/components/Canvas/ComponentRenderer.js +0 -177
- package/dist/playground/components/Canvas/ComponentRenderer.js.map +0 -1
- package/dist/playground/components/Canvas/DraggableComponent.d.ts +0 -15
- package/dist/playground/components/Canvas/DraggableComponent.d.ts.map +0 -1
- package/dist/playground/components/Canvas/DraggableComponent.js +0 -49
- package/dist/playground/components/Canvas/DraggableComponent.js.map +0 -1
- package/dist/playground/components/Canvas/index.d.ts +0 -9
- package/dist/playground/components/Canvas/index.d.ts.map +0 -1
- package/dist/playground/components/Canvas/index.js +0 -5
- package/dist/playground/components/Canvas/index.js.map +0 -1
- package/dist/playground/components/CodeView/CodeView.d.ts +0 -12
- package/dist/playground/components/CodeView/CodeView.d.ts.map +0 -1
- package/dist/playground/components/CodeView/CodeView.js +0 -77
- package/dist/playground/components/CodeView/CodeView.js.map +0 -1
- package/dist/playground/components/CodeView/CodeView.module.css +0 -178
- package/dist/playground/components/ComponentPalette/ComponentPalette.d.ts +0 -17
- package/dist/playground/components/ComponentPalette/ComponentPalette.d.ts.map +0 -1
- package/dist/playground/components/ComponentPalette/ComponentPalette.js +0 -138
- package/dist/playground/components/ComponentPalette/ComponentPalette.js.map +0 -1
- package/dist/playground/components/ComponentPalette/ComponentPalette.module.css +0 -217
- package/dist/playground/components/ComponentPalette/index.d.ts +0 -3
- package/dist/playground/components/ComponentPalette/index.d.ts.map +0 -1
- package/dist/playground/components/ComponentPalette/index.js +0 -2
- package/dist/playground/components/ComponentPalette/index.js.map +0 -1
- package/dist/playground/components/DropZone/DropZone.d.ts +0 -17
- package/dist/playground/components/DropZone/DropZone.d.ts.map +0 -1
- package/dist/playground/components/DropZone/DropZone.js +0 -73
- package/dist/playground/components/DropZone/DropZone.js.map +0 -1
- package/dist/playground/components/DropZone/DropZone.module.css +0 -86
- package/dist/playground/components/ExportDialog/ExportDialog.d.ts +0 -10
- package/dist/playground/components/ExportDialog/ExportDialog.d.ts.map +0 -1
- package/dist/playground/components/ExportDialog/ExportDialog.js +0 -57
- package/dist/playground/components/ExportDialog/ExportDialog.js.map +0 -1
- package/dist/playground/components/ExportDialog/ExportDialog.module.css +0 -328
- package/dist/playground/components/LayoutHelpers/LayoutHelpers.d.ts +0 -134
- package/dist/playground/components/LayoutHelpers/LayoutHelpers.d.ts.map +0 -1
- package/dist/playground/components/LayoutHelpers/LayoutHelpers.js +0 -254
- package/dist/playground/components/LayoutHelpers/LayoutHelpers.js.map +0 -1
- package/dist/playground/components/LayoutHelpers/index.d.ts +0 -3
- package/dist/playground/components/LayoutHelpers/index.d.ts.map +0 -1
- package/dist/playground/components/LayoutHelpers/index.js +0 -2
- package/dist/playground/components/LayoutHelpers/index.js.map +0 -1
- package/dist/playground/components/Playground/Playground.d.ts +0 -10
- package/dist/playground/components/Playground/Playground.d.ts.map +0 -1
- package/dist/playground/components/Playground/Playground.js +0 -128
- package/dist/playground/components/Playground/Playground.js.map +0 -1
- package/dist/playground/components/Playground/Playground.module.css +0 -308
- package/dist/playground/components/PropertiesPanel/PropertiesPanel.d.ts +0 -10
- package/dist/playground/components/PropertiesPanel/PropertiesPanel.d.ts.map +0 -1
- package/dist/playground/components/PropertiesPanel/PropertiesPanel.js +0 -150
- package/dist/playground/components/PropertiesPanel/PropertiesPanel.js.map +0 -1
- package/dist/playground/components/PropertiesPanel/PropertiesPanel.module.css +0 -155
- package/dist/playground/components/PropertiesPanel/index.d.ts +0 -3
- package/dist/playground/components/PropertiesPanel/index.d.ts.map +0 -1
- package/dist/playground/components/PropertiesPanel/index.js +0 -2
- package/dist/playground/components/PropertiesPanel/index.js.map +0 -1
- package/dist/playground/components/PropertyEditors/BooleanEditor.d.ts +0 -12
- package/dist/playground/components/PropertyEditors/BooleanEditor.d.ts.map +0 -1
- package/dist/playground/components/PropertyEditors/BooleanEditor.js +0 -14
- package/dist/playground/components/PropertyEditors/BooleanEditor.js.map +0 -1
- package/dist/playground/components/PropertyEditors/ColorEditor.d.ts +0 -12
- package/dist/playground/components/PropertyEditors/ColorEditor.d.ts.map +0 -1
- package/dist/playground/components/PropertyEditors/ColorEditor.js +0 -62
- package/dist/playground/components/PropertyEditors/ColorEditor.js.map +0 -1
- package/dist/playground/components/PropertyEditors/IconEditor.d.ts +0 -12
- package/dist/playground/components/PropertyEditors/IconEditor.d.ts.map +0 -1
- package/dist/playground/components/PropertyEditors/IconEditor.js +0 -123
- package/dist/playground/components/PropertyEditors/IconEditor.js.map +0 -1
- package/dist/playground/components/PropertyEditors/NumberEditor.d.ts +0 -15
- package/dist/playground/components/PropertyEditors/NumberEditor.d.ts.map +0 -1
- package/dist/playground/components/PropertyEditors/NumberEditor.js +0 -46
- package/dist/playground/components/PropertyEditors/NumberEditor.js.map +0 -1
- package/dist/playground/components/PropertyEditors/PropertyEditors.module.css +0 -432
- package/dist/playground/components/PropertyEditors/SelectEditor.d.ts +0 -19
- package/dist/playground/components/PropertyEditors/SelectEditor.d.ts.map +0 -1
- package/dist/playground/components/PropertyEditors/SelectEditor.js +0 -17
- package/dist/playground/components/PropertyEditors/SelectEditor.js.map +0 -1
- package/dist/playground/components/PropertyEditors/SpacingEditor.d.ts +0 -19
- package/dist/playground/components/PropertyEditors/SpacingEditor.d.ts.map +0 -1
- package/dist/playground/components/PropertyEditors/SpacingEditor.js +0 -162
- package/dist/playground/components/PropertyEditors/SpacingEditor.js.map +0 -1
- package/dist/playground/components/PropertyEditors/SpacingEditor.module.css +0 -214
- package/dist/playground/components/PropertyEditors/TextEditor.d.ts +0 -14
- package/dist/playground/components/PropertyEditors/TextEditor.d.ts.map +0 -1
- package/dist/playground/components/PropertyEditors/TextEditor.js +0 -38
- package/dist/playground/components/PropertyEditors/TextEditor.js.map +0 -1
- package/dist/playground/components/PropertyEditors/TokenEditor.d.ts +0 -23
- package/dist/playground/components/PropertyEditors/TokenEditor.d.ts.map +0 -1
- package/dist/playground/components/PropertyEditors/TokenEditor.js +0 -50
- package/dist/playground/components/PropertyEditors/TokenEditor.js.map +0 -1
- package/dist/playground/components/PropertyEditors/index.d.ts +0 -20
- package/dist/playground/components/PropertyEditors/index.d.ts.map +0 -1
- package/dist/playground/components/PropertyEditors/index.js +0 -12
- package/dist/playground/components/PropertyEditors/index.js.map +0 -1
- package/dist/playground/components/TreeView/TreeView.d.ts +0 -10
- package/dist/playground/components/TreeView/TreeView.d.ts.map +0 -1
- package/dist/playground/components/TreeView/TreeView.js +0 -146
- package/dist/playground/components/TreeView/TreeView.js.map +0 -1
- package/dist/playground/components/TreeView/TreeView.module.css +0 -214
- package/dist/playground/components/TreeView/index.d.ts +0 -3
- package/dist/playground/components/TreeView/index.d.ts.map +0 -1
- package/dist/playground/components/TreeView/index.js +0 -2
- package/dist/playground/components/TreeView/index.js.map +0 -1
- package/dist/playground/config/propertyDefinitions.d.ts +0 -73
- package/dist/playground/config/propertyDefinitions.d.ts.map +0 -1
- package/dist/playground/config/propertyDefinitions.js +0 -809
- package/dist/playground/config/propertyDefinitions.js.map +0 -1
- package/dist/playground/hooks/useKeyboardShortcuts.d.ts +0 -38
- package/dist/playground/hooks/useKeyboardShortcuts.d.ts.map +0 -1
- package/dist/playground/hooks/useKeyboardShortcuts.js +0 -191
- package/dist/playground/hooks/useKeyboardShortcuts.js.map +0 -1
- package/dist/playground/index.d.ts +0 -21
- package/dist/playground/index.d.ts.map +0 -1
- package/dist/playground/index.js +0 -23
- package/dist/playground/index.js.map +0 -1
- package/dist/playground/services/CodeGenerator.d.ts +0 -73
- package/dist/playground/services/CodeGenerator.d.ts.map +0 -1
- package/dist/playground/services/CodeGenerator.js +0 -359
- package/dist/playground/services/CodeGenerator.js.map +0 -1
- package/dist/playground/services/DragDropManager.d.ts +0 -95
- package/dist/playground/services/DragDropManager.d.ts.map +0 -1
- package/dist/playground/services/DragDropManager.js +0 -408
- package/dist/playground/services/DragDropManager.js.map +0 -1
- package/dist/playground/services/StoryParser.d.ts +0 -73
- package/dist/playground/services/StoryParser.d.ts.map +0 -1
- package/dist/playground/services/StoryParser.js +0 -419
- package/dist/playground/services/StoryParser.js.map +0 -1
- package/dist/playground/store/playgroundStore.d.ts +0 -86
- package/dist/playground/store/playgroundStore.d.ts.map +0 -1
- package/dist/playground/store/playgroundStore.js +0 -337
- package/dist/playground/store/playgroundStore.js.map +0 -1
- package/dist/playground/stories/PlaygroundDragDrop.stories.d.ts +0 -13
- package/dist/playground/stories/PlaygroundDragDrop.stories.d.ts.map +0 -1
- package/dist/playground/stories/PlaygroundDragDrop.stories.js +0 -227
- package/dist/playground/stories/PlaygroundDragDrop.stories.js.map +0 -1
- package/dist/playground/stories/PlaygroundPhase4.stories.d.ts +0 -13
- package/dist/playground/stories/PlaygroundPhase4.stories.d.ts.map +0 -1
- package/dist/playground/stories/PlaygroundPhase4.stories.js +0 -334
- package/dist/playground/stories/PlaygroundPhase4.stories.js.map +0 -1
- package/dist/playground/stories/PlaygroundPhase5.stories.d.ts +0 -14
- package/dist/playground/stories/PlaygroundPhase5.stories.d.ts.map +0 -1
- package/dist/playground/stories/PlaygroundPhase5.stories.js +0 -512
- package/dist/playground/stories/PlaygroundPhase5.stories.js.map +0 -1
- package/dist/playground/stories/PlaygroundProperties.stories.d.ts +0 -13
- package/dist/playground/stories/PlaygroundProperties.stories.d.ts.map +0 -1
- package/dist/playground/stories/PlaygroundProperties.stories.js +0 -342
- package/dist/playground/stories/PlaygroundProperties.stories.js.map +0 -1
- package/dist/playground/types/index.d.ts +0 -251
- package/dist/playground/types/index.d.ts.map +0 -1
- package/dist/playground/types/index.js +0 -5
- package/dist/playground/types/index.js.map +0 -1
- package/dist/scripts/verify-framework-adapters.js +0 -105
- package/dist/story-generator/componentBlacklist.js.map +0 -1
- package/dist/story-generator/componentDiscovery.js.map +0 -1
- package/dist/story-generator/configLoader.js.map +0 -1
- package/dist/story-generator/considerationsLoader.js.map +0 -1
- package/dist/story-generator/documentation-sources.js.map +0 -1
- package/dist/story-generator/documentationLoader.js.map +0 -1
- package/dist/story-generator/dynamicPackageDiscovery.js.map +0 -1
- package/dist/story-generator/enhancedComponentDiscovery.js.map +0 -1
- package/dist/story-generator/generateStory.js.map +0 -1
- package/dist/story-generator/gitignoreManager.js.map +0 -1
- package/dist/story-generator/inMemoryStoryService.d.ts +0 -89
- package/dist/story-generator/inMemoryStoryService.d.ts.map +0 -1
- package/dist/story-generator/inMemoryStoryService.js +0 -128
- package/dist/story-generator/inMemoryStoryService.js.map +0 -1
- package/dist/story-generator/logger.js.map +0 -1
- package/dist/story-generator/postProcessStory.js.map +0 -1
- package/dist/story-generator/postgresStoryService.d.ts +0 -56
- package/dist/story-generator/postgresStoryService.d.ts.map +0 -1
- package/dist/story-generator/postgresStoryService.js +0 -240
- package/dist/story-generator/productionGitignoreManager.d.ts +0 -91
- package/dist/story-generator/productionGitignoreManager.d.ts.map +0 -1
- package/dist/story-generator/productionGitignoreManager.js +0 -340
- package/dist/story-generator/productionGitignoreManager.js.map +0 -1
- package/dist/story-generator/promptGenerator.js.map +0 -1
- package/dist/story-generator/providerPresets.d.ts +0 -54
- package/dist/story-generator/providerPresets.d.ts.map +0 -1
- package/dist/story-generator/providerPresets.js +0 -214
- package/dist/story-generator/storyHistory.js.map +0 -1
- package/dist/story-generator/storyServiceFactory.d.ts +0 -22
- package/dist/story-generator/storyServiceFactory.d.ts.map +0 -1
- package/dist/story-generator/storyServiceFactory.js +0 -97
- package/dist/story-generator/storyServiceInterface.d.ts +0 -85
- package/dist/story-generator/storyServiceInterface.d.ts.map +0 -1
- package/dist/story-generator/storyServiceInterface.js +0 -5
- package/dist/story-generator/storySync.d.ts +0 -68
- package/dist/story-generator/storySync.d.ts.map +0 -1
- package/dist/story-generator/storySync.js +0 -201
- package/dist/story-generator/storySync.js.map +0 -1
- package/dist/story-generator/storyTracker.js.map +0 -1
- package/dist/story-generator/storyValidator.js.map +0 -1
- package/dist/story-generator/test_validation.d.ts +0 -2
- package/dist/story-generator/test_validation.d.ts.map +0 -1
- package/dist/story-generator/test_validation.js +0 -51
- package/dist/story-generator/universalDesignSystemAdapter.js.map +0 -1
- package/dist/story-generator/urlRedirectService.js.map +0 -1
- package/dist/story-generator/validateStory.js.map +0 -1
- package/dist/story-ui.config.js.map +0 -1
- package/dist/story-ui.config.loader.d.ts +0 -36
- package/dist/story-ui.config.loader.d.ts.map +0 -1
- package/dist/story-ui.config.loader.js +0 -205
- package/dist/story-ui.config.loader.js.map +0 -1
- package/dist/temp/package/templates/StoryUI/StoryUIPanel.js +0 -807
- package/dist/temp/package/templates/StoryUI/StoryUIPanel.stories.js +0 -37
- package/dist/temp/package/templates/StoryUI/index.js +0 -2
- package/dist/templates/StoryUI/StoryUIPanel.js.map +0 -1
- package/dist/templates/StoryUI/StoryUIPanel.stories.js.map +0 -1
- package/dist/templates/StoryUI/index.js.map +0 -1
- package/dist/templates/StoryUI/manager.d.ts +0 -14
- package/dist/templates/StoryUI/manager.d.ts.map +0 -1
- package/dist/templates/production-app/src/App.d.ts +0 -10
- package/dist/templates/production-app/src/App.d.ts.map +0 -1
- package/dist/templates/production-app/src/App.js +0 -653
- package/dist/templates/production-app/src/LivePreviewRenderer.d.ts +0 -24
- package/dist/templates/production-app/src/LivePreviewRenderer.d.ts.map +0 -1
- package/dist/templates/production-app/src/LivePreviewRenderer.js +0 -199
- package/dist/templates/production-app/src/componentRegistry.d.ts +0 -20
- package/dist/templates/production-app/src/componentRegistry.d.ts.map +0 -1
- package/dist/templates/production-app/src/componentRegistry.js +0 -316
- package/dist/templates/production-app/src/main.d.ts +0 -9
- package/dist/templates/production-app/src/main.d.ts.map +0 -1
- package/dist/templates/production-app/src/main.js +0 -18
- package/dist/templates/production-app/vite.config.d.ts +0 -3
- package/dist/templates/production-app/vite.config.d.ts.map +0 -1
- package/dist/templates/production-app/vite.config.js +0 -71
- package/dist/test-storybooks/angular-material-storybook/src/main.js +0 -66
- package/dist/test-storybooks/chakra-storybook/vite.config.js +0 -6
- package/dist/test-storybooks/mantine-storybook/vite.config.js +0 -93
- package/dist/test-storybooks/web-components-shoelace/vite.config.js +0 -9
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
export class SessionManager {
|
|
2
|
-
constructor() {
|
|
3
|
-
this.sessions = new Map();
|
|
4
|
-
this.currentStoryId = null;
|
|
5
|
-
}
|
|
6
|
-
static getInstance() {
|
|
7
|
-
if (!SessionManager.instance) {
|
|
8
|
-
SessionManager.instance = new SessionManager();
|
|
9
|
-
}
|
|
10
|
-
return SessionManager.instance;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Track a newly generated story in the current session
|
|
14
|
-
*/
|
|
15
|
-
trackStory(sessionId, story) {
|
|
16
|
-
const sessionStories = this.sessions.get(sessionId) || [];
|
|
17
|
-
// Extract keywords from prompt and title for smart matching
|
|
18
|
-
const keywords = this.extractKeywords(story.prompt + ' ' + story.title);
|
|
19
|
-
const sessionStory = {
|
|
20
|
-
...story,
|
|
21
|
-
timestamp: new Date(),
|
|
22
|
-
keywords
|
|
23
|
-
};
|
|
24
|
-
sessionStories.push(sessionStory);
|
|
25
|
-
this.sessions.set(sessionId, sessionStories);
|
|
26
|
-
this.currentStoryId = story.id;
|
|
27
|
-
console.error(`[SessionManager] Tracked story: ${story.title} (${story.id}) for session ${sessionId}`);
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Get the current story being discussed
|
|
31
|
-
*/
|
|
32
|
-
getCurrentStory(sessionId) {
|
|
33
|
-
const stories = this.sessions.get(sessionId) || [];
|
|
34
|
-
if (this.currentStoryId) {
|
|
35
|
-
return stories.find(s => s.id === this.currentStoryId) || null;
|
|
36
|
-
}
|
|
37
|
-
// Return the most recent story if no current story is set
|
|
38
|
-
return stories[stories.length - 1] || null;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Find a story by context (keywords in the user's message)
|
|
42
|
-
*/
|
|
43
|
-
findStoryByContext(sessionId, userMessage) {
|
|
44
|
-
const stories = this.sessions.get(sessionId) || [];
|
|
45
|
-
if (stories.length === 0)
|
|
46
|
-
return null;
|
|
47
|
-
const messageKeywords = this.extractKeywords(userMessage.toLowerCase());
|
|
48
|
-
// Score each story based on keyword matches
|
|
49
|
-
const scoredStories = stories.map(story => {
|
|
50
|
-
const score = story.keywords.filter(keyword => messageKeywords.some(msgKeyword => msgKeyword.includes(keyword) || keyword.includes(msgKeyword))).length;
|
|
51
|
-
return { story, score };
|
|
52
|
-
});
|
|
53
|
-
// Sort by score and recency
|
|
54
|
-
scoredStories.sort((a, b) => {
|
|
55
|
-
if (a.score !== b.score)
|
|
56
|
-
return b.score - a.score;
|
|
57
|
-
return b.story.timestamp.getTime() - a.story.timestamp.getTime();
|
|
58
|
-
});
|
|
59
|
-
// Return the best match if it has any keyword matches
|
|
60
|
-
if (scoredStories[0].score > 0) {
|
|
61
|
-
this.currentStoryId = scoredStories[0].story.id;
|
|
62
|
-
console.error(`[SessionManager] Found story by context: ${scoredStories[0].story.title} (score: ${scoredStories[0].score})`);
|
|
63
|
-
return scoredStories[0].story;
|
|
64
|
-
}
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Get all stories in the current session
|
|
69
|
-
*/
|
|
70
|
-
getSessionStories(sessionId) {
|
|
71
|
-
return this.sessions.get(sessionId) || [];
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Set the current story being discussed
|
|
75
|
-
*/
|
|
76
|
-
setCurrentStory(sessionId, storyId) {
|
|
77
|
-
const stories = this.sessions.get(sessionId) || [];
|
|
78
|
-
if (stories.some(s => s.id === storyId)) {
|
|
79
|
-
this.currentStoryId = storyId;
|
|
80
|
-
console.error(`[SessionManager] Set current story to: ${storyId}`);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Clear session data (for cleanup)
|
|
85
|
-
*/
|
|
86
|
-
clearSession(sessionId) {
|
|
87
|
-
this.sessions.delete(sessionId);
|
|
88
|
-
if (this.currentStoryId) {
|
|
89
|
-
this.currentStoryId = null;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Extract meaningful keywords from text
|
|
94
|
-
*/
|
|
95
|
-
extractKeywords(text) {
|
|
96
|
-
// Remove common words and extract meaningful terms
|
|
97
|
-
const commonWords = new Set([
|
|
98
|
-
'a', 'an', 'the', 'and', 'or', 'but', 'in', 'on', 'at', 'to', 'for',
|
|
99
|
-
'of', 'with', 'by', 'from', 'up', 'about', 'into', 'through', 'during',
|
|
100
|
-
'before', 'after', 'above', 'below', 'between', 'under', 'again', 'further',
|
|
101
|
-
'then', 'once', 'create', 'make', 'generate', 'build', 'add', 'update',
|
|
102
|
-
'component', 'story', 'please', 'should', 'would', 'could'
|
|
103
|
-
]);
|
|
104
|
-
const words = text.toLowerCase()
|
|
105
|
-
.replace(/[^a-z0-9\s]/g, ' ')
|
|
106
|
-
.split(/\s+/)
|
|
107
|
-
.filter(word => word.length > 2 && !commonWords.has(word));
|
|
108
|
-
// Also extract compound terms (like "toast notification")
|
|
109
|
-
const phrases = [];
|
|
110
|
-
const importantPhrases = [
|
|
111
|
-
'toast notification', 'banner notification', 'success message',
|
|
112
|
-
'error message', 'warning message', 'info message',
|
|
113
|
-
'dark mode', 'light mode', 'switch', 'toggle', 'button',
|
|
114
|
-
'card', 'alert', 'modal', 'dialog', 'form', 'input',
|
|
115
|
-
'table', 'list', 'grid', 'layout', 'navigation', 'menu'
|
|
116
|
-
];
|
|
117
|
-
const lowerText = text.toLowerCase();
|
|
118
|
-
for (const phrase of importantPhrases) {
|
|
119
|
-
if (lowerText.includes(phrase)) {
|
|
120
|
-
phrases.push(phrase);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return [...new Set([...words, ...phrases])];
|
|
124
|
-
}
|
|
125
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sessionManager.js","sourceRoot":"","sources":["../../mcp-server/sessionManager.ts"],"names":[],"mappings":"AAWA,MAAM,OAAO,cAAc;IAKzB;QAHQ,aAAQ,GAAgC,IAAI,GAAG,EAAE,CAAC;QAClD,mBAAc,GAAkB,IAAI,CAAC;IAEtB,CAAC;IAExB,MAAM,CAAC,WAAW;QAChB,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;YAC7B,cAAc,CAAC,QAAQ,GAAG,IAAI,cAAc,EAAE,CAAC;QACjD,CAAC;QACD,OAAO,cAAc,CAAC,QAAQ,CAAC;IACjC,CAAC;IAED;;OAEG;IACH,UAAU,CAAC,SAAiB,EAAE,KAK7B;QACC,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QAE1D,4DAA4D;QAC5D,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QAExE,MAAM,YAAY,GAAiB;YACjC,GAAG,KAAK;YACR,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,QAAQ;SACT,CAAC;QAE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AAG,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;QAE7D,0DAA0D;QAC1D,MAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,MAAM,gBAAgB,GAAG;YACvB,oBAAoB,EAAE,qBAAqB,EAAE,iBAAiB;YAC9D,eAAe,EAAE,iBAAiB,EAAE,cAAc;YAClD,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ;YACvD,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO;YACnD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM;SACxD,CAAC;QAEF,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QACrC,KAAK,MAAM,MAAM,IAAI,gBAAgB,EAAE,CAAC;YACtC,IAAI,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC/B,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACvB,CAAC;QACH,CAAC;QAED,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,KAAK,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAC9C,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AIAssistant.d.ts","sourceRoot":"","sources":["../../../../playground/components/AIAssistant/AIAssistant.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAwC,MAAM,OAAO,CAAC;AAqB7D,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAsM/B,CAAC"}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* AIAssistant - Connects to existing Story UI generation and enables visual editing
|
|
4
|
-
*/
|
|
5
|
-
import { useState, useCallback, useRef } from 'react';
|
|
6
|
-
import { usePlaygroundStore } from '../../store/playgroundStore';
|
|
7
|
-
import { StoryParser } from '../../services/StoryParser';
|
|
8
|
-
import styles from './AIAssistant.module.css';
|
|
9
|
-
// Get the MCP API port (same as StoryUIPanel)
|
|
10
|
-
const getApiPort = () => {
|
|
11
|
-
const vitePort = import.meta.env?.VITE_STORY_UI_PORT;
|
|
12
|
-
if (vitePort)
|
|
13
|
-
return String(vitePort);
|
|
14
|
-
const windowOverride = window.__STORY_UI_PORT__;
|
|
15
|
-
if (windowOverride)
|
|
16
|
-
return String(windowOverride);
|
|
17
|
-
const mcpOverride = window.STORY_UI_MCP_PORT;
|
|
18
|
-
if (mcpOverride)
|
|
19
|
-
return String(mcpOverride);
|
|
20
|
-
return '4001';
|
|
21
|
-
};
|
|
22
|
-
const MCP_API = `http://localhost:${getApiPort()}/story-ui/generate`;
|
|
23
|
-
export const AIAssistant = () => {
|
|
24
|
-
const [prompt, setPrompt] = useState('');
|
|
25
|
-
const [isGenerating, setIsGenerating] = useState(false);
|
|
26
|
-
const [error, setError] = useState(null);
|
|
27
|
-
const [hasGenerated, setHasGenerated] = useState(false);
|
|
28
|
-
const textareaRef = useRef(null);
|
|
29
|
-
const { setGeneratedStoryCode, setIsParsingStory, setParseError, loadComponentsFromStory, setMode } = usePlaygroundStore();
|
|
30
|
-
const parser = useRef(new StoryParser());
|
|
31
|
-
// Generate layout using existing Story UI API
|
|
32
|
-
const handleGenerate = useCallback(async () => {
|
|
33
|
-
if (!prompt.trim() || isGenerating)
|
|
34
|
-
return;
|
|
35
|
-
setIsGenerating(true);
|
|
36
|
-
setError(null);
|
|
37
|
-
try {
|
|
38
|
-
// Call existing Story UI generation API
|
|
39
|
-
const response = await fetch(MCP_API, {
|
|
40
|
-
method: 'POST',
|
|
41
|
-
headers: { 'Content-Type': 'application/json' },
|
|
42
|
-
body: JSON.stringify({
|
|
43
|
-
prompt,
|
|
44
|
-
// Add hint for playground-optimized generation
|
|
45
|
-
conversation: [{
|
|
46
|
-
role: 'system',
|
|
47
|
-
content: 'Generate a layout with clear component structure suitable for visual editing.'
|
|
48
|
-
}, {
|
|
49
|
-
role: 'user',
|
|
50
|
-
content: prompt
|
|
51
|
-
}]
|
|
52
|
-
})
|
|
53
|
-
});
|
|
54
|
-
if (!response.ok) {
|
|
55
|
-
throw new Error(`Generation failed: ${response.statusText}`);
|
|
56
|
-
}
|
|
57
|
-
const data = await response.json();
|
|
58
|
-
if (!data.success) {
|
|
59
|
-
throw new Error(data.error || 'Story generation failed');
|
|
60
|
-
}
|
|
61
|
-
// Store the generated code
|
|
62
|
-
setGeneratedStoryCode(data.code || data.story);
|
|
63
|
-
// Parse the generated story into playground components
|
|
64
|
-
setIsParsingStory(true);
|
|
65
|
-
const parseResult = await parser.current.parseStoryToComponents(data.code || data.story);
|
|
66
|
-
if (parseResult.success) {
|
|
67
|
-
loadComponentsFromStory(parseResult.components);
|
|
68
|
-
setHasGenerated(true);
|
|
69
|
-
// Show any warnings
|
|
70
|
-
if (parseResult.warnings && parseResult.warnings.length > 0) {
|
|
71
|
-
console.warn('Parse warnings:', parseResult.warnings);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
throw new Error(parseResult.error || 'Failed to parse story');
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
catch (err) {
|
|
79
|
-
const errorMessage = err instanceof Error ? err.message : 'Unknown error';
|
|
80
|
-
setError(errorMessage);
|
|
81
|
-
setParseError(errorMessage);
|
|
82
|
-
}
|
|
83
|
-
finally {
|
|
84
|
-
setIsGenerating(false);
|
|
85
|
-
setIsParsingStory(false);
|
|
86
|
-
}
|
|
87
|
-
}, [
|
|
88
|
-
prompt,
|
|
89
|
-
isGenerating,
|
|
90
|
-
setGeneratedStoryCode,
|
|
91
|
-
setIsParsingStory,
|
|
92
|
-
setParseError,
|
|
93
|
-
loadComponentsFromStory
|
|
94
|
-
]);
|
|
95
|
-
// Switch to edit mode
|
|
96
|
-
const handleEditLayout = useCallback(() => {
|
|
97
|
-
setMode('edit');
|
|
98
|
-
// Additional edit mode setup could go here
|
|
99
|
-
}, [setMode]);
|
|
100
|
-
// Handle Enter key
|
|
101
|
-
const handleKeyDown = useCallback((e) => {
|
|
102
|
-
if (e.key === 'Enter' && e.metaKey) {
|
|
103
|
-
e.preventDefault();
|
|
104
|
-
handleGenerate();
|
|
105
|
-
}
|
|
106
|
-
}, [handleGenerate]);
|
|
107
|
-
return (_jsxs("div", { className: styles.container, children: [_jsxs("div", { className: styles.section, children: [_jsx("label", { className: styles.label, children: "Describe your layout" }), _jsx("textarea", { ref: textareaRef, className: styles.textarea, value: prompt, onChange: (e) => setPrompt(e.target.value), onKeyDown: handleKeyDown, placeholder: "Create a dashboard with a header, sidebar navigation, and main content area with cards...", rows: 4, disabled: isGenerating }), _jsxs("div", { className: styles.buttonGroup, children: [_jsx("button", { className: `${styles.button} ${styles.primaryButton}`, onClick: handleGenerate, disabled: !prompt.trim() || isGenerating, children: isGenerating ? (_jsxs(_Fragment, { children: [_jsx("span", { className: styles.spinner }), "Generating..."] })) : (_jsxs(_Fragment, { children: [_jsx("span", { className: styles.icon, children: "\u2728" }), "Generate Layout"] })) }), hasGenerated && (_jsxs("button", { className: `${styles.button} ${styles.secondaryButton}`, onClick: handleEditLayout, children: [_jsx("span", { className: styles.icon, children: "\u270F\uFE0F" }), "Edit Layout"] }))] }), error && (_jsxs("div", { className: styles.error, children: [_jsx("span", { className: styles.errorIcon, children: "\u26A0\uFE0F" }), error] }))] }), _jsxs("div", { className: styles.section, children: [_jsx("h3", { className: styles.sectionTitle, children: "Suggestions" }), _jsxs("div", { className: styles.suggestions, children: [_jsx("button", { className: styles.suggestion, onClick: () => setPrompt('Create a blog post layout with header, content, and sidebar'), children: "Blog Layout" }), _jsx("button", { className: styles.suggestion, onClick: () => setPrompt('Build a product card grid with filters'), children: "Product Grid" }), _jsx("button", { className: styles.suggestion, onClick: () => setPrompt('Design a user profile page with stats and activity feed'), children: "Profile Page" }), _jsx("button", { className: styles.suggestion, onClick: () => setPrompt('Create a dashboard with charts and metrics'), children: "Dashboard" })] })] }), _jsxs("div", { className: styles.section, children: [_jsx("h3", { className: styles.sectionTitle, children: "Tips" }), _jsxs("ul", { className: styles.tips, children: [_jsx("li", { children: "Be specific about layout structure and components" }), _jsx("li", { children: "Mention spacing and alignment preferences" }), _jsx("li", { children: "After generation, click \"Edit Layout\" to refine visually" }), _jsx("li", { children: "Use Cmd+Enter to generate quickly" })] })] })] }));
|
|
108
|
-
};
|
|
109
|
-
//# sourceMappingURL=AIAssistant.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AIAssistant.js","sourceRoot":"","sources":["../../../../playground/components/AIAssistant/AIAssistant.tsx"],"names":[],"mappings":";AAAA;;GAEG;AAEH,OAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAE9C,8CAA8C;AAC9C,MAAM,UAAU,GAAG,GAAG,EAAE;IACtB,MAAM,QAAQ,GAAI,MAAM,CAAC,IAAY,CAAC,GAAG,EAAE,kBAAkB,CAAC;IAC9D,IAAI,QAAQ;QAAE,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC;IAEtC,MAAM,cAAc,GAAI,MAAc,CAAC,iBAAiB,CAAC;IACzD,IAAI,cAAc;QAAE,OAAO,MAAM,CAAC,cAAc,CAAC,CAAC;IAElD,MAAM,WAAW,GAAI,MAAc,CAAC,iBAAiB,CAAC;IACtD,IAAI,WAAW;QAAE,OAAO,MAAM,CAAC,WAAW,CAAC,CAAC;IAE5C,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,OAAO,GAAG,oBAAoB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CAA4C,CAAC,0BAG/D,IACL,IACF,EAEN,eAAK,SAAS,EAAE,MAAM,CAAC,OAAO,aAC5B,aAAI,SAAS,EAAE,MAAM,CAAC,YAAY,qBAAW,EAC7C,cAAI,SAAS,EAAE,MAAM,CAAC,IAAI,aACxB,6EAA0D,EAC1D,qEAAkD,EAClD,sFAAiE,EACjE,6DAA0C,IACvC,IACD,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
/* AI Assistant styles */
|
|
2
|
-
|
|
3
|
-
.container {
|
|
4
|
-
padding: 16px;
|
|
5
|
-
height: 100%;
|
|
6
|
-
overflow-y: auto;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.section {
|
|
10
|
-
margin-bottom: 24px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.label {
|
|
14
|
-
display: block;
|
|
15
|
-
font-size: 14px;
|
|
16
|
-
font-weight: 500;
|
|
17
|
-
color: #374151;
|
|
18
|
-
margin-bottom: 8px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.textarea {
|
|
22
|
-
width: 100%;
|
|
23
|
-
padding: 12px;
|
|
24
|
-
border: 1px solid #d1d5db;
|
|
25
|
-
border-radius: 8px;
|
|
26
|
-
font-size: 14px;
|
|
27
|
-
font-family: inherit;
|
|
28
|
-
resize: vertical;
|
|
29
|
-
transition: border-color 0.2s;
|
|
30
|
-
box-sizing: border-box;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.textarea:focus {
|
|
34
|
-
outline: none;
|
|
35
|
-
border-color: #3b82f6;
|
|
36
|
-
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.textarea:disabled {
|
|
40
|
-
background: #f3f4f6;
|
|
41
|
-
cursor: not-allowed;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.buttonGroup {
|
|
45
|
-
display: flex;
|
|
46
|
-
gap: 8px;
|
|
47
|
-
margin-top: 12px;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.button {
|
|
51
|
-
flex: 1;
|
|
52
|
-
padding: 10px 16px;
|
|
53
|
-
border-radius: 8px;
|
|
54
|
-
font-size: 14px;
|
|
55
|
-
font-weight: 500;
|
|
56
|
-
font-family: inherit;
|
|
57
|
-
cursor: pointer;
|
|
58
|
-
transition: all 0.2s;
|
|
59
|
-
display: flex;
|
|
60
|
-
align-items: center;
|
|
61
|
-
justify-content: center;
|
|
62
|
-
gap: 8px;
|
|
63
|
-
border: none;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.button:disabled {
|
|
67
|
-
opacity: 0.5;
|
|
68
|
-
cursor: not-allowed;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.primaryButton {
|
|
72
|
-
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
|
|
73
|
-
color: white;
|
|
74
|
-
box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.primaryButton:hover:not(:disabled) {
|
|
78
|
-
transform: translateY(-1px);
|
|
79
|
-
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.secondaryButton {
|
|
83
|
-
background: white;
|
|
84
|
-
color: #3b82f6;
|
|
85
|
-
border: 1px solid #3b82f6;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.secondaryButton:hover:not(:disabled) {
|
|
89
|
-
background: #eff6ff;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.icon {
|
|
93
|
-
font-size: 16px;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.spinner {
|
|
97
|
-
width: 14px;
|
|
98
|
-
height: 14px;
|
|
99
|
-
border: 2px solid rgba(255, 255, 255, 0.3);
|
|
100
|
-
border-top-color: white;
|
|
101
|
-
border-radius: 50%;
|
|
102
|
-
animation: spin 0.6s linear infinite;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
@keyframes spin {
|
|
106
|
-
to { transform: rotate(360deg); }
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.error {
|
|
110
|
-
margin-top: 12px;
|
|
111
|
-
padding: 12px;
|
|
112
|
-
background: #fee2e2;
|
|
113
|
-
border: 1px solid #fecaca;
|
|
114
|
-
border-radius: 8px;
|
|
115
|
-
color: #dc2626;
|
|
116
|
-
font-size: 14px;
|
|
117
|
-
display: flex;
|
|
118
|
-
align-items: flex-start;
|
|
119
|
-
gap: 8px;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.errorIcon {
|
|
123
|
-
flex-shrink: 0;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.sectionTitle {
|
|
127
|
-
font-size: 14px;
|
|
128
|
-
font-weight: 600;
|
|
129
|
-
color: #1f2937;
|
|
130
|
-
margin: 0 0 12px 0;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.suggestions {
|
|
134
|
-
display: flex;
|
|
135
|
-
flex-wrap: wrap;
|
|
136
|
-
gap: 8px;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.suggestion {
|
|
140
|
-
padding: 6px 12px;
|
|
141
|
-
background: #f3f4f6;
|
|
142
|
-
border: 1px solid #e5e7eb;
|
|
143
|
-
border-radius: 6px;
|
|
144
|
-
font-size: 13px;
|
|
145
|
-
color: #4b5563;
|
|
146
|
-
cursor: pointer;
|
|
147
|
-
transition: all 0.2s;
|
|
148
|
-
font-family: inherit;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.suggestion:hover {
|
|
152
|
-
background: #e5e7eb;
|
|
153
|
-
color: #1f2937;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.tips {
|
|
157
|
-
margin: 0;
|
|
158
|
-
padding-left: 20px;
|
|
159
|
-
color: #6b7280;
|
|
160
|
-
font-size: 13px;
|
|
161
|
-
line-height: 1.6;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.tips li {
|
|
165
|
-
margin-bottom: 6px;
|
|
166
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Canvas.d.ts","sourceRoot":"","sources":["../../../../playground/components/Canvas/Canvas.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAyC,MAAM,OAAO,CAAC;AAO9D,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA6HxC,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* Canvas - Main rendering surface for visual components
|
|
4
|
-
*/
|
|
5
|
-
import { useEffect, useRef, useCallback } from 'react';
|
|
6
|
-
import { usePlaygroundStore } from '../../store/playgroundStore';
|
|
7
|
-
import { DropZone } from '../DropZone/DropZone';
|
|
8
|
-
import { DraggableComponent } from './DraggableComponent';
|
|
9
|
-
import styles from './Canvas.module.css';
|
|
10
|
-
export const Canvas = ({ onReady }) => {
|
|
11
|
-
const canvasRef = useRef(null);
|
|
12
|
-
const { components, rootId, selectedIds, hoveredId, canvasZoom, canvasOffset, showGrid, gridSize, mode, selectComponent, deselectAll, setHoveredComponent } = usePlaygroundStore();
|
|
13
|
-
// Notify when canvas is ready
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
onReady?.();
|
|
16
|
-
}, [onReady]);
|
|
17
|
-
// Handle canvas click for deselection
|
|
18
|
-
const handleCanvasClick = useCallback((e) => {
|
|
19
|
-
// Only deselect if clicking directly on canvas
|
|
20
|
-
if (e.target === e.currentTarget) {
|
|
21
|
-
deselectAll();
|
|
22
|
-
}
|
|
23
|
-
}, [deselectAll]);
|
|
24
|
-
// Handle keyboard shortcuts
|
|
25
|
-
useEffect(() => {
|
|
26
|
-
const handleKeyDown = (e) => {
|
|
27
|
-
// Delete selected components
|
|
28
|
-
if ((e.key === 'Delete' || e.key === 'Backspace') && selectedIds.size > 0) {
|
|
29
|
-
e.preventDefault();
|
|
30
|
-
// Implementation would go here
|
|
31
|
-
}
|
|
32
|
-
// Select all
|
|
33
|
-
if (e.metaKey && e.key === 'a') {
|
|
34
|
-
e.preventDefault();
|
|
35
|
-
// Implementation would go here
|
|
36
|
-
}
|
|
37
|
-
// Deselect all
|
|
38
|
-
if (e.key === 'Escape') {
|
|
39
|
-
e.preventDefault();
|
|
40
|
-
deselectAll();
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
window.addEventListener('keydown', handleKeyDown);
|
|
44
|
-
return () => window.removeEventListener('keydown', handleKeyDown);
|
|
45
|
-
}, [selectedIds, deselectAll]);
|
|
46
|
-
// Get root component
|
|
47
|
-
const rootComponent = components.get(rootId);
|
|
48
|
-
if (!rootComponent) {
|
|
49
|
-
return (_jsx("div", { className: styles.canvas, children: _jsxs("div", { className: styles.emptyState, children: [_jsx("p", { children: "No components to display" }), _jsx("p", { className: styles.hint, children: "Use the AI Assistant to generate a layout or drag components from the palette" })] }) }));
|
|
50
|
-
}
|
|
51
|
-
return (_jsx("div", { ref: canvasRef, className: styles.canvas, onClick: handleCanvasClick, "data-mode": mode, "data-canvas": true, children: _jsxs("div", { className: styles.viewport, style: {
|
|
52
|
-
transform: `scale(${canvasZoom}) translate(${canvasOffset.x}px, ${canvasOffset.y}px)`,
|
|
53
|
-
transformOrigin: 'top left'
|
|
54
|
-
}, children: [showGrid && (_jsx("div", { className: styles.grid, style: {
|
|
55
|
-
backgroundSize: `${gridSize}px ${gridSize}px`
|
|
56
|
-
} })), _jsx("div", { className: styles.componentContainer, children: _jsx(DropZone, { id: "root-drop-zone", componentId: rootId, accepts: ['all'], showIndicator: mode === 'edit', children: _jsx(DraggableComponent, { component: rootComponent, isRoot: true, isSelected: selectedIds.has(rootId), isHovered: hoveredId === rootId, onSelect: (id) => selectComponent(id), onHover: (id) => setHoveredComponent(id) }) }) }), selectedIds.size > 0 && (_jsx("div", { className: styles.selectionOverlay }))] }) }));
|
|
57
|
-
};
|
|
58
|
-
//# sourceMappingURL=Canvas.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Canvas.js","sourceRoot":"","sources":["../../../../playground/components/Canvas/Canvas.tsx"],"names":[],"mappings":";AAAA;;GAEG;AAEH,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAMzC,MAAM,CAAC,MAAM,MAAM,GAA0B,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;IAC3D,MAAM,SAAS,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC/C,MAAM,EACJ,UAAU,EACV,MAAM,EACN,WAAW,EACX,SAAS,EACT,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,eAAe,EACf,WAAW,EACX,mBAAmB,EACpB,GAAG,kBAAkB,EAAE,CAAC;IAEzB,8BAA8B;IAC9B,SAAS,CAAC,GAAG,EAAE;QACb,OAAO,EAAE,EAAE,CAAC;IACd,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,sCAAsC;IACtC,MAAM,iBAAiB,GAAG,WAAW,CAAC,CAAC,CAAmB,EAAE,EAAE;QAC5D,+CAA+C;QAC/C,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,aAAa,EAAE,CAAC;YACjC,WAAW,EAAE,CAAC;QAChB,CAAC;IACH,CAAC,EAAE,CAAC,WAAW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