♻️ (models) Change to features-centric folder structure
This commit is contained in:
committed by
Baptiste Arnaud
parent
a9d04798bc
commit
a5c8a8a95c
19
packages/models/src/features/blocks/bubbles/embed.ts
Normal file
19
packages/models/src/features/blocks/bubbles/embed.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { blockBaseSchema, BubbleBlockType } from '../shared'
|
||||
import { z } from 'zod'
|
||||
|
||||
export const embedBubbleContentSchema = z.object({
|
||||
url: z.string().optional(),
|
||||
height: z.number(),
|
||||
})
|
||||
|
||||
export const embedBubbleBlockSchema = blockBaseSchema.and(
|
||||
z.object({
|
||||
type: z.enum([BubbleBlockType.EMBED]),
|
||||
content: embedBubbleContentSchema,
|
||||
})
|
||||
)
|
||||
|
||||
export const defaultEmbedBubbleContent: EmbedBubbleContent = { height: 400 }
|
||||
|
||||
export type EmbedBubbleBlock = z.infer<typeof embedBubbleBlockSchema>
|
||||
export type EmbedBubbleContent = z.infer<typeof embedBubbleContentSchema>
|
Reference in New Issue
Block a user