@specverse/engines 4.1.30 → 4.2.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 (226) hide show
  1. package/assets/examples/manifests/frontend-only.yaml +3 -6
  2. package/assets/examples/manifests/fullstack-app.yaml +5 -7
  3. package/assets/examples/manifests/fullstack-monorepo.yaml +3 -6
  4. package/dist/inference/comprehensive-engine.d.ts.map +1 -1
  5. package/dist/inference/comprehensive-engine.js +3 -19
  6. package/dist/inference/comprehensive-engine.js.map +1 -1
  7. package/dist/inference/core/rule-engine.d.ts +31 -0
  8. package/dist/inference/core/rule-engine.d.ts.map +1 -1
  9. package/dist/inference/core/rule-engine.js +117 -33
  10. package/dist/inference/core/rule-engine.js.map +1 -1
  11. package/dist/inference/core/rule-file-types.d.ts +0 -2
  12. package/dist/inference/core/rule-file-types.d.ts.map +1 -1
  13. package/dist/inference/core/rule-file-types.js +3 -6
  14. package/dist/inference/core/rule-file-types.js.map +1 -1
  15. package/dist/inference/core/rule-loader.d.ts +5 -15
  16. package/dist/inference/core/rule-loader.d.ts.map +1 -1
  17. package/dist/inference/core/rule-loader.js +43 -132
  18. package/dist/inference/core/rule-loader.js.map +1 -1
  19. package/dist/inference/core/types.d.ts +0 -6
  20. package/dist/inference/core/types.d.ts.map +1 -1
  21. package/dist/inference/core/types.js +0 -4
  22. package/dist/inference/core/types.js.map +1 -1
  23. package/dist/inference/logical/generators/component-type-resolver.d.ts +0 -26
  24. package/dist/inference/logical/generators/component-type-resolver.d.ts.map +1 -1
  25. package/dist/inference/logical/generators/component-type-resolver.js +0 -19
  26. package/dist/inference/logical/generators/component-type-resolver.js.map +1 -1
  27. package/dist/inference/logical/generators/specialist-view-expander.d.ts +1 -17
  28. package/dist/inference/logical/generators/specialist-view-expander.d.ts.map +1 -1
  29. package/dist/inference/logical/generators/specialist-view-expander.js +0 -15
  30. package/dist/inference/logical/generators/specialist-view-expander.js.map +1 -1
  31. package/dist/inference/logical/generators/view-generator.d.ts +4 -14
  32. package/dist/inference/logical/generators/view-generator.d.ts.map +1 -1
  33. package/dist/inference/logical/generators/view-generator.js +6 -26
  34. package/dist/inference/logical/generators/view-generator.js.map +1 -1
  35. package/dist/inference/logical/index.d.ts +2 -2
  36. package/dist/inference/logical/index.d.ts.map +1 -1
  37. package/dist/inference/logical/logical-engine.d.ts.map +1 -1
  38. package/dist/inference/logical/logical-engine.js +17 -80
  39. package/dist/inference/logical/logical-engine.js.map +1 -1
  40. package/dist/inference/quint-transpiler.d.ts +5 -3
  41. package/dist/inference/quint-transpiler.d.ts.map +1 -1
  42. package/dist/inference/quint-transpiler.js +11 -6
  43. package/dist/inference/quint-transpiler.js.map +1 -1
  44. package/dist/libs/instance-factories/applications/templates/react-starter/app-tsx-generator.js +110 -0
  45. package/dist/libs/instance-factories/applications/templates/react-starter/dashboard-body-composer.js +121 -0
  46. package/dist/libs/instance-factories/applications/templates/react-starter/detail-body-composer.js +78 -0
  47. package/dist/libs/instance-factories/applications/templates/react-starter/form-body-composer.js +190 -0
  48. package/dist/libs/instance-factories/applications/templates/react-starter/helpers-emitter.js +45 -0
  49. package/dist/libs/instance-factories/applications/templates/react-starter/html-to-jsx.js +192 -0
  50. package/dist/libs/instance-factories/applications/templates/react-starter/list-body-composer.js +46 -0
  51. package/dist/libs/instance-factories/applications/templates/react-starter/orchestrator.js +30 -0
  52. package/dist/libs/instance-factories/applications/templates/react-starter/package-json-generator.js +38 -0
  53. package/dist/libs/instance-factories/applications/templates/react-starter/regen-safety.js +89 -0
  54. package/dist/libs/instance-factories/applications/templates/react-starter/view-emitter.js +56 -0
  55. package/dist/libs/instance-factories/applications/templates/react-starter/views-generator.js +66 -0
  56. package/dist/libs/instance-factories/cli/templates/commander/command-generator.js +14 -11
  57. package/dist/realize/index.d.ts.map +1 -1
  58. package/dist/realize/index.js +15 -22
  59. package/dist/realize/index.js.map +1 -1
  60. package/dist/registry/utils/manifest-adapter.d.ts +8 -1
  61. package/dist/registry/utils/manifest-adapter.d.ts.map +1 -1
  62. package/dist/registry/utils/manifest-adapter.js +8 -1
  63. package/dist/registry/utils/manifest-adapter.js.map +1 -1
  64. package/libs/instance-factories/applications/react-app-starter.yaml +150 -0
  65. package/libs/instance-factories/applications/templates/react-starter/README.md +211 -0
  66. package/libs/instance-factories/applications/templates/react-starter/__tests__/dashboard-body-composer.test.ts +153 -0
  67. package/libs/instance-factories/applications/templates/react-starter/__tests__/detail-body-composer.test.ts +145 -0
  68. package/libs/instance-factories/applications/templates/react-starter/__tests__/form-body-composer.test.ts +175 -0
  69. package/libs/instance-factories/applications/templates/react-starter/__tests__/helpers-emitter.test.ts +55 -0
  70. package/libs/instance-factories/applications/templates/react-starter/__tests__/html-to-jsx.test.ts +140 -0
  71. package/libs/instance-factories/applications/templates/react-starter/__tests__/list-body-composer.test.ts +146 -0
  72. package/libs/instance-factories/applications/templates/react-starter/__tests__/orchestrator.test.ts +163 -0
  73. package/libs/instance-factories/applications/templates/react-starter/__tests__/parity-p2-factory-imports.test.ts +116 -0
  74. package/libs/instance-factories/applications/templates/react-starter/__tests__/parity-p3-rendered-output.test.ts +183 -0
  75. package/libs/instance-factories/applications/templates/react-starter/__tests__/regen-safety.test.ts +144 -0
  76. package/libs/instance-factories/applications/templates/react-starter/__tests__/starter-generators.test.ts +114 -0
  77. package/libs/instance-factories/applications/templates/react-starter/__tests__/view-emitter.test.ts +107 -0
  78. package/libs/instance-factories/applications/templates/react-starter/__tests__/views-generator.test.ts +139 -0
  79. package/libs/instance-factories/applications/templates/react-starter/app-tsx-generator.ts +141 -0
  80. package/libs/instance-factories/applications/templates/react-starter/dashboard-body-composer.ts +174 -0
  81. package/libs/instance-factories/applications/templates/react-starter/detail-body-composer.ts +135 -0
  82. package/libs/instance-factories/applications/templates/react-starter/form-body-composer.ts +306 -0
  83. package/libs/instance-factories/applications/templates/react-starter/helpers-emitter.ts +60 -0
  84. package/libs/instance-factories/applications/templates/react-starter/html-to-jsx.ts +334 -0
  85. package/libs/instance-factories/applications/templates/react-starter/list-body-composer.ts +120 -0
  86. package/libs/instance-factories/applications/templates/react-starter/orchestrator.ts +80 -0
  87. package/libs/instance-factories/applications/templates/react-starter/package-json-generator.ts +57 -0
  88. package/libs/instance-factories/applications/templates/react-starter/regen-safety.ts +157 -0
  89. package/libs/instance-factories/applications/templates/react-starter/skeletons/dashboard.tsx.template +47 -0
  90. package/libs/instance-factories/applications/templates/react-starter/skeletons/detail.tsx.template +94 -0
  91. package/libs/instance-factories/applications/templates/react-starter/skeletons/form.tsx.template +114 -0
  92. package/libs/instance-factories/applications/templates/react-starter/skeletons/list.tsx.template +72 -0
  93. package/libs/instance-factories/applications/templates/react-starter/view-emitter.ts +151 -0
  94. package/libs/instance-factories/applications/templates/react-starter/views-generator.ts +137 -0
  95. package/libs/instance-factories/cli/templates/commander/command-generator.ts +14 -11
  96. package/package.json +3 -3
  97. package/dist/libs/instance-factories/applications/templates/react/_view-components-source.js +0 -530
  98. package/dist/libs/instance-factories/applications/templates/react/app-tsx-generator.js +0 -73
  99. package/dist/libs/instance-factories/applications/templates/react/field-helpers-generator.js +0 -99
  100. package/dist/libs/instance-factories/applications/templates/react/package-json-generator.js +0 -49
  101. package/dist/libs/instance-factories/applications/templates/react/pattern-adapter-generator.js +0 -156
  102. package/dist/libs/instance-factories/applications/templates/react/react-pattern-adapter.js +0 -935
  103. package/dist/libs/instance-factories/applications/templates/react/relationship-field-generator.js +0 -143
  104. package/dist/libs/instance-factories/applications/templates/react/tailwind-adapter-generator.js +0 -646
  105. package/dist/libs/instance-factories/applications/templates/react/tailwind-adapter-wrapper-generator.js +0 -65
  106. package/dist/libs/instance-factories/applications/templates/react/view-dashboard-generator.js +0 -143
  107. package/dist/libs/instance-factories/applications/templates/react/view-detail-generator.js +0 -143
  108. package/dist/libs/instance-factories/applications/templates/react/view-form-generator.js +0 -355
  109. package/dist/libs/instance-factories/applications/templates/react/view-list-generator.js +0 -91
  110. package/dist/libs/instance-factories/applications/templates/react/view-router-generator.js +0 -79
  111. package/dist/libs/instance-factories/views/index.js +0 -48
  112. package/dist/libs/instance-factories/views/templates/react/adapters/antd-adapter.js +0 -742
  113. package/dist/libs/instance-factories/views/templates/react/adapters/mui-adapter.js +0 -824
  114. package/dist/libs/instance-factories/views/templates/react/adapters/shadcn-adapter.js +0 -719
  115. package/dist/libs/instance-factories/views/templates/react/app-generator.js +0 -45
  116. package/dist/libs/instance-factories/views/templates/react/components-generator.js +0 -820
  117. package/dist/libs/instance-factories/views/templates/react/forms-generator.js +0 -275
  118. package/dist/libs/instance-factories/views/templates/react/frontend-package-json-generator.js +0 -46
  119. package/dist/libs/instance-factories/views/templates/react/hooks-generator.js +0 -81
  120. package/dist/libs/instance-factories/views/templates/react/index-css-generator.js +0 -9
  121. package/dist/libs/instance-factories/views/templates/react/index-html-generator.js +0 -23
  122. package/dist/libs/instance-factories/views/templates/react/main-tsx-generator.js +0 -21
  123. package/dist/libs/instance-factories/views/templates/react/react-component-generator.js +0 -299
  124. package/dist/libs/instance-factories/views/templates/react/router-generator.js +0 -136
  125. package/dist/libs/instance-factories/views/templates/react/router-generic-generator.js +0 -107
  126. package/dist/libs/instance-factories/views/templates/react/shared-utils-generator.js +0 -187
  127. package/dist/libs/instance-factories/views/templates/react/spec-json-generator.js +0 -7
  128. package/dist/libs/instance-factories/views/templates/react/types-generator.js +0 -56
  129. package/dist/libs/instance-factories/views/templates/react/views-metadata-generator.js +0 -27
  130. package/dist/libs/instance-factories/views/templates/react/vite-config-generator.js +0 -29
  131. package/dist/libs/instance-factories/views/templates/runtime/runtime-view-renderer.js +0 -261
  132. package/dist/libs/instance-factories/views/templates/shared/adapter-types.js +0 -34
  133. package/dist/libs/instance-factories/views/templates/shared/atomic-components-registry.js +0 -800
  134. package/dist/libs/instance-factories/views/templates/shared/base-generator.js +0 -305
  135. package/dist/libs/instance-factories/views/templates/shared/component-metadata.js +0 -517
  136. package/dist/libs/instance-factories/views/templates/shared/composite-pattern-types.js +0 -0
  137. package/dist/libs/instance-factories/views/templates/shared/composite-patterns.js +0 -445
  138. package/dist/libs/instance-factories/views/templates/shared/index.js +0 -80
  139. package/dist/libs/instance-factories/views/templates/shared/pattern-validator.js +0 -210
  140. package/dist/libs/instance-factories/views/templates/shared/property-mapper.js +0 -492
  141. package/dist/libs/instance-factories/views/templates/shared/syntax-mapper.js +0 -321
  142. package/dist/realize/index.js.bak +0 -758
  143. package/libs/instance-factories/applications/react-app.yaml +0 -186
  144. package/libs/instance-factories/applications/templates/react/_view-components-source.ts +0 -555
  145. package/libs/instance-factories/applications/templates/react/app-tsx-generator.ts +0 -94
  146. package/libs/instance-factories/applications/templates/react/field-helpers-generator.ts +0 -106
  147. package/libs/instance-factories/applications/templates/react/package-json-generator.ts +0 -57
  148. package/libs/instance-factories/applications/templates/react/pattern-adapter-generator.ts +0 -179
  149. package/libs/instance-factories/applications/templates/react/react-pattern-adapter.tsx +0 -1347
  150. package/libs/instance-factories/applications/templates/react/relationship-field-generator.ts +0 -150
  151. package/libs/instance-factories/applications/templates/react/tailwind-adapter-generator.ts +0 -704
  152. package/libs/instance-factories/applications/templates/react/tailwind-adapter-wrapper-generator.ts +0 -84
  153. package/libs/instance-factories/applications/templates/react/view-dashboard-generator.ts +0 -150
  154. package/libs/instance-factories/applications/templates/react/view-detail-generator.ts +0 -150
  155. package/libs/instance-factories/applications/templates/react/view-form-generator.ts +0 -362
  156. package/libs/instance-factories/applications/templates/react/view-list-generator.ts +0 -98
  157. package/libs/instance-factories/applications/templates/react/view-router-generator.ts +0 -89
  158. package/libs/instance-factories/views/README.md +0 -62
  159. package/libs/instance-factories/views/index.d.ts +0 -13
  160. package/libs/instance-factories/views/index.d.ts.map +0 -1
  161. package/libs/instance-factories/views/index.js +0 -18
  162. package/libs/instance-factories/views/index.js.map +0 -1
  163. package/libs/instance-factories/views/index.ts +0 -45
  164. package/libs/instance-factories/views/react-components.yaml +0 -129
  165. package/libs/instance-factories/views/templates/ARCHITECTURE.md +0 -198
  166. package/libs/instance-factories/views/templates/react/adapters/antd-adapter.ts +0 -869
  167. package/libs/instance-factories/views/templates/react/adapters/mui-adapter.ts +0 -953
  168. package/libs/instance-factories/views/templates/react/adapters/shadcn-adapter.ts +0 -806
  169. package/libs/instance-factories/views/templates/react/app-generator.ts +0 -55
  170. package/libs/instance-factories/views/templates/react/components-generator.ts +0 -938
  171. package/libs/instance-factories/views/templates/react/forms-generator.ts +0 -325
  172. package/libs/instance-factories/views/templates/react/frontend-package-json-generator.ts +0 -57
  173. package/libs/instance-factories/views/templates/react/hooks-generator.ts +0 -106
  174. package/libs/instance-factories/views/templates/react/index-css-generator.ts +0 -14
  175. package/libs/instance-factories/views/templates/react/index-html-generator.ts +0 -34
  176. package/libs/instance-factories/views/templates/react/main-tsx-generator.ts +0 -29
  177. package/libs/instance-factories/views/templates/react/react-component-generator.d.ts +0 -152
  178. package/libs/instance-factories/views/templates/react/react-component-generator.d.ts.map +0 -1
  179. package/libs/instance-factories/views/templates/react/react-component-generator.js +0 -398
  180. package/libs/instance-factories/views/templates/react/react-component-generator.js.map +0 -1
  181. package/libs/instance-factories/views/templates/react/react-component-generator.ts +0 -533
  182. package/libs/instance-factories/views/templates/react/router-generator.ts +0 -197
  183. package/libs/instance-factories/views/templates/react/router-generic-generator.ts +0 -132
  184. package/libs/instance-factories/views/templates/react/shared-utils-generator.ts +0 -196
  185. package/libs/instance-factories/views/templates/react/spec-json-generator.ts +0 -17
  186. package/libs/instance-factories/views/templates/react/types-generator.ts +0 -76
  187. package/libs/instance-factories/views/templates/react/views-metadata-generator.ts +0 -42
  188. package/libs/instance-factories/views/templates/react/vite-config-generator.ts +0 -38
  189. package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.d.ts.map +0 -1
  190. package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.js.map +0 -1
  191. package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.ts +0 -474
  192. package/libs/instance-factories/views/templates/shared/__tests__/composite-patterns.test.ts +0 -242
  193. package/libs/instance-factories/views/templates/shared/adapter-types.d.ts +0 -77
  194. package/libs/instance-factories/views/templates/shared/adapter-types.d.ts.map +0 -1
  195. package/libs/instance-factories/views/templates/shared/adapter-types.js +0 -47
  196. package/libs/instance-factories/views/templates/shared/adapter-types.js.map +0 -1
  197. package/libs/instance-factories/views/templates/shared/adapter-types.ts +0 -142
  198. package/libs/instance-factories/views/templates/shared/atomic-components-registry.d.ts +0 -63
  199. package/libs/instance-factories/views/templates/shared/atomic-components-registry.d.ts.map +0 -1
  200. package/libs/instance-factories/views/templates/shared/atomic-components-registry.js +0 -822
  201. package/libs/instance-factories/views/templates/shared/atomic-components-registry.js.map +0 -1
  202. package/libs/instance-factories/views/templates/shared/atomic-components-registry.ts +0 -908
  203. package/libs/instance-factories/views/templates/shared/base-generator.d.ts +0 -247
  204. package/libs/instance-factories/views/templates/shared/base-generator.d.ts.map +0 -1
  205. package/libs/instance-factories/views/templates/shared/base-generator.js +0 -363
  206. package/libs/instance-factories/views/templates/shared/base-generator.js.map +0 -1
  207. package/libs/instance-factories/views/templates/shared/base-generator.ts +0 -608
  208. package/libs/instance-factories/views/templates/shared/component-metadata.d.ts +0 -254
  209. package/libs/instance-factories/views/templates/shared/component-metadata.d.ts.map +0 -1
  210. package/libs/instance-factories/views/templates/shared/component-metadata.js +0 -602
  211. package/libs/instance-factories/views/templates/shared/component-metadata.js.map +0 -1
  212. package/libs/instance-factories/views/templates/shared/component-metadata.ts +0 -803
  213. package/libs/instance-factories/views/templates/shared/composite-pattern-types.ts +0 -250
  214. package/libs/instance-factories/views/templates/shared/composite-patterns.ts +0 -535
  215. package/libs/instance-factories/views/templates/shared/index.ts +0 -68
  216. package/libs/instance-factories/views/templates/shared/pattern-validator.ts +0 -279
  217. package/libs/instance-factories/views/templates/shared/property-mapper.d.ts +0 -149
  218. package/libs/instance-factories/views/templates/shared/property-mapper.d.ts.map +0 -1
  219. package/libs/instance-factories/views/templates/shared/property-mapper.js +0 -580
  220. package/libs/instance-factories/views/templates/shared/property-mapper.js.map +0 -1
  221. package/libs/instance-factories/views/templates/shared/property-mapper.ts +0 -700
  222. package/libs/instance-factories/views/templates/shared/syntax-mapper.d.ts +0 -143
  223. package/libs/instance-factories/views/templates/shared/syntax-mapper.d.ts.map +0 -1
  224. package/libs/instance-factories/views/templates/shared/syntax-mapper.js +0 -420
  225. package/libs/instance-factories/views/templates/shared/syntax-mapper.js.map +0 -1
  226. package/libs/instance-factories/views/templates/shared/syntax-mapper.ts +0 -539
