@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,250 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Composite View Pattern Types
|
|
3
|
-
*
|
|
4
|
-
* Tech-independent type definitions for composite view patterns.
|
|
5
|
-
* These patterns can be used by any framework adapter (React, Vue, Svelte, etc.)
|
|
6
|
-
* to generate framework-specific implementations.
|
|
7
|
-
*
|
|
8
|
-
* NO FRAMEWORK DEPENDENCIES - Pure TypeScript types only.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* CURVED operations supported by SpecVerse
|
|
13
|
-
*/
|
|
14
|
-
export type CURVEDOperation =
|
|
15
|
-
| 'create'
|
|
16
|
-
| 'update'
|
|
17
|
-
| 'retrieve'
|
|
18
|
-
| 'retrieve_many'
|
|
19
|
-
| 'validate'
|
|
20
|
-
| 'evolve'
|
|
21
|
-
| 'delete';
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* View pattern categories
|
|
25
|
-
*/
|
|
26
|
-
export type ViewCategory =
|
|
27
|
-
| 'data-entry' // Forms, inputs, creation/editing
|
|
28
|
-
| 'data-display' // Lists, tables, detail views
|
|
29
|
-
| 'dashboard' // Multi-section dashboards with metrics
|
|
30
|
-
| 'navigation' // Navigation, menus, routing
|
|
31
|
-
| 'workflow'; // Wizards, multi-step processes
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Layout strategies for view rendering
|
|
35
|
-
*/
|
|
36
|
-
export type LayoutStrategy =
|
|
37
|
-
| 'single-column'
|
|
38
|
-
| 'two-column'
|
|
39
|
-
| 'grid'
|
|
40
|
-
| 'flex'
|
|
41
|
-
| 'masonry'
|
|
42
|
-
| 'custom';
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Data source types for views
|
|
46
|
-
*/
|
|
47
|
-
export type DataSource =
|
|
48
|
-
| 'model' // Direct model data
|
|
49
|
-
| 'controller' // Via controller operations
|
|
50
|
-
| 'service' // Via service layer
|
|
51
|
-
| 'store' // From state store
|
|
52
|
-
| 'computed'; // Computed/derived data
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Section definition for multi-section layouts
|
|
56
|
-
*/
|
|
57
|
-
export interface SectionDefinition {
|
|
58
|
-
id: string;
|
|
59
|
-
title?: string;
|
|
60
|
-
description?: string;
|
|
61
|
-
|
|
62
|
-
// Fields to include (model attributes)
|
|
63
|
-
fields?: string[];
|
|
64
|
-
|
|
65
|
-
// Nested sections
|
|
66
|
-
sections?: SectionDefinition[];
|
|
67
|
-
|
|
68
|
-
// Layout for this section
|
|
69
|
-
layout?: {
|
|
70
|
-
type: LayoutStrategy;
|
|
71
|
-
columns?: number;
|
|
72
|
-
gap?: 'small' | 'medium' | 'large';
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
// Conditional rendering
|
|
76
|
-
condition?: {
|
|
77
|
-
field: string;
|
|
78
|
-
operator: 'equals' | 'not_equals' | 'contains' | 'exists';
|
|
79
|
-
value: any;
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Data operation definition (tech-independent)
|
|
85
|
-
*/
|
|
86
|
-
export interface DataOperation {
|
|
87
|
-
operation: CURVEDOperation;
|
|
88
|
-
params?: string[]; // Required parameters
|
|
89
|
-
returns?: string; // Return type
|
|
90
|
-
|
|
91
|
-
// Optimistic updates
|
|
92
|
-
optimistic?: boolean;
|
|
93
|
-
|
|
94
|
-
// Caching strategy
|
|
95
|
-
cache?: {
|
|
96
|
-
enabled: boolean;
|
|
97
|
-
ttl?: number; // Time-to-live in seconds
|
|
98
|
-
key?: string; // Cache key pattern
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Relationship binding for related data
|
|
104
|
-
*/
|
|
105
|
-
export interface RelationshipBinding {
|
|
106
|
-
name: string; // Relationship name (e.g., 'author', 'comments')
|
|
107
|
-
type: 'belongsTo' | 'hasMany' | 'hasOne' | 'manyToMany';
|
|
108
|
-
target: string; // Target model name
|
|
109
|
-
|
|
110
|
-
// Display configuration
|
|
111
|
-
display: {
|
|
112
|
-
as: 'select' | 'autocomplete' | 'chips' | 'table' | 'list' | 'inline';
|
|
113
|
-
labelField: string; // Field to use as display label
|
|
114
|
-
searchable?: boolean;
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
// Loading strategy
|
|
118
|
-
loading: 'eager' | 'lazy' | 'manual';
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Event handler definition
|
|
123
|
-
*/
|
|
124
|
-
export interface EventHandlerDefinition {
|
|
125
|
-
event: string; // Event name (e.g., 'submit', 'click', 'change')
|
|
126
|
-
operation?: CURVEDOperation; // Operation to trigger
|
|
127
|
-
handler?: string; // Custom handler function name
|
|
128
|
-
|
|
129
|
-
// Validation before execution
|
|
130
|
-
validate?: boolean;
|
|
131
|
-
|
|
132
|
-
// Confirmation dialog
|
|
133
|
-
confirm?: {
|
|
134
|
-
title: string;
|
|
135
|
-
message: string;
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Validation rule definition
|
|
141
|
-
*/
|
|
142
|
-
export interface ValidationRule {
|
|
143
|
-
field: string;
|
|
144
|
-
rules: Array<{
|
|
145
|
-
type: 'required' | 'email' | 'url' | 'min' | 'max' | 'pattern' | 'custom';
|
|
146
|
-
value?: any;
|
|
147
|
-
message?: string;
|
|
148
|
-
}>;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Core composite view pattern definition
|
|
154
|
-
*/
|
|
155
|
-
export interface CompositeViewPattern {
|
|
156
|
-
// Identity
|
|
157
|
-
id: string;
|
|
158
|
-
name: string;
|
|
159
|
-
version: string;
|
|
160
|
-
description: string;
|
|
161
|
-
|
|
162
|
-
// Metadata
|
|
163
|
-
category: ViewCategory;
|
|
164
|
-
tags: string[];
|
|
165
|
-
author?: string;
|
|
166
|
-
license?: string;
|
|
167
|
-
|
|
168
|
-
// Composition
|
|
169
|
-
requiredAtomicComponents: string[]; // From ATOMIC_COMPONENTS_REGISTRY
|
|
170
|
-
optionalAtomicComponents: string[];
|
|
171
|
-
|
|
172
|
-
// Layout
|
|
173
|
-
layoutStrategy: {
|
|
174
|
-
type: LayoutStrategy;
|
|
175
|
-
responsive: boolean;
|
|
176
|
-
sections?: SectionDefinition[];
|
|
177
|
-
|
|
178
|
-
// Grid-specific
|
|
179
|
-
columns?: number;
|
|
180
|
-
rows?: number;
|
|
181
|
-
|
|
182
|
-
// Flex-specific
|
|
183
|
-
direction?: 'row' | 'column';
|
|
184
|
-
wrap?: boolean;
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
// Data Bindings
|
|
188
|
-
dataBindings: {
|
|
189
|
-
source: DataSource;
|
|
190
|
-
operations: DataOperation[];
|
|
191
|
-
relationships?: RelationshipBinding[];
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
// Behavior
|
|
195
|
-
supportedOperations: CURVEDOperation[];
|
|
196
|
-
eventHandlers?: EventHandlerDefinition[];
|
|
197
|
-
validationRules?: ValidationRule[];
|
|
198
|
-
|
|
199
|
-
// State Management
|
|
200
|
-
state?: {
|
|
201
|
-
fields: string[]; // State fields to track
|
|
202
|
-
persistence?: 'none' | 'session' | 'local';
|
|
203
|
-
};
|
|
204
|
-
|
|
205
|
-
// Extensibility
|
|
206
|
-
extends?: string; // Parent pattern ID
|
|
207
|
-
customization?: {
|
|
208
|
-
allowedOverrides: string[]; // Which properties can be overridden
|
|
209
|
-
requiredOverrides: string[]; // Which properties must be overridden
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Pattern registry structure
|
|
215
|
-
*/
|
|
216
|
-
export interface CompositePatternRegistry {
|
|
217
|
-
[patternId: string]: CompositeViewPattern;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Pattern validation result
|
|
222
|
-
*/
|
|
223
|
-
export interface PatternValidationResult {
|
|
224
|
-
valid: boolean;
|
|
225
|
-
errors: Array<{
|
|
226
|
-
field: string;
|
|
227
|
-
message: string;
|
|
228
|
-
severity: 'error' | 'warning';
|
|
229
|
-
}>;
|
|
230
|
-
warnings: Array<{
|
|
231
|
-
field: string;
|
|
232
|
-
message: string;
|
|
233
|
-
}>;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* Pattern usage context (for adapter generation)
|
|
238
|
-
*/
|
|
239
|
-
export interface PatternContext {
|
|
240
|
-
pattern: CompositeViewPattern;
|
|
241
|
-
viewSpec: any; // View specification from .specly file
|
|
242
|
-
modelSchema: any; // Model schema
|
|
243
|
-
framework: 'react' | 'vue' | 'svelte' | 'angular';
|
|
244
|
-
|
|
245
|
-
// Runtime vs generation
|
|
246
|
-
mode: 'runtime' | 'generation';
|
|
247
|
-
|
|
248
|
-
// Additional context
|
|
249
|
-
metadata?: Record<string, any>;
|
|
250
|
-
}
|