@dynamix-layout/solid 1.0.1 → 1.0.3
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 +46 -0
- package/dist/index.cjs +1 -0
- package/dist/index.css +1 -1
- package/dist/index.es.js +460 -486
- package/dist/types/index.d.cts +190 -0
- package/dist/types/index.d.ts +190 -4
- package/package.json +27 -18
- package/dist/index.cjs.js +0 -1
- package/dist/types/components/Default.d.ts +0 -23
- package/dist/types/components/Layout.d.ts +0 -4
- package/dist/types/hooks/useLayout.d.ts +0 -34
- package/dist/types/types/index.d.ts +0 -100
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
# @dynamix-layout/solid
|
|
2
2
|
|
|
3
|
+
## 1.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#84](https://github.com/xcode-studio/dynamix-layout/pull/84) [`a8295a7`](https://github.com/xcode-studio/dynamix-layout/commit/a8295a790a99cbf522ca68acd8057b666b401de4) Thanks [@akash-aman](https://github.com/akash-aman)! - Packaging fixes for 1.x, and deprecation notes ahead of 2.0.
|
|
8
|
+
|
|
9
|
+
- **React 18 works.** The React bundle no longer inlines React 19's `react/jsx-runtime`, and the peer dependencies are `react` and `react-dom` `^18.0.0 || ^19.0.0` (the `react` peer was `^0.0.1`). The React package's unused IIFE/UMD builds are gone; they weren't reachable through `exports`.
|
|
10
|
+
- **Types resolve.** The published declarations of the React and Solid packages imported `../../../core/src`, a path that doesn't exist in the package, so core types were `any`. Each package now ships one self-contained declaration file, plus `index.d.cts` for CommonJS.
|
|
11
|
+
- **`require()` works.** The CommonJS builds were named `*.cjs.js` in `"type": "module"` packages, so Node loaded them as ESM. They're now `*.cjs`. Core's `browser` field, which pointed at an IIFE without exports, is removed.
|
|
12
|
+
- **Installs on Node 18 and later** (it required Node 22).
|
|
13
|
+
- **Solid:** `solid-js` is a peer dependency, so apps don't end up with two copies.
|
|
14
|
+
- **Docs:**
|
|
15
|
+
- The README now gives the correct stylesheet path, `@dynamix-layout/react/style.css` (`styles.css` also works).
|
|
16
|
+
- Repository links point to `xcode-studio/dynamix-layout`.
|
|
17
|
+
- **Deprecations:** the props and exports that 2.0 renames or removes are marked `@deprecated`, each naming its replacement and linking the migration guide. Behaviour is unchanged.
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [[`a8295a7`](https://github.com/xcode-studio/dynamix-layout/commit/a8295a790a99cbf522ca68acd8057b666b401de4)]:
|
|
20
|
+
- @dynamix-layout/core@1.1.1
|
|
21
|
+
|
|
22
|
+
## 1.0.2
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- [#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:
|
|
27
|
+
|
|
28
|
+
- Fix listener leak in the React hook (subscriptions were added on every render) and unsubscribe on unmount in Solid.
|
|
29
|
+
- Coalesce slider pointer moves to one layout update per animation frame.
|
|
30
|
+
- Keep sliders following the pointer over iframes and other embedded content.
|
|
31
|
+
- Remove resize/drag jitter: round cumulative split boundaries so unrelated panels never move and edges move smoothly.
|
|
32
|
+
- Keep tabsets outside a dragged subtree in the shared maps (tab clicks no longer break after nested slider drags).
|
|
33
|
+
- A tabset can no longer be shorter than its tab bar; empty tab bodies are hidden.
|
|
34
|
+
- Solid: tab bodies follow deferred updates when resize/slider timeouts are enabled.
|
|
35
|
+
- Fix crash when dropping the last tab of a tabset onto its own tabset; reject moves relative to nested rows.
|
|
36
|
+
- Remove the Google Fonts import from the bundled CSS.
|
|
37
|
+
|
|
38
|
+
- [#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):
|
|
39
|
+
|
|
40
|
+
- Core engine split into focused modules (tree builder, geometry, slider, tree mutations, node, shared state); `DynamixLayoutCore` keeps its public API as a facade.
|
|
41
|
+
- New core exports shared by the React and Solid wrappers: `getTabsetDropPreview`, `getNavbarDropPreview`, `getRootSplitPreview`, `isSameDropPreview`, `setElementRect`, `getTabBodyRect`, `createFrameScheduler`.
|
|
42
|
+
- `DynamixLayoutCore` accepts optional `createId` and `timer` options (defaults: `crypto.randomUUID`, `setTimeout`) for deterministic tests.
|
|
43
|
+
- Solid: the drag hover state is now actually reset after a drag ends.
|
|
44
|
+
- The hooks' internal state setters (`setIsUpdating`, `setDragging`, `setTabsets`, `setSliders`, `setLayoutJSON`) are deprecated and will be removed in v2.
|
|
45
|
+
|
|
46
|
+
- 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)]:
|
|
47
|
+
- @dynamix-layout/core@1.1.0
|
|
48
|
+
|
|
3
49
|
## 1.0.1
|
|
4
50
|
|
|
5
51
|
### Patch Changes
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
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
|
-
|
|
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}
|