@vesk/compiler 0.2.25 → 0.2.27
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/client-codegen.d.ts +15 -0
- package/dist/client-codegen.d.ts.map +1 -1
- package/dist/client-codegen.js +343 -73
- package/dist/errors.d.ts +3 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +22 -1
- package/dist/ir-generator.d.ts.map +1 -1
- package/dist/ir-generator.js +200 -22
- package/dist/ir.d.ts +24 -1
- package/dist/ir.d.ts.map +1 -1
- package/dist/ir.js +28 -0
- package/dist/module-imports.d.ts +22 -1
- package/dist/module-imports.d.ts.map +1 -1
- package/dist/module-imports.js +177 -2
- package/dist/server-jsgen.d.ts.map +1 -1
- package/dist/server-jsgen.js +57 -24
- package/dist/server-render.d.ts.map +1 -1
- package/dist/server-render.js +20 -15
- package/package.json +2 -2
package/dist/client-codegen.d.ts
CHANGED
|
@@ -16,6 +16,20 @@ export declare function collectTrackedNames(body: IRNode[]): Map<string, Tracked
|
|
|
16
16
|
* normal vesk parser so TS generics and `.vsk` syntax survive.
|
|
17
17
|
*/
|
|
18
18
|
export declare function transformTrackedInit(init: string, tracked: Map<string, TrackedInfo>): string;
|
|
19
|
+
/** Shared counter for generated `$n` identifiers. */
|
|
20
|
+
export type NameAlloc = {
|
|
21
|
+
c: number;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Allocates a disjoint `$n` name block per source file. esbuild's bundler
|
|
25
|
+
* renames colliding top-level symbols when it links a chunk, and on 0.25.x
|
|
26
|
+
* that rename can leave references inside nested closures pointing at the
|
|
27
|
+
* pre-rename name — surfacing as `$nNN is not defined` at hydration. Seeding
|
|
28
|
+
* every file from a hash of its path keeps the names globally unique so the
|
|
29
|
+
* renamer has nothing to rename. Callers without a `sourcePath` keep the
|
|
30
|
+
* historical `$n0…` numbering.
|
|
31
|
+
*/
|
|
32
|
+
export declare function nameAllocFor(sourcePath?: string, start?: number): NameAlloc;
|
|
19
33
|
declare function isStaticIR(body: IRNode[]): boolean;
|
|
20
34
|
export declare function escapeHtml(str: string): string;
|
|
21
35
|
export declare function compileClient(source: string, _componentName: string | null, options?: {
|
|
@@ -24,6 +38,7 @@ export declare function compileClient(source: string, _componentName: string | n
|
|
|
24
38
|
includeTopLevel?: boolean;
|
|
25
39
|
sourcePath?: string;
|
|
26
40
|
mdRoots?: string[];
|
|
41
|
+
nameAllocator?: NameAlloc;
|
|
27
42
|
}): string;
|
|
28
43
|
/**
|
|
29
44
|
* Compiles a component source in BOTH client modes (plain + hydrate)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-codegen.d.ts","sourceRoot":"","sources":["../src/client-codegen.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAuB,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAGL,cAAc,EAQd,gBAAgB,
|
|
1
|
+
{"version":3,"file":"client-codegen.d.ts","sourceRoot":"","sources":["../src/client-codegen.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAuB,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAGL,cAAc,EAQd,gBAAgB,EASjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAyCxD,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;CAC1B;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAI1D;AAiDD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,gBAAgB,GAAG,cAAc,EAAE,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,MAAM,CAwGlI;AAID,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,MAA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