sinwan-compiler 0.3.1 → 1.0.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/analyze.d.ts +1 -1
- package/dist/ast/generate.d.ts +16 -0
- package/dist/ast/index.d.ts +8 -0
- package/dist/ast/node.d.ts +147 -0
- package/dist/ast/parse.d.ts +19 -0
- package/dist/ast/path.d.ts +116 -0
- package/dist/ast/traverse.d.ts +4 -0
- package/dist/ast/types.d.ts +267 -0
- package/dist/auto-cc.d.ts +1 -1
- package/dist/chunk-rshqq0t3.js +4190 -0
- package/dist/cli.js +1 -1
- package/dist/exports.d.ts +7 -6
- package/dist/index.js +345 -132
- package/dist/live-cc-destructure.d.ts +1 -1
- package/dist/reactive-wrap.d.ts +4 -2
- package/dist/transform.d.ts +3 -0
- package/docs/api.md +3 -3
- package/docs/architecture.md +18 -0
- package/docs/plugins.md +9 -8
- package/docs/transform.md +322 -21
- package/package.json +5 -9
- package/dist/chunk-fadpxq9v.js +0 -2428
package/dist/cli.js
CHANGED
package/dist/exports.d.ts
CHANGED
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
* Shared utility for detecting top-level exported component bindings in a
|
|
5
5
|
* module. Used by the Vite and Bun plugins for HMR boundary injection.
|
|
6
6
|
*
|
|
7
|
-
* Detection is intentionally conservative: only top-level exports
|
|
8
|
-
* starts with an uppercase letter (the component naming
|
|
9
|
-
* returned.
|
|
10
|
-
*
|
|
7
|
+
* Detection is intentionally conservative: only top-level *value* exports
|
|
8
|
+
* whose name starts with an uppercase letter (the component naming
|
|
9
|
+
* convention) are returned. Type-only exports (`export type { Foo }`,
|
|
10
|
+
* `export { type Foo }`) must be skipped: HMR footers reference the local
|
|
11
|
+
* binding, and a type has no runtime binding (`ReferenceError`).
|
|
11
12
|
*/
|
|
12
13
|
export interface ExportedComponent {
|
|
13
14
|
/** Local binding name in the module (referenced in the accept callback). */
|
|
@@ -18,8 +19,8 @@ export interface ExportedComponent {
|
|
|
18
19
|
/**
|
|
19
20
|
* Collect top-level exported component bindings from a module source string.
|
|
20
21
|
*
|
|
21
|
-
* Parses the source with
|
|
22
|
-
* find functions and variables whose name starts with an uppercase letter.
|
|
22
|
+
* Parses the source with oxc-parser, then walks top-level export declarations
|
|
23
|
+
* to find functions and variables whose name starts with an uppercase letter.
|
|
23
24
|
*
|
|
24
25
|
* Returns an array of `{ local, key }` pairs. Returns an empty array if the
|
|
25
26
|
* source cannot be parsed.
|