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