mirror of https://github.com/sveltejs/svelte
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
88 lines
1.8 KiB
88 lines
1.8 KiB
/* generated by Svelte vX.Y.Z */
|
|
import { SvelteComponentDev, addLoc, append, createElement, createText, detachNode, flush, init, insert, run, safe_not_equal, setData } from "svelte/internal.js";
|
|
|
|
const file = undefined;
|
|
|
|
function create_fragment(component, ctx) {
|
|
var h1, text0, text1, text2, text3, current;
|
|
|
|
return {
|
|
c: function create() {
|
|
h1 = createElement("h1");
|
|
text0 = createText("Hello ");
|
|
text1 = createText(ctx.name);
|
|
text2 = createText("!");
|
|
text3 = createText("\n");
|
|
debugger;
|
|
addLoc(h1, file, 0, 0, 0);
|
|
},
|
|
|
|
l: function claim(nodes) {
|
|
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
|
|
},
|
|
|
|
m: function mount(target, anchor) {
|
|
insert(target, h1, anchor);
|
|
append(h1, text0);
|
|
append(h1, text1);
|
|
append(h1, text2);
|
|
insert(target, text3, anchor);
|
|
current = true;
|
|
},
|
|
|
|
p: function update(changed, ctx) {
|
|
if (changed.name) {
|
|
setData(text1, ctx.name);
|
|
}
|
|
|
|
debugger;
|
|
},
|
|
|
|
i: function intro(target, anchor) {
|
|
if (current) return;
|
|
this.m(target, anchor);
|
|
},
|
|
|
|
o: run,
|
|
|
|
d: function destroy(detach) {
|
|
if (detach) {
|
|
detachNode(h1);
|
|
detachNode(text3);
|
|
}
|
|
}
|
|
};
|
|
}
|
|
|
|
function define($$self, $$props) {
|
|
let { name } = $$props;
|
|
|
|
$$self.$$.get = () => ({ name });
|
|
|
|
$$self.$$.set = $$props => {
|
|
if ('name' in $$props) name = $$props.name;
|
|
};
|
|
}
|
|
|
|
class SvelteComponent extends SvelteComponentDev {
|
|
constructor(options) {
|
|
super(options);
|
|
init(this, options, define, create_fragment, safe_not_equal);
|
|
|
|
const state = this.$$.get();
|
|
if (state.name === undefined) {
|
|
console.warn("<SvelteComponent> was created without expected data property 'name'");
|
|
}
|
|
}
|
|
|
|
get name() {
|
|
return this.$$.get().name;
|
|
}
|
|
|
|
set name(value) {
|
|
this.$set({ name: value });
|
|
flush();
|
|
}
|
|
}
|
|
|
|
export default SvelteComponent; |