2022-06-11 07:27:38 +02:00
|
|
|
import { z } from 'zod'
|
2022-11-17 10:33:17 +01:00
|
|
|
import { audioBubbleBlockSchema, audioBubbleContentSchema } from './audio'
|
2022-06-11 07:27:38 +02:00
|
|
|
import { embedBubbleContentSchema, embedBubbleBlockSchema } from './embed'
|
|
|
|
import { imageBubbleContentSchema, imageBubbleBlockSchema } from './image'
|
|
|
|
import { textBubbleContentSchema, textBubbleBlockSchema } from './text'
|
|
|
|
import { videoBubbleContentSchema, videoBubbleBlockSchema } from './video'
|
|
|
|
|
|
|
|
export const bubbleBlockContentSchema = textBubbleContentSchema
|
|
|
|
.or(imageBubbleContentSchema)
|
|
|
|
.or(videoBubbleContentSchema)
|
|
|
|
.or(embedBubbleContentSchema)
|
2022-11-17 10:33:17 +01:00
|
|
|
.or(audioBubbleContentSchema)
|
2022-06-11 07:27:38 +02:00
|
|
|
|
|
|
|
export const bubbleBlockSchema = textBubbleBlockSchema
|
|
|
|
.or(imageBubbleBlockSchema)
|
|
|
|
.or(videoBubbleBlockSchema)
|
|
|
|
.or(embedBubbleBlockSchema)
|
2022-11-17 10:33:17 +01:00
|
|
|
.or(audioBubbleBlockSchema)
|
2022-06-11 07:27:38 +02:00
|
|
|
|
|
|
|
export type BubbleBlock = z.infer<typeof bubbleBlockSchema>
|
|
|
|
export type BubbleBlockContent = z.infer<typeof bubbleBlockContentSchema>
|