|
|
@ -19,9 +19,6 @@ import type {
|
|
|
|
} from 'estree';
|
|
|
|
} from 'estree';
|
|
|
|
import type { Scope } from '../phases/scope';
|
|
|
|
import type { Scope } from '../phases/scope';
|
|
|
|
import type { _CSS } from './css';
|
|
|
|
import type { _CSS } from './css';
|
|
|
|
import type { FragmentAnalysis } from '../phases/2-analyze/types';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type FragmentMetadata = Omit<FragmentAnalysis, 'node'>;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* - `html` — the default, for e.g. `<div>` or `<span>`
|
|
|
|
* - `html` — the default, for e.g. `<div>` or `<span>`
|
|
|
@ -48,7 +45,7 @@ export namespace AST {
|
|
|
|
type: 'Fragment';
|
|
|
|
type: 'Fragment';
|
|
|
|
nodes: Array<Text | Tag | ElementLike | Block | Comment>;
|
|
|
|
nodes: Array<Text | Tag | ElementLike | Block | Comment>;
|
|
|
|
/** @internal */
|
|
|
|
/** @internal */
|
|
|
|
metadata: Partial<FragmentMetadata> & {
|
|
|
|
metadata: {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Fragments declare their own scopes. A transparent fragment is one whose scope
|
|
|
|
* Fragments declare their own scopes. A transparent fragment is one whose scope
|
|
|
|
* is not represented by a scope in the resulting JavaScript (e.g. an element scope),
|
|
|
|
* is not represented by a scope in the resulting JavaScript (e.g. an element scope),
|
|
|
@ -59,6 +56,7 @@ export namespace AST {
|
|
|
|
* Whether or not we need to traverse into the fragment during mount/hydrate
|
|
|
|
* Whether or not we need to traverse into the fragment during mount/hydrate
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
dynamic: boolean;
|
|
|
|
dynamic: boolean;
|
|
|
|
|
|
|
|
has_await: boolean;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|