3 lines
2.4 KiB
JavaScript
3 lines
2.4 KiB
JavaScript
import{S as b,i as _,s as k,l as g,o as h,b as d,c as m,d as j,e as v,u as w,p as T,q as O,t as C,h as q,f as A}from"./index-85f88930.js";import{l as S,d as V,f as B}from"./light-2e316030.js";function u(e){return e&&typeof e=="object"&&!Array.isArray(e)}function f(e,...t){if(!t.length)return e;const i=t.shift();if(u(e)&&u(i))for(const s in i)u(i[s])?(e[s]||Object.assign(e,{[s]:{}}),f(e[s],i[s])):Object.assign(e,{[s]:i[s]});return f(e,...t)}function P(e){let t,i,s;const r=e[5].default,a=g(r,e,e[4],null);return{c(){t=h("div"),i=h("div"),a&&a.c(),d(i,"class","theme-client-override"),m(i,"display","contents"),d(t,"class","theme"),d(t,"style",e[0]),m(t,"display","contents")},m(n,l){j(n,t,l),v(t,i),a&&a.m(i,null),s=!0},p(n,[l]){a&&a.p&&(!s||l&16)&&w(a,r,n,n[4],s?O(r,n[4],l,null):T(n[4]),null),(!s||l&1)&&d(t,"style",n[0]);const c=l&1;(l&1||c)&&m(t,"display","contents")},i(n){s||(C(a,n),s=!0)},o(n){q(a,n),s=!1},d(n){n&&A(t),a&&a.d(n)}}}const y={light:S,dark:V};function z(e,t,i){let s,r,{$$slots:a={},$$scope:n}=t,{theme:l={}}=t,{base:c="light"}=t;return e.$$set=o=>{"theme"in o&&i(1,l=o.theme),"base"in o&&i(2,c=o.base),"$$scope"in o&&i(4,n=o.$$scope)},e.$$.update=()=>{e.$$.dirty&6&&i(3,s=f({},y[c]||y.light,l)),e.$$.dirty&8&&i(0,r=Object.entries(B({theme:s})).map(([o,p])=>`--${o}: ${p};`).join(" "))},[r,l,c,s,n,a]}class D extends b{constructor(t){super(),_(this,t,z,P,k,{theme:1,base:2})}}D.__docgen={version:3,name:"Theme.svelte",data:[{keywords:[{name:"type",description:"{{ light, dark }}"}],visibility:"public",description:"Pre-made themes you can import.",name:"themes",kind:"const",static:!0,readonly:!0,type:{kind:"type",text:"{ light, dark }",type:"{ light, dark }"}},{keywords:[],visibility:"public",description:`Custom theme object. Can be a partial theme with just
|
|
what you want to change.`,name:"theme",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"object",type:"object"}},{keywords:[],visibility:"public",description:"Base theme is one of `light` or `dark` and will be merged\nwith your custom theme to fill in any values you don't\nexplicitly set.",name:"base",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:"light"}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[{keywords:[],visibility:"public",description:"Themed content",name:"default"}],refs:[]};export{D as T,y as t};
|
|
//# sourceMappingURL=Theme-38d39af2.js.map
|