@dynamix-layout/solid 1.0.1 → 1.0.2

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # @dynamix-layout/solid
2
2
 
3
+ ## 1.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#79](https://github.com/xcode-studio/dynamix-layout/pull/79) [`f53fecc`](https://github.com/xcode-studio/dynamix-layout/commit/f53feccc08eada1627b6855cbf1f7ba053dfdde4) Thanks [@akash-aman](https://github.com/akash-aman)! - Performance and layout fixes:
8
+
9
+ - Fix listener leak in the React hook (subscriptions were added on every render) and unsubscribe on unmount in Solid.
10
+ - Coalesce slider pointer moves to one layout update per animation frame.
11
+ - Keep sliders following the pointer over iframes and other embedded content.
12
+ - Remove resize/drag jitter: round cumulative split boundaries so unrelated panels never move and edges move smoothly.
13
+ - Keep tabsets outside a dragged subtree in the shared maps (tab clicks no longer break after nested slider drags).
14
+ - A tabset can no longer be shorter than its tab bar; empty tab bodies are hidden.
15
+ - Solid: tab bodies follow deferred updates when resize/slider timeouts are enabled.
16
+ - Fix crash when dropping the last tab of a tabset onto its own tabset; reject moves relative to nested rows.
17
+ - Remove the Google Fonts import from the bundled CSS.
18
+
19
+ - [#82](https://github.com/xcode-studio/dynamix-layout/pull/82) [`993920c`](https://github.com/xcode-studio/dynamix-layout/commit/993920c407f2eea552b4349c0932b58f39902549) Thanks [@akash-aman](https://github.com/akash-aman)! - Internal refactor for maintainability (no breaking changes):
20
+
21
+ - Core engine split into focused modules (tree builder, geometry, slider, tree mutations, node, shared state); `DynamixLayoutCore` keeps its public API as a facade.
22
+ - New core exports shared by the React and Solid wrappers: `getTabsetDropPreview`, `getNavbarDropPreview`, `getRootSplitPreview`, `isSameDropPreview`, `setElementRect`, `getTabBodyRect`, `createFrameScheduler`.
23
+ - `DynamixLayoutCore` accepts optional `createId` and `timer` options (defaults: `crypto.randomUUID`, `setTimeout`) for deterministic tests.
24
+ - Solid: the drag hover state is now actually reset after a drag ends.
25
+ - The hooks' internal state setters (`setIsUpdating`, `setDragging`, `setTabsets`, `setSliders`, `setLayoutJSON`) are deprecated and will be removed in v2.
26
+
27
+ - Updated dependencies [[`320b881`](https://github.com/xcode-studio/dynamix-layout/commit/320b881f74d4a92cd1b4bbc584b6bd4afed35726), [`f53fecc`](https://github.com/xcode-studio/dynamix-layout/commit/f53feccc08eada1627b6855cbf1f7ba053dfdde4), [`993920c`](https://github.com/xcode-studio/dynamix-layout/commit/993920c407f2eea552b4349c0932b58f39902549)]:
28
+ - @dynamix-layout/core@1.1.0
29
+
3
30
  ## 1.0.1
4
31
 
5
32
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("solid-js/web"),m=require("@dynamix-layout/core"),T=require("solid-js");var M=a.template("<div>"),ze=a.template("<div><div>"),We=a.template('<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class="lucide lucide-grip-vertical size-2.5"><circle cx=9 cy=12 r=1></circle><circle cx=9 cy=5 r=1></circle><circle cx=9 cy=19 r=1></circle><circle cx=15 cy=12 r=1></circle><circle cx=15 cy=5 r=1></circle><circle cx=15 cy=19 r=1>'),Ie=a.template('<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><circle cx=9 cy=12 r=1></circle><circle cx=9 cy=5 r=1></circle><circle cx=9 cy=19 r=1></circle><circle cx=15 cy=12 r=1></circle><circle cx=15 cy=5 r=1></circle><circle cx=15 cy=19 r=1>');const fe=r=>(()=>{var i=M();return a.spread(i,a.mergeProps(r,{get class(){return`DefaultWrapTabLabel ${r.class||""}`},get"data-state"(){return r.active?"active":"inactive"},get style(){return{"align-self":"center",padding:"4px 6px","box-sizing":"border-box","font-size":"14px","border-radius":"4px",...r.style}}}),!1,!0),a.insert(i,()=>r.children),i})(),he=r=>(()=>{var i=M();return a.spread(i,a.mergeProps(r,{get class(){return`DefaultWrapTabBody hide-scrollbar ${r.class||""}`},get style(){return{"box-sizing":"border-box",height:"100%",width:"100%",display:"grid",overflow:"auto","scrollbar-width":"none","-ms-overflow-style":"none",...r.style}}}),!1,!0),a.insert(i,()=>r.children),i})(),me=r=>(()=>{var i=M();return a.spread(i,a.mergeProps(r,{get class(){return`DefaultWrapTabHead hide-scrollbar ${r.class||""}`},get style(){return{display:"grid","grid-auto-flow":"column","justify-content":"start","align-items":"center",gap:"6px","padding-left":"8px",width:"100%","box-sizing":"border-box",height:"100%","place-items":"self-start",overflow:"auto","background-color":"#dfdfdf","scrollbar-width":"none","-ms-overflow-style":"none",...r.style}}}),!1,!0),a.insert(i,()=>r.children),i})(),ye=r=>(()=>{var i=M();return a.spread(i,a.mergeProps(r,{get class(){return`DefaultWrapTabPanel ${r.class||""}`},get style(){return{display:"grid","align-items":"center","place-items":"self-start","box-sizing":"border-box",position:"absolute","border-radius":"8px",...r.style}}}),!1,!0),a.insert(i,()=>r.children),i})(),pe=r=>(()=>{var i=M();return a.spread(i,a.mergeProps(r,{get class(){return`DefaultHoverElement ${r.class||""}`},get style(){return{display:"flex","justify-content":"center","align-items":"center",opacity:.7,position:"absolute","box-sizing":"border-box","font-weight":"bold","pointer-events":"none","background-color":"rgba(0, 175, 249, 0.5)","border-radius":"10px",transition:"all 0.2s ease",border:"2px dashed rgb(0, 196, 42)",...r.style}}}),!1,!0),a.insert(i,()=>r.children),i})(),be=r=>(()=>{var i=ze(),p=i.firstChild;return a.spread(i,a.mergeProps(r,{get class(){return`DefaultSliderElement ${r.class||""}`},get style(){return{width:"100%",height:"100%",position:"absolute","box-sizing":"border-box","background-color":"white","z-index":9,cursor:"grab",...r.style}}}),!1,!0),p.style.setProperty("display","flex"),p.style.setProperty("align-items","center"),p.style.setProperty("gap","4px"),p.style.setProperty("height","100%"),a.insert(p,(()=>{var b=a.memo(()=>!r.direction);return()=>b()?We():(()=>{var c=Ie();return c.style.setProperty("transform","rotate(90deg)"),c})()})()),a.insert(i,()=>r.children,null),a.effect(b=>(b=r.direction?"column":"row")!=null?p.style.setProperty("flex-direction",b):p.style.removeProperty("flex-direction")),i})(),xe=r=>{const[i,p]=T.splitProps(r,["area","size","gap","class","style","children"]),b=T.createMemo(()=>{const c=i.size||{h:"20%",w:"6px"},C=i.gap||"0px",y={};return i.area==="left"?(Object.assign(y,{"border-top-right-radius":"16px","border-bottom-right-radius":"16px",height:c.h,left:C,width:c.w}),y.top=`calc(50% - ${c.h} / 2)`):i.area==="top"?(Object.assign(y,{"border-bottom-left-radius":"16px","border-bottom-right-radius":"16px",width:c.h,top:C,height:c.w}),y.left=`calc(50% - ${c.h} / 2)`):i.area==="right"?(Object.assign(y,{"border-top-left-radius":"16px","border-bottom-left-radius":"16px",height:c.h,right:C,width:c.w}),y.top=`calc(50% - ${c.h} / 2)`):i.area==="bottom"&&(Object.assign(y,{"border-top-left-radius":"16px","border-top-right-radius":"16px",width:c.h,bottom:C,height:c.w}),y.left=`calc(50% - ${c.h} / 2)`),y});return(()=>{var c=M();return a.spread(c,a.mergeProps(p,{get class(){return`RootSplitterHoverEl ${i.class||""}`},get style(){return{position:"absolute","z-index":-1,display:"none","box-sizing":"border-box","background-color":"#0081f9",cursor:"grab",...i.style,...b()}}}),!1,!0),a.insert(c,()=>i.children),c})()},ve=({tabOutput:r,rootId:i,layoutTree:p,updateJSON:b,dimensions:c,tabHeadHeight:C,enableTabbar:y,bondWidth:te,minTabHeight:re,minTabWidth:k,sliderUpdateTimeout:ne,windowResizeTimeout:K,disableSliderTimeout:j,disableResizeTimeout:F})=>{const B=new Map,U=new Map,A=new Map,G=new Map,R={current:void 0},q=[],[V,ae]=T.createSignal(p),[Q,I]=T.createSignal(new Map),[oe,Z]=T.createSignal(new Map),[ie,H]=T.createSignal(!1);let L=null;const[se,E]=T.createSignal(!1),s={src:void 0,des:void 0,area:void 0,drag:!1},o={sliderId:void 0,isSliding:!1},u=new m.DynamixLayoutCore({tabs:r.keys,tree:V(),minW:k,minH:re,bond:te,uqid:i,tabsIds:r.name}),x=n=>{const e=new Map(n);I(e)},de=n=>{const e=new Map(n);Z(e)},X=()=>{m.Node.cache.tabOpts.get().forEach((e,l)=>{const t=G.get(l);t&&(t.style.width=`${e.nodDims.w}px`,t.style.height=y?`${e.nodDims.h-C}px`:`${e.nodDims.h}px`,t.style.left=`${e.nodDims.x}px`,t.style.top=y?`${e.nodDims.y+C}px`:`${e.nodDims.y}px`,t.style.display=e.nodOpen?"block":"none")})},De=()=>{m.Node.cache.bndOpts.get().forEach((e,l)=>{const t=U.get(l);t&&(t.style.width=`${e.nodDims.w}px`,t.style.height=`${e.nodDims.h}px`,t.style.left=`${e.nodDims.x}px`,t.style.top=`${e.nodDims.y}px`)})};m.Node.cache.nodOpts.onChange(n=>{n.forEach((e,l)=>{const t=A.get(l);t&&(t.style.width=`${e.nodDims.w}px`,t.style.height=`${e.nodDims.h}px`,t.style.left=`${e.nodDims.x}px`,t.style.top=`${e.nodDims.y}px`);const d=B.get(l);d&&y&&(d.style.width=`${e.nodDims.w}px`,d.style.height=y?`${C}px`:"0px",d.style.left=`${e.nodDims.x}px`,d.style.top=`${e.nodDims.y}px`)})}),m.Node.cache.bndOpts.onChange(n=>{n.forEach((e,l)=>{const t=U.get(l);t&&(t.style.width=`${e.nodDims.w}px`,t.style.height=`${e.nodDims.h}px`,t.style.left=`${e.nodDims.x}px`,t.style.top=`${e.nodDims.y}px`)})});const ce=n=>{o.isSliding&&(u.updateSlider(o.sliderId,{x:n.clientX,y:n.clientY},j,ne),De(),X())},ee=n=>{if(!o.isSliding)return;const e=n.currentTarget;o.isSliding=!1,o.sliderId=void 0,b&&b(m.DynamixLayoutCore._root.toJSON()),e.releasePointerCapture(n.pointerId),e.removeEventListener("pointermove",ce),e.removeEventListener("pointerup",ee),e.removeEventListener("pointercancel",ee)},Te=n=>{n.preventDefault();const e=n.currentTarget;o.isSliding=!0,o.sliderId=e.id,e.setPointerCapture(n.pointerId),e.addEventListener("pointermove",ce),e.addEventListener("pointerup",ee),e.addEventListener("pointercancel",ee)},h={},Ee=(n,e,l)=>{if(!R.current||!s||!l)return null;s.des=l;const t=l.getBoundingClientRect();if(!t)return null;const d=t.width,g=t.height,f=n-t.left,w=e-t.top;let v,$,N,D,P;f<d/3?(v="left",$=t.left,N=t.top,D=d/2,P=g):f>2*d/3?(v="right",$=t.left+d/2,N=t.top,D=d/2,P=g):w<g/3?(v="top",$=t.left,N=t.top,D=d,P=g/2):w>2*g/3?(v="bottom",$=t.left,N=t.top+g/2,D=d,P=g/2):(v="contain",$=t.left+d*.1,N=t.top+g*.1,D=d*.8,P=g*.8),(h.area!==v||h.left!==$||h.top!==N||h.width!==D||h.height!==P)&&(Y($,N,D,P,v),h.area=v,h.left=$,h.top=N,h.width=D,h.height=P),s.area=v},$e=n=>{n.preventDefault(),n.stopPropagation(),n.dataTransfer&&(n.dataTransfer.dropEffect="move");const e=n.currentTarget,l=Array.from(e.childNodes),t=n.clientX,d=n.clientY;if(!R.current||!s||l.length===0)return;const g=l[0].parentElement;if(!g)return;const f=g.getBoundingClientRect(),w=l[0],v=l[l.length-1],$=w.getBoundingClientRect(),N=v.getBoundingClientRect();let D=6;if(d<f.top||d>f.bottom)return;if(t>N.right){const S=N.right+1,O=N.top,z=D-2,W=N.height,_="right";Y(S,O,z,W,_),s.des=v,s.area=_;return}if(t<$.left){const S=$.left-D+1,O=$.top,z=D-2,W=$.height,_="left";Y(S,O,z,W,_),s.des=w,s.area=_;return}let P=null,ue=1/0,J=!1,le=0;for(let S=0;S<l.length;S++){const O=l[S].getBoundingClientRect(),z=O.left+O.width/2,W=Math.abs(t-z);W<ue&&(ue=W,P=l[S],J=t<z,le=S)}if(l.length>1&&(J&&le>0||!J&&le<l.length-1)&&(D=l[1].getBoundingClientRect().left-$.right),P){const S=P.getBoundingClientRect(),O=J?S.left-D+1:S.right+1,z=S.top,W=D-2,_=S.height,ge=J?"left":"right";Y(O,z,W,_,ge),s.des=P,s.area=ge}},Se=n=>{n.preventDefault(),n.stopPropagation(),n.dataTransfer&&(n.dataTransfer.dropEffect="move");const e=n.currentTarget.dataset.area,l=n.currentTarget.dataset.uid;if(!e||!l||!R.current||!s)return;s.des=n.currentTarget,s.area=e;const t=c();let d=t.x,g=t.y,f=t.w,w=t.h;e==="left"?(d=t.x,g=t.y,f=t.w/2,w=t.h):e==="right"?(d=t.x+t.w/2,g=t.y,f=t.w/2,w=t.h):e==="top"?(d=t.x,g=t.y,f=t.w,w=t.h/2):e==="bottom"&&(d=t.x,g=t.y+t.h/2,f=t.w,w=t.h/2),Y(d,g,f,w,e)},Y=(n,e,l,t,d)=>{if(h.area!==d||h.left!==n||h.top!==e||h.width!==l||h.height!==t){const g=R.current;if(g){const f={};for(let w=0;w<g.style.length;w++){const v=g.style[w];v&&(f[v]=g.style.getPropertyValue(v))}Object.assign(g.style,f,{left:`${n}px`,top:`${e}px`,width:`${l}px`,height:`${t}px`,display:"block","z-index":"100"}),h.area=d,h.left=n,h.top=e,h.width=l,h.height=t}}},Ce=n=>{if(n.stopPropagation(),H(!0),document.body.style.cursor="move",n.currentTarget){if(n.dataTransfer){n.dataTransfer.effectAllowed="move";const e=document.createElement("div");e.style.width="1px",e.style.height="1px",e.style.backgroundColor="transparent",e.style.position="absolute",e.style.top="-1000px",document.body.appendChild(e),n.dataTransfer.setDragImage(e,0,0),setTimeout(()=>{e.parentNode&&e.parentNode.removeChild(e)},0)}q.forEach(e=>{e&&(e.style.display="block",e.style.zIndex="99")}),A.forEach(e=>{e&&(e.style.display="block",e.style.zIndex="95")}),s.src=n.currentTarget,s.drag=!0}},Ne=n=>{if(n.preventDefault(),n.stopPropagation(),document.body.style.cursor="move",n.dataTransfer&&(n.dataTransfer.dropEffect="move"),!s?.src)return;const e=n.currentTarget,l=n.clientX,t=n.clientY;L&&cancelAnimationFrame(L),L=requestAnimationFrame(()=>{Ee(l,t,e)})},Pe=n=>{if(document.body.style.cursor="default",q.forEach(e=>{e&&(e.style.display="none",e.style.zIndex="-1")}),L&&(cancelAnimationFrame(L),L=null),R.current&&(R.current.style.display="none",R.current.style.zIndex="-1"),Object.assign(h,{}),s.drag=!1,!s?.src||!s?.des){s.area=void 0,s.src=void 0,s.des=void 0,H(!1);return}if(s.src===s.des){s.area=void 0,s.src=void 0,s.des=void 0,H(!1);return}if(s.src&&s.des){if(!s.area){console.warn("No area specified for drag and drop"),H(!1);return}if(!u.updateTree(s.src.dataset.uid,s.des.dataset.uid,s.area||"contain")){console.warn("Failed to update layout tree"),H(!1);return}requestAnimationFrame(()=>{x(m.Node.cache.nodOpts.get()),de(m.Node.cache.bndOpts.get()),X(),b&&b(m.DynamixLayoutCore._root.toJSON())})}s.area=void 0,s.src=void 0,s.des=void 0,H(!1)},Re=n=>{n.preventDefault(),n.stopPropagation(),n.dataTransfer&&(n.dataTransfer.dropEffect="move")},Le=n=>{n.preventDefault(),n.stopPropagation()},He=n=>{n.preventDefault(),n.stopPropagation(),n.dataTransfer&&n.dataTransfer.getData("text/plain")},Oe=n=>{const e=n.currentTarget,l=e.dataset.uid;if(!l)return;const t=m.Node.cache.mapElem.get(l);if(!(t instanceof m.Node)){console.warn(`Element with uid ${l} is not a Node instance`);return}if(!t||!t.host||!t.host.unId){console.warn(`Node with uid ${l} not found in mapNode`);return}if(t.host.open==t.name){console.warn(`Node ${t.name} is already open`);return}const d=m.Node.cache.nodOpts.get().get(t.host.unId);if(!d||d.nodOpen&&t?.open)return;t.host.open=t.name,d.nodOpen=t.name,d.nodKids?.forEach(f=>{f.nodOpen=f.nodName===t.name}),e?.parentElement?.childNodes?.forEach(f=>{f instanceof HTMLDivElement&&f.dataset.uid!==l?f.dataset.state="inactive":f.dataset.state="active"}),X()};return T.onMount(()=>{const n=l=>{u.updateDimension(c(),l,K),X()};n(!0);const e=()=>n(F??!1);window.addEventListener("resize",e),x(m.Node.cache.nodOpts.get()),de(m.Node.cache.bndOpts.get()),X(),b&&b(m.DynamixLayoutCore._root.toJSON()),T.onCleanup(()=>{window.removeEventListener("resize",e),L&&cancelAnimationFrame(L)})}),{tabsets:Q,sliders:oe,tabsetsRef:B,panelsRef:A,tabsRef:G,slidersRef:U,layoutJSON:V,layoutInstance:u,hoverElementRef:R,rootSplitHoverEl:q,dragging:ie,isUpdating:se,setIsUpdating:E,setDragging:H,setTabsets:I,setSliders:Z,setLayoutJSON:ae,onDragStart:Ce,onDragOver:Ne,onDragEnd:Pe,onDragEnter:Re,onDragLeave:Le,onDrop:He,onPointerDown:Te,updateActiveTab:Oe,handleRootSplit:Se,handleNavbarDragOver:$e}};var _e=a.template("<div>"),ke=a.template('<div class="flex items-center justify-center h-full"><span class=text-gray-500>No content');const we=r=>{const i=[],p=new Map,b=new Map;for(const[c,C]of r){const y=crypto.randomUUID();i.push(c),p.set(c,{uqid:y,name:c,node:C}),b.set(c,y)}return{keys:i,maps:p,name:b}},Be=r=>{const i=T.createMemo(()=>we(r.tabs));let p;const b=()=>{const E=p;if(!E)return{w:0,h:0,x:0,y:0};const s=E.getBoundingClientRect(),o=r.pad||{t:0,b:0,l:0,r:0};return{w:s.width-(o.l+o.r),h:s.height-(o.t+o.b),x:s.left+o.l,y:s.top+o.t}},{tabsetsRef:c,slidersRef:C,sliders:y,tabsets:te,hoverElementRef:re,onDragEnd:k,onDragOver:ne,onDragStart:K,onDragEnter:j,onDragLeave:F,onDrop:B,dragging:U,panelsRef:A,onPointerDown:G,handleNavbarDragOver:R,updateActiveTab:q,rootSplitHoverEl:V,handleRootSplit:ae,tabsRef:Q,isUpdating:I}=ve({tabOutput:i(),rootId:r.rootId||"dynamix-layout-root",updateJSON:r.updateJSON,enableTabbar:r.enableTabbar===void 0?!0:r.enableTabbar,layoutTree:r.layoutTree,tabHeadHeight:r.tabHeadHeight||m.DynamixLayoutCore._minH,dimensions:b,sliderUpdateTimeout:r.sliderUpdateTimeout||2,windowResizeTimeout:r.windowResizeTimeout||2,bondWidth:r.bondWidth||m.DynamixLayoutCore._bond,minTabHeight:r.minTabHeight||m.DynamixLayoutCore._minH,minTabWidth:r.minTabWidth||m.DynamixLayoutCore._minW,disableSliderTimeout:r.disableSliderTimeout===void 0?!0:r.disableSliderTimeout,disableResizeTimeout:r.disableResizeTimeout===void 0?!0:r.disableResizeTimeout,hoverElementStyles:r.hoverElementStyles}),oe=r.WrapTabPanel||ye,Z=r.WrapTabHead||me,ie=r.WrapTabLabel||fe,H=r.WrapTabBody||he,L=r.SliderElement||be,se=r.HoverElement||pe;return(()=>{var E=_e(),s=p;return typeof s=="function"?a.use(s,E):p=E,a.spread(E,a.mergeProps({get id(){return r.rootId||"dynamix-layout-root"}},r,{get"data-testid"(){return r.rootId||"dynamix-layout-root"},get class(){return U()?"is-dragging":""},get style(){return{position:"relative",width:"100%",height:"100%",overflow:"hidden",...r.style}}}),!1,!0),a.insert(E,a.createComponent(T.For,{get each(){return Array.from(te().values())},children:o=>[a.createComponent(oe,{ref:u=>{const x=o.uidNode;u?A.set(x,u):A.delete(x)},onDragEnd:k,onDragOver:ne,onDragEnter:j,onDragLeave:F,onDrop:B,get"data-uid"(){return o.uidNode},get"data-type"(){return o.typNode},get class(){return"hide-scrollbar DefaultWrapTabPanel "+(r.tabPanelElementClass||"")},get style(){return{position:"absolute",...r.tabPanelElementStyles,width:`${o.nodDims.w}px`,height:`${o.nodDims.h}px`,left:`${o.nodDims.x}px`,top:`${o.nodDims.y}px`,"background-color":"transparent"}}}),a.createComponent(Z,{get draggable(){return!I()},get"data-uid"(){return o.uidNode},"data-type":"tabset",onDragOver:R,onDragStart:K,onDragEnd:k,onDragEnter:j,onDragLeave:F,onDrop:B,ref:u=>{const x=o.uidNode;u?c.set(x,u):c.delete(x)},get class(){return"hide-scrollbar "+(r.tabHeadElementClass||"")},get style(){return{...r.tabHeadElementStyles,position:"absolute","z-index":99,width:`${o.nodDims.w}px`,height:`${r.tabHeadHeight||m.DynamixLayoutCore._minH}px`,left:`${o.nodDims.x}px`,top:`${o.nodDims.y}px`,cursor:I()?"wait":"pointer"}},get children(){return a.createComponent(T.For,{get each(){return o.nodKids},children:u=>a.createComponent(ie,{get"data-uid"(){return u.uidNode},"data-type":"tab",onDragStart:K,onDragEnd:k,get draggable(){return!I()},get active(){return!!u.nodOpen},get class(){return"hide-scrollbar "+(r.tabLabelElementClass||"")},get style(){return{cursor:I()?"wait":"pointer",...r.tabLabelElementStyles}},onClick:q,get children(){return a.memo(()=>!!r.tabNames)()&&r.tabNames.get(u.nodName)||u.nodName}})})}})]}),null),a.insert(E,a.createComponent(T.For,{get each(){return i().keys},children:o=>{const u=i().maps.get(o)?.uqid;return a.createComponent(H,{id:u,draggable:!1,"data-uid":u,get class(){return"hide-scrollbar "+(r.tabBodyElementClass||"")},get style(){return{position:"absolute","z-index":90,"overscroll-behavior":"contain",...r.tabBodyElementStyles}},ref:x=>{u&&(x?Q.set(u,x):Q.delete(u))},get children(){return i().maps.get(o)?.node||ke()}})}}),null),a.insert(E,a.createComponent(T.For,{get each(){return Array.from(y().values())},children:o=>a.createComponent(L,{get id(){return o.uidNode},get"data-uid"(){return o.uidNode},get direction(){return o.nodeDir},onPointerDown:G,get class(){return"hide-scrollbar "+(r.sliderElementClass||"")},ref:u=>{const x=o.uidNode;u?C.set(x,u):C.delete(x)},get style(){return{width:`${o.nodDims.w}px`,height:`${o.nodDims.h}px`,left:`${o.nodDims.x}px`,top:`${o.nodDims.y}px`,cursor:o.nodeDir?"ns-resize":"ew-resize",...r.sliderElementStyles}}})}),null),a.insert(E,a.createComponent(se,{get class(){return"hide-scrollbar "+(r.hoverElementClass||"")},get style(){return{...r.hoverElementStyles}},ref:o=>re.current=o}),null),a.insert(E,a.createComponent(T.For,{each:["left","right","top","bottom"],children:(o,u)=>a.createComponent(xe,{onDragOver:ae,onDragEnd:k,onDragEnter:j,onDragLeave:F,onDrop:B,get"data-uid"(){return r.rootId||"dynamix-layout-root"},"data-area":o,get class(){return"hide-scrollbar "+(r.RootSplitterHoverElClass||"")},ref:x=>{x&&(V[u()]=x)},get style(){return{...r.RootSplitterHoverElStyles}},area:o,size:{h:"25%",w:"8px"}})}),null),E})()};exports.DefaultHoverElement=pe;exports.DefaultSliderElement=be;exports.DefaultWrapTabBody=he;exports.DefaultWrapTabHead=me;exports.DefaultWrapTabLabel=fe;exports.DefaultWrapTabPanel=ye;exports.DynamixLayout=Be;exports.RootSplitterHoverEl=xe;exports.getTabOutput=we;exports.useDynamixLayout=ve;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("solid-js/web"),l=require("@dynamix-layout/core"),b=require("solid-js");var N=n.template("<div>"),De=n.template("<div><div style=display:flex;align-items:center;gap:4px;height:100%>"),Ee=n.template('<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class="lucide lucide-grip-vertical size-2.5"><circle cx=9 cy=12 r=1></circle><circle cx=9 cy=5 r=1></circle><circle cx=9 cy=19 r=1></circle><circle cx=15 cy=12 r=1></circle><circle cx=15 cy=5 r=1></circle><circle cx=15 cy=19 r=1>'),Te=n.template('<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round style=transform:rotate(90deg)><circle cx=9 cy=12 r=1></circle><circle cx=9 cy=5 r=1></circle><circle cx=9 cy=19 r=1></circle><circle cx=15 cy=12 r=1></circle><circle cx=15 cy=5 r=1></circle><circle cx=15 cy=19 r=1>');const Z=e=>(()=>{var o=N();return n.spread(o,n.mergeProps(e,{get class(){return`DefaultWrapTabLabel ${e.class||""}`},get"data-state"(){return e.active?"active":"inactive"},get style(){return{"align-self":"center",padding:"4px 6px","box-sizing":"border-box","font-size":"14px","border-radius":"4px",...e.style}}}),!1,!0),n.insert(o,()=>e.children),o})(),ee=e=>(()=>{var o=N();return n.spread(o,n.mergeProps(e,{get class(){return`DefaultWrapTabBody hide-scrollbar ${e.class||""}`},get style(){return{"box-sizing":"border-box",height:"100%",width:"100%",display:"grid",overflow:"auto","scrollbar-width":"none","-ms-overflow-style":"none",...e.style}}}),!1,!0),n.insert(o,()=>e.children),o})(),te=e=>(()=>{var o=N();return n.spread(o,n.mergeProps(e,{get class(){return`DefaultWrapTabHead hide-scrollbar ${e.class||""}`},get style(){return{display:"grid","grid-auto-flow":"column","justify-content":"start","align-items":"center",gap:"6px","padding-left":"8px",width:"100%","box-sizing":"border-box",height:"100%","place-items":"self-start",overflow:"auto","background-color":"#dfdfdf","scrollbar-width":"none","-ms-overflow-style":"none",...e.style}}}),!1,!0),n.insert(o,()=>e.children),o})(),re=e=>(()=>{var o=N();return n.spread(o,n.mergeProps(e,{get class(){return`DefaultWrapTabPanel ${e.class||""}`},get style(){return{display:"grid","align-items":"center","place-items":"self-start","box-sizing":"border-box",position:"absolute","border-radius":"8px",...e.style}}}),!1,!0),n.insert(o,()=>e.children),o})(),ne=e=>(()=>{var o=N();return n.spread(o,n.mergeProps(e,{get class(){return`DefaultHoverElement ${e.class||""}`},get style(){return{display:"flex","justify-content":"center","align-items":"center",opacity:.7,position:"absolute","box-sizing":"border-box","font-weight":"bold","pointer-events":"none","background-color":"rgba(0, 175, 249, 0.5)","border-radius":"10px",transition:"all 0.2s ease",border:"2px dashed rgb(0, 196, 42)",...e.style}}}),!1,!0),n.insert(o,()=>e.children),o})(),ae=e=>(()=>{var o=De(),p=o.firstChild;return n.spread(o,n.mergeProps(e,{get class(){return`DefaultSliderElement ${e.class||""}`},get style(){return{width:"100%",height:"100%",position:"absolute","box-sizing":"border-box","background-color":"white","z-index":9,cursor:"grab",...e.style}}}),!1,!0),n.insert(p,(()=>{var m=n.memo(()=>!e.direction);return()=>m()?Ee():Te()})()),n.insert(o,()=>e.children,null),n.effect(m=>n.setStyleProperty(p,"flex-direction",e.direction?"column":"row")),o})(),oe=e=>{const[o,p]=b.splitProps(e,["area","size","gap","class","style","children"]),m=b.createMemo(()=>{const d=o.size||{h:"20%",w:"6px"},v=o.gap||"0px",f={};return o.area==="left"?(Object.assign(f,{"border-top-right-radius":"16px","border-bottom-right-radius":"16px",height:d.h,left:v,width:d.w}),f.top=`calc(50% - ${d.h} / 2)`):o.area==="top"?(Object.assign(f,{"border-bottom-left-radius":"16px","border-bottom-right-radius":"16px",width:d.h,top:v,height:d.w}),f.left=`calc(50% - ${d.h} / 2)`):o.area==="right"?(Object.assign(f,{"border-top-left-radius":"16px","border-bottom-left-radius":"16px",height:d.h,right:v,width:d.w}),f.top=`calc(50% - ${d.h} / 2)`):o.area==="bottom"&&(Object.assign(f,{"border-top-left-radius":"16px","border-top-right-radius":"16px",width:d.h,bottom:v,height:d.w}),f.left=`calc(50% - ${d.h} / 2)`),f});return(()=>{var d=N();return n.spread(d,n.mergeProps(p,{get class(){return`RootSplitterHoverEl ${o.class||""}`},get style(){return{position:"absolute","z-index":-1,display:"none","box-sizing":"border-box","background-color":"#0081f9",cursor:"grab",...o.style,...m()}}}),!1,!0),n.insert(d,()=>o.children),d})()},ie=({tabOutput:e,rootId:o,layoutTree:p,updateJSON:m,dimensions:d,tabHeadHeight:v,enableTabbar:f,bondWidth:F,minTabHeight:O,minTabWidth:S,sliderUpdateTimeout:A,windowResizeTimeout:z,disableSliderTimeout:P,disableResizeTimeout:R})=>{const $=new Map,H=new Map,C=new Map,W=new Map,w={current:void 0},L=[],[_,j]=b.createSignal(p),[I,E]=b.createSignal(new Map),[q,k]=b.createSignal(new Map),[U,x]=b.createSignal(!1);let D=null;const[X,y]=b.createSignal(!1),i={src:void 0,des:void 0,area:void 0,drag:!1},a={sliderId:void 0,isSliding:!1},u=f?Math.max(O,v):O,g=new l.DynamixLayoutCore({tabs:e.keys,tree:_(),minW:S,minH:u,bond:F,uqid:o,tabsIds:e.name}),G=t=>{const r=new Map(t);E(r)},Q=t=>{const r=new Map(t);k(r)},M=()=>{const t=f?v:0;l.Node.cache.tabOpts.get().forEach((r,c)=>{const s=W.get(c);if(!s)return;const h=l.getTabBodyRect(r.nodDims,t);l.setElementRect(s,h),s.style.display=r.nodOpen&&h.h>0?"block":"none"})},le=l.Node.cache.nodOpts.onChange(t=>{t.forEach((r,c)=>{const s=C.get(c);s&&l.setElementRect(s,r.nodDims);const h=$.get(c);h&&f&&l.setElementRect(h,{...r.nodDims,h:v})})}),de=l.Node.cache.tabOpts.onChange(()=>M()),ce=l.Node.cache.bndOpts.onChange(t=>{t.forEach((r,c)=>{const s=H.get(c);s&&l.setElementRect(s,r.nodDims)})}),Y=l.createFrameScheduler(({id:t,point:r})=>g.updateSlider(t,r,P,A)),V=t=>{const r=a.sliderId;!a.isSliding||!r||Y.schedule({id:r,point:{x:t.clientX,y:t.clientY}})},B=t=>{if(!a.isSliding)return;Y.flush();const r=t.currentTarget;a.isSliding=!1,a.sliderId=void 0,x(!1),m&&m(l.DynamixLayoutCore._root.toJSON()),r.releasePointerCapture(t.pointerId),r.removeEventListener("pointermove",V),r.removeEventListener("pointerup",B),r.removeEventListener("pointercancel",B)},ue=t=>{t.preventDefault();const r=t.currentTarget;a.isSliding=!0,a.sliderId=r.id,x(!0),r.setPointerCapture(t.pointerId),r.addEventListener("pointermove",V),r.addEventListener("pointerup",B),r.addEventListener("pointercancel",B)};let J={};const ge=(t,r,c)=>{if(!w.current||!i||!c)return null;const s=l.getTabsetDropPreview(c.getBoundingClientRect(),t,r);K(s),i.des=c,i.area=s.area},fe=t=>{t.preventDefault(),t.stopPropagation(),t.dataTransfer&&(t.dataTransfer.dropEffect="move");const r=t.currentTarget,c=Array.from(r.childNodes);if(!w.current||!i)return;const s=l.getNavbarDropPreview(r.getBoundingClientRect(),c.map(h=>h.getBoundingClientRect()),t.clientX,t.clientY);s&&(K(s),i.des=c[s.index],i.area=s.area)},me=t=>{t.preventDefault(),t.stopPropagation(),t.dataTransfer&&(t.dataTransfer.dropEffect="move");const r=t.currentTarget,{area:c,uid:s}=r.dataset;if(!c||!s||!w.current||!i)return;const h=c;i.des=r,i.area=h,K(l.getRootSplitPreview(d(),h))},K=t=>{const r=w.current;!r||l.isSameDropPreview(J,t)||(Object.assign(r.style,{left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`,display:"block",zIndex:"100"}),J=t)},he=t=>{if(t.stopPropagation(),x(!0),document.body.style.cursor="move",t.currentTarget){if(t.dataTransfer){t.dataTransfer.effectAllowed="move";const r=document.createElement("div");r.style.width="1px",r.style.height="1px",r.style.backgroundColor="transparent",r.style.position="absolute",r.style.top="-1000px",document.body.appendChild(r),t.dataTransfer.setDragImage(r,0,0),setTimeout(()=>{r.parentNode&&r.parentNode.removeChild(r)},0)}L.forEach(r=>{r&&(r.style.display="block",r.style.zIndex="99")}),C.forEach(r=>{r&&(r.style.display="block",r.style.zIndex="95")}),i.src=t.currentTarget,i.drag=!0}},be=t=>{if(t.preventDefault(),t.stopPropagation(),document.body.style.cursor="move",t.dataTransfer&&(t.dataTransfer.dropEffect="move"),!i?.src)return;const r=t.currentTarget,c=t.clientX,s=t.clientY;D&&cancelAnimationFrame(D),D=requestAnimationFrame(()=>{ge(c,s,r)})},ye=()=>{if(document.body.style.cursor="default",L.forEach(t=>{t&&(t.style.display="none",t.style.zIndex="-1")}),D&&(cancelAnimationFrame(D),D=null),w.current&&(w.current.style.display="none",w.current.style.zIndex="-1"),J={},i.drag=!1,!i?.src||!i?.des){i.area=void 0,i.src=void 0,i.des=void 0,x(!1);return}if(i.src===i.des){i.area=void 0,i.src=void 0,i.des=void 0,x(!1);return}if(i.src&&i.des){if(!i.area){console.warn("No area specified for drag and drop"),x(!1);return}if(!g.updateTree(i.src.dataset.uid,i.des.dataset.uid,i.area||"contain")){console.warn("Failed to update layout tree"),x(!1);return}requestAnimationFrame(()=>{G(l.Node.cache.nodOpts.get()),Q(l.Node.cache.bndOpts.get()),M(),m&&m(l.DynamixLayoutCore._root.toJSON())})}i.area=void 0,i.src=void 0,i.des=void 0,x(!1)},pe=t=>{t.preventDefault(),t.stopPropagation(),t.dataTransfer&&(t.dataTransfer.dropEffect="move")},ve=t=>{t.preventDefault(),t.stopPropagation()},xe=t=>{t.preventDefault(),t.stopPropagation(),t.dataTransfer&&t.dataTransfer.getData("text/plain")},we=t=>{const r=t.currentTarget,c=r.dataset.uid;if(!c)return;const s=l.Node.cache.mapElem.get(c);if(!(s instanceof l.Node)){console.warn(`Element with uid ${c} is not a Node instance`);return}if(!s||!s.host||!s.host.unId){console.warn(`Node with uid ${c} not found in mapNode`);return}if(s.host.open==s.name){console.warn(`Node ${s.name} is already open`);return}const h=l.Node.cache.nodOpts.get().get(s.host.unId);if(!h||h.nodOpen&&s?.open)return;s.host.open=s.name,h.nodOpen=s.name,h.nodKids?.forEach(T=>{T.nodOpen=T.nodName===s.name}),r?.parentElement?.childNodes?.forEach(T=>{T instanceof HTMLDivElement&&T.dataset.uid!==c?T.dataset.state="inactive":T.dataset.state="active"}),M()};return b.onMount(()=>{const t=c=>{g.updateDimension(d(),c,z)};t(!0);const r=()=>t(R??!1);window.addEventListener("resize",r),G(l.Node.cache.nodOpts.get()),Q(l.Node.cache.bndOpts.get()),M(),m&&m(l.DynamixLayoutCore._root.toJSON()),b.onCleanup(()=>{window.removeEventListener("resize",r),le(),ce(),de(),Y.cancel(),D&&cancelAnimationFrame(D)})}),{tabsets:I,sliders:q,tabsetsRef:$,panelsRef:C,tabsRef:W,slidersRef:H,layoutJSON:_,layoutInstance:g,hoverElementRef:w,rootSplitHoverEl:L,dragging:U,isUpdating:X,setIsUpdating:y,setDragging:x,setTabsets:E,setSliders:k,setLayoutJSON:j,onDragStart:he,onDragOver:be,onDragEnd:ye,onDragEnter:pe,onDragLeave:ve,onDrop:xe,onPointerDown:ue,updateActiveTab:we,handleRootSplit:me,handleNavbarDragOver:fe}};var Se=n.template("<div>"),$e=n.template('<div class="flex items-center justify-center h-full"><span class=text-gray-500>No content');const se=e=>{const o=[],p=new Map,m=new Map;for(const[d,v]of e){const f=crypto.randomUUID();o.push(d),p.set(d,{uqid:f,name:d,node:v}),m.set(d,f)}return{keys:o,maps:p,name:m}},Ce=e=>{const o=b.createMemo(()=>se(e.tabs));let p;const m=()=>{const y=p;if(!y)return{w:0,h:0,x:0,y:0};const i=y.getBoundingClientRect(),a=e.pad||{t:0,b:0,l:0,r:0};return{w:i.width-(a.l+a.r),h:i.height-(a.t+a.b),x:i.left+a.l,y:i.top+a.t}},{tabsetsRef:d,slidersRef:v,sliders:f,tabsets:F,hoverElementRef:O,onDragEnd:S,onDragOver:A,onDragStart:z,onDragEnter:P,onDragLeave:R,onDrop:$,dragging:H,panelsRef:C,onPointerDown:W,handleNavbarDragOver:w,updateActiveTab:L,rootSplitHoverEl:_,handleRootSplit:j,tabsRef:I,isUpdating:E}=ie({tabOutput:o(),rootId:e.rootId||"dynamix-layout-root",updateJSON:e.updateJSON,enableTabbar:e.enableTabbar===void 0?!0:e.enableTabbar,layoutTree:e.layoutTree,tabHeadHeight:e.tabHeadHeight||l.DynamixLayoutCore._minH,dimensions:m,sliderUpdateTimeout:e.sliderUpdateTimeout||2,windowResizeTimeout:e.windowResizeTimeout||2,bondWidth:e.bondWidth||l.DynamixLayoutCore._bond,minTabHeight:e.minTabHeight||l.DynamixLayoutCore._minH,minTabWidth:e.minTabWidth||l.DynamixLayoutCore._minW,disableSliderTimeout:e.disableSliderTimeout===void 0?!0:e.disableSliderTimeout,disableResizeTimeout:e.disableResizeTimeout===void 0?!0:e.disableResizeTimeout,hoverElementStyles:e.hoverElementStyles}),q=e.WrapTabPanel||re,k=e.WrapTabHead||te,U=e.WrapTabLabel||Z,x=e.WrapTabBody||ee,D=e.SliderElement||ae,X=e.HoverElement||ne;return(()=>{var y=Se(),i=p;return typeof i=="function"?n.use(i,y):p=y,n.spread(y,n.mergeProps({get id(){return e.rootId||"dynamix-layout-root"}},e,{get"data-testid"(){return e.rootId||"dynamix-layout-root"},get class(){return H()?"is-dragging":""},get style(){return{position:"relative",width:"100%",height:"100%",overflow:"hidden",...e.style}}}),!1,!0),n.insert(y,n.createComponent(b.For,{get each(){return Array.from(F().values())},children:a=>[n.createComponent(q,{ref:u=>{const g=a.uidNode;u?C.set(g,u):C.delete(g)},onDragEnd:S,onDragOver:A,onDragEnter:P,onDragLeave:R,onDrop:$,get"data-uid"(){return a.uidNode},get"data-type"(){return a.typNode},get class(){return"hide-scrollbar DefaultWrapTabPanel "+(e.tabPanelElementClass||"")},get style(){return{position:"absolute",...e.tabPanelElementStyles,width:`${a.nodDims.w}px`,height:`${a.nodDims.h}px`,left:`${a.nodDims.x}px`,top:`${a.nodDims.y}px`,"background-color":"transparent"}}}),n.createComponent(k,{get draggable(){return!E()},get"data-uid"(){return a.uidNode},"data-type":"tabset",onDragOver:w,onDragStart:z,onDragEnd:S,onDragEnter:P,onDragLeave:R,onDrop:$,ref:u=>{const g=a.uidNode;u?d.set(g,u):d.delete(g)},get class(){return"hide-scrollbar "+(e.tabHeadElementClass||"")},get style(){return{...e.tabHeadElementStyles,position:"absolute","z-index":99,width:`${a.nodDims.w}px`,height:`${e.tabHeadHeight||l.DynamixLayoutCore._minH}px`,left:`${a.nodDims.x}px`,top:`${a.nodDims.y}px`,cursor:E()?"wait":"pointer"}},get children(){return n.createComponent(b.For,{get each(){return a.nodKids},children:u=>n.createComponent(U,{get"data-uid"(){return u.uidNode},"data-type":"tab",onDragStart:z,onDragEnd:S,get draggable(){return!E()},get active(){return!!u.nodOpen},get class(){return"hide-scrollbar "+(e.tabLabelElementClass||"")},get style(){return{cursor:E()?"wait":"pointer",...e.tabLabelElementStyles}},onClick:L,get children(){return n.memo(()=>!!e.tabNames)()&&e.tabNames.get(u.nodName)||u.nodName}})})}})]}),null),n.insert(y,n.createComponent(b.For,{get each(){return o().keys},children:a=>{const u=o().maps.get(a)?.uqid;return n.createComponent(x,{id:u,draggable:!1,"data-uid":u,get class(){return"hide-scrollbar "+(e.tabBodyElementClass||"")},get style(){return{position:"absolute","z-index":90,"overscroll-behavior":"contain",...e.tabBodyElementStyles}},ref:g=>{u&&(g?I.set(u,g):I.delete(u))},get children(){return o().maps.get(a)?.node||$e()}})}}),null),n.insert(y,n.createComponent(b.For,{get each(){return Array.from(f().values())},children:a=>n.createComponent(D,{get id(){return a.uidNode},get"data-uid"(){return a.uidNode},get direction(){return a.nodeDir},onPointerDown:W,get class(){return"hide-scrollbar "+(e.sliderElementClass||"")},ref:u=>{const g=a.uidNode;u?v.set(g,u):v.delete(g)},get style(){return{width:`${a.nodDims.w}px`,height:`${a.nodDims.h}px`,left:`${a.nodDims.x}px`,top:`${a.nodDims.y}px`,cursor:a.nodeDir?"ns-resize":"ew-resize",...e.sliderElementStyles}}})}),null),n.insert(y,n.createComponent(X,{get class(){return"hide-scrollbar "+(e.hoverElementClass||"")},get style(){return{...e.hoverElementStyles}},ref:a=>O.current=a}),null),n.insert(y,n.createComponent(b.For,{each:["left","right","top","bottom"],children:(a,u)=>n.createComponent(oe,{onDragOver:j,onDragEnd:S,onDragEnter:P,onDragLeave:R,onDrop:$,get"data-uid"(){return e.rootId||"dynamix-layout-root"},"data-area":a,get class(){return"hide-scrollbar "+(e.RootSplitterHoverElClass||"")},ref:g=>{g&&(_[u()]=g)},get style(){return{...e.RootSplitterHoverElStyles}},area:a,size:{h:"25%",w:"8px"}})}),null),y})()};exports.DefaultHoverElement=ne;exports.DefaultSliderElement=ae;exports.DefaultWrapTabBody=ee;exports.DefaultWrapTabHead=te;exports.DefaultWrapTabLabel=Z;exports.DefaultWrapTabPanel=re;exports.DynamixLayout=Ce;exports.RootSplitterHoverEl=oe;exports.getTabOutput=se;exports.useDynamixLayout=ie;
package/dist/index.css CHANGED
@@ -1 +1 @@
1
- @import"https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap";.DefaultWrapTabLabel[data-state=active]{background-color:#fff;font-family:Poppins,sans-serif}.DefaultWrapTabLabel[data-state=inactive]{background-color:#dfdfdf;font-family:Poppins,sans-serif}.hide-scrollbar::-webkit-scrollbar{display:none}.is-dragging .DefaultWrapTabBody>*{pointer-events:none}
1
+ .DefaultWrapTabLabel[data-state=active]{background-color:#fff;font-family:Poppins,sans-serif}.DefaultWrapTabLabel[data-state=inactive]{background-color:#dfdfdf;font-family:Poppins,sans-serif}.hide-scrollbar::-webkit-scrollbar{display:none}.is-dragging .DefaultWrapTabBody>*{pointer-events:none}