@motiadev/plugin-observability 0.13.0-beta.162-415452 → 0.13.0-beta.162-813224
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/hooks/use-get-endtime.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +248 -249
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-get-endtime.d.ts","sourceRoot":"","sources":["../../src/hooks/use-get-endtime.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAExD,eAAO,MAAM,aAAa,GAAI,OAAO,UAAU,GAAG,SAAS,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"use-get-endtime.d.ts","sourceRoot":"","sources":["../../src/hooks/use-get-endtime.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAExD,eAAO,MAAM,aAAa,GAAI,OAAO,UAAU,GAAG,SAAS,GAAG,IAAI,WA0BjE,CAAA"}
|
package/dist/index.cjs
CHANGED
|
@@ -64,7 +64,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
64
64
|
*
|
|
65
65
|
* This source code is licensed under the ISC license.
|
|
66
66
|
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const Qo=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],es=q("plus",Qo),ts=e=>{const t=e?.endTime,[n,r]=w.useState(()=>t||Date.now());return w.useEffect(()=>
|
|
67
|
+
*/const Qo=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],es=q("plus",Qo),ts=e=>{const t=e?.endTime,[n,r]=w.useState(()=>t||Date.now()),o=w.useRef(null);return w.useEffect(()=>(o.current&&(clearInterval(o.current),o.current=null),t?r(t):o.current=setInterval(()=>r(Date.now()),100),()=>{o.current&&(clearInterval(o.current),o.current=null)}),[t]),n},xe=e=>e==null?"N/A":e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:e<36e5?`${(e/6e4).toFixed(1)}min`:`${(e/36e5).toFixed(1)}h`,ns={running:"bg-[repeating-linear-gradient(140deg,#BEFE29,#BEFE29_8px,#ABE625_8px,#ABE625_16px)]",completed:"bg-[repeating-linear-gradient(140deg,#2862FE,#2862FE_8px,#2358E5_8px,#2358E5_16px)]",failed:"bg-[repeating-linear-gradient(140deg,#EA2069,#EA2069_8px,#D41E60_8px,#D41E60_16px)]"},dr=w.memo(({traceId:e,traceName:t,traceStatus:n,traceStartTime:r,traceEndTime:o,groupStartTime:s,groupEndTime:a,onExpand:i})=>{const u=w.useCallback(()=>{i(e)},[i,e]),l=w.useMemo(()=>G.cn("h-[24px] rounded-[4px] hover:opacity-80 transition-all duration-200",ns[n]),[n]),f=w.useMemo(()=>({marginLeft:`${(r-s)/(a-s)*100}%`,width:o?`${(o-r)/(a-s)*100}%`:`${(Date.now()-r)/(a-s)*100}%`}),[r,o,s,a]);return c.jsxs("div",{className:"flex hover:bg-muted-foreground/10 relative cursor-pointer",onClick:u,"data-testid":"trace-timeline-item",children:[c.jsx("div",{className:"flex items-center min-w-[200px] max-w-[200px] h-[32px] max-h-[32px] py-4 px-2 text-sm font-semibold text-foreground truncate sticky left-0 bg-card z-9",children:t}),c.jsx("div",{className:"flex w-full flex-row items-center hover:bg-muted/50 rounded-md",children:c.jsx("div",{className:"relative w-full h-[32px] flex items-center",children:c.jsx("div",{className:l,style:f})})})]})});dr.displayName="TraceItem";/**
|
|
68
68
|
* @license lucide-react v0.545.0 - ISC
|
|
69
69
|
*
|
|
70
70
|
* This source code is licensed under the ISC license.
|