various fixes

pull/859/head
Rich Harris 7 years ago
parent abea37af71
commit 5cd76be290

@ -302,7 +302,7 @@ export default class Generator {
return (expression._dependencies = dependencies); return (expression._dependencies = dependencies);
} }
generate(result: string, options: CompileOptions, { banner = '', name, format }: GenerateOptions ) { generate(result: string, options: CompileOptions, { banner = '', sharedPath, helpers, name, format }: GenerateOptions ) {
const pattern = /\[✂(\d+)-(\d+)$/; const pattern = /\[✂(\d+)-(\d+)$/;
const parts = result.split('✂]'); const parts = result.split('✂]');
@ -316,9 +316,9 @@ export default class Generator {
}); });
} }
const { intro, outro } = getModuleWrapper(format, name, options, this.imports, this.source); const { intro, outro } = getModuleWrapper(format, name, options, banner, sharedPath, helpers, this.imports, this.source);
addString(banner + intro + '\n\n'); addString(intro + '\n\n');
const { filename } = options; const { filename } = options;

@ -326,34 +326,20 @@ export default function dom(
return generator.alias(name); return generator.alias(name);
}); });
let banner = `/* ${options.filename ? `${options.filename} ` : ``}generated by Svelte v${version} */\n`; let helpers;
if (sharedPath) { if (sharedPath) {
const used = Array.from(usedHelpers).sort(); if (format !== 'es' && format !== 'cjs') {
if (format === 'es') { throw new Error(`Components with shared helpers must be compiled with \`format: 'es'\` or \`format: 'cjs'\``);
const names = used.map(name => {
const alias = generator.alias(name);
return name !== alias ? `${name} as ${alias}` : name;
});
banner += `import { ${names.join(', ')} } from ${JSON.stringify(sharedPath)};\n\n`;
} }
const used = Array.from(usedHelpers).sort();
else if (format === 'cjs') { helpers = used.map(name => {
const SHARED = '__shared';
let requires = `var ${SHARED} = require(${JSON.stringify(sharedPath)});`;
used.forEach(name => {
const alias = generator.alias(name); const alias = generator.alias(name);
requires += `\nvar ${alias} = ${SHARED}.${name};`; return { name, alias };
}); });
banner += requires + '\n\n';
}
else {
throw new Error(`Components with shared helpers must be compiled with \`format: 'es'\` or \`format: 'cjs'\``);
}
} else { } else {
let inlineHelpers = '';
usedHelpers.forEach(key => { usedHelpers.forEach(key => {
const str = shared[key]; const str = shared[key];
const code = new MagicString(str); const code = new MagicString(str);
@ -391,19 +377,27 @@ export default function dom(
// special case // special case
const global = `_svelteTransitionManager`; const global = `_svelteTransitionManager`;
banner += `\n\nvar ${generator.alias('transitionManager')} = window.${global} || (window.${global} = ${code});`; inlineHelpers += `var ${generator.alias('transitionManager')} = window.${global} || (window.${global} = ${code});\n\n`;
} else { } else {
const alias = generator.alias(expression.id.name); const alias = generator.alias(expression.id.name);
if (alias !== expression.id.name) if (alias !== expression.id.name)
code.overwrite(expression.id.start, expression.id.end, alias); code.overwrite(expression.id.start, expression.id.end, alias);
banner += `\n\n${code}`; inlineHelpers += `${code}\n\n`;
} }
}); });
result = inlineHelpers + result;
} }
const filename = options.filename && (
typeof process !== 'undefined' ? options.filename.replace(process.cwd(), '').replace(/^[\/\\]/, '') : options.filename
);
return generator.generate(result, options, { return generator.generate(result, options, {
banner, banner: `/* ${filename ? `${filename} ` : ``}generated by Svelte v${version} */`,
sharedPath,
helpers,
name, name,
format, format,
}); });

@ -11,10 +11,13 @@ export default function getModuleWrapper(
format: ModuleFormat, format: ModuleFormat,
name: string, name: string,
options: CompileOptions, options: CompileOptions,
banner: string,
sharedPath: string,
helpers: { name: string, alias: string }[],
imports: Node[], imports: Node[],
source: string source: string
) { ) {
if (format === 'es') return getEsWrapper(name, options, imports, source); if (format === 'es') return getEsWrapper(name, options, banner, sharedPath, helpers, imports, source);
const dependencies = imports.map((declaration, i) => { const dependencies = imports.map((declaration, i) => {
const defaultImport = declaration.specifiers.find( const defaultImport = declaration.specifiers.find(
@ -53,22 +56,36 @@ export default function getModuleWrapper(
return { name, statements, source: declaration.source.value }; return { name, statements, source: declaration.source.value };
}); });
if (format === 'amd') return getAmdWrapper(name, options, dependencies); if (format === 'amd') return getAmdWrapper(name, options, banner, dependencies);
if (format === 'cjs') return getCjsWrapper(name, options, dependencies); if (format === 'cjs') return getCjsWrapper(name, options, banner, sharedPath, helpers, dependencies);
if (format === 'iife') return getIifeWrapper(name, options, dependencies); if (format === 'iife') return getIifeWrapper(name, options, banner, dependencies);
if (format === 'umd') return getUmdWrapper(name, options, dependencies); if (format === 'umd') return getUmdWrapper(name, options, banner, dependencies);
if (format === 'eval') return getEvalWrapper(name, options, dependencies); if (format === 'eval') return getEvalWrapper(name, options, banner, dependencies);
throw new Error(`Not implemented: ${format}`); throw new Error(`Not implemented: ${format}`);
} }
function getEsWrapper(name: string, options: CompileOptions, imports: Node[], source: string) { function getEsWrapper(
name: string,
options: CompileOptions,
banner: string,
sharedPath: string,
helpers: { name: string, alias: string }[],
imports: Node[],
source: string
) {
const importHelpers = helpers && (
`import { ${helpers.map(h => h.name === h.alias ? h.name : `${h.name} as ${h.alias}`).join(', ')} } from ${JSON.stringify(sharedPath)};`
);
const importBlock = imports const importBlock = imports
.map((declaration: Node) => source.slice(declaration.start, declaration.end)) .map((declaration: Node) => source.slice(declaration.start, declaration.end))
.join('\n'); .join('\n');
return { return {
intro: deindent` intro: deindent`
${banner}
${importHelpers}
${importBlock} ${importBlock}
export default (function() { export default (function() {
@ -79,7 +96,12 @@ function getEsWrapper(name: string, options: CompileOptions, imports: Node[], so
}; };
} }
function getAmdWrapper(name: string, options: CompileOptions, dependencies: Dependency[]) { function getAmdWrapper(
name: string,
options: CompileOptions,
banner: string,
dependencies: Dependency[]
) {
const sourceString = dependencies.length const sourceString = dependencies.length
? `[${dependencies.map(d => `"${removeExtension(d.source)}"`).join(', ')}], ` ? `[${dependencies.map(d => `"${removeExtension(d.source)}"`).join(', ')}], `
: ''; : '';
@ -99,22 +121,41 @@ function getAmdWrapper(name: string, options: CompileOptions, dependencies: Depe
}; };
} }
function getCjsWrapper(name: string, options: CompileOptions, dependencies: Dependency[]) { function getCjsWrapper(
name: string,
options: CompileOptions,
banner: string,
sharedPath: string,
helpers: { name: string, alias: string }[],
dependencies: Dependency[]
) {
const SHARED = '__shared';
const helperBlock = helpers && (
`var ${SHARED} = require(${JSON.stringify(sharedPath)});\n` +
helpers.map(helper => {
return `var ${helper.alias} = ${SHARED}.${helper.name};`;
}).join('\n')
);
const requireBlock = dependencies const requireBlock = dependencies
.map(d => `var ${d.name} = require("${d.source}");`) .map(d => `var ${d.name} = require("${d.source}");`)
.join('\n\n'); .join('\n\n');
const intro = requireBlock ? const intro = requireBlock ?
deindent` deindent`
${banner}
"use strict"; "use strict";
${helperBlock}
${requireBlock} ${requireBlock}
${getCompatibilityStatements(dependencies)} ${getCompatibilityStatements(dependencies)}
` : ` :
deindent` deindent`
${banner}
"use strict"; "use strict";
${helperBlock}
`; `;
const outro = `module.exports = ${name};` const outro = `module.exports = ${name};`
@ -122,7 +163,12 @@ function getCjsWrapper(name: string, options: CompileOptions, dependencies: Depe
return { intro, outro }; return { intro, outro };
} }
function getIifeWrapper(name: string, options: CompileOptions, dependencies: Dependency[]) { function getIifeWrapper(
name: string,
options: CompileOptions,
banner: string,
dependencies: Dependency[]
) {
if (!options.name) { if (!options.name) {
throw new Error(`Missing required 'name' option for IIFE export`); throw new Error(`Missing required 'name' option for IIFE export`);
} }
@ -131,17 +177,25 @@ function getIifeWrapper(name: string, options: CompileOptions, dependencies: Dep
return { return {
intro: deindent` intro: deindent`
${banner}
var ${options.name} = (function(${paramString(dependencies)}) { "use strict"; var ${options.name} = (function(${paramString(dependencies)}) { "use strict";
${getCompatibilityStatements(dependencies)} ${getCompatibilityStatements(dependencies)}
`, `,
outro: `return ${name};\n\n}(${globals.join(', ')}));` outro: deindent`
return ${name};
}(${globals.join(', ')}));`
}; };
} }
function getUmdWrapper(name: string, options: CompileOptions, dependencies: Dependency[]) { function getUmdWrapper(
name: string,
options: CompileOptions,
banner: string,
dependencies: Dependency[]
) {
if (!options.name) { if (!options.name) {
throw new Error(`Missing required 'name' option for UMD export`); throw new Error(`Missing required 'name' option for UMD export`);
} }
@ -160,6 +214,7 @@ function getUmdWrapper(name: string, options: CompileOptions, dependencies: Depe
return { return {
intro: deindent` intro: deindent`
${banner}
(function(global, factory) { (function(global, factory) {
typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory(${cjsDeps}) : typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory(${cjsDeps}) :
typeof define === "function" && define.amd ? define(${amdId}${amdDeps}factory) : typeof define === "function" && define.amd ? define(${amdId}${amdDeps}factory) :
@ -177,18 +232,24 @@ function getUmdWrapper(name: string, options: CompileOptions, dependencies: Depe
}; };
} }
function getEvalWrapper(name: string, options: CompileOptions, dependencies: Dependency[]) { function getEvalWrapper(
name: string,
options: CompileOptions,
banner: string,
dependencies: Dependency[]
) {
const globals = getGlobals(dependencies, options); const globals = getGlobals(dependencies, options);
return { return {
intro: deindent` intro: deindent`
(function (${paramString(dependencies)}) { "use strict"; (function (${paramString(dependencies)}) { "use strict";
${banner}
${getCompatibilityStatements(dependencies)} ${getCompatibilityStatements(dependencies)}
`, `,
outro: `return ${name};\n\n}(${globals.join(', ')}));` outro: `return ${name};\n\n}(${globals.join(', ')}))`
}; };
} }

@ -61,7 +61,7 @@ export function create(source: string, _options: CompileOptions = {}) {
} }
try { try {
return new Function('return ' + compiled.code)(); return (0,eval)(compiled.code);
} catch (err) { } catch (err) {
if (_options.onerror) { if (_options.onerror) {
_options.onerror(err); _options.onerror(err);

@ -65,6 +65,8 @@ export interface GenerateOptions {
name: string; name: string;
format: ModuleFormat; format: ModuleFormat;
banner?: string; banner?: string;
sharedPath?: string | boolean;
helpers?: { name: string, alias: string }[];
} }
export interface Visitor { export interface Visitor {

@ -190,6 +190,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() {
var template = (function() { var template = (function() {
return { return {
@ -259,4 +260,7 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());
export default _actual;

@ -1,7 +1,9 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, createText, detachNode, init, insertNode, noop, proto, setAttribute } from "svelte/shared.js"; import { appendNode, assign, createElement, createText, detachNode, init, insertNode, noop, proto, setAttribute } from "svelte/shared.js";
export default (function() {
var template = (function() { var template = (function() {
return { return {
data: function () { data: function () {
@ -70,4 +72,5 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());

@ -166,6 +166,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() {
var template = (function() { var template = (function() {
return { return {
@ -229,4 +230,7 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());
export default _actual;

@ -1,7 +1,9 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, callAll, init, noop, proto } from "svelte/shared.js"; import { assign, callAll, init, noop, proto } from "svelte/shared.js";
export default (function() {
var template = (function() { var template = (function() {
return { return {
components: { components: {
@ -64,4 +66,5 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());

@ -166,6 +166,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() {
var template = (function() { var template = (function() {
return { return {
@ -213,4 +214,7 @@ SvelteComponent.prototype._recompute = function _recompute(changed, state) {
} }
}; };
export default SvelteComponent; return SvelteComponent;
}());
export default _actual;

@ -1,7 +1,9 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, differs, init, noop, proto } from "svelte/shared.js"; import { assign, differs, init, noop, proto } from "svelte/shared.js";
export default (function() {
var template = (function() { var template = (function() {
return { return {
computed: { computed: {
@ -48,4 +50,5 @@ SvelteComponent.prototype._recompute = function _recompute(changed, state) {
} }
} }
export default SvelteComponent; return SvelteComponent;
}());

@ -186,6 +186,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() {
function encapsulateStyles(node) { function encapsulateStyles(node) {
setAttribute(node, "svelte-2363328337", ""); setAttribute(node, "svelte-2363328337", "");
@ -241,4 +242,7 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());
export default _actual;

@ -1,7 +1,9 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, detachNode, init, insertNode, noop, proto, setAttribute } from "svelte/shared.js"; import { appendNode, assign, createElement, detachNode, init, insertNode, noop, proto, setAttribute } from "svelte/shared.js";
export default (function() {
function encapsulateStyles(node) { function encapsulateStyles(node) {
setAttribute(node, "svelte-2363328337", ""); setAttribute(node, "svelte-2363328337", "");
} }
@ -56,4 +58,5 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());

@ -186,6 +186,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var div, text; var div, text;
@ -248,4 +249,7 @@ assign(SvelteComponent.prototype, proto, {
} }
}); });
export default SvelteComponent; return SvelteComponent;
}());
export default _actual;

@ -1,7 +1,9 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { appendNode, assign, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var div, text; var div, text;
@ -63,4 +65,5 @@ assign(SvelteComponent.prototype, proto, {
} }
}); });
export default SvelteComponent; return SvelteComponent;
}());

@ -199,6 +199,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var text, p, text_1; var text, p, text_1;
@ -352,4 +353,7 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());
export default _actual;

@ -1,7 +1,9 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, createText, destroyEach, detachAfter, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { appendNode, assign, createElement, createText, destroyEach, detachAfter, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var text, p, text_1; var text, p, text_1;
@ -154,4 +156,5 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());

@ -186,6 +186,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() {
var template = (function() { var template = (function() {
return { return {
@ -250,4 +251,7 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, template.methods, proto); assign(SvelteComponent.prototype, template.methods, proto);
export default SvelteComponent; return SvelteComponent;
}());
export default _actual;

@ -1,7 +1,9 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { appendNode, assign, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() {
var template = (function() { var template = (function() {
return { return {
methods: { methods: {
@ -65,4 +67,5 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, template.methods, proto); assign(SvelteComponent.prototype, template.methods, proto);
export default SvelteComponent; return SvelteComponent;
}());

@ -190,6 +190,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var if_block_anchor; var if_block_anchor;
@ -294,4 +295,7 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());
export default _actual;

@ -1,7 +1,9 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createComment, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { appendNode, assign, createComment, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var if_block_anchor; var if_block_anchor;
@ -105,4 +107,5 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());

@ -190,6 +190,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var if_block_anchor; var if_block_anchor;
@ -269,4 +270,7 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());
export default _actual;

@ -1,7 +1,9 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createComment, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { appendNode, assign, createComment, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var if_block_anchor; var if_block_anchor;
@ -80,4 +82,5 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());

@ -182,6 +182,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var div; var div;
@ -233,4 +234,7 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());
export default _actual;

@ -1,7 +1,9 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js"; import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var div; var div;
@ -52,4 +54,5 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());

@ -182,6 +182,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var div; var div;
@ -228,4 +229,7 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());
export default _actual;

@ -1,7 +1,9 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js"; import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var div; var div;
@ -47,4 +49,5 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());

@ -182,6 +182,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var div; var div;
@ -228,4 +229,7 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());
export default _actual;

@ -1,7 +1,9 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js"; import { assign, createElement, detachNode, init, insertNode, noop, proto, setStyle } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var div; var div;
@ -47,4 +49,5 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());

@ -182,6 +182,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var div, text, div_1, div_1_style_value; var div, text, div_1, div_1_style_value;
@ -239,4 +240,7 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());
export default _actual;

@ -1,7 +1,9 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { assign, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var div, text, div_1, div_1_style_value; var div, text, div_1, div_1_style_value;
@ -58,4 +60,5 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());

@ -186,6 +186,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var input; var input;
@ -239,4 +240,7 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());
export default _actual;

@ -1,7 +1,9 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { addListener, assign, createElement, detachNode, init, insertNode, proto, removeListener } from "svelte/shared.js"; import { addListener, assign, createElement, detachNode, init, insertNode, proto, removeListener } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var input; var input;
@ -54,4 +56,5 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());

@ -184,6 +184,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var input; var input;
@ -226,4 +227,7 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());
export default _actual;

@ -1,7 +1,9 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto, setInputType } from "svelte/shared.js"; import { assign, createElement, detachNode, init, insertNode, noop, proto, setInputType } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var input; var input;
@ -43,4 +45,5 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());

@ -201,6 +201,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var div; var div;
@ -253,4 +254,7 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());
export default _actual;

@ -1,7 +1,9 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, children, claimElement, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { assign, children, claimElement, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var div; var div;
@ -53,4 +55,5 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());

@ -194,6 +194,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var audio, audio_updating = false, audio_animationframe, audio_paused_value = true; var audio, audio_updating = false, audio_animationframe, audio_paused_value = true;
@ -322,4 +323,7 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());
export default _actual;

@ -1,7 +1,9 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { addListener, assign, callAll, createElement, detachNode, init, insertNode, proto, removeListener, timeRangesToArray } from "svelte/shared.js"; import { addListener, assign, callAll, createElement, detachNode, init, insertNode, proto, removeListener, timeRangesToArray } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var audio, audio_updating = false, audio_animationframe, audio_paused_value = true; var audio, audio_updating = false, audio_animationframe, audio_paused_value = true;
@ -129,4 +131,5 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());

@ -180,6 +180,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() {
var template = (function() { var template = (function() {
return { return {
@ -254,4 +255,7 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());
export default _actual;

@ -1,8 +1,8 @@
import Imported from 'Imported.html';
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, callAll, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { assign, callAll, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
import Imported from 'Imported.html';
export default (function() {
var template = (function() { var template = (function() {
return { return {
@ -77,4 +77,5 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());

@ -166,6 +166,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() {
var template = (function() { var template = (function() {
return { return {
@ -216,4 +217,7 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());
export default _actual;

@ -1,7 +1,9 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, callAll, init, noop, proto } from "svelte/shared.js"; import { assign, callAll, init, noop, proto } from "svelte/shared.js";
export default (function() {
var template = (function() { var template = (function() {
return { return {
// this test should be removed in v2 // this test should be removed in v2
@ -51,4 +53,5 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());

@ -166,6 +166,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() {
var template = (function() { var template = (function() {
return { return {
@ -217,4 +218,7 @@ assign(SvelteComponent.prototype, template.methods, proto);
template.setup(SvelteComponent); template.setup(SvelteComponent);
export default SvelteComponent; return SvelteComponent;
}());
export default _actual;

@ -1,7 +1,9 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, init, noop, proto } from "svelte/shared.js"; import { assign, init, noop, proto } from "svelte/shared.js";
export default (function() {
var template = (function() { var template = (function() {
return { return {
methods: { methods: {
@ -52,4 +54,5 @@ assign(SvelteComponent.prototype, template.methods, proto);
template.setup(SvelteComponent); template.setup(SvelteComponent);
export default SvelteComponent; return SvelteComponent;
}());

@ -190,6 +190,7 @@ var proto = {
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var _actual = (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var div, text, p, text_1, text_2, text_3, text_4, p_1, text_5, text_6, text_8, if_block_4_anchor; var div, text, p, text_1, text_2, text_3, text_4, p_1, text_5, text_6, text_8, if_block_4_anchor;
@ -457,4 +458,7 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());
export default _actual;

@ -1,7 +1,9 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { appendNode, assign, createComment, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; import { appendNode, assign, createComment, createElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
export default (function() {
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var div, text, p, text_1, text_2, text_3, text_4, p_1, text_5, text_6, text_8, if_block_4_anchor; var div, text, p, text_1, text_2, text_3, text_4, p_1, text_5, text_6, text_8, if_block_4_anchor;
@ -268,4 +270,5 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; return SvelteComponent;
}());
Loading…
Cancel
Save