@gearbox-protocol/permissionless-ui 1.16.0 → 1.17.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 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),T=require("react"),g=require("../description/description.cjs"),h=require("../short-string/short-string.cjs"),l=require("../table/grid-table.cjs"),L=require("../token-symbol/token-symbol.cjs"),x=require("../vspace/vspace.cjs"),R=require("../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk");function w(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(s,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return s.default=t,Object.freeze(s)}const A=w(T),C={default:24,sm:20,md:24,lg:28},S={default:0,sm:2,md:4,lg:4},b=A.forwardRef(({token:t,tokenLabel:s,tokenDescription:r,network:n,chainId:j,value:a,valueDescription:i,size:c="default",iconSize:p=c,gapSize:d=c,last:_,symbolMaxLength:q,descriptionMaxLength:y,onSelect:m,hideValue:u=!1,className:N},O)=>{const o=s||t?.title,f=c==="md"?"default":c;return e.jsxs(l.GridTableRow,{ref:O,className:R.cn(_&&"[&>*]:border-0",m&&"cursor-pointer",N),onClick:m,cols:u?"1fr":"1fr 1fr",children:[e.jsx(l.GridTableCell,{size:f,className:"text-left",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(L.TokenSymbol,{token:t,size:C[p],chainId:j,network:n}),e.jsxs("div",{className:"flex-1 min-w-0",children:[o&&e.jsx(h.ShortString,{maxLength:q,children:o}),o&&r&&e.jsx(x.VSpace,{height:S[d]}),r&&e.jsx(g.Description,{children:e.jsx(h.ShortString,{maxLength:y,children:String(r)})})]})]})}),!u&&e.jsxs(l.GridTableCell,{size:f,className:"text-right",children:[a,a&&i&&e.jsx(x.VSpace,{height:S[d]}),i&&e.jsx(g.Description,{children:i})]})]})});b.displayName="AssetLine";exports.AssetLine=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),T=require("react"),g=require("../description/description.cjs"),h=require("../short-string/short-string.cjs"),l=require("../table/grid-table.cjs"),R=require("../token-symbol/token-symbol.cjs"),x=require("../vspace/vspace.cjs"),L=require("../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk");function w(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(s,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return s.default=t,Object.freeze(s)}const A=w(T),C={default:24,sm:20,md:24,lg:28},S={default:0,sm:2,md:4,lg:4},b=A.forwardRef(({token:t,tokenLabel:s,tokenDescription:r,network:n,chainId:j,value:a,valueDescription:o,size:c="default",iconSize:p=c,gapSize:d=c,last:_,symbolMaxLength:q,descriptionMaxLength:y,onSelect:m,hideValue:u=!1,className:N},O)=>{const i=s||t?.title,f=c==="md"?"default":c;return e.jsxs(l.GridTableRow,{ref:O,className:L.cn(_&&"[&>*]:border-0",m&&"cursor-pointer",N),onClick:m,cols:u?"1fr":"1fr 1fr",noRound:!0,children:[e.jsx(l.GridTableCell,{size:f,className:"text-left",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(R.TokenSymbol,{token:t,size:C[p],chainId:j,network:n}),e.jsxs("div",{className:"flex-1 min-w-0",children:[i&&e.jsx(h.ShortString,{maxLength:q,children:i}),i&&r&&e.jsx(x.VSpace,{height:S[d]}),r&&e.jsx(g.Description,{children:e.jsx(h.ShortString,{maxLength:y,children:String(r)})})]})]})}),!u&&e.jsxs(l.GridTableCell,{size:f,className:"text-right",children:[a,a&&o&&e.jsx(x.VSpace,{height:S[d]}),o&&e.jsx(g.Description,{children:o})]})]})});b.displayName="AssetLine";exports.AssetLine=b;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("class-variance-authority"),u=require("react"),w=require("../../utils/cn.cjs"),N=require("./graph.cjs");function k(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const r=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(a,s,r.get?r:{enumerable:!0,get:()=>t[s]})}}return a.default=t,Object.freeze(a)}const y=k(u),v=b.cva("relative w-full overflow-hidden rounded-lg border-border border bg-card text-card-foreground",{variants:{variant:{default:"shadow",elevated:"shadow-lg",outlined:"border-2",ghost:"border-0 shadow-none"},size:{sm:"h-48 sm:h-64",default:"h-64 sm:h-96",lg:"h-96 sm:h-[32rem]",xl:"h-[32rem] sm:h-[48rem]",full:"h-full"},padding:{none:"p-0",sm:"p-2",default:"p-4 sm:p-6",lg:"p-6"}},defaultVariants:{variant:"default",size:"default",padding:"default"}}),g=y.forwardRef(({className:t,variant:a,size:s,padding:r,title:l,description:i,toolbar:n,loading:c=!1,emptyMessage:o,error:d,children:h,...m},f)=>{const x=l||i||n;return e.jsxs("div",{ref:f,className:w.cn("flex flex-col",v({variant:a,size:s,padding:r,className:t})),...m,children:[x&&e.jsxs("div",{className:"mb-4 flex items-start justify-between gap-4 flex-shrink-0",children:[(l||i)&&e.jsxs("div",{className:"flex-1",children:[l&&e.jsx("h3",{className:"text-base sm:text-lg font-semibold leading-none tracking-tight",children:l}),i&&e.jsx("p",{className:"mt-1 text-xs sm:text-sm text-muted-foreground",children:i})]}),n&&e.jsx("div",{className:"flex-shrink-0 w-full",children:n})]}),e.jsxs("div",{className:"relative flex-1 w-full min-h-0",children:[c&&e.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-transparent backdrop-blur-sm",children:e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"}),e.jsx("span",{className:"text-xs sm:text-sm text-muted-foreground",children:"Loading..."})]})}),d&&e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsxs("div",{className:"flex flex-col items-center gap-2 text-destructive",children:[e.jsx("svg",{className:"h-12 w-12",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),e.jsx("span",{className:"text-xs sm:text-sm font-medium",children:d})]})}),!d&&!h&&o&&e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsxs("div",{className:"flex flex-col items-center gap-2 text-muted-foreground",children:[e.jsx("svg",{className:"h-12 w-12",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"})}),e.jsx("span",{className:"text-xs sm:text-sm",children:o})]})}),!d&&h]})]})});g.displayName="GraphView";function V({series:t,onUnselectSeries:a,loading:s,title:r,description:l,toolbar:i,emptyMessage:n="No data available",error:c,containerClassName:o,variant:d,size:h,padding:m,...f}){t.length>0&&t.some(p=>p.data.length>0),t.length>0&&t.some(p=>p.data.length>0);const x=!s&&t.length===0,j=t.length>0;return e.jsx(g,{className:o,variant:d,size:h,padding:m,title:r,description:l,toolbar:i,loading:s,error:c,emptyMessage:x?n:void 0,children:j&&!c&&e.jsx(N.Graph,{series:t,...a?{onUnselectSeries:a}:{},...f})})}function R(t=0){const a=u.useRef(null),s=u.useRef(null),[r,l]=u.useState(null);return u.useEffect(()=>{const i=()=>{if(a.current&&s.current){const o=s.current.clientWidth,d=a.current.clientWidth;l(o-d-t)}},n=s.current,c=n?new ResizeObserver(i):null;return n&&c?.observe(n),()=>{n&&c?.unobserve(n)}},[t]),{graphWidth:r,parentRef:s,asideRef:a}}exports.GraphView=g;exports.GraphViewWithData=V;exports.graphViewVariants=v;exports.useGraphAside=R;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),N=require("class-variance-authority"),u=require("react"),g=require("../../utils/cn.cjs"),y=require("./graph.cjs");function V(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(a,s,n.get?n:{enumerable:!0,get:()=>t[s]})}}return a.default=t,Object.freeze(a)}const k=V(u),b=N.cva("relative w-full overflow-hidden rounded-lg border-border border bg-card text-card-foreground",{variants:{variant:{default:"shadow",elevated:"shadow-lg",outlined:"border-2",ghost:"border-0 shadow-none"},size:{sm:"h-48 sm:h-64",default:"h-64 sm:h-96",lg:"h-96 sm:h-[32rem]",xl:"h-[32rem] sm:h-[48rem]",full:"h-full"},padding:{none:"p-0",sm:"p-2",default:"p-4 sm:p-6",lg:"p-6"}},defaultVariants:{variant:"default",size:"default",padding:"default"}}),p=k.forwardRef(({className:t,variant:a,size:s,padding:n,title:l,description:i,toolbar:r,loading:c=!1,emptyMessage:o,error:d,children:h,...f},m)=>{const x=l||i||r;return e.jsxs("div",{ref:m,className:g.cn("flex flex-col",b({variant:a,size:s,padding:n,className:t})),...f,children:[x&&e.jsxs("div",{className:"mb-4 flex items-start justify-between gap-4 flex-shrink-0",children:[(l||i)&&e.jsxs("div",{className:"flex-1",children:[l&&e.jsx("h3",{className:"text-base sm:text-lg font-semibold leading-none tracking-tight",children:l}),i&&e.jsx("p",{className:"mt-1 text-xs sm:text-sm text-muted-foreground",children:i})]}),r&&e.jsx("div",{className:"flex-shrink-0 w-full",children:r})]}),e.jsxs("div",{className:"relative flex-1 w-full min-h-0",children:[c&&e.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center opacity-0 animate-delayed-fade-in",children:e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent"}),e.jsx("span",{className:"text-xs sm:text-sm text-muted-foreground",children:"Loading..."})]})}),d&&e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsxs("div",{className:"flex flex-col items-center gap-2 text-destructive",children:[e.jsx("svg",{className:"h-12 w-12",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),e.jsx("span",{className:"text-xs sm:text-sm font-medium",children:d})]})}),!d&&!h&&o&&e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsxs("div",{className:"flex flex-col items-center gap-2 text-muted-foreground",children:[e.jsx("svg",{className:"h-12 w-12",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"})}),e.jsx("span",{className:"text-xs sm:text-sm",children:o})]})}),e.jsx("div",{className:g.cn("w-full h-full transition-[filter] duration-300 delay-300",c&&"blur-sm pointer-events-none"),children:!d&&h})]})]})});p.displayName="GraphView";function R({series:t,onUnselectSeries:a,loading:s,title:n,description:l,toolbar:i,emptyMessage:r="No data available",error:c,containerClassName:o,variant:d,size:h,padding:f,...m}){const x=!s&&t.length===0,v=u.useRef(t);t.length>0&&(v.current=t);const j=s&&t.length===0?v.current:t,w=j.length>0;return e.jsx(p,{className:o,variant:d,size:h,padding:f,title:n,description:l,toolbar:i,loading:s,error:c,emptyMessage:x?r:void 0,children:w&&!c&&e.jsx(y.Graph,{series:j,...a?{onUnselectSeries:a}:{},...m})})}function G(t=0){const a=u.useRef(null),s=u.useRef(null),[n,l]=u.useState(null);return u.useEffect(()=>{const i=()=>{if(a.current&&s.current){const o=s.current.clientWidth,d=a.current.clientWidth;l(o-d-t)}},r=s.current,c=r?new ResizeObserver(i):null;return r&&c?.observe(r),()=>{r&&c?.unobserve(r)}},[t]),{graphWidth:n,parentRef:s,asideRef:a}}exports.GraphView=p;exports.GraphViewWithData=R;exports.graphViewVariants=b;exports.useGraphAside=G;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),b=require("react"),u=require("../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk");function m(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,l.get?l:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const a=m(b);function x({className:e,children:r,...t}){const s=a.Children.toArray(r).length,i=a.Children.map(r,(o,f)=>{if(a.isValidElement(o)){const c=f===0,d=f===s-1;return a.cloneElement(o,{first:c,last:d})}return o});return n.jsx("div",{className:u.cn("m-0 p-0 w-full flex flex-wrap",e),...t,children:i})}function p({icon:e,title:r,subTitle:t,onClick:l,endingIcon:s,first:i=!1,last:o=!1,className:f}){const c=()=>i&&o?"before:rounded-lg":i?"before:rounded-t-lg":o?"before:rounded-b-lg":"";return n.jsxs("button",{type:"button",onClick:l,className:u.cn("relative z-0 pt-5 px-4 flex flex-row items-start gap-4 w-full cursor-pointer text-left","before:absolute before:-z-10 before:left-0 before:hidden before:w-full before:inset-y-0 before:content-[''] before:bg-foreground/10",c(),"hover:before:block",!o&&"after:absolute after:bottom-0 after:left-0 after:w-full after:h-px after:content-[''] after:bg-border",f),children:[e&&n.jsx("div",{className:"w-6 h-6 text-muted-foreground flex items-center justify-center",children:e}),n.jsx("div",{className:"pb-5 flex-1 flex flex-col gap-2",children:n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"text-base leading-[1.2] font-medium",children:r}),t&&n.jsx("div",{className:"text-sm text-muted-foreground",children:t})]})}),s&&n.jsx("div",{className:"ml-4 text-muted-foreground transition-colors",children:s})]})}exports.OptionsItem=p;exports.OptionsList=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),m=require("react"),c=require("../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk");function b(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const a=b(m);function x({className:e,children:r,...t}){const l=a.Children.toArray(r).length,f=a.Children.map(r,(o,i)=>{if(a.isValidElement(o)){const u=i===0,d=i===l-1;return a.cloneElement(o,{first:u,last:d})}return o});return n.jsx("div",{className:c.cn("m-0 p-0 w-full flex flex-wrap",e),...t,children:f})}function p({icon:e,title:r,subTitle:t,onClick:s,endingIcon:l,first:f=!1,last:o=!1,className:i}){return n.jsxs("button",{type:"button",onClick:s,className:c.cn("relative z-0 pt-5 px-4 flex flex-row items-start gap-4 w-full cursor-pointer text-left","before:absolute before:-z-10 before:left-0 before:hidden before:w-full before:inset-y-0 before:content-[''] before:bg-foreground/10 before:rounded-lg","hover:before:block",!o&&"after:absolute after:bottom-0 after:left-0 after:w-full after:h-px after:content-[''] after:bg-border",i),children:[e&&n.jsx("div",{className:"w-6 h-6 text-muted-foreground flex items-center justify-center",children:e}),n.jsx("div",{className:"pb-5 flex-1 flex flex-col gap-2",children:n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"text-base leading-[1.2] font-medium",children:r}),t&&n.jsx("div",{className:"text-sm text-muted-foreground",children:t})]})}),l&&n.jsx("div",{className:"ml-4 text-muted-foreground transition-colors",children:l})]})}exports.OptionsItem=p;exports.OptionsList=x;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),o=require("class-variance-authority"),C=require("react"),u=require("../layout/col/col.cjs"),m=require("../layout/grid/grid.cjs"),i=require("../../utils/cn.cjs");function V(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const l=V(C),T=o.cva("w-full",{variants:{size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{size:"default"}}),p=l.forwardRef(({className:e,size:a,cols:t=12,gap:r=0,...s},n)=>d.jsx("div",{className:"relative w-full overflow-auto",children:d.jsx(m.Grid,{ref:n,cols:t,gap:r,className:i.cn(T({size:a,className:e})),...s})}));p.displayName="GridTable";const y=l.forwardRef(({className:e,...a},t)=>d.jsx("div",{ref:t,className:i.cn("contents [&>*]:border-b [&>*]:border-border",e),...a}));y.displayName="GridTableHeader";const g=l.forwardRef(({className:e,...a},t)=>d.jsx("div",{ref:t,className:i.cn("contents [&>*:last-child>*]:border-0",e),...a}));g.displayName="GridTableBody";const x=l.forwardRef(({className:e,...a},t)=>d.jsx("div",{ref:t,className:i.cn("contents [&>*]:border-t [&>*]:bg-muted/50 [&>*]:font-medium",e),...a}));x.displayName="GridTableFooter";const G=l.forwardRef(({className:e,cols:a,gap:t=0,last:r,height:s,hideValue:n,style:w,...R},h)=>{const f=typeof s=="number"?`${s}px`:s;return d.jsx(m.Grid,{ref:h,cols:a,gap:t,className:i.cn("contents md:[&>*]:border-b [&>*]:border-border [&>*]:transition-colors hover:[&>*]:bg-muted/50 data-[state=selected]:[&>*]:bg-muted",r&&"[&>*]:border-b-0",n&&"[&>*]:opacity-0",e),style:{...w,...f?{height:f}:{}},...R})});G.displayName="GridTableRow";const j=o.cva("flex items-center justify-startborder-b text-left align-middle font-medium text-muted-foreground !bg-transparent",{variants:{size:{sm:"min-h-8 px-1 py-2 text-xs",default:"min-h-10 px-2 py-2.5",lg:"min-h-12 px-4 py-3"},justify:{start:"justify-start",center:"justify-center",end:"justify-end"}},defaultVariants:{size:"default",justify:"start"}}),c=l.forwardRef(({className:e,size:a,span:t=1,justify:r="start",...s},n)=>d.jsx(u.Col,{ref:n,span:t,className:i.cn(j({size:a,justify:r,className:e})),...s}));c.displayName="GridTableHead";const N=o.cva("align-middle",{variants:{size:{sm:"p-2",default:"p-4",lg:"p-6"},textAlign:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{size:"default"}}),b=l.forwardRef(({className:e,size:a,span:t=1,textAlign:r,...s},n)=>d.jsx(u.Col,{ref:n,span:t,className:i.cn(N({size:a,textAlign:r,className:e})),...s}));b.displayName="GridTableCell";const v=l.forwardRef(({className:e,...a},t)=>d.jsx("div",{ref:t,className:i.cn("col-span-full mt-4 text-sm text-muted-foreground",e),...a}));v.displayName="GridTableCaption";const _=b,H=c;exports.GridTable=p;exports.GridTableBody=g;exports.GridTableCaption=v;exports.GridTableCell=b;exports.GridTableFooter=x;exports.GridTableHead=c;exports.GridTableHeader=y;exports.GridTableRow=G;exports.Td=_;exports.Th=H;exports.gridTableCellVariants=N;exports.gridTableHeadVariants=j;exports.gridTableVariants=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("class-variance-authority"),_=require("react"),u=require("../layout/col/col.cjs"),m=require("../layout/grid/grid.cjs"),l=require("../../utils/cn.cjs");function z(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const d=z(_),p=n.cva("w-full",{variants:{size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{size:"default"}}),T=d.forwardRef(({className:e,size:a,cols:t=12,gap:r=0,...s},o)=>i.jsx("div",{className:"relative w-full overflow-auto",children:i.jsx(m.Grid,{ref:o,cols:t,gap:r,className:l.cn(p({size:a,className:e})),...s})}));T.displayName="GridTable";const y=d.forwardRef(({className:e,...a},t)=>i.jsx("div",{ref:t,className:l.cn("contents [&>*]:border-b [&>*]:border-border",e),...a}));y.displayName="GridTableHeader";const g=d.forwardRef(({className:e,...a},t)=>i.jsx("div",{ref:t,className:l.cn("contents [&>*:last-child>*]:border-0",e),...a}));g.displayName="GridTableBody";const x=d.forwardRef(({className:e,...a},t)=>i.jsx("div",{ref:t,className:l.cn("contents [&>*]:border-t [&>*]:bg-muted/50 [&>*]:font-medium",e),...a}));x.displayName="GridTableFooter";const G=d.forwardRef(({className:e,cols:a,gap:t=0,last:r,height:s,hideValue:o,noHover:w,noRound:R,style:h,...C},V)=>{const f=typeof s=="number"?`${s}px`:s;return i.jsx(m.Grid,{ref:V,cols:a,gap:t,className:l.cn("contents md:[&>*]:border-b [&>*]:border-border [&>*]:transition-colors data-[state=selected]:[&>*]:bg-muted",!w&&["[&>*]:relative [&>*]:z-0","[&>*]:before:absolute [&>*]:before:inset-0 [&>*]:before:-z-10 [&>*]:before:bg-muted/50 [&>*]:before:opacity-0 [&>*]:before:transition-opacity","hover:[&>*]:before:opacity-100",!R&&"[&>*:first-child]:before:rounded-l-lg [&>*:last-child]:before:rounded-r-lg"],r&&"[&>*]:border-b-0",o&&"[&>*]:opacity-0",e),style:{...h,...f?{height:f}:{}},...C})});G.displayName="GridTableRow";const j=n.cva("flex items-center justify-startborder-b text-left align-middle font-medium text-muted-foreground !bg-transparent",{variants:{size:{sm:"min-h-8 px-1 py-2 text-xs",default:"min-h-10 px-2 py-2.5",lg:"min-h-12 px-4 py-3"},justify:{start:"justify-start",center:"justify-center",end:"justify-end"}},defaultVariants:{size:"default",justify:"start"}}),c=d.forwardRef(({className:e,size:a,span:t=1,justify:r="start",...s},o)=>i.jsx(u.Col,{ref:o,span:t,className:l.cn(j({size:a,justify:r,className:e})),...s}));c.displayName="GridTableHead";const N=n.cva("align-middle",{variants:{size:{sm:"p-2",default:"p-4",lg:"p-6"},textAlign:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{size:"default"}}),b=d.forwardRef(({className:e,size:a,span:t=1,textAlign:r,...s},o)=>i.jsx(u.Col,{ref:o,span:t,className:l.cn(N({size:a,textAlign:r,className:e})),...s}));b.displayName="GridTableCell";const v=d.forwardRef(({className:e,...a},t)=>i.jsx("div",{ref:t,className:l.cn("col-span-full mt-4 text-sm text-muted-foreground",e),...a}));v.displayName="GridTableCaption";const H=b,q=c;exports.GridTable=T;exports.GridTableBody=g;exports.GridTableCaption=v;exports.GridTableCell=b;exports.GridTableFooter=x;exports.GridTableHead=c;exports.GridTableHeader=y;exports.GridTableRow=G;exports.Td=H;exports.Th=q;exports.gridTableCellVariants=N;exports.gridTableHeadVariants=j;exports.gridTableVariants=p;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),i=require("class-variance-authority"),_=require("lucide-react"),C=require("react"),H=require("../buttons/button/button.cjs"),n=require("../tooltip/tooltip.cjs"),s=require("../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk");function V(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const l=V(C),c=i.cva("w-full caption-bottom",{variants:{size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{size:"default"}}),b=l.forwardRef(({className:e,size:a,...t},o)=>r.jsx("div",{className:"relative w-full overflow-auto rounded-lg border border-input bg-card",children:r.jsx("table",{ref:o,className:s.cn(c({size:a,className:e})),...t})}));b.displayName="Table";const u=l.forwardRef(({className:e,...a},t)=>r.jsx("thead",{ref:t,className:s.cn("[&_tr]:border-b border-input [&_tr]:hover:bg-transparent",e),...a}));u.displayName="TableHeader";const f=l.forwardRef(({className:e,...a},t)=>r.jsx("tbody",{ref:t,className:s.cn("[&_tr:last-child]:border-0",e),...a}));f.displayName="TableBody";const m=l.forwardRef(({className:e,...a},t)=>r.jsx("tfoot",{ref:t,className:s.cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...a}));m.displayName="TableFooter";const p=l.forwardRef(({className:e,...a},t)=>r.jsx("tr",{ref:t,className:s.cn("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted border-border",e),...a}));p.displayName="TableRow";const x=i.cva("border-b bg-muted/50 text-left align-middle font-medium text-muted-foreground border-input",{variants:{size:{sm:"h-8 px-1 text-xs",default:"h-10 px-2",lg:"h-12 px-4"}},defaultVariants:{size:"default"}}),d=l.forwardRef(({className:e,size:a,...t},o)=>r.jsx("th",{ref:o,className:s.cn(x({size:a,className:e})),...t}));d.displayName="TableHead";const T=i.cva("align-middle",{variants:{size:{sm:"p-1",default:"p-2",lg:"p-4"}},defaultVariants:{size:"default"}}),g=l.forwardRef(({className:e,size:a,...t},o)=>r.jsx("td",{ref:o,className:s.cn(T({size:a,className:e})),...t}));g.displayName="TableCell";const j=l.forwardRef(({className:e,...a},t)=>r.jsx("caption",{ref:t,className:s.cn("mt-4 text-sm text-muted-foreground",e),...a}));j.displayName="TableCaption";const y=l.forwardRef(({title:e,isSorted:a,direction:t,setSort:o,placement:h="right",children:w,className:N,...v},R)=>r.jsx(d,{ref:R,className:N,...v,children:r.jsx(n.TooltipProvider,{children:r.jsxs(n.Tooltip,{delayDuration:200,children:[r.jsx(n.TooltipTrigger,{asChild:!0,children:r.jsxs("div",{className:s.cn("group flex items-center gap-1 w-fit cursor-pointer hover:text-foreground",h==="left"?"flex-row-reverse":"flex-row"),onClick:()=>o(t==="asc"?"desc":"asc"),children:[w,r.jsx(H.Button,{variant:"text",size:"auto",className:a?void 0:"opacity-0 group-hover:opacity-100",children:r.jsx(_.ArrowDown,{className:s.cn("h-4 w-4",t==="desc"?"rotate-180":"","transition-transform duration-200 ease-in-out")})})]})}),r.jsxs(n.TooltipContent,{side:"top",children:["Sort by ",e]})]})})}));y.displayName="SortingTableHead";exports.SortingTableHead=y;exports.Table=b;exports.TableBody=f;exports.TableCaption=j;exports.TableCell=g;exports.TableFooter=m;exports.TableHead=d;exports.TableHeader=u;exports.TableRow=p;exports.tableCellVariants=T;exports.tableHeadVariants=x;exports.tableVariants=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),i=require("class-variance-authority"),_=require("lucide-react"),C=require("react"),H=require("../buttons/button/button.cjs"),n=require("../tooltip/tooltip.cjs"),s=require("../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk");function V(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const l=V(C),c=i.cva("w-full caption-bottom",{variants:{size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{size:"default"}}),b=l.forwardRef(({className:e,size:a,...t},o)=>r.jsx("div",{className:"relative w-full overflow-auto rounded-lg border border-input bg-card",children:r.jsx("table",{ref:o,className:s.cn(c({size:a,className:e})),...t})}));b.displayName="Table";const u=l.forwardRef(({className:e,...a},t)=>r.jsx("thead",{ref:t,className:s.cn("[&_tr]:border-b border-input [&_tr]:hover:bg-transparent",e),...a}));u.displayName="TableHeader";const f=l.forwardRef(({className:e,...a},t)=>r.jsx("tbody",{ref:t,className:s.cn("[&_tr:last-child]:border-0",e),...a}));f.displayName="TableBody";const m=l.forwardRef(({className:e,...a},t)=>r.jsx("tfoot",{ref:t,className:s.cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...a}));m.displayName="TableFooter";const p=l.forwardRef(({className:e,...a},t)=>r.jsx("tr",{ref:t,className:s.cn("relative border-b transition-colors data-[state=selected]:bg-muted border-border","before:absolute before:inset-0 before:-z-10 before:rounded-lg before:bg-muted/50 before:opacity-0 before:transition-opacity","hover:before:opacity-100",e),...a}));p.displayName="TableRow";const x=i.cva("border-b bg-muted/50 text-left align-middle font-medium text-muted-foreground border-input",{variants:{size:{sm:"h-8 px-1 text-xs",default:"h-10 px-2",lg:"h-12 px-4"}},defaultVariants:{size:"default"}}),d=l.forwardRef(({className:e,size:a,...t},o)=>r.jsx("th",{ref:o,className:s.cn(x({size:a,className:e})),...t}));d.displayName="TableHead";const T=i.cva("align-middle",{variants:{size:{sm:"p-1",default:"p-2",lg:"p-4"}},defaultVariants:{size:"default"}}),g=l.forwardRef(({className:e,size:a,...t},o)=>r.jsx("td",{ref:o,className:s.cn(T({size:a,className:e})),...t}));g.displayName="TableCell";const y=l.forwardRef(({className:e,...a},t)=>r.jsx("caption",{ref:t,className:s.cn("mt-4 text-sm text-muted-foreground",e),...a}));y.displayName="TableCaption";const j=l.forwardRef(({title:e,isSorted:a,direction:t,setSort:o,placement:h="right",children:w,className:N,...v},R)=>r.jsx(d,{ref:R,className:N,...v,children:r.jsx(n.TooltipProvider,{children:r.jsxs(n.Tooltip,{delayDuration:200,children:[r.jsx(n.TooltipTrigger,{asChild:!0,children:r.jsxs("div",{className:s.cn("group flex items-center gap-1 w-fit cursor-pointer hover:text-foreground",h==="left"?"flex-row-reverse":"flex-row"),onClick:()=>o(t==="asc"?"desc":"asc"),children:[w,r.jsx(H.Button,{variant:"text",size:"auto",className:a?void 0:"opacity-0 group-hover:opacity-100",children:r.jsx(_.ArrowDown,{className:s.cn("h-4 w-4",t==="desc"?"rotate-180":"","transition-transform duration-200 ease-in-out")})})]})}),r.jsxs(n.TooltipContent,{side:"top",children:["Sort by ",e]})]})})}));j.displayName="SortingTableHead";exports.SortingTableHead=j;exports.Table=b;exports.TableBody=f;exports.TableCaption=y;exports.TableCell=g;exports.TableFooter=m;exports.TableHead=d;exports.TableHeader=u;exports.TableRow=p;exports.tableCellVariants=T;exports.tableHeadVariants=x;exports.tableVariants=c;
@@ -1,11 +1,11 @@
1
1
  import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
- import * as R from "react";
3
- import { Description as n } from "../description/description.js";
2
+ import * as G from "react";
3
+ import { Description as f } from "../description/description.js";
4
4
  import { ShortString as h } from "../short-string/short-string.js";
5
- import { GridTableRow as T, GridTableCell as p } from "../table/grid-table.js";
6
- import { TokenSymbol as j } from "../token-symbol/token-symbol.js";
5
+ import { GridTableRow as I, GridTableCell as p } from "../table/grid-table.js";
6
+ import { TokenSymbol as T } from "../token-symbol/token-symbol.js";
7
7
  import { VSpace as g } from "../vspace/vspace.js";
8
- import { cn as u } from "../../utils/cn.js";
8
+ import { cn as j } from "../../utils/cn.js";
9
9
  import "sonner";
10
10
  import "@gearbox-protocol/sdk";
11
11
  const y = {
@@ -18,7 +18,7 @@ const y = {
18
18
  sm: 2,
19
19
  md: 4,
20
20
  lg: 4
21
- }, E = R.forwardRef(
21
+ }, E = G.forwardRef(
22
22
  ({
23
23
  token: o,
24
24
  tokenLabel: S,
@@ -28,48 +28,49 @@ const y = {
28
28
  value: s,
29
29
  valueDescription: l,
30
30
  size: e = "default",
31
- iconSize: L = e,
31
+ iconSize: u = e,
32
32
  gapSize: c = e,
33
- last: w,
34
- symbolMaxLength: A,
35
- descriptionMaxLength: C,
36
- onSelect: a,
37
- hideValue: d = !1,
38
- className: G
39
- }, I) => {
40
- const i = S || o?.title, f = e === "md" ? "default" : e;
33
+ last: L,
34
+ symbolMaxLength: R,
35
+ descriptionMaxLength: w,
36
+ onSelect: d,
37
+ hideValue: a = !1,
38
+ className: A
39
+ }, C) => {
40
+ const i = S || o?.title, n = e === "md" ? "default" : e;
41
41
  return /* @__PURE__ */ t(
42
- T,
42
+ I,
43
43
  {
44
- ref: I,
45
- className: u(
46
- w && "[&>*]:border-0",
47
- a && "cursor-pointer",
48
- G
44
+ ref: C,
45
+ className: j(
46
+ L && "[&>*]:border-0",
47
+ d && "cursor-pointer",
48
+ A
49
49
  ),
50
- onClick: a,
51
- cols: d ? "1fr" : "1fr 1fr",
50
+ onClick: d,
51
+ cols: a ? "1fr" : "1fr 1fr",
52
+ noRound: !0,
52
53
  children: [
53
- /* @__PURE__ */ r(p, { size: f, className: "text-left", children: /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
54
+ /* @__PURE__ */ r(p, { size: n, className: "text-left", children: /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
54
55
  /* @__PURE__ */ r(
55
- j,
56
+ T,
56
57
  {
57
58
  token: o,
58
- size: y[L],
59
+ size: y[u],
59
60
  chainId: b,
60
61
  network: N
61
62
  }
62
63
  ),
63
64
  /* @__PURE__ */ t("div", { className: "flex-1 min-w-0", children: [
64
- i && /* @__PURE__ */ r(h, { maxLength: A, children: i }),
65
+ i && /* @__PURE__ */ r(h, { maxLength: R, children: i }),
65
66
  i && m && /* @__PURE__ */ r(g, { height: x[c] }),
66
- m && /* @__PURE__ */ r(n, { children: /* @__PURE__ */ r(h, { maxLength: C, children: String(m) }) })
67
+ m && /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(h, { maxLength: w, children: String(m) }) })
67
68
  ] })
68
69
  ] }) }),
69
- !d && /* @__PURE__ */ t(p, { size: f, className: "text-right", children: [
70
+ !a && /* @__PURE__ */ t(p, { size: n, className: "text-right", children: [
70
71
  s,
71
72
  s && l && /* @__PURE__ */ r(g, { height: x[c] }),
72
- l && /* @__PURE__ */ r(n, { children: l })
73
+ l && /* @__PURE__ */ r(f, { children: l })
73
74
  ] })
74
75
  ]
75
76
  }
@@ -1,10 +1,10 @@
1
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
- import { cva as b } from "class-variance-authority";
3
- import * as w from "react";
4
- import { useRef as v, useState as k, useEffect as j } from "react";
5
- import { cn as W } from "../../utils/cn.js";
6
- import { Graph as R } from "./graph.js";
7
- const V = b(
1
+ import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
+ import { cva as k } from "class-variance-authority";
3
+ import * as y from "react";
4
+ import { useRef as p, useState as j, useEffect as R } from "react";
5
+ import { cn as N } from "../../utils/cn.js";
6
+ import { Graph as V } from "./graph.js";
7
+ const W = k(
8
8
  "relative w-full overflow-hidden rounded-lg border-border border bg-card text-card-foreground",
9
9
  {
10
10
  variants: {
@@ -34,45 +34,45 @@ const V = b(
34
34
  padding: "default"
35
35
  }
36
36
  }
37
- ), g = w.forwardRef(
37
+ ), w = y.forwardRef(
38
38
  ({
39
39
  className: t,
40
- variant: n,
40
+ variant: s,
41
41
  size: r,
42
42
  padding: m,
43
- title: s,
43
+ title: n,
44
44
  description: l,
45
45
  toolbar: a,
46
46
  loading: i = !1,
47
- emptyMessage: c,
47
+ emptyMessage: o,
48
48
  error: d,
49
49
  children: h,
50
50
  ...f
51
51
  }, u) => {
52
- const x = s || l || a;
53
- return /* @__PURE__ */ o(
52
+ const x = n || l || a;
53
+ return /* @__PURE__ */ c(
54
54
  "div",
55
55
  {
56
56
  ref: u,
57
- className: W(
57
+ className: N(
58
58
  "flex flex-col",
59
- V({ variant: n, size: r, padding: m, className: t })
59
+ W({ variant: s, size: r, padding: m, className: t })
60
60
  ),
61
61
  ...f,
62
62
  children: [
63
- x && /* @__PURE__ */ o("div", { className: "mb-4 flex items-start justify-between gap-4 flex-shrink-0", children: [
64
- (s || l) && /* @__PURE__ */ o("div", { className: "flex-1", children: [
65
- s && /* @__PURE__ */ e("h3", { className: "text-base sm:text-lg font-semibold leading-none tracking-tight", children: s }),
63
+ x && /* @__PURE__ */ c("div", { className: "mb-4 flex items-start justify-between gap-4 flex-shrink-0", children: [
64
+ (n || l) && /* @__PURE__ */ c("div", { className: "flex-1", children: [
65
+ n && /* @__PURE__ */ e("h3", { className: "text-base sm:text-lg font-semibold leading-none tracking-tight", children: n }),
66
66
  l && /* @__PURE__ */ e("p", { className: "mt-1 text-xs sm:text-sm text-muted-foreground", children: l })
67
67
  ] }),
68
68
  a && /* @__PURE__ */ e("div", { className: "flex-shrink-0 w-full", children: a })
69
69
  ] }),
70
- /* @__PURE__ */ o("div", { className: "relative flex-1 w-full min-h-0", children: [
71
- i && /* @__PURE__ */ e("div", { className: "absolute inset-0 z-10 flex items-center justify-center bg-transparent backdrop-blur-sm", children: /* @__PURE__ */ o("div", { className: "flex flex-col items-center gap-2", children: [
70
+ /* @__PURE__ */ c("div", { className: "relative flex-1 w-full min-h-0", children: [
71
+ i && /* @__PURE__ */ e("div", { className: "absolute inset-0 z-10 flex items-center justify-center opacity-0 animate-delayed-fade-in", children: /* @__PURE__ */ c("div", { className: "flex flex-col items-center gap-2", children: [
72
72
  /* @__PURE__ */ e("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" }),
73
73
  /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm text-muted-foreground", children: "Loading..." })
74
74
  ] }) }),
75
- d && /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ o("div", { className: "flex flex-col items-center gap-2 text-destructive", children: [
75
+ d && /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ c("div", { className: "flex flex-col items-center gap-2 text-destructive", children: [
76
76
  /* @__PURE__ */ e(
77
77
  "svg",
78
78
  {
@@ -94,7 +94,7 @@ const V = b(
94
94
  ),
95
95
  /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: d })
96
96
  ] }) }),
97
- !d && !h && c && /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ o("div", { className: "flex flex-col items-center gap-2 text-muted-foreground", children: [
97
+ !d && !h && o && /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ c("div", { className: "flex flex-col items-center gap-2 text-muted-foreground", children: [
98
98
  /* @__PURE__ */ e(
99
99
  "svg",
100
100
  {
@@ -114,51 +114,61 @@ const V = b(
114
114
  )
115
115
  }
116
116
  ),
117
- /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm", children: c })
117
+ /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm", children: o })
118
118
  ] }) }),
119
- !d && h
119
+ /* @__PURE__ */ e(
120
+ "div",
121
+ {
122
+ className: N(
123
+ "w-full h-full transition-[filter] duration-300 delay-300",
124
+ i && "blur-sm pointer-events-none"
125
+ ),
126
+ children: !d && h
127
+ }
128
+ )
120
129
  ] })
121
130
  ]
122
131
  }
123
132
  );
124
133
  }
125
134
  );
126
- g.displayName = "GraphView";
127
- function M({
135
+ w.displayName = "GraphView";
136
+ function S({
128
137
  series: t,
129
- onUnselectSeries: n,
138
+ onUnselectSeries: s,
130
139
  loading: r,
131
140
  title: m,
132
- description: s,
141
+ description: n,
133
142
  toolbar: l,
134
143
  emptyMessage: a = "No data available",
135
144
  error: i,
136
- containerClassName: c,
145
+ containerClassName: o,
137
146
  variant: d,
138
147
  size: h,
139
148
  padding: f,
140
149
  ...u
141
150
  }) {
142
- t.length > 0 && t.some((p) => p.data.length > 0), t.length > 0 && t.some((p) => p.data.length > 0);
143
- const x = !r && t.length === 0, N = t.length > 0;
151
+ const x = !r && t.length === 0, v = p(t);
152
+ t.length > 0 && (v.current = t);
153
+ const g = r && t.length === 0 ? v.current : t, b = g.length > 0;
144
154
  return /* @__PURE__ */ e(
145
- g,
155
+ w,
146
156
  {
147
- className: c,
157
+ className: o,
148
158
  variant: d,
149
159
  size: h,
150
160
  padding: f,
151
161
  title: m,
152
- description: s,
162
+ description: n,
153
163
  toolbar: l,
154
164
  loading: r,
155
165
  error: i,
156
166
  emptyMessage: x ? a : void 0,
157
- children: N && !i && /* @__PURE__ */ e(
158
- R,
167
+ children: b && !i && /* @__PURE__ */ e(
168
+ V,
159
169
  {
160
- series: t,
161
- ...n ? { onUnselectSeries: n } : {},
170
+ series: g,
171
+ ...s ? { onUnselectSeries: s } : {},
162
172
  ...u
163
173
  }
164
174
  )
@@ -166,22 +176,22 @@ function M({
166
176
  );
167
177
  }
168
178
  function A(t = 0) {
169
- const n = v(null), r = v(null), [m, s] = k(null);
170
- return j(() => {
179
+ const s = p(null), r = p(null), [m, n] = j(null);
180
+ return R(() => {
171
181
  const l = () => {
172
- if (n.current && r.current) {
173
- const c = r.current.clientWidth, d = n.current.clientWidth;
174
- s(c - d - t);
182
+ if (s.current && r.current) {
183
+ const o = r.current.clientWidth, d = s.current.clientWidth;
184
+ n(o - d - t);
175
185
  }
176
186
  }, a = r.current, i = a ? new ResizeObserver(l) : null;
177
187
  return a && i?.observe(a), () => {
178
188
  a && i?.unobserve(a);
179
189
  };
180
- }, [t]), { graphWidth: m, parentRef: r, asideRef: n };
190
+ }, [t]), { graphWidth: m, parentRef: r, asideRef: s };
181
191
  }
182
192
  export {
183
- g as GraphView,
184
- M as GraphViewWithData,
185
- V as graphViewVariants,
193
+ w as GraphView,
194
+ S as GraphViewWithData,
195
+ W as graphViewVariants,
186
196
  A as useGraphAside
187
197
  };
@@ -1,33 +1,33 @@
1
- import { jsx as r, jsxs as c } from "react/jsx-runtime";
2
- import * as i from "react";
3
- import { cn as u } from "../../utils/cn.js";
1
+ import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
+ import * as n from "react";
3
+ import { cn as d } from "../../utils/cn.js";
4
4
  import "sonner";
5
5
  import "@gearbox-protocol/sdk";
6
6
  function g({
7
- className: t,
7
+ className: r,
8
8
  children: o,
9
9
  ...l
10
10
  }) {
11
- const n = i.Children.toArray(o).length, f = i.Children.map(o, (e, s) => {
12
- if (i.isValidElement(e)) {
13
- const d = s === 0, m = s === n - 1;
14
- return i.cloneElement(e, {
15
- first: d,
16
- last: m
11
+ const f = n.Children.toArray(o).length, i = n.Children.map(o, (t, s) => {
12
+ if (n.isValidElement(t)) {
13
+ const m = s === 0, u = s === f - 1;
14
+ return n.cloneElement(t, {
15
+ first: m,
16
+ last: u
17
17
  });
18
18
  }
19
- return e;
19
+ return t;
20
20
  });
21
- return /* @__PURE__ */ r("div", { className: u("m-0 p-0 w-full flex flex-wrap", t), ...l, children: f });
21
+ return /* @__PURE__ */ e("div", { className: d("m-0 p-0 w-full flex flex-wrap", r), ...l, children: i });
22
22
  }
23
23
  function v({
24
- icon: t,
24
+ icon: r,
25
25
  title: o,
26
26
  subTitle: l,
27
27
  onClick: a,
28
- endingIcon: n,
29
- first: f = !1,
30
- last: e = !1,
28
+ endingIcon: f,
29
+ first: i = !1,
30
+ last: t = !1,
31
31
  className: s
32
32
  }) {
33
33
  return /* @__PURE__ */ c(
@@ -35,21 +35,20 @@ function v({
35
35
  {
36
36
  type: "button",
37
37
  onClick: a,
38
- className: u(
38
+ className: d(
39
39
  "relative z-0 pt-5 px-4 flex flex-row items-start gap-4 w-full cursor-pointer text-left",
40
- "before:absolute before:-z-10 before:left-0 before:hidden before:w-full before:inset-y-0 before:content-[''] before:bg-foreground/10",
41
- f && e ? "before:rounded-lg" : f ? "before:rounded-t-lg" : e ? "before:rounded-b-lg" : "",
40
+ "before:absolute before:-z-10 before:left-0 before:hidden before:w-full before:inset-y-0 before:content-[''] before:bg-foreground/10 before:rounded-lg",
42
41
  "hover:before:block",
43
- !e && "after:absolute after:bottom-0 after:left-0 after:w-full after:h-px after:content-[''] after:bg-border",
42
+ !t && "after:absolute after:bottom-0 after:left-0 after:w-full after:h-px after:content-[''] after:bg-border",
44
43
  s
45
44
  ),
46
45
  children: [
47
- t && /* @__PURE__ */ r("div", { className: "w-6 h-6 text-muted-foreground flex items-center justify-center", children: t }),
48
- /* @__PURE__ */ r("div", { className: "pb-5 flex-1 flex flex-col gap-2", children: /* @__PURE__ */ c("div", { className: "flex flex-col gap-1.5", children: [
49
- /* @__PURE__ */ r("div", { className: "text-base leading-[1.2] font-medium", children: o }),
50
- l && /* @__PURE__ */ r("div", { className: "text-sm text-muted-foreground", children: l })
46
+ r && /* @__PURE__ */ e("div", { className: "w-6 h-6 text-muted-foreground flex items-center justify-center", children: r }),
47
+ /* @__PURE__ */ e("div", { className: "pb-5 flex-1 flex flex-col gap-2", children: /* @__PURE__ */ c("div", { className: "flex flex-col gap-1.5", children: [
48
+ /* @__PURE__ */ e("div", { className: "text-base leading-[1.2] font-medium", children: o }),
49
+ l && /* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground", children: l })
51
50
  ] }) }),
52
- n && /* @__PURE__ */ r("div", { className: "ml-4 text-muted-foreground transition-colors", children: n })
51
+ f && /* @__PURE__ */ e("div", { className: "ml-4 text-muted-foreground transition-colors", children: f })
53
52
  ]
54
53
  }
55
54
  );