diff --git a/src/compile/dom/Block.ts b/src/compile/dom/Block.ts
index a0330c888c..6730d416b0 100644
--- a/src/compile/dom/Block.ts
+++ b/src/compile/dom/Block.ts
@@ -119,11 +119,11 @@ export default class Block {
}
addIntro() {
- this.hasIntroMethod = true;
+ this.hasIntroMethod = this.compiler.target.hasIntroTransitions = true;
}
addOutro() {
- this.hasOutroMethod = true;
+ this.hasOutroMethod = this.compiler.target.hasOutroTransitions = true;
this.outros += 1;
}
diff --git a/src/compile/dom/index.ts b/src/compile/dom/index.ts
index 35a6ca1711..4a70ed06ca 100644
--- a/src/compile/dom/index.ts
+++ b/src/compile/dom/index.ts
@@ -182,6 +182,7 @@ export default function dom(
})}
${compiler.bindingGroups.length &&
`this._bindingGroups = [${Array(compiler.bindingGroups.length).fill('[]').join(', ')}];`}
+ this._intro = ${compiler.options.skipIntroByDefault ? 'options.intro' : 'true'};
${templateProperties.onstate && `this._handlers.state = [%onstate];`}
${templateProperties.onupdate && `this._handlers.update = [%onupdate];`}
@@ -251,6 +252,8 @@ export default function dom(
`}
}
`}
+
+ ${compiler.options.skipIntroByDefault && `this._intro = true;`}
`;
if (compiler.customElement) {
diff --git a/src/compile/nodes/AwaitBlock.ts b/src/compile/nodes/AwaitBlock.ts
index 097aea3d0d..9a8aa51020 100644
--- a/src/compile/nodes/AwaitBlock.ts
+++ b/src/compile/nodes/AwaitBlock.ts
@@ -77,7 +77,7 @@ export default class AwaitBlock extends Node {
this.then.block.hasOutroMethod = hasOutros;
this.catch.block.hasOutroMethod = hasOutros;
- if (hasOutros) block.addOutro();
+ if (hasOutros && this.compiler.options.nestedTransitions) block.addOutro();
}
build(
@@ -171,7 +171,7 @@ export default class AwaitBlock extends Node {
`);
}
- if (this.pending.block.hasOutroMethod) {
+ if (this.pending.block.hasOutroMethod && this.compiler.options.nestedTransitions) {
block.builders.outro.addBlock(deindent`
#outrocallback = @callAfter(#outrocallback, 3);
for (let #i = 0; #i < 3; #i += 1) {
diff --git a/src/compile/nodes/Component.ts b/src/compile/nodes/Component.ts
index 9b14a29452..6020825f4a 100644
--- a/src/compile/nodes/Component.ts
+++ b/src/compile/nodes/Component.ts
@@ -108,6 +108,10 @@ export default class Component extends Node {
child.init(block, stripWhitespace, nextSibling);
});
}
+
+ if (this.compiler.options.nestedTransitions) {
+ block.addOutro();
+ }
}
build(
@@ -383,7 +387,7 @@ export default class Component extends Node {
block.builders.mount.addBlock(deindent`
if (${name}) {
- ${name}._mount(${parentNode || '#target'}, ${parentNode ? 'null' : 'anchor'}, ${compiler.options.skipIntroByDefault ? 'false' : 'true'});
+ ${name}._mount(${parentNode || '#target'}, ${parentNode ? 'null' : 'anchor'}, ${compiler.options.skipIntroByDefault ? '#component._intro' : 'true'});
${this.ref && `#component.refs.${this.ref} = ${name};`}
}
`);
@@ -405,7 +409,7 @@ export default class Component extends Node {
${name}._fragment.c();
${this.children.map(child => child.remount(name))}
- ${name}._mount(${updateMountNode}, ${anchor}, ${compiler.options.skipIntroByDefault ? 'false' : 'true'});
+ ${name}._mount(${updateMountNode}, ${anchor}, true);
${this.handlers.map(handler => deindent`
${name}.on("${handler.name}", ${handler.var});
@@ -464,7 +468,7 @@ export default class Component extends Node {
}
block.builders.mount.addLine(
- `${name}._mount(${parentNode || '#target'}, ${parentNode ? 'null' : 'anchor'}, ${compiler.options.skipIntroByDefault ? 'false' : 'true'});`
+ `${name}._mount(${parentNode || '#target'}, ${parentNode ? 'null' : 'anchor'}, ${compiler.options.skipIntroByDefault ? '#component._intro' : 'true'});`
);
if (updates.length) {
@@ -480,10 +484,16 @@ export default class Component extends Node {
${this.ref && `if (#component.refs.${this.ref} === ${name}) #component.refs.${this.ref} = null;`}
`);
}
+
+ if (this.compiler.options.nestedTransitions) {
+ block.builders.outro.addLine(
+ `${name}._fragment.o(#outrocallback);`
+ );
+ }
}
remount(name: string) {
- return `${this.var}._mount(${name}._slotted.default, null, ${this.compiler.options.skipIntroByDefault ? 'false' : 'true'});`;
+ return `${this.var}._mount(${name}._slotted.default, null, false);`;
}
ssr() {
diff --git a/src/compile/nodes/EachBlock.ts b/src/compile/nodes/EachBlock.ts
index 7af6bfbec3..cee550d5fe 100644
--- a/src/compile/nodes/EachBlock.ts
+++ b/src/compile/nodes/EachBlock.ts
@@ -321,10 +321,12 @@ export default class EachBlock extends Node {
${blocks} = @updateKeyedEach(${blocks}, #component, changed, ${get_key}, ${dynamic ? '1' : '0'}, ctx, ${this.each_block_value}, ${lookup}, ${updateMountNode}, ${String(this.block.hasOutroMethod)}, ${create_each_block}, "${mountOrIntro}", ${anchor}, ${this.get_each_context});
`);
- block.builders.outro.addBlock(deindent`
- #outrocallback = @callAfter(#outrocallback, ${blocks}.length);
- for (#i = 0; #i < ${blocks}.length; #i += 1) ${blocks}[#i].o(#outrocallback);
- `)
+ if (this.compiler.options.nestedTransitions) {
+ block.builders.outro.addBlock(deindent`
+ #outrocallback = @callAfter(#outrocallback, ${blocks}.length);
+ for (#i = 0; #i < ${blocks}.length; #i += 1) ${blocks}[#i].o(#outrocallback);
+ `);
+ }
block.builders.destroy.addBlock(deindent`
for (#i = 0; #i < ${blocks}.length; #i += 1) ${blocks}[#i].d(${parentNode ? '' : 'detach'});
@@ -462,7 +464,7 @@ export default class EachBlock extends Node {
`);
}
- if (outro) {
+ if (outro && this.compiler.options.nestedTransitions) {
block.builders.outro.addBlock(deindent`
#outrocallback = @callAfter(#outrocallback, #i);
for (let #i = 0; #i < ${iterations}.length; #i += 1) ${outro}(#i, 0, #outrocallback);`
diff --git a/src/compile/nodes/Element.ts b/src/compile/nodes/Element.ts
index cdfe1926df..a2f12858c7 100644
--- a/src/compile/nodes/Element.ts
+++ b/src/compile/nodes/Element.ts
@@ -182,13 +182,11 @@ export default class Element extends Node {
if (this.intro) {
this.parent.cannotUseInnerHTML();
- this.compiler.target.hasIntroTransitions = true;
block.addIntro();
}
if (this.outro) {
this.parent.cannotUseInnerHTML();
- this.compiler.target.hasOutroTransitions = true;
block.addOutro();
}
diff --git a/test/cli/samples/basic/expected/Main.js b/test/cli/samples/basic/expected/Main.js
index b4b737bb76..f7aa8f698a 100644
--- a/test/cli/samples/basic/expected/Main.js
+++ b/test/cli/samples/basic/expected/Main.js
@@ -26,6 +26,7 @@ function create_main_fragment(component, ctx) {
function Main(options) {
init(this, options);
this._state = assign({}, options.data);
+ this._intro = true;
this._fragment = create_main_fragment(this, this._state);
diff --git a/test/cli/samples/custom-element/expected/Main.js b/test/cli/samples/custom-element/expected/Main.js
index 6fcf0aa394..bf393c995c 100644
--- a/test/cli/samples/custom-element/expected/Main.js
+++ b/test/cli/samples/custom-element/expected/Main.js
@@ -29,6 +29,7 @@ class Main extends HTMLElement {
super();
init(this, options);
this._state = assign({}, options.data);
+ this._intro = true;
this.attachShadow({ mode: 'open' });
diff --git a/test/cli/samples/dev/expected/Main.js b/test/cli/samples/dev/expected/Main.js
index 9c8394917c..477b3f1635 100644
--- a/test/cli/samples/dev/expected/Main.js
+++ b/test/cli/samples/dev/expected/Main.js
@@ -28,6 +28,7 @@ function Main(options) {
if (!options || (!options.target && !options.root)) throw new Error("'target' is a required option");
init(this, options);
this._state = assign({}, options.data);
+ this._intro = true;
this._fragment = create_main_fragment(this, this._state);
diff --git a/test/cli/samples/dir-sourcemap/expected/Main.js b/test/cli/samples/dir-sourcemap/expected/Main.js
index ccedf5a18a..9933db03f4 100644
--- a/test/cli/samples/dir-sourcemap/expected/Main.js
+++ b/test/cli/samples/dir-sourcemap/expected/Main.js
@@ -29,6 +29,7 @@ function create_main_fragment(component, ctx) {
function Main(options) {
init(this, options);
this._state = assign({}, options.data);
+ this._intro = true;
if (!options.root) {
this._oncreate = [];
diff --git a/test/cli/samples/dir-sourcemap/expected/Main.js.map b/test/cli/samples/dir-sourcemap/expected/Main.js.map
index 6e2eb7d0b0..e164b7b845 100644
--- a/test/cli/samples/dir-sourcemap/expected/Main.js.map
+++ b/test/cli/samples/dir-sourcemap/expected/Main.js.map
@@ -1 +1 @@
-{"version":3,"file":"Main.js","sources":["../src/Main.html"],"sourcesContent":["
widget
"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"Widget.js","sources":["../src/Widget.html"],"sourcesContent":["widget
"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/test/cli/samples/dir-subdir/expected/Main.js b/test/cli/samples/dir-subdir/expected/Main.js index c43c922220..23591bd0a0 100644 --- a/test/cli/samples/dir-subdir/expected/Main.js +++ b/test/cli/samples/dir-subdir/expected/Main.js @@ -29,6 +29,7 @@ function create_main_fragment(component, ctx) { function Main(options) { init(this, options); this._state = assign({}, options.data); + this._intro = true; if (!options.root) { this._oncreate = []; diff --git a/test/cli/samples/dir-subdir/expected/widget/Widget.js b/test/cli/samples/dir-subdir/expected/widget/Widget.js index df8b286b29..e33859eccd 100644 --- a/test/cli/samples/dir-subdir/expected/widget/Widget.js +++ b/test/cli/samples/dir-subdir/expected/widget/Widget.js @@ -26,6 +26,7 @@ function create_main_fragment(component, ctx) { function Widget(options) { init(this, options); this._state = assign({}, options.data); + this._intro = true; this._fragment = create_main_fragment(this, this._state); diff --git a/test/cli/samples/dir/expected/Main.js b/test/cli/samples/dir/expected/Main.js index 501d7d8e9f..6338328094 100644 --- a/test/cli/samples/dir/expected/Main.js +++ b/test/cli/samples/dir/expected/Main.js @@ -29,6 +29,7 @@ function create_main_fragment(component, ctx) { function Main(options) { init(this, options); this._state = assign({}, options.data); + this._intro = true; if (!options.root) { this._oncreate = []; diff --git a/test/cli/samples/dir/expected/Widget.js b/test/cli/samples/dir/expected/Widget.js index ad7f1ce7ed..66eeb2a895 100644 --- a/test/cli/samples/dir/expected/Widget.js +++ b/test/cli/samples/dir/expected/Widget.js @@ -26,6 +26,7 @@ function create_main_fragment(component, ctx) { function Widget(options) { init(this, options); this._state = assign({}, options.data); + this._intro = true; this._fragment = create_main_fragment(this, this._state); diff --git a/test/cli/samples/globals/expected/Main.js b/test/cli/samples/globals/expected/Main.js index 72daf778fb..46f3fa2594 100644 --- a/test/cli/samples/globals/expected/Main.js +++ b/test/cli/samples/globals/expected/Main.js @@ -41,6 +41,7 @@ var Main = (function(answer) { "use strict"; function Main(options) { init(this, options); this._state = assign(data(), options.data); + this._intro = true; this._fragment = create_main_fragment(this, this._state); diff --git a/test/cli/samples/sourcemap-inline/expected/Main.js b/test/cli/samples/sourcemap-inline/expected/Main.js index b357420353..0a7463533a 100644 --- a/test/cli/samples/sourcemap-inline/expected/Main.js +++ b/test/cli/samples/sourcemap-inline/expected/Main.js @@ -26,6 +26,7 @@ function create_main_fragment(component, ctx) { function Main(options) { init(this, options); this._state = assign({}, options.data); + this._intro = true; this._fragment = create_main_fragment(this, this._state); @@ -165,4 +166,4 @@ function callAll(fns) { while (fns && fns.length) fns.shift()(); } export default Main; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWFpbi5qcyIsInNvdXJjZXMiOlsiLi4vc3JjL01haW4uaHRtbCJdLCJzb3VyY2VzQ29udGVudCI6WyI8cD5IZWxsbyB3b3JsZCE8L3A+XG5cbjxzY3JpcHQ+XG5cdGV4cG9ydCBkZWZhdWx0IHtcblx0XHRvbnJlbmRlciAoKSB7XG5cdFx0XHRjb25zb2xlLmxvZyggJ2hlcmUnICk7XG5cdFx0fVxuXHR9O1xuPC9zY3JpcHQ+Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7In0= +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWFpbi5qcyIsInNvdXJjZXMiOlsiLi4vc3JjL01haW4uaHRtbCJdLCJzb3VyY2VzQ29udGVudCI6WyI8cD5IZWxsbyB3b3JsZCE8L3A+XG5cbjxzY3JpcHQ+XG5cdGV4cG9ydCBkZWZhdWx0IHtcblx0XHRvbnJlbmRlciAoKSB7XG5cdFx0XHRjb25zb2xlLmxvZyggJ2hlcmUnICk7XG5cdFx0fVxuXHR9O1xuPC9zY3JpcHQ+Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9 diff --git a/test/cli/samples/sourcemap/expected/Main.js b/test/cli/samples/sourcemap/expected/Main.js index 14c1518dd0..1c40d1fa58 100644 --- a/test/cli/samples/sourcemap/expected/Main.js +++ b/test/cli/samples/sourcemap/expected/Main.js @@ -26,6 +26,7 @@ function create_main_fragment(component, ctx) { function Main(options) { init(this, options); this._state = assign({}, options.data); + this._intro = true; this._fragment = create_main_fragment(this, this._state); diff --git a/test/cli/samples/sourcemap/expected/Main.js.map b/test/cli/samples/sourcemap/expected/Main.js.map index c8777bdd11..e5a7f2a162 100644 --- a/test/cli/samples/sourcemap/expected/Main.js.map +++ b/test/cli/samples/sourcemap/expected/Main.js.map @@ -1 +1 @@ -{"version":3,"file":"Main.js","sources":["../src/Main.html"],"sourcesContent":["Hello world!
\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"Main.js","sources":["../src/Main.html"],"sourcesContent":["Hello world!
\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/test/cli/samples/store/expected/Main.js b/test/cli/samples/store/expected/Main.js index 45ea6ea814..a16131512f 100644 --- a/test/cli/samples/store/expected/Main.js +++ b/test/cli/samples/store/expected/Main.js @@ -34,6 +34,7 @@ function Main(options) { init(this, options); this._state = assign(this.store._init(["name"]), options.data); this.store._add(this, ["name"]); + this._intro = true; this._handlers.destroy = [removeFromStore]; diff --git a/test/js/samples/action/expected-bundle.js b/test/js/samples/action/expected-bundle.js index 8828faba13..d90836bd06 100644 --- a/test/js/samples/action/expected-bundle.js +++ b/test/js/samples/action/expected-bundle.js @@ -174,6 +174,7 @@ function create_main_fragment(component, ctx) { function SvelteComponent(options) { init(this, options); this._state = assign({}, options.data); + this._intro = true; this._fragment = create_main_fragment(this, this._state); diff --git a/test/js/samples/action/expected.js b/test/js/samples/action/expected.js index dab9d0d9db..8ae971178c 100644 --- a/test/js/samples/action/expected.js +++ b/test/js/samples/action/expected.js @@ -47,6 +47,7 @@ function create_main_fragment(component, ctx) { function SvelteComponent(options) { init(this, options); this._state = assign({}, options.data); + this._intro = true; this._fragment = create_main_fragment(this, this._state); diff --git a/test/js/samples/bind-width-height/expected-bundle.js b/test/js/samples/bind-width-height/expected-bundle.js index 11a932ee3f..037a3e351d 100644 --- a/test/js/samples/bind-width-height/expected-bundle.js +++ b/test/js/samples/bind-width-height/expected-bundle.js @@ -195,6 +195,7 @@ function create_main_fragment(component, ctx) { function SvelteComponent(options) { init(this, options); this._state = assign({}, options.data); + this._intro = true; if (!options.root) { this._oncreate = []; diff --git a/test/js/samples/bind-width-height/expected.js b/test/js/samples/bind-width-height/expected.js index 12eb1e8c37..45eea94620 100644 --- a/test/js/samples/bind-width-height/expected.js +++ b/test/js/samples/bind-width-height/expected.js @@ -35,6 +35,7 @@ function create_main_fragment(component, ctx) { function SvelteComponent(options) { init(this, options); this._state = assign({}, options.data); + this._intro = true; if (!options.root) { this._oncreate = []; 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 a8a0b6f76b..2abdb35ad3 100644 --- a/test/js/samples/collapses-text-around-comments/expected-bundle.js +++ b/test/js/samples/collapses-text-around-comments/expected-bundle.js @@ -179,6 +179,7 @@ function create_main_fragment(component, ctx) { function SvelteComponent(options) { init(this, options); this._state = assign(data(), options.data); + this._intro = true; if (!document.getElementById("svelte-1a7i8ec-style")) add_css(); diff --git a/test/js/samples/collapses-text-around-comments/expected.js b/test/js/samples/collapses-text-around-comments/expected.js index 78e957933f..77b9ecda68 100644 --- a/test/js/samples/collapses-text-around-comments/expected.js +++ b/test/js/samples/collapses-text-around-comments/expected.js @@ -44,6 +44,7 @@ function create_main_fragment(component, ctx) { function SvelteComponent(options) { init(this, options); this._state = assign(data(), options.data); + this._intro = true; if (!document.getElementById("svelte-1a7i8ec-style")) add_css(); diff --git a/test/js/samples/component-static-array/expected-bundle.js b/test/js/samples/component-static-array/expected-bundle.js index 24e739c61a..47534baf71 100644 --- a/test/js/samples/component-static-array/expected-bundle.js +++ b/test/js/samples/component-static-array/expected-bundle.js @@ -147,6 +147,7 @@ function create_main_fragment(component, ctx) { function SvelteComponent(options) { init(this, options); this._state = assign({}, options.data); + this._intro = true; if (!options.root) { this._oncreate = []; diff --git a/test/js/samples/component-static-array/expected.js b/test/js/samples/component-static-array/expected.js index 667fa7f486..dd94dfbe1b 100644 --- a/test/js/samples/component-static-array/expected.js +++ b/test/js/samples/component-static-array/expected.js @@ -31,6 +31,7 @@ function create_main_fragment(component, ctx) { function SvelteComponent(options) { init(this, options); this._state = assign({}, options.data); + this._intro = true; if (!options.root) { this._oncreate = []; diff --git a/test/js/samples/component-static-immutable/expected-bundle.js b/test/js/samples/component-static-immutable/expected-bundle.js index f272d7e11a..55f31adaa3 100644 --- a/test/js/samples/component-static-immutable/expected-bundle.js +++ b/test/js/samples/component-static-immutable/expected-bundle.js @@ -151,6 +151,7 @@ function create_main_fragment(component, ctx) { function SvelteComponent(options) { init(this, options); this._state = assign({}, options.data); + this._intro = true; if (!options.root) { this._oncreate = []; diff --git a/test/js/samples/component-static-immutable/expected.js b/test/js/samples/component-static-immutable/expected.js index 877cbd5eda..01c61db843 100644 --- a/test/js/samples/component-static-immutable/expected.js +++ b/test/js/samples/component-static-immutable/expected.js @@ -31,6 +31,7 @@ function create_main_fragment(component, ctx) { function SvelteComponent(options) { init(this, options); this._state = assign({}, options.data); + this._intro = true; if (!options.root) { this._oncreate = []; diff --git a/test/js/samples/component-static-immutable2/expected-bundle.js b/test/js/samples/component-static-immutable2/expected-bundle.js index f272d7e11a..55f31adaa3 100644 --- a/test/js/samples/component-static-immutable2/expected-bundle.js +++ b/test/js/samples/component-static-immutable2/expected-bundle.js @@ -151,6 +151,7 @@ function create_main_fragment(component, ctx) { function SvelteComponent(options) { init(this, options); this._state = assign({}, options.data); + this._intro = true; if (!options.root) { this._oncreate = []; diff --git a/test/js/samples/component-static-immutable2/expected.js b/test/js/samples/component-static-immutable2/expected.js index 877cbd5eda..01c61db843 100644 --- a/test/js/samples/component-static-immutable2/expected.js +++ b/test/js/samples/component-static-immutable2/expected.js @@ -31,6 +31,7 @@ function create_main_fragment(component, ctx) { function SvelteComponent(options) { init(this, options); this._state = assign({}, options.data); + this._intro = true; if (!options.root) { this._oncreate = []; diff --git a/test/js/samples/component-static/expected-bundle.js b/test/js/samples/component-static/expected-bundle.js index 04bd0982b5..ed27d44137 100644 --- a/test/js/samples/component-static/expected-bundle.js +++ b/test/js/samples/component-static/expected-bundle.js @@ -147,6 +147,7 @@ function create_main_fragment(component, ctx) { function SvelteComponent(options) { init(this, options); this._state = assign({}, options.data); + this._intro = true; if (!options.root) { this._oncreate = []; diff --git a/test/js/samples/component-static/expected.js b/test/js/samples/component-static/expected.js index 631d2e7814..c4308b66e3 100644 --- a/test/js/samples/component-static/expected.js +++ b/test/js/samples/component-static/expected.js @@ -31,6 +31,7 @@ function create_main_fragment(component, ctx) { function SvelteComponent(options) { init(this, options); this._state = assign({}, options.data); + this._intro = true; if (!options.root) { this._oncreate = []; diff --git a/test/js/samples/computed-collapsed-if/expected-bundle.js b/test/js/samples/computed-collapsed-if/expected-bundle.js index c405221365..f389a4a991 100644 --- a/test/js/samples/computed-collapsed-if/expected-bundle.js +++ b/test/js/samples/computed-collapsed-if/expected-bundle.js @@ -142,6 +142,7 @@ function SvelteComponent(options) { init(this, options); this._state = assign({}, options.data); this._recompute({ x: 1 }, this._state); + this._intro = true; this._fragment = create_main_fragment(this, this._state); diff --git a/test/js/samples/computed-collapsed-if/expected.js b/test/js/samples/computed-collapsed-if/expected.js index 05f6ae2bff..208b2503f2 100644 --- a/test/js/samples/computed-collapsed-if/expected.js +++ b/test/js/samples/computed-collapsed-if/expected.js @@ -26,6 +26,7 @@ function SvelteComponent(options) { init(this, options); this._state = assign({}, options.data); this._recompute({ x: 1 }, this._state); + this._intro = true; this._fragment = create_main_fragment(this, this._state); diff --git a/test/js/samples/css-media-query/expected-bundle.js b/test/js/samples/css-media-query/expected-bundle.js index 0c864a18ec..deaed19d8f 100644 --- a/test/js/samples/css-media-query/expected-bundle.js +++ b/test/js/samples/css-media-query/expected-bundle.js @@ -166,6 +166,7 @@ function create_main_fragment(component, ctx) { function SvelteComponent(options) { init(this, options); this._state = assign({}, options.data); + this._intro = true; if (!document.getElementById("svelte-1slhpfn-style")) add_css(); diff --git a/test/js/samples/css-media-query/expected.js b/test/js/samples/css-media-query/expected.js index 9b8c88b3ef..8addd3e494 100644 --- a/test/js/samples/css-media-query/expected.js +++ b/test/js/samples/css-media-query/expected.js @@ -34,6 +34,7 @@ function create_main_fragment(component, ctx) { function SvelteComponent(options) { init(this, options); this._state = assign({}, options.data); + this._intro = true; if (!document.getElementById("svelte-1slhpfn-style")) add_css(); 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 8277f96654..9c7e0c14b1 100644 --- a/test/js/samples/css-shadow-dom-keyframes/expected-bundle.js +++ b/test/js/samples/css-shadow-dom-keyframes/expected-bundle.js @@ -158,6 +158,7 @@ class SvelteComponent extends HTMLElement { super(); init(this, options); this._state = assign({}, options.data); + this._intro = true; this.attachShadow({ mode: 'open' }); this.shadowRoot.innerHTML = ``; diff --git a/test/js/samples/css-shadow-dom-keyframes/expected.js b/test/js/samples/css-shadow-dom-keyframes/expected.js index 085cccb8d7..1832bac488 100644 --- a/test/js/samples/css-shadow-dom-keyframes/expected.js +++ b/test/js/samples/css-shadow-dom-keyframes/expected.js @@ -30,6 +30,7 @@ class SvelteComponent extends HTMLElement { super(); init(this, options); this._state = assign({}, options.data); + this._intro = true; this.attachShadow({ mode: 'open' }); this.shadowRoot.innerHTML = ``; diff --git a/test/js/samples/deconflict-builtins/expected-bundle.js b/test/js/samples/deconflict-builtins/expected-bundle.js index 4767d5ccec..6ea32ad693 100644 --- a/test/js/samples/deconflict-builtins/expected-bundle.js +++ b/test/js/samples/deconflict-builtins/expected-bundle.js @@ -248,6 +248,7 @@ function get_each_context(ctx, list, i) { function SvelteComponent(options) { init(this, options); this._state = assign({}, options.data); + this._intro = true; this._fragment = create_main_fragment(this, this._state); diff --git a/test/js/samples/deconflict-builtins/expected.js b/test/js/samples/deconflict-builtins/expected.js index 50a8aa2b43..afc357605c 100644 --- a/test/js/samples/deconflict-builtins/expected.js +++ b/test/js/samples/deconflict-builtins/expected.js @@ -102,6 +102,7 @@ function get_each_context(ctx, list, i) { function SvelteComponent(options) { init(this, options); this._state = assign({}, options.data); + this._intro = true; this._fragment = create_main_fragment(this, this._state); diff --git a/test/js/samples/deconflict-globals/expected-bundle.js b/test/js/samples/deconflict-globals/expected-bundle.js index 9983368542..b68330a2f5 100644 --- a/test/js/samples/deconflict-globals/expected-bundle.js +++ b/test/js/samples/deconflict-globals/expected-bundle.js @@ -147,6 +147,7 @@ function create_main_fragment(component, ctx) { function SvelteComponent(options) { init(this, options); this._state = assign(data_1(), options.data); + this._intro = true; if (!options.root) { this._oncreate = []; diff --git a/test/js/samples/deconflict-globals/expected.js b/test/js/samples/deconflict-globals/expected.js index f19fe3af9c..fd110588da 100644 --- a/test/js/samples/deconflict-globals/expected.js +++ b/test/js/samples/deconflict-globals/expected.js @@ -27,6 +27,7 @@ function create_main_fragment(component, ctx) { function SvelteComponent(options) { init(this, options); this._state = assign(data_1(), options.data); + this._intro = true; if (!options.root) { this._oncreate = []; 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 0d93b49f8f..70a240dfab 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 @@ -202,6 +202,7 @@ function SvelteComponent(options) { this._state = assign({ Math : Math }, options.data); this._recompute({ foo: 1 }, this._state); if (!('foo' in this._state)) console.warn("