@specverse/engines 4.1.30 → 4.2.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 (285) 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/assets/templates/default/specs/main.specly +65 -0
  5. package/dist/inference/comprehensive-engine.d.ts.map +1 -1
  6. package/dist/inference/comprehensive-engine.js +3 -19
  7. package/dist/inference/comprehensive-engine.js.map +1 -1
  8. package/dist/inference/core/rule-engine.d.ts +31 -0
  9. package/dist/inference/core/rule-engine.d.ts.map +1 -1
  10. package/dist/inference/core/rule-engine.js +117 -33
  11. package/dist/inference/core/rule-engine.js.map +1 -1
  12. package/dist/inference/core/rule-file-types.d.ts +0 -2
  13. package/dist/inference/core/rule-file-types.d.ts.map +1 -1
  14. package/dist/inference/core/rule-file-types.js +3 -6
  15. package/dist/inference/core/rule-file-types.js.map +1 -1
  16. package/dist/inference/core/rule-loader.d.ts +5 -15
  17. package/dist/inference/core/rule-loader.d.ts.map +1 -1
  18. package/dist/inference/core/rule-loader.js +43 -132
  19. package/dist/inference/core/rule-loader.js.map +1 -1
  20. package/dist/inference/core/types.d.ts +0 -6
  21. package/dist/inference/core/types.d.ts.map +1 -1
  22. package/dist/inference/core/types.js +0 -4
  23. package/dist/inference/core/types.js.map +1 -1
  24. package/dist/inference/logical/generators/component-type-resolver.d.ts +0 -26
  25. package/dist/inference/logical/generators/component-type-resolver.d.ts.map +1 -1
  26. package/dist/inference/logical/generators/component-type-resolver.js +0 -19
  27. package/dist/inference/logical/generators/component-type-resolver.js.map +1 -1
  28. package/dist/inference/logical/generators/specialist-view-expander.d.ts +1 -17
  29. package/dist/inference/logical/generators/specialist-view-expander.d.ts.map +1 -1
  30. package/dist/inference/logical/generators/specialist-view-expander.js +0 -15
  31. package/dist/inference/logical/generators/specialist-view-expander.js.map +1 -1
  32. package/dist/inference/logical/generators/view-generator.d.ts +4 -14
  33. package/dist/inference/logical/generators/view-generator.d.ts.map +1 -1
  34. package/dist/inference/logical/generators/view-generator.js +6 -26
  35. package/dist/inference/logical/generators/view-generator.js.map +1 -1
  36. package/dist/inference/logical/index.d.ts +2 -2
  37. package/dist/inference/logical/index.d.ts.map +1 -1
  38. package/dist/inference/logical/logical-engine.d.ts.map +1 -1
  39. package/dist/inference/logical/logical-engine.js +17 -80
  40. package/dist/inference/logical/logical-engine.js.map +1 -1
  41. package/dist/inference/quint-transpiler.d.ts +5 -3
  42. package/dist/inference/quint-transpiler.d.ts.map +1 -1
  43. package/dist/inference/quint-transpiler.js +11 -6
  44. package/dist/inference/quint-transpiler.js.map +1 -1
  45. package/dist/libs/instance-factories/CURVED-INTERFACE.md +278 -0
  46. package/dist/libs/instance-factories/README.md +73 -0
  47. package/dist/libs/instance-factories/applications/README.md +51 -0
  48. package/dist/libs/instance-factories/applications/generic-app.yaml +52 -0
  49. package/{libs/instance-factories/applications/react-app.yaml → dist/libs/instance-factories/applications/react-app-runtime.yaml} +30 -77
  50. package/dist/libs/instance-factories/applications/react-app-starter.yaml +143 -0
  51. package/dist/libs/instance-factories/applications/templates/react/env-example-generator.js +24 -2
  52. package/dist/libs/instance-factories/applications/templates/react/vite-config-generator.js +54 -33
  53. package/dist/libs/instance-factories/applications/templates/react-starter/README.md +211 -0
  54. package/dist/libs/instance-factories/applications/templates/react-starter/api-types-starter-generator.js +69 -0
  55. package/dist/libs/instance-factories/applications/templates/react-starter/app-tsx-generator.js +110 -0
  56. package/dist/libs/instance-factories/applications/templates/react-starter/belongs-to.js +40 -0
  57. package/dist/libs/instance-factories/applications/templates/react-starter/dashboard-body-composer.js +129 -0
  58. package/dist/libs/instance-factories/applications/templates/react-starter/detail-body-composer.js +80 -0
  59. package/dist/libs/instance-factories/applications/templates/react-starter/form-body-composer.js +217 -0
  60. package/dist/libs/instance-factories/applications/templates/react-starter/helpers-emitter.js +51 -0
  61. package/dist/libs/instance-factories/applications/templates/react-starter/html-to-jsx.js +192 -0
  62. package/dist/libs/instance-factories/applications/templates/react-starter/list-body-composer.js +56 -0
  63. package/dist/libs/instance-factories/applications/templates/react-starter/orchestrator.js +41 -0
  64. package/dist/libs/instance-factories/applications/templates/react-starter/package-json-generator.js +38 -0
  65. package/dist/libs/instance-factories/applications/templates/react-starter/regen-safety.js +89 -0
  66. package/dist/libs/instance-factories/applications/templates/react-starter/skeletons/dashboard.tsx.template +49 -0
  67. package/dist/libs/instance-factories/applications/templates/react-starter/skeletons/detail.tsx.template +96 -0
  68. package/dist/libs/instance-factories/applications/templates/react-starter/skeletons/form.tsx.template +116 -0
  69. package/dist/libs/instance-factories/applications/templates/react-starter/skeletons/list.tsx.template +74 -0
  70. package/dist/libs/instance-factories/applications/templates/react-starter/use-api-hooks-starter-generator.js +95 -0
  71. package/dist/libs/instance-factories/applications/templates/react-starter/view-emitter.js +81 -0
  72. package/dist/libs/instance-factories/applications/templates/react-starter/views-generator.js +66 -0
  73. package/dist/libs/instance-factories/archived/fastify-prisma.yaml +104 -0
  74. package/dist/libs/instance-factories/cli/README.md +43 -0
  75. package/dist/libs/instance-factories/cli/commander-js.yaml +55 -0
  76. package/dist/libs/instance-factories/cli/templates/commander/command-generator.js +63 -12
  77. package/dist/libs/instance-factories/communication/README.md +47 -0
  78. package/dist/libs/instance-factories/communication/event-emitter.yaml +60 -0
  79. package/dist/libs/instance-factories/communication/rabbitmq-events.yaml +87 -0
  80. package/dist/libs/instance-factories/controllers/README.md +42 -0
  81. package/dist/libs/instance-factories/controllers/fastify.yaml +139 -0
  82. package/dist/libs/instance-factories/controllers/templates/fastify/server-generator.js +29 -2
  83. package/dist/libs/instance-factories/infrastructure/README.md +29 -0
  84. package/dist/libs/instance-factories/infrastructure/docker-k8s.yaml +61 -0
  85. package/dist/libs/instance-factories/orms/README.md +54 -0
  86. package/dist/libs/instance-factories/orms/prisma.yaml +89 -0
  87. package/dist/libs/instance-factories/orms/templates/prisma/schema-generator.js +2 -2
  88. package/dist/libs/instance-factories/scaffolding/README.md +49 -0
  89. package/dist/libs/instance-factories/scaffolding/generic-scaffold.yaml +65 -0
  90. package/dist/libs/instance-factories/sdks/README.md +28 -0
  91. package/dist/libs/instance-factories/sdks/python-sdk.yaml +66 -0
  92. package/dist/libs/instance-factories/sdks/typescript-sdk.yaml +59 -0
  93. package/dist/libs/instance-factories/services/README.md +55 -0
  94. package/dist/libs/instance-factories/services/prisma-services.yaml +71 -0
  95. package/dist/libs/instance-factories/storage/README.md +34 -0
  96. package/dist/libs/instance-factories/storage/mongodb.yaml +79 -0
  97. package/dist/libs/instance-factories/storage/postgresql.yaml +75 -0
  98. package/dist/libs/instance-factories/storage/redis.yaml +79 -0
  99. package/dist/libs/instance-factories/testing/README.md +40 -0
  100. package/dist/libs/instance-factories/testing/vitest-tests.yaml +63 -0
  101. package/dist/libs/instance-factories/tools/README.md +70 -0
  102. package/dist/libs/instance-factories/tools/mcp.yaml +36 -0
  103. package/dist/libs/instance-factories/tools/vscode.yaml +35 -0
  104. package/dist/libs/instance-factories/validation/README.md +38 -0
  105. package/dist/libs/instance-factories/validation/zod.yaml +56 -0
  106. package/dist/realize/engines/code-generator.d.ts.map +1 -1
  107. package/dist/realize/engines/code-generator.js +3 -0
  108. package/dist/realize/engines/code-generator.js.map +1 -1
  109. package/dist/realize/index.d.ts.map +1 -1
  110. package/dist/realize/index.js +15 -22
  111. package/dist/realize/index.js.map +1 -1
  112. package/dist/registry/utils/manifest-adapter.d.ts +8 -1
  113. package/dist/registry/utils/manifest-adapter.d.ts.map +1 -1
  114. package/dist/registry/utils/manifest-adapter.js +8 -1
  115. package/dist/registry/utils/manifest-adapter.js.map +1 -1
  116. package/libs/instance-factories/applications/react-app-starter.yaml +143 -0
  117. package/libs/instance-factories/applications/templates/react/env-example-generator.ts +24 -2
  118. package/libs/instance-factories/applications/templates/react/vite-config-generator.ts +54 -33
  119. package/libs/instance-factories/applications/templates/react-starter/README.md +211 -0
  120. package/libs/instance-factories/applications/templates/react-starter/__tests__/dashboard-body-composer.test.ts +153 -0
  121. package/libs/instance-factories/applications/templates/react-starter/__tests__/detail-body-composer.test.ts +146 -0
  122. package/libs/instance-factories/applications/templates/react-starter/__tests__/form-body-composer.test.ts +188 -0
  123. package/libs/instance-factories/applications/templates/react-starter/__tests__/helpers-emitter.test.ts +55 -0
  124. package/libs/instance-factories/applications/templates/react-starter/__tests__/html-to-jsx.test.ts +140 -0
  125. package/libs/instance-factories/applications/templates/react-starter/__tests__/list-body-composer.test.ts +146 -0
  126. package/libs/instance-factories/applications/templates/react-starter/__tests__/orchestrator.test.ts +184 -0
  127. package/libs/instance-factories/applications/templates/react-starter/__tests__/parity-p2-factory-imports.test.ts +116 -0
  128. package/libs/instance-factories/applications/templates/react-starter/__tests__/parity-p3-rendered-output.test.ts +183 -0
  129. package/libs/instance-factories/applications/templates/react-starter/__tests__/regen-safety.test.ts +144 -0
  130. package/libs/instance-factories/applications/templates/react-starter/__tests__/starter-generators.test.ts +114 -0
  131. package/libs/instance-factories/applications/templates/react-starter/__tests__/view-emitter.test.ts +107 -0
  132. package/libs/instance-factories/applications/templates/react-starter/__tests__/views-generator.test.ts +139 -0
  133. package/libs/instance-factories/applications/templates/react-starter/api-types-starter-generator.ts +98 -0
  134. package/libs/instance-factories/applications/templates/react-starter/app-tsx-generator.ts +141 -0
  135. package/libs/instance-factories/applications/templates/react-starter/belongs-to.ts +82 -0
  136. package/libs/instance-factories/applications/templates/react-starter/dashboard-body-composer.ts +189 -0
  137. package/libs/instance-factories/applications/templates/react-starter/detail-body-composer.ts +135 -0
  138. package/libs/instance-factories/applications/templates/react-starter/form-body-composer.ts +383 -0
  139. package/libs/instance-factories/applications/templates/react-starter/helpers-emitter.ts +66 -0
  140. package/libs/instance-factories/applications/templates/react-starter/html-to-jsx.ts +334 -0
  141. package/libs/instance-factories/applications/templates/react-starter/list-body-composer.ts +146 -0
  142. package/libs/instance-factories/applications/templates/react-starter/orchestrator.ts +95 -0
  143. package/libs/instance-factories/applications/templates/react-starter/package-json-generator.ts +57 -0
  144. package/libs/instance-factories/applications/templates/react-starter/regen-safety.ts +157 -0
  145. package/libs/instance-factories/applications/templates/react-starter/skeletons/dashboard.tsx.template +49 -0
  146. package/libs/instance-factories/applications/templates/react-starter/skeletons/detail.tsx.template +96 -0
  147. package/libs/instance-factories/applications/templates/react-starter/skeletons/form.tsx.template +116 -0
  148. package/libs/instance-factories/applications/templates/react-starter/skeletons/list.tsx.template +74 -0
  149. package/libs/instance-factories/applications/templates/react-starter/use-api-hooks-starter-generator.ts +124 -0
  150. package/libs/instance-factories/applications/templates/react-starter/view-emitter.ts +209 -0
  151. package/libs/instance-factories/applications/templates/react-starter/views-generator.ts +137 -0
  152. package/libs/instance-factories/cli/templates/commander/command-generator.ts +63 -12
  153. package/libs/instance-factories/controllers/fastify.yaml +7 -0
  154. package/libs/instance-factories/controllers/templates/fastify/server-generator.ts +36 -2
  155. package/libs/instance-factories/orms/templates/prisma/schema-generator.ts +11 -4
  156. package/package.json +3 -3
  157. package/dist/libs/instance-factories/applications/templates/react/_view-components-source.js +0 -530
  158. package/dist/libs/instance-factories/applications/templates/react/app-tsx-generator.js +0 -73
  159. package/dist/libs/instance-factories/applications/templates/react/field-helpers-generator.js +0 -99
  160. package/dist/libs/instance-factories/applications/templates/react/package-json-generator.js +0 -49
  161. package/dist/libs/instance-factories/applications/templates/react/pattern-adapter-generator.js +0 -156
  162. package/dist/libs/instance-factories/applications/templates/react/react-pattern-adapter.js +0 -935
  163. package/dist/libs/instance-factories/applications/templates/react/relationship-field-generator.js +0 -143
  164. package/dist/libs/instance-factories/applications/templates/react/tailwind-adapter-generator.js +0 -646
  165. package/dist/libs/instance-factories/applications/templates/react/tailwind-adapter-wrapper-generator.js +0 -65
  166. package/dist/libs/instance-factories/applications/templates/react/view-dashboard-generator.js +0 -143
  167. package/dist/libs/instance-factories/applications/templates/react/view-detail-generator.js +0 -143
  168. package/dist/libs/instance-factories/applications/templates/react/view-form-generator.js +0 -355
  169. package/dist/libs/instance-factories/applications/templates/react/view-list-generator.js +0 -91
  170. package/dist/libs/instance-factories/applications/templates/react/view-router-generator.js +0 -79
  171. package/dist/libs/instance-factories/views/index.js +0 -48
  172. package/dist/libs/instance-factories/views/templates/react/adapters/antd-adapter.js +0 -742
  173. package/dist/libs/instance-factories/views/templates/react/adapters/mui-adapter.js +0 -824
  174. package/dist/libs/instance-factories/views/templates/react/adapters/shadcn-adapter.js +0 -719
  175. package/dist/libs/instance-factories/views/templates/react/app-generator.js +0 -45
  176. package/dist/libs/instance-factories/views/templates/react/components-generator.js +0 -820
  177. package/dist/libs/instance-factories/views/templates/react/forms-generator.js +0 -275
  178. package/dist/libs/instance-factories/views/templates/react/frontend-package-json-generator.js +0 -46
  179. package/dist/libs/instance-factories/views/templates/react/hooks-generator.js +0 -81
  180. package/dist/libs/instance-factories/views/templates/react/index-css-generator.js +0 -9
  181. package/dist/libs/instance-factories/views/templates/react/index-html-generator.js +0 -23
  182. package/dist/libs/instance-factories/views/templates/react/main-tsx-generator.js +0 -21
  183. package/dist/libs/instance-factories/views/templates/react/react-component-generator.js +0 -299
  184. package/dist/libs/instance-factories/views/templates/react/router-generator.js +0 -136
  185. package/dist/libs/instance-factories/views/templates/react/router-generic-generator.js +0 -107
  186. package/dist/libs/instance-factories/views/templates/react/shared-utils-generator.js +0 -187
  187. package/dist/libs/instance-factories/views/templates/react/spec-json-generator.js +0 -7
  188. package/dist/libs/instance-factories/views/templates/react/types-generator.js +0 -56
  189. package/dist/libs/instance-factories/views/templates/react/views-metadata-generator.js +0 -27
  190. package/dist/libs/instance-factories/views/templates/react/vite-config-generator.js +0 -29
  191. package/dist/libs/instance-factories/views/templates/runtime/runtime-view-renderer.js +0 -261
  192. package/dist/libs/instance-factories/views/templates/shared/adapter-types.js +0 -34
  193. package/dist/libs/instance-factories/views/templates/shared/atomic-components-registry.js +0 -800
  194. package/dist/libs/instance-factories/views/templates/shared/base-generator.js +0 -305
  195. package/dist/libs/instance-factories/views/templates/shared/component-metadata.js +0 -517
  196. package/dist/libs/instance-factories/views/templates/shared/composite-pattern-types.js +0 -0
  197. package/dist/libs/instance-factories/views/templates/shared/composite-patterns.js +0 -445
  198. package/dist/libs/instance-factories/views/templates/shared/index.js +0 -80
  199. package/dist/libs/instance-factories/views/templates/shared/pattern-validator.js +0 -210
  200. package/dist/libs/instance-factories/views/templates/shared/property-mapper.js +0 -492
  201. package/dist/libs/instance-factories/views/templates/shared/syntax-mapper.js +0 -321
  202. package/dist/realize/index.js.bak +0 -758
  203. package/libs/instance-factories/applications/templates/react/_view-components-source.ts +0 -555
  204. package/libs/instance-factories/applications/templates/react/app-tsx-generator.ts +0 -94
  205. package/libs/instance-factories/applications/templates/react/field-helpers-generator.ts +0 -106
  206. package/libs/instance-factories/applications/templates/react/package-json-generator.ts +0 -57
  207. package/libs/instance-factories/applications/templates/react/pattern-adapter-generator.ts +0 -179
  208. package/libs/instance-factories/applications/templates/react/react-pattern-adapter.tsx +0 -1347
  209. package/libs/instance-factories/applications/templates/react/relationship-field-generator.ts +0 -150
  210. package/libs/instance-factories/applications/templates/react/tailwind-adapter-generator.ts +0 -704
  211. package/libs/instance-factories/applications/templates/react/tailwind-adapter-wrapper-generator.ts +0 -84
  212. package/libs/instance-factories/applications/templates/react/view-dashboard-generator.ts +0 -150
  213. package/libs/instance-factories/applications/templates/react/view-detail-generator.ts +0 -150
  214. package/libs/instance-factories/applications/templates/react/view-form-generator.ts +0 -362
  215. package/libs/instance-factories/applications/templates/react/view-list-generator.ts +0 -98
  216. package/libs/instance-factories/applications/templates/react/view-router-generator.ts +0 -89
  217. package/libs/instance-factories/views/README.md +0 -62
  218. package/libs/instance-factories/views/index.d.ts +0 -13
  219. package/libs/instance-factories/views/index.d.ts.map +0 -1
  220. package/libs/instance-factories/views/index.js +0 -18
  221. package/libs/instance-factories/views/index.js.map +0 -1
  222. package/libs/instance-factories/views/index.ts +0 -45
  223. package/libs/instance-factories/views/react-components.yaml +0 -129
  224. package/libs/instance-factories/views/templates/ARCHITECTURE.md +0 -198
  225. package/libs/instance-factories/views/templates/react/adapters/antd-adapter.ts +0 -869
  226. package/libs/instance-factories/views/templates/react/adapters/mui-adapter.ts +0 -953
  227. package/libs/instance-factories/views/templates/react/adapters/shadcn-adapter.ts +0 -806
  228. package/libs/instance-factories/views/templates/react/app-generator.ts +0 -55
  229. package/libs/instance-factories/views/templates/react/components-generator.ts +0 -938
  230. package/libs/instance-factories/views/templates/react/forms-generator.ts +0 -325
  231. package/libs/instance-factories/views/templates/react/frontend-package-json-generator.ts +0 -57
  232. package/libs/instance-factories/views/templates/react/hooks-generator.ts +0 -106
  233. package/libs/instance-factories/views/templates/react/index-css-generator.ts +0 -14
  234. package/libs/instance-factories/views/templates/react/index-html-generator.ts +0 -34
  235. package/libs/instance-factories/views/templates/react/main-tsx-generator.ts +0 -29
  236. package/libs/instance-factories/views/templates/react/react-component-generator.d.ts +0 -152
  237. package/libs/instance-factories/views/templates/react/react-component-generator.d.ts.map +0 -1
  238. package/libs/instance-factories/views/templates/react/react-component-generator.js +0 -398
  239. package/libs/instance-factories/views/templates/react/react-component-generator.js.map +0 -1
  240. package/libs/instance-factories/views/templates/react/react-component-generator.ts +0 -533
  241. package/libs/instance-factories/views/templates/react/router-generator.ts +0 -197
  242. package/libs/instance-factories/views/templates/react/router-generic-generator.ts +0 -132
  243. package/libs/instance-factories/views/templates/react/shared-utils-generator.ts +0 -196
  244. package/libs/instance-factories/views/templates/react/spec-json-generator.ts +0 -17
  245. package/libs/instance-factories/views/templates/react/types-generator.ts +0 -76
  246. package/libs/instance-factories/views/templates/react/views-metadata-generator.ts +0 -42
  247. package/libs/instance-factories/views/templates/react/vite-config-generator.ts +0 -38
  248. package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.d.ts.map +0 -1
  249. package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.js.map +0 -1
  250. package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.ts +0 -474
  251. package/libs/instance-factories/views/templates/shared/__tests__/composite-patterns.test.ts +0 -242
  252. package/libs/instance-factories/views/templates/shared/adapter-types.d.ts +0 -77
  253. package/libs/instance-factories/views/templates/shared/adapter-types.d.ts.map +0 -1
  254. package/libs/instance-factories/views/templates/shared/adapter-types.js +0 -47
  255. package/libs/instance-factories/views/templates/shared/adapter-types.js.map +0 -1
  256. package/libs/instance-factories/views/templates/shared/adapter-types.ts +0 -142
  257. package/libs/instance-factories/views/templates/shared/atomic-components-registry.d.ts +0 -63
  258. package/libs/instance-factories/views/templates/shared/atomic-components-registry.d.ts.map +0 -1
  259. package/libs/instance-factories/views/templates/shared/atomic-components-registry.js +0 -822
  260. package/libs/instance-factories/views/templates/shared/atomic-components-registry.js.map +0 -1
  261. package/libs/instance-factories/views/templates/shared/atomic-components-registry.ts +0 -908
  262. package/libs/instance-factories/views/templates/shared/base-generator.d.ts +0 -247
  263. package/libs/instance-factories/views/templates/shared/base-generator.d.ts.map +0 -1
  264. package/libs/instance-factories/views/templates/shared/base-generator.js +0 -363
  265. package/libs/instance-factories/views/templates/shared/base-generator.js.map +0 -1
  266. package/libs/instance-factories/views/templates/shared/base-generator.ts +0 -608
  267. package/libs/instance-factories/views/templates/shared/component-metadata.d.ts +0 -254
  268. package/libs/instance-factories/views/templates/shared/component-metadata.d.ts.map +0 -1
  269. package/libs/instance-factories/views/templates/shared/component-metadata.js +0 -602
  270. package/libs/instance-factories/views/templates/shared/component-metadata.js.map +0 -1
  271. package/libs/instance-factories/views/templates/shared/component-metadata.ts +0 -803
  272. package/libs/instance-factories/views/templates/shared/composite-pattern-types.ts +0 -250
  273. package/libs/instance-factories/views/templates/shared/composite-patterns.ts +0 -535
  274. package/libs/instance-factories/views/templates/shared/index.ts +0 -68
  275. package/libs/instance-factories/views/templates/shared/pattern-validator.ts +0 -279
  276. package/libs/instance-factories/views/templates/shared/property-mapper.d.ts +0 -149
  277. package/libs/instance-factories/views/templates/shared/property-mapper.d.ts.map +0 -1
  278. package/libs/instance-factories/views/templates/shared/property-mapper.js +0 -580
  279. package/libs/instance-factories/views/templates/shared/property-mapper.js.map +0 -1
  280. package/libs/instance-factories/views/templates/shared/property-mapper.ts +0 -700
  281. package/libs/instance-factories/views/templates/shared/syntax-mapper.d.ts +0 -143
  282. package/libs/instance-factories/views/templates/shared/syntax-mapper.d.ts.map +0 -1
  283. package/libs/instance-factories/views/templates/shared/syntax-mapper.js +0 -420
  284. package/libs/instance-factories/views/templates/shared/syntax-mapper.js.map +0 -1
  285. package/libs/instance-factories/views/templates/shared/syntax-mapper.ts +0 -539
