@ibti-tech/chatbot 0.9.7 → 0.9.9
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 +10 -8
- package/dist/ibti-chatbot-embed.js.map +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +9 -7
- 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.9
|
|
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
|
|
@@ -1352,7 +1352,7 @@ Error generating stack: `+o.message+`
|
|
|
1352
1352
|
transform: scale(0.9);
|
|
1353
1353
|
}
|
|
1354
1354
|
`}
|
|
1355
|
-
`;var HL={name:"@ibti-tech/chatbot",version:"0.9.
|
|
1355
|
+
`;var HL={name:"@ibti-tech/chatbot",version:"0.9.9",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)`
|
|
1356
1356
|
font-family: 'Montserrat', sans-serif !important;
|
|
1357
1357
|
font-weight: 600 !important;
|
|
1358
1358
|
|
|
@@ -1499,15 +1499,17 @@ Error generating stack: `+o.message+`
|
|
|
1499
1499
|
padding-bottom: ${n=>n.theme.spacing.components.xsmall};
|
|
1500
1500
|
|
|
1501
1501
|
@media screen and (max-width: ${se.tablet}px) {
|
|
1502
|
-
/*
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
height:
|
|
1507
|
-
|
|
1502
|
+
/* Real mobile: start below browser UI (address bar) and safe area. S24/Android often have 0 safe-area; bar ~56px. */
|
|
1503
|
+
top: max(env(safe-area-inset-top, 0px), 56px) !important;
|
|
1504
|
+
bottom: env(safe-area-inset-bottom, 0px) !important;
|
|
1505
|
+
height: auto !important;
|
|
1506
|
+
min-height: 0;
|
|
1507
|
+
padding-top: 0;
|
|
1508
|
+
padding-bottom: 0;
|
|
1508
1509
|
box-sizing: border-box;
|
|
1509
1510
|
& > *:last-child {
|
|
1510
1511
|
height: 100%;
|
|
1512
|
+
min-height: 0;
|
|
1511
1513
|
}
|
|
1512
1514
|
}
|
|
1513
1515
|
`}
|