1export type AtUri = { repo: string; collection: string; rkey: string };
2type TemplateFn = (uri: AtUri, record?: any) => { label: string; link: string; icon?: string };
3type TemplateMap = Record<string, TemplateFn>;
4
5export const uriTemplates: TemplateMap = {
6 "app.bsky.actor.profile": (uri) => ({
7 label: "Bluesky",
8 link: `https://bsky.app/profile/${uri.repo}`,
9 icon: "simple-icons--bluesky text-[#0085ff]",
10 }),
11 "app.bsky.feed.post": (uri) => ({
12 label: "Bluesky",
13 link: `https://bsky.app/profile/${uri.repo}/post/${uri.rkey}`,
14 icon: "simple-icons--bluesky text-[#0085ff]",
15 }),
16 "app.bsky.graph.list": (uri) => ({
17 label: "Bluesky",
18 link: `https://bsky.app/profile/${uri.repo}/lists/${uri.rkey}`,
19 icon: "simple-icons--bluesky text-[#0085ff]",
20 }),
21 "app.bsky.feed.generator": (uri) => ({
22 label: "Bluesky",
23 link: `https://bsky.app/profile/${uri.repo}/feed/${uri.rkey}`,
24 icon: "simple-icons--bluesky text-[#0085ff]",
25 }),
26 "fyi.unravel.frontpage.post": (uri) => ({
27 label: "Frontpage",
28 link: `https://frontpage.fyi/post/${uri.repo}/${uri.rkey}`,
29 }),
30 "com.shinolabs.pinksea.oekaki": (uri) => ({
31 label: "PinkSea",
32 link: `https://pinksea.art/${uri.repo}/oekaki/${uri.rkey}`,
33 icon: "i-pinksea",
34 }),
35 "com.shinolabs.pinksea.profile": (uri) => ({
36 label: "PinkSea",
37 link: `https://pinksea.art/${uri.repo}`,
38 icon: "i-pinksea",
39 }),
40 "blue.linkat.board": (uri) => ({
41 label: "Linkat",
42 link: `https://linkat.blue/${uri.repo}`,
43 }),
44 "sh.tangled.actor.profile": (uri) => ({
45 label: "Tangled",
46 link: `https://tangled.org/${uri.repo}`,
47 icon: "i-tangled",
48 }),
49 "sh.tangled.repo": (uri, record) => ({
50 label: "Tangled",
51 link: `https://tangled.org/${uri.repo}/${record.name}`,
52 icon: "i-tangled",
53 }),
54 "pub.leaflet.document": (uri) => ({
55 label: "Leaflet",
56 link: `https://leaflet.pub/p/${uri.repo}/${uri.rkey}`,
57 icon: "iconify-color i-leaflet",
58 }),
59 "pub.leaflet.publication": (uri) => ({
60 label: "Leaflet",
61 link: `https://leaflet.pub/lish/${uri.repo}/${uri.rkey}`,
62 icon: "iconify-color i-leaflet",
63 }),
64};