mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Clean up TS types
This commit is contained in:
parent
0932401433
commit
458454dae5
164 changed files with 188 additions and 4936 deletions
|
@ -1 +0,0 @@
|
|||
src/compiler.js
|
32
package-lock.json
generated
32
package-lock.json
generated
|
@ -791,6 +791,12 @@
|
|||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"dev": true
|
||||
},
|
||||
"colorette": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz",
|
||||
"integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==",
|
||||
"dev": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
|
@ -2194,6 +2200,12 @@
|
|||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
},
|
||||
"nanoid": {
|
||||
"version": "3.1.22",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.22.tgz",
|
||||
"integrity": "sha512-/2ZUaJX2ANuLtTvqTlgqBQNJoQO398KyJgZloL0PZkC0dpysjncRUPsFe3DUPzz/y3h+u7C46np8RMuvF3jsSQ==",
|
||||
"dev": true
|
||||
},
|
||||
"natural-compare": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
|
||||
|
@ -2416,6 +2428,17 @@
|
|||
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
|
||||
},
|
||||
"postcss": {
|
||||
"version": "8.2.8",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.8.tgz",
|
||||
"integrity": "sha512-1F0Xb2T21xET7oQV9eKuctbM9S7BC0fetoHCc4H13z0PT6haiRLP4T0ZY4XWh7iLP0usgqykT6p9B2RtOf4FPw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"colorette": "^1.2.2",
|
||||
"nanoid": "^3.1.20",
|
||||
"source-map": "^0.6.1"
|
||||
}
|
||||
},
|
||||
"preact": {
|
||||
"version": "10.5.12",
|
||||
"resolved": "https://registry.npmjs.org/preact/-/preact-10.5.12.tgz",
|
||||
|
@ -2691,6 +2714,15 @@
|
|||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
|
||||
},
|
||||
"sass": {
|
||||
"version": "1.32.8",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.32.8.tgz",
|
||||
"integrity": "sha512-Sl6mIeGpzjIUZqvKnKETfMf0iDAswD9TNlv13A7aAF3XZlRPMq4VvJWBC2N2DXbp94MQVdNSFG6LfF/iOXrPHQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chokidar": ">=2.0.0 <4.0.0"
|
||||
}
|
||||
},
|
||||
"scheduler": {
|
||||
"version": "0.20.1",
|
||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.1.tgz",
|
||||
|
|
|
@ -59,9 +59,11 @@
|
|||
"eslint-plugin-prettier": "^3.3.1",
|
||||
"estree-walker": "^3.0.0",
|
||||
"nodemon": "^2.0.7",
|
||||
"postcss": "^8.2.8",
|
||||
"preact": "^10.5.12",
|
||||
"preact-render-to-string": "^5.1.14",
|
||||
"prettier": "^2.2.1",
|
||||
"sass": "^1.32.8",
|
||||
"typescript": "^4.2.3"
|
||||
}
|
||||
}
|
||||
|
|
22
src/@types/compiler/Stats.d.ts
vendored
22
src/@types/compiler/Stats.d.ts
vendored
|
@ -1,22 +0,0 @@
|
|||
interface Timing {
|
||||
label: string;
|
||||
start: number;
|
||||
end: number;
|
||||
children: Timing[];
|
||||
}
|
||||
export default class Stats {
|
||||
start_time: number;
|
||||
current_timing: Timing;
|
||||
current_children: Timing[];
|
||||
timings: Timing[];
|
||||
stack: Timing[];
|
||||
constructor();
|
||||
start(label: any): void;
|
||||
stop(label: any): void;
|
||||
render(): {
|
||||
timings: {
|
||||
total: number;
|
||||
};
|
||||
};
|
||||
}
|
||||
export {};
|
138
src/@types/compiler/compile/Component.d.ts
vendored
138
src/@types/compiler/compile/Component.d.ts
vendored
|
@ -1,138 +0,0 @@
|
|||
import Stats from '../Stats';
|
||||
import { Scope } from './utils/scope';
|
||||
import Stylesheet from './css/Stylesheet';
|
||||
import Fragment from './nodes/Fragment';
|
||||
import { Ast, CompileOptions, Var, Warning, CssResult } from '../interfaces';
|
||||
import TemplateScope from './nodes/shared/TemplateScope';
|
||||
import Slot from './nodes/Slot';
|
||||
import { Node, ImportDeclaration, Identifier } from 'estree';
|
||||
import Element from './nodes/Element';
|
||||
interface ComponentOptions {
|
||||
namespace?: string;
|
||||
tag?: string;
|
||||
immutable?: boolean;
|
||||
accessors?: boolean;
|
||||
preserveWhitespace?: boolean;
|
||||
}
|
||||
export default class Component {
|
||||
stats: Stats;
|
||||
warnings: Warning[];
|
||||
ignores: Set<string>;
|
||||
ignore_stack: Array<Set<string>>;
|
||||
ast: Ast;
|
||||
original_ast: Ast;
|
||||
source: string;
|
||||
name: Identifier;
|
||||
compile_options: CompileOptions;
|
||||
fragment: Fragment;
|
||||
module_scope: Scope;
|
||||
instance_scope: Scope;
|
||||
instance_scope_map: WeakMap<Node, Scope>;
|
||||
component_options: ComponentOptions;
|
||||
namespace: string;
|
||||
tag: string;
|
||||
accessors: boolean;
|
||||
vars: Var[];
|
||||
var_lookup: Map<string, Var>;
|
||||
imports: ImportDeclaration[];
|
||||
hoistable_nodes: Set<Node>;
|
||||
node_for_declaration: Map<string, Node>;
|
||||
partly_hoisted: Array<Node | Node[]>;
|
||||
fully_hoisted: Array<Node | Node[]>;
|
||||
reactive_declarations: Array<{
|
||||
assignees: Set<string>;
|
||||
dependencies: Set<string>;
|
||||
node: Node;
|
||||
declaration: Node;
|
||||
}>;
|
||||
reactive_declaration_nodes: Set<Node>;
|
||||
has_reactive_assignments: boolean;
|
||||
injected_reactive_declaration_vars: Set<string>;
|
||||
helpers: Map<string, Identifier>;
|
||||
globals: Map<string, Identifier>;
|
||||
indirect_dependencies: Map<string, Set<string>>;
|
||||
file: string;
|
||||
locate: (
|
||||
c: number
|
||||
) => {
|
||||
line: number;
|
||||
column: number;
|
||||
};
|
||||
elements: Element[];
|
||||
stylesheet: Stylesheet;
|
||||
aliases: Map<string, Identifier>;
|
||||
used_names: Set<string>;
|
||||
globally_used_names: Set<string>;
|
||||
slots: Map<string, Slot>;
|
||||
slot_outlets: Set<string>;
|
||||
constructor(ast: Ast, source: string, name: string, compile_options: CompileOptions, stats: Stats, warnings: Warning[]);
|
||||
add_var(variable: Var): void;
|
||||
add_reference(name: string): void;
|
||||
alias(name: string): Identifier;
|
||||
apply_stylesheet(element: Element): void;
|
||||
global(name: string): Identifier;
|
||||
generate(result?: {
|
||||
js: Node[];
|
||||
css: CssResult;
|
||||
}): {
|
||||
js: any;
|
||||
css: any;
|
||||
ast: Ast;
|
||||
warnings: Warning[];
|
||||
vars: {
|
||||
name: string;
|
||||
export_name: string;
|
||||
injected: boolean;
|
||||
module: boolean;
|
||||
mutated: boolean;
|
||||
reassigned: boolean;
|
||||
referenced: boolean;
|
||||
writable: boolean;
|
||||
referenced_from_script: boolean;
|
||||
}[];
|
||||
stats: {
|
||||
timings: {
|
||||
total: number;
|
||||
};
|
||||
};
|
||||
};
|
||||
get_unique_name(name: string, scope?: Scope): Identifier;
|
||||
get_unique_name_maker(): (name: string) => Identifier;
|
||||
error(
|
||||
pos: {
|
||||
start: number;
|
||||
end: number;
|
||||
},
|
||||
e: {
|
||||
code: string;
|
||||
message: string;
|
||||
}
|
||||
): void;
|
||||
warn(
|
||||
pos: {
|
||||
start: number;
|
||||
end: number;
|
||||
},
|
||||
warning: {
|
||||
code: string;
|
||||
message: string;
|
||||
}
|
||||
): void;
|
||||
extract_imports(node: any): void;
|
||||
extract_exports(node: any): any;
|
||||
extract_javascript(script: any): any;
|
||||
walk_module_js(): void;
|
||||
walk_instance_js_pre_template(): void;
|
||||
walk_instance_js_post_template(): void;
|
||||
post_template_walk(): void;
|
||||
track_references_and_mutations(): void;
|
||||
warn_on_undefined_store_value_references(node: Node, parent: Node, prop: string, scope: Scope): void;
|
||||
loop_protect(node: any, scope: Scope, timeout: number): Node | null;
|
||||
rewrite_props(get_insert: (variable: Var) => Node[]): void;
|
||||
hoist_instance_declarations(): void;
|
||||
extract_reactive_declarations(): void;
|
||||
warn_if_undefined(name: string, node: any, template_scope: TemplateScope): void;
|
||||
push_ignores(ignores: any): void;
|
||||
pop_ignores(): void;
|
||||
}
|
||||
export {};
|
24
src/@types/compiler/compile/create_module.d.ts
vendored
24
src/@types/compiler/compile/create_module.d.ts
vendored
|
@ -1,24 +0,0 @@
|
|||
import { ModuleFormat } from '../interfaces';
|
||||
import { Identifier, ImportDeclaration } from 'estree';
|
||||
interface Export {
|
||||
name: string;
|
||||
as: string;
|
||||
}
|
||||
export default function create_module(
|
||||
program: any,
|
||||
format: ModuleFormat,
|
||||
name: Identifier,
|
||||
banner: string,
|
||||
sveltePath: string,
|
||||
helpers: Array<{
|
||||
name: string;
|
||||
alias: Identifier;
|
||||
}>,
|
||||
globals: Array<{
|
||||
name: string;
|
||||
alias: Identifier;
|
||||
}>,
|
||||
imports: ImportDeclaration[],
|
||||
module_exports: Export[]
|
||||
): void;
|
||||
export {};
|
30
src/@types/compiler/compile/css/Selector.d.ts
vendored
30
src/@types/compiler/compile/css/Selector.d.ts
vendored
|
@ -1,30 +0,0 @@
|
|||
import MagicString from 'magic-string';
|
||||
import Stylesheet from './Stylesheet';
|
||||
import { CssNode } from './interfaces';
|
||||
import Component from '../Component';
|
||||
import Element from '../nodes/Element';
|
||||
export default class Selector {
|
||||
node: CssNode;
|
||||
stylesheet: Stylesheet;
|
||||
blocks: Block[];
|
||||
local_blocks: Block[];
|
||||
used: boolean;
|
||||
constructor(node: CssNode, stylesheet: Stylesheet);
|
||||
apply(node: Element): void;
|
||||
minify(code: MagicString): void;
|
||||
transform(code: MagicString, attr: string, max_amount_class_specificity_increased: number): void;
|
||||
validate(component: Component): void;
|
||||
get_amount_class_specificity_increased(): number;
|
||||
}
|
||||
declare class Block {
|
||||
global: boolean;
|
||||
host: boolean;
|
||||
combinator: CssNode;
|
||||
selectors: CssNode[];
|
||||
start: number;
|
||||
end: number;
|
||||
should_encapsulate: boolean;
|
||||
constructor(combinator: CssNode);
|
||||
add(selector: CssNode): void;
|
||||
}
|
||||
export {};
|
77
src/@types/compiler/compile/css/Stylesheet.d.ts
vendored
77
src/@types/compiler/compile/css/Stylesheet.d.ts
vendored
|
@ -1,77 +0,0 @@
|
|||
import MagicString from 'magic-string';
|
||||
import Selector from './Selector';
|
||||
import Element from '../nodes/Element';
|
||||
import { Ast, CssHashGetter } from '../../interfaces';
|
||||
import Component from '../Component';
|
||||
import { CssNode } from './interfaces';
|
||||
declare class Rule {
|
||||
selectors: Selector[];
|
||||
declarations: Declaration[];
|
||||
node: CssNode;
|
||||
parent: Atrule;
|
||||
constructor(node: CssNode, stylesheet: any, parent?: Atrule);
|
||||
apply(node: Element): void;
|
||||
is_used(dev: boolean): boolean;
|
||||
minify(code: MagicString, _dev: boolean): void;
|
||||
transform(code: MagicString, id: string, keyframes: Map<string, string>, max_amount_class_specificity_increased: number): boolean;
|
||||
validate(component: Component): void;
|
||||
warn_on_unused_selector(handler: (selector: Selector) => void): void;
|
||||
get_max_amount_class_specificity_increased(): number;
|
||||
}
|
||||
declare class Declaration {
|
||||
node: CssNode;
|
||||
constructor(node: CssNode);
|
||||
transform(code: MagicString, keyframes: Map<string, string>): void;
|
||||
minify(code: MagicString): void;
|
||||
}
|
||||
declare class Atrule {
|
||||
node: CssNode;
|
||||
children: Array<Atrule | Rule>;
|
||||
declarations: Declaration[];
|
||||
constructor(node: CssNode);
|
||||
apply(node: Element): void;
|
||||
is_used(_dev: boolean): boolean;
|
||||
minify(code: MagicString, dev: boolean): void;
|
||||
transform(code: MagicString, id: string, keyframes: Map<string, string>, max_amount_class_specificity_increased: number): void;
|
||||
validate(component: Component): void;
|
||||
warn_on_unused_selector(handler: (selector: Selector) => void): void;
|
||||
get_max_amount_class_specificity_increased(): any;
|
||||
}
|
||||
export default class Stylesheet {
|
||||
source: string;
|
||||
ast: Ast;
|
||||
filename: string;
|
||||
dev: boolean;
|
||||
has_styles: boolean;
|
||||
id: string;
|
||||
children: Array<Rule | Atrule>;
|
||||
keyframes: Map<string, string>;
|
||||
nodes_with_css_class: Set<CssNode>;
|
||||
constructor({
|
||||
source,
|
||||
ast,
|
||||
component_name,
|
||||
filename,
|
||||
dev,
|
||||
get_css_hash,
|
||||
}: {
|
||||
source: string;
|
||||
ast: Ast;
|
||||
filename: string | undefined;
|
||||
component_name: string | undefined;
|
||||
dev: boolean;
|
||||
get_css_hash: CssHashGetter;
|
||||
});
|
||||
apply(node: Element): void;
|
||||
reify(): void;
|
||||
render(
|
||||
file: string,
|
||||
should_transform_selectors: boolean
|
||||
): {
|
||||
code: string;
|
||||
map: import('magic-string').SourceMap;
|
||||
};
|
||||
validate(component: Component): void;
|
||||
warn_on_unused_selectors(component: Component): void;
|
||||
}
|
||||
export {};
|
|
@ -1,3 +0,0 @@
|
|||
import { Node } from 'estree';
|
||||
export declare const UNKNOWN: {};
|
||||
export declare function gather_possible_values(node: Node, set: Set<string | {}>): void;
|
|
@ -1,6 +0,0 @@
|
|||
export interface CssNode {
|
||||
type: string;
|
||||
start: number;
|
||||
end: number;
|
||||
[prop_name: string]: any;
|
||||
}
|
26
src/@types/compiler/compile/index.d.ts
vendored
26
src/@types/compiler/compile/index.d.ts
vendored
|
@ -1,26 +0,0 @@
|
|||
import { CompileOptions, Warning } from '../interfaces';
|
||||
export default function compile(
|
||||
source: string,
|
||||
options?: CompileOptions
|
||||
): {
|
||||
js: any;
|
||||
css: any;
|
||||
ast: import('../interfaces').Ast;
|
||||
warnings: Warning[];
|
||||
vars: {
|
||||
name: string;
|
||||
export_name: string;
|
||||
injected: boolean;
|
||||
module: boolean;
|
||||
mutated: boolean;
|
||||
reassigned: boolean;
|
||||
referenced: boolean;
|
||||
writable: boolean;
|
||||
referenced_from_script: boolean;
|
||||
}[];
|
||||
stats: {
|
||||
timings: {
|
||||
total: number;
|
||||
};
|
||||
};
|
||||
};
|
|
@ -1,2 +0,0 @@
|
|||
declare const _default: Set<string>;
|
||||
export default _default;
|
13
src/@types/compiler/compile/nodes/Action.d.ts
vendored
13
src/@types/compiler/compile/nodes/Action.d.ts
vendored
|
@ -1,13 +0,0 @@
|
|||
import Node from './shared/Node';
|
||||
import Expression from './shared/Expression';
|
||||
import Component from '../Component';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { Directive } from '../../interfaces';
|
||||
export default class Action extends Node {
|
||||
type: 'Action';
|
||||
name: string;
|
||||
expression: Expression;
|
||||
uses_context: boolean;
|
||||
template_scope: TemplateScope;
|
||||
constructor(component: Component, parent: Node, scope: TemplateScope, info: Directive);
|
||||
}
|
12
src/@types/compiler/compile/nodes/Animation.d.ts
vendored
12
src/@types/compiler/compile/nodes/Animation.d.ts
vendored
|
@ -1,12 +0,0 @@
|
|||
import Node from './shared/Node';
|
||||
import Expression from './shared/Expression';
|
||||
import Component from '../Component';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
import Element from './Element';
|
||||
export default class Animation extends Node {
|
||||
type: 'Animation';
|
||||
name: string;
|
||||
expression: Expression;
|
||||
constructor(component: Component, parent: Element, scope: TemplateScope, info: TemplateNode);
|
||||
}
|
102
src/@types/compiler/compile/nodes/Attribute.d.ts
vendored
102
src/@types/compiler/compile/nodes/Attribute.d.ts
vendored
|
@ -1,102 +0,0 @@
|
|||
import Component from '../Component';
|
||||
import Node from './shared/Node';
|
||||
import Element from './Element';
|
||||
import Text from './Text';
|
||||
import Expression from './shared/Expression';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
export default class Attribute extends Node {
|
||||
type: 'Attribute' | 'Spread';
|
||||
start: number;
|
||||
end: number;
|
||||
scope: TemplateScope;
|
||||
component: Component;
|
||||
parent: Element;
|
||||
name: string;
|
||||
is_spread: boolean;
|
||||
is_true: boolean;
|
||||
is_static: boolean;
|
||||
expression?: Expression;
|
||||
chunks: Array<Text | Expression>;
|
||||
dependencies: Set<string>;
|
||||
constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode);
|
||||
get_dependencies(): string[];
|
||||
get_value(
|
||||
block: any
|
||||
):
|
||||
| import('estree').Identifier
|
||||
| import('estree').SimpleLiteral
|
||||
| import('estree').RegExpLiteral
|
||||
| import('estree').Program
|
||||
| import('estree').FunctionDeclaration
|
||||
| import('estree').FunctionExpression
|
||||
| import('estree').ArrowFunctionExpression
|
||||
| import('estree').SwitchCase
|
||||
| import('estree').CatchClause
|
||||
| import('estree').VariableDeclarator
|
||||
| import('estree').ExpressionStatement
|
||||
| import('estree').BlockStatement
|
||||
| import('estree').EmptyStatement
|
||||
| import('estree').DebuggerStatement
|
||||
| import('estree').WithStatement
|
||||
| import('estree').ReturnStatement
|
||||
| import('estree').LabeledStatement
|
||||
| import('estree').BreakStatement
|
||||
| import('estree').ContinueStatement
|
||||
| import('estree').IfStatement
|
||||
| import('estree').SwitchStatement
|
||||
| import('estree').ThrowStatement
|
||||
| import('estree').TryStatement
|
||||
| import('estree').WhileStatement
|
||||
| import('estree').DoWhileStatement
|
||||
| import('estree').ForStatement
|
||||
| import('estree').ForInStatement
|
||||
| import('estree').ForOfStatement
|
||||
| import('estree').VariableDeclaration
|
||||
| import('estree').ClassDeclaration
|
||||
| import('estree').ThisExpression
|
||||
| import('estree').ArrayExpression
|
||||
| import('estree').ObjectExpression
|
||||
| import('estree').YieldExpression
|
||||
| import('estree').UnaryExpression
|
||||
| import('estree').UpdateExpression
|
||||
| import('estree').BinaryExpression
|
||||
| import('estree').AssignmentExpression
|
||||
| import('estree').LogicalExpression
|
||||
| import('estree').MemberExpression
|
||||
| import('estree').ConditionalExpression
|
||||
| import('estree').SimpleCallExpression
|
||||
| import('estree').NewExpression
|
||||
| import('estree').SequenceExpression
|
||||
| import('estree').TemplateLiteral
|
||||
| import('estree').TaggedTemplateExpression
|
||||
| import('estree').ClassExpression
|
||||
| import('estree').MetaProperty
|
||||
| import('estree').AwaitExpression
|
||||
| import('estree').ImportExpression
|
||||
| import('estree').ChainExpression
|
||||
| import('estree').Property
|
||||
| import('estree').Super
|
||||
| import('estree').TemplateElement
|
||||
| import('estree').SpreadElement
|
||||
| import('estree').ObjectPattern
|
||||
| import('estree').ArrayPattern
|
||||
| import('estree').RestElement
|
||||
| import('estree').AssignmentPattern
|
||||
| import('estree').ClassBody
|
||||
| import('estree').MethodDefinition
|
||||
| import('estree').ImportDeclaration
|
||||
| import('estree').ExportNamedDeclaration
|
||||
| import('estree').ExportDefaultDeclaration
|
||||
| import('estree').ExportAllDeclaration
|
||||
| import('estree').ImportSpecifier
|
||||
| import('estree').ImportDefaultSpecifier
|
||||
| import('estree').ImportNamespaceSpecifier
|
||||
| import('estree').ExportSpecifier
|
||||
| {
|
||||
type: string;
|
||||
value: string;
|
||||
};
|
||||
get_static_value(): string | true;
|
||||
should_cache(): boolean;
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
import Node from './shared/Node';
|
||||
import PendingBlock from './PendingBlock';
|
||||
import ThenBlock from './ThenBlock';
|
||||
import CatchBlock from './CatchBlock';
|
||||
import Expression from './shared/Expression';
|
||||
import Component from '../Component';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
import { Context } from './shared/Context';
|
||||
import { Node as ESTreeNode } from 'estree';
|
||||
export default class AwaitBlock extends Node {
|
||||
type: 'AwaitBlock';
|
||||
expression: Expression;
|
||||
then_contexts: Context[];
|
||||
catch_contexts: Context[];
|
||||
then_node: ESTreeNode | null;
|
||||
catch_node: ESTreeNode | null;
|
||||
pending: PendingBlock;
|
||||
then: ThenBlock;
|
||||
catch: CatchBlock;
|
||||
constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode);
|
||||
}
|
19
src/@types/compiler/compile/nodes/Binding.d.ts
vendored
19
src/@types/compiler/compile/nodes/Binding.d.ts
vendored
|
@ -1,19 +0,0 @@
|
|||
import Node from './shared/Node';
|
||||
import Expression from './shared/Expression';
|
||||
import Component from '../Component';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { Node as ESTreeNode } from 'estree';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
import Element from './Element';
|
||||
import InlineComponent from './InlineComponent';
|
||||
import Window from './Window';
|
||||
export default class Binding extends Node {
|
||||
type: 'Binding';
|
||||
name: string;
|
||||
expression: Expression;
|
||||
raw_expression: ESTreeNode;
|
||||
is_contextual: boolean;
|
||||
is_readonly: boolean;
|
||||
constructor(component: Component, parent: Element | InlineComponent | Window, scope: TemplateScope, info: TemplateNode);
|
||||
is_readonly_media_attribute(): boolean;
|
||||
}
|
10
src/@types/compiler/compile/nodes/Body.d.ts
vendored
10
src/@types/compiler/compile/nodes/Body.d.ts
vendored
|
@ -1,10 +0,0 @@
|
|||
import Node from './shared/Node';
|
||||
import EventHandler from './EventHandler';
|
||||
import Component from '../Component';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
export default class Body extends Node {
|
||||
type: 'Body';
|
||||
handlers: EventHandler[];
|
||||
constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode);
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
import TemplateScope from './shared/TemplateScope';
|
||||
import AbstractBlock from './shared/AbstractBlock';
|
||||
import AwaitBlock from './AwaitBlock';
|
||||
import Component from '../Component';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
export default class CatchBlock extends AbstractBlock {
|
||||
type: 'CatchBlock';
|
||||
scope: TemplateScope;
|
||||
constructor(component: Component, parent: AwaitBlock, scope: TemplateScope, info: TemplateNode);
|
||||
}
|
11
src/@types/compiler/compile/nodes/Class.d.ts
vendored
11
src/@types/compiler/compile/nodes/Class.d.ts
vendored
|
@ -1,11 +0,0 @@
|
|||
import Node from './shared/Node';
|
||||
import Expression from './shared/Expression';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import Component from '../Component';
|
||||
export default class Class extends Node {
|
||||
type: 'Class';
|
||||
name: string;
|
||||
expression: Expression;
|
||||
constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode);
|
||||
}
|
10
src/@types/compiler/compile/nodes/Comment.d.ts
vendored
10
src/@types/compiler/compile/nodes/Comment.d.ts
vendored
|
@ -1,10 +0,0 @@
|
|||
import { TemplateNode } from '../../interfaces';
|
||||
import Component from '../Component';
|
||||
import Node from './shared/Node';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
export default class Comment extends Node {
|
||||
type: 'Comment';
|
||||
data: string;
|
||||
ignores: string[];
|
||||
constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode);
|
||||
}
|
11
src/@types/compiler/compile/nodes/DebugTag.d.ts
vendored
11
src/@types/compiler/compile/nodes/DebugTag.d.ts
vendored
|
@ -1,11 +0,0 @@
|
|||
import Node from './shared/Node';
|
||||
import Expression from './shared/Expression';
|
||||
import Component from '../Component';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
import { INode } from './interfaces';
|
||||
export default class DebugTag extends Node {
|
||||
type: 'DebugTag';
|
||||
expressions: Expression[];
|
||||
constructor(component: Component, parent: INode, scope: TemplateScope, info: TemplateNode);
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
import Component from '../Component';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import Node from './shared/Node';
|
||||
import Let from './Let';
|
||||
import { INode } from './interfaces';
|
||||
export default class DefaultSlotTemplate extends Node {
|
||||
type: 'SlotTemplate';
|
||||
scope: TemplateScope;
|
||||
children: INode[];
|
||||
lets: Let[];
|
||||
slot_template_name: string;
|
||||
constructor(component: Component, parent: INode, scope: TemplateScope, info: any, lets: Let[], children: INode[]);
|
||||
}
|
24
src/@types/compiler/compile/nodes/EachBlock.d.ts
vendored
24
src/@types/compiler/compile/nodes/EachBlock.d.ts
vendored
|
@ -1,24 +0,0 @@
|
|||
import ElseBlock from './ElseBlock';
|
||||
import Expression from './shared/Expression';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import AbstractBlock from './shared/AbstractBlock';
|
||||
import { Context } from './shared/Context';
|
||||
import { Node } from 'estree';
|
||||
import Component from '../Component';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
export default class EachBlock extends AbstractBlock {
|
||||
type: 'EachBlock';
|
||||
expression: Expression;
|
||||
context_node: Node;
|
||||
iterations: string;
|
||||
index: string;
|
||||
context: string;
|
||||
key: Expression;
|
||||
scope: TemplateScope;
|
||||
contexts: Context[];
|
||||
has_animation: boolean;
|
||||
has_binding: boolean;
|
||||
has_index_binding: boolean;
|
||||
else?: ElseBlock;
|
||||
constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode);
|
||||
}
|
41
src/@types/compiler/compile/nodes/Element.d.ts
vendored
41
src/@types/compiler/compile/nodes/Element.d.ts
vendored
|
@ -1,41 +0,0 @@
|
|||
import Node from './shared/Node';
|
||||
import Attribute from './Attribute';
|
||||
import Binding from './Binding';
|
||||
import EventHandler from './EventHandler';
|
||||
import Transition from './Transition';
|
||||
import Animation from './Animation';
|
||||
import Action from './Action';
|
||||
import Class from './Class';
|
||||
import Let from './Let';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { INode } from './interfaces';
|
||||
import Component from '../Component';
|
||||
export default class Element extends Node {
|
||||
type: 'Element';
|
||||
name: string;
|
||||
scope: TemplateScope;
|
||||
attributes: Attribute[];
|
||||
actions: Action[];
|
||||
bindings: Binding[];
|
||||
classes: Class[];
|
||||
handlers: EventHandler[];
|
||||
lets: Let[];
|
||||
intro?: Transition;
|
||||
outro?: Transition;
|
||||
animation?: Animation;
|
||||
children: INode[];
|
||||
namespace: string;
|
||||
needs_manual_style_scoping: boolean;
|
||||
constructor(component: Component, parent: Node, scope: TemplateScope, info: any);
|
||||
validate(): void;
|
||||
validate_attributes(): void;
|
||||
validate_attributes_a11y(): void;
|
||||
validate_special_cases(): void;
|
||||
validate_bindings_foreign(): void;
|
||||
validate_bindings(): void;
|
||||
validate_content(): void;
|
||||
validate_event_handlers(): void;
|
||||
is_media_node(): boolean;
|
||||
add_css_class(): void;
|
||||
get slot_template_name(): string;
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
import AbstractBlock from './shared/AbstractBlock';
|
||||
import Component from '../Component';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
import Node from './shared/Node';
|
||||
export default class ElseBlock extends AbstractBlock {
|
||||
type: 'ElseBlock';
|
||||
constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode);
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
import Node from './shared/Node';
|
||||
import Expression from './shared/Expression';
|
||||
import Component from '../Component';
|
||||
import { Identifier } from 'estree';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
export default class EventHandler extends Node {
|
||||
type: 'EventHandler';
|
||||
name: string;
|
||||
modifiers: Set<string>;
|
||||
expression: Expression;
|
||||
handler_name: Identifier;
|
||||
uses_context: boolean;
|
||||
can_make_passive: boolean;
|
||||
constructor(component: Component, parent: Node, template_scope: TemplateScope, info: TemplateNode);
|
||||
get reassigned(): boolean;
|
||||
}
|
13
src/@types/compiler/compile/nodes/Fragment.d.ts
vendored
13
src/@types/compiler/compile/nodes/Fragment.d.ts
vendored
|
@ -1,13 +0,0 @@
|
|||
import Node from './shared/Node';
|
||||
import Component from '../Component';
|
||||
import Block from '../render_dom/Block';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { INode } from './interfaces';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
export default class Fragment extends Node {
|
||||
type: 'Fragment';
|
||||
block: Block;
|
||||
children: INode[];
|
||||
scope: TemplateScope;
|
||||
constructor(component: Component, info: TemplateNode);
|
||||
}
|
10
src/@types/compiler/compile/nodes/Head.d.ts
vendored
10
src/@types/compiler/compile/nodes/Head.d.ts
vendored
|
@ -1,10 +0,0 @@
|
|||
import Node from './shared/Node';
|
||||
import Component from '../Component';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
export default class Head extends Node {
|
||||
type: 'Head';
|
||||
children: any[];
|
||||
id: string;
|
||||
constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode);
|
||||
}
|
13
src/@types/compiler/compile/nodes/IfBlock.d.ts
vendored
13
src/@types/compiler/compile/nodes/IfBlock.d.ts
vendored
|
@ -1,13 +0,0 @@
|
|||
import ElseBlock from './ElseBlock';
|
||||
import Expression from './shared/Expression';
|
||||
import AbstractBlock from './shared/AbstractBlock';
|
||||
import Component from '../Component';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
import Node from './shared/Node';
|
||||
export default class IfBlock extends AbstractBlock {
|
||||
type: 'IfBlock';
|
||||
expression: Expression;
|
||||
else: ElseBlock;
|
||||
constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode);
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
import Node from './shared/Node';
|
||||
import Attribute from './Attribute';
|
||||
import Binding from './Binding';
|
||||
import EventHandler from './EventHandler';
|
||||
import Expression from './shared/Expression';
|
||||
import Component from '../Component';
|
||||
import Let from './Let';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { INode } from './interfaces';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
export default class InlineComponent extends Node {
|
||||
type: 'InlineComponent';
|
||||
name: string;
|
||||
expression: Expression;
|
||||
attributes: Attribute[];
|
||||
bindings: Binding[];
|
||||
handlers: EventHandler[];
|
||||
lets: Let[];
|
||||
children: INode[];
|
||||
scope: TemplateScope;
|
||||
constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode);
|
||||
get slot_template_name(): string;
|
||||
}
|
11
src/@types/compiler/compile/nodes/KeyBlock.d.ts
vendored
11
src/@types/compiler/compile/nodes/KeyBlock.d.ts
vendored
|
@ -1,11 +0,0 @@
|
|||
import Expression from './shared/Expression';
|
||||
import AbstractBlock from './shared/AbstractBlock';
|
||||
import Component from '../Component';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
import Node from './shared/Node';
|
||||
export default class KeyBlock extends AbstractBlock {
|
||||
type: 'KeyBlock';
|
||||
expression: Expression;
|
||||
constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode);
|
||||
}
|
12
src/@types/compiler/compile/nodes/Let.d.ts
vendored
12
src/@types/compiler/compile/nodes/Let.d.ts
vendored
|
@ -1,12 +0,0 @@
|
|||
import Node from './shared/Node';
|
||||
import Component from '../Component';
|
||||
import { Identifier } from 'estree';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
export default class Let extends Node {
|
||||
type: 'Let';
|
||||
name: Identifier;
|
||||
value: Identifier;
|
||||
names: string[];
|
||||
constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
import Tag from './shared/Tag';
|
||||
export default class MustacheTag extends Tag {
|
||||
type: 'MustacheTag';
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
import Node from './shared/Node';
|
||||
export default class Options extends Node {
|
||||
type: 'Options';
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
import AbstractBlock from './shared/AbstractBlock';
|
||||
import Component from '../Component';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
import Node from './shared/Node';
|
||||
export default class PendingBlock extends AbstractBlock {
|
||||
type: 'PendingBlock';
|
||||
constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
import Tag from './shared/Tag';
|
||||
export default class RawMustacheTag extends Tag {
|
||||
type: 'RawMustacheTag';
|
||||
}
|
14
src/@types/compiler/compile/nodes/Slot.d.ts
vendored
14
src/@types/compiler/compile/nodes/Slot.d.ts
vendored
|
@ -1,14 +0,0 @@
|
|||
import Element from './Element';
|
||||
import Attribute from './Attribute';
|
||||
import Component from '../Component';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { INode } from './interfaces';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
export default class Slot extends Element {
|
||||
type: 'Element';
|
||||
name: string;
|
||||
children: INode[];
|
||||
slot_name: string;
|
||||
values: Map<string, Attribute>;
|
||||
constructor(component: Component, parent: INode, scope: TemplateScope, info: TemplateNode);
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
import Component from '../Component';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import Node from './shared/Node';
|
||||
import Let from './Let';
|
||||
import Attribute from './Attribute';
|
||||
import { INode } from './interfaces';
|
||||
export default class SlotTemplate extends Node {
|
||||
type: 'SlotTemplate';
|
||||
scope: TemplateScope;
|
||||
children: INode[];
|
||||
lets: Let[];
|
||||
slot_attribute: Attribute;
|
||||
slot_template_name: string;
|
||||
constructor(component: Component, parent: INode, scope: TemplateScope, info: any);
|
||||
validate_slot_template_placement(): void;
|
||||
}
|
12
src/@types/compiler/compile/nodes/Text.d.ts
vendored
12
src/@types/compiler/compile/nodes/Text.d.ts
vendored
|
@ -1,12 +0,0 @@
|
|||
import Node from './shared/Node';
|
||||
import Component from '../Component';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { INode } from './interfaces';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
export default class Text extends Node {
|
||||
type: 'Text';
|
||||
data: string;
|
||||
synthetic: boolean;
|
||||
constructor(component: Component, parent: INode, scope: TemplateScope, info: TemplateNode);
|
||||
should_skip(): any;
|
||||
}
|
10
src/@types/compiler/compile/nodes/ThenBlock.d.ts
vendored
10
src/@types/compiler/compile/nodes/ThenBlock.d.ts
vendored
|
@ -1,10 +0,0 @@
|
|||
import TemplateScope from './shared/TemplateScope';
|
||||
import AbstractBlock from './shared/AbstractBlock';
|
||||
import AwaitBlock from './AwaitBlock';
|
||||
import Component from '../Component';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
export default class ThenBlock extends AbstractBlock {
|
||||
type: 'ThenBlock';
|
||||
scope: TemplateScope;
|
||||
constructor(component: Component, parent: AwaitBlock, scope: TemplateScope, info: TemplateNode);
|
||||
}
|
11
src/@types/compiler/compile/nodes/Title.d.ts
vendored
11
src/@types/compiler/compile/nodes/Title.d.ts
vendored
|
@ -1,11 +0,0 @@
|
|||
import Node from './shared/Node';
|
||||
import { Children } from './shared/map_children';
|
||||
import Component from '../Component';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
export default class Title extends Node {
|
||||
type: 'Title';
|
||||
children: Children;
|
||||
should_cache: boolean;
|
||||
constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode);
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
import Node from './shared/Node';
|
||||
import Expression from './shared/Expression';
|
||||
import Component from '../Component';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
import Element from './Element';
|
||||
export default class Transition extends Node {
|
||||
type: 'Transition';
|
||||
name: string;
|
||||
directive: string;
|
||||
expression: Expression;
|
||||
is_local: boolean;
|
||||
constructor(component: Component, parent: Element, scope: TemplateScope, info: TemplateNode);
|
||||
}
|
14
src/@types/compiler/compile/nodes/Window.d.ts
vendored
14
src/@types/compiler/compile/nodes/Window.d.ts
vendored
|
@ -1,14 +0,0 @@
|
|||
import Node from './shared/Node';
|
||||
import Binding from './Binding';
|
||||
import EventHandler from './EventHandler';
|
||||
import Action from './Action';
|
||||
import Component from '../Component';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
export default class Window extends Node {
|
||||
type: 'Window';
|
||||
handlers: EventHandler[];
|
||||
bindings: Binding[];
|
||||
actions: Action[];
|
||||
constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode);
|
||||
}
|
|
@ -1,67 +0,0 @@
|
|||
import Tag from './shared/Tag';
|
||||
import Action from './Action';
|
||||
import Animation from './Animation';
|
||||
import Attribute from './Attribute';
|
||||
import AwaitBlock from './AwaitBlock';
|
||||
import Binding from './Binding';
|
||||
import Body from './Body';
|
||||
import CatchBlock from './CatchBlock';
|
||||
import Class from './Class';
|
||||
import Comment from './Comment';
|
||||
import DebugTag from './DebugTag';
|
||||
import EachBlock from './EachBlock';
|
||||
import Element from './Element';
|
||||
import ElseBlock from './ElseBlock';
|
||||
import EventHandler from './EventHandler';
|
||||
import Fragment from './Fragment';
|
||||
import Head from './Head';
|
||||
import IfBlock from './IfBlock';
|
||||
import InlineComponent from './InlineComponent';
|
||||
import KeyBlock from './KeyBlock';
|
||||
import Let from './Let';
|
||||
import MustacheTag from './MustacheTag';
|
||||
import Options from './Options';
|
||||
import PendingBlock from './PendingBlock';
|
||||
import RawMustacheTag from './RawMustacheTag';
|
||||
import Slot from './Slot';
|
||||
import SlotTemplate from './SlotTemplate';
|
||||
import DefaultSlotTemplate from './DefaultSlotTemplate';
|
||||
import Text from './Text';
|
||||
import ThenBlock from './ThenBlock';
|
||||
import Title from './Title';
|
||||
import Transition from './Transition';
|
||||
import Window from './Window';
|
||||
export declare type INode =
|
||||
| Action
|
||||
| Animation
|
||||
| Attribute
|
||||
| AwaitBlock
|
||||
| Binding
|
||||
| Body
|
||||
| CatchBlock
|
||||
| Class
|
||||
| Comment
|
||||
| DebugTag
|
||||
| EachBlock
|
||||
| Element
|
||||
| ElseBlock
|
||||
| EventHandler
|
||||
| Fragment
|
||||
| Head
|
||||
| IfBlock
|
||||
| InlineComponent
|
||||
| KeyBlock
|
||||
| Let
|
||||
| MustacheTag
|
||||
| Options
|
||||
| PendingBlock
|
||||
| RawMustacheTag
|
||||
| Slot
|
||||
| SlotTemplate
|
||||
| DefaultSlotTemplate
|
||||
| Tag
|
||||
| Text
|
||||
| ThenBlock
|
||||
| Title
|
||||
| Transition
|
||||
| Window;
|
|
@ -1,10 +0,0 @@
|
|||
import Block from '../../render_dom/Block';
|
||||
import Component from '../../Component';
|
||||
import Node from './Node';
|
||||
import { INode } from '../interfaces';
|
||||
export default class AbstractBlock extends Node {
|
||||
block: Block;
|
||||
children: INode[];
|
||||
constructor(component: Component, parent: any, scope: any, info: any);
|
||||
warn_if_empty_block(): void;
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
import { Node, Identifier } from 'estree';
|
||||
export interface Context {
|
||||
key: Identifier;
|
||||
name?: string;
|
||||
modifier: (node: Node) => Node;
|
||||
default_modifier: (node: Node, to_ctx: (name: string) => Node) => Node;
|
||||
}
|
||||
export declare function unpack_destructuring(contexts: Context[], node: Node, modifier?: Context['modifier'], default_modifier?: Context['default_modifier']): void;
|
|
@ -1,26 +0,0 @@
|
|||
import Component from '../../Component';
|
||||
import { Scope } from '../../utils/scope';
|
||||
import TemplateScope from './TemplateScope';
|
||||
import Block from '../../render_dom/Block';
|
||||
import { Node } from 'estree';
|
||||
import { INode } from '../interfaces';
|
||||
declare type Owner = INode;
|
||||
export default class Expression {
|
||||
type: 'Expression';
|
||||
component: Component;
|
||||
owner: Owner;
|
||||
node: Node;
|
||||
references: Set<string>;
|
||||
dependencies: Set<string>;
|
||||
contextual_dependencies: Set<string>;
|
||||
template_scope: TemplateScope;
|
||||
scope: Scope;
|
||||
scope_map: WeakMap<Node, Scope>;
|
||||
declarations: Array<Node | Node[]>;
|
||||
uses_context: boolean;
|
||||
manipulated: Node;
|
||||
constructor(component: Component, owner: Owner, template_scope: TemplateScope, info: Node, lazy?: boolean);
|
||||
dynamic_dependencies(): string[];
|
||||
manipulate(block?: Block): Node;
|
||||
}
|
||||
export {};
|
|
@ -1,21 +0,0 @@
|
|||
import Attribute from '../Attribute';
|
||||
import Component from '../../Component';
|
||||
import { INode } from '../interfaces';
|
||||
import { TemplateNode } from '../../../interfaces';
|
||||
export default class Node {
|
||||
readonly start: number;
|
||||
readonly end: number;
|
||||
readonly component: Component;
|
||||
readonly parent: INode;
|
||||
readonly type: string;
|
||||
prev?: INode;
|
||||
next?: INode;
|
||||
can_use_innerhtml: boolean;
|
||||
var: string;
|
||||
attributes: Attribute[];
|
||||
constructor(component: Component, parent: Node, _scope: any, info: TemplateNode);
|
||||
cannot_use_innerhtml(): void;
|
||||
find_nearest(selector: RegExp): any;
|
||||
get_static_attribute_value(name: string): string | true;
|
||||
has_ancestor(type: string): any;
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
import Node from './Node';
|
||||
import Expression from './Expression';
|
||||
export default class Tag extends Node {
|
||||
type: 'MustacheTag' | 'RawMustacheTag';
|
||||
expression: Expression;
|
||||
should_cache: boolean;
|
||||
constructor(component: any, parent: any, scope: any, info: any);
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
import EachBlock from '../EachBlock';
|
||||
import ThenBlock from '../ThenBlock';
|
||||
import CatchBlock from '../CatchBlock';
|
||||
import InlineComponent from '../InlineComponent';
|
||||
import Element from '../Element';
|
||||
import SlotTemplate from '../SlotTemplate';
|
||||
declare type NodeWithScope = EachBlock | ThenBlock | CatchBlock | InlineComponent | Element | SlotTemplate;
|
||||
export default class TemplateScope {
|
||||
names: Set<string>;
|
||||
dependencies_for_name: Map<string, Set<string>>;
|
||||
owners: Map<string, NodeWithScope>;
|
||||
parent?: TemplateScope;
|
||||
constructor(parent?: TemplateScope);
|
||||
add(name: any, dependencies: Set<string>, owner: any): this;
|
||||
child(): TemplateScope;
|
||||
is_top_level(name: string): any;
|
||||
get_owner(name: string): NodeWithScope;
|
||||
is_let(name: string): boolean;
|
||||
is_await(name: string): boolean;
|
||||
}
|
||||
export {};
|
|
@ -1,3 +0,0 @@
|
|||
import Component from '../../Component';
|
||||
import TemplateScope from './TemplateScope';
|
||||
export default function is_contextual(component: Component, scope: TemplateScope, name: string): boolean;
|
|
@ -1,43 +0,0 @@
|
|||
import AwaitBlock from '../AwaitBlock';
|
||||
import Body from '../Body';
|
||||
import Comment from '../Comment';
|
||||
import EachBlock from '../EachBlock';
|
||||
import Element from '../Element';
|
||||
import Head from '../Head';
|
||||
import IfBlock from '../IfBlock';
|
||||
import InlineComponent from '../InlineComponent';
|
||||
import KeyBlock from '../KeyBlock';
|
||||
import MustacheTag from '../MustacheTag';
|
||||
import Options from '../Options';
|
||||
import RawMustacheTag from '../RawMustacheTag';
|
||||
import DebugTag from '../DebugTag';
|
||||
import SlotTemplate from '../SlotTemplate';
|
||||
import Text from '../Text';
|
||||
import Title from '../Title';
|
||||
import Window from '../Window';
|
||||
import { TemplateNode } from '../../../interfaces';
|
||||
export declare type Children = ReturnType<typeof map_children>;
|
||||
export default function map_children(
|
||||
component: any,
|
||||
parent: any,
|
||||
scope: any,
|
||||
children: TemplateNode[]
|
||||
): (
|
||||
| AwaitBlock
|
||||
| Body
|
||||
| Comment
|
||||
| DebugTag
|
||||
| EachBlock
|
||||
| Element
|
||||
| Head
|
||||
| IfBlock
|
||||
| InlineComponent
|
||||
| KeyBlock
|
||||
| MustacheTag
|
||||
| Options
|
||||
| RawMustacheTag
|
||||
| SlotTemplate
|
||||
| Text
|
||||
| Title
|
||||
| Window
|
||||
)[];
|
|
@ -1,81 +0,0 @@
|
|||
import Renderer from './Renderer';
|
||||
import Wrapper from './wrappers/shared/Wrapper';
|
||||
import { Node, Identifier } from 'estree';
|
||||
export interface Bindings {
|
||||
object: Identifier;
|
||||
property: Identifier;
|
||||
snippet: Node;
|
||||
store: string;
|
||||
modifier: (node: Node) => Node;
|
||||
}
|
||||
export interface BlockOptions {
|
||||
parent?: Block;
|
||||
name: Identifier;
|
||||
type: string;
|
||||
renderer?: Renderer;
|
||||
comment?: string;
|
||||
key?: Identifier;
|
||||
bindings?: Map<string, Bindings>;
|
||||
dependencies?: Set<string>;
|
||||
}
|
||||
export default class Block {
|
||||
parent?: Block;
|
||||
renderer: Renderer;
|
||||
name: Identifier;
|
||||
type: string;
|
||||
comment?: string;
|
||||
wrappers: Wrapper[];
|
||||
key: Identifier;
|
||||
first: Identifier;
|
||||
dependencies: Set<string>;
|
||||
bindings: Map<string, Bindings>;
|
||||
binding_group_initialised: Set<string>;
|
||||
chunks: {
|
||||
declarations: Array<Node | Node[]>;
|
||||
init: Array<Node | Node[]>;
|
||||
create: Array<Node | Node[]>;
|
||||
claim: Array<Node | Node[]>;
|
||||
hydrate: Array<Node | Node[]>;
|
||||
mount: Array<Node | Node[]>;
|
||||
measure: Array<Node | Node[]>;
|
||||
fix: Array<Node | Node[]>;
|
||||
animate: Array<Node | Node[]>;
|
||||
intro: Array<Node | Node[]>;
|
||||
update: Array<Node | Node[]>;
|
||||
outro: Array<Node | Node[]>;
|
||||
destroy: Array<Node | Node[]>;
|
||||
};
|
||||
event_listeners: Node[];
|
||||
maintain_context: boolean;
|
||||
has_animation: boolean;
|
||||
has_intros: boolean;
|
||||
has_outros: boolean;
|
||||
has_intro_method: boolean;
|
||||
has_outro_method: boolean;
|
||||
outros: number;
|
||||
aliases: Map<string, Identifier>;
|
||||
variables: Map<
|
||||
string,
|
||||
{
|
||||
id: Identifier;
|
||||
init?: Node;
|
||||
}
|
||||
>;
|
||||
get_unique_name: (name: string) => Identifier;
|
||||
has_update_method: boolean;
|
||||
autofocus: string;
|
||||
constructor(options: BlockOptions);
|
||||
assign_variable_names(): void;
|
||||
add_dependencies(dependencies: Set<string>): void;
|
||||
add_element(id: Identifier, render_statement: Node, claim_statement: Node, parent_node: Node, no_detach?: boolean): void;
|
||||
add_intro(local?: boolean): void;
|
||||
add_outro(local?: boolean): void;
|
||||
add_animation(): void;
|
||||
add_variable(id: Identifier, init?: Node): void;
|
||||
alias(name: string): Identifier;
|
||||
child(options: BlockOptions): Block;
|
||||
get_contents(key?: any): Node[];
|
||||
has_content(): boolean;
|
||||
render(): Node[];
|
||||
render_listeners(chunk?: string): void;
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
import Block from './Block';
|
||||
import { CompileOptions, Var } from '../../interfaces';
|
||||
import Component from '../Component';
|
||||
import FragmentWrapper from './wrappers/Fragment';
|
||||
import { Node, Identifier, MemberExpression, Literal, Expression } from 'estree';
|
||||
interface ContextMember {
|
||||
name: string;
|
||||
index: Literal;
|
||||
is_contextual: boolean;
|
||||
is_non_contextual: boolean;
|
||||
variable: Var;
|
||||
priority: number;
|
||||
}
|
||||
export default class Renderer {
|
||||
component: Component;
|
||||
options: CompileOptions;
|
||||
context: ContextMember[];
|
||||
initial_context: ContextMember[];
|
||||
context_lookup: Map<string, ContextMember>;
|
||||
context_overflow: boolean;
|
||||
blocks: Array<Block | Node | Node[]>;
|
||||
readonly: Set<string>;
|
||||
meta_bindings: Array<Node | Node[]>;
|
||||
binding_groups: Map<
|
||||
string,
|
||||
{
|
||||
binding_group: (to_reference?: boolean) => Node;
|
||||
is_context: boolean;
|
||||
contexts: string[];
|
||||
index: number;
|
||||
keypath: string;
|
||||
}
|
||||
>;
|
||||
block: Block;
|
||||
fragment: FragmentWrapper;
|
||||
file_var: Identifier;
|
||||
locate: (
|
||||
c: number
|
||||
) => {
|
||||
line: number;
|
||||
column: number;
|
||||
};
|
||||
constructor(component: Component, options: CompileOptions);
|
||||
add_to_context(name: string, contextual?: boolean): ContextMember;
|
||||
invalidate(name: string, value?: any, main_execution_context?: boolean): any;
|
||||
dirty(names: string[], is_reactive_declaration?: boolean): Expression;
|
||||
reference(node: string | Identifier | MemberExpression): any;
|
||||
remove_block(block: Block | Node | Node[]): void;
|
||||
}
|
||||
export {};
|
|
@ -1,10 +0,0 @@
|
|||
import Component from '../Component';
|
||||
import { CompileOptions, CssResult } from '../../interfaces';
|
||||
import { Node } from 'estree';
|
||||
export default function dom(
|
||||
component: Component,
|
||||
options: CompileOptions
|
||||
): {
|
||||
js: Node[];
|
||||
css: CssResult;
|
||||
};
|
|
@ -1,5 +0,0 @@
|
|||
import { Scope } from '../utils/scope';
|
||||
import { Node } from 'estree';
|
||||
import Renderer from './Renderer';
|
||||
export declare function invalidate(renderer: Renderer, scope: Scope, node: Node, names: Set<string>, main_execution_context?: boolean): any;
|
||||
export declare function renderer_invalidate(renderer: Renderer, name: string, value?: any, main_execution_context?: boolean): any;
|
|
@ -1,46 +0,0 @@
|
|||
import Wrapper from './shared/Wrapper';
|
||||
import Renderer from '../Renderer';
|
||||
import Block from '../Block';
|
||||
import AwaitBlock from '../../nodes/AwaitBlock';
|
||||
import FragmentWrapper from './Fragment';
|
||||
import PendingBlock from '../../nodes/PendingBlock';
|
||||
import ThenBlock from '../../nodes/ThenBlock';
|
||||
import CatchBlock from '../../nodes/CatchBlock';
|
||||
import { Context } from '../../nodes/shared/Context';
|
||||
import { Identifier, Literal, Node } from 'estree';
|
||||
declare type Status = 'pending' | 'then' | 'catch';
|
||||
declare class AwaitBlockBranch extends Wrapper {
|
||||
parent: AwaitBlockWrapper;
|
||||
node: PendingBlock | ThenBlock | CatchBlock;
|
||||
block: Block;
|
||||
fragment: FragmentWrapper;
|
||||
is_dynamic: boolean;
|
||||
var: any;
|
||||
status: Status;
|
||||
value: string;
|
||||
value_index: Literal;
|
||||
value_contexts: Context[];
|
||||
is_destructured: boolean;
|
||||
constructor(
|
||||
status: Status,
|
||||
renderer: Renderer,
|
||||
block: Block,
|
||||
parent: AwaitBlockWrapper,
|
||||
node: PendingBlock | ThenBlock | CatchBlock,
|
||||
strip_whitespace: boolean,
|
||||
next_sibling: Wrapper
|
||||
);
|
||||
add_context(node: Node | null, contexts: Context[]): void;
|
||||
render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
|
||||
render_destructure(): void;
|
||||
}
|
||||
export default class AwaitBlockWrapper extends Wrapper {
|
||||
node: AwaitBlock;
|
||||
pending: AwaitBlockBranch;
|
||||
then: AwaitBlockBranch;
|
||||
catch: AwaitBlockBranch;
|
||||
var: Identifier;
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: AwaitBlock, strip_whitespace: boolean, next_sibling: Wrapper);
|
||||
render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
|
||||
}
|
||||
export {};
|
|
@ -1,13 +0,0 @@
|
|||
import Block from '../Block';
|
||||
import Wrapper from './shared/Wrapper';
|
||||
import Body from '../../nodes/Body';
|
||||
import { Identifier } from 'estree';
|
||||
import EventHandler from './Element/EventHandler';
|
||||
import { TemplateNode } from '../../../interfaces';
|
||||
import Renderer from '../Renderer';
|
||||
export default class BodyWrapper extends Wrapper {
|
||||
node: Body;
|
||||
handlers: EventHandler[];
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: TemplateNode);
|
||||
render(block: Block, _parent_node: Identifier, _parent_nodes: Identifier): void;
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
import Renderer from '../Renderer';
|
||||
import Wrapper from './shared/Wrapper';
|
||||
import Block from '../Block';
|
||||
import DebugTag from '../../nodes/DebugTag';
|
||||
import { Identifier } from 'estree';
|
||||
export default class DebugTagWrapper extends Wrapper {
|
||||
node: DebugTag;
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: DebugTag, _strip_whitespace: boolean, _next_sibling: Wrapper);
|
||||
render(block: Block, _parent_node: Identifier, _parent_nodes: Identifier): void;
|
||||
}
|
|
@ -1,73 +0,0 @@
|
|||
import Renderer from '../Renderer';
|
||||
import Block from '../Block';
|
||||
import Wrapper from './shared/Wrapper';
|
||||
import EachBlock from '../../nodes/EachBlock';
|
||||
import FragmentWrapper from './Fragment';
|
||||
import ElseBlock from '../../nodes/ElseBlock';
|
||||
import { Identifier, Node } from 'estree';
|
||||
export declare class ElseBlockWrapper extends Wrapper {
|
||||
node: ElseBlock;
|
||||
block: Block;
|
||||
fragment: FragmentWrapper;
|
||||
is_dynamic: boolean;
|
||||
var: any;
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: ElseBlock, strip_whitespace: boolean, next_sibling: Wrapper);
|
||||
}
|
||||
export default class EachBlockWrapper extends Wrapper {
|
||||
block: Block;
|
||||
node: EachBlock;
|
||||
fragment: FragmentWrapper;
|
||||
else?: ElseBlockWrapper;
|
||||
vars: {
|
||||
create_each_block: Identifier;
|
||||
each_block_value: Identifier;
|
||||
get_each_context: Identifier;
|
||||
iterations: Identifier;
|
||||
fixed_length: number;
|
||||
data_length: Node | number;
|
||||
view_length: Node | number;
|
||||
};
|
||||
context_props: Array<Node | Node[]>;
|
||||
index_name: Identifier;
|
||||
updates: Array<Node | Node[]>;
|
||||
dependencies: Set<string>;
|
||||
var: Identifier;
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: EachBlock, strip_whitespace: boolean, next_sibling: Wrapper);
|
||||
render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
|
||||
render_keyed({
|
||||
block,
|
||||
parent_node,
|
||||
parent_nodes,
|
||||
snippet,
|
||||
initial_anchor_node,
|
||||
initial_mount_node,
|
||||
update_anchor_node,
|
||||
update_mount_node,
|
||||
}: {
|
||||
block: Block;
|
||||
parent_node: Identifier;
|
||||
parent_nodes: Identifier;
|
||||
snippet: Node;
|
||||
initial_anchor_node: Identifier;
|
||||
initial_mount_node: Identifier;
|
||||
update_anchor_node: Identifier;
|
||||
update_mount_node: Identifier;
|
||||
}): void;
|
||||
render_unkeyed({
|
||||
block,
|
||||
parent_nodes,
|
||||
snippet,
|
||||
initial_anchor_node,
|
||||
initial_mount_node,
|
||||
update_anchor_node,
|
||||
update_mount_node,
|
||||
}: {
|
||||
block: Block;
|
||||
parent_nodes: Identifier;
|
||||
snippet: Node;
|
||||
initial_anchor_node: Identifier;
|
||||
initial_mount_node: Identifier;
|
||||
update_anchor_node: Identifier;
|
||||
update_mount_node: Identifier;
|
||||
}): void;
|
||||
}
|
|
@ -1,259 +0,0 @@
|
|||
import Attribute from '../../../nodes/Attribute';
|
||||
import Block from '../../Block';
|
||||
import ElementWrapper from './index';
|
||||
import { Identifier, Node } from 'estree';
|
||||
export declare class BaseAttributeWrapper {
|
||||
node: Attribute;
|
||||
parent: ElementWrapper;
|
||||
constructor(parent: ElementWrapper, block: Block, node: Attribute);
|
||||
render(_block: Block): void;
|
||||
}
|
||||
export default class AttributeWrapper extends BaseAttributeWrapper {
|
||||
node: Attribute;
|
||||
parent: ElementWrapper;
|
||||
metadata: any;
|
||||
name: string;
|
||||
property_name: string;
|
||||
is_indirectly_bound_value: boolean;
|
||||
is_src: boolean;
|
||||
is_select_value_attribute: boolean;
|
||||
is_input_value: boolean;
|
||||
should_cache: boolean;
|
||||
last: Identifier;
|
||||
constructor(parent: ElementWrapper, block: Block, node: Attribute);
|
||||
render(block: Block): void;
|
||||
get_init(block: Block, value: any): any;
|
||||
get_dom_update_conditions(block: Block, dependency_condition: Node): Node;
|
||||
get_dependencies(): string[];
|
||||
get_metadata(): any;
|
||||
get_value(
|
||||
block: any
|
||||
):
|
||||
| Identifier
|
||||
| import('estree').SimpleLiteral
|
||||
| import('estree').RegExpLiteral
|
||||
| import('estree').Program
|
||||
| import('estree').FunctionDeclaration
|
||||
| import('estree').FunctionExpression
|
||||
| import('estree').ArrowFunctionExpression
|
||||
| import('estree').SwitchCase
|
||||
| import('estree').CatchClause
|
||||
| import('estree').VariableDeclarator
|
||||
| import('estree').ExpressionStatement
|
||||
| import('estree').BlockStatement
|
||||
| import('estree').EmptyStatement
|
||||
| import('estree').DebuggerStatement
|
||||
| import('estree').WithStatement
|
||||
| import('estree').ReturnStatement
|
||||
| import('estree').LabeledStatement
|
||||
| import('estree').BreakStatement
|
||||
| import('estree').ContinueStatement
|
||||
| import('estree').IfStatement
|
||||
| import('estree').SwitchStatement
|
||||
| import('estree').ThrowStatement
|
||||
| import('estree').TryStatement
|
||||
| import('estree').WhileStatement
|
||||
| import('estree').DoWhileStatement
|
||||
| import('estree').ForStatement
|
||||
| import('estree').ForInStatement
|
||||
| import('estree').ForOfStatement
|
||||
| import('estree').VariableDeclaration
|
||||
| import('estree').ClassDeclaration
|
||||
| import('estree').ThisExpression
|
||||
| import('estree').ArrayExpression
|
||||
| import('estree').ObjectExpression
|
||||
| import('estree').YieldExpression
|
||||
| import('estree').UnaryExpression
|
||||
| import('estree').UpdateExpression
|
||||
| import('estree').BinaryExpression
|
||||
| import('estree').AssignmentExpression
|
||||
| import('estree').LogicalExpression
|
||||
| import('estree').MemberExpression
|
||||
| import('estree').ConditionalExpression
|
||||
| import('estree').SimpleCallExpression
|
||||
| import('estree').NewExpression
|
||||
| import('estree').SequenceExpression
|
||||
| import('estree').TemplateLiteral
|
||||
| import('estree').TaggedTemplateExpression
|
||||
| import('estree').ClassExpression
|
||||
| import('estree').MetaProperty
|
||||
| import('estree').AwaitExpression
|
||||
| import('estree').ImportExpression
|
||||
| import('estree').ChainExpression
|
||||
| import('estree').Property
|
||||
| import('estree').Super
|
||||
| import('estree').TemplateElement
|
||||
| import('estree').SpreadElement
|
||||
| import('estree').ObjectPattern
|
||||
| import('estree').ArrayPattern
|
||||
| import('estree').RestElement
|
||||
| import('estree').AssignmentPattern
|
||||
| import('estree').ClassBody
|
||||
| import('estree').MethodDefinition
|
||||
| import('estree').ImportDeclaration
|
||||
| import('estree').ExportNamedDeclaration
|
||||
| import('estree').ExportDefaultDeclaration
|
||||
| import('estree').ExportAllDeclaration
|
||||
| import('estree').ImportSpecifier
|
||||
| import('estree').ImportDefaultSpecifier
|
||||
| import('estree').ImportNamespaceSpecifier
|
||||
| import('estree').ExportSpecifier
|
||||
| {
|
||||
type: string;
|
||||
value: string;
|
||||
};
|
||||
get_class_name_text(
|
||||
block: any
|
||||
):
|
||||
| Identifier
|
||||
| import('estree').SimpleLiteral
|
||||
| import('estree').RegExpLiteral
|
||||
| import('estree').Program
|
||||
| import('estree').FunctionDeclaration
|
||||
| import('estree').FunctionExpression
|
||||
| import('estree').ArrowFunctionExpression
|
||||
| import('estree').SwitchCase
|
||||
| import('estree').CatchClause
|
||||
| import('estree').VariableDeclarator
|
||||
| import('estree').ExpressionStatement
|
||||
| import('estree').BlockStatement
|
||||
| import('estree').EmptyStatement
|
||||
| import('estree').DebuggerStatement
|
||||
| import('estree').WithStatement
|
||||
| import('estree').ReturnStatement
|
||||
| import('estree').LabeledStatement
|
||||
| import('estree').BreakStatement
|
||||
| import('estree').ContinueStatement
|
||||
| import('estree').IfStatement
|
||||
| import('estree').SwitchStatement
|
||||
| import('estree').ThrowStatement
|
||||
| import('estree').TryStatement
|
||||
| import('estree').WhileStatement
|
||||
| import('estree').DoWhileStatement
|
||||
| import('estree').ForStatement
|
||||
| import('estree').ForInStatement
|
||||
| import('estree').ForOfStatement
|
||||
| import('estree').VariableDeclaration
|
||||
| import('estree').ClassDeclaration
|
||||
| import('estree').ThisExpression
|
||||
| import('estree').ArrayExpression
|
||||
| import('estree').ObjectExpression
|
||||
| import('estree').YieldExpression
|
||||
| import('estree').UnaryExpression
|
||||
| import('estree').UpdateExpression
|
||||
| import('estree').BinaryExpression
|
||||
| import('estree').AssignmentExpression
|
||||
| import('estree').LogicalExpression
|
||||
| import('estree').MemberExpression
|
||||
| import('estree').ConditionalExpression
|
||||
| import('estree').SimpleCallExpression
|
||||
| import('estree').NewExpression
|
||||
| import('estree').SequenceExpression
|
||||
| import('estree').TemplateLiteral
|
||||
| import('estree').TaggedTemplateExpression
|
||||
| import('estree').ClassExpression
|
||||
| import('estree').MetaProperty
|
||||
| import('estree').AwaitExpression
|
||||
| import('estree').ImportExpression
|
||||
| import('estree').ChainExpression
|
||||
| import('estree').Property
|
||||
| import('estree').Super
|
||||
| import('estree').TemplateElement
|
||||
| import('estree').SpreadElement
|
||||
| import('estree').ObjectPattern
|
||||
| import('estree').ArrayPattern
|
||||
| import('estree').RestElement
|
||||
| import('estree').AssignmentPattern
|
||||
| import('estree').ClassBody
|
||||
| import('estree').MethodDefinition
|
||||
| import('estree').ImportDeclaration
|
||||
| import('estree').ExportNamedDeclaration
|
||||
| import('estree').ExportDefaultDeclaration
|
||||
| import('estree').ExportAllDeclaration
|
||||
| import('estree').ImportSpecifier
|
||||
| import('estree').ImportDefaultSpecifier
|
||||
| import('estree').ImportNamespaceSpecifier
|
||||
| import('estree').ExportSpecifier
|
||||
| {
|
||||
type: string;
|
||||
value: string;
|
||||
};
|
||||
render_chunks(
|
||||
block: Block
|
||||
): (
|
||||
| Identifier
|
||||
| import('estree').SimpleLiteral
|
||||
| import('estree').RegExpLiteral
|
||||
| import('estree').Program
|
||||
| import('estree').FunctionDeclaration
|
||||
| import('estree').FunctionExpression
|
||||
| import('estree').ArrowFunctionExpression
|
||||
| import('estree').SwitchCase
|
||||
| import('estree').CatchClause
|
||||
| import('estree').VariableDeclarator
|
||||
| import('estree').ExpressionStatement
|
||||
| import('estree').BlockStatement
|
||||
| import('estree').EmptyStatement
|
||||
| import('estree').DebuggerStatement
|
||||
| import('estree').WithStatement
|
||||
| import('estree').ReturnStatement
|
||||
| import('estree').LabeledStatement
|
||||
| import('estree').BreakStatement
|
||||
| import('estree').ContinueStatement
|
||||
| import('estree').IfStatement
|
||||
| import('estree').SwitchStatement
|
||||
| import('estree').ThrowStatement
|
||||
| import('estree').TryStatement
|
||||
| import('estree').WhileStatement
|
||||
| import('estree').DoWhileStatement
|
||||
| import('estree').ForStatement
|
||||
| import('estree').ForInStatement
|
||||
| import('estree').ForOfStatement
|
||||
| import('estree').VariableDeclaration
|
||||
| import('estree').ClassDeclaration
|
||||
| import('estree').ThisExpression
|
||||
| import('estree').ArrayExpression
|
||||
| import('estree').ObjectExpression
|
||||
| import('estree').YieldExpression
|
||||
| import('estree').UnaryExpression
|
||||
| import('estree').UpdateExpression
|
||||
| import('estree').BinaryExpression
|
||||
| import('estree').AssignmentExpression
|
||||
| import('estree').LogicalExpression
|
||||
| import('estree').MemberExpression
|
||||
| import('estree').ConditionalExpression
|
||||
| import('estree').SimpleCallExpression
|
||||
| import('estree').NewExpression
|
||||
| import('estree').SequenceExpression
|
||||
| import('estree').TemplateLiteral
|
||||
| import('estree').TaggedTemplateExpression
|
||||
| import('estree').ClassExpression
|
||||
| import('estree').MetaProperty
|
||||
| import('estree').AwaitExpression
|
||||
| import('estree').ImportExpression
|
||||
| import('estree').ChainExpression
|
||||
| import('estree').Property
|
||||
| import('estree').Super
|
||||
| import('estree').TemplateElement
|
||||
| import('estree').SpreadElement
|
||||
| import('estree').ObjectPattern
|
||||
| import('estree').ArrayPattern
|
||||
| import('estree').RestElement
|
||||
| import('estree').AssignmentPattern
|
||||
| import('estree').ClassBody
|
||||
| import('estree').MethodDefinition
|
||||
| import('estree').ImportDeclaration
|
||||
| import('estree').ExportNamedDeclaration
|
||||
| import('estree').ExportDefaultDeclaration
|
||||
| import('estree').ExportAllDeclaration
|
||||
| import('estree').ImportSpecifier
|
||||
| import('estree').ImportDefaultSpecifier
|
||||
| import('estree').ImportNamespaceSpecifier
|
||||
| import('estree').ExportSpecifier
|
||||
| {
|
||||
type: string;
|
||||
value: string;
|
||||
}
|
||||
)[];
|
||||
stringify(): string;
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
import Binding from '../../../nodes/Binding';
|
||||
import ElementWrapper from '../Element';
|
||||
import InlineComponentWrapper from '../InlineComponent';
|
||||
import Block from '../../Block';
|
||||
import { Node, Identifier } from 'estree';
|
||||
export default class BindingWrapper {
|
||||
node: Binding;
|
||||
parent: ElementWrapper | InlineComponentWrapper;
|
||||
object: string;
|
||||
handler: {
|
||||
uses_context: boolean;
|
||||
mutation: Node | Node[];
|
||||
contextual_dependencies: Set<string>;
|
||||
lhs?: Node;
|
||||
};
|
||||
snippet: Node;
|
||||
is_readonly: boolean;
|
||||
needs_lock: boolean;
|
||||
constructor(block: Block, node: Binding, parent: ElementWrapper | InlineComponentWrapper);
|
||||
get_dependencies(): Set<string>;
|
||||
is_readonly_media_attribute(): boolean;
|
||||
render(block: Block, lock: Identifier): void;
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
import EventHandler from '../../../nodes/EventHandler';
|
||||
import Wrapper from '../shared/Wrapper';
|
||||
import Block from '../../Block';
|
||||
import { Expression } from 'estree';
|
||||
export default class EventHandlerWrapper {
|
||||
node: EventHandler;
|
||||
parent: Wrapper;
|
||||
constructor(node: EventHandler, parent: Wrapper);
|
||||
get_snippet(block: any): any;
|
||||
render(block: Block, target: string | Expression): void;
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
import { BaseAttributeWrapper } from './Attribute';
|
||||
export default class SpreadAttributeWrapper extends BaseAttributeWrapper {}
|
|
@ -1,16 +0,0 @@
|
|||
import Attribute from '../../../nodes/Attribute';
|
||||
import Block from '../../Block';
|
||||
import AttributeWrapper from './Attribute';
|
||||
import ElementWrapper from '../Element';
|
||||
import Expression from '../../../nodes/shared/Expression';
|
||||
import Text from '../../../nodes/Text';
|
||||
export interface StyleProp {
|
||||
key: string;
|
||||
value: Array<Text | Expression>;
|
||||
important: boolean;
|
||||
}
|
||||
export default class StyleAttributeWrapper extends AttributeWrapper {
|
||||
node: Attribute;
|
||||
parent: ElementWrapper;
|
||||
render(block: Block): void;
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
export default function fix_attribute_casing(name: any): any;
|
|
@ -1,3 +0,0 @@
|
|||
import AttributeWrapper from './Attribute';
|
||||
import BindingWrapper from './Binding';
|
||||
export default function handle_select_value_binding(attr: AttributeWrapper | BindingWrapper, dependencies: Set<string>): void;
|
|
@ -1,41 +0,0 @@
|
|||
import Renderer from '../../Renderer';
|
||||
import Element from '../../../nodes/Element';
|
||||
import Wrapper from '../shared/Wrapper';
|
||||
import Block from '../../Block';
|
||||
import FragmentWrapper from '../Fragment';
|
||||
import AttributeWrapper from './Attribute';
|
||||
import StyleAttributeWrapper from './StyleAttribute';
|
||||
import SpreadAttributeWrapper from './SpreadAttribute';
|
||||
import Binding from './Binding';
|
||||
import { Identifier } from 'estree';
|
||||
import EventHandler from './EventHandler';
|
||||
interface BindingGroup {
|
||||
events: string[];
|
||||
bindings: Binding[];
|
||||
}
|
||||
export default class ElementWrapper extends Wrapper {
|
||||
node: Element;
|
||||
fragment: FragmentWrapper;
|
||||
attributes: Array<AttributeWrapper | StyleAttributeWrapper | SpreadAttributeWrapper>;
|
||||
bindings: Binding[];
|
||||
event_handlers: EventHandler[];
|
||||
class_dependencies: string[];
|
||||
select_binding_dependencies?: Set<string>;
|
||||
var: any;
|
||||
void: boolean;
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: Element, strip_whitespace: boolean, next_sibling: Wrapper);
|
||||
render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
|
||||
can_use_textcontent(): boolean;
|
||||
get_render_statement(block: Block): import('estree').Expression;
|
||||
get_claim_statement(nodes: Identifier): import('estree').Expression;
|
||||
add_directives_in_order(block: Block): void;
|
||||
add_bindings(block: Block, binding_group: BindingGroup): void;
|
||||
add_this_binding(block: Block, this_binding: Binding): void;
|
||||
add_attributes(block: Block): void;
|
||||
add_spread_attributes(block: Block): void;
|
||||
add_transitions(block: Block): void;
|
||||
add_animation(block: Block): void;
|
||||
add_classes(block: Block): void;
|
||||
add_manual_style_scoping(block: any): void;
|
||||
}
|
||||
export {};
|
|
@ -1,10 +0,0 @@
|
|||
import Wrapper from './shared/Wrapper';
|
||||
import { INode } from '../../nodes/interfaces';
|
||||
import Renderer from '../Renderer';
|
||||
import Block from '../Block';
|
||||
import { Identifier } from 'estree';
|
||||
export default class FragmentWrapper {
|
||||
nodes: Wrapper[];
|
||||
constructor(renderer: Renderer, block: Block, nodes: INode[], parent: Wrapper, strip_whitespace: boolean, next_sibling: Wrapper);
|
||||
render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
import Wrapper from './shared/Wrapper';
|
||||
import Renderer from '../Renderer';
|
||||
import Block from '../Block';
|
||||
import Head from '../../nodes/Head';
|
||||
import FragmentWrapper from './Fragment';
|
||||
import { Identifier } from 'estree';
|
||||
export default class HeadWrapper extends Wrapper {
|
||||
fragment: FragmentWrapper;
|
||||
node: Head;
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: Head, strip_whitespace: boolean, next_sibling: Wrapper);
|
||||
render(block: Block, _parent_node: Identifier, _parent_nodes: Identifier): void;
|
||||
}
|
|
@ -1,92 +0,0 @@
|
|||
import Wrapper from './shared/Wrapper';
|
||||
import Renderer from '../Renderer';
|
||||
import Block from '../Block';
|
||||
import EachBlock from '../../nodes/EachBlock';
|
||||
import IfBlock from '../../nodes/IfBlock';
|
||||
import ElseBlock from '../../nodes/ElseBlock';
|
||||
import FragmentWrapper from './Fragment';
|
||||
import { Identifier, Node, UnaryExpression } from 'estree';
|
||||
declare class IfBlockBranch extends Wrapper {
|
||||
block: Block;
|
||||
fragment: FragmentWrapper;
|
||||
dependencies?: string[];
|
||||
condition?: any;
|
||||
snippet?: Node;
|
||||
is_dynamic: boolean;
|
||||
var: any;
|
||||
constructor(renderer: Renderer, block: Block, parent: IfBlockWrapper, node: IfBlock | ElseBlock, strip_whitespace: boolean, next_sibling: Wrapper);
|
||||
}
|
||||
export default class IfBlockWrapper extends Wrapper {
|
||||
node: IfBlock;
|
||||
branches: IfBlockBranch[];
|
||||
needs_update: boolean;
|
||||
var: Identifier;
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: EachBlock, strip_whitespace: boolean, next_sibling: Wrapper);
|
||||
render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
|
||||
render_compound(
|
||||
block: Block,
|
||||
parent_node: Identifier,
|
||||
_parent_nodes: Identifier,
|
||||
dynamic: any,
|
||||
{
|
||||
name,
|
||||
anchor,
|
||||
has_else,
|
||||
if_exists_condition,
|
||||
has_transitions,
|
||||
}: {
|
||||
name: any;
|
||||
anchor: any;
|
||||
has_else: any;
|
||||
if_exists_condition: any;
|
||||
has_transitions: any;
|
||||
},
|
||||
detaching: any
|
||||
): void;
|
||||
render_compound_with_outros(
|
||||
block: Block,
|
||||
parent_node: Identifier,
|
||||
_parent_nodes: Identifier,
|
||||
dynamic: any,
|
||||
{
|
||||
name,
|
||||
anchor,
|
||||
has_else,
|
||||
has_transitions,
|
||||
if_exists_condition,
|
||||
}: {
|
||||
name: any;
|
||||
anchor: any;
|
||||
has_else: any;
|
||||
has_transitions: any;
|
||||
if_exists_condition: any;
|
||||
},
|
||||
detaching: any
|
||||
): void;
|
||||
render_simple(
|
||||
block: Block,
|
||||
parent_node: Identifier,
|
||||
_parent_nodes: Identifier,
|
||||
dynamic: any,
|
||||
{
|
||||
name,
|
||||
anchor,
|
||||
if_exists_condition,
|
||||
has_transitions,
|
||||
}: {
|
||||
name: any;
|
||||
anchor: any;
|
||||
if_exists_condition: any;
|
||||
has_transitions: any;
|
||||
},
|
||||
detaching: any
|
||||
): void;
|
||||
get_initial_dirty_bit(): {
|
||||
readonly type: 'ArrayExpression' | 'UnaryExpression';
|
||||
elements: UnaryExpression[];
|
||||
operator: import('estree').UnaryOperator;
|
||||
prefix: true;
|
||||
argument: import('estree').Expression;
|
||||
};
|
||||
}
|
||||
export {};
|
|
@ -1,25 +0,0 @@
|
|||
import Wrapper from '../shared/Wrapper';
|
||||
import Renderer from '../../Renderer';
|
||||
import Block from '../../Block';
|
||||
import InlineComponent from '../../../nodes/InlineComponent';
|
||||
import FragmentWrapper from '../Fragment';
|
||||
import TemplateScope from '../../../nodes/shared/TemplateScope';
|
||||
import { Node, Identifier } from 'estree';
|
||||
declare type SlotDefinition = {
|
||||
block: Block;
|
||||
scope: TemplateScope;
|
||||
get_context?: Node;
|
||||
get_changes?: Node;
|
||||
};
|
||||
export default class InlineComponentWrapper extends Wrapper {
|
||||
var: Identifier;
|
||||
slots: Map<string, SlotDefinition>;
|
||||
node: InlineComponent;
|
||||
fragment: FragmentWrapper;
|
||||
children: Array<Wrapper | FragmentWrapper>;
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: InlineComponent, strip_whitespace: boolean, next_sibling: Wrapper);
|
||||
set_slot(name: string, slot_definition: SlotDefinition): void;
|
||||
warn_if_reactive(): void;
|
||||
render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
|
||||
}
|
||||
export {};
|
|
@ -1,18 +0,0 @@
|
|||
import Wrapper from './shared/Wrapper';
|
||||
import Renderer from '../Renderer';
|
||||
import Block from '../Block';
|
||||
import EachBlock from '../../nodes/EachBlock';
|
||||
import KeyBlock from '../../nodes/KeyBlock';
|
||||
import FragmentWrapper from './Fragment';
|
||||
import { Identifier } from 'estree';
|
||||
export default class KeyBlockWrapper extends Wrapper {
|
||||
node: KeyBlock;
|
||||
fragment: FragmentWrapper;
|
||||
block: Block;
|
||||
dependencies: string[];
|
||||
var: Identifier;
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: EachBlock, strip_whitespace: boolean, next_sibling: Wrapper);
|
||||
render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
|
||||
render_static_key(_block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
|
||||
render_dynamic_key(block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
import Renderer from '../Renderer';
|
||||
import Block from '../Block';
|
||||
import Tag from './shared/Tag';
|
||||
import Wrapper from './shared/Wrapper';
|
||||
import MustacheTag from '../../nodes/MustacheTag';
|
||||
import RawMustacheTag from '../../nodes/RawMustacheTag';
|
||||
import { Identifier } from 'estree';
|
||||
export default class MustacheTagWrapper extends Tag {
|
||||
var: Identifier;
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: MustacheTag | RawMustacheTag);
|
||||
render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
import Renderer from '../Renderer';
|
||||
import Block from '../Block';
|
||||
import Tag from './shared/Tag';
|
||||
import Wrapper from './shared/Wrapper';
|
||||
import MustacheTag from '../../nodes/MustacheTag';
|
||||
import RawMustacheTag from '../../nodes/RawMustacheTag';
|
||||
import { Identifier } from 'estree';
|
||||
export default class RawMustacheTagWrapper extends Tag {
|
||||
var: Identifier;
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: MustacheTag | RawMustacheTag);
|
||||
render(block: Block, parent_node: Identifier, _parent_nodes: Identifier): void;
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
import Wrapper from './shared/Wrapper';
|
||||
import Renderer from '../Renderer';
|
||||
import Block from '../Block';
|
||||
import Slot from '../../nodes/Slot';
|
||||
import FragmentWrapper from './Fragment';
|
||||
import { Identifier } from 'estree';
|
||||
export default class SlotWrapper extends Wrapper {
|
||||
node: Slot;
|
||||
fragment: FragmentWrapper;
|
||||
fallback: Block | null;
|
||||
slot_block: Block;
|
||||
var: Identifier;
|
||||
dependencies: Set<string>;
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: Slot, strip_whitespace: boolean, next_sibling: Wrapper);
|
||||
render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
|
||||
is_dependency_dynamic(name: string): boolean;
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
import Wrapper from './shared/Wrapper';
|
||||
import Renderer from '../Renderer';
|
||||
import Block from '../Block';
|
||||
import FragmentWrapper from './Fragment';
|
||||
import InlineComponentWrapper from './InlineComponent';
|
||||
import { INode } from '../../nodes/interfaces';
|
||||
import Let from '../../nodes/Let';
|
||||
import TemplateScope from '../../nodes/shared/TemplateScope';
|
||||
declare type NodeWithLets = INode & {
|
||||
scope: TemplateScope;
|
||||
lets: Let[];
|
||||
slot_template_name: string;
|
||||
};
|
||||
export default class SlotTemplateWrapper extends Wrapper {
|
||||
node: NodeWithLets;
|
||||
fragment: FragmentWrapper;
|
||||
block: Block;
|
||||
parent: InlineComponentWrapper;
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: NodeWithLets, strip_whitespace: boolean, next_sibling: Wrapper);
|
||||
render(): void;
|
||||
}
|
||||
export {};
|
|
@ -1,14 +0,0 @@
|
|||
import Renderer from '../Renderer';
|
||||
import Block from '../Block';
|
||||
import Text from '../../nodes/Text';
|
||||
import Wrapper from './shared/Wrapper';
|
||||
import { Identifier } from 'estree';
|
||||
export default class TextWrapper extends Wrapper {
|
||||
node: Text;
|
||||
data: string;
|
||||
skip: boolean;
|
||||
var: Identifier;
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: Text, data: string);
|
||||
use_space(): boolean;
|
||||
render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
import Wrapper from './shared/Wrapper';
|
||||
import Renderer from '../Renderer';
|
||||
import Block from '../Block';
|
||||
import Title from '../../nodes/Title';
|
||||
import { Identifier } from 'estree';
|
||||
export default class TitleWrapper extends Wrapper {
|
||||
node: Title;
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: Title, _strip_whitespace: boolean, _next_sibling: Wrapper);
|
||||
render(block: Block, _parent_node: Identifier, _parent_nodes: Identifier): void;
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
import Renderer from '../Renderer';
|
||||
import Block from '../Block';
|
||||
import Wrapper from './shared/Wrapper';
|
||||
import Window from '../../nodes/Window';
|
||||
import { Identifier } from 'estree';
|
||||
import { TemplateNode } from '../../../interfaces';
|
||||
import EventHandler from './Element/EventHandler';
|
||||
export default class WindowWrapper extends Wrapper {
|
||||
node: Window;
|
||||
handlers: EventHandler[];
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: TemplateNode);
|
||||
render(block: Block, _parent_node: Identifier, _parent_nodes: Identifier): void;
|
||||
}
|
|
@ -1,86 +0,0 @@
|
|||
import Wrapper from './Wrapper';
|
||||
import Renderer from '../../Renderer';
|
||||
import Block from '../../Block';
|
||||
import MustacheTag from '../../../nodes/MustacheTag';
|
||||
import RawMustacheTag from '../../../nodes/RawMustacheTag';
|
||||
import { Node } from 'estree';
|
||||
export default class Tag extends Wrapper {
|
||||
node: MustacheTag | RawMustacheTag;
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: MustacheTag | RawMustacheTag);
|
||||
is_dependencies_static(): boolean;
|
||||
rename_this_method(
|
||||
block: Block,
|
||||
update: (value: Node) => Node | Node[]
|
||||
): {
|
||||
init:
|
||||
| import('estree').Identifier
|
||||
| import('estree').SimpleLiteral
|
||||
| import('estree').RegExpLiteral
|
||||
| import('estree').Program
|
||||
| import('estree').FunctionDeclaration
|
||||
| import('estree').FunctionExpression
|
||||
| import('estree').ArrowFunctionExpression
|
||||
| import('estree').SwitchCase
|
||||
| import('estree').CatchClause
|
||||
| import('estree').VariableDeclarator
|
||||
| import('estree').ExpressionStatement
|
||||
| import('estree').BlockStatement
|
||||
| import('estree').EmptyStatement
|
||||
| import('estree').DebuggerStatement
|
||||
| import('estree').WithStatement
|
||||
| import('estree').ReturnStatement
|
||||
| import('estree').LabeledStatement
|
||||
| import('estree').BreakStatement
|
||||
| import('estree').ContinueStatement
|
||||
| import('estree').IfStatement
|
||||
| import('estree').SwitchStatement
|
||||
| import('estree').ThrowStatement
|
||||
| import('estree').TryStatement
|
||||
| import('estree').WhileStatement
|
||||
| import('estree').DoWhileStatement
|
||||
| import('estree').ForStatement
|
||||
| import('estree').ForInStatement
|
||||
| import('estree').ForOfStatement
|
||||
| import('estree').VariableDeclaration
|
||||
| import('estree').ClassDeclaration
|
||||
| import('estree').ThisExpression
|
||||
| import('estree').ArrayExpression
|
||||
| import('estree').ObjectExpression
|
||||
| import('estree').YieldExpression
|
||||
| import('estree').UnaryExpression
|
||||
| import('estree').UpdateExpression
|
||||
| import('estree').BinaryExpression
|
||||
| import('estree').AssignmentExpression
|
||||
| import('estree').LogicalExpression
|
||||
| import('estree').MemberExpression
|
||||
| import('estree').ConditionalExpression
|
||||
| import('estree').SimpleCallExpression
|
||||
| import('estree').NewExpression
|
||||
| import('estree').SequenceExpression
|
||||
| import('estree').TemplateLiteral
|
||||
| import('estree').TaggedTemplateExpression
|
||||
| import('estree').ClassExpression
|
||||
| import('estree').MetaProperty
|
||||
| import('estree').AwaitExpression
|
||||
| import('estree').ImportExpression
|
||||
| import('estree').ChainExpression
|
||||
| import('estree').Property
|
||||
| import('estree').Super
|
||||
| import('estree').TemplateElement
|
||||
| import('estree').SpreadElement
|
||||
| import('estree').ObjectPattern
|
||||
| import('estree').ArrayPattern
|
||||
| import('estree').RestElement
|
||||
| import('estree').AssignmentPattern
|
||||
| import('estree').ClassBody
|
||||
| import('estree').MethodDefinition
|
||||
| import('estree').ImportDeclaration
|
||||
| import('estree').ExportNamedDeclaration
|
||||
| import('estree').ExportDefaultDeclaration
|
||||
| import('estree').ExportAllDeclaration
|
||||
| import('estree').ImportSpecifier
|
||||
| import('estree').ImportDefaultSpecifier
|
||||
| import('estree').ImportNamespaceSpecifier
|
||||
| import('estree').ExportSpecifier;
|
||||
};
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
import Renderer from '../../Renderer';
|
||||
import Block from '../../Block';
|
||||
import { TemplateNode } from '../../../../interfaces';
|
||||
import { Identifier } from 'estree';
|
||||
export default class Wrapper {
|
||||
renderer: Renderer;
|
||||
parent: Wrapper;
|
||||
node: TemplateNode;
|
||||
prev: Wrapper | null;
|
||||
next: Wrapper | null;
|
||||
var: Identifier;
|
||||
can_use_innerhtml: boolean;
|
||||
is_static_content: boolean;
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: TemplateNode);
|
||||
cannot_use_innerhtml(): void;
|
||||
not_static_content(): void;
|
||||
get_or_create_anchor(block: Block, parent_node: Identifier, parent_nodes: Identifier): Identifier;
|
||||
get_update_mount_node(anchor: Identifier): Identifier;
|
||||
is_dom_node(): boolean;
|
||||
render(_block: Block, _parent_node: Identifier, _parent_nodes: Identifier): void;
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
import Block from '../../Block';
|
||||
import Action from '../../../nodes/Action';
|
||||
export default function add_actions(block: Block, target: string, actions: Action[]): void;
|
||||
export declare function add_action(block: Block, target: string, action: Action): void;
|
|
@ -1,5 +0,0 @@
|
|||
import Block from '../../Block';
|
||||
import EventHandler from '../Element/EventHandler';
|
||||
import { Expression } from 'estree';
|
||||
export default function add_event_handlers(block: Block, target: string | Expression, handlers: EventHandler[]): void;
|
||||
export declare function add_event_handler(block: Block, target: string | Expression, handler: EventHandler): void;
|
|
@ -1,5 +0,0 @@
|
|||
import Component from '../../../Component';
|
||||
import Block from '../../Block';
|
||||
import BindingWrapper from '../Element/Binding';
|
||||
import { Identifier } from 'estree';
|
||||
export default function bind_this(component: Component, block: Block, binding: BindingWrapper, variable: Identifier): import('estree').Node[];
|
|
@ -1,3 +0,0 @@
|
|||
import Component from '../../../Component';
|
||||
import { INode } from '../../../nodes/interfaces';
|
||||
export default function create_debugging_comment(node: INode, component: Component): string;
|
|
@ -1,20 +0,0 @@
|
|||
import Let from '../../../nodes/Let';
|
||||
import Block from '../../Block';
|
||||
import TemplateScope from '../../../nodes/shared/TemplateScope';
|
||||
export declare function get_slot_definition(
|
||||
block: Block,
|
||||
scope: TemplateScope,
|
||||
lets: Let[]
|
||||
):
|
||||
| {
|
||||
block: Block;
|
||||
scope: TemplateScope;
|
||||
get_context?: undefined;
|
||||
get_changes?: undefined;
|
||||
}
|
||||
| {
|
||||
block: Block;
|
||||
scope: TemplateScope;
|
||||
get_context: import('estree').Expression;
|
||||
get_changes: import('estree').Expression;
|
||||
};
|
|
@ -1,2 +0,0 @@
|
|||
import { Var } from '../../../../interfaces';
|
||||
export default function is_dynamic(variable: Var): boolean;
|
|
@ -1 +0,0 @@
|
|||
export declare function is_head(node: any): boolean;
|
|
@ -1,4 +0,0 @@
|
|||
import InlineComponentWrapper from '../InlineComponent';
|
||||
import ElementWrapper from '../Element';
|
||||
import Binding from '../../../nodes/Binding';
|
||||
export default function mark_each_block_bindings(parent: ElementWrapper | InlineComponentWrapper, binding: Binding): void;
|
|
@ -1,33 +0,0 @@
|
|||
import { AppendTarget, CompileOptions } from '../../interfaces';
|
||||
import { INode } from '../nodes/interfaces';
|
||||
import { Expression, TemplateLiteral, Identifier } from 'estree';
|
||||
export interface RenderOptions extends CompileOptions {
|
||||
locate: (
|
||||
c: number
|
||||
) => {
|
||||
line: number;
|
||||
column: number;
|
||||
};
|
||||
head_id?: string;
|
||||
}
|
||||
export default class Renderer {
|
||||
has_bindings: boolean;
|
||||
name: Identifier;
|
||||
stack: Array<{
|
||||
current: {
|
||||
value: string;
|
||||
};
|
||||
literal: TemplateLiteral;
|
||||
}>;
|
||||
current: {
|
||||
value: string;
|
||||
};
|
||||
literal: TemplateLiteral;
|
||||
targets: AppendTarget[];
|
||||
constructor({ name }: { name: any });
|
||||
add_string(str: string): void;
|
||||
add_expression(node: Expression): void;
|
||||
push(): void;
|
||||
pop(): TemplateLiteral;
|
||||
render(nodes: INode[], options: RenderOptions): void;
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
import Renderer, { RenderOptions } from '../Renderer';
|
||||
import AwaitBlock from '../../nodes/AwaitBlock';
|
||||
export default function (node: AwaitBlock, renderer: Renderer, options: RenderOptions): void;
|
|
@ -1,3 +0,0 @@
|
|||
import Renderer, { RenderOptions } from '../Renderer';
|
||||
import Comment from '../../nodes/Comment';
|
||||
export default function (_node: Comment, _renderer: Renderer, _options: RenderOptions): void;
|
|
@ -1,3 +0,0 @@
|
|||
import DebugTag from '../../nodes/DebugTag';
|
||||
import Renderer, { RenderOptions } from '../Renderer';
|
||||
export default function (node: DebugTag, renderer: Renderer, options: RenderOptions): void;
|
|
@ -1,3 +0,0 @@
|
|||
import Renderer, { RenderOptions } from '../Renderer';
|
||||
import EachBlock from '../../nodes/EachBlock';
|
||||
export default function (node: EachBlock, renderer: Renderer, options: RenderOptions): void;
|
|
@ -1,3 +0,0 @@
|
|||
import Renderer, { RenderOptions } from '../Renderer';
|
||||
import Element from '../../nodes/Element';
|
||||
export default function (node: Element, renderer: Renderer, options: RenderOptions): void;
|
|
@ -1,3 +0,0 @@
|
|||
import Renderer, { RenderOptions } from '../Renderer';
|
||||
import Head from '../../nodes/Head';
|
||||
export default function (node: Head, renderer: Renderer, options: RenderOptions): void;
|
|
@ -1,3 +0,0 @@
|
|||
import Renderer, { RenderOptions } from '../Renderer';
|
||||
import RawMustacheTag from '../../nodes/RawMustacheTag';
|
||||
export default function (node: RawMustacheTag, renderer: Renderer, _options: RenderOptions): void;
|
|
@ -1,3 +0,0 @@
|
|||
import IfBlock from '../../nodes/IfBlock';
|
||||
import Renderer, { RenderOptions } from '../Renderer';
|
||||
export default function (node: IfBlock, renderer: Renderer, options: RenderOptions): void;
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue