diff --git a/src/compile/render-dom/Block.ts b/src/compile/render-dom/Block.ts index 5a192b55a3..bee2072ef1 100644 --- a/src/compile/render-dom/Block.ts +++ b/src/compile/render-dom/Block.ts @@ -104,9 +104,7 @@ export default class Block { this.getUniqueName = this.renderer.component.getUniqueNameMaker(); this.variables = new Map(); - this.aliases = new Map() - .set('component', this.getUniqueName('component')) - .set('ctx', this.getUniqueName('ctx')); + this.aliases = new Map().set('ctx', this.getUniqueName('ctx')); if (this.key) this.aliases.set('key', this.getUniqueName('key')); this.hasUpdateMethod = false; // determined later @@ -410,7 +408,7 @@ export default class Block { return deindent` ${this.comment && `// ${this.comment}`} - function ${this.name}(${this.alias('component')}, ${this.key ? `${localKey}, ` : ''}ctx) { + function ${this.name}($$, ${this.key ? `${localKey}, ` : ''}ctx) { ${this.getContents(localKey)} } `; diff --git a/src/compile/render-dom/index.ts b/src/compile/render-dom/index.ts index aee924f0cf..50b0a35206 100644 --- a/src/compile/render-dom/index.ts +++ b/src/compile/render-dom/index.ts @@ -238,7 +238,7 @@ export default function dom( if (component.props.length > 0 || component.has_reactive_assignments) args.push('$$props', '$$invalidate'); builder.addBlock(deindent` - function create_fragment(${component.alias('component')}, ctx) { + function create_fragment($$, ctx) { ${block.getContents()} } diff --git a/src/compile/render-dom/wrappers/AwaitBlock.ts b/src/compile/render-dom/wrappers/AwaitBlock.ts index c0b719f140..c37bb4b1cf 100644 --- a/src/compile/render-dom/wrappers/AwaitBlock.ts +++ b/src/compile/render-dom/wrappers/AwaitBlock.ts @@ -135,7 +135,7 @@ export default class AwaitBlockWrapper extends Wrapper { block.maintainContext = true; const infoProps = [ - block.alias('component') === 'component' ? 'component' : `component: #component`, + '$$', 'ctx', 'current: null', this.pending.block.name && `pending: ${this.pending.block.name}`, diff --git a/src/compile/render-dom/wrappers/EachBlock.ts b/src/compile/render-dom/wrappers/EachBlock.ts index 397a5629a7..2b3bd44a01 100644 --- a/src/compile/render-dom/wrappers/EachBlock.ts +++ b/src/compile/render-dom/wrappers/EachBlock.ts @@ -216,7 +216,7 @@ export default class EachBlockWrapper extends Wrapper { // TODO neaten this up... will end up with an empty line in the block block.builders.init.addBlock(deindent` if (!${this.vars.each_block_value}.${this.vars.length}) { - ${each_block_else} = ${this.else.block.name}(#component, ctx); + ${each_block_else} = ${this.else.block.name}($$, ctx); ${each_block_else}.c(); } `); @@ -234,7 +234,7 @@ export default class EachBlockWrapper extends Wrapper { if (!${this.vars.each_block_value}.${this.vars.length} && ${each_block_else}) { ${each_block_else}.p(changed, ctx); } else if (!${this.vars.each_block_value}.${this.vars.length}) { - ${each_block_else} = ${this.else.block.name}(#component, ctx); + ${each_block_else} = ${this.else.block.name}($$, ctx); ${each_block_else}.c(); ${each_block_else}.${mountOrIntro}(${initialMountNode}, ${this.vars.anchor}); } else if (${each_block_else}) { @@ -250,7 +250,7 @@ export default class EachBlockWrapper extends Wrapper { ${each_block_else} = null; } } else if (!${each_block_else}) { - ${each_block_else} = ${this.else.block.name}(#component, ctx); + ${each_block_else} = ${this.else.block.name}($$, ctx); ${each_block_else}.c(); ${each_block_else}.${mountOrIntro}(${initialMountNode}, ${this.vars.anchor}); } @@ -307,7 +307,7 @@ export default class EachBlockWrapper extends Wrapper { for (var #i = 0; #i < ${this.vars.each_block_value}.${length}; #i += 1) { let child_ctx = ${this.vars.get_each_context}(ctx, ${this.vars.each_block_value}, #i); let key = ${get_key}(child_ctx); - ${blocks}[#i] = ${lookup}[key] = ${create_each_block}(#component, key, child_ctx); + ${blocks}[#i] = ${lookup}[key] = ${create_each_block}($$, key, child_ctx); } `); @@ -343,7 +343,7 @@ export default class EachBlockWrapper extends Wrapper { ${this.block.hasOutros && `@group_outros();`} ${this.node.hasAnimation && `for (let #i = 0; #i < ${blocks}.length; #i += 1) ${blocks}[#i].r();`} - ${blocks} = @updateKeyedEach(${blocks}, #component, changed, ${get_key}, ${dynamic ? '1' : '0'}, ctx, ${this.vars.each_block_value}, ${lookup}, ${updateMountNode}, ${destroy}, ${create_each_block}, "${mountOrIntro}", ${anchor}, ${this.vars.get_each_context}); + ${blocks} = @updateKeyedEach(${blocks}, $$, changed, ${get_key}, ${dynamic ? '1' : '0'}, ctx, ${this.vars.each_block_value}, ${lookup}, ${updateMountNode}, ${destroy}, ${create_each_block}, "${mountOrIntro}", ${anchor}, ${this.vars.get_each_context}); ${this.node.hasAnimation && `for (let #i = 0; #i < ${blocks}.length; #i += 1) ${blocks}[#i].a();`} `); @@ -378,7 +378,7 @@ export default class EachBlockWrapper extends Wrapper { var ${iterations} = []; for (var #i = 0; #i < ${this.vars.each_block_value}.${length}; #i += 1) { - ${iterations}[#i] = ${create_each_block}(#component, ${this.vars.get_each_context}(ctx, ${this.vars.each_block_value}, #i)); + ${iterations}[#i] = ${create_each_block}($$, ${this.vars.get_each_context}(ctx, ${this.vars.each_block_value}, #i)); } `); @@ -440,7 +440,7 @@ export default class EachBlockWrapper extends Wrapper { if (${iterations}[#i]) { ${iterations}[#i].p(changed, child_ctx); } else { - ${iterations}[#i] = ${create_each_block}(#component, child_ctx); + ${iterations}[#i] = ${create_each_block}($$, child_ctx); ${iterations}[#i].c(); } ${iterations}[#i].i(${updateMountNode}, ${anchor}); @@ -449,13 +449,13 @@ export default class EachBlockWrapper extends Wrapper { if (${iterations}[#i]) { ${iterations}[#i].p(changed, child_ctx); } else { - ${iterations}[#i] = ${create_each_block}(#component, child_ctx); + ${iterations}[#i] = ${create_each_block}($$, child_ctx); ${iterations}[#i].c(); ${iterations}[#i].m(${updateMountNode}, ${anchor}); } ` : deindent` - ${iterations}[#i] = ${create_each_block}(#component, child_ctx); + ${iterations}[#i] = ${create_each_block}($$, child_ctx); ${iterations}[#i].c(); ${iterations}[#i].${mountOrIntro}(${updateMountNode}, ${anchor}); `; diff --git a/src/compile/render-dom/wrappers/Element/Binding.ts b/src/compile/render-dom/wrappers/Element/Binding.ts index 672fb21ab7..4a2df8af70 100644 --- a/src/compile/render-dom/wrappers/Element/Binding.ts +++ b/src/compile/render-dom/wrappers/Element/Binding.ts @@ -123,11 +123,11 @@ export default class BindingWrapper { const bindingGroup = getBindingGroup(parent.renderer, this.node.expression.node); block.builders.hydrate.addLine( - `(#component.$$.binding_groups[${bindingGroup}] || (#component.$$.binding_groups[${bindingGroup}] = [])).push(${parent.var});` + `($$.binding_groups[${bindingGroup}] || ($$.binding_groups[${bindingGroup}] = [])).push(${parent.var});` ); block.builders.destroy.addLine( - `#component.$$.binding_groups[${bindingGroup}].splice(#component.$$.binding_groups[${bindingGroup}].indexOf(${parent.var}), 1);` + `$$.binding_groups[${bindingGroup}].splice($$.binding_groups[${bindingGroup}].indexOf(${parent.var}), 1);` ); break; diff --git a/src/compile/render-dom/wrappers/IfBlock.ts b/src/compile/render-dom/wrappers/IfBlock.ts index 594f811090..0b49412058 100644 --- a/src/compile/render-dom/wrappers/IfBlock.ts +++ b/src/compile/render-dom/wrappers/IfBlock.ts @@ -222,7 +222,7 @@ export default class IfBlockWrapper extends Wrapper { block.builders.init.addBlock(deindent` var ${current_block_type} = ${select_block_type}(ctx); - var ${name} = ${current_block_type_and}${current_block_type}(#component, ctx); + var ${name} = ${current_block_type_and}${current_block_type}($$, ctx); `); const mountOrIntro = this.branches[0].block.hasIntroMethod ? 'i' : 'm'; @@ -237,7 +237,7 @@ export default class IfBlockWrapper extends Wrapper { const changeBlock = deindent` ${if_name}${name}.d(1); - ${name} = ${current_block_type_and}${current_block_type}(#component, ctx); + ${name} = ${current_block_type_and}${current_block_type}($$, ctx); ${if_name}${name}.c(); ${if_name}${name}.${mountOrIntro}(${updateMountNode}, ${anchor}); `; @@ -301,12 +301,12 @@ export default class IfBlockWrapper extends Wrapper { if (hasElse) { block.builders.init.addBlock(deindent` ${current_block_type_index} = ${select_block_type}(ctx); - ${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}](#component, ctx); + ${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}]($$, ctx); `); } else { block.builders.init.addBlock(deindent` if (~(${current_block_type_index} = ${select_block_type}(ctx))) { - ${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}](#component, ctx); + ${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}]($$, ctx); } `); } @@ -332,7 +332,7 @@ export default class IfBlockWrapper extends Wrapper { const createNewBlock = deindent` ${name} = ${if_blocks}[${current_block_type_index}]; if (!${name}) { - ${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}](#component, ctx); + ${name} = ${if_blocks}[${current_block_type_index}] = ${if_block_creators}[${current_block_type_index}]($$, ctx); ${name}.c(); } ${name}.${mountOrIntro}(${updateMountNode}, ${anchor}); @@ -391,7 +391,7 @@ export default class IfBlockWrapper extends Wrapper { const branch = this.branches[0]; block.builders.init.addBlock(deindent` - var ${name} = (${branch.condition}) && ${branch.block.name}(#component, ctx); + var ${name} = (${branch.condition}) && ${branch.block.name}($$, ctx); `); const mountOrIntro = branch.block.hasIntroMethod ? 'i' : 'm'; @@ -410,7 +410,7 @@ export default class IfBlockWrapper extends Wrapper { if (${name}) { ${name}.p(changed, ctx); } else { - ${name} = ${branch.block.name}(#component, ctx); + ${name} = ${branch.block.name}($$, ctx); if (${name}) ${name}.c(); } @@ -420,7 +420,7 @@ export default class IfBlockWrapper extends Wrapper { if (${name}) { ${name}.p(changed, ctx); } else { - ${name} = ${branch.block.name}(#component, ctx); + ${name} = ${branch.block.name}($$, ctx); ${name}.c(); ${name}.m(${updateMountNode}, ${anchor}); } @@ -428,14 +428,14 @@ export default class IfBlockWrapper extends Wrapper { : (branch.block.hasIntroMethod || branch.block.hasOutroMethod) ? deindent` if (!${name}) { - ${name} = ${branch.block.name}(#component, ctx); + ${name} = ${branch.block.name}($$, ctx); ${name}.c(); } ${name}.i(${updateMountNode}, ${anchor}); ` : deindent` if (!${name}) { - ${name} = ${branch.block.name}(#component, ctx); + ${name} = ${branch.block.name}($$, ctx); ${name}.c(); ${name}.m(${updateMountNode}, ${anchor}); } diff --git a/src/compile/render-dom/wrappers/Slot.ts b/src/compile/render-dom/wrappers/Slot.ts index 10052f17e0..954c4c56ef 100644 --- a/src/compile/render-dom/wrappers/Slot.ts +++ b/src/compile/render-dom/wrappers/Slot.ts @@ -46,7 +46,7 @@ export default class SlotWrapper extends Wrapper { const content_name = block.getUniqueName(`slot_content_${sanitize(slotName)}`); const prop = quotePropIfNecessary(slotName); - block.addVariable(content_name, `#component.$$.slotted${prop}`); + block.addVariable(content_name, `$$.slotted${prop}`); // TODO can we use isDomNode instead of type === 'Element'? const needsAnchorBefore = this.prev ? this.prev.node.type !== 'Element' : !parentNode; diff --git a/src/internal/Component.js b/src/internal/Component.js index ec8de48d81..a1607f0b30 100644 --- a/src/internal/Component.js +++ b/src/internal/Component.js @@ -98,7 +98,7 @@ export function init(component, options, instance, create_fragment, not_equal) { $$.update(); ready = true; run_all($$.before_render); - $$.fragment = create_fragment(component, $$.ctx); + $$.fragment = create_fragment($$, $$.ctx); if (options.target) { intros.enabled = !!options.intro; diff --git a/src/internal/await-block.js b/src/internal/await-block.js index 5db7c8f1e5..9f49c13e55 100644 --- a/src/internal/await-block.js +++ b/src/internal/await-block.js @@ -1,4 +1,4 @@ -import { assign, run_all, isPromise } from './utils.js'; +import { assign, isPromise } from './utils.js'; import { group_outros } from './transitions.js'; import { flush } from '../internal/scheduler.js'; @@ -11,7 +11,7 @@ export function handlePromise(promise, info) { info.resolved = key && { [key]: value }; const child_ctx = assign(assign({}, info.ctx), info.resolved); - const block = type && (info.current = type)(info.component, child_ctx); + const block = type && (info.current = type)(info.$$, child_ctx); if (info.block) { if (info.blocks) { @@ -31,8 +31,6 @@ export function handlePromise(promise, info) { block.c(); block[block.i ? 'i' : 'm'](info.mount(), info.anchor); - // TODO is some of this redundant? - run_all(info.component.$$.after_render); flush(); } diff --git a/test/js/samples/action-custom-event-handler/expected.js b/test/js/samples/action-custom-event-handler/expected.js index afe310bad1..e4a1329c60 100644 --- a/test/js/samples/action-custom-event-handler/expected.js +++ b/test/js/samples/action-custom-event-handler/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, run, safe_not_equal } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var button, foo_action, current; return { diff --git a/test/js/samples/action/expected.js b/test/js/samples/action/expected.js index 5f243de833..f2f66baa2b 100644 --- a/test/js/samples/action/expected.js +++ b/test/js/samples/action/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, createElement, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var a, link_action, current; return { diff --git a/test/js/samples/bind-width-height/expected.js b/test/js/samples/bind-width-height/expected.js index 6b8565e88f..4ca71de2cf 100644 --- a/test/js/samples/bind-width-height/expected.js +++ b/test/js/samples/bind-width-height/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addResizeListener, add_render_callback, createElement, detachNode, flush, init, insert, noop, run, safe_not_equal } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var div, div_resize_listener, current; return { diff --git a/test/js/samples/collapses-text-around-comments/expected.js b/test/js/samples/collapses-text-around-comments/expected.js index 3e4329e88e..26b8dac055 100644 --- a/test/js/samples/collapses-text-around-comments/expected.js +++ b/test/js/samples/collapses-text-around-comments/expected.js @@ -8,7 +8,7 @@ function add_css() { append(document.head, style); } -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var p, text, current; return { diff --git a/test/js/samples/component-static-array/expected.js b/test/js/samples/component-static-array/expected.js index 8fbc4a6b2d..f39cb4c328 100644 --- a/test/js/samples/component-static-array/expected.js +++ b/test/js/samples/component-static-array/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, safe_not_equal } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var current; var nested = new ctx.Nested({ props: { foo: [1, 2, 3] } }); diff --git a/test/js/samples/component-static-immutable/expected.js b/test/js/samples/component-static-immutable/expected.js index 545b857699..a33a09a093 100644 --- a/test/js/samples/component-static-immutable/expected.js +++ b/test/js/samples/component-static-immutable/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, not_equal } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var current; var nested = new ctx.Nested({ props: { foo: "bar" } }); diff --git a/test/js/samples/component-static-immutable2/expected.js b/test/js/samples/component-static-immutable2/expected.js index 545b857699..a33a09a093 100644 --- a/test/js/samples/component-static-immutable2/expected.js +++ b/test/js/samples/component-static-immutable2/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, not_equal } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var current; var nested = new ctx.Nested({ props: { foo: "bar" } }); diff --git a/test/js/samples/component-static/expected.js b/test/js/samples/component-static/expected.js index 1f888cc8f7..df8a0d3274 100644 --- a/test/js/samples/component-static/expected.js +++ b/test/js/samples/component-static/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, safe_not_equal } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var current; var nested = new ctx.Nested({ props: { foo: "bar" } }); diff --git a/test/js/samples/computed-collapsed-if/expected.js b/test/js/samples/computed-collapsed-if/expected.js index 38a567dfbe..39c7f85bc8 100644 --- a/test/js/samples/computed-collapsed-if/expected.js +++ b/test/js/samples/computed-collapsed-if/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, flush, init, noop, run, safe_not_equal } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var current; return { diff --git a/test/js/samples/css-media-query/expected.js b/test/js/samples/css-media-query/expected.js index a556c368a2..f130945c4b 100644 --- a/test/js/samples/css-media-query/expected.js +++ b/test/js/samples/css-media-query/expected.js @@ -8,7 +8,7 @@ function add_css() { append(document.head, style); } -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var div, current; return { diff --git a/test/js/samples/css-shadow-dom-keyframes/expected.js b/test/js/samples/css-shadow-dom-keyframes/expected.js index 267439fba1..bf56378e2d 100644 --- a/test/js/samples/css-shadow-dom-keyframes/expected.js +++ b/test/js/samples/css-shadow-dom-keyframes/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteElement, createElement, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var div, current; return { diff --git a/test/js/samples/debug-empty/expected.js b/test/js/samples/debug-empty/expected.js index 57d88a13b0..16313a1a50 100644 --- a/test/js/samples/debug-empty/expected.js +++ b/test/js/samples/debug-empty/expected.js @@ -3,7 +3,7 @@ import { SvelteComponentDev, addLoc, append, createElement, createText, detachNo const file = undefined; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var h1, text0, text1, text2, text3, current; return { diff --git a/test/js/samples/debug-foo-bar-baz-things/expected.js b/test/js/samples/debug-foo-bar-baz-things/expected.js index 020145f53c..7183e59e83 100644 --- a/test/js/samples/debug-foo-bar-baz-things/expected.js +++ b/test/js/samples/debug-foo-bar-baz-things/expected.js @@ -10,7 +10,7 @@ function get_each_context(ctx, list, i) { } // (1:0) {#each things as thing} -function create_each_block(component, ctx) { +function create_each_block($$, ctx) { var span, text0_value = ctx.thing.name, text0, text1; return { @@ -54,7 +54,7 @@ function create_each_block(component, ctx) { }; } -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var text0, p, text1, text2, current; var each_value = ctx.things; @@ -62,7 +62,7 @@ function create_fragment(component, ctx) { var each_blocks = []; for (var i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block(component, get_each_context(ctx, each_value, i)); + each_blocks[i] = create_each_block($$, get_each_context(ctx, each_value, i)); } return { @@ -104,7 +104,7 @@ function create_fragment(component, ctx) { if (each_blocks[i]) { each_blocks[i].p(changed, child_ctx); } else { - each_blocks[i] = create_each_block(component, child_ctx); + each_blocks[i] = create_each_block($$, child_ctx); each_blocks[i].c(); each_blocks[i].m(text0.parentNode, text0); } diff --git a/test/js/samples/debug-foo/expected.js b/test/js/samples/debug-foo/expected.js index 69fc7d7f04..93fbdc2f21 100644 --- a/test/js/samples/debug-foo/expected.js +++ b/test/js/samples/debug-foo/expected.js @@ -10,7 +10,7 @@ function get_each_context(ctx, list, i) { } // (1:0) {#each things as thing} -function create_each_block(component, ctx) { +function create_each_block($$, ctx) { var span, text0_value = ctx.thing.name, text0, text1; return { @@ -54,7 +54,7 @@ function create_each_block(component, ctx) { }; } -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var text0, p, text1, text2, current; var each_value = ctx.things; @@ -62,7 +62,7 @@ function create_fragment(component, ctx) { var each_blocks = []; for (var i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block(component, get_each_context(ctx, each_value, i)); + each_blocks[i] = create_each_block($$, get_each_context(ctx, each_value, i)); } return { @@ -104,7 +104,7 @@ function create_fragment(component, ctx) { if (each_blocks[i]) { each_blocks[i].p(changed, child_ctx); } else { - each_blocks[i] = create_each_block(component, child_ctx); + each_blocks[i] = create_each_block($$, child_ctx); each_blocks[i].c(); each_blocks[i].m(text0.parentNode, text0); } diff --git a/test/js/samples/deconflict-builtins/expected.js b/test/js/samples/deconflict-builtins/expected.js index b84d84c0ac..3f73d83574 100644 --- a/test/js/samples/deconflict-builtins/expected.js +++ b/test/js/samples/deconflict-builtins/expected.js @@ -8,7 +8,7 @@ function get_each_context(ctx, list, i) { } // (1:0) {#each createElement as node} -function create_each_block(component, ctx) { +function create_each_block($$, ctx) { var span, text_value = ctx.node, text; return { @@ -36,7 +36,7 @@ function create_each_block(component, ctx) { }; } -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var each_anchor, current; var each_value = ctx.createElement; @@ -44,7 +44,7 @@ function create_fragment(component, ctx) { var each_blocks = []; for (var i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block(component, get_each_context(ctx, each_value, i)); + each_blocks[i] = create_each_block($$, get_each_context(ctx, each_value, i)); } return { @@ -75,7 +75,7 @@ function create_fragment(component, ctx) { if (each_blocks[i]) { each_blocks[i].p(changed, child_ctx); } else { - each_blocks[i] = create_each_block(component, child_ctx); + each_blocks[i] = create_each_block($$, child_ctx); each_blocks[i].c(); each_blocks[i].m(each_anchor.parentNode, each_anchor); } diff --git a/test/js/samples/deconflict-globals/expected.js b/test/js/samples/deconflict-globals/expected.js index 8e8dd84b3d..eae53e6ab6 100644 --- a/test/js/samples/deconflict-globals/expected.js +++ b/test/js/samples/deconflict-globals/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, flush, init, noop, run, safe_not_equal } from "svelte/internal"; import { onMount } from "svelte"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var current; return { diff --git a/test/js/samples/dev-warning-missing-data-computed/expected.js b/test/js/samples/dev-warning-missing-data-computed/expected.js index 8bb6894f0b..7f52c96119 100644 --- a/test/js/samples/dev-warning-missing-data-computed/expected.js +++ b/test/js/samples/dev-warning-missing-data-computed/expected.js @@ -3,7 +3,7 @@ import { SvelteComponentDev, addLoc, append, createElement, createText, detachNo const file = undefined; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var p, text0_value = Math.max(0, ctx.foo), text0, text1, text2, current; return { diff --git a/test/js/samples/do-use-dataset/expected.js b/test/js/samples/do-use-dataset/expected.js index f09216c4c3..1cdc176977 100644 --- a/test/js/samples/do-use-dataset/expected.js +++ b/test/js/samples/do-use-dataset/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var div0, text, div1, current; return { diff --git a/test/js/samples/dont-use-dataset-in-legacy/expected.js b/test/js/samples/dont-use-dataset-in-legacy/expected.js index 9229f2fb0d..26fd86b9b6 100644 --- a/test/js/samples/dont-use-dataset-in-legacy/expected.js +++ b/test/js/samples/dont-use-dataset-in-legacy/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setAttribute } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var div0, text, div1, current; return { diff --git a/test/js/samples/dont-use-dataset-in-svg/expected.js b/test/js/samples/dont-use-dataset-in-svg/expected.js index 52ba85c76b..2bb5a1d36b 100644 --- a/test/js/samples/dont-use-dataset-in-svg/expected.js +++ b/test/js/samples/dont-use-dataset-in-svg/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, append, createSvgElement, detachNode, flush, init, insert, run, safe_not_equal, setAttribute } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var svg, g0, g1, current; return { diff --git a/test/js/samples/dynamic-import/expected.js b/test/js/samples/dynamic-import/expected.js index a7cc795de2..d0e36d4936 100644 --- a/test/js/samples/dynamic-import/expected.js +++ b/test/js/samples/dynamic-import/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, identity, init, mount_component, noop, safe_not_equal } from "svelte/internal"; import LazyLoad from "./LazyLoad.html"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var current; var lazyload = new LazyLoad({ props: { load: func } }); diff --git a/test/js/samples/each-block-changed-check/expected.js b/test/js/samples/each-block-changed-check/expected.js index c9c5288cb1..cc59d354d6 100644 --- a/test/js/samples/each-block-changed-check/expected.js +++ b/test/js/samples/each-block-changed-check/expected.js @@ -9,7 +9,7 @@ function get_each_context(ctx, list, i) { } // (1:0) {#each comments as comment, i} -function create_each_block(component, ctx) { +function create_each_block($$, ctx) { var div, strong, text0, text1, span, text2_value = ctx.comment.author, text2, text3, text4_value = ctx.elapsed(ctx.comment.time, ctx.time), text4, text5, text6, raw_value = ctx.comment.html, raw_before; return { @@ -67,7 +67,7 @@ function create_each_block(component, ctx) { }; } -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var text0, p, text1, current; var each_value = ctx.comments; @@ -75,7 +75,7 @@ function create_fragment(component, ctx) { var each_blocks = []; for (var i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block(component, get_each_context(ctx, each_value, i)); + each_blocks[i] = create_each_block($$, get_each_context(ctx, each_value, i)); } return { @@ -110,7 +110,7 @@ function create_fragment(component, ctx) { if (each_blocks[i]) { each_blocks[i].p(changed, child_ctx); } else { - each_blocks[i] = create_each_block(component, child_ctx); + each_blocks[i] = create_each_block($$, child_ctx); each_blocks[i].c(); each_blocks[i].m(text0.parentNode, text0); } diff --git a/test/js/samples/each-block-keyed-animated/expected.js b/test/js/samples/each-block-keyed-animated/expected.js index 66db899b65..874c79c637 100644 --- a/test/js/samples/each-block-keyed-animated/expected.js +++ b/test/js/samples/each-block-keyed-animated/expected.js @@ -8,7 +8,7 @@ function get_each_context(ctx, list, i) { } // (19:0) {#each things as thing (thing.id)} -function create_each_block(component, key_1, ctx) { +function create_each_block($$, key_1, ctx) { var div, text_value = ctx.thing.name, text, rect, stop_animation = noop; return { @@ -55,7 +55,7 @@ function create_each_block(component, key_1, ctx) { }; } -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var each_blocks_1 = [], each_lookup = blankObject(), each_anchor, current; var each_value = ctx.things; @@ -65,7 +65,7 @@ function create_fragment(component, ctx) { for (var i = 0; i < each_value.length; i += 1) { let child_ctx = get_each_context(ctx, each_value, i); let key = get_key(child_ctx); - each_blocks_1[i] = each_lookup[key] = create_each_block(component, key, child_ctx); + each_blocks_1[i] = each_lookup[key] = create_each_block($$, key, child_ctx); } return { @@ -85,7 +85,7 @@ function create_fragment(component, ctx) { p(changed, ctx) { const each_value = ctx.things; for (let i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].r(); - each_blocks_1 = updateKeyedEach(each_blocks_1, component, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, fixAndOutroAndDestroyBlock, create_each_block, "m", each_anchor, get_each_context); + each_blocks_1 = updateKeyedEach(each_blocks_1, $$, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, fixAndOutroAndDestroyBlock, create_each_block, "m", each_anchor, get_each_context); for (let i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].a(); }, diff --git a/test/js/samples/each-block-keyed/expected.js b/test/js/samples/each-block-keyed/expected.js index b90b33fbdd..dc6f2c98e2 100644 --- a/test/js/samples/each-block-keyed/expected.js +++ b/test/js/samples/each-block-keyed/expected.js @@ -8,7 +8,7 @@ function get_each_context(ctx, list, i) { } // (1:0) {#each things as thing (thing.id)} -function create_each_block(component, key_1, ctx) { +function create_each_block($$, key_1, ctx) { var div, text_value = ctx.thing.name, text; return { @@ -41,7 +41,7 @@ function create_each_block(component, key_1, ctx) { }; } -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var each_blocks_1 = [], each_lookup = blankObject(), each_anchor, current; var each_value = ctx.things; @@ -51,7 +51,7 @@ function create_fragment(component, ctx) { for (var i = 0; i < each_value.length; i += 1) { let child_ctx = get_each_context(ctx, each_value, i); let key = get_key(child_ctx); - each_blocks_1[i] = each_lookup[key] = create_each_block(component, key, child_ctx); + each_blocks_1[i] = each_lookup[key] = create_each_block($$, key, child_ctx); } return { @@ -70,7 +70,7 @@ function create_fragment(component, ctx) { p(changed, ctx) { const each_value = ctx.things; - each_blocks_1 = updateKeyedEach(each_blocks_1, component, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, destroyBlock, create_each_block, "m", each_anchor, get_each_context); + each_blocks_1 = updateKeyedEach(each_blocks_1, $$, changed, get_key, 1, ctx, each_value, each_lookup, each_anchor.parentNode, destroyBlock, create_each_block, "m", each_anchor, get_each_context); }, i(target, anchor) { diff --git a/test/js/samples/event-handler-no-passive/expected.js b/test/js/samples/event-handler-no-passive/expected.js index dad32a0875..fea5cf99e2 100644 --- a/test/js/samples/event-handler-no-passive/expected.js +++ b/test/js/samples/event-handler-no-passive/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var a, current, dispose; return { diff --git a/test/js/samples/event-modifiers/expected.js b/test/js/samples/event-modifiers/expected.js index 884a5c04c8..8d334ec04a 100644 --- a/test/js/samples/event-modifiers/expected.js +++ b/test/js/samples/event-modifiers/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, identity, init, insert, noop, preventDefault, run, run_all, safe_not_equal, stopPropagation } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var div, button0, text1, button1, text3, button2, current, dispose; return { diff --git a/test/js/samples/head-no-whitespace/expected.js b/test/js/samples/head-no-whitespace/expected.js index 3208ccd613..58bfa6ee06 100644 --- a/test/js/samples/head-no-whitespace/expected.js +++ b/test/js/samples/head-no-whitespace/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, identity, init, noop, run, safe_not_equal } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var meta0, meta1, current; return { diff --git a/test/js/samples/hoisted-const/expected.js b/test/js/samples/hoisted-const/expected.js index cbf17aa3dc..aa81d991e8 100644 --- a/test/js/samples/hoisted-const/expected.js +++ b/test/js/samples/hoisted-const/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var b, text_value = get_answer(), text, current; return { diff --git a/test/js/samples/if-block-no-update/expected.js b/test/js/samples/if-block-no-update/expected.js index b1cc1693b2..cc01e9791a 100644 --- a/test/js/samples/if-block-no-update/expected.js +++ b/test/js/samples/if-block-no-update/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, createComment, createElement, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; // (3:0) {:else} -function create_else_block(component, ctx) { +function create_else_block($$, ctx) { var p; return { @@ -24,7 +24,7 @@ function create_else_block(component, ctx) { } // (1:0) {#if foo} -function create_if_block(component, ctx) { +function create_if_block($$, ctx) { var p; return { @@ -45,7 +45,7 @@ function create_if_block(component, ctx) { }; } -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var if_block_anchor, current; function select_block_type(ctx) { @@ -54,7 +54,7 @@ function create_fragment(component, ctx) { } var current_block_type = select_block_type(ctx); - var if_block = current_block_type(component, ctx); + var if_block = current_block_type($$, ctx); return { c() { @@ -71,7 +71,7 @@ function create_fragment(component, ctx) { p(changed, ctx) { if (current_block_type !== (current_block_type = select_block_type(ctx))) { if_block.d(1); - if_block = current_block_type(component, ctx); + if_block = current_block_type($$, ctx); if_block.c(); if_block.m(if_block_anchor.parentNode, if_block_anchor); } diff --git a/test/js/samples/if-block-simple/expected.js b/test/js/samples/if-block-simple/expected.js index 08e7ec2866..054ee7219b 100644 --- a/test/js/samples/if-block-simple/expected.js +++ b/test/js/samples/if-block-simple/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, createComment, createElement, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; // (1:0) {#if foo} -function create_if_block(component, ctx) { +function create_if_block($$, ctx) { var p; return { @@ -23,10 +23,10 @@ function create_if_block(component, ctx) { }; } -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var if_block_anchor, current; - var if_block = (ctx.foo) && create_if_block(component, ctx); + var if_block = (ctx.foo) && create_if_block($$, ctx); return { c() { @@ -43,7 +43,7 @@ function create_fragment(component, ctx) { p(changed, ctx) { if (ctx.foo) { if (!if_block) { - if_block = create_if_block(component, ctx); + if_block = create_if_block($$, ctx); if_block.c(); if_block.m(if_block_anchor.parentNode, if_block_anchor); } diff --git a/test/js/samples/inline-style-optimized-multiple/expected.js b/test/js/samples/inline-style-optimized-multiple/expected.js index 92257c8bd1..f4ac24f484 100644 --- a/test/js/samples/inline-style-optimized-multiple/expected.js +++ b/test/js/samples/inline-style-optimized-multiple/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, run, safe_not_equal, setStyle } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var div, current; return { diff --git a/test/js/samples/inline-style-optimized-url/expected.js b/test/js/samples/inline-style-optimized-url/expected.js index 9404253d97..da4f91c1d2 100644 --- a/test/js/samples/inline-style-optimized-url/expected.js +++ b/test/js/samples/inline-style-optimized-url/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, run, safe_not_equal, setStyle } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var div, current; return { diff --git a/test/js/samples/inline-style-optimized/expected.js b/test/js/samples/inline-style-optimized/expected.js index 91a2cff9d1..84056cfd50 100644 --- a/test/js/samples/inline-style-optimized/expected.js +++ b/test/js/samples/inline-style-optimized/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, run, safe_not_equal, setStyle } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var div, current; return { diff --git a/test/js/samples/inline-style-unoptimized/expected.js b/test/js/samples/inline-style-unoptimized/expected.js index 2ca3e54257..1f66ec8766 100644 --- a/test/js/samples/inline-style-unoptimized/expected.js +++ b/test/js/samples/inline-style-unoptimized/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var div0, text, div1, div1_style_value, current; return { diff --git a/test/js/samples/input-files/expected.js b/test/js/samples/input-files/expected.js index 8ca98b3b5b..baab165695 100644 --- a/test/js/samples/input-files/expected.js +++ b/test/js/samples/input-files/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, noop, run, safe_not_equal, setAttribute } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var input, current, dispose; return { diff --git a/test/js/samples/input-range/expected.js b/test/js/samples/input-range/expected.js index 2a93c131c9..1d90cf146c 100644 --- a/test/js/samples/input-range/expected.js +++ b/test/js/samples/input-range/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, run, run_all, safe_not_equal, setAttribute, toNumber } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var input, current, dispose; return { diff --git a/test/js/samples/input-without-blowback-guard/expected.js b/test/js/samples/input-without-blowback-guard/expected.js index fe2791a31c..3c5f57391b 100644 --- a/test/js/samples/input-without-blowback-guard/expected.js +++ b/test/js/samples/input-without-blowback-guard/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, run, safe_not_equal, setAttribute } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var input, current, dispose; return { diff --git a/test/js/samples/instrumentation-script-if-no-block/expected.js b/test/js/samples/instrumentation-script-if-no-block/expected.js index 0d1b0b9780..b8c0cb22e1 100644 --- a/test/js/samples/instrumentation-script-if-no-block/expected.js +++ b/test/js/samples/instrumentation-script-if-no-block/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var button, text1, p, text2, text3, current, dispose; return { diff --git a/test/js/samples/instrumentation-script-x-equals-x/expected.js b/test/js/samples/instrumentation-script-x-equals-x/expected.js index 221088fef5..429bf51fae 100644 --- a/test/js/samples/instrumentation-script-x-equals-x/expected.js +++ b/test/js/samples/instrumentation-script-x-equals-x/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var button, text1, p, text2, text3_value = ctx.things.length, text3, current, dispose; return { diff --git a/test/js/samples/instrumentation-template-if-no-block/expected.js b/test/js/samples/instrumentation-template-if-no-block/expected.js index b1b4a5b8ce..8aba31fc4d 100644 --- a/test/js/samples/instrumentation-template-if-no-block/expected.js +++ b/test/js/samples/instrumentation-template-if-no-block/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var button, text1, p, text2, text3, current, dispose; return { diff --git a/test/js/samples/instrumentation-template-x-equals-x/expected.js b/test/js/samples/instrumentation-template-x-equals-x/expected.js index 8dbcb10263..6136f16432 100644 --- a/test/js/samples/instrumentation-template-x-equals-x/expected.js +++ b/test/js/samples/instrumentation-template-x-equals-x/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addListener, append, createElement, createText, detachNode, init, insert, run, safe_not_equal, setData } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var button, text1, p, text2, text3_value = ctx.things.length, text3, current, dispose; return { diff --git a/test/js/samples/legacy-input-type/expected.js b/test/js/samples/legacy-input-type/expected.js index 94cfc8eab0..de095d7c0a 100644 --- a/test/js/samples/legacy-input-type/expected.js +++ b/test/js/samples/legacy-input-type/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, createElement, detachNode, identity, init, insert, noop, run, safe_not_equal, setInputType } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var input, current; return { diff --git a/test/js/samples/media-bindings/expected.js b/test/js/samples/media-bindings/expected.js index 4b2c70fdb8..645a7d9b0f 100644 --- a/test/js/samples/media-bindings/expected.js +++ b/test/js/samples/media-bindings/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addListener, add_render_callback, createElement, detachNode, flush, init, insert, run, run_all, safe_not_equal, timeRangesToArray } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var audio, audio_updating = false, audio_animationframe, audio_is_paused = true, current, dispose; function audio_timeupdate_handler() { diff --git a/test/js/samples/non-imported-component/expected.js b/test/js/samples/non-imported-component/expected.js index 4ef3582503..32a772b3b5 100644 --- a/test/js/samples/non-imported-component/expected.js +++ b/test/js/samples/non-imported-component/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, callAfter, createText, detachNode, identity, init, insert, mount_component, noop, safe_not_equal } from "svelte/internal"; import Imported from "Imported.html"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var text, current; var imported = new Imported({}); diff --git a/test/js/samples/select-dynamic-value/expected.js b/test/js/samples/select-dynamic-value/expected.js index ed3f1248c1..6788f18fd0 100644 --- a/test/js/samples/select-dynamic-value/expected.js +++ b/test/js/samples/select-dynamic-value/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var select, option0, option1, select_value_value, current; return { diff --git a/test/js/samples/setup-method/expected.js b/test/js/samples/setup-method/expected.js index 18fc6e61ec..257de1d245 100644 --- a/test/js/samples/setup-method/expected.js +++ b/test/js/samples/setup-method/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, identity, init, noop, run, safe_not_equal } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var current; return { diff --git a/test/js/samples/svg-title/expected.js b/test/js/samples/svg-title/expected.js index 8e0cdc866b..ed67789799 100644 --- a/test/js/samples/svg-title/expected.js +++ b/test/js/samples/svg-title/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, append, createSvgElement, createText, detachNode, identity, init, insert, noop, run, safe_not_equal } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var svg, title, text, current; return { diff --git a/test/js/samples/title/expected.js b/test/js/samples/title/expected.js index e92cf04e7d..cfac2c0ad1 100644 --- a/test/js/samples/title/expected.js +++ b/test/js/samples/title/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, flush, init, noop, run, safe_not_equal } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var title_value, current; document.title = title_value = "a " + ctx.custom + " title"; diff --git a/test/js/samples/use-elements-as-anchors/expected.js b/test/js/samples/use-elements-as-anchors/expected.js index 021fbde06d..e6610407e4 100644 --- a/test/js/samples/use-elements-as-anchors/expected.js +++ b/test/js/samples/use-elements-as-anchors/expected.js @@ -2,7 +2,7 @@ import { SvelteComponent as SvelteComponent_1, append, createComment, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal } from "svelte/internal"; // (2:1) {#if a} -function create_if_block_4(component, ctx) { +function create_if_block_4($$, ctx) { var p; return { @@ -24,7 +24,7 @@ function create_if_block_4(component, ctx) { } // (8:1) {#if b} -function create_if_block_3(component, ctx) { +function create_if_block_3($$, ctx) { var p; return { @@ -46,7 +46,7 @@ function create_if_block_3(component, ctx) { } // (12:1) {#if c} -function create_if_block_2(component, ctx) { +function create_if_block_2($$, ctx) { var p; return { @@ -68,7 +68,7 @@ function create_if_block_2(component, ctx) { } // (18:1) {#if d} -function create_if_block_1(component, ctx) { +function create_if_block_1($$, ctx) { var p; return { @@ -90,7 +90,7 @@ function create_if_block_1(component, ctx) { } // (25:0) {#if e} -function create_if_block(component, ctx) { +function create_if_block($$, ctx) { var p; return { @@ -111,18 +111,18 @@ function create_if_block(component, ctx) { }; } -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var div, text0, p0, text2, text3, text4, p1, text6, text7, if_block4_anchor, current; - var if_block0 = (ctx.a) && create_if_block_4(component, ctx); + var if_block0 = (ctx.a) && create_if_block_4($$, ctx); - var if_block1 = (ctx.b) && create_if_block_3(component, ctx); + var if_block1 = (ctx.b) && create_if_block_3($$, ctx); - var if_block2 = (ctx.c) && create_if_block_2(component, ctx); + var if_block2 = (ctx.c) && create_if_block_2($$, ctx); - var if_block3 = (ctx.d) && create_if_block_1(component, ctx); + var if_block3 = (ctx.d) && create_if_block_1($$, ctx); - var if_block4 = (ctx.e) && create_if_block(component, ctx); + var if_block4 = (ctx.e) && create_if_block($$, ctx); return { c() { @@ -167,7 +167,7 @@ function create_fragment(component, ctx) { p(changed, ctx) { if (ctx.a) { if (!if_block0) { - if_block0 = create_if_block_4(component, ctx); + if_block0 = create_if_block_4($$, ctx); if_block0.c(); if_block0.m(div, text0); } @@ -178,7 +178,7 @@ function create_fragment(component, ctx) { if (ctx.b) { if (!if_block1) { - if_block1 = create_if_block_3(component, ctx); + if_block1 = create_if_block_3($$, ctx); if_block1.c(); if_block1.m(div, text3); } @@ -189,7 +189,7 @@ function create_fragment(component, ctx) { if (ctx.c) { if (!if_block2) { - if_block2 = create_if_block_2(component, ctx); + if_block2 = create_if_block_2($$, ctx); if_block2.c(); if_block2.m(div, text4); } @@ -200,7 +200,7 @@ function create_fragment(component, ctx) { if (ctx.d) { if (!if_block3) { - if_block3 = create_if_block_1(component, ctx); + if_block3 = create_if_block_1($$, ctx); if_block3.c(); if_block3.m(div, null); } @@ -211,7 +211,7 @@ function create_fragment(component, ctx) { if (ctx.e) { if (!if_block4) { - if_block4 = create_if_block(component, ctx); + if_block4 = create_if_block($$, ctx); if_block4.c(); if_block4.m(if_block4_anchor.parentNode, if_block4_anchor); } diff --git a/test/js/samples/window-binding-scroll/expected.js b/test/js/samples/window-binding-scroll/expected.js index a539b38dc2..0fded5c925 100644 --- a/test/js/samples/window-binding-scroll/expected.js +++ b/test/js/samples/window-binding-scroll/expected.js @@ -1,7 +1,7 @@ /* generated by Svelte vX.Y.Z */ import { SvelteComponent as SvelteComponent_1, addListener, add_render_callback, append, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal"; -function create_fragment(component, ctx) { +function create_fragment($$, ctx) { var scrolling = false, clear_scrolling = () => { scrolling = false }, scrolling_timeout, p, text0, text1, current, dispose; add_render_callback(ctx.onwindowscroll);