fix(search): preview matched video chunks on hover (#540)

* fix(search): preview matched video chunks on hover

* fix(search): show chunk covers before hover

* fix(search): reuse sprites for whole-video matches
This commit is contained in:
Yiling-J
2026-11-23 11:42:00 +08:00
committed by GitHub
parent aabf59cbe7
commit eeb41fee03
28 changed files with 1018 additions and 249 deletions
+11
View File
@@ -25,6 +25,16 @@ export const previewInfoSchema = z.object({
})
export type PreviewInfo = z.infer<typeof previewInfoSchema>
const spriteLayoutSchema = z.object({
columns: z.number().int().positive(),
rows: z.number().int().positive(),
frameCount: z.number().int().positive(),
})
export type SpriteLayout = z.infer<typeof spriteLayoutSchema>
const matchedSpriteSchema = spriteLayoutSchema.extend({ url: z.string() })
export type MatchedSprite = z.infer<typeof matchedSpriteSchema>
export const childPreviewSchema = z.object({
type: z.string().nullable(),
preview: previewInfoSchema.nullable(),
@@ -90,6 +100,7 @@ export const assetInfoSchema = z.object({
sortIndex: z.string().optional().nullable(),
startTime: z.number().optional().nullable(),
endTime: z.number().optional().nullable(),
matchedSprite: matchedSpriteSchema.optional(),
hasAgentsMd: z.boolean().optional(),
commentsCount: z.number().optional(),