@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,445 +0,0 @@
|
|
|
1
|
-
const FORM_VIEW_PATTERN = {
|
|
2
|
-
// Identity
|
|
3
|
-
id: "form-view",
|
|
4
|
-
name: "FormView",
|
|
5
|
-
version: "1.0.0",
|
|
6
|
-
description: "Data entry form for creating or updating entities with validation and field rendering",
|
|
7
|
-
// Metadata
|
|
8
|
-
category: "data-entry",
|
|
9
|
-
tags: ["form", "crud", "data-entry", "validation", "create", "update"],
|
|
10
|
-
// Composition
|
|
11
|
-
requiredAtomicComponents: [
|
|
12
|
-
"form",
|
|
13
|
-
"input",
|
|
14
|
-
"button"
|
|
15
|
-
],
|
|
16
|
-
optionalAtomicComponents: [
|
|
17
|
-
"select",
|
|
18
|
-
"textarea",
|
|
19
|
-
"checkbox",
|
|
20
|
-
"radio",
|
|
21
|
-
"label",
|
|
22
|
-
"error-message",
|
|
23
|
-
"fieldset",
|
|
24
|
-
"legend"
|
|
25
|
-
],
|
|
26
|
-
// Layout
|
|
27
|
-
layoutStrategy: {
|
|
28
|
-
type: "single-column",
|
|
29
|
-
responsive: true,
|
|
30
|
-
sections: [
|
|
31
|
-
{
|
|
32
|
-
id: "fields",
|
|
33
|
-
title: "Form Fields",
|
|
34
|
-
layout: {
|
|
35
|
-
type: "single-column",
|
|
36
|
-
gap: "medium"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
id: "actions",
|
|
41
|
-
title: "Actions",
|
|
42
|
-
layout: {
|
|
43
|
-
type: "flex",
|
|
44
|
-
gap: "small"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
]
|
|
48
|
-
},
|
|
49
|
-
// Data Bindings
|
|
50
|
-
dataBindings: {
|
|
51
|
-
source: "controller",
|
|
52
|
-
operations: [
|
|
53
|
-
{
|
|
54
|
-
operation: "create",
|
|
55
|
-
returns: "entity",
|
|
56
|
-
optimistic: false,
|
|
57
|
-
cache: { enabled: false }
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
operation: "update",
|
|
61
|
-
params: ["id"],
|
|
62
|
-
returns: "entity",
|
|
63
|
-
optimistic: true,
|
|
64
|
-
cache: { enabled: false }
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
operation: "validate",
|
|
68
|
-
returns: "validation-result",
|
|
69
|
-
optimistic: false,
|
|
70
|
-
cache: { enabled: false }
|
|
71
|
-
}
|
|
72
|
-
],
|
|
73
|
-
relationships: []
|
|
74
|
-
},
|
|
75
|
-
// Behavior
|
|
76
|
-
supportedOperations: ["create", "update", "validate"],
|
|
77
|
-
eventHandlers: [
|
|
78
|
-
{
|
|
79
|
-
event: "submit",
|
|
80
|
-
operation: "create",
|
|
81
|
-
validate: true
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
event: "submit",
|
|
85
|
-
operation: "update",
|
|
86
|
-
validate: true
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
event: "blur",
|
|
90
|
-
operation: "validate",
|
|
91
|
-
validate: false
|
|
92
|
-
}
|
|
93
|
-
],
|
|
94
|
-
// State Management
|
|
95
|
-
state: {
|
|
96
|
-
fields: ["formData", "errors", "touched", "isSubmitting"],
|
|
97
|
-
persistence: "none"
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
const LIST_VIEW_PATTERN = {
|
|
101
|
-
// Identity
|
|
102
|
-
id: "list-view",
|
|
103
|
-
name: "ListView",
|
|
104
|
-
version: "1.0.0",
|
|
105
|
-
description: "Data display for collections with filtering, sorting, and pagination support",
|
|
106
|
-
// Metadata
|
|
107
|
-
category: "data-display",
|
|
108
|
-
tags: ["list", "table", "collection", "data-display", "pagination", "filtering"],
|
|
109
|
-
// Composition
|
|
110
|
-
requiredAtomicComponents: [
|
|
111
|
-
"table",
|
|
112
|
-
"list"
|
|
113
|
-
],
|
|
114
|
-
optionalAtomicComponents: [
|
|
115
|
-
"card",
|
|
116
|
-
"badge",
|
|
117
|
-
"button",
|
|
118
|
-
"input",
|
|
119
|
-
"select",
|
|
120
|
-
"pagination",
|
|
121
|
-
"search",
|
|
122
|
-
"filter"
|
|
123
|
-
],
|
|
124
|
-
// Layout
|
|
125
|
-
layoutStrategy: {
|
|
126
|
-
type: "flex",
|
|
127
|
-
responsive: true,
|
|
128
|
-
direction: "column",
|
|
129
|
-
sections: [
|
|
130
|
-
{
|
|
131
|
-
id: "toolbar",
|
|
132
|
-
title: "Toolbar",
|
|
133
|
-
fields: ["search", "filters", "actions"],
|
|
134
|
-
layout: {
|
|
135
|
-
type: "flex",
|
|
136
|
-
gap: "medium"
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
id: "content",
|
|
141
|
-
title: "Content",
|
|
142
|
-
layout: {
|
|
143
|
-
type: "single-column"
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
id: "pagination",
|
|
148
|
-
title: "Pagination",
|
|
149
|
-
layout: {
|
|
150
|
-
type: "flex",
|
|
151
|
-
gap: "small"
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
]
|
|
155
|
-
},
|
|
156
|
-
// Data Bindings
|
|
157
|
-
dataBindings: {
|
|
158
|
-
source: "controller",
|
|
159
|
-
operations: [
|
|
160
|
-
{
|
|
161
|
-
operation: "retrieve_many",
|
|
162
|
-
returns: "entity-array",
|
|
163
|
-
optimistic: false,
|
|
164
|
-
cache: {
|
|
165
|
-
enabled: true,
|
|
166
|
-
ttl: 300,
|
|
167
|
-
key: "list-{modelName}-{filters}"
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
],
|
|
171
|
-
relationships: []
|
|
172
|
-
},
|
|
173
|
-
// Behavior
|
|
174
|
-
supportedOperations: ["retrieve_many"],
|
|
175
|
-
eventHandlers: [
|
|
176
|
-
{
|
|
177
|
-
event: "search",
|
|
178
|
-
operation: "retrieve_many",
|
|
179
|
-
validate: false
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
event: "filter",
|
|
183
|
-
operation: "retrieve_many",
|
|
184
|
-
validate: false
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
event: "sort",
|
|
188
|
-
operation: "retrieve_many",
|
|
189
|
-
validate: false
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
event: "paginate",
|
|
193
|
-
operation: "retrieve_many",
|
|
194
|
-
validate: false
|
|
195
|
-
}
|
|
196
|
-
],
|
|
197
|
-
// State Management
|
|
198
|
-
state: {
|
|
199
|
-
fields: ["entities", "filters", "sort", "pagination", "loading"],
|
|
200
|
-
persistence: "session"
|
|
201
|
-
}
|
|
202
|
-
};
|
|
203
|
-
const DETAIL_VIEW_PATTERN = {
|
|
204
|
-
// Identity
|
|
205
|
-
id: "detail-view",
|
|
206
|
-
name: "DetailView",
|
|
207
|
-
version: "1.0.0",
|
|
208
|
-
description: "Single entity detail display with edit and delete actions",
|
|
209
|
-
// Metadata
|
|
210
|
-
category: "data-display",
|
|
211
|
-
tags: ["detail", "view", "entity", "display", "read-only"],
|
|
212
|
-
// Composition
|
|
213
|
-
requiredAtomicComponents: [
|
|
214
|
-
"card",
|
|
215
|
-
"container"
|
|
216
|
-
],
|
|
217
|
-
optionalAtomicComponents: [
|
|
218
|
-
"badge",
|
|
219
|
-
"button",
|
|
220
|
-
"tabs",
|
|
221
|
-
"card",
|
|
222
|
-
"list",
|
|
223
|
-
"table"
|
|
224
|
-
],
|
|
225
|
-
// Layout
|
|
226
|
-
layoutStrategy: {
|
|
227
|
-
type: "single-column",
|
|
228
|
-
responsive: true,
|
|
229
|
-
sections: [
|
|
230
|
-
{
|
|
231
|
-
id: "header",
|
|
232
|
-
title: "Header",
|
|
233
|
-
fields: ["title", "status", "actions"],
|
|
234
|
-
layout: {
|
|
235
|
-
type: "flex",
|
|
236
|
-
gap: "medium"
|
|
237
|
-
}
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
id: "main",
|
|
241
|
-
title: "Main Content",
|
|
242
|
-
layout: {
|
|
243
|
-
type: "two-column",
|
|
244
|
-
columns: 2,
|
|
245
|
-
gap: "large"
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
id: "relationships",
|
|
250
|
-
title: "Related Data",
|
|
251
|
-
layout: {
|
|
252
|
-
type: "grid",
|
|
253
|
-
columns: 2,
|
|
254
|
-
gap: "medium"
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
]
|
|
258
|
-
},
|
|
259
|
-
// Data Bindings
|
|
260
|
-
dataBindings: {
|
|
261
|
-
source: "controller",
|
|
262
|
-
operations: [
|
|
263
|
-
{
|
|
264
|
-
operation: "retrieve",
|
|
265
|
-
params: ["id"],
|
|
266
|
-
returns: "entity",
|
|
267
|
-
optimistic: false,
|
|
268
|
-
cache: {
|
|
269
|
-
enabled: true,
|
|
270
|
-
ttl: 300,
|
|
271
|
-
key: "detail-{modelName}-{id}"
|
|
272
|
-
}
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
operation: "update",
|
|
276
|
-
params: ["id"],
|
|
277
|
-
returns: "entity",
|
|
278
|
-
optimistic: true,
|
|
279
|
-
cache: { enabled: false }
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
operation: "delete",
|
|
283
|
-
params: ["id"],
|
|
284
|
-
returns: "void",
|
|
285
|
-
optimistic: false,
|
|
286
|
-
cache: { enabled: false }
|
|
287
|
-
}
|
|
288
|
-
],
|
|
289
|
-
relationships: []
|
|
290
|
-
},
|
|
291
|
-
// Behavior
|
|
292
|
-
supportedOperations: ["retrieve", "update", "delete"],
|
|
293
|
-
eventHandlers: [
|
|
294
|
-
{
|
|
295
|
-
event: "edit",
|
|
296
|
-
operation: "update",
|
|
297
|
-
validate: true
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
event: "delete",
|
|
301
|
-
operation: "delete",
|
|
302
|
-
validate: false,
|
|
303
|
-
confirm: {
|
|
304
|
-
title: "Confirm Delete",
|
|
305
|
-
message: "Are you sure you want to delete this item?"
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
],
|
|
309
|
-
// State Management
|
|
310
|
-
state: {
|
|
311
|
-
fields: ["entity", "loading", "error", "editMode"],
|
|
312
|
-
persistence: "none"
|
|
313
|
-
}
|
|
314
|
-
};
|
|
315
|
-
const DASHBOARD_VIEW_PATTERN = {
|
|
316
|
-
// Identity
|
|
317
|
-
id: "dashboard-view",
|
|
318
|
-
name: "DashboardView",
|
|
319
|
-
version: "1.0.0",
|
|
320
|
-
description: "Multi-section dashboard with metrics, charts, and data summaries",
|
|
321
|
-
// Metadata
|
|
322
|
-
category: "dashboard",
|
|
323
|
-
tags: ["dashboard", "overview", "metrics", "analytics", "summary"],
|
|
324
|
-
// Composition
|
|
325
|
-
requiredAtomicComponents: [
|
|
326
|
-
"grid",
|
|
327
|
-
"card"
|
|
328
|
-
],
|
|
329
|
-
optionalAtomicComponents: [
|
|
330
|
-
"chart",
|
|
331
|
-
"metric",
|
|
332
|
-
"table",
|
|
333
|
-
"list",
|
|
334
|
-
"badge",
|
|
335
|
-
"progress",
|
|
336
|
-
"stat"
|
|
337
|
-
],
|
|
338
|
-
// Layout
|
|
339
|
-
layoutStrategy: {
|
|
340
|
-
type: "grid",
|
|
341
|
-
responsive: true,
|
|
342
|
-
columns: 12,
|
|
343
|
-
sections: [
|
|
344
|
-
{
|
|
345
|
-
id: "metrics",
|
|
346
|
-
title: "Key Metrics",
|
|
347
|
-
layout: {
|
|
348
|
-
type: "grid",
|
|
349
|
-
columns: 4,
|
|
350
|
-
gap: "medium"
|
|
351
|
-
}
|
|
352
|
-
},
|
|
353
|
-
{
|
|
354
|
-
id: "charts",
|
|
355
|
-
title: "Charts",
|
|
356
|
-
layout: {
|
|
357
|
-
type: "grid",
|
|
358
|
-
columns: 2,
|
|
359
|
-
gap: "large"
|
|
360
|
-
}
|
|
361
|
-
},
|
|
362
|
-
{
|
|
363
|
-
id: "recent-activity",
|
|
364
|
-
title: "Recent Activity",
|
|
365
|
-
layout: {
|
|
366
|
-
type: "single-column",
|
|
367
|
-
gap: "small"
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
]
|
|
371
|
-
},
|
|
372
|
-
// Data Bindings
|
|
373
|
-
dataBindings: {
|
|
374
|
-
source: "service",
|
|
375
|
-
operations: [
|
|
376
|
-
{
|
|
377
|
-
operation: "retrieve_many",
|
|
378
|
-
returns: "entity-array",
|
|
379
|
-
optimistic: false,
|
|
380
|
-
cache: {
|
|
381
|
-
enabled: true,
|
|
382
|
-
ttl: 600,
|
|
383
|
-
key: "dashboard-{component}"
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
],
|
|
387
|
-
relationships: []
|
|
388
|
-
},
|
|
389
|
-
// Behavior
|
|
390
|
-
supportedOperations: ["retrieve_many"],
|
|
391
|
-
eventHandlers: [
|
|
392
|
-
{
|
|
393
|
-
event: "refresh",
|
|
394
|
-
operation: "retrieve_many",
|
|
395
|
-
validate: false
|
|
396
|
-
}
|
|
397
|
-
],
|
|
398
|
-
// State Management
|
|
399
|
-
state: {
|
|
400
|
-
fields: ["metrics", "charts", "recentActivity", "loading", "lastUpdate"],
|
|
401
|
-
persistence: "session"
|
|
402
|
-
},
|
|
403
|
-
// Customization
|
|
404
|
-
customization: {
|
|
405
|
-
allowedOverrides: ["layoutStrategy", "sections", "metrics"],
|
|
406
|
-
requiredOverrides: []
|
|
407
|
-
}
|
|
408
|
-
};
|
|
409
|
-
const COMPOSITE_VIEW_PATTERNS = {
|
|
410
|
-
"form-view": FORM_VIEW_PATTERN,
|
|
411
|
-
"list-view": LIST_VIEW_PATTERN,
|
|
412
|
-
"detail-view": DETAIL_VIEW_PATTERN,
|
|
413
|
-
"dashboard-view": DASHBOARD_VIEW_PATTERN
|
|
414
|
-
};
|
|
415
|
-
function getPattern(id) {
|
|
416
|
-
return COMPOSITE_VIEW_PATTERNS[id];
|
|
417
|
-
}
|
|
418
|
-
function getPatternsByCategory(category) {
|
|
419
|
-
return Object.values(COMPOSITE_VIEW_PATTERNS).filter(
|
|
420
|
-
(pattern) => pattern.category === category
|
|
421
|
-
);
|
|
422
|
-
}
|
|
423
|
-
function getPatternsByTag(tag) {
|
|
424
|
-
return Object.values(COMPOSITE_VIEW_PATTERNS).filter(
|
|
425
|
-
(pattern) => pattern.tags.includes(tag)
|
|
426
|
-
);
|
|
427
|
-
}
|
|
428
|
-
function getPatternIds() {
|
|
429
|
-
return Object.keys(COMPOSITE_VIEW_PATTERNS);
|
|
430
|
-
}
|
|
431
|
-
function hasPattern(id) {
|
|
432
|
-
return id in COMPOSITE_VIEW_PATTERNS;
|
|
433
|
-
}
|
|
434
|
-
export {
|
|
435
|
-
COMPOSITE_VIEW_PATTERNS,
|
|
436
|
-
DASHBOARD_VIEW_PATTERN,
|
|
437
|
-
DETAIL_VIEW_PATTERN,
|
|
438
|
-
FORM_VIEW_PATTERN,
|
|
439
|
-
LIST_VIEW_PATTERN,
|
|
440
|
-
getPattern,
|
|
441
|
-
getPatternIds,
|
|
442
|
-
getPatternsByCategory,
|
|
443
|
-
getPatternsByTag,
|
|
444
|
-
hasPattern
|
|
445
|
-
};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ATOMIC_COMPONENTS_REGISTRY,
|
|
3
|
-
AtomicComponentDefinition
|
|
4
|
-
} from "./atomic-components-registry.js";
|
|
5
|
-
export * from "./component-metadata.js";
|
|
6
|
-
import {
|
|
7
|
-
ComponentAdapter,
|
|
8
|
-
ComponentLibraryAdapter,
|
|
9
|
-
ComponentMapping,
|
|
10
|
-
RenderContext,
|
|
11
|
-
renderProps,
|
|
12
|
-
indent,
|
|
13
|
-
wrapWithChildren
|
|
14
|
-
} from "./adapter-types.js";
|
|
15
|
-
export * from "./property-mapper.js";
|
|
16
|
-
export * from "./syntax-mapper.js";
|
|
17
|
-
import {
|
|
18
|
-
BaseComponentGenerator,
|
|
19
|
-
ViewSpec,
|
|
20
|
-
StateDefinition,
|
|
21
|
-
EventDefinition,
|
|
22
|
-
UIComponent,
|
|
23
|
-
RenderContext as RenderContext2,
|
|
24
|
-
GeneratorConfig,
|
|
25
|
-
extractComponentTypes,
|
|
26
|
-
countComponents,
|
|
27
|
-
validateNestingDepth
|
|
28
|
-
} from "./base-generator.js";
|
|
29
|
-
export * from "./composite-pattern-types.js";
|
|
30
|
-
import {
|
|
31
|
-
COMPOSITE_VIEW_PATTERNS,
|
|
32
|
-
FORM_VIEW_PATTERN,
|
|
33
|
-
LIST_VIEW_PATTERN,
|
|
34
|
-
DETAIL_VIEW_PATTERN,
|
|
35
|
-
DASHBOARD_VIEW_PATTERN,
|
|
36
|
-
getPattern,
|
|
37
|
-
getPatternsByCategory,
|
|
38
|
-
getPatternsByTag,
|
|
39
|
-
getPatternIds,
|
|
40
|
-
hasPattern
|
|
41
|
-
} from "./composite-patterns.js";
|
|
42
|
-
import {
|
|
43
|
-
validatePattern,
|
|
44
|
-
validatePatternRegistry,
|
|
45
|
-
getValidationSummary
|
|
46
|
-
} from "./pattern-validator.js";
|
|
47
|
-
export {
|
|
48
|
-
ATOMIC_COMPONENTS_REGISTRY,
|
|
49
|
-
AtomicComponentDefinition,
|
|
50
|
-
BaseComponentGenerator,
|
|
51
|
-
COMPOSITE_VIEW_PATTERNS,
|
|
52
|
-
ComponentAdapter,
|
|
53
|
-
ComponentLibraryAdapter,
|
|
54
|
-
ComponentMapping,
|
|
55
|
-
DASHBOARD_VIEW_PATTERN,
|
|
56
|
-
DETAIL_VIEW_PATTERN,
|
|
57
|
-
EventDefinition,
|
|
58
|
-
FORM_VIEW_PATTERN,
|
|
59
|
-
GeneratorConfig,
|
|
60
|
-
RenderContext2 as GeneratorRenderContext,
|
|
61
|
-
LIST_VIEW_PATTERN,
|
|
62
|
-
RenderContext,
|
|
63
|
-
StateDefinition,
|
|
64
|
-
UIComponent,
|
|
65
|
-
ViewSpec,
|
|
66
|
-
countComponents,
|
|
67
|
-
extractComponentTypes,
|
|
68
|
-
getPattern,
|
|
69
|
-
getPatternIds,
|
|
70
|
-
getPatternsByCategory,
|
|
71
|
-
getPatternsByTag,
|
|
72
|
-
getValidationSummary,
|
|
73
|
-
hasPattern,
|
|
74
|
-
indent,
|
|
75
|
-
renderProps,
|
|
76
|
-
validateNestingDepth,
|
|
77
|
-
validatePattern,
|
|
78
|
-
validatePatternRegistry,
|
|
79
|
-
wrapWithChildren
|
|
80
|
-
};
|