@tpitre/story-ui 3.6.2 → 3.7.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 (44) hide show
  1. package/README.md +36 -32
  2. package/dist/cli/index.js +0 -5
  3. package/dist/cli/setup.js +1 -1
  4. package/dist/mcp-server/routes/generateStory.d.ts.map +1 -1
  5. package/dist/mcp-server/routes/generateStory.js +142 -87
  6. package/dist/mcp-server/routes/generateStoryStream.d.ts.map +1 -1
  7. package/dist/mcp-server/routes/generateStoryStream.js +149 -31
  8. package/dist/story-generator/dynamicPackageDiscovery.d.ts +35 -2
  9. package/dist/story-generator/dynamicPackageDiscovery.d.ts.map +1 -1
  10. package/dist/story-generator/dynamicPackageDiscovery.js +332 -6
  11. package/dist/story-generator/enhancedComponentDiscovery.d.ts.map +1 -1
  12. package/dist/story-generator/enhancedComponentDiscovery.js +149 -2
  13. package/dist/story-generator/framework-adapters/base-adapter.d.ts +1 -0
  14. package/dist/story-generator/framework-adapters/base-adapter.d.ts.map +1 -1
  15. package/dist/story-generator/framework-adapters/base-adapter.js +12 -2
  16. package/dist/story-generator/framework-adapters/react-adapter.d.ts.map +1 -1
  17. package/dist/story-generator/framework-adapters/react-adapter.js +2 -0
  18. package/dist/story-generator/framework-adapters/svelte-adapter.d.ts.map +1 -1
  19. package/dist/story-generator/framework-adapters/svelte-adapter.js +53 -7
  20. package/dist/story-generator/framework-adapters/vue-adapter.d.ts.map +1 -1
  21. package/dist/story-generator/framework-adapters/vue-adapter.js +21 -1
  22. package/dist/story-generator/framework-adapters/web-components-adapter.d.ts.map +1 -1
  23. package/dist/story-generator/framework-adapters/web-components-adapter.js +4 -0
  24. package/dist/story-generator/llm-providers/openai-provider.js +2 -2
  25. package/dist/story-generator/promptGenerator.d.ts.map +1 -1
  26. package/dist/story-generator/promptGenerator.js +179 -26
  27. package/dist/story-generator/selfHealingLoop.d.ts +112 -0
  28. package/dist/story-generator/selfHealingLoop.d.ts.map +1 -0
  29. package/dist/story-generator/selfHealingLoop.js +202 -0
  30. package/dist/story-generator/validateStory.d.ts.map +1 -1
  31. package/dist/story-generator/validateStory.js +81 -12
  32. package/dist/story-ui.config.d.ts +2 -0
  33. package/dist/story-ui.config.d.ts.map +1 -1
  34. package/dist/templates/StoryUI/StoryUIPanel.d.ts +0 -5
  35. package/dist/templates/StoryUI/StoryUIPanel.d.ts.map +1 -1
  36. package/dist/templates/StoryUI/StoryUIPanel.js +411 -223
  37. package/package.json +4 -4
  38. package/templates/StoryUI/StoryUIPanel.mdx +84 -0
  39. package/templates/StoryUI/StoryUIPanel.tsx +493 -265
  40. package/dist/templates/StoryUI/StoryUIPanel.stories.d.ts +0 -18
  41. package/dist/templates/StoryUI/StoryUIPanel.stories.d.ts.map +0 -1
  42. package/dist/templates/StoryUI/StoryUIPanel.stories.js +0 -37
  43. package/templates/StoryUI/StoryUIPanel.stories.tsx +0 -44
  44. package/templates/StoryUI/manager.tsx +0 -859
@@ -1,18 +0,0 @@
1
- import type { StoryObj } from '@storybook/react';
2
- import { StoryUIPanel } from './StoryUIPanel';
3
- declare const meta: {
4
- title: string;
5
- component: typeof StoryUIPanel;
6
- parameters: {
7
- layout: string;
8
- docs: {
9
- description: {
10
- component: string;
11
- };
12
- };
13
- };
14
- };
15
- export default meta;
16
- type Story = StoryObj<typeof meta>;
17
- export declare const Default: Story;
18
- //# sourceMappingURL=StoryUIPanel.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StoryUIPanel.stories.d.ts","sourceRoot":"","sources":["../../../templates/StoryUI/StoryUIPanel.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,QAAA,MAAM,IAAI;;;;;;;;;;;CAmB2B,CAAC;AAEtC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAerB,CAAC"}
@@ -1,37 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { StoryUIPanel } from './StoryUIPanel';
3
- const meta = {
4
- title: 'Story UI/Story Generator',
5
- component: StoryUIPanel,
6
- parameters: {
7
- layout: 'fullscreen',
8
- docs: {
9
- description: {
10
- component: `
11
- Story UI Panel connects to the MCP server running on your configured port.
12
- The port is determined by:
13
- 1. VITE_STORY_UI_PORT environment variable (recommended)
14
- 2. URL parameter: ?mcp-port=XXXX
15
- 3. Default port: 4001
16
-
17
- This design system agnostic approach works with any component library.
18
- `
19
- }
20
- }
21
- },
22
- };
23
- export default meta;
24
- export const Default = {
25
- render: () => {
26
- // Check for URL parameter override first
27
- if (typeof window !== 'undefined') {
28
- const urlParams = new URLSearchParams(window.location.search);
29
- const mcpPortParam = urlParams.get('mcp-port');
30
- if (mcpPortParam) {
31
- // Set the global variable that the panel will use
32
- window.STORY_UI_MCP_PORT = mcpPortParam;
33
- }
34
- }
35
- return _jsx(StoryUIPanel, {});
36
- }
37
- };
@@ -1,44 +0,0 @@
1
- import React from 'react';
2
- import type { Meta, StoryObj } from '@storybook/react';
3
- import { StoryUIPanel } from './StoryUIPanel';
4
-
5
- const meta = {
6
- title: 'Story UI/Story Generator',
7
- component: StoryUIPanel,
8
- parameters: {
9
- layout: 'fullscreen',
10
- docs: {
11
- description: {
12
- component: `
13
- Story UI Panel connects to the MCP server running on your configured port.
14
- The port is determined by:
15
- 1. VITE_STORY_UI_PORT environment variable (recommended)
16
- 2. URL parameter: ?mcp-port=XXXX
17
- 3. Default port: 4001
18
-
19
- This design system agnostic approach works with any component library.
20
- `
21
- }
22
- }
23
- },
24
- } satisfies Meta<typeof StoryUIPanel>;
25
-
26
- export default meta;
27
- type Story = StoryObj<typeof meta>;
28
-
29
- export const Default: Story = {
30
- render: () => {
31
- // Check for URL parameter override first
32
- if (typeof window !== 'undefined') {
33
- const urlParams = new URLSearchParams(window.location.search);
34
- const mcpPortParam = urlParams.get('mcp-port');
35
-
36
- if (mcpPortParam) {
37
- // Set the global variable that the panel will use
38
- (window as any).STORY_UI_MCP_PORT = mcpPortParam;
39
- }
40
- }
41
-
42
- return <StoryUIPanel />;
43
- }
44
- };