@reckona/mreact-compiler 0.0.81 → 0.0.83
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/README.md +15 -0
- package/dist/boundary-graph.d.ts +66 -0
- package/dist/boundary-graph.d.ts.map +1 -0
- package/dist/boundary-graph.js +568 -0
- package/dist/boundary-graph.js.map +1 -0
- package/dist/emit-boundary-lowering.d.ts +43 -0
- package/dist/emit-boundary-lowering.d.ts.map +1 -0
- package/dist/emit-boundary-lowering.js +63 -0
- package/dist/emit-boundary-lowering.js.map +1 -0
- package/dist/emit-code-builder.d.ts +9 -0
- package/dist/emit-code-builder.d.ts.map +1 -0
- package/dist/emit-code-builder.js +17 -0
- package/dist/emit-code-builder.js.map +1 -0
- package/dist/emit-server-stream.d.ts.map +1 -1
- package/dist/emit-server-stream.js +64 -84
- package/dist/emit-server-stream.js.map +1 -1
- package/dist/emit-server.d.ts.map +1 -1
- package/dist/emit-server.js +12 -1
- package/dist/emit-server.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +5 -0
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +14 -1
- package/dist/internal.js.map +1 -1
- package/dist/types.d.ts +16 -69
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +2 -2
- package/src/boundary-graph.ts +904 -0
- package/src/emit-boundary-lowering.ts +165 -0
- package/src/emit-code-builder.ts +27 -0
- package/src/emit-server-stream.ts +61 -152
- package/src/emit-server.ts +12 -1
- package/src/index.ts +16 -0
- package/src/internal.ts +25 -1
- package/src/types.ts +32 -79
package/dist/types.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
export type
|
|
3
|
-
export type
|
|
1
|
+
import type { ClientReferenceMetadata as SharedClientReferenceMetadata, CompileTarget as SharedCompileTarget, CompilerFrontend as SharedCompilerFrontend, ComponentMetadata as SharedComponentMetadata, Diagnostic as SharedDiagnostic, DiagnosticSuggestion as SharedDiagnosticSuggestion, EventHydrationEntryMetadata as SharedEventHydrationEntryMetadata, EventHydrationManifestMetadata as SharedEventHydrationManifestMetadata, ModuleMetadata as SharedModuleMetadata, RuntimeImport as SharedRuntimeImport, ServerBootstrapMode as SharedServerBootstrapMode, ServerOutputMode as SharedServerOutputMode, SourceLocation as SharedSourceLocation, TransformOutput as SharedTransformOutput } from "@reckona/mreact-shared/compiler-contract";
|
|
2
|
+
export type CompileTarget = SharedCompileTarget;
|
|
3
|
+
export type ServerOutputMode = SharedServerOutputMode;
|
|
4
|
+
export type ServerBootstrapMode = SharedServerBootstrapMode;
|
|
4
5
|
export type ParserMode = "oxc";
|
|
5
|
-
export type CompilerFrontend =
|
|
6
|
+
export type CompilerFrontend = SharedCompilerFrontend;
|
|
6
7
|
export type BodyStatementJsxMode = "dom-node" | "compat-object" | "server-string" | "unsupported";
|
|
7
8
|
export interface AnalyzeModuleOptions {
|
|
8
9
|
topLevelJsx?: "diagnostic" | "compat-object" | "server-string";
|
|
@@ -35,69 +36,15 @@ export interface ServerEscapeOptions {
|
|
|
35
36
|
batchImportName: string;
|
|
36
37
|
batchImportSource: string;
|
|
37
38
|
}
|
|
38
|
-
export
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
export
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
suggestion?: DiagnosticSuggestion;
|
|
50
|
-
}
|
|
51
|
-
export interface DiagnosticSuggestion {
|
|
52
|
-
title: string;
|
|
53
|
-
replacement?: string;
|
|
54
|
-
link?: string;
|
|
55
|
-
}
|
|
56
|
-
export interface SourceLocation {
|
|
57
|
-
line: number;
|
|
58
|
-
column: number;
|
|
59
|
-
}
|
|
60
|
-
export interface ModuleMetadata {
|
|
61
|
-
filename: string;
|
|
62
|
-
target: CompileTarget;
|
|
63
|
-
compiler: CompilerMetadata;
|
|
64
|
-
serverOutput?: ServerOutputMode;
|
|
65
|
-
serverBootstrap?: ServerBootstrapMode;
|
|
66
|
-
serverBootstrapNonce?: string;
|
|
67
|
-
serverBootstrapSrc?: string;
|
|
68
|
-
serverHydration?: boolean;
|
|
69
|
-
reactSuspenseRevealScriptSrc?: string;
|
|
70
|
-
components: ComponentMetadata[];
|
|
71
|
-
imports: RuntimeImport[];
|
|
72
|
-
clientReferences?: string[];
|
|
73
|
-
clientReferenceManifest?: ClientReferenceMetadata[];
|
|
74
|
-
serverReferences?: string[];
|
|
75
|
-
eventHydrationManifest?: EventHydrationManifestMetadata;
|
|
76
|
-
}
|
|
77
|
-
export interface CompilerMetadata {
|
|
78
|
-
frontend: CompilerFrontend;
|
|
79
|
-
typescriptFallback: boolean;
|
|
80
|
-
}
|
|
81
|
-
export interface ClientReferenceMetadata {
|
|
82
|
-
name: string;
|
|
83
|
-
moduleId: string;
|
|
84
|
-
exportName: string;
|
|
85
|
-
}
|
|
86
|
-
export interface ComponentMetadata {
|
|
87
|
-
name: string;
|
|
88
|
-
exportName: string;
|
|
89
|
-
}
|
|
90
|
-
export interface RuntimeImport {
|
|
91
|
-
source: string;
|
|
92
|
-
specifiers: string[];
|
|
93
|
-
}
|
|
94
|
-
export interface EventHydrationManifestMetadata {
|
|
95
|
-
version: 1;
|
|
96
|
-
events: EventHydrationEntryMetadata[];
|
|
97
|
-
}
|
|
98
|
-
export interface EventHydrationEntryMetadata {
|
|
99
|
-
id: string;
|
|
100
|
-
event: string;
|
|
101
|
-
handler: string;
|
|
102
|
-
}
|
|
39
|
+
export type TransformOutput = SharedTransformOutput;
|
|
40
|
+
export type Diagnostic = SharedDiagnostic;
|
|
41
|
+
export type DiagnosticSuggestion = SharedDiagnosticSuggestion;
|
|
42
|
+
export type SourceLocation = SharedSourceLocation;
|
|
43
|
+
export type ModuleMetadata = SharedModuleMetadata;
|
|
44
|
+
export type CompilerMetadata = SharedModuleMetadata["compiler"];
|
|
45
|
+
export type ClientReferenceMetadata = SharedClientReferenceMetadata;
|
|
46
|
+
export type ComponentMetadata = SharedComponentMetadata;
|
|
47
|
+
export type RuntimeImport = SharedRuntimeImport;
|
|
48
|
+
export type EventHydrationManifestMetadata = SharedEventHydrationManifestMetadata;
|
|
49
|
+
export type EventHydrationEntryMetadata = SharedEventHydrationEntryMetadata;
|
|
103
50
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,IAAI,6BAA6B,EACxD,aAAa,IAAI,mBAAmB,EACpC,gBAAgB,IAAI,sBAAsB,EAC1C,iBAAiB,IAAI,uBAAuB,EAC5C,UAAU,IAAI,gBAAgB,EAC9B,oBAAoB,IAAI,0BAA0B,EAClD,2BAA2B,IAAI,iCAAiC,EAChE,8BAA8B,IAAI,oCAAoC,EACtE,cAAc,IAAI,oBAAoB,EACtC,aAAa,IAAI,mBAAmB,EACpC,mBAAmB,IAAI,yBAAyB,EAChD,gBAAgB,IAAI,sBAAsB,EAC1C,cAAc,IAAI,oBAAoB,EACtC,eAAe,IAAI,qBAAqB,EACzC,MAAM,0CAA0C,CAAC;AAElD,MAAM,MAAM,aAAa,GAAG,mBAAmB,CAAC;AAChD,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AACtD,MAAM,MAAM,mBAAmB,GAAG,yBAAyB,CAAC;AAC5D,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC;AAC/B,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AAEtD,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,eAAe,GAAG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B,GAAG,0BAA0B,CAAC;AAC9D,MAAM,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAClD,MAAM,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAClD,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAC;AAChE,MAAM,MAAM,uBAAuB,GAAG,6BAA6B,CAAC;AACpE,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,CAAC;AACxD,MAAM,MAAM,aAAa,GAAG,mBAAmB,CAAC;AAChD,MAAM,MAAM,8BAA8B,GAAG,oCAAoC,CAAC;AAClF,MAAM,MAAM,2BAA2B,GAAG,iCAAiC,CAAC"}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n ClientReferenceMetadata as SharedClientReferenceMetadata,\n CompileTarget as SharedCompileTarget,\n CompilerFrontend as SharedCompilerFrontend,\n ComponentMetadata as SharedComponentMetadata,\n Diagnostic as SharedDiagnostic,\n DiagnosticSuggestion as SharedDiagnosticSuggestion,\n EventHydrationEntryMetadata as SharedEventHydrationEntryMetadata,\n EventHydrationManifestMetadata as SharedEventHydrationManifestMetadata,\n ModuleMetadata as SharedModuleMetadata,\n RuntimeImport as SharedRuntimeImport,\n ServerBootstrapMode as SharedServerBootstrapMode,\n ServerOutputMode as SharedServerOutputMode,\n SourceLocation as SharedSourceLocation,\n TransformOutput as SharedTransformOutput,\n} from \"@reckona/mreact-shared/compiler-contract\";\n\nexport type CompileTarget = SharedCompileTarget;\nexport type ServerOutputMode = SharedServerOutputMode;\nexport type ServerBootstrapMode = SharedServerBootstrapMode;\nexport type ParserMode = \"oxc\";\nexport type CompilerFrontend = SharedCompilerFrontend;\n\nexport type BodyStatementJsxMode = \"dom-node\" | \"compat-object\" | \"server-string\" | \"unsupported\";\n\nexport interface AnalyzeModuleOptions {\n topLevelJsx?: \"diagnostic\" | \"compat-object\" | \"server-string\";\n bodyStatementJsx?: BodyStatementJsxMode;\n serverOutput?: ServerOutputMode;\n awaitCompatComponents?: \"diagnostic\" | \"lower\";\n clientBoundaryImports?: readonly string[];\n compatReactNodeReturn?: boolean;\n compatReactNodeReturnRenderMode?: \"react-node\";\n}\n\nexport interface TransformInput {\n code: string;\n filename: string;\n target: CompileTarget;\n dev: boolean;\n sourceMap?: boolean;\n mode?: \"auto\" | \"reactive\" | \"compat\";\n parser?: ParserMode;\n serverOutput?: ServerOutputMode;\n serverBootstrap?: ServerBootstrapMode;\n serverBootstrapNonce?: string;\n serverBootstrapSrc?: string;\n serverHydration?: boolean;\n serverAwaitHydration?: boolean;\n clientBoundaryImports?: readonly string[];\n serverEscape?: ServerEscapeOptions;\n reactSuspenseRevealScriptSrc?: string;\n}\n\nexport interface ServerEscapeOptions {\n batchImportName: string;\n batchImportSource: string;\n}\n\nexport type TransformOutput = SharedTransformOutput;\nexport type Diagnostic = SharedDiagnostic;\nexport type DiagnosticSuggestion = SharedDiagnosticSuggestion;\nexport type SourceLocation = SharedSourceLocation;\nexport type ModuleMetadata = SharedModuleMetadata;\nexport type CompilerMetadata = SharedModuleMetadata[\"compiler\"];\nexport type ClientReferenceMetadata = SharedClientReferenceMetadata;\nexport type ComponentMetadata = SharedComponentMetadata;\nexport type RuntimeImport = SharedRuntimeImport;\nexport type EventHydrationManifestMetadata = SharedEventHydrationManifestMetadata;\nexport type EventHydrationEntryMetadata = SharedEventHydrationEntryMetadata;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reckona/mreact-compiler",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.83",
|
|
4
4
|
"description": "Compiler passes and OXC-backed JSX analysis for mreact.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compiler",
|
|
@@ -50,6 +50,6 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"oxc-parser": "0.129.0",
|
|
52
52
|
"oxc-transform": "0.129.0",
|
|
53
|
-
"@reckona/mreact-shared": "0.0.
|
|
53
|
+
"@reckona/mreact-shared": "0.0.83"
|
|
54
54
|
}
|
|
55
55
|
}
|