@tresjs/leches 0.14.0-next.0 → 0.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * name: @tresjs/leches
3
- * version: v0.14.0-next.0
4
- * (c) 2023
3
+ * version: v0.14.1
4
+ * (c) 2025
5
5
  * description: Tasty GUI for Vue controls 🍰
6
6
  * author: Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)
7
7
  */
8
- (function(V,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","@vueuse/core"],e):(V=typeof globalThis<"u"?globalThis:V||self,e(V.tresleches={},V.Vue,V.VueUseCore))})(this,function(V,e,k){"use strict";const Je="";function N(n){return typeof n=="function"?n():e.unref(n)}const L=typeof window<"u"&&typeof document<"u";function v(n,c={}){if(!e.isRef(n))return e.toRefs(n);const o=Array.isArray(n.value)?Array.from({length:n.value.length}):{};for(const l in n.value)o[l]=e.customRef(()=>({get(){return n.value[l]},set(t){var u;if((u=N(c.replaceRef))!=null?u:!0)if(Array.isArray(n.value)){const i=[...n.value];i[l]=t,n.value=i}else{const i={...n.value,[l]:t};Object.setPrototypeOf(i,Object.getPrototypeOf(n.value)),n.value=i}else n.value[l]=t}}));return o}const Y=L?window:void 0;function H(n,c={}){const{pointerTypes:o,preventDefault:l,stopPropagation:t,exact:u,onMove:a,onEnd:i,onStart:d,initialValue:b,axis:y="both",draggingElement:s=Y,handle:r=n}=c,{width:g}=k.useWindowSize();let C=g.value;const p=e.ref(N(b)??{x:0,y:0});e.watch(g,()=>{const f=g.value-C;p.value.x+=f,C=g.value});const x=e.ref(),$=f=>o?o.includes(f.pointerType):!0,w=f=>{N(l)&&f.preventDefault(),N(t)&&f.stopPropagation()},E=f=>{if(!$(f)||N(u)&&f.target!==N(n))return;const m=N(n).getBoundingClientRect(),_={x:f.clientX-m.left,y:f.clientY-m.top};(d==null?void 0:d(_,f))!==!1&&(x.value=_,w(f))},S=f=>{if(!$(f)||!x.value)return;let{x:m,y:_}=p.value;(y==="x"||y==="both")&&(m=f.clientX-x.value.x),(y==="y"||y==="both")&&(_=f.clientY-x.value.y),p.value={x:m,y:_},a==null||a(p.value,f),w(f)},T=f=>{$(f)&&x.value&&(x.value=void 0,i==null||i(p.value,f),w(f))};if(L){const f={capture:c.capture??!0};k.useEventListener(r,"pointerdown",E,f),k.useEventListener(s,"pointermove",S,f),k.useEventListener(s,"pointerup",T,f)}return{...v(p),position:p,isDragging:e.computed(()=>!!x.value),style:e.computed(()=>`left:${p.value.x}px;top:${p.value.y}px;`)}}const G=e.defineComponent({name:"UseDraggable",props:["storageKey","storageType","initialValue","exact","preventDefault","stopPropagation","pointerTypes","as","handle","axis","onStart","onMove","onEnd"],setup(n,{slots:c}){const o=e.ref(),l=e.computed(()=>n.handle??o.value),t=n.storageKey&&k.useStorage(n.storageKey,N(n.initialValue)||{x:0,y:0},k.isClient?n.storageType==="session"?sessionStorage:localStorage:void 0),u=t||n.initialValue||{x:0,y:0},a=(d,b)=>{var y;(y=n.onEnd)==null||y.call(n,d,b),t&&(t.value.x=d.x,t.value.y=d.y)},i=e.reactive(H(o,{...n,handle:l,initialValue:u,onEnd:a}));return()=>{if(c.default)return e.h(n.as||"div",{ref:o,style:`touch-action:none;${i.style}`},c.default(i))}}}),J=Symbol("CONTROLS_CONTEXT_KEY"),U="default",D=e.reactive({});function O(n=U){return e.provide(J,D),D[n]}const I=n=>{const c=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$|^0x([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;return typeof n=="boolean"?"boolean":typeof n=="number"?"number":typeof n=="string"&&c.test(n)?"color":typeof n=="string"?"string":n.isVector3||n.isVector2||n.isEuler||n instanceof Array?"vector":n.min!==void 0||n.max!==void 0||n.step!==void 0?"range":n.options&&Array.isArray(n.options)?"select":"unknown"},F=(n,c,o,l)=>{const t={key:e.ref(n),label:e.ref(n),name:e.ref(n),type:e.ref(o),value:e.ref(c),visible:e.ref(!0),[n]:e.ref(c)};return l&&(t.folder=e.ref(l)),t},Q=(n,c,o)=>{const l={},t=typeof n=="string"?n:null,u=t?c:n,a=t&&t!=="fpsgraph"?o:c,i=(a==null?void 0:a.uuid)||U;if(D[i]||(D[i]=e.reactive({})),n==="fpsgraph"){const s=F("fpsgraph",null,"fpsgraph",null);return D[i].fpsgraph=s,l.fpsgraph=s,e.toRefs(e.reactive(l))}const d=D[i],b=e.isReactive(u),y=b?e.toRefs(u):{};for(const s in u){let r=u[s],g=s;if(b&&y[s]&&(r=y[s]),t&&(g=`${t}${s.charAt(0).toUpperCase()+s.slice(1)}`),typeof r=="object"&&!e.isRef(r)&&!Array.isArray(r)&&r.value!==void 0){const p=r,x=e.isRef(p.value)?p.value:e.ref(p.value),$=p.type||I(p.value),w=F(s,x,$,t);$==="select"&&(w.options=e.ref(p.options.map(E=>typeof E=="object"&&E.text&&E.value?E:{text:E,value:E}))),$==="range"&&(w.min=e.ref(p.min||0),w.max=e.ref(p.max||1),w.step=e.ref(p.step||.1)),w.label.value=p.label||s,w.visible.value=p.visible!==void 0?p.visible:!0,d[g]=w,l[g]=w;continue}if(e.isRef(r)){const p=F(s,r,r.value.type||I(r.value),t);d[g]=p,l[g]=p;continue}else if(typeof r=="object"&&!Array.isArray(r)){const p=e.toRefs(r);p[s]&&(r=p[s])}const C=F(s,r,r.type||I(r),t);d[g]=C,l[g]=C,C.uniqueKey=g}return Object.keys(l).length>1?e.toRefs(e.reactive(l)):Object.values(l)[0]},Z={class:"flex px-4 justify-between gap-4 items-center mb-2"},ee=["for"],te=["id","value","min","max","step"],ne=e.defineComponent({__name:"NumberControl",props:{label:{},control:{}},emits:["change"],setup(n,{emit:c}){const o=n,l=c;function t(s){const{target:r}=s;l("change",r.valueAsNumber)}const u=k.useMouse(),a=e.ref(0),i=e.ref(!1),d=s=>{a.value=s.clientX,i.value=!0},b=()=>{i.value=!1},y=s=>Math.floor(Math.abs(s)/10);return e.watch(u.x,s=>{if(i.value){const r=s-a.value,g=y(r);r>0?l("change",o.control.value+1+g):r<0&&l("change",o.control.value-1+g),o.control.min!==void 0&&o.control.value<o.control.min&&l("change",o.control.min),o.control.max!==void 0&&o.control.value>o.control.max&&l("change",o.control.max),a.value=s}}),(s,r)=>(e.openBlock(),e.createElementBlock("div",Z,[e.createElementVNode("label",{class:"text-gray-500 w-1/3",for:s.control.uniqueKey},e.toDisplayString(s.label),9,ee),e.createElementVNode("input",{id:s.control.uniqueKey,value:s.control.value,class:e.normalizeClass(["p-2 w-1/3 rounded text-right text-xs text-gray-400 bg-gray-100 focus:border-gray-200 outline-none border-none font-sans",{"cursor-ew-resize":i.value}]),type:"number",min:s.control.min,max:s.control.max,step:s.control.step,onInput:t,onMousedown:d,onMouseup:b},null,42,te)]))}}),oe={class:"flex px-4 justify-between gap-4 items-center mb-2 min-h-32px"},le=["for"],re=["id","value","aria-label"],ae=e.defineComponent({__name:"TextControl",props:{label:{},control:{}},emits:["change"],setup(n,{emit:c}){const o=c;function l(t){const{target:u}=t;o("change",u.value)}return(t,u)=>(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("label",{for:t.control.uniqueKey,class:"text-gray-500 w-1/3"},e.toDisplayString(t.label),9,le),e.createElementVNode("input",{id:t.control.uniqueKey,value:t.control.value,type:"text",tabindex:"0",class:"p-2 w-2/3 rounded text-right text-xs text-gray-400 bg-gray-100 focus:border-gray-200 border-none font-sans","aria-label":t.label,placeholder:"Enter value here...",onChange:l},null,40,re)]))}}),se={class:"flex px-4 justify-start gap-2 items-center mb-2 min-h-32px"},ce={class:"text-gray-500 w-1/3"},ie=["id","checked"],ue=["for"],de=["aria-checked"],pe={class:"i-ic:baseline-check text-light"},fe=e.defineComponent({__name:"BooleanControl",props:{label:{},control:{}},emits:["change"],setup(n,{emit:c}){const o=n,l=c;function t(a){const{target:i}=a;l("change",i.checked)}function u(a){(a.code==="Space"||a.code==="Enter")&&(a.preventDefault(),l("change",!o.control.value))}return(a,i)=>(e.openBlock(),e.createElementBlock("div",se,[e.createElementVNode("label",ce,e.toDisplayString(a.label),1),e.createElementVNode("input",{id:a.control.uniqueKey,checked:a.control.value,class:"hidden",type:"checkbox",onInput:t},null,40,ie),e.createElementVNode("label",{for:a.control.uniqueKey,class:"inline-flex items-center cursor-pointer"},[e.createElementVNode("span",{tabindex:"0",role:"checkbox","aria-checked":a.control.value.toString(),class:e.normalizeClass([{"bg-dark-500":a.control.value,"bg-gray-200":!a.control.value},"w-4 h-4 flex justify-center items-center rounded border border-gray-300 mr-2 transition-colors duration-200"]),onKeydown:u},[e.withDirectives(e.createElementVNode("i",pe,null,512),[[e.vShow,a.control.value]])],42,de)],8,ue)]))}}),me={class:"px-4 relative flex justify-between gap-4 items-center mb-2"},ge=["value","min","max","step"],ye=["value","min","max","step"],be=e.defineComponent({__name:"SliderControl",props:{label:{},control:{}},emits:["change"],setup(n,{emit:c}){const o=n,l=c;function t(r){const{target:g}=r;l("change",g.valueAsNumber)}const u=e.computed(()=>({backgroundImage:`linear-gradient(to right, #333 0% ${100*(o.control.value-(o.control.min||0))/((o.control.max||100)-(o.control.min||0))}%, #e2e2e2 0%)`})),a=k.useMouse(),i=e.ref(0),d=e.ref(!1),b=r=>{i.value=r.clientX,d.value=!0},y=()=>{d.value=!1},s=r=>Math.floor(Math.abs(r)/10);return e.watch(a.x,r=>{if(d.value){const g=r-i.value,C=s(g);g>0?l("change",o.control.value+1+C):g<0&&l("change",o.control.value-1+C),o.control.min!==void 0&&o.control.value<o.control.min&&l("change",o.control.min),o.control.max!==void 0&&o.control.value>o.control.max&&l("change",o.control.max),i.value=r}}),(r,g)=>(e.openBlock(),e.createElementBlock("div",me,[e.createElementVNode("label",{class:e.normalizeClass(["text-gray-500 w-1/3",{"flex justify-between items-center":r.control.icon}])},[e.createTextVNode(e.toDisplayString(r.label)+" ",1),e.createElementVNode("i",{class:e.normalizeClass(`i-${r.control.icon}`)},null,2)],2),e.createElementVNode("input",{value:r.control.value,class:"w-1/2 h-0.75 bg-dark-200 rounded-full appearance-none",style:e.normalizeStyle(u.value),type:"range",min:r.control.min,max:r.control.max,step:r.control.step,onInput:t},null,44,ge),e.createElementVNode("input",{value:r.control.value,class:e.normalizeClass(["p-2 w-1/4 rounded text-right text-xs text-gray-400 bg-gray-100 focus:border-gray-200 outline-none border-none font-sans",{"cursor-ew-resize":d.value}]),type:"number",min:r.control.min,max:r.control.max,step:r.control.step,onInput:t,onMousedown:b,onMouseup:y},null,42,ye)]))}}),Qe="",R=(n,c)=>{const o=n.__vccOpts||n;for(const[l,t]of c)o[l]=t;return o},he=R(be,[["__scopeId","data-v-9e6267fe"]]),_e={class:"flex px-4 justify-between gap-4 items-center mb-2"},ke={class:"text-gray-500 w-1/3"},we=["id","value","aria-label"],Ce=["id","aria-label","value"],xe=e.defineComponent({__name:"ColorControl",props:{label:{},control:{}},emits:["change"],setup(n,{emit:c}){const o=c;function l(t){const{target:u}=t;o("change",u.value)}return(t,u)=>(e.openBlock(),e.createElementBlock("div",_e,[e.createElementVNode("label",ke,e.toDisplayString(t.label),1),e.createElementVNode("input",{id:t.control.uniqueKey,tabindex:"0",value:t.control.value,"aria-label":t.label,class:e.normalizeClass(["focus:outline-none focus:ring-2 focus:ring-blue-600",{"important-outline-gray-200":t.control.value==="#ffffff"}]),type:"color",onInput:l},null,42,we),e.createElementVNode("input",{id:t.control.uniqueKey,tabindex:"0","aria-label":t.label,value:t.control.value,class:"p-2 w-2/3 rounded text-right text-xs text-gray-400 bg-gray-100 border-none font-sans",type:"text",onInput:l},null,40,Ce)]))}}),Ze="";function Ee(n){if(typeof n=="number")return[n,n,n];if(A(n)){const{x:c,y:o,z:l}=n;return[c,o,l]}if(K(n)){const{x:c,y:o}=n;return[c,o]}return n}function K(n){return n&&typeof n.x=="number"&&typeof n.y=="number"}function A(n){return n&&typeof n.x=="number"&&typeof n.y=="number"&&typeof n.z=="number"}const Be={class:"text-gray-500 w-1/3"},Ve={class:"relative w-2/3 flex justify-between gap-0.5"},$e={key:0,class:"font-bold px-1 py-1 text-0.65rem text-gray-300"},Ne=["id","step","value","onInput","onMousedown","onMouseup","onFocus"],Se=e.defineComponent({__name:"VectorControl",props:{label:{},control:{}},emits:["change"],setup(n,{emit:c}){const o=n,l=c,t=k.useMouse(),{pressed:u}=k.useMousePressed(),a=e.ref(0),i=e.ref(!1),d=e.ref(0),b=e.ref(null),y=e.ref(1),s=k.useKeyModifier("Shift"),r=k.useKeyModifier("Alt");e.watch(s,m=>{y.value=m?10:1}),e.watch(r,m=>{y.value=m?.1:1});const g=m=>{b.value=m},C=()=>{b.value=null},p=(m,_)=>{d.value=_,a.value=m.clientX,i.value=!0},x=(m,_)=>{d.value=_,i.value=!1},$=()=>{i.value=!1};e.watch(u,m=>{m||(i.value=!1)});const w=m=>Math.floor(Math.abs(m)/10),E=e.computed(()=>Ee(o.control.value)),S=e.ref(["x","y","z"]),T=e.computed(()=>K(o.control.value)||A(o.control.value));function f(m,_){const{value:M}=o.control,{target:h}=m;d.value=_,M[T.value?S.value[d.value]:d.value]=parseFloat(h.value),l("change",M)}return e.watch(t.x,m=>{if(i.value){const _=m-a.value,M=w(_),{value:h}=o.control,B=T.value?S.value[d.value]:d.value;_>0?h[B]+=y.value+M:_<0&&(h[B]-=y.value+M),o.control.min!==void 0&&h<o.control.min&&(h[B]=o.control.min),o.control.max!==void 0&&h>o.control.max&&(h[B]=o.control.max),l("change",h),a.value=m}}),(m,_)=>(e.openBlock(),e.createElementBlock("div",{class:"flex px-4 justify-between gap-1 items-center mb-2",onMouseup:_[0]||(_[0]=M=>$())},[e.createElementVNode("label",Be,e.toDisplayString(m.label),1),e.createElementVNode("div",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(M,h)=>(e.openBlock(),e.createElementBlock("div",{key:m.label+h,class:e.normalizeClass(["flex items-center bg-gray-100 rounded",{"w-2/5":b.value===h,"w-1/3":e.unref(A)(m.control.value),"w-1/2":e.unref(K)(m.control.value)}])},[S.value[h]&&T.value?(e.openBlock(),e.createElementBlock("span",$e,e.toDisplayString(S.value[h]),1)):e.createCommentVNode("",!0),e.createElementVNode("input",{id:`${m.control.uniqueKey}-${S.value[h]}`,type:"number",step:y.value,class:e.normalizeClass(["w-full px-0 p-1 text-right text-0.65rem text-gray-400 bg-transparent focus:border-gray-200 outline-none border-none font-sans appearence-none",{"cursor-ew-resize":i.value}]),value:E.value[h].toFixed(2),onInput:B=>f(B,h),onMousedown:B=>p(B,h),onMouseup:B=>x(B,h),onFocus:B=>g(h),onBlur:C},null,42,Ne)],2))),128))])],32))}}),Me={class:"flex px-4 justify-between gap-4 items-center mb-2"},De={class:"text-gray-500 w-1/3"},ze={class:"relative w-2/3 p-1 rounded text-right text-xs text-gray-400 bg-gray-100 focus:border-gray-200 outline-none border-none font-sans"},Te={class:"absolute bottom-0.5 right-0.5 font-sans text-xs"},Fe=["points"],P=160,q=40,z=2,X=100,j=20,Ie=e.defineComponent({__name:"FPSGraph",props:{label:{},control:{}},setup(n){const c=k.useFps({every:X}),o=e.ref(""),l=e.ref([]),t=e.ref(P/z);let u=performance.now();return k.useRafFn(({timestamp:a})=>{a-u>=X&&(u=a,l.value.push(c.value),l.value.length>t.value&&l.value.shift(),o.value=l.value.map((i,d)=>`${d*z},${q+j-z/2-i*(q+j-z)/120}`).join(" "))}),(a,i)=>(e.openBlock(),e.createElementBlock("div",Me,[e.createElementVNode("label",De,e.toDisplayString(a.label),1),e.createElementVNode("div",ze,[e.createElementVNode("div",Te,e.toDisplayString(Math.round(e.unref(c)))+" FPS ",1),(e.openBlock(),e.createElementBlock("svg",{width:P,height:q,xmlns:"http://www.w3.org/2000/svg",class:"bg-gray-100"},[e.createElementVNode("polyline",{points:o.value,fill:"none",stroke:"lightgray","stroke-width":z,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,Fe)]))])]))}}),Ke={class:"flex px-4 justify-between gap-4 items-center mb-2 min-h-32px"},Ae=["for"],qe=["id","value"],Le=["value"],Ue=e.defineComponent({__name:"SelectControl",props:{label:{},control:{}},emits:["change"],setup(n,{emit:c}){const o=c;function l(t){o("change",t.target.value)}return(t,u)=>(e.openBlock(),e.createElementBlock("div",Ke,[e.createElementVNode("label",{class:"text-gray-500 w-1/3",for:t.control.uniqueKey},e.toDisplayString(t.label),9,Ae),e.createElementVNode("select",{id:t.control.uniqueKey,value:t.control.value,class:"p-2 w-2/3 rounded text-left text-xs text-gray-400 bg-gray-100 focus:border-gray-200 outline-none border-none font-sans",onChange:l},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.control.options,a=>(e.openBlock(),e.createElementBlock("option",{key:a.value,value:a.value},e.toDisplayString(a.text),9,Le))),128))],40,qe)]))}}),Oe=e.defineComponent({__name:"ButtonControl",props:{label:{},control:{}},setup(n){const c=n,o=e.computed(()=>{const l="btn",t=`btn-${c.control.value.variant||"primary"}`,u=`btn-${c.control.value.size||"sm"}`;return[l,t,u]});return(l,t)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(o.value),onClick:t[0]||(t[0]=(...u)=>l.control.value.onClick&&l.control.value.onClick(...u))},[e.createElementVNode("i",{class:e.normalizeClass(["mr-2",l.control.value.icon])},null,2),e.createTextVNode(" "+e.toDisplayString(l.control.label),1)],2))}}),et="",Re=R(Oe,[["__scopeId","data-v-846e24c4"]]),W=e.defineComponent({__name:"ControlInput",props:{control:{}},emits:["change"],setup(n,{emit:c}){const o=c;function l(t){o("change",t)}return(t,u)=>t.control.visible?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.control.type==="color"?(e.openBlock(),e.createBlock(xe,{key:0,label:t.control.label,control:t.control,onChange:l},null,8,["label","control"])):t.control.type==="select"?(e.openBlock(),e.createBlock(Ue,{key:1,label:t.control.label,control:t.control,onChange:l},null,8,["label","control"])):t.control.type==="vector"?(e.openBlock(),e.createBlock(Se,{key:2,label:t.control.label,control:t.control,onChange:l},null,8,["label","control"])):t.control.type==="boolean"?(e.openBlock(),e.createBlock(fe,{key:3,label:t.control.label,control:t.control,onChange:l},null,8,["label","control"])):t.control.type==="fpsgraph"?(e.openBlock(),e.createBlock(Ie,{key:4,label:t.control.label,control:t.control},null,8,["label","control"])):t.control.type==="number"?(e.openBlock(),e.createBlock(ne,{key:5,label:t.control.label,control:t.control,onChange:l},null,8,["label","control"])):t.control.type==="range"?(e.openBlock(),e.createBlock(he,{key:6,label:t.control.label,control:t.control,onChange:l},null,8,["label","control"])):t.control.type==="button"?(e.openBlock(),e.createElementBlock("div",{key:7,class:e.normalizeClass(["p-2",t.control.value.size==="block"?"flex":"inline-flex"])},[e.createVNode(Re,{label:t.control.label,control:t.control},null,8,["label","control"])],2)):(e.openBlock(),e.createBlock(ae,{key:8,label:t.control.label,control:t.control,onChange:l},null,8,["label","control"]))],64)):e.createCommentVNode("",!0)}}),Pe={class:"mb-4"},Xe=["aria-expanded","data-folder"],je={class:"bg-white rounded-b pt-4",role:"menu"},We=e.defineComponent({__name:"Folder",props:{controls:{},label:{}},setup(n){function c(t,u){u.value=t}const o=e.ref(!1),l=()=>{o.value=!o.value};return(t,u)=>(e.openBlock(),e.createElementBlock("div",Pe,[e.createElementVNode("button",{class:"flex items-center justify-between w-full py-2 px-4 bg-gray-100 border-none text-gray-400 font-bold text-xs font-sans cursor-pointer","aria-expanded":o.value,"aria-haspopup":"true",role:"button","data-folder":t.label,tabindex:"0",onClick:l},[e.createElementVNode("span",null,e.toDisplayString(t.label),1),e.createElementVNode("i",{class:e.normalizeClass(o.value?"i-ic:baseline-keyboard-arrow-up":"i-ic:baseline-keyboard-arrow-down")},null,2)],8,Xe),e.createVNode(e.Transition,{name:"slide","enter-active-class":" animate-fade-in animate-duration-200 animate-ease-in-out","leave-active-class":" animate-fade-out animate-duration-200 animate-ease-in-out"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.controls,a=>(e.openBlock(),e.createBlock(W,{key:a.label,control:a,role:"menuitem",onChange:i=>c(i,a)},null,8,["control","onChange"]))),128))],512),[[e.vShow,o.value]])]),_:1})]))}}),ve={tabindex:"0",class:"bg-white shadow-xl rounded border-4 border-solid border-black"},Ye=[e.createElementVNode("i",{class:"h-4 w-4 p-1.5 flex items-center line-height-0 rounded-full bg-gray-100 text-xs"},"🍰",-1),e.createElementVNode("div",null,[e.createElementVNode("i",{class:"i-ic-baseline-drag-indicator"}),e.createElementVNode("i",{class:"i-ic-baseline-drag-indicator"}),e.createElementVNode("i",{class:"i-ic-baseline-drag-indicator"})],-1),e.createElementVNode("div",null,null,-1)],He=280,Ge=e.defineComponent({__name:"TresLeches",props:{uuid:{}},setup(n){const c=n,{uuid:o}=e.toRefs(c),{width:l}=k.useWindowSize(),t=e.ref(null),u=O(o==null?void 0:o.value);function a(d,b){u[e.unref(d)].value=b,u[e.unref(d)][e.unref(d)]=b}const i=e.computed(()=>{const d={};for(const b in u){const y=u[b],s=y.folder||"default";d[s]||(d[s]=[]),d[s].push(y)}return d});return(d,b)=>(e.openBlock(),e.createBlock(e.unref(G),{id:e.unref(o),"initial-value":{x:e.unref(l)-He-40,y:10},class:e.normalizeClass(["absolute select-none z-24 w-280px font-sans text-xs",d.$attrs.class]),handle:t.value},{default:e.withCtx(()=>[e.createElementVNode("div",ve,[e.createElementVNode("header",{ref_key:"handle",ref:t,class:"relative cursor-grabbing p-4 flex justify-between text-gray-200 relative"},Ye,512),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(y,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s},[s!=="default"?(e.openBlock(),e.createBlock(We,{key:0,label:s,controls:y},null,8,["label","controls"])):e.createCommentVNode("",!0),s==="default"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(y,r=>(e.openBlock(),e.createBlock(W,{key:r.label,control:r,onChange:g=>a(r.key,g)},null,8,["control","onChange"]))),128)):e.createCommentVNode("",!0)],64))),128))])]),_:1},8,["id","initial-value","class","handle"]))}});V.TresLeches=Ge,V.useControls=Q,V.useControlsProvider=O,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})});
8
+ (function(V,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","@vueuse/core"],e):(V=typeof globalThis<"u"?globalThis:V||self,e(V.tresleches={},V.Vue,V.VueUseCore))})(this,function(V,e,w){"use strict";const U=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function G(l,r={}){if(!e.isRef(l))return e.toRefs(l);const n=Array.isArray(l.value)?Array.from({length:l.value.length}):{};for(const o in l.value)n[o]=e.customRef(()=>({get(){return l.value[o]},set(t){var u;if((u=e.toValue(r.replaceRef))!=null?u:!0)if(Array.isArray(l.value)){const i=[...l.value];i[o]=t,l.value=i}else{const i={...l.value,[o]:t};Object.setPrototypeOf(i,Object.getPrototypeOf(l.value)),l.value=i}else l.value[o]=t}}));return n}const N=e.toValue,H=U?window:void 0;function J(l,r={}){const{pointerTypes:n,preventDefault:o,stopPropagation:t,exact:u,onMove:s,onEnd:i,onStart:d,initialValue:y,axis:g="both",draggingElement:c=H,handle:a=l}=r,{width:b}=w.useWindowSize();let B=b.value;const p=e.ref(N(y)??{x:0,y:0});e.watch(b,()=>{const m=b.value-B;p.value.x+=m,B=b.value});const C=e.ref(),$=m=>n?n.includes(m.pointerType):!0,_=m=>{N(o)&&m.preventDefault(),N(t)&&m.stopPropagation()},E=m=>{if(!$(m)||N(u)&&m.target!==N(l))return;const f=N(l).getBoundingClientRect(),k={x:m.clientX-f.left,y:m.clientY-f.top};(d==null?void 0:d(k,m))!==!1&&(C.value=k,_(m))},S=m=>{if(!$(m)||!C.value)return;let{x:f,y:k}=p.value;(g==="x"||g==="both")&&(f=m.clientX-C.value.x),(g==="y"||g==="both")&&(k=m.clientY-C.value.y),p.value={x:f,y:k},s==null||s(p.value,m),_(m)},F=m=>{$(m)&&C.value&&(C.value=void 0,i==null||i(p.value,m),_(m))};if(U){const m={capture:r.capture??!0};w.useEventListener(a,"pointerdown",E,m),w.useEventListener(c,"pointermove",S,m),w.useEventListener(c,"pointerup",F,m)}return{...G(p),position:p,isDragging:e.computed(()=>!!C.value),style:e.computed(()=>`left:${p.value.x}px;top:${p.value.y}px;`)}}const Q=e.defineComponent({name:"UseDraggable",props:["storageKey","storageType","initialValue","exact","preventDefault","stopPropagation","pointerTypes","as","handle","axis","onStart","onMove","onEnd"],setup(l,{slots:r}){const n=e.ref(),o=e.computed(()=>l.handle??n.value),t=l.storageKey&&w.useStorage(l.storageKey,N(l.initialValue)||{x:0,y:0},w.isClient?l.storageType==="session"?sessionStorage:localStorage:void 0),u=t||l.initialValue||{x:0,y:0},s=(d,y)=>{var g;(g=l.onEnd)==null||g.call(l,d,y),t&&(t.value.x=d.x,t.value.y=d.y)},i=e.reactive(J(n,{...l,handle:o,initialValue:u,onEnd:s}));return()=>{if(r.default)return e.h(l.as||"div",{ref:n,style:`touch-action:none;${i.style}`},r.default(i))}}}),Z=Symbol("CONTROLS_CONTEXT_KEY"),O="default",D=e.reactive({});function R(l=O){return e.provide(Z,D),D[l]}const I=l=>{const r=/^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$|^0x(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;return typeof l=="boolean"?"boolean":typeof l=="number"?"number":typeof l=="string"&&r.test(l)?"color":typeof l=="string"?"string":l.isVector3||l.isVector2||l.isEuler||Array.isArray(l.value)||l.value.isVector3||l.value.isVector2||l.value.isEuler||Array.isArray(l.value.value)?"vector":l.min!==void 0||l.max!==void 0||l.step!==void 0?"range":l.options&&Array.isArray(l.options)?"select":"unknown"},A=(l,r,n,o)=>{const t={key:e.ref(l),label:e.ref(l),name:e.ref(l),type:e.ref(n),value:e.ref(r),visible:e.ref(!0),icon:e.ref(),uniqueKey:e.ref(l),[l]:e.ref(r)};return o&&(t.folder=e.ref(o)),t},v=(l,r,n)=>{const o={},t=typeof l=="string"?l:null,u=t?r:l,s=t&&t!=="fpsgraph"?n:r,i=(s==null?void 0:s.uuid)||O;if(D[i]||(D[i]=e.reactive({})),l==="fpsgraph"){const c=A("fpsgraph",null,"fpsgraph",null);return D[i].fpsgraph=c,o.fpsgraph=c,e.toRefs(e.reactive(o))}const d=D[i],y=e.isReactive(u),g=y?e.toRefs(u):{};for(const c in u){let a=u[c],b=c;if(y&&g[c]&&(a=g[c]),t&&(b=`${t}${c.charAt(0).toUpperCase()+c.slice(1)}`),typeof a=="object"&&!e.isRef(a)&&!Array.isArray(a)&&a.value!==void 0){const p=a,C=e.isRef(p.value)?p.value:e.ref(p.value),$=p.type||I(p),_=A(c,C,$,t);$==="select"&&(_.options=e.ref(p.options.map(E=>typeof E=="object"&&E.text&&E.value?E:{text:E,value:E}))),$==="range"&&(_.min=e.ref(p.min||0),_.max=e.ref(p.max||1),_.step=e.ref(p.step||.1)),_.label.value=p.label||c,_.icon.value=p.icon,_.visible.value=p.visible!==void 0?p.visible:!0,_.uniqueKey.value=b,d[b]=_,o[b]=_;continue}if(e.isRef(a)){const p=A(c,a,a.value.type||I(a.value),t);d[b]=p,o[b]=p;continue}else if(typeof a=="object"&&!Array.isArray(a)){const p=e.toRefs(a);p[c]&&(a=p[c])}const B=A(c,a,a.type||I(a),t);d[b]=B,o[b]=B,B.uniqueKey.value=b}return Object.keys(o).length>1?e.toRefs(e.reactive(o)):Object.values(o)[0]},ee=["for","title"],T=e.defineComponent({__name:"ControlLabel",props:{label:{},control:{}},setup(l){return(r,n)=>(e.openBlock(),e.createElementBlock("label",{for:r.control.uniqueKey,title:r.label,class:"tl-text-gray-500 tl-w-1/3 tl-truncate"},[r.control.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(r.control.icon)},null,2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(r.label),1)],64))],8,ee))}}),te={class:"tl-flex tl-px-4 tl-justify-between tl-gap-4 tl-items-center tl-mb-2"},le=["id","value","min","max","step"],ne=e.defineComponent({__name:"NumberControl",props:{label:{},control:{}},emits:["change"],setup(l,{emit:r}){const n=l,o=r;function t(c){const{target:a}=c;o("change",a.valueAsNumber)}const u=w.useMouse(),s=e.ref(0),i=e.ref(!1),d=c=>{s.value=c.clientX,i.value=!0},y=()=>{i.value=!1},g=c=>Math.floor(Math.abs(c)/10);return e.watch(u.x,c=>{if(i.value){const a=c-s.value,b=g(a);a>0?o("change",n.control.value+1+b):a<0&&o("change",n.control.value-1+b),n.control.min!==void 0&&n.control.value<n.control.min&&o("change",n.control.min),n.control.max!==void 0&&n.control.value>n.control.max&&o("change",n.control.max),s.value=c}}),(c,a)=>(e.openBlock(),e.createElementBlock("div",te,[e.createVNode(T,{label:c.label,control:c.control},null,8,["label","control"]),e.createElementVNode("input",{id:c.control.uniqueKey,value:c.control.value,class:e.normalizeClass(["tl-p-2 tl-w-1/3 tl-rounded tl-text-right tl-text-xs tl-text-gray-400 tl-bg-gray-100 tl-focus:border-gray-200 tl-outline-none tl-border-none tl-font-sans",{"tl-cursor-ew-resize":i.value}]),type:"number",min:c.control.min,max:c.control.max,step:c.control.step,onInput:t,onMousedown:d,onMouseup:y},null,42,le)]))}}),oe={class:"tl-flex tl-px-4 tl-justify-between tl-gap-4 tl-items-center tl-mb-2 tl-min-h-32px"},re=["id","value","aria-label"],ae=e.defineComponent({__name:"TextControl",props:{label:{},control:{}},emits:["change"],setup(l,{emit:r}){const n=r;function o(t){const{target:u}=t;n("change",u.value)}return(t,u)=>(e.openBlock(),e.createElementBlock("div",oe,[e.createVNode(T,{label:t.label,control:t.control},null,8,["label","control"]),e.createElementVNode("input",{id:t.control.uniqueKey,value:t.control.value,type:"text",tabindex:"0",class:"tl-p-2 tl-w-2/3 tl-rounded tl-text-right tl-text-xs tl-text-gray-400 tl-bg-gray-100 focus:tl-border-gray-200 tl-border-none tl-font-sans","aria-label":t.label,placeholder:"Enter value here...",onChange:o},null,40,re)]))}}),se={class:"tl-flex tl-px-4 tl-justify-start tl-gap-2 tl-items-center tl-mb-2 tl-min-h-32px"},ce={class:"tl-text-gray-500 tl-w-1/3"},ie=["id","checked"],ue=["for"],de=["aria-checked"],pe={class:"i-ic:baseline-check tl-text-light"},fe=e.defineComponent({__name:"BooleanControl",props:{label:{},control:{}},emits:["change"],setup(l,{emit:r}){const n=l,o=r;function t(s){const{target:i}=s;o("change",i.checked)}function u(s){(s.code==="Space"||s.code==="Enter")&&(s.preventDefault(),o("change",!n.control.value))}return(s,i)=>(e.openBlock(),e.createElementBlock("div",se,[e.createElementVNode("label",ce,e.toDisplayString(s.label),1),e.createElementVNode("input",{id:s.control.uniqueKey,checked:s.control.value,class:"tl-hidden",type:"checkbox",onInput:t},null,40,ie),e.createElementVNode("label",{for:s.control.uniqueKey,class:"tl-inline-flex tl-items-center tl-cursor-pointer"},[e.createElementVNode("span",{tabindex:"0",role:"checkbox","aria-checked":s.control.value.toString(),class:e.normalizeClass([{"tl-bg-dark-500":s.control.value,"tl-bg-gray-200":!s.control.value},"tl-w-4 tl-h-4 tl-flex tl-justify-center tl-items-center tl-rounded tl-border tl-border-gray-300 tl-mr-2 tl-transition-colors tl-duration-200"]),onKeydown:u},[e.withDirectives(e.createElementVNode("i",pe,null,512),[[e.vShow,s.control.value]])],42,de)],8,ue)]))}}),me={class:"tl-px-4 tl-relative tl-flex tl-justify-between tl-gap-4 tl-items-center tl-mb-2"},be=["value","min","max","step"],ge=["value","min","max","step"],ye=e.defineComponent({__name:"SliderControl",props:{label:{},control:{}},emits:["change"],setup(l,{emit:r}){const n=l,o=r;function t(a){const{target:b}=a;o("change",b.valueAsNumber)}const u=e.computed(()=>({backgroundImage:`linear-gradient(to right, #333 0% ${100*(n.control.value-(n.control.min||0))/((n.control.max||100)-(n.control.min||0))}%, #e2e2e2 0%)`})),s=w.useMouse(),i=e.ref(0),d=e.ref(!1),y=a=>{i.value=a.clientX,d.value=!0},g=()=>{d.value=!1},c=a=>Math.floor(Math.abs(a)/10);return e.watch(s.x,a=>{if(d.value){const b=a-i.value,B=c(b);b>0?o("change",n.control.value+1+B):b<0&&o("change",n.control.value-1+B),n.control.min!==void 0&&n.control.value<n.control.min&&o("change",n.control.min),n.control.max!==void 0&&n.control.value>n.control.max&&o("change",n.control.max),i.value=a}}),(a,b)=>(e.openBlock(),e.createElementBlock("div",me,[e.createVNode(T,{label:a.label,control:a.control},null,8,["label","control"]),e.createElementVNode("input",{value:a.control.value,class:"tl-w-1/2 tl-h-0.75 tl-bg-dark-200 tl-rounded-full tl-appearance-none",style:e.normalizeStyle(u.value),type:"range",min:a.control.min,max:a.control.max,step:a.control.step,onInput:t},null,44,be),e.createElementVNode("input",{value:a.control.value,class:e.normalizeClass(["tl-p-2 tl-w-1/4 tl-rounded tl-text-right tl-text-xs tl-text-gray-400 tl-bg-gray-100 tl-focus:border-gray-200 tl-outline-none tl-border-none tl-font-sans",{"tl-cursor-ew-resize":d.value}]),type:"number",min:a.control.min,max:a.control.max,step:a.control.step,onInput:t,onMousedown:y,onMouseup:g},null,42,ge)]))}}),P=(l,r)=>{const n=l.__vccOpts||l;for(const[o,t]of r)n[o]=t;return n},he=P(ye,[["__scopeId","data-v-207d19a7"]]),ke={class:"tl-flex tl-px-4 tl-justify-between tl-gap-4 tl-items-center tl-mb-2"},_e={class:"tl-text-gray-500 tl-w-1/3"},we=["id","value","aria-label"],Be=["id","aria-label","value"],Ce=e.defineComponent({__name:"ColorControl",props:{label:{},control:{}},emits:["change"],setup(l,{emit:r}){const n=r;function o(t){const{target:u}=t;n("change",u.value)}return(t,u)=>(e.openBlock(),e.createElementBlock("div",ke,[e.createElementVNode("label",_e,e.toDisplayString(t.label),1),e.createElementVNode("input",{id:t.control.uniqueKey,tabindex:"0",value:t.control.value,"aria-label":t.label,class:e.normalizeClass(["focus:tl-outline-none focus:tl-ring-2 focus:tl-ring-blue-600",{"important-tl-outline-gray-200":t.control.value==="#ffffff"}]),type:"color",onInput:o},null,42,we),e.createElementVNode("input",{id:t.control.uniqueKey,tabindex:"0","aria-label":t.label,value:t.control.value,class:"tl-p-2 tl-w-2/3 tl-rounded tl-text-right tl-text-xs tl-text-gray-400 tl-bg-gray-100 tl-border-none tl-font-sans",type:"text",onInput:o},null,40,Be)]))}});function K(l){return l&&typeof l.x=="number"&&typeof l.y=="number"}function q(l){return l&&typeof l.x=="number"&&typeof l.y=="number"&&typeof l.z=="number"}function Ee(l){if(typeof l=="number")return[l,l,l];if(q(l)){const{x:r,y:n,z:o}=l;return[r,n,o]}if(K(l)){const{x:r,y:n}=l;return[r,n]}return l}const xe={class:"tl-relative tl-w-2/3 tl-flex tl-justify-between tl-gap-0.5"},Ve={key:0,class:"tl-font-bold tl-px-1 tl-py-1 tl-text-0.65rem tl-text-gray-300"},$e=["id","step","value","onInput","onMousedown","onMouseup","onFocus"],Ne=e.defineComponent({__name:"VectorControl",props:{label:{},control:{}},emits:["change"],setup(l,{emit:r}){const n=l,o=r,t=w.useMouse(),{pressed:u}=w.useMousePressed(),s=e.ref(0),i=e.ref(!1),d=e.ref(0),y=e.ref(null),g=e.ref(1),c=w.useKeyModifier("Shift"),a=w.useKeyModifier("Alt");e.watch(c,f=>{g.value=f?10:1}),e.watch(a,f=>{g.value=f?.1:1});const b=f=>{y.value=f},B=()=>{y.value=null},p=(f,k)=>{d.value=k,s.value=f.clientX,i.value=!0},C=(f,k)=>{d.value=k,i.value=!1},$=()=>{i.value=!1};e.watch(u,f=>{f||(i.value=!1)});const _=f=>Math.floor(Math.abs(f)/10),E=e.computed(()=>Ee(n.control.value)),S=e.ref(["x","y","z"]),F=e.computed(()=>K(n.control.value)||q(n.control.value));function m(f,k){const{value:M}=n.control,{target:h}=f;d.value=k,M[F.value?S.value[d.value]:d.value]=Number.parseFloat(h.value),o("change",M)}return e.watch(t.x,f=>{if(i.value){const k=f-s.value,M=_(k),{value:h}=n.control,x=F.value?S.value[d.value]:d.value;k>0?h[x]+=g.value+M:k<0&&(h[x]-=g.value+M),n.control.min!==void 0&&h<n.control.min&&(h[x]=n.control.min),n.control.max!==void 0&&h>n.control.max&&(h[x]=n.control.max),o("change",h),s.value=f}}),(f,k)=>(e.openBlock(),e.createElementBlock("div",{class:"tl-flex tl-px-4 tl-justify-between tl-gap-1 tl-items-center tl-mb-2",onMouseup:k[0]||(k[0]=M=>$())},[e.createVNode(T,{label:f.label,control:f.control},null,8,["label","control"]),e.createElementVNode("div",xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(M,h)=>(e.openBlock(),e.createElementBlock("div",{key:f.label+h,class:e.normalizeClass(["tl-flex tl-items-center tl-bg-gray-100 tl-rounded",{"tl-w-2/5":y.value===h,"tl-w-1/3":e.unref(q)(f.control.value),"tl-w-1/2":e.unref(K)(f.control.value)}])},[S.value[h]&&F.value?(e.openBlock(),e.createElementBlock("span",Ve,e.toDisplayString(S.value[h]),1)):e.createCommentVNode("",!0),e.createElementVNode("input",{id:`${f.control.uniqueKey}-${S.value[h]}`,type:"number",step:g.value,class:e.normalizeClass(["tl-w-full tl-px-0 tl-p-1 tl-text-right tl-text-0.65rem tl-text-gray-400 tl-bg-transparent focus:tl-border-gray-200 tl-outline-none tl-border-none tl-font-sans tl-appearence-none",{"tl-cursor-ew-resize":i.value}]),value:E.value[h].toFixed(2),onInput:x=>m(x,h),onMousedown:x=>p(x,h),onMouseup:x=>C(x,h),onFocus:x=>b(h),onBlur:B},null,42,$e)],2))),128))])],32))}}),Se={class:"tl-flex tl-px-4 tl-justify-between tl-gap-4 tl-items-center tl-mb-2"},Me={class:"tl-text-gray-500 tl-w-1/3"},De={class:"tl-relative tl-w-2/3 tl-p-1 tl-rounded tl-text-right tl-text-xs tl-text-gray-400 tl-bg-gray-100 tl-focus:border-gray-200 tl-outline-none tl-border-none tl-font-sans"},Te={class:"tl-absolute tl-bottom-0.5 tl-right-0.5 tl-font-sans tl-text-xs"},ze=["points"],X=160,L=40,z=2,W=100,j=20,Fe=e.defineComponent({__name:"FPSGraph",props:{label:{},control:{}},setup(l){const r=w.useFps({every:W}),n=e.ref(""),o=e.ref([]),t=e.ref(X/z);let u=performance.now();return w.useRafFn(({timestamp:s})=>{s-u>=W&&(u=s,o.value.push(r.value),o.value.length>t.value&&o.value.shift(),n.value=o.value.map((i,d)=>`${d*z},${L+j-z/2-i*(L+j-z)/120}`).join(" "))}),(s,i)=>(e.openBlock(),e.createElementBlock("div",Se,[e.createElementVNode("label",Me,e.toDisplayString(s.label),1),e.createElementVNode("div",De,[e.createElementVNode("div",Te,e.toDisplayString(Math.round(e.unref(r)))+" FPS ",1),(e.openBlock(),e.createElementBlock("svg",{width:X,height:L,xmlns:"http://www.w3.org/2000/svg",class:"tl-bg-gray-100"},[e.createElementVNode("polyline",{points:n.value,fill:"none",stroke:"lightgray","stroke-width":z,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,ze)]))])]))}}),Ae={class:"tl-flex tl-px-4 tl-justify-between tl-gap-4 tl-items-center tl-mb-2 tl-min-h-32px"},Ie=["id","value"],Ke=["value"],qe=e.defineComponent({__name:"SelectControl",props:{label:{},control:{}},emits:["change"],setup(l,{emit:r}){const n=r;function o(t){n("change",t.target.value)}return(t,u)=>(e.openBlock(),e.createElementBlock("div",Ae,[e.createVNode(T,{label:t.label,control:t.control},null,8,["label","control"]),e.createElementVNode("select",{id:t.control.uniqueKey,value:t.control.value,class:"tl-p-2 tl-w-2/3 tl-rounded tl-text-left tl-text-xs tl-text-gray-400 tl-bg-gray-100 focus:tl-border-gray-200 tl-outline-none tl-border-none tl-font-sans",onChange:o},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.control.options,s=>(e.openBlock(),e.createElementBlock("option",{key:s.value,value:s.value},e.toDisplayString(s.text),9,Ke))),128))],40,Ie)]))}}),Le=P(e.defineComponent({__name:"ButtonControl",props:{label:{},control:{}},setup(l){const r=l,n=e.computed(()=>{const o="leches-btn",t=`leches-btn-${r.control.value.variant||"primary"}`,u=`leches-btn-${r.control.value.size||"sm"}`;return[o,t,u]});return(o,t)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(n.value),onClick:t[0]||(t[0]=(...u)=>o.control.value.onClick&&o.control.value.onClick(...u))},[e.createElementVNode("i",{class:e.normalizeClass([o.control.value.icon,o.control.value.label?"mr-1":""])},null,2),e.createTextVNode(" "+e.toDisplayString(o.control.value.label),1)],2))}}),[["__scopeId","data-v-926dfadc"]]),Ue={key:0},Y=e.defineComponent({__name:"ControlInput",props:{control:{}},emits:["change"],setup(l,{emit:r}){const n=r;function o(t){n("change",t)}return(t,u)=>t.control.visible?(e.openBlock(),e.createElementBlock("div",Ue,[t.control.type==="color"?(e.openBlock(),e.createBlock(Ce,{key:0,label:t.control.label,control:t.control,onChange:o},null,8,["label","control"])):t.control.type==="select"?(e.openBlock(),e.createBlock(qe,{key:1,label:t.control.label,control:t.control,onChange:o},null,8,["label","control"])):t.control.type==="vector"?(e.openBlock(),e.createBlock(Ne,{key:2,label:t.control.label,control:t.control,onChange:o},null,8,["label","control"])):t.control.type==="boolean"?(e.openBlock(),e.createBlock(fe,{key:3,label:t.control.label,control:t.control,onChange:o},null,8,["label","control"])):t.control.type==="fpsgraph"?(e.openBlock(),e.createBlock(Fe,{key:4,label:t.control.label,control:t.control},null,8,["label","control"])):t.control.type==="number"?(e.openBlock(),e.createBlock(ne,{key:5,label:t.control.label,control:t.control,onChange:o},null,8,["label","control"])):t.control.type==="range"?(e.openBlock(),e.createBlock(he,{key:6,label:t.control.label,control:t.control,onChange:o},null,8,["label","control"])):t.control.type==="button"?(e.openBlock(),e.createElementBlock("div",{key:7,class:e.normalizeClass(["tl-p-2",t.control.value.size==="tl-block"?"tl-flex":"tl-inline-flex"])},[e.createVNode(Le,{label:t.control.label,control:t.control},null,8,["label","control"])],2)):(e.openBlock(),e.createBlock(ae,{key:8,label:t.control.label,control:t.control,onChange:o},null,8,["label","control"]))])):e.createCommentVNode("",!0)}}),Oe={class:"tl-mb-4"},Re=["aria-expanded","data-folder"],Pe={class:"tl-bg-white tl-rounded-b tl-pt-4",role:"menu"},Xe=e.defineComponent({__name:"Folder",props:{controls:{},label:{}},setup(l){function r(t,u){u.value=t}const n=e.ref(!1),o=()=>{n.value=!n.value};return(t,u)=>(e.openBlock(),e.createElementBlock("div",Oe,[e.createElementVNode("button",{class:"tl-flex tl-items-center tl-justify-between tl-w-full tl-py-2 tl-px-4 tl-bg-gray-100 tl-border-none tl-text-gray-400 tl-font-bold tl-text-xs tl-font-sans tl-cursor-pointer","aria-expanded":n.value,"aria-haspopup":"true",role:"button","data-folder":t.label,tabindex:"0",onClick:o},[e.createElementVNode("span",null,e.toDisplayString(t.label),1),e.createElementVNode("i",{class:e.normalizeClass(n.value?"i-ic:baseline-keyboard-arrow-up":"i-ic:baseline-keyboard-arrow-down")},null,2)],8,Re),e.createVNode(e.Transition,{name:"slide","enter-active-class":"tl-animate-fade-in tl-animate-duration-200 tl-animate-ease-in-out","leave-active-class":"tl-animate-fade-out tl-animate-duration-200 tl-animate-ease-in-out"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.controls,s=>(e.openBlock(),e.createBlock(Y,{key:s.label,control:s,role:"menuitem",onChange:i=>r(i,s)},null,8,["control","onChange"]))),128))],512),[[e.vShow,n.value]])]),_:1})]))}}),We={tabindex:"0",class:"tl-bg-white tl-shadow-xl tl-rounded tl-border-4 tl-border-solid tl-border-black"},je=280,Ye=e.defineComponent({__name:"TresLeches",props:{uuid:{}},setup(l){const r=l,{uuid:n}=e.toRefs(r),{width:o}=w.useWindowSize(),t=e.ref(null),u=R(n==null?void 0:n.value);function s(d,y){u[e.unref(d)].value=y,u[e.unref(d)][e.unref(d)]=y}const i=e.computed(()=>{const d={};for(const y in u){const g=u[y],c=g.folder||"default";d[c]||(d[c]=[]),d[c].push(g)}return d});return(d,y)=>(e.openBlock(),e.createBlock(e.unref(Q),{id:e.unref(n),"initial-value":{x:e.unref(o)-je-40,y:10},class:e.normalizeClass(["tl-absolute tl-select-none tl-z-24 tl-w-280px tl-font-sans tl-text-xs",d.$attrs.class]),handle:t.value},{default:e.withCtx(()=>[e.createElementVNode("div",We,[e.createElementVNode("header",{ref_key:"handle",ref:t,class:"tl-relative tl-cursor-grabbing tl-p-4 tl-flex tl-justify-between tl-text-gray-200 tl-relative"},y[0]||(y[0]=[e.createElementVNode("i",{class:"tl-h-4 tl-w-4 tl-p-1.5 tl-flex tl-items-center tl-line-height-0 tl-rounded-full tl-bg-gray-100 tl-text-xs"},"🍰",-1),e.createElementVNode("div",null,[e.createElementVNode("i",{class:"i-ic-baseline-drag-indicator"}),e.createElementVNode("i",{class:"i-ic-baseline-drag-indicator"}),e.createElementVNode("i",{class:"i-ic-baseline-drag-indicator"})],-1),e.createElementVNode("div",null,null,-1)]),512),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(g,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[c!=="default"?(e.openBlock(),e.createBlock(Xe,{key:0,label:c,controls:g},null,8,["label","controls"])):e.createCommentVNode("",!0),c==="default"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(g,a=>(e.openBlock(),e.createBlock(Y,{key:a.label,control:a,onChange:b=>s(a.key,b)},null,8,["control","onChange"]))),128)):e.createCommentVNode("",!0)],64))),128))])]),_:1},8,["id","initial-value","class","handle"]))}});V.TresLeches=Ye,V.useControls=v,V.useControlsProvider=R,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})});
@@ -1,2 +1,2 @@
1
- export * from './normalize';
2
1
  export * from './is';
2
+ export * from './normalize';
package/package.json CHANGED
@@ -1,11 +1,15 @@
1
1
  {
2
2
  "name": "@tresjs/leches",
3
3
  "type": "module",
4
- "version": "0.14.0-next.0",
5
- "packageManager": "pnpm@8.3.1",
4
+ "version": "0.14.1",
5
+ "packageManager": "pnpm@9.15.4",
6
6
  "description": "Tasty GUI for Vue controls 🍰",
7
7
  "author": "Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)",
8
8
  "license": "MIT",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/Tresjs/leches.git"
12
+ },
9
13
  "keywords": [
10
14
  "vue",
11
15
  "gui",
@@ -18,24 +22,24 @@
18
22
  "types": "./dist/index.d.ts",
19
23
  "import": "./dist/tresleches.js"
20
24
  },
21
- "./styles": "./dist/style.css",
25
+ "./styles": "./dist/tresleches.css",
22
26
  "./*": "./*"
23
27
  },
24
28
  "main": "./dist/tresleches.js",
25
29
  "module": "./dist/tresleches.js",
26
30
  "types": "./dist/index.d.ts",
27
31
  "files": [
28
- "dist",
29
- "*.d.ts"
32
+ "*.d.ts",
33
+ "dist"
30
34
  ],
31
35
  "publishConfig": {
32
36
  "access": "public"
33
37
  },
34
38
  "scripts": {
35
- "dev": "cd playground && npm run dev",
36
- "build": "vue-tsc && vite build",
39
+ "dev": "cd playground && pnpm run dev",
40
+ "build": "vite build",
37
41
  "preview": "vite preview",
38
- "playground": "cd playground && npm run dev",
42
+ "playground": "cd playground && pnpm run dev",
39
43
  "test": "vitest",
40
44
  "test:ci": "vitest run",
41
45
  "test:ui": "vitest --ui",
@@ -43,7 +47,7 @@
43
47
  "test:browser:ui": "BROWSER_TEST=true vitest",
44
48
  "release": "release-it",
45
49
  "coverage": "vitest run --coverage",
46
- "lint": "eslint . --ext .js,.jsx,.ts,.tsx,.vue",
50
+ "lint": "eslint .",
47
51
  "story:dev": "histoire dev",
48
52
  "story:build": "histoire build",
49
53
  "story:preview": "histoire preview",
@@ -55,42 +59,43 @@
55
59
  "vue": ">=3.3.4"
56
60
  },
57
61
  "dependencies": {
58
- "@unocss/core": "^0.57.2",
59
- "@vueuse/components": "^10.5.0"
62
+ "@unocss/core": "^65.4.0",
63
+ "@vueuse/components": "^12.4.0"
60
64
  },
61
65
  "devDependencies": {
62
- "@histoire/plugin-vue": "^0.17.4",
63
- "@iconify-json/ic": "^1.1.14",
64
- "@iconify/json": "^2.2.138",
65
- "@release-it/conventional-changelog": "^7.0.2",
66
+ "@histoire/plugin-vue": "^0.17.17",
67
+ "@iconify-json/ic": "^1.2.2",
68
+ "@iconify/json": "^2.2.295",
69
+ "@release-it/conventional-changelog": "^10.0.0",
70
+ "@tresjs/eslint-config": "^1.4.0",
66
71
  "@tresjs/eslint-config-vue": "^0.2.1",
67
- "@typescript-eslint/eslint-plugin": "^6.9.1",
68
- "@typescript-eslint/parser": "^6.9.1",
69
- "@vitejs/plugin-vue": "^4.4.0",
70
- "@vitest/browser": "^0.34.6",
71
- "@vitest/ui": "^0.34.6",
72
- "@vue/test-utils": "^2.4.1",
73
- "@vueuse/core": "^10.5.0",
74
- "@vueuse/shared": "^10.5.0",
75
- "eslint": "^8.53.0",
76
- "eslint-plugin-vitest-globals": "^1.4.0",
77
- "eslint-plugin-vue": "^9.18.1",
78
- "histoire": "^0.17.4",
72
+ "@typescript-eslint/eslint-plugin": "^8.20.0",
73
+ "@typescript-eslint/parser": "^8.20.0",
74
+ "@vitejs/plugin-vue": "^5.2.1",
75
+ "@vitest/browser": "^2.1.8",
76
+ "@vitest/ui": "^2.1.8",
77
+ "@vue/test-utils": "^2.4.6",
78
+ "@vueuse/core": "^12.4.0",
79
+ "@vueuse/shared": "^12.4.0",
80
+ "eslint": "^9.18.0",
81
+ "eslint-plugin-vitest-globals": "^1.5.0",
82
+ "eslint-plugin-vue": "^9.32.0",
83
+ "histoire": "^0.17.17",
79
84
  "kolorist": "^1.8.0",
80
- "pathe": "^1.1.1",
81
- "release-it": "^16.2.1",
85
+ "pathe": "^2.0.1",
86
+ "release-it": "^18.1.1",
82
87
  "rollup-plugin-analyzer": "^4.0.0",
83
- "rollup-plugin-visualizer": "^5.9.2",
84
- "typescript": "^5.2.2",
85
- "unocss": "^0.57.2",
86
- "unplugin-vue-components": "^0.25.2",
87
- "vite": "^4.5.0",
88
- "vite-plugin-banner": "^0.7.1",
89
- "vite-plugin-dts": "^3.6.3",
90
- "vitepress": "1.0.0-rc.25",
91
- "vitest": "^0.34.6",
92
- "vue": "^3.3.7",
93
- "vue-tsc": "^1.8.22",
94
- "webdriverio": "^8.21.0"
88
+ "rollup-plugin-visualizer": "^5.14.0",
89
+ "typescript": "^5.7.3",
90
+ "unocss": "^65.4.0",
91
+ "unplugin-vue-components": "^28.0.0",
92
+ "vite": "^6.0.7",
93
+ "vite-plugin-banner": "^0.8.0",
94
+ "vite-plugin-css-injected-by-js": "^3.5.2",
95
+ "vite-plugin-dts": "^4.5.0",
96
+ "vitepress": "1.5.0",
97
+ "vitest": "^2.1.8",
98
+ "vue": "^3.5.13",
99
+ "webdriverio": "^9.5.7"
95
100
  }
96
101
  }
package/dist/style.css DELETED
@@ -1,8 +0,0 @@
1
- /**
2
- * name: @tresjs/leches
3
- * version: v0.14.0-next.0
4
- * (c) 2023
5
- * description: Tasty GUI for Vue controls 🍰
6
- * author: Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)
7
- */
8
- *,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }@font-face{font-family:Roboto Mono;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/robotomono/v23/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vq_SeW4Ep0.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Roboto Mono;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/robotomono/v23/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vq_QOW4Ep0.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Roboto Mono;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/robotomono/v23/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vq_R-W4Ep0.woff2) format("woff2");unicode-range:U+0370-03FF}@font-face{font-family:Roboto Mono;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/robotomono/v23/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vq_S-W4Ep0.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Roboto Mono;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/robotomono/v23/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vq_SuW4Ep0.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Roboto Mono;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/robotomono/v23/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vq_ROW4.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}.i-ic-baseline-drag-indicator{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M11 18c0 1.1-.9 2-2 2s-2-.9-2-2s.9-2 2-2s2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2s-2 .9-2 2s.9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1.2em;height:1.2em}.i-ic\:baseline-check{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M9 16.17L4.83 12l-1.42 1.41L9 19L21 7l-1.41-1.41z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1.2em;height:1.2em}.i-ic\:baseline-keyboard-arrow-down{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6l-6-6l1.41-1.41z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1.2em;height:1.2em}.i-ic\:baseline-keyboard-arrow-up{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1.2em;height:1.2em}.absolute{position:absolute}.relative{position:relative}.bottom-0\.5{bottom:.125rem}.right-0\.5{right:.125rem}.z-24{z-index:24}.-mt-0\.5{margin-top:-.125rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mr-2{margin-right:.5rem}.box-border{box-sizing:border-box}.block{display:block}.hidden{display:none}.h-0\.75{height:.1875rem}.h-30px{height:30px}.h-4{height:1rem}.min-h-32px{min-height:32px}.w-1\/2{width:50%}.w-1\/3{width:33.3333333333%}.w-1\/4{width:25%}.w-2\/3{width:66.6666666667%}.w-2\/5{width:40%}.w-280px{width:280px}.w-3{width:.75rem}.w-30px{width:30px}.w-4{width:1rem}.w-full{width:100%}.flex{display:flex}.inline-flex{display:inline-flex}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}.animate-fade-in{animation:fade-in 1s linear 1}.animate-fade-out{animation:fade-out 1s linear 1}.animate-duration-200{animation-duration:.2s}.animate-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.cursor-pointer{cursor:pointer}.cursor-grabbing{cursor:grabbing}.cursor-ew-resize{cursor:ew-resize}.select-none{-webkit-user-select:none;user-select:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-black{--un-border-opacity:1;border-color:rgb(0 0 0 / var(--un-border-opacity))}.border-gray-300{--un-border-opacity:1;border-color:rgb(209 213 219 / var(--un-border-opacity))}.focus\:border-gray-200:focus{--un-border-opacity:1;border-color:rgb(229 231 235 / var(--un-border-opacity))}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-b{border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem}.border-none{border-style:none}.border-solid{border-style:solid}.bg-dark-200{--un-bg-opacity:1;background-color:rgb(50 50 50 / var(--un-bg-opacity))}.bg-dark-500{--un-bg-opacity:1;background-color:rgb(31 31 31 / var(--un-bg-opacity))}.bg-dark-600{--un-bg-opacity:1;background-color:rgb(28 28 30 / var(--un-bg-opacity))}.bg-dark-700{--un-bg-opacity:1;background-color:rgb(27 27 27 / var(--un-bg-opacity))}.bg-gray-100{--un-bg-opacity:1;background-color:rgb(243 244 246 / var(--un-bg-opacity))}.bg-gray-200{--un-bg-opacity:1;background-color:rgb(229 231 235 / var(--un-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--un-bg-opacity:1;background-color:rgb(255 255 255 / var(--un-bg-opacity))}.p-0{padding:0}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-4{padding:1rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-right{text-align:right}.text-0\.65rem{font-size:.65rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.line-height-0{line-height:0}.font-sans{font-family:Roboto Mono,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-gray-200{--un-text-opacity:1;color:rgb(229 231 235 / var(--un-text-opacity))}.text-gray-300{--un-text-opacity:1;color:rgb(209 213 219 / var(--un-text-opacity))}.text-gray-400{--un-text-opacity:1;color:rgb(156 163 175 / var(--un-text-opacity))}.text-gray-500{--un-text-opacity:1;color:rgb(107 114 128 / var(--un-text-opacity))}.text-gray-700{--un-text-opacity:1;color:rgb(55 65 81 / var(--un-text-opacity))}.text-light{--un-text-opacity:1;color:rgb(246 246 246 / var(--un-text-opacity))}.text-light-100{--un-text-opacity:1;color:rgb(252 252 252 / var(--un-text-opacity))}.shadow-lg{--un-shadow:var(--un-shadow-inset) 0 10px 15px -3px var(--un-shadow-color, rgb(0 0 0 / .1)),var(--un-shadow-inset) 0 4px 6px -4px var(--un-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-xl{--un-shadow:var(--un-shadow-inset) 0 20px 25px -5px var(--un-shadow-color, rgb(0 0 0 / .1)),var(--un-shadow-inset) 0 8px 10px -6px var(--un-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.important-outline-gray-200{--un-outline-color-opacity:1 !important;outline-color:rgb(229 231 235 / var(--un-outline-color-opacity))!important}.outline{outline-style:solid}.outline-none{outline:2px solid transparent;outline-offset:2px}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--un-ring-width:2px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.focus\:ring-blue-600:focus{--un-ring-opacity:1;--un-ring-color:rgb(37 99 235 / var(--un-ring-opacity))}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}input[type=range][data-v-9e6267fe]{outline:none;appearance:none;-webkit-appearance:none;-moz-appearance:none}input[type=range][data-v-9e6267fe]::-webkit-slider-thumb{height:1rem;width:.75rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-width:2px;border-radius:.125rem;--un-bg-opacity:1;background-color:rgb(50 50 50 / var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset) 0 10px 15px -3px var(--un-shadow-color, rgb(0 0 0 / .1)),var(--un-shadow-inset) 0 4px 6px -4px var(--un-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}input[type=range][data-v-9e6267fe]::-moz-range-thumb{height:1rem;width:.75rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-width:2px;border-radius:.125rem;--un-bg-opacity:1;background-color:rgb(50 50 50 / var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset) 0 10px 15px -3px var(--un-shadow-color, rgb(0 0 0 / .1)),var(--un-shadow-inset) 0 4px 6px -4px var(--un-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}input[type=color]{box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.125rem;border-style:none;background-color:transparent;padding:0;outline:2px solid transparent;outline-offset:2px;cursor:pointer}input[type=color]::-webkit-color-swatch-wrapper{border-style:none;padding:0}input[type=color]::-webkit-color-swatch{margin-top:-.125rem;height:30px;width:30px;border-radius:.125rem;border-style:none;padding:0}.btn[data-v-846e24c4]{display:flex;cursor:pointer;align-items:center;border-radius:.375rem;border-style:none;font-weight:700;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-duration:.2s}.btn-sm[data-v-846e24c4]{padding:.5rem .625rem;font-size:.75rem;line-height:1rem}.btn-md[data-v-846e24c4]{padding:.5rem .75rem;font-size:.875rem;line-height:1.25rem}.btn-lg[data-v-846e24c4]{padding:.5rem 1rem;font-size:1rem;line-height:1.5rem}.btn-block[data-v-846e24c4]{width:100%;justify-content:center;padding:.5rem 1rem;font-size:1rem;line-height:1.5rem}.btn-primary[data-v-846e24c4]{--un-bg-opacity:1;background-color:rgb(243 244 246 / var(--un-bg-opacity));--un-text-opacity:1;color:rgb(55 65 81 / var(--un-text-opacity))}.btn-primary[data-v-846e24c4]:hover{--un-bg-opacity:1;background-color:rgb(229 231 235 / var(--un-bg-opacity))}.btn-secondary[data-v-846e24c4]{--un-bg-opacity:1;background-color:rgb(27 27 27 / var(--un-bg-opacity));--un-text-opacity:1;color:rgb(252 252 252 / var(--un-text-opacity))}.btn-secondary[data-v-846e24c4]:hover{--un-bg-opacity:1;background-color:rgb(28 28 30 / var(--un-bg-opacity))}