Skip to content

Commit

Permalink
Format files
Browse files Browse the repository at this point in the history
  • Loading branch information
drwpow committed Mar 16, 2021
1 parent 49d5c59 commit c9db051
Show file tree
Hide file tree
Showing 108 changed files with 20,336 additions and 21,026 deletions.
3 changes: 1 addition & 2 deletions src/@types/astro.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

export interface AstroConfigRaw {
dist: string;
projectRoot: string;
Expand All @@ -9,4 +8,4 @@ export interface AstroConfig {
dist: string;
projectRoot: URL;
hmxRoot: URL;
}
}
32 changes: 16 additions & 16 deletions src/@types/compiler/Stats.d.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
interface Timing {
label: string;
start: number;
end: number;
children: 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;
};
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 {};
236 changes: 122 additions & 114 deletions src/@types/compiler/compile/Component.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,123 +8,131 @@ 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;
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>>;
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;
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;
};
};
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;
};
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 {};
20 changes: 15 additions & 5 deletions src/@types/compiler/compile/create_module.d.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
import { ModuleFormat } from '../interfaces';
import { Identifier, ImportDeclaration } from 'estree';
interface Export {
name: string;
as: string;
name: string;
as: string;
}
export default function create_module(program: any, format: ModuleFormat, name: Identifier, banner: string, sveltePath: string, helpers: Array<{
export default function create_module(
program: any,
format: ModuleFormat,
name: Identifier,
banner: string,
sveltePath: string,
helpers: Array<{
name: string;
alias: Identifier;
}>, globals: Array<{
}>,
globals: Array<{
name: string;
alias: Identifier;
}>, imports: ImportDeclaration[], module_exports: Export[]): void;
}>,
imports: ImportDeclaration[],
module_exports: Export[]
): void;
export {};
40 changes: 20 additions & 20 deletions src/@types/compiler/compile/css/Selector.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@ 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;
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;
global: boolean;
host: boolean;
combinator: CssNode;
selectors: CssNode[];
start: number;
end: number;
should_encapsulate: boolean;
constructor(combinator: CssNode);
add(selector: CssNode): void;
}
export {};
Loading

0 comments on commit c9db051

Please sign in to comment.