@vellumlabs/cexplorer-sdk 1.1.16 → 1.1.18
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/dist/ui/carousel/AdsCarousel.js +1 -1
- package/dist/ui/environmentBadge/index.js +1 -1
- package/dist/ui/mainLogo/index.d.ts +2 -1
- package/dist/ui/mainLogo/index.d.ts.map +1 -1
- package/dist/ui/mainLogo/index.js +1 -1
- package/dist/ui/tableSettingsDropdown/index.d.ts +4 -2
- package/dist/ui/tableSettingsDropdown/index.d.ts.map +1 -1
- package/dist/ui/tableSettingsDropdown/index.js +1 -1
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/format.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as l}from"react/jsx-runtime";import a from"embla-carousel-autoplay";import{LoadingSkeleton as e}from"../loadingSkeleton/index.js";import{AdCard as s}from"./AdCard.js";import{Carousel as i,CarouselContent as r,CarouselItem as o}from"./components/carousel.js";const
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import a from"embla-carousel-autoplay";import{LoadingSkeleton as e}from"../loadingSkeleton/index.js";import{AdCard as s}from"./AdCard.js";import{Carousel as i,CarouselContent as r,CarouselItem as o}from"./components/carousel.js";const d=({singleItem:d=!1,maxWidth:t=!0,className:n,filterByType:m,adCardClassname:u,miscBasicQuery:p,generateImageUrl:c})=>{var f,g,b;const v=null==(b=null==(g=null==(f=p.data)?void 0:f.data)?void 0:g.ads)?void 0:b.filter(l=>"promo_panel"===l.type&&l.data),h=null==v?void 0:v.filter(l=>{var a;return(null==(a=null==l?void 0:l.data)?void 0:a.type)===m}),x=m&&Array.isArray(h)&&(null==h?void 0:h.length)>0?h:v;return 0===(null==x?void 0:x.length)?null:l("aside",{className:`flex w-full max-w-desktop flex-wrap justify-between gap-2 ${d?"":"p-mobile md:p-desktop"} ${n}`,children:l(i,{plugins:[a({delay:4e3})],className:"w-full overflow-visible "+(t?"max-w-desktop":""),opts:{loop:!0,duration:30,align:"start"},children:p.isLoading?l(r,{className:"",children:Array.from({length:3}).map((a,s)=>l(o,{className:"basis-full "+(d?"md:basis-1/2 lg:basis-full":"md:basis-1/2 lg:basis-1/3 2xl:basis-1/4"),children:l(e,{height:"110px",rounded:"md"})},s))}):l(r,{className:"overflow-visible",children:null==v?void 0:v.map((a,e,i)=>l(o,{className:"basis-full overflow-visible "+(d?"md:basis-1/2 lg:basis-full":"md:basis-1/2 "+(2===i.length?"lg:basic-1/2":"lg:basis-1/3 2xl:basis-1/4")),children:l(s,{data:a.data,className:u,generateImageUrl:c})},e))})})})};export{d as AdsCarousel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useThemeStore as t}from"../../stores/themeStore.js";const r=({network:r})=>{const{theme:o}=t();if("mainnet"===r)return null;const n={dark:{border:"border-[#475467]",bg:"bg-[#1D2939]",text:"text-white"},light:{border:"border-[#E4E7EC]",bg:"bg-[#F9FAFB]",text:"text-[#344054]"}}[o];return e("div",{className:`absolute left-[
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useThemeStore as t}from"../../stores/themeStore.js";const r=({network:r})=>{const{theme:o}=t();if("mainnet"===r)return null;const n={dark:{border:"border-[#475467]",bg:"bg-[#1D2939]",text:"text-white"},light:{border:"border-[#E4E7EC]",bg:"bg-[#F9FAFB]",text:"text-[#344054]"}}[o];return e("div",{className:`absolute left-[36px] top-[31px] flex w-fit items-center rounded-xl border ${n.border} ${n.bg} h-5 px-[6px] py-[2px]`,children:e("span",{className:`text-[10px] font-medium ${n.text} whitespace-nowrap`,children:r})})};export{r as EnvironmentBadge};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/mainLogo/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/mainLogo/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAahC;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsFG;AACH,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CA0DtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useState as r,useEffect as t}from"react";import{Link as s}from"@tanstack/react-router";import
|
|
1
|
+
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useState as r,useEffect as t}from"react";import{Link as s}from"@tanstack/react-router";import i from"../../resources/images/logo_darkmode_offline.svg.js";import a from"../../resources/images/logo_lightmode_offline.svg.js";import m from"../../resources/images/preloader_logo_dark.svg.js";import l from"../../resources/images/preloader_logo_light.svg.js";import{useThemeStore as c}from"../../stores/themeStore.js";import{EnvironmentBadge as n}from"../environmentBadge/index.js";const g=({size:g=150,onClick:f,className:h,network:d,mini:p=!1})=>{const{theme:u}=c(),[v,k]=r(!0);return t(()=>{const e=setInterval(async()=>{try{const e=new AbortController,o=setTimeout(()=>e.abort(),5e3);await fetch(window.location.origin+"/favicon.ico",{method:"HEAD",cache:"no-cache",signal:e.signal}),clearTimeout(o),k(!0)}catch{k(!1)}},3e4);return()=>{clearInterval(e)}},[]),e(s,{to:"/",className:"shrink-0",onClick:f,children:o("div",{className:p?"flex items-center":"relative",children:[e("img",v?{className:h,src:"light"===u?m:l,width:g,alt:"Cexplorer logo"}:{className:h,src:"light"===u?a:i,width:g,alt:"Cexplorer logo"}),d&&e(n,{network:d})]})})};export{g as MainLogo};
|
|
@@ -45,9 +45,10 @@ export type TableSettingsDropdownProps = {
|
|
|
45
45
|
*/
|
|
46
46
|
customStyles?: CSSProperties;
|
|
47
47
|
/**
|
|
48
|
-
* Custom
|
|
49
|
-
* @default
|
|
48
|
+
* Custom row options for the rows per page selector
|
|
49
|
+
* @default [10, 20, 30, 40, 50]
|
|
50
50
|
*/
|
|
51
|
+
rowOptions?: number[];
|
|
51
52
|
rowsLabel?: string;
|
|
52
53
|
};
|
|
53
54
|
/**
|
|
@@ -115,6 +116,7 @@ export type TableSettingsDropdownProps = {
|
|
|
115
116
|
* @param {boolean} [props.visibleRows=true] - Show rows selector
|
|
116
117
|
* @param {ReactNode} [props.customContent] - Custom trigger content
|
|
117
118
|
* @param {CSSProperties} [props.customStyles] - Custom dropdown styles
|
|
119
|
+
* @param {number[]} [props.rowOptions=[10, 20, 30, 40, 50]] - Custom row options
|
|
118
120
|
* @returns {JSX.Element} Table settings dropdown with rows and column controls
|
|
119
121
|
*/
|
|
120
122
|
export declare const TableSettingsDropdown: FC<TableSettingsDropdownProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/tableSettingsDropdown/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAiB1D;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC;;;OAGG;IACH,cAAc,EAAE;QACd;;WAEG;QACH,KAAK,EAAE,SAAS,CAAC;QACjB;;WAEG;QACH,SAAS,EAAE,OAAO,CAAC;QACnB;;WAEG;QACH,OAAO,CAAC,EAAE,GAAG,CAAC;KACf,EAAE,CAAC;IACJ;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B;;OAEG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/tableSettingsDropdown/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAiB1D;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC;;;OAGG;IACH,cAAc,EAAE;QACd;;WAEG;QACH,KAAK,EAAE,SAAS,CAAC;QACjB;;WAEG;QACH,SAAS,EAAE,OAAO,CAAC;QACnB;;WAEG;QACH,OAAO,CAAC,EAAE,GAAG,CAAC;KACf,EAAE,CAAC;IACJ;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B;;OAEG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAwFhE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Settings as
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Settings as n}from"lucide-react";import l from"react";import{NavigationMenu as i,NavigationMenuList as s,NavigationMenuItem as d,NavigationMenuTrigger as o,NavigationMenuContent as t}from"../navigationMenu/index.js";import{Select as a,SelectTrigger as c,SelectValue as m,SelectContent as u,SelectItem as p}from"../select/index.js";const b=({columnsOptions:b,rows:h,setRows:f,visibleRows:x=!0,customContent:v,customStyles:w,rowOptions:g=[10,20,30,40,50],rowsLabel:N="Rows:"})=>(b=b.filter(e=>void 0!==e.isVisible),e(i,{delayDuration:100,children:e(s,{className:"",children:r(d,{className:"",children:[e(o,{className:"bg-cardBg p-0",onPointerMove:e=>e.preventDefault(),onPointerLeave:e=>e.preventDefault(),hideChevron:!0,children:v||e("div",{className:"flex h-[40px] w-[40px] shrink-0 items-center justify-center rounded-s border border-border",children:e(n,{size:22})})}),r(t,{onPointerLeave:e=>e.preventDefault(),className:"z-20 grid w-[150px] rounded-s border-[1px] border-border bg-background text-text-sm font-medium",style:w,children:[e("div",{children:r(a,{defaultValue:h+"",onValueChange:e=>{f(Number(e))},children:[x&&r("div",{className:"flex h-14 w-full items-center justify-between border-b border-border px-1.5",children:[e("span",{children:N}),e(c,{className:"w-[60px]",children:e(m,{placeholder:e("div",{className:"flex w-full items-center justify-between gap-1/2 uppercase",children:e("span",{children:h})})})})]}),e(u,{align:"end",children:g.map(r=>e(p,{className:"flex w-full cursor-pointer justify-between px-1",value:r+"",children:e("span",{children:r})},r))})]})}),b.map((n,i)=>e(l.Fragment,{children:r("div",{className:"first:rounded-tl-md first:rounded-tr-md last:rounded-bl-md last:rounded-br-md flex h-full cursor-pointer justify-between border-b-[1px] border-border p-1.5 last:border-b-0 hover:bg-darker",onClick:n.onClick,children:[e("span",{children:n.label}),e("span",{children:n.isVisible&&"✓"})]})},i))]})]})})}));export{b as TableSettingsDropdown};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/utils/format.tsx"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,YAAY,GACvB,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,MAAM,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,EAC7C,aAAa,MAAM,EACnB,YAAY,MAAM,
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/utils/format.tsx"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,YAAY,GACvB,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,MAAM,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,EAC7C,aAAa,MAAM,EACnB,YAAY,MAAM,wDAgDnB,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,GAAG,MAAM,GAAG,SAAS,KAAG,MAIlE,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAW/D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,sBAAsB,GACjC,KAAK,MAAM,EACX,qBAAqB,OAAO,EAC5B,mBAAmB,MAAM,KACxB,MAeF,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,GAAG,IAAI,GAAG,MAAM,KAAG,IAOzD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,UAAU,GACrB,QAAQ,MAAM,GAAG,IAAI,GAAG,MAAM,EAC9B,WAAW,OAAO,EAClB,eAAc,OAAe,EAC7B,eAAc,OAAe,EAC7B,gBAAe,OAAe,qDAqC/B,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,YAAY,GAAI,WAAW,MAAM,WA2B7C,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,SAAS,MAAM,KAAG,MAsBrD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,aAAa,GAAI,WAAW,MAAM,WA2B9C,CAAC"}
|
package/dist/utils/format.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{FormatStringComponent as o}from"../ui/formatStringComponent/index.js";import{Tooltip as r}from"../ui/tooltip/index.js";import{TZDate as n}from"@date-fns/tz";import{format as a}from"date-fns";const i=(e,r,n,a)=>{if(!e)return;const i=n||0
|
|
1
|
+
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{FormatStringComponent as o}from"../ui/formatStringComponent/index.js";import{Tooltip as r}from"../ui/tooltip/index.js";import{TZDate as n}from"@date-fns/tz";import{format as a}from"date-fns";const i=(e,r,n,a)=>{if(!e)return;const i=n||0,s=["addr_test","stake_test","gov_action","cc_cold","cc_hot","asset","drep","pool","addr","stake"].find(t=>e.toLowerCase().startsWith(t)),d="shorter"===r?4:"short"===r?5:"longer"===r?11:8;let l,$;l=s?Math.max(s.length+1,d):d,$="shorter"===r?4:"short"===r?5:"longer"===r?11:8;const c=`${e.slice(i,i+l)}...${e.slice(-$)}`;return t(o,{text:e,truncated:c,className:a})},s=t=>void 0===t?"-":t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");function d(t){const e=new Date(t+"Z"),o=e.getDate().toString().padStart(2,"0"),r=(""+(e.getMonth()+1)).padStart(2,"0");return`${e.getFullYear()}-${r}-${o} ${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}:${e.getSeconds().toString().padStart(2,"0")}`}const l=(t,e,o)=>{const r=t<0,n=Math.abs(t),a=r?"-":"";switch(!0){case n>=1e9:return a+(n/1e9).toFixed(o??2)+"B";case n>=1e6:return a+(n/1e6).toFixed(o??2)+"M";case n>=1e3:return a+(n/1e3).toFixed(o??2)+"k";default:return a+n.toFixed(e?0:2)}},$=t=>t instanceof Date?t:new Date("string"==typeof t?/[zZ]|[+-]\d{2}:\d{2}$/.test(t)?t:t+"Z":t),c=(o,i,s=!1,d=!1,l=!1)=>{if(!o)return"";const c=Intl.DateTimeFormat().resolvedOptions().timeZone,m=$(o),h=new n(m,c);if(s)return h.toISOString();const g=a(h,"XXX"),M=d?f(m.toISOString()):a(h,i?"MMM dd yyyy":"MMM dd yyyy, HH:mm zzz"),u=l?a(h,"d.M.yyyy, HH:mm:ss"):null;return t(r,l?{content:e("span",{children:["Local timezone UTC ",g]}),children:e("div",{className:"flex flex-col",children:[t("span",{children:M}),t("small",{className:"text-text-muted text-[11px]",children:u})]})}:{content:e("span",{children:["Local timezone UTC ",g]}),children:M})},m=t=>{const e=new Date,o=Math.floor((new Date(t).getTime()-e.getTime())/1e3),r=Math.floor(o/31536e3),n=Math.floor(o%31536e3/2592e3),a=Math.floor(o%2592e3/86400),i=Math.floor(o%86400/3600),s=Math.floor(o%3600/60),d=o%60;return r>0?r>=1?`in ${r}y${n>0?` ${n}m`:""}`:`in ${n}mo${a>0?` ${a}d`:""}`:n>0?`in ${n}mo${a>0?` ${a}d`:""}`:a>0?`in ${a}d${i>0?` ${i}h`:""}`:i>0?`in ${i}h${s>0?` ${s}m`:""}`:s>0?`in ${s}m${d>0?` ${d}s`:""}`:`in ${d}s`},h=t=>{const e=Math.floor(t/86400),o=Math.floor(t%86400/3600),r=Math.floor(t%3600/60),n=t%60;let a="";return e>0&&(a+=e+"d "),o>0&&(a+=o+"h "),r>0&&(a+=r+"m "),(n>0||""===a)&&(a+=n+"s"),a.trim()},f=t=>{const e=new Date,o=new Date(t),r=Math.floor((e.getTime()-o.getTime())/1e3),n=Math.floor(r/31536e3),a=Math.floor(r%31536e3/2592e3),i=Math.floor(r%2592e3/86400),s=Math.floor(r%86400/3600),d=Math.floor(r%3600/60),l=r%60;return n>0?n>=1?`${n}y${a>0?` ${a}mo`:""} ago`:`${a}mo${i>0?` ${i}d`:""} ago`:a>0?`${a}mo${i>0?` ${i}d`:""} ago`:i>0?`${i}d${s>0?` ${s}h`:""} ago`:s>0?`${s}h${d>0?` ${d}m`:""} ago`:d>0?`${d}m${l>0?` ${l}s`:""} ago`:l+"s ago"};export{d as convertUtcToLocal,c as formatDate,s as formatNumber,l as formatNumberWithSuffix,h as formatSecondsToTime,i as formatString,f as formatTimeAgo,m as formatTimeIn,$ as toUtcDate};
|