chore: 初始化项目骨架

This commit is contained in:
SkyJourney
2026-07-25 16:51:16 +08:00
commit ec48bce0a6
26 changed files with 3806 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
import { z } from "zod";
export const THEME_MANIFEST_VERSION = 1;
export const themeFeatureSchema = z.enum([
"code",
"table",
"task-list",
"footnote",
"katex",
"mermaid"
]);
export const themeManifestSchema = z.object({
manifestVersion: z.literal(THEME_MANIFEST_VERSION),
id: z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),
name: z.string().min(1).max(100),
version: z.string().min(1).max(30),
description: z.string().max(500),
author: z.string().max(100),
license: z.string().max(100),
entry: z.string().endsWith(".css"),
print: z.string().endsWith(".css").optional(),
domPreset: z.enum(["typora", "github", "generic"]),
defaultFontSize: z.string(),
supportedFeatures: z.array(themeFeatureSchema),
bundled: z.boolean()
});
export type ThemeManifest = z.infer<typeof themeManifestSchema>;
export type ThemeFeature = z.infer<typeof themeFeatureSchema>;