@uibit/codegen 0.1.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/LICENSE +21 -0
- package/README.md +35 -0
- package/bin/uibit-codegen +2 -0
- package/dist/core/parser.d.ts +6 -0
- package/dist/core/parser.d.ts.map +1 -0
- package/dist/core/parser.js +60 -0
- package/dist/core/parser.js.map +1 -0
- package/dist/core/types.d.ts +49 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/utils.d.ts +36 -0
- package/dist/core/utils.d.ts.map +1 -0
- package/dist/core/utils.js +73 -0
- package/dist/core/utils.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +125 -0
- package/dist/index.js.map +1 -0
- package/dist/templates/angular.d.ts +8 -0
- package/dist/templates/angular.d.ts.map +1 -0
- package/dist/templates/angular.js +192 -0
- package/dist/templates/angular.js.map +1 -0
- package/dist/templates/astro.d.ts +8 -0
- package/dist/templates/astro.d.ts.map +1 -0
- package/dist/templates/astro.js +32 -0
- package/dist/templates/astro.js.map +1 -0
- package/dist/templates/nuxt.d.ts +8 -0
- package/dist/templates/nuxt.d.ts.map +1 -0
- package/dist/templates/nuxt.js +27 -0
- package/dist/templates/nuxt.js.map +1 -0
- package/dist/templates/preact.d.ts +8 -0
- package/dist/templates/preact.d.ts.map +1 -0
- package/dist/templates/preact.js +32 -0
- package/dist/templates/preact.js.map +1 -0
- package/dist/templates/qwik.d.ts +8 -0
- package/dist/templates/qwik.d.ts.map +1 -0
- package/dist/templates/qwik.js +32 -0
- package/dist/templates/qwik.js.map +1 -0
- package/dist/templates/react.d.ts +8 -0
- package/dist/templates/react.d.ts.map +1 -0
- package/dist/templates/react.js +43 -0
- package/dist/templates/react.js.map +1 -0
- package/dist/templates/solid.d.ts +8 -0
- package/dist/templates/solid.d.ts.map +1 -0
- package/dist/templates/solid.js +45 -0
- package/dist/templates/solid.js.map +1 -0
- package/dist/templates/stencil.d.ts +8 -0
- package/dist/templates/stencil.d.ts.map +1 -0
- package/dist/templates/stencil.js +31 -0
- package/dist/templates/stencil.js.map +1 -0
- package/dist/templates/svelte.d.ts +8 -0
- package/dist/templates/svelte.d.ts.map +1 -0
- package/dist/templates/svelte.js +87 -0
- package/dist/templates/svelte.js.map +1 -0
- package/dist/templates/vue.d.ts +8 -0
- package/dist/templates/vue.d.ts.map +1 -0
- package/dist/templates/vue.js +57 -0
- package/dist/templates/vue.js.map +1 -0
- package/package.json +31 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 UIBit Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# @uibit/codegen
|
|
2
|
+
|
|
3
|
+
A generic, high-performance web component wrapper generator for multiple frontend frameworks. It reads a standard Custom Elements Manifest (`custom-elements.json`) and generates native-feeling, tree-shakable wrappers for React, Vue 3, Svelte 5, Angular, SolidJS, Astro, Qwik, and Nuxt 3.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Zero Runtime Dependencies**: The generated wrapper files are written as raw source code or lightweight wrappers (using standard utilities like `@lit/react`), requiring no compilation or heavy libraries in your library's repo.
|
|
8
|
+
- **Tree Shakable**: Generates individual files per component and framework, enabling modern bundlers to optimize your bundle sizes.
|
|
9
|
+
- **Strictly Typed**: Outputs precise TypeScript declarations (`.d.ts`) matching your components' properties, attributes, and custom events.
|
|
10
|
+
- **Svelte 5 Runes**: Automatically templates wrappers using Svelte 5's new `$props()`, `$state()`, and `$effect()` runes.
|
|
11
|
+
- **SSR Friendly**: Generates `"use client";` directives for React/Next.js and safe client-side loading wrappers for Nuxt 3.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -D @uibit/codegen
|
|
17
|
+
# or
|
|
18
|
+
pnpm add -D @uibit/codegen
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
Ensure you have run the Custom Elements Manifest analyzer first:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx @custom-elements-manifest/analyzer analyze --globs "src/**/*.ts" --litelement
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Then run the wrapper generator:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx uibit-codegen --package .
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
This will output all wrappers directly to `./dist/frameworks/` inside your package.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scans the src directory of a component, parses its TypeScript source files into ASTs
|
|
3
|
+
* using oxc-parser, and extracts the names of all exported types (interfaces, type aliases, enums, classes).
|
|
4
|
+
*/
|
|
5
|
+
export declare function resolveExportedTypes(srcDirPath: string): Set<string>;
|
|
6
|
+
//# sourceMappingURL=parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/core/parser.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAsDpE"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { parseSync } from 'oxc-parser';
|
|
4
|
+
/**
|
|
5
|
+
* Scans the src directory of a component, parses its TypeScript source files into ASTs
|
|
6
|
+
* using oxc-parser, and extracts the names of all exported types (interfaces, type aliases, enums, classes).
|
|
7
|
+
*/
|
|
8
|
+
export function resolveExportedTypes(srcDirPath) {
|
|
9
|
+
const exportedTypes = new Set();
|
|
10
|
+
function scanDir(dir) {
|
|
11
|
+
if (!fs.existsSync(dir))
|
|
12
|
+
return;
|
|
13
|
+
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
14
|
+
for (const entry of entries) {
|
|
15
|
+
const fullPath = path.join(dir, entry.name);
|
|
16
|
+
if (entry.isDirectory()) {
|
|
17
|
+
scanDir(fullPath);
|
|
18
|
+
}
|
|
19
|
+
else if (entry.isFile() &&
|
|
20
|
+
entry.name.endsWith('.ts') &&
|
|
21
|
+
!entry.name.endsWith('.d.ts') &&
|
|
22
|
+
!entry.name.endsWith('.test.ts')) {
|
|
23
|
+
try {
|
|
24
|
+
const content = fs.readFileSync(fullPath, 'utf-8');
|
|
25
|
+
const ast = parseSync(entry.name, content);
|
|
26
|
+
for (const node of (ast.program.body || [])) {
|
|
27
|
+
if (node.type === 'ExportNamedDeclaration') {
|
|
28
|
+
if (node.declaration) {
|
|
29
|
+
const decl = node.declaration;
|
|
30
|
+
if (decl.id && typeof decl.id.name === 'string') {
|
|
31
|
+
exportedTypes.add(decl.id.name);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (node.specifiers) {
|
|
35
|
+
for (const specifier of node.specifiers) {
|
|
36
|
+
const spec = specifier;
|
|
37
|
+
if (spec.exported && typeof spec.exported.name === 'string') {
|
|
38
|
+
exportedTypes.add(spec.exported.name);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
else if (node.type === 'ExportDefaultDeclaration') {
|
|
44
|
+
const decl = node.declaration;
|
|
45
|
+
if (decl && decl.id && typeof decl.id.name === 'string') {
|
|
46
|
+
exportedTypes.add(decl.id.name);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
catch (e) {
|
|
52
|
+
console.warn(`Warning: failed to parse ${entry.name}:`, e);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
scanDir(srcDirPath);
|
|
58
|
+
return exportedTypes;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/core/parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAC,UAAkB;IACrD,MAAM,aAAa,GAAG,IAAI,GAAG,EAAU,CAAC;IAExC,SAAS,OAAO,CAAC,GAAW;QAC1B,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CA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AI,CAAC,UAAU,EAAE,CAAC;gCACpB,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;oCACxC,MAAM,IAAI,GAAG,SAAgB,CAAC;oCAC9B,IAAI,IAAI,CAAC,QAAQ,IAAI,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;wCAC5D,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;oCACxC,CAAC;gCACH,CAAC;4BACH,CAAC;wBACH,CAAC;6BAAM,IAAI,IAAI,CAAC,IAAI,KAAK,0BAA0B,EAAE,CAAC;4BACpD,MAAM,IAAI,GAAG,IAAI,CAAC,WAAkB,CAAC;4BACrC,IAAI,IAAI,IAAI,IAAI,CAAC,EAAE,IAAI,OAAO,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;gCACxD,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;4BAClC,CAAC;wBACH,CAAC;oBACH,CAAC;gBACH,CAAC;gBAAC,OAAO,CAAC,EAAE,CAAC;oBACX,OAAO,CAAC,IAAI,CAAC,4BAA4B,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC;gBAC7D,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACpB,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export interface Property {
|
|
2
|
+
name: string;
|
|
3
|
+
type?: {
|
|
4
|
+
text: string;
|
|
5
|
+
};
|
|
6
|
+
description?: string;
|
|
7
|
+
default?: string;
|
|
8
|
+
readonly?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface Event {
|
|
11
|
+
name: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
type?: {
|
|
14
|
+
text: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface Attribute {
|
|
18
|
+
name: string;
|
|
19
|
+
fieldName?: string;
|
|
20
|
+
type?: {
|
|
21
|
+
text: string;
|
|
22
|
+
};
|
|
23
|
+
description?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface Slot {
|
|
26
|
+
name: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface Mixin {
|
|
30
|
+
name: string;
|
|
31
|
+
package?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ComponentMetadata {
|
|
34
|
+
name: string;
|
|
35
|
+
tagName: string;
|
|
36
|
+
properties: Property[];
|
|
37
|
+
events: Event[];
|
|
38
|
+
attributes: Attribute[];
|
|
39
|
+
slots: Slot[];
|
|
40
|
+
referencedTypes: string[];
|
|
41
|
+
mixins?: Mixin[];
|
|
42
|
+
formAssociated?: boolean;
|
|
43
|
+
importPath?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface Plugin {
|
|
46
|
+
name: string;
|
|
47
|
+
generate: (component: ComponentMetadata) => Record<string, string>;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CACzB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,QAAQ,EAAE,CAAC;IACvB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,CAAC,SAAS,EAAE,iBAAiB,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Property, Attribute } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* A helper class to construct code files with clean formatting and spacing.
|
|
4
|
+
*/
|
|
5
|
+
export declare class SourceBuilder {
|
|
6
|
+
private blocks;
|
|
7
|
+
/**
|
|
8
|
+
* Appends a logical block of code (e.g., banner, imports, or declarations).
|
|
9
|
+
*/
|
|
10
|
+
append(block: string): this;
|
|
11
|
+
/**
|
|
12
|
+
* Joins all blocks with a double newline for excellent readability.
|
|
13
|
+
*/
|
|
14
|
+
toString(): string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Converts a kebab-case event name (e.g., 'slide-change') to camelCase prefixed with 'on'.
|
|
18
|
+
*/
|
|
19
|
+
export declare function toReactEventName(eventName: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* Merges properties and attributes into a unique map of names and their TS types.
|
|
22
|
+
*/
|
|
23
|
+
export declare function mergePropertiesAndAttributes(properties: Property[], attributes: Attribute[]): Map<string, string>;
|
|
24
|
+
/**
|
|
25
|
+
* Generates type imports for any custom referenced types.
|
|
26
|
+
*/
|
|
27
|
+
export declare function generateTypeImports(referencedTypes: string[], importPath?: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* Converts a kebab-case or snake-case string to camelCase.
|
|
30
|
+
*/
|
|
31
|
+
export declare function toCamelCase(str: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Capitalizes the first letter of a string.
|
|
34
|
+
*/
|
|
35
|
+
export declare function capitalize(str: string): string;
|
|
36
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/core/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEtD;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAgB;IAE9B;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAM1B;IAED;;OAEG;IACH,QAAQ,IAAI,MAAM,CAEjB;CACF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAM1D;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,UAAU,EAAE,QAAQ,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAYjH;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,eAAe,EAAE,MAAM,EAAE,EAAE,UAAU,GAAE,MAAyB,GAAG,MAAM,CAG5G;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG9C"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A helper class to construct code files with clean formatting and spacing.
|
|
3
|
+
*/
|
|
4
|
+
export class SourceBuilder {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.blocks = [];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Appends a logical block of code (e.g., banner, imports, or declarations).
|
|
10
|
+
*/
|
|
11
|
+
append(block) {
|
|
12
|
+
const trimmed = block.trim();
|
|
13
|
+
if (trimmed) {
|
|
14
|
+
this.blocks.push(trimmed);
|
|
15
|
+
}
|
|
16
|
+
return this;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Joins all blocks with a double newline for excellent readability.
|
|
20
|
+
*/
|
|
21
|
+
toString() {
|
|
22
|
+
return this.blocks.join('\n\n') + '\n';
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Converts a kebab-case event name (e.g., 'slide-change') to camelCase prefixed with 'on'.
|
|
27
|
+
*/
|
|
28
|
+
export function toReactEventName(eventName) {
|
|
29
|
+
const cleanName = eventName.replace(/[^a-zA-Z0-9-]/g, '');
|
|
30
|
+
return 'on' + cleanName
|
|
31
|
+
.split('-')
|
|
32
|
+
.map(word => word.charAt(0).toUpperCase() + word.slice(1))
|
|
33
|
+
.join('');
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Merges properties and attributes into a unique map of names and their TS types.
|
|
37
|
+
*/
|
|
38
|
+
export function mergePropertiesAndAttributes(properties, attributes) {
|
|
39
|
+
const propMap = new Map();
|
|
40
|
+
for (const p of properties) {
|
|
41
|
+
propMap.set(p.name, p.type?.text || 'any');
|
|
42
|
+
}
|
|
43
|
+
for (const attr of attributes) {
|
|
44
|
+
const fieldName = attr.fieldName || attr.name;
|
|
45
|
+
if (!propMap.has(fieldName)) {
|
|
46
|
+
propMap.set(fieldName, attr.type?.text || 'string');
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return propMap;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Generates type imports for any custom referenced types.
|
|
53
|
+
*/
|
|
54
|
+
export function generateTypeImports(referencedTypes, importPath = '../../index.js') {
|
|
55
|
+
if (referencedTypes.length === 0)
|
|
56
|
+
return '';
|
|
57
|
+
return `import type { ${referencedTypes.join(', ')} } from '${importPath}';`;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Converts a kebab-case or snake-case string to camelCase.
|
|
61
|
+
*/
|
|
62
|
+
export function toCamelCase(str) {
|
|
63
|
+
return str.replace(/[-_]([a-z])/g, (g) => g[1].toUpperCase());
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Capitalizes the first letter of a string.
|
|
67
|
+
*/
|
|
68
|
+
export function capitalize(str) {
|
|
69
|
+
if (!str)
|
|
70
|
+
return '';
|
|
71
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/core/utils.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,OAAO,aAAa;IAA1B;QACU,WAAM,GAAa,EAAE,CAAC;IAmBhC,CAAC;IAjBC;;OAEG;IACH,MAAM,CAAC,KAAa;QAClB,MA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IAAI,QAAQ,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,eAAyB,EAAE,UAAU,GAAW,gBAAgB;IAClG,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAC5C,OAAO,iBAAiB,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,UAAU,IAAI,CAAC;AAC/E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,GAAW;IACrC,OAAO,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC,WAAW,EAAE,CAAC,CAAC;AACjE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC;IACpB,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import { reactPlugin } from './templates/react.js';
|
|
5
|
+
import { vuePlugin } from './templates/vue.js';
|
|
6
|
+
import { sveltePlugin } from './templates/svelte.js';
|
|
7
|
+
import { angularPlugin } from './templates/angular.js';
|
|
8
|
+
import { solidPlugin } from './templates/solid.js';
|
|
9
|
+
import { astroPlugin } from './templates/astro.js';
|
|
10
|
+
import { qwikPlugin } from './templates/qwik.js';
|
|
11
|
+
import { nuxtPlugin } from './templates/nuxt.js';
|
|
12
|
+
import { preactPlugin } from './templates/preact.js';
|
|
13
|
+
import { stencilPlugin } from './templates/stencil.js';
|
|
14
|
+
import { resolveExportedTypes } from './core/parser.js';
|
|
15
|
+
const plugins = [
|
|
16
|
+
reactPlugin,
|
|
17
|
+
vuePlugin,
|
|
18
|
+
sveltePlugin,
|
|
19
|
+
angularPlugin,
|
|
20
|
+
solidPlugin,
|
|
21
|
+
astroPlugin,
|
|
22
|
+
qwikPlugin,
|
|
23
|
+
nuxtPlugin,
|
|
24
|
+
preactPlugin,
|
|
25
|
+
stencilPlugin
|
|
26
|
+
];
|
|
27
|
+
function run() {
|
|
28
|
+
const args = process.argv.slice(2);
|
|
29
|
+
const pkgIndex = args.indexOf('--package');
|
|
30
|
+
const pkgDir = pkgIndex !== -1 ? args[pkgIndex + 1] : '.';
|
|
31
|
+
if (!pkgDir) {
|
|
32
|
+
console.error('Error: Please specify a package directory path.');
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
const absolutePkgDir = path.resolve(pkgDir);
|
|
36
|
+
const cemPath = path.join(absolutePkgDir, 'custom-elements.json');
|
|
37
|
+
if (!fs.existsSync(cemPath)) {
|
|
38
|
+
console.error(`Error: custom-elements.json not found at ${cemPath}. Run "npm run analyze" first.`);
|
|
39
|
+
process.exit(1);
|
|
40
|
+
}
|
|
41
|
+
const manifest = JSON.parse(fs.readFileSync(cemPath, 'utf-8'));
|
|
42
|
+
const components = [];
|
|
43
|
+
const pkgJsonPath = path.join(absolutePkgDir, 'package.json');
|
|
44
|
+
let detectedImportPath = '';
|
|
45
|
+
if (fs.existsSync(pkgJsonPath)) {
|
|
46
|
+
try {
|
|
47
|
+
const pkgJson = JSON.parse(fs.readFileSync(pkgJsonPath, 'utf-8'));
|
|
48
|
+
if (pkgJson.name) {
|
|
49
|
+
detectedImportPath = pkgJson.name;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
catch { }
|
|
53
|
+
}
|
|
54
|
+
const importPathIndex = args.indexOf('--import-path');
|
|
55
|
+
const importPath = importPathIndex !== -1 ? args[importPathIndex + 1] : (detectedImportPath || '../../index.js');
|
|
56
|
+
// Extract exported types using TypeScript compiler AST parsing
|
|
57
|
+
const srcDir = path.join(absolutePkgDir, 'src');
|
|
58
|
+
const exportedTypes = resolveExportedTypes(srcDir);
|
|
59
|
+
for (const module of manifest.modules || []) {
|
|
60
|
+
for (const declaration of module.declarations || []) {
|
|
61
|
+
if (declaration.customElement) {
|
|
62
|
+
const properties = (declaration.members || [])
|
|
63
|
+
.filter((m) => m.kind === 'field' && m.privacy !== 'private' && !m.static && !m.readonly)
|
|
64
|
+
.map((m) => ({
|
|
65
|
+
name: m.name,
|
|
66
|
+
type: m.type,
|
|
67
|
+
description: m.description,
|
|
68
|
+
default: m.default,
|
|
69
|
+
readonly: m.readonly
|
|
70
|
+
}));
|
|
71
|
+
const attributes = declaration.attributes || [];
|
|
72
|
+
const events = declaration.events || [];
|
|
73
|
+
const slots = declaration.slots || [];
|
|
74
|
+
const mixins = declaration.mixins || [];
|
|
75
|
+
const formAssociated = declaration.formAssociated === true || mixins.some((m) => m.name === 'FormAssociatedMixin');
|
|
76
|
+
// Identify which exported types are actually used by properties/attributes/events
|
|
77
|
+
const referencedTypes = Array.from(exportedTypes).filter(typeName => {
|
|
78
|
+
const usesType = properties.some((p) => p.type?.text?.includes(typeName)) ||
|
|
79
|
+
attributes.some((a) => a.type?.text?.includes(typeName)) ||
|
|
80
|
+
events.some((e) => e.type?.text?.includes(typeName));
|
|
81
|
+
// Make sure we don't import the class name itself!
|
|
82
|
+
return usesType && typeName !== declaration.name;
|
|
83
|
+
});
|
|
84
|
+
components.push({
|
|
85
|
+
name: declaration.name,
|
|
86
|
+
tagName: declaration.tagName,
|
|
87
|
+
properties,
|
|
88
|
+
events,
|
|
89
|
+
attributes,
|
|
90
|
+
slots,
|
|
91
|
+
referencedTypes,
|
|
92
|
+
mixins,
|
|
93
|
+
formAssociated,
|
|
94
|
+
importPath
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
if (components.length === 0) {
|
|
100
|
+
console.log('No custom elements found in custom-elements.json.');
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
console.log(`Found ${components.length} component(s). Generating wrappers...`);
|
|
104
|
+
for (const component of components) {
|
|
105
|
+
for (const plugin of plugins) {
|
|
106
|
+
const outputDir = path.join(absolutePkgDir, 'dist', 'frameworks', plugin.name);
|
|
107
|
+
fs.mkdirSync(outputDir, { recursive: true });
|
|
108
|
+
const files = plugin.generate(component);
|
|
109
|
+
for (const [filename, content] of Object.entries(files)) {
|
|
110
|
+
const filePath = path.join(outputDir, filename);
|
|
111
|
+
fs.writeFileSync(filePath, content, 'utf-8');
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
console.log('Wrappers successfully generated in dist/frameworks/');
|
|
116
|
+
}
|
|
117
|
+
// Check if running as a CLI
|
|
118
|
+
if (import.meta.url.startsWith('file:')) {
|
|
119
|
+
const modulePath = path.resolve(process.argv[1] || '');
|
|
120
|
+
const currentPath = path.resolve(new URL(import.meta.url).pathname);
|
|
121
|
+
if (modulePath === currentPath || modulePath.endsWith('uibit-codegen') || modulePath.endsWith('index.js')) {
|
|
122
|
+
run();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,O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