@gearbox-protocol/permissionless-ui 1.17.6 → 1.17.7
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/cjs/components/block-sync/block-sync.cjs +1 -1
- package/dist/cjs/components/graph/formatters.cjs +1 -1
- package/dist/cjs/components/graph/graph-current-value.cjs +1 -1
- package/dist/cjs/components/graph/graph-tooltip.cjs +1 -1
- package/dist/cjs/components/graph/graph.cjs +1 -1
- package/dist/esm/components/block-sync/block-sync.js +20 -20
- package/dist/esm/components/graph/formatters.js +110 -58
- package/dist/esm/components/graph/graph-current-value.js +15 -15
- package/dist/esm/components/graph/graph-tooltip.js +49 -53
- package/dist/esm/components/graph/graph.js +241 -219
- package/dist/types/components/graph/formatters.d.ts +16 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),l=require("../tooltip/tooltip.cjs"),p=require("../../utils/cn.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),l=require("../tooltip/tooltip.cjs"),p=require("../../utils/cn.cjs"),k=1e3*60*10;function w({blockByChain:n,explorerAddresses:g,networkById:v}){const[i,S]=u.useState(Date.now());u.useEffect(()=>{const s=()=>{S(Date.now())},t=window.setInterval(s,1e3);return()=>{clearInterval(t)}},[]);const x=u.useMemo(()=>{if(!n)return 0;const s=Object.values(n).reduce((t,a)=>{const o=a.lastSyncBlock.localTimestamp;return t===0||t!==0&&o<t?o:t},0);return s?i-s:0},[n,i])>k,m=()=>e.jsxs("div",{className:"flex h-[30px] items-center gap-1.5",children:[e.jsx("span",{className:p.cn("text-sm leading-[17px]",x?"text-destructive":"text-success"),children:"Status"}),e.jsx("div",{className:p.cn("w-2 h-2 rounded-full",x?"bg-destructive":"bg-success")})]}),h=()=>{if(!n)return null;const s=Object.entries(n);return e.jsx("div",{className:"flex flex-col text-left text-xs",children:s.map(([t,a],o)=>{const d=a.lastSyncBlock,c=d?.block||0n,T=d?.localTimestamp?i-d.localTimestamp:0,r=g[Number(t)],j=typeof r=="string"?r:r&&typeof r=="object"&&"url"in r?r.url:void 0,N=v[Number(t)]||"Unknown",f=`[${c.toString()}]`,b=o===s.length-1;return e.jsxs("div",{className:p.cn(!b&&"mb-2"),children:[e.jsxs("span",{children:[N," "]}),j&&c>0?e.jsx("a",{href:`${j}/block/${c}`,target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-foreground",children:f}):e.jsx("span",{children:f}),c>0&&e.jsxs("span",{children:[", updated ",(T/1e3).toFixed(0)," seconds ago"]})]},t)})})};return n?e.jsx(l.TooltipProvider,{delayDuration:200,children:e.jsxs(l.Tooltip,{children:[e.jsx(l.TooltipTrigger,{asChild:!0,children:e.jsx("div",{className:"cursor-auto select-none",children:m()})}),e.jsx(l.TooltipContent,{side:"top",collisionPadding:8,children:h()})]})}):e.jsx("div",{className:"select-none",children:m()})}exports.BlockSync=w;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("luxon"),s=require("../../utils/format-number.cjs"),{MIN_DISPLAY_THRESHOLD:u,MAX_EXPONENTIAL_THRESHOLD:T}=s.FORMAT_CONSTANTS,E=(t,e,r="full")=>{if(s.isBelowDisplayThreshold(t))return e?`<${u}${e}`:`<${u}`;if(t===0)return e?`0${e}`:"0";const n=s.formatNumberWithSuffix(t,{maxExponentialThreshold:T,minimumFractionDigits:0,maximumFractionDigits:r==="short"?1:0,format:r,adaptiveDecimals:r==="short"});return e?`${n}${e}`:n},A=2,x=(t,e)=>{if(s.isBelowDisplayThreshold(t))return e?`<${u}${e}`:`<${u}`;if(t===0)return e?`0${e}`:"0";const r=s.toSignificantDigits(t,A);return e?`${r}${e}`:r},I=4,_=t=>{if(s.isBelowDisplayThreshold(t))return`<${u}`;if(t===0)return"0";const e=Math.round(t),r=Math.abs(t-e);return r>0&&r<.01?t.toFixed(12).replace(/0+$/,"").replace(/\.$/,""):s.toSignificantDigits(t,I)},H=(t,e)=>{if(s.isBelowDisplayThreshold(t))return e?`<${u} ${e}`:`<${u}`;if(t===0)return e?`0 ${e}`:"0";const r=Number.isInteger(t),n=Math.abs(t),m=r&&n>=1e3,l=Math.round(t),h=Math.abs(t-l);if(h>0&&h<.01&&!m){const S=t.toFixed(12).replace(/0+$/,"").replace(/\.$/,"");return e?`${S} ${e}`:S}const D=s.formatNumberWithSuffix(t,{maxExponentialThreshold:T,minimumFractionDigits:r?0:2,maximumFractionDigits:m?1:r?0:2,format:m?"short":"full",adaptiveDecimals:m});return e?`${D} ${e}`:D},M={"%":x,$:E,token:H,none:_},R=t=>M[t]||M.token;function O(t,e,r=8){if(t===0)return e?`0 ${e}`:"0";const n=t.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:r});return e?`${n} ${e}`:n}function X(t,e){let r=t.length>0?Math.min(...t):0,n=t.length>0?Math.max(...t):0,m=[];const l=()=>{const a=n-r,i=(r+n)/2;let o=1,c="";i>=1e9?(o=1e9,c="B"):i>=1e6?(o=1e6,c="M"):i>=1e3&&(o=1e3,c="K");const f=a/10/o;let d=1;if(f>0){const N=Math.floor(Math.log10(f));d=Math.max(1,-N),d=Math.min(d,4)}return{scale:o,suffix:c,decimals:d}},h=(a,i,o)=>i>1?`${(a/i).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:4,useGrouping:!1})}${o}`:a.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:4,useGrouping:!1});return{formatter:a=>{if(a===0)return"0";const{scale:i,suffix:o,decimals:c}=l(),F=Math.abs(a)*1e-10||1e-10;return m.some(f=>Math.abs(f-a)<F)?h(a,i,o):i>1?`${(a/i).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:c,useGrouping:!1})}${o}`:a.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:c,useGrouping:!1})},updateVisibleRange:a=>{a.length>0&&(r=Math.min(...a),n=Math.max(...a))},updateLastValues:a=>{m=[...a]}}}const G=t=>g.DateTime.fromSeconds(Number(t)).toFormat("dd/LL/yyyy HH:mm"),P=t=>g.DateTime.fromSeconds(Number(t)).toFormat("HH:mm"),U=()=>{let t=null;return e=>{const r=g.DateTime.fromSeconds(Number(e)),n=r.toFormat("yyyy-MM-dd");return n!==t?(t=n,r.toFormat("dd MMM")):r.toFormat("HH:mm")}},C=(t,e)=>x(Number(t),e),$={time:G,"%":C},Y=(t,e)=>{if(t==="time"&&e&&e.length>0){const r=g.DateTime.fromSeconds(Number(e[0].time)),n=g.DateTime.fromSeconds(Number(e[e.length-1].time));return r.hasSame(n,"day")?P:U()}return $[t]||$.time};exports.createAdaptiveYAxisFormatter=X;exports.formatExactValue=O;exports.getXFormatter=Y;exports.getYFormatter=R;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("../../utils/cn.cjs"),o=require("./formatters.cjs");function d({point:e,xMeasureUnit:s,yMeasureUnit:t,className:a}){const l=o.getXFormatter(s)(e.time,s),n=t!=="%"&&t!=="$"&&t!=="none"?t:void 0,m=t==="$"?`$${o.formatExactValue(e.value)}`:t==="%"?`${o.formatExactValue(e.value)}%`:o.formatExactValue(e.value,n);return r.jsxs("div",{className:c.cn("absolute top-2 left-2 right-2 z-[100] pointer-events-none",a),children:[r.jsx("div",{className:"text-xl sm:text-2xl font-semibold text-foreground whitespace-nowrap overflow-hidden text-ellipsis",children:m}),r.jsx("div",{className:"text-xs sm:text-sm font-medium text-muted-foreground whitespace-nowrap overflow-hidden text-ellipsis mt-0.5",children:l})]})}exports.GraphCurrentValue=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),x=require("react"),$=require("../../utils/cn.cjs"),d=require("./formatters.cjs"),w=require("./graph.cjs");function C({points:m,series:v,xMeasureUnit:h,yMeasureUnit:j,className:R,position:t,containerRef:g}){const b=x.useRef(null),[f,l]=x.useState(t),E=d.getXFormatter(h);x.useEffect(()=>{if(!t){l(t);return}const r=g?.current;if(!r){l(t);return}const i=b.current;if(!i){l(t);return}const s=r.getBoundingClientRect(),u=i.getBoundingClientRect();let n=t.x,e=t.y;const a=u.width,p=u.height,c=8;n-a/2<c?n=a/2+c:n+a/2>s.width-c&&(n=s.width-a/2-c);const y=p+8;e-y<c?e=t.y+20:e=t.y-y,l({x:n,y:e})},[t,g]);const S=f?{left:`${f.x}px`,top:`${f.y}px`,transform:"translate(-50%, 0)"}:{};if(m.size===0)return null;const _=Array.from(m.values())[0],N=E(_.time,h);return o.jsx("div",{ref:b,className:$.cn("absolute z-[100] pointer-events-none whitespace-nowrap",R),style:S,children:o.jsxs("div",{className:"bg-background/90 backdrop-blur-sm rounded border border-border p-1.5 sm:p-2 space-y-1 sm:space-y-1.5",children:[o.jsx("div",{className:"text-xs sm:text-sm font-medium text-muted-foreground mb-0.5 sm:mb-1 whitespace-nowrap",children:N}),v.map((r,i)=>{const s=m.get(r.label);if(!s)return null;const u=w.DEFAULT_SERIES_COLORS[i%w.DEFAULT_SERIES_COLORS.length],n=r.color||u.line,e=r.yMeasureUnit||j,a=e!=="%"&&e!=="$"&&e!=="none"?e:void 0,p=e==="$"?`$${d.formatExactValue(s.value)}`:e==="%"?`${d.formatExactValue(s.value)}%`:d.formatExactValue(s.value,a);return o.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2 text-xs sm:text-sm whitespace-nowrap",children:[o.jsx("div",{className:"w-1.5 h-1.5 sm:w-2 sm:h-2 rounded-full flex-shrink-0",style:{backgroundColor:n}}),o.jsxs("span",{className:"text-muted-foreground whitespace-nowrap",children:[r.label,":"]}),o.jsx("span",{className:"font-medium text-foreground whitespace-nowrap",children:p})]},r.label)})]})})}exports.GraphTooltip=C;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),be=require("lightweight-charts"),i=require("react"),ve=require("../../hooks/use-media-query.cjs"),ce=require("../../utils/cn.cjs"),G=require("../../utils/colors.cjs"),$=require("./default-config.cjs"),oe=require("./formatters.cjs"),Ce=require("./graph-current-value.cjs"),Se=require("./graph-tooltip.cjs"),xe=require("./plugins/vertical-line.cjs");function Re(e){const V=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const p in e)if(p!=="default"){const T=Object.getOwnPropertyDescriptor(e,p);Object.defineProperty(V,p,T.get?T:{enumerable:!0,get:()=>e[p]})}}return V.default=e,Object.freeze(V)}const ne=Re(i),H=[{line:"#02c39a",top:"rgba(2, 195, 154, 0.56)",bottom:"rgba(2, 195, 154, 0.04)"},{line:"#3b82f6",top:"rgba(59, 130, 246, 0.56)",bottom:"rgba(59, 130, 246, 0.04)"},{line:"#f59e0b",top:"rgba(245, 158, 11, 0.56)",bottom:"rgba(245, 158, 11, 0.04)"},{line:"#ef4444",top:"rgba(239, 68, 68, 0.56)",bottom:"rgba(239, 68, 68, 0.04)"},{line:"#8b5cf6",top:"rgba(139, 92, 246, 0.56)",bottom:"rgba(139, 92, 246, 0.04)"},{line:"#ec4899",top:"rgba(236, 72, 153, 0.56)",bottom:"rgba(236, 72, 153, 0.04)"},{line:"#10b981",top:"rgba(16, 185, 129, 0.56)",bottom:"rgba(16, 185, 129, 0.04)"},{line:"#06b6d4",top:"rgba(6, 182, 212, 0.56)",bottom:"rgba(6, 182, 212, 0.04)"}];function ye({series:e,className:V,showLegend:p=!1,onUnselectSeries:T,xMeasureUnit:L="time",yMeasureUnit:q="token",optionsOverrides:D,verticalLineOptions:I}){const R=i.useRef(null),S=i.useRef(new Map),X=i.useRef(!1),Y=i.useRef(new Set),re=i.useRef(0),ae=i.useRef(!0),W=i.useRef(null),ue=i.useRef(null),F=i.useRef(null),Z=i.useRef(null),A=ve.useIsMobile(),P=ne.useMemo(()=>e.flatMap(t=>t.data),[e]),fe=ne.useMemo(()=>{if(e.length>0){const t=e[e.length-1];if(t.data.length>0)return t.data[t.data.length-1]}},[e]),[le,Q]=i.useState(()=>{if(!fe)return;const t=new Map;for(const n of e)n.data.length>0&&t.set(n.label,n.data[n.data.length-1]);return t}),[se,M]=i.useState(null);i.useEffect(()=>{const t=()=>{if(R.current&&F.current){const d=F.current.clientWidth,a=F.current.clientHeight;R.current.resize(d,a),R.current.timeScale().fitContent()}},n=F.current,l=n?new ResizeObserver(t):null;return n&&l?.observe(n),()=>{n&&l?.unobserve(n)}},[]),i.useEffect(()=>{if(!Z.current||X.current)return;const t=$.getDefaultOptions(),n=G.resolveCSSColor("hsl(var(--foreground))","rgb(0, 0, 0)"),l=be.createChart(Z.current,{...t,rightPriceScale:{...t.rightPriceScale||{},visible:!A,textColor:n},...D});return R.current=l,X.current=!0,()=>{l.remove(),R.current=null,X.current=!1,S.current.clear()}},[A,D]),i.useEffect(()=>{const t=R.current;if(!t||e.length===0)return;const n=L==="time"?oe.getXFormatter(L,P):oe.getXFormatter(L),l=P.map(o=>o.value),{formatter:d,updateVisibleRange:a,updateLastValues:f}=oe.createAdaptiveYAxisFormatter(l);W.current=a,ue.current=f;const b=e.filter(o=>o.data.length>0).map(o=>o.data[o.data.length-1].value);f(b);const x=$.getDefaultOptions();t.applyOptions({localization:{...x.localization||{},timeFormatter:n?(o=>n(parseFloat(o),void 0)):void 0},timeScale:{...x.timeScale||{},tickMarkFormatter:n?(o=>n(parseFloat(o),void 0)):void 0,minBarSpacing:0}});const j=(P.length>0?Math.min(...P.map(o=>o.value)):0)<0,y=P.some(o=>o.value===0),g=!j&&y,s=e.length>1,u=s||A,c=G.resolveCSSColor("hsl(var(--foreground))","rgb(0, 0, 0)");t.applyOptions({rightPriceScale:{...x.rightPriceScale||{},visible:!A,textColor:c,...g&&{scaleMargins:{top:.3,bottom:0}}}});const h=new Set(S.current.keys()),w=new Set(e.map(o=>o.label));for(const o of h)if(!w.has(o)){const r=S.current.get(o);r&&(t.removeSeries(r),S.current.delete(o))}const O=$.getDefaultSeries(),z=[];let k=0;for(let o=0;o<e.length;o++){const r=e[o],ee=H[o%H.length],B=r.color||ee.line;let _,N;if(r.color)if(r.topColor&&r.bottomColor)_=r.topColor,N=r.bottomColor;else if(r.topColor){const C=G.generateColorsFromBase(B);_=r.topColor,N=C.bottomColor}else if(r.bottomColor)_=G.generateColorsFromBase(B).topColor,N=r.bottomColor;else{const C=G.generateColorsFromBase(B);_=C.topColor,N=C.bottomColor}else _=r.topColor||ee.top,N=r.bottomColor||ee.bottom;if(r.data.length===0){const C=S.current.get(r.label);C&&(t.removeSeries(C),S.current.delete(r.label));continue}const he=(r.data.length>0?Math.min(...r.data.map(C=>C.value)):0)<0,me=r.data.some(C=>C.value===0),pe=!he&&me,te=s?k===0?void 0:`scale-${k}`:void 0;s&&z.push({priceScaleId:te||"right",shouldPreventNegativeAxis:pe,seriesIndex:k});let E=S.current.get(r.label);E?(E.applyOptions({lineColor:B,topColor:_,bottomColor:N,priceScaleId:te,priceFormat:{type:"custom",formatter:d}}),E.setData(r.data)):(E=t.addAreaSeries({...O,lineColor:B,topColor:_,bottomColor:N,priceScaleId:te,priceFormat:{type:"custom",formatter:d}}),E.setData(r.data),S.current.set(r.label,E)),k++}if(s&&z.length>0)for(const o of z)try{const r=t.priceScale(o.priceScaleId);r&&r.applyOptions({visible:!u,autoScale:!0,scaleMargins:{top:.1,bottom:.1,...o.shouldPreventNegativeAxis&&{top:.3,bottom:0}},alignLabels:!0,borderVisible:!0,borderColor:"rgba(224, 227, 235, 0.1)",entireTextOnly:!1,textColor:c})}catch(r){console.warn(`Failed to configure price scale ${o.priceScaleId} for series ${o.seriesIndex}:`,r)}const K=new Set(e.map(o=>o.label)),de=K.size!==Y.current.size||[...K].some(o=>!Y.current.has(o)),ge=P.length!==re.current;(ae.current||de||ge||A)&&(t.timeScale().fitContent(),ae.current=!1),Y.current=K,re.current=P.length;const U=new Map;for(const o of e)o.data.length>0&&U.set(o.label,o.data[o.data.length-1]);Q(U.size>0?U:void 0)},[e,P,L,q,A]),i.useEffect(()=>{const t=R.current;if(!t||e.length===0)return;const n=e.length===1;let l;for(const a of e)if(a.data.length>0){l=a.data[a.data.length-1].time;break}if(!l)return;const d=a=>{const{time:f=l,seriesData:b,point:x}=a||{},v=Array.from(S.current.values());if(!x||!f){const g=new Map;for(const s of e)s.data.length>0&&g.set(s.label,s.data[s.data.length-1]);if(Q(g.size>0?g:void 0),n)M(null);else if(v[0]&&l){const u=t.timeScale().timeToCoordinate(l),c=e[0];if(c.data.length>0){const h=c.data[c.data.length-1].value,w=v[0].priceToCoordinate(h);u!==null&&w!==null&&M({x:u,y:w})}}return}const j=new Map;let y;for(let g=0;g<e.length;g++){const s=e[g],u=v[g];if(!u)continue;const c=b?.get(u),h=c&&"value"in c?c.value:void 0,w=s.data[s.data.length-1],O=h!==void 0?h:w?.value??0;g===0&&(y=O),j.set(s.label,{value:O,time:f})}if(Q(j),y!==void 0&&v[0]){const s=t.timeScale().timeToCoordinate(f),u=v[0].priceToCoordinate(y);if(s!==null&&u!==null){const c=F.current;if(c){const h=c.querySelector(".LightweightChart");if(h){const w=h.getBoundingClientRect(),O=c.getBoundingClientRect(),z=s+(w.left-O.left),k=u+(w.top-O.top);M({x:z,y:k})}else M({x:s,y:u})}else M({x:s,y:u})}else M(null)}else M(null)};return t.subscribeCrosshairMove(d),n||requestAnimationFrame(()=>{const a=Array.from(S.current.values());if(a[0]&&l&&e[0]?.data.length>0){const b=t.timeScale().timeToCoordinate(l),x=e[0].data[e[0].data.length-1].value,v=a[0].priceToCoordinate(x);b!==null&&v!==null&&M({x:b,y:v})}}),()=>{t.unsubscribeCrosshairMove(d)}},[e]),i.useEffect(()=>{const t=R.current;if(!t||e.length===0)return;const n=t.timeScale(),l=Math.max(...e.map(a=>a.data.length)),d=()=>{if(l===0)return;const a=n.getVisibleLogicalRange();if(!a)return;const f={from:0,to:l-1},b=typeof a.from=="number"?a.from:0,x=typeof a.to=="number"?a.to:l-1;if(W.current){const g=Math.max(0,Math.floor(b)),s=Math.min(l-1,Math.ceil(x)),u=[];for(const c of e)for(let h=g;h<=s&&h<c.data.length;h++)u.push(c.data[h].value);u.length>0&&W.current(u)}const v=.01;let j=!1;const y={...a};b<f.from-v&&(y.from=f.from,j=!0),x>f.to+v&&(y.to=f.to,j=!0),j&&n.setVisibleLogicalRange(y)};return n.subscribeVisibleLogicalRangeChange(d),()=>{n.unsubscribeVisibleLogicalRangeChange(d)}},[e]),i.useEffect(()=>{const t=R.current,n=Array.from(S.current.values()),l=[];if(t&&n.length>0&&I){const d=$.getDefaultVerticalLine(),a=n[0];for(const f of I){const b=new xe.VertLine(t,a,f.xCoordinate,{...d,...f.options||{}});a.attachPrimitive(b),l.push(b)}}return()=>{if(n.length>0){const d=n[0];for(const a of l)d.detachPrimitive(a)}}},[I]);const J=e.length===1,ie=ne.useMemo(()=>{if(J&&e.length>0){const t=e[0];if(t.data.length>0)return t.data[t.data.length-1]}},[J,e]);return m.jsxs("div",{ref:F,className:ce.cn("relative z-[1] w-full h-full overflow-hidden p-0",V),children:[J&&ie&&m.jsx(Ce.GraphCurrentValue,{point:ie,xMeasureUnit:L,yMeasureUnit:q}),le&&se&&m.jsx(Se.GraphTooltip,{points:le,xMeasureUnit:L,yMeasureUnit:q,series:e,position:se,containerRef:F}),p&&m.jsx(we,{series:e,onUnselect:T}),m.jsx("div",{ref:Z,className:"LightweightChart w-full h-full overflow-hidden"})]})}function we({series:e,onUnselect:V}){return m.jsx("div",{className:"absolute top-0 left-2 z-[10] flex flex-wrap gap-2",children:e.map((p,T)=>{const L=H[T%H.length],q=p.color||L.line,D=p.data.length===0;return m.jsxs("div",{className:ce.cn("flex items-center gap-1.5 px-2 py-1 bg-background/80 backdrop-blur-sm rounded border border-border",D&&"opacity-50"),children:[m.jsx("div",{className:"w-3 h-3 rounded-sm",style:{backgroundColor:q}}),m.jsxs("span",{className:"text-[10px] sm:text-xs font-medium text-foreground",children:[p.label,D&&" (no data)"]}),V&&m.jsx("button",{type:"button",onClick:I=>{I.stopPropagation(),V(p.label)},className:"ml-1 flex items-center justify-center w-4 h-4 rounded-sm hover:bg-muted transition-colors cursor-pointer","aria-label":`Remove ${p.label}`,children:m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-muted-foreground hover:text-foreground","aria-hidden":"true",children:[m.jsx("title",{children:"Close"}),m.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),m.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]},p.label)})})}exports.DEFAULT_SERIES_COLORS=H;exports.Graph=ye;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import { useState as b, useEffect as w, useMemo as E } from "react";
|
|
3
|
-
import { TooltipProvider as j, Tooltip as U, TooltipTrigger as D, TooltipContent as
|
|
3
|
+
import { TooltipProvider as j, Tooltip as U, TooltipTrigger as D, TooltipContent as y } from "../tooltip/tooltip.js";
|
|
4
4
|
import { cn as u } from "../../utils/cn.js";
|
|
5
|
-
const
|
|
5
|
+
const L = 1e3 * 60 * 10;
|
|
6
6
|
function B({
|
|
7
|
-
blockByChain:
|
|
7
|
+
blockByChain: n,
|
|
8
8
|
explorerAddresses: g,
|
|
9
|
-
networkById:
|
|
9
|
+
networkById: v
|
|
10
10
|
}) {
|
|
11
|
-
const [i,
|
|
11
|
+
const [i, h] = b(Date.now());
|
|
12
12
|
w(() => {
|
|
13
13
|
const r = () => {
|
|
14
|
-
|
|
14
|
+
h(Date.now());
|
|
15
15
|
}, e = window.setInterval(r, 1e3);
|
|
16
16
|
return () => {
|
|
17
17
|
clearInterval(e);
|
|
18
18
|
};
|
|
19
19
|
}, []);
|
|
20
20
|
const p = E(() => {
|
|
21
|
-
if (!
|
|
22
|
-
const r = Object.values(
|
|
21
|
+
if (!n) return 0;
|
|
22
|
+
const r = Object.values(n).reduce((e, a) => {
|
|
23
23
|
const o = a.lastSyncBlock.localTimestamp;
|
|
24
24
|
return e === 0 || e !== 0 && o < e ? o : e;
|
|
25
25
|
}, 0);
|
|
26
26
|
return r ? i - r : 0;
|
|
27
|
-
}, [
|
|
27
|
+
}, [n, i]) > L, m = () => /* @__PURE__ */ c("div", { className: "flex h-[30px] items-center gap-1.5", children: [
|
|
28
28
|
/* @__PURE__ */ t(
|
|
29
29
|
"span",
|
|
30
30
|
{
|
|
@@ -44,14 +44,14 @@ function B({
|
|
|
44
44
|
)
|
|
45
45
|
}
|
|
46
46
|
)
|
|
47
|
-
] }),
|
|
48
|
-
if (!
|
|
49
|
-
const r = Object.entries(
|
|
47
|
+
] }), N = () => {
|
|
48
|
+
if (!n) return null;
|
|
49
|
+
const r = Object.entries(n);
|
|
50
50
|
return /* @__PURE__ */ t("div", { className: "flex flex-col text-left text-xs", children: r.map(([e, a], o) => {
|
|
51
|
-
const d = a.lastSyncBlock, l = d?.block || 0n,
|
|
51
|
+
const d = a.lastSyncBlock, l = d?.block || 0n, S = d?.localTimestamp ? i - d.localTimestamp : 0, s = g[Number(e)], f = typeof s == "string" ? s : s && typeof s == "object" && "url" in s ? s.url : void 0, T = v[Number(e)] || "Unknown", x = `[${l.toString()}]`, k = o === r.length - 1;
|
|
52
52
|
return /* @__PURE__ */ c("div", { className: u(!k && "mb-2"), children: [
|
|
53
53
|
/* @__PURE__ */ c("span", { children: [
|
|
54
|
-
|
|
54
|
+
T,
|
|
55
55
|
" "
|
|
56
56
|
] }),
|
|
57
57
|
f && l > 0 ? /* @__PURE__ */ t(
|
|
@@ -66,16 +66,16 @@ function B({
|
|
|
66
66
|
) : /* @__PURE__ */ t("span", { children: x }),
|
|
67
67
|
l > 0 && /* @__PURE__ */ c("span", { children: [
|
|
68
68
|
", updated ",
|
|
69
|
-
(
|
|
69
|
+
(S / 1e3).toFixed(0),
|
|
70
70
|
" seconds ago"
|
|
71
71
|
] })
|
|
72
72
|
] }, e);
|
|
73
73
|
}) });
|
|
74
74
|
};
|
|
75
|
-
return
|
|
76
|
-
/* @__PURE__ */ t(D, { asChild: !0, children: /* @__PURE__ */ t("div", { className: "cursor-
|
|
77
|
-
/* @__PURE__ */ t(
|
|
78
|
-
] }) }) : m();
|
|
75
|
+
return n ? /* @__PURE__ */ t(j, { delayDuration: 200, children: /* @__PURE__ */ c(U, { children: [
|
|
76
|
+
/* @__PURE__ */ t(D, { asChild: !0, children: /* @__PURE__ */ t("div", { className: "cursor-auto select-none", children: m() }) }),
|
|
77
|
+
/* @__PURE__ */ t(y, { side: "top", collisionPadding: 8, children: N() })
|
|
78
|
+
] }) }) : /* @__PURE__ */ t("div", { className: "select-none", children: m() });
|
|
79
79
|
}
|
|
80
80
|
export {
|
|
81
81
|
B as BlockSync
|
|
@@ -1,74 +1,126 @@
|
|
|
1
|
-
import { DateTime as
|
|
2
|
-
import { isBelowDisplayThreshold as
|
|
3
|
-
const { MIN_DISPLAY_THRESHOLD:
|
|
4
|
-
if (
|
|
5
|
-
return
|
|
1
|
+
import { DateTime as d } from "luxon";
|
|
2
|
+
import { isBelowDisplayThreshold as h, FORMAT_CONSTANTS as I, toSignificantDigits as x, formatNumberWithSuffix as T } from "../../utils/format-number.js";
|
|
3
|
+
const { MIN_DISPLAY_THRESHOLD: c, MAX_EXPONENTIAL_THRESHOLD: L } = I, H = (t, e, r = "full") => {
|
|
4
|
+
if (h(t))
|
|
5
|
+
return e ? `<${c}${e}` : `<${c}`;
|
|
6
6
|
if (t === 0)
|
|
7
|
-
return
|
|
8
|
-
const n =
|
|
9
|
-
maxExponentialThreshold:
|
|
7
|
+
return e ? `0${e}` : "0";
|
|
8
|
+
const n = T(t, {
|
|
9
|
+
maxExponentialThreshold: L,
|
|
10
10
|
minimumFractionDigits: 0,
|
|
11
|
-
maximumFractionDigits:
|
|
12
|
-
format:
|
|
13
|
-
adaptiveDecimals:
|
|
11
|
+
maximumFractionDigits: r === "short" ? 1 : 0,
|
|
12
|
+
format: r,
|
|
13
|
+
adaptiveDecimals: r === "short"
|
|
14
14
|
});
|
|
15
|
-
return
|
|
16
|
-
},
|
|
17
|
-
if (
|
|
18
|
-
return
|
|
15
|
+
return e ? `${n}${e}` : n;
|
|
16
|
+
}, R = 2, p = (t, e) => {
|
|
17
|
+
if (h(t))
|
|
18
|
+
return e ? `<${c}${e}` : `<${c}`;
|
|
19
19
|
if (t === 0)
|
|
20
|
-
return
|
|
21
|
-
const
|
|
22
|
-
return
|
|
23
|
-
},
|
|
24
|
-
if (
|
|
25
|
-
return `<${
|
|
20
|
+
return e ? `0${e}` : "0";
|
|
21
|
+
const r = x(t, R);
|
|
22
|
+
return e ? `${r}${e}` : r;
|
|
23
|
+
}, _ = 4, O = (t) => {
|
|
24
|
+
if (h(t))
|
|
25
|
+
return `<${c}`;
|
|
26
26
|
if (t === 0)
|
|
27
27
|
return "0";
|
|
28
|
-
const
|
|
29
|
-
return
|
|
30
|
-
},
|
|
31
|
-
if (
|
|
32
|
-
return
|
|
28
|
+
const e = Math.round(t), r = Math.abs(t - e);
|
|
29
|
+
return r > 0 && r < 0.01 ? t.toFixed(12).replace(/0+$/, "").replace(/\.$/, "") : x(t, _);
|
|
30
|
+
}, G = (t, e) => {
|
|
31
|
+
if (h(t))
|
|
32
|
+
return e ? `<${c} ${e}` : `<${c}`;
|
|
33
33
|
if (t === 0)
|
|
34
|
-
return
|
|
35
|
-
const
|
|
36
|
-
if (
|
|
37
|
-
const
|
|
38
|
-
return
|
|
34
|
+
return e ? `0 ${e}` : "0";
|
|
35
|
+
const r = Number.isInteger(t), n = Math.abs(t), s = r && n >= 1e3, S = Math.round(t), g = Math.abs(t - S);
|
|
36
|
+
if (g > 0 && g < 0.01 && !s) {
|
|
37
|
+
const M = t.toFixed(12).replace(/0+$/, "").replace(/\.$/, "");
|
|
38
|
+
return e ? `${M} ${e}` : M;
|
|
39
39
|
}
|
|
40
|
-
const
|
|
41
|
-
maxExponentialThreshold:
|
|
42
|
-
minimumFractionDigits:
|
|
43
|
-
maximumFractionDigits:
|
|
44
|
-
format:
|
|
45
|
-
adaptiveDecimals:
|
|
40
|
+
const F = T(t, {
|
|
41
|
+
maxExponentialThreshold: L,
|
|
42
|
+
minimumFractionDigits: r ? 0 : 2,
|
|
43
|
+
maximumFractionDigits: s ? 1 : r ? 0 : 2,
|
|
44
|
+
format: s ? "short" : "full",
|
|
45
|
+
adaptiveDecimals: s
|
|
46
46
|
});
|
|
47
|
-
return
|
|
48
|
-
},
|
|
49
|
-
"%":
|
|
50
|
-
$:
|
|
51
|
-
token:
|
|
52
|
-
none:
|
|
53
|
-
},
|
|
47
|
+
return e ? `${F} ${e}` : F;
|
|
48
|
+
}, D = {
|
|
49
|
+
"%": p,
|
|
50
|
+
$: H,
|
|
51
|
+
token: G,
|
|
52
|
+
none: O
|
|
53
|
+
}, k = (t) => D[t] || D.token;
|
|
54
|
+
function w(t, e, r = 8) {
|
|
55
|
+
if (t === 0)
|
|
56
|
+
return e ? `0 ${e}` : "0";
|
|
57
|
+
const n = t.toLocaleString("en-US", {
|
|
58
|
+
minimumFractionDigits: 0,
|
|
59
|
+
maximumFractionDigits: r
|
|
60
|
+
});
|
|
61
|
+
return e ? `${n} ${e}` : n;
|
|
62
|
+
}
|
|
63
|
+
function z(t, e) {
|
|
64
|
+
let r = t.length > 0 ? Math.min(...t) : 0, n = t.length > 0 ? Math.max(...t) : 0, s = [];
|
|
65
|
+
const S = () => {
|
|
66
|
+
const o = n - r, a = (r + n) / 2;
|
|
67
|
+
let i = 1, m = "";
|
|
68
|
+
a >= 1e9 ? (i = 1e9, m = "B") : a >= 1e6 ? (i = 1e6, m = "M") : a >= 1e3 && (i = 1e3, m = "K");
|
|
69
|
+
const f = o / 10 / i;
|
|
70
|
+
let u = 1;
|
|
71
|
+
if (f > 0) {
|
|
72
|
+
const A = Math.floor(Math.log10(f));
|
|
73
|
+
u = Math.max(1, -A), u = Math.min(u, 4);
|
|
74
|
+
}
|
|
75
|
+
return { scale: i, suffix: m, decimals: u };
|
|
76
|
+
}, g = (o, a, i) => a > 1 ? `${(o / a).toLocaleString("en-US", {
|
|
77
|
+
minimumFractionDigits: 0,
|
|
78
|
+
maximumFractionDigits: 4,
|
|
79
|
+
useGrouping: !1
|
|
80
|
+
})}${i}` : o.toLocaleString("en-US", {
|
|
81
|
+
minimumFractionDigits: 0,
|
|
82
|
+
maximumFractionDigits: 4,
|
|
83
|
+
useGrouping: !1
|
|
84
|
+
});
|
|
85
|
+
return { formatter: (o) => {
|
|
86
|
+
if (o === 0) return "0";
|
|
87
|
+
const { scale: a, suffix: i, decimals: m } = S(), $ = Math.abs(o) * 1e-10 || 1e-10;
|
|
88
|
+
return s.some((f) => Math.abs(f - o) < $) ? g(o, a, i) : a > 1 ? `${(o / a).toLocaleString("en-US", {
|
|
89
|
+
minimumFractionDigits: 0,
|
|
90
|
+
maximumFractionDigits: m,
|
|
91
|
+
useGrouping: !1
|
|
92
|
+
})}${i}` : o.toLocaleString("en-US", {
|
|
93
|
+
minimumFractionDigits: 0,
|
|
94
|
+
maximumFractionDigits: m,
|
|
95
|
+
useGrouping: !1
|
|
96
|
+
});
|
|
97
|
+
}, updateVisibleRange: (o) => {
|
|
98
|
+
o.length > 0 && (r = Math.min(...o), n = Math.max(...o));
|
|
99
|
+
}, updateLastValues: (o) => {
|
|
100
|
+
s = [...o];
|
|
101
|
+
} };
|
|
102
|
+
}
|
|
103
|
+
const U = (t) => d.fromSeconds(Number(t)).toFormat("dd/LL/yyyy HH:mm"), X = (t) => d.fromSeconds(Number(t)).toFormat("HH:mm"), C = () => {
|
|
54
104
|
let t = null;
|
|
55
|
-
return (
|
|
56
|
-
const
|
|
57
|
-
return n !== t ? (t = n,
|
|
105
|
+
return (e) => {
|
|
106
|
+
const r = d.fromSeconds(Number(e)), n = r.toFormat("yyyy-MM-dd");
|
|
107
|
+
return n !== t ? (t = n, r.toFormat("dd MMM")) : r.toFormat("HH:mm");
|
|
58
108
|
};
|
|
59
|
-
},
|
|
60
|
-
time:
|
|
61
|
-
"%":
|
|
62
|
-
},
|
|
63
|
-
if (t === "time" &&
|
|
64
|
-
const
|
|
65
|
-
Number(
|
|
109
|
+
}, P = (t, e) => p(Number(t), e), l = {
|
|
110
|
+
time: U,
|
|
111
|
+
"%": P
|
|
112
|
+
}, B = (t, e) => {
|
|
113
|
+
if (t === "time" && e && e.length > 0) {
|
|
114
|
+
const r = d.fromSeconds(Number(e[0].time)), n = d.fromSeconds(
|
|
115
|
+
Number(e[e.length - 1].time)
|
|
66
116
|
);
|
|
67
|
-
return
|
|
117
|
+
return r.hasSame(n, "day") ? X : C();
|
|
68
118
|
}
|
|
69
|
-
return
|
|
119
|
+
return l[t] || l.time;
|
|
70
120
|
};
|
|
71
121
|
export {
|
|
72
|
-
|
|
73
|
-
|
|
122
|
+
z as createAdaptiveYAxisFormatter,
|
|
123
|
+
w as formatExactValue,
|
|
124
|
+
B as getXFormatter,
|
|
125
|
+
k as getYFormatter
|
|
74
126
|
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cn as
|
|
3
|
-
import { getXFormatter as
|
|
4
|
-
function
|
|
5
|
-
point:
|
|
6
|
-
xMeasureUnit:
|
|
7
|
-
yMeasureUnit:
|
|
8
|
-
className:
|
|
1
|
+
import { jsxs as n, jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { cn as x } from "../../utils/cn.js";
|
|
3
|
+
import { getXFormatter as c, formatExactValue as o } from "./formatters.js";
|
|
4
|
+
function h({
|
|
5
|
+
point: e,
|
|
6
|
+
xMeasureUnit: r,
|
|
7
|
+
yMeasureUnit: t,
|
|
8
|
+
className: l
|
|
9
9
|
}) {
|
|
10
|
-
const s =
|
|
11
|
-
return /* @__PURE__ */
|
|
10
|
+
const s = c(r)(e.time, r), a = t !== "%" && t !== "$" && t !== "none" ? t : void 0, d = t === "$" ? `$${o(e.value)}` : t === "%" ? `${o(e.value)}%` : o(e.value, a);
|
|
11
|
+
return /* @__PURE__ */ n(
|
|
12
12
|
"div",
|
|
13
13
|
{
|
|
14
|
-
className:
|
|
14
|
+
className: x(
|
|
15
15
|
"absolute top-2 left-2 right-2 z-[100] pointer-events-none",
|
|
16
|
-
|
|
16
|
+
l
|
|
17
17
|
),
|
|
18
18
|
children: [
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
19
|
+
/* @__PURE__ */ m("div", { className: "text-xl sm:text-2xl font-semibold text-foreground whitespace-nowrap overflow-hidden text-ellipsis", children: d }),
|
|
20
|
+
/* @__PURE__ */ m("div", { className: "text-xs sm:text-sm font-medium text-muted-foreground whitespace-nowrap overflow-hidden text-ellipsis mt-0.5", children: s })
|
|
21
21
|
]
|
|
22
22
|
}
|
|
23
23
|
);
|
|
24
24
|
}
|
|
25
25
|
export {
|
|
26
|
-
|
|
26
|
+
h as GraphCurrentValue
|
|
27
27
|
};
|
|
@@ -1,88 +1,84 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { getXFormatter as
|
|
5
|
-
import { DEFAULT_SERIES_COLORS as
|
|
1
|
+
import { jsx as m, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as S, useState as j, useEffect as k } from "react";
|
|
3
|
+
import { cn as P } from "../../utils/cn.js";
|
|
4
|
+
import { getXFormatter as A, formatExactValue as h } from "./formatters.js";
|
|
5
|
+
import { DEFAULT_SERIES_COLORS as y } from "./graph.js";
|
|
6
6
|
function T({
|
|
7
|
-
points:
|
|
8
|
-
series:
|
|
9
|
-
xMeasureUnit:
|
|
10
|
-
yMeasureUnit:
|
|
11
|
-
className:
|
|
12
|
-
position:
|
|
13
|
-
containerRef:
|
|
7
|
+
points: d,
|
|
8
|
+
series: v,
|
|
9
|
+
xMeasureUnit: x,
|
|
10
|
+
yMeasureUnit: N,
|
|
11
|
+
className: R,
|
|
12
|
+
position: t,
|
|
13
|
+
containerRef: g
|
|
14
14
|
}) {
|
|
15
|
-
const
|
|
15
|
+
const b = S(null), [u, l] = j(t), $ = A(x);
|
|
16
16
|
k(() => {
|
|
17
|
-
if (!
|
|
18
|
-
|
|
17
|
+
if (!t) {
|
|
18
|
+
l(t);
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
22
|
-
if (!
|
|
23
|
-
|
|
21
|
+
const r = g?.current;
|
|
22
|
+
if (!r) {
|
|
23
|
+
l(t);
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
|
-
const
|
|
27
|
-
if (!
|
|
28
|
-
|
|
26
|
+
const c = b.current;
|
|
27
|
+
if (!c) {
|
|
28
|
+
l(t);
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
const
|
|
32
|
-
let
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
const w =
|
|
36
|
-
|
|
37
|
-
}, [
|
|
38
|
-
const
|
|
39
|
-
left: `${
|
|
40
|
-
top: `${
|
|
31
|
+
const o = r.getBoundingClientRect(), i = c.getBoundingClientRect();
|
|
32
|
+
let n = t.x, e = t.y;
|
|
33
|
+
const s = i.width, f = i.height, a = 8;
|
|
34
|
+
n - s / 2 < a ? n = s / 2 + a : n + s / 2 > o.width - a && (n = o.width - s / 2 - a);
|
|
35
|
+
const w = f + 8;
|
|
36
|
+
e - w < a ? e = t.y + 20 : e = t.y - w, l({ x: n, y: e });
|
|
37
|
+
}, [t, g]);
|
|
38
|
+
const C = u ? {
|
|
39
|
+
left: `${u.x}px`,
|
|
40
|
+
top: `${u.y}px`,
|
|
41
41
|
transform: "translate(-50%, 0)"
|
|
42
42
|
// Center horizontally
|
|
43
43
|
} : {};
|
|
44
|
-
if (
|
|
44
|
+
if (d.size === 0)
|
|
45
45
|
return null;
|
|
46
|
-
const
|
|
47
|
-
return /* @__PURE__ */
|
|
46
|
+
const E = Array.from(d.values())[0], F = $(E.time, x);
|
|
47
|
+
return /* @__PURE__ */ m(
|
|
48
48
|
"div",
|
|
49
49
|
{
|
|
50
|
-
ref:
|
|
51
|
-
className:
|
|
50
|
+
ref: b,
|
|
51
|
+
className: P(
|
|
52
52
|
"absolute z-[100] pointer-events-none whitespace-nowrap",
|
|
53
|
-
|
|
53
|
+
R
|
|
54
54
|
),
|
|
55
|
-
style:
|
|
55
|
+
style: C,
|
|
56
56
|
children: /* @__PURE__ */ p("div", { className: "bg-background/90 backdrop-blur-sm rounded border border-border p-1.5 sm:p-2 space-y-1 sm:space-y-1.5", children: [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
if (!
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
s.value,
|
|
64
|
-
r === "none" ? void 0 : r
|
|
65
|
-
);
|
|
66
|
-
return n.endsWith(" none") && (n = n.slice(0, -5)), /* @__PURE__ */ p(
|
|
57
|
+
/* @__PURE__ */ m("div", { className: "text-xs sm:text-sm font-medium text-muted-foreground mb-0.5 sm:mb-1 whitespace-nowrap", children: F }),
|
|
58
|
+
v.map((r, c) => {
|
|
59
|
+
const o = d.get(r.label);
|
|
60
|
+
if (!o) return null;
|
|
61
|
+
const i = y[c % y.length], n = r.color || i.line, e = r.yMeasureUnit || N, s = e !== "%" && e !== "$" && e !== "none" ? e : void 0, f = e === "$" ? `$${h(o.value)}` : e === "%" ? `${h(o.value)}%` : h(o.value, s);
|
|
62
|
+
return /* @__PURE__ */ p(
|
|
67
63
|
"div",
|
|
68
64
|
{
|
|
69
65
|
className: "flex items-center gap-1.5 sm:gap-2 text-xs sm:text-sm whitespace-nowrap",
|
|
70
66
|
children: [
|
|
71
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ m(
|
|
72
68
|
"div",
|
|
73
69
|
{
|
|
74
70
|
className: "w-1.5 h-1.5 sm:w-2 sm:h-2 rounded-full flex-shrink-0",
|
|
75
|
-
style: { backgroundColor:
|
|
71
|
+
style: { backgroundColor: n }
|
|
76
72
|
}
|
|
77
73
|
),
|
|
78
74
|
/* @__PURE__ */ p("span", { className: "text-muted-foreground whitespace-nowrap", children: [
|
|
79
|
-
|
|
75
|
+
r.label,
|
|
80
76
|
":"
|
|
81
77
|
] }),
|
|
82
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ m("span", { className: "font-medium text-foreground whitespace-nowrap", children: f })
|
|
83
79
|
]
|
|
84
80
|
},
|
|
85
|
-
|
|
81
|
+
r.label
|
|
86
82
|
);
|
|
87
83
|
})
|
|
88
84
|
] })
|