@@ -1,152 +0,0 @@
1
- /**
2
- * React Component Generator
3
- *
4
- * Extends BaseComponentGenerator to generate React/TypeScript components.
5
- * Outputs .tsx files with proper imports, hooks, types, and JSX.
6
- *
7
- * Features:
8
- * - TypeScript with strict typing
9
- * - React hooks (useState, useEffect)
10
- * - JSX component rendering
11
- * - Adapter integration (shadcn, MUI, antd)
12
- * - Proper file structure and exports
13
- */
14
- import { BaseComponentGenerator, ViewSpec, StateDefinition, EventDefinition, GeneratorConfig } from '../shared/base-generator.js';
15
- import type { ComponentAdapter } from '../shared/adapter-types.js';
16
- /**
17
- * React-specific generator configuration
18
- */
19
- export interface ReactGeneratorConfig extends GeneratorConfig {
20
- framework: 'react';
21
- target: 'shadcn' | 'mui' | 'antd';
22
- typescript: boolean;
23
- strictMode?: boolean;
24
- includeComments?: boolean;
25
- }
26
- /**
27
- * React component props interface
28
- */
29
- export interface ReactComponentProps {
30
- [key: string]: any;
31
- }
32
- /**
33
- * Generates React/TypeScript components from SpecVerse view specifications
34
- *
35
- * Output structure:
36
- * ```tsx
37
- * import React, { useState, useEffect } from 'react';
38
- * import { Button } from '@/components/ui/button';
39
- *
40
- * interface {ComponentName}Props {
41
- * // ... props
42
- * }
43
- *
44
- * export function {ComponentName}({ ...props }: {ComponentName}Props) {
45
- * // State declarations
46
- * const [count, setCount] = useState(0);
47
- *
48
- * // Event handlers
49
- * const handleClick = () => { ... };
50
- *
51
- * // Component tree
52
- * return (
53
- * <div>
54
- * <Button onClick={handleClick}>Click me</Button>
55
- * </div>
56
- * );
57
- * }
58
- * ```
59
- */
60
- export declare class ReactComponentGenerator extends BaseComponentGenerator {
61
- private readonly reactConfig;
62
- constructor(adapter: ComponentAdapter, config: ReactGeneratorConfig);
63
- /**
64
- * Generate React imports
65
- */
66
- protected generateImports(viewSpec: ViewSpec): string;
67
- /**
68
- * Generate complete React component
69
- */
70
- protected generateComponent(parts: {
71
- name: string;
72
- imports: string;
73
- state: string;
74
- events: string;
75
- components: string;
76
- }): string;
77
- /**
78
- * Generate state declarations using React hooks
79
- */
80
- protected generateState(state: Record<string, StateDefinition>): string;
81
- /**
82
- * Generate event handlers
83
- */
84
- protected generateEvents(events: Record<string, EventDefinition>): string;
85
- /**
86
- * Get file extension (.tsx for React/TypeScript)
87
- */
88
- getFileExtension(): string;
89
- /**
90
- * Get additional files (styles, types, etc.)
91
- */
92
- getAdditionalFiles(viewSpec: ViewSpec): Record<string, string>;
93
- /**
94
- * Get React core imports (useState, useEffect, etc.)
95
- */
96
- private getReactCoreImports;
97
- /**
98
- * Get component library imports
99
- */
100
- private getComponentImports;
101
- /**
102
- * Generate props interface for TypeScript
103
- */
104
- private generatePropsInterface;
105
- /**
106
- * Generate main component function
107
- */
108
- private generateComponentFunction;
109
- /**
110
- * Generate separate types file
111
- */
112
- private generateTypesFile;
113
- /**
114
- * Check if component needs useEffect hook
115
- */
116
- private needsUseEffect;
117
- /**
118
- * Capitalize first letter of string
119
- */
120
- private capitalize;
121
- /**
122
- * Override to add React-specific rendering hints
123
- */
124
- protected renderAdapterComponent(type: string, properties: Record<string, any>, children: string | undefined, context: any): string;
125
- }
126
- /**
127
- * Create a ReactComponentGenerator instance
128
- *
129
- * @param adapter - Component adapter (shadcn, mui, antd)
130
- * @param config - Generator configuration
131
- * @returns ReactComponentGenerator instance
132
- */
133
- export declare function createReactGenerator(adapter: ComponentAdapter, config?: Partial<ReactGeneratorConfig>): ReactComponentGenerator;
134
- /**
135
- * Generate React component from view spec (one-liner)
136
- *
137
- * @param viewSpec - View specification
138
- * @param adapter - Component adapter
139
- * @param options - Optional configuration
140
- * @returns Generated component code
141
- */
142
- export declare function generateReactComponent(viewSpec: ViewSpec, adapter: ComponentAdapter, options?: Partial<ReactGeneratorConfig>): string;
143
- /**
144
- * Generate React component with all additional files
145
- *
146
- * @param viewSpec - View specification
147
- * @param adapter - Component adapter
148
- * @param options - Optional configuration
149
- * @returns Map of filename to content
150
- */
151
- export declare function generateReactComponentFiles(viewSpec: ViewSpec, adapter: ComponentAdapter, options?: Partial<ReactGeneratorConfig>): Map<string, string>;
152
- //# sourceMappingURL=react-component-generator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-component-generator.d.ts","sourceRoot":"","sources":["react-component-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,sBAAsB,EACtB,QAAQ,EACR,eAAe,EACf,eAAe,EACf,eAAe,EAChB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAMnE;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,eAAe;IAC3D,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBAAa,uBAAwB,SAAQ,sBAAsB;IACjE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAuB;gBAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,oBAAoB;IASnE;;OAEG;IACH,SAAS,CAAC,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,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,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,gBAAgB,EACzB,OAAO,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,GACtC,MAAM,CASR;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,gBAAgB,EACzB,OAAO,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,GACtC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAiBrB"}
@@ -1,398 +0,0 @@
1
- /**
2
- * React Component Generator
3
- *
4
- * Extends BaseComponentGenerator to generate React/TypeScript components.
5
- * Outputs .tsx files with proper imports, hooks, types, and JSX.
6
- *
7
- * Features:
8
- * - TypeScript with strict typing
9
- * - React hooks (useState, useEffect)
10
- * - JSX component rendering
11
- * - Adapter integration (shadcn, MUI, antd)
12
- * - Proper file structure and exports
13
- */
14
- import { BaseComponentGenerator } from '../shared/base-generator.js';
15
- import { getSyntaxPattern } from '../shared/syntax-mapper.js';
16
- import { extractComponentTypes } from '../shared/base-generator.js';
17
- // ============================================================================
18
- // React Component Generator
19
- // ============================================================================
20
- /**
21
- * Generates React/TypeScript components from SpecVerse view specifications
22
- *
23
- * Output structure:
24
- * ```tsx
25
- * import React, { useState, useEffect } from 'react';
26
- * import { Button } from '@/components/ui/button';
27
- *
28
- * interface {ComponentName}Props {
29
- * // ... props
30
- * }
31
- *
32
- * export function {ComponentName}({ ...props }: {ComponentName}Props) {
33
- * // State declarations
34
- * const [count, setCount] = useState(0);
35
- *
36
- * // Event handlers
37
- * const handleClick = () => { ... };
38
- *
39
- * // Component tree
40
- * return (
41
- * <div>
42
- * <Button onClick={handleClick}>Click me</Button>
43
- * </div>
44
- * );
45
- * }
46
- * ```
47
- */
48
- export class ReactComponentGenerator extends BaseComponentGenerator {
49
- reactConfig;
50
- constructor(adapter, config) {
51
- super(adapter, config);
52
- this.reactConfig = config;
53
- }
54
- // ============================================================================
55
- // Abstract Method Implementations
56
- // ============================================================================
57
- /**
58
- * Generate React imports
59
- */
60
- generateImports(viewSpec) {
61
- const imports = [];
62
- // React core imports
63
- const reactImports = this.getReactCoreImports(viewSpec);
64
- if (reactImports) {
65
- imports.push(reactImports);
66
- }
67
- // Component library imports
68
- const componentTypes = extractComponentTypes(viewSpec.components);
69
- const componentImports = this.getComponentImports(componentTypes);
70
- imports.push(...componentImports);
71
- return imports.join('\n');
72
- }
73
- /**
74
- * Generate complete React component
75
- */
76
- generateComponent(parts) {
77
- const lines = [];
78
- // File header comment
79
- if (this.reactConfig.includeComments) {
80
- lines.push(`/**`);
81
- lines.push(` * ${parts.name} Component`);
82
- lines.push(` * Generated by SpecVerse v3.4.0`);
83
- lines.push(` */`);
84
- lines.push('');
85
- }
86
- // Imports
87
- lines.push(parts.imports);
88
- lines.push('');
89
- // Props interface
90
- const propsInterface = this.generatePropsInterface(parts.name);
91
- if (propsInterface) {
92
- lines.push(propsInterface);
93
- lines.push('');
94
- }
95
- // Component function
96
- lines.push(this.generateComponentFunction(parts));
97
- return lines.join('\n');
98
- }
99
- /**
100
- * Generate state declarations using React hooks
101
- */
102
- generateState(state) {
103
- const stateDeclarations = [];
104
- for (const [name, def] of Object.entries(state)) {
105
- const declaration = getSyntaxPattern('stateDeclaration', 'react', {
106
- name,
107
- Name: this.capitalize(name),
108
- type: def.type,
109
- initial: JSON.stringify(def.initial)
110
- });
111
- if (this.reactConfig.includeComments && def.description) {
112
- stateDeclarations.push(` // ${def.description}`);
113
- }
114
- stateDeclarations.push(` ${declaration}`);
115
- }
116
- return stateDeclarations.join('\n');
117
- }
118
- /**
119
- * Generate event handlers
120
- */
121
- generateEvents(events) {
122
- const eventHandlers = [];
123
- for (const [name, def] of Object.entries(events)) {
124
- const handler = getSyntaxPattern('eventHandler', 'react', {
125
- Name: this.capitalize(name),
126
- params: def.params || '',
127
- body: def.body
128
- });
129
- if (this.reactConfig.includeComments && def.description) {
130
- eventHandlers.push(` // ${def.description}`);
131
- }
132
- eventHandlers.push(` ${handler}`);
133
- }
134
- return eventHandlers.join('\n\n');
135
- }
136
- /**
137
- * Get file extension (.tsx for React/TypeScript)
138
- */
139
- getFileExtension() {
140
- return this.reactConfig.typescript ? '.tsx' : '.jsx';
141
- }
142
- /**
143
- * Get additional files (styles, types, etc.)
144
- */
145
- getAdditionalFiles(viewSpec) {
146
- const files = {};
147
- // Optional: Generate separate types file
148
- if (this.reactConfig.typescript && this.reactConfig.strictMode) {
149
- files[`${viewSpec.name}.types.ts`] = this.generateTypesFile(viewSpec);
150
- }
151
- return files;
152
- }
153
- // ============================================================================
154
- // React-Specific Helper Methods
155
- // ============================================================================
156
- /**
157
- * Get React core imports (useState, useEffect, etc.)
158
- */
159
- getReactCoreImports(viewSpec) {
160
- const hooks = [];
161
- // Add useState if component has state
162
- if (viewSpec.state && Object.keys(viewSpec.state).length > 0) {
163
- hooks.push('useState');
164
- }
165
- // Add useEffect if needed (detect lifecycle needs)
166
- // For now, simplified - could be enhanced based on view spec analysis
167
- if (this.needsUseEffect(viewSpec)) {
168
- hooks.push('useEffect');
169
- }
170
- if (hooks.length > 0) {
171
- // Generate: import React, { useState, useEffect } from 'react';
172
- return `import React, { ${hooks.join(', ')} } from 'react';`;
173
- }
174
- return `import React from 'react';`;
175
- }
176
- /**
177
- * Get component library imports
178
- */
179
- getComponentImports(componentTypes) {
180
- const imports = [];
181
- const importMap = new Map();
182
- // Group components by their import source
183
- for (const type of componentTypes) {
184
- const adapterComponent = this.adapter.components[type];
185
- if (adapterComponent && adapterComponent.import) {
186
- // Parse import to group by source
187
- const importMatch = adapterComponent.import.match(/from ['"](.+)['"]/);
188
- if (importMatch) {
189
- const source = importMatch[1];
190
- const componentMatch = adapterComponent.import.match(/import \{ (.+) \}/);
191
- if (componentMatch) {
192
- const componentName = componentMatch[1];
193
- if (!importMap.has(source)) {
194
- importMap.set(source, []);
195
- }
196
- importMap.get(source).push(componentName);
197
- }
198
- }
199
- }
200
- }
201
- // Generate grouped imports
202
- for (const [source, components] of importMap) {
203
- imports.push(getSyntaxPattern('libraryImport', 'react', {
204
- exports: components.join(', '),
205
- library: source
206
- }));
207
- }
208
- return imports;
209
- }
210
- /**
211
- * Generate props interface for TypeScript
212
- */
213
- generatePropsInterface(componentName) {
214
- if (!this.reactConfig.typescript) {
215
- return null;
216
- }
217
- // For now, generate empty interface (can be enhanced based on view spec)
218
- const lines = [];
219
- if (this.reactConfig.includeComments) {
220
- lines.push(`/**`);
221
- lines.push(` * Props for ${componentName} component`);
222
- lines.push(` */`);
223
- }
224
- lines.push(`interface ${componentName}Props {`);
225
- lines.push(` // Component props will be added here`);
226
- lines.push(`}`);
227
- return lines.join('\n');
228
- }
229
- /**
230
- * Generate main component function
231
- */
232
- generateComponentFunction(parts) {
233
- const lines = [];
234
- // Function signature
235
- const propsParam = this.reactConfig.typescript
236
- ? `props: ${parts.name}Props`
237
- : 'props';
238
- lines.push(`export function ${parts.name}(${propsParam}) {`);
239
- // State declarations
240
- if (parts.state) {
241
- lines.push(parts.state);
242
- lines.push('');
243
- }
244
- // Event handlers
245
- if (parts.events) {
246
- lines.push(parts.events);
247
- lines.push('');
248
- }
249
- // Return JSX
250
- lines.push(' return (');
251
- lines.push(' <div className="specverse-view">');
252
- // Indent component tree
253
- const indentedComponents = parts.components
254
- .split('\n')
255
- .map(line => line ? ` ${line}` : '')
256
- .join('\n');
257
- lines.push(indentedComponents);
258
- lines.push(' </div>');
259
- lines.push(' );');
260
- lines.push('}');
261
- return lines.join('\n');
262
- }
263
- /**
264
- * Generate separate types file
265
- */
266
- generateTypesFile(viewSpec) {
267
- const lines = [];
268
- lines.push(`/**`);
269
- lines.push(` * Type definitions for ${viewSpec.name}`);
270
- lines.push(` * Generated by SpecVerse v3.4.0`);
271
- lines.push(` */`);
272
- lines.push('');
273
- // State types
274
- if (viewSpec.state) {
275
- lines.push(`export interface ${viewSpec.name}State {`);
276
- for (const [name, def] of Object.entries(viewSpec.state)) {
277
- if (def.description) {
278
- lines.push(` /** ${def.description} */`);
279
- }
280
- lines.push(` ${name}: ${def.type};`);
281
- }
282
- lines.push(`}`);
283
- lines.push('');
284
- }
285
- // Event handler types
286
- if (viewSpec.events) {
287
- for (const [name, def] of Object.entries(viewSpec.events)) {
288
- const handlerName = `${this.capitalize(name)}Handler`;
289
- const params = def.params || '';
290
- if (def.description) {
291
- lines.push(`/** ${def.description} */`);
292
- }
293
- lines.push(`export type ${handlerName} = (${params}) => void;`);
294
- lines.push('');
295
- }
296
- }
297
- return lines.join('\n');
298
- }
299
- /**
300
- * Check if component needs useEffect hook
301
- */
302
- needsUseEffect(viewSpec) {
303
- // Simplified heuristic - could be enhanced
304
- // Check if any event has mount/unmount keywords
305
- if (viewSpec.events) {
306
- const eventNames = Object.keys(viewSpec.events).map(e => e.toLowerCase());
307
- return eventNames.some(name => name.includes('mount') ||
308
- name.includes('init') ||
309
- name.includes('load'));
310
- }
311
- return false;
312
- }
313
- /**
314
- * Capitalize first letter of string
315
- */
316
- capitalize(str) {
317
- return str.charAt(0).toUpperCase() + str.slice(1);
318
- }
319
- // ============================================================================
320
- // React-Specific Component Rendering
321
- // ============================================================================
322
- /**
323
- * Override to add React-specific rendering hints
324
- */
325
- renderAdapterComponent(type, properties, children, context) {
326
- // Add React-specific className if not present
327
- if (!properties.className && type !== 'container') {
328
- properties.className = `specverse-${type}`;
329
- }
330
- // Call parent implementation
331
- return super.renderAdapterComponent(type, properties, children, context);
332
- }
333
- }
334
- // ============================================================================
335
- // Factory Function
336
- // ============================================================================
337
- /**
338
- * Create a ReactComponentGenerator instance
339
- *
340
- * @param adapter - Component adapter (shadcn, mui, antd)
341
- * @param config - Generator configuration
342
- * @returns ReactComponentGenerator instance
343
- */
344
- export function createReactGenerator(adapter, config) {
345
- const defaultConfig = {
346
- framework: 'react',
347
- target: 'shadcn',
348
- typescript: true,
349
- strictMode: false,
350
- includeComments: true,
351
- maxDepth: 3,
352
- enableWarnings: true
353
- };
354
- const finalConfig = { ...defaultConfig, ...config };
355
- return new ReactComponentGenerator(adapter, finalConfig);
356
- }
357
- // ============================================================================
358
- // Convenience Functions
359
- // ============================================================================
360
- /**
361
- * Generate React component from view spec (one-liner)
362
- *
363
- * @param viewSpec - View specification
364
- * @param adapter - Component adapter
365
- * @param options - Optional configuration
366
- * @returns Generated component code
367
- */
368
- export function generateReactComponent(viewSpec, adapter, options) {
369
- const generator = createReactGenerator(adapter, options);
370
- const result = generator.generate(viewSpec);
371
- if (result.warnings.length > 0) {
372
- console.warn('Generation warnings:', result.warnings);
373
- }
374
- return result.code;
375
- }
376
- /**
377
- * Generate React component with all additional files
378
- *
379
- * @param viewSpec - View specification
380
- * @param adapter - Component adapter
381
- * @param options - Optional configuration
382
- * @returns Map of filename to content
383
- */
384
- export function generateReactComponentFiles(viewSpec, adapter, options) {
385
- const generator = createReactGenerator(adapter, options);
386
- const result = generator.generate(viewSpec);
387
- const files = new Map();
388
- // Main component file
389
- const ext = generator.getFileExtension();
390
- files.set(`${viewSpec.name}${ext}`, result.code);
391
- // Additional files (types, styles, etc.)
392
- const additionalFiles = generator.getAdditionalFiles(viewSpec);
393
- for (const [filename, content] of Object.entries(additionalFiles)) {
394
- files.set(filename, content);
395
- }
396
- return files;
397
- }
398
- //# sourceMappingURL=react-component-generator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-component-generator.js","sourceRoot":"","sources":["react-component-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,sBAAsB,EAKvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAyBpE,+EAA+E;AAC/E,4BAA4B;AAC5B,+EAA+E;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,OAAO,uBAAwB,SAAQ,sBAAsB;IAChD,WAAW,CAAuB;IAEnD,YAAY,OAAyB,EAAE,MAA4B;Q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