@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,299 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BaseComponentGenerator
|
|
3
|
-
} from "../shared/base-generator.js";
|
|
4
|
-
import { getSyntaxPattern } from "../shared/syntax-mapper.js";
|
|
5
|
-
import { extractComponentTypes } from "../shared/base-generator.js";
|
|
6
|
-
class ReactComponentGenerator extends BaseComponentGenerator {
|
|
7
|
-
reactConfig;
|
|
8
|
-
constructor(adapter, config) {
|
|
9
|
-
super(adapter, config);
|
|
10
|
-
this.reactConfig = config;
|
|
11
|
-
}
|
|
12
|
-
// ============================================================================
|
|
13
|
-
// Abstract Method Implementations
|
|
14
|
-
// ============================================================================
|
|
15
|
-
/**
|
|
16
|
-
* Generate React imports
|
|
17
|
-
*/
|
|
18
|
-
generateImports(viewSpec) {
|
|
19
|
-
const imports = [];
|
|
20
|
-
const reactImports = this.getReactCoreImports(viewSpec);
|
|
21
|
-
if (reactImports) {
|
|
22
|
-
imports.push(reactImports);
|
|
23
|
-
}
|
|
24
|
-
const componentTypes = extractComponentTypes(viewSpec.components);
|
|
25
|
-
const componentImports = this.getComponentImports(componentTypes);
|
|
26
|
-
imports.push(...componentImports);
|
|
27
|
-
return imports.join("\n");
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Generate complete React component
|
|
31
|
-
*/
|
|
32
|
-
generateComponent(parts) {
|
|
33
|
-
const lines = [];
|
|
34
|
-
if (this.reactConfig.includeComments) {
|
|
35
|
-
lines.push(`/**`);
|
|
36
|
-
lines.push(` * ${parts.name} Component`);
|
|
37
|
-
lines.push(` * Generated by SpecVerse`);
|
|
38
|
-
lines.push(` */`);
|
|
39
|
-
lines.push("");
|
|
40
|
-
}
|
|
41
|
-
lines.push(parts.imports);
|
|
42
|
-
lines.push("");
|
|
43
|
-
const propsInterface = this.generatePropsInterface(parts.name);
|
|
44
|
-
if (propsInterface) {
|
|
45
|
-
lines.push(propsInterface);
|
|
46
|
-
lines.push("");
|
|
47
|
-
}
|
|
48
|
-
lines.push(this.generateComponentFunction(parts));
|
|
49
|
-
return lines.join("\n");
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Generate state declarations using React hooks
|
|
53
|
-
*/
|
|
54
|
-
generateState(state) {
|
|
55
|
-
const stateDeclarations = [];
|
|
56
|
-
for (const [name, def] of Object.entries(state)) {
|
|
57
|
-
const declaration = getSyntaxPattern("stateDeclaration", "react", {
|
|
58
|
-
name,
|
|
59
|
-
Name: this.capitalize(name),
|
|
60
|
-
type: def.type,
|
|
61
|
-
initial: JSON.stringify(def.initial)
|
|
62
|
-
});
|
|
63
|
-
if (this.reactConfig.includeComments && def.description) {
|
|
64
|
-
stateDeclarations.push(` // ${def.description}`);
|
|
65
|
-
}
|
|
66
|
-
stateDeclarations.push(` ${declaration}`);
|
|
67
|
-
}
|
|
68
|
-
return stateDeclarations.join("\n");
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Generate event handlers
|
|
72
|
-
*/
|
|
73
|
-
generateEvents(events) {
|
|
74
|
-
const eventHandlers = [];
|
|
75
|
-
for (const [name, def] of Object.entries(events)) {
|
|
76
|
-
const handler = getSyntaxPattern("eventHandler", "react", {
|
|
77
|
-
Name: this.capitalize(name),
|
|
78
|
-
params: def.params || "",
|
|
79
|
-
body: def.body
|
|
80
|
-
});
|
|
81
|
-
if (this.reactConfig.includeComments && def.description) {
|
|
82
|
-
eventHandlers.push(` // ${def.description}`);
|
|
83
|
-
}
|
|
84
|
-
eventHandlers.push(` ${handler}`);
|
|
85
|
-
}
|
|
86
|
-
return eventHandlers.join("\n\n");
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Get file extension (.tsx for React/TypeScript)
|
|
90
|
-
*/
|
|
91
|
-
getFileExtension() {
|
|
92
|
-
return this.reactConfig.typescript ? ".tsx" : ".jsx";
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Get additional files (styles, types, etc.)
|
|
96
|
-
*/
|
|
97
|
-
getAdditionalFiles(viewSpec) {
|
|
98
|
-
const files = {};
|
|
99
|
-
if (this.reactConfig.typescript && this.reactConfig.strictMode) {
|
|
100
|
-
files[`${viewSpec.name}.types.ts`] = this.generateTypesFile(viewSpec);
|
|
101
|
-
}
|
|
102
|
-
return files;
|
|
103
|
-
}
|
|
104
|
-
// ============================================================================
|
|
105
|
-
// React-Specific Helper Methods
|
|
106
|
-
// ============================================================================
|
|
107
|
-
/**
|
|
108
|
-
* Get React core imports (useState, useEffect, etc.)
|
|
109
|
-
*/
|
|
110
|
-
getReactCoreImports(viewSpec) {
|
|
111
|
-
const hooks = [];
|
|
112
|
-
if (viewSpec.state && Object.keys(viewSpec.state).length > 0) {
|
|
113
|
-
hooks.push("useState");
|
|
114
|
-
}
|
|
115
|
-
if (this.needsUseEffect(viewSpec)) {
|
|
116
|
-
hooks.push("useEffect");
|
|
117
|
-
}
|
|
118
|
-
if (hooks.length > 0) {
|
|
119
|
-
return `import React, { ${hooks.join(", ")} } from 'react';`;
|
|
120
|
-
}
|
|
121
|
-
return `import React from 'react';`;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Get component library imports
|
|
125
|
-
*/
|
|
126
|
-
getComponentImports(componentTypes) {
|
|
127
|
-
const imports = [];
|
|
128
|
-
const importMap = /* @__PURE__ */ new Map();
|
|
129
|
-
for (const type of componentTypes) {
|
|
130
|
-
const adapterComponent = this.adapter.components[type];
|
|
131
|
-
if (adapterComponent && adapterComponent.import) {
|
|
132
|
-
const importMatch = adapterComponent.import.match(/from ['"](.+)['"]/);
|
|
133
|
-
if (importMatch) {
|
|
134
|
-
const source = importMatch[1];
|
|
135
|
-
const componentMatch = adapterComponent.import.match(/import \{ (.+) \}/);
|
|
136
|
-
if (componentMatch) {
|
|
137
|
-
const componentName = componentMatch[1];
|
|
138
|
-
if (!importMap.has(source)) {
|
|
139
|
-
importMap.set(source, []);
|
|
140
|
-
}
|
|
141
|
-
importMap.get(source).push(componentName);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
for (const [source, components] of importMap) {
|
|
147
|
-
imports.push(getSyntaxPattern("libraryImport", "react", {
|
|
148
|
-
exports: components.join(", "),
|
|
149
|
-
library: source
|
|
150
|
-
}));
|
|
151
|
-
}
|
|
152
|
-
return imports;
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Generate props interface for TypeScript
|
|
156
|
-
*/
|
|
157
|
-
generatePropsInterface(componentName) {
|
|
158
|
-
if (!this.reactConfig.typescript) {
|
|
159
|
-
return null;
|
|
160
|
-
}
|
|
161
|
-
const lines = [];
|
|
162
|
-
if (this.reactConfig.includeComments) {
|
|
163
|
-
lines.push(`/**`);
|
|
164
|
-
lines.push(` * Props for ${componentName} component`);
|
|
165
|
-
lines.push(` */`);
|
|
166
|
-
}
|
|
167
|
-
lines.push(`interface ${componentName}Props {`);
|
|
168
|
-
lines.push(` // Component props will be added here`);
|
|
169
|
-
lines.push(`}`);
|
|
170
|
-
return lines.join("\n");
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Generate main component function
|
|
174
|
-
*/
|
|
175
|
-
generateComponentFunction(parts) {
|
|
176
|
-
const lines = [];
|
|
177
|
-
const propsParam = this.reactConfig.typescript ? `props: ${parts.name}Props` : "props";
|
|
178
|
-
lines.push(`export function ${parts.name}(${propsParam}) {`);
|
|
179
|
-
if (parts.state) {
|
|
180
|
-
lines.push(parts.state);
|
|
181
|
-
lines.push("");
|
|
182
|
-
}
|
|
183
|
-
if (parts.events) {
|
|
184
|
-
lines.push(parts.events);
|
|
185
|
-
lines.push("");
|
|
186
|
-
}
|
|
187
|
-
lines.push(" return (");
|
|
188
|
-
lines.push(' <div className="specverse-view">');
|
|
189
|
-
const indentedComponents = parts.components.split("\n").map((line) => line ? ` ${line}` : "").join("\n");
|
|
190
|
-
lines.push(indentedComponents);
|
|
191
|
-
lines.push(" </div>");
|
|
192
|
-
lines.push(" );");
|
|
193
|
-
lines.push("}");
|
|
194
|
-
return lines.join("\n");
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* Generate separate types file
|
|
198
|
-
*/
|
|
199
|
-
generateTypesFile(viewSpec) {
|
|
200
|
-
const lines = [];
|
|
201
|
-
lines.push(`/**`);
|
|
202
|
-
lines.push(` * Type definitions for ${viewSpec.name}`);
|
|
203
|
-
lines.push(` * Generated by SpecVerse`);
|
|
204
|
-
lines.push(` */`);
|
|
205
|
-
lines.push("");
|
|
206
|
-
if (viewSpec.state) {
|
|
207
|
-
lines.push(`export interface ${viewSpec.name}State {`);
|
|
208
|
-
for (const [name, def] of Object.entries(viewSpec.state)) {
|
|
209
|
-
if (def.description) {
|
|
210
|
-
lines.push(` /** ${def.description} */`);
|
|
211
|
-
}
|
|
212
|
-
lines.push(` ${name}: ${def.type};`);
|
|
213
|
-
}
|
|
214
|
-
lines.push(`}`);
|
|
215
|
-
lines.push("");
|
|
216
|
-
}
|
|
217
|
-
if (viewSpec.events) {
|
|
218
|
-
for (const [name, def] of Object.entries(viewSpec.events)) {
|
|
219
|
-
const handlerName = `${this.capitalize(name)}Handler`;
|
|
220
|
-
const params = def.params || "";
|
|
221
|
-
if (def.description) {
|
|
222
|
-
lines.push(`/** ${def.description} */`);
|
|
223
|
-
}
|
|
224
|
-
lines.push(`export type ${handlerName} = (${params}) => void;`);
|
|
225
|
-
lines.push("");
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
return lines.join("\n");
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* Check if component needs useEffect hook
|
|
232
|
-
*/
|
|
233
|
-
needsUseEffect(viewSpec) {
|
|
234
|
-
if (viewSpec.events) {
|
|
235
|
-
const eventNames = Object.keys(viewSpec.events).map((e) => e.toLowerCase());
|
|
236
|
-
return eventNames.some(
|
|
237
|
-
(name) => name.includes("mount") || name.includes("init") || name.includes("load")
|
|
238
|
-
);
|
|
239
|
-
}
|
|
240
|
-
return false;
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Capitalize first letter of string
|
|
244
|
-
*/
|
|
245
|
-
capitalize(str) {
|
|
246
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
247
|
-
}
|
|
248
|
-
// ============================================================================
|
|
249
|
-
// React-Specific Component Rendering
|
|
250
|
-
// ============================================================================
|
|
251
|
-
/**
|
|
252
|
-
* Override to add React-specific rendering hints
|
|
253
|
-
*/
|
|
254
|
-
renderAdapterComponent(type, properties, children, context) {
|
|
255
|
-
if (!properties.className && type !== "container") {
|
|
256
|
-
properties.className = `specverse-${type}`;
|
|
257
|
-
}
|
|
258
|
-
return super.renderAdapterComponent(type, properties, children, context);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
function createReactGenerator(adapter, config) {
|
|
262
|
-
const defaultConfig = {
|
|
263
|
-
framework: "react",
|
|
264
|
-
target: "shadcn",
|
|
265
|
-
typescript: true,
|
|
266
|
-
strictMode: false,
|
|
267
|
-
includeComments: true,
|
|
268
|
-
maxDepth: 3,
|
|
269
|
-
enableWarnings: true
|
|
270
|
-
};
|
|
271
|
-
const finalConfig = { ...defaultConfig, ...config };
|
|
272
|
-
return new ReactComponentGenerator(adapter, finalConfig);
|
|
273
|
-
}
|
|
274
|
-
function generateReactComponent(viewSpec, adapter, options) {
|
|
275
|
-
const generator = createReactGenerator(adapter, options);
|
|
276
|
-
const result = generator.generate(viewSpec);
|
|
277
|
-
if (result.warnings.length > 0) {
|
|
278
|
-
console.warn("Generation warnings:", result.warnings);
|
|
279
|
-
}
|
|
280
|
-
return result.code;
|
|
281
|
-
}
|
|
282
|
-
function generateReactComponentFiles(viewSpec, adapter, options) {
|
|
283
|
-
const generator = createReactGenerator(adapter, options);
|
|
284
|
-
const result = generator.generate(viewSpec);
|
|
285
|
-
const files = /* @__PURE__ */ new Map();
|
|
286
|
-
const ext = generator.getFileExtension();
|
|
287
|
-
files.set(`${viewSpec.name}${ext}`, result.code);
|
|
288
|
-
const additionalFiles = generator.getAdditionalFiles(viewSpec);
|
|
289
|
-
for (const [filename, content] of Object.entries(additionalFiles)) {
|
|
290
|
-
files.set(filename, content);
|
|
291
|
-
}
|
|
292
|
-
return files;
|
|
293
|
-
}
|
|
294
|
-
export {
|
|
295
|
-
ReactComponentGenerator,
|
|
296
|
-
createReactGenerator,
|
|
297
|
-
generateReactComponent,
|
|
298
|
-
generateReactComponentFiles
|
|
299
|
-
};
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
function generateRouter(context) {
|
|
2
|
-
const { spec, models = [], views = [] } = context;
|
|
3
|
-
const specViews = views.length > 0 ? views : spec?.views ? Object.entries(spec.views) : [];
|
|
4
|
-
const imports = [];
|
|
5
|
-
const routes = [];
|
|
6
|
-
routes.push(` {
|
|
7
|
-
path: '/',
|
|
8
|
-
element: <div className="home-page">
|
|
9
|
-
<h1>Welcome</h1>
|
|
10
|
-
<nav>
|
|
11
|
-
<ul>
|
|
12
|
-
${generateHomeLinks(specViews, models)}
|
|
13
|
-
</ul>
|
|
14
|
-
</nav>
|
|
15
|
-
</div>
|
|
16
|
-
}`);
|
|
17
|
-
const usedPaths = /* @__PURE__ */ new Set();
|
|
18
|
-
specViews.forEach((viewEntry) => {
|
|
19
|
-
const [viewName, viewDef] = Array.isArray(viewEntry) ? viewEntry : [viewEntry.name, viewEntry];
|
|
20
|
-
const viewType = viewDef?.type || "list";
|
|
21
|
-
const model = Array.isArray(viewDef?.model) ? viewDef.model[0] : viewDef?.model;
|
|
22
|
-
if (!model) return;
|
|
23
|
-
const modelLower = model.toLowerCase();
|
|
24
|
-
const modelPlural = modelLower + "s";
|
|
25
|
-
imports.push(`import ${viewName} from './components/${viewName}';`);
|
|
26
|
-
const basePath = `/${modelPlural}`;
|
|
27
|
-
switch (viewType) {
|
|
28
|
-
case "list":
|
|
29
|
-
const listPath = usedPaths.has(basePath) ? `${basePath}/${viewName.toLowerCase().replace(/view$/, "")}` : basePath;
|
|
30
|
-
if (!usedPaths.has(listPath)) {
|
|
31
|
-
routes.push(` {
|
|
32
|
-
path: '${listPath}',
|
|
33
|
-
element: <${viewName} />
|
|
34
|
-
}`);
|
|
35
|
-
usedPaths.add(listPath);
|
|
36
|
-
}
|
|
37
|
-
break;
|
|
38
|
-
case "detail":
|
|
39
|
-
const detailPath = `${basePath}/:id`;
|
|
40
|
-
if (!usedPaths.has(detailPath)) {
|
|
41
|
-
routes.push(` {
|
|
42
|
-
path: '${detailPath}',
|
|
43
|
-
element: <${viewName} />
|
|
44
|
-
}`);
|
|
45
|
-
usedPaths.add(detailPath);
|
|
46
|
-
}
|
|
47
|
-
break;
|
|
48
|
-
case "form":
|
|
49
|
-
const newPath = `${basePath}/new`;
|
|
50
|
-
const editPath = `${basePath}/:id/edit`;
|
|
51
|
-
if (!usedPaths.has(newPath)) {
|
|
52
|
-
routes.push(` {
|
|
53
|
-
path: '${newPath}',
|
|
54
|
-
element: <${viewName} />
|
|
55
|
-
}`);
|
|
56
|
-
usedPaths.add(newPath);
|
|
57
|
-
}
|
|
58
|
-
if (!usedPaths.has(editPath)) {
|
|
59
|
-
routes.push(` {
|
|
60
|
-
path: '${editPath}',
|
|
61
|
-
element: <${viewName} />
|
|
62
|
-
}`);
|
|
63
|
-
usedPaths.add(editPath);
|
|
64
|
-
}
|
|
65
|
-
break;
|
|
66
|
-
case "dashboard":
|
|
67
|
-
const dashPath = modelLower === "author" || modelLower === "user" ? "/dashboard" : `/dashboard/${modelLower}`;
|
|
68
|
-
if (!usedPaths.has(dashPath)) {
|
|
69
|
-
routes.push(` {
|
|
70
|
-
path: '${dashPath}',
|
|
71
|
-
element: <${viewName} />
|
|
72
|
-
}`);
|
|
73
|
-
usedPaths.add(dashPath);
|
|
74
|
-
}
|
|
75
|
-
break;
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
return `/**
|
|
79
|
-
* React Router Configuration
|
|
80
|
-
* Auto-generated by SpecVerse
|
|
81
|
-
*/
|
|
82
|
-
|
|
83
|
-
import { createBrowserRouter } from 'react-router-dom';
|
|
84
|
-
${imports.join("\n")}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Application Router
|
|
88
|
-
*/
|
|
89
|
-
export const router = createBrowserRouter([
|
|
90
|
-
${routes.join(",\n")}
|
|
91
|
-
]);
|
|
92
|
-
`;
|
|
93
|
-
}
|
|
94
|
-
function generateHomeLinks(views, models) {
|
|
95
|
-
const links = [];
|
|
96
|
-
const usedPaths = /* @__PURE__ */ new Set();
|
|
97
|
-
views.forEach((viewEntry) => {
|
|
98
|
-
const [viewName, viewDef] = Array.isArray(viewEntry) ? viewEntry : [viewEntry.name, viewEntry];
|
|
99
|
-
const viewType = viewDef?.type || "list";
|
|
100
|
-
const model = Array.isArray(viewDef?.model) ? viewDef.model[0] : viewDef?.model;
|
|
101
|
-
if (!model) return;
|
|
102
|
-
const modelLower = model.toLowerCase();
|
|
103
|
-
const modelPlural = modelLower + "s";
|
|
104
|
-
const basePath = `/${modelPlural}`;
|
|
105
|
-
const viewLabel = viewName.replace(/View$/, "").replace(/([A-Z])/g, " $1").trim();
|
|
106
|
-
switch (viewType) {
|
|
107
|
-
case "list":
|
|
108
|
-
const listPath = usedPaths.has(basePath) ? `${basePath}/${viewName.toLowerCase().replace(/view$/, "")}` : basePath;
|
|
109
|
-
if (!usedPaths.has(listPath)) {
|
|
110
|
-
links.push(` <li><a href="${listPath}">${viewLabel}</a></li>`);
|
|
111
|
-
usedPaths.add(listPath);
|
|
112
|
-
}
|
|
113
|
-
break;
|
|
114
|
-
case "form":
|
|
115
|
-
const formPath = `${basePath}/new`;
|
|
116
|
-
if (!usedPaths.has(formPath)) {
|
|
117
|
-
links.push(` <li><a href="${formPath}">Create ${model}</a></li>`);
|
|
118
|
-
usedPaths.add(formPath);
|
|
119
|
-
}
|
|
120
|
-
break;
|
|
121
|
-
case "dashboard":
|
|
122
|
-
const dashPath = modelLower === "author" || modelLower === "user" ? "/dashboard" : `/dashboard/${modelLower}`;
|
|
123
|
-
if (!usedPaths.has(dashPath)) {
|
|
124
|
-
links.push(` <li><a href="${dashPath}">${viewLabel}</a></li>`);
|
|
125
|
-
usedPaths.add(dashPath);
|
|
126
|
-
}
|
|
127
|
-
break;
|
|
128
|
-
case "detail":
|
|
129
|
-
break;
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
return links.join("\n");
|
|
133
|
-
}
|
|
134
|
-
export {
|
|
135
|
-
generateRouter as default
|
|
136
|
-
};
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
function generateRouter(context) {
|
|
2
|
-
const { spec, models = [], views = [] } = context;
|
|
3
|
-
const specViews = views.length > 0 ? views : spec?.views || [];
|
|
4
|
-
const viewsArray = Array.isArray(specViews) ? specViews : Object.values(specViews);
|
|
5
|
-
const modelViews = /* @__PURE__ */ new Map();
|
|
6
|
-
const viewImports = [];
|
|
7
|
-
const routeEntries = [];
|
|
8
|
-
viewsArray.forEach((viewDef) => {
|
|
9
|
-
const viewName = viewDef.name;
|
|
10
|
-
if (!viewName) return;
|
|
11
|
-
const model = Array.isArray(viewDef.model) ? viewDef.model[0] : viewDef.model;
|
|
12
|
-
if (!model) return;
|
|
13
|
-
const viewType = viewDef.type || "list";
|
|
14
|
-
const modelLower = model.toLowerCase();
|
|
15
|
-
const path = `/${modelLower}${viewType}`;
|
|
16
|
-
viewImports.push(`import ${viewName} from './components/${viewName}';`);
|
|
17
|
-
routeEntries.push(` <Route path="${path}" element={<${viewName} />} />`);
|
|
18
|
-
if (!modelViews.has(model)) modelViews.set(model, []);
|
|
19
|
-
modelViews.get(model).push({ name: viewName, type: viewType, path });
|
|
20
|
-
});
|
|
21
|
-
const appName = spec?.componentName || spec?.metadata?.component || spec?.name || "App";
|
|
22
|
-
const sidebarSections = Array.from(modelViews.entries()).map(([model, views2]) => {
|
|
23
|
-
const lower = model.toLowerCase();
|
|
24
|
-
const listView = views2.find((v) => v.type === "list");
|
|
25
|
-
const formView = views2.find((v) => v.type === "form");
|
|
26
|
-
const specialistViews = views2.filter((v) => !["list", "detail", "form"].includes(v.type));
|
|
27
|
-
const specialistLinks = specialistViews.map((v) => {
|
|
28
|
-
const label = v.type.charAt(0).toUpperCase() + v.type.slice(1);
|
|
29
|
-
const icon = v.type === "board" ? "\u25A6" : v.type === "timeline" ? "\u23F1" : v.type === "calendar" ? "\u{1F4C5}" : v.type === "dashboard" ? "\u{1F4CA}" : v.type === "analytics" ? "\u{1F4C8}" : "\u25C6";
|
|
30
|
-
return ` <Link to="${v.path}" className={\`flex items-center gap-2 px-2 py-1.5 rounded text-sm transition-all \${location.pathname === '${v.path}' ? 'bg-blue-50 text-blue-700 font-medium border border-blue-200' : 'text-gray-600 hover:bg-gray-50 hover:text-gray-900 border border-transparent'}\`}>
|
|
31
|
-
<span className="text-xs">${icon}</span> ${label}
|
|
32
|
-
</Link>`;
|
|
33
|
-
}).join("\n");
|
|
34
|
-
return ` {/* ${model} */}
|
|
35
|
-
<div>
|
|
36
|
-
<h3 className="px-2 text-xs font-semibold text-gray-400 uppercase tracking-wider mb-1">${model}s</h3>
|
|
37
|
-
<div className="space-y-0.5">
|
|
38
|
-
${listView ? ` <Link to="${listView.path}" className={\`flex items-center gap-2 px-2 py-1.5 rounded text-sm transition-all \${location.pathname === '${listView.path}' ? 'bg-blue-50 text-blue-700 font-medium border border-blue-200' : 'text-gray-700 hover:bg-gray-50 border border-transparent'}\`}>
|
|
39
|
-
<span className="text-xs">\u2630</span> Browse
|
|
40
|
-
</Link>` : ""}
|
|
41
|
-
${formView ? ` <Link to="${formView.path}" className={\`flex items-center gap-2 px-2 py-1.5 rounded text-sm transition-all \${location.pathname === '${formView.path}' ? 'bg-blue-50 text-blue-700 font-medium border border-blue-200' : 'text-gray-700 hover:bg-gray-50 border border-transparent'}\`}>
|
|
42
|
-
<span className="text-xs">\uFF0B</span> New
|
|
43
|
-
</Link>` : ""}
|
|
44
|
-
${specialistLinks}
|
|
45
|
-
</div>
|
|
46
|
-
</div>`;
|
|
47
|
-
}).join("\n\n");
|
|
48
|
-
const firstModel = Array.from(modelViews.keys())[0]?.toLowerCase() || "unknown";
|
|
49
|
-
const hasDashboard = viewsArray.some((v) => v.type === "dashboard");
|
|
50
|
-
const defaultElement = hasDashboard ? viewsArray.find((v) => v.type === "dashboard")?.name || `${Array.from(modelViews.keys())[0]}ListView` : `${Array.from(modelViews.keys())[0] || "Unknown"}ListView`;
|
|
51
|
-
return `import { BrowserRouter as Router, Routes, Route, Link, useLocation } from 'react-router-dom';
|
|
52
|
-
${viewImports.join("\n")}
|
|
53
|
-
|
|
54
|
-
function Sidebar() {
|
|
55
|
-
const location = useLocation();
|
|
56
|
-
return (
|
|
57
|
-
<aside className="w-60 bg-white border-r border-gray-200 flex flex-col">
|
|
58
|
-
{/* App Header */}
|
|
59
|
-
<div className="px-4 py-5 border-b border-gray-100">
|
|
60
|
-
<h1 className="text-lg font-bold text-gray-900">${appName}</h1>
|
|
61
|
-
<p className="text-xs text-gray-400 mt-0.5">Generated from specification</p>
|
|
62
|
-
</div>
|
|
63
|
-
|
|
64
|
-
{/* Navigation */}
|
|
65
|
-
<nav className="flex-1 overflow-y-auto px-3 py-4 space-y-5">
|
|
66
|
-
${sidebarSections}
|
|
67
|
-
</nav>
|
|
68
|
-
|
|
69
|
-
{/* Footer */}
|
|
70
|
-
<div className="px-4 py-3 border-t border-gray-100 text-xs text-gray-400">
|
|
71
|
-
Powered by SpecVerse
|
|
72
|
-
</div>
|
|
73
|
-
</aside>
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function App() {
|
|
78
|
-
return (
|
|
79
|
-
<Router>
|
|
80
|
-
<div className="flex h-screen bg-gray-50 overflow-hidden">
|
|
81
|
-
<Sidebar />
|
|
82
|
-
<main className="flex-1 overflow-y-auto">
|
|
83
|
-
<Routes>
|
|
84
|
-
<Route path="/" element={<${defaultElement} />} />
|
|
85
|
-
${routeEntries.join("\n")}
|
|
86
|
-
<Route path="*" element={
|
|
87
|
-
<div className="flex items-center justify-center h-full">
|
|
88
|
-
<div className="text-center">
|
|
89
|
-
<h1 className="text-4xl font-bold text-gray-300 mb-2">404</h1>
|
|
90
|
-
<p className="text-gray-500">Page not found</p>
|
|
91
|
-
<Link to="/" className="mt-4 inline-block text-blue-600 hover:text-blue-700 text-sm">\u2190 Back to home</Link>
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
} />
|
|
95
|
-
</Routes>
|
|
96
|
-
</main>
|
|
97
|
-
</div>
|
|
98
|
-
</Router>
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export default App;
|
|
103
|
-
`;
|
|
104
|
-
}
|
|
105
|
-
export {
|
|
106
|
-
generateRouter as default
|
|
107
|
-
};
|