mirror of https://github.com/sveltejs/svelte
parent
d915db00a1
commit
c798c70353
@ -1,113 +0,0 @@
|
|||||||
/* generated by Svelte vX.Y.Z */
|
|
||||||
import {
|
|
||||||
SvelteComponent,
|
|
||||||
append,
|
|
||||||
assign,
|
|
||||||
detach,
|
|
||||||
empty,
|
|
||||||
get_spread_update,
|
|
||||||
init,
|
|
||||||
insert,
|
|
||||||
noop,
|
|
||||||
safe_not_equal,
|
|
||||||
set_svg_attributes,
|
|
||||||
svg_element
|
|
||||||
} from "svelte/internal";
|
|
||||||
|
|
||||||
function create_dynamic_element(ctx) {
|
|
||||||
let svelte_element1;
|
|
||||||
let svelte_element0;
|
|
||||||
let svelte_element0_levels = [{ xmlns: "http://www.w3.org/2000/svg" }];
|
|
||||||
let svelte_element0_data = {};
|
|
||||||
|
|
||||||
for (let i = 0; i < svelte_element0_levels.length; i += 1) {
|
|
||||||
svelte_element0_data = assign(svelte_element0_data, svelte_element0_levels[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
let svelte_element1_levels = [{ xmlns: "http://www.w3.org/2000/svg" }];
|
|
||||||
let svelte_element1_data = {};
|
|
||||||
|
|
||||||
for (let i = 0; i < svelte_element1_levels.length; i += 1) {
|
|
||||||
svelte_element1_data = assign(svelte_element1_data, svelte_element1_levels[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
c() {
|
|
||||||
svelte_element1 = svg_element(/*tag*/ ctx[0].svg);
|
|
||||||
svelte_element0 = svg_element(/*tag*/ ctx[0].path);
|
|
||||||
set_svg_attributes(svelte_element0, svelte_element0_data);
|
|
||||||
set_svg_attributes(svelte_element1, svelte_element1_data);
|
|
||||||
},
|
|
||||||
m(target, anchor) {
|
|
||||||
insert(target, svelte_element1, anchor);
|
|
||||||
append(svelte_element1, svelte_element0);
|
|
||||||
},
|
|
||||||
p(ctx, dirty) {
|
|
||||||
svelte_element0_data = get_spread_update(svelte_element0_levels, [{ xmlns: "http://www.w3.org/2000/svg" }]);
|
|
||||||
set_svg_attributes(svelte_element0, svelte_element0_data);
|
|
||||||
svelte_element1_data = get_spread_update(svelte_element1_levels, [{ xmlns: "http://www.w3.org/2000/svg" }]);
|
|
||||||
set_svg_attributes(svelte_element1, svelte_element1_data);
|
|
||||||
},
|
|
||||||
d(detaching) {
|
|
||||||
if (detaching) detach(svelte_element1);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function create_fragment(ctx) {
|
|
||||||
let previous_tag = /*tag*/ ctx[0].svg;
|
|
||||||
let svelte_element_anchor;
|
|
||||||
let svelte_element = /*tag*/ ctx[0].svg && create_dynamic_element(ctx);
|
|
||||||
|
|
||||||
return {
|
|
||||||
c() {
|
|
||||||
if (svelte_element) svelte_element.c();
|
|
||||||
svelte_element_anchor = empty();
|
|
||||||
},
|
|
||||||
m(target, anchor) {
|
|
||||||
if (svelte_element) svelte_element.m(target, anchor);
|
|
||||||
insert(target, svelte_element_anchor, anchor);
|
|
||||||
},
|
|
||||||
p(ctx, [dirty]) {
|
|
||||||
if (/*tag*/ ctx[0].svg) {
|
|
||||||
if (!previous_tag) {
|
|
||||||
svelte_element = create_dynamic_element(ctx);
|
|
||||||
svelte_element.c();
|
|
||||||
svelte_element.m(svelte_element_anchor.parentNode, svelte_element_anchor);
|
|
||||||
} else if (safe_not_equal(previous_tag, /*tag*/ ctx[0].svg)) {
|
|
||||||
svelte_element.d(1);
|
|
||||||
svelte_element = create_dynamic_element(ctx);
|
|
||||||
svelte_element.c();
|
|
||||||
svelte_element.m(svelte_element_anchor.parentNode, svelte_element_anchor);
|
|
||||||
} else {
|
|
||||||
svelte_element.p(ctx, dirty);
|
|
||||||
}
|
|
||||||
} else if (previous_tag) {
|
|
||||||
svelte_element.d(1);
|
|
||||||
svelte_element = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
previous_tag = /*tag*/ ctx[0].svg;
|
|
||||||
},
|
|
||||||
i: noop,
|
|
||||||
o: noop,
|
|
||||||
d(detaching) {
|
|
||||||
if (detaching) detach(svelte_element_anchor);
|
|
||||||
if (svelte_element) svelte_element.d(detaching);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function instance($$self) {
|
|
||||||
const tag = { svg: 'svg', path: 'path' };
|
|
||||||
return [tag];
|
|
||||||
}
|
|
||||||
|
|
||||||
class Component extends SvelteComponent {
|
|
||||||
constructor(options) {
|
|
||||||
super();
|
|
||||||
init(this, options, instance, create_fragment, safe_not_equal, {});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Component;
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<script>
|
|
||||||
const tag = { svg: 'svg', path: 'path' };
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<svelte:element this={tag.svg} xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<svelte:element this={tag.path} xmlns="http://www.w3.org/2000/svg" />
|
|
||||||
</svelte:element>
|
|
||||||
Loading…
Reference in new issue