@tpitre/story-ui 3.3.0 → 3.4.0
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/cli/index.js.map +1 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/cloudflare-edge/src/mcp-session.js +462 -0
- package/dist/cloudflare-edge/src/types.js +4 -0
- package/dist/cloudflare-edge/src/worker.js +106 -0
- package/dist/cloudflare-pages/vite.config.js +14 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-server/index.js.map +1 -0
- package/dist/mcp-server/mcp-stdio-server.js.map +1 -0
- package/dist/mcp-server/routes/claude.js.map +1 -0
- package/dist/mcp-server/routes/components.js.map +1 -0
- package/dist/mcp-server/routes/generateStory.js.map +1 -0
- package/dist/mcp-server/routes/hybridStories.d.ts +18 -0
- package/dist/mcp-server/routes/hybridStories.d.ts.map +1 -0
- package/dist/mcp-server/routes/hybridStories.js +216 -0
- package/dist/mcp-server/routes/hybridStories.js.map +1 -0
- package/dist/mcp-server/routes/memoryStories.d.ts +26 -0
- package/dist/mcp-server/routes/memoryStories.d.ts.map +1 -0
- package/dist/mcp-server/routes/memoryStories.js +158 -0
- package/dist/mcp-server/routes/memoryStories.js.map +1 -0
- package/dist/mcp-server/routes/storySync.d.ts +26 -0
- package/dist/mcp-server/routes/storySync.d.ts.map +1 -0
- package/dist/mcp-server/routes/storySync.js +147 -0
- package/dist/mcp-server/routes/storySync.js.map +1 -0
- package/dist/mcp-server/routes/updateStory.js +246 -0
- package/dist/mcp-server/sessionManager.d.ts +50 -0
- package/dist/mcp-server/sessionManager.d.ts.map +1 -0
- package/dist/mcp-server/sessionManager.js +125 -0
- package/dist/mcp-server/sessionManager.js.map +1 -0
- package/dist/playground/components/AIAssistant/AIAssistant.d.ts +6 -0
- package/dist/playground/components/AIAssistant/AIAssistant.d.ts.map +1 -0
- package/dist/playground/components/AIAssistant/AIAssistant.js +109 -0
- package/dist/playground/components/AIAssistant/AIAssistant.js.map +1 -0
- package/dist/playground/components/AIAssistant/AIAssistant.module.css +166 -0
- package/dist/playground/components/Canvas/Canvas.d.ts +9 -0
- package/dist/playground/components/Canvas/Canvas.d.ts.map +1 -0
- package/dist/playground/components/Canvas/Canvas.js +58 -0
- package/dist/playground/components/Canvas/Canvas.js.map +1 -0
- package/dist/playground/components/Canvas/Canvas.module.css +189 -0
- package/dist/playground/components/Canvas/CanvasWithDnd.d.ts +9 -0
- package/dist/playground/components/Canvas/CanvasWithDnd.d.ts.map +1 -0
- package/dist/playground/components/Canvas/CanvasWithDnd.js +158 -0
- package/dist/playground/components/Canvas/CanvasWithDnd.js.map +1 -0
- package/dist/playground/components/Canvas/ComponentRenderer.d.ts +15 -0
- package/dist/playground/components/Canvas/ComponentRenderer.d.ts.map +1 -0
- package/dist/playground/components/Canvas/ComponentRenderer.js +177 -0
- package/dist/playground/components/Canvas/ComponentRenderer.js.map +1 -0
- package/dist/playground/components/Canvas/DraggableComponent.d.ts +15 -0
- package/dist/playground/components/Canvas/DraggableComponent.d.ts.map +1 -0
- package/dist/playground/components/Canvas/DraggableComponent.js +49 -0
- package/dist/playground/components/Canvas/DraggableComponent.js.map +1 -0
- package/dist/playground/components/Canvas/index.d.ts +9 -0
- package/dist/playground/components/Canvas/index.d.ts.map +1 -0
- package/dist/playground/components/Canvas/index.js +5 -0
- package/dist/playground/components/Canvas/index.js.map +1 -0
- package/dist/playground/components/CodeView/CodeView.d.ts +12 -0
- package/dist/playground/components/CodeView/CodeView.d.ts.map +1 -0
- package/dist/playground/components/CodeView/CodeView.js +77 -0
- package/dist/playground/components/CodeView/CodeView.js.map +1 -0
- package/dist/playground/components/CodeView/CodeView.module.css +178 -0
- package/dist/playground/components/ComponentPalette/ComponentPalette.d.ts +17 -0
- package/dist/playground/components/ComponentPalette/ComponentPalette.d.ts.map +1 -0
- package/dist/playground/components/ComponentPalette/ComponentPalette.js +138 -0
- package/dist/playground/components/ComponentPalette/ComponentPalette.js.map +1 -0
- package/dist/playground/components/ComponentPalette/ComponentPalette.module.css +217 -0
- package/dist/playground/components/ComponentPalette/index.d.ts +3 -0
- package/dist/playground/components/ComponentPalette/index.d.ts.map +1 -0
- package/dist/playground/components/ComponentPalette/index.js +2 -0
- package/dist/playground/components/ComponentPalette/index.js.map +1 -0
- package/dist/playground/components/DropZone/DropZone.d.ts +17 -0
- package/dist/playground/components/DropZone/DropZone.d.ts.map +1 -0
- package/dist/playground/components/DropZone/DropZone.js +73 -0
- package/dist/playground/components/DropZone/DropZone.js.map +1 -0
- package/dist/playground/components/DropZone/DropZone.module.css +86 -0
- package/dist/playground/components/ExportDialog/ExportDialog.d.ts +10 -0
- package/dist/playground/components/ExportDialog/ExportDialog.d.ts.map +1 -0
- package/dist/playground/components/ExportDialog/ExportDialog.js +57 -0
- package/dist/playground/components/ExportDialog/ExportDialog.js.map +1 -0
- package/dist/playground/components/ExportDialog/ExportDialog.module.css +328 -0
- package/dist/playground/components/LayoutHelpers/LayoutHelpers.d.ts +134 -0
- package/dist/playground/components/LayoutHelpers/LayoutHelpers.d.ts.map +1 -0
- package/dist/playground/components/LayoutHelpers/LayoutHelpers.js +254 -0
- package/dist/playground/components/LayoutHelpers/LayoutHelpers.js.map +1 -0
- package/dist/playground/components/LayoutHelpers/index.d.ts +3 -0
- package/dist/playground/components/LayoutHelpers/index.d.ts.map +1 -0
- package/dist/playground/components/LayoutHelpers/index.js +2 -0
- package/dist/playground/components/LayoutHelpers/index.js.map +1 -0
- package/dist/playground/components/Playground/Playground.d.ts +10 -0
- package/dist/playground/components/Playground/Playground.d.ts.map +1 -0
- package/dist/playground/components/Playground/Playground.js +128 -0
- package/dist/playground/components/Playground/Playground.js.map +1 -0
- package/dist/playground/components/Playground/Playground.module.css +308 -0
- package/dist/playground/components/PropertiesPanel/PropertiesPanel.d.ts +10 -0
- package/dist/playground/components/PropertiesPanel/PropertiesPanel.d.ts.map +1 -0
- package/dist/playground/components/PropertiesPanel/PropertiesPanel.js +150 -0
- package/dist/playground/components/PropertiesPanel/PropertiesPanel.js.map +1 -0
- package/dist/playground/components/PropertiesPanel/PropertiesPanel.module.css +155 -0
- package/dist/playground/components/PropertiesPanel/index.d.ts +3 -0
- package/dist/playground/components/PropertiesPanel/index.d.ts.map +1 -0
- package/dist/playground/components/PropertiesPanel/index.js +2 -0
- package/dist/playground/components/PropertiesPanel/index.js.map +1 -0
- package/dist/playground/components/PropertyEditors/BooleanEditor.d.ts +12 -0
- package/dist/playground/components/PropertyEditors/BooleanEditor.d.ts.map +1 -0
- package/dist/playground/components/PropertyEditors/BooleanEditor.js +14 -0
- package/dist/playground/components/PropertyEditors/BooleanEditor.js.map +1 -0
- package/dist/playground/components/PropertyEditors/ColorEditor.d.ts +12 -0
- package/dist/playground/components/PropertyEditors/ColorEditor.d.ts.map +1 -0
- package/dist/playground/components/PropertyEditors/ColorEditor.js +62 -0
- package/dist/playground/components/PropertyEditors/ColorEditor.js.map +1 -0
- package/dist/playground/components/PropertyEditors/IconEditor.d.ts +12 -0
- package/dist/playground/components/PropertyEditors/IconEditor.d.ts.map +1 -0
- package/dist/playground/components/PropertyEditors/IconEditor.js +123 -0
- package/dist/playground/components/PropertyEditors/IconEditor.js.map +1 -0
- package/dist/playground/components/PropertyEditors/NumberEditor.d.ts +15 -0
- package/dist/playground/components/PropertyEditors/NumberEditor.d.ts.map +1 -0
- package/dist/playground/components/PropertyEditors/NumberEditor.js +46 -0
- package/dist/playground/components/PropertyEditors/NumberEditor.js.map +1 -0
- package/dist/playground/components/PropertyEditors/PropertyEditors.module.css +432 -0
- package/dist/playground/components/PropertyEditors/SelectEditor.d.ts +19 -0
- package/dist/playground/components/PropertyEditors/SelectEditor.d.ts.map +1 -0
- package/dist/playground/components/PropertyEditors/SelectEditor.js +17 -0
- package/dist/playground/components/PropertyEditors/SelectEditor.js.map +1 -0
- package/dist/playground/components/PropertyEditors/SpacingEditor.d.ts +19 -0
- package/dist/playground/components/PropertyEditors/SpacingEditor.d.ts.map +1 -0
- package/dist/playground/components/PropertyEditors/SpacingEditor.js +162 -0
- package/dist/playground/components/PropertyEditors/SpacingEditor.js.map +1 -0
- package/dist/playground/components/PropertyEditors/SpacingEditor.module.css +214 -0
- package/dist/playground/components/PropertyEditors/TextEditor.d.ts +14 -0
- package/dist/playground/components/PropertyEditors/TextEditor.d.ts.map +1 -0
- package/dist/playground/components/PropertyEditors/TextEditor.js +38 -0
- package/dist/playground/components/PropertyEditors/TextEditor.js.map +1 -0
- package/dist/playground/components/PropertyEditors/TokenEditor.d.ts +23 -0
- package/dist/playground/components/PropertyEditors/TokenEditor.d.ts.map +1 -0
- package/dist/playground/components/PropertyEditors/TokenEditor.js +50 -0
- package/dist/playground/components/PropertyEditors/TokenEditor.js.map +1 -0
- package/dist/playground/components/PropertyEditors/index.d.ts +20 -0
- package/dist/playground/components/PropertyEditors/index.d.ts.map +1 -0
- package/dist/playground/components/PropertyEditors/index.js +12 -0
- package/dist/playground/components/PropertyEditors/index.js.map +1 -0
- package/dist/playground/components/TreeView/TreeView.d.ts +10 -0
- package/dist/playground/components/TreeView/TreeView.d.ts.map +1 -0
- package/dist/playground/components/TreeView/TreeView.js +146 -0
- package/dist/playground/components/TreeView/TreeView.js.map +1 -0
- package/dist/playground/components/TreeView/TreeView.module.css +214 -0
- package/dist/playground/components/TreeView/index.d.ts +3 -0
- package/dist/playground/components/TreeView/index.d.ts.map +1 -0
- package/dist/playground/components/TreeView/index.js +2 -0
- package/dist/playground/components/TreeView/index.js.map +1 -0
- package/dist/playground/config/propertyDefinitions.d.ts +73 -0
- package/dist/playground/config/propertyDefinitions.d.ts.map +1 -0
- package/dist/playground/config/propertyDefinitions.js +809 -0
- package/dist/playground/config/propertyDefinitions.js.map +1 -0
- package/dist/playground/hooks/useKeyboardShortcuts.d.ts +38 -0
- package/dist/playground/hooks/useKeyboardShortcuts.d.ts.map +1 -0
- package/dist/playground/hooks/useKeyboardShortcuts.js +191 -0
- package/dist/playground/hooks/useKeyboardShortcuts.js.map +1 -0
- package/dist/playground/index.d.ts +21 -0
- package/dist/playground/index.d.ts.map +1 -0
- package/dist/playground/index.js +23 -0
- package/dist/playground/index.js.map +1 -0
- package/dist/playground/services/CodeGenerator.d.ts +73 -0
- package/dist/playground/services/CodeGenerator.d.ts.map +1 -0
- package/dist/playground/services/CodeGenerator.js +359 -0
- package/dist/playground/services/CodeGenerator.js.map +1 -0
- package/dist/playground/services/DragDropManager.d.ts +95 -0
- package/dist/playground/services/DragDropManager.d.ts.map +1 -0
- package/dist/playground/services/DragDropManager.js +408 -0
- package/dist/playground/services/DragDropManager.js.map +1 -0
- package/dist/playground/services/StoryParser.d.ts +73 -0
- package/dist/playground/services/StoryParser.d.ts.map +1 -0
- package/dist/playground/services/StoryParser.js +419 -0
- package/dist/playground/services/StoryParser.js.map +1 -0
- package/dist/playground/store/playgroundStore.d.ts +86 -0
- package/dist/playground/store/playgroundStore.d.ts.map +1 -0
- package/dist/playground/store/playgroundStore.js +337 -0
- package/dist/playground/store/playgroundStore.js.map +1 -0
- package/dist/playground/stories/PlaygroundDragDrop.stories.d.ts +13 -0
- package/dist/playground/stories/PlaygroundDragDrop.stories.d.ts.map +1 -0
- package/dist/playground/stories/PlaygroundDragDrop.stories.js +227 -0
- package/dist/playground/stories/PlaygroundDragDrop.stories.js.map +1 -0
- package/dist/playground/stories/PlaygroundPhase4.stories.d.ts +13 -0
- package/dist/playground/stories/PlaygroundPhase4.stories.d.ts.map +1 -0
- package/dist/playground/stories/PlaygroundPhase4.stories.js +334 -0
- package/dist/playground/stories/PlaygroundPhase4.stories.js.map +1 -0
- package/dist/playground/stories/PlaygroundPhase5.stories.d.ts +14 -0
- package/dist/playground/stories/PlaygroundPhase5.stories.d.ts.map +1 -0
- package/dist/playground/stories/PlaygroundPhase5.stories.js +512 -0
- package/dist/playground/stories/PlaygroundPhase5.stories.js.map +1 -0
- package/dist/playground/stories/PlaygroundProperties.stories.d.ts +13 -0
- package/dist/playground/stories/PlaygroundProperties.stories.d.ts.map +1 -0
- package/dist/playground/stories/PlaygroundProperties.stories.js +342 -0
- package/dist/playground/stories/PlaygroundProperties.stories.js.map +1 -0
- package/dist/playground/types/index.d.ts +251 -0
- package/dist/playground/types/index.d.ts.map +1 -0
- package/dist/playground/types/index.js +5 -0
- package/dist/playground/types/index.js.map +1 -0
- package/dist/scripts/verify-framework-adapters.js +105 -0
- package/dist/story-generator/componentBlacklist.js.map +1 -0
- package/dist/story-generator/componentDiscovery.js.map +1 -0
- package/dist/story-generator/configLoader.js.map +1 -0
- package/dist/story-generator/considerationsLoader.js.map +1 -0
- package/dist/story-generator/documentation-sources.js.map +1 -0
- package/dist/story-generator/documentationLoader.js.map +1 -0
- package/dist/story-generator/dynamicPackageDiscovery.js.map +1 -0
- package/dist/story-generator/enhancedComponentDiscovery.js.map +1 -0
- package/dist/story-generator/generateStory.js.map +1 -0
- package/dist/story-generator/gitignoreManager.js.map +1 -0
- package/dist/story-generator/inMemoryStoryService.d.ts +89 -0
- package/dist/story-generator/inMemoryStoryService.d.ts.map +1 -0
- package/dist/story-generator/inMemoryStoryService.js +128 -0
- package/dist/story-generator/inMemoryStoryService.js.map +1 -0
- package/dist/story-generator/logger.js.map +1 -0
- package/dist/story-generator/postProcessStory.js.map +1 -0
- package/dist/story-generator/postgresStoryService.d.ts +56 -0
- package/dist/story-generator/postgresStoryService.d.ts.map +1 -0
- package/dist/story-generator/postgresStoryService.js +240 -0
- package/dist/story-generator/productionGitignoreManager.d.ts +91 -0
- package/dist/story-generator/productionGitignoreManager.d.ts.map +1 -0
- package/dist/story-generator/productionGitignoreManager.js +340 -0
- package/dist/story-generator/productionGitignoreManager.js.map +1 -0
- package/dist/story-generator/promptGenerator.js.map +1 -0
- package/dist/story-generator/providerPresets.d.ts +54 -0
- package/dist/story-generator/providerPresets.d.ts.map +1 -0
- package/dist/story-generator/providerPresets.js +214 -0
- package/dist/story-generator/storyHistory.js.map +1 -0
- package/dist/story-generator/storyServiceFactory.d.ts +22 -0
- package/dist/story-generator/storyServiceFactory.d.ts.map +1 -0
- package/dist/story-generator/storyServiceFactory.js +97 -0
- package/dist/story-generator/storyServiceInterface.d.ts +85 -0
- package/dist/story-generator/storyServiceInterface.d.ts.map +1 -0
- package/dist/story-generator/storyServiceInterface.js +5 -0
- package/dist/story-generator/storySync.d.ts +68 -0
- package/dist/story-generator/storySync.d.ts.map +1 -0
- package/dist/story-generator/storySync.js +201 -0
- package/dist/story-generator/storySync.js.map +1 -0
- package/dist/story-generator/storyTracker.js.map +1 -0
- package/dist/story-generator/storyValidator.js.map +1 -0
- package/dist/story-generator/test_validation.d.ts +2 -0
- package/dist/story-generator/test_validation.d.ts.map +1 -0
- package/dist/story-generator/test_validation.js +51 -0
- package/dist/story-generator/universalDesignSystemAdapter.js.map +1 -0
- package/dist/story-generator/urlRedirectService.js.map +1 -0
- package/dist/story-generator/validateStory.js.map +1 -0
- package/dist/story-ui.config.js.map +1 -0
- package/dist/story-ui.config.loader.d.ts +36 -0
- package/dist/story-ui.config.loader.d.ts.map +1 -0
- package/dist/story-ui.config.loader.js +205 -0
- package/dist/story-ui.config.loader.js.map +1 -0
- package/dist/temp/package/templates/StoryUI/StoryUIPanel.js +807 -0
- package/dist/temp/package/templates/StoryUI/StoryUIPanel.stories.js +37 -0
- package/dist/temp/package/templates/StoryUI/index.js +2 -0
- package/dist/templates/StoryUI/StoryUIPanel.js.map +1 -0
- package/dist/templates/StoryUI/StoryUIPanel.stories.js.map +1 -0
- package/dist/templates/StoryUI/index.js.map +1 -0
- package/dist/templates/StoryUI/manager.d.ts +14 -0
- package/dist/templates/StoryUI/manager.d.ts.map +1 -0
- package/dist/templates/production-app/src/App.d.ts +10 -0
- package/dist/templates/production-app/src/App.d.ts.map +1 -0
- package/dist/templates/production-app/src/App.js +653 -0
- package/dist/templates/production-app/src/LivePreviewRenderer.d.ts +24 -0
- package/dist/templates/production-app/src/LivePreviewRenderer.d.ts.map +1 -0
- package/dist/templates/production-app/src/LivePreviewRenderer.js +199 -0
- package/dist/templates/production-app/src/componentRegistry.d.ts +20 -0
- package/dist/templates/production-app/src/componentRegistry.d.ts.map +1 -0
- package/dist/templates/production-app/src/componentRegistry.js +316 -0
- package/dist/templates/production-app/src/main.d.ts +9 -0
- package/dist/templates/production-app/src/main.d.ts.map +1 -0
- package/dist/templates/production-app/src/main.js +18 -0
- package/dist/templates/production-app/vite.config.d.ts +3 -0
- package/dist/templates/production-app/vite.config.d.ts.map +1 -0
- package/dist/templates/production-app/vite.config.js +71 -0
- package/dist/test-storybooks/angular-material-storybook/src/main.js +66 -0
- package/dist/test-storybooks/chakra-storybook/vite.config.js +6 -0
- package/dist/test-storybooks/mantine-storybook/vite.config.js +93 -0
- package/dist/test-storybooks/web-components-shoelace/vite.config.js +9 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* DropZone - Droppable area for components
|
|
4
|
+
*/
|
|
5
|
+
import { useEffect, useRef, useCallback } from 'react';
|
|
6
|
+
import { useDndContext, useDroppable } from '@dnd-kit/core';
|
|
7
|
+
import { usePlaygroundStore } from '../../store/playgroundStore';
|
|
8
|
+
import styles from './DropZone.module.css';
|
|
9
|
+
export const DropZone = ({ id, componentId, accepts = ['all'], maxChildren, insertIndex, children, className, showIndicator = true }) => {
|
|
10
|
+
const elementRef = useRef(null);
|
|
11
|
+
const { active, over } = useDndContext();
|
|
12
|
+
const { setNodeRef, isOver } = useDroppable({ id });
|
|
13
|
+
const { registerDropZone, unregisterDropZone, updateDropZone, components, draggedItem } = usePlaygroundStore();
|
|
14
|
+
// Get component to check children count
|
|
15
|
+
const component = components.get(componentId);
|
|
16
|
+
const childCount = component?.children?.length || 0;
|
|
17
|
+
// Combine refs
|
|
18
|
+
const handleRef = useCallback((node) => {
|
|
19
|
+
elementRef.current = node;
|
|
20
|
+
setNodeRef(node);
|
|
21
|
+
}, [setNodeRef]);
|
|
22
|
+
// Register drop zone on mount
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
const zone = {
|
|
25
|
+
id,
|
|
26
|
+
componentId,
|
|
27
|
+
accepts,
|
|
28
|
+
isActive: false,
|
|
29
|
+
isOver: false,
|
|
30
|
+
canDrop: false,
|
|
31
|
+
type: 'container',
|
|
32
|
+
maxChildren,
|
|
33
|
+
childCount,
|
|
34
|
+
insertIndex
|
|
35
|
+
};
|
|
36
|
+
registerDropZone(zone);
|
|
37
|
+
return () => {
|
|
38
|
+
unregisterDropZone(id);
|
|
39
|
+
};
|
|
40
|
+
}, [id, componentId, JSON.stringify(accepts), maxChildren, childCount, insertIndex]); // Use JSON.stringify for accepts to avoid reference issues
|
|
41
|
+
// Update drop zone state
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
if (elementRef.current) {
|
|
44
|
+
updateDropZone(id, {
|
|
45
|
+
rect: elementRef.current.getBoundingClientRect(),
|
|
46
|
+
childCount
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}, [id, childCount]); // Removed function from deps
|
|
50
|
+
// Check if can accept the dragged item
|
|
51
|
+
const canAccept = useCallback((item) => {
|
|
52
|
+
if (Array.isArray(accepts)) {
|
|
53
|
+
if (item.type === 'new-component' && item.componentType) {
|
|
54
|
+
return accepts.includes('all') || accepts.includes(item.componentType);
|
|
55
|
+
}
|
|
56
|
+
return accepts.includes('all');
|
|
57
|
+
}
|
|
58
|
+
return accepts(item);
|
|
59
|
+
}, [accepts]);
|
|
60
|
+
// Determine drop state
|
|
61
|
+
const canDrop = draggedItem ? canAccept(draggedItem) : false;
|
|
62
|
+
const isValidDrop = isOver && canDrop;
|
|
63
|
+
const showDropIndicator = showIndicator && active && canDrop;
|
|
64
|
+
return (_jsxs("div", { ref: handleRef, className: `
|
|
65
|
+
${styles.dropZone}
|
|
66
|
+
${className || ''}
|
|
67
|
+
${isOver ? styles.over : ''}
|
|
68
|
+
${isValidDrop ? styles.valid : ''}
|
|
69
|
+
${!canDrop && isOver ? styles.invalid : ''}
|
|
70
|
+
${showDropIndicator ? styles.active : ''}
|
|
71
|
+
`, "data-drop-zone-id": id, "data-component-id": componentId, children: [children, showDropIndicator && (_jsx("div", { className: styles.dropIndicator, children: _jsx("div", { className: styles.dropMessage, children: isValidDrop ? 'Drop here' : canDrop ? 'Drag here' : 'Cannot drop here' }) }))] }));
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=DropZone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropZone.js","sourceRoot":"","sources":["../../../../playground/components/DropZone/DropZone.tsx"],"names":[],"mappings":";AAAA;;GAEG;AAEH,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAa3C,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EAChD,EAAE,EACF,WAAW,EACX,OAAO,GAAG,CAAC,KAAK,CAAC,EACjB,WAAW,EACX,WAAW,EACX,QAAQ,EACR,SAAS,EACT,aAAa,GAAG,IAAI,EACrB,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAChD,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,aAAa,EAAE,CAAC;IACzC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAEpD,MAAM,EACJ,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,WAAW,EACZ,GAAG,kBAAkB,EAAE,CAAC;IA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AAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,kBAAkB,GACnE,GACF,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/* DropZone styles */
|
|
2
|
+
|
|
3
|
+
.dropZone {
|
|
4
|
+
position: relative;
|
|
5
|
+
min-height: 40px;
|
|
6
|
+
transition: all 0.2s ease;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.dropZone.active {
|
|
10
|
+
outline: 2px dashed #93c5fd;
|
|
11
|
+
outline-offset: 2px;
|
|
12
|
+
background: rgba(219, 234, 254, 0.1);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.dropZone.over {
|
|
16
|
+
outline: 2px dashed #60a5fa;
|
|
17
|
+
outline-offset: 2px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.dropZone.valid {
|
|
21
|
+
outline-color: #3b82f6;
|
|
22
|
+
background: rgba(59, 130, 246, 0.05);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dropZone.invalid {
|
|
26
|
+
outline-color: #ef4444;
|
|
27
|
+
background: rgba(239, 68, 68, 0.05);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.dropIndicator {
|
|
31
|
+
position: absolute;
|
|
32
|
+
top: 0;
|
|
33
|
+
left: 0;
|
|
34
|
+
right: 0;
|
|
35
|
+
bottom: 0;
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
pointer-events: none;
|
|
40
|
+
z-index: 10;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.dropMessage {
|
|
44
|
+
padding: 8px 16px;
|
|
45
|
+
background: rgba(255, 255, 255, 0.95);
|
|
46
|
+
border-radius: 6px;
|
|
47
|
+
font-size: 14px;
|
|
48
|
+
font-weight: 500;
|
|
49
|
+
color: #3b82f6;
|
|
50
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.dropZone.invalid .dropMessage {
|
|
54
|
+
color: #ef4444;
|
|
55
|
+
background: rgba(254, 226, 226, 0.95);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Insertion line indicator */
|
|
59
|
+
.insertionLine {
|
|
60
|
+
position: absolute;
|
|
61
|
+
left: 0;
|
|
62
|
+
right: 0;
|
|
63
|
+
height: 2px;
|
|
64
|
+
background: #3b82f6;
|
|
65
|
+
pointer-events: none;
|
|
66
|
+
z-index: 20;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.insertionLine::before,
|
|
70
|
+
.insertionLine::after {
|
|
71
|
+
content: '';
|
|
72
|
+
position: absolute;
|
|
73
|
+
width: 6px;
|
|
74
|
+
height: 6px;
|
|
75
|
+
background: #3b82f6;
|
|
76
|
+
border-radius: 50%;
|
|
77
|
+
top: -2px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.insertionLine::before {
|
|
81
|
+
left: -3px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.insertionLine::after {
|
|
85
|
+
right: -3px;
|
|
86
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ExportDialog - Dialog for exporting generated story code
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
export interface ExportDialogProps {
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const ExportDialog: React.FC<ExportDialogProps>;
|
|
10
|
+
//# sourceMappingURL=ExportDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportDialog.d.ts","sourceRoot":"","sources":["../../../../playground/components/ExportDialog/ExportDialog.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAoJpD,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* ExportDialog - Dialog for exporting generated story code
|
|
4
|
+
*/
|
|
5
|
+
import { useState, useMemo } from 'react';
|
|
6
|
+
import { usePlaygroundStore } from '../../store/playgroundStore';
|
|
7
|
+
import { CodeGenerator } from '../../services/CodeGenerator';
|
|
8
|
+
import styles from './ExportDialog.module.css';
|
|
9
|
+
export const ExportDialog = ({ isOpen, onClose }) => {
|
|
10
|
+
const { components, rootId } = usePlaygroundStore();
|
|
11
|
+
const [storyName, setStoryName] = useState('MyStory');
|
|
12
|
+
const [framework, setFramework] = useState('react');
|
|
13
|
+
const [includeImports, setIncludeImports] = useState(true);
|
|
14
|
+
const [includeHelpers, setIncludeHelpers] = useState(true);
|
|
15
|
+
const [useTypeScript, setUseTypeScript] = useState(true);
|
|
16
|
+
const [copied, setCopied] = useState(false);
|
|
17
|
+
// Generate code based on current settings
|
|
18
|
+
const generatedCode = useMemo(() => {
|
|
19
|
+
try {
|
|
20
|
+
const generator = new CodeGenerator({
|
|
21
|
+
framework,
|
|
22
|
+
includeImports,
|
|
23
|
+
includeHelpers,
|
|
24
|
+
prettier: true,
|
|
25
|
+
indentSize: 2,
|
|
26
|
+
useTypeScript
|
|
27
|
+
});
|
|
28
|
+
return generator.generateStoryCode(components, rootId, storyName);
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
console.error('Code generation error:', error);
|
|
32
|
+
return '// Error generating code\n// ' + error.message;
|
|
33
|
+
}
|
|
34
|
+
}, [components, rootId, storyName, framework, includeImports, includeHelpers, useTypeScript]);
|
|
35
|
+
if (!isOpen)
|
|
36
|
+
return null;
|
|
37
|
+
const handleCopy = () => {
|
|
38
|
+
navigator.clipboard.writeText(generatedCode).then(() => {
|
|
39
|
+
setCopied(true);
|
|
40
|
+
setTimeout(() => setCopied(false), 2000);
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
const handleExport = () => {
|
|
44
|
+
const extension = framework === 'react' && useTypeScript ? 'tsx' : 'js';
|
|
45
|
+
const blob = new Blob([generatedCode], { type: 'text/javascript' });
|
|
46
|
+
const url = URL.createObjectURL(blob);
|
|
47
|
+
const a = document.createElement('a');
|
|
48
|
+
a.href = url;
|
|
49
|
+
a.download = `${storyName}.stories.${extension}`;
|
|
50
|
+
document.body.appendChild(a);
|
|
51
|
+
a.click();
|
|
52
|
+
document.body.removeChild(a);
|
|
53
|
+
URL.revokeObjectURL(url);
|
|
54
|
+
};
|
|
55
|
+
return (_jsx("div", { className: styles.dialogOverlay, onClick: onClose, children: _jsxs("div", { className: styles.dialog, onClick: (e) => e.stopPropagation(), children: [_jsxs("div", { className: styles.header, children: [_jsx("h2", { className: styles.title, children: "Export Story" }), _jsx("button", { className: styles.closeButton, onClick: onClose, children: "\u2715" })] }), _jsxs("div", { className: styles.content, children: [_jsxs("div", { className: styles.settings, children: [_jsx("div", { className: styles.settingGroup, children: _jsxs("label", { className: styles.label, children: ["Story Name", _jsx("input", { type: "text", className: styles.input, value: storyName, onChange: (e) => setStoryName(e.target.value), placeholder: "Enter story name" })] }) }), _jsx("div", { className: styles.settingGroup, children: _jsxs("label", { className: styles.label, children: ["Framework", _jsxs("select", { className: styles.select, value: framework, onChange: (e) => setFramework(e.target.value), children: [_jsx("option", { value: "react", children: "React" }), _jsx("option", { value: "vue", children: "Vue" }), _jsx("option", { value: "angular", children: "Angular" })] })] }) }), _jsxs("div", { className: styles.checkboxGroup, children: [_jsxs("label", { className: styles.checkbox, children: [_jsx("input", { type: "checkbox", checked: includeImports, onChange: (e) => setIncludeImports(e.target.checked) }), "Include imports"] }), _jsxs("label", { className: styles.checkbox, children: [_jsx("input", { type: "checkbox", checked: includeHelpers, onChange: (e) => setIncludeHelpers(e.target.checked) }), "Include layout helpers"] }), _jsxs("label", { className: styles.checkbox, children: [_jsx("input", { type: "checkbox", checked: useTypeScript, onChange: (e) => setUseTypeScript(e.target.checked), disabled: framework !== 'react' }), "Use TypeScript"] })] })] }), _jsxs("div", { className: styles.preview, children: [_jsxs("div", { className: styles.previewHeader, children: [_jsx("span", { className: styles.previewTitle, children: "Preview" }), _jsx("button", { className: `${styles.copyButton} ${copied ? styles.copied : ''}`, onClick: handleCopy, children: copied ? '✓ Copied' : '📋 Copy' })] }), _jsx("pre", { className: styles.code, children: _jsx("code", { children: generatedCode }) })] })] }), _jsxs("div", { className: styles.footer, children: [_jsx("button", { className: styles.cancelButton, onClick: onClose, children: "Cancel" }), _jsx("button", { className: styles.exportButton, onClick: handleExport, children: "\uD83D\uDCBE Export as File" })] })] }) }));
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=ExportDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportDialog.js","sourceRoot":"","sources":["../../../../playground/components/ExportDialog/ExportDialog.tsx"],"names":[],"mappings":";AAAA;;GAEG;AAEH,OAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAO/C,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;IAC/E,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,kBAAkB,EAAE,CAAC;IACpD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,CAA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;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
z-index: 1000;
|
|
16
|
+
animation: fadeIn 0.2s ease-out;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@keyframes fadeIn {
|
|
20
|
+
from {
|
|
21
|
+
opacity: 0;
|
|
22
|
+
}
|
|
23
|
+
to {
|
|
24
|
+
opacity: 1;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.dialog {
|
|
29
|
+
background: white;
|
|
30
|
+
border-radius: 12px;
|
|
31
|
+
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
|
32
|
+
width: 90%;
|
|
33
|
+
max-width: 900px;
|
|
34
|
+
height: 80vh;
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
animation: slideUp 0.3s ease-out;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@keyframes slideUp {
|
|
41
|
+
from {
|
|
42
|
+
transform: translateY(20px);
|
|
43
|
+
opacity: 0;
|
|
44
|
+
}
|
|
45
|
+
to {
|
|
46
|
+
transform: translateY(0);
|
|
47
|
+
opacity: 1;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.header {
|
|
52
|
+
display: flex;
|
|
53
|
+
justify-content: space-between;
|
|
54
|
+
align-items: center;
|
|
55
|
+
padding: 20px 24px;
|
|
56
|
+
border-bottom: 1px solid #e2e8f0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.title {
|
|
60
|
+
font-size: 20px;
|
|
61
|
+
font-weight: 600;
|
|
62
|
+
color: #1a202c;
|
|
63
|
+
margin: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.closeButton {
|
|
67
|
+
background: transparent;
|
|
68
|
+
border: none;
|
|
69
|
+
font-size: 24px;
|
|
70
|
+
color: #718096;
|
|
71
|
+
cursor: pointer;
|
|
72
|
+
padding: 4px 8px;
|
|
73
|
+
transition: color 0.2s;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.closeButton:hover {
|
|
77
|
+
color: #2d3748;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.content {
|
|
81
|
+
flex: 1;
|
|
82
|
+
display: flex;
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.settings {
|
|
87
|
+
width: 280px;
|
|
88
|
+
padding: 24px;
|
|
89
|
+
border-right: 1px solid #e2e8f0;
|
|
90
|
+
overflow-y: auto;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.settingGroup {
|
|
94
|
+
margin-bottom: 24px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.label {
|
|
98
|
+
display: flex;
|
|
99
|
+
flex-direction: column;
|
|
100
|
+
gap: 8px;
|
|
101
|
+
font-size: 14px;
|
|
102
|
+
font-weight: 500;
|
|
103
|
+
color: #4a5568;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.input,
|
|
107
|
+
.select {
|
|
108
|
+
padding: 8px 12px;
|
|
109
|
+
border: 1px solid #cbd5e0;
|
|
110
|
+
border-radius: 6px;
|
|
111
|
+
font-size: 14px;
|
|
112
|
+
background: white;
|
|
113
|
+
transition: all 0.2s;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.input:focus,
|
|
117
|
+
.select:focus {
|
|
118
|
+
outline: none;
|
|
119
|
+
border-color: #4299e1;
|
|
120
|
+
box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.checkboxGroup {
|
|
124
|
+
display: flex;
|
|
125
|
+
flex-direction: column;
|
|
126
|
+
gap: 12px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.checkbox {
|
|
130
|
+
display: flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
gap: 8px;
|
|
133
|
+
font-size: 14px;
|
|
134
|
+
color: #4a5568;
|
|
135
|
+
cursor: pointer;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.checkbox input[type="checkbox"] {
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.checkbox input[type="checkbox"]:disabled {
|
|
143
|
+
opacity: 0.5;
|
|
144
|
+
cursor: not-allowed;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.preview {
|
|
148
|
+
flex: 1;
|
|
149
|
+
display: flex;
|
|
150
|
+
flex-direction: column;
|
|
151
|
+
overflow: hidden;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.previewHeader {
|
|
155
|
+
display: flex;
|
|
156
|
+
justify-content: space-between;
|
|
157
|
+
align-items: center;
|
|
158
|
+
padding: 16px 24px;
|
|
159
|
+
background: #f7fafc;
|
|
160
|
+
border-bottom: 1px solid #e2e8f0;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.previewTitle {
|
|
164
|
+
font-size: 14px;
|
|
165
|
+
font-weight: 500;
|
|
166
|
+
color: #4a5568;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.copyButton {
|
|
170
|
+
padding: 6px 12px;
|
|
171
|
+
background: white;
|
|
172
|
+
border: 1px solid #cbd5e0;
|
|
173
|
+
border-radius: 6px;
|
|
174
|
+
font-size: 13px;
|
|
175
|
+
color: #4a5568;
|
|
176
|
+
cursor: pointer;
|
|
177
|
+
transition: all 0.2s;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.copyButton:hover {
|
|
181
|
+
background: #f7fafc;
|
|
182
|
+
border-color: #a0aec0;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.copyButton.copied {
|
|
186
|
+
background: #48bb78;
|
|
187
|
+
border-color: #48bb78;
|
|
188
|
+
color: white;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.code {
|
|
192
|
+
flex: 1;
|
|
193
|
+
margin: 0;
|
|
194
|
+
padding: 24px;
|
|
195
|
+
overflow: auto;
|
|
196
|
+
font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
|
|
197
|
+
font-size: 13px;
|
|
198
|
+
line-height: 1.6;
|
|
199
|
+
color: #2d3748;
|
|
200
|
+
background: #f7fafc;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.footer {
|
|
204
|
+
display: flex;
|
|
205
|
+
justify-content: flex-end;
|
|
206
|
+
gap: 12px;
|
|
207
|
+
padding: 16px 24px;
|
|
208
|
+
border-top: 1px solid #e2e8f0;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.cancelButton,
|
|
212
|
+
.exportButton {
|
|
213
|
+
padding: 8px 16px;
|
|
214
|
+
border-radius: 6px;
|
|
215
|
+
font-size: 14px;
|
|
216
|
+
font-weight: 500;
|
|
217
|
+
cursor: pointer;
|
|
218
|
+
transition: all 0.2s;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.cancelButton {
|
|
222
|
+
background: white;
|
|
223
|
+
border: 1px solid #cbd5e0;
|
|
224
|
+
color: #4a5568;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.cancelButton:hover {
|
|
228
|
+
background: #f7fafc;
|
|
229
|
+
border-color: #a0aec0;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.exportButton {
|
|
233
|
+
background: #4299e1;
|
|
234
|
+
border: 1px solid #4299e1;
|
|
235
|
+
color: white;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.exportButton:hover {
|
|
239
|
+
background: #3182ce;
|
|
240
|
+
border-color: #3182ce;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/* Dark mode support */
|
|
244
|
+
@media (prefers-color-scheme: dark) {
|
|
245
|
+
.dialog {
|
|
246
|
+
background: #1a202c;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.header {
|
|
250
|
+
border-bottom-color: #2d3748;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.title {
|
|
254
|
+
color: #f7fafc;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.closeButton {
|
|
258
|
+
color: #a0aec0;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.closeButton:hover {
|
|
262
|
+
color: #e2e8f0;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.settings {
|
|
266
|
+
border-right-color: #2d3748;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.label {
|
|
270
|
+
color: #cbd5e0;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.input,
|
|
274
|
+
.select {
|
|
275
|
+
background: #2d3748;
|
|
276
|
+
border-color: #4a5568;
|
|
277
|
+
color: #f7fafc;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.input:focus,
|
|
281
|
+
.select:focus {
|
|
282
|
+
border-color: #63b3ed;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.checkbox {
|
|
286
|
+
color: #cbd5e0;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.previewHeader {
|
|
290
|
+
background: #2d3748;
|
|
291
|
+
border-bottom-color: #4a5568;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.previewTitle {
|
|
295
|
+
color: #cbd5e0;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.copyButton {
|
|
299
|
+
background: #2d3748;
|
|
300
|
+
border-color: #4a5568;
|
|
301
|
+
color: #cbd5e0;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.copyButton:hover {
|
|
305
|
+
background: #4a5568;
|
|
306
|
+
border-color: #718096;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.code {
|
|
310
|
+
background: #2d3748;
|
|
311
|
+
color: #e2e8f0;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.footer {
|
|
315
|
+
border-top-color: #2d3748;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.cancelButton {
|
|
319
|
+
background: #2d3748;
|
|
320
|
+
border-color: #4a5568;
|
|
321
|
+
color: #cbd5e0;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.cancelButton:hover {
|
|
325
|
+
background: #4a5568;
|
|
326
|
+
border-color: #718096;
|
|
327
|
+
}
|
|
328
|
+
}
|