@tpitre/story-ui 2.8.0 → 3.0.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.
Files changed (254) hide show
  1. package/dist/cli/index.js +0 -0
  2. package/dist/cli/index.js.map +1 -0
  3. package/dist/cli/setup.js.map +1 -0
  4. package/dist/cloudflare-edge/src/mcp-session.js +462 -0
  5. package/dist/cloudflare-edge/src/types.js +4 -0
  6. package/dist/cloudflare-edge/src/worker.js +106 -0
  7. package/dist/cloudflare-pages/vite.config.js +14 -0
  8. package/dist/index.d.ts +13 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +12 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/mcp-server/index.js.map +1 -0
  13. package/dist/mcp-server/mcp-stdio-server.js.map +1 -0
  14. package/dist/mcp-server/routes/claude.js.map +1 -0
  15. package/dist/mcp-server/routes/components.js.map +1 -0
  16. package/dist/mcp-server/routes/generateStory.js.map +1 -0
  17. package/dist/mcp-server/routes/hybridStories.js.map +1 -0
  18. package/dist/mcp-server/routes/memoryStories.js.map +1 -0
  19. package/dist/mcp-server/routes/storySync.js.map +1 -0
  20. package/dist/mcp-server/routes/updateStory.js +246 -0
  21. package/dist/mcp-server/sessionManager.js.map +1 -0
  22. package/dist/playground/components/AIAssistant/AIAssistant.d.ts +6 -0
  23. package/dist/playground/components/AIAssistant/AIAssistant.d.ts.map +1 -0
  24. package/dist/playground/components/AIAssistant/AIAssistant.js +109 -0
  25. package/dist/playground/components/AIAssistant/AIAssistant.js.map +1 -0
  26. package/dist/playground/components/AIAssistant/AIAssistant.module.css +166 -0
  27. package/dist/playground/components/Canvas/Canvas.d.ts +9 -0
  28. package/dist/playground/components/Canvas/Canvas.d.ts.map +1 -0
  29. package/dist/playground/components/Canvas/Canvas.js +58 -0
  30. package/dist/playground/components/Canvas/Canvas.js.map +1 -0
  31. package/dist/playground/components/Canvas/Canvas.module.css +189 -0
  32. package/dist/playground/components/Canvas/CanvasWithDnd.d.ts +9 -0
  33. package/dist/playground/components/Canvas/CanvasWithDnd.d.ts.map +1 -0
  34. package/dist/playground/components/Canvas/CanvasWithDnd.js +158 -0
  35. package/dist/playground/components/Canvas/CanvasWithDnd.js.map +1 -0
  36. package/dist/playground/components/Canvas/ComponentRenderer.d.ts +15 -0
  37. package/dist/playground/components/Canvas/ComponentRenderer.d.ts.map +1 -0
  38. package/dist/playground/components/Canvas/ComponentRenderer.js +177 -0
  39. package/dist/playground/components/Canvas/ComponentRenderer.js.map +1 -0
  40. package/dist/playground/components/Canvas/DraggableComponent.d.ts +15 -0
  41. package/dist/playground/components/Canvas/DraggableComponent.d.ts.map +1 -0
  42. package/dist/playground/components/Canvas/DraggableComponent.js +49 -0
  43. package/dist/playground/components/Canvas/DraggableComponent.js.map +1 -0
  44. package/dist/playground/components/Canvas/index.d.ts +9 -0
  45. package/dist/playground/components/Canvas/index.d.ts.map +1 -0
  46. package/dist/playground/components/Canvas/index.js +5 -0
  47. package/dist/playground/components/Canvas/index.js.map +1 -0
  48. package/dist/playground/components/CodeView/CodeView.d.ts +12 -0
  49. package/dist/playground/components/CodeView/CodeView.d.ts.map +1 -0
  50. package/dist/playground/components/CodeView/CodeView.js +77 -0
  51. package/dist/playground/components/CodeView/CodeView.js.map +1 -0
  52. package/dist/playground/components/CodeView/CodeView.module.css +178 -0
  53. package/dist/playground/components/ComponentPalette/ComponentPalette.d.ts +17 -0
  54. package/dist/playground/components/ComponentPalette/ComponentPalette.d.ts.map +1 -0
  55. package/dist/playground/components/ComponentPalette/ComponentPalette.js +138 -0
  56. package/dist/playground/components/ComponentPalette/ComponentPalette.js.map +1 -0
  57. package/dist/playground/components/ComponentPalette/ComponentPalette.module.css +217 -0
  58. package/dist/playground/components/ComponentPalette/index.d.ts +3 -0
  59. package/dist/playground/components/ComponentPalette/index.d.ts.map +1 -0
  60. package/dist/playground/components/ComponentPalette/index.js +2 -0
  61. package/dist/playground/components/ComponentPalette/index.js.map +1 -0
  62. package/dist/playground/components/DropZone/DropZone.d.ts +17 -0
  63. package/dist/playground/components/DropZone/DropZone.d.ts.map +1 -0
  64. package/dist/playground/components/DropZone/DropZone.js +73 -0
  65. package/dist/playground/components/DropZone/DropZone.js.map +1 -0
  66. package/dist/playground/components/DropZone/DropZone.module.css +86 -0
  67. package/dist/playground/components/ExportDialog/ExportDialog.d.ts +10 -0
  68. package/dist/playground/components/ExportDialog/ExportDialog.d.ts.map +1 -0
  69. package/dist/playground/components/ExportDialog/ExportDialog.js +57 -0
  70. package/dist/playground/components/ExportDialog/ExportDialog.js.map +1 -0
  71. package/dist/playground/components/ExportDialog/ExportDialog.module.css +328 -0
  72. package/dist/playground/components/LayoutHelpers/LayoutHelpers.d.ts +134 -0
  73. package/dist/playground/components/LayoutHelpers/LayoutHelpers.d.ts.map +1 -0
  74. package/dist/playground/components/LayoutHelpers/LayoutHelpers.js +254 -0
  75. package/dist/playground/components/LayoutHelpers/LayoutHelpers.js.map +1 -0
  76. package/dist/playground/components/LayoutHelpers/index.d.ts +3 -0
  77. package/dist/playground/components/LayoutHelpers/index.d.ts.map +1 -0
  78. package/dist/playground/components/LayoutHelpers/index.js +2 -0
  79. package/dist/playground/components/LayoutHelpers/index.js.map +1 -0
  80. package/dist/playground/components/Playground/Playground.d.ts +10 -0
  81. package/dist/playground/components/Playground/Playground.d.ts.map +1 -0
  82. package/dist/playground/components/Playground/Playground.js +128 -0
  83. package/dist/playground/components/Playground/Playground.js.map +1 -0
  84. package/dist/playground/components/Playground/Playground.module.css +308 -0
  85. package/dist/playground/components/PropertiesPanel/PropertiesPanel.d.ts +10 -0
  86. package/dist/playground/components/PropertiesPanel/PropertiesPanel.d.ts.map +1 -0
  87. package/dist/playground/components/PropertiesPanel/PropertiesPanel.js +150 -0
  88. package/dist/playground/components/PropertiesPanel/PropertiesPanel.js.map +1 -0
  89. package/dist/playground/components/PropertiesPanel/PropertiesPanel.module.css +155 -0
  90. package/dist/playground/components/PropertiesPanel/index.d.ts +3 -0
  91. package/dist/playground/components/PropertiesPanel/index.d.ts.map +1 -0
  92. package/dist/playground/components/PropertiesPanel/index.js +2 -0
  93. package/dist/playground/components/PropertiesPanel/index.js.map +1 -0
  94. package/dist/playground/components/PropertyEditors/BooleanEditor.d.ts +12 -0
  95. package/dist/playground/components/PropertyEditors/BooleanEditor.d.ts.map +1 -0
  96. package/dist/playground/components/PropertyEditors/BooleanEditor.js +14 -0
  97. package/dist/playground/components/PropertyEditors/BooleanEditor.js.map +1 -0
  98. package/dist/playground/components/PropertyEditors/ColorEditor.d.ts +12 -0
  99. package/dist/playground/components/PropertyEditors/ColorEditor.d.ts.map +1 -0
  100. package/dist/playground/components/PropertyEditors/ColorEditor.js +62 -0
  101. package/dist/playground/components/PropertyEditors/ColorEditor.js.map +1 -0
  102. package/dist/playground/components/PropertyEditors/IconEditor.d.ts +12 -0
  103. package/dist/playground/components/PropertyEditors/IconEditor.d.ts.map +1 -0
  104. package/dist/playground/components/PropertyEditors/IconEditor.js +123 -0
  105. package/dist/playground/components/PropertyEditors/IconEditor.js.map +1 -0
  106. package/dist/playground/components/PropertyEditors/NumberEditor.d.ts +15 -0
  107. package/dist/playground/components/PropertyEditors/NumberEditor.d.ts.map +1 -0
  108. package/dist/playground/components/PropertyEditors/NumberEditor.js +46 -0
  109. package/dist/playground/components/PropertyEditors/NumberEditor.js.map +1 -0
  110. package/dist/playground/components/PropertyEditors/PropertyEditors.module.css +432 -0
  111. package/dist/playground/components/PropertyEditors/SelectEditor.d.ts +19 -0
  112. package/dist/playground/components/PropertyEditors/SelectEditor.d.ts.map +1 -0
  113. package/dist/playground/components/PropertyEditors/SelectEditor.js +17 -0
  114. package/dist/playground/components/PropertyEditors/SelectEditor.js.map +1 -0
  115. package/dist/playground/components/PropertyEditors/SpacingEditor.d.ts +19 -0
  116. package/dist/playground/components/PropertyEditors/SpacingEditor.d.ts.map +1 -0
  117. package/dist/playground/components/PropertyEditors/SpacingEditor.js +162 -0
  118. package/dist/playground/components/PropertyEditors/SpacingEditor.js.map +1 -0
  119. package/dist/playground/components/PropertyEditors/SpacingEditor.module.css +214 -0
  120. package/dist/playground/components/PropertyEditors/TextEditor.d.ts +14 -0
  121. package/dist/playground/components/PropertyEditors/TextEditor.d.ts.map +1 -0
  122. package/dist/playground/components/PropertyEditors/TextEditor.js +38 -0
  123. package/dist/playground/components/PropertyEditors/TextEditor.js.map +1 -0
  124. package/dist/playground/components/PropertyEditors/TokenEditor.d.ts +23 -0
  125. package/dist/playground/components/PropertyEditors/TokenEditor.d.ts.map +1 -0
  126. package/dist/playground/components/PropertyEditors/TokenEditor.js +50 -0
  127. package/dist/playground/components/PropertyEditors/TokenEditor.js.map +1 -0
  128. package/dist/playground/components/PropertyEditors/index.d.ts +20 -0
  129. package/dist/playground/components/PropertyEditors/index.d.ts.map +1 -0
  130. package/dist/playground/components/PropertyEditors/index.js +12 -0
  131. package/dist/playground/components/PropertyEditors/index.js.map +1 -0
  132. package/dist/playground/components/TreeView/TreeView.d.ts +10 -0
  133. package/dist/playground/components/TreeView/TreeView.d.ts.map +1 -0
  134. package/dist/playground/components/TreeView/TreeView.js +146 -0
  135. package/dist/playground/components/TreeView/TreeView.js.map +1 -0
  136. package/dist/playground/components/TreeView/TreeView.module.css +214 -0
  137. package/dist/playground/components/TreeView/index.d.ts +3 -0
  138. package/dist/playground/components/TreeView/index.d.ts.map +1 -0
  139. package/dist/playground/components/TreeView/index.js +2 -0
  140. package/dist/playground/components/TreeView/index.js.map +1 -0
  141. package/dist/playground/config/propertyDefinitions.d.ts +73 -0
  142. package/dist/playground/config/propertyDefinitions.d.ts.map +1 -0
  143. package/dist/playground/config/propertyDefinitions.js +809 -0
  144. package/dist/playground/config/propertyDefinitions.js.map +1 -0
  145. package/dist/playground/hooks/useKeyboardShortcuts.d.ts +38 -0
  146. package/dist/playground/hooks/useKeyboardShortcuts.d.ts.map +1 -0
  147. package/dist/playground/hooks/useKeyboardShortcuts.js +191 -0
  148. package/dist/playground/hooks/useKeyboardShortcuts.js.map +1 -0
  149. package/dist/playground/index.d.ts +21 -0
  150. package/dist/playground/index.d.ts.map +1 -0
  151. package/dist/playground/index.js +23 -0
  152. package/dist/playground/index.js.map +1 -0
  153. package/dist/playground/services/CodeGenerator.d.ts +73 -0
  154. package/dist/playground/services/CodeGenerator.d.ts.map +1 -0
  155. package/dist/playground/services/CodeGenerator.js +359 -0
  156. package/dist/playground/services/CodeGenerator.js.map +1 -0
  157. package/dist/playground/services/DragDropManager.d.ts +95 -0
  158. package/dist/playground/services/DragDropManager.d.ts.map +1 -0
  159. package/dist/playground/services/DragDropManager.js +408 -0
  160. package/dist/playground/services/DragDropManager.js.map +1 -0
  161. package/dist/playground/services/StoryParser.d.ts +73 -0
  162. package/dist/playground/services/StoryParser.d.ts.map +1 -0
  163. package/dist/playground/services/StoryParser.js +419 -0
  164. package/dist/playground/services/StoryParser.js.map +1 -0
  165. package/dist/playground/store/playgroundStore.d.ts +86 -0
  166. package/dist/playground/store/playgroundStore.d.ts.map +1 -0
  167. package/dist/playground/store/playgroundStore.js +337 -0
  168. package/dist/playground/store/playgroundStore.js.map +1 -0
  169. package/dist/playground/stories/PlaygroundDragDrop.stories.d.ts +13 -0
  170. package/dist/playground/stories/PlaygroundDragDrop.stories.d.ts.map +1 -0
  171. package/dist/playground/stories/PlaygroundDragDrop.stories.js +227 -0
  172. package/dist/playground/stories/PlaygroundDragDrop.stories.js.map +1 -0
  173. package/dist/playground/stories/PlaygroundPhase4.stories.d.ts +13 -0
  174. package/dist/playground/stories/PlaygroundPhase4.stories.d.ts.map +1 -0
  175. package/dist/playground/stories/PlaygroundPhase4.stories.js +334 -0
  176. package/dist/playground/stories/PlaygroundPhase4.stories.js.map +1 -0
  177. package/dist/playground/stories/PlaygroundPhase5.stories.d.ts +14 -0
  178. package/dist/playground/stories/PlaygroundPhase5.stories.d.ts.map +1 -0
  179. package/dist/playground/stories/PlaygroundPhase5.stories.js +512 -0
  180. package/dist/playground/stories/PlaygroundPhase5.stories.js.map +1 -0
  181. package/dist/playground/stories/PlaygroundProperties.stories.d.ts +13 -0
  182. package/dist/playground/stories/PlaygroundProperties.stories.d.ts.map +1 -0
  183. package/dist/playground/stories/PlaygroundProperties.stories.js +342 -0
  184. package/dist/playground/stories/PlaygroundProperties.stories.js.map +1 -0
  185. package/dist/playground/types/index.d.ts +251 -0
  186. package/dist/playground/types/index.d.ts.map +1 -0
  187. package/dist/playground/types/index.js +5 -0
  188. package/dist/playground/types/index.js.map +1 -0
  189. package/dist/scripts/verify-framework-adapters.js +105 -0
  190. package/dist/story-generator/componentBlacklist.js.map +1 -0
  191. package/dist/story-generator/componentDiscovery.js.map +1 -0
  192. package/dist/story-generator/configLoader.js.map +1 -0
  193. package/dist/story-generator/considerationsLoader.js.map +1 -0
  194. package/dist/story-generator/documentation-sources.js.map +1 -0
  195. package/dist/story-generator/documentationLoader.js.map +1 -0
  196. package/dist/story-generator/dynamicPackageDiscovery.js.map +1 -0
  197. package/dist/story-generator/enhancedComponentDiscovery.js.map +1 -0
  198. package/dist/story-generator/generateStory.js.map +1 -0
  199. package/dist/story-generator/gitignoreManager.js.map +1 -0
  200. package/dist/story-generator/inMemoryStoryService.js.map +1 -0
  201. package/dist/story-generator/logger.js.map +1 -0
  202. package/dist/story-generator/postProcessStory.js.map +1 -0
  203. package/dist/story-generator/productionGitignoreManager.js.map +1 -0
  204. package/dist/story-generator/promptGenerator.js.map +1 -0
  205. package/dist/story-generator/providerPresets.d.ts +54 -0
  206. package/dist/story-generator/providerPresets.d.ts.map +1 -0
  207. package/dist/story-generator/providerPresets.js +214 -0
  208. package/dist/story-generator/storyHistory.js.map +1 -0
  209. package/dist/story-generator/storySync.js.map +1 -0
  210. package/dist/story-generator/storyTracker.js.map +1 -0
  211. package/dist/story-generator/storyValidator.js.map +1 -0
  212. package/dist/story-generator/test_validation.d.ts +2 -0
  213. package/dist/story-generator/test_validation.d.ts.map +1 -0
  214. package/dist/story-generator/test_validation.js +51 -0
  215. package/dist/story-generator/universalDesignSystemAdapter.js.map +1 -0
  216. package/dist/story-generator/urlRedirectService.js.map +1 -0
  217. package/dist/story-generator/validateStory.js.map +1 -0
  218. package/dist/story-ui.config.js.map +1 -0
  219. package/dist/story-ui.config.loader.d.ts +36 -0
  220. package/dist/story-ui.config.loader.d.ts.map +1 -0
  221. package/dist/story-ui.config.loader.js +205 -0
  222. package/dist/story-ui.config.loader.js.map +1 -0
  223. package/dist/temp/package/templates/StoryUI/StoryUIPanel.js +807 -0
  224. package/dist/temp/package/templates/StoryUI/StoryUIPanel.stories.js +37 -0
  225. package/dist/temp/package/templates/StoryUI/index.js +2 -0
  226. package/dist/templates/StoryUI/StoryUIPanel.d.ts.map +1 -1
  227. package/dist/templates/StoryUI/StoryUIPanel.js +30 -2
  228. package/dist/templates/StoryUI/StoryUIPanel.js.map +1 -0
  229. package/dist/templates/StoryUI/StoryUIPanel.stories.js.map +1 -0
  230. package/dist/templates/StoryUI/index.js.map +1 -0
  231. package/dist/templates/StoryUI/manager.d.ts +14 -0
  232. package/dist/templates/StoryUI/manager.d.ts.map +1 -0
  233. package/dist/templates/production-app/src/App.d.ts +10 -0
  234. package/dist/templates/production-app/src/App.d.ts.map +1 -0
  235. package/dist/templates/production-app/src/App.js +653 -0
  236. package/dist/templates/production-app/src/LivePreviewRenderer.d.ts +24 -0
  237. package/dist/templates/production-app/src/LivePreviewRenderer.d.ts.map +1 -0
  238. package/dist/templates/production-app/src/LivePreviewRenderer.js +199 -0
  239. package/dist/templates/production-app/src/componentRegistry.d.ts +20 -0
  240. package/dist/templates/production-app/src/componentRegistry.d.ts.map +1 -0
  241. package/dist/templates/production-app/src/componentRegistry.js +316 -0
  242. package/dist/templates/production-app/src/main.d.ts +9 -0
  243. package/dist/templates/production-app/src/main.d.ts.map +1 -0
  244. package/dist/templates/production-app/src/main.js +18 -0
  245. package/dist/templates/production-app/vite.config.d.ts +3 -0
  246. package/dist/templates/production-app/vite.config.d.ts.map +1 -0
  247. package/dist/templates/production-app/vite.config.js +71 -0
  248. package/dist/test-storybooks/angular-material-storybook/src/main.js +66 -0
  249. package/dist/test-storybooks/chakra-storybook/vite.config.js +6 -0
  250. package/dist/test-storybooks/mantine-storybook/vite.config.js +93 -0
  251. package/dist/test-storybooks/web-components-shoelace/vite.config.js +9 -0
  252. package/dist/tsconfig.tsbuildinfo +1 -0
  253. package/package.json +1 -1
  254. package/templates/StoryUI/StoryUIPanel.tsx +35 -2
@@ -0,0 +1,138 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * ComponentPalette - Draggable component library
4
+ */
5
+ import { useState, useMemo } from 'react';
6
+ import { useDraggable } from '@dnd-kit/core';
7
+ import styles from './ComponentPalette.module.css';
8
+ // Enhanced component palette with real Ant Design components
9
+ const PALETTE_ITEMS = [
10
+ // Layout Components (Helpers)
11
+ { type: 'Box', category: 'Layout', label: 'Box', description: 'Flexible container', icon: '📦' },
12
+ { type: 'Stack', category: 'Layout', label: 'Stack', description: 'Vertical stack', icon: '📚' },
13
+ { type: 'HStack', category: 'Layout', label: 'HStack', description: 'Horizontal stack', icon: '🔗' },
14
+ { type: 'Grid', category: 'Layout', label: 'Grid', description: 'Grid layout', icon: '⚏' },
15
+ { type: 'Container', category: 'Layout', label: 'Container', description: 'Centered container', icon: '🔲' },
16
+ { type: 'Flex', category: 'Layout', label: 'Flex', description: 'Flexbox container', icon: '↔️' },
17
+ { type: 'Center', category: 'Layout', label: 'Center', description: 'Centers content', icon: '⊡' },
18
+ { type: 'Spacer', category: 'Layout', label: 'Spacer', description: 'Creates space', icon: '↕️' },
19
+ { type: 'Divider', category: 'Layout', label: 'Divider', description: 'Visual separator', icon: '─' },
20
+ { type: 'Row', category: 'Layout', label: 'Row', description: 'Ant Design grid row', icon: '⬌' },
21
+ { type: 'Col', category: 'Layout', label: 'Col', description: 'Ant Design grid column', icon: '⬍' },
22
+ { type: 'Space', category: 'Layout', label: 'Space', description: 'Ant Design spacing', icon: '↔️' },
23
+ // Ant Design Form Components
24
+ { type: 'Button', category: 'Form', label: 'Button', description: 'Ant Design button', icon: '🔘' },
25
+ { type: 'Input', category: 'Form', label: 'Input', description: 'Ant Design text input', icon: '📝' },
26
+ { type: 'Select', category: 'Form', label: 'Select', description: 'Ant Design selector', icon: '📋' },
27
+ { type: 'Checkbox', category: 'Form', label: 'Checkbox', description: 'Ant Design checkbox', icon: '☑️' },
28
+ { type: 'Radio', category: 'Form', label: 'Radio', description: 'Ant Design radio', icon: '🔘' },
29
+ { type: 'Switch', category: 'Form', label: 'Switch', description: 'Ant Design toggle switch', icon: '🔀' },
30
+ { type: 'Slider', category: 'Form', label: 'Slider', description: 'Ant Design range slider', icon: '🎚️' },
31
+ { type: 'DatePicker', category: 'Form', label: 'Date Picker', description: 'Ant Design date picker', icon: '📅' },
32
+ { type: 'TimePicker', category: 'Form', label: 'Time Picker', description: 'Ant Design time picker', icon: '🕐' },
33
+ { type: 'Upload', category: 'Form', label: 'Upload', description: 'Ant Design file upload', icon: '📁' },
34
+ { type: 'Rate', category: 'Form', label: 'Rate', description: 'Ant Design rating', icon: '⭐' },
35
+ // Ant Design Display Components
36
+ { type: 'Typography', category: 'Display', label: 'Typography', description: 'Ant Design text', icon: '📄' },
37
+ { type: 'Title', category: 'Display', label: 'Title', description: 'Ant Design heading', icon: '📋' },
38
+ { type: 'Text', category: 'Display', label: 'Text', description: 'Ant Design text content', icon: '📝' },
39
+ { type: 'Paragraph', category: 'Display', label: 'Paragraph', description: 'Ant Design paragraph', icon: '📄' },
40
+ { type: 'Image', category: 'Display', label: 'Image', description: 'Ant Design image', icon: '🖼️' },
41
+ { type: 'Card', category: 'Display', label: 'Card', description: 'Ant Design content card', icon: '🃏' },
42
+ { type: 'Badge', category: 'Display', label: 'Badge', description: 'Ant Design status badge', icon: '🏷️' },
43
+ { type: 'Tag', category: 'Display', label: 'Tag', description: 'Ant Design tag component', icon: '🏷️' },
44
+ { type: 'Alert', category: 'Display', label: 'Alert', description: 'Ant Design alert message', icon: '⚠️' },
45
+ { type: 'Tooltip', category: 'Display', label: 'Tooltip', description: 'Ant Design tooltip', icon: '💬' },
46
+ { type: 'Popover', category: 'Display', label: 'Popover', description: 'Ant Design popover', icon: '💭' },
47
+ { type: 'Progress', category: 'Display', label: 'Progress', description: 'Ant Design progress bar', icon: '📊' },
48
+ { type: 'Spin', category: 'Display', label: 'Spin', description: 'Ant Design loading spinner', icon: '🔄' },
49
+ { type: 'Skeleton', category: 'Display', label: 'Skeleton', description: 'Ant Design skeleton loading', icon: '⬜' },
50
+ // Ant Design Data Components
51
+ { type: 'Table', category: 'Data', label: 'Table', description: 'Ant Design data table', icon: '📊' },
52
+ { type: 'List', category: 'Data', label: 'List', description: 'Ant Design list container', icon: '📝' },
53
+ { type: 'Avatar', category: 'Data', label: 'Avatar', description: 'Ant Design user avatar', icon: '👤' },
54
+ { type: 'Calendar', category: 'Data', label: 'Calendar', description: 'Ant Design calendar', icon: '📅' },
55
+ { type: 'Tree', category: 'Data', label: 'Tree', description: 'Ant Design tree view', icon: '🌳' },
56
+ { type: 'Descriptions', category: 'Data', label: 'Descriptions', description: 'Ant Design description list', icon: '📋' },
57
+ { type: 'Statistic', category: 'Data', label: 'Statistic', description: 'Ant Design statistic display', icon: '📈' },
58
+ // Ant Design Navigation Components
59
+ { type: 'Menu', category: 'Navigation', label: 'Menu', description: 'Ant Design navigation menu', icon: '📋' },
60
+ { type: 'Breadcrumb', category: 'Navigation', label: 'Breadcrumb', description: 'Ant Design breadcrumb', icon: '🔗' },
61
+ { type: 'Pagination', category: 'Navigation', label: 'Pagination', description: 'Ant Design pagination', icon: '📄' },
62
+ { type: 'Steps', category: 'Navigation', label: 'Steps', description: 'Ant Design step indicator', icon: '👣' },
63
+ { type: 'Tabs', category: 'Navigation', label: 'Tabs', description: 'Ant Design tab container', icon: '🗂️' },
64
+ { type: 'Dropdown', category: 'Navigation', label: 'Dropdown', description: 'Ant Design dropdown menu', icon: '⬇️' },
65
+ // Ant Design Feedback Components
66
+ { type: 'Modal', category: 'Feedback', label: 'Modal', description: 'Ant Design modal dialog', icon: '🪟' },
67
+ { type: 'Drawer', category: 'Feedback', label: 'Drawer', description: 'Ant Design side drawer', icon: '📂' },
68
+ { type: 'Popconfirm', category: 'Feedback', label: 'Popconfirm', description: 'Ant Design confirmation popup', icon: '❓' },
69
+ { type: 'notification', category: 'Feedback', label: 'Notification', description: 'Ant Design notification', icon: '🔔' },
70
+ { type: 'message', category: 'Feedback', label: 'Message', description: 'Ant Design message', icon: '💬' },
71
+ { type: 'Result', category: 'Feedback', label: 'Result', description: 'Ant Design result page', icon: '✅' },
72
+ { type: 'Empty', category: 'Feedback', label: 'Empty', description: 'Ant Design empty state', icon: '📭' },
73
+ ];
74
+ const DraggableItem = ({ item }) => {
75
+ const { attributes, listeners, setNodeRef, isDragging } = useDraggable({
76
+ id: `palette-${item.type}`,
77
+ data: {
78
+ type: 'component',
79
+ componentType: item.type
80
+ }
81
+ });
82
+ return (_jsxs("div", { ref: setNodeRef, className: `${styles.paletteItem} ${isDragging ? styles.dragging : ''}`, ...listeners, ...attributes, children: [_jsx("div", { className: styles.itemIcon, children: item.icon || item.label[0] }), _jsx("div", { className: styles.itemLabel, children: item.label }), item.description && (_jsx("div", { className: styles.itemDescription, children: item.description }))] }));
83
+ };
84
+ export const ComponentPalette = ({ searchQuery: externalSearchQuery = '', onItemSelect }) => {
85
+ const [selectedCategory, setSelectedCategory] = useState('all');
86
+ const [expandedCategories, setExpandedCategories] = useState(new Set(['Layout', 'Form', 'Display', 'Data', 'Navigation', 'Feedback']));
87
+ const [internalSearchQuery, setInternalSearchQuery] = useState('');
88
+ // Use external search query if provided, otherwise use internal
89
+ const searchQuery = externalSearchQuery || internalSearchQuery;
90
+ const categories = useMemo(() => {
91
+ const cats = new Set();
92
+ PALETTE_ITEMS.forEach(item => cats.add(item.category));
93
+ return Array.from(cats);
94
+ }, []);
95
+ const filteredItems = useMemo(() => {
96
+ let items = PALETTE_ITEMS;
97
+ // Filter by search query
98
+ if (searchQuery) {
99
+ const query = searchQuery.toLowerCase();
100
+ items = items.filter(item => item.label.toLowerCase().includes(query) ||
101
+ item.type.toLowerCase().includes(query) ||
102
+ item.description?.toLowerCase().includes(query));
103
+ }
104
+ // Filter by category
105
+ if (selectedCategory !== 'all') {
106
+ items = items.filter(item => item.category === selectedCategory);
107
+ }
108
+ return items;
109
+ }, [searchQuery, selectedCategory]);
110
+ const itemsByCategory = useMemo(() => {
111
+ const grouped = {};
112
+ filteredItems.forEach(item => {
113
+ if (!grouped[item.category]) {
114
+ grouped[item.category] = [];
115
+ }
116
+ grouped[item.category].push(item);
117
+ });
118
+ return grouped;
119
+ }, [filteredItems]);
120
+ const toggleCategory = (category) => {
121
+ setExpandedCategories(prev => {
122
+ const next = new Set(prev);
123
+ if (next.has(category)) {
124
+ next.delete(category);
125
+ }
126
+ else {
127
+ next.add(category);
128
+ }
129
+ return next;
130
+ });
131
+ };
132
+ return (_jsxs("div", { className: styles.palette, children: [_jsxs("div", { className: styles.searchBox, children: [_jsx("input", { type: "text", className: styles.searchInput, placeholder: "Search components...", value: internalSearchQuery, onChange: (e) => setInternalSearchQuery(e.target.value) }), internalSearchQuery && (_jsx("button", { className: styles.clearButton, onClick: () => setInternalSearchQuery(''), title: "Clear search", children: "\u2715" }))] }), _jsxs("div", { className: styles.categoryTabs, children: [_jsx("button", { className: `${styles.categoryTab} ${selectedCategory === 'all' ? styles.active : ''}`, onClick: () => setSelectedCategory('all'), children: "All" }), categories.map(cat => (_jsx("button", { className: `${styles.categoryTab} ${selectedCategory === cat ? styles.active : ''}`, onClick: () => setSelectedCategory(cat), children: cat }, cat)))] }), _jsx("div", { className: styles.componentList, children: filteredItems.length === 0 ? (_jsxs("div", { className: styles.emptyState, children: [_jsx("p", { children: "No components found" }), searchQuery && (_jsx("p", { children: "Try adjusting your search term" }))] })) : selectedCategory === 'all' ? (
133
+ // Show categorized view
134
+ Object.entries(itemsByCategory).map(([category, items]) => (_jsxs("div", { className: styles.categorySection, children: [_jsxs("button", { className: styles.categoryHeader, onClick: () => toggleCategory(category), children: [_jsx("span", { className: styles.categoryArrow, children: expandedCategories.has(category) ? '▼' : '▶' }), category, _jsx("span", { className: styles.categoryCount, children: items.length })] }), expandedCategories.has(category) && (_jsx("div", { className: styles.categoryItems, children: items.map(item => (_jsx(DraggableItem, { item: item }, item.type))) }))] }, category)))) : (
135
+ // Show flat view for single category
136
+ _jsx("div", { className: styles.categoryItems, children: filteredItems.map(item => (_jsx(DraggableItem, { item: item }, item.type))) })) })] }));
137
+ };
138
+ //# sourceMappingURL=ComponentPalette.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComponentPalette.js","sourceRoot":"","sources":["../../../../playground/components/ComponentPalette/ComponentPalette.tsx"],"names":[],"mappings":";AAAA;;GAEG;AAEH,OAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,MAAM,MAAM,+BAA+B,CAAC;AAUnD,6DAA6D;AAC7D,MAAM,aAAa,GAAkB;IACnC,8BAA8B;IAC9B,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,IAAI,EAAE,IAAI,EAAE;IAChG,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,IAAI,EAAE,IAAI,EAAE;IAChG,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,kBAAkB,EAAE,IAAI,EAAE,IAAI,EAAE;IACpG,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,IAAI,E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AC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GACxC,EACN,QAAQ,EACT,eAAM,SAAS,EAAE,MAAM,CAAC,aAAa,YAAG,KAAK,CAAC,MAAM,GAAQ,IACrD,EACR,kBAAkB,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CACnC,cAAK,SAAS,EAAE,MAAM,CAAC,aAAa,YACjC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACjB,KAAC,aAAa,IAAiB,IAAI,EAAE,IAAI,IAArB,IAAI,CAAC,IAAI,CAAgB,CAC9C,CAAC,GACE,CACP,KAjBO,QAAQ,CAkBZ,CACP,CAAC,CACH,CAAC,CAAC,CAAC;gBACF,qCAAqC;gBACrC,cAAK,SAAS,EAAE,MAAM,CAAC,aAAa,YACjC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACzB,KAAC,aAAa,IAAiB,IAAI,EAAE,IAAI,IAArB,IAAI,CAAC,IAAI,CAAgB,CAC9C,CAAC,GACE,CACP,GACG,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,217 @@
1
+ /* ComponentPalette styles */
2
+
3
+ .palette {
4
+ display: flex;
5
+ flex-direction: column;
6
+ height: 100%;
7
+ background: white;
8
+ border-right: 1px solid #e5e7eb;
9
+ }
10
+
11
+ .categoryTabs {
12
+ display: flex;
13
+ gap: 4px;
14
+ padding: 8px;
15
+ border-bottom: 1px solid #e5e7eb;
16
+ background: #f9fafb;
17
+ overflow-x: auto;
18
+ }
19
+
20
+ .categoryTab {
21
+ padding: 6px 12px;
22
+ background: transparent;
23
+ border: 1px solid transparent;
24
+ border-radius: 6px;
25
+ font-size: 13px;
26
+ font-weight: 500;
27
+ color: #6b7280;
28
+ cursor: pointer;
29
+ transition: all 0.2s;
30
+ white-space: nowrap;
31
+ }
32
+
33
+ .categoryTab:hover {
34
+ background: white;
35
+ border-color: #e5e7eb;
36
+ color: #374151;
37
+ }
38
+
39
+ .categoryTab.active {
40
+ background: white;
41
+ border-color: #3b82f6;
42
+ color: #3b82f6;
43
+ }
44
+
45
+ .componentList {
46
+ flex: 1;
47
+ overflow-y: auto;
48
+ padding: 8px;
49
+ }
50
+
51
+ .categorySection {
52
+ margin-bottom: 8px;
53
+ }
54
+
55
+ .categoryHeader {
56
+ display: flex;
57
+ align-items: center;
58
+ gap: 8px;
59
+ width: 100%;
60
+ padding: 8px;
61
+ background: transparent;
62
+ border: none;
63
+ font-size: 13px;
64
+ font-weight: 600;
65
+ color: #374151;
66
+ cursor: pointer;
67
+ transition: background 0.2s;
68
+ }
69
+
70
+ .categoryHeader:hover {
71
+ background: #f3f4f6;
72
+ border-radius: 4px;
73
+ }
74
+
75
+ .categoryArrow {
76
+ font-size: 10px;
77
+ color: #9ca3af;
78
+ transition: transform 0.2s;
79
+ }
80
+
81
+ .categoryCount {
82
+ margin-left: auto;
83
+ padding: 2px 6px;
84
+ background: #f3f4f6;
85
+ border-radius: 10px;
86
+ font-size: 11px;
87
+ font-weight: 500;
88
+ color: #6b7280;
89
+ }
90
+
91
+ .categoryItems {
92
+ display: grid;
93
+ grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
94
+ gap: 8px;
95
+ padding: 8px;
96
+ }
97
+
98
+ .paletteItem {
99
+ display: flex;
100
+ flex-direction: column;
101
+ align-items: center;
102
+ gap: 4px;
103
+ padding: 12px 8px;
104
+ background: white;
105
+ border: 1px solid #e5e7eb;
106
+ border-radius: 8px;
107
+ cursor: grab;
108
+ transition: all 0.2s;
109
+ user-select: none;
110
+ }
111
+
112
+ .paletteItem:hover {
113
+ border-color: #93c5fd;
114
+ background: #f0f9ff;
115
+ transform: translateY(-2px);
116
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
117
+ }
118
+
119
+ .paletteItem:active {
120
+ cursor: grabbing;
121
+ }
122
+
123
+ .paletteItem.dragging {
124
+ opacity: 0.5;
125
+ cursor: grabbing;
126
+ }
127
+
128
+ .itemIcon {
129
+ width: 32px;
130
+ height: 32px;
131
+ display: flex;
132
+ align-items: center;
133
+ justify-content: center;
134
+ background: #eff6ff;
135
+ border-radius: 6px;
136
+ font-size: 18px;
137
+ font-weight: 600;
138
+ color: #3b82f6;
139
+ }
140
+
141
+ .itemLabel {
142
+ font-size: 12px;
143
+ font-weight: 500;
144
+ color: #374151;
145
+ text-align: center;
146
+ }
147
+
148
+ .itemDescription {
149
+ font-size: 10px;
150
+ color: #9ca3af;
151
+ text-align: center;
152
+ display: none;
153
+ }
154
+
155
+ .paletteItem:hover .itemDescription {
156
+ display: block;
157
+ }
158
+
159
+ /* Search Box */
160
+ .searchBox {
161
+ position: relative;
162
+ padding: 8px;
163
+ border-bottom: 1px solid #e5e7eb;
164
+ background: #f9fafb;
165
+ }
166
+
167
+ .searchInput {
168
+ width: 100%;
169
+ padding: 8px 32px 8px 12px;
170
+ background: white;
171
+ border: 1px solid #e5e7eb;
172
+ border-radius: 6px;
173
+ font-size: 13px;
174
+ outline: none;
175
+ transition: all 0.2s;
176
+ }
177
+
178
+ .searchInput::placeholder {
179
+ color: #9ca3af;
180
+ }
181
+
182
+ .searchInput:focus {
183
+ border-color: #3b82f6;
184
+ box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
185
+ }
186
+
187
+ .clearButton {
188
+ position: absolute;
189
+ right: 12px;
190
+ top: 50%;
191
+ transform: translateY(-50%);
192
+ width: 24px;
193
+ height: 24px;
194
+ padding: 0;
195
+ background: transparent;
196
+ border: none;
197
+ border-radius: 4px;
198
+ color: #6b7280;
199
+ cursor: pointer;
200
+ display: flex;
201
+ align-items: center;
202
+ justify-content: center;
203
+ transition: all 0.2s;
204
+ }
205
+
206
+ .clearButton:hover {
207
+ background: #e5e7eb;
208
+ color: #374151;
209
+ }
210
+
211
+ /* Empty State */
212
+ .emptyState {
213
+ padding: 32px 16px;
214
+ text-align: center;
215
+ color: #9ca3af;
216
+ font-size: 13px;
217
+ }
@@ -0,0 +1,3 @@
1
+ export { ComponentPalette } from './ComponentPalette';
2
+ export type { ComponentPaletteProps, PaletteItem } from './ComponentPalette';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../playground/components/ComponentPalette/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ComponentPalette } from './ComponentPalette';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../playground/components/ComponentPalette/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * DropZone - Droppable area for components
3
+ */
4
+ import React from 'react';
5
+ import type { DraggedItem } from '../../types';
6
+ export interface DropZoneProps {
7
+ id: string;
8
+ componentId: string;
9
+ accepts?: string[] | ((item: DraggedItem) => boolean);
10
+ maxChildren?: number;
11
+ insertIndex?: number;
12
+ children?: React.ReactNode;
13
+ className?: string;
14
+ showIndicator?: boolean;
15
+ }
16
+ export declare const DropZone: React.FC<DropZoneProps>;
17
+ //# sourceMappingURL=DropZone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropZone.d.ts","sourceRoot":"","sources":["../../../../playground/components/DropZone/DropZone.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAyC,MAAM,OAAO,CAAC;AAG9D,OAAO,KAAK,EAA4B,WAAW,EAAE,MAAM,aAAa,CAAC;AAGzE,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAyG5C,CAAC"}
@@ -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,G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AAI,CAAC,CAAC,CAAC,EAAE;UACzB,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;UAC/B,CAAC,OAAO,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;UACxC,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;OACzC,uBACkB,EAAE,uBACF,WAAW,aAE7B,QAAQ,EAER,iBAAiB,IAAI,CACpB,cAAK,SAAS,EAAE,MAAM,CAAC,aAAa,YAClC,cAAK,SAAS,EAAE,MAAM,CAAC,WAAW,YAC/B,WAAW,CAAC,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"}