2 lines
2.7 KiB
JavaScript
2 lines
2.7 KiB
JavaScript
import{u as b}from"./asyncData.84fe43db.js";import{I as m,L as a,d as _,M as S,b as $,c as I,n as w,p as P,j as C,e as x,l as u,Z as E,r as j,W as r}from"./entry.02b0a3f0.js";import D from"./ComponentPlaygroundData.3fad3127.js";import"./TabsHeader.03d7ad13.js";import"./ComponentPlaygroundProps.050a351b.js";import"./ProseH4.1a7cc7d0.js";import"./ProseCodeInline.d7e621c3.js";import"./Badge.74e5cfac.js";import"./ContentSlot.566dad3e.js";import"./ProseP.50c79610.js";import"./index.fbfef7e6.js";import"./ComponentPlaygroundSlots.vue.8e7754ff.js";import"./ComponentPlaygroundTokens.vue.b6dfa16a.js";async function z(o){const e=m(o);{const{data:n}=await b(`nuxt-component-meta${e?`-${e}`:""}`,()=>$fetch(`/api/component-meta${e?`/${e}`:""}`));return a(()=>n.value)}}const B=o=>(P("data-v-a2bd7d25"),o=o(),C(),o),N=B(()=>x("div",{class:"ellipsis-item"},null,-1)),V=[N],W=_({__name:"Ellipsis",props:{width:{type:String,default:"10rem"},height:{type:String,default:"10rem"},zIndex:{type:String,default:"10"},top:{type:String,default:"0"},left:{type:String,default:"auto"},right:{type:String,default:"auto"},blur:{type:String,default:"50px"},colors:{type:Array,default:()=>["rgba(0, 71, 225, 0.22)","rgba(26, 214, 255, 0.22)","rgba(0, 220, 130, 0.22)"]}},setup(o){const e=o,n=a(()=>((t=e)=>t.top)()),s=a(()=>((t=e)=>t.left)()),c=a(()=>((t=e)=>t.right)()),i=a(()=>((t=e)=>t.zIndex)()),f=a(()=>((t=e)=>t.width)()),g=a(()=>((t=e)=>t.height)()),y=a(()=>((t=e)=>`blur(${t.blur})`)()),h=a(()=>((t=e)=>{var l,d,p;return`linear-gradient(97.62deg, ${(l=t==null?void 0:t.colors)==null?void 0:l[0]} 2.27%, ${(d=t==null?void 0:t.colors)==null?void 0:d[1]} 50.88%, ${(p=t==null?void 0:t.colors)==null?void 0:p[2]} 98.48%)`})()),{$pinceau:v}=S(e,void 0,{_cCN_top:n,_eih_insetInlineStart:s,_IfB_insetInlineEnd:c,_SsE_zIndex:i,_wj8_maxWidth:f,_t33_height:g,_Jfd_filter:y,_yUj_background:h});return(t,l)=>($(),I("div",{class:w(["ellipsis",[m(v)]])},V,2))}});const k=u(W,[["__scopeId","data-v-a2bd7d25"]]),q=_({props:{component:{type:String,required:!0},props:{type:Object,required:!1,default:()=>({})}},async setup(o){const e=a(()=>E(o.component)),n=j({...o.props}),s=await z(o.component);return{as:e,formProps:n,componentData:s}},render(o){const e=Object.entries(this.$slots).reduce((n,[s,c])=>{if(s.startsWith("component-")){const i=s.replace("component-","");n[i]=c}return n},{});return r("div",{class:"component-playground"},[r("div",{class:"component-playground-wrapper"},[r(k,{class:"component-playground-ellipsis",blur:"5vw",height:"100%",width:"100%"}),r(o.as,{...o.formProps,class:"component-playground-component"},{...e})]),r(D,{modelValue:o.formProps,componentData:o.componentData,"onUpdate:modelValue":n=>o.formProps=n})])}});const T=u(q,[["__scopeId","data-v-ffdff82a"]]);export{T as default};
|