import type { VisualTemplateKey } from "./template-keys.js"; import type { VisualTemplateDefinition } from "./brand-contracts.js"; export const visualTemplates: Record = { "linjing-editorial": { key: "linjing-editorial", version: "1.0.0", name: "林境建筑画册", description: "适合高端定制、建筑作品和项目型个人品牌。", supportedIndustryTemplates: ["personal", "doors"], variants: { hero: "architectural", offeringList: "editorial", detail: "project-case" }, theme: { colors: { background: "#F7F5F1", foreground: "#252525", accent: "#8A6846", dark: "#202221" }, radius: { card: "16rpx" }, }, layout: { home: ["founder-card", "brand-hero", "trust-proof", "trust-manifesto", "offering-list"], offerings: ["offering-list"], detail: ["offering-detail"], profile: ["profile"], }, }, "acheng-campus-food": { key: "acheng-campus-food", version: "1.0.0", name: "阿成校园餐", description: "适合校园餐饮、套餐预订和团体定制的暖橙菜单视觉。", supportedIndustryTemplates: ["food"], variants: { hero: "stall-board", offeringList: "menu-card", detail: "dish-detail" }, theme: { colors: { background: "#FFF8F0", foreground: "#29231F", accent: "#E87532", dark: "#3B2118" }, radius: { card: "24rpx" }, }, layout: { home: ["founder-card", "brand-hero", "trust-proof", "offering-list"], offerings: ["offering-list"], detail: ["offering-detail"], profile: ["profile"], }, }, "atelier-solopreneur": { key: "atelier-solopreneur", version: "1.0.0", name: "独立工坊 · 品牌小程序", description: "展示品牌小程序服务、试点案例与合作流程,承接需求咨询。", supportedIndustryTemplates: ["personal"], variants: { hero: "editorial", offeringList: "service-system", detail: "project-case" }, theme: { colors: { background: "#fbf9f5", foreground: "#1b1c1a", accent: "#183329", dark: "#183329" }, radius: { card: "28rpx" }, }, layout: { home: ["brand-hero", "offering-list"], offerings: ["offering-list"], detail: ["offering-detail"], profile: ["profile"], }, }, }; export function listVisualTemplateKeys(): VisualTemplateKey[] { return Object.keys(visualTemplates); } export const visualTemplateKeys = listVisualTemplateKeys(); export function getVisualTemplate(key: string): VisualTemplateDefinition | undefined { return visualTemplates[key]; } export function getDefaultVisualTemplateKey(industryTemplateKey: string): VisualTemplateKey { return ( listVisualTemplateKeys().find((key) => getVisualTemplate(key)?.supportedIndustryTemplates.includes(industryTemplateKey), ) ?? defaultVisualTemplateKey ); } export const defaultVisualTemplateKey = "linjing-editorial" satisfies VisualTemplateKey;