@ibti-tech/chatbot 0.9.2 → 0.9.5

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/index.d.ts CHANGED
@@ -128,7 +128,7 @@ declare module '@ibti-tech/chatbot/components/ChatbotBar/styles' {
128
128
  //# sourceMappingURL=styles.d.ts.map
129
129
  }
130
130
  declare module '@ibti-tech/chatbot/components/ChatbotBar/styles.d.ts' {
131
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotBar/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAW,MAAM,eAAe,CAAA;AAIpD,eAAO,MAAM,YAAY;;oBAEgB,kBAAmB;;yBADrC,MAAM,GAAG,OAAO;gCACT,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM;aACvD,OAAO;uBACG,KAAK,GAAG,QAAQ;uBAChB,OAAO;iMA4E3B,CAAA;AAED,2GAA2G;AAC3G,eAAO,MAAM,WAAW;iBAA6B,MAAM;gBAAc,MAAM;YAS9E,CAAA;AAED,eAAO,MAAM,OAAO;uBACC,KAAK,GAAG,QAAQ;yBACd,MAAM,GAAG,OAAO;aAC5B,OAAO;cACN,MAAM;iBACH,MAAM,GAAG,MAAM;mBACb,OAAO;uBACH,OAAO;gCACE,MAAM;YAgInC,CAAA"}
131
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotBar/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAW,MAAM,eAAe,CAAA;AAIpD,eAAO,MAAM,YAAY;;oBAEgB,kBAAmB;;yBADrC,MAAM,GAAG,OAAO;gCACT,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM;aACvD,OAAO;uBACG,KAAK,GAAG,QAAQ;uBAChB,OAAO;iMA4E3B,CAAA;AAED,2GAA2G;AAC3G,eAAO,MAAM,WAAW;iBAA6B,MAAM;gBAAc,MAAM;YAS9E,CAAA;AAED,eAAO,MAAM,OAAO;uBACC,KAAK,GAAG,QAAQ;yBACd,MAAM,GAAG,OAAO;aAC5B,OAAO;cACN,MAAM;iBACH,MAAM,GAAG,MAAM;mBACb,OAAO;uBACH,OAAO;gCACE,MAAM;YAwInC,CAAA"}
132
132
  }
