diff --git a/src/components/RecordPreview.tsx b/src/components/RecordPreview.tsx index a10052e..8fc38b4 100644 --- a/src/components/RecordPreview.tsx +++ b/src/components/RecordPreview.tsx @@ -6,9 +6,11 @@ 'use client'; import { useState } from 'react'; +import Link from 'next/link'; import { GenericRecord } from '@/utils/recordFetcher'; import { sanitizeHandle } from '@/utils/sanitize'; -import { X } from 'lucide-react'; +import { Telescope, X } from 'lucide-react'; +import { encodeRepo } from '@/utils/atproto/urls'; type RecordPreviewProps = { record: GenericRecord; @@ -211,6 +213,32 @@ export default function RecordPreview({ record, collection, handle, rkey }: Reco ? `View Full Record (${allFields.length} fields)` : 'View Full Record'} + + {/* Cross-product: jump into the same record inside the explorer */} + { + e.currentTarget.style.color = 'var(--text-accent)'; + }} + onMouseLeave={(e) => { + e.currentTarget.style.color = 'var(--text-tertiary)'; + }} + > + + Open in Explorer — backlinks, identity, raw JSON → + {/* Footer: CID */} diff --git a/src/utils/waypointIcons.tsx b/src/utils/waypointIcons.tsx index 2045f2a..bb9f569 100644 --- a/src/utils/waypointIcons.tsx +++ b/src/utils/waypointIcons.tsx @@ -179,6 +179,31 @@ export const AturiSVG = () => ( ); +// Lucide-style telescope, matching the icon used in the explore nav link +// and the explorer landing page. Keeps the new Aturi Explore waypoint +// visually distinct from the standard Aturi (leaf) entry. +export const AturiExploreSVG = () => ( + + + + + + + + + +); + export const BluepySVG = () => ( ( export const WAYPOINT_ICONS: Record = { aturi: , + aturiExplore: , anisota: , bluesky: , bluepy: , diff --git a/src/utils/waypoints.data.ts b/src/utils/waypoints.data.ts index f78a195..5f3fe5b 100644 --- a/src/utils/waypoints.data.ts +++ b/src/utils/waypoints.data.ts @@ -306,6 +306,30 @@ export const WAYPOINT_DESTINATIONS_DATA: Record = { redirectCompat: [], }, + aturiExplore: { + id: 'aturiExplore', + name: 'Aturi Explore', + description: (collection) => { + if (collection) return 'Inspect record on aturi.to/explore'; + return 'Browse repo on aturi.to/explore'; + }, + getUrl: (handle, collection, rkey, did) => { + // The explorer keys URLs by DID when available so handle changes don't + // break shared links. Falls back to the handle when no DID was passed. + const identifier = did || handle; + if (collection && rkey) { + return `https://aturi.to/explore/${identifier}/${collection}/${encodeURIComponent(rkey)}`; + } + if (collection) { + return `https://aturi.to/explore/${identifier}/${collection}`; + } + return `https://aturi.to/explore/${identifier}`; + }, + supportedTypes: ['post', 'profile', 'list', 'record'], + category: 'devTools', + redirectCompat: [], + }, + atptools: { id: 'atptools', name: 'atp.tools', @@ -647,6 +671,7 @@ export const WAYPOINT_ORDER = [ 'pckt', 'pdsls', 'anisotaExplorer', + 'aturiExplore', 'tangled', 'atptools', 'witchsky',