1const Example_svelte_svelte_type_style_lang = ''; 2 3/* home/runner/work/gradio/gradio/js/colorpicker/Example.svelte generated by Svelte v4.2.2 */ 4const { 5 SvelteComponent, 6 attr, 7 detach, 8 element, 9 init, 10 insert, 11 noop, 12 safe_not_equal, 13 set_style, 14 toggle_class 15} = window.__gradio__svelte__internal; 16function create_fragment(ctx) { 17 let div; 18 19 return { 20 c() { 21 div = element("div"); 22 set_style(div, "background-color", /*value*/ ctx[0] ? /*value*/ ctx[0] : 'black'); 23 attr(div, "class", "svelte-h6ogpl"); 24 toggle_class(div, "table", /*type*/ ctx[1] === "table"); 25 toggle_class(div, "gallery", /*type*/ ctx[1] === "gallery"); 26 toggle_class(div, "selected", /*selected*/ ctx[2]); 27 }, 28 m(target, anchor) { 29 insert(target, div, anchor); 30 }, 31 p(ctx, [dirty]) { 32 if (dirty & /*value*/ 1) { 33 set_style(div, "background-color", /*value*/ ctx[0] ? /*value*/ ctx[0] : 'black'); 34 } 35 36 if (dirty & /*type*/ 2) { 37 toggle_class(div, "table", /*type*/ ctx[1] === "table"); 38 } 39 40 if (dirty & /*type*/ 2) { 41 toggle_class(div, "gallery", /*type*/ ctx[1] === "gallery"); 42 } 43 44 if (dirty & /*selected*/ 4) { 45 toggle_class(div, "selected", /*selected*/ ctx[2]); 46 } 47 }, 48 i: noop, 49 o: noop, 50 d(detaching) { 51 if (detaching) { 52 detach(div); 53 } 54 } 55 }; 56} 57 58function instance($$self, $$props, $$invalidate) { 59 let { value } = $$props; 60 let { type } = $$props; 61 let { selected = false } = $$props; 62 63 $$self.$$set = $$props => {
64 if ('value' in $$props) $$invalidate(0, value = $$props.value); 65 if ('type' in $$props) $$invalidate(1, type = $$props.type); 66 if ('selected' in $$props) $$invalidate(2, selected = $$props.selected); 67 }; 68 69 return [value, type, selected]; 70} 71 72class Example extends SvelteComponent { 73 constructor(options) { 74 super(); 75 init(this, options, instance, create_fragment, safe_not_equal, { value: 0, type: 1, selected: 2 }); 76 } 77} 78 79export { Example as default }; 80//# sourceMappingURL=Example-85be0e05.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.