@canonry/canonry 4.146.0 → 4.147.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.
- package/assets/assets/{AuditHistoryPanel-IDsSUFI3.js → AuditHistoryPanel-BbEZ_0W9.js} +1 -1
- package/assets/assets/{BacklinksPage-BswN-pyj.js → BacklinksPage-B72RKxC-.js} +1 -1
- package/assets/assets/{ChartPrimitives-CIe-R58_.js → ChartPrimitives-Cf-jQ3c8.js} +1 -1
- package/assets/assets/{HistoryPage-B18Jpq8c.js → HistoryPage-C2U1kxKw.js} +1 -1
- package/assets/assets/MeasurementPropertyPage-ltcSZ0tw.js +1 -0
- package/assets/assets/ProjectPage-ZcGjsDlb.js +12 -0
- package/assets/assets/{RunRow-3ZwTR4Bv.js → RunRow-DxO-zxCm.js} +1 -1
- package/assets/assets/{RunsPage-BCAJulR1.js → RunsPage-B1ON2nQC.js} +1 -1
- package/assets/assets/{SettingsPage-BT2_l0Do.js → SettingsPage-Cp0bHFHk.js} +1 -1
- package/assets/assets/{TrafficPage-Cux8rj5G.js → TrafficPage-QzitDjhV.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-DI1Ad8KS.js → TrafficSourceDetailPage-BjfFyG2y.js} +1 -1
- package/assets/assets/{arrow-left-BMSx9HQB.js → arrow-left-DJ8ZwUlj.js} +1 -1
- package/assets/assets/extract-error-message-CX8ZNJ8S.js +1 -0
- package/assets/assets/{index-C6E5hp28.css → index-D5NO3NEG.css} +1 -1
- package/assets/assets/index-DF8X6nM0.js +213 -0
- package/assets/assets/{trash-2-CyoJtRAr.js → trash-2-UHAxuTT7.js} +1 -1
- package/assets/assets/{v2-overview-adapter-owDeFdUc.js → v2-overview-adapter-BHmxTmCf.js} +1 -1
- package/assets/index.html +2 -2
- package/dist/{chunk-UQOTEIA6.js → chunk-2NTWZHNF.js} +712 -330
- package/dist/{chunk-B5H55ZMA.js → chunk-BVOU4UJM.js} +3687 -3025
- package/dist/{chunk-Z7B6BRPP.js → chunk-GNKVF6TZ.js} +7 -4
- package/dist/{chunk-ED7C5TWT.js → chunk-ZRUNFIGA.js} +3818 -1439
- package/dist/cli.js +419 -15
- package/dist/index.js +4 -4
- package/dist/{intelligence-service-M5UNHF7X.js → intelligence-service-2E5YAXI3.js} +2 -2
- package/dist/mcp.js +5 -5
- package/package.json +12 -11
- package/assets/assets/MeasurementPropertyPage-CvmQeoo7.js +0 -1
- package/assets/assets/ProjectPage-BE1MUAB5.js +0 -11
- package/assets/assets/extract-error-message-B-9FdQh8.js +0 -1
- package/assets/assets/index-kOXUzdqD.js +0 -213
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonry/canonry",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.147.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Agent-first open-source AEO operating platform - track how answer engines cite your domain",
|
|
6
6
|
"license": "FSL-1.1-ALv2",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@ainyc/aeo-audit": "4.0.1",
|
|
43
43
|
"@anthropic-ai/sdk": "^0.91.1",
|
|
44
|
+
"@fastify/rate-limit": "^11.2.0",
|
|
44
45
|
"@fastify/static": "^9.1.1",
|
|
45
46
|
"@google/genai": "^1.46.0",
|
|
46
47
|
"@mariozechner/pi-agent-core": "0.67.6",
|
|
@@ -66,26 +67,26 @@
|
|
|
66
67
|
"tsup": "^8.5.1",
|
|
67
68
|
"tsx": "^4.19.0",
|
|
68
69
|
"@ainyc/canonry-api-client": "0.0.0",
|
|
69
|
-
"@ainyc/canonry-
|
|
70
|
+
"@ainyc/canonry-config": "0.0.0",
|
|
70
71
|
"@ainyc/canonry-contracts": "0.0.0",
|
|
71
72
|
"@ainyc/canonry-db": "0.0.0",
|
|
72
|
-
"@ainyc/canonry-
|
|
73
|
+
"@ainyc/canonry-api-routes": "0.0.0",
|
|
73
74
|
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
74
75
|
"@ainyc/canonry-integration-openai-ads": "0.0.0",
|
|
75
76
|
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
76
|
-
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
77
|
-
"@ainyc/canonry-integration-google-business-profile": "0.0.0",
|
|
78
77
|
"@ainyc/canonry-integration-google": "0.0.0",
|
|
79
|
-
"@ainyc/canonry-integration-
|
|
80
|
-
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
78
|
+
"@ainyc/canonry-integration-google-business-profile": "0.0.0",
|
|
81
79
|
"@ainyc/canonry-integration-google-places": "0.0.0",
|
|
80
|
+
"@ainyc/canonry-integration-traffic": "0.0.0",
|
|
82
81
|
"@ainyc/canonry-intelligence": "0.0.0",
|
|
83
|
-
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
84
|
-
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
85
82
|
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
83
|
+
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
84
|
+
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
85
|
+
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
86
86
|
"@ainyc/canonry-provider-local": "0.0.0",
|
|
87
|
-
"@ainyc/canonry-
|
|
88
|
-
"@ainyc/canonry-provider-perplexity": "0.0.0"
|
|
87
|
+
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
88
|
+
"@ainyc/canonry-provider-perplexity": "0.0.0",
|
|
89
|
+
"@ainyc/canonry-provider-openai": "0.0.0"
|
|
89
90
|
},
|
|
90
91
|
"scripts": {
|
|
91
92
|
"build": "tsx scripts/copy-agent-assets.ts && tsup && tsx build-web.ts",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as J,r as P,u as A,D as X,j as e,L as B}from"./vendor-tanstack-BjS7iY3g.js";import{bH as Y,bO as ee,c_ as se,bU as te,bI as ae,B as v,T as E,I as C,c$ as ne,m as U}from"./index-kOXUzdqD.js";import{m as re}from"./v2-overview-adapter-owDeFdUc.js";import{A as ie}from"./arrow-left-BMSx9HQB.js";import"./vendor-radix-DnzzbllM.js";import"./vendor-recharts-33ACLxsD.js";import"./vendor-markdown-CpDJch4G.js";const _=50,o={branded:{headline:"When they know your name",technical:"Branded questions"},"non-brand":{headline:"When they don't",technical:"Non-brand questions"}},oe={plan_v1:"Setup update required",no_completed_run:"No completed measurement yet",no_population:"No questions of this type are assigned",evidence_incomplete:"Source evidence is incomplete",not_applicable:"Not applicable for this Property"},Q={complete:{label:"Measured",tone:"positive"},partial:{label:"Partly measured",tone:"caution"},running:{label:"Measuring now",tone:"neutral"},queued:{label:"Measurement queued",tone:"neutral"},failed:{label:"Measurement failed",tone:"negative"},not_measured:{label:"Not measured",tone:"neutral"}},$={assigned:{label:"Matches this Property",tone:"positive"},sibling:{label:"Matches another Property",tone:"caution"},ownedUnmapped:{label:"Site URL not in a Property",tone:"caution"},external:{label:"External URL",tone:"neutral"},ambiguous:{label:"Matches multiple Properties",tone:"caution"},invalid:{label:"Invalid URL",tone:"negative"}};function F(s){return oe[s.reason]??"Not measured"}function L({metric:s,emphasis:n=!1}){if(s.state==="unavailable")return e.jsxs("span",{className:"inline-flex flex-col gap-0.5",children:[e.jsx("span",{className:n?"text-lg font-semibold text-secondary":"text-sm font-medium text-secondary",children:"Not measured"}),e.jsx("span",{className:"text-sm text-secondary",children:F(s)})]});const a=`${Math.round(s.value*100)}%`,d=s.numerator===void 0||s.denominator===void 0?null:`${s.numerator} of ${s.denominator}`;return e.jsxs("span",{className:"inline-flex flex-col gap-0.5 tabular-nums",children:[e.jsx("span",{className:n?"text-lg font-semibold text-heading":"text-sm font-medium text-primary",children:a}),d?e.jsx("span",{className:"text-xs text-muted",children:d}):null]})}function V(s,n,a){return ne({client:U,path:{name:s},query:{scope:"property",targetKey:n,queryClass:a}})}function O(s){return s?.properties.items.at(0)}function le({branded:s,nonBrand:n,brandedError:a,nonBrandError:d,onRetry:l}){const c=[{queryClass:"branded",row:s,isError:a},{queryClass:"non-brand",row:n,isError:d}];return e.jsxs("section",{"aria-labelledby":"property-brand-contrast",children:[e.jsx("div",{className:"section-head section-head-inline",children:e.jsxs("div",{children:[e.jsx("p",{className:"eyebrow eyebrow-soft",children:"The gap"}),e.jsxs("h2",{id:"property-brand-contrast",className:"text-base font-semibold text-heading",children:["Named versus not named",e.jsx(C,{text:"Branded questions already contain your name, so an answer engine has an easy path back to you. Non-brand questions describe the need instead, and that is the demand you have to earn. Each row is measured only over the questions assigned to this Property in that class; a class with no assigned question reads Not measured rather than 0%."})]})]})}),e.jsx("div",{className:"overflow-x-auto rounded-md border border-default",children:e.jsxs("table",{className:"evidence-table min-w-[560px]",children:[e.jsx("caption",{className:"sr-only",children:"Mention and citation coverage for this Property, split by question class"}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Question type"}),e.jsx("th",{children:"Mentioned in the answer"}),e.jsx("th",{children:"Cited as a source"})]})}),e.jsx("tbody",{children:c.map(({queryClass:r,row:x,isError:h})=>e.jsxs("tr",{children:[e.jsxs("td",{children:[e.jsx("span",{className:"block font-medium text-heading",children:o[r].headline}),e.jsx("span",{className:"mt-0.5 block text-xs text-muted",children:o[r].technical}),x&&h?e.jsxs("span",{className:"mt-2 flex flex-wrap items-center gap-2 text-sm text-caution",children:[e.jsx("span",{role:"status",children:"Refresh failed."}),e.jsxs(v,{type:"button",size:"sm",variant:"ghost",className:"h-11 px-3 text-sm md:h-11",onClick:()=>l(r),children:["Retry ",o[r].technical.toLocaleLowerCase()]})]}):null]}),x?e.jsxs(e.Fragment,{children:[e.jsx("td",{children:e.jsx(L,{metric:x.mentionCoverage,emphasis:!0})}),e.jsx("td",{children:e.jsx(L,{metric:x.citationCoverage,emphasis:!0})})]}):h?e.jsx("td",{colSpan:2,children:e.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm text-secondary",children:[e.jsxs("span",{role:"alert",children:["Could not load ",o[r].technical.toLocaleLowerCase(),"."]}),e.jsxs(v,{type:"button",size:"sm",variant:"outline",className:"h-11 px-4 text-sm md:h-11",onClick:()=>l(r),children:["Retry ",o[r].technical.toLocaleLowerCase()]})]})}):e.jsxs(e.Fragment,{children:[e.jsx("td",{children:e.jsx("span",{className:"text-sm text-secondary",children:"Loading…"})}),e.jsx("td",{children:e.jsx("span",{className:"text-sm text-secondary",children:"Loading…"})})]})]},r))})]})})]})}function de({row:s,queryClass:n,isError:a}){return e.jsxs("section",{"aria-labelledby":"property-providers",className:"page-section-divider",children:[e.jsx("div",{className:"section-head section-head-inline",children:e.jsxs("div",{children:[e.jsx("p",{className:"eyebrow eyebrow-soft",children:"By answer engine"}),e.jsxs("h2",{id:"property-providers",className:"text-base font-semibold text-heading",children:["Which engines answer for this Property",e.jsx(C,{text:"Each row is measured over the questions that engine actually answered for this Property, so the rows are a split of the same population rather than parts that add up to the Property total. An engine that answered nothing for this Property is absent instead of shown at 0%."})]})]})}),s===void 0&&a?e.jsxs("p",{className:"text-sm text-secondary",children:["Details for ",o[n].technical.toLocaleLowerCase()," are unavailable. Retry that question type above."]}):s===void 0?e.jsx("p",{className:"text-sm text-secondary",children:"Loading…"}):s.providers.length===0?e.jsxs("p",{className:"text-sm text-secondary",children:["No answer engine has measured ",o[n].technical.toLocaleLowerCase()," for this Property.",s.mentionCoverage.state==="unavailable"?` ${F(s.mentionCoverage)}.`:""]}):e.jsx("div",{className:"overflow-x-auto rounded-md border border-default",children:e.jsxs("table",{className:"evidence-table min-w-[520px]",children:[e.jsx("caption",{className:"sr-only",children:"Per-engine mention and citation coverage"}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Engine"}),e.jsx("th",{children:"Mentioned"}),e.jsx("th",{children:"Cited"})]})}),e.jsx("tbody",{children:s.providers.map(d=>e.jsxs("tr",{children:[e.jsx("td",{className:"font-medium text-heading",children:d.provider}),e.jsx("td",{children:e.jsx(L,{metric:d.mentionCoverage})}),e.jsx("td",{children:e.jsx(L,{metric:d.citationCoverage})})]},d.provider))})]})})]})}function ce({questions:s,queryClass:n}){return e.jsxs("section",{"aria-labelledby":"property-questions",className:"page-section-divider",children:[e.jsxs("div",{className:"section-head section-head-inline",children:[e.jsxs("div",{children:[e.jsx("p",{className:"eyebrow eyebrow-soft",children:"Questions"}),e.jsxs("h2",{id:"property-questions",className:"text-base font-semibold text-heading",children:[o[n].technical," assigned to this Property"]})]}),e.jsxs("p",{className:"supporting-copy",children:[s.length," assigned"]})]}),s.length===0?e.jsxs("p",{className:"text-sm text-secondary",children:["No ",o[n].technical.toLocaleLowerCase()," are assigned. Add one in advanced measurement setup to measure this class."]}):e.jsx("div",{className:"overflow-x-auto rounded-md border border-default",children:e.jsxs("table",{className:"evidence-table min-w-[420px]",children:[e.jsx("caption",{className:"sr-only",children:"Questions assigned to this Property"}),e.jsx("thead",{children:e.jsx("tr",{children:e.jsx("th",{children:"Question"})})}),e.jsx("tbody",{children:s.map(a=>e.jsx("tr",{children:e.jsx("td",{className:"text-secondary",children:a})},a))})]})})]})}function he({urls:s}){return e.jsxs("section",{"aria-labelledby":"property-urls",className:"page-section-divider",children:[e.jsxs("div",{className:"section-head section-head-inline",children:[e.jsxs("div",{children:[e.jsx("p",{className:"eyebrow eyebrow-soft",children:"Pages"}),e.jsxs("h2",{id:"property-urls",className:"text-base font-semibold text-heading",children:["URLs that count as this Property",e.jsx(C,{text:"A cited source URL is credited to this Property when it matches one of these. The most specific matcher wins, so a URL covered by two Properties at the same specificity is flagged for review instead of being credited to either."})]})]}),e.jsxs("p",{className:"supporting-copy",children:[s.length," configured"]})]}),s.length===0?e.jsx("p",{className:"text-sm text-secondary",children:"No URLs are configured for this Property."}):e.jsx("div",{className:"overflow-x-auto rounded-md border border-default",children:e.jsxs("table",{className:"evidence-table min-w-[420px]",children:[e.jsx("caption",{className:"sr-only",children:"URL matchers configured for this Property"}),e.jsx("thead",{children:e.jsx("tr",{children:e.jsx("th",{children:"URL"})})}),e.jsx("tbody",{children:s.map(n=>e.jsx("tr",{children:e.jsx("td",{className:"break-all text-secondary",children:n})},n))})]})})]})}function ge(){const{projectName:s,targetKey:n}=J({strict:!1}),[a,d]=P.useState("non-brand"),l=s??"",c=n??"",r=!!l&&!!c,{canWrite:x}=Y(),h=A({...ee({client:U,path:{name:l}}),enabled:r}),p=A({...V(l,c,"branded"),enabled:r}),u=A({...V(l,c,"non-brand"),enabled:r}),S=O(p.data),k=O(u.data),j=a==="branded"?p.data:u.data,g=a==="branded"?S:k,q=(a==="branded"?p.isError:u.isError)&&g===void 0,I=j?.measurement.displayedRunId,f={client:U,path:{name:l},query:{targetKey:c,queryClass:a,limit:_,...I?{runId:I}:{}}},i=X({...se(f),enabled:r&&j!==void 0,initialPageParam:f,getNextPageParam:t=>t.evidence.nextCursor?{path:f.path,query:{...f.query,cursor:t.evidence.nextCursor}}:void 0}),R=h.data?.active??null,y=R?.plan.schemaVersion===2?R.plan:null,z=R!==null&&y===null,N=y?.targets.find(t=>t.stableKey===c)??null,D=P.useMemo(()=>{if(!y)return[];const t=new Map(y.querySnapshots.map(m=>[m.queryId,m.queryText]));return[...new Set(y.assignments.filter(m=>m.targetKey===c&&m.queryClass===a).flatMap(m=>{const w=t.get(m.queryId);return w===void 0?[]:[w]}))].sort((m,w)=>m.localeCompare(w))},[y,c,a]),K=P.useMemo(()=>N?.urlMatchers.map(re)??[],[N]),b=P.useMemo(()=>(i.data?.pages??[]).flatMap(t=>t.evidence.items),[i.data]),T=i.data?.pages[0]?.evidence.totalEstimate??b.length,W=i.data?.pages[0]?.measurement.state,M=e.jsxs(B,{to:"/projects/$projectName",params:{projectName:l},className:"inline-flex items-center gap-1 text-xs text-muted hover:text-strong",children:[e.jsx(ie,{className:"size-3.5","aria-hidden":"true"}),"Back to measurement overview"]});if(!r)return e.jsx("div",{className:"page-container",children:e.jsx("p",{className:"text-sm text-muted",children:"Missing project name or Property key in URL."})});if(!te("portfolio",ae()?.projectTabs))return e.jsx("div",{className:"page-container",children:e.jsx("p",{className:"text-sm text-muted",children:"This view is not available here."})});if(h.isPending&&!h.isError)return e.jsx("div",{className:"page-container",children:e.jsxs("div",{role:"status","aria-live":"polite",children:[e.jsx("span",{className:"sr-only",children:"Loading Property"}),e.jsx("div",{className:"h-32 animate-pulse rounded-md bg-surface-subtle","aria-hidden":"true"})]})});const G=h.isError&&h.data===void 0,H=p.isError&&p.data===void 0,Z=u.isError&&u.data===void 0;return G||H&&Z?e.jsxs("div",{className:"page-container space-y-3",children:[M,e.jsx("p",{role:"alert",className:"text-sm text-negative",children:"Could not load this Property."}),e.jsx(v,{type:"button",size:"sm",variant:"outline",className:"h-11 px-4 text-sm md:h-11",onClick:()=>{h.refetch(),p.refetch(),u.refetch()},children:"Try again"})]}):!y||!N?e.jsxs("div",{className:"page-container space-y-3",children:[M,e.jsx("p",{role:"status",className:"text-sm text-secondary",children:y?"This Property is not in the published setup. It may have been renamed or removed.":"A Property page needs a published advanced measurement setup. Republish setup from the project Portfolio tab."}),e.jsx(v,{asChild:!0,type:"button",variant:"outline",className:"h-11 px-4 text-sm md:h-11",children:e.jsx(B,{to:"/projects/$projectName/portfolio",params:{projectName:l},children:x?z?"Republish setup":"Open measurement setup":"View measurement setup"})})]}):e.jsxs("div",{className:"page-container space-y-8",children:[e.jsxs("div",{className:"page-header",children:[e.jsxs("div",{className:"page-header-left",children:[M,e.jsx("h1",{className:"page-title mt-2",children:N.label}),e.jsxs("p",{className:"page-subtitle",children:["Property in ",l]})]}),e.jsxs("div",{className:"page-header-right",children:[j?e.jsx(E,{tone:Q[j.measurement.state].tone,children:Q[j.measurement.state].label}):null,g&&g.flags>0?e.jsxs(E,{tone:"caution",children:[g.flags," flagged"]}):null]})]}),e.jsx(le,{branded:S,nonBrand:k,brandedError:p.isError,nonBrandError:u.isError,onRetry:t=>{t==="branded"?p.refetch():u.refetch()}}),j&&(j.measurement.state==="not_measured"||j.nextAction.kind==="run_measurement")?e.jsxs("section",{className:"flex flex-wrap items-center justify-between gap-3 border-y border-default py-4","aria-label":"Measurement next step",children:[e.jsx("p",{className:"text-sm text-secondary",children:x?"Run a measurement from the project overview to collect this Property’s coverage and source evidence.":"This Property needs a new measurement before coverage and source evidence are available."}),e.jsx(v,{asChild:!0,type:"button",className:"h-11 px-4 text-sm md:h-11",children:e.jsx(B,{to:"/projects/$projectName",params:{projectName:l},children:x?"Go to measurement overview":"View measurement overview"})})]}):null,e.jsxs("div",{className:"flex flex-wrap items-end gap-4 border-y border-default py-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{htmlFor:"property-query-class",className:"block text-sm font-medium text-heading",children:"Question type"}),e.jsxs("select",{id:"property-query-class",value:a,onChange:t=>d(t.target.value==="branded"?"branded":"non-brand"),className:"h-11 rounded-md border border-default bg-surface px-3 text-sm text-primary focus:outline-none focus:ring-2 focus:ring-mono-400",children:[e.jsx("option",{value:"non-brand",children:o["non-brand"].technical}),e.jsx("option",{value:"branded",children:o.branded.technical})]})]}),e.jsxs("p",{className:"supporting-copy",children:["Everything below is measured over ",o[a].technical.toLocaleLowerCase()," only."]})]}),e.jsx(de,{row:g,queryClass:a,isError:q}),e.jsx(ce,{questions:D,queryClass:a}),e.jsx(he,{urls:K}),e.jsxs("section",{"aria-labelledby":"property-evidence",className:"page-section-divider",children:[e.jsxs("div",{className:"section-head section-head-inline",children:[e.jsxs("div",{children:[e.jsx("p",{className:"eyebrow eyebrow-soft",children:"Evidence"}),e.jsxs("h2",{id:"property-evidence",className:"text-base font-semibold text-heading",children:["Source URLs the engines used",e.jsx(C,{text:"Every source URL an answer engine returned for the questions assigned to this Property in the displayed measurement. A row matching this Property is what a citation is counted from; the other classifications are shown so a miss can be explained rather than guessed at."})]})]}),b.length>0?e.jsxs("p",{className:"supporting-copy",children:[b.length," of ",T]}):null]}),q?e.jsxs("p",{className:"text-sm text-secondary",children:["Evidence for ",o[a].technical.toLocaleLowerCase()," is unavailable. Retry that question type above."]}):i.isPending&&b.length===0?e.jsx("p",{className:"text-sm text-secondary",children:"Loading evidence…"}):i.isError&&b.length===0?e.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm text-secondary",children:[e.jsx("span",{role:"alert",children:"Evidence could not be loaded."}),e.jsx(v,{type:"button",size:"sm",variant:"outline",className:"h-11 px-4 text-sm md:h-11",onClick:()=>{i.refetch()},children:"Retry evidence"})]}):W==="not_measured"?e.jsx("p",{className:"text-sm text-secondary",children:"Not measured yet. Run a measurement to collect source evidence for this Property."}):b.length===0?e.jsx("p",{className:"text-sm text-secondary",children:"No source evidence matched this Property in the displayed measurement."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"overflow-x-auto rounded-md border border-default",children:e.jsxs("table",{className:"evidence-table min-w-[720px]",children:[e.jsx("caption",{className:"sr-only",children:"Source evidence for this Property"}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Match"}),e.jsx("th",{children:"Question"}),e.jsx("th",{children:"URL"})]})}),e.jsx("tbody",{children:b.map(t=>e.jsxs("tr",{children:[e.jsx("td",{children:e.jsxs("span",{className:"flex flex-wrap items-center gap-1",children:[e.jsx(E,{tone:$[t.classification].tone,children:$[t.classification].label}),t.historical||t.bridged?e.jsx(E,{tone:"caution",children:"Historical"}):null]})}),e.jsxs("td",{className:"text-secondary",children:[e.jsx("span",{className:"block",children:t.queryText}),e.jsx("span",{className:"mt-1 block text-xs text-muted",children:[t.provider,t.location].filter(Boolean).join(" · ")})]}),e.jsx("td",{className:"break-all text-secondary",children:t.sourceUrl})]},`${t.expectedSlotId}:${t.usageEdgeId}:${t.sourceUrl}`))})]})}),i.hasNextPage?e.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-3 text-sm text-secondary",children:[e.jsxs("span",{children:["Showing ",b.length," of ",T]}),i.isFetchNextPageError?e.jsx("span",{role:"alert",children:"Could not load more evidence."}):null,e.jsx(v,{size:"sm",variant:"outline",className:"h-11 px-4 text-sm md:h-11",disabled:i.isFetchingNextPage,onClick:()=>{i.fetchNextPage()},children:i.isFetchingNextPage?"Loading…":i.isFetchNextPageError?"Retry more evidence":`Show ${_} more`})]}):null]})]})]})}export{ge as MeasurementPropertyPage};
|