@zean-chat/react-native 0.1.18 → 0.1.19

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/i18n/en.d.ts CHANGED
@@ -26,7 +26,6 @@ export declare const en: {
26
26
  email_placeholder: string;
27
27
  email_submit: string;
28
28
  email_invalid: string;
29
- email_saved: string;
30
29
  error: string;
31
30
  code_prompt: string;
32
31
  code_prompt_earlier: string;
package/dist/i18n/fr.d.ts CHANGED
@@ -27,7 +27,6 @@ export declare const fr: {
27
27
  email_placeholder: string;
28
28
  email_submit: string;
29
29
  email_invalid: string;
30
- email_saved: string;
31
30
  error: string;
32
31
  code_prompt: string;
33
32
  code_prompt_earlier: string;
package/dist/index.js CHANGED
@@ -570,7 +570,7 @@ function createChatStore(backend, options) {
570
570
  }
571
571
  function watchMessages() {
572
572
  stopMessages?.();
573
- const after = !windowed && kept.length > 0 ? rereadFrom(kept.at(-1).createdAt, syncedAt) : void 0;
573
+ const after = !windowed && kept.length > 0 ? rereadFrom(kept[kept.length - 1].createdAt, syncedAt) : void 0;
574
574
  askedAfter = after;
575
575
  stopMessages = backend.watch(
576
576
  "messages",
@@ -6701,7 +6701,7 @@ function detailsFromUserAgent(userAgent, touchPoints = 0) {
6701
6701
  }
6702
6702
  const android = /Android (\d+(?:\.\d+)?)(?:; ([^;)]+?))?(?: Build\/[^;)]*)?[;)]/.exec(userAgent);
6703
6703
  if (android) {
6704
- const named = android.at(2)?.trim();
6704
+ const named = android[2]?.trim();
6705
6705
  const model = named && !HIDDEN_MODELS.has(named) ? named : void 0;
6706
6706
  const brand = model && brandOf(model);
6707
6707
  return {
@@ -6755,7 +6755,7 @@ function brandOf(model) {
6755
6755
  }
6756
6756
 
6757
6757
  // src/models/sdk.constants.ts
6758
- var SDK_VERSION = "0.1.18";
6758
+ var SDK_VERSION = "0.1.19";
6759
6759
  var OFFLINE_NOTICE_MS = 3e3;
6760
6760
  var ANDROID_NAVIGATION_BAR = 48;
6761
6761
  var DEFAULT_MAX_PHOTOS = 4;
@@ -7183,7 +7183,6 @@ var en = {
7183
7183
  email_placeholder: "you@example.com",
7184
7184
  email_submit: "Send",
7185
7185
  email_invalid: "Enter a valid email address.",
7186
- email_saved: "Thanks, we will write to {email}.",
7187
7186
  error: "Something went wrong. Try again.",
7188
7187
  code_prompt: "Chatted with us on another device? Get a code at {email} to see your conversation here.",
7189
7188
  code_prompt_earlier: "Wrote to us before signing in? Get a code at {email} to bring that conversation here.",
@@ -7242,7 +7241,6 @@ var fr = {
7242
7241
  email_placeholder: "vous@exemple.com",
7243
7242
  email_submit: "Envoyer",
7244
7243
  email_invalid: "Saisissez une adresse e-mail valide.",
7245
- email_saved: "Merci, nous vous \xE9crirons \xE0 {email}.",
7246
7244
  error: "Une erreur est survenue. R\xE9essayez.",
7247
7245
  code_prompt: "D\xE9j\xE0 \xE9chang\xE9 avec nous sur un autre appareil ? Recevez un code \xE0 {email} pour retrouver votre conversation ici.",
7248
7246
  code_prompt_earlier: "Vous nous avez \xE9crit avant de vous connecter ? Recevez un code \xE0 {email} pour retrouver cette conversation ici.",
@@ -8701,8 +8699,7 @@ function MessageList({ state }) {
8701
8699
  onScrollToIndexFailed: handleScrollToIndexFailed,
8702
8700
  ListHeaderComponent: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native21.View, { style: styles15.below, children: [
8703
8701
  state.teamTyping && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TypingBubble, { app, sender: state.teamTyping.sender }),
8704
- state.askEmail && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(EmailForm, { onSubmit: chat2.setEmail }),
8705
- state.email && (!state.online || state.emailGiven) && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native21.Text, { style: [styles15.saved, { color: colors.muted }], children: format(t.email_saved, { email: state.email }) })
8702
+ state.askEmail && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(EmailForm, { onSubmit: chat2.setEmail })
8706
8703
  ] }),
8707
8704
  ListFooterComponent: state.hasOlder ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native21.View, { style: styles15.above, children: state.loadingOlder ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Skeleton, { style: [styles15.bone, styles15.olderBone] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
8708
8705
  import_react_native21.Pressable,
@@ -8718,7 +8715,7 @@ function MessageList({ state }) {
8718
8715
  maintainVisibleContentPosition: scrolledUp ? { minIndexForVisible: 0 } : void 0,
8719
8716
  contentContainerStyle: styles15.content,
8720
8717
  keyboardShouldPersistTaps: "handled",
8721
- keyboardDismissMode: "on-drag",
8718
+ keyboardDismissMode: "none",
8722
8719
  style: styles15.list
8723
8720
  }
8724
8721
  ),
@@ -8745,7 +8742,6 @@ var styles15 = import_react_native21.StyleSheet.create({
8745
8742
  content: { flexGrow: 1, justifyContent: "flex-end", paddingBottom: 12, paddingTop: 4 },
8746
8743
  below: { gap: 10 },
8747
8744
  above: { alignItems: "center", paddingTop: 8 },
8748
- saved: { paddingTop: 10, paddingHorizontal: 16, fontSize: 12, textAlign: "center" },
8749
8745
  earlier: { paddingHorizontal: 14, paddingVertical: 6, borderRadius: RADII.pill },
8750
8746
  earlierText: { fontSize: 12, fontWeight: "600" },
8751
8747
  pressed: { opacity: 0.6 },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zean-chat/react-native",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "In-app support chat for React Native and Expo, iOS and Android. Pure JS, no native module. A free Intercom, Crisp and Zendesk mobile SDK alternative.",
5
5
  "keywords": [
6
6
  "react-native",