New useContent composable to store global navigation state. Fixes for Markdown and Canvas

This commit is contained in:
2024-12-30 20:46:24 +01:00
parent 031a51c2fe
commit 9515132659
31 changed files with 320 additions and 220 deletions

View File

@@ -15,11 +15,9 @@ const baseItem = z.object({
export const item: z.ZodType<ProjectItem> = baseItem.extend({
children: z.lazy(() => item.array().optional()),
});
export const project = z.object({
items: z.array(item),
});
export type Project = z.infer<typeof project>;
export type ProjectItem = z.infer<typeof baseItem> & {
export const project = z.array(item);
type Project = z.infer<typeof project>;
type ProjectItem = z.infer<typeof baseItem> & {
children?: ProjectItem[]
};