@ibti-tech/chatbot 0.9.6 → 0.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ibti-chatbot-embed.js +17 -7
- package/dist/ibti-chatbot-embed.js.map +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +16 -6
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* IBTI Chatbot – Embed script
|
|
3
|
-
* @version 0.9.
|
|
3
|
+
* @version 0.9.7
|
|
4
4
|
*
|
|
5
5
|
* Standalone widget for embedding the IBTI chatbot on any website (HTML, WordPress, PHP, etc.)
|
|
6
6
|
* without requiring React or a build step. Include this script and set window.IBTIChatbotConfig
|
|
@@ -362,8 +362,11 @@ Error generating stack: `+o.message+`
|
|
|
362
362
|
box-sizing: border-box;
|
|
363
363
|
`}
|
|
364
364
|
|
|
365
|
-
|
|
366
|
-
|
|
365
|
+
/* Bottom on mobile: mirror of top (opposite direction). Same height open/closed (100% of bar), transform slides up when open */
|
|
366
|
+
${e=>e.$verticalPosition==="bottom"?P`
|
|
367
|
+
height: 100%;
|
|
368
|
+
max-height: 100%;
|
|
369
|
+
${e.$opened?P`transform: none !important;`:""}
|
|
367
370
|
`:""}
|
|
368
371
|
|
|
369
372
|
${e=>e.$opened&&e.$verticalPosition==="top"?P`
|
|
@@ -1349,7 +1352,7 @@ Error generating stack: `+o.message+`
|
|
|
1349
1352
|
transform: scale(0.9);
|
|
1350
1353
|
}
|
|
1351
1354
|
`}
|
|
1352
|
-
`;var HL={name:"@ibti-tech/chatbot",version:"0.9.
|
|
1355
|
+
`;var HL={name:"@ibti-tech/chatbot",version:"0.9.7",description:"Chatbot system developed to be embedded in any website",packageManager:"yarn@3.6.4",main:"./dist/index.mjs",types:"./dist/index.d.ts",files:["dist/**/*"],publishConfig:{access:"public"},scripts:{dev:"node ./build.config.mjs --watch",build:"node ./build.config.mjs","build:embed":"node ./build-embed.config.mjs","build:all":"node ./build.config.mjs && node ./build-embed.config.mjs",test:"vitest"},repository:{type:"git",url:"git+https://github.com/ibti-solutions/ibti-chatbot.git"},keywords:["chatbot","openai","chat-gpt","ibti"],author:"IBTI Solu\xE7\xF5es em TI",license:"ISC",bugs:{url:"https://github.com/ibti-solutions/ibti-chatbot/issues"},homepage:"https://github.com/ibti-solutions/ibti-chatbot#readme",dependencies:{"@types/node":"^20.13.0","date-fns":"^3.6.0","lucide-react":"^0.263.1",polished:"^4.3.1","react-markdown":"^9.0.1","rehype-raw":"^7.0.0","rehype-sanitize":"^6.0.0","remark-gfm":"^4.0.0",uuid:"^9.0.1"},devDependencies:{"@ibti-tech/prettier-config":"^0.1.6","@ibti-tech/tsconfig":"^0.0.3","@ibti-tech/ui":"^0.16.4","@testing-library/react":"^15.0.7","@types/react":"^18.3.2","@types/uuid":"^9.0.8",esbuild:"0.21.3","esbuild-node-externals":"^1.13.1","esbuild-plugin-clean":"^1.0.1","esbuild-plugin-external-global":"^1.0.1",jsdom:"^24.0.0",lodash:"^4.17.21",nookies:"^2.5.2","npm-dts":"^1.3.12",prettier:"3.2.5",react:"18.2.0","react-dom":"^18.2.0","styled-components":"^6.1.11","ts-node":"^10.9.2",typescript:"^5.4.5",vitest:"^1.6.0"},peerDependencies:{lodash:"^4.17.21",nookies:"^2.5.2",react:"18.2.0","react-dom":"^18.2.0"}};var kg=HL.version??"";var zL=({chatFeedbackBox:e})=>{let t=Ve(),[r,n]=(0,St.useState)(5),[a,o]=(0,St.useState)(""),i=Et(),u=s=>{s.preventDefault(),e.sendUserRating({description:a,ratingScore:r})};return St.default.createElement(UL,{$opened:e.opened&&t.opened},St.default.createElement(Ag,null,St.default.createElement(BL,null,i.CHAT_FEEDBACK.TITLE),St.default.createElement(FL,null,i.CHAT_FEEDBACK.DESCRIPTION),St.default.createElement(ML,{onSubmit:u},St.default.createElement(zb,{value:r,setValue:n,layer:2}),St.default.createElement(Cc,{layer:2,placeholder:i.CHAT_FEEDBACK.MESSAGE_FIELD,fillWidth:!0,value:a,onChange:s=>o(s.target.value),className:"feedbackTextarea"}),St.default.createElement(DL,null,kg?St.default.createElement(PL,null,"v",kg):null,St.default.createElement(RL,null,St.default.createElement(Fa,{onClick:e.close,label:i.CHAT_FEEDBACK.CLOSE_BUTTON,size:"small",variant:"layerBased"}),St.default.createElement(Fa,{type:"submit",label:i.CHAT_FEEDBACK.SUBMIT_BUTTON,size:"small",loading:e.loading}))))))};var Wf=Y(ue());var $L=()=>{let{apiURL:e,locale:t,publicHash:r,visitorId:n}=Ve(),[a,o]=(0,Wf.useState)(!1),[i,u]=(0,Wf.useState)(!1),[s,c]=(0,Wf.useState)(!1);return{opened:i,open:()=>{u(!0)},close:()=>{u(!1),o(!0)},sendUserRating:async({ratingScore:m,description:E})=>{try{c(!0),await ym({apiURL:e,publicHash:r,visitorId:n,locale:t,ratingScore:m,description:E})}finally{c(!1),o(!0),u(!1)}},loading:s}};var ZP=32,eR=({verticalPosition:e="bottom",pushContentDown:t=!1,horizontalPosition:r,pushContentDownBarHeight:n=ZP})=>{let{opened:a}=Ve(),o=$L(),i=n;return to.default.createElement(Qb,{$opened:a,$verticalPosition:e,$pushContentDown:t,$horizontalPosition:r,$pushContentDownBarHeight:i},to.default.createElement(zL,{chatFeedbackBox:o}),to.default.createElement(o2,{chatFeedbackBox:o}),to.default.createElement(AL,null),to.default.createElement(_L,null),to.default.createElement(OL,{verticalPosition:e,opened:a,pushContentDown:t,pushContentDownBarHeight:i}))},WL=eR;var VL=H(Db)`
|
|
1353
1356
|
font-family: 'Montserrat', sans-serif !important;
|
|
1354
1357
|
font-weight: 600 !important;
|
|
1355
1358
|
|
|
@@ -1496,9 +1499,16 @@ Error generating stack: `+o.message+`
|
|
|
1496
1499
|
padding-bottom: ${n=>n.theme.spacing.components.xsmall};
|
|
1497
1500
|
|
|
1498
1501
|
@media screen and (max-width: ${se.tablet}px) {
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
+
/* Mirror of top (opposite direction): same height open/closed, no flex, last child height 100% like top */
|
|
1503
|
+
bottom: 0 !important;
|
|
1504
|
+
padding-top: env(safe-area-inset-top, 0px);
|
|
1505
|
+
padding-bottom: env(safe-area-inset-bottom, 0px);
|
|
1506
|
+
height: 100vh;
|
|
1507
|
+
height: 100svh;
|
|
1508
|
+
box-sizing: border-box;
|
|
1509
|
+
& > *:last-child {
|
|
1510
|
+
height: 100%;
|
|
1511
|
+
}
|
|
1502
1512
|
}
|
|
1503
1513
|
`}
|
|
1504
1514
|
|