@specverse/engines 4.1.28 → 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 (237) 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/generic/main-generator.js +3 -3
  45. package/dist/libs/instance-factories/applications/templates/react/api-client-generator.js +16 -6
  46. package/dist/libs/instance-factories/applications/templates/react-starter/app-tsx-generator.js +110 -0
  47. package/dist/libs/instance-factories/applications/templates/react-starter/dashboard-body-composer.js +121 -0
  48. package/dist/libs/instance-factories/applications/templates/react-starter/detail-body-composer.js +78 -0
  49. package/dist/libs/instance-factories/applications/templates/react-starter/form-body-composer.js +190 -0
  50. package/dist/libs/instance-factories/applications/templates/react-starter/helpers-emitter.js +45 -0
  51. package/dist/libs/instance-factories/applications/templates/react-starter/html-to-jsx.js +192 -0
  52. package/dist/libs/instance-factories/applications/templates/react-starter/list-body-composer.js +46 -0
  53. package/dist/libs/instance-factories/applications/templates/react-starter/orchestrator.js +30 -0
  54. package/dist/libs/instance-factories/applications/templates/react-starter/package-json-generator.js +38 -0
  55. package/dist/libs/instance-factories/applications/templates/react-starter/regen-safety.js +89 -0
  56. package/dist/libs/instance-factories/applications/templates/react-starter/view-emitter.js +56 -0
  57. package/dist/libs/instance-factories/applications/templates/react-starter/views-generator.js +66 -0
  58. package/dist/libs/instance-factories/cli/templates/commander/command-generator.js +14 -11
  59. package/dist/libs/instance-factories/controllers/templates/fastify/server-generator.js +11 -3
  60. package/dist/libs/instance-factories/services/templates/prisma/controller-generator.js +27 -17
  61. package/dist/libs/instance-factories/shared/path-resolver.js +1 -1
  62. package/dist/realize/index.d.ts.map +1 -1
  63. package/dist/realize/index.js +15 -22
  64. package/dist/realize/index.js.map +1 -1
  65. package/dist/registry/utils/manifest-adapter.d.ts +8 -1
  66. package/dist/registry/utils/manifest-adapter.d.ts.map +1 -1
  67. package/dist/registry/utils/manifest-adapter.js +8 -1
  68. package/dist/registry/utils/manifest-adapter.js.map +1 -1
  69. package/libs/instance-factories/applications/react-app-starter.yaml +150 -0
  70. package/libs/instance-factories/applications/templates/generic/main-generator.ts +3 -3
  71. package/libs/instance-factories/applications/templates/react/api-client-generator.ts +16 -6
  72. package/libs/instance-factories/applications/templates/react-starter/README.md +211 -0
  73. package/libs/instance-factories/applications/templates/react-starter/__tests__/dashboard-body-composer.test.ts +153 -0
  74. package/libs/instance-factories/applications/templates/react-starter/__tests__/detail-body-composer.test.ts +145 -0
  75. package/libs/instance-factories/applications/templates/react-starter/__tests__/form-body-composer.test.ts +175 -0
  76. package/libs/instance-factories/applications/templates/react-starter/__tests__/helpers-emitter.test.ts +55 -0
  77. package/libs/instance-factories/applications/templates/react-starter/__tests__/html-to-jsx.test.ts +140 -0
  78. package/libs/instance-factories/applications/templates/react-starter/__tests__/list-body-composer.test.ts +146 -0
  79. package/libs/instance-factories/applications/templates/react-starter/__tests__/orchestrator.test.ts +163 -0
  80. package/libs/instance-factories/applications/templates/react-starter/__tests__/parity-p2-factory-imports.test.ts +116 -0
  81. package/libs/instance-factories/applications/templates/react-starter/__tests__/parity-p3-rendered-output.test.ts +183 -0
  82. package/libs/instance-factories/applications/templates/react-starter/__tests__/regen-safety.test.ts +144 -0
  83. package/libs/instance-factories/applications/templates/react-starter/__tests__/starter-generators.test.ts +114 -0
  84. package/libs/instance-factories/applications/templates/react-starter/__tests__/view-emitter.test.ts +107 -0
  85. package/libs/instance-factories/applications/templates/react-starter/__tests__/views-generator.test.ts +139 -0
  86. package/libs/instance-factories/applications/templates/react-starter/app-tsx-generator.ts +141 -0
  87. package/libs/instance-factories/applications/templates/react-starter/dashboard-body-composer.ts +174 -0
  88. package/libs/instance-factories/applications/templates/react-starter/detail-body-composer.ts +135 -0
  89. package/libs/instance-factories/applications/templates/react-starter/form-body-composer.ts +306 -0
  90. package/libs/instance-factories/applications/templates/react-starter/helpers-emitter.ts +60 -0
  91. package/libs/instance-factories/applications/templates/react-starter/html-to-jsx.ts +334 -0
  92. package/libs/instance-factories/applications/templates/react-starter/list-body-composer.ts +120 -0
  93. package/libs/instance-factories/applications/templates/react-starter/orchestrator.ts +80 -0
  94. package/libs/instance-factories/applications/templates/react-starter/package-json-generator.ts +57 -0
  95. package/libs/instance-factories/applications/templates/react-starter/regen-safety.ts +157 -0
  96. package/libs/instance-factories/applications/templates/react-starter/skeletons/dashboard.tsx.template +47 -0
  97. package/libs/instance-factories/applications/templates/react-starter/skeletons/detail.tsx.template +94 -0
  98. package/libs/instance-factories/applications/templates/react-starter/skeletons/form.tsx.template +114 -0
  99. package/libs/instance-factories/applications/templates/react-starter/skeletons/list.tsx.template +72 -0
  100. package/libs/instance-factories/applications/templates/react-starter/view-emitter.ts +151 -0
  101. package/libs/instance-factories/applications/templates/react-starter/views-generator.ts +137 -0
  102. package/libs/instance-factories/cli/templates/commander/command-generator.ts +14 -11
  103. package/libs/instance-factories/controllers/templates/fastify/server-generator.ts +11 -3
  104. package/libs/instance-factories/services/templates/prisma/controller-generator.ts +27 -17
  105. package/libs/instance-factories/shared/path-resolver.ts +8 -2
  106. package/package.json +3 -3
  107. package/dist/libs/instance-factories/applications/templates/react/_view-components-source.js +0 -530
  108. package/dist/libs/instance-factories/applications/templates/react/app-tsx-generator.js +0 -73
  109. package/dist/libs/instance-factories/applications/templates/react/field-helpers-generator.js +0 -99
  110. package/dist/libs/instance-factories/applications/templates/react/package-json-generator.js +0 -49
  111. package/dist/libs/instance-factories/applications/templates/react/pattern-adapter-generator.js +0 -156
  112. package/dist/libs/instance-factories/applications/templates/react/react-pattern-adapter.js +0 -935
  113. package/dist/libs/instance-factories/applications/templates/react/relationship-field-generator.js +0 -143
  114. package/dist/libs/instance-factories/applications/templates/react/tailwind-adapter-generator.js +0 -646
  115. package/dist/libs/instance-factories/applications/templates/react/tailwind-adapter-wrapper-generator.js +0 -65
  116. package/dist/libs/instance-factories/applications/templates/react/view-dashboard-generator.js +0 -143
  117. package/dist/libs/instance-factories/applications/templates/react/view-detail-generator.js +0 -143
  118. package/dist/libs/instance-factories/applications/templates/react/view-form-generator.js +0 -355
  119. package/dist/libs/instance-factories/applications/templates/react/view-list-generator.js +0 -91
  120. package/dist/libs/instance-factories/applications/templates/react/view-router-generator.js +0 -79
  121. package/dist/libs/instance-factories/tools/templates/vscode/vscode-extension-generator.js.bak +0 -244
  122. package/dist/libs/instance-factories/views/index.js +0 -48
  123. package/dist/libs/instance-factories/views/templates/react/adapters/antd-adapter.js +0 -742
  124. package/dist/libs/instance-factories/views/templates/react/adapters/mui-adapter.js +0 -824
  125. package/dist/libs/instance-factories/views/templates/react/adapters/shadcn-adapter.js +0 -719
  126. package/dist/libs/instance-factories/views/templates/react/app-generator.js +0 -45
  127. package/dist/libs/instance-factories/views/templates/react/components-generator.js +0 -820
  128. package/dist/libs/instance-factories/views/templates/react/forms-generator.js +0 -275
  129. package/dist/libs/instance-factories/views/templates/react/frontend-package-json-generator.js +0 -46
  130. package/dist/libs/instance-factories/views/templates/react/hooks-generator.js +0 -81
  131. package/dist/libs/instance-factories/views/templates/react/index-css-generator.js +0 -9
  132. package/dist/libs/instance-factories/views/templates/react/index-html-generator.js +0 -23
  133. package/dist/libs/instance-factories/views/templates/react/main-tsx-generator.js +0 -21
  134. package/dist/libs/instance-factories/views/templates/react/react-component-generator.js +0 -299
  135. package/dist/libs/instance-factories/views/templates/react/router-generator.js +0 -136
  136. package/dist/libs/instance-factories/views/templates/react/router-generic-generator.js +0 -107
  137. package/dist/libs/instance-factories/views/templates/react/shared-utils-generator.js +0 -187
  138. package/dist/libs/instance-factories/views/templates/react/spec-json-generator.js +0 -7
  139. package/dist/libs/instance-factories/views/templates/react/types-generator.js +0 -56
  140. package/dist/libs/instance-factories/views/templates/react/views-metadata-generator.js +0 -27
  141. package/dist/libs/instance-factories/views/templates/react/vite-config-generator.js +0 -29
  142. package/dist/libs/instance-factories/views/templates/runtime/runtime-view-renderer.js +0 -261
  143. package/dist/libs/instance-factories/views/templates/shared/adapter-types.js +0 -34
  144. package/dist/libs/instance-factories/views/templates/shared/atomic-components-registry.js +0 -800
  145. package/dist/libs/instance-factories/views/templates/shared/base-generator.js +0 -305
  146. package/dist/libs/instance-factories/views/templates/shared/component-metadata.js +0 -517
  147. package/dist/libs/instance-factories/views/templates/shared/composite-pattern-types.js +0 -0
  148. package/dist/libs/instance-factories/views/templates/shared/composite-patterns.js +0 -445
  149. package/dist/libs/instance-factories/views/templates/shared/index.js +0 -80
  150. package/dist/libs/instance-factories/views/templates/shared/pattern-validator.js +0 -210
  151. package/dist/libs/instance-factories/views/templates/shared/property-mapper.js +0 -492
  152. package/dist/libs/instance-factories/views/templates/shared/syntax-mapper.js +0 -321
  153. package/dist/realize/index.js.bak +0 -758
  154. package/libs/instance-factories/applications/react-app.yaml +0 -186
  155. package/libs/instance-factories/applications/templates/react/_view-components-source.ts +0 -555
  156. package/libs/instance-factories/applications/templates/react/app-tsx-generator.ts +0 -94
  157. package/libs/instance-factories/applications/templates/react/field-helpers-generator.ts +0 -106
  158. package/libs/instance-factories/applications/templates/react/package-json-generator.ts +0 -57
  159. package/libs/instance-factories/applications/templates/react/pattern-adapter-generator.ts +0 -179
  160. package/libs/instance-factories/applications/templates/react/react-pattern-adapter.tsx +0 -1347
  161. package/libs/instance-factories/applications/templates/react/relationship-field-generator.ts +0 -150
  162. package/libs/instance-factories/applications/templates/react/tailwind-adapter-generator.ts +0 -704
  163. package/libs/instance-factories/applications/templates/react/tailwind-adapter-wrapper-generator.ts +0 -84
  164. package/libs/instance-factories/applications/templates/react/view-dashboard-generator.ts +0 -150
  165. package/libs/instance-factories/applications/templates/react/view-detail-generator.ts +0 -150
  166. package/libs/instance-factories/applications/templates/react/view-form-generator.ts +0 -362
  167. package/libs/instance-factories/applications/templates/react/view-list-generator.ts +0 -98
  168. package/libs/instance-factories/applications/templates/react/view-router-generator.ts +0 -89
  169. package/libs/instance-factories/views/README.md +0 -62
  170. package/libs/instance-factories/views/index.d.ts +0 -13
  171. package/libs/instance-factories/views/index.d.ts.map +0 -1
  172. package/libs/instance-factories/views/index.js +0 -18
  173. package/libs/instance-factories/views/index.js.map +0 -1
  174. package/libs/instance-factories/views/index.ts +0 -45
  175. package/libs/instance-factories/views/react-components.yaml +0 -129
  176. package/libs/instance-factories/views/templates/ARCHITECTURE.md +0 -198
  177. package/libs/instance-factories/views/templates/react/adapters/antd-adapter.ts +0 -869
  178. package/libs/instance-factories/views/templates/react/adapters/mui-adapter.ts +0 -953
  179. package/libs/instance-factories/views/templates/react/adapters/shadcn-adapter.ts +0 -806
  180. package/libs/instance-factories/views/templates/react/app-generator.ts +0 -55
  181. package/libs/instance-factories/views/templates/react/components-generator.ts +0 -938
  182. package/libs/instance-factories/views/templates/react/forms-generator.ts +0 -325
  183. package/libs/instance-factories/views/templates/react/frontend-package-json-generator.ts +0 -57
  184. package/libs/instance-factories/views/templates/react/hooks-generator.ts +0 -106
  185. package/libs/instance-factories/views/templates/react/index-css-generator.ts +0 -14
  186. package/libs/instance-factories/views/templates/react/index-html-generator.ts +0 -34
  187. package/libs/instance-factories/views/templates/react/main-tsx-generator.ts +0 -29
  188. package/libs/instance-factories/views/templates/react/react-component-generator.d.ts +0 -152
  189. package/libs/instance-factories/views/templates/react/react-component-generator.d.ts.map +0 -1
  190. package/libs/instance-factories/views/templates/react/react-component-generator.js +0 -398
  191. package/libs/instance-factories/views/templates/react/react-component-generator.js.map +0 -1
  192. package/libs/instance-factories/views/templates/react/react-component-generator.ts +0 -533
  193. package/libs/instance-factories/views/templates/react/router-generator.ts +0 -197
  194. package/libs/instance-factories/views/templates/react/router-generic-generator.ts +0 -132
  195. package/libs/instance-factories/views/templates/react/shared-utils-generator.ts +0 -196
  196. package/libs/instance-factories/views/templates/react/spec-json-generator.ts +0 -17
  197. package/libs/instance-factories/views/templates/react/types-generator.ts +0 -76
  198. package/libs/instance-factories/views/templates/react/views-metadata-generator.ts +0 -42
  199. package/libs/instance-factories/views/templates/react/vite-config-generator.ts +0 -38
  200. package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.d.ts.map +0 -1
  201. package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.js.map +0 -1
  202. package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.ts +0 -474
  203. package/libs/instance-factories/views/templates/shared/__tests__/composite-patterns.test.ts +0 -242
  204. package/libs/instance-factories/views/templates/shared/adapter-types.d.ts +0 -77
  205. package/libs/instance-factories/views/templates/shared/adapter-types.d.ts.map +0 -1
  206. package/libs/instance-factories/views/templates/shared/adapter-types.js +0 -47
  207. package/libs/instance-factories/views/templates/shared/adapter-types.js.map +0 -1
  208. package/libs/instance-factories/views/templates/shared/adapter-types.ts +0 -142
  209. package/libs/instance-factories/views/templates/shared/atomic-components-registry.d.ts +0 -63
  210. package/libs/instance-factories/views/templates/shared/atomic-components-registry.d.ts.map +0 -1
  211. package/libs/instance-factories/views/templates/shared/atomic-components-registry.js +0 -822
  212. package/libs/instance-factories/views/templates/shared/atomic-components-registry.js.map +0 -1
  213. package/libs/instance-factories/views/templates/shared/atomic-components-registry.ts +0 -908
  214. package/libs/instance-factories/views/templates/shared/base-generator.d.ts +0 -247
  215. package/libs/instance-factories/views/templates/shared/base-generator.d.ts.map +0 -1
  216. package/libs/instance-factories/views/templates/shared/base-generator.js +0 -363
  217. package/libs/instance-factories/views/templates/shared/base-generator.js.map +0 -1
  218. package/libs/instance-factories/views/templates/shared/base-generator.ts +0 -608
  219. package/libs/instance-factories/views/templates/shared/component-metadata.d.ts +0 -254
  220. package/libs/instance-factories/views/templates/shared/component-metadata.d.ts.map +0 -1
  221. package/libs/instance-factories/views/templates/shared/component-metadata.js +0 -602
  222. package/libs/instance-factories/views/templates/shared/component-metadata.js.map +0 -1
  223. package/libs/instance-factories/views/templates/shared/component-metadata.ts +0 -803
  224. package/libs/instance-factories/views/templates/shared/composite-pattern-types.ts +0 -250
  225. package/libs/instance-factories/views/templates/shared/composite-patterns.ts +0 -535
  226. package/libs/instance-factories/views/templates/shared/index.ts +0 -68
  227. package/libs/instance-factories/views/templates/shared/pattern-validator.ts +0 -279
  228. package/libs/instance-factories/views/templates/shared/property-mapper.d.ts +0 -149
  229. package/libs/instance-factories/views/templates/shared/property-mapper.d.ts.map +0 -1
  230. package/libs/instance-factories/views/templates/shared/property-mapper.js +0 -580
  231. package/libs/instance-factories/views/templates/shared/property-mapper.js.map +0 -1
  232. package/libs/instance-factories/views/templates/shared/property-mapper.ts +0 -700
  233. package/libs/instance-factories/views/templates/shared/syntax-mapper.d.ts +0 -143
  234. package/libs/instance-factories/views/templates/shared/syntax-mapper.d.ts.map +0 -1
  235. package/libs/instance-factories/views/templates/shared/syntax-mapper.js +0 -420
  236. package/libs/instance-factories/views/templates/shared/syntax-mapper.js.map +0 -1
  237. package/libs/instance-factories/views/templates/shared/syntax-mapper.ts +0 -539
@@ -1,908 +0,0 @@
1
- /**
2
- * Atomic Components Registry
3
- *
4
- * Defines all 49 atomic component types.
5
- * Each type has metadata about its purpose, properties, and usage patterns.
6
- *
7
- * This registry is framework-agnostic. UI library adapters (shadcn, MUI, etc.)
8
- * implement these types using their specific components.
9
- */
10
-
11
- export interface AtomicComponentDefinition {
12
- /** Component type identifier (matches schema enum) */
13
- type: string;
14
-
15
- /** Human-readable name */
16
- name: string;
17
-
18
- /** Category from v3.4 schema */
19
- category: 'data-display' | 'forms-inputs' | 'actions' | 'overlays-feedback' |
20
- 'navigation' | 'layout' | 'progress' | 'specialized';
21
-
22
- /** Description of component purpose */
23
- description: string;
24
-
25
- /** Common SpecVerse properties this component accepts */
26
- properties: string[];
27
-
28
- /** Whether this component can contain child components */
29
- canHaveChildren: boolean;
30
-
31
- /** Example usage in SpecVerse spec */
32
- example: string;
33
- }
34
-
35
- /**
36
- * Complete registry of all 49 atomic component types
37
- */
38
- export const ATOMIC_COMPONENTS_REGISTRY: Record<string, AtomicComponentDefinition> = {
39
- // =========================================================================
40
- // DATA DISPLAY (9 types)
41
- // =========================================================================
42
-
43
- table: {
44
- type: 'table',
45
- name: 'Table',
46
- category: 'data-display',
47
- description: 'Tabular data display with rows, columns, sorting, and pagination',
48
- properties: ['columns', 'sortable', 'filterable', 'pagination', 'compact', 'selectable', 'exportable'],
49
- canHaveChildren: false,
50
- example: `
51
- taskTable:
52
- type: table
53
- model: Task
54
- columns: [title, status, priority, assignee, dueDate]
55
- features: [sorting, filtering, pagination]
56
- `
57
- },
58
-
59
- list: {
60
- type: 'list',
61
- name: 'List',
62
- category: 'data-display',
63
- description: 'Vertical list of items, often with avatars or icons',
64
- properties: ['items', 'itemTemplate', 'dividers', 'dense', 'interactive'],
65
- canHaveChildren: true,
66
- example: `
67
- userList:
68
- type: list
69
- model: User
70
- properties:
71
- dense: true
72
- dividers: true
73
- `
74
- },
75
-
76
- grid: {
77
- type: 'grid',
78
- name: 'Grid',
79
- category: 'data-display',
80
- description: 'Grid layout for cards or items',
81
- properties: ['columns', 'gap', 'responsive', 'itemsPerRow'],
82
- canHaveChildren: true,
83
- example: `
84
- projectGrid:
85
- type: grid
86
- properties:
87
- columns: 3
88
- gap: medium
89
- responsive: true
90
- `
91
- },
92
-
93
- card: {
94
- type: 'card',
95
- name: 'Card',
96
- category: 'data-display',
97
- description: 'Container with optional header, content, and actions',
98
- properties: ['title', 'subtitle', 'variant', 'elevation', 'clickable', 'hoverable', 'compact', 'showTrend', 'metric'],
99
- canHaveChildren: true,
100
- example: `
101
- budgetCard:
102
- type: card
103
- properties:
104
- variant: metric
105
- showTrend: true
106
- metric: budget
107
- `
108
- },
109
-
110
- chart: {
111
- type: 'chart',
112
- name: 'Chart',
113
- category: 'data-display',
114
- description: 'Data visualization (line, bar, pie, etc.)',
115
- properties: ['chartType', 'data', 'responsive', 'showLegend', 'interactive', 'exportable'],
116
- canHaveChildren: false,
117
- example: `
118
- trendChart:
119
- type: chart
120
- properties:
121
- chartType: trend
122
- responsive: true
123
- showLegend: true
124
- `
125
- },
126
-
127
- tree: {
128
- type: 'tree',
129
- name: 'Tree',
130
- category: 'data-display',
131
- description: 'Hierarchical tree structure',
132
- properties: ['data', 'expandable', 'selectable', 'checkboxes', 'defaultExpanded'],
133
- canHaveChildren: false,
134
- example: `
135
- categoryTree:
136
- type: tree
137
- properties:
138
- expandable: true
139
- defaultExpanded: false
140
- `
141
- },
142
-
143
- timeline: {
144
- type: 'timeline',
145
- name: 'Timeline',
146
- category: 'data-display',
147
- description: 'Chronological event timeline',
148
- properties: ['orientation', 'showDateMarkers', 'showDuration', 'showUser'],
149
- canHaveChildren: true,
150
- example: `
151
- activityTimeline:
152
- type: timeline
153
- properties:
154
- orientation: vertical
155
- showDateMarkers: true
156
- `
157
- },
158
-
159
- avatar: {
160
- type: 'avatar',
161
- name: 'Avatar',
162
- category: 'data-display',
163
- description: 'User avatar or profile image',
164
- properties: ['src', 'alt', 'size', 'shape', 'initials', 'badge'],
165
- canHaveChildren: false,
166
- example: `
167
- userAvatar:
168
- type: avatar
169
- properties:
170
- size: medium
171
- shape: circle
172
- `
173
- },
174
-
175
- image: {
176
- type: 'image',
177
- name: 'Image',
178
- category: 'data-display',
179
- description: 'Image display with optional caption',
180
- properties: ['src', 'alt', 'width', 'height', 'objectFit', 'caption', 'lazy'],
181
- canHaveChildren: false,
182
- example: `
183
- projectImage:
184
- type: image
185
- properties:
186
- objectFit: cover
187
- lazy: true
188
- `
189
- },
190
-
191
- // =========================================================================
192
- // FORMS & INPUTS (11 types)
193
- // =========================================================================
194
-
195
- form: {
196
- type: 'form',
197
- name: 'Form',
198
- category: 'forms-inputs',
199
- description: 'Form container with validation and submission',
200
- properties: ['onSubmit', 'validation', 'autoSave', 'showValidation', 'layout'],
201
- canHaveChildren: true,
202
- example: `
203
- taskForm:
204
- type: form
205
- properties:
206
- autoSave: false
207
- showValidation: true
208
- `
209
- },
210
-
211
- input: {
212
- type: 'input',
213
- name: 'Input',
214
- category: 'forms-inputs',
215
- description: 'Text input field',
216
- properties: ['label', 'placeholder', 'required', 'type', 'disabled', 'error', 'helperText', 'icon', 'multiline'],
217
- canHaveChildren: false,
218
- example: `
219
- titleInput:
220
- type: input
221
- properties:
222
- label: "Title"
223
- placeholder: "Enter task title"
224
- required: true
225
- `
226
- },
227
-
228
- textarea: {
229
- type: 'textarea',
230
- name: 'Textarea',
231
- category: 'forms-inputs',
232
- description: 'Multi-line text input',
233
- properties: ['label', 'placeholder', 'rows', 'required', 'maxLength', 'resize'],
234
- canHaveChildren: false,
235
- example: `
236
- descriptionInput:
237
- type: textarea
238
- properties:
239
- label: "Description"
240
- rows: 4
241
- `
242
- },
243
-
244
- select: {
245
- type: 'select',
246
- name: 'Select',
247
- category: 'forms-inputs',
248
- description: 'Dropdown selection',
249
- properties: ['label', 'options', 'required', 'multiple', 'placeholder', 'searchable'],
250
- canHaveChildren: false,
251
- example: `
252
- statusSelect:
253
- type: select
254
- properties:
255
- label: "Status"
256
- options: [todo, in_progress, done]
257
- required: true
258
- `
259
- },
260
-
261
- checkbox: {
262
- type: 'checkbox',
263
- name: 'Checkbox',
264
- category: 'forms-inputs',
265
- description: 'Checkbox for boolean values',
266
- properties: ['label', 'checked', 'disabled', 'indeterminate'],
267
- canHaveChildren: false,
268
- example: `
269
- completedCheckbox:
270
- type: checkbox
271
- properties:
272
- label: "Completed"
273
- `
274
- },
275
-
276
- radio: {
277
- type: 'radio',
278
- name: 'Radio',
279
- category: 'forms-inputs',
280
- description: 'Radio button group',
281
- properties: ['label', 'options', 'orientation', 'required'],
282
- canHaveChildren: false,
283
- example: `
284
- priorityRadio:
285
- type: radio
286
- properties:
287
- label: "Priority"
288
- options: [low, medium, high]
289
- orientation: horizontal
290
- `
291
- },
292
-
293
- slider: {
294
- type: 'slider',
295
- name: 'Slider',
296
- category: 'forms-inputs',
297
- description: 'Slider for numeric ranges',
298
- properties: ['label', 'min', 'max', 'step', 'value', 'marks', 'showValue'],
299
- canHaveChildren: false,
300
- example: `
301
- progressSlider:
302
- type: slider
303
- properties:
304
- label: "Progress"
305
- min: 0
306
- max: 100
307
- showValue: true
308
- `
309
- },
310
-
311
- switch: {
312
- type: 'switch',
313
- name: 'Switch',
314
- category: 'forms-inputs',
315
- description: 'Toggle switch for boolean values',
316
- properties: ['label', 'checked', 'disabled', 'size'],
317
- canHaveChildren: false,
318
- example: `
319
- notificationsSwitch:
320
- type: switch
321
- properties:
322
- label: "Enable Notifications"
323
- `
324
- },
325
-
326
- autocomplete: {
327
- type: 'autocomplete',
328
- name: 'Autocomplete',
329
- category: 'forms-inputs',
330
- description: 'Searchable dropdown with autocomplete',
331
- properties: ['label', 'options', 'multiple', 'searchable', 'placeholder', 'limit', 'freeSolo'],
332
- canHaveChildren: false,
333
- example: `
334
- assigneeSelect:
335
- type: autocomplete
336
- model: User
337
- properties:
338
- label: "Assignee"
339
- searchable: true
340
- `
341
- },
342
-
343
- datepicker: {
344
- type: 'datepicker',
345
- name: 'DatePicker',
346
- category: 'forms-inputs',
347
- description: 'Date selection input',
348
- properties: ['label', 'format', 'minDate', 'maxDate', 'required', 'showTime', 'range'],
349
- canHaveChildren: false,
350
- example: `
351
- dueDatePicker:
352
- type: datepicker
353
- properties:
354
- label: "Due Date"
355
- format: "MM/DD/YYYY"
356
- `
357
- },
358
-
359
- timepicker: {
360
- type: 'timepicker',
361
- name: 'TimePicker',
362
- category: 'forms-inputs',
363
- description: 'Time selection input',
364
- properties: ['label', 'format', 'required', 'step', 'use24Hour'],
365
- canHaveChildren: false,
366
- example: `
367
- meetingTime:
368
- type: timepicker
369
- properties:
370
- label: "Meeting Time"
371
- use24Hour: false
372
- `
373
- },
374
-
375
- // =========================================================================
376
- // ACTIONS (5 types)
377
- // =========================================================================
378
-
379
- button: {
380
- type: 'button',
381
- name: 'Button',
382
- category: 'actions',
383
- description: 'Clickable button',
384
- properties: ['label', 'variant', 'size', 'disabled', 'loading', 'icon', 'onClick', 'type'],
385
- canHaveChildren: false,
386
- example: `
387
- submitButton:
388
- type: button
389
- properties:
390
- label: "Submit"
391
- variant: primary
392
- type: submit
393
- `
394
- },
395
-
396
- 'button-group': {
397
- type: 'button-group',
398
- name: 'ButtonGroup',
399
- category: 'actions',
400
- description: 'Group of related buttons',
401
- properties: ['orientation', 'variant', 'size', 'buttons'],
402
- canHaveChildren: true,
403
- example: `
404
- actions:
405
- type: button-group
406
- properties:
407
- orientation: horizontal
408
- uiComponents:
409
- editButton: { type: button }
410
- deleteButton: { type: button }
411
- `
412
- },
413
-
414
- link: {
415
- type: 'link',
416
- name: 'Link',
417
- category: 'actions',
418
- description: 'Hyperlink or navigation link',
419
- properties: ['href', 'label', 'external', 'underline', 'color'],
420
- canHaveChildren: false,
421
- example: `
422
- viewDetails:
423
- type: link
424
- properties:
425
- label: "View Details"
426
- href: "/tasks/:id"
427
- `
428
- },
429
-
430
- icon: {
431
- type: 'icon',
432
- name: 'Icon',
433
- category: 'actions',
434
- description: 'Icon display',
435
- properties: ['name', 'size', 'color', 'clickable', 'tooltip'],
436
- canHaveChildren: false,
437
- example: `
438
- deleteIcon:
439
- type: icon
440
- properties:
441
- name: "trash"
442
- color: danger
443
- `
444
- },
445
-
446
- menu: {
447
- type: 'menu',
448
- name: 'Menu',
449
- category: 'actions',
450
- description: 'Dropdown menu with actions',
451
- properties: ['items', 'trigger', 'placement'],
452
- canHaveChildren: true,
453
- example: `
454
- contextMenu:
455
- type: menu
456
- properties:
457
- trigger: click
458
- placement: bottom-start
459
- `
460
- },
461
-
462
- // =========================================================================
463
- // OVERLAYS & FEEDBACK (9 types)
464
- // =========================================================================
465
-
466
- modal: {
467
- type: 'modal',
468
- name: 'Modal',
469
- category: 'overlays-feedback',
470
- description: 'Modal dialog overlay',
471
- properties: ['title', 'size', 'closeOnBackdrop', 'closeButton', 'footer'],
472
- canHaveChildren: true,
473
- example: `
474
- confirmDialog:
475
- type: modal
476
- properties:
477
- title: "Confirm Deletion"
478
- size: small
479
- closeOnBackdrop: false
480
- `
481
- },
482
-
483
- dialog: {
484
- type: 'dialog',
485
- name: 'Dialog',
486
- category: 'overlays-feedback',
487
- description: 'Dialog box (similar to modal, often simpler)',
488
- properties: ['title', 'message', 'actions', 'variant'],
489
- canHaveChildren: true,
490
- example: `
491
- alertDialog:
492
- type: dialog
493
- properties:
494
- title: "Alert"
495
- variant: warning
496
- `
497
- },
498
-
499
- drawer: {
500
- type: 'drawer',
501
- name: 'Drawer',
502
- category: 'overlays-feedback',
503
- description: 'Slide-out panel from edge',
504
- properties: ['position', 'width', 'closeOnBackdrop', 'persistent'],
505
- canHaveChildren: true,
506
- example: `
507
- filterDrawer:
508
- type: drawer
509
- properties:
510
- position: right
511
- width: 400
512
- `
513
- },
514
-
515
- popover: {
516
- type: 'popover',
517
- name: 'Popover',
518
- category: 'overlays-feedback',
519
- description: 'Floating content container',
520
- properties: ['trigger', 'placement', 'arrow', 'offset'],
521
- canHaveChildren: true,
522
- example: `
523
- helpPopover:
524
- type: popover
525
- properties:
526
- trigger: hover
527
- placement: top
528
- `
529
- },
530
-
531
- tooltip: {
532
- type: 'tooltip',
533
- name: 'Tooltip',
534
- category: 'overlays-feedback',
535
- description: 'Brief informational tooltip',
536
- properties: ['content', 'placement', 'arrow', 'delay'],
537
- canHaveChildren: false,
538
- example: `
539
- infoTooltip:
540
- type: tooltip
541
- properties:
542
- content: "Additional information"
543
- placement: top
544
- `
545
- },
546
-
547
- alert: {
548
- type: 'alert',
549
- name: 'Alert',
550
- category: 'overlays-feedback',
551
- description: 'Alert or notification message',
552
- properties: ['variant', 'title', 'message', 'closable', 'icon'],
553
- canHaveChildren: false,
554
- example: `
555
- successAlert:
556
- type: alert
557
- properties:
558
- variant: success
559
- message: "Task created successfully"
560
- `
561
- },
562
-
563
- snackbar: {
564
- type: 'snackbar',
565
- name: 'Snackbar',
566
- category: 'overlays-feedback',
567
- description: 'Temporary notification (toast)',
568
- properties: ['message', 'duration', 'position', 'action', 'variant'],
569
- canHaveChildren: false,
570
- example: `
571
- notification:
572
- type: snackbar
573
- properties:
574
- message: "Changes saved"
575
- duration: 3000
576
- position: bottom-right
577
- `
578
- },
579
-
580
- badge: {
581
- type: 'badge',
582
- name: 'Badge',
583
- category: 'overlays-feedback',
584
- description: 'Small status indicator or count',
585
- properties: ['content', 'variant', 'position', 'max', 'dot'],
586
- canHaveChildren: false,
587
- example: `
588
- notificationBadge:
589
- type: badge
590
- properties:
591
- content: 5
592
- variant: error
593
- `
594
- },
595
-
596
- spinner: {
597
- type: 'spinner',
598
- name: 'Spinner',
599
- category: 'overlays-feedback',
600
- description: 'Loading spinner',
601
- properties: ['size', 'color', 'thickness'],
602
- canHaveChildren: false,
603
- example: `
604
- loadingSpinner:
605
- type: spinner
606
- properties:
607
- size: medium
608
- `
609
- },
610
-
611
- // =========================================================================
612
- // NAVIGATION (5 types)
613
- // =========================================================================
614
-
615
- tabs: {
616
- type: 'tabs',
617
- name: 'Tabs',
618
- category: 'navigation',
619
- description: 'Tabbed navigation',
620
- properties: ['orientation', 'variant', 'sections', 'showProgress'],
621
- canHaveChildren: true,
622
- example: `
623
- profileTabs:
624
- type: tabs
625
- properties:
626
- sections: [about, activity, settings]
627
- `
628
- },
629
-
630
- breadcrumb: {
631
- type: 'breadcrumb',
632
- name: 'Breadcrumb',
633
- category: 'navigation',
634
- description: 'Breadcrumb navigation trail',
635
- properties: ['items', 'separator', 'maxItems'],
636
- canHaveChildren: false,
637
- example: `
638
- pageBreadcrumb:
639
- type: breadcrumb
640
- properties:
641
- separator: "/"
642
- `
643
- },
644
-
645
- navbar: {
646
- type: 'navbar',
647
- name: 'Navbar',
648
- category: 'navigation',
649
- description: 'Top navigation bar',
650
- properties: ['brand', 'items', 'sticky', 'transparent'],
651
- canHaveChildren: true,
652
- example: `
653
- mainNav:
654
- type: navbar
655
- properties:
656
- sticky: true
657
- `
658
- },
659
-
660
- sidebar: {
661
- type: 'sidebar',
662
- name: 'Sidebar',
663
- category: 'navigation',
664
- description: 'Side navigation menu',
665
- properties: ['items', 'collapsible', 'width', 'position'],
666
- canHaveChildren: true,
667
- example: `
668
- appSidebar:
669
- type: sidebar
670
- properties:
671
- collapsible: true
672
- position: left
673
- `
674
- },
675
-
676
- pagination: {
677
- type: 'pagination',
678
- name: 'Pagination',
679
- category: 'navigation',
680
- description: 'Page navigation controls',
681
- properties: ['pageSize', 'total', 'showSizeChanger', 'showTotal'],
682
- canHaveChildren: false,
683
- example: `
684
- tablePagination:
685
- type: pagination
686
- properties:
687
- pageSize: 25
688
- showSizeChanger: true
689
- `
690
- },
691
-
692
- // =========================================================================
693
- // LAYOUT (6 types)
694
- // =========================================================================
695
-
696
- accordion: {
697
- type: 'accordion',
698
- name: 'Accordion',
699
- category: 'layout',
700
- description: 'Expandable/collapsible sections',
701
- properties: ['allowMultiple', 'defaultExpanded', 'variant'],
702
- canHaveChildren: true,
703
- example: `
704
- faqAccordion:
705
- type: accordion
706
- properties:
707
- allowMultiple: false
708
- `
709
- },
710
-
711
- carousel: {
712
- type: 'carousel',
713
- name: 'Carousel',
714
- category: 'layout',
715
- description: 'Slideshow of items',
716
- properties: ['autoplay', 'interval', 'showArrows', 'showDots', 'infinite'],
717
- canHaveChildren: true,
718
- example: `
719
- imageCarousel:
720
- type: carousel
721
- properties:
722
- autoplay: true
723
- interval: 5000
724
- `
725
- },
726
-
727
- container: {
728
- type: 'container',
729
- name: 'Container',
730
- category: 'layout',
731
- description: 'Generic layout container',
732
- properties: ['layout', 'gap', 'padding', 'alignment', 'scrollable', 'renderType', 'allowDrop'],
733
- canHaveChildren: true,
734
- example: `
735
- boardContainer:
736
- type: container
737
- properties:
738
- layout: horizontal
739
- scrollable: true
740
- `
741
- },
742
-
743
- divider: {
744
- type: 'divider',
745
- name: 'Divider',
746
- category: 'layout',
747
- description: 'Visual separator',
748
- properties: ['orientation', 'variant', 'spacing'],
749
- canHaveChildren: false,
750
- example: `
751
- sectionDivider:
752
- type: divider
753
- properties:
754
- orientation: horizontal
755
- `
756
- },
757
-
758
- header: {
759
- type: 'header',
760
- name: 'Header',
761
- category: 'layout',
762
- description: 'Header section',
763
- properties: ['title', 'subtitle', 'showAvatar', 'showCover', 'actions'],
764
- canHaveChildren: true,
765
- example: `
766
- pageHeader:
767
- type: header
768
- properties:
769
- title: "Dashboard"
770
- `
771
- },
772
-
773
- footer: {
774
- type: 'footer',
775
- name: 'Footer',
776
- category: 'layout',
777
- description: 'Footer section',
778
- properties: ['content', 'links', 'copyright', 'sticky'],
779
- canHaveChildren: true,
780
- example: `
781
- pageFooter:
782
- type: footer
783
- properties:
784
- copyright: "2025 Company"
785
- `
786
- },
787
-
788
- // =========================================================================
789
- // PROGRESS (2 types)
790
- // =========================================================================
791
-
792
- 'progress-bar': {
793
- type: 'progress-bar',
794
- name: 'ProgressBar',
795
- category: 'progress',
796
- description: 'Linear progress indicator',
797
- properties: ['value', 'max', 'label', 'variant', 'animated'],
798
- canHaveChildren: false,
799
- example: `
800
- taskProgress:
801
- type: progress-bar
802
- properties:
803
- value: 75
804
- max: 100
805
- label: true
806
- `
807
- },
808
-
809
- 'progress-circle': {
810
- type: 'progress-circle',
811
- name: 'ProgressCircle',
812
- category: 'progress',
813
- description: 'Circular progress indicator',
814
- properties: ['value', 'max', 'size', 'thickness', 'label'],
815
- canHaveChildren: false,
816
- example: `
817
- completionProgress:
818
- type: progress-circle
819
- properties:
820
- value: 75
821
- size: large
822
- `
823
- },
824
-
825
- // =========================================================================
826
- // SPECIALIZED (2 types)
827
- // =========================================================================
828
-
829
- searchBar: {
830
- type: 'searchBar',
831
- name: 'SearchBar',
832
- category: 'specialized',
833
- description: 'Search input with icon and actions',
834
- properties: ['placeholder', 'onSearch', 'showClear', 'autofocus'],
835
- canHaveChildren: false,
836
- example: `
837
- taskSearch:
838
- type: searchBar
839
- properties:
840
- placeholder: "Search tasks..."
841
- showClear: true
842
- `
843
- },
844
-
845
- filterPanel: {
846
- type: 'filterPanel',
847
- name: 'FilterPanel',
848
- category: 'specialized',
849
- description: 'Panel with multiple filter controls',
850
- properties: ['position', 'collapsible', 'advanced', 'showDateRange', 'showCategories', 'showActivityTypes'],
851
- canHaveChildren: true,
852
- example: `
853
- dataFilters:
854
- type: filterPanel
855
- properties:
856
- position: top
857
- collapsible: true
858
- advanced: true
859
- `
860
- },
861
- };
862
-
863
- /**
864
- * Get component definition by type
865
- */
866
- export function getComponentDefinition(type: string): AtomicComponentDefinition | undefined {
867
- return ATOMIC_COMPONENTS_REGISTRY[type];
868
- }
869
-
870
- /**
871
- * Get all components in a category
872
- */
873
- export function getComponentsByCategory(category: string): AtomicComponentDefinition[] {
874
- return Object.values(ATOMIC_COMPONENTS_REGISTRY).filter(comp => comp.category === category);
875
- }
876
-
877
- /**
878
- * Validate if a component type exists
879
- */
880
- export function isValidComponentType(type: string): boolean {
881
- return type in ATOMIC_COMPONENTS_REGISTRY;
882
- }
883
-
884
- /**
885
- * Get all component types as array
886
- */
887
- export function getAllComponentTypes(): string[] {
888
- return Object.keys(ATOMIC_COMPONENTS_REGISTRY);
889
- }
890
-
891
- /**
892
- * Component categories summary
893
- */
894
- export const COMPONENT_CATEGORIES = {
895
- 'data-display': 9,
896
- 'forms-inputs': 11,
897
- 'actions': 5,
898
- 'overlays-feedback': 9,
899
- 'navigation': 5,
900
- 'layout': 6,
901
- 'progress': 2,
902
- 'specialized': 2,
903
- } as const;
904
-
905
- /**
906
- * Total count: 49 atomic components
907
- */
908
- export const TOTAL_COMPONENT_COUNT = 49;