@markless/bundler 0.2.2 → 0.3.1
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 +1 -1
- package/dist/preload.d.ts +4 -4
- package/dist/preload.js +2 -2
- package/dist/rolldown-DAsY_7V1.js +4515 -0
- package/dist/rolldown.d.ts +11 -3
- package/dist/rolldown.js +3 -3
- package/dist/{source-module-C8W2THUI.js → source-module-BCEdLQvG.js} +362 -286
- package/dist/source-module-XFgOFX1c.d.ts +8 -0
- package/dist/{types-CzXV_ABj.d.ts → types-BuooJg32.d.ts} +47 -2
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +1298 -115
- package/package.json +6 -6
- package/dist/rolldown-CpG_S-ZJ.js +0 -2554
- package/dist/source-module-BRb5P7wL.d.ts +0 -6
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region src/source-module.d.ts
|
|
2
|
+
declare const MARKLESS_VIRTUAL_PREFIX = "virtual:markless:";
|
|
3
|
+
declare function symbolVirtualModuleSourceFile(moduleId: string): string | null;
|
|
4
|
+
declare function resumeVirtualModuleId(filename: string): string;
|
|
5
|
+
declare function prerenderWakeVirtualModuleId(filename: string): string;
|
|
6
|
+
declare function prerenderWakeVirtualModuleSourceFile(moduleId: string): string | null;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { symbolVirtualModuleSourceFile as a, resumeVirtualModuleId as i, prerenderWakeVirtualModuleId as n, prerenderWakeVirtualModuleSourceFile as r, MARKLESS_VIRTUAL_PREFIX as t };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import * as _$_markless_serializer0 from "@markless/serializer";
|
|
1
2
|
import * as _$_markless_compiler0 from "@markless/compiler";
|
|
3
|
+
import { ArtifactChildMaterialization, ModuleGraphInterfaceArtifact, SemanticGraphArtifact, SemanticGraphInput } from "@markless/compiler";
|
|
2
4
|
|
|
3
5
|
//#region src/types.d.ts
|
|
4
6
|
type MarklessEnvironment = 'client' | 'server' | 'lib';
|
|
@@ -6,6 +8,7 @@ type MarklessClientOutput = 'full' | 'symbols-only';
|
|
|
6
8
|
type MarklessExecutionLogMode = 'auto' | 'never' | 'always';
|
|
7
9
|
interface MarklessDevServer {
|
|
8
10
|
transformRequest: (url: string, environment: MarklessEnvironment) => Promise<unknown> | unknown;
|
|
11
|
+
invalidateModule?: (id: string, environment: MarklessEnvironment) => boolean;
|
|
9
12
|
}
|
|
10
13
|
interface MarklessRolldownOptions {
|
|
11
14
|
dev?: boolean;
|
|
@@ -17,35 +20,77 @@ interface MarklessRolldownOptions {
|
|
|
17
20
|
rootDir?: string;
|
|
18
21
|
buildId?: string;
|
|
19
22
|
}
|
|
20
|
-
type MarklessVirtualModuleType = 'payload' | 'resolver' | 'resume' | 'symbol' | 'style';
|
|
23
|
+
type MarklessVirtualModuleType = 'payload' | 'prerender-wake' | 'render-data' | 'resolver' | 'resume' | 'settle' | 'symbol' | 'trigger-group' | 'style';
|
|
24
|
+
type BuiltPrerenderRecords = {
|
|
25
|
+
readonly state: _$_markless_serializer0.ProtocolStatePayload;
|
|
26
|
+
readonly view: _$_markless_serializer0.ProtocolViewPayload;
|
|
27
|
+
};
|
|
21
28
|
interface MarklessVirtualModule {
|
|
22
29
|
id: string;
|
|
23
30
|
type: MarklessVirtualModuleType;
|
|
24
31
|
source: string;
|
|
25
32
|
symbolId?: string;
|
|
26
33
|
exportName?: string;
|
|
34
|
+
canonicalRenderData?: boolean;
|
|
35
|
+
symbolClaims?: ReadonlyArray<string>;
|
|
27
36
|
}
|
|
28
37
|
interface TransformTsrxModuleInput {
|
|
29
38
|
filename: string;
|
|
30
39
|
source: string;
|
|
40
|
+
dev?: boolean;
|
|
41
|
+
importedModuleInterfaces?: SemanticGraphInput['importedModuleInterfaces'];
|
|
42
|
+
renderDataImportSources?: Readonly<Record<string, string>>;
|
|
43
|
+
artifactChildMaterializations?: Readonly<Record<string, ArtifactChildMaterialization>>;
|
|
31
44
|
symbols?: _$_markless_compiler0.SymbolResolverModuleInput['symbols'];
|
|
32
45
|
devResumeReexport?: boolean;
|
|
33
46
|
buildId?: string;
|
|
34
47
|
environment?: MarklessEnvironment;
|
|
35
48
|
clientOutput?: MarklessClientOutput;
|
|
36
49
|
resumeModuleUrl?: string;
|
|
50
|
+
prerenderWakeModuleUrl?: string;
|
|
51
|
+
settleModuleUrl?: string;
|
|
37
52
|
headInjections?: GlobalInjections[];
|
|
38
53
|
styleModuleUrl?: (virtualModuleId: string) => string;
|
|
39
54
|
executionLog?: MarklessExecutionLogMode;
|
|
40
55
|
executionLogModuleHooks?: boolean;
|
|
41
56
|
inlineResumerDebug?: boolean;
|
|
57
|
+
prerenderRecords?: boolean;
|
|
58
|
+
directCsr?: boolean;
|
|
59
|
+
prerenderWakeVariant?: boolean;
|
|
60
|
+
prerenderWakeFacade?: boolean;
|
|
61
|
+
preserveWakeSiblingClaims?: boolean;
|
|
62
|
+
prerenderRecordData?: BuiltPrerenderRecords;
|
|
63
|
+
runtimeDemandClass?: _$_markless_compiler0.RuntimeDemandClass;
|
|
42
64
|
}
|
|
43
65
|
interface TransformTsrxModuleResult {
|
|
44
66
|
code: string;
|
|
45
67
|
map: null;
|
|
46
68
|
virtualModules: MarklessVirtualModule[];
|
|
47
69
|
manifest: MarklessTransformManifest;
|
|
70
|
+
moduleGraphInterface: ModuleGraphInterfaceArtifact;
|
|
71
|
+
interfaceHash: string;
|
|
72
|
+
moduleImports: SemanticGraphArtifact['moduleImports'];
|
|
73
|
+
artifactChildren: ReadonlyArray<ArtifactChildCandidate>;
|
|
48
74
|
}
|
|
75
|
+
type ArtifactChildCandidate = {
|
|
76
|
+
readonly edgeId: string;
|
|
77
|
+
readonly componentName: string;
|
|
78
|
+
readonly importSource: string;
|
|
79
|
+
readonly importKind: 'default' | 'named' | 'namespace';
|
|
80
|
+
readonly importedName?: string;
|
|
81
|
+
readonly hasChildren: boolean;
|
|
82
|
+
readonly props: ReadonlyArray<{
|
|
83
|
+
readonly name: string;
|
|
84
|
+
readonly kind: string;
|
|
85
|
+
readonly value?: unknown;
|
|
86
|
+
readonly source?: string;
|
|
87
|
+
}>;
|
|
88
|
+
readonly projection?: {
|
|
89
|
+
readonly kind: 'static-markup';
|
|
90
|
+
readonly markup: string;
|
|
91
|
+
readonly elementCount: number;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
49
94
|
interface MarklessTransformManifest {
|
|
50
95
|
source: string;
|
|
51
96
|
captureMetadata?: _$_markless_compiler0.CaptureAnalysisArtifact;
|
|
@@ -110,7 +155,7 @@ interface PreloadGraphContext {
|
|
|
110
155
|
type PreloadGraphEntriesAdder = (context: PreloadGraphContext) => PreloadGraphEntries | undefined;
|
|
111
156
|
type BundleGraphAdder = (manifest: MarklessBuildMetadata) => PreloadGraphEntries | undefined;
|
|
112
157
|
type MarklessRolldownPluginApi = {
|
|
113
|
-
invalidateGeneratedModules: (parent: string, environment?: MarklessEnvironment) => string[]
|
|
158
|
+
invalidateGeneratedModules: (parent: string, environment?: MarklessEnvironment, nextSource?: string) => string[] | Promise<string[]>;
|
|
114
159
|
};
|
|
115
160
|
//#endregion
|
|
116
161
|
export { TransformTsrxModuleInput as _, MarklessBundle as a, MarklessEnvironment as c, MarklessRolldownPluginApi as d, MarklessTransformManifest as f, PreloadGraphEntriesAdder as g, PreloadGraphEntries as h, MarklessBuildMetadata as i, MarklessManifest as l, PreloadGraphContext as m, GlobalInjections as n, MarklessBundleGraph as o, MarklessVirtualModule as p, MarklessAsset as r, MarklessDevServer as s, BundleGraphAdder as t, MarklessRolldownOptions as u, TransformTsrxModuleResult as v };
|
package/dist/vite.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as MarklessEnvironment, g as PreloadGraphEntriesAdder, h as PreloadGraphEntries, i as MarklessBuildMetadata, l as MarklessManifest, m as PreloadGraphContext, n as GlobalInjections, t as BundleGraphAdder, u as MarklessRolldownOptions } from "./types-
|
|
1
|
+
import { c as MarklessEnvironment, g as PreloadGraphEntriesAdder, h as PreloadGraphEntries, i as MarklessBuildMetadata, l as MarklessManifest, m as PreloadGraphContext, n as GlobalInjections, t as BundleGraphAdder, u as MarklessRolldownOptions } from "./types-BuooJg32.js";
|
|
2
2
|
import { Plugin } from "vite";
|
|
3
3
|
|
|
4
4
|
//#region src/vite/index.d.ts
|