diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index d6a8d8039e..0000000000 --- a/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -src/compiler.js diff --git a/package-lock.json b/package-lock.json index 67e840061e..fbf3f46dab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index 1164ec7333..207af0f888 100644 --- a/package.json +++ b/package.json @@ -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" } } diff --git a/src/@types/compiler/Stats.d.ts b/src/@types/compiler/Stats.d.ts deleted file mode 100644 index 3ada0dab20..0000000000 --- a/src/@types/compiler/Stats.d.ts +++ /dev/null @@ -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 {}; diff --git a/src/@types/compiler/compile/Component.d.ts b/src/@types/compiler/compile/Component.d.ts deleted file mode 100644 index 0cfb1b8be7..0000000000 --- a/src/@types/compiler/compile/Component.d.ts +++ /dev/null @@ -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; - ignore_stack: Array>; - ast: Ast; - original_ast: Ast; - source: string; - name: Identifier; - compile_options: CompileOptions; - fragment: Fragment; - module_scope: Scope; - instance_scope: Scope; - instance_scope_map: WeakMap; - component_options: ComponentOptions; - namespace: string; - tag: string; - accessors: boolean; - vars: Var[]; - var_lookup: Map; - imports: ImportDeclaration[]; - hoistable_nodes: Set; - node_for_declaration: Map; - partly_hoisted: Array; - fully_hoisted: Array; - reactive_declarations: Array<{ - assignees: Set; - dependencies: Set; - node: Node; - declaration: Node; - }>; - reactive_declaration_nodes: Set; - has_reactive_assignments: boolean; - injected_reactive_declaration_vars: Set; - helpers: Map; - globals: Map; - indirect_dependencies: Map>; - file: string; - locate: ( - c: number - ) => { - line: number; - column: number; - }; - elements: Element[]; - stylesheet: Stylesheet; - aliases: Map; - used_names: Set; - globally_used_names: Set; - slots: Map; - slot_outlets: Set; - 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 {}; diff --git a/src/@types/compiler/compile/create_module.d.ts b/src/@types/compiler/compile/create_module.d.ts deleted file mode 100644 index 075ccc5afe..0000000000 --- a/src/@types/compiler/compile/create_module.d.ts +++ /dev/null @@ -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 {}; diff --git a/src/@types/compiler/compile/css/Selector.d.ts b/src/@types/compiler/compile/css/Selector.d.ts deleted file mode 100644 index f49f69234a..0000000000 --- a/src/@types/compiler/compile/css/Selector.d.ts +++ /dev/null @@ -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 {}; diff --git a/src/@types/compiler/compile/css/Stylesheet.d.ts b/src/@types/compiler/compile/css/Stylesheet.d.ts deleted file mode 100644 index 71a1a24ca9..0000000000 --- a/src/@types/compiler/compile/css/Stylesheet.d.ts +++ /dev/null @@ -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, 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): void; - minify(code: MagicString): void; -} -declare class Atrule { - node: CssNode; - children: Array; - 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, 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; - keyframes: Map; - nodes_with_css_class: Set; - 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 {}; diff --git a/src/@types/compiler/compile/css/gather_possible_values.d.ts b/src/@types/compiler/compile/css/gather_possible_values.d.ts deleted file mode 100644 index ca26ba94b3..0000000000 --- a/src/@types/compiler/compile/css/gather_possible_values.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { Node } from 'estree'; -export declare const UNKNOWN: {}; -export declare function gather_possible_values(node: Node, set: Set): void; diff --git a/src/@types/compiler/compile/css/interfaces.d.ts b/src/@types/compiler/compile/css/interfaces.d.ts deleted file mode 100644 index c7530a6dda..0000000000 --- a/src/@types/compiler/compile/css/interfaces.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface CssNode { - type: string; - start: number; - end: number; - [prop_name: string]: any; -} diff --git a/src/@types/compiler/compile/index.d.ts b/src/@types/compiler/compile/index.d.ts deleted file mode 100644 index 23d1e98309..0000000000 --- a/src/@types/compiler/compile/index.d.ts +++ /dev/null @@ -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; - }; - }; -}; diff --git a/src/@types/compiler/compile/internal_exports.d.ts b/src/@types/compiler/compile/internal_exports.d.ts deleted file mode 100644 index 1829c318fb..0000000000 --- a/src/@types/compiler/compile/internal_exports.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: Set; -export default _default; diff --git a/src/@types/compiler/compile/nodes/Action.d.ts b/src/@types/compiler/compile/nodes/Action.d.ts deleted file mode 100644 index 5716829359..0000000000 --- a/src/@types/compiler/compile/nodes/Action.d.ts +++ /dev/null @@ -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); -} diff --git a/src/@types/compiler/compile/nodes/Animation.d.ts b/src/@types/compiler/compile/nodes/Animation.d.ts deleted file mode 100644 index 5b4b75d836..0000000000 --- a/src/@types/compiler/compile/nodes/Animation.d.ts +++ /dev/null @@ -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); -} diff --git a/src/@types/compiler/compile/nodes/Attribute.d.ts b/src/@types/compiler/compile/nodes/Attribute.d.ts deleted file mode 100644 index 12e78962ca..0000000000 --- a/src/@types/compiler/compile/nodes/Attribute.d.ts +++ /dev/null @@ -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; - dependencies: Set; - 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; -} diff --git a/src/@types/compiler/compile/nodes/AwaitBlock.d.ts b/src/@types/compiler/compile/nodes/AwaitBlock.d.ts deleted file mode 100644 index 4ebf8f0730..0000000000 --- a/src/@types/compiler/compile/nodes/AwaitBlock.d.ts +++ /dev/null @@ -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); -} diff --git a/src/@types/compiler/compile/nodes/Binding.d.ts b/src/@types/compiler/compile/nodes/Binding.d.ts deleted file mode 100644 index a8f7ab3b09..0000000000 --- a/src/@types/compiler/compile/nodes/Binding.d.ts +++ /dev/null @@ -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; -} diff --git a/src/@types/compiler/compile/nodes/Body.d.ts b/src/@types/compiler/compile/nodes/Body.d.ts deleted file mode 100644 index 19c61e65a0..0000000000 --- a/src/@types/compiler/compile/nodes/Body.d.ts +++ /dev/null @@ -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); -} diff --git a/src/@types/compiler/compile/nodes/CatchBlock.d.ts b/src/@types/compiler/compile/nodes/CatchBlock.d.ts deleted file mode 100644 index cf7abad642..0000000000 --- a/src/@types/compiler/compile/nodes/CatchBlock.d.ts +++ /dev/null @@ -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); -} diff --git a/src/@types/compiler/compile/nodes/Class.d.ts b/src/@types/compiler/compile/nodes/Class.d.ts deleted file mode 100644 index d2bd8f0186..0000000000 --- a/src/@types/compiler/compile/nodes/Class.d.ts +++ /dev/null @@ -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); -} diff --git a/src/@types/compiler/compile/nodes/Comment.d.ts b/src/@types/compiler/compile/nodes/Comment.d.ts deleted file mode 100644 index 89e399e2e6..0000000000 --- a/src/@types/compiler/compile/nodes/Comment.d.ts +++ /dev/null @@ -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); -} diff --git a/src/@types/compiler/compile/nodes/DebugTag.d.ts b/src/@types/compiler/compile/nodes/DebugTag.d.ts deleted file mode 100644 index 95355425f4..0000000000 --- a/src/@types/compiler/compile/nodes/DebugTag.d.ts +++ /dev/null @@ -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); -} diff --git a/src/@types/compiler/compile/nodes/DefaultSlotTemplate.d.ts b/src/@types/compiler/compile/nodes/DefaultSlotTemplate.d.ts deleted file mode 100644 index 2f99064c6e..0000000000 --- a/src/@types/compiler/compile/nodes/DefaultSlotTemplate.d.ts +++ /dev/null @@ -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[]); -} diff --git a/src/@types/compiler/compile/nodes/EachBlock.d.ts b/src/@types/compiler/compile/nodes/EachBlock.d.ts deleted file mode 100644 index 23480c8391..0000000000 --- a/src/@types/compiler/compile/nodes/EachBlock.d.ts +++ /dev/null @@ -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); -} diff --git a/src/@types/compiler/compile/nodes/Element.d.ts b/src/@types/compiler/compile/nodes/Element.d.ts deleted file mode 100644 index 0b519af705..0000000000 --- a/src/@types/compiler/compile/nodes/Element.d.ts +++ /dev/null @@ -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; -} diff --git a/src/@types/compiler/compile/nodes/ElseBlock.d.ts b/src/@types/compiler/compile/nodes/ElseBlock.d.ts deleted file mode 100644 index 1c1cc1406c..0000000000 --- a/src/@types/compiler/compile/nodes/ElseBlock.d.ts +++ /dev/null @@ -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); -} diff --git a/src/@types/compiler/compile/nodes/EventHandler.d.ts b/src/@types/compiler/compile/nodes/EventHandler.d.ts deleted file mode 100644 index 03d1575bfb..0000000000 --- a/src/@types/compiler/compile/nodes/EventHandler.d.ts +++ /dev/null @@ -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; - 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; -} diff --git a/src/@types/compiler/compile/nodes/Fragment.d.ts b/src/@types/compiler/compile/nodes/Fragment.d.ts deleted file mode 100644 index a491da6a2c..0000000000 --- a/src/@types/compiler/compile/nodes/Fragment.d.ts +++ /dev/null @@ -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); -} diff --git a/src/@types/compiler/compile/nodes/Head.d.ts b/src/@types/compiler/compile/nodes/Head.d.ts deleted file mode 100644 index ab23220879..0000000000 --- a/src/@types/compiler/compile/nodes/Head.d.ts +++ /dev/null @@ -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); -} diff --git a/src/@types/compiler/compile/nodes/IfBlock.d.ts b/src/@types/compiler/compile/nodes/IfBlock.d.ts deleted file mode 100644 index 02049ee879..0000000000 --- a/src/@types/compiler/compile/nodes/IfBlock.d.ts +++ /dev/null @@ -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); -} diff --git a/src/@types/compiler/compile/nodes/InlineComponent.d.ts b/src/@types/compiler/compile/nodes/InlineComponent.d.ts deleted file mode 100644 index 7b01a7a7f6..0000000000 --- a/src/@types/compiler/compile/nodes/InlineComponent.d.ts +++ /dev/null @@ -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; -} diff --git a/src/@types/compiler/compile/nodes/KeyBlock.d.ts b/src/@types/compiler/compile/nodes/KeyBlock.d.ts deleted file mode 100644 index 9c6df46b84..0000000000 --- a/src/@types/compiler/compile/nodes/KeyBlock.d.ts +++ /dev/null @@ -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); -} diff --git a/src/@types/compiler/compile/nodes/Let.d.ts b/src/@types/compiler/compile/nodes/Let.d.ts deleted file mode 100644 index 43065e0c66..0000000000 --- a/src/@types/compiler/compile/nodes/Let.d.ts +++ /dev/null @@ -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); -} diff --git a/src/@types/compiler/compile/nodes/MustacheTag.d.ts b/src/@types/compiler/compile/nodes/MustacheTag.d.ts deleted file mode 100644 index e1a5dc9644..0000000000 --- a/src/@types/compiler/compile/nodes/MustacheTag.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import Tag from './shared/Tag'; -export default class MustacheTag extends Tag { - type: 'MustacheTag'; -} diff --git a/src/@types/compiler/compile/nodes/Options.d.ts b/src/@types/compiler/compile/nodes/Options.d.ts deleted file mode 100644 index a61fac82c1..0000000000 --- a/src/@types/compiler/compile/nodes/Options.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import Node from './shared/Node'; -export default class Options extends Node { - type: 'Options'; -} diff --git a/src/@types/compiler/compile/nodes/PendingBlock.d.ts b/src/@types/compiler/compile/nodes/PendingBlock.d.ts deleted file mode 100644 index b2cd094907..0000000000 --- a/src/@types/compiler/compile/nodes/PendingBlock.d.ts +++ /dev/null @@ -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); -} diff --git a/src/@types/compiler/compile/nodes/RawMustacheTag.d.ts b/src/@types/compiler/compile/nodes/RawMustacheTag.d.ts deleted file mode 100644 index a3c624b502..0000000000 --- a/src/@types/compiler/compile/nodes/RawMustacheTag.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import Tag from './shared/Tag'; -export default class RawMustacheTag extends Tag { - type: 'RawMustacheTag'; -} diff --git a/src/@types/compiler/compile/nodes/Slot.d.ts b/src/@types/compiler/compile/nodes/Slot.d.ts deleted file mode 100644 index fb69f91de5..0000000000 --- a/src/@types/compiler/compile/nodes/Slot.d.ts +++ /dev/null @@ -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; - constructor(component: Component, parent: INode, scope: TemplateScope, info: TemplateNode); -} diff --git a/src/@types/compiler/compile/nodes/SlotTemplate.d.ts b/src/@types/compiler/compile/nodes/SlotTemplate.d.ts deleted file mode 100644 index 65f649a44b..0000000000 --- a/src/@types/compiler/compile/nodes/SlotTemplate.d.ts +++ /dev/null @@ -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; -} diff --git a/src/@types/compiler/compile/nodes/Text.d.ts b/src/@types/compiler/compile/nodes/Text.d.ts deleted file mode 100644 index ab1d940c57..0000000000 --- a/src/@types/compiler/compile/nodes/Text.d.ts +++ /dev/null @@ -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; -} diff --git a/src/@types/compiler/compile/nodes/ThenBlock.d.ts b/src/@types/compiler/compile/nodes/ThenBlock.d.ts deleted file mode 100644 index d6be4438ff..0000000000 --- a/src/@types/compiler/compile/nodes/ThenBlock.d.ts +++ /dev/null @@ -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); -} diff --git a/src/@types/compiler/compile/nodes/Title.d.ts b/src/@types/compiler/compile/nodes/Title.d.ts deleted file mode 100644 index 092629f156..0000000000 --- a/src/@types/compiler/compile/nodes/Title.d.ts +++ /dev/null @@ -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); -} diff --git a/src/@types/compiler/compile/nodes/Transition.d.ts b/src/@types/compiler/compile/nodes/Transition.d.ts deleted file mode 100644 index 9415609dd3..0000000000 --- a/src/@types/compiler/compile/nodes/Transition.d.ts +++ /dev/null @@ -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); -} diff --git a/src/@types/compiler/compile/nodes/Window.d.ts b/src/@types/compiler/compile/nodes/Window.d.ts deleted file mode 100644 index dfe573cacc..0000000000 --- a/src/@types/compiler/compile/nodes/Window.d.ts +++ /dev/null @@ -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); -} diff --git a/src/@types/compiler/compile/nodes/interfaces.d.ts b/src/@types/compiler/compile/nodes/interfaces.d.ts deleted file mode 100644 index 51d8145e7d..0000000000 --- a/src/@types/compiler/compile/nodes/interfaces.d.ts +++ /dev/null @@ -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; diff --git a/src/@types/compiler/compile/nodes/shared/AbstractBlock.d.ts b/src/@types/compiler/compile/nodes/shared/AbstractBlock.d.ts deleted file mode 100644 index 6379acaf3e..0000000000 --- a/src/@types/compiler/compile/nodes/shared/AbstractBlock.d.ts +++ /dev/null @@ -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; -} diff --git a/src/@types/compiler/compile/nodes/shared/Context.d.ts b/src/@types/compiler/compile/nodes/shared/Context.d.ts deleted file mode 100644 index aca6133a91..0000000000 --- a/src/@types/compiler/compile/nodes/shared/Context.d.ts +++ /dev/null @@ -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; diff --git a/src/@types/compiler/compile/nodes/shared/Expression.d.ts b/src/@types/compiler/compile/nodes/shared/Expression.d.ts deleted file mode 100644 index b9b24f6eb0..0000000000 --- a/src/@types/compiler/compile/nodes/shared/Expression.d.ts +++ /dev/null @@ -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; - dependencies: Set; - contextual_dependencies: Set; - template_scope: TemplateScope; - scope: Scope; - scope_map: WeakMap; - declarations: Array; - 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 {}; diff --git a/src/@types/compiler/compile/nodes/shared/Node.d.ts b/src/@types/compiler/compile/nodes/shared/Node.d.ts deleted file mode 100644 index 0c2b945ff7..0000000000 --- a/src/@types/compiler/compile/nodes/shared/Node.d.ts +++ /dev/null @@ -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; -} diff --git a/src/@types/compiler/compile/nodes/shared/Tag.d.ts b/src/@types/compiler/compile/nodes/shared/Tag.d.ts deleted file mode 100644 index 5dd9ecf2d8..0000000000 --- a/src/@types/compiler/compile/nodes/shared/Tag.d.ts +++ /dev/null @@ -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); -} diff --git a/src/@types/compiler/compile/nodes/shared/TemplateScope.d.ts b/src/@types/compiler/compile/nodes/shared/TemplateScope.d.ts deleted file mode 100644 index e1bb8df4cd..0000000000 --- a/src/@types/compiler/compile/nodes/shared/TemplateScope.d.ts +++ /dev/null @@ -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; - dependencies_for_name: Map>; - owners: Map; - parent?: TemplateScope; - constructor(parent?: TemplateScope); - add(name: any, dependencies: Set, 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 {}; diff --git a/src/@types/compiler/compile/nodes/shared/is_contextual.d.ts b/src/@types/compiler/compile/nodes/shared/is_contextual.d.ts deleted file mode 100644 index fde7b2ddce..0000000000 --- a/src/@types/compiler/compile/nodes/shared/is_contextual.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import Component from '../../Component'; -import TemplateScope from './TemplateScope'; -export default function is_contextual(component: Component, scope: TemplateScope, name: string): boolean; diff --git a/src/@types/compiler/compile/nodes/shared/map_children.d.ts b/src/@types/compiler/compile/nodes/shared/map_children.d.ts deleted file mode 100644 index ef3274a483..0000000000 --- a/src/@types/compiler/compile/nodes/shared/map_children.d.ts +++ /dev/null @@ -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; -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 -)[]; diff --git a/src/@types/compiler/compile/render_dom/Block.d.ts b/src/@types/compiler/compile/render_dom/Block.d.ts deleted file mode 100644 index 8cbd2f1e16..0000000000 --- a/src/@types/compiler/compile/render_dom/Block.d.ts +++ /dev/null @@ -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; - dependencies?: Set; -} -export default class Block { - parent?: Block; - renderer: Renderer; - name: Identifier; - type: string; - comment?: string; - wrappers: Wrapper[]; - key: Identifier; - first: Identifier; - dependencies: Set; - bindings: Map; - binding_group_initialised: Set; - chunks: { - declarations: Array; - init: Array; - create: Array; - claim: Array; - hydrate: Array; - mount: Array; - measure: Array; - fix: Array; - animate: Array; - intro: Array; - update: Array; - outro: Array; - destroy: Array; - }; - 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; - 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): 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; -} diff --git a/src/@types/compiler/compile/render_dom/Renderer.d.ts b/src/@types/compiler/compile/render_dom/Renderer.d.ts deleted file mode 100644 index e56f323429..0000000000 --- a/src/@types/compiler/compile/render_dom/Renderer.d.ts +++ /dev/null @@ -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; - context_overflow: boolean; - blocks: Array; - readonly: Set; - meta_bindings: Array; - 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 {}; diff --git a/src/@types/compiler/compile/render_dom/index.d.ts b/src/@types/compiler/compile/render_dom/index.d.ts deleted file mode 100644 index 6fd9ab63ed..0000000000 --- a/src/@types/compiler/compile/render_dom/index.d.ts +++ /dev/null @@ -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; -}; diff --git a/src/@types/compiler/compile/render_dom/invalidate.d.ts b/src/@types/compiler/compile/render_dom/invalidate.d.ts deleted file mode 100644 index 7c44fa06fb..0000000000 --- a/src/@types/compiler/compile/render_dom/invalidate.d.ts +++ /dev/null @@ -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, main_execution_context?: boolean): any; -export declare function renderer_invalidate(renderer: Renderer, name: string, value?: any, main_execution_context?: boolean): any; diff --git a/src/@types/compiler/compile/render_dom/wrappers/AwaitBlock.d.ts b/src/@types/compiler/compile/render_dom/wrappers/AwaitBlock.d.ts deleted file mode 100644 index 55e41bbc93..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/AwaitBlock.d.ts +++ /dev/null @@ -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 {}; diff --git a/src/@types/compiler/compile/render_dom/wrappers/Body.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Body.d.ts deleted file mode 100644 index 2846fc10e1..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/Body.d.ts +++ /dev/null @@ -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; -} diff --git a/src/@types/compiler/compile/render_dom/wrappers/DebugTag.d.ts b/src/@types/compiler/compile/render_dom/wrappers/DebugTag.d.ts deleted file mode 100644 index 24a672f798..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/DebugTag.d.ts +++ /dev/null @@ -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; -} diff --git a/src/@types/compiler/compile/render_dom/wrappers/EachBlock.d.ts b/src/@types/compiler/compile/render_dom/wrappers/EachBlock.d.ts deleted file mode 100644 index 275b9b443c..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/EachBlock.d.ts +++ /dev/null @@ -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; - index_name: Identifier; - updates: Array; - dependencies: Set; - 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; -} diff --git a/src/@types/compiler/compile/render_dom/wrappers/Element/Attribute.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Element/Attribute.d.ts deleted file mode 100644 index a97d28e949..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/Element/Attribute.d.ts +++ /dev/null @@ -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; -} diff --git a/src/@types/compiler/compile/render_dom/wrappers/Element/Binding.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Element/Binding.d.ts deleted file mode 100644 index c15384f069..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/Element/Binding.d.ts +++ /dev/null @@ -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; - lhs?: Node; - }; - snippet: Node; - is_readonly: boolean; - needs_lock: boolean; - constructor(block: Block, node: Binding, parent: ElementWrapper | InlineComponentWrapper); - get_dependencies(): Set; - is_readonly_media_attribute(): boolean; - render(block: Block, lock: Identifier): void; -} diff --git a/src/@types/compiler/compile/render_dom/wrappers/Element/EventHandler.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Element/EventHandler.d.ts deleted file mode 100644 index 7e5ce439cf..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/Element/EventHandler.d.ts +++ /dev/null @@ -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; -} diff --git a/src/@types/compiler/compile/render_dom/wrappers/Element/SpreadAttribute.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Element/SpreadAttribute.d.ts deleted file mode 100644 index 7ceafc0da4..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/Element/SpreadAttribute.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { BaseAttributeWrapper } from './Attribute'; -export default class SpreadAttributeWrapper extends BaseAttributeWrapper {} diff --git a/src/@types/compiler/compile/render_dom/wrappers/Element/StyleAttribute.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Element/StyleAttribute.d.ts deleted file mode 100644 index a93605717d..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/Element/StyleAttribute.d.ts +++ /dev/null @@ -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; - important: boolean; -} -export default class StyleAttributeWrapper extends AttributeWrapper { - node: Attribute; - parent: ElementWrapper; - render(block: Block): void; -} diff --git a/src/@types/compiler/compile/render_dom/wrappers/Element/fix_attribute_casing.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Element/fix_attribute_casing.d.ts deleted file mode 100644 index fb7c2f6fc1..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/Element/fix_attribute_casing.d.ts +++ /dev/null @@ -1 +0,0 @@ -export default function fix_attribute_casing(name: any): any; diff --git a/src/@types/compiler/compile/render_dom/wrappers/Element/handle_select_value_binding.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Element/handle_select_value_binding.d.ts deleted file mode 100644 index baf19adf1e..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/Element/handle_select_value_binding.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import AttributeWrapper from './Attribute'; -import BindingWrapper from './Binding'; -export default function handle_select_value_binding(attr: AttributeWrapper | BindingWrapper, dependencies: Set): void; diff --git a/src/@types/compiler/compile/render_dom/wrappers/Element/index.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Element/index.d.ts deleted file mode 100644 index 54b98c6956..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/Element/index.d.ts +++ /dev/null @@ -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; - bindings: Binding[]; - event_handlers: EventHandler[]; - class_dependencies: string[]; - select_binding_dependencies?: Set; - 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 {}; diff --git a/src/@types/compiler/compile/render_dom/wrappers/Fragment.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Fragment.d.ts deleted file mode 100644 index e426dab40f..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/Fragment.d.ts +++ /dev/null @@ -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; -} diff --git a/src/@types/compiler/compile/render_dom/wrappers/Head.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Head.d.ts deleted file mode 100644 index f620a75cf8..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/Head.d.ts +++ /dev/null @@ -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; -} diff --git a/src/@types/compiler/compile/render_dom/wrappers/IfBlock.d.ts b/src/@types/compiler/compile/render_dom/wrappers/IfBlock.d.ts deleted file mode 100644 index 827ec0f7ae..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/IfBlock.d.ts +++ /dev/null @@ -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 {}; diff --git a/src/@types/compiler/compile/render_dom/wrappers/InlineComponent/index.d.ts b/src/@types/compiler/compile/render_dom/wrappers/InlineComponent/index.d.ts deleted file mode 100644 index 34ff301b18..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/InlineComponent/index.d.ts +++ /dev/null @@ -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; - node: InlineComponent; - fragment: FragmentWrapper; - children: Array; - 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 {}; diff --git a/src/@types/compiler/compile/render_dom/wrappers/KeyBlock.d.ts b/src/@types/compiler/compile/render_dom/wrappers/KeyBlock.d.ts deleted file mode 100644 index f599be8aa1..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/KeyBlock.d.ts +++ /dev/null @@ -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; -} diff --git a/src/@types/compiler/compile/render_dom/wrappers/MustacheTag.d.ts b/src/@types/compiler/compile/render_dom/wrappers/MustacheTag.d.ts deleted file mode 100644 index 3f221d5ea8..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/MustacheTag.d.ts +++ /dev/null @@ -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; -} diff --git a/src/@types/compiler/compile/render_dom/wrappers/RawMustacheTag.d.ts b/src/@types/compiler/compile/render_dom/wrappers/RawMustacheTag.d.ts deleted file mode 100644 index 69cf65c372..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/RawMustacheTag.d.ts +++ /dev/null @@ -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; -} diff --git a/src/@types/compiler/compile/render_dom/wrappers/Slot.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Slot.d.ts deleted file mode 100644 index 3d12ba3c06..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/Slot.d.ts +++ /dev/null @@ -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; - 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; -} diff --git a/src/@types/compiler/compile/render_dom/wrappers/SlotTemplate.d.ts b/src/@types/compiler/compile/render_dom/wrappers/SlotTemplate.d.ts deleted file mode 100644 index ad772633aa..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/SlotTemplate.d.ts +++ /dev/null @@ -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 {}; diff --git a/src/@types/compiler/compile/render_dom/wrappers/Text.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Text.d.ts deleted file mode 100644 index a6b84b2325..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/Text.d.ts +++ /dev/null @@ -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; -} diff --git a/src/@types/compiler/compile/render_dom/wrappers/Title.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Title.d.ts deleted file mode 100644 index 5c12353cfe..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/Title.d.ts +++ /dev/null @@ -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; -} diff --git a/src/@types/compiler/compile/render_dom/wrappers/Window.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Window.d.ts deleted file mode 100644 index daa748991d..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/Window.d.ts +++ /dev/null @@ -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; -} diff --git a/src/@types/compiler/compile/render_dom/wrappers/shared/Tag.d.ts b/src/@types/compiler/compile/render_dom/wrappers/shared/Tag.d.ts deleted file mode 100644 index 7cae664d49..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/shared/Tag.d.ts +++ /dev/null @@ -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; - }; -} diff --git a/src/@types/compiler/compile/render_dom/wrappers/shared/Wrapper.d.ts b/src/@types/compiler/compile/render_dom/wrappers/shared/Wrapper.d.ts deleted file mode 100644 index da34232da8..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/shared/Wrapper.d.ts +++ /dev/null @@ -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; -} diff --git a/src/@types/compiler/compile/render_dom/wrappers/shared/add_actions.d.ts b/src/@types/compiler/compile/render_dom/wrappers/shared/add_actions.d.ts deleted file mode 100644 index fe4a4e407a..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/shared/add_actions.d.ts +++ /dev/null @@ -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; diff --git a/src/@types/compiler/compile/render_dom/wrappers/shared/add_event_handlers.d.ts b/src/@types/compiler/compile/render_dom/wrappers/shared/add_event_handlers.d.ts deleted file mode 100644 index 2f48107f07..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/shared/add_event_handlers.d.ts +++ /dev/null @@ -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; diff --git a/src/@types/compiler/compile/render_dom/wrappers/shared/bind_this.d.ts b/src/@types/compiler/compile/render_dom/wrappers/shared/bind_this.d.ts deleted file mode 100644 index 1a46d65098..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/shared/bind_this.d.ts +++ /dev/null @@ -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[]; diff --git a/src/@types/compiler/compile/render_dom/wrappers/shared/create_debugging_comment.d.ts b/src/@types/compiler/compile/render_dom/wrappers/shared/create_debugging_comment.d.ts deleted file mode 100644 index a8155e0712..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/shared/create_debugging_comment.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import Component from '../../../Component'; -import { INode } from '../../../nodes/interfaces'; -export default function create_debugging_comment(node: INode, component: Component): string; diff --git a/src/@types/compiler/compile/render_dom/wrappers/shared/get_slot_definition.d.ts b/src/@types/compiler/compile/render_dom/wrappers/shared/get_slot_definition.d.ts deleted file mode 100644 index 9e4cd8a705..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/shared/get_slot_definition.d.ts +++ /dev/null @@ -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; - }; diff --git a/src/@types/compiler/compile/render_dom/wrappers/shared/is_dynamic.d.ts b/src/@types/compiler/compile/render_dom/wrappers/shared/is_dynamic.d.ts deleted file mode 100644 index ccc3a7115e..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/shared/is_dynamic.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Var } from '../../../../interfaces'; -export default function is_dynamic(variable: Var): boolean; diff --git a/src/@types/compiler/compile/render_dom/wrappers/shared/is_head.d.ts b/src/@types/compiler/compile/render_dom/wrappers/shared/is_head.d.ts deleted file mode 100644 index 2808651cef..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/shared/is_head.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function is_head(node: any): boolean; diff --git a/src/@types/compiler/compile/render_dom/wrappers/shared/mark_each_block_bindings.d.ts b/src/@types/compiler/compile/render_dom/wrappers/shared/mark_each_block_bindings.d.ts deleted file mode 100644 index e2aa830978..0000000000 --- a/src/@types/compiler/compile/render_dom/wrappers/shared/mark_each_block_bindings.d.ts +++ /dev/null @@ -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; diff --git a/src/@types/compiler/compile/render_ssr/Renderer.d.ts b/src/@types/compiler/compile/render_ssr/Renderer.d.ts deleted file mode 100644 index aa2de457c2..0000000000 --- a/src/@types/compiler/compile/render_ssr/Renderer.d.ts +++ /dev/null @@ -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; -} diff --git a/src/@types/compiler/compile/render_ssr/handlers/AwaitBlock.d.ts b/src/@types/compiler/compile/render_ssr/handlers/AwaitBlock.d.ts deleted file mode 100644 index 9ac74d6634..0000000000 --- a/src/@types/compiler/compile/render_ssr/handlers/AwaitBlock.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import Renderer, { RenderOptions } from '../Renderer'; -import AwaitBlock from '../../nodes/AwaitBlock'; -export default function (node: AwaitBlock, renderer: Renderer, options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/Comment.d.ts b/src/@types/compiler/compile/render_ssr/handlers/Comment.d.ts deleted file mode 100644 index 6dc1572a91..0000000000 --- a/src/@types/compiler/compile/render_ssr/handlers/Comment.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import Renderer, { RenderOptions } from '../Renderer'; -import Comment from '../../nodes/Comment'; -export default function (_node: Comment, _renderer: Renderer, _options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/DebugTag.d.ts b/src/@types/compiler/compile/render_ssr/handlers/DebugTag.d.ts deleted file mode 100644 index 737c104d02..0000000000 --- a/src/@types/compiler/compile/render_ssr/handlers/DebugTag.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import DebugTag from '../../nodes/DebugTag'; -import Renderer, { RenderOptions } from '../Renderer'; -export default function (node: DebugTag, renderer: Renderer, options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/EachBlock.d.ts b/src/@types/compiler/compile/render_ssr/handlers/EachBlock.d.ts deleted file mode 100644 index 5ecd8599aa..0000000000 --- a/src/@types/compiler/compile/render_ssr/handlers/EachBlock.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import Renderer, { RenderOptions } from '../Renderer'; -import EachBlock from '../../nodes/EachBlock'; -export default function (node: EachBlock, renderer: Renderer, options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/Element.d.ts b/src/@types/compiler/compile/render_ssr/handlers/Element.d.ts deleted file mode 100644 index c426b71b69..0000000000 --- a/src/@types/compiler/compile/render_ssr/handlers/Element.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import Renderer, { RenderOptions } from '../Renderer'; -import Element from '../../nodes/Element'; -export default function (node: Element, renderer: Renderer, options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/Head.d.ts b/src/@types/compiler/compile/render_ssr/handlers/Head.d.ts deleted file mode 100644 index add6c178ec..0000000000 --- a/src/@types/compiler/compile/render_ssr/handlers/Head.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import Renderer, { RenderOptions } from '../Renderer'; -import Head from '../../nodes/Head'; -export default function (node: Head, renderer: Renderer, options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/HtmlTag.d.ts b/src/@types/compiler/compile/render_ssr/handlers/HtmlTag.d.ts deleted file mode 100644 index 19f8f6342b..0000000000 --- a/src/@types/compiler/compile/render_ssr/handlers/HtmlTag.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import Renderer, { RenderOptions } from '../Renderer'; -import RawMustacheTag from '../../nodes/RawMustacheTag'; -export default function (node: RawMustacheTag, renderer: Renderer, _options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/IfBlock.d.ts b/src/@types/compiler/compile/render_ssr/handlers/IfBlock.d.ts deleted file mode 100644 index c5be3d0920..0000000000 --- a/src/@types/compiler/compile/render_ssr/handlers/IfBlock.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import IfBlock from '../../nodes/IfBlock'; -import Renderer, { RenderOptions } from '../Renderer'; -export default function (node: IfBlock, renderer: Renderer, options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/InlineComponent.d.ts b/src/@types/compiler/compile/render_ssr/handlers/InlineComponent.d.ts deleted file mode 100644 index fd52d3a187..0000000000 --- a/src/@types/compiler/compile/render_ssr/handlers/InlineComponent.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import Renderer, { RenderOptions } from '../Renderer'; -import InlineComponent from '../../nodes/InlineComponent'; -export default function (node: InlineComponent, renderer: Renderer, options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/KeyBlock.d.ts b/src/@types/compiler/compile/render_ssr/handlers/KeyBlock.d.ts deleted file mode 100644 index ab71c23b1e..0000000000 --- a/src/@types/compiler/compile/render_ssr/handlers/KeyBlock.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import KeyBlock from '../../nodes/KeyBlock'; -import Renderer, { RenderOptions } from '../Renderer'; -export default function (node: KeyBlock, renderer: Renderer, options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/Slot.d.ts b/src/@types/compiler/compile/render_ssr/handlers/Slot.d.ts deleted file mode 100644 index 3a17a1ade2..0000000000 --- a/src/@types/compiler/compile/render_ssr/handlers/Slot.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import Renderer, { RenderOptions } from '../Renderer'; -import Slot from '../../nodes/Slot'; -export default function ( - node: Slot, - renderer: Renderer, - options: RenderOptions & { - slot_scopes: Map; - } -): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/SlotTemplate.d.ts b/src/@types/compiler/compile/render_ssr/handlers/SlotTemplate.d.ts deleted file mode 100644 index 27985cc0fe..0000000000 --- a/src/@types/compiler/compile/render_ssr/handlers/SlotTemplate.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import Renderer, { RenderOptions } from '../Renderer'; -import SlotTemplate from '../../nodes/SlotTemplate'; -import InlineComponent from '../../nodes/InlineComponent'; -import Element from '../../nodes/Element'; -export default function ( - node: SlotTemplate | Element | InlineComponent, - renderer: Renderer, - options: RenderOptions & { - slot_scopes: Map; - } -): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/Tag.d.ts b/src/@types/compiler/compile/render_ssr/handlers/Tag.d.ts deleted file mode 100644 index a37afab5ea..0000000000 --- a/src/@types/compiler/compile/render_ssr/handlers/Tag.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import Renderer, { RenderOptions } from '../Renderer'; -export default function (node: any, renderer: Renderer, _options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/Text.d.ts b/src/@types/compiler/compile/render_ssr/handlers/Text.d.ts deleted file mode 100644 index 8b6a668f43..0000000000 --- a/src/@types/compiler/compile/render_ssr/handlers/Text.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import Renderer, { RenderOptions } from '../Renderer'; -import Text from '../../nodes/Text'; -export default function (node: Text, renderer: Renderer, _options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/Title.d.ts b/src/@types/compiler/compile/render_ssr/handlers/Title.d.ts deleted file mode 100644 index 14d4b2d4d5..0000000000 --- a/src/@types/compiler/compile/render_ssr/handlers/Title.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import Renderer, { RenderOptions } from '../Renderer'; -import Title from '../../nodes/Title'; -export default function (node: Title, renderer: Renderer, options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/shared/boolean_attributes.d.ts b/src/@types/compiler/compile/render_ssr/handlers/shared/boolean_attributes.d.ts deleted file mode 100644 index 5ae12c9c92..0000000000 --- a/src/@types/compiler/compile/render_ssr/handlers/shared/boolean_attributes.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const boolean_attributes: Set; diff --git a/src/@types/compiler/compile/render_ssr/handlers/shared/get_attribute_value.d.ts b/src/@types/compiler/compile/render_ssr/handlers/shared/get_attribute_value.d.ts deleted file mode 100644 index 7a68b541e5..0000000000 --- a/src/@types/compiler/compile/render_ssr/handlers/shared/get_attribute_value.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import Attribute from '../../../nodes/Attribute'; -import { Expression as ESTreeExpression } from 'estree'; -export declare function get_class_attribute_value(attribute: Attribute): ESTreeExpression; -export declare function get_attribute_value(attribute: Attribute): ESTreeExpression; diff --git a/src/@types/compiler/compile/render_ssr/handlers/shared/get_slot_scope.d.ts b/src/@types/compiler/compile/render_ssr/handlers/shared/get_slot_scope.d.ts deleted file mode 100644 index 7e092af60b..0000000000 --- a/src/@types/compiler/compile/render_ssr/handlers/shared/get_slot_scope.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import Let from '../../../nodes/Let'; -import { ObjectPattern } from 'estree'; -export declare function get_slot_scope(lets: Let[]): ObjectPattern; diff --git a/src/@types/compiler/compile/render_ssr/handlers/utils/remove_whitespace_children.d.ts b/src/@types/compiler/compile/render_ssr/handlers/utils/remove_whitespace_children.d.ts deleted file mode 100644 index 9776333b51..0000000000 --- a/src/@types/compiler/compile/render_ssr/handlers/utils/remove_whitespace_children.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { INode } from '../../../nodes/interfaces'; -export default function remove_whitespace_children(children: INode[], next?: INode): INode[]; diff --git a/src/@types/compiler/compile/render_ssr/index.d.ts b/src/@types/compiler/compile/render_ssr/index.d.ts deleted file mode 100644 index 2122934008..0000000000 --- a/src/@types/compiler/compile/render_ssr/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import Component from '../Component'; -import { CompileOptions, CssResult } from '../../interfaces'; -import { Node } from 'estree'; -export default function ssr( - component: Component, - options: CompileOptions -): { - js: Node[]; - css: CssResult; -}; diff --git a/src/@types/compiler/compile/utils/__test__.d.ts b/src/@types/compiler/compile/utils/__test__.d.ts deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/src/@types/compiler/compile/utils/__test__.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/src/@types/compiler/compile/utils/add_to_set.d.ts b/src/@types/compiler/compile/utils/add_to_set.d.ts deleted file mode 100644 index b620fbcc21..0000000000 --- a/src/@types/compiler/compile/utils/add_to_set.d.ts +++ /dev/null @@ -1 +0,0 @@ -export default function add_to_set(a: Set, b: Set | T[]): void; diff --git a/src/@types/compiler/compile/utils/check_graph_for_cycles.d.ts b/src/@types/compiler/compile/utils/check_graph_for_cycles.d.ts deleted file mode 100644 index 6660f10cf7..0000000000 --- a/src/@types/compiler/compile/utils/check_graph_for_cycles.d.ts +++ /dev/null @@ -1 +0,0 @@ -export default function check_graph_for_cycles(edges: Array<[any, any]>): any[]; diff --git a/src/@types/compiler/compile/utils/compare_node.d.ts b/src/@types/compiler/compile/utils/compare_node.d.ts deleted file mode 100644 index 789f826082..0000000000 --- a/src/@types/compiler/compile/utils/compare_node.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Node } from 'estree'; -export declare function compare_node(a: Node | void, b: Node | void): any; diff --git a/src/@types/compiler/compile/utils/flatten_reference.d.ts b/src/@types/compiler/compile/utils/flatten_reference.d.ts deleted file mode 100644 index d50cc454d3..0000000000 --- a/src/@types/compiler/compile/utils/flatten_reference.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Node } from 'estree'; -export default function flatten_reference( - node: Node -): { - name: string; - nodes: any[]; - parts: any[]; -}; diff --git a/src/@types/compiler/compile/utils/get_name_from_filename.d.ts b/src/@types/compiler/compile/utils/get_name_from_filename.d.ts deleted file mode 100644 index 25751c0f6e..0000000000 --- a/src/@types/compiler/compile/utils/get_name_from_filename.d.ts +++ /dev/null @@ -1 +0,0 @@ -export default function get_name_from_filename(filename: string): string; diff --git a/src/@types/compiler/compile/utils/get_object.d.ts b/src/@types/compiler/compile/utils/get_object.d.ts deleted file mode 100644 index dea68fb42c..0000000000 --- a/src/@types/compiler/compile/utils/get_object.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Node, Identifier } from 'estree'; -export default function get_object(node: Node): Identifier; diff --git a/src/@types/compiler/compile/utils/get_slot_data.d.ts b/src/@types/compiler/compile/utils/get_slot_data.d.ts deleted file mode 100644 index 6c8a9807b1..0000000000 --- a/src/@types/compiler/compile/utils/get_slot_data.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -import Attribute from '../nodes/Attribute'; -import Block from '../render_dom/Block'; -export default function get_slot_data( - values: Map, - block?: Block -): { - type: string; - properties: ( - | import('estree').Property - | import('estree').SpreadElement - | { - type: string; - argument: - | 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; - } - )[]; -}; diff --git a/src/@types/compiler/compile/utils/hash.d.ts b/src/@types/compiler/compile/utils/hash.d.ts deleted file mode 100644 index b1bb8bf71d..0000000000 --- a/src/@types/compiler/compile/utils/hash.d.ts +++ /dev/null @@ -1 +0,0 @@ -export default function hash(str: string): string; diff --git a/src/@types/compiler/compile/utils/is_used_as_reference.d.ts b/src/@types/compiler/compile/utils/is_used_as_reference.d.ts deleted file mode 100644 index ea52dbbae7..0000000000 --- a/src/@types/compiler/compile/utils/is_used_as_reference.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Node } from 'estree'; -export default function is_used_as_reference(node: Node, parent: Node): boolean; diff --git a/src/@types/compiler/compile/utils/replace_object.d.ts b/src/@types/compiler/compile/utils/replace_object.d.ts deleted file mode 100644 index e1f3491d93..0000000000 --- a/src/@types/compiler/compile/utils/replace_object.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { Node } from 'estree'; -export default function replace_object( - node: Node, - replacement: Node -): - | 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; diff --git a/src/@types/compiler/compile/utils/reserved_keywords.d.ts b/src/@types/compiler/compile/utils/reserved_keywords.d.ts deleted file mode 100644 index 77d723625e..0000000000 --- a/src/@types/compiler/compile/utils/reserved_keywords.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare const reserved_keywords: Set; -export declare function is_reserved_keyword(name: any): boolean; diff --git a/src/@types/compiler/compile/utils/scope.d.ts b/src/@types/compiler/compile/utils/scope.d.ts deleted file mode 100644 index ae2fc773f8..0000000000 --- a/src/@types/compiler/compile/utils/scope.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Node } from 'estree'; -import { Scope, extract_names, extract_identifiers } from 'periscopic'; -export declare function create_scopes( - expression: Node -): { - map: WeakMap; - scope: Scope; - globals: Map; -}; -export { Scope, extract_names, extract_identifiers }; diff --git a/src/@types/compiler/compile/utils/string_to_member_expression.d.ts b/src/@types/compiler/compile/utils/string_to_member_expression.d.ts deleted file mode 100644 index 76b07beec7..0000000000 --- a/src/@types/compiler/compile/utils/string_to_member_expression.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { MemberExpression, Identifier } from 'estree'; -export declare function string_to_member_expression(name: string): Identifier | MemberExpression; diff --git a/src/@types/compiler/compile/utils/stringify.d.ts b/src/@types/compiler/compile/utils/stringify.d.ts deleted file mode 100644 index 17808aeeb4..0000000000 --- a/src/@types/compiler/compile/utils/stringify.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export declare function string_literal( - data: string -): { - type: string; - value: string; -}; -export declare function escape( - data: string, - { - only_escape_at_symbol, - }?: { - only_escape_at_symbol?: boolean; - } -): string; -export declare function escape_html(html: any): string; -export declare function escape_template(str: any): any; diff --git a/src/@types/compiler/config.d.ts b/src/@types/compiler/config.d.ts deleted file mode 100644 index 66cb4d4e88..0000000000 --- a/src/@types/compiler/config.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const test: string; diff --git a/src/@types/compiler/index.d.ts b/src/@types/compiler/index.d.ts deleted file mode 100644 index 1b04db06a6..0000000000 --- a/src/@types/compiler/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { default as compile } from './compile/index'; -export { default as parse } from './parse/index'; -export { default as preprocess } from './preprocess/index'; -export { walk } from 'estree-walker'; -export declare const VERSION = '__VERSION__'; diff --git a/src/@types/compiler/interfaces.d.ts b/src/@types/compiler/interfaces.d.ts deleted file mode 100644 index 6f1bffe9f0..0000000000 --- a/src/@types/compiler/interfaces.d.ts +++ /dev/null @@ -1,143 +0,0 @@ -import { Node, Program } from 'estree'; -import { SourceMap } from 'magic-string'; -interface BaseNode { - start: number; - end: number; - type: string; - children?: TemplateNode[]; - [prop_name: string]: any; -} -export interface Fragment extends BaseNode { - type: 'Fragment'; - children: TemplateNode[]; -} -export interface Text extends BaseNode { - type: 'Text'; - data: string; -} -export interface MustacheTag extends BaseNode { - type: 'MustacheTag'; - expression: string; -} -export declare type DirectiveType = 'Action' | 'Animation' | 'Binding' | 'Class' | 'EventHandler' | 'Let' | 'Ref' | 'Transition'; -interface BaseDirective extends BaseNode { - type: DirectiveType; - expression: null | Node; - name: string; - modifiers: string[]; -} -export interface Transition extends BaseDirective { - type: 'Transition'; - intro: boolean; - outro: boolean; -} -export declare type Directive = BaseDirective | Transition; -export declare type TemplateNode = Text | MustacheTag | BaseNode | Directive | Transition; -export interface Parser { - readonly template: string; - readonly filename?: string; - index: number; - stack: Node[]; - html: Node; - css: Node; - js: Node; - meta_tags: {}; -} -export interface Script extends BaseNode { - type: 'Script'; - context: string; - content: Program; -} -export interface Style extends BaseNode { - type: 'Style'; - attributes: any[]; - children: any[]; - content: { - start: number; - end: number; - styles: string; - }; -} -export interface Ast { - html: TemplateNode; - css: Style; - instance: Script; - module: Script; -} -export interface Warning { - start?: { - line: number; - column: number; - pos?: number; - }; - end?: { - line: number; - column: number; - }; - pos?: number; - code: string; - message: string; - filename?: string; - frame?: string; - toString: () => string; -} -export declare type ModuleFormat = 'esm' | 'cjs'; -export declare type CssHashGetter = (args: { name: string; filename: string | undefined; css: string; hash: (input: string) => string }) => string; -export interface CompileOptions { - format?: ModuleFormat; - name?: string; - filename?: string; - generate?: 'dom' | 'ssr' | false; - sourcemap?: object | string; - outputFilename?: string; - cssOutputFilename?: string; - sveltePath?: string; - dev?: boolean; - accessors?: boolean; - immutable?: boolean; - hydratable?: boolean; - legacy?: boolean; - customElement?: boolean; - tag?: string; - css?: boolean; - loopGuardTimeout?: number; - namespace?: string; - cssHash?: CssHashGetter; - preserveComments?: boolean; - preserveWhitespace?: boolean; -} -export interface ParserOptions { - filename?: string; - customElement?: boolean; -} -export interface Visitor { - enter: (node: Node) => void; - leave?: (node: Node) => void; -} -export interface AppendTarget { - slots: Record; - slot_stack: string[]; -} -export interface Var { - name: string; - export_name?: string; - injected?: boolean; - module?: boolean; - mutated?: boolean; - reassigned?: boolean; - referenced?: boolean; - referenced_from_script?: boolean; - writable?: boolean; - global?: boolean; - internal?: boolean; - initialised?: boolean; - hoistable?: boolean; - subscribable?: boolean; - is_reactive_dependency?: boolean; - imported?: boolean; -} -export interface CssResult { - code: string; - map: SourceMap; -} -export {}; diff --git a/src/@types/compiler/parse/acorn.d.ts b/src/@types/compiler/parse/acorn.d.ts deleted file mode 100644 index aadad5669d..0000000000 --- a/src/@types/compiler/parse/acorn.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { Node } from 'acorn'; -export declare const parse: (source: string) => Node; -export declare const parse_expression_at: (source: string, index: number) => Node; diff --git a/src/@types/compiler/parse/index.d.ts b/src/@types/compiler/parse/index.d.ts deleted file mode 100644 index 7b5af3de32..0000000000 --- a/src/@types/compiler/parse/index.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { TemplateNode, Ast, ParserOptions, Fragment, Style, Script } from '../interfaces'; -interface LastAutoClosedTag { - tag: string; - reason: string; - depth: number; -} -export declare class Parser { - readonly template: string; - readonly filename?: string; - readonly customElement: boolean; - index: number; - stack: TemplateNode[]; - html: Fragment; - css: Style[]; - js: Script[]; - meta_tags: {}; - last_auto_closed_tag?: LastAutoClosedTag; - constructor(template: string, options: ParserOptions); - current(): TemplateNode; - acorn_error(err: any): void; - error( - { - code, - message, - }: { - code: string; - message: string; - }, - index?: number - ): void; - eat(str: string, required?: boolean, message?: string): boolean; - match(str: string): boolean; - match_regex(pattern: RegExp): string; - allow_whitespace(): void; - read(pattern: RegExp): string; - read_identifier(allow_reserved?: boolean): string; - read_until(pattern: RegExp): string; - require_whitespace(): void; -} -export default function parse(template: string, options?: ParserOptions): Ast; -export {}; diff --git a/src/@types/compiler/parse/read/context.d.ts b/src/@types/compiler/parse/read/context.d.ts deleted file mode 100644 index 259ab02763..0000000000 --- a/src/@types/compiler/parse/read/context.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Parser } from '../index'; -import { Pattern } from 'estree'; -export default function read_context( - parser: Parser -): Pattern & { - start: number; - end: number; -}; diff --git a/src/@types/compiler/parse/read/expression.d.ts b/src/@types/compiler/parse/read/expression.d.ts deleted file mode 100644 index 4f14791fa5..0000000000 --- a/src/@types/compiler/parse/read/expression.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Parser } from '../index'; -export default function read_expression(parser: Parser): string; diff --git a/src/@types/compiler/parse/read/script.d.ts b/src/@types/compiler/parse/read/script.d.ts deleted file mode 100644 index aa99c5b8f9..0000000000 --- a/src/@types/compiler/parse/read/script.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Parser } from '../index'; -import { Script } from '../../interfaces'; -import { Node } from 'estree'; -export default function read_script(parser: Parser, start: number, attributes: Node[]): Script; diff --git a/src/@types/compiler/parse/read/style.d.ts b/src/@types/compiler/parse/read/style.d.ts deleted file mode 100644 index 870d711ce9..0000000000 --- a/src/@types/compiler/parse/read/style.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Parser } from '../index'; -import { Node } from 'estree'; -import { Style } from '../../interfaces'; -export default function read_style(parser: Parser, start: number, attributes: Node[]): Style; diff --git a/src/@types/compiler/parse/state/fragment.d.ts b/src/@types/compiler/parse/state/fragment.d.ts deleted file mode 100644 index ec6073ba7e..0000000000 --- a/src/@types/compiler/parse/state/fragment.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import tag from './tag'; -import { Parser } from '../index'; -export default function fragment(parser: Parser): typeof tag; diff --git a/src/@types/compiler/parse/state/mustache.d.ts b/src/@types/compiler/parse/state/mustache.d.ts deleted file mode 100644 index 8a4b8b5390..0000000000 --- a/src/@types/compiler/parse/state/mustache.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Parser } from '../index'; -export default function mustache(parser: Parser): void; diff --git a/src/@types/compiler/parse/state/tag.d.ts b/src/@types/compiler/parse/state/tag.d.ts deleted file mode 100644 index 1e0a29c571..0000000000 --- a/src/@types/compiler/parse/state/tag.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Parser } from '../index'; -export default function tag(parser: Parser): void; diff --git a/src/@types/compiler/parse/state/text.d.ts b/src/@types/compiler/parse/state/text.d.ts deleted file mode 100644 index 88f2671f5d..0000000000 --- a/src/@types/compiler/parse/state/text.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Parser } from '../index'; -export default function text(parser: Parser): void; diff --git a/src/@types/compiler/parse/utils/bracket.d.ts b/src/@types/compiler/parse/utils/bracket.d.ts deleted file mode 100644 index e18f35279b..0000000000 --- a/src/@types/compiler/parse/utils/bracket.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare function is_bracket_open(code: any): boolean; -export declare function is_bracket_close(code: any): boolean; -export declare function is_bracket_pair(open: any, close: any): boolean; -export declare function get_bracket_close(open: any): number; diff --git a/src/@types/compiler/parse/utils/entities.d.ts b/src/@types/compiler/parse/utils/entities.d.ts deleted file mode 100644 index 12ce08bdfe..0000000000 --- a/src/@types/compiler/parse/utils/entities.d.ts +++ /dev/null @@ -1,2034 +0,0 @@ -declare const _default: { - CounterClockwiseContourIntegral: number; - ClockwiseContourIntegral: number; - DoubleLongLeftRightArrow: number; - DiacriticalDoubleAcute: number; - NotSquareSupersetEqual: number; - CloseCurlyDoubleQuote: number; - DoubleContourIntegral: number; - FilledVerySmallSquare: number; - NegativeVeryThinSpace: number; - NotPrecedesSlantEqual: number; - NotRightTriangleEqual: number; - NotSucceedsSlantEqual: number; - CapitalDifferentialD: number; - DoubleLeftRightArrow: number; - DoubleLongRightArrow: number; - EmptyVerySmallSquare: number; - NestedGreaterGreater: number; - NotDoubleVerticalBar: number; - NotLeftTriangleEqual: number; - NotSquareSubsetEqual: number; - OpenCurlyDoubleQuote: number; - ReverseUpEquilibrium: number; - DoubleLongLeftArrow: number; - DownLeftRightVector: number; - LeftArrowRightArrow: number; - NegativeMediumSpace: number; - RightArrowLeftArrow: number; - SquareSupersetEqual: number; - leftrightsquigarrow: number; - DownRightTeeVector: number; - DownRightVectorBar: number; - LongLeftRightArrow: number; - Longleftrightarrow: number; - NegativeThickSpace: number; - PrecedesSlantEqual: number; - ReverseEquilibrium: number; - RightDoubleBracket: number; - RightDownTeeVector: number; - RightDownVectorBar: number; - RightTriangleEqual: number; - SquareIntersection: number; - SucceedsSlantEqual: number; - blacktriangleright: number; - longleftrightarrow: number; - DoubleUpDownArrow: number; - DoubleVerticalBar: number; - DownLeftTeeVector: number; - DownLeftVectorBar: number; - FilledSmallSquare: number; - GreaterSlantEqual: number; - LeftDoubleBracket: number; - LeftDownTeeVector: number; - LeftDownVectorBar: number; - LeftTriangleEqual: number; - NegativeThinSpace: number; - NotReverseElement: number; - NotTildeFullEqual: number; - RightAngleBracket: number; - RightUpDownVector: number; - SquareSubsetEqual: number; - VerticalSeparator: number; - blacktriangledown: number; - blacktriangleleft: number; - leftrightharpoons: number; - rightleftharpoons: number; - twoheadrightarrow: number; - DiacriticalAcute: number; - DiacriticalGrave: number; - DiacriticalTilde: number; - DoubleRightArrow: number; - DownArrowUpArrow: number; - EmptySmallSquare: number; - GreaterEqualLess: number; - GreaterFullEqual: number; - LeftAngleBracket: number; - LeftUpDownVector: number; - LessEqualGreater: number; - NonBreakingSpace: number; - NotRightTriangle: number; - NotSupersetEqual: number; - RightTriangleBar: number; - RightUpTeeVector: number; - RightUpVectorBar: number; - UnderParenthesis: number; - UpArrowDownArrow: number; - circlearrowright: number; - downharpoonright: number; - ntrianglerighteq: number; - rightharpoondown: number; - rightrightarrows: number; - twoheadleftarrow: number; - vartriangleright: number; - CloseCurlyQuote: number; - ContourIntegral: number; - DoubleDownArrow: number; - DoubleLeftArrow: number; - DownRightVector: number; - LeftRightVector: number; - LeftTriangleBar: number; - LeftUpTeeVector: number; - LeftUpVectorBar: number; - LowerRightArrow: number; - NotGreaterEqual: number; - NotGreaterTilde: number; - NotLeftTriangle: number; - OverParenthesis: number; - RightDownVector: number; - ShortRightArrow: number; - UpperRightArrow: number; - bigtriangledown: number; - circlearrowleft: number; - curvearrowright: number; - downharpoonleft: number; - leftharpoondown: number; - leftrightarrows: number; - nLeftrightarrow: number; - nleftrightarrow: number; - ntrianglelefteq: number; - rightleftarrows: number; - rightsquigarrow: number; - rightthreetimes: number; - straightepsilon: number; - trianglerighteq: number; - vartriangleleft: number; - DiacriticalDot: number; - DoubleRightTee: number; - DownLeftVector: number; - GreaterGreater: number; - HorizontalLine: number; - InvisibleComma: number; - InvisibleTimes: number; - LeftDownVector: number; - LeftRightArrow: number; - Leftrightarrow: number; - LessSlantEqual: number; - LongRightArrow: number; - Longrightarrow: number; - LowerLeftArrow: number; - NestedLessLess: number; - NotGreaterLess: number; - NotLessGreater: number; - NotSubsetEqual: number; - NotVerticalBar: number; - OpenCurlyQuote: number; - ReverseElement: number; - RightTeeVector: number; - RightVectorBar: number; - ShortDownArrow: number; - ShortLeftArrow: number; - SquareSuperset: number; - TildeFullEqual: number; - UpperLeftArrow: number; - ZeroWidthSpace: number; - curvearrowleft: number; - doublebarwedge: number; - downdownarrows: number; - hookrightarrow: number; - leftleftarrows: number; - leftrightarrow: number; - leftthreetimes: number; - longrightarrow: number; - looparrowright: number; - nshortparallel: number; - ntriangleright: number; - rightarrowtail: number; - rightharpoonup: number; - trianglelefteq: number; - upharpoonright: number; - ApplyFunction: number; - DifferentialD: number; - DoubleLeftTee: number; - DoubleUpArrow: number; - LeftTeeVector: number; - LeftVectorBar: number; - LessFullEqual: number; - LongLeftArrow: number; - Longleftarrow: number; - NotTildeEqual: number; - NotTildeTilde: number; - Poincareplane: number; - PrecedesEqual: number; - PrecedesTilde: number; - RightArrowBar: number; - RightTeeArrow: number; - RightTriangle: number; - RightUpVector: number; - SucceedsEqual: number; - SucceedsTilde: number; - SupersetEqual: number; - UpEquilibrium: number; - VerticalTilde: number; - VeryThinSpace: number; - bigtriangleup: number; - blacktriangle: number; - divideontimes: number; - fallingdotseq: number; - hookleftarrow: number; - leftarrowtail: number; - leftharpoonup: number; - longleftarrow: number; - looparrowleft: number; - measuredangle: number; - ntriangleleft: number; - shortparallel: number; - smallsetminus: number; - triangleright: number; - upharpoonleft: number; - DownArrowBar: number; - DownTeeArrow: number; - ExponentialE: number; - GreaterEqual: number; - GreaterTilde: number; - HilbertSpace: number; - HumpDownHump: number; - Intersection: number; - LeftArrowBar: number; - LeftTeeArrow: number; - LeftTriangle: number; - LeftUpVector: number; - NotCongruent: number; - NotLessEqual: number; - NotLessTilde: number; - Proportional: number; - RightCeiling: number; - RoundImplies: number; - ShortUpArrow: number; - SquareSubset: number; - UnderBracket: number; - VerticalLine: number; - blacklozenge: number; - exponentiale: number; - risingdotseq: number; - triangledown: number; - triangleleft: number; - CircleMinus: number; - CircleTimes: number; - Equilibrium: number; - GreaterLess: number; - LeftCeiling: number; - LessGreater: number; - MediumSpace: number; - NotPrecedes: number; - NotSucceeds: number; - OverBracket: number; - RightVector: number; - Rrightarrow: number; - RuleDelayed: number; - SmallCircle: number; - SquareUnion: number; - SubsetEqual: number; - UpDownArrow: number; - Updownarrow: number; - VerticalBar: number; - backepsilon: number; - blacksquare: number; - circledcirc: number; - circleddash: number; - curlyeqprec: number; - curlyeqsucc: number; - diamondsuit: number; - eqslantless: number; - expectation: number; - nRightarrow: number; - nrightarrow: number; - preccurlyeq: number; - precnapprox: number; - quaternions: number; - straightphi: number; - succcurlyeq: number; - succnapprox: number; - thickapprox: number; - updownarrow: number; - Bernoullis: number; - CirclePlus: number; - EqualTilde: number; - Fouriertrf: number; - ImaginaryI: number; - Laplacetrf: number; - LeftVector: number; - Lleftarrow: number; - NotElement: number; - NotGreater: number; - Proportion: number; - RightArrow: number; - RightFloor: number; - Rightarrow: number; - TildeEqual: number; - TildeTilde: number; - UnderBrace: number; - UpArrowBar: number; - UpTeeArrow: number; - circledast: number; - complement: number; - curlywedge: number; - eqslantgtr: number; - gtreqqless: number; - lessapprox: number; - lesseqqgtr: number; - lmoustache: number; - longmapsto: number; - mapstodown: number; - mapstoleft: number; - nLeftarrow: number; - nleftarrow: number; - precapprox: number; - rightarrow: number; - rmoustache: number; - sqsubseteq: number; - sqsupseteq: number; - subsetneqq: number; - succapprox: number; - supsetneqq: number; - upuparrows: number; - varepsilon: number; - varnothing: number; - Backslash: number; - CenterDot: number; - CircleDot: number; - Congruent: number; - Coproduct: number; - DoubleDot: number; - DownArrow: number; - DownBreve: number; - Downarrow: number; - HumpEqual: number; - LeftArrow: number; - LeftFloor: number; - Leftarrow: number; - LessTilde: number; - Mellintrf: number; - MinusPlus: number; - NotCupCap: number; - NotExists: number; - OverBrace: number; - PlusMinus: number; - Therefore: number; - ThinSpace: number; - TripleDot: number; - UnionPlus: number; - backprime: number; - backsimeq: number; - bigotimes: number; - centerdot: number; - checkmark: number; - complexes: number; - dotsquare: number; - downarrow: number; - gtrapprox: number; - gtreqless: number; - heartsuit: number; - leftarrow: number; - lesseqgtr: number; - nparallel: number; - nshortmid: number; - nsubseteq: number; - nsupseteq: number; - pitchfork: number; - rationals: number; - spadesuit: number; - subseteqq: number; - subsetneq: number; - supseteqq: number; - supsetneq: number; - therefore: number; - triangleq: number; - varpropto: number; - DDotrahd: number; - DotEqual: number; - Integral: number; - LessLess: number; - NotEqual: number; - NotTilde: number; - PartialD: number; - Precedes: number; - RightTee: number; - Succeeds: number; - SuchThat: number; - Superset: number; - Uarrocir: number; - UnderBar: number; - andslope: number; - angmsdaa: number; - angmsdab: number; - angmsdac: number; - angmsdad: number; - angmsdae: number; - angmsdaf: number; - angmsdag: number; - angmsdah: number; - angrtvbd: number; - approxeq: number; - awconint: number; - backcong: number; - barwedge: number; - bbrktbrk: number; - bigoplus: number; - bigsqcup: number; - biguplus: number; - bigwedge: number; - boxminus: number; - boxtimes: number; - capbrcup: number; - circledR: number; - circledS: number; - cirfnint: number; - clubsuit: number; - cupbrcap: number; - curlyvee: number; - cwconint: number; - doteqdot: number; - dotminus: number; - drbkarow: number; - dzigrarr: number; - elinters: number; - emptyset: number; - eqvparsl: number; - fpartint: number; - geqslant: number; - gesdotol: number; - gnapprox: number; - hksearow: number; - hkswarow: number; - imagline: number; - imagpart: number; - infintie: number; - integers: number; - intercal: number; - intlarhk: number; - laemptyv: number; - ldrushar: number; - leqslant: number; - lesdotor: number; - llcorner: number; - lnapprox: number; - lrcorner: number; - lurdshar: number; - mapstoup: number; - multimap: number; - naturals: number; - otimesas: number; - parallel: number; - plusacir: number; - pointint: number; - precneqq: number; - precnsim: number; - profalar: number; - profline: number; - profsurf: number; - raemptyv: number; - realpart: number; - rppolint: number; - rtriltri: number; - scpolint: number; - setminus: number; - shortmid: number; - smeparsl: number; - sqsubset: number; - sqsupset: number; - subseteq: number; - succneqq: number; - succnsim: number; - supseteq: number; - thetasym: number; - thicksim: number; - timesbar: number; - triangle: number; - triminus: number; - trpezium: number; - ulcorner: number; - urcorner: number; - varkappa: number; - varsigma: number; - vartheta: number; - Because: number; - Cayleys: number; - Cconint: number; - Cedilla: number; - Diamond: number; - DownTee: number; - Element: number; - Epsilon: number; - Implies: number; - LeftTee: number; - NewLine: number; - NoBreak: number; - NotLess: number; - Omicron: number; - OverBar: number; - Product: number; - UpArrow: number; - Uparrow: number; - Upsilon: number; - alefsym: number; - angrtvb: number; - angzarr: number; - asympeq: number; - backsim: number; - because: number; - bemptyv: number; - between: number; - bigcirc: number; - bigodot: number; - bigstar: number; - boxplus: number; - ccupssm: number; - cemptyv: number; - cirscir: number; - coloneq: number; - congdot: number; - cudarrl: number; - cudarrr: number; - cularrp: number; - curarrm: number; - dbkarow: number; - ddagger: number; - ddotseq: number; - demptyv: number; - diamond: number; - digamma: number; - dotplus: number; - dwangle: number; - epsilon: number; - eqcolon: number; - equivDD: number; - gesdoto: number; - gtquest: number; - gtrless: number; - harrcir: number; - intprod: number; - isindot: number; - larrbfs: number; - larrsim: number; - lbrksld: number; - lbrkslu: number; - ldrdhar: number; - lesdoto: number; - lessdot: number; - lessgtr: number; - lesssim: number; - lotimes: number; - lozenge: number; - ltquest: number; - luruhar: number; - maltese: number; - minusdu: number; - napprox: number; - natural: number; - nearrow: number; - nexists: number; - notinva: number; - notinvb: number; - notinvc: number; - notniva: number; - notnivb: number; - notnivc: number; - npolint: number; - nsqsube: number; - nsqsupe: number; - nvinfin: number; - nwarrow: number; - olcross: number; - omicron: number; - orderof: number; - orslope: number; - pertenk: number; - planckh: number; - pluscir: number; - plussim: number; - plustwo: number; - precsim: number; - quatint: number; - questeq: number; - rarrbfs: number; - rarrsim: number; - rbrksld: number; - rbrkslu: number; - rdldhar: number; - realine: number; - rotimes: number; - ruluhar: number; - searrow: number; - simplus: number; - simrarr: number; - subedot: number; - submult: number; - subplus: number; - subrarr: number; - succsim: number; - supdsub: number; - supedot: number; - suphsub: number; - suplarr: number; - supmult: number; - supplus: number; - swarrow: number; - topfork: number; - triplus: number; - tritime: number; - uparrow: number; - upsilon: number; - uwangle: number; - vzigzag: number; - zigrarr: number; - Aacute: number; - Abreve: number; - Agrave: number; - Assign: number; - Atilde: number; - Barwed: number; - Bumpeq: number; - Cacute: number; - Ccaron: number; - Ccedil: number; - Colone: number; - Conint: number; - CupCap: number; - Dagger: number; - Dcaron: number; - DotDot: number; - Dstrok: number; - Eacute: number; - Ecaron: number; - Egrave: number; - Exists: number; - ForAll: number; - Gammad: number; - Gbreve: number; - Gcedil: number; - HARDcy: number; - Hstrok: number; - Iacute: number; - Igrave: number; - Itilde: number; - Jsercy: number; - Kcedil: number; - Lacute: number; - Lambda: number; - Lcaron: number; - Lcedil: number; - Lmidot: number; - Lstrok: number; - Nacute: number; - Ncaron: number; - Ncedil: number; - Ntilde: number; - Oacute: number; - Odblac: number; - Ograve: number; - Oslash: number; - Otilde: number; - Otimes: number; - Racute: number; - Rarrtl: number; - Rcaron: number; - Rcedil: number; - SHCHcy: number; - SOFTcy: number; - Sacute: number; - Scaron: number; - Scedil: number; - Square: number; - Subset: number; - Supset: number; - Tcaron: number; - Tcedil: number; - Tstrok: number; - Uacute: number; - Ubreve: number; - Udblac: number; - Ugrave: number; - Utilde: number; - Vdashl: number; - Verbar: number; - Vvdash: number; - Yacute: number; - Zacute: number; - Zcaron: number; - aacute: number; - abreve: number; - agrave: number; - andand: number; - angmsd: number; - angsph: number; - apacir: number; - approx: number; - atilde: number; - barvee: number; - barwed: number; - becaus: number; - bernou: number; - bigcap: number; - bigcup: number; - bigvee: number; - bkarow: number; - bottom: number; - bowtie: number; - boxbox: number; - bprime: number; - brvbar: number; - bullet: number; - bumpeq: number; - cacute: number; - capand: number; - capcap: number; - capcup: number; - capdot: number; - ccaron: number; - ccedil: number; - circeq: number; - cirmid: number; - colone: number; - commat: number; - compfn: number; - conint: number; - coprod: number; - copysr: number; - cularr: number; - cupcap: number; - cupcup: number; - cupdot: number; - curarr: number; - curren: number; - cylcty: number; - dagger: number; - daleth: number; - dcaron: number; - dfisht: number; - divide: number; - divonx: number; - dlcorn: number; - dlcrop: number; - dollar: number; - drcorn: number; - drcrop: number; - dstrok: number; - eacute: number; - easter: number; - ecaron: number; - ecolon: number; - egrave: number; - egsdot: number; - elsdot: number; - emptyv: number; - emsp13: number; - emsp14: number; - eparsl: number; - eqcirc: number; - equals: number; - equest: number; - female: number; - ffilig: number; - ffllig: number; - forall: number; - frac12: number; - frac13: number; - frac14: number; - frac15: number; - frac16: number; - frac18: number; - frac23: number; - frac25: number; - frac34: number; - frac35: number; - frac38: number; - frac45: number; - frac56: number; - frac58: number; - frac78: number; - gacute: number; - gammad: number; - gbreve: number; - gesdot: number; - gesles: number; - gtlPar: number; - gtrarr: number; - gtrdot: number; - gtrsim: number; - hairsp: number; - hamilt: number; - hardcy: number; - hearts: number; - hellip: number; - hercon: number; - homtht: number; - horbar: number; - hslash: number; - hstrok: number; - hybull: number; - hyphen: number; - iacute: number; - igrave: number; - iiiint: number; - iinfin: number; - incare: number; - inodot: number; - intcal: number; - iquest: number; - isinsv: number; - itilde: number; - jsercy: number; - kappav: number; - kcedil: number; - kgreen: number; - lAtail: number; - lacute: number; - lagran: number; - lambda: number; - langle: number; - larrfs: number; - larrhk: number; - larrlp: number; - larrpl: number; - larrtl: number; - latail: number; - lbrace: number; - lbrack: number; - lcaron: number; - lcedil: number; - ldquor: number; - lesdot: number; - lesges: number; - lfisht: number; - lfloor: number; - lharul: number; - llhard: number; - lmidot: number; - lmoust: number; - loplus: number; - lowast: number; - lowbar: number; - lparlt: number; - lrhard: number; - lsaquo: number; - lsquor: number; - lstrok: number; - lthree: number; - ltimes: number; - ltlarr: number; - ltrPar: number; - mapsto: number; - marker: number; - mcomma: number; - midast: number; - midcir: number; - middot: number; - minusb: number; - minusd: number; - mnplus: number; - models: number; - mstpos: number; - nVDash: number; - nVdash: number; - nacute: number; - ncaron: number; - ncedil: number; - nearhk: number; - nequiv: number; - nesear: number; - nexist: number; - nltrie: number; - nprcue: number; - nrtrie: number; - nsccue: number; - nsimeq: number; - ntilde: number; - numero: number; - nvDash: number; - nvHarr: number; - nvdash: number; - nvlArr: number; - nvrArr: number; - nwarhk: number; - nwnear: number; - oacute: number; - odblac: number; - odsold: number; - ograve: number; - ominus: number; - origof: number; - oslash: number; - otilde: number; - otimes: number; - parsim: number; - percnt: number; - period: number; - permil: number; - phmmat: number; - planck: number; - plankv: number; - plusdo: number; - plusdu: number; - plusmn: number; - preceq: number; - primes: number; - prnsim: number; - propto: number; - prurel: number; - puncsp: number; - qprime: number; - rAtail: number; - racute: number; - rangle: number; - rarrap: number; - rarrfs: number; - rarrhk: number; - rarrlp: number; - rarrpl: number; - rarrtl: number; - ratail: number; - rbrace: number; - rbrack: number; - rcaron: number; - rcedil: number; - rdquor: number; - rfisht: number; - rfloor: number; - rharul: number; - rmoust: number; - roplus: number; - rpargt: number; - rsaquo: number; - rsquor: number; - rthree: number; - rtimes: number; - sacute: number; - scaron: number; - scedil: number; - scnsim: number; - searhk: number; - seswar: number; - sfrown: number; - shchcy: number; - sigmaf: number; - sigmav: number; - simdot: number; - smashp: number; - softcy: number; - solbar: number; - spades: number; - sqsube: number; - sqsupe: number; - square: number; - squarf: number; - ssetmn: number; - ssmile: number; - sstarf: number; - subdot: number; - subset: number; - subsim: number; - subsub: number; - subsup: number; - succeq: number; - supdot: number; - supset: number; - supsim: number; - supsub: number; - supsup: number; - swarhk: number; - swnwar: number; - target: number; - tcaron: number; - tcedil: number; - telrec: number; - there4: number; - thetav: number; - thinsp: number; - thksim: number; - timesb: number; - timesd: number; - topbot: number; - topcir: number; - tprime: number; - tridot: number; - tstrok: number; - uacute: number; - ubreve: number; - udblac: number; - ufisht: number; - ugrave: number; - ulcorn: number; - ulcrop: number; - urcorn: number; - urcrop: number; - utilde: number; - vangrt: number; - varphi: number; - varrho: number; - veebar: number; - vellip: number; - verbar: number; - wedbar: number; - wedgeq: number; - weierp: number; - wreath: number; - xoplus: number; - xotime: number; - xsqcup: number; - xuplus: number; - xwedge: number; - yacute: number; - zacute: number; - zcaron: number; - zeetrf: number; - AElig: number; - Acirc: number; - Alpha: number; - Amacr: number; - Aogon: number; - Aring: number; - Breve: number; - Ccirc: number; - Colon: number; - Cross: number; - Dashv: number; - Delta: number; - Ecirc: number; - Emacr: number; - Eogon: number; - Equal: number; - Gamma: number; - Gcirc: number; - Hacek: number; - Hcirc: number; - IJlig: number; - Icirc: number; - Imacr: number; - Iogon: number; - Iukcy: number; - Jcirc: number; - Jukcy: number; - Kappa: number; - OElig: number; - Ocirc: number; - Omacr: number; - Omega: number; - Prime: number; - RBarr: number; - Scirc: number; - Sigma: number; - THORN: number; - TRADE: number; - TSHcy: number; - Theta: number; - Tilde: number; - Ubrcy: number; - Ucirc: number; - Umacr: number; - Union: number; - Uogon: number; - UpTee: number; - Uring: number; - VDash: number; - Vdash: number; - Wcirc: number; - Wedge: number; - Ycirc: number; - acirc: number; - acute: number; - aelig: number; - aleph: number; - alpha: number; - amacr: number; - amalg: number; - angle: number; - angrt: number; - angst: number; - aogon: number; - aring: number; - asymp: number; - awint: number; - bcong: number; - bdquo: number; - bepsi: number; - blank: number; - blk12: number; - blk14: number; - blk34: number; - block: number; - boxDL: number; - boxDR: number; - boxDl: number; - boxDr: number; - boxHD: number; - boxHU: number; - boxHd: number; - boxHu: number; - boxUL: number; - boxUR: number; - boxUl: number; - boxUr: number; - boxVH: number; - boxVL: number; - boxVR: number; - boxVh: number; - boxVl: number; - boxVr: number; - boxdL: number; - boxdR: number; - boxdl: number; - boxdr: number; - boxhD: number; - boxhU: number; - boxhd: number; - boxhu: number; - boxuL: number; - boxuR: number; - boxul: number; - boxur: number; - boxvH: number; - boxvL: number; - boxvR: number; - boxvh: number; - boxvl: number; - boxvr: number; - breve: number; - bsemi: number; - bsime: number; - bsolb: number; - bumpE: number; - bumpe: number; - caret: number; - caron: number; - ccaps: number; - ccirc: number; - ccups: number; - cedil: number; - check: number; - clubs: number; - colon: number; - comma: number; - crarr: number; - cross: number; - csube: number; - csupe: number; - ctdot: number; - cuepr: number; - cuesc: number; - cupor: number; - cuvee: number; - cuwed: number; - cwint: number; - dashv: number; - dblac: number; - ddarr: number; - delta: number; - dharl: number; - dharr: number; - diams: number; - disin: number; - doteq: number; - dtdot: number; - dtrif: number; - duarr: number; - duhar: number; - eDDot: number; - ecirc: number; - efDot: number; - emacr: number; - empty: number; - eogon: number; - eplus: number; - epsiv: number; - eqsim: number; - equiv: number; - erDot: number; - erarr: number; - esdot: number; - exist: number; - fflig: number; - filig: number; - fllig: number; - fltns: number; - forkv: number; - frasl: number; - frown: number; - gamma: number; - gcirc: number; - gescc: number; - gimel: number; - gneqq: number; - gnsim: number; - grave: number; - gsime: number; - gsiml: number; - gtcir: number; - gtdot: number; - harrw: number; - hcirc: number; - hoarr: number; - icirc: number; - iexcl: number; - iiint: number; - iiota: number; - ijlig: number; - imacr: number; - image: number; - imath: number; - imped: number; - infin: number; - iogon: number; - iprod: number; - isinE: number; - isins: number; - isinv: number; - iukcy: number; - jcirc: number; - jmath: number; - jukcy: number; - kappa: number; - lAarr: number; - lBarr: number; - langd: number; - laquo: number; - larrb: number; - lbarr: number; - lbbrk: number; - lbrke: number; - lceil: number; - ldquo: number; - lescc: number; - lhard: number; - lharu: number; - lhblk: number; - llarr: number; - lltri: number; - lneqq: number; - lnsim: number; - loang: number; - loarr: number; - lobrk: number; - lopar: number; - lrarr: number; - lrhar: number; - lrtri: number; - lsime: number; - lsimg: number; - lsquo: number; - ltcir: number; - ltdot: number; - ltrie: number; - ltrif: number; - mDDot: number; - mdash: number; - micro: number; - minus: number; - mumap: number; - nabla: number; - napos: number; - natur: number; - ncong: number; - ndash: number; - neArr: number; - nearr: number; - ngsim: number; - nhArr: number; - nharr: number; - nhpar: number; - nlArr: number; - nlarr: number; - nless: number; - nlsim: number; - nltri: number; - notin: number; - notni: number; - nprec: number; - nrArr: number; - nrarr: number; - nrtri: number; - nsime: number; - nsmid: number; - nspar: number; - nsube: number; - nsucc: number; - nsupe: number; - numsp: number; - nwArr: number; - nwarr: number; - ocirc: number; - odash: number; - oelig: number; - ofcir: number; - ohbar: number; - olarr: number; - olcir: number; - oline: number; - omacr: number; - omega: number; - operp: number; - oplus: number; - orarr: number; - order: number; - ovbar: number; - parsl: number; - phone: number; - plusb: number; - pluse: number; - pound: number; - prcue: number; - prime: number; - prnap: number; - prsim: number; - quest: number; - rAarr: number; - rBarr: number; - radic: number; - rangd: number; - range: number; - raquo: number; - rarrb: number; - rarrc: number; - rarrw: number; - ratio: number; - rbarr: number; - rbbrk: number; - rbrke: number; - rceil: number; - rdquo: number; - reals: number; - rhard: number; - rharu: number; - rlarr: number; - rlhar: number; - rnmid: number; - roang: number; - roarr: number; - robrk: number; - ropar: number; - rrarr: number; - rsquo: number; - rtrie: number; - rtrif: number; - sbquo: number; - sccue: number; - scirc: number; - scnap: number; - scsim: number; - sdotb: number; - sdote: number; - seArr: number; - searr: number; - setmn: number; - sharp: number; - sigma: number; - simeq: number; - simgE: number; - simlE: number; - simne: number; - slarr: number; - smile: number; - sqcap: number; - sqcup: number; - sqsub: number; - sqsup: number; - srarr: number; - starf: number; - strns: number; - subnE: number; - subne: number; - supnE: number; - supne: number; - swArr: number; - swarr: number; - szlig: number; - theta: number; - thkap: number; - thorn: number; - tilde: number; - times: number; - trade: number; - trisb: number; - tshcy: number; - twixt: number; - ubrcy: number; - ucirc: number; - udarr: number; - udhar: number; - uharl: number; - uharr: number; - uhblk: number; - ultri: number; - umacr: number; - uogon: number; - uplus: number; - upsih: number; - uring: number; - urtri: number; - utdot: number; - utrif: number; - uuarr: number; - vBarv: number; - vDash: number; - varpi: number; - vdash: number; - veeeq: number; - vltri: number; - vprop: number; - vrtri: number; - wcirc: number; - wedge: number; - xcirc: number; - xdtri: number; - xhArr: number; - xharr: number; - xlArr: number; - xlarr: number; - xodot: number; - xrArr: number; - xrarr: number; - xutri: number; - ycirc: number; - Aopf: number; - Ascr: number; - Auml: number; - Barv: number; - Beta: number; - Bopf: number; - Bscr: number; - CHcy: number; - COPY: number; - Cdot: number; - Copf: number; - Cscr: number; - DJcy: number; - DScy: number; - DZcy: number; - Darr: number; - Dopf: number; - Dscr: number; - Edot: number; - Eopf: number; - Escr: number; - Esim: number; - Euml: number; - Fopf: number; - Fscr: number; - GJcy: number; - Gdot: number; - Gopf: number; - Gscr: number; - Hopf: number; - Hscr: number; - IEcy: number; - IOcy: number; - Idot: number; - Iopf: number; - Iota: number; - Iscr: number; - Iuml: number; - Jopf: number; - Jscr: number; - KHcy: number; - KJcy: number; - Kopf: number; - Kscr: number; - LJcy: number; - Lang: number; - Larr: number; - Lopf: number; - Lscr: number; - Mopf: number; - Mscr: number; - NJcy: number; - Nopf: number; - Nscr: number; - Oopf: number; - Oscr: number; - Ouml: number; - Popf: number; - Pscr: number; - QUOT: number; - Qopf: number; - Qscr: number; - Rang: number; - Rarr: number; - Ropf: number; - Rscr: number; - SHcy: number; - Sopf: number; - Sqrt: number; - Sscr: number; - Star: number; - TScy: number; - Topf: number; - Tscr: number; - Uarr: number; - Uopf: number; - Upsi: number; - Uscr: number; - Uuml: number; - Vbar: number; - Vert: number; - Vopf: number; - Vscr: number; - Wopf: number; - Wscr: number; - Xopf: number; - Xscr: number; - YAcy: number; - YIcy: number; - YUcy: number; - Yopf: number; - Yscr: number; - Yuml: number; - ZHcy: number; - Zdot: number; - Zeta: number; - Zopf: number; - Zscr: number; - andd: number; - andv: number; - ange: number; - aopf: number; - apid: number; - apos: number; - ascr: number; - auml: number; - bNot: number; - bbrk: number; - beta: number; - beth: number; - bnot: number; - bopf: number; - boxH: number; - boxV: number; - boxh: number; - boxv: number; - bscr: number; - bsim: number; - bsol: number; - bull: number; - bump: number; - cdot: number; - cent: number; - chcy: number; - cirE: number; - circ: number; - cire: number; - comp: number; - cong: number; - copf: number; - copy: number; - cscr: number; - csub: number; - csup: number; - dArr: number; - dHar: number; - darr: number; - dash: number; - diam: number; - djcy: number; - dopf: number; - dscr: number; - dscy: number; - dsol: number; - dtri: number; - dzcy: number; - eDot: number; - ecir: number; - edot: number; - emsp: number; - ensp: number; - eopf: number; - epar: number; - epsi: number; - escr: number; - esim: number; - euml: number; - euro: number; - excl: number; - flat: number; - fnof: number; - fopf: number; - fork: number; - fscr: number; - gdot: number; - geqq: number; - gjcy: number; - gnap: number; - gneq: number; - gopf: number; - gscr: number; - gsim: number; - gtcc: number; - hArr: number; - half: number; - harr: number; - hbar: number; - hopf: number; - hscr: number; - iecy: number; - imof: number; - iocy: number; - iopf: number; - iota: number; - iscr: number; - isin: number; - iuml: number; - jopf: number; - jscr: number; - khcy: number; - kjcy: number; - kopf: number; - kscr: number; - lArr: number; - lHar: number; - lang: number; - larr: number; - late: number; - lcub: number; - ldca: number; - ldsh: number; - leqq: number; - ljcy: number; - lnap: number; - lneq: number; - lopf: number; - lozf: number; - lpar: number; - lscr: number; - lsim: number; - lsqb: number; - ltcc: number; - ltri: number; - macr: number; - male: number; - malt: number; - mlcp: number; - mldr: number; - mopf: number; - mscr: number; - nbsp: number; - ncap: number; - ncup: number; - ngeq: number; - ngtr: number; - nisd: number; - njcy: number; - nldr: number; - nleq: number; - nmid: number; - nopf: number; - npar: number; - nscr: number; - nsim: number; - nsub: number; - nsup: number; - ntgl: number; - ntlg: number; - oast: number; - ocir: number; - odiv: number; - odot: number; - ogon: number; - oint: number; - omid: number; - oopf: number; - opar: number; - ordf: number; - ordm: number; - oror: number; - oscr: number; - osol: number; - ouml: number; - para: number; - part: number; - perp: number; - phiv: number; - plus: number; - popf: number; - prap: number; - prec: number; - prnE: number; - prod: number; - prop: number; - pscr: number; - qint: number; - qopf: number; - qscr: number; - quot: number; - rArr: number; - rHar: number; - race: number; - rang: number; - rarr: number; - rcub: number; - rdca: number; - rdsh: number; - real: number; - rect: number; - rhov: number; - ring: number; - ropf: number; - rpar: number; - rscr: number; - rsqb: number; - rtri: number; - scap: number; - scnE: number; - sdot: number; - sect: number; - semi: number; - sext: number; - shcy: number; - sime: number; - simg: number; - siml: number; - smid: number; - smte: number; - solb: number; - sopf: number; - spar: number; - squf: number; - sscr: number; - star: number; - subE: number; - sube: number; - succ: number; - sung: number; - sup1: number; - sup2: number; - sup3: number; - supE: number; - supe: number; - tbrk: number; - tdot: number; - tint: number; - toea: number; - topf: number; - tosa: number; - trie: number; - tscr: number; - tscy: number; - uArr: number; - uHar: number; - uarr: number; - uopf: number; - upsi: number; - uscr: number; - utri: number; - uuml: number; - vArr: number; - vBar: number; - varr: number; - vert: number; - vopf: number; - vscr: number; - wopf: number; - wscr: number; - xcap: number; - xcup: number; - xmap: number; - xnis: number; - xopf: number; - xscr: number; - xvee: number; - yacy: number; - yicy: number; - yopf: number; - yscr: number; - yucy: number; - yuml: number; - zdot: number; - zeta: number; - zhcy: number; - zopf: number; - zscr: number; - zwnj: number; - AMP: number; - Acy: number; - Afr: number; - And: number; - Bcy: number; - Bfr: number; - Cap: number; - Cfr: number; - Chi: number; - Cup: number; - Dcy: number; - Del: number; - Dfr: number; - Dot: number; - ENG: number; - ETH: number; - Ecy: number; - Efr: number; - Eta: number; - Fcy: number; - Ffr: number; - Gcy: number; - Gfr: number; - Hat: number; - Hfr: number; - Icy: number; - Ifr: number; - Int: number; - Jcy: number; - Jfr: number; - Kcy: number; - Kfr: number; - Lcy: number; - Lfr: number; - Lsh: number; - Map: number; - Mcy: number; - Mfr: number; - Ncy: number; - Nfr: number; - Not: number; - Ocy: number; - Ofr: number; - Pcy: number; - Pfr: number; - Phi: number; - Psi: number; - Qfr: number; - REG: number; - Rcy: number; - Rfr: number; - Rho: number; - Rsh: number; - Scy: number; - Sfr: number; - Sub: number; - Sum: number; - Sup: number; - Tab: number; - Tau: number; - Tcy: number; - Tfr: number; - Ucy: number; - Ufr: number; - Vcy: number; - Vee: number; - Vfr: number; - Wfr: number; - Xfr: number; - Ycy: number; - Yfr: number; - Zcy: number; - Zfr: number; - acd: number; - acy: number; - afr: number; - amp: number; - and: number; - ang: number; - apE: number; - ape: number; - ast: number; - bcy: number; - bfr: number; - bot: number; - cap: number; - cfr: number; - chi: number; - cir: number; - cup: number; - dcy: number; - deg: number; - dfr: number; - die: number; - div: number; - dot: number; - ecy: number; - efr: number; - egs: number; - ell: number; - els: number; - eng: number; - eta: number; - eth: number; - fcy: number; - ffr: number; - gEl: number; - gap: number; - gcy: number; - gel: number; - geq: number; - ges: number; - gfr: number; - ggg: number; - glE: number; - gla: number; - glj: number; - gnE: number; - gne: number; - hfr: number; - icy: number; - iff: number; - ifr: number; - int: number; - jcy: number; - jfr: number; - kcy: number; - kfr: number; - lEg: number; - lap: number; - lat: number; - lcy: number; - leg: number; - leq: number; - les: number; - lfr: number; - lgE: number; - lnE: number; - lne: number; - loz: number; - lrm: number; - lsh: number; - map: number; - mcy: number; - mfr: number; - mho: number; - mid: number; - nap: number; - ncy: number; - nfr: number; - nge: number; - ngt: number; - nis: number; - niv: number; - nle: number; - nlt: number; - not: number; - npr: number; - nsc: number; - num: number; - ocy: number; - ofr: number; - ogt: number; - ohm: number; - olt: number; - ord: number; - orv: number; - par: number; - pcy: number; - pfr: number; - phi: number; - piv: number; - prE: number; - pre: number; - psi: number; - qfr: number; - rcy: number; - reg: number; - rfr: number; - rho: number; - rlm: number; - rsh: number; - scE: number; - sce: number; - scy: number; - sfr: number; - shy: number; - sim: number; - smt: number; - sol: number; - squ: number; - sub: number; - sum: number; - sup: number; - tau: number; - tcy: number; - tfr: number; - top: number; - ucy: number; - ufr: number; - uml: number; - vcy: number; - vee: number; - vfr: number; - wfr: number; - xfr: number; - ycy: number; - yen: number; - yfr: number; - zcy: number; - zfr: number; - zwj: number; - DD: number; - GT: number; - Gg: number; - Gt: number; - Im: number; - LT: number; - Ll: number; - Lt: number; - Mu: number; - Nu: number; - Or: number; - Pi: number; - Pr: number; - Re: number; - Sc: number; - Xi: number; - ac: number; - af: number; - ap: number; - dd: number; - ee: number; - eg: number; - el: number; - gE: number; - ge: number; - gg: number; - gl: number; - gt: number; - ic: number; - ii: number; - in: number; - it: number; - lE: number; - le: number; - lg: number; - ll: number; - lt: number; - mp: number; - mu: number; - ne: number; - ni: number; - nu: number; - oS: number; - or: number; - pi: number; - pm: number; - pr: number; - rx: number; - sc: number; - wp: number; - wr: number; - xi: number; -}; -export default _default; diff --git a/src/@types/compiler/parse/utils/html.d.ts b/src/@types/compiler/parse/utils/html.d.ts deleted file mode 100644 index b0296c0d8d..0000000000 --- a/src/@types/compiler/parse/utils/html.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare function decode_character_references(html: string): string; -export declare function closing_tag_omitted(current: string, next?: string): boolean; diff --git a/src/@types/compiler/parse/utils/node.d.ts b/src/@types/compiler/parse/utils/node.d.ts deleted file mode 100644 index 9194910ae7..0000000000 --- a/src/@types/compiler/parse/utils/node.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { TemplateNode } from '../../interfaces'; -export declare function to_string(node: TemplateNode): string; diff --git a/src/@types/compiler/preprocess/decode_sourcemap.d.ts b/src/@types/compiler/preprocess/decode_sourcemap.d.ts deleted file mode 100644 index ad121759b5..0000000000 --- a/src/@types/compiler/preprocess/decode_sourcemap.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Processed } from './types'; -export declare function decode_map(processed: Processed): any; diff --git a/src/@types/compiler/preprocess/index.d.ts b/src/@types/compiler/preprocess/index.d.ts deleted file mode 100644 index 627cee97e6..0000000000 --- a/src/@types/compiler/preprocess/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { PreprocessorGroup, Processed } from './types'; -export default function preprocess( - source: string, - preprocessor: PreprocessorGroup | PreprocessorGroup[], - options?: { - filename?: string; - } -): Promise; diff --git a/src/@types/compiler/preprocess/replace_in_code.d.ts b/src/@types/compiler/preprocess/replace_in_code.d.ts deleted file mode 100644 index 43f72c3b41..0000000000 --- a/src/@types/compiler/preprocess/replace_in_code.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { MappedCode } from '../utils/mapped_code'; -import { Source } from './types'; -export declare function slice_source(code_slice: string, offset: number, { file_basename, filename, get_location }: Source): Source; -export declare function replace_in_code(regex: RegExp, get_replacement: (...match: any[]) => Promise, location: Source): Promise; diff --git a/src/@types/compiler/preprocess/types.d.ts b/src/@types/compiler/preprocess/types.d.ts deleted file mode 100644 index 7f8a3dbcf0..0000000000 --- a/src/@types/compiler/preprocess/types.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Location } from 'locate-character'; -export interface Source { - source: string; - get_location: (search: number) => Location; - file_basename: string; - filename: string; -} -export interface Processed { - code: string; - map?: string | object; - dependencies?: string[]; - toString?: () => string; -} -export declare type MarkupPreprocessor = (options: { content: string; filename: string }) => Processed | Promise; -export declare type Preprocessor = (options: { content: string; attributes: Record; filename?: string }) => Processed | Promise; -export interface PreprocessorGroup { - markup?: MarkupPreprocessor; - style?: Preprocessor; - script?: Preprocessor; -} diff --git a/src/@types/compiler/utils/error.d.ts b/src/@types/compiler/utils/error.d.ts deleted file mode 100644 index a59c146c94..0000000000 --- a/src/@types/compiler/utils/error.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default function error( - message: string, - props: { - name: string; - code: string; - source: string; - filename: string; - start: number; - end?: number; - } -): never; diff --git a/src/@types/compiler/utils/full_char_code_at.d.ts b/src/@types/compiler/utils/full_char_code_at.d.ts deleted file mode 100644 index f0d6763971..0000000000 --- a/src/@types/compiler/utils/full_char_code_at.d.ts +++ /dev/null @@ -1 +0,0 @@ -export default function full_char_code_at(str: string, i: number): number; diff --git a/src/@types/compiler/utils/fuzzymatch.d.ts b/src/@types/compiler/utils/fuzzymatch.d.ts deleted file mode 100644 index 6aa4e011df..0000000000 --- a/src/@types/compiler/utils/fuzzymatch.d.ts +++ /dev/null @@ -1 +0,0 @@ -export default function fuzzymatch(name: string, names: string[]): any; diff --git a/src/@types/compiler/utils/get_code_frame.d.ts b/src/@types/compiler/utils/get_code_frame.d.ts deleted file mode 100644 index 50943dc998..0000000000 --- a/src/@types/compiler/utils/get_code_frame.d.ts +++ /dev/null @@ -1 +0,0 @@ -export default function get_code_frame(source: string, line: number, column: number): string; diff --git a/src/@types/compiler/utils/link.d.ts b/src/@types/compiler/utils/link.d.ts deleted file mode 100644 index 8cb0c0bb34..0000000000 --- a/src/@types/compiler/utils/link.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare function link< - T extends { - next?: T; - prev?: T; - } ->(next: T, prev: T): void; diff --git a/src/@types/compiler/utils/list.d.ts b/src/@types/compiler/utils/list.d.ts deleted file mode 100644 index b61de6978b..0000000000 --- a/src/@types/compiler/utils/list.d.ts +++ /dev/null @@ -1 +0,0 @@ -export default function list(items: string[], conjunction?: string): string; diff --git a/src/@types/compiler/utils/mapped_code.d.ts b/src/@types/compiler/utils/mapped_code.d.ts deleted file mode 100644 index a6b194c8b9..0000000000 --- a/src/@types/compiler/utils/mapped_code.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { DecodedSourceMap, RawSourceMap } from '@ampproject/remapping/dist/types/types'; -import { SourceMap } from 'magic-string'; -import { Source, Processed } from '../preprocess/types'; -export declare type SourceLocation = { - line: number; - column: number; -}; -export declare function sourcemap_add_offset(map: DecodedSourceMap, offset: SourceLocation, source_index: number): void; -export declare class MappedCode { - string: string; - map: DecodedSourceMap; - constructor(string?: string, map?: DecodedSourceMap); - /** - * concat in-place (mutable), return this (chainable) - * will also mutate the `other` object - */ - concat(other: MappedCode): MappedCode; - static from_processed(string: string, map?: DecodedSourceMap): MappedCode; - static from_source({ source, file_basename, get_location }: Source): MappedCode; -} -export declare function combine_sourcemaps(filename: string, sourcemap_list: Array): RawSourceMap; -export declare function apply_preprocessor_sourcemap(filename: string, svelte_map: SourceMap, preprocessor_map_input: string | DecodedSourceMap | RawSourceMap): SourceMap; -export declare function parse_attached_sourcemap(processed: Processed, tag_name: 'script' | 'style'): void; diff --git a/src/@types/compiler/utils/names.d.ts b/src/@types/compiler/utils/names.d.ts deleted file mode 100644 index 8f23a9b51d..0000000000 --- a/src/@types/compiler/utils/names.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare const globals: Set; -export declare const reserved: Set; -export declare function is_void(name: string): boolean; -export declare function is_valid(str: string): boolean; -export declare function sanitize(name: string): string; diff --git a/src/@types/compiler/utils/namespaces.d.ts b/src/@types/compiler/utils/namespaces.d.ts deleted file mode 100644 index aaad388608..0000000000 --- a/src/@types/compiler/utils/namespaces.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export declare const foreign = 'https://svelte.dev/docs#svelte_options'; -export declare const html = 'http://www.w3.org/1999/xhtml'; -export declare const mathml = 'http://www.w3.org/1998/Math/MathML'; -export declare const svg = 'http://www.w3.org/2000/svg'; -export declare const xlink = 'http://www.w3.org/1999/xlink'; -export declare const xml = 'http://www.w3.org/XML/1998/namespace'; -export declare const xmlns = 'http://www.w3.org/2000/xmlns'; -export declare const valid_namespaces: string[]; -export declare const namespaces: Record; diff --git a/src/@types/compiler/utils/nodes_match.d.ts b/src/@types/compiler/utils/nodes_match.d.ts deleted file mode 100644 index 065e81bcc7..0000000000 --- a/src/@types/compiler/utils/nodes_match.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function nodes_match(a: any, b: any): any; diff --git a/src/@types/compiler/utils/patterns.d.ts b/src/@types/compiler/utils/patterns.d.ts deleted file mode 100644 index be6dcdec8c..0000000000 --- a/src/@types/compiler/utils/patterns.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare const whitespace: RegExp; -export declare const dimensions: RegExp; diff --git a/src/@types/compiler/utils/trim.d.ts b/src/@types/compiler/utils/trim.d.ts deleted file mode 100644 index 7f8e2824a7..0000000000 --- a/src/@types/compiler/utils/trim.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare function trim_start(str: string): string; -export declare function trim_end(str: string): string; diff --git a/src/@types/estree-walker.d.ts b/src/@types/estree-walker.d.ts new file mode 100644 index 0000000000..5afb476cb1 --- /dev/null +++ b/src/@types/estree-walker.d.ts @@ -0,0 +1,14 @@ +import { BaseNode } from 'estree-walker'; + +declare module 'estree-walker' { + export function walk( + ast: T, + { + enter, + leave, + }: { + enter?: (this: { skip: () => void; remove: () => void; replace: (node: T) => void }, node: T, parent: T, key: string, index: number) => void; + leave?: (this: { skip: () => void; remove: () => void; replace: (node: T) => void }, node: T, parent: T, key: string, index: number) => void; + } + ): T; +} diff --git a/src/compiler/interfaces.ts b/src/compiler/interfaces.ts index dcc9431417..bedb29cda5 100644 --- a/src/compiler/interfaces.ts +++ b/src/compiler/interfaces.ts @@ -2,178 +2,162 @@ import { Node, Program } from 'estree'; import { SourceMap } from 'magic-string'; interface BaseNode { - start: number; - end: number; - type: string; - children?: TemplateNode[]; - [prop_name: string]: any; + start: number; + end: number; + type: string; + children?: TemplateNode[]; + [prop_name: string]: any; } export interface Fragment extends BaseNode { - type: 'Fragment'; - children: TemplateNode[]; + type: 'Fragment'; + children: TemplateNode[]; } export interface Text extends BaseNode { - type: 'Text'; - data: string; + type: 'Text'; + data: string; } export interface MustacheTag extends BaseNode { - type: 'MustacheTag'; - expression: string; + type: 'MustacheTag'; + expression: string; } -export type DirectiveType = 'Action' -| 'Animation' -| 'Binding' -| 'Class' -| 'EventHandler' -| 'Let' -| 'Ref' -| 'Transition'; +export type DirectiveType = 'Action' | 'Animation' | 'Binding' | 'Class' | 'EventHandler' | 'Let' | 'Ref' | 'Transition'; interface BaseDirective extends BaseNode { - type: DirectiveType; - expression: null | Node; - name: string; - modifiers: string[]; + type: DirectiveType; + expression: null | Node; + name: string; + modifiers: string[]; } -export interface Transition extends BaseDirective{ - type: 'Transition'; - intro: boolean; - outro: boolean; +export interface Transition extends BaseDirective { + type: 'Transition'; + intro: boolean; + outro: boolean; } export type Directive = BaseDirective | Transition; -export type TemplateNode = Text -| MustacheTag -| BaseNode -| Directive -| Transition; +export type TemplateNode = Text | MustacheTag | BaseNode | Directive | Transition; export interface Parser { - readonly template: string; - readonly filename?: string; + readonly template: string; + readonly filename?: string; - index: number; - stack: Node[]; + index: number; + stack: Node[]; - html: Node; - css: Node; - js: Node; - meta_tags: {}; + html: Node; + css: Node; + js: Node; + meta_tags: {}; } export interface Script extends BaseNode { - type: 'Script'; - context: string; - content: string; + type: 'Script'; + context: string; + content: string; } export interface Style extends BaseNode { - type: 'Style'; - attributes: any[]; // TODO - content: { - start: number; - end: number; - styles: string; - }; + type: 'Style'; + attributes: any[]; // TODO + content: { + start: number; + end: number; + styles: string; + }; } export interface Ast { - html: TemplateNode; - css: Style; - instance: Script; - module: Script; + html: TemplateNode; + css: Style; + instance: Script; + module: Script; } export interface Warning { - start?: { line: number; column: number; pos?: number }; - end?: { line: number; column: number }; - pos?: number; - code: string; - message: string; - filename?: string; - frame?: string; - toString: () => string; + start?: { line: number; column: number; pos?: number }; + end?: { line: number; column: number }; + pos?: number; + code: string; + message: string; + filename?: string; + frame?: string; + toString: () => string; } export type ModuleFormat = 'esm' | 'cjs'; -export type CssHashGetter = (args: { - name: string; - filename: string | undefined; - css: string; - hash: (input: string) => string; -}) => string; +export type CssHashGetter = (args: { name: string; filename: string | undefined; css: string; hash: (input: string) => string }) => string; export interface CompileOptions { - format?: ModuleFormat; - name?: string; - filename?: string; - generate?: 'dom' | 'ssr' | false; + format?: ModuleFormat; + name?: string; + filename?: string; + generate?: 'dom' | 'ssr' | false; - sourcemap?: object | string; - outputFilename?: string; - cssOutputFilename?: string; - sveltePath?: string; + sourcemap?: object | string; + outputFilename?: string; + cssOutputFilename?: string; + sveltePath?: string; - dev?: boolean; - accessors?: boolean; - immutable?: boolean; - hydratable?: boolean; - legacy?: boolean; - customElement?: boolean; - tag?: string; - css?: boolean; - loopGuardTimeout?: number; - namespace?: string; - cssHash?: CssHashGetter; + dev?: boolean; + accessors?: boolean; + immutable?: boolean; + hydratable?: boolean; + legacy?: boolean; + customElement?: boolean; + tag?: string; + css?: boolean; + loopGuardTimeout?: number; + namespace?: string; + cssHash?: CssHashGetter; - preserveComments?: boolean; - preserveWhitespace?: boolean; + preserveComments?: boolean; + preserveWhitespace?: boolean; } export interface ParserOptions { - filename?: string; - customElement?: boolean; + filename?: string; + customElement?: boolean; } export interface Visitor { - enter: (node: Node) => void; - leave?: (node: Node) => void; + enter: (node: Node) => void; + leave?: (node: Node) => void; } export interface AppendTarget { - slots: Record; - slot_stack: string[]; + slots: Record; + slot_stack: string[]; } export interface Var { - name: string; - export_name?: string; // the `bar` in `export { foo as bar }` - injected?: boolean; - module?: boolean; - mutated?: boolean; - reassigned?: boolean; - referenced?: boolean; // referenced from template scope - referenced_from_script?: boolean; // referenced from script - writable?: boolean; + name: string; + export_name?: string; // the `bar` in `export { foo as bar }` + injected?: boolean; + module?: boolean; + mutated?: boolean; + reassigned?: boolean; + referenced?: boolean; // referenced from template scope + referenced_from_script?: boolean; // referenced from script + writable?: boolean; - // used internally, but not exposed - global?: boolean; - internal?: boolean; // event handlers, bindings - initialised?: boolean; - hoistable?: boolean; - subscribable?: boolean; - is_reactive_dependency?: boolean; - imported?: boolean; + // used internally, but not exposed + global?: boolean; + internal?: boolean; // event handlers, bindings + initialised?: boolean; + hoistable?: boolean; + subscribable?: boolean; + is_reactive_dependency?: boolean; + imported?: boolean; } export interface CssResult { - code: string; - map: SourceMap; + code: string; + map: SourceMap; } diff --git a/src/compiler/parse/read/style.ts b/src/compiler/parse/read/style.ts index deb60de460..f23d7b10ee 100644 --- a/src/compiler/parse/read/style.ts +++ b/src/compiler/parse/read/style.ts @@ -1,33 +1,40 @@ import { Parser } from '../index.js'; -import { Node } from 'estree'; import { Style } from '../../interfaces.js'; -export default function read_style(parser: Parser, start: number, attributes: Node[]): Style { - const content_start = parser.index; - const styles = parser.read_until(/<\/style>/); - const content_end = parser.index; - parser.eat('', true); - const end = parser.index; - - return { - type: 'Style', - start, - end, - attributes, - content: { - start: content_start, - end: content_end, - styles - } - }; +interface Attribute { + start: number; + end: number; + type: 'Attribute'; + name: string; + value: { + raw: string; + data: string; + }[]; } -function is_ref_selector(a: any, b: any) { // TODO add CSS node types - if (!b) return false; +export default function read_style(parser: Parser, start: number, attributes: Attribute[]): Style { + const content_start = parser.index; + const styles = parser.read_until(/<\/style>/); + const content_end = parser.index; + parser.eat('', true); + const end = parser.index; - return ( - a.type === 'TypeSelector' && - a.name === 'ref' && - b.type === 'PseudoClassSelector' - ); + return { + type: 'Style', + start, + end, + attributes, + content: { + start: content_start, + end: content_end, + styles, + }, + }; +} + +function is_ref_selector(a: any, b: any) { + // TODO add CSS node types + if (!b) return false; + + return a.type === 'TypeSelector' && a.name === 'ref' && b.type === 'PseudoClassSelector'; } diff --git a/src/transform2.ts b/src/transform2.ts index 106a9680d5..197a38ea17 100644 --- a/src/transform2.ts +++ b/src/transform2.ts @@ -1,5 +1,3 @@ -import type { TemplateNode } from './@types/compiler/interfaces'; - import path from 'path'; import astring from 'astring'; import esbuild from 'esbuild'; @@ -11,6 +9,7 @@ import gfmHtml from 'micromark-extension-gfm/html.js'; import { walk } from 'estree-walker'; import { parse } from './compiler/index.js'; import markdownEncode from './markdown-encode.js'; +import { TemplateNode } from './compiler/interfaces.js'; const { transformSync } = esbuild; @@ -154,13 +153,13 @@ function getComponentWrapper(_name: string, { type, url }: { type: string; url: } const patternImport = new RegExp(/import(?:["'\s]*([\w*${}\n\r\t, ]+)from\s*)?["'\s]["'\s](.*[@\w_-]+)["'\s].*;$/, 'mg'); -function compileScriptSafe(raw: string, loader:'jsx' | 'tsx'): string { +function compileScriptSafe(raw: string, loader: 'jsx' | 'tsx'): string { // esbuild treeshakes unused imports. In our case these are components, so let's keep them. const imports: Array = []; raw.replace(patternImport, (value: string) => { imports.push(value); return value; - }) + }); let { code } = transformSync(raw, { loader, @@ -169,8 +168,8 @@ function compileScriptSafe(raw: string, loader:'jsx' | 'tsx'): string { charset: 'utf8', }); - for(let importStatement of imports) { - if(!code.includes(importStatement)) { + for (let importStatement of imports) { + if (!code.includes(importStatement)) { code = importStatement + '\n' + code; } } @@ -182,7 +181,7 @@ async function convertHmxToJsx(template: string, compileOptions: CompileOptions) await eslexer.init; const ast = parse(template, {}); - const script = compileScriptSafe(ast.instance ? ast.instance.content : "", 'tsx'); + const script = compileScriptSafe(ast.instance ? ast.instance.content : '', 'tsx'); // Compile scripts as TypeScript, always @@ -204,9 +203,8 @@ async function convertHmxToJsx(template: string, compileOptions: CompileOptions) let currentItemName: string | undefined; let currentDepth = 0; - walk(ast.html as any, { - // @ts-ignore - enter(node: TemplateNode, parent, prop, index) { + walk(ast.html, { + enter(node, parent, prop, index) { // console.log("enter", node.type); switch (node.type) { case 'MustacheTag': @@ -309,8 +307,7 @@ async function convertHmxToJsx(template: string, compileOptions: CompileOptions) throw new Error('Unexpected node type: ' + node.type); } }, - // @ts-ignore - leave(node: TemplateNode, parent, prop, index) { + leave(node, parent, prop, index) { // console.log("leave", node.type); switch (node.type) { case 'Text':