@specverse/engines 4.1.30 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/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/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/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/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/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,517 +0,0 @@
|
|
|
1
|
-
import { ATOMIC_COMPONENTS_REGISTRY } from "./atomic-components-registry.js";
|
|
2
|
-
const COMMON_PROPERTY_METADATA = {
|
|
3
|
-
variant: {
|
|
4
|
-
name: "variant",
|
|
5
|
-
type: "enum",
|
|
6
|
-
required: false,
|
|
7
|
-
default: "primary",
|
|
8
|
-
description: "Visual style variant for the component",
|
|
9
|
-
enumValues: ["primary", "secondary", "destructive", "ghost", "outline"],
|
|
10
|
-
isCommon: true,
|
|
11
|
-
affectsLayout: false
|
|
12
|
-
},
|
|
13
|
-
size: {
|
|
14
|
-
name: "size",
|
|
15
|
-
type: "enum",
|
|
16
|
-
required: false,
|
|
17
|
-
default: "medium",
|
|
18
|
-
description: "Size of the component",
|
|
19
|
-
enumValues: ["small", "medium", "large"],
|
|
20
|
-
isCommon: true,
|
|
21
|
-
affectsLayout: true
|
|
22
|
-
},
|
|
23
|
-
color: {
|
|
24
|
-
name: "color",
|
|
25
|
-
type: "enum",
|
|
26
|
-
required: false,
|
|
27
|
-
default: "primary",
|
|
28
|
-
description: "Color scheme for the component",
|
|
29
|
-
enumValues: ["primary", "success", "warning", "error", "info"],
|
|
30
|
-
isCommon: true,
|
|
31
|
-
affectsLayout: false
|
|
32
|
-
},
|
|
33
|
-
position: {
|
|
34
|
-
name: "position",
|
|
35
|
-
type: "enum",
|
|
36
|
-
required: false,
|
|
37
|
-
default: "top",
|
|
38
|
-
description: "Position or alignment of the component",
|
|
39
|
-
enumValues: ["top", "bottom", "left", "right"],
|
|
40
|
-
isCommon: true,
|
|
41
|
-
affectsLayout: true
|
|
42
|
-
},
|
|
43
|
-
orientation: {
|
|
44
|
-
name: "orientation",
|
|
45
|
-
type: "enum",
|
|
46
|
-
required: false,
|
|
47
|
-
default: "horizontal",
|
|
48
|
-
description: "Layout orientation of the component",
|
|
49
|
-
enumValues: ["horizontal", "vertical"],
|
|
50
|
-
isCommon: true,
|
|
51
|
-
affectsLayout: true
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
const COMPONENT_METADATA_REGISTRY = {
|
|
55
|
-
// Data Display Components
|
|
56
|
-
table: {
|
|
57
|
-
...ATOMIC_COMPONENTS_REGISTRY.table,
|
|
58
|
-
propertyMetadata: [
|
|
59
|
-
{
|
|
60
|
-
name: "columns",
|
|
61
|
-
type: "array",
|
|
62
|
-
required: true,
|
|
63
|
-
description: "Column definitions for the table",
|
|
64
|
-
validation: { min: 1 }
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
name: "dataSource",
|
|
68
|
-
type: "string",
|
|
69
|
-
required: true,
|
|
70
|
-
description: "Model array name for table data"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
name: "sortable",
|
|
74
|
-
type: "boolean",
|
|
75
|
-
required: false,
|
|
76
|
-
default: false,
|
|
77
|
-
description: "Enable column sorting",
|
|
78
|
-
affectsLayout: false
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
name: "filterable",
|
|
82
|
-
type: "boolean",
|
|
83
|
-
required: false,
|
|
84
|
-
default: false,
|
|
85
|
-
description: "Enable filtering",
|
|
86
|
-
affectsLayout: true
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
name: "pagination",
|
|
90
|
-
type: "boolean",
|
|
91
|
-
required: false,
|
|
92
|
-
default: true,
|
|
93
|
-
description: "Enable pagination",
|
|
94
|
-
affectsLayout: true
|
|
95
|
-
},
|
|
96
|
-
COMMON_PROPERTY_METADATA.size
|
|
97
|
-
],
|
|
98
|
-
eventMetadata: [
|
|
99
|
-
{
|
|
100
|
-
name: "onRowClick",
|
|
101
|
-
description: "Fired when a row is clicked",
|
|
102
|
-
parameters: [
|
|
103
|
-
{ name: "row", type: "object", description: "Clicked row data" },
|
|
104
|
-
{ name: "index", type: "number", description: "Row index" }
|
|
105
|
-
]
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
name: "onSort",
|
|
109
|
-
description: "Fired when column sort changes",
|
|
110
|
-
parameters: [
|
|
111
|
-
{ name: "column", type: "string", description: "Column key" },
|
|
112
|
-
{ name: "direction", type: "string", description: "Sort direction (asc/desc)" }
|
|
113
|
-
]
|
|
114
|
-
}
|
|
115
|
-
],
|
|
116
|
-
capabilities: {
|
|
117
|
-
supportsChildren: false,
|
|
118
|
-
supportsConditional: true,
|
|
119
|
-
supportsList: true,
|
|
120
|
-
supportsSlots: false,
|
|
121
|
-
maxDepth: 1,
|
|
122
|
-
preferredPosition: "leaf"
|
|
123
|
-
},
|
|
124
|
-
accessibility: {
|
|
125
|
-
role: "table",
|
|
126
|
-
keyboardNavigable: true,
|
|
127
|
-
requiredAriaAttrs: ["aria-label"],
|
|
128
|
-
screenReaderDescription: "Data table with {columns.length} columns"
|
|
129
|
-
},
|
|
130
|
-
state: {
|
|
131
|
-
hasInternalState: true,
|
|
132
|
-
stateProperties: [
|
|
133
|
-
{ name: "sortColumn", type: "string", description: "Currently sorted column" },
|
|
134
|
-
{ name: "sortDirection", type: "string", description: "Sort direction (asc/desc)" },
|
|
135
|
-
{ name: "currentPage", type: "number", description: "Current page number", defaultValue: 1 }
|
|
136
|
-
]
|
|
137
|
-
},
|
|
138
|
-
related: {
|
|
139
|
-
alternatives: ["list", "grid"],
|
|
140
|
-
compositions: ["pagination", "search"],
|
|
141
|
-
containers: ["card", "container"]
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
button: {
|
|
145
|
-
...ATOMIC_COMPONENTS_REGISTRY.button,
|
|
146
|
-
propertyMetadata: [
|
|
147
|
-
COMMON_PROPERTY_METADATA.variant,
|
|
148
|
-
COMMON_PROPERTY_METADATA.size,
|
|
149
|
-
{
|
|
150
|
-
name: "disabled",
|
|
151
|
-
type: "boolean",
|
|
152
|
-
required: false,
|
|
153
|
-
default: false,
|
|
154
|
-
description: "Disable button interaction"
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
name: "loading",
|
|
158
|
-
type: "boolean",
|
|
159
|
-
required: false,
|
|
160
|
-
default: false,
|
|
161
|
-
description: "Show loading state"
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
name: "label",
|
|
165
|
-
type: "string",
|
|
166
|
-
required: false,
|
|
167
|
-
description: "Button text label"
|
|
168
|
-
}
|
|
169
|
-
],
|
|
170
|
-
eventMetadata: [
|
|
171
|
-
{
|
|
172
|
-
name: "onClick",
|
|
173
|
-
description: "Fired when button is clicked",
|
|
174
|
-
parameters: [
|
|
175
|
-
{ name: "event", type: "MouseEvent", description: "Click event" }
|
|
176
|
-
],
|
|
177
|
-
bubbles: true
|
|
178
|
-
}
|
|
179
|
-
],
|
|
180
|
-
capabilities: {
|
|
181
|
-
supportsChildren: true,
|
|
182
|
-
supportsConditional: true,
|
|
183
|
-
supportsList: false,
|
|
184
|
-
supportsSlots: false,
|
|
185
|
-
maxDepth: 1,
|
|
186
|
-
preferredPosition: "leaf"
|
|
187
|
-
},
|
|
188
|
-
accessibility: {
|
|
189
|
-
role: "button",
|
|
190
|
-
keyboardNavigable: true,
|
|
191
|
-
requiredAriaAttrs: ["aria-label"],
|
|
192
|
-
screenReaderDescription: "{variant} button: {label}"
|
|
193
|
-
},
|
|
194
|
-
state: {
|
|
195
|
-
hasInternalState: false
|
|
196
|
-
},
|
|
197
|
-
related: {
|
|
198
|
-
alternatives: ["link", "icon-button"],
|
|
199
|
-
compositions: ["icon", "badge"],
|
|
200
|
-
containers: ["form", "card", "toolbar"]
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
|
-
card: {
|
|
204
|
-
...ATOMIC_COMPONENTS_REGISTRY.card,
|
|
205
|
-
propertyMetadata: [
|
|
206
|
-
{
|
|
207
|
-
name: "title",
|
|
208
|
-
type: "string",
|
|
209
|
-
required: false,
|
|
210
|
-
description: "Card title"
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
name: "elevation",
|
|
214
|
-
type: "enum",
|
|
215
|
-
required: false,
|
|
216
|
-
default: "medium",
|
|
217
|
-
description: "Shadow depth",
|
|
218
|
-
enumValues: ["none", "low", "medium", "high"]
|
|
219
|
-
},
|
|
220
|
-
COMMON_PROPERTY_METADATA.size
|
|
221
|
-
],
|
|
222
|
-
capabilities: {
|
|
223
|
-
supportsChildren: true,
|
|
224
|
-
supportsConditional: true,
|
|
225
|
-
supportsList: true,
|
|
226
|
-
supportsSlots: true,
|
|
227
|
-
maxDepth: 3,
|
|
228
|
-
preferredPosition: "container"
|
|
229
|
-
},
|
|
230
|
-
accessibility: {
|
|
231
|
-
role: "article",
|
|
232
|
-
keyboardNavigable: false,
|
|
233
|
-
screenReaderDescription: "Card: {title}"
|
|
234
|
-
},
|
|
235
|
-
state: {
|
|
236
|
-
hasInternalState: false
|
|
237
|
-
},
|
|
238
|
-
related: {
|
|
239
|
-
alternatives: ["panel", "container"],
|
|
240
|
-
compositions: ["button", "image", "text", "list"],
|
|
241
|
-
containers: ["grid", "container"]
|
|
242
|
-
}
|
|
243
|
-
},
|
|
244
|
-
input: {
|
|
245
|
-
...ATOMIC_COMPONENTS_REGISTRY.input,
|
|
246
|
-
propertyMetadata: [
|
|
247
|
-
{
|
|
248
|
-
name: "type",
|
|
249
|
-
type: "enum",
|
|
250
|
-
required: false,
|
|
251
|
-
default: "text",
|
|
252
|
-
description: "Input type",
|
|
253
|
-
enumValues: ["text", "email", "password", "number", "tel", "url"]
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
name: "placeholder",
|
|
257
|
-
type: "string",
|
|
258
|
-
required: false,
|
|
259
|
-
description: "Placeholder text"
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
name: "required",
|
|
263
|
-
type: "boolean",
|
|
264
|
-
required: false,
|
|
265
|
-
default: false,
|
|
266
|
-
description: "Field is required"
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
name: "disabled",
|
|
270
|
-
type: "boolean",
|
|
271
|
-
required: false,
|
|
272
|
-
default: false,
|
|
273
|
-
description: "Disable input"
|
|
274
|
-
},
|
|
275
|
-
COMMON_PROPERTY_METADATA.size,
|
|
276
|
-
{
|
|
277
|
-
name: "variant",
|
|
278
|
-
type: "enum",
|
|
279
|
-
required: false,
|
|
280
|
-
default: "outlined",
|
|
281
|
-
description: "Visual style variant",
|
|
282
|
-
enumValues: ["filled", "outlined", "standard"],
|
|
283
|
-
isCommon: true
|
|
284
|
-
}
|
|
285
|
-
],
|
|
286
|
-
eventMetadata: [
|
|
287
|
-
{
|
|
288
|
-
name: "onChange",
|
|
289
|
-
description: "Fired when input value changes",
|
|
290
|
-
parameters: [
|
|
291
|
-
{ name: "value", type: "string", description: "New value" },
|
|
292
|
-
{ name: "event", type: "Event", description: "Change event" }
|
|
293
|
-
]
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
name: "onBlur",
|
|
297
|
-
description: "Fired when input loses focus",
|
|
298
|
-
parameters: [
|
|
299
|
-
{ name: "event", type: "FocusEvent", description: "Blur event" }
|
|
300
|
-
]
|
|
301
|
-
}
|
|
302
|
-
],
|
|
303
|
-
capabilities: {
|
|
304
|
-
supportsChildren: false,
|
|
305
|
-
supportsConditional: true,
|
|
306
|
-
supportsList: false,
|
|
307
|
-
supportsSlots: false,
|
|
308
|
-
maxDepth: 0,
|
|
309
|
-
preferredPosition: "leaf"
|
|
310
|
-
},
|
|
311
|
-
accessibility: {
|
|
312
|
-
role: "textbox",
|
|
313
|
-
keyboardNavigable: true,
|
|
314
|
-
requiredAriaAttrs: ["aria-label", "aria-required"],
|
|
315
|
-
screenReaderDescription: "{type} input: {placeholder}"
|
|
316
|
-
},
|
|
317
|
-
state: {
|
|
318
|
-
hasInternalState: true,
|
|
319
|
-
stateProperties: [
|
|
320
|
-
{ name: "value", type: "string", description: "Current input value", defaultValue: "" },
|
|
321
|
-
{ name: "isFocused", type: "boolean", description: "Input has focus", defaultValue: false }
|
|
322
|
-
]
|
|
323
|
-
},
|
|
324
|
-
related: {
|
|
325
|
-
alternatives: ["textarea", "select"],
|
|
326
|
-
compositions: ["label", "validation-message"],
|
|
327
|
-
containers: ["form", "form-field"]
|
|
328
|
-
}
|
|
329
|
-
},
|
|
330
|
-
modal: {
|
|
331
|
-
...ATOMIC_COMPONENTS_REGISTRY.modal,
|
|
332
|
-
propertyMetadata: [
|
|
333
|
-
{
|
|
334
|
-
name: "title",
|
|
335
|
-
type: "string",
|
|
336
|
-
required: false,
|
|
337
|
-
description: "Modal title"
|
|
338
|
-
},
|
|
339
|
-
{
|
|
340
|
-
name: "open",
|
|
341
|
-
type: "boolean",
|
|
342
|
-
required: true,
|
|
343
|
-
description: "Modal visibility state"
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
name: "closable",
|
|
347
|
-
type: "boolean",
|
|
348
|
-
required: false,
|
|
349
|
-
default: true,
|
|
350
|
-
description: "Show close button"
|
|
351
|
-
},
|
|
352
|
-
COMMON_PROPERTY_METADATA.size
|
|
353
|
-
],
|
|
354
|
-
eventMetadata: [
|
|
355
|
-
{
|
|
356
|
-
name: "onClose",
|
|
357
|
-
description: "Fired when modal is closed",
|
|
358
|
-
parameters: []
|
|
359
|
-
}
|
|
360
|
-
],
|
|
361
|
-
capabilities: {
|
|
362
|
-
supportsChildren: true,
|
|
363
|
-
supportsConditional: true,
|
|
364
|
-
supportsList: false,
|
|
365
|
-
supportsSlots: true,
|
|
366
|
-
maxDepth: 2,
|
|
367
|
-
preferredPosition: "root"
|
|
368
|
-
},
|
|
369
|
-
accessibility: {
|
|
370
|
-
role: "dialog",
|
|
371
|
-
keyboardNavigable: true,
|
|
372
|
-
requiredAriaAttrs: ["aria-modal", "aria-labelledby"],
|
|
373
|
-
screenReaderDescription: "Modal dialog: {title}"
|
|
374
|
-
},
|
|
375
|
-
state: {
|
|
376
|
-
hasInternalState: true,
|
|
377
|
-
stateProperties: [
|
|
378
|
-
{ name: "open", type: "boolean", description: "Modal open state", defaultValue: false }
|
|
379
|
-
]
|
|
380
|
-
},
|
|
381
|
-
related: {
|
|
382
|
-
alternatives: ["drawer", "popover"],
|
|
383
|
-
compositions: ["button", "form", "card"],
|
|
384
|
-
containers: ["root"]
|
|
385
|
-
}
|
|
386
|
-
},
|
|
387
|
-
badge: {
|
|
388
|
-
...ATOMIC_COMPONENTS_REGISTRY.badge,
|
|
389
|
-
propertyMetadata: [
|
|
390
|
-
{
|
|
391
|
-
name: "content",
|
|
392
|
-
type: "string",
|
|
393
|
-
required: false,
|
|
394
|
-
description: "Badge content/label"
|
|
395
|
-
},
|
|
396
|
-
COMMON_PROPERTY_METADATA.variant,
|
|
397
|
-
COMMON_PROPERTY_METADATA.color,
|
|
398
|
-
{
|
|
399
|
-
name: "variant",
|
|
400
|
-
type: "enum",
|
|
401
|
-
required: false,
|
|
402
|
-
default: "standard",
|
|
403
|
-
description: "Badge style",
|
|
404
|
-
enumValues: ["dot", "standard"],
|
|
405
|
-
isCommon: true
|
|
406
|
-
}
|
|
407
|
-
],
|
|
408
|
-
capabilities: {
|
|
409
|
-
supportsChildren: false,
|
|
410
|
-
supportsConditional: true,
|
|
411
|
-
supportsList: false,
|
|
412
|
-
supportsSlots: false,
|
|
413
|
-
maxDepth: 0,
|
|
414
|
-
preferredPosition: "leaf"
|
|
415
|
-
},
|
|
416
|
-
accessibility: {
|
|
417
|
-
role: "status",
|
|
418
|
-
keyboardNavigable: false,
|
|
419
|
-
screenReaderDescription: "Badge: {content}"
|
|
420
|
-
},
|
|
421
|
-
state: {
|
|
422
|
-
hasInternalState: false
|
|
423
|
-
},
|
|
424
|
-
related: {
|
|
425
|
-
alternatives: ["chip", "tag"],
|
|
426
|
-
compositions: ["icon", "avatar"],
|
|
427
|
-
containers: ["button", "card"]
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
};
|
|
431
|
-
function getComponentMetadata(componentType) {
|
|
432
|
-
return COMPONENT_METADATA_REGISTRY[componentType];
|
|
433
|
-
}
|
|
434
|
-
function getAllComponentTypes() {
|
|
435
|
-
return Object.keys(COMPONENT_METADATA_REGISTRY);
|
|
436
|
-
}
|
|
437
|
-
function getComponentsByCategory(category) {
|
|
438
|
-
return Object.values(COMPONENT_METADATA_REGISTRY).filter(
|
|
439
|
-
(comp) => comp.category === category
|
|
440
|
-
);
|
|
441
|
-
}
|
|
442
|
-
function getContainerComponents() {
|
|
443
|
-
return Object.values(COMPONENT_METADATA_REGISTRY).filter(
|
|
444
|
-
(comp) => comp.capabilities.supportsChildren
|
|
445
|
-
);
|
|
446
|
-
}
|
|
447
|
-
function getLeafComponents() {
|
|
448
|
-
return Object.values(COMPONENT_METADATA_REGISTRY).filter(
|
|
449
|
-
(comp) => !comp.capabilities.supportsChildren
|
|
450
|
-
);
|
|
451
|
-
}
|
|
452
|
-
function supportsProperty(componentType, propertyName) {
|
|
453
|
-
const metadata = getComponentMetadata(componentType);
|
|
454
|
-
if (!metadata) return false;
|
|
455
|
-
return metadata.propertyMetadata.some((prop) => prop.name === propertyName);
|
|
456
|
-
}
|
|
457
|
-
function getPropertyMetadata(componentType, propertyName) {
|
|
458
|
-
const metadata = getComponentMetadata(componentType);
|
|
459
|
-
if (!metadata) return void 0;
|
|
460
|
-
return metadata.propertyMetadata.find((prop) => prop.name === propertyName);
|
|
461
|
-
}
|
|
462
|
-
function validatePropertyValue(componentType, propertyName, value) {
|
|
463
|
-
const propMeta = getPropertyMetadata(componentType, propertyName);
|
|
464
|
-
if (!propMeta) {
|
|
465
|
-
return { valid: false, errors: [`Unknown property: ${propertyName}`] };
|
|
466
|
-
}
|
|
467
|
-
const errors = [];
|
|
468
|
-
if (propMeta.type === "enum" && propMeta.enumValues) {
|
|
469
|
-
if (!propMeta.enumValues.includes(value)) {
|
|
470
|
-
errors.push(`Invalid enum value. Expected one of: ${propMeta.enumValues.join(", ")}`);
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
if (propMeta.validation) {
|
|
474
|
-
if (propMeta.validation.min !== void 0 && value < propMeta.validation.min) {
|
|
475
|
-
errors.push(`Value must be >= ${propMeta.validation.min}`);
|
|
476
|
-
}
|
|
477
|
-
if (propMeta.validation.max !== void 0 && value > propMeta.validation.max) {
|
|
478
|
-
errors.push(`Value must be <= ${propMeta.validation.max}`);
|
|
479
|
-
}
|
|
480
|
-
if (propMeta.validation.pattern && typeof value === "string") {
|
|
481
|
-
const regex = new RegExp(propMeta.validation.pattern);
|
|
482
|
-
if (!regex.test(value)) {
|
|
483
|
-
errors.push(`Value must match pattern: ${propMeta.validation.pattern}`);
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
return {
|
|
488
|
-
valid: errors.length === 0,
|
|
489
|
-
errors
|
|
490
|
-
};
|
|
491
|
-
}
|
|
492
|
-
function getRecommendedCompositions(componentType) {
|
|
493
|
-
const metadata = getComponentMetadata(componentType);
|
|
494
|
-
return metadata?.related?.compositions || [];
|
|
495
|
-
}
|
|
496
|
-
function canNest(parentType, childType) {
|
|
497
|
-
const parentMeta = getComponentMetadata(parentType);
|
|
498
|
-
const childMeta = getComponentMetadata(childType);
|
|
499
|
-
if (!parentMeta || !childMeta) return false;
|
|
500
|
-
if (!parentMeta.capabilities.supportsChildren) return false;
|
|
501
|
-
if (childMeta.capabilities.preferredPosition === "root") return false;
|
|
502
|
-
return true;
|
|
503
|
-
}
|
|
504
|
-
export {
|
|
505
|
-
COMMON_PROPERTY_METADATA,
|
|
506
|
-
COMPONENT_METADATA_REGISTRY,
|
|
507
|
-
canNest,
|
|
508
|
-
getAllComponentTypes,
|
|
509
|
-
getComponentMetadata,
|
|
510
|
-
getComponentsByCategory,
|
|
511
|
-
getContainerComponents,
|
|
512
|
-
getLeafComponents,
|
|
513
|
-
getPropertyMetadata,
|
|
514
|
-
getRecommendedCompositions,
|
|
515
|
-
supportsProperty,
|
|
516
|
-
validatePropertyValue
|
|
517
|
-
};
|
|
File without changes
|