@@ -1,38 +0,0 @@
1
- /**
2
- * Vite Configuration Generator
3
- *
4
- * Generates vite.config.ts for React application with backend proxy
5
- */
6
-
7
- import type { TemplateContext } from '@specverse/types';
8
-
9
- /**
10
- * Generate vite.config.ts
11
- */
12
- export default function generateViteConfig(context: TemplateContext): string {
13
- const { backendPort = 3000 } = context;
14
-
15
- return `import { defineConfig } from 'vite';
16
- import react from '@vitejs/plugin-react';
17
-
18
- // https://vitejs.dev/config/
19
- export default defineConfig({
20
- plugins: [react()],
21
- server: {
22
- port: 5173,
23
- host: true,
24
- proxy: {
25
- '/api': {
26
- target: 'http://localhost:${backendPort}',
27
- changeOrigin: true,
28
- rewrite: (path) => path
29
- }
30
- }
31
- },
32
- build: {
33
- outDir: 'dist',
34
- sourcemap: true
35
- }
36
- });
37
- `;
38
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime-view-renderer.d.ts","sourceRoot":"","sources":["runtime-view-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAsD,MAAM,OAAO,CAAC;AAC3E,OAAO,EACL,sBAAsB,EACtB,QAAQ,EACR,eAAe,EACf,eAAe,EAGf,eAAe,EAChB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAMnE;;GAEG;AACH,MAAM,WAAW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AAE,CAAC;QACX,cAAc,EAAE,IAAI;KACrB,CAAC;IAEF,MAAM,WAAW,GAAG,EAAE,GAAG,aAAa,EAAE,GAAG,MAAM,EAA2B,CAAC;IAE7E,OAAO,IAAI,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AACvD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CACxB,QAAkB,EAClB,OAAyB,EACzB,OAAqC;IAErC,MAAM,QAAQ,GAAG,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAChD,OAAO,QAAQ,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACnD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CACjC,QAAkB,EAClB,OAAyB;IAEzB,MAAM,QAAQ,GAAG,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAChD,OAAO,QAAQ,CAAC,sBAAsB,CAAC,QAAQ,CAAC,CAAC;AACnD,CAAC"}
@@ -1,474 +0,0 @@
1
- /**
2
- * Runtime View Renderer
3
- *
4
- * Dynamically renders SpecVerse views at runtime using React.createElement.
5
- * Used by app-demo for live view rendering without code generation.
6
- *
7
- * Architecture:
8
- * - No code generation - creates React elements directly
9
- * - Uses component-metadata for runtime hints
10
- * - Integrates with BaseComponentGenerator for shared logic
11
- * - Supports dynamic state and event binding
12
- * - Real-time view updates
13
- */
14
-
15
- import React, { createElement, useState, useEffect, useMemo } from 'react';
16
- import {
17
- BaseComponentGenerator,
18
- ViewSpec,
19
- StateDefinition,
20
- EventDefinition,
21
- UIComponent,
22
- RenderContext,
23
- GeneratorConfig
24
- } from '../shared/base-generator.js';
25
- import { mapProperties } from '../shared/property-mapper.js';
26
- import { getComponentMetadata } from '../shared/component-metadata.js';
27
- import type { ComponentAdapter } from '../shared/adapter-types.js';
28
-
29
- // ============================================================================
30
- // Types
31
- // ============================================================================
32
-
33
- /**
34
- * Runtime renderer configuration
35
- */
36
- export interface RuntimeRendererConfig extends GeneratorConfig {
37
- framework: 'runtime';
38
- target: 'runtime';
39
- /**
40
- * Enable live reload on spec changes
41
- */
42
- liveReload?: boolean;
43
- /**
44
- * Debug mode with console logging
45
- */
46
- debug?: boolean;
47
- }
48
-
49
- /**
50
- * Runtime component props
51
- */
52
- export interface RuntimeComponentProps {
53
- [key: string]: any;
54
- children?: React.ReactNode;
55
- }
56
-
57
- /**
58
- * Runtime state manager
59
- */
60
- export interface RuntimeState {
61
- [key: string]: any;
62
- }
63
-
64
- /**
65
- * Runtime event handlers
66
- */
67
- export interface RuntimeEventHandlers {
68
- [key: string]: (...args: any[]) => void;
69
- }
70
-
71
- /**
72
- * Runtime view context
73
- */
74
- export interface RuntimeViewContext {
75
- state: RuntimeState;
76
- setState: (updates: Partial<RuntimeState>) => void;
77
- handlers: RuntimeEventHandlers;
78
- data: Record<string, any[]>; // Model data for lists
79
- }
80
-
81
- // ============================================================================
82
- // Runtime View Renderer
83
- // ============================================================================
84
-
85
- /**
86
- * Renders SpecVerse views dynamically at runtime
87
- *
88
- * Unlike code generators, this creates React elements directly without
89
- * generating .tsx files. Used by app-demo for live view rendering.
90
- */
91
- export class RuntimeViewRenderer extends BaseComponentGenerator {
92
- private readonly runtimeConfig: RuntimeRendererConfig;
93
- private viewContext?: RuntimeViewContext;
94
-
95
- constructor(adapter: ComponentAdapter, config: RuntimeRendererConfig) {
96
- super(adapter, config);
97
- this.runtimeConfig = config;
98
- }
99
-
100
- // ============================================================================
101
- // Public API - Runtime Rendering
102
- // ============================================================================
103
-
104
- /**
105
- * Render view as React element (runtime)
106
- *
107
- * @param viewSpec - View specification
108
- * @param context - Runtime context (state, data, handlers)
109
- * @returns React element
110
- */
111
- public renderRuntime(
112
- viewSpec: ViewSpec,
113
- context?: Partial<RuntimeViewContext>
114
- ): React.ReactElement {
115
- // Initialize runtime context
116
- this.viewContext = this.initializeContext(viewSpec, context);
117
-
118
- // Create root element
119
- const components = this.renderComponentsRuntime(viewSpec.components);
120
-
121
- return createElement(
122
- 'div',
123
- { className: 'specverse-runtime-view', 'data-view': viewSpec.name },
124
- components
125
- );
126
- }
127
-
128
- /**
129
- * Create a React component from view spec
130
- *
131
- * Returns a React component function that can be used directly
132
- *
133
- * @param viewSpec - View specification
134
- * @returns React component function
135
- */
136
- public createRuntimeComponent(viewSpec: ViewSpec): React.FC<any> {
137
- const renderer = this;
138
-
139
- return function RuntimeViewComponent(props: any) {
140
- // Initialize state from view spec
141
- const [state, setState] = useState<RuntimeState>(() =>
142
- renderer.initializeState(viewSpec.state)
143
- );
144
-
145
- // Initialize event handlers
146
- const handlers = useMemo(() =>
147
- renderer.createEventHandlers(viewSpec.events, state, setState),
148
- [state]
149
- );
150
-
151
- // Create runtime context
152
- const context: RuntimeViewContext = {
153
- state,
154
- setState: (updates) => setState(prev => ({ ...prev, ...updates })),
155
- handlers,
156
- data: props.data || {}
157
- };
158
-
159
- // Render view
160
- return renderer.renderRuntime(viewSpec, context);
161
- };
162
- }
163
-
164
- // ============================================================================
165
- // Abstract Method Implementations (Not Used in Runtime)
166
- // ============================================================================
167
-
168
- protected generateImports(viewSpec: ViewSpec): string {
169
- // Runtime doesn't generate code
170
- return '';
171
- }
172
-
173
- protected generateComponent(parts: any): string {
174
- // Runtime doesn't generate code
175
- return '';
176
- }
177
-
178
- protected generateState(state: Record<string, StateDefinition>): string {
179
- // Runtime doesn't generate code
180
- return '';
181
- }
182
-
183
- protected generateEvents(events: Record<string, EventDefinition>): string {
184
- // Runtime doesn't generate code
185
- return '';
186
- }
187
-
188
- public getFileExtension(): string {
189
- return ''; // No files generated
190
- }
191
-
192
- public getAdditionalFiles(viewSpec: ViewSpec): Record<string, string> {
193
- return {}; // No files generated
194
- }
195
-
196
- // ============================================================================
197
- // Runtime-Specific Methods
198
- // ============================================================================
199
-
200
- /**
201
- * Initialize runtime context
202
- */
203
- private initializeContext(
204
- viewSpec: ViewSpec,
205
- context?: Partial<RuntimeViewContext>
206
- ): RuntimeViewContext {
207
- return {
208
- state: context?.state || this.initializeState(viewSpec.state),
209
- setState: context?.setState || (() => {}),
210
- handlers: context?.handlers || this.createEventHandlers(viewSpec.events),
211
- data: context?.data || {}
212
- };
213
- }
214
-
215
- /**
216
- * Initialize state from view spec
217
- */
218
- private initializeState(state?: Record<string, StateDefinition>): RuntimeState {
219
- if (!state) return {};
220
-
221
- const initialState: RuntimeState = {};
222
-
223
- for (const [name, def] of Object.entries(state)) {
224
- initialState[name] = def.initial;
225
- }
226
-
227
- return initialState;
228
- }
229
-
230
- /**
231
- * Create event handlers from view spec
232
- */
233
- private createEventHandlers(
234
- events?: Record<string, EventDefinition>,
235
- state?: RuntimeState,
236
- setState?: (updates: Partial<RuntimeState>) => void
237
- ): RuntimeEventHandlers {
238
- if (!events) return {};
239
-
240
- const handlers: RuntimeEventHandlers = {};
241
-
242
- for (const [name, def] of Object.entries(events)) {
243
- // Create handler function
244
- handlers[`handle${this.capitalize(name)}`] = (...args: any[]) => {
245
- if (this.runtimeConfig.debug) {
246
- console.log(`[RuntimeView] Event: ${name}`, args);
247
- }
248
-
249
- // Execute event body
250
- try {
251
- // Create function from body
252
- const fn = new Function('state', 'setState', 'args', def.body);
253
- fn(state, setState, args);
254
- } catch (error) {
255
- console.error(`[RuntimeView] Event handler error (${name}):`, error);
256
- }
257
- };
258
- }
259
-
260
- return handlers;
261
- }
262
-
263
- /**
264
- * Render components as React elements
265
- */
266
- private renderComponentsRuntime(components: Record<string, UIComponent>): React.ReactNode[] {
267
- return Object.entries(components).map(([name, component]) =>
268
- this.renderComponentRuntime(component, {
269
- depth: 0,
270
- path: [name]
271
- })
272
- );
273
- }
274
-
275
- /**
276
- * Render single component as React element
277
- */
278
- private renderComponentRuntime(
279
- component: UIComponent,
280
- context: RenderContext
281
- ): React.ReactElement | null {
282
- // Depth enforcement
283
- if (context.depth > this.MAX_DEPTH) {
284
- if (this.runtimeConfig.debug) {
285
- console.warn(`[RuntimeView] Max depth exceeded at ${context.path.join('.')}`);
286
- }
287
- return null;
288
- }
289
-
290
- // Get component metadata
291
- const metadata = getComponentMetadata(component.type);
292
- if (!metadata) {
293
- console.warn(`[RuntimeView] Unknown component type: ${component.type}`);
294
- return null;
295
- }
296
-
297
- // Map properties
298
- const mappedProps = component.properties
299
- ? mapProperties(component.type, component.properties, 'runtime')
300
- : {};
301
-
302
- // Add key for React
303
- const props: RuntimeComponentProps = {
304
- ...mappedProps,
305
- key: context.path.join('-')
306
- };
307
-
308
- // Handle conditional rendering
309
- if (component.condition && this.viewContext) {
310
- const condition = this.evaluateCondition(component.condition, this.viewContext);
311
- if (!condition) return null;
312
- }
313
-
314
- // Handle list rendering
315
- if (component.dataSource && this.viewContext) {
316
- return this.renderListRuntime(component, props, context);
317
- }
318
-
319
- // Render children
320
- let children: React.ReactNode = null;
321
- if (component.children && component.children.length > 0) {
322
- children = component.children.map((child, index) =>
323
- this.renderComponentRuntime(child, {
324
- ...context,
325
- depth: context.depth + 1,
326
- path: [...context.path, `child_${index}`]
327
- })
328
- );
329
- }
330
-
331
- // Get adapter component render function
332
- const adapterComponent = this.adapter.components[component.type];
333
- if (!adapterComponent) {
334
- console.warn(`[RuntimeView] No adapter for component: ${component.type}`);
335
- return null;
336
- }
337
-
338
- // For runtime, we need to create actual React elements
339
- // The adapter render function returns JSX string, so we need to convert it
340
- // For now, create a simple wrapper
341
- return this.createElementFromAdapter(component.type, props, children);
342
- }
343
-
344
- /**
345
- * Render list of items
346
- */
347
- private renderListRuntime(
348
- component: UIComponent,
349
- props: RuntimeComponentProps,
350
- context: RenderContext
351
- ): React.ReactElement | null {
352
- if (!this.viewContext) return null;
353
-
354
- const dataArray = this.viewContext.data[component.dataSource!];
355
- if (!Array.isArray(dataArray)) {
356
- console.warn(`[RuntimeView] Data source not found: ${component.dataSource}`);
357
- return null;
358
- }
359
-
360
- const items = dataArray.map((item, index) => {
361
- const itemProps = {
362
- ...props,
363
- ...item,
364
- key: `${context.path.join('-')}-${index}`
365
- };
366
-
367
- return this.createElementFromAdapter(component.type, itemProps, null);
368
- });
369
-
370
- return createElement(React.Fragment, null, ...items);
371
- }
372
-
373
- /**
374
- * Create React element from adapter component
375
- */
376
- private createElementFromAdapter(
377
- type: string,
378
- props: RuntimeComponentProps,
379
- children: React.ReactNode
380
- ): React.ReactElement {
381
- // For runtime, we create a simple div wrapper with className
382
- // In actual implementation, this would integrate with a component library
383
- return createElement(
384
- 'div',
385
- {
386
- ...props,
387
- className: `specverse-runtime-${type} ${props.className || ''}`.trim(),
388
- 'data-component': type
389
- },
390
- children
391
- );
392
- }
393
-
394
- /**
395
- * Evaluate condition expression
396
- */
397
- private evaluateCondition(condition: string, context: RuntimeViewContext): boolean {
398
- try {
399
- const fn = new Function('state', 'data', `return ${condition}`);
400
- return fn(context.state, context.data);
401
- } catch (error) {
402
- console.error(`[RuntimeView] Condition evaluation error:`, error);
403
- return false;
404
- }
405
- }
406
-
407
- /**
408
- * Capitalize first letter
409
- */
410
- private capitalize(str: string): string {
411
- return str.charAt(0).toUpperCase() + str.slice(1);
412
- }
413
- }
414
-
415
- // ============================================================================
416
- // Factory Functions
417
- // ============================================================================
418
-
419
- /**
420
- * Create a RuntimeViewRenderer instance
421
- *
422
- * @param adapter - Component adapter (runtime adapter)
423
- * @param config - Optional configuration
424
- * @returns RuntimeViewRenderer instance
425
- */
426
- export function createRuntimeRenderer(
427
- adapter: ComponentAdapter,
428
- config?: Partial<RuntimeRendererConfig>
429
- ): RuntimeViewRenderer {
430
- const defaultConfig: RuntimeRendererConfig = {
431
- framework: 'runtime',
432
- target: 'runtime',
433
- liveReload: false,
434
- debug: false,
435
- maxDepth: 3,
436
- enableWarnings: true
437
- };
438
-
439
- const finalConfig = { ...defaultConfig, ...config } as RuntimeRendererConfig;
440
-
441
- return new RuntimeViewRenderer(adapter, finalConfig);
442
- }
443
-
444
- /**
445
- * Render view at runtime (convenience function)
446
- *
447
- * @param viewSpec - View specification
448
- * @param adapter - Component adapter
449
- * @param context - Runtime context
450
- * @returns React element
451
- */
452
- export function renderView(
453
- viewSpec: ViewSpec,
454
- adapter: ComponentAdapter,
455
- context?: Partial<RuntimeViewContext>
456
- ): React.ReactElement {
457
- const renderer = createRuntimeRenderer(adapter);
458
- return renderer.renderRuntime(viewSpec, context);
459
- }
460
-
461
- /**
462
- * Create runtime component (convenience function)
463
- *
464
- * @param viewSpec - View specification
465
- * @param adapter - Component adapter
466
- * @returns React component function
467
- */
468
- export function createViewComponent(
469
- viewSpec: ViewSpec,
470
- adapter: ComponentAdapter
471
- ): React.FC<any> {
472
- const renderer = createRuntimeRenderer(adapter);
473
- return renderer.createRuntimeComponent(viewSpec);
474
- }