Something went wrong. Try again.
Monorepo for Tangled tangled.org
Something went wrong. Try again.
TypeScript
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102// fixture feed and rail data for the timeline stories
import type { RepoCardData } from "$lib/components/profile/types";import type * as ShTangledFeedGetTimeline from "$lib/api/lexicons/types/sh/tangled/feed/getTimeline";
const owner = { did: "did:plc:3p7ejjxnufohsygt5vbyxb2i", handle: "tangled.org" };const alice = { did: "did:plc:oky5czdrnfjpqslsw2a5iclo", handle: "alice.tngl.sh" };
const repo = { did: "did:plc:3p7ejjxnufohsygt5vbyxb2i", slug: "core", owner, createdAt: "2025-06-01T10:30:00Z", description: "The knot server, appview, and everything that makes tangled tick.", starCount: 42};
export const feed = [ { event: { $type: "sh.tangled.feed.getTimeline#repoEvent", cid: "bafyreib1", uri: "at://did:plc:3p7ejjxnufohsygt5vbyxb2i/sh.tangled.repo/core", repo }, eventAt: "2025-06-04T09:00:00Z" }, { event: { $type: "sh.tangled.feed.getTimeline#starEvent", cid: "bafyreib2", uri: "at://did:plc:oky5czdrnfjpqslsw2a5iclo/sh.tangled.feed.star/3l", actor: alice, repo }, eventAt: "2025-06-03T18:20:00Z" }, { event: { $type: "sh.tangled.feed.getTimeline#followEvent", cid: "bafyreib3", uri: "at://did:plc:oky5czdrnfjpqslsw2a5iclo/sh.tangled.graph.follow/3l", actor: alice, subject: { did: "did:plc:3p7ejjxnufohsygt5vbyxb2i", handle: "joshka.net", description: "Rust, TUIs, and the occasional git plumbing yak-shave.", followersCount: 128, followsCount: 87 } }, eventAt: "2025-06-02T12:00:00Z" }, { event: { $type: "sh.tangled.feed.getTimeline#repoEvent", cid: "bafyreib4", uri: "at://did:plc:3p7ejjxnufohsygt5vbyxb2i/sh.tangled.repo/core-fork", repo: { ...repo, slug: "core-fork" }, source: repo }, eventAt: "2025-06-01T08:00:00Z" }] as unknown as ShTangledFeedGetTimeline.$output["feed"];
export const trending: RepoCardData[] = [ { name: "core", repoDid: "did:plc:3p7ejjxnufohsygt5vbyxb2i", ownerHandle: "tangled.org", description: "The knot server, appview, and everything that makes tangled tick.", createdAt: "2025-06-01T10:30:00Z", stars: 1234 }, { name: "spindle", repoDid: "did:plc:oky5czdrnfjpqslsw2a5iclo", ownerHandle: "alice.tngl.sh", description: "A tiny CI runner that speaks the pipeline lexicon.", createdAt: "2025-05-20T08:00:00Z", stars: 87 }, { name: "dotfiles", repoDid: "did:plc:6qtmvlpvcgwuemcxjbfvnpxg", ownerHandle: "someone-with-a-rather-long-handle.example.com", createdAt: "2025-05-18T08:00:00Z", stars: 9 }];
// the trending rail always shows a fixed 5 rows, so the skeleton fixture// needs a full 5 items (with descriptions) to capture that exact heightexport const trendingSkeleton: RepoCardData[] = Array.from({ length: 5 }, (_, i) => ({ name: trending[i % trending.length]!.name, repoDid: trending[i % trending.length]!.repoDid, ownerHandle: trending[i % trending.length]!.ownerHandle, description: trending[i % trending.length]!.description ?? "A tiny CI runner.", createdAt: trending[i % trending.length]!.createdAt, stars: trending[i % trending.length]!.stars}));