133
133
  declare module '@ibti-tech/chatbot/components/ChatbotBody/index' {
134
134
  import React from 'react';
@@ -147,7 +147,7 @@ declare module '@ibti-tech/chatbot/components/ChatbotBody/styles' {
147
147
  //# sourceMappingURL=styles.d.ts.map
148
148
  }
149
149
  declare module '@ibti-tech/chatbot/components/ChatbotBody/styles.d.ts' {
150
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotBody/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,6NAAe,CAAA;AAExC,eAAO,MAAM,YAAY,iOAYxB,CAAA;AAED,eAAO,MAAM,OAAO,6NAuCnB,CAAA"}
150
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotBody/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,6NAAe,CAAA;AAExC,eAAO,MAAM,YAAY,iOAYxB,CAAA;AAED,eAAO,MAAM,OAAO,6NAwCnB,CAAA"}
151
151
  }
152
152
  declare module '@ibti-tech/chatbot/components/ChatbotDevice/index' {
153
153
  import React from 'react';
@@ -182,7 +182,7 @@ declare module '@ibti-tech/chatbot/components/ChatbotDevice/styles' {
182
182
  //# sourceMappingURL=styles.d.ts.map
183
183
  }
184
184
  declare module '@ibti-tech/chatbot/components/ChatbotDevice/styles.d.ts' {
185
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotDevice/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO;aACT,OAAO;uBACG,KAAK,GAAG,QAAQ;uBAChB,OAAO;0BACJ,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM;gCAC9B,MAAM;YAyOnC,CAAA"}
185
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/components/ChatbotDevice/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO;aACT,OAAO;uBACG,KAAK,GAAG,QAAQ;uBAChB,OAAO;0BACJ,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM;gCAC9B,MAAM;YAgQnC,CAAA"}
186
186
  }
187
187
  declare module '@ibti-tech/chatbot/components/ChatbotFooter/index' {
188
188
  import React from 'react';
@@ -458,7 +458,7 @@ declare module '@ibti-tech/chatbot/contexts/Chatbot/provider' {
458
458
  //# sourceMappingURL=provider.d.ts.map
459
459
  }
460
460
  declare module '@ibti-tech/chatbot/contexts/Chatbot/provider.d.ts' {
461
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/contexts/Chatbot/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAwC,MAAM,OAAO,CAAA;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AASpC;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,8BAA8B;IAC9B,MAAM,EAAE,YAAY,CAAC,MAAM,CAAA;IAC3B,kEAAkE;IAClE,MAAM,EAAE,MAAM,CAAA;IACd,uFAAuF;IACvF,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,kCAAkC;IAClC,KAAK,EAAE,YAAY,CAAC,KAAK,CAAA;IACzB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,kFAAkF;IAClF,KAAK,CAAC,EAAE,YAAY,CAAC,KAAK,CAAA;IAC1B,8DAA8D;IAC9D,0BAA0B,CAAC,EAAE,MAAM,EAAE,CAAA;IACrC,gGAAgG;IAChG,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,oFAAoF;IACpF,MAAM,CAAC,EAAE,YAAY,CAAC,YAAY,CAAA;IAClC,oFAAoF;IACpF,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,sJAY7B,oBAAoB,sBAgLtB,CAAA"}
461
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../../home/runner/work/ibti-chatbot/ibti-chatbot/src/contexts/Chatbot/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAwC,MAAM,OAAO,CAAA;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AASpC;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,8BAA8B;IAC9B,MAAM,EAAE,YAAY,CAAC,MAAM,CAAA;IAC3B,kEAAkE;IAClE,MAAM,EAAE,MAAM,CAAA;IACd,uFAAuF;IACvF,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,kCAAkC;IAClC,KAAK,EAAE,YAAY,CAAC,KAAK,CAAA;IACzB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,kFAAkF;IAClF,KAAK,CAAC,EAAE,YAAY,CAAC,KAAK,CAAA;IAC1B,8DAA8D;IAC9D,0BAA0B,CAAC,EAAE,MAAM,EAAE,CAAA;IACrC,gGAAgG;IAChG,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,oFAAoF;IACpF,MAAM,CAAC,EAAE,YAAY,CAAC,YAAY,CAAA;IAClC,oFAAoF;IACpF,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,sJAY7B,oBAAoB,sBAiLtB,CAAA"}
462
462
  }
463
463
  declare module '@ibti-tech/chatbot/contexts/Chatbot/useChatFeedbackBox' {
464
464
  /** Parameters for sendUserRating from useChatFeedbackBox. */
package/dist/index.mjs CHANGED
@@ -887,7 +887,8 @@ var ChatbotProvider = /* @__PURE__ */ __name(({
887
887
  } = useChatbotMessages_default({
888
888
  apiURL,
889
889
  locale,
890
- publicHash: isReady ? publicHash : void 0,
890
+ // Pass publicHash always so init() can call welcome/completion with hash once visitorId is ready
891
+ publicHash,
891
892
  visitorId: isReady ? visitorId : void 0
892
893
  });
893
894
  const [opened, setOpened] = useState3(isOpen);
@@ -1050,9 +1051,14 @@ var Wrapper = styled.div`
1050
1051
 
1051
1052
  /* Mobile styles */
1052
1053
  @media screen and (max-width: ${breakpoints.tablet}px) {
1054
+ /* Top + opened: use svh so panel fits visible viewport (browser URL bar); padding keeps close button above home indicator */
1053
1055
  ${(props) => props.$opened && props.$verticalPosition === "top" && css`
1054
1056
  max-height: 100vh !important;
1057
+ max-height: 100svh !important;
1055
1058
  height: 100vh !important;
1059
+ height: 100svh !important;
1060
+ padding-bottom: env(safe-area-inset-bottom, 0px);
1061
+ box-sizing: border-box;
1056
1062
  `}
1057
1063
 
1058
1064
  ${(props) => props.$opened && props.$verticalPosition === "bottom" ? css`
@@ -1066,6 +1072,16 @@ var Wrapper = styled.div`
1066
1072
  transform: none !important;
1067
1073
  position: relative !important;
1068
1074
  ` : ""}
1075
+
1076
+ /* Keep close button (toggle) always visible: header, footer and toggle don't shrink */
1077
+ ${(props) => props.$opened ? css`
1078
+ & > *:nth-child(1),
1079
+ & > *:nth-child(2),
1080
+ & > *:nth-child(4),
1081
+ & > *:nth-child(5) {
1082
+ flex-shrink: 0 !important;
1083
+ }
1084
+ ` : ""}
1069
1085
  }
1070
1086
 
1071
1087
  /* Border radius based on vertical position */
@@ -1206,9 +1222,14 @@ var Wrapper = styled.div`
1206
1222
 
1207
1223
  @media screen and (max-width: ${breakpoints.tablet}px) {
1208
1224
  height: 100vh !important;
1225
+ height: 100svh !important;
1209
1226
  max-height: 100vh !important;
1227
+ max-height: 100svh !important;
1210
1228
  min-height: 100vh !important;
1229
+ min-height: 100svh !important;
1230
+ padding-bottom: env(safe-area-inset-bottom, 0px);
1211
1231
  overflow: hidden !important;
1232
+ box-sizing: border-box;
1212
1233
  }
1213
1234
  `}
1214
1235
  `;
@@ -1510,6 +1531,7 @@ var Wrapper4 = styled4.div`
1510
1531
  overflow-y: auto;
1511
1532
  flex: 1;
1512
1533
  min-width: 0;
1534
+ min-height: 0; /* keeps close button visible on mobile (flex column) */
1513
1535
  height: 100%;
1514
1536
  padding-right: ${(props) => props.theme.spacing.components.small};
1515
1537
  font-family: 'Montserrat', sans-serif !important;
@@ -2777,7 +2799,7 @@ var Wrapper9 = styled10.div`
2777
2799
  // package.json
2778
2800
  var package_default = {
2779
2801
  name: "@ibti-tech/chatbot",
2780
- version: "0.9.2",
2802
+ version: "0.9.5",
2781
2803
  description: "Chatbot system developed to be embedded in any website",
2782
2804
  packageManager: "yarn@3.6.4",
2783
2805
  main: "./dist/index.mjs",
@@ -3091,8 +3113,10 @@ var Wrapper10 = styled11.div`
3091
3113
  }
3092
3114
  @media screen and (max-width: ${breakpoints3.tablet}px) {
3093
3115
  padding-top: 0 !important;
3094
- top: ${topVal} !important;
3116
+ /* Account for safe area (notch/status bar) and browser chrome on mobile */
3117
+ top: max(${topVal}, env(safe-area-inset-top, 0px)) !important;
3095
3118
  height: 100vh;
3119
+ height: 100svh; /* small viewport: fits visible area with browser URL bar visible */
3096
3120
  }
3097
3121
  `;
3098
3122
  }
@@ -3119,7 +3143,8 @@ var Wrapper10 = styled11.div`
3119
3143
  @media screen and (max-width: ${breakpoints3.tablet}px) {
3120
3144
  height: ${barH}px !important;
3121
3145
  min-height: ${barH}px !important;
3122
- top: ${topVal} !important;
3146
+ /* Keep bar/toggle visible below browser UI and safe area on mobile */
3147
+ top: ${props.$topOffset !== void 0 ? topVal : "max(0px, env(safe-area-inset-top, 0px))"} !important;
3123
3148
  }
3124
3149
  `;
3125
3150
  }
@@ -3136,9 +3161,14 @@ var Wrapper10 = styled11.div`
3136
3161
  @media screen and (max-width: ${breakpoints3.tablet}px) {
3137
3162
  ${props.$opened ? css6`
3138
3163
  padding-top: 0 !important;
3139
- top: 0 !important;
3164
+ /* Safe area + browser chrome: keep close button visible on mobile */
3165
+ top: env(safe-area-inset-top, 0px) !important;
3140
3166
  height: 100vh;
3141
- ` : ""}
3167
+ height: 100svh;
3168
+ ` : css6`
3169
+ /* Bar closed: ensure toggle visible below browser UI */
3170
+ top: env(safe-area-inset-top, 0px) !important;
3171
+ `}
3142
3172
  }
3143
3173
  ` : css6`
3144
3174
  bottom: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibti-tech/chatbot",
3
- "version": "0.9.2",
3
+ "version": "0.9.5",
4
4
  "description": "Chatbot system developed to be embedded in any website",
5
5
  "packageManager": "yarn@3.6.4",
6
6
  "main": "./dist/index.mjs",