mirror of https://github.com/sveltejs/svelte
parent
2598ce6887
commit
3ec39e6eab
@ -1,50 +1,52 @@
|
||||
/* generated by Svelte vX.Y.Z */
|
||||
import { _differsImmutable, assign, flush, init, noop, proto } from "svelte/shared.js";
|
||||
/* generated by Svelte vX.Y.Z-alpha1 */
|
||||
import { SvelteComponent as SvelteComponent_1, init, mount_component, noop, not_equal } from "svelte/internal.js";
|
||||
|
||||
var Nested = window.Nested;
|
||||
function create_fragment(component, ctx) {
|
||||
var current;
|
||||
|
||||
function create_main_fragment(component, ctx) {
|
||||
|
||||
var nested_initial_data = { foo: "bar" };
|
||||
var nested = new Nested({
|
||||
root: component.root,
|
||||
store: component.store,
|
||||
data: nested_initial_data
|
||||
});
|
||||
var nested = new ctx.Nested({ props: { foo: "bar" } });
|
||||
|
||||
return {
|
||||
c() {
|
||||
nested._fragment.c();
|
||||
nested.$$.fragment.c();
|
||||
},
|
||||
|
||||
m(target, anchor) {
|
||||
nested._mount(target, anchor);
|
||||
mount_component(nested, target, anchor);
|
||||
current = true;
|
||||
},
|
||||
|
||||
p: noop,
|
||||
|
||||
i(target, anchor) {
|
||||
if (current) return;
|
||||
this.m(target, anchor);
|
||||
},
|
||||
|
||||
o(outrocallback) {
|
||||
if (!current) return;
|
||||
|
||||
if (nested) nested.$$.fragment.o(outrocallback);
|
||||
current = false;
|
||||
},
|
||||
|
||||
d(detach) {
|
||||
nested.destroy(detach);
|
||||
nested.$destroy(detach);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function SvelteComponent(options) {
|
||||
init(this, options);
|
||||
this._state = assign({}, options.data);
|
||||
this._intro = true;
|
||||
|
||||
this._fragment = create_main_fragment(this, this._state);
|
||||
function define($$self) {
|
||||
const Nested = window.Nested;
|
||||
|
||||
if (options.target) {
|
||||
this._fragment.c();
|
||||
this._mount(options.target, options.anchor);
|
||||
$$self.$$.get = () => ({ Nested });
|
||||
}
|
||||
|
||||
flush(this);
|
||||
class SvelteComponent extends SvelteComponent_1 {
|
||||
constructor(options) {
|
||||
super();
|
||||
init(this, options, define, create_fragment, not_equal);
|
||||
}
|
||||
}
|
||||
|
||||
assign(SvelteComponent.prototype, proto);
|
||||
|
||||
SvelteComponent.prototype._differs = _differsImmutable;
|
||||
export default SvelteComponent;
|
Loading…
Reference in new issue