feat(glossary): add step 21 smart navigation
This commit is contained in:
@@ -47,6 +47,36 @@ const archicratIa = defineCollection({
|
||||
})
|
||||
});
|
||||
|
||||
const glossaryNavigationFlowSchema = z.object({
|
||||
label: z.string().min(1),
|
||||
primaryNext: z.string().min(1).optional(),
|
||||
primaryReason: z.string().min(1).optional(),
|
||||
});
|
||||
|
||||
const glossaryNavigationSchema = z.object({
|
||||
primaryNext: z.string().min(1).optional(),
|
||||
primaryReason: z.string().min(1).optional(),
|
||||
paths: z
|
||||
.object({
|
||||
understand: z.array(z.string().min(1)).default([]),
|
||||
deepen: z.array(z.string().min(1)).default([]),
|
||||
compare: z.array(z.string().min(1)).default([]),
|
||||
apply: z.array(z.string().min(1)).default([]),
|
||||
})
|
||||
.default({
|
||||
understand: [],
|
||||
deepen: [],
|
||||
compare: [],
|
||||
apply: [],
|
||||
}),
|
||||
flows: z
|
||||
.record(z.string(), glossaryNavigationFlowSchema)
|
||||
.default({}),
|
||||
relationWeights: z
|
||||
.record(z.string(), z.number().int().nonnegative())
|
||||
.default({}),
|
||||
});
|
||||
|
||||
// Glossaire (référentiel terminologique)
|
||||
const glossaire = defineCollection({
|
||||
type: "content",
|
||||
@@ -100,7 +130,8 @@ const glossaire = defineCollection({
|
||||
level: z.enum(["fondamental", "intermediaire", "avance"]),
|
||||
related: z.array(z.string().min(1)).default([]),
|
||||
opposedTo: z.array(z.string().min(1)).default([]),
|
||||
seeAlso: z.array(z.string().min(1)).default([])
|
||||
seeAlso: z.array(z.string().min(1)).default([]),
|
||||
navigation: glossaryNavigationSchema.optional()
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user