♻️ Introduce typebot v6 with events (#1013)

Closes #885
This commit is contained in:
Baptiste Arnaud
2023-11-08 15:34:16 +01:00
committed by GitHub
parent 68e4fc71fb
commit 35300eaf34
634 changed files with 58971 additions and 31449 deletions

View File

@@ -19,8 +19,6 @@ export const injectStartProps = async (
const googleAnalyticsId = startPropsToInject.googleAnalyticsId
if (isNotEmpty(googleAnalyticsId))
await initGoogleAnalytics(googleAnalyticsId)
const pixelIds = startPropsToInject.pixelId
? [startPropsToInject.pixelId]
: startPropsToInject.pixelIds
const pixelIds = startPropsToInject.pixelIds
if (isDefined(pixelIds)) initPixel(pixelIds)
}

View File

@@ -6,9 +6,12 @@ import {
InputColors,
Theme,
} from '@typebot.io/schemas'
import { BackgroundType } from '@typebot.io/schemas/features/typebot/theme/enums'
import { isLight, hexToRgb } from '@typebot.io/lib/hexToRgb'
import { isNotEmpty } from '@typebot.io/lib'
import {
BackgroundType,
defaultTheme,
} from '@typebot.io/schemas/features/typebot/theme/constants'
const cssVariableNames = {
general: {
@@ -183,7 +186,7 @@ const setTypebotBackground = (
}
}
const parseBackgroundValue = ({ type, content }: Background) => {
const parseBackgroundValue = ({ type, content }: Background = {}) => {
switch (type) {
case BackgroundType.NONE:
return 'transparent'
@@ -191,6 +194,8 @@ const parseBackgroundValue = ({ type, content }: Background) => {
return content ?? '#ffffff'
case BackgroundType.IMAGE:
return `url(${content})`
case undefined:
return defaultTheme.general.background.content
}
}