@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.
- package/assets/examples/manifests/frontend-only.yaml +3 -6
- package/assets/examples/manifests/fullstack-app.yaml +5 -7
- package/assets/examples/manifests/fullstack-monorepo.yaml +3 -6
- package/dist/inference/comprehensive-engine.d.ts.map +1 -1
- package/dist/inference/comprehensive-engine.js +3 -19
- package/dist/inference/comprehensive-engine.js.map +1 -1
- package/dist/inference/core/rule-engine.d.ts +31 -0
- package/dist/inference/core/rule-engine.d.ts.map +1 -1
- package/dist/inference/core/rule-engine.js +117 -33
- package/dist/inference/core/rule-engine.js.map +1 -1
- package/dist/inference/core/rule-file-types.d.ts +0 -2
- package/dist/inference/core/rule-file-types.d.ts.map +1 -1
- package/dist/inference/core/rule-file-types.js +3 -6
- package/dist/inference/core/rule-file-types.js.map +1 -1
- package/dist/inference/core/rule-loader.d.ts +5 -15
- package/dist/inference/core/rule-loader.d.ts.map +1 -1
- package/dist/inference/core/rule-loader.js +43 -132
- package/dist/inference/core/rule-loader.js.map +1 -1
- package/dist/inference/core/types.d.ts +0 -6
- package/dist/inference/core/types.d.ts.map +1 -1
- package/dist/inference/core/types.js +0 -4
- package/dist/inference/core/types.js.map +1 -1
- package/dist/inference/logical/generators/component-type-resolver.d.ts +0 -26
- package/dist/inference/logical/generators/component-type-resolver.d.ts.map +1 -1
- package/dist/inference/logical/generators/component-type-resolver.js +0 -19
- package/dist/inference/logical/generators/component-type-resolver.js.map +1 -1
- package/dist/inference/logical/generators/specialist-view-expander.d.ts +1 -17
- package/dist/inference/logical/generators/specialist-view-expander.d.ts.map +1 -1
- package/dist/inference/logical/generators/specialist-view-expander.js +0 -15
- package/dist/inference/logical/generators/specialist-view-expander.js.map +1 -1
- package/dist/inference/logical/generators/view-generator.d.ts +4 -14
- package/dist/inference/logical/generators/view-generator.d.ts.map +1 -1
- package/dist/inference/logical/generators/view-generator.js +6 -26
- package/dist/inference/logical/generators/view-generator.js.map +1 -1
- package/dist/inference/logical/index.d.ts +2 -2
- package/dist/inference/logical/index.d.ts.map +1 -1
- package/dist/inference/logical/logical-engine.d.ts.map +1 -1
- package/dist/inference/logical/logical-engine.js +17 -80
- package/dist/inference/logical/logical-engine.js.map +1 -1
- package/dist/inference/quint-transpiler.d.ts +5 -3
- package/dist/inference/quint-transpiler.d.ts.map +1 -1
- package/dist/inference/quint-transpiler.js +11 -6
- package/dist/inference/quint-transpiler.js.map +1 -1
- package/dist/libs/instance-factories/applications/templates/generic/main-generator.js +3 -3
- package/dist/libs/instance-factories/applications/templates/react/api-client-generator.js +16 -6
- package/dist/libs/instance-factories/applications/templates/react-starter/app-tsx-generator.js +110 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/dashboard-body-composer.js +121 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/detail-body-composer.js +78 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/form-body-composer.js +190 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/helpers-emitter.js +45 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/html-to-jsx.js +192 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/list-body-composer.js +46 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/orchestrator.js +30 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/package-json-generator.js +38 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/regen-safety.js +89 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/view-emitter.js +56 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/views-generator.js +66 -0
- package/dist/libs/instance-factories/cli/templates/commander/command-generator.js +14 -11
- package/dist/libs/instance-factories/controllers/templates/fastify/server-generator.js +11 -3
- package/dist/libs/instance-factories/services/templates/prisma/controller-generator.js +27 -17
- package/dist/libs/instance-factories/shared/path-resolver.js +1 -1
- package/dist/realize/index.d.ts.map +1 -1
- package/dist/realize/index.js +15 -22
- package/dist/realize/index.js.map +1 -1
- package/dist/registry/utils/manifest-adapter.d.ts +8 -1
- package/dist/registry/utils/manifest-adapter.d.ts.map +1 -1
- package/dist/registry/utils/manifest-adapter.js +8 -1
- package/dist/registry/utils/manifest-adapter.js.map +1 -1
- package/libs/instance-factories/applications/react-app-starter.yaml +150 -0
- package/libs/instance-factories/applications/templates/generic/main-generator.ts +3 -3
- package/libs/instance-factories/applications/templates/react/api-client-generator.ts +16 -6
- package/libs/instance-factories/applications/templates/react-starter/README.md +211 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/dashboard-body-composer.test.ts +153 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/detail-body-composer.test.ts +145 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/form-body-composer.test.ts +175 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/helpers-emitter.test.ts +55 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/html-to-jsx.test.ts +140 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/list-body-composer.test.ts +146 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/orchestrator.test.ts +163 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/parity-p2-factory-imports.test.ts +116 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/parity-p3-rendered-output.test.ts +183 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/regen-safety.test.ts +144 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/starter-generators.test.ts +114 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/view-emitter.test.ts +107 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/views-generator.test.ts +139 -0
- package/libs/instance-factories/applications/templates/react-starter/app-tsx-generator.ts +141 -0
- package/libs/instance-factories/applications/templates/react-starter/dashboard-body-composer.ts +174 -0
- package/libs/instance-factories/applications/templates/react-starter/detail-body-composer.ts +135 -0
- package/libs/instance-factories/applications/templates/react-starter/form-body-composer.ts +306 -0
- package/libs/instance-factories/applications/templates/react-starter/helpers-emitter.ts +60 -0
- package/libs/instance-factories/applications/templates/react-starter/html-to-jsx.ts +334 -0
- package/libs/instance-factories/applications/templates/react-starter/list-body-composer.ts +120 -0
- package/libs/instance-factories/applications/templates/react-starter/orchestrator.ts +80 -0
- package/libs/instance-factories/applications/templates/react-starter/package-json-generator.ts +57 -0
- package/libs/instance-factories/applications/templates/react-starter/regen-safety.ts +157 -0
- package/libs/instance-factories/applications/templates/react-starter/skeletons/dashboard.tsx.template +47 -0
- package/libs/instance-factories/applications/templates/react-starter/skeletons/detail.tsx.template +94 -0
- package/libs/instance-factories/applications/templates/react-starter/skeletons/form.tsx.template +114 -0
- package/libs/instance-factories/applications/templates/react-starter/skeletons/list.tsx.template +72 -0
- package/libs/instance-factories/applications/templates/react-starter/view-emitter.ts +151 -0
- package/libs/instance-factories/applications/templates/react-starter/views-generator.ts +137 -0
- package/libs/instance-factories/cli/templates/commander/command-generator.ts +14 -11
- package/libs/instance-factories/controllers/templates/fastify/server-generator.ts +11 -3
- package/libs/instance-factories/services/templates/prisma/controller-generator.ts +27 -17
- package/libs/instance-factories/shared/path-resolver.ts +8 -2
- package/package.json +3 -3
- package/dist/libs/instance-factories/applications/templates/react/_view-components-source.js +0 -530
- package/dist/libs/instance-factories/applications/templates/react/app-tsx-generator.js +0 -73
- package/dist/libs/instance-factories/applications/templates/react/field-helpers-generator.js +0 -99
- package/dist/libs/instance-factories/applications/templates/react/package-json-generator.js +0 -49
- package/dist/libs/instance-factories/applications/templates/react/pattern-adapter-generator.js +0 -156
- package/dist/libs/instance-factories/applications/templates/react/react-pattern-adapter.js +0 -935
- package/dist/libs/instance-factories/applications/templates/react/relationship-field-generator.js +0 -143
- package/dist/libs/instance-factories/applications/templates/react/tailwind-adapter-generator.js +0 -646
- package/dist/libs/instance-factories/applications/templates/react/tailwind-adapter-wrapper-generator.js +0 -65
- package/dist/libs/instance-factories/applications/templates/react/view-dashboard-generator.js +0 -143
- package/dist/libs/instance-factories/applications/templates/react/view-detail-generator.js +0 -143
- package/dist/libs/instance-factories/applications/templates/react/view-form-generator.js +0 -355
- package/dist/libs/instance-factories/applications/templates/react/view-list-generator.js +0 -91
- package/dist/libs/instance-factories/applications/templates/react/view-router-generator.js +0 -79
- package/dist/libs/instance-factories/tools/templates/vscode/vscode-extension-generator.js.bak +0 -244
- package/dist/libs/instance-factories/views/index.js +0 -48
- package/dist/libs/instance-factories/views/templates/react/adapters/antd-adapter.js +0 -742
- package/dist/libs/instance-factories/views/templates/react/adapters/mui-adapter.js +0 -824
- package/dist/libs/instance-factories/views/templates/react/adapters/shadcn-adapter.js +0 -719
- package/dist/libs/instance-factories/views/templates/react/app-generator.js +0 -45
- package/dist/libs/instance-factories/views/templates/react/components-generator.js +0 -820
- package/dist/libs/instance-factories/views/templates/react/forms-generator.js +0 -275
- package/dist/libs/instance-factories/views/templates/react/frontend-package-json-generator.js +0 -46
- package/dist/libs/instance-factories/views/templates/react/hooks-generator.js +0 -81
- package/dist/libs/instance-factories/views/templates/react/index-css-generator.js +0 -9
- package/dist/libs/instance-factories/views/templates/react/index-html-generator.js +0 -23
- package/dist/libs/instance-factories/views/templates/react/main-tsx-generator.js +0 -21
- package/dist/libs/instance-factories/views/templates/react/react-component-generator.js +0 -299
- package/dist/libs/instance-factories/views/templates/react/router-generator.js +0 -136
- package/dist/libs/instance-factories/views/templates/react/router-generic-generator.js +0 -107
- package/dist/libs/instance-factories/views/templates/react/shared-utils-generator.js +0 -187
- package/dist/libs/instance-factories/views/templates/react/spec-json-generator.js +0 -7
- package/dist/libs/instance-factories/views/templates/react/types-generator.js +0 -56
- package/dist/libs/instance-factories/views/templates/react/views-metadata-generator.js +0 -27
- package/dist/libs/instance-factories/views/templates/react/vite-config-generator.js +0 -29
- package/dist/libs/instance-factories/views/templates/runtime/runtime-view-renderer.js +0 -261
- package/dist/libs/instance-factories/views/templates/shared/adapter-types.js +0 -34
- package/dist/libs/instance-factories/views/templates/shared/atomic-components-registry.js +0 -800
- package/dist/libs/instance-factories/views/templates/shared/base-generator.js +0 -305
- package/dist/libs/instance-factories/views/templates/shared/component-metadata.js +0 -517
- package/dist/libs/instance-factories/views/templates/shared/composite-pattern-types.js +0 -0
- package/dist/libs/instance-factories/views/templates/shared/composite-patterns.js +0 -445
- package/dist/libs/instance-factories/views/templates/shared/index.js +0 -80
- package/dist/libs/instance-factories/views/templates/shared/pattern-validator.js +0 -210
- package/dist/libs/instance-factories/views/templates/shared/property-mapper.js +0 -492
- package/dist/libs/instance-factories/views/templates/shared/syntax-mapper.js +0 -321
- package/dist/realize/index.js.bak +0 -758
- package/libs/instance-factories/applications/react-app.yaml +0 -186
- package/libs/instance-factories/applications/templates/react/_view-components-source.ts +0 -555
- package/libs/instance-factories/applications/templates/react/app-tsx-generator.ts +0 -94
- package/libs/instance-factories/applications/templates/react/field-helpers-generator.ts +0 -106
- package/libs/instance-factories/applications/templates/react/package-json-generator.ts +0 -57
- package/libs/instance-factories/applications/templates/react/pattern-adapter-generator.ts +0 -179
- package/libs/instance-factories/applications/templates/react/react-pattern-adapter.tsx +0 -1347
- package/libs/instance-factories/applications/templates/react/relationship-field-generator.ts +0 -150
- package/libs/instance-factories/applications/templates/react/tailwind-adapter-generator.ts +0 -704
- package/libs/instance-factories/applications/templates/react/tailwind-adapter-wrapper-generator.ts +0 -84
- package/libs/instance-factories/applications/templates/react/view-dashboard-generator.ts +0 -150
- package/libs/instance-factories/applications/templates/react/view-detail-generator.ts +0 -150
- package/libs/instance-factories/applications/templates/react/view-form-generator.ts +0 -362
- package/libs/instance-factories/applications/templates/react/view-list-generator.ts +0 -98
- package/libs/instance-factories/applications/templates/react/view-router-generator.ts +0 -89
- package/libs/instance-factories/views/README.md +0 -62
- package/libs/instance-factories/views/index.d.ts +0 -13
- package/libs/instance-factories/views/index.d.ts.map +0 -1
- package/libs/instance-factories/views/index.js +0 -18
- package/libs/instance-factories/views/index.js.map +0 -1
- package/libs/instance-factories/views/index.ts +0 -45
- package/libs/instance-factories/views/react-components.yaml +0 -129
- package/libs/instance-factories/views/templates/ARCHITECTURE.md +0 -198
- package/libs/instance-factories/views/templates/react/adapters/antd-adapter.ts +0 -869
- package/libs/instance-factories/views/templates/react/adapters/mui-adapter.ts +0 -953
- package/libs/instance-factories/views/templates/react/adapters/shadcn-adapter.ts +0 -806
- package/libs/instance-factories/views/templates/react/app-generator.ts +0 -55
- package/libs/instance-factories/views/templates/react/components-generator.ts +0 -938
- package/libs/instance-factories/views/templates/react/forms-generator.ts +0 -325
- package/libs/instance-factories/views/templates/react/frontend-package-json-generator.ts +0 -57
- package/libs/instance-factories/views/templates/react/hooks-generator.ts +0 -106
- package/libs/instance-factories/views/templates/react/index-css-generator.ts +0 -14
- package/libs/instance-factories/views/templates/react/index-html-generator.ts +0 -34
- package/libs/instance-factories/views/templates/react/main-tsx-generator.ts +0 -29
- package/libs/instance-factories/views/templates/react/react-component-generator.d.ts +0 -152
- package/libs/instance-factories/views/templates/react/react-component-generator.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/react/react-component-generator.js +0 -398
- package/libs/instance-factories/views/templates/react/react-component-generator.js.map +0 -1
- package/libs/instance-factories/views/templates/react/react-component-generator.ts +0 -533
- package/libs/instance-factories/views/templates/react/router-generator.ts +0 -197
- package/libs/instance-factories/views/templates/react/router-generic-generator.ts +0 -132
- package/libs/instance-factories/views/templates/react/shared-utils-generator.ts +0 -196
- package/libs/instance-factories/views/templates/react/spec-json-generator.ts +0 -17
- package/libs/instance-factories/views/templates/react/types-generator.ts +0 -76
- package/libs/instance-factories/views/templates/react/views-metadata-generator.ts +0 -42
- package/libs/instance-factories/views/templates/react/vite-config-generator.ts +0 -38
- package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.js.map +0 -1
- package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.ts +0 -474
- package/libs/instance-factories/views/templates/shared/__tests__/composite-patterns.test.ts +0 -242
- package/libs/instance-factories/views/templates/shared/adapter-types.d.ts +0 -77
- package/libs/instance-factories/views/templates/shared/adapter-types.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/shared/adapter-types.js +0 -47
- package/libs/instance-factories/views/templates/shared/adapter-types.js.map +0 -1
- package/libs/instance-factories/views/templates/shared/adapter-types.ts +0 -142
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.d.ts +0 -63
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.js +0 -822
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.js.map +0 -1
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.ts +0 -908
- package/libs/instance-factories/views/templates/shared/base-generator.d.ts +0 -247
- package/libs/instance-factories/views/templates/shared/base-generator.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/shared/base-generator.js +0 -363
- package/libs/instance-factories/views/templates/shared/base-generator.js.map +0 -1
- package/libs/instance-factories/views/templates/shared/base-generator.ts +0 -608
- package/libs/instance-factories/views/templates/shared/component-metadata.d.ts +0 -254
- package/libs/instance-factories/views/templates/shared/component-metadata.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/shared/component-metadata.js +0 -602
- package/libs/instance-factories/views/templates/shared/component-metadata.js.map +0 -1
- package/libs/instance-factories/views/templates/shared/component-metadata.ts +0 -803
- package/libs/instance-factories/views/templates/shared/composite-pattern-types.ts +0 -250
- package/libs/instance-factories/views/templates/shared/composite-patterns.ts +0 -535
- package/libs/instance-factories/views/templates/shared/index.ts +0 -68
- package/libs/instance-factories/views/templates/shared/pattern-validator.ts +0 -279
- package/libs/instance-factories/views/templates/shared/property-mapper.d.ts +0 -149
- package/libs/instance-factories/views/templates/shared/property-mapper.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/shared/property-mapper.js +0 -580
- package/libs/instance-factories/views/templates/shared/property-mapper.js.map +0 -1
- package/libs/instance-factories/views/templates/shared/property-mapper.ts +0 -700
- package/libs/instance-factories/views/templates/shared/syntax-mapper.d.ts +0 -143
- package/libs/instance-factories/views/templates/shared/syntax-mapper.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/shared/syntax-mapper.js +0 -420
- package/libs/instance-factories/views/templates/shared/syntax-mapper.js.map +0 -1
- package/libs/instance-factories/views/templates/shared/syntax-mapper.ts +0 -539
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* View Instance Factories - Public API
|
|
3
|
-
*
|
|
4
|
-
* Exports all view generation and rendering components
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
// Shared components
|
|
8
|
-
export {
|
|
9
|
-
BaseComponentGenerator,
|
|
10
|
-
ViewSpec,
|
|
11
|
-
StateDefinition,
|
|
12
|
-
EventDefinition,
|
|
13
|
-
UIComponent,
|
|
14
|
-
RenderContext,
|
|
15
|
-
GeneratorConfig,
|
|
16
|
-
extractComponentTypes,
|
|
17
|
-
countComponents,
|
|
18
|
-
validateNestingDepth
|
|
19
|
-
} from './templates/shared/base-generator.js';
|
|
20
|
-
|
|
21
|
-
export * from './templates/shared/property-mapper.js';
|
|
22
|
-
export * from './templates/shared/syntax-mapper.js';
|
|
23
|
-
export * from './templates/shared/component-metadata.js';
|
|
24
|
-
export {
|
|
25
|
-
ATOMIC_COMPONENTS_REGISTRY,
|
|
26
|
-
AtomicComponentDefinition
|
|
27
|
-
} from './templates/shared/atomic-components-registry.js';
|
|
28
|
-
export {
|
|
29
|
-
ComponentAdapter,
|
|
30
|
-
ComponentLibraryAdapter,
|
|
31
|
-
ComponentMapping,
|
|
32
|
-
renderProps,
|
|
33
|
-
indent,
|
|
34
|
-
wrapWithChildren
|
|
35
|
-
} from './templates/shared/adapter-types.js';
|
|
36
|
-
|
|
37
|
-
// React generator
|
|
38
|
-
export * from './templates/react/react-component-generator.js';
|
|
39
|
-
|
|
40
|
-
// Runtime renderer - exported from @specverse/lang/views/runtime instead
|
|
41
|
-
// (not compiled with libs because it has React dependencies)
|
|
42
|
-
// export * from './templates/runtime/runtime-view-renderer.js';
|
|
43
|
-
|
|
44
|
-
// Adapters registry (when we add adapters)
|
|
45
|
-
// export * from './adapters/index.js';
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
name: ReactComponents
|
|
2
|
-
version: "1.0.0"
|
|
3
|
-
category: view
|
|
4
|
-
description: "React components for UI layer with TypeScript and modern hooks"
|
|
5
|
-
|
|
6
|
-
metadata:
|
|
7
|
-
author: "SpecVerse Team"
|
|
8
|
-
license: "MIT"
|
|
9
|
-
tags: [react, components, ui, view, typescript, hooks]
|
|
10
|
-
|
|
11
|
-
compatibility:
|
|
12
|
-
specverse: ">=3.3.0"
|
|
13
|
-
node: ">=18.0.0"
|
|
14
|
-
|
|
15
|
-
capabilities:
|
|
16
|
-
provides:
|
|
17
|
-
- "ui.components"
|
|
18
|
-
- "ui.views"
|
|
19
|
-
- "ui.forms"
|
|
20
|
-
requires:
|
|
21
|
-
- "api.rest" # Needs API endpoints for data fetching
|
|
22
|
-
|
|
23
|
-
technology:
|
|
24
|
-
runtime: "browser"
|
|
25
|
-
language: "typescript"
|
|
26
|
-
framework: "react"
|
|
27
|
-
version: "^18.2.0"
|
|
28
|
-
|
|
29
|
-
dependencies:
|
|
30
|
-
runtime:
|
|
31
|
-
- name: "react"
|
|
32
|
-
version: "^18.2.0"
|
|
33
|
-
- name: "react-dom"
|
|
34
|
-
version: "^18.2.0"
|
|
35
|
-
- name: "react-router-dom"
|
|
36
|
-
version: "^6.18.0"
|
|
37
|
-
- name: "@tanstack/react-query"
|
|
38
|
-
version: "^5.0.0"
|
|
39
|
-
- name: "react-hook-form"
|
|
40
|
-
version: "^7.48.0"
|
|
41
|
-
- name: "zod"
|
|
42
|
-
version: "^3.22.0"
|
|
43
|
-
- name: "@hookform/resolvers"
|
|
44
|
-
version: "^3.3.0"
|
|
45
|
-
|
|
46
|
-
dev:
|
|
47
|
-
- name: "@types/react"
|
|
48
|
-
version: "^18.2.0"
|
|
49
|
-
- name: "@types/react-dom"
|
|
50
|
-
version: "^18.2.0"
|
|
51
|
-
- name: "typescript"
|
|
52
|
-
version: "^5.2.0"
|
|
53
|
-
- name: "vite"
|
|
54
|
-
version: "^5.0.0"
|
|
55
|
-
- name: "@vitejs/plugin-react"
|
|
56
|
-
version: "^4.2.0"
|
|
57
|
-
|
|
58
|
-
codeTemplates:
|
|
59
|
-
# Component templates
|
|
60
|
-
components:
|
|
61
|
-
engine: typescript
|
|
62
|
-
generator: "libs/instance-factories/views/templates/react/components-generator.ts"
|
|
63
|
-
outputPattern: "{frontendDir}/src/components/{view.name}.tsx"
|
|
64
|
-
|
|
65
|
-
forms:
|
|
66
|
-
engine: typescript
|
|
67
|
-
generator: "libs/instance-factories/views/templates/react/forms-generator.ts"
|
|
68
|
-
outputPattern: "{frontendDir}/src/components/forms/{model}Form.tsx"
|
|
69
|
-
|
|
70
|
-
hooks:
|
|
71
|
-
engine: typescript
|
|
72
|
-
generator: "libs/instance-factories/views/templates/react/hooks-generator.ts"
|
|
73
|
-
outputPattern: "{frontendDir}/src/hooks/use{model}.ts"
|
|
74
|
-
|
|
75
|
-
types:
|
|
76
|
-
engine: typescript
|
|
77
|
-
generator: "libs/instance-factories/views/templates/react/types-generator.ts"
|
|
78
|
-
outputPattern: "{frontendDir}/src/types/{model}.ts"
|
|
79
|
-
|
|
80
|
-
# Infrastructure templates (NEW)
|
|
81
|
-
indexHtml:
|
|
82
|
-
engine: typescript
|
|
83
|
-
generator: "libs/instance-factories/views/templates/react/index-html-generator.ts"
|
|
84
|
-
outputPattern: "{frontendDir}/index.html"
|
|
85
|
-
|
|
86
|
-
app:
|
|
87
|
-
engine: typescript
|
|
88
|
-
generator: "libs/instance-factories/views/templates/react/app-generator.ts"
|
|
89
|
-
outputPattern: "{frontendDir}/src/App.tsx"
|
|
90
|
-
|
|
91
|
-
mainTsx:
|
|
92
|
-
engine: typescript
|
|
93
|
-
generator: "libs/instance-factories/views/templates/react/main-tsx-generator.ts"
|
|
94
|
-
outputPattern: "{frontendDir}/src/main.tsx"
|
|
95
|
-
|
|
96
|
-
viteConfig:
|
|
97
|
-
engine: typescript
|
|
98
|
-
generator: "libs/instance-factories/views/templates/react/vite-config-generator.ts"
|
|
99
|
-
outputPattern: "{frontendDir}/vite.config.ts"
|
|
100
|
-
|
|
101
|
-
router:
|
|
102
|
-
engine: typescript
|
|
103
|
-
generator: "libs/instance-factories/views/templates/react/router-generator.ts"
|
|
104
|
-
outputPattern: "{frontendDir}/src/router.tsx"
|
|
105
|
-
|
|
106
|
-
indexCss:
|
|
107
|
-
engine: typescript
|
|
108
|
-
generator: "libs/instance-factories/views/templates/react/index-css-generator.ts"
|
|
109
|
-
outputPattern: "{frontendDir}/src/index.css"
|
|
110
|
-
|
|
111
|
-
configuration:
|
|
112
|
-
outputStructure: "monorepo"
|
|
113
|
-
frontendDir: "frontend"
|
|
114
|
-
|
|
115
|
-
styling:
|
|
116
|
-
framework: "tailwindcss"
|
|
117
|
-
classNaming: "bem"
|
|
118
|
-
|
|
119
|
-
state:
|
|
120
|
-
management: "react-query"
|
|
121
|
-
caching: true
|
|
122
|
-
|
|
123
|
-
forms:
|
|
124
|
-
validation: "zod"
|
|
125
|
-
errorHandling: "inline"
|
|
126
|
-
|
|
127
|
-
routing:
|
|
128
|
-
library: "react-router"
|
|
129
|
-
version: "^6.18.0"
|
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
# View Templates Architecture
|
|
2
|
-
|
|
3
|
-
**Purpose**: Transform inferred SpecVerse view specifications into framework-specific UI code.
|
|
4
|
-
|
|
5
|
-
## Directory Structure
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
templates/
|
|
9
|
-
├── shared/ # Framework-agnostic (universal)
|
|
10
|
-
│ ├── atomic-components-registry.ts # All 49 atomic component type definitions
|
|
11
|
-
│ └── adapter-types.ts # ComponentLibraryAdapter interface
|
|
12
|
-
│
|
|
13
|
-
├── react/ # React framework
|
|
14
|
-
│ ├── components-generator.ts # Legacy generator (v1)
|
|
15
|
-
│ ├── components-generator-v2.ts # NEW: Uses adapters + atomic components
|
|
16
|
-
│ ├── forms-generator.ts
|
|
17
|
-
│ ├── hooks-generator.ts
|
|
18
|
-
│ ├── types-generator.ts
|
|
19
|
-
│ └── adapters/ # React UI library adapters
|
|
20
|
-
│ ├── shadcn-adapter.ts # shadcn/ui components
|
|
21
|
-
│ ├── mui-adapter.ts # Material-UI components
|
|
22
|
-
│ └── antd-adapter.ts # Ant Design components
|
|
23
|
-
│
|
|
24
|
-
├── vue/ # Vue framework (FUTURE)
|
|
25
|
-
│ ├── components-generator.ts
|
|
26
|
-
│ └── adapters/
|
|
27
|
-
│ ├── vuetify-adapter.ts
|
|
28
|
-
│ ├── element-plus-adapter.ts
|
|
29
|
-
│ └── primevue-adapter.ts
|
|
30
|
-
│
|
|
31
|
-
├── angular/ # Angular framework (FUTURE)
|
|
32
|
-
│ ├── components-generator.ts
|
|
33
|
-
│ └── adapters/
|
|
34
|
-
│ ├── angular-material-adapter.ts
|
|
35
|
-
│ └── primeng-adapter.ts
|
|
36
|
-
│
|
|
37
|
-
└── svelte/ # Svelte framework (FUTURE)
|
|
38
|
-
├── components-generator.ts
|
|
39
|
-
└── adapters/
|
|
40
|
-
└── svelteui-adapter.ts
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Architecture Principles
|
|
44
|
-
|
|
45
|
-
### 1. Framework-Agnostic Core
|
|
46
|
-
|
|
47
|
-
**`shared/atomic-components-registry.ts`**
|
|
48
|
-
- Defines all 49 atomic component types from SpecVerse v3.4.0 schema
|
|
49
|
-
- Each component has: type, name, category, description, properties, canHaveChildren
|
|
50
|
-
- **Universal** - same definitions used across React, Vue, Angular, Svelte
|
|
51
|
-
|
|
52
|
-
**`shared/adapter-types.ts`**
|
|
53
|
-
- Defines `ComponentLibraryAdapter` interface
|
|
54
|
-
- Defines `ComponentMapping` interface
|
|
55
|
-
- Defines `RenderContext` interface
|
|
56
|
-
- **Universal** - any framework can implement these interfaces
|
|
57
|
-
|
|
58
|
-
### 2. Framework-Specific Generators
|
|
59
|
-
|
|
60
|
-
Each framework has its own generator that:
|
|
61
|
-
- Reads inferred SpecVerse views (with `uiComponents`)
|
|
62
|
-
- Selects appropriate adapter based on config
|
|
63
|
-
- Generates framework-specific code using adapter
|
|
64
|
-
|
|
65
|
-
**Example: React**
|
|
66
|
-
- `react/components-generator-v2.ts` generates `.tsx` files
|
|
67
|
-
- Uses React hooks, JSX syntax, React patterns
|
|
68
|
-
- Imports from `@/components/ui` (shadcn), `@mui/material` (MUI), or `antd`
|
|
69
|
-
|
|
70
|
-
**Future: Vue**
|
|
71
|
-
- `vue/components-generator.ts` generates `.vue` files
|
|
72
|
-
- Uses Vue Composition API, Vue template syntax
|
|
73
|
-
- Imports from Vuetify, Element Plus, or PrimeVue
|
|
74
|
-
|
|
75
|
-
### 3. UI Library Adapters
|
|
76
|
-
|
|
77
|
-
Each adapter implements `ComponentLibraryAdapter` interface and maps all 49 atomic types to specific library components.
|
|
78
|
-
|
|
79
|
-
**React + shadcn/ui** (`react/adapters/shadcn-adapter.ts`):
|
|
80
|
-
```typescript
|
|
81
|
-
table: {
|
|
82
|
-
imports: ["import { Table, TableBody, ... } from '@/components/ui/table'"],
|
|
83
|
-
render: (ctx) => `<Table>...</Table>`
|
|
84
|
-
}
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
**React + Material-UI** (`react/adapters/mui-adapter.ts`):
|
|
88
|
-
```typescript
|
|
89
|
-
table: {
|
|
90
|
-
imports: ["import { Table, TableBody, ... } from '@mui/material'"],
|
|
91
|
-
render: (ctx) => `<Table>...</Table>`
|
|
92
|
-
}
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
**Vue + Vuetify** (`vue/adapters/vuetify-adapter.ts`):
|
|
96
|
-
```typescript
|
|
97
|
-
table: {
|
|
98
|
-
imports: ["import { VDataTable } from 'vuetify/components'"],
|
|
99
|
-
render: (ctx) => `<v-data-table>...</v-data-table>`
|
|
100
|
-
}
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
## Data Flow
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
┌─────────────────────────────────────────────────────────────────┐
|
|
107
|
-
│ 1. INFERRED SPEC (from inference engine) │
|
|
108
|
-
│ views: │
|
|
109
|
-
│ TaskListView: │
|
|
110
|
-
│ type: list │
|
|
111
|
-
│ uiComponents: │
|
|
112
|
-
│ taskTable: { type: table, columns: [...] } │
|
|
113
|
-
├─────────────────────────────────────────────────────────────────┤
|
|
114
|
-
│ 2. ATOMIC REGISTRY (framework-agnostic) │
|
|
115
|
-
│ ATOMIC_COMPONENTS_REGISTRY['table']: │
|
|
116
|
-
│ - type: 'table' │
|
|
117
|
-
│ - category: 'data-display' │
|
|
118
|
-
│ - properties: ['columns', 'sortable', ...] │
|
|
119
|
-
├─────────────────────────────────────────────────────────────────┤
|
|
120
|
-
│ 3. GENERATOR (framework-specific) │
|
|
121
|
-
│ react/components-generator-v2.ts: │
|
|
122
|
-
│ - Reads uiComponents │
|
|
123
|
-
│ - Selects adapter (shadcn/mui/antd) │
|
|
124
|
-
│ - Calls adapter.components['table'].render() │
|
|
125
|
-
├─────────────────────────────────────────────────────────────────┤
|
|
126
|
-
│ 4. ADAPTER (library-specific) │
|
|
127
|
-
│ react/adapters/shadcn-adapter.ts: │
|
|
128
|
-
│ - Returns: <Table><TableBody>...</TableBody></Table> │
|
|
129
|
-
│ - With proper imports, props, styling │
|
|
130
|
-
├─────────────────────────────────────────────────────────────────┤
|
|
131
|
-
│ 5. GENERATED CODE (framework + library code) │
|
|
132
|
-
│ frontend/src/components/TaskListView.tsx │
|
|
133
|
-
│ - import { Table } from '@/components/ui/table' │
|
|
134
|
-
│ - React component using shadcn/ui Table │
|
|
135
|
-
└─────────────────────────────────────────────────────────────────┘
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
## Why This Architecture?
|
|
139
|
-
|
|
140
|
-
### ✅ Framework Agnostic
|
|
141
|
-
- Atomic registry is universal
|
|
142
|
-
- Support React, Vue, Angular, Svelte from same specs
|
|
143
|
-
- Add new frameworks by implementing generator + adapters
|
|
144
|
-
|
|
145
|
-
### ✅ UI Library Agnostic
|
|
146
|
-
- Each framework supports multiple UI libraries
|
|
147
|
-
- React: shadcn, MUI, Ant Design, Chakra UI, etc.
|
|
148
|
-
- Vue: Vuetify, Element Plus, PrimeVue, etc.
|
|
149
|
-
- Users choose their preferred library
|
|
150
|
-
|
|
151
|
-
### ✅ Maintainable
|
|
152
|
-
- Change atomic component definition in ONE place (shared registry)
|
|
153
|
-
- Update adapter for library changes (e.g., shadcn/ui v2 → v3)
|
|
154
|
-
- No duplication across frameworks
|
|
155
|
-
|
|
156
|
-
### ✅ Extensible
|
|
157
|
-
- Add new atomic component type → update registry + all adapters
|
|
158
|
-
- Add new UI library → create new adapter
|
|
159
|
-
- Add new framework → create generator + adapters
|
|
160
|
-
|
|
161
|
-
## Current Status (Phase 3.5.1)
|
|
162
|
-
|
|
163
|
-
**✅ Complete**:
|
|
164
|
-
- `shared/atomic-components-registry.ts` - All 49 types defined
|
|
165
|
-
- `shared/adapter-types.ts` - Adapter interfaces
|
|
166
|
-
- `react/adapters/shadcn-adapter.ts` - Complete React + shadcn/ui adapter
|
|
167
|
-
|
|
168
|
-
**⏳ In Progress**:
|
|
169
|
-
- `react/adapters/mui-adapter.ts` - React + Material-UI
|
|
170
|
-
- `react/adapters/antd-adapter.ts` - React + Ant Design
|
|
171
|
-
- `react/components-generator-v2.ts` - Generator using adapters
|
|
172
|
-
|
|
173
|
-
**📅 Future**:
|
|
174
|
-
- Vue framework support
|
|
175
|
-
- Angular framework support
|
|
176
|
-
- Svelte framework support
|
|
177
|
-
- Additional UI libraries for each framework
|
|
178
|
-
|
|
179
|
-
## Configuration Example
|
|
180
|
-
|
|
181
|
-
Users specify framework and library in manifest:
|
|
182
|
-
|
|
183
|
-
```yaml
|
|
184
|
-
# manifests/implementation.yaml
|
|
185
|
-
instanceFactories:
|
|
186
|
-
- name: "ReactShadcnUI"
|
|
187
|
-
source: "@specverse/lang/libs/instance-factories/views/react-components.yaml"
|
|
188
|
-
config:
|
|
189
|
-
framework: "react" # Could be: react, vue, angular, svelte
|
|
190
|
-
uiLibrary: "shadcn/ui" # Could be: shadcn/ui, mui, antd (for React)
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
Generator loads appropriate adapter and generates framework+library-specific code.
|
|
194
|
-
|
|
195
|
-
---
|
|
196
|
-
|
|
197
|
-
**Last Updated**: 2025-11-05
|
|
198
|
-
**Part of**: v3.4.0 Phase 3.5 - Instance Factories for View Components
|