@tpitre/story-ui 2.7.1 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/README.md +40 -9
  2. package/dist/cli/deploy.d.ts +1 -1
  3. package/dist/cli/deploy.d.ts.map +1 -1
  4. package/dist/cli/deploy.js +5 -115
  5. package/dist/cli/index.js +0 -0
  6. package/dist/cli/setup.js +3 -3
  7. package/dist/templates/StoryUI/StoryUIPanel.d.ts.map +1 -1
  8. package/dist/templates/StoryUI/StoryUIPanel.js +30 -2
  9. package/package.json +1 -1
  10. package/templates/StoryUI/StoryUIPanel.tsx +35 -2
  11. package/dist/cli/index.js.map +0 -1
  12. package/dist/cli/setup.js.map +0 -1
  13. package/dist/cloudflare-edge/src/mcp-session.js +0 -462
  14. package/dist/cloudflare-edge/src/types.js +0 -4
  15. package/dist/cloudflare-edge/src/worker.js +0 -106
  16. package/dist/cloudflare-pages/vite.config.js +0 -14
  17. package/dist/index.d.ts +0 -13
  18. package/dist/index.d.ts.map +0 -1
  19. package/dist/index.js +0 -12
  20. package/dist/index.js.map +0 -1
  21. package/dist/mcp-server/index.js.map +0 -1
  22. package/dist/mcp-server/mcp-stdio-server.js.map +0 -1
  23. package/dist/mcp-server/routes/claude.js.map +0 -1
  24. package/dist/mcp-server/routes/components.js.map +0 -1
  25. package/dist/mcp-server/routes/generateStory.js.map +0 -1
  26. package/dist/mcp-server/routes/hybridStories.js.map +0 -1
  27. package/dist/mcp-server/routes/memoryStories.js.map +0 -1
  28. package/dist/mcp-server/routes/storySync.js.map +0 -1
  29. package/dist/mcp-server/routes/updateStory.js +0 -246
  30. package/dist/mcp-server/sessionManager.js.map +0 -1
  31. package/dist/playground/components/AIAssistant/AIAssistant.d.ts +0 -6
  32. package/dist/playground/components/AIAssistant/AIAssistant.d.ts.map +0 -1
  33. package/dist/playground/components/AIAssistant/AIAssistant.js +0 -109
  34. package/dist/playground/components/AIAssistant/AIAssistant.js.map +0 -1
  35. package/dist/playground/components/AIAssistant/AIAssistant.module.css +0 -166
  36. package/dist/playground/components/Canvas/Canvas.d.ts +0 -9
  37. package/dist/playground/components/Canvas/Canvas.d.ts.map +0 -1
  38. package/dist/playground/components/Canvas/Canvas.js +0 -58
  39. package/dist/playground/components/Canvas/Canvas.js.map +0 -1
  40. package/dist/playground/components/Canvas/Canvas.module.css +0 -189
  41. package/dist/playground/components/Canvas/CanvasWithDnd.d.ts +0 -9
  42. package/dist/playground/components/Canvas/CanvasWithDnd.d.ts.map +0 -1
  43. package/dist/playground/components/Canvas/CanvasWithDnd.js +0 -158
  44. package/dist/playground/components/Canvas/CanvasWithDnd.js.map +0 -1
  45. package/dist/playground/components/Canvas/ComponentRenderer.d.ts +0 -15
  46. package/dist/playground/components/Canvas/ComponentRenderer.d.ts.map +0 -1
  47. package/dist/playground/components/Canvas/ComponentRenderer.js +0 -177
  48. package/dist/playground/components/Canvas/ComponentRenderer.js.map +0 -1
  49. package/dist/playground/components/Canvas/DraggableComponent.d.ts +0 -15
  50. package/dist/playground/components/Canvas/DraggableComponent.d.ts.map +0 -1
  51. package/dist/playground/components/Canvas/DraggableComponent.js +0 -49
  52. package/dist/playground/components/Canvas/DraggableComponent.js.map +0 -1
  53. package/dist/playground/components/Canvas/index.d.ts +0 -9
  54. package/dist/playground/components/Canvas/index.d.ts.map +0 -1
  55. package/dist/playground/components/Canvas/index.js +0 -5
  56. package/dist/playground/components/Canvas/index.js.map +0 -1
  57. package/dist/playground/components/CodeView/CodeView.d.ts +0 -12
  58. package/dist/playground/components/CodeView/CodeView.d.ts.map +0 -1
  59. package/dist/playground/components/CodeView/CodeView.js +0 -77
  60. package/dist/playground/components/CodeView/CodeView.js.map +0 -1
  61. package/dist/playground/components/CodeView/CodeView.module.css +0 -178
  62. package/dist/playground/components/ComponentPalette/ComponentPalette.d.ts +0 -17
  63. package/dist/playground/components/ComponentPalette/ComponentPalette.d.ts.map +0 -1
  64. package/dist/playground/components/ComponentPalette/ComponentPalette.js +0 -138
  65. package/dist/playground/components/ComponentPalette/ComponentPalette.js.map +0 -1
  66. package/dist/playground/components/ComponentPalette/ComponentPalette.module.css +0 -217
  67. package/dist/playground/components/ComponentPalette/index.d.ts +0 -3
  68. package/dist/playground/components/ComponentPalette/index.d.ts.map +0 -1
  69. package/dist/playground/components/ComponentPalette/index.js +0 -2
  70. package/dist/playground/components/ComponentPalette/index.js.map +0 -1
  71. package/dist/playground/components/DropZone/DropZone.d.ts +0 -17
  72. package/dist/playground/components/DropZone/DropZone.d.ts.map +0 -1
  73. package/dist/playground/components/DropZone/DropZone.js +0 -73
  74. package/dist/playground/components/DropZone/DropZone.js.map +0 -1
  75. package/dist/playground/components/DropZone/DropZone.module.css +0 -86
  76. package/dist/playground/components/ExportDialog/ExportDialog.d.ts +0 -10
  77. package/dist/playground/components/ExportDialog/ExportDialog.d.ts.map +0 -1
  78. package/dist/playground/components/ExportDialog/ExportDialog.js +0 -57
  79. package/dist/playground/components/ExportDialog/ExportDialog.js.map +0 -1
  80. package/dist/playground/components/ExportDialog/ExportDialog.module.css +0 -328
  81. package/dist/playground/components/LayoutHelpers/LayoutHelpers.d.ts +0 -134
  82. package/dist/playground/components/LayoutHelpers/LayoutHelpers.d.ts.map +0 -1
  83. package/dist/playground/components/LayoutHelpers/LayoutHelpers.js +0 -254
  84. package/dist/playground/components/LayoutHelpers/LayoutHelpers.js.map +0 -1
  85. package/dist/playground/components/LayoutHelpers/index.d.ts +0 -3
  86. package/dist/playground/components/LayoutHelpers/index.d.ts.map +0 -1
  87. package/dist/playground/components/LayoutHelpers/index.js +0 -2
  88. package/dist/playground/components/LayoutHelpers/index.js.map +0 -1
  89. package/dist/playground/components/Playground/Playground.d.ts +0 -10
  90. package/dist/playground/components/Playground/Playground.d.ts.map +0 -1
  91. package/dist/playground/components/Playground/Playground.js +0 -128
  92. package/dist/playground/components/Playground/Playground.js.map +0 -1
  93. package/dist/playground/components/Playground/Playground.module.css +0 -308
  94. package/dist/playground/components/PropertiesPanel/PropertiesPanel.d.ts +0 -10
  95. package/dist/playground/components/PropertiesPanel/PropertiesPanel.d.ts.map +0 -1
  96. package/dist/playground/components/PropertiesPanel/PropertiesPanel.js +0 -150
  97. package/dist/playground/components/PropertiesPanel/PropertiesPanel.js.map +0 -1
  98. package/dist/playground/components/PropertiesPanel/PropertiesPanel.module.css +0 -155
  99. package/dist/playground/components/PropertiesPanel/index.d.ts +0 -3
  100. package/dist/playground/components/PropertiesPanel/index.d.ts.map +0 -1
  101. package/dist/playground/components/PropertiesPanel/index.js +0 -2
  102. package/dist/playground/components/PropertiesPanel/index.js.map +0 -1
  103. package/dist/playground/components/PropertyEditors/BooleanEditor.d.ts +0 -12
  104. package/dist/playground/components/PropertyEditors/BooleanEditor.d.ts.map +0 -1
  105. package/dist/playground/components/PropertyEditors/BooleanEditor.js +0 -14
  106. package/dist/playground/components/PropertyEditors/BooleanEditor.js.map +0 -1
  107. package/dist/playground/components/PropertyEditors/ColorEditor.d.ts +0 -12
  108. package/dist/playground/components/PropertyEditors/ColorEditor.d.ts.map +0 -1
  109. package/dist/playground/components/PropertyEditors/ColorEditor.js +0 -62
  110. package/dist/playground/components/PropertyEditors/ColorEditor.js.map +0 -1
  111. package/dist/playground/components/PropertyEditors/IconEditor.d.ts +0 -12
  112. package/dist/playground/components/PropertyEditors/IconEditor.d.ts.map +0 -1
  113. package/dist/playground/components/PropertyEditors/IconEditor.js +0 -123
  114. package/dist/playground/components/PropertyEditors/IconEditor.js.map +0 -1
  115. package/dist/playground/components/PropertyEditors/NumberEditor.d.ts +0 -15
  116. package/dist/playground/components/PropertyEditors/NumberEditor.d.ts.map +0 -1
  117. package/dist/playground/components/PropertyEditors/NumberEditor.js +0 -46
  118. package/dist/playground/components/PropertyEditors/NumberEditor.js.map +0 -1
  119. package/dist/playground/components/PropertyEditors/PropertyEditors.module.css +0 -432
  120. package/dist/playground/components/PropertyEditors/SelectEditor.d.ts +0 -19
  121. package/dist/playground/components/PropertyEditors/SelectEditor.d.ts.map +0 -1
  122. package/dist/playground/components/PropertyEditors/SelectEditor.js +0 -17
  123. package/dist/playground/components/PropertyEditors/SelectEditor.js.map +0 -1
  124. package/dist/playground/components/PropertyEditors/SpacingEditor.d.ts +0 -19
  125. package/dist/playground/components/PropertyEditors/SpacingEditor.d.ts.map +0 -1
  126. package/dist/playground/components/PropertyEditors/SpacingEditor.js +0 -162
  127. package/dist/playground/components/PropertyEditors/SpacingEditor.js.map +0 -1
  128. package/dist/playground/components/PropertyEditors/SpacingEditor.module.css +0 -214
  129. package/dist/playground/components/PropertyEditors/TextEditor.d.ts +0 -14
  130. package/dist/playground/components/PropertyEditors/TextEditor.d.ts.map +0 -1
  131. package/dist/playground/components/PropertyEditors/TextEditor.js +0 -38
  132. package/dist/playground/components/PropertyEditors/TextEditor.js.map +0 -1
  133. package/dist/playground/components/PropertyEditors/TokenEditor.d.ts +0 -23
  134. package/dist/playground/components/PropertyEditors/TokenEditor.d.ts.map +0 -1
  135. package/dist/playground/components/PropertyEditors/TokenEditor.js +0 -50
  136. package/dist/playground/components/PropertyEditors/TokenEditor.js.map +0 -1
  137. package/dist/playground/components/PropertyEditors/index.d.ts +0 -20
  138. package/dist/playground/components/PropertyEditors/index.d.ts.map +0 -1
  139. package/dist/playground/components/PropertyEditors/index.js +0 -12
  140. package/dist/playground/components/PropertyEditors/index.js.map +0 -1
  141. package/dist/playground/components/TreeView/TreeView.d.ts +0 -10
  142. package/dist/playground/components/TreeView/TreeView.d.ts.map +0 -1
  143. package/dist/playground/components/TreeView/TreeView.js +0 -146
  144. package/dist/playground/components/TreeView/TreeView.js.map +0 -1
  145. package/dist/playground/components/TreeView/TreeView.module.css +0 -214
  146. package/dist/playground/components/TreeView/index.d.ts +0 -3
  147. package/dist/playground/components/TreeView/index.d.ts.map +0 -1
  148. package/dist/playground/components/TreeView/index.js +0 -2
  149. package/dist/playground/components/TreeView/index.js.map +0 -1
  150. package/dist/playground/config/propertyDefinitions.d.ts +0 -73
  151. package/dist/playground/config/propertyDefinitions.d.ts.map +0 -1
  152. package/dist/playground/config/propertyDefinitions.js +0 -809
  153. package/dist/playground/config/propertyDefinitions.js.map +0 -1
  154. package/dist/playground/hooks/useKeyboardShortcuts.d.ts +0 -38
  155. package/dist/playground/hooks/useKeyboardShortcuts.d.ts.map +0 -1
  156. package/dist/playground/hooks/useKeyboardShortcuts.js +0 -191
  157. package/dist/playground/hooks/useKeyboardShortcuts.js.map +0 -1
  158. package/dist/playground/index.d.ts +0 -21
  159. package/dist/playground/index.d.ts.map +0 -1
  160. package/dist/playground/index.js +0 -23
  161. package/dist/playground/index.js.map +0 -1
  162. package/dist/playground/services/CodeGenerator.d.ts +0 -73
  163. package/dist/playground/services/CodeGenerator.d.ts.map +0 -1
  164. package/dist/playground/services/CodeGenerator.js +0 -359
  165. package/dist/playground/services/CodeGenerator.js.map +0 -1
  166. package/dist/playground/services/DragDropManager.d.ts +0 -95
  167. package/dist/playground/services/DragDropManager.d.ts.map +0 -1
  168. package/dist/playground/services/DragDropManager.js +0 -408
  169. package/dist/playground/services/DragDropManager.js.map +0 -1
  170. package/dist/playground/services/StoryParser.d.ts +0 -73
  171. package/dist/playground/services/StoryParser.d.ts.map +0 -1
  172. package/dist/playground/services/StoryParser.js +0 -419
  173. package/dist/playground/services/StoryParser.js.map +0 -1
  174. package/dist/playground/store/playgroundStore.d.ts +0 -86
  175. package/dist/playground/store/playgroundStore.d.ts.map +0 -1
  176. package/dist/playground/store/playgroundStore.js +0 -337
  177. package/dist/playground/store/playgroundStore.js.map +0 -1
  178. package/dist/playground/stories/PlaygroundDragDrop.stories.d.ts +0 -13
  179. package/dist/playground/stories/PlaygroundDragDrop.stories.d.ts.map +0 -1
  180. package/dist/playground/stories/PlaygroundDragDrop.stories.js +0 -227
  181. package/dist/playground/stories/PlaygroundDragDrop.stories.js.map +0 -1
  182. package/dist/playground/stories/PlaygroundPhase4.stories.d.ts +0 -13
  183. package/dist/playground/stories/PlaygroundPhase4.stories.d.ts.map +0 -1
  184. package/dist/playground/stories/PlaygroundPhase4.stories.js +0 -334
  185. package/dist/playground/stories/PlaygroundPhase4.stories.js.map +0 -1
  186. package/dist/playground/stories/PlaygroundPhase5.stories.d.ts +0 -14
  187. package/dist/playground/stories/PlaygroundPhase5.stories.d.ts.map +0 -1
  188. package/dist/playground/stories/PlaygroundPhase5.stories.js +0 -512
  189. package/dist/playground/stories/PlaygroundPhase5.stories.js.map +0 -1
  190. package/dist/playground/stories/PlaygroundProperties.stories.d.ts +0 -13
  191. package/dist/playground/stories/PlaygroundProperties.stories.d.ts.map +0 -1
  192. package/dist/playground/stories/PlaygroundProperties.stories.js +0 -342
  193. package/dist/playground/stories/PlaygroundProperties.stories.js.map +0 -1
  194. package/dist/playground/types/index.d.ts +0 -251
  195. package/dist/playground/types/index.d.ts.map +0 -1
  196. package/dist/playground/types/index.js +0 -5
  197. package/dist/playground/types/index.js.map +0 -1
  198. package/dist/scripts/verify-framework-adapters.js +0 -105
  199. package/dist/story-generator/componentBlacklist.js.map +0 -1
  200. package/dist/story-generator/componentDiscovery.js.map +0 -1
  201. package/dist/story-generator/configLoader.js.map +0 -1
  202. package/dist/story-generator/considerationsLoader.js.map +0 -1
  203. package/dist/story-generator/documentation-sources.js.map +0 -1
  204. package/dist/story-generator/documentationLoader.js.map +0 -1
  205. package/dist/story-generator/dynamicPackageDiscovery.js.map +0 -1
  206. package/dist/story-generator/enhancedComponentDiscovery.js.map +0 -1
  207. package/dist/story-generator/generateStory.js.map +0 -1
  208. package/dist/story-generator/gitignoreManager.js.map +0 -1
  209. package/dist/story-generator/inMemoryStoryService.js.map +0 -1
  210. package/dist/story-generator/logger.js.map +0 -1
  211. package/dist/story-generator/postProcessStory.js.map +0 -1
  212. package/dist/story-generator/productionGitignoreManager.js.map +0 -1
  213. package/dist/story-generator/promptGenerator.js.map +0 -1
  214. package/dist/story-generator/providerPresets.d.ts +0 -54
  215. package/dist/story-generator/providerPresets.d.ts.map +0 -1
  216. package/dist/story-generator/providerPresets.js +0 -214
  217. package/dist/story-generator/storyHistory.js.map +0 -1
  218. package/dist/story-generator/storySync.js.map +0 -1
  219. package/dist/story-generator/storyTracker.js.map +0 -1
  220. package/dist/story-generator/storyValidator.js.map +0 -1
  221. package/dist/story-generator/test_validation.d.ts +0 -2
  222. package/dist/story-generator/test_validation.d.ts.map +0 -1
  223. package/dist/story-generator/test_validation.js +0 -51
  224. package/dist/story-generator/universalDesignSystemAdapter.js.map +0 -1
  225. package/dist/story-generator/urlRedirectService.js.map +0 -1
  226. package/dist/story-generator/validateStory.js.map +0 -1
  227. package/dist/story-ui.config.js.map +0 -1
  228. package/dist/story-ui.config.loader.d.ts +0 -36
  229. package/dist/story-ui.config.loader.d.ts.map +0 -1
  230. package/dist/story-ui.config.loader.js +0 -205
  231. package/dist/story-ui.config.loader.js.map +0 -1
  232. package/dist/temp/package/templates/StoryUI/StoryUIPanel.js +0 -807
  233. package/dist/temp/package/templates/StoryUI/StoryUIPanel.stories.js +0 -37
  234. package/dist/temp/package/templates/StoryUI/index.js +0 -2
  235. package/dist/templates/StoryUI/StoryUIPanel.js.map +0 -1
  236. package/dist/templates/StoryUI/StoryUIPanel.stories.js.map +0 -1
  237. package/dist/templates/StoryUI/index.js.map +0 -1
  238. package/dist/templates/StoryUI/manager.d.ts +0 -14
  239. package/dist/templates/StoryUI/manager.d.ts.map +0 -1
  240. package/dist/templates/production-app/src/App.d.ts +0 -10
  241. package/dist/templates/production-app/src/App.d.ts.map +0 -1
  242. package/dist/templates/production-app/src/App.js +0 -653
  243. package/dist/templates/production-app/src/LivePreviewRenderer.d.ts +0 -24
  244. package/dist/templates/production-app/src/LivePreviewRenderer.d.ts.map +0 -1
  245. package/dist/templates/production-app/src/LivePreviewRenderer.js +0 -199
  246. package/dist/templates/production-app/src/componentRegistry.d.ts +0 -20
  247. package/dist/templates/production-app/src/componentRegistry.d.ts.map +0 -1
  248. package/dist/templates/production-app/src/componentRegistry.js +0 -316
  249. package/dist/templates/production-app/src/main.d.ts +0 -9
  250. package/dist/templates/production-app/src/main.d.ts.map +0 -1
  251. package/dist/templates/production-app/src/main.js +0 -18
  252. package/dist/templates/production-app/vite.config.d.ts +0 -3
  253. package/dist/templates/production-app/vite.config.d.ts.map +0 -1
  254. package/dist/templates/production-app/vite.config.js +0 -71
  255. package/dist/test-storybooks/angular-material-storybook/src/main.js +0 -66
  256. package/dist/test-storybooks/chakra-storybook/vite.config.js +0 -6
  257. package/dist/test-storybooks/mantine-storybook/vite.config.js +0 -93
  258. package/dist/test-storybooks/web-components-shoelace/vite.config.js +0 -9
  259. package/dist/tsconfig.tsbuildinfo +0 -1
  260. package/dist/visual-builder/components/Canvas/Canvas.js +0 -70
  261. package/dist/visual-builder/components/Canvas/ComponentRenderer.js +0 -545
  262. package/dist/visual-builder/components/CodeExporter/CodeExporter.js +0 -25
  263. package/dist/visual-builder/components/CodeExporter/codeGenerator.js +0 -99
  264. package/dist/visual-builder/components/ComponentPalette/ComponentPalette.js +0 -8
  265. package/dist/visual-builder/components/ComponentPalette/ComponentPaletteItem.js +0 -51
  266. package/dist/visual-builder/components/EmbeddedVisualBuilder.js +0 -107
  267. package/dist/visual-builder/components/PropertyEditor/PropertyEditor.js +0 -16
  268. package/dist/visual-builder/components/PropertyEditor/PropertyForm.js +0 -88
  269. package/dist/visual-builder/components/PropertyEditor/SpacingControl.js +0 -145
  270. package/dist/visual-builder/components/PropertyEditor/SpacingEditor.js +0 -32
  271. package/dist/visual-builder/components/StoryManager/SaveOnlyManager.js +0 -94
  272. package/dist/visual-builder/components/StoryManager/StoryManager.js +0 -68
  273. package/dist/visual-builder/components/StoryManager/index.js +0 -1
  274. package/dist/visual-builder/components/VisualBuilder.js +0 -256
  275. package/dist/visual-builder/config/componentRegistry.js +0 -1758
  276. package/dist/visual-builder/decorators/VisualBuilderDecorator.js +0 -184
  277. package/dist/visual-builder/example-integration.js +0 -59
  278. package/dist/visual-builder/example.js +0 -23
  279. package/dist/visual-builder/hooks/useDragAndDrop.js +0 -137
  280. package/dist/visual-builder/hooks/useSelection.js +0 -27
  281. package/dist/visual-builder/index.js +0 -7
  282. package/dist/visual-builder/store/visualBuilderStore.js +0 -305
  283. package/dist/visual-builder/types/index.js +0 -1
  284. package/dist/visual-builder/utils/__tests__/storyFileUpdater.test.js +0 -145
  285. package/dist/visual-builder/utils/aiParser.js +0 -336
  286. package/dist/visual-builder/utils/componentTreeUtils.js +0 -111
  287. package/dist/visual-builder/utils/parserValidation.js +0 -122
  288. package/dist/visual-builder/utils/storyFileManager.js +0 -73
  289. package/dist/visual-builder/utils/storyFileUpdater.js +0 -326
  290. package/dist/visual-builder/utils/storyNameExtraction.test.js +0 -211
  291. package/dist/visual-builder/utils/storyPersistence.js +0 -180
  292. package/dist/visual-builder/utils/storyToBuilder.js +0 -813
@@ -1,66 +0,0 @@
1
- var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
2
- function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
3
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
4
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
5
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
6
- var _, done = false;
7
- for (var i = decorators.length - 1; i >= 0; i--) {
8
- var context = {};
9
- for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
10
- for (var p in contextIn.access) context.access[p] = contextIn.access[p];
11
- context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
12
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
13
- if (kind === "accessor") {
14
- if (result === void 0) continue;
15
- if (result === null || typeof result !== "object") throw new TypeError("Object expected");
16
- if (_ = accept(result.get)) descriptor.get = _;
17
- if (_ = accept(result.set)) descriptor.set = _;
18
- if (_ = accept(result.init)) initializers.unshift(_);
19
- }
20
- else if (_ = accept(result)) {
21
- if (kind === "field") initializers.unshift(_);
22
- else descriptor[key] = _;
23
- }
24
- }
25
- if (target) Object.defineProperty(target, contextIn.name, descriptor);
26
- done = true;
27
- };
28
- var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
29
- var useValue = arguments.length > 2;
30
- for (var i = 0; i < initializers.length; i++) {
31
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
32
- }
33
- return useValue ? value : void 0;
34
- };
35
- var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
36
- if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
37
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
38
- };
39
- import { bootstrapApplication } from '@angular/platform-browser';
40
- import { provideAnimations } from '@angular/platform-browser/animations';
41
- import { Component } from '@angular/core';
42
- let AppComponent = (() => {
43
- let _classDecorators = [Component({
44
- selector: 'app-root',
45
- standalone: true,
46
- template: '<h1>Angular Material Storybook</h1>',
47
- })];
48
- let _classDescriptor;
49
- let _classExtraInitializers = [];
50
- let _classThis;
51
- var AppComponent = _classThis = class {
52
- };
53
- __setFunctionName(_classThis, "AppComponent");
54
- (() => {
55
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
56
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
57
- AppComponent = _classThis = _classDescriptor.value;
58
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
59
- __runInitializers(_classThis, _classExtraInitializers);
60
- })();
61
- return AppComponent = _classThis;
62
- })();
63
- export { AppComponent };
64
- bootstrapApplication(AppComponent, {
65
- providers: [provideAnimations()],
66
- });
@@ -1,6 +0,0 @@
1
- import { defineConfig } from 'vite';
2
- import react from '@vitejs/plugin-react';
3
- // https://vite.dev/config/
4
- export default defineConfig({
5
- plugins: [react()],
6
- });
@@ -1,93 +0,0 @@
1
- import { defineConfig } from 'vite';
2
- import react from '@vitejs/plugin-react';
3
- import fs from 'fs';
4
- import path from 'path';
5
- // Custom plugin to serve raw source files for Visual Builder
6
- function rawSourcePlugin() {
7
- return {
8
- name: 'raw-source-plugin',
9
- configureServer(server) {
10
- server.middlewares.use('/api/raw-source', (req, res) => {
11
- const url = new URL(req.url, `http://${req.headers.host}`);
12
- const fileName = url.searchParams.get('file');
13
- const isEdited = url.searchParams.get('isEdited') === 'true';
14
- if (!fileName) {
15
- res.statusCode = 400;
16
- res.end(JSON.stringify({ error: 'File parameter is required' }));
17
- return;
18
- }
19
- console.log(`[Vite Plugin] Loading story: ${fileName}, isEdited: ${isEdited}`);
20
- try {
21
- let filePath;
22
- let sourceCode;
23
- // Priority-based file lookup: edited stories get priority in edited/ directory
24
- if (isEdited) {
25
- // For edited stories, check edited/ directory first
26
- const editedPath = path.join(process.cwd(), 'src', 'stories', 'edited', `${fileName}.stories.tsx`);
27
- const generatedPath = path.join(process.cwd(), 'src', 'stories', 'generated', `${fileName}.stories.tsx`);
28
- if (fs.existsSync(editedPath)) {
29
- filePath = editedPath;
30
- sourceCode = fs.readFileSync(filePath, 'utf-8');
31
- }
32
- else if (fs.existsSync(generatedPath)) {
33
- filePath = generatedPath;
34
- sourceCode = fs.readFileSync(filePath, 'utf-8');
35
- }
36
- else {
37
- res.statusCode = 404;
38
- res.end(JSON.stringify({
39
- error: `File not found: ${fileName}`,
40
- searched: ['edited/', 'generated/']
41
- }));
42
- return;
43
- }
44
- }
45
- else {
46
- // For generated stories, check generated/ directory first
47
- const generatedPath = path.join(process.cwd(), 'src', 'stories', 'generated', `${fileName}.stories.tsx`);
48
- const editedPath = path.join(process.cwd(), 'src', 'stories', 'edited', `${fileName}.stories.tsx`);
49
- if (fs.existsSync(generatedPath)) {
50
- filePath = generatedPath;
51
- sourceCode = fs.readFileSync(filePath, 'utf-8');
52
- }
53
- else if (fs.existsSync(editedPath)) {
54
- filePath = editedPath;
55
- sourceCode = fs.readFileSync(filePath, 'utf-8');
56
- }
57
- else {
58
- res.statusCode = 404;
59
- res.end(JSON.stringify({
60
- error: `File not found: ${fileName}`,
61
- searched: ['generated/', 'edited/']
62
- }));
63
- return;
64
- }
65
- }
66
- console.log(`[Vite Plugin] Successfully loaded from: ${filePath}`);
67
- res.setHeader('Content-Type', 'application/json');
68
- res.setHeader('Access-Control-Allow-Origin', '*');
69
- res.setHeader('Access-Control-Allow-Methods', 'GET');
70
- res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
71
- res.end(JSON.stringify({
72
- success: true,
73
- fileName: fileName,
74
- source: sourceCode,
75
- loadedFrom: filePath
76
- }));
77
- }
78
- catch (error) {
79
- console.error('Error reading source file:', error);
80
- res.statusCode = 500;
81
- res.end(JSON.stringify({
82
- error: 'Failed to read source file',
83
- details: error instanceof Error ? error.message : 'Unknown error'
84
- }));
85
- }
86
- });
87
- }
88
- };
89
- }
90
- // https://vite.dev/config/
91
- export default defineConfig({
92
- plugins: [react(), rawSourcePlugin()],
93
- });
@@ -1,9 +0,0 @@
1
- import { defineConfig } from 'vite';
2
- export default defineConfig({
3
- build: {
4
- target: 'esnext',
5
- },
6
- server: {
7
- port: 5173,
8
- },
9
- });
@@ -1 +0,0 @@
1
- {"root":["../index.ts","../story-ui.config.loader.ts","../story-ui.config.ts","../cli/index.ts","../cli/setup.ts","../mcp-server/index.ts","../mcp-server/mcp-stdio-server.ts","../mcp-server/sessionmanager.ts","../mcp-server/routes/claude.ts","../mcp-server/routes/components.ts","../mcp-server/routes/generatestory.ts","../mcp-server/routes/hybridstories.ts","../mcp-server/routes/memorystories.ts","../mcp-server/routes/storysync.ts","../playground/index.ts","../playground/styles.d.ts","../playground/components/canvas/index.ts","../playground/components/componentpalette/index.ts","../playground/components/layouthelpers/index.ts","../playground/components/propertiespanel/index.ts","../playground/components/propertyeditors/index.ts","../playground/components/treeview/index.ts","../playground/config/propertydefinitions.ts","../playground/hooks/usekeyboardshortcuts.ts","../playground/services/codegenerator.ts","../playground/services/dragdropmanager.ts","../playground/services/storyparser.ts","../playground/store/playgroundstore.ts","../playground/types/index.ts","../story-generator/componentblacklist.ts","../story-generator/componentdiscovery.ts","../story-generator/configloader.ts","../story-generator/considerationsloader.ts","../story-generator/documentation-sources.ts","../story-generator/documentationloader.ts","../story-generator/dynamicpackagediscovery.ts","../story-generator/enhancedcomponentdiscovery.ts","../story-generator/generatestory.ts","../story-generator/gitignoremanager.ts","../story-generator/inmemorystoryservice.ts","../story-generator/logger.ts","../story-generator/postprocessstory.ts","../story-generator/productiongitignoremanager.ts","../story-generator/promptgenerator.ts","../story-generator/storyhistory.ts","../story-generator/storysync.ts","../story-generator/storytracker.ts","../story-generator/storyvalidator.ts","../story-generator/universaldesignsystemadapter.ts","../story-generator/urlredirectservice.ts","../story-generator/validatestory.ts","../playground/components/aiassistant/aiassistant.tsx","../playground/components/canvas/canvas.tsx","../playground/components/canvas/canvaswithdnd.tsx","../playground/components/canvas/componentrenderer.tsx","../playground/components/canvas/draggablecomponent.tsx","../playground/components/codeview/codeview.tsx","../playground/components/componentpalette/componentpalette.tsx","../playground/components/dropzone/dropzone.tsx","../playground/components/exportdialog/exportdialog.tsx","../playground/components/layouthelpers/layouthelpers.tsx","../playground/components/playground/playground.tsx","../playground/components/propertiespanel/propertiespanel.tsx","../playground/components/propertyeditors/booleaneditor.tsx","../playground/components/propertyeditors/coloreditor.tsx","../playground/components/propertyeditors/iconeditor.tsx","../playground/components/propertyeditors/numbereditor.tsx","../playground/components/propertyeditors/selecteditor.tsx","../playground/components/propertyeditors/spacingeditor.tsx","../playground/components/propertyeditors/texteditor.tsx","../playground/components/propertyeditors/tokeneditor.tsx","../playground/components/treeview/treeview.tsx","../playground/stories/playgrounddragdrop.stories.tsx","../playground/stories/playgroundphase4.stories.tsx","../playground/stories/playgroundphase5.stories.tsx","../playground/stories/playgroundproperties.stories.tsx","../templates/storyui/storyuipanel.stories.tsx","../templates/storyui/storyuipanel.tsx","../templates/storyui/index.tsx"],"version":"5.8.3"}
@@ -1,70 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React from 'react';
3
- import { useDroppable } from '@dnd-kit/core';
4
- import { Box, Text, Center } from '@mantine/core';
5
- import { ComponentRenderer } from './ComponentRenderer';
6
- import { useVisualBuilderStore } from '../../store/visualBuilderStore';
7
- import { useSelection } from '../../hooks/useSelection';
8
- const CanvasDropZone = ({ insertIndex, isVisible }) => {
9
- const { setNodeRef, isOver } = useDroppable({
10
- id: `canvas-dropzone-${insertIndex}`,
11
- data: {
12
- isInsertionPoint: true,
13
- parentId: null, // Root level
14
- insertIndex,
15
- insertPosition: 'before'
16
- }
17
- });
18
- if (!isVisible)
19
- return null;
20
- return (_jsx(Box, { ref: setNodeRef, style: {
21
- height: isOver ? '12px' : '4px',
22
- backgroundColor: isOver ? '#3b82f6' : 'transparent',
23
- border: isOver ? '3px dashed #3b82f6' : '2px dashed #e5e7eb',
24
- borderRadius: '4px',
25
- margin: '8px 0',
26
- transition: 'all 0.2s ease-in-out',
27
- opacity: isOver ? 1 : 0.6
28
- }, children: isOver && (_jsx(Box, { style: {
29
- height: '100%',
30
- display: 'flex',
31
- alignItems: 'center',
32
- justifyContent: 'center'
33
- }, children: _jsx(Text, { size: "xs", c: "blue", fw: 500, children: "Drop here" }) })) }));
34
- };
35
- export const Canvas = () => {
36
- const { components, draggedComponent, isImportedFromStory } = useVisualBuilderStore();
37
- const { handleCanvasClick } = useSelection();
38
- // DEBUG: Log the preserveOriginalLayout value
39
- console.log('🔍 [Canvas] isImportedFromStory:', isImportedFromStory, 'components.length:', components.length);
40
- const { setNodeRef, isOver } = useDroppable({
41
- id: 'canvas',
42
- data: {
43
- isCanvas: true
44
- }
45
- });
46
- const isEmpty = components.length === 0;
47
- return (_jsxs(Box, { ref: setNodeRef, onClick: handleCanvasClick, style: {
48
- minHeight: '100%',
49
- padding: '2rem',
50
- backgroundColor: isOver ? '#f0f9ff' : 'white',
51
- borderWidth: '2px',
52
- borderStyle: 'dashed',
53
- borderColor: isOver ? '#3b82f6' : 'transparent',
54
- transition: 'all 0.2s ease',
55
- position: 'relative'
56
- }, children: [isEmpty ? (_jsx(Center, { style: { height: '50vh' }, children: _jsxs(Box, { ta: "center", children: [_jsx(Text, { size: "lg", c: "dimmed", mb: "sm", children: "Drop components here to start building" }), _jsx(Text, { size: "sm", c: "dimmed", children: "Drag components from the left panel to create your UI" })] }) })) : (_jsx(Box, { style: { position: 'relative' }, children: components.length === 1 ? (
57
- // Single root component - render naturally to preserve story structure
58
- _jsxs(React.Fragment, { children: [_jsx(CanvasDropZone, { insertIndex: 0, isVisible: Boolean(draggedComponent && draggedComponent.id !== components[0].id) }), _jsx(ComponentRenderer, { component: components[0], index: 0, parentId: null, preserveOriginalLayout: isImportedFromStory }), (() => { console.log('🎯 [Canvas] Single component - preserveOriginalLayout:', isImportedFromStory, 'componentType:', components[0].type); return null; })(), Boolean(draggedComponent) && (_jsx(CanvasDropZone, { insertIndex: 1, isVisible: true }))] })) : (
59
- // Multiple root components - use minimal flex layout for builder mode
60
- _jsxs(Box, { style: { display: 'flex', flexDirection: 'column', gap: '0.5rem' }, children: [components.map((component, index) => (_jsxs(React.Fragment, { children: [_jsx(CanvasDropZone, { insertIndex: index, isVisible: Boolean(draggedComponent && draggedComponent.id !== component.id) }), _jsx(ComponentRenderer, { component: component, index: index, parentId: null, preserveOriginalLayout: isImportedFromStory }), (() => { console.log('🎯 [Canvas] Multiple components - preserveOriginalLayout:', isImportedFromStory, 'componentType:', component.type, 'index:', index); return null; })()] }, component.id))), Boolean(draggedComponent) && (_jsx(CanvasDropZone, { insertIndex: components.length, isVisible: true }))] })) })), isOver && (_jsx(Box, { style: {
61
- position: 'absolute',
62
- top: 0,
63
- left: 0,
64
- right: 0,
65
- bottom: 0,
66
- backgroundColor: 'rgba(59, 130, 246, 0.1)',
67
- pointerEvents: 'none',
68
- borderRadius: '8px'
69
- } }))] }));
70
- };