diff --git a/src/compile/dom/Block.ts b/src/compile/dom/Block.ts index ca3984b5d729..f65fe79f36cb 100644 --- a/src/compile/dom/Block.ts +++ b/src/compile/dom/Block.ts @@ -241,7 +241,7 @@ export default class Block { properties.addBlock(`m: @noop,`); } else { properties.addBlock(deindent` - ${dev ? 'm: function mount' : 'm'}(#target, anchor) { + ${dev ? 'm: function mount' : 'm'}(#target, anchor${this.compiler.options.nestedTransitions && ', introing'}) { ${this.builders.mount} }, `); @@ -281,10 +281,10 @@ export default class Block { properties.addBlock(`i: @noop,`); } else { properties.addBlock(deindent` - ${dev ? 'i: function intro' : 'i'}(#target, anchor) { + ${dev ? 'i: function intro' : 'i'}(#target, anchor${this.compiler.options.nestedTransitions && ', introing'}) { if (#current) return; ${this.builders.intro} - this.m(#target, anchor); + this.m(#target, anchor${this.compiler.options.nestedTransitions && ', introing'}); }, `); } @@ -293,7 +293,7 @@ export default class Block { properties.addBlock(`o: @run,`); } else { properties.addBlock(deindent` - ${dev ? 'o: function outro' : 'o'}(#outrocallback) { + ${dev ? 'o: function outro' : 'o'}(#outrocallback${this.compiler.options.nestedTransitions && ', outroing'}) { if (!#current) return; ${this.outros > 1 && `#outrocallback = @callAfter(#outrocallback, ${this.outros});`} diff --git a/src/compile/dom/index.ts b/src/compile/dom/index.ts index 3ced0254a24a..49012ab861c6 100644 --- a/src/compile/dom/index.ts +++ b/src/compile/dom/index.ts @@ -227,7 +227,7 @@ export default function dom( this._fragment.c(); this._fragment.${block.hasIntroMethod ? 'i' : 'm'}(this.shadowRoot, null); - if (options.target) this._mount(options.target, options.anchor); + if (options.target) this._mount(options.target, options.anchor${compiler.options.nestedTransitions && ', 1'}); ` : deindent` if (options.target) { ${compiler.options.hydratable @@ -239,7 +239,7 @@ export default function dom( ${options.dev && `if (options.hydrate) throw new Error("options.hydrate only works if the component was compiled with the \`hydratable: true\` option");`} this._fragment.c();`} - this._mount(options.target, options.anchor); + this._mount(options.target, options.anchor${compiler.options.nestedTransitions && ', 1'}); ${(compiler.hasComponents || target.hasComplexBindings || hasInitHooks || target.hasIntroTransitions) && `@flush(this);`} diff --git a/src/compile/nodes/AwaitBlock.ts b/src/compile/nodes/AwaitBlock.ts index 4897adcd59b7..7effc9c3ff1f 100644 --- a/src/compile/nodes/AwaitBlock.ts +++ b/src/compile/nodes/AwaitBlock.ts @@ -177,7 +177,7 @@ export default class AwaitBlock extends Node { const ${countdown} = @callAfter(#outrocallback, 3); for (let #i = 0; #i < 3; #i += 1) { const block = ${info}.blocks[#i]; - if (block) block.o(${countdown}); + if (block) block.o(${countdown}, 1); else ${countdown}(); } `); diff --git a/src/compile/nodes/Component.ts b/src/compile/nodes/Component.ts index 526af029c8f2..de0f3f16b6e8 100644 --- a/src/compile/nodes/Component.ts +++ b/src/compile/nodes/Component.ts @@ -386,7 +386,7 @@ export default class Component extends Node { block.builders.mount.addBlock(deindent` if (${name}) { - ${name}._mount(${parentNode || '#target'}, ${parentNode ? 'null' : 'anchor'}); + ${name}._mount(${parentNode || '#target'}, ${parentNode ? 'null' : 'anchor'}${compiler.options.nestedTransitions && ', introing'}); ${this.ref && `#component.refs.${this.ref} = ${name};`} } `); @@ -486,7 +486,7 @@ export default class Component extends Node { } block.builders.mount.addLine( - `${name}._mount(${parentNode || '#target'}, ${parentNode ? 'null' : 'anchor'});` + `${name}._mount(${parentNode || '#target'}, ${parentNode ? 'null' : 'anchor'}${compiler.options.nestedTransitions ? ', introing' : ''});` ); if (updates.length) { @@ -505,7 +505,7 @@ export default class Component extends Node { if (this.compiler.options.nestedTransitions) { block.builders.outro.addLine( - `if (${name}) ${name}._fragment.o(#outrocallback);` + `if (${name}) ${name}._fragment.o(#outrocallback, outroing);` ); } } diff --git a/src/compile/nodes/EachBlock.ts b/src/compile/nodes/EachBlock.ts index 2a62249c6326..c941638d233c 100644 --- a/src/compile/nodes/EachBlock.ts +++ b/src/compile/nodes/EachBlock.ts @@ -203,7 +203,7 @@ export default class EachBlock extends Node { block.builders.mount.addBlock(deindent` if (${each_block_else}) { - ${each_block_else}.${mountOrIntro}(${parentNode || '#target'}, null); + ${each_block_else}.${mountOrIntro}(${parentNode || '#target'}, null${this.compiler.options.nestedTransitions && ', 1'}); } `); @@ -310,12 +310,11 @@ export default class EachBlock extends Node { } block.builders.mount.addBlock(deindent` - for (#i = 0; #i < ${blocks}.length; #i += 1) ${blocks}[#i].${mountOrIntro}(${initialMountNode}, ${anchorNode}); + for (#i = 0; #i < ${blocks}.length; #i += 1) ${blocks}[#i].${mountOrIntro}(${initialMountNode}, ${anchorNode}${this.compiler.options.nestedTransitions ? ', 1' : ''}); `); const dynamic = this.block.hasUpdateMethod; - const rects = block.getUniqueName('rects'); const destroy = this.block.hasAnimation ? `@fixAndOutroAndDestroyBlock` : this.block.hasOutros @@ -335,7 +334,7 @@ export default class EachBlock extends Node { const countdown = block.getUniqueName('countdown'); block.builders.outro.addBlock(deindent` const ${countdown} = @callAfter(#outrocallback, ${blocks}.length); - for (#i = 0; #i < ${blocks}.length; #i += 1) ${blocks}[#i].o(${countdown}); + for (#i = 0; #i < ${blocks}.length; #i += 1) ${blocks}[#i].o(${countdown}, 1); `); } @@ -385,7 +384,7 @@ export default class EachBlock extends Node { block.builders.mount.addBlock(deindent` for (var #i = 0; #i < ${iterations}.length; #i += 1) { - ${iterations}[#i].${mountOrIntro}(${initialMountNode}, ${anchorNode}); + ${iterations}[#i].${mountOrIntro}(${initialMountNode}, ${anchorNode}${this.compiler.options.nestedTransitions && ', 1'}); } `); @@ -397,8 +396,9 @@ export default class EachBlock extends Node { const outroBlock = this.block.hasOutros && block.getUniqueName('outroBlock') if (outroBlock) { + const outroArg = this.compiler.options.nestedTransitions ? ', outroing' : ''; block.builders.init.addBlock(deindent` - function ${outroBlock}(i, detach, fn) { + function ${outroBlock}(i, detach, fn${outroArg}) { if (${iterations}[i]) { ${iterations}[i].o(() => { if (detach) { @@ -406,7 +406,7 @@ export default class EachBlock extends Node { ${iterations}[i] = null; } if (fn) fn(); - }); + }${outroArg}); } } `); @@ -451,7 +451,7 @@ export default class EachBlock extends Node { if (this.block.hasOutros) { destroy = deindent` @groupOutros(); - for (; #i < ${iterations}.length; #i += 1) ${outroBlock}(#i, 1); + for (; #i < ${iterations}.length; #i += 1) ${outroBlock}(#i, 1${this.compiler.options.nestedTransitions && ', null, 1'}); `; } else { destroy = deindent` @@ -482,7 +482,7 @@ export default class EachBlock extends Node { block.builders.outro.addBlock(deindent` ${iterations} = ${iterations}.filter(Boolean); const ${countdown} = @callAfter(#outrocallback, ${iterations}.length); - for (let #i = 0; #i < ${iterations}.length; #i += 1) ${outroBlock}(#i, 0, ${countdown});` + for (let #i = 0; #i < ${iterations}.length; #i += 1) ${outroBlock}(#i, 0, ${countdown}${this.compiler.options.nestedTransitions && ', 1'});` ); } diff --git a/src/compile/nodes/Element.ts b/src/compile/nodes/Element.ts index a3040b81c241..86e72110eb8e 100644 --- a/src/compile/nodes/Element.ts +++ b/src/compile/nodes/Element.ts @@ -745,8 +745,11 @@ export default class Element extends Node { const { intro, outro } = this; if (!intro && !outro) return; + const nested = this.compiler.options.nestedTransitions; if (intro === outro) { + const [transitionName, ...pipes] = intro.name.split('|'); + const local = ~pipes.indexOf('local') && 1; const name = block.getUniqueName(`${this.var}_transition`); const snippet = intro.expression ? intro.expression.snippet @@ -754,23 +757,23 @@ export default class Element extends Node { block.addVariable(name); - const fn = `%transitions-${intro.name}`; + const fn = `%transitions-${transitionName}`; block.builders.intro.addConditional(`#component.root._intro`, deindent` if (${name}) ${name}.invalidate(); #component.root._aftercreate.push(() => { - if (!${name}) ${name} = @wrapTransition(#component, ${this.var}, ${fn}, ${snippet}, true); - ${name}.run(1); + if (!${name}) ${name} = @wrapTransition(#component, ${this.var}, ${fn}, ${snippet}, 1${nested && `, ${local}`}); + ${name}.run(1${nested && ', null, introing'}); }); `); block.builders.outro.addBlock(deindent` - if (!${name}) ${name} = @wrapTransition(#component, ${this.var}, ${fn}, ${snippet}, false); + if (!${name}) ${name} = @wrapTransition(#component, ${this.var}, ${fn}, ${snippet}, 0${nested && `, ${local}`}); ${name}.run(0, () => { #outrocallback(); ${name} = null; - }); + }${nested && ', outroing'}); `); block.builders.destroy.addConditional('detach', `if (${name}) ${name}.abort();`); @@ -780,11 +783,13 @@ export default class Element extends Node { if (intro) { block.addVariable(introName); + const [transitionName, ...pipes] = intro.name.split('|'); + const local = ~pipes.indexOf('local') && 1; const snippet = intro.expression ? intro.expression.snippet : '{}'; - const fn = `%transitions-${intro.name}`; // TODO add built-in transitions? + const fn = `%transitions-${transitionName}`; // TODO add built-in transitions? if (outro) { block.builders.intro.addBlock(deindent` @@ -795,19 +800,21 @@ export default class Element extends Node { block.builders.intro.addConditional(`#component.root._intro`, deindent` #component.root._aftercreate.push(() => { - ${introName} = @wrapTransition(#component, ${this.var}, ${fn}, ${snippet}, true); - ${introName}.run(1); + ${introName} = @wrapTransition(#component, ${this.var}, ${fn}, ${snippet}, 1${nested && `, ${local}`}); + ${introName}.run(1${nested && ', null, introing'}); }); `); } if (outro) { block.addVariable(outroName); + const [transitionName, ...pipes] = outro.name.split('|'); + const local = ~pipes.indexOf('local') && 1; const snippet = outro.expression ? outro.expression.snippet : '{}'; - const fn = `%transitions-${outro.name}`; + const fn = `%transitions-${transitionName}`; block.builders.intro.addBlock(deindent` if (${outroName}) ${outroName}.abort(1); @@ -816,8 +823,8 @@ export default class Element extends Node { // TODO hide elements that have outro'd (unless they belong to a still-outroing // group) prior to their removal from the DOM block.builders.outro.addBlock(deindent` - ${outroName} = @wrapTransition(#component, ${this.var}, ${fn}, ${snippet}, false); - ${outroName}.run(0, #outrocallback); + ${outroName} = @wrapTransition(#component, ${this.var}, ${fn}, ${snippet}, 0${nested && `, ${local}`}); + ${outroName}.run(0, #outrocallback${nested && ', outroing'}); `); block.builders.destroy.addConditional('detach', `if (${outroName}) ${outroName}.abort();`); diff --git a/src/compile/nodes/IfBlock.ts b/src/compile/nodes/IfBlock.ts index eef654b90bbb..f1255256a933 100644 --- a/src/compile/nodes/IfBlock.ts +++ b/src/compile/nodes/IfBlock.ts @@ -140,7 +140,7 @@ export default class IfBlock extends Node { if (this.compiler.options.nestedTransitions) { block.builders.outro.addBlock(deindent` - if (${name}) ${name}.o(#outrocallback); + if (${name}) ${name}.o(#outrocallback, 1); else #outrocallback(); `); } @@ -152,7 +152,7 @@ export default class IfBlock extends Node { if (hasOutros && this.compiler.options.nestedTransitions) { block.builders.outro.addBlock(deindent` - if (${name}) ${name}.o(#outrocallback); + if (${name}) ${name}.o(#outrocallback, 1); else #outrocallback(); `); } @@ -206,7 +206,7 @@ export default class IfBlock extends Node { const initialMountNode = parentNode || '#target'; const anchorNode = parentNode ? 'null' : 'anchor'; block.builders.mount.addLine( - `${if_name}${name}.${mountOrIntro}(${initialMountNode}, ${anchorNode});` + `${if_name}${name}.${mountOrIntro}(${initialMountNode}, ${anchorNode}${this.compiler.options.nestedTransitions ? ', 1' : ''});` ); const updateMountNode = this.getUpdateMountNode(anchor); @@ -292,7 +292,7 @@ export default class IfBlock extends Node { const anchorNode = parentNode ? 'null' : 'anchor'; block.builders.mount.addLine( - `${if_current_block_type_index}${if_blocks}[${current_block_type_index}].${mountOrIntro}(${initialMountNode}, ${anchorNode});` + `${if_current_block_type_index}${if_blocks}[${current_block_type_index}].${mountOrIntro}(${initialMountNode}, ${anchorNode}${this.compiler.options.nestedTransitions ? ', 1' : ''});` ); const updateMountNode = this.getUpdateMountNode(anchor); @@ -374,7 +374,7 @@ export default class IfBlock extends Node { const anchorNode = parentNode ? 'null' : 'anchor'; block.builders.mount.addLine( - `if (${name}) ${name}.${mountOrIntro}(${initialMountNode}, ${anchorNode});` + `if (${name}) ${name}.${mountOrIntro}(${initialMountNode}, ${anchorNode}${this.compiler.options.nestedTransitions ? ', 1' : ''});` ); const updateMountNode = this.getUpdateMountNode(anchor); diff --git a/src/shared/index.js b/src/shared/index.js index 066942f1a627..41cf86071966 100644 --- a/src/shared/index.js +++ b/src/shared/index.js @@ -147,8 +147,8 @@ export function callAll(fns) { while (fns && fns.length) fns.shift()(); } -export function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +export function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } export var PENDING = {}; diff --git a/src/shared/transitions.js b/src/shared/transitions.js index 8dfa50b8ffba..0020f2b1ccb9 100644 --- a/src/shared/transitions.js +++ b/src/shared/transitions.js @@ -26,7 +26,7 @@ export function hash(str) { return hash >>> 0; } -export function wrapTransition(component, node, fn, params, intro) { +export function wrapTransition(component, node, fn, params, intro, local) { let obj = fn.call(component, node, params); let duration; let ease; @@ -40,28 +40,34 @@ export function wrapTransition(component, node, fn, params, intro) { program: null, pending: null, - run(b, callback) { + run(b, callback, introOutro) { if (typeof obj === 'function') { transitionManager.wait().then(() => { obj = obj(); - this._run(b, callback); + this._run(b, callback, introOutro); }); } else { - this._run(b, callback); + this._run(b, callback, introOutro); } }, - _run(b, callback) { + _run(b, callback, introOutro) { duration = obj.duration || 300; ease = obj.easing || linear; + if (introOutro && local) { + this.t = b; + if (callback) callback(); + return; + } + const program = { start: window.performance.now() + (obj.delay || 0), b, callback: callback || noop }; - if (intro && !initialised) { + if (b && !initialised) { if (obj.css && obj.delay) { cssText = node.style.cssText; node.style.cssText += obj.css(0, 1); diff --git a/src/validate/html/validateElement.ts b/src/validate/html/validateElement.ts index 3d2d96f380b5..6264c9996304 100644 --- a/src/validate/html/validateElement.ts +++ b/src/validate/html/validateElement.ts @@ -85,11 +85,11 @@ export default function validateElement( if (attribute.type === 'Ref') { if (!isValidIdentifier(attribute.name)) { const suggestion = attribute.name.replace(/[^_$a-z0-9]/ig, '_').replace(/^\d/, '_$&'); - + validator.error(attribute, { code: `invalid-reference-name`, message: `Reference name '${attribute.name}' is invalid — must be a valid identifier such as ${suggestion}` - }); + }); } else { if (!refs.has(attribute.name)) refs.set(attribute.name, []); refs.get(attribute.name).push(node); @@ -213,7 +213,7 @@ export default function validateElement( validator.used.events.add(attribute.name); validateEventHandler(validator, attribute, refCallees); } else if (attribute.type === 'Transition') { - validator.used.transitions.add(attribute.name); + validator.used.transitions.add(attribute.name.split('|')[0]); const bidi = attribute.intro && attribute.outro; @@ -249,7 +249,7 @@ export default function validateElement( if (attribute.outro) hasOutro = true; if (bidi) hasTransition = true; - if (!validator.transitions.has(attribute.name)) { + if (!validator.transitions.has(attribute.name.split('|')[0])) { validator.error(attribute, { code: `missing-transition`, message: `Missing transition '${attribute.name}'` diff --git a/test/cli/samples/amd/expected/Main.js b/test/cli/samples/amd/expected/Main.js index 5f236d668fe5..3832147408fd 100644 --- a/test/cli/samples/amd/expected/Main.js +++ b/test/cli/samples/amd/expected/Main.js @@ -165,8 +165,8 @@ define("test", function() { "use strict"; assign(this._staged, newState); } - function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); + function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } function _differs(a, b) { diff --git a/test/cli/samples/basic/expected/Main.js b/test/cli/samples/basic/expected/Main.js index ba35a0c1e911..e3d4768f656c 100644 --- a/test/cli/samples/basic/expected/Main.js +++ b/test/cli/samples/basic/expected/Main.js @@ -165,8 +165,8 @@ function _stage(newState) { assign(this._staged, newState); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } function _differs(a, b) { diff --git a/test/cli/samples/custom-element/expected/Main.js b/test/cli/samples/custom-element/expected/Main.js index 40865a2c81cd..fcd458a73244 100644 --- a/test/cli/samples/custom-element/expected/Main.js +++ b/test/cli/samples/custom-element/expected/Main.js @@ -186,8 +186,8 @@ function _stage(newState) { assign(this._staged, newState); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } function _differs(a, b) { diff --git a/test/cli/samples/dev/expected/Main.js b/test/cli/samples/dev/expected/Main.js index bf46dffdd00c..d558fc8aac3f 100644 --- a/test/cli/samples/dev/expected/Main.js +++ b/test/cli/samples/dev/expected/Main.js @@ -191,8 +191,8 @@ function _stage(newState) { assign(this._staged, newState); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } function _differs(a, b) { diff --git a/test/cli/samples/dir-sourcemap/expected/Main.js b/test/cli/samples/dir-sourcemap/expected/Main.js index 0c0fab609439..4c6e1441f0e5 100644 --- a/test/cli/samples/dir-sourcemap/expected/Main.js +++ b/test/cli/samples/dir-sourcemap/expected/Main.js @@ -167,8 +167,8 @@ function _stage(newState) { assign(this._staged, newState); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } function _differs(a, b) { diff --git a/test/cli/samples/dir-sourcemap/expected/Widget.js b/test/cli/samples/dir-sourcemap/expected/Widget.js index b6019a73fda5..5cdc4cc1baa3 100644 --- a/test/cli/samples/dir-sourcemap/expected/Widget.js +++ b/test/cli/samples/dir-sourcemap/expected/Widget.js @@ -165,8 +165,8 @@ function _stage(newState) { assign(this._staged, newState); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } function _differs(a, b) { diff --git a/test/cli/samples/dir-subdir/expected/Main.js b/test/cli/samples/dir-subdir/expected/Main.js index 2778c8c868d6..3468e505f99d 100644 --- a/test/cli/samples/dir-subdir/expected/Main.js +++ b/test/cli/samples/dir-subdir/expected/Main.js @@ -167,8 +167,8 @@ function _stage(newState) { assign(this._staged, newState); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } function _differs(a, b) { diff --git a/test/cli/samples/dir-subdir/expected/widget/Widget.js b/test/cli/samples/dir-subdir/expected/widget/Widget.js index 9282b7ddb4a5..630c96b29464 100644 --- a/test/cli/samples/dir-subdir/expected/widget/Widget.js +++ b/test/cli/samples/dir-subdir/expected/widget/Widget.js @@ -165,8 +165,8 @@ function _stage(newState) { assign(this._staged, newState); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } function _differs(a, b) { diff --git a/test/cli/samples/dir/expected/Main.js b/test/cli/samples/dir/expected/Main.js index bbc005da767d..84bc5bd1c89e 100644 --- a/test/cli/samples/dir/expected/Main.js +++ b/test/cli/samples/dir/expected/Main.js @@ -167,8 +167,8 @@ function _stage(newState) { assign(this._staged, newState); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } function _differs(a, b) { diff --git a/test/cli/samples/dir/expected/Widget.js b/test/cli/samples/dir/expected/Widget.js index c5981a4c536e..8c475c99f656 100644 --- a/test/cli/samples/dir/expected/Widget.js +++ b/test/cli/samples/dir/expected/Widget.js @@ -165,8 +165,8 @@ function _stage(newState) { assign(this._staged, newState); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } function _differs(a, b) { diff --git a/test/cli/samples/globals/expected/Main.js b/test/cli/samples/globals/expected/Main.js index 885d7da4bc1f..3d9fc102d064 100644 --- a/test/cli/samples/globals/expected/Main.js +++ b/test/cli/samples/globals/expected/Main.js @@ -190,8 +190,8 @@ var Main = (function(answer) { "use strict"; assign(this._staged, newState); } - function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); + function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } function _differs(a, b) { diff --git a/test/cli/samples/sourcemap-inline/expected/Main.js b/test/cli/samples/sourcemap-inline/expected/Main.js index 668ff8b1bfe5..d0632e182e4c 100644 --- a/test/cli/samples/sourcemap-inline/expected/Main.js +++ b/test/cli/samples/sourcemap-inline/expected/Main.js @@ -165,8 +165,8 @@ function _stage(newState) { assign(this._staged, newState); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } function _differs(a, b) { diff --git a/test/cli/samples/sourcemap/expected/Main.js b/test/cli/samples/sourcemap/expected/Main.js index 95e67187155c..a9669dfa7f3d 100644 --- a/test/cli/samples/sourcemap/expected/Main.js +++ b/test/cli/samples/sourcemap/expected/Main.js @@ -165,8 +165,8 @@ function _stage(newState) { assign(this._staged, newState); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } function _differs(a, b) { diff --git a/test/cli/samples/store/expected/Main.js b/test/cli/samples/store/expected/Main.js index 03f4eb521d1e..4ceaa0fc1ab3 100644 --- a/test/cli/samples/store/expected/Main.js +++ b/test/cli/samples/store/expected/Main.js @@ -189,8 +189,8 @@ function _stage(newState) { assign(this._staged, newState); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } function _differs(a, b) { diff --git a/test/js/samples/action/expected-bundle.js b/test/js/samples/action/expected-bundle.js index 62c04649ec79..ac1aef0365e2 100644 --- a/test/js/samples/action/expected-bundle.js +++ b/test/js/samples/action/expected-bundle.js @@ -133,8 +133,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/bind-width-height/expected-bundle.js b/test/js/samples/bind-width-height/expected-bundle.js index a4c740e120b5..6f34baae7448 100644 --- a/test/js/samples/bind-width-height/expected-bundle.js +++ b/test/js/samples/bind-width-height/expected-bundle.js @@ -165,8 +165,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/collapses-text-around-comments/expected-bundle.js b/test/js/samples/collapses-text-around-comments/expected-bundle.js index 3f0faa13fc54..5e6cd67b8650 100644 --- a/test/js/samples/collapses-text-around-comments/expected-bundle.js +++ b/test/js/samples/collapses-text-around-comments/expected-bundle.js @@ -145,8 +145,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/component-static-array/expected-bundle.js b/test/js/samples/component-static-array/expected-bundle.js index c2f94398c08b..87fa1c0c2ffb 100644 --- a/test/js/samples/component-static-array/expected-bundle.js +++ b/test/js/samples/component-static-array/expected-bundle.js @@ -121,8 +121,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/component-static-immutable/expected-bundle.js b/test/js/samples/component-static-immutable/expected-bundle.js index ac9ae4d3f6c9..e76640599b35 100644 --- a/test/js/samples/component-static-immutable/expected-bundle.js +++ b/test/js/samples/component-static-immutable/expected-bundle.js @@ -125,8 +125,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/component-static-immutable2/expected-bundle.js b/test/js/samples/component-static-immutable2/expected-bundle.js index ac9ae4d3f6c9..e76640599b35 100644 --- a/test/js/samples/component-static-immutable2/expected-bundle.js +++ b/test/js/samples/component-static-immutable2/expected-bundle.js @@ -125,8 +125,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/component-static/expected-bundle.js b/test/js/samples/component-static/expected-bundle.js index c839759ecf90..d2980734e9e5 100644 --- a/test/js/samples/component-static/expected-bundle.js +++ b/test/js/samples/component-static/expected-bundle.js @@ -121,8 +121,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/computed-collapsed-if/expected-bundle.js b/test/js/samples/computed-collapsed-if/expected-bundle.js index c00e61971d8f..61ffbede2457 100644 --- a/test/js/samples/computed-collapsed-if/expected-bundle.js +++ b/test/js/samples/computed-collapsed-if/expected-bundle.js @@ -121,8 +121,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/css-media-query/expected-bundle.js b/test/js/samples/css-media-query/expected-bundle.js index 80d50457d967..ee22e2a64cdd 100644 --- a/test/js/samples/css-media-query/expected-bundle.js +++ b/test/js/samples/css-media-query/expected-bundle.js @@ -137,8 +137,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/css-shadow-dom-keyframes/expected-bundle.js b/test/js/samples/css-shadow-dom-keyframes/expected-bundle.js index fb563a9db561..0500aa35f6ee 100644 --- a/test/js/samples/css-shadow-dom-keyframes/expected-bundle.js +++ b/test/js/samples/css-shadow-dom-keyframes/expected-bundle.js @@ -133,8 +133,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/debug-empty/expected-bundle.js b/test/js/samples/debug-empty/expected-bundle.js index a9f380840ff0..fa3130a8a6b2 100644 --- a/test/js/samples/debug-empty/expected-bundle.js +++ b/test/js/samples/debug-empty/expected-bundle.js @@ -169,8 +169,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var protoDev = { diff --git a/test/js/samples/debug-foo-bar-baz-things/expected-bundle.js b/test/js/samples/debug-foo-bar-baz-things/expected-bundle.js index 8965e0ef1b5e..6c53ff74b292 100644 --- a/test/js/samples/debug-foo-bar-baz-things/expected-bundle.js +++ b/test/js/samples/debug-foo-bar-baz-things/expected-bundle.js @@ -175,8 +175,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var protoDev = { diff --git a/test/js/samples/debug-foo/expected-bundle.js b/test/js/samples/debug-foo/expected-bundle.js index 4b41d50d16b1..c3da12d49604 100644 --- a/test/js/samples/debug-foo/expected-bundle.js +++ b/test/js/samples/debug-foo/expected-bundle.js @@ -175,8 +175,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var protoDev = { diff --git a/test/js/samples/deconflict-builtins/expected-bundle.js b/test/js/samples/deconflict-builtins/expected-bundle.js index a82fb4ecf72e..975948903581 100644 --- a/test/js/samples/deconflict-builtins/expected-bundle.js +++ b/test/js/samples/deconflict-builtins/expected-bundle.js @@ -155,8 +155,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/deconflict-globals/expected-bundle.js b/test/js/samples/deconflict-globals/expected-bundle.js index 46d2f7bbf804..367ba4ebbe1c 100644 --- a/test/js/samples/deconflict-globals/expected-bundle.js +++ b/test/js/samples/deconflict-globals/expected-bundle.js @@ -126,8 +126,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/dev-warning-missing-data-computed/expected-bundle.js b/test/js/samples/dev-warning-missing-data-computed/expected-bundle.js index 2771b3228d3c..ebb73116411e 100644 --- a/test/js/samples/dev-warning-missing-data-computed/expected-bundle.js +++ b/test/js/samples/dev-warning-missing-data-computed/expected-bundle.js @@ -169,8 +169,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var protoDev = { diff --git a/test/js/samples/do-use-dataset/expected-bundle.js b/test/js/samples/do-use-dataset/expected-bundle.js index ed3983ea6851..a3bcdf5a1c58 100644 --- a/test/js/samples/do-use-dataset/expected-bundle.js +++ b/test/js/samples/do-use-dataset/expected-bundle.js @@ -137,8 +137,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/dont-use-dataset-in-legacy/expected-bundle.js b/test/js/samples/dont-use-dataset-in-legacy/expected-bundle.js index 5a011bbca1cc..364250589bf8 100644 --- a/test/js/samples/dont-use-dataset-in-legacy/expected-bundle.js +++ b/test/js/samples/dont-use-dataset-in-legacy/expected-bundle.js @@ -141,8 +141,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/dont-use-dataset-in-svg/expected-bundle.js b/test/js/samples/dont-use-dataset-in-svg/expected-bundle.js index 09f6cd44979e..3bc26fa745df 100644 --- a/test/js/samples/dont-use-dataset-in-svg/expected-bundle.js +++ b/test/js/samples/dont-use-dataset-in-svg/expected-bundle.js @@ -141,8 +141,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/dynamic-import/expected-bundle.js b/test/js/samples/dynamic-import/expected-bundle.js index 7283c2cf17fd..1e5fadbce822 100644 --- a/test/js/samples/dynamic-import/expected-bundle.js +++ b/test/js/samples/dynamic-import/expected-bundle.js @@ -121,8 +121,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/each-block-changed-check/expected-bundle.js b/test/js/samples/each-block-changed-check/expected-bundle.js index faa49a664dce..76c9db7bd171 100644 --- a/test/js/samples/each-block-changed-check/expected-bundle.js +++ b/test/js/samples/each-block-changed-check/expected-bundle.js @@ -157,8 +157,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/each-block-keyed-animated/expected-bundle.js b/test/js/samples/each-block-keyed-animated/expected-bundle.js index a7f5e2280099..cbdf5955d7a1 100644 --- a/test/js/samples/each-block-keyed-animated/expected-bundle.js +++ b/test/js/samples/each-block-keyed-animated/expected-bundle.js @@ -460,8 +460,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/each-block-keyed/expected-bundle.js b/test/js/samples/each-block-keyed/expected-bundle.js index 3643c1c0598c..a326b851aabb 100644 --- a/test/js/samples/each-block-keyed/expected-bundle.js +++ b/test/js/samples/each-block-keyed/expected-bundle.js @@ -240,8 +240,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/event-handlers-custom/expected-bundle.js b/test/js/samples/event-handlers-custom/expected-bundle.js index ea4b3232712d..0dc91184d8bf 100644 --- a/test/js/samples/event-handlers-custom/expected-bundle.js +++ b/test/js/samples/event-handlers-custom/expected-bundle.js @@ -133,8 +133,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/head-no-whitespace/expected-bundle.js b/test/js/samples/head-no-whitespace/expected-bundle.js index 1a1b975edc65..ec9368122cc2 100644 --- a/test/js/samples/head-no-whitespace/expected-bundle.js +++ b/test/js/samples/head-no-whitespace/expected-bundle.js @@ -133,8 +133,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/if-block-no-update/expected-bundle.js b/test/js/samples/if-block-no-update/expected-bundle.js index 6687f56cc386..a22598742f0c 100644 --- a/test/js/samples/if-block-no-update/expected-bundle.js +++ b/test/js/samples/if-block-no-update/expected-bundle.js @@ -137,8 +137,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/if-block-simple/expected-bundle.js b/test/js/samples/if-block-simple/expected-bundle.js index 2ed0f73584a0..8303b52a5339 100644 --- a/test/js/samples/if-block-simple/expected-bundle.js +++ b/test/js/samples/if-block-simple/expected-bundle.js @@ -137,8 +137,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/inline-style-optimized-multiple/expected-bundle.js b/test/js/samples/inline-style-optimized-multiple/expected-bundle.js index e6ea18a957ce..9ecaad9e0c63 100644 --- a/test/js/samples/inline-style-optimized-multiple/expected-bundle.js +++ b/test/js/samples/inline-style-optimized-multiple/expected-bundle.js @@ -137,8 +137,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/inline-style-optimized-url/expected-bundle.js b/test/js/samples/inline-style-optimized-url/expected-bundle.js index 472c72db8adc..6b996880b3c2 100644 --- a/test/js/samples/inline-style-optimized-url/expected-bundle.js +++ b/test/js/samples/inline-style-optimized-url/expected-bundle.js @@ -137,8 +137,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/inline-style-optimized/expected-bundle.js b/test/js/samples/inline-style-optimized/expected-bundle.js index 40425bcc01e7..8ec022db9ae9 100644 --- a/test/js/samples/inline-style-optimized/expected-bundle.js +++ b/test/js/samples/inline-style-optimized/expected-bundle.js @@ -137,8 +137,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/inline-style-unoptimized/expected-bundle.js b/test/js/samples/inline-style-unoptimized/expected-bundle.js index ff6bfc070542..0523a5f934c4 100644 --- a/test/js/samples/inline-style-unoptimized/expected-bundle.js +++ b/test/js/samples/inline-style-unoptimized/expected-bundle.js @@ -137,8 +137,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/input-files/expected-bundle.js b/test/js/samples/input-files/expected-bundle.js index b598e619ffc2..5ca168946de5 100644 --- a/test/js/samples/input-files/expected-bundle.js +++ b/test/js/samples/input-files/expected-bundle.js @@ -145,8 +145,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/input-range/expected-bundle.js b/test/js/samples/input-range/expected-bundle.js index 7141e094a31a..529d4bd098c6 100644 --- a/test/js/samples/input-range/expected-bundle.js +++ b/test/js/samples/input-range/expected-bundle.js @@ -149,8 +149,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/input-without-blowback-guard/expected-bundle.js b/test/js/samples/input-without-blowback-guard/expected-bundle.js index 307545663cb5..da527f39c2fa 100644 --- a/test/js/samples/input-without-blowback-guard/expected-bundle.js +++ b/test/js/samples/input-without-blowback-guard/expected-bundle.js @@ -145,8 +145,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/legacy-input-type/expected-bundle.js b/test/js/samples/legacy-input-type/expected-bundle.js index a10dfa137d50..6f8743d56b48 100644 --- a/test/js/samples/legacy-input-type/expected-bundle.js +++ b/test/js/samples/legacy-input-type/expected-bundle.js @@ -139,8 +139,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/media-bindings/expected-bundle.js b/test/js/samples/media-bindings/expected-bundle.js index 33f9f76d092b..4a10fe98580a 100644 --- a/test/js/samples/media-bindings/expected-bundle.js +++ b/test/js/samples/media-bindings/expected-bundle.js @@ -149,8 +149,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/non-imported-component/expected-bundle.js b/test/js/samples/non-imported-component/expected-bundle.js index ec8f608726ca..c2dddb5af7ce 100644 --- a/test/js/samples/non-imported-component/expected-bundle.js +++ b/test/js/samples/non-imported-component/expected-bundle.js @@ -135,8 +135,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/select-dynamic-value/expected-bundle.js b/test/js/samples/select-dynamic-value/expected-bundle.js index 08aae80e9e0c..43cc46e61288 100644 --- a/test/js/samples/select-dynamic-value/expected-bundle.js +++ b/test/js/samples/select-dynamic-value/expected-bundle.js @@ -141,8 +141,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/setup-method/expected-bundle.js b/test/js/samples/setup-method/expected-bundle.js index f36e9584c0c6..9b69a6524ce5 100644 --- a/test/js/samples/setup-method/expected-bundle.js +++ b/test/js/samples/setup-method/expected-bundle.js @@ -121,8 +121,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/svg-title/expected-bundle.js b/test/js/samples/svg-title/expected-bundle.js index 730857faec14..fe00916e49c4 100644 --- a/test/js/samples/svg-title/expected-bundle.js +++ b/test/js/samples/svg-title/expected-bundle.js @@ -141,8 +141,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/title/expected-bundle.js b/test/js/samples/title/expected-bundle.js index 096430361ef1..9e8603b535d8 100644 --- a/test/js/samples/title/expected-bundle.js +++ b/test/js/samples/title/expected-bundle.js @@ -121,8 +121,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/use-elements-as-anchors/expected-bundle.js b/test/js/samples/use-elements-as-anchors/expected-bundle.js index c86845e7f2aa..020282cb325c 100644 --- a/test/js/samples/use-elements-as-anchors/expected-bundle.js +++ b/test/js/samples/use-elements-as-anchors/expected-bundle.js @@ -145,8 +145,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/js/samples/window-binding-scroll/expected-bundle.js b/test/js/samples/window-binding-scroll/expected-bundle.js index 57ab3aaf7b6b..d177bddaa8da 100644 --- a/test/js/samples/window-binding-scroll/expected-bundle.js +++ b/test/js/samples/window-binding-scroll/expected-bundle.js @@ -145,8 +145,8 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } -function _mount(target, anchor) { - this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null); +function _mount(target, anchor, introing) { + this._fragment[this._fragment.i ? 'i' : 'm'](target, anchor || null, introing); } var proto = { diff --git a/test/runtime/samples/transition-js-local-nested-await/_config.js b/test/runtime/samples/transition-js-local-nested-await/_config.js new file mode 100644 index 000000000000..62abb02a88c3 --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-await/_config.js @@ -0,0 +1,33 @@ +let fulfil; + +const promise = new Promise(f => { + fulfil = f; +}); + +export default { + nestedTransitions: true, + + data: { + x: false, + promise + }, + + test(assert, component, target, window, raf) { + component.set({ x: true }); + fulfil(); + + return promise.then(() => { + const div = target.querySelector('div'); + assert.equal(div.foo, 0); + + raf.tick(100); + assert.equal(div.foo, 1); + + component.set({ x: false }); + assert.htmlEqual(target.innerHTML, ''); + + raf.tick(150); + assert.equal(div.foo, 1); + }); + } +}; diff --git a/test/runtime/samples/transition-js-local-nested-await/main.html b/test/runtime/samples/transition-js-local-nested-await/main.html new file mode 100644 index 000000000000..fb6c2928601b --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-await/main.html @@ -0,0 +1,20 @@ +{#if x} + {#await promise then value} +
+ {/await} +{/if} + + \ No newline at end of file diff --git a/test/runtime/samples/transition-js-local-nested-component/Widget.html b/test/runtime/samples/transition-js-local-nested-component/Widget.html new file mode 100644 index 000000000000..7b7728532229 --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-component/Widget.html @@ -0,0 +1,16 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/transition-js-local-nested-component/_config.js b/test/runtime/samples/transition-js-local-nested-component/_config.js new file mode 100644 index 000000000000..5d52dd3f53ed --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-component/_config.js @@ -0,0 +1,26 @@ +export default { + nestedTransitions: true, + + data: { + x: false + }, + + test(assert, component, target, window, raf) { + component.set({ x: true }); + + const div = target.querySelector('div'); + assert.equal(div.foo, 0); + + raf.tick(100); + assert.equal(div.foo, 1); + + component.set({ x: false }); + assert.htmlEqual(target.innerHTML, ''); + + raf.tick(150); + assert.equal(div.foo, 0.5); + + raf.tick(200); + assert.htmlEqual(target.innerHTML, ''); + } +}; diff --git a/test/runtime/samples/transition-js-local-nested-component/main.html b/test/runtime/samples/transition-js-local-nested-component/main.html new file mode 100644 index 000000000000..2930f4dc16a7 --- /dev/null +++ b/test/runtime/samples/transition-js-local-nested-component/main.html @@ -0,0 +1,13 @@ +{#if x} +