fix(lib): 🐛 Standard embed
This commit is contained in:
@ -88,7 +88,7 @@ export const parseInitContainerCode = ({
|
||||
backgroundColor,
|
||||
})
|
||||
return prettier.format(
|
||||
`Typebot.initContainer("typebot-container", {
|
||||
`initContainer("typebot-container", {
|
||||
url: "${url}",${bgColorString}${customDomainString}${hiddenVariablesString}
|
||||
});`,
|
||||
{ parser: 'babel', plugins: [parserBabel] }
|
||||
@ -110,7 +110,7 @@ export const parseInitPopupCode = ({
|
||||
})
|
||||
const { delayString } = parsePopupParams({ delay })
|
||||
return prettier.format(
|
||||
`var typebotCommands = Typebot.initPopup({url: "${url}",${delayString}${bgColorString}${customDomainString}${hiddenVariablesString}});`,
|
||||
`var typebotCommands = initPopup({url: "${url}",${delayString}${bgColorString}${customDomainString}${hiddenVariablesString}});`,
|
||||
{ parser: 'babel', plugins: [parserBabel] }
|
||||
)
|
||||
}
|
||||
@ -134,7 +134,7 @@ export const parseInitBubbleCode = ({
|
||||
proactiveMessage,
|
||||
})
|
||||
return prettier.format(
|
||||
`var typebotCommands = Typebot.initBubble({url: "${url}",${bgColorString}${customDomainString}${hiddenVariablesString}${proactiveMessageString}${buttonString}});`,
|
||||
`var typebotCommands = initBubble({url: "${url}",${bgColorString}${customDomainString}${hiddenVariablesString}${proactiveMessageString}${buttonString}});`,
|
||||
{ parser: 'babel', plugins: [parserBabel] }
|
||||
)
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "typebot-js",
|
||||
"version": "2.2.5",
|
||||
"version": "2.2.6",
|
||||
"main": "dist/index.js",
|
||||
"unpkg": "dist/index.umd.min.js",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
|
@ -5,6 +5,7 @@ export const createIframeContainer = (
|
||||
params: IframeParams
|
||||
): HTMLIFrameElement => {
|
||||
const iframe = createIframe({ ...params, loadWhenVisible: true })
|
||||
iframe.style.display = 'none'
|
||||
return iframe
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,6 @@ export const createIframe = ({
|
||||
iframe.classList.add('typebot-iframe')
|
||||
const { onNewVariableValue, onVideoPlayed } = iframeParams
|
||||
listenForTypebotMessages({ onNewVariableValue, onVideoPlayed })
|
||||
iframe.style.display = 'none'
|
||||
return iframe
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user