PageSourceSearch

https://app.axiom.co/assets/annotations-DIydWjy5.js

js axiom.co collected 2026-10-02 02:26:36 UTC 12,680 bytes, 3 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/annotations-Byn0K6Nf.js","assets/chunk-CgkbBqyz.js","assets/jsx-runtime-CHCkQh4j.js","assets/react-BlBPBdOl.js"])))=>i.map(i=>d[i]);
2(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`5.638.0-7ddb52834a`}}catch{}})();try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`b4ed7f5e-8244-452b-b156-4e612871dd89`,e._sentryDebugIdIdentifier=`sentry-dbid-b4ed7f5e-8244-452b-b156-4e612871dd89`)})()}catch{}import{o as e}from"./chunk-CgkbBqyz.js";import{t}from"./jsx-runtime-CHCkQh4j.js";import{a as n,i as r,n as i}from"./ensure-session-BtiGHfz9.js";import{n as a}from"./not-found-CX2VF__z.js";import{n as o,t as s}from"./lazyRouteComponent-Bnqzn3_h.js";import{t as c}from"./react-BlBPBdOl.js";import{t as l}from"./preload-helper-B8VGwwrh.js";import{t as u}from"./Link-DVpzuxI1.js";import{t as d}from"./styles-CQz_MWS4.js";import{t as f}from"./safe-zod-validator-DHwI9gf0.js";import{d as p,m,s as h}from"./types-DQPzNyhs.js";import{t as g}from"./select-rFs6DVBl-DeqhmIAV.js";import{i as _}from"./dates-D9u2Q0LP.js";import{t as v}from"./card-DendYKnh.js";import{t as y}from"./tooltip-C8iHj1j4-CWVQgH5W.js";import{x as b}from"./hooks-B-ZGjyMX.js";import{t as x}from"./loading-indicator-DWrMgsF8-gnynXg_B.js";import"./loading-indicator-Dqey1NqP.js";import{t as S}from"./Page-CNGE4lgg.js";import{t as C}from"./PageMain-SY3J_jEX.js";import{t as w}from"./title-Vd3jwO_C.js";import"./select-BZluTYch.js";import{f as T,i as E,u as ee}from"./list.util-Dg7wW9Ja.js";import{t as D}from"./list-D0B7R3fJ.js";import"./tooltip-D-dUJrq9.js";import{t as O}from"./DateRangeDropdown-Cc8qA01G.js";import{t as k}from"./PageHeader-C20atBQU.js";import{t as A}from"./PageLayout-DTXvEMj0.js";import{t as j}from"./check-org-access-i20a9M6m.js";import{t as M}from"./ensure-org-id-Be7tlb6a.js";var N=e(c()),P=t(),F=[0,25,50,75,100],I=.8,L=99.2,R=`Untyped`,z=new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`,hour:`numeric`}),B=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`});function V(e){let t=new Map;for(let n of e){let e=n.type||R,r=t.get(e);r?(n.datasets.forEach(e=>r.datasets.add(e)),r.annotations.push(n)):t.set(e,{datasets:new Set(n.datasets),annotations:[n]})}return[...t.entries()].map(([e,t])=>({type:e,datasets:[...t.datasets].toSorted().join(`, `),annotations:t.annotations})).toSorted((e,t)=>e.type.localeCompare(t.type))}function H(e,t,n){let r=new Date(e).getTime(),i=n-t;if(!Number.isFinite(r)||i<=0)return I;let a=(r-t)/i*100;return Math.min(L,Math.max(I,a))}function U(e,t,n){return new Date(e+(t-e)*n/100)}function W({annotation:e,rangeStart:t,rangeEnd:n}){let r=H(e.time,t,n),i=B.format(new Date(e.time)),a=e.commitSha?.slice(0,7),o=`${e.title}, ${i}`,s=d(`absolute top-1/2 z-10 size-3 -translate-x-1/2 -translate-y-1/2 rotate-45 rounded-[3px] border-2`,`border-(--text-purple) bg-(--text-purple) shadow-sm transition-transform`,`hover:scale-125 focus-visible:scale-125 focus-visible:outline-2 focus-visible:outline-offset-2`);return(0,P.jsx)(y,{label:(0,P.jsxs)(`div`,{className:`flex max-w-64 flex-col gap-1.5`,children:[(0,P.jsx)(`span`,{className:`type-body-sm-semibold`,children:e.title}),e.description?(0,P.jsx)(`span`,{className:`type-body-xs-regular text-muted`,children:e.description}):null,(0,P.jsxs)(`span`,{className:`type-body-xs-regular`,children:[i,a?` · ${a}`:``]})]}),children:e.url?(0,P.jsx)(u,{external:!0,noBlue:!0,noUnderline:!0,href:e.url,"aria-label":`${o}. Open annotation`,className:s,style:{left:`${r}%`}}):(0,P.jsx)(`span`,{role:`img`,"aria-label":o,className:s,style:{left:`${r}%`}})})}function G({annotations:e,rangeStart:t,rangeEnd:n}){let r=V(e),i=new Date(t).getTime(),a=new Date(n).getTime();return(0,P.jsx)(v,{className:`w-full`,"aria-labelledby":`annotation-timeline-heading`,children:(0,P.jsxs)(`section`,{className:`min-w-0`,children:[(0,P.jsxs)(`div`,{className:`flex flex-col gap-1 border-b border-faint pb-4`,children:[(0,P.jsx)(`h2`,{id:`annotation-timeline-heading`,className:`type-body-lg-semibold`,children:`Annotation timeline`}),(0,P.jsxs)(`p`,{className:`type-body-sm-regular text-muted`,children:[e.length,` `,e.length===1?`annotation`:`annotations`,` across `,r.length,` `,r.length===1?`type`:`types`]})]}),r.length>0?(0,P.jsx)(`div`,{className:`overflow-x-auto pb-2`,children:(0,P.jsxs)(`div`,{className:`min-w-3xl`,children:[(0,P.jsxs)(`div`,{className:`grid h-12 grid-cols-[9rem_minmax(36rem,1fr)] type-body-xs-regular text-placeholder sm:grid-cols-[13rem_minmax(36rem,1fr)]`,children:[(0,P.jsx)(`div`,{className:`sticky left-0 z-20 bg-elevated`}),(0,P.jsx)(`div`,{className:`relative border-l border-faint`,children:F.map(e=>(0,P.jsx)(`span`,{className:d(`absolute bottom-2 whitespace-nowrap`,e===0?`translate-x-2`:e===100?`-translate-x-full`:`-translate-x-1/2`),style:{left:`${e}%`},children:z.format(U(i,a,e))},e))})]}),r.map(e=>(0,P.jsxs)(`div`,{className:`grid min-h-14 grid-cols-[9rem_minmax(36rem,1fr)] border-t border-faint sm:grid-cols-[13rem_minmax(36rem,1fr)]`,children:[(0,P.jsxs)(`div`,{className:`sticky left-0 z-20 flex min-w-0 flex-col justify-center gap-0.5 bg-elevated pr-5`,children:[(0,P.jsx)(`span`,{className:`truncate type-body-sm-medium`,title:e.type,children:e.type}),(0,P.jsx)(`span`,{className:`type-mono-xs-regular truncate text-placeholder`,title:e.datasets,children:e.datasets})]}),(0,P.jsxs)(`div`,{className:`relative border-l border-faint`,children:[(0,P.jsx)(`span`,{className:`absolute top-1/2 right-0 left-0 h-px -translate-y-1/2 bg-(--border-faint)`}),F.map(e=>(0,P.jsx)(`span`,{"aria-hidden":`true`,className:`absolute top-0 h-full w-px bg-(--border-faint)`,style:{left:`${e}%`}},e)),e.annotations.map(e=>(0,P.jsx)(W,{annotation:e,rangeStart:i,rangeEnd:a},e.id))]})]},e.type))]})}):(0,P.jsx)(`div`,{className:`flex min-h-32 items-center justify-center text-center type-body-sm-regular text-muted`,children:`No annotations in this time range.`}),(0,P.jsxs)(`div`,{className:`flex items-center gap-2 border-t border-faint pt-4 type-body-xs-regular text-muted`,children:[(0,P.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 rotate-45 rounded-[2px] bg-(--text-purple)`}),(0,P.jsx)(`span`,{children:`Open a marker to view the annotation`})]})]})})}var K=`__all_types__`,q=20,J=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`});function Y(e){return J.format(new Date(e))}var X=E();function Z({annotations:e}){let{table:t,rows:n,containerRef:r,columnSizeVars:i}=ee({data:(0,N.useMemo)(()=>[...e],[e]),columns:(0,N.useMemo)(()=>[X.custom({accessorKey:`title`,header:`Annotation`,minSize:260,meta:{widthStrategy:`fillRemainingWidth`},cell:({row:e})=>(0,P.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1 py-1 type-body-sm-regular`,children:[e.original.url?(0,P.jsx)(u,{external:!0,href:e.original.url,className:`w-fit max-w-full truncate`,children:e.original.title}):(0,P.jsx)(`span`,{className:`truncate`,title:e.original.title,children:e.original.title}),e.original.description?(0,P.jsx)(`span`,{className:`line-clamp-2 text-placeholder`,title:e.original.description,children:e.original.description}):null]})}),X.custom({accessorKey:`type`,header:`Type`,size:180,cell:({row:e})=>e.original.type?(0,P.jsx)(`span`,{className:`block truncate`,title:e.original.type,children:e.original.type}):(0,P.jsx)(D.Cell.Empty,{placeholder:`—`})}),X.custom({accessorKey:`datasets`,header:`Datasets`,size:240,cell:({row:e})=>{let t=e.original.datasets.join(`, `);return t?(0,P.jsx)(`span`,{className:`block truncate`,title:t,children:t}):(0,P.jsx)(D.Cell.Empty,{placeholder:`—`})}}),X.custom({accessorKey:`repository`,header:`Repository`,size:160,cell:({row:e})=>e.original.repository?(0,P.jsx)(`span`,{className:`block truncate`,title:e.original.repository,children:e.original.repository}):(0,P.jsx)(D.Cell.Empty,{placeholder:`—`})}),X.custom({accessorKey:`commitSha`,header:`Commit`,size:92,cell:({row:e})=>{let t=e.original.commitSha?.slice(0,7);return t&&e.original.url?(0,P.jsx)(u,{external:!0,href:e.original.url,className:`font-mono`,children:t}):(0,P.jsx)(D.Cell.Empty,{placeholder:`—`})}}),X.custom({accessorKey:`time`,header:`Time`,size:180,cell:({row:e})=>(0,P.jsx)(`span`,{className:`text-placeholder`,children:Y(e.original.time)})})],[]),enableGlobalFilter:!1});return(0,P.jsxs)(D,{ref:r,style:i,className:`h-96 min-w-0 rounded border border-faint bg-base`,children:[(0,P.jsx)(D.Header,{children:t.getHeaderGroups().map(e=>(0,P.jsx)(D.Row,{children:e.headers.map(e=>(0,P.jsx)(D.Cell,{header:e,children:T(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),n.length>0?(0,P.jsx)(D.Body,{data:n,itemContent:(e,t)=>
2(0,P.jsx)(D.Row,{children:t.getVisibleCells().map(e=>(0,P.jsx)(D.Cell,{cell:e,children:T(e.column.columnDef.cell,e.getContext())},e.id))},t.original.id)}):(0,P.jsx)(D.EmptyState,{children:(0,P.jsxs)(`div`,{className:`flex flex-col items-center gap-2 text-center`,children:[(0,P.jsx)(`p`,{className:`type-body-md-medium`,children:`No annotations found`}),(0,P.jsx)(`p`,{className:`type-body-sm-regular text-muted`,children:`Try another type or time range.`})]})})]})}function Q({types:e,value:t,onChange:n}){let r=t??K;return(0,P.jsx)(g,{size:`small`,"aria-label":`Filter by annotation type`,items:[K,...e],getLabelFromItem:e=>e===K?`All types`:e,getValueFromItem:e=>e,value:r,onValueChange:e=>n(e===K||e===null?void 0:e)})}function te({result:e,type:t,quickRange:n,timestampStart:r,timestampEnd:i,onTypeChange:a,onQuickRangeChange:o,onDateRangeChange:s}){let c=(0,N.useMemo)(()=>[...new Set(e.annotations.flatMap(e=>e.type?[e.type]:[]))].toSorted(),[e.annotations]),l=(0,N.useMemo)(()=>t?e.annotations.filter(e=>e.type===t):e.annotations,[e.annotations,t]),u=l.slice(0,q);return(0,P.jsx)(S,{children:(0,P.jsx)(A,{header:(0,P.jsx)(k,{breadcrumbs:[{id:`annotations`,name:`Annotations`,to:`.`}],actions:(0,P.jsxs)(N.Fragment,{children:[(0,P.jsx)(Q,{types:c,value:t,onChange:a}),(0,P.jsx)(O,{dropdownKey:`annotationsDateRange`,quickRange:n,timestampStart:r,timestampEnd:i,side:`bottom`,onQuickRangeChanged:o,onDateRangeChanged:s,triggerButtonProps:{type:`axi-secondary`}})]})}),main:(0,P.jsx)(C,{overflow:!0,padding:!0,className:`h-full pt-4`,children:(0,P.jsxs)(`section`,{className:`mx-auto flex w-full max-w-360 flex-col gap-6`,"aria-labelledby":`annotations-heading`,children:[(0,P.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,P.jsx)(`h1`,{id:`annotations-heading`,className:`type-body-lg-semibold`,children:`Annotations`}),(0,P.jsx)(`p`,{className:`type-body-md-regular text-muted`,children:`View annotation activity across your organization.`})]}),(0,P.jsx)(G,{annotations:l,rangeStart:e.rangeStart,rangeEnd:e.rangeEnd}),(0,P.jsxs)(`section`,{className:`flex flex-col gap-4`,"aria-labelledby":`recent-annotations-heading`,children:[(0,P.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,P.jsx)(`h2`,{id:`recent-annotations-heading`,className:`type-body-lg-semibold`,children:`Recent annotations`}),(0,P.jsx)(`p`,{className:`type-body-sm-regular text-muted`,children:`The 20 most recent annotations in the selected time range.`})]}),(0,P.jsx)(Z,{annotations:u})]})]})})})})}function ne(){return(0,P.jsx)(S,{children:(0,P.jsx)(A,{header:(0,P.jsx)(k,{breadcrumbs:[{id:`annotations`,name:`Annotations`,to:`.`}]}),main:(0,P.jsx)(C,{className:`h-full`,children:(0,P.jsx)(`div`,{className:`flex h-full w-full items-center justify-center`,children:(0,P.jsxs)(`div`,{className:`flex items-center gap-3 text-muted`,role:`status`,"aria-live":`polite`,children:[(0,P.jsx)(x,{accessibility:`decorative`,size:`large`}),(0,P.jsx)(`span`,{className:`type-body-sm-medium`,children:`Loading annotations`})]})})})})})}var $=_,re=r({method:`GET`}).middleware([M,i,j]).handler(n(`3f6513bab7e2a589cdd8b58d44930dee5d602e8e44474036f998bb6178061bf5`)),ie=o(`/_authed/_org/$orgId/annotations`)({validateSearch:f(p({type:m().optional(),quickRange:h($).optional(),timestampStart:m().optional(),timestampEnd:m().optional()})),loaderDeps:({search:{quickRange:e,timestampStart:t,timestampEnd:n}})=>({quickRange:t||n?void 0:e??`1d`,timestampStart:t,timestampEnd:n}),loader:async({params:{orgId:e},deps:t})=>{if(!b(e))throw a();return re({data:t})},head:()=>({meta:[{title:w(`Annotations`)}]}),pendingMs:0,pendingComponent:ne,component:s(()=>l(()=>import(`./annotations-Byn0K6Nf.js`),__vite__mapDeps([0,1,2,3])),`component`)});export{$ as n,te as r,ie as t};
3//# sourceMappingURL=annotations-DIydWjy5.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.