@designos/compiler-web 0.0.0-stage → 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/dist/index.d.ts +15 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/package.json +36 -3
- package/README.md +0 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as _builder_io_mitosis from '@builder.io/mitosis';
|
|
2
|
+
import * as _designos_compiler_core from '@designos/compiler-core';
|
|
3
|
+
import { TargetRegistry, GenerationContext, GenerationResult } from '@designos/compiler-core';
|
|
4
|
+
export { ComponentIR, compileComponent } from '@designos/compiler-core';
|
|
5
|
+
|
|
6
|
+
declare function generateWeb(context: GenerationContext): GenerationResult;
|
|
7
|
+
declare const webTarget: {
|
|
8
|
+
generateProjectRegistry?: ((entries: _designos_compiler_core.CompilerProjectRegistryEntry[]) => _designos_compiler_core.GeneratedFile) | undefined;
|
|
9
|
+
name: "react" | "vue" | "angular" | "html" | "svelte" | "solid" | "alpine" | "builder" | "customElement" | "liquid" | "lit" | "marko" | "mitosis" | "preact" | "qwik" | "reactNative" | "rsc" | "stencil" | "swift" | "taro" | "template" | "webcomponent";
|
|
10
|
+
generate: (context: GenerationContext) => GenerationResult;
|
|
11
|
+
generateMitosis: (component: _builder_io_mitosis.MitosisComponent, options: Record<string, unknown>) => GenerationResult;
|
|
12
|
+
};
|
|
13
|
+
declare function createWebCompiler(): TargetRegistry;
|
|
14
|
+
|
|
15
|
+
export { createWebCompiler, generateWeb, webTarget };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import { createMitosisTarget, TargetRegistry, generateWithMitosis } from "@designos/compiler-core";
|
|
3
|
+
import { compileComponent } from "@designos/compiler-core";
|
|
4
|
+
function generateWeb(context) {
|
|
5
|
+
return generateWithMitosis({ ...context, target: "html" });
|
|
6
|
+
}
|
|
7
|
+
var webTarget = createMitosisTarget("html");
|
|
8
|
+
function createWebCompiler() {
|
|
9
|
+
const registry = new TargetRegistry();
|
|
10
|
+
registry.register(webTarget);
|
|
11
|
+
return registry;
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
compileComponent,
|
|
15
|
+
createWebCompiler,
|
|
16
|
+
generateWeb,
|
|
17
|
+
webTarget
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { createMitosisTarget, TargetRegistry, generateWithMitosis } from \"@designos/compiler-core\";\nimport type { GenerationContext, GenerationResult } from \"@designos/compiler-core\";\n\nexport function generateWeb(context: GenerationContext): GenerationResult {\n return generateWithMitosis({ ...context, target: \"html\" });\n}\nexport const webTarget = createMitosisTarget(\"html\");\nexport function createWebCompiler(): TargetRegistry {\n const registry = new TargetRegistry();\n registry.register(webTarget);\n return registry;\n}\nexport { compileComponent } from \"@designos/compiler-core\";\nexport type { ComponentIR } from \"@designos/compiler-core\";\n"],"mappings":";AAAA,SAAS,qBAAqB,gBAAgB,2BAA2B;AAYzE,SAAS,wBAAwB;AAT1B,SAAS,YAAY,SAA8C;AACxE,SAAO,oBAAoB,EAAE,GAAG,SAAS,QAAQ,OAAO,CAAC;AAC3D;AACO,IAAM,YAAY,oBAAoB,MAAM;AAC5C,SAAS,oBAAoC;AAClD,QAAM,WAAW,IAAI,eAAe;AACpC,WAAS,SAAS,SAAS;AAC3B,SAAO;AACT;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@designos/compiler-web",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"import": "./dist/index.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@designos/compiler-core": "0.1.0"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"typescript": "^5.9.2",
|
|
17
|
+
"tsup": "^8.5.0",
|
|
18
|
+
"vitest": "^3.2.4"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
24
|
+
"main": "./dist/index.js",
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/relacloud/design-os.git",
|
|
32
|
+
"directory": "packages/compiler-web"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"typecheck": "tsc --noEmit",
|
|
36
|
+
"build": "tsup",
|
|
37
|
+
"test": "vitest"
|
|
38
|
+
}
|
|
6
39
|
}
|
package/README.md
DELETED