minor fixes, update various tests

pull/1367/head
Rich Harris 7 years ago
parent a641019ab9
commit 86d3476b55

@ -89,7 +89,7 @@ export default class Attribute extends Node {
if (chunk.type === 'Text') {
return stringify(chunk.data);
} else {
return getExpressionPrecedence(chunk) <= 13 ? `(${chunk.snippet})` : snippet;
return getExpressionPrecedence(chunk.node) <= 13 ? `(${chunk.snippet})` : snippet;
}
})
.join(' + ');
@ -183,7 +183,7 @@ export default class Attribute extends Node {
allDependencies.add(d);
});
return getExpressionPrecedence(chunk) <= 13 ? `(${snippet})` : snippet;
return getExpressionPrecedence(chunk.node) <= 13 ? `(${snippet})` : snippet;
}
})
.join(' + ');
@ -330,7 +330,7 @@ export default class Attribute extends Node {
allDependencies.add(d);
});
return getExpressionPrecedence(chunk) <= 13 ? `(${snippet})` : snippet;
return getExpressionPrecedence(chunk.node) <= 13 ? `(${snippet})` : snippet;
}
})
.join(' + ');

@ -2,4 +2,10 @@ import Node from './shared/Node';
export default class Comment extends Node {
type: 'Comment';
data: string;
constructor(compiler, parent, scope, info) {
super(compiler, parent, scope, info);
this.data = info.data;
}
}

@ -160,19 +160,19 @@ export default class Element extends Node {
});
this.actions.forEach(action => {
this.cannotUseInnerHTML();
this.parent.cannotUseInnerHTML();
if (action.expression) {
block.addDependencies(action.expression.dependencies);
}
});
this.bindings.forEach(binding => {
this.cannotUseInnerHTML();
this.parent.cannotUseInnerHTML();
block.addDependencies(binding.value.dependencies);
});
this.handlers.forEach(handler => {
this.cannotUseInnerHTML();
this.parent.cannotUseInnerHTML();
block.addDependencies(handler.dependencies);
});

@ -57,7 +57,7 @@ export default class Title extends Node {
allDependencies.add(d);
});
return getExpressionPrecedence(chunk) <= 13 ? `(${snippet})` : snippet;
return getExpressionPrecedence(chunk.node) <= 13 ? `(${snippet})` : snippet;
}
})
.join(' + ');

@ -1,22 +1,21 @@
import { DomGenerator } from '../generators/dom/index';
import { Node } from '../interfaces';
export default function createDebuggingComment(node: Node, generator: DomGenerator) {
return `TODO ${node.start}-${node.end}`;
// const { locate, source } = generator;
export default function createDebuggingComment(node: Node, compiler: DomGenerator) {
const { locate, source } = compiler;
// let c = node.start;
// if (node.type === 'ElseBlock') {
// while (source[c - 1] !== '{') c -= 1;
// while (source[c - 1] === '{') c -= 1;
// }
let c = node.start;
if (node.type === 'ElseBlock') {
while (source[c - 1] !== '{') c -= 1;
while (source[c - 1] === '{') c -= 1;
}
// let d = node.expression ? node.expression.end : c;
// while (source[d] !== '}') d += 1;
// while (source[d] === '}') d += 1;
let d = node.expression ? node.expression.node.end : c;
while (source[d] !== '}') d += 1;
while (source[d] === '}') d += 1;
// const start = locate(c);
// const loc = `(${start.line + 1}:${start.column})`;
const start = locate(c);
const loc = `(${start.line + 1}:${start.column})`;
// return `${loc} ${source.slice(c, d)}`.replace(/\s/g, ' ');
return `${loc} ${source.slice(c, d)}`.replace(/\s/g, ' ');
}

@ -48,6 +48,7 @@ const precedence: Record<string, (expression?: Node) => number> = {
SequenceExpression: () => 0
};
// TODO make this a method of Expression
export default function getExpressionPrecedence(expression: Node) {
return expression.type in precedence ? precedence[expression.type](expression) : 0;
}

@ -4,7 +4,7 @@ import * as path from "path";
import { rollup } from "rollup";
import { loadConfig, svelte } from "../helpers.js";
describe("js", () => {
describe.only("js", () => {
fs.readdirSync("test/js/samples").forEach(dir => {
if (dir[0] === ".") return;

@ -136,7 +136,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
function link(node) {
function onClick(event) {
event.preventDefault();
history.pushState(null, null, event.target.href);
@ -150,7 +150,7 @@ function link(node) {
}
}
}
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var a, link_action;
return {

@ -2,7 +2,7 @@
import { assign, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
function link(node) {
function onClick(event) {
event.preventDefault();
history.pushState(null, null, event.target.href);
@ -17,7 +17,7 @@ function link(node) {
}
};
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var a, link_action;
return {

@ -153,13 +153,13 @@ function add_css() {
appendNode(style, document.head);
}
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var p, text;
return {
c: function create() {
p = createElement("p");
text = createText(state.foo);
text = createText(ctx.foo);
this.h();
},
@ -172,9 +172,9 @@ function create_main_fragment(component, state) {
appendNode(text, p);
},
p: function update(changed, state) {
p: function update(changed, ctx) {
if (changed.foo) {
text.data = state.foo;
text.data = ctx.foo;
}
},

@ -12,13 +12,13 @@ function add_css() {
appendNode(style, document.head);
}
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var p, text;
return {
c: function create() {
p = createElement("p");
text = createText(state.foo);
text = createText(ctx.foo);
this.h();
},
@ -31,9 +31,9 @@ function create_main_fragment(component, state) {
appendNode(text, p);
},
p: function update(changed, state) {
p: function update(changed, ctx) {
if (changed.foo) {
text.data = state.foo;
text.data = ctx.foo;
}
},

@ -129,7 +129,7 @@ var proto = {
var Nested = window.Nested;
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var nested_initial_data = { foo: "bar" };
var nested = new Nested({

@ -3,7 +3,7 @@ import { _differsImmutable, assign, callAll, init, noop, proto } from "svelte/sh
var Nested = window.Nested;
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var nested_initial_data = { foo: "bar" };
var nested = new Nested({

@ -129,7 +129,7 @@ var proto = {
var Nested = window.Nested;
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var nested_initial_data = { foo: "bar" };
var nested = new Nested({

@ -3,7 +3,7 @@ import { _differsImmutable, assign, callAll, init, noop, proto } from "svelte/sh
var Nested = window.Nested;
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var nested_initial_data = { foo: "bar" };
var nested = new Nested({

@ -125,7 +125,7 @@ var proto = {
var Nested = window.Nested;
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var nested_initial_data = { foo: "bar" };
var nested = new Nested({

@ -3,7 +3,7 @@ import { assign, callAll, init, noop, proto } from "svelte/shared.js";
var Nested = window.Nested;
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var nested_initial_data = { foo: "bar" };
var nested = new Nested({

@ -131,7 +131,7 @@ function b({ x }) {
return x * 3;
}
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
return {
c: noop,

@ -9,7 +9,7 @@ function b({ x }) {
return x * 3;
}
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
return {
c: noop,

@ -146,7 +146,7 @@ function add_css() {
appendNode(style, document.head);
}
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var div;
return {

@ -8,7 +8,7 @@ function add_css() {
appendNode(style, document.head);
}
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var div;
return {

@ -135,7 +135,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var div;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var div;
return {

@ -153,15 +153,15 @@ var proto = {
/* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var each_anchor;
var each_value = state.createElement;
var each_value = ctx.createElement;
var each_blocks = [];
for (var i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block(component, assign(assign({}, state), {
each_blocks[i] = create_each_block(component, assign(assign({}, ctx), {
each_value: each_value,
node: each_value[i],
node_index: i
@ -185,12 +185,12 @@ function create_main_fragment(component, state) {
insertNode(each_anchor, target, anchor);
},
p: function update(changed, state) {
var each_value = state.createElement;
p: function update(changed, ctx) {
var each_value = ctx.createElement;
if (changed.createElement) {
for (var i = 0; i < each_value.length; i += 1) {
var each_context = assign(assign({}, state), {
var each_context = assign(assign({}, ctx), {
each_value: each_value,
node: each_value[i],
node_index: i
@ -228,9 +228,8 @@ function create_main_fragment(component, state) {
}
// (1:0) {#each createElement as node}
function create_each_block(component, state) {
var node = state.node, each_value = state.each_value, node_index = state.node_index;
var span, text_value = node, text;
function create_each_block(component, ctx) {
var span, text_value = ctx.node, text;
return {
c: function create() {
@ -243,11 +242,8 @@ function create_each_block(component, state) {
appendNode(text, span);
},
p: function update(changed, state) {
node = state.node;
each_value = state.each_value;
node_index = state.node_index;
if ((changed.createElement) && text_value !== (text_value = node)) {
p: function update(changed, ctx) {
if ((changed.createElement) && text_value !== (text_value = ctx.node)) {
text.data = text_value;
}
},

@ -1,15 +1,15 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createComment, createElement, createText, destroyEach, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var each_anchor;
var each_value = state.createElement;
var each_value = ctx.createElement;
var each_blocks = [];
for (var i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block(component, assign(assign({}, state), {
each_blocks[i] = create_each_block(component, assign(assign({}, ctx), {
each_value: each_value,
node: each_value[i],
node_index: i
@ -33,12 +33,12 @@ function create_main_fragment(component, state) {
insertNode(each_anchor, target, anchor);
},
p: function update(changed, state) {
var each_value = state.createElement;
p: function update(changed, ctx) {
var each_value = ctx.createElement;
if (changed.createElement) {
for (var i = 0; i < each_value.length; i += 1) {
var each_context = assign(assign({}, state), {
var each_context = assign(assign({}, ctx), {
each_value: each_value,
node: each_value[i],
node_index: i
@ -76,9 +76,8 @@ function create_main_fragment(component, state) {
}
// (1:0) {#each createElement as node}
function create_each_block(component, state) {
var node = state.node, each_value = state.each_value, node_index = state.node_index;
var span, text_value = node, text;
function create_each_block(component, ctx) {
var span, text_value = ctx.node, text;
return {
c: function create() {
@ -91,11 +90,8 @@ function create_each_block(component, state) {
appendNode(text, span);
},
p: function update(changed, state) {
node = state.node;
each_value = state.each_value;
node_index = state.node_index;
if ((changed.createElement) && text_value !== (text_value = node)) {
p: function update(changed, ctx) {
if ((changed.createElement) && text_value !== (text_value = ctx.node)) {
text.data = text_value;
}
},

@ -137,7 +137,7 @@ function data_1() {
function oncreate() {
alert(JSON.stringify(data()));
}
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
return {
c: noop,

@ -11,7 +11,7 @@ function oncreate() {
alert(JSON.stringify(data()));
};
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
return {
c: noop,

@ -165,15 +165,15 @@ function bar({ foo }) {
return foo * 2;
}
function create_main_fragment(component, state) {
var p, text_value = state.Math.max(0, state.foo), text, text_1, text_2;
function create_main_fragment(component, ctx) {
var p, text_value = ctx.Math.max(0, ctx.foo), text, text_1, text_2;
return {
c: function create() {
p = createElement("p");
text = createText(text_value);
text_1 = createText("\n\t");
text_2 = createText(state.bar);
text_2 = createText(ctx.bar);
},
m: function mount(target, anchor) {
@ -183,13 +183,13 @@ function create_main_fragment(component, state) {
appendNode(text_2, p);
},
p: function update(changed, state) {
if ((changed.Math || changed.foo) && text_value !== (text_value = state.Math.max(0, state.foo))) {
p: function update(changed, ctx) {
if ((changed.Math || changed.foo) && text_value !== (text_value = ctx.Math.max(0, ctx.foo))) {
text.data = text_value;
}
if (changed.bar) {
text_2.data = state.bar;
text_2.data = ctx.bar;
}
},

@ -5,15 +5,15 @@ function bar({ foo }) {
return foo * 2;
}
function create_main_fragment(component, state) {
var p, text_value = state.Math.max(0, state.foo), text, text_1, text_2;
function create_main_fragment(component, ctx) {
var p, text_value = ctx.Math.max(0, ctx.foo), text, text_1, text_2;
return {
c: function create() {
p = createElement("p");
text = createText(text_value);
text_1 = createText("\n\t");
text_2 = createText(state.bar);
text_2 = createText(ctx.bar);
},
m: function mount(target, anchor) {
@ -23,13 +23,13 @@ function create_main_fragment(component, state) {
appendNode(text_2, p);
},
p: function update(changed, state) {
if ((changed.Math || changed.foo) && text_value !== (text_value = state.Math.max(0, state.foo))) {
p: function update(changed, ctx) {
if ((changed.Math || changed.foo) && text_value !== (text_value = ctx.Math.max(0, ctx.foo))) {
text.data = text_value;
}
if (changed.bar) {
text_2.data = state.bar;
text_2.data = ctx.bar;
}
},

@ -139,7 +139,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var div, text, div_1;
return {
@ -152,7 +152,7 @@ function create_main_fragment(component, state) {
h: function hydrate() {
div.dataset.foo = "bar";
div_1.dataset.foo = state.bar;
div_1.dataset.foo = ctx.bar;
},
m: function mount(target, anchor) {
@ -161,9 +161,9 @@ function create_main_fragment(component, state) {
insertNode(div_1, target, anchor);
},
p: function update(changed, state) {
p: function update(changed, ctx) {
if (changed.bar) {
div_1.dataset.foo = state.bar;
div_1.dataset.foo = ctx.bar;
}
},

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var div, text, div_1;
return {
@ -14,7 +14,7 @@ function create_main_fragment(component, state) {
h: function hydrate() {
div.dataset.foo = "bar";
div_1.dataset.foo = state.bar;
div_1.dataset.foo = ctx.bar;
},
m: function mount(target, anchor) {
@ -23,9 +23,9 @@ function create_main_fragment(component, state) {
insertNode(div_1, target, anchor);
},
p: function update(changed, state) {
p: function update(changed, ctx) {
if (changed.bar) {
div_1.dataset.foo = state.bar;
div_1.dataset.foo = ctx.bar;
}
},

@ -143,7 +143,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var div, text, div_1;
return {
@ -156,7 +156,7 @@ function create_main_fragment(component, state) {
h: function hydrate() {
setAttribute(div, "data-foo", "bar");
setAttribute(div_1, "data-foo", state.bar);
setAttribute(div_1, "data-foo", ctx.bar);
},
m: function mount(target, anchor) {
@ -165,9 +165,9 @@ function create_main_fragment(component, state) {
insertNode(div_1, target, anchor);
},
p: function update(changed, state) {
p: function update(changed, ctx) {
if (changed.bar) {
setAttribute(div_1, "data-foo", state.bar);
setAttribute(div_1, "data-foo", ctx.bar);
}
},

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, createText, detachNode, init, insertNode, noop, proto, setAttribute } from "svelte/shared.js";
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var div, text, div_1;
return {
@ -14,7 +14,7 @@ function create_main_fragment(component, state) {
h: function hydrate() {
setAttribute(div, "data-foo", "bar");
setAttribute(div_1, "data-foo", state.bar);
setAttribute(div_1, "data-foo", ctx.bar);
},
m: function mount(target, anchor) {
@ -23,9 +23,9 @@ function create_main_fragment(component, state) {
insertNode(div_1, target, anchor);
},
p: function update(changed, state) {
p: function update(changed, ctx) {
if (changed.bar) {
setAttribute(div_1, "data-foo", state.bar);
setAttribute(div_1, "data-foo", ctx.bar);
}
},

@ -143,7 +143,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var svg, g, g_1;
return {
@ -156,7 +156,7 @@ function create_main_fragment(component, state) {
h: function hydrate() {
setAttribute(g, "data-foo", "bar");
setAttribute(g_1, "data-foo", state.bar);
setAttribute(g_1, "data-foo", ctx.bar);
},
m: function mount(target, anchor) {
@ -165,9 +165,9 @@ function create_main_fragment(component, state) {
appendNode(g_1, svg);
},
p: function update(changed, state) {
p: function update(changed, ctx) {
if (changed.bar) {
setAttribute(g_1, "data-foo", state.bar);
setAttribute(g_1, "data-foo", ctx.bar);
}
},

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createSvgElement, detachNode, init, insertNode, noop, proto, setAttribute } from "svelte/shared.js";
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var svg, g, g_1;
return {
@ -14,7 +14,7 @@ function create_main_fragment(component, state) {
h: function hydrate() {
setAttribute(g, "data-foo", "bar");
setAttribute(g_1, "data-foo", state.bar);
setAttribute(g_1, "data-foo", ctx.bar);
},
m: function mount(target, anchor) {
@ -23,9 +23,9 @@ function create_main_fragment(component, state) {
appendNode(g_1, svg);
},
p: function update(changed, state) {
p: function update(changed, ctx) {
if (changed.bar) {
setAttribute(g_1, "data-foo", state.bar);
setAttribute(g_1, "data-foo", ctx.bar);
}
},

@ -155,15 +155,15 @@ var proto = {
/* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var text, p, text_1;
var each_value = state.comments;
var each_value = ctx.comments;
var each_blocks = [];
for (var i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block(component, assign(assign({}, state), {
each_blocks[i] = create_each_block(component, assign(assign({}, ctx), {
each_value: each_value,
comment: each_value[i],
i: i
@ -178,7 +178,7 @@ function create_main_fragment(component, state) {
text = createText("\n\n");
p = createElement("p");
text_1 = createText(state.foo);
text_1 = createText(ctx.foo);
},
m: function mount(target, anchor) {
@ -191,12 +191,12 @@ function create_main_fragment(component, state) {
appendNode(text_1, p);
},
p: function update(changed, state) {
var each_value = state.comments;
p: function update(changed, ctx) {
var each_value = ctx.comments;
if (changed.comments || changed.elapsed || changed.time) {
for (var i = 0; i < each_value.length; i += 1) {
var each_context = assign(assign({}, state), {
var each_context = assign(assign({}, ctx), {
each_value: each_value,
comment: each_value[i],
i: i
@ -219,7 +219,7 @@ function create_main_fragment(component, state) {
}
if (changed.foo) {
text_1.data = state.foo;
text_1.data = ctx.foo;
}
},
@ -239,15 +239,14 @@ function create_main_fragment(component, state) {
}
// (1:0) {#each comments as comment, i}
function create_each_block(component, state) {
var comment = state.comment, each_value = state.each_value, i = state.i;
var div, strong, text, text_1, span, text_2_value = comment.author, text_2, text_3, text_4_value = state.elapsed(comment.time, state.time), text_4, text_5, text_6, raw_value = comment.html, raw_before;
function create_each_block(component, ctx) {
var div, strong, text, text_1, span, text_2_value = ctx.comment.author, text_2, text_3, text_4_value = ctx.elapsed(ctx.comment.time, ctx.time), text_4, text_5, text_6, raw_value = ctx.comment.html, raw_before;
return {
c: function create() {
div = createElement("div");
strong = createElement("strong");
text = createText(i);
text = createText(ctx.i);
text_1 = createText("\n\n\t\t");
span = createElement("span");
text_2 = createText(text_2_value);
@ -279,19 +278,16 @@ function create_each_block(component, state) {
raw_before.insertAdjacentHTML("afterend", raw_value);
},
p: function update(changed, state) {
comment = state.comment;
each_value = state.each_value;
i = state.i;
if ((changed.comments) && text_2_value !== (text_2_value = comment.author)) {
p: function update(changed, ctx) {
if ((changed.comments) && text_2_value !== (text_2_value = ctx.comment.author)) {
text_2.data = text_2_value;
}
if ((changed.elapsed || changed.comments || changed.time) && text_4_value !== (text_4_value = state.elapsed(comment.time, state.time))) {
if ((changed.elapsed || changed.comments || changed.time) && text_4_value !== (text_4_value = ctx.elapsed(ctx.comment.time, ctx.time))) {
text_4.data = text_4_value;
}
if ((changed.comments) && raw_value !== (raw_value = comment.html)) {
if ((changed.comments) && raw_value !== (raw_value = ctx.comment.html)) {
detachAfter(raw_before);
raw_before.insertAdjacentHTML("afterend", raw_value);
}

@ -1,15 +1,15 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, createText, destroyEach, detachAfter, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var text, p, text_1;
var each_value = state.comments;
var each_value = ctx.comments;
var each_blocks = [];
for (var i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block(component, assign(assign({}, state), {
each_blocks[i] = create_each_block(component, assign(assign({}, ctx), {
each_value: each_value,
comment: each_value[i],
i: i
@ -24,7 +24,7 @@ function create_main_fragment(component, state) {
text = createText("\n\n");
p = createElement("p");
text_1 = createText(state.foo);
text_1 = createText(ctx.foo);
},
m: function mount(target, anchor) {
@ -37,12 +37,12 @@ function create_main_fragment(component, state) {
appendNode(text_1, p);
},
p: function update(changed, state) {
var each_value = state.comments;
p: function update(changed, ctx) {
var each_value = ctx.comments;
if (changed.comments || changed.elapsed || changed.time) {
for (var i = 0; i < each_value.length; i += 1) {
var each_context = assign(assign({}, state), {
var each_context = assign(assign({}, ctx), {
each_value: each_value,
comment: each_value[i],
i: i
@ -65,7 +65,7 @@ function create_main_fragment(component, state) {
}
if (changed.foo) {
text_1.data = state.foo;
text_1.data = ctx.foo;
}
},
@ -85,15 +85,14 @@ function create_main_fragment(component, state) {
}
// (1:0) {#each comments as comment, i}
function create_each_block(component, state) {
var comment = state.comment, each_value = state.each_value, i = state.i;
var div, strong, text, text_1, span, text_2_value = comment.author, text_2, text_3, text_4_value = state.elapsed(comment.time, state.time), text_4, text_5, text_6, raw_value = comment.html, raw_before;
function create_each_block(component, ctx) {
var div, strong, text, text_1, span, text_2_value = ctx.comment.author, text_2, text_3, text_4_value = ctx.elapsed(ctx.comment.time, ctx.time), text_4, text_5, text_6, raw_value = ctx.comment.html, raw_before;
return {
c: function create() {
div = createElement("div");
strong = createElement("strong");
text = createText(i);
text = createText(ctx.i);
text_1 = createText("\n\n\t\t");
span = createElement("span");
text_2 = createText(text_2_value);
@ -125,19 +124,16 @@ function create_each_block(component, state) {
raw_before.insertAdjacentHTML("afterend", raw_value);
},
p: function update(changed, state) {
comment = state.comment;
each_value = state.each_value;
i = state.i;
if ((changed.comments) && text_2_value !== (text_2_value = comment.author)) {
p: function update(changed, ctx) {
if ((changed.comments) && text_2_value !== (text_2_value = ctx.comment.author)) {
text_2.data = text_2_value;
}
if ((changed.elapsed || changed.comments || changed.time) && text_4_value !== (text_4_value = state.elapsed(comment.time, state.time))) {
if ((changed.elapsed || changed.comments || changed.time) && text_4_value !== (text_4_value = ctx.elapsed(ctx.comment.time, ctx.time))) {
text_4.data = text_4_value;
}
if ((changed.comments) && raw_value !== (raw_value = comment.html)) {
if ((changed.comments) && raw_value !== (raw_value = ctx.comment.html)) {
detachAfter(raw_before);
raw_before.insertAdjacentHTML("afterend", raw_value);
}

@ -144,7 +144,7 @@ var methods = {
}
};
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var button, foo_handler;
return {
@ -156,8 +156,7 @@ function create_main_fragment(component, state) {
h: function hydrate() {
foo_handler = foo.call(component, button, function(event) {
var state = component.get();
component.foo( state.bar );
component.foo( ctx.bar );
});
},
@ -165,7 +164,9 @@ function create_main_fragment(component, state) {
insertNode(button, target, anchor);
},
p: noop,
p: function(changed, _ctx) {
ctx = _ctx;
},
u: function unmount() {
detachNode(button);

@ -11,7 +11,7 @@ var methods = {
}
};
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var button, foo_handler;
return {
@ -23,8 +23,7 @@ function create_main_fragment(component, state) {
h: function hydrate() {
foo_handler = foo.call(component, button, function(event) {
var state = component.get();
component.foo( state.bar );
component.foo( ctx.bar );
});
},
@ -32,7 +31,9 @@ function create_main_fragment(component, state) {
insertNode(button, target, anchor);
},
p: noop,
p: function update(changed, _ctx) {
ctx = _ctx;
},
u: function unmount() {
detachNode(button);

@ -135,7 +135,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var meta, meta_1;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, detachNode, init, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var meta, meta_1;
return {

@ -139,16 +139,16 @@ var proto = {
/* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var if_block_anchor;
function select_block_type(state) {
if (state.foo) return create_if_block;
function select_block_type(ctx) {
if (ctx.foo) return create_if_block;
return create_if_block_1;
}
var current_block_type = select_block_type(state);
var if_block = current_block_type(component, state);
var current_block_type = select_block_type(ctx);
var if_block = current_block_type(component, ctx);
return {
c: function create() {
@ -161,11 +161,11 @@ function create_main_fragment(component, state) {
insertNode(if_block_anchor, target, anchor);
},
p: function update(changed, state) {
if (current_block_type !== (current_block_type = select_block_type(state))) {
p: function update(changed, ctx) {
if (current_block_type !== (current_block_type = select_block_type(ctx))) {
if_block.u();
if_block.d();
if_block = current_block_type(component, state);
if_block = current_block_type(component, ctx);
if_block.c();
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
@ -183,7 +183,7 @@ function create_main_fragment(component, state) {
}
// (1:0) {#if foo}
function create_if_block(component, state) {
function create_if_block(component, ctx) {
var p;
return {
@ -205,7 +205,7 @@ function create_if_block(component, state) {
}
// (3:0) {:else}
function create_if_block_1(component, state) {
function create_if_block_1(component, ctx) {
var p;
return {

@ -1,16 +1,16 @@
/* generated by Svelte vX.Y.Z */
import { assign, createComment, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var if_block_anchor;
function select_block_type(state) {
if (state.foo) return create_if_block;
function select_block_type(ctx) {
if (ctx.foo) return create_if_block;
return create_if_block_1;
}
var current_block_type = select_block_type(state);
var if_block = current_block_type(component, state);
var current_block_type = select_block_type(ctx);
var if_block = current_block_type(component, ctx);
return {
c: function create() {
@ -23,11 +23,11 @@ function create_main_fragment(component, state) {
insertNode(if_block_anchor, target, anchor);
},
p: function update(changed, state) {
if (current_block_type !== (current_block_type = select_block_type(state))) {
p: function update(changed, ctx) {
if (current_block_type !== (current_block_type = select_block_type(ctx))) {
if_block.u();
if_block.d();
if_block = current_block_type(component, state);
if_block = current_block_type(component, ctx);
if_block.c();
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
@ -45,7 +45,7 @@ function create_main_fragment(component, state) {
}
// (1:0) {#if foo}
function create_if_block(component, state) {
function create_if_block(component, ctx) {
var p;
return {
@ -67,7 +67,7 @@ function create_if_block(component, state) {
}
// (3:0) {:else}
function create_if_block_1(component, state) {
function create_if_block_1(component, ctx) {
var p;
return {

@ -139,10 +139,10 @@ var proto = {
/* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var if_block_anchor;
var if_block = (state.foo) && create_if_block(component, state);
var if_block = (ctx.foo) && create_if_block(component, ctx);
return {
c: function create() {
@ -155,10 +155,10 @@ function create_main_fragment(component, state) {
insertNode(if_block_anchor, target, anchor);
},
p: function update(changed, state) {
if (state.foo) {
p: function update(changed, ctx) {
if (ctx.foo) {
if (!if_block) {
if_block = create_if_block(component, state);
if_block = create_if_block(component, ctx);
if_block.c();
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
@ -181,7 +181,7 @@ function create_main_fragment(component, state) {
}
// (1:0) {#if foo}
function create_if_block(component, state) {
function create_if_block(component, ctx) {
var p;
return {

@ -1,10 +1,10 @@
/* generated by Svelte vX.Y.Z */
import { assign, createComment, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var if_block_anchor;
var if_block = (state.foo) && create_if_block(component, state);
var if_block = (ctx.foo) && create_if_block(component, ctx);
return {
c: function create() {
@ -17,10 +17,10 @@ function create_main_fragment(component, state) {
insertNode(if_block_anchor, target, anchor);
},
p: function update(changed, state) {
if (state.foo) {
p: function update(changed, ctx) {
if (ctx.foo) {
if (!if_block) {
if_block = create_if_block(component, state);
if_block = create_if_block(component, ctx);
if_block.c();
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
@ -43,7 +43,7 @@ function create_main_fragment(component, state) {
}
// (1:0) {#if foo}
function create_if_block(component, state) {
function create_if_block(component, ctx) {
var p;
return {

@ -139,7 +139,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var div;
return {
@ -149,21 +149,21 @@ function create_main_fragment(component, state) {
},
h: function hydrate() {
setStyle(div, "color", state.color);
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)");
setStyle(div, "color", ctx.color);
setStyle(div, "transform", "translate(" + ctx.x + "px," + ctx.y + "px)");
},
m: function mount(target, anchor) {
insertNode(div, target, anchor);
},
p: function update(changed, state) {
p: function update(changed, ctx) {
if (changed.color) {
setStyle(div, "color", state.color);
setStyle(div, "color", ctx.color);
}
if (changed.x || changed.y) {
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)");
setStyle(div, "transform", "translate(" + ctx.x + "px," + ctx.y + "px)");
}
},

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js";
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var div;
return {
@ -11,21 +11,21 @@ function create_main_fragment(component, state) {
},
h: function hydrate() {
setStyle(div, "color", state.color);
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)");
setStyle(div, "color", ctx.color);
setStyle(div, "transform", "translate(" + ctx.x + "px," + ctx.y + "px)");
},
m: function mount(target, anchor) {
insertNode(div, target, anchor);
},
p: function update(changed, state) {
p: function update(changed, ctx) {
if (changed.color) {
setStyle(div, "color", state.color);
setStyle(div, "color", ctx.color);
}
if (changed.x || changed.y) {
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)");
setStyle(div, "transform", "translate(" + ctx.x + "px," + ctx.y + "px)");
}
},

@ -139,7 +139,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var div;
return {
@ -149,16 +149,16 @@ function create_main_fragment(component, state) {
},
h: function hydrate() {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")");
setStyle(div, "background", "url(data:image/png;base64," + ctx.data + ")");
},
m: function mount(target, anchor) {
insertNode(div, target, anchor);
},
p: function update(changed, state) {
p: function update(changed, ctx) {
if (changed.data) {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")");
setStyle(div, "background", "url(data:image/png;base64," + ctx.data + ")");
}
},

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js";
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var div;
return {
@ -11,16 +11,16 @@ function create_main_fragment(component, state) {
},
h: function hydrate() {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")");
setStyle(div, "background", "url(data:image/png;base64," + ctx.data + ")");
},
m: function mount(target, anchor) {
insertNode(div, target, anchor);
},
p: function update(changed, state) {
p: function update(changed, ctx) {
if (changed.data) {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")");
setStyle(div, "background", "url(data:image/png;base64," + ctx.data + ")");
}
},

@ -139,7 +139,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var div;
return {
@ -149,16 +149,16 @@ function create_main_fragment(component, state) {
},
h: function hydrate() {
setStyle(div, "color", state.color);
setStyle(div, "color", ctx.color);
},
m: function mount(target, anchor) {
insertNode(div, target, anchor);
},
p: function update(changed, state) {
p: function update(changed, ctx) {
if (changed.color) {
setStyle(div, "color", state.color);
setStyle(div, "color", ctx.color);
}
},

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js";
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var div;
return {
@ -11,16 +11,16 @@ function create_main_fragment(component, state) {
},
h: function hydrate() {
setStyle(div, "color", state.color);
setStyle(div, "color", ctx.color);
},
m: function mount(target, anchor) {
insertNode(div, target, anchor);
},
p: function update(changed, state) {
p: function update(changed, ctx) {
if (changed.color) {
setStyle(div, "color", state.color);
setStyle(div, "color", ctx.color);
}
},

@ -139,7 +139,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var div, text, div_1, div_1_style_value;
return {
@ -151,8 +151,8 @@ function create_main_fragment(component, state) {
},
h: function hydrate() {
div.style.cssText = state.style;
div_1.style.cssText = div_1_style_value = "" + state.key + ": " + state.value;
div.style.cssText = ctx.style;
div_1.style.cssText = div_1_style_value = "" + ctx.key + ": " + ctx.value;
},
m: function mount(target, anchor) {
@ -161,12 +161,12 @@ function create_main_fragment(component, state) {
insertNode(div_1, target, anchor);
},
p: function update(changed, state) {
p: function update(changed, ctx) {
if (changed.style) {
div.style.cssText = state.style;
div.style.cssText = ctx.style;
}
if ((changed.key || changed.value) && div_1_style_value !== (div_1_style_value = "" + state.key + ": " + state.value)) {
if ((changed.key || changed.value) && div_1_style_value !== (div_1_style_value = "" + ctx.key + ": " + ctx.value)) {
div_1.style.cssText = div_1_style_value;
}
},

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var div, text, div_1, div_1_style_value;
return {
@ -13,8 +13,8 @@ function create_main_fragment(component, state) {
},
h: function hydrate() {
div.style.cssText = state.style;
div_1.style.cssText = div_1_style_value = "" + state.key + ": " + state.value;
div.style.cssText = ctx.style;
div_1.style.cssText = div_1_style_value = "" + ctx.key + ": " + ctx.value;
},
m: function mount(target, anchor) {
@ -23,12 +23,12 @@ function create_main_fragment(component, state) {
insertNode(div_1, target, anchor);
},
p: function update(changed, state) {
p: function update(changed, ctx) {
if (changed.style) {
div.style.cssText = state.style;
div.style.cssText = ctx.style;
}
if ((changed.key || changed.value) && div_1_style_value !== (div_1_style_value = "" + state.key + ": " + state.value)) {
if ((changed.key || changed.value) && div_1_style_value !== (div_1_style_value = "" + ctx.key + ": " + ctx.value)) {
div_1.style.cssText = div_1_style_value;
}
},

@ -147,7 +147,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var input;
function input_change_handler() {
@ -168,11 +168,11 @@ function create_main_fragment(component, state) {
m: function mount(target, anchor) {
insertNode(input, target, anchor);
input.checked = state.foo;
input.checked = ctx.foo;
},
p: function update(changed, state) {
input.checked = state.foo;
p: function update(changed, ctx) {
input.checked = ctx.foo;
},
u: function unmount() {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { addListener, assign, createElement, detachNode, init, insertNode, proto, removeListener, setAttribute } from "svelte/shared.js";
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var input;
function input_change_handler() {
@ -22,11 +22,11 @@ function create_main_fragment(component, state) {
m: function mount(target, anchor) {
insertNode(input, target, anchor);
input.checked = state.foo;
input.checked = ctx.foo;
},
p: function update(changed, state) {
input.checked = state.foo;
p: function update(changed, ctx) {
input.checked = ctx.foo;
},
u: function unmount() {

@ -141,7 +141,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var input;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto, setInputType } from "svelte/shared.js";
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var input;
return {

@ -151,7 +151,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var audio, audio_is_paused = true, audio_updating = false, audio_animationframe;
function audio_timeupdate_handler() {
@ -194,28 +194,28 @@ function create_main_fragment(component, state) {
h: function hydrate() {
addListener(audio, "timeupdate", audio_timeupdate_handler);
if (!('played' in state && 'currentTime' in state)) component.root._beforecreate.push(audio_timeupdate_handler);
if (!('played' in ctx && 'currentTime' in ctx)) component.root._beforecreate.push(audio_timeupdate_handler);
addListener(audio, "durationchange", audio_durationchange_handler);
if (!('duration' in state)) component.root._beforecreate.push(audio_durationchange_handler);
if (!('duration' in ctx)) component.root._beforecreate.push(audio_durationchange_handler);
addListener(audio, "play", audio_play_pause_handler);
addListener(audio, "pause", audio_play_pause_handler);
addListener(audio, "progress", audio_progress_handler);
if (!('buffered' in state)) component.root._beforecreate.push(audio_progress_handler);
if (!('buffered' in ctx)) component.root._beforecreate.push(audio_progress_handler);
addListener(audio, "loadedmetadata", audio_loadedmetadata_handler);
if (!('buffered' in state && 'seekable' in state)) component.root._beforecreate.push(audio_loadedmetadata_handler);
if (!('buffered' in ctx && 'seekable' in ctx)) component.root._beforecreate.push(audio_loadedmetadata_handler);
addListener(audio, "volumechange", audio_volumechange_handler);
},
m: function mount(target, anchor) {
insertNode(audio, target, anchor);
audio.volume = state.volume;
audio.volume = ctx.volume;
},
p: function update(changed, state) {
if (!audio_updating && !isNaN(state.currentTime )) audio.currentTime = state.currentTime ;
if (!audio_updating && audio_is_paused !== (audio_is_paused = state.paused )) audio[audio_is_paused ? "pause" : "play"]();
if (!audio_updating && !isNaN(state.volume)) audio.volume = state.volume;
p: function update(changed, ctx) {
if (!audio_updating && !isNaN(ctx.currentTime )) audio.currentTime = ctx.currentTime ;
if (!audio_updating && audio_is_paused !== (audio_is_paused = ctx.paused )) audio[audio_is_paused ? "pause" : "play"]();
if (!audio_updating && !isNaN(ctx.volume)) audio.volume = ctx.volume;
},
u: function unmount() {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { addListener, assign, callAll, createElement, detachNode, init, insertNode, proto, removeListener, timeRangesToArray } from "svelte/shared.js";
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var audio, audio_is_paused = true, audio_updating = false, audio_animationframe;
function audio_timeupdate_handler() {
@ -44,28 +44,28 @@ function create_main_fragment(component, state) {
h: function hydrate() {
addListener(audio, "timeupdate", audio_timeupdate_handler);
if (!('played' in state && 'currentTime' in state)) component.root._beforecreate.push(audio_timeupdate_handler);
if (!('played' in ctx && 'currentTime' in ctx)) component.root._beforecreate.push(audio_timeupdate_handler);
addListener(audio, "durationchange", audio_durationchange_handler);
if (!('duration' in state)) component.root._beforecreate.push(audio_durationchange_handler);
if (!('duration' in ctx)) component.root._beforecreate.push(audio_durationchange_handler);
addListener(audio, "play", audio_play_pause_handler);
addListener(audio, "pause", audio_play_pause_handler);
addListener(audio, "progress", audio_progress_handler);
if (!('buffered' in state)) component.root._beforecreate.push(audio_progress_handler);
if (!('buffered' in ctx)) component.root._beforecreate.push(audio_progress_handler);
addListener(audio, "loadedmetadata", audio_loadedmetadata_handler);
if (!('buffered' in state && 'seekable' in state)) component.root._beforecreate.push(audio_loadedmetadata_handler);
if (!('buffered' in ctx && 'seekable' in ctx)) component.root._beforecreate.push(audio_loadedmetadata_handler);
addListener(audio, "volumechange", audio_volumechange_handler);
},
m: function mount(target, anchor) {
insertNode(audio, target, anchor);
audio.volume = state.volume;
audio.volume = ctx.volume;
},
p: function update(changed, state) {
if (!audio_updating && !isNaN(state.currentTime )) audio.currentTime = state.currentTime ;
if (!audio_updating && audio_is_paused !== (audio_is_paused = state.paused )) audio[audio_is_paused ? "pause" : "play"]();
if (!audio_updating && !isNaN(state.volume)) audio.volume = state.volume;
p: function update(changed, ctx) {
if (!audio_updating && !isNaN(ctx.currentTime )) audio.currentTime = ctx.currentTime ;
if (!audio_updating && audio_is_paused !== (audio_is_paused = ctx.paused )) audio[audio_is_paused ? "pause" : "play"]();
if (!audio_updating && !isNaN(ctx.volume)) audio.volume = ctx.volume;
},
u: function unmount() {

@ -139,7 +139,7 @@ var proto = {
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var text;
var imported = new Imported({

@ -4,7 +4,7 @@ import Imported from 'Imported.html';
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var text;
var imported = new Imported({

@ -139,7 +139,7 @@ function setup(Component) {
Component.prototype.foo( 'baz' );
}
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
return {
c: noop,

@ -17,7 +17,7 @@ function setup(Component) {
Component.prototype.foo( 'baz' );
}
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
return {
c: noop,

@ -28,10 +28,10 @@ SvelteComponent.render = function(state, options = {}) {
};
};
SvelteComponent._render = function(__result, state, options) {
SvelteComponent._render = function(__result, ctx, options) {
__result.addComponent(SvelteComponent);
state = Object.assign({}, state);
ctx = Object.assign({}, ctx);
return ``;
};

@ -32,10 +32,10 @@ SvelteComponent.render = function(state, options = {}) {
};
}
SvelteComponent._render = function(__result, state, options) {
SvelteComponent._render = function(__result, ctx, options) {
__result.addComponent(SvelteComponent);
state = Object.assign({}, state);
ctx = Object.assign({}, ctx);
return ``;
};

@ -25,10 +25,10 @@ SvelteComponent.render = function(state, options = {}) {
};
};
SvelteComponent._render = function(__result, state, options) {
SvelteComponent._render = function(__result, ctx, options) {
__result.addComponent(SvelteComponent);
state = Object.assign({}, state);
ctx = Object.assign({}, ctx);
return `<div>content</div>
<!-- comment -->

@ -28,10 +28,10 @@ SvelteComponent.render = function(state, options = {}) {
};
}
SvelteComponent._render = function(__result, state, options) {
SvelteComponent._render = function(__result, ctx, options) {
__result.addComponent(SvelteComponent);
state = Object.assign({}, state);
ctx = Object.assign({}, ctx);
return `<div>content</div>
<!-- comment -->

@ -143,7 +143,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var svg, title, text;
return {

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createSvgElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var svg, title, text;
return {

@ -123,18 +123,18 @@ var proto = {
/* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var title_value;
document.title = title_value = "a " + state.custom + " title";
document.title = title_value = "a " + ctx.custom + " title";
return {
c: noop,
m: noop,
p: function update(changed, state) {
if ((changed.custom) && title_value !== (title_value = "a " + state.custom + " title")) {
p: function update(changed, ctx) {
if ((changed.custom) && title_value !== (title_value = "a " + ctx.custom + " title")) {
document.title = title_value;
}
},

@ -1,18 +1,18 @@
/* generated by Svelte vX.Y.Z */
import { assign, init, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var title_value;
document.title = title_value = "a " + state.custom + " title";
document.title = title_value = "a " + ctx.custom + " title";
return {
c: noop,
m: noop,
p: function update(changed, state) {
if ((changed.custom) && title_value !== (title_value = "a " + state.custom + " title")) {
p: function update(changed, ctx) {
if ((changed.custom) && title_value !== (title_value = "a " + ctx.custom + " title")) {
document.title = title_value;
}
},

@ -147,18 +147,18 @@ var proto = {
/* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var div, text, p, text_2, text_3, text_4, p_1, text_6, text_8, if_block_4_anchor;
var if_block = (state.a) && create_if_block(component, state);
var if_block = (ctx.a) && create_if_block(component, ctx);
var if_block_1 = (state.b) && create_if_block_1(component, state);
var if_block_1 = (ctx.b) && create_if_block_1(component, ctx);
var if_block_2 = (state.c) && create_if_block_2(component, state);
var if_block_2 = (ctx.c) && create_if_block_2(component, ctx);
var if_block_3 = (state.d) && create_if_block_3(component, state);
var if_block_3 = (ctx.d) && create_if_block_3(component, ctx);
var if_block_4 = (state.e) && create_if_block_4(component, state);
var if_block_4 = (ctx.e) && create_if_block_4(component, ctx);
return {
c: function create() {
@ -199,10 +199,10 @@ function create_main_fragment(component, state) {
insertNode(if_block_4_anchor, target, anchor);
},
p: function update(changed, state) {
if (state.a) {
p: function update(changed, ctx) {
if (ctx.a) {
if (!if_block) {
if_block = create_if_block(component, state);
if_block = create_if_block(component, ctx);
if_block.c();
if_block.m(div, text);
}
@ -212,9 +212,9 @@ function create_main_fragment(component, state) {
if_block = null;
}
if (state.b) {
if (ctx.b) {
if (!if_block_1) {
if_block_1 = create_if_block_1(component, state);
if_block_1 = create_if_block_1(component, ctx);
if_block_1.c();
if_block_1.m(div, text_3);
}
@ -224,9 +224,9 @@ function create_main_fragment(component, state) {
if_block_1 = null;
}
if (state.c) {
if (ctx.c) {
if (!if_block_2) {
if_block_2 = create_if_block_2(component, state);
if_block_2 = create_if_block_2(component, ctx);
if_block_2.c();
if_block_2.m(div, text_4);
}
@ -236,9 +236,9 @@ function create_main_fragment(component, state) {
if_block_2 = null;
}
if (state.d) {
if (ctx.d) {
if (!if_block_3) {
if_block_3 = create_if_block_3(component, state);
if_block_3 = create_if_block_3(component, ctx);
if_block_3.c();
if_block_3.m(div, null);
}
@ -248,9 +248,9 @@ function create_main_fragment(component, state) {
if_block_3 = null;
}
if (state.e) {
if (ctx.e) {
if (!if_block_4) {
if_block_4 = create_if_block_4(component, state);
if_block_4 = create_if_block_4(component, ctx);
if_block_4.c();
if_block_4.m(if_block_4_anchor.parentNode, if_block_4_anchor);
}
@ -283,7 +283,7 @@ function create_main_fragment(component, state) {
}
// (2:1) {#if a}
function create_if_block(component, state) {
function create_if_block(component, ctx) {
var p;
return {
@ -305,7 +305,7 @@ function create_if_block(component, state) {
}
// (8:1) {#if b}
function create_if_block_1(component, state) {
function create_if_block_1(component, ctx) {
var p;
return {
@ -327,7 +327,7 @@ function create_if_block_1(component, state) {
}
// (12:1) {#if c}
function create_if_block_2(component, state) {
function create_if_block_2(component, ctx) {
var p;
return {
@ -349,7 +349,7 @@ function create_if_block_2(component, state) {
}
// (18:1) {#if d}
function create_if_block_3(component, state) {
function create_if_block_3(component, ctx) {
var p;
return {
@ -371,7 +371,7 @@ function create_if_block_3(component, state) {
}
// (25:0) {#if e}
function create_if_block_4(component, state) {
function create_if_block_4(component, ctx) {
var p;
return {

@ -1,18 +1,18 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createComment, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var div, text, p, text_2, text_3, text_4, p_1, text_6, text_8, if_block_4_anchor;
var if_block = (state.a) && create_if_block(component, state);
var if_block = (ctx.a) && create_if_block(component, ctx);
var if_block_1 = (state.b) && create_if_block_1(component, state);
var if_block_1 = (ctx.b) && create_if_block_1(component, ctx);
var if_block_2 = (state.c) && create_if_block_2(component, state);
var if_block_2 = (ctx.c) && create_if_block_2(component, ctx);
var if_block_3 = (state.d) && create_if_block_3(component, state);
var if_block_3 = (ctx.d) && create_if_block_3(component, ctx);
var if_block_4 = (state.e) && create_if_block_4(component, state);
var if_block_4 = (ctx.e) && create_if_block_4(component, ctx);
return {
c: function create() {
@ -53,10 +53,10 @@ function create_main_fragment(component, state) {
insertNode(if_block_4_anchor, target, anchor);
},
p: function update(changed, state) {
if (state.a) {
p: function update(changed, ctx) {
if (ctx.a) {
if (!if_block) {
if_block = create_if_block(component, state);
if_block = create_if_block(component, ctx);
if_block.c();
if_block.m(div, text);
}
@ -66,9 +66,9 @@ function create_main_fragment(component, state) {
if_block = null;
}
if (state.b) {
if (ctx.b) {
if (!if_block_1) {
if_block_1 = create_if_block_1(component, state);
if_block_1 = create_if_block_1(component, ctx);
if_block_1.c();
if_block_1.m(div, text_3);
}
@ -78,9 +78,9 @@ function create_main_fragment(component, state) {
if_block_1 = null;
}
if (state.c) {
if (ctx.c) {
if (!if_block_2) {
if_block_2 = create_if_block_2(component, state);
if_block_2 = create_if_block_2(component, ctx);
if_block_2.c();
if_block_2.m(div, text_4);
}
@ -90,9 +90,9 @@ function create_main_fragment(component, state) {
if_block_2 = null;
}
if (state.d) {
if (ctx.d) {
if (!if_block_3) {
if_block_3 = create_if_block_3(component, state);
if_block_3 = create_if_block_3(component, ctx);
if_block_3.c();
if_block_3.m(div, null);
}
@ -102,9 +102,9 @@ function create_main_fragment(component, state) {
if_block_3 = null;
}
if (state.e) {
if (ctx.e) {
if (!if_block_4) {
if_block_4 = create_if_block_4(component, state);
if_block_4 = create_if_block_4(component, ctx);
if_block_4.c();
if_block_4.m(if_block_4_anchor.parentNode, if_block_4_anchor);
}
@ -137,7 +137,7 @@ function create_main_fragment(component, state) {
}
// (2:1) {#if a}
function create_if_block(component, state) {
function create_if_block(component, ctx) {
var p;
return {
@ -159,7 +159,7 @@ function create_if_block(component, state) {
}
// (8:1) {#if b}
function create_if_block_1(component, state) {
function create_if_block_1(component, ctx) {
var p;
return {
@ -181,7 +181,7 @@ function create_if_block_1(component, state) {
}
// (12:1) {#if c}
function create_if_block_2(component, state) {
function create_if_block_2(component, ctx) {
var p;
return {
@ -203,7 +203,7 @@ function create_if_block_2(component, state) {
}
// (18:1) {#if d}
function create_if_block_3(component, state) {
function create_if_block_3(component, ctx) {
var p;
return {
@ -225,7 +225,7 @@ function create_if_block_3(component, state) {
}
// (25:0) {#if e}
function create_if_block_4(component, state) {
function create_if_block_4(component, ctx) {
var p;
return {

@ -143,7 +143,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var window_updating = false, clear_window_updating = function() { window_updating = false; }, window_updating_timeout, p, text, text_1;
function onwindowscroll(event) {
@ -170,7 +170,7 @@ function create_main_fragment(component, state) {
c: function create() {
p = createElement("p");
text = createText("scrolled to ");
text_1 = createText(state.y);
text_1 = createText(ctx.y);
},
m: function mount(target, anchor) {
@ -179,9 +179,9 @@ function create_main_fragment(component, state) {
appendNode(text_1, p);
},
p: function update(changed, state) {
p: function update(changed, ctx) {
if (changed.y) {
text_1.data = state.y;
text_1.data = ctx.y;
}
},

@ -1,7 +1,7 @@
/* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, createText, detachNode, init, insertNode, proto } from "svelte/shared.js";
function create_main_fragment(component, state) {
function create_main_fragment(component, ctx) {
var window_updating = false, clear_window_updating = function() { window_updating = false; }, window_updating_timeout, p, text, text_1;
function onwindowscroll(event) {
@ -28,7 +28,7 @@ function create_main_fragment(component, state) {
c: function create() {
p = createElement("p");
text = createText("scrolled to ");
text_1 = createText(state.y);
text_1 = createText(ctx.y);
},
m: function mount(target, anchor) {
@ -37,9 +37,9 @@ function create_main_fragment(component, state) {
appendNode(text_1, p);
},
p: function update(changed, state) {
p: function update(changed, ctx) {
if (changed.y) {
text_1.data = state.y;
text_1.data = ctx.y;
}
},

Loading…
Cancel
Save