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: "ri--bluesky",
10 }),
11 "app.bsky.feed.post": (uri) => ({
12 label: "Bluesky",
13 link: `https://bsky.app/profile/${uri.repo}/post/${uri.rkey}`,
14 icon: "ri--bluesky",
15 }),
16 "app.bsky.graph.list": (uri) => ({
17 label: "Bluesky",
18 link: `https://bsky.app/profile/${uri.repo}/lists/${uri.rkey}`,
19 icon: "ri--bluesky",
20 }),
21 "app.bsky.feed.generator": (uri) => ({
22 label: "Bluesky",
23 link: `https://bsky.app/profile/${uri.repo}/feed/${uri.rkey}`,
24 icon: "ri--bluesky",
25 }),
26 "fyi.unravel.frontpage.post": (uri) => ({
27 label: "Frontpage",
28 link: `https://frontpage.fyi/post/${uri.repo}/${uri.rkey}`,
29 }),
30 "com.whtwnd.blog.entry": (uri) => ({
31 label: "WhiteWind",
32 link: `https://whtwnd.com/${uri.repo}/${uri.rkey}`,
33 }),
34 "com.shinolabs.pinksea.oekaki": (uri) => ({
35 label: "PinkSea",
36 link: `https://pinksea.art/${uri.repo}/oekaki/${uri.rkey}`,
37 icon: "i-pinksea",
38 }),
39 "com.shinolabs.pinksea.profile": (uri) => ({
40 label: "PinkSea",
41 link: `https://pinksea.art/${uri.repo}`,
42 icon: "i-pinksea",
43 }),
44 "blue.linkat.board": (uri) => ({
45 label: "Linkat",
46 link: `https://linkat.blue/${uri.repo}`,
47 }),
48 "sh.tangled.actor.profile": (uri) => ({
49 label: "Tangled",
50 link: `https://tangled.org/${uri.repo}`,
51 icon: "i-tangled",
52 }),
53 "sh.tangled.repo": (uri, record) => ({
54 label: "Tangled",
55 link: `https://tangled.org/${uri.repo}/${record.name}`,
56 icon: "i-tangled",
57 }),
58 "pub.leaflet.document": (uri) => ({
59 label: "Leaflet",
60 link: `https://leaflet.pub/p/${uri.repo}/${uri.rkey}`,
61 icon: "iconify-color i-leaflet",
62 }),
63 "pub.leaflet.publication": (uri) => ({
64 label: "Leaflet",
65 link: `https://leaflet.pub/lish/${uri.repo}/${uri.rkey}`,
66 icon: "iconify-color i-leaflet",
67 }),
68};