Merge pull request from sveltejs/gh-2144

default to accessors: false
pull/2247/head
Rich Harris 6 years ago committed by GitHub
commit f6607bea40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -26,6 +26,7 @@ type ComponentOptions = {
namespace?: string; namespace?: string;
tag?: string; tag?: string;
immutable?: boolean; immutable?: boolean;
accessors?: boolean;
}; };
// We need to tell estree-walker that it should always // We need to tell estree-walker that it should always
@ -52,6 +53,7 @@ export default class Component {
componentOptions: ComponentOptions; componentOptions: ComponentOptions;
namespace: string; namespace: string;
tag: string; tag: string;
accessors: boolean;
vars: Var[] = []; vars: Var[] = [];
var_lookup: Map<string, Var> = new Map(); var_lookup: Map<string, Var> = new Map();
@ -1155,7 +1157,10 @@ export default class Component {
function process_component_options(component: Component, nodes) { function process_component_options(component: Component, nodes) {
const componentOptions: ComponentOptions = { const componentOptions: ComponentOptions = {
immutable: component.compileOptions.immutable || false immutable: component.compileOptions.immutable || false,
accessors: 'accessors' in component.compileOptions
? component.compileOptions.accessors
: !!component.compileOptions.customElement
}; };
const node = nodes.find(node => node.name === 'svelte:options'); const node = nodes.find(node => node.name === 'svelte:options');
@ -1229,14 +1234,15 @@ function process_component_options(component: Component, nodes) {
break; break;
} }
case 'accessors':
case 'immutable': case 'immutable':
const code = `invalid-immutable-value`; const code = `invalid-${name}-value`;
const message = `immutable attribute must be true or false` const message = `${name} attribute must be true or false`
const value = get_value(attribute, code, message); const value = get_value(attribute, code, message);
if (typeof value !== 'boolean') component.error(attribute, { code, message }); if (typeof value !== 'boolean') component.error(attribute, { code, message });
componentOptions.immutable = value; componentOptions[name] = value;
break; break;
default: default:
@ -1250,7 +1256,7 @@ function process_component_options(component: Component, nodes) {
else { else {
component.error(attribute, { component.error(attribute, {
code: `invalid-options-attribute`, code: `invalid-options-attribute`,
message: `<svelte:options> can only have static 'tag', 'namespace' and 'immutable' attributes` message: `<svelte:options> can only have static 'tag', 'namespace', 'accessors' and 'immutable' attributes`
}); });
} }
}); });

@ -16,6 +16,7 @@ const valid_options = [
'cssOutputFilename', 'cssOutputFilename',
'sveltePath', 'sveltePath',
'dev', 'dev',
'accessors',
'immutable', 'immutable',
'hydratable', 'hydratable',
'legacy', 'legacy',

@ -102,7 +102,7 @@ export default function dom(
return ${x.name}; return ${x.name};
} }
`); `);
} else { } else if (component.componentOptions.accessors) {
body.push(deindent` body.push(deindent`
get ${x.export_name}() { get ${x.export_name}() {
return this.$$.ctx.${x.name}; return this.$$.ctx.${x.name};
@ -111,12 +111,14 @@ export default function dom(
} }
if (variable.writable && !renderer.readonly.has(x.export_name)) { if (variable.writable && !renderer.readonly.has(x.export_name)) {
body.push(deindent` if (component.componentOptions.accessors) {
set ${x.export_name}(${x.name}) { body.push(deindent`
this.$set({ ${x.name} }); set ${x.export_name}(${x.name}) {
@flush(); this.$set({ ${x.name} });
} @flush();
`); }
`);
}
} else if (component.compileOptions.dev) { } else if (component.compileOptions.dev) {
body.push(deindent` body.push(deindent`
set ${x.export_name}(value) { set ${x.export_name}(value) {

@ -49,6 +49,7 @@ export interface CompileOptions {
sveltePath?: string; sveltePath?: string;
dev?: boolean; dev?: boolean;
accessors?: boolean;
immutable?: boolean; immutable?: boolean;
hydratable?: boolean; hydratable?: boolean;
legacy?: boolean; legacy?: boolean;

@ -1,3 +1,5 @@
<svelte:options accessors/>
<script> <script>
export let h1; export let h1;
</script> </script>

@ -1,3 +1,5 @@
<svelte:options accessors={true}/>
<script> <script>
export let foo; export let foo;
export let bar; export let bar;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, createElement, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal";
function create_fragment(ctx) { function create_fragment(ctx) {
var button, foo_action; var button, foo_action;
@ -56,15 +56,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["bar"]); init(this, options, instance, create_fragment, safe_not_equal, ["bar"]);
} }
get bar() {
return this.$$.ctx.bar;
}
set bar(bar) {
this.$set({ bar });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, addResizeListener, add_render_callback, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, addResizeListener, add_render_callback, createElement, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal";
function create_fragment(ctx) { function create_fragment(ctx) {
var div, div_resize_listener; var div, div_resize_listener;
@ -53,24 +53,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["w", "h"]); init(this, options, instance, create_fragment, safe_not_equal, ["w", "h"]);
} }
get w() {
return this.$$.ctx.w;
}
set w(w) {
this.$set({ w });
flush();
}
get h() {
return this.$$.ctx.h;
}
set h(h) {
this.$set({ h });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal";
function add_css() { function add_css() {
var style = createElement("style"); var style = createElement("style");
@ -56,15 +56,6 @@ class SvelteComponent extends SvelteComponent_1 {
if (!document.getElementById("svelte-1a7i8ec-style")) add_css(); if (!document.getElementById("svelte-1a7i8ec-style")) add_css();
init(this, options, instance, create_fragment, safe_not_equal, ["foo"]); init(this, options, instance, create_fragment, safe_not_equal, ["foo"]);
} }
get foo() {
return this.$$.ctx.foo;
}
set foo(foo) {
this.$set({ foo });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, flush, init, noop, safe_not_equal } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, init, noop, safe_not_equal } from "svelte/internal";
function create_fragment(ctx) { function create_fragment(ctx) {
return { return {
@ -35,23 +35,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["x", "a", "b"]); init(this, options, instance, create_fragment, safe_not_equal, ["x", "a", "b"]);
} }
get x() {
return this.$$.ctx.x;
}
set x(x) {
this.$set({ x });
flush();
}
get a() {
return this.$$.ctx.a;
}
get b() {
return this.$$.ctx.b;
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponentDev, addLoc, append, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; import { SvelteComponentDev, addLoc, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal";
const file = undefined; const file = undefined;
@ -70,15 +70,6 @@ class SvelteComponent extends SvelteComponentDev {
console.warn("<SvelteComponent> was created without expected prop 'name'"); console.warn("<SvelteComponent> was created without expected prop 'name'");
} }
} }
get name() {
return this.$$.ctx.name;
}
set name(name) {
this.$set({ name });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponentDev, addLoc, append, createElement, createText, destroyEach, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; import { SvelteComponentDev, addLoc, append, createElement, createText, destroyEach, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal";
const file = undefined; const file = undefined;
@ -167,42 +167,6 @@ class SvelteComponent extends SvelteComponentDev {
console.warn("<SvelteComponent> was created without expected prop 'baz'"); console.warn("<SvelteComponent> was created without expected prop 'baz'");
} }
} }
get things() {
return this.$$.ctx.things;
}
set things(things) {
this.$set({ things });
flush();
}
get foo() {
return this.$$.ctx.foo;
}
set foo(foo) {
this.$set({ foo });
flush();
}
get bar() {
return this.$$.ctx.bar;
}
set bar(bar) {
this.$set({ bar });
flush();
}
get baz() {
return this.$$.ctx.baz;
}
set baz(baz) {
this.$set({ baz });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponentDev, addLoc, append, createElement, createText, destroyEach, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; import { SvelteComponentDev, addLoc, append, createElement, createText, destroyEach, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal";
const file = undefined; const file = undefined;
@ -159,24 +159,6 @@ class SvelteComponent extends SvelteComponentDev {
console.warn("<SvelteComponent> was created without expected prop 'foo'"); console.warn("<SvelteComponent> was created without expected prop 'foo'");
} }
} }
get things() {
return this.$$.ctx.things;
}
set things(things) {
this.$set({ things });
flush();
}
get foo() {
return this.$$.ctx.foo;
}
set foo(foo) {
this.$set({ foo });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, append, createComment, createElement as createElement_1, createText, destroyEach, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, append, createComment, createElement as createElement_1, createText, destroyEach, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal";
function get_each_context(ctx, list, i) { function get_each_context(ctx, list, i) {
const child_ctx = Object.create(ctx); const child_ctx = Object.create(ctx);
@ -115,15 +115,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["createElement"]); init(this, options, instance, create_fragment, safe_not_equal, ["createElement"]);
} }
get createElement() {
return this.$$.ctx.createElement;
}
set createElement(createElement) {
this.$set({ createElement });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, flush, init, noop, safe_not_equal } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, init, noop, safe_not_equal } from "svelte/internal";
import { onMount } from "svelte"; import { onMount } from "svelte";
function create_fragment(ctx) { function create_fragment(ctx) {
@ -32,15 +32,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["foo"]); init(this, options, instance, create_fragment, safe_not_equal, ["foo"]);
} }
get foo() {
return this.$$.ctx.foo;
}
set foo(foo) {
this.$set({ foo });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponentDev, addLoc, append, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; import { SvelteComponentDev, addLoc, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal";
const file = undefined; const file = undefined;
@ -76,15 +76,6 @@ class SvelteComponent extends SvelteComponentDev {
console.warn("<SvelteComponent> was created without expected prop 'foo'"); console.warn("<SvelteComponent> was created without expected prop 'foo'");
} }
} }
get foo() {
return this.$$.ctx.foo;
}
set foo(foo) {
this.$set({ foo });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal";
function create_fragment(ctx) { function create_fragment(ctx) {
var div0, text, div1; var div0, text, div1;
@ -53,15 +53,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["bar"]); init(this, options, instance, create_fragment, safe_not_equal, ["bar"]);
} }
get bar() {
return this.$$.ctx.bar;
}
set bar(bar) {
this.$set({ bar });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal";
function create_fragment(ctx) { function create_fragment(ctx) {
var div0, text, div1; var div0, text, div1;
@ -53,15 +53,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["bar"]); init(this, options, instance, create_fragment, safe_not_equal, ["bar"]);
} }
get bar() {
return this.$$.ctx.bar;
}
set bar(bar) {
this.$set({ bar });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, append, createSvgElement, detachNode, flush, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, append, createSvgElement, detachNode, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal";
function create_fragment(ctx) { function create_fragment(ctx) {
var svg, g0, g1; var svg, g0, g1;
@ -51,15 +51,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["bar"]); init(this, options, instance, create_fragment, safe_not_equal, ["bar"]);
} }
get bar() {
return this.$$.ctx.bar;
}
set bar(bar) {
this.$set({ bar });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, append, createComment, createElement, createText, destroyEach, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, append, createComment, createElement, createText, destroyEach, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal";
function get_each_context(ctx, list, i) { function get_each_context(ctx, list, i) {
const child_ctx = Object.create(ctx); const child_ctx = Object.create(ctx);
@ -118,51 +118,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["a", "b", "c", "d", "e"]); init(this, options, instance, create_fragment, safe_not_equal, ["a", "b", "c", "d", "e"]);
} }
get a() {
return this.$$.ctx.a;
}
set a(a) {
this.$set({ a });
flush();
}
get b() {
return this.$$.ctx.b;
}
set b(b) {
this.$set({ b });
flush();
}
get c() {
return this.$$.ctx.c;
}
set c(c) {
this.$set({ c });
flush();
}
get d() {
return this.$$.ctx.d;
}
set d(d) {
this.$set({ d });
flush();
}
get e() {
return this.$$.ctx.e;
}
set e(e) {
this.$set({ e });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, append, createElement, createText, destroyEach, detachAfter, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, append, createElement, createText, destroyEach, detachAfter, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal";
function get_each_context(ctx, list, i) { function get_each_context(ctx, list, i) {
const child_ctx = Object.create(ctx); const child_ctx = Object.create(ctx);
@ -158,42 +158,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["comments", "elapsed", "time", "foo"]); init(this, options, instance, create_fragment, safe_not_equal, ["comments", "elapsed", "time", "foo"]);
} }
get comments() {
return this.$$.ctx.comments;
}
set comments(comments) {
this.$set({ comments });
flush();
}
get elapsed() {
return this.$$.ctx.elapsed;
}
set elapsed(elapsed) {
this.$set({ elapsed });
flush();
}
get time() {
return this.$$.ctx.time;
}
set time(time) {
this.$set({ time });
flush();
}
get foo() {
return this.$$.ctx.foo;
}
set foo(foo) {
this.$set({ foo });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, append, blankObject, createComment, createElement, createText, create_animation, detachNode, fixAndOutroAndDestroyBlock, fix_position, flush, init, insert, noop, safe_not_equal, setData, updateKeyedEach } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, append, blankObject, createComment, createElement, createText, create_animation, detachNode, fixAndOutroAndDestroyBlock, fix_position, init, insert, noop, safe_not_equal, setData, updateKeyedEach } from "svelte/internal";
function get_each_context(ctx, list, i) { function get_each_context(ctx, list, i) {
const child_ctx = Object.create(ctx); const child_ctx = Object.create(ctx);
@ -130,15 +130,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["things"]); init(this, options, instance, create_fragment, safe_not_equal, ["things"]);
} }
get things() {
return this.$$.ctx.things;
}
set things(things) {
this.$set({ things });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, append, blankObject, createComment, createElement, createText, destroyBlock, detachNode, flush, init, insert, noop, safe_not_equal, setData, updateKeyedEach } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, append, blankObject, createComment, createElement, createText, destroyBlock, detachNode, init, insert, noop, safe_not_equal, setData, updateKeyedEach } from "svelte/internal";
function get_each_context(ctx, list, i) { function get_each_context(ctx, list, i) {
const child_ctx = Object.create(ctx); const child_ctx = Object.create(ctx);
@ -100,15 +100,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["things"]); init(this, options, instance, create_fragment, safe_not_equal, ["things"]);
} }
get things() {
return this.$$.ctx.things;
}
set things(things) {
this.$set({ things });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, createComment, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, createComment, createElement, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal";
// (7:0) {:else} // (7:0) {:else}
function create_else_block(ctx) { function create_else_block(ctx) {
@ -106,15 +106,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["foo"]); init(this, options, instance, create_fragment, safe_not_equal, ["foo"]);
} }
get foo() {
return this.$$.ctx.foo;
}
set foo(foo) {
this.$set({ foo });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, createComment, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, createComment, createElement, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal";
// (5:0) {#if foo} // (5:0) {#if foo}
function create_if_block(ctx) { function create_if_block(ctx) {
@ -80,15 +80,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["foo"]); init(this, options, instance, create_fragment, safe_not_equal, ["foo"]);
} }
get foo() {
return this.$$.ctx.foo;
}
set foo(foo) {
this.$set({ foo });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setStyle } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, createElement, detachNode, init, insert, noop, safe_not_equal, setStyle } from "svelte/internal";
function create_fragment(ctx) { function create_fragment(ctx) {
var div; var div;
@ -53,33 +53,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["color", "x", "y"]); init(this, options, instance, create_fragment, safe_not_equal, ["color", "x", "y"]);
} }
get color() {
return this.$$.ctx.color;
}
set color(color) {
this.$set({ color });
flush();
}
get x() {
return this.$$.ctx.x;
}
set x(x) {
this.$set({ x });
flush();
}
get y() {
return this.$$.ctx.y;
}
set y(y) {
this.$set({ y });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setStyle } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, createElement, detachNode, init, insert, noop, safe_not_equal, setStyle } from "svelte/internal";
function create_fragment(ctx) { function create_fragment(ctx) {
var div; var div;
@ -46,15 +46,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["data"]); init(this, options, instance, create_fragment, safe_not_equal, ["data"]);
} }
get data() {
return this.$$.ctx.data;
}
set data(data) {
this.$set({ data });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setStyle } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, createElement, detachNode, init, insert, noop, safe_not_equal, setStyle } from "svelte/internal";
function create_fragment(ctx) { function create_fragment(ctx) {
var div; var div;
@ -46,15 +46,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["color"]); init(this, options, instance, create_fragment, safe_not_equal, ["color"]);
} }
get color() {
return this.$$.ctx.color;
}
set color(color) {
this.$set({ color });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, createElement, createText, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal";
function create_fragment(ctx) { function create_fragment(ctx) {
var div0, text, div1, div1_style_value; var div0, text, div1, div1_style_value;
@ -59,33 +59,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["style", "key", "value"]); init(this, options, instance, create_fragment, safe_not_equal, ["style", "key", "value"]);
} }
get style() {
return this.$$.ctx.style;
}
set style(style) {
this.$set({ style });
flush();
}
get key() {
return this.$$.ctx.key;
}
set key(key) {
this.$set({ key });
flush();
}
get value() {
return this.$$.ctx.value;
}
set value(value) {
this.$set({ value });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal";
function create_fragment(ctx) { function create_fragment(ctx) {
var input, dispose; var input, dispose;
@ -50,15 +50,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["files"]); init(this, options, instance, create_fragment, safe_not_equal, ["files"]);
} }
get files() {
return this.$$.ctx.files;
}
set files(files) {
this.$set({ files });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, noop, run_all, safe_not_equal, setAttribute, toNumber } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, init, insert, noop, run_all, safe_not_equal, setAttribute, toNumber } from "svelte/internal";
function create_fragment(ctx) { function create_fragment(ctx) {
var input, dispose; var input, dispose;
@ -58,15 +58,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["value"]); init(this, options, instance, create_fragment, safe_not_equal, ["value"]);
} }
get value() {
return this.$$.ctx.value;
}
set value(value) {
this.$set({ value });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, flush, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, addListener, createElement, detachNode, init, insert, noop, safe_not_equal, setAttribute } from "svelte/internal";
function create_fragment(ctx) { function create_fragment(ctx) {
var input, dispose; var input, dispose;
@ -54,15 +54,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["foo"]); init(this, options, instance, create_fragment, safe_not_equal, ["foo"]);
} }
get foo() {
return this.$$.ctx.foo;
}
set foo(foo) {
this.$set({ foo });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, addListener, add_render_callback, createElement, detachNode, flush, init, insert, noop, run_all, safe_not_equal, timeRangesToArray } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, addListener, add_render_callback, createElement, detachNode, init, insert, noop, run_all, safe_not_equal, timeRangesToArray } from "svelte/internal";
function create_fragment(ctx) { function create_fragment(ctx) {
var audio, audio_updating = false, audio_animationframe, audio_is_paused = true, dispose; var audio, audio_updating = false, audio_animationframe, audio_is_paused = true, dispose;
@ -125,69 +125,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["buffered", "seekable", "played", "currentTime", "duration", "paused", "volume"]); init(this, options, instance, create_fragment, safe_not_equal, ["buffered", "seekable", "played", "currentTime", "duration", "paused", "volume"]);
} }
get buffered() {
return this.$$.ctx.buffered;
}
set buffered(buffered) {
this.$set({ buffered });
flush();
}
get seekable() {
return this.$$.ctx.seekable;
}
set seekable(seekable) {
this.$set({ seekable });
flush();
}
get played() {
return this.$$.ctx.played;
}
set played(played) {
this.$set({ played });
flush();
}
get currentTime() {
return this.$$.ctx.currentTime;
}
set currentTime(currentTime) {
this.$set({ currentTime });
flush();
}
get duration() {
return this.$$.ctx.duration;
}
set duration(duration) {
this.$set({ duration });
flush();
}
get paused() {
return this.$$.ctx.paused;
}
set paused(paused) {
this.$set({ paused });
flush();
}
get volume() {
return this.$$.ctx.volume;
}
set volume(volume) {
this.$set({ volume });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, flush, init, noop, safe_not_equal } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, init, noop, safe_not_equal } from "svelte/internal";
function create_fragment(ctx) { function create_fragment(ctx) {
return { return {
@ -39,15 +39,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["x"]); init(this, options, instance, create_fragment, safe_not_equal, ["x"]);
} }
get x() {
return this.$$.ctx.x;
}
set x(x) {
this.$set({ x });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, append, createElement, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal";
function create_fragment(ctx) { function create_fragment(ctx) {
var select, option0, option1, select_value_value; var select, option0, option1, select_value_value;
@ -72,15 +72,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["current"]); init(this, options, instance, create_fragment, safe_not_equal, ["current"]);
} }
get current() {
return this.$$.ctx.current;
}
set current(current) {
this.$set({ current });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, flush, init, noop, safe_not_equal } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, init, noop, safe_not_equal } from "svelte/internal";
function create_fragment(ctx) { function create_fragment(ctx) {
var title_value; var title_value;
@ -37,15 +37,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["custom"]); init(this, options, instance, create_fragment, safe_not_equal, ["custom"]);
} }
get custom() {
return this.$$.ctx.custom;
}
set custom(custom) {
this.$set({ custom });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, add_render_callback, createComment, createElement, create_in_transition, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, add_render_callback, createComment, createElement, create_in_transition, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal";
// (8:0) {#if x} // (8:0) {#if x}
function create_if_block(ctx) { function create_if_block(ctx) {
@ -141,24 +141,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["x", "y"]); init(this, options, instance, create_fragment, safe_not_equal, ["x", "y"]);
} }
get x() {
return this.$$.ctx.x;
}
set x(x) {
this.$set({ x });
flush();
}
get y() {
return this.$$.ctx.y;
}
set y(y) {
this.$set({ y });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, append, createComment, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, append, createComment, createElement, createText, detachNode, init, insert, noop, safe_not_equal } from "svelte/internal";
// (10:1) {#if a} // (10:1) {#if a}
function create_if_block_4(ctx) { function create_if_block_4(ctx) {
@ -265,51 +265,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["a", "b", "c", "d", "e"]); init(this, options, instance, create_fragment, safe_not_equal, ["a", "b", "c", "d", "e"]);
} }
get a() {
return this.$$.ctx.a;
}
set a(a) {
this.$set({ a });
flush();
}
get b() {
return this.$$.ctx.b;
}
set b(b) {
this.$set({ b });
flush();
}
get c() {
return this.$$.ctx.c;
}
set c(c) {
this.$set({ c });
flush();
}
get d() {
return this.$$.ctx.d;
}
set d(d) {
this.$set({ d });
flush();
}
get e() {
return this.$$.ctx.e;
}
set e(e) {
this.$set({ e });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, addListener, add_render_callback, append, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal"; import { SvelteComponent as SvelteComponent_1, addListener, add_render_callback, append, createElement, createText, detachNode, init, insert, noop, safe_not_equal, setData } from "svelte/internal";
function create_fragment(ctx) { function create_fragment(ctx) {
var scrolling = false, clear_scrolling = () => { scrolling = false }, scrolling_timeout, p, text0, text1, dispose; var scrolling = false, clear_scrolling = () => { scrolling = false }, scrolling_timeout, p, text0, text1, dispose;
@ -70,15 +70,6 @@ class SvelteComponent extends SvelteComponent_1 {
super(); super();
init(this, options, instance, create_fragment, safe_not_equal, ["y"]); init(this, options, instance, create_fragment, safe_not_equal, ["y"]);
} }
get y() {
return this.$$.ctx.y;
}
set y(y) {
this.$set({ y });
flush();
}
} }
export default SvelteComponent; export default SvelteComponent;

@ -72,6 +72,7 @@ describe("runtime", () => {
compileOptions.sveltePath = sveltePath; compileOptions.sveltePath = sveltePath;
compileOptions.hydratable = hydrate; compileOptions.hydratable = hydrate;
compileOptions.immutable = config.immutable; compileOptions.immutable = config.immutable;
compileOptions.accessors = 'accessors' in config ? config.accessors : true;
Object.keys(require.cache) Object.keys(require.cache)
.filter(x => x.endsWith(".svelte")) .filter(x => x.endsWith(".svelte"))

Loading…
Cancel
Save