import type { ComponentProps } from "svelte";
import type BlobHeader from "#lib/components/repo/BlobHeader.svelte";
type BlobHeaderProps = ComponentProps<typeof BlobHeader>;
const repo = { ownerHandle: "alice", repoName: "tangled", ref: "main" };
const path = "web/src/lib/components/repo/BlobView.svelte";
const demo: BlobHeaderProps = {
repo,
path,
rawHref: `/alice/tangled/raw/main/${path}`,
historyHref: `/alice/tangled/history/main/${path}`,
kind: "code",
language: "Svelte",
sizeLabel: "4.2 kB",
lines: 87,
showBlame: true,
copyText: "export const answer = 42;\n",
onsearch: () => {}
};
// git caps neither ref names nor paths, and enry names run to 34 characters
const worstPath =
"tools/windows/legacy-build/Benachrichtigungseinstellungen/NorthwindIndustriesHoldings.Platform.Integrations.Notifications.sln";
const worstRepo = {
ownerHandle: "aleksandra-wisniewska-kowalczyk.northwind-industries-holdings.example.com",
repoName: "northwind-industries-holdings-platform-monorepo",
ref: "dependabot/cargo/crates/knot2/tokio-rustls-0.26.4-security-advisory"
};
const worst: BlobHeaderProps = {
repo: worstRepo,
path: worstPath,
rawHref: `/alice/tangled/raw/main/${worstPath}`,
historyHref: `/alice/tangled/history/main/${worstPath}`,
kind: "code",
language: "Microsoft Visual Studio Solution",
sizeLabel: "118 MB",
lines: 1284731,
showWrap: true,
showBlame: true,
blameLoading: true,
copyText: "Microsoft Visual Studio Solution File, Format Version 12.00\n",
onsearch: () => {}
};
const markup: BlobHeaderProps = {
...worst,
path: "docs/Paramètres de confidentialité et de sécurité — guide d'administration.md",
language: "Markdown",
kind: "markup",
view: "rendered",
sizeLabel: "48 kB",
lines: 1284
};
const commit: BlobHeaderProps = {
...demo,
repo: { ...repo, ref: "9f8e7d6c5b4a3c2d1e0f9a8b7c6d5e4f3a2b1c0d" },
language: "Jupyter Notebook",
lines: 1
};
const empty: BlobHeaderProps = {
...demo,
path: "web/static/.gitkeep",
language: null,
sizeLabel: "0 B",
lines: 0,
copyText: "",
showBlame: false
};
const image: BlobHeaderProps = {
...demo,
path: "web/static/screenshots/IMG_20250914_183022_HDR_portrait_edited_edited.HEIC",
kind: "image",
language: null,
sizeLabel: "12 MB",
lines: null,
copyText: null,
showBlame: false,
onsearch: undefined
};
const string: BlobHeaderProps = {
...worst,
repo: null,
path: "discord-compact-composer.css",
rawHref: "/strings/erin.tngl.sh/3mrkjth7weu22/raw",
historyHref: null,
language: "CSS",
timeLabel: "Created 11mo ago",
blameLoading: false,
showBlame: false
};
export const blobHeaderDatasets = { demo, worst, markup, commit, empty, image, string };
export type BlobHeaderDatasetName = keyof typeof blobHeaderDatasets;