manifest.ts
This file
Path
apps/web/src/features/agents/manifest.ts
47 lines · 1.2 KiB · TypeScript
Last changed by
Merge redesign into mainoscabrielbefore adoptioncaedd21
History of this fileTake it
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748/** * `vite.config.ts` writes this into the client output as `manifest.webmanifest` * at each build, so no file spells the name. */import { Brand } from "@repo/brand";
import { INBOX_PATH } from "../shared/paths.ts";import { themeColors } from "../shared/theme.ts";
const rasters = [192, 512] as const;
const icons = [ ...rasters.flatMap((size) => (["any", "maskable"] as const).map((purpose) => ({ purpose, sizes: `${size}x${size}`, src: `/icons/icon-${size}.png`, type: "image/png", })) ), { purpose: "any", sizes: "any", src: "/icons/icon.svg", type: "image/svg+xml", },];
export const MANIFEST_PATH = "/manifest.webmanifest";
export const webManifest = () => ({ background_color: themeColors.light, description: `Open asks, answers and your inbox on ${Brand.name}.`, display: "standalone", icons, // The installed app's identity, kept from when it opened Today: a new id would install it again. id: "/today", lang: "en", name: Brand.name, scope: "/", short_name: Brand.name, start_url: INBOX_PATH, theme_color: themeColors.light,});
export const webManifestText = () => `${JSON.stringify(webManifest(), null, 2)}\n`;