stream-chat-react-native-core 8.0.0-rc.8 → 8.0.0

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.
Files changed (128) hide show
  1. package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleView.js +33 -8
  2. package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleView.js.map +1 -1
  3. package/lib/commonjs/components/MessageList/MessageList.js +6 -5
  4. package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
  5. package/lib/commonjs/components/Poll/CreatePollContent.js +3 -3
  6. package/lib/commonjs/components/Poll/CreatePollContent.js.map +1 -1
  7. package/lib/commonjs/components/Poll/components/CreatePollOptions.js +3 -3
  8. package/lib/commonjs/components/Poll/components/CreatePollOptions.js.map +1 -1
  9. package/lib/commonjs/contexts/index.js +4 -4
  10. package/lib/commonjs/contexts/index.js.map +1 -1
  11. package/lib/commonjs/contexts/messageComposerContext/MessageComposerAPIContext.js +1 -12
  12. package/lib/commonjs/contexts/messageComposerContext/MessageComposerAPIContext.js.map +1 -1
  13. package/lib/commonjs/contexts/messageComposerContext/MessageComposerContext.js +8 -2
  14. package/lib/commonjs/contexts/messageComposerContext/MessageComposerContext.js.map +1 -1
  15. package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageComposer.js +62 -0
  16. package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageComposer.js.map +1 -0
  17. package/lib/commonjs/contexts/messageInputContext/hooks/useMessageComposer.js +3 -59
  18. package/lib/commonjs/contexts/messageInputContext/hooks/useMessageComposer.js.map +1 -1
  19. package/lib/commonjs/contexts/translationContext/TranslationContext.js +1 -4
  20. package/lib/commonjs/contexts/translationContext/TranslationContext.js.map +1 -1
  21. package/lib/commonjs/contexts/translationContext/index.js +37 -0
  22. package/lib/commonjs/contexts/translationContext/index.js.map +1 -0
  23. package/lib/commonjs/contexts/translationContext/isDayOrMoment.js +8 -0
  24. package/lib/commonjs/contexts/translationContext/isDayOrMoment.js.map +1 -0
  25. package/lib/commonjs/contexts/translationContext/types.js +4 -0
  26. package/lib/commonjs/contexts/translationContext/types.js.map +1 -0
  27. package/lib/commonjs/store/apis/queries/selectMessagesForChannels.js +1 -1
  28. package/lib/commonjs/utils/constants.js +2 -1
  29. package/lib/commonjs/utils/constants.js.map +1 -1
  30. package/lib/commonjs/utils/i18n/Streami18n.js.map +1 -1
  31. package/lib/commonjs/utils/i18n/getDateString.js +2 -2
  32. package/lib/commonjs/utils/i18n/getDateString.js.map +1 -1
  33. package/lib/commonjs/utils/i18n/predefinedFormatters.js.map +1 -1
  34. package/lib/commonjs/utils/i18n/types.js +4 -0
  35. package/lib/commonjs/utils/i18n/types.js.map +1 -0
  36. package/lib/commonjs/version.json +1 -1
  37. package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleView.js +33 -8
  38. package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleView.js.map +1 -1
  39. package/lib/module/components/MessageList/MessageList.js +6 -5
  40. package/lib/module/components/MessageList/MessageList.js.map +1 -1
  41. package/lib/module/components/Poll/CreatePollContent.js +3 -3
  42. package/lib/module/components/Poll/CreatePollContent.js.map +1 -1
  43. package/lib/module/components/Poll/components/CreatePollOptions.js +3 -3
  44. package/lib/module/components/Poll/components/CreatePollOptions.js.map +1 -1
  45. package/lib/module/contexts/index.js +4 -4
  46. package/lib/module/contexts/index.js.map +1 -1
  47. package/lib/module/contexts/messageComposerContext/MessageComposerAPIContext.js +1 -12
  48. package/lib/module/contexts/messageComposerContext/MessageComposerAPIContext.js.map +1 -1
  49. package/lib/module/contexts/messageComposerContext/MessageComposerContext.js +8 -2
  50. package/lib/module/contexts/messageComposerContext/MessageComposerContext.js.map +1 -1
  51. package/lib/module/contexts/messageInputContext/hooks/useCreateMessageComposer.js +62 -0
  52. package/lib/module/contexts/messageInputContext/hooks/useCreateMessageComposer.js.map +1 -0
  53. package/lib/module/contexts/messageInputContext/hooks/useMessageComposer.js +3 -59
  54. package/lib/module/contexts/messageInputContext/hooks/useMessageComposer.js.map +1 -1
  55. package/lib/module/contexts/translationContext/TranslationContext.js +1 -4
  56. package/lib/module/contexts/translationContext/TranslationContext.js.map +1 -1
  57. package/lib/module/contexts/translationContext/index.js +37 -0
  58. package/lib/module/contexts/translationContext/index.js.map +1 -0
  59. package/lib/module/contexts/translationContext/isDayOrMoment.js +8 -0
  60. package/lib/module/contexts/translationContext/isDayOrMoment.js.map +1 -0
  61. package/lib/module/contexts/translationContext/types.js +4 -0
  62. package/lib/module/contexts/translationContext/types.js.map +1 -0
  63. package/lib/module/store/apis/queries/selectMessagesForChannels.js +1 -1
  64. package/lib/module/utils/constants.js +2 -1
  65. package/lib/module/utils/constants.js.map +1 -1
  66. package/lib/module/utils/i18n/Streami18n.js.map +1 -1
  67. package/lib/module/utils/i18n/getDateString.js +2 -2
  68. package/lib/module/utils/i18n/getDateString.js.map +1 -1
  69. package/lib/module/utils/i18n/predefinedFormatters.js.map +1 -1
  70. package/lib/module/utils/i18n/types.js +4 -0
  71. package/lib/module/utils/i18n/types.js.map +1 -0
  72. package/lib/module/version.json +1 -1
  73. package/lib/typescript/components/KeyboardCompatibleView/KeyboardCompatibleView.d.ts +7 -0
  74. package/lib/typescript/components/KeyboardCompatibleView/KeyboardCompatibleView.d.ts.map +1 -1
  75. package/lib/typescript/components/MessageList/MessageList.d.ts.map +1 -1
  76. package/lib/typescript/components/Poll/CreatePollContent.d.ts +0 -1
  77. package/lib/typescript/components/Poll/CreatePollContent.d.ts.map +1 -1
  78. package/lib/typescript/contexts/index.d.ts +1 -1
  79. package/lib/typescript/contexts/index.d.ts.map +1 -1
  80. package/lib/typescript/contexts/messageComposerContext/MessageComposerAPIContext.d.ts +1 -1
  81. package/lib/typescript/contexts/messageComposerContext/MessageComposerAPIContext.d.ts.map +1 -1
  82. package/lib/typescript/contexts/messageComposerContext/MessageComposerContext.d.ts.map +1 -1
  83. package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageComposer.d.ts +4 -0
  84. package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageComposer.d.ts.map +1 -0
  85. package/lib/typescript/contexts/messageInputContext/hooks/useMessageComposer.d.ts +1 -4
  86. package/lib/typescript/contexts/messageInputContext/hooks/useMessageComposer.d.ts.map +1 -1
  87. package/lib/typescript/contexts/translationContext/TranslationContext.d.ts +1 -11
  88. package/lib/typescript/contexts/translationContext/TranslationContext.d.ts.map +1 -1
  89. package/lib/typescript/contexts/translationContext/index.d.ts +4 -0
  90. package/lib/typescript/contexts/translationContext/index.d.ts.map +1 -0
  91. package/lib/typescript/contexts/translationContext/isDayOrMoment.d.ts +5 -0
  92. package/lib/typescript/contexts/translationContext/isDayOrMoment.d.ts.map +1 -0
  93. package/lib/typescript/contexts/translationContext/types.d.ts +11 -0
  94. package/lib/typescript/contexts/translationContext/types.d.ts.map +1 -0
  95. package/lib/typescript/hooks/useStreami18n.d.ts +1 -1
  96. package/lib/typescript/hooks/useStreami18n.d.ts.map +1 -1
  97. package/lib/typescript/utils/constants.d.ts +1 -0
  98. package/lib/typescript/utils/constants.d.ts.map +1 -1
  99. package/lib/typescript/utils/i18n/Streami18n.d.ts +2 -2
  100. package/lib/typescript/utils/i18n/Streami18n.d.ts.map +1 -1
  101. package/lib/typescript/utils/i18n/getDateString.d.ts +2 -2
  102. package/lib/typescript/utils/i18n/getDateString.d.ts.map +1 -1
  103. package/lib/typescript/utils/i18n/predefinedFormatters.d.ts +1 -11
  104. package/lib/typescript/utils/i18n/predefinedFormatters.d.ts.map +1 -1
  105. package/lib/typescript/utils/i18n/types.d.ts +12 -0
  106. package/lib/typescript/utils/i18n/types.d.ts.map +1 -0
  107. package/package.json +7 -7
  108. package/src/components/KeyboardCompatibleView/KeyboardCompatibleView.tsx +38 -5
  109. package/src/components/MessageList/MessageList.tsx +7 -5
  110. package/src/components/Poll/CreatePollContent.tsx +1 -2
  111. package/src/components/Poll/components/CreatePollOptions.tsx +1 -1
  112. package/src/contexts/index.ts +1 -1
  113. package/src/contexts/messageComposerContext/MessageComposerAPIContext.tsx +3 -13
  114. package/src/contexts/messageComposerContext/MessageComposerContext.tsx +9 -2
  115. package/src/contexts/messageInputContext/hooks/useCreateMessageComposer.ts +88 -0
  116. package/src/contexts/messageInputContext/hooks/useMessageComposer.ts +2 -90
  117. package/src/contexts/translationContext/TranslationContext.tsx +2 -17
  118. package/src/contexts/translationContext/index.ts +3 -0
  119. package/src/contexts/translationContext/isDayOrMoment.ts +8 -0
  120. package/src/contexts/translationContext/types.ts +15 -0
  121. package/src/hooks/useStreami18n.ts +1 -1
  122. package/src/store/apis/queries/selectMessagesForChannels.ts +1 -1
  123. package/src/utils/constants.ts +1 -0
  124. package/src/utils/i18n/Streami18n.ts +3 -6
  125. package/src/utils/i18n/getDateString.ts +3 -5
  126. package/src/utils/i18n/predefinedFormatters.ts +1 -23
  127. package/src/utils/i18n/types.ts +23 -0
  128. package/src/version.json +1 -1
@@ -1,5 +1,8 @@
1
1
  import React from 'react';
2
2
  import { AppStateStatus, EmitterSubscription, KeyboardAvoidingViewProps, KeyboardEvent, KeyboardEventListener, KeyboardMetrics, LayoutChangeEvent, LayoutRectangle, NativeEventSubscription, View } from 'react-native';
3
+ type State = {
4
+ bottom: number;
5
+ };
3
6
  /**
4
7
  * View that moves out of the way when the keyboard appears by automatically
5
8
  * adjusting its height, position, or bottom padding.
@@ -18,15 +21,18 @@ export declare class KeyboardCompatibleView extends React.Component<KeyboardAvoi
18
21
  _appStateSubscription: NativeEventSubscription | null;
19
22
  viewRef: React.RefObject<View | null>;
20
23
  _initialFrameHeight: number;
24
+ _bottom: number;
21
25
  constructor(props: KeyboardAvoidingViewProps);
22
26
  _relativeKeyboardHeight(keyboardFrame: KeyboardMetrics): number;
23
27
  _onKeyboardChange: KeyboardEventListener;
24
28
  _onLayout: (event: LayoutChangeEvent) => void;
29
+ _setBottom: (value: number) => void;
25
30
  _updateBottomIfNecessary: () => void;
26
31
  _handleAppStateChange: (nextAppState: AppStateStatus) => void;
27
32
  setKeyboardListeners: () => void;
28
33
  unsetKeyboardListeners: () => void;
29
34
  dismissKeyboard: () => Promise<void> | undefined;
35
+ componentDidUpdate(_: KeyboardAvoidingViewProps, prevState: State): void;
30
36
  componentDidMount(): void;
31
37
  componentWillUnmount(): void;
32
38
  keyboardContextValue: {
@@ -34,4 +40,5 @@ export declare class KeyboardCompatibleView extends React.Component<KeyboardAvoi
34
40
  };
35
41
  render(): React.JSX.Element;
36
42
  }
43
+ export {};
37
44
  //# sourceMappingURL=KeyboardCompatibleView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"KeyboardCompatibleView.d.ts","sourceRoot":"","sources":["../../../../src/components/KeyboardCompatibleView/KeyboardCompatibleView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,cAAc,EAEd,mBAAmB,EAEnB,yBAAyB,EACzB,aAAa,EACb,qBAAqB,EACrB,eAAe,EAEf,iBAAiB,EACjB,eAAe,EACf,uBAAuB,EAIvB,IAAI,EACL,MAAM,cAAc,CAAC;AAItB;;;;;GAKG;AACH,qBAAa,sBAAuB,SAAQ,KAAK,CAAC,SAAS,CACzD,yBAAyB,EACzB;IAAE,QAAQ,EAAE,cAAc,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,OAAO,CAAA;CAAE,CACtE;IACC,MAAM,CAAC,YAAY,EAAE,IAAI,CACvB,yBAAyB,EACzB,UAAU,GAAG,SAAS,GAAG,wBAAwB,CAClD,CAIC;IAEF,MAAM,EAAE,eAAe,GAAG,IAAI,CAAQ;IACtC,cAAc,EAAE,aAAa,GAAG,IAAI,CAAQ;IAC5C,cAAc,EAAE,mBAAmB,EAAE,CAAM;IAC3C,qBAAqB,EAAE,uBAAuB,GAAG,IAAI,CAAQ;IAC7D,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACtC,mBAAmB,SAAK;gBACZ,KAAK,EAAE,yBAAyB;IAU5C,uBAAuB,CAAC,aAAa,EAAE,eAAe;IA+BtD,iBAAiB,EAAE,qBAAqB,CAGtC;IAEF,SAAS,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAQ3C;IAEF,wBAAwB,aAwBtB;IAEF,qBAAqB,GAAI,cAAc,cAAc,UAUnD;IAEF,oBAAoB,aAoBlB;IAEF,sBAAsB,aAKpB;IAEF,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS,CAa9C;IAEF,iBAAiB;IAKjB,oBAAoB;IAapB,oBAAoB;+BAjCG,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS;MAiCiB;IAEjE,MAAM;CAqEP"}
1
+ {"version":3,"file":"KeyboardCompatibleView.d.ts","sourceRoot":"","sources":["../../../../src/components/KeyboardCompatibleView/KeyboardCompatibleView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,cAAc,EAEd,mBAAmB,EAEnB,yBAAyB,EACzB,aAAa,EACb,qBAAqB,EACrB,eAAe,EAEf,iBAAiB,EACjB,eAAe,EACf,uBAAuB,EAIvB,IAAI,EACL,MAAM,cAAc,CAAC;AAItB,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;GAKG;AACH,qBAAa,sBAAuB,SAAQ,KAAK,CAAC,SAAS,CACzD,yBAAyB,EACzB;IAAE,QAAQ,EAAE,cAAc,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,OAAO,CAAA;CAAE,CACtE;IACC,MAAM,CAAC,YAAY,EAAE,IAAI,CACvB,yBAAyB,EACzB,UAAU,GAAG,SAAS,GAAG,wBAAwB,CAClD,CAIC;IAEF,MAAM,EAAE,eAAe,GAAG,IAAI,CAAQ;IACtC,cAAc,EAAE,aAAa,GAAG,IAAI,CAAQ;IAC5C,cAAc,EAAE,mBAA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CAAC,CAAC;IAC3C;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,kBAAkB,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;IACjE;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,CAAC,YAAY,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;CACnE,CAAC;AA4iCJ,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;AAEpE,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,sBAoGlD,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { CreatePollContentContextValue, InputMessageInputContextValue } from '../../contexts';
3
- export declare const POLL_OPTION_HEIGHT = 71;
4
3
  export declare const CreatePollContent: () => React.JSX.Element;
5
4
  export declare const CreatePoll: ({ closePollCreationDialog, CreatePollContent: CreatePollContentOverride, createPollOptionHeight, sendMessage, }: Pick<CreatePollContentContextValue, "createPollOptionHeight" | "closePollCreationDialog" | "sendMessage"> & Pick<InputMessageInputContextValue, "CreatePollContent">) => React.JSX.Element;
6
5
  //# sourceMappingURL=CreatePollContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CreatePollContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Poll/CreatePollContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAchE,OAAO,EACL,6BAA6B,EAE7B,6BAA6B,EAI9B,MAAM,gBAAgB,CAAC;AAQxB,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,eAAO,MAAM,iBAAiB,yBA0H7B,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,iHAKxB,IAAI,CACL,6BAA6B,EAC7B,wBAAwB,GAAG,yBAAyB,GAAG,aAAa,CACrE,GACC,IAAI,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,sBAwBzD,CAAC"}
1
+ {"version":3,"file":"CreatePollContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Poll/CreatePollContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAchE,OAAO,EACL,6BAA6B,EAE7B,6BAA6B,EAI9B,MAAM,gBAAgB,CAAC;AASxB,eAAO,MAAM,iBAAiB,yBA0H7B,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,iHAKxB,IAAI,CACL,6BAA6B,EAC7B,wBAAwB,GAAG,yBAAyB,GAAG,aAAa,CACrE,GACC,IAAI,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,sBAwBzD,CAAC"}
@@ -22,7 +22,7 @@ export * from './themeContext/utils/theme';
22
22
  export * from './threadContext/ThreadContext';
23
23
  export * from './threadsContext/ThreadsContext';
24
24
  export * from './threadsContext/ThreadListItemContext';
25
- export * from './translationContext/TranslationContext';
25
+ export * from './translationContext';
26
26
  export * from './typingContext/TypingContext';
27
27
  export * from './utils/getDisplayName';
28
28
  export * from './pollContext';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contexts/index.ts"],"names":[],"mappings":"AAAA,cAAc,mDAAmD,CAAC;AAClE,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,0DAA0D,CAAC;AACzE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,uDAAuD,CAAC;AACtE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,mCAAmC,CAAC;AAClD,cAAc,2DAA2D,CAAC;AAC1E,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,iDAAiD,CAAC;AAChE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contexts/index.ts"],"names":[],"mappings":"AAAA,cAAc,mDAAmD,CAAC;AAClE,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,0DAA0D,CAAC;AACzE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,uDAAuD,CAAC;AACtE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,mCAAmC,CAAC;AAClD,cAAc,2DAA2D,CAAC;AAC1E,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,iDAAiD,CAAC;AAChE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,wCAAwC,CAAC;AACvD,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC"}
@@ -7,7 +7,7 @@ export type MessageComposerAPIContextValue = {
7
7
  };
8
8
  export declare const MessageComposerAPIContext: React.Context<MessageComposerAPIContextValue>;
9
9
  type Props = React.PropsWithChildren<{
10
- value: Pick<MessageComposerAPIContextValue, 'setEditingState' | 'clearEditingState'>;
10
+ value: MessageComposerAPIContextValue;
11
11
  }>;
12
12
  export declare const MessageComposerAPIProvider: ({ children, value }: Props) => React.JSX.Element;
13
13
  export declare const useMessageComposerAPIContext: () => MessageComposerAPIContextValue;
@@ -1 +1 @@
1
- {"version":3,"file":"MessageComposerAPIContext.d.ts","sourceRoot":"","sources":["../../../../src/contexts/messageComposerContext/MessageComposerAPIContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAOjE,MAAM,MAAM,8BAA8B,GAAG;IAC3C,gBAAgB,EAAE,eAAe,CAAC,kBAAkB,CAAC,CAAC;IACtD,eAAe,EAAE,CAAC,OAAO,CAAC,EAAE,YAAY,KAAK,IAAI,CAAC;IAClD,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,yBAAyB,+CAErC,CAAC;AAEF,KAAK,KAAK,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACnC,KAAK,EAAE,IAAI,CAAC,8BAA8B,EAAE,iBAAiB,GAAG,mBAAmB,CAAC,CAAC;CACtF,CAAC,CAAC;AAEH,eAAO,MAAM,0BAA0B,GAAI,qBAAqB,KAAK,sBAcpE,CAAC;AAEF,eAAO,MAAM,4BAA4B,sCAYxC,CAAC"}
1
+ {"version":3,"file":"MessageComposerAPIContext.d.ts","sourceRoot":"","sources":["../../../../src/contexts/messageComposerContext/MessageComposerAPIContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAKjE,MAAM,MAAM,8BAA8B,GAAG;IAC3C,gBAAgB,EAAE,eAAe,CAAC,kBAAkB,CAAC,CAAC;IACtD,eAAe,EAAE,CAAC,OAAO,CAAC,EAAE,YAAY,KAAK,IAAI,CAAC;IAClD,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,yBAAyB,+CAErC,CAAC;AAEF,KAAK,KAAK,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACnC,KAAK,EAAE,8BAA8B,CAAC;CACvC,CAAC,CAAC;AAEH,eAAO,MAAM,0BAA0B,GAAI,qBAAqB,KAAK,sBAMpE,CAAC;AAEF,eAAO,MAAM,4BAA4B,sCAYxC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MessageComposerContext.d.ts","sourceRoot":"","sources":["../../../../src/contexts/messageComposerContext/MessageComposerContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAO3C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIpE,MAAM,MAAM,2BAA2B,GAAG;IACxC,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;IACjC,MAAM,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACrC,cAAc,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IACrD;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,sBAAsB,4CAElC,CAAC;AAEF,KAAK,KAAK,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACnC,KAAK,EAAE,IAAI,CAAC,2BAA2B,EAAE,SAAS,GAAG,gBAAgB,GAAG,QAAQ,CAAC,CAAC;CACnF,CAAC,CAAC;AAEH,eAAO,MAAM,uBAAuB,GAAI,qBAAqB,KAAK,sBA2BjE,CAAC;AAEF,eAAO,MAAM,yBAAyB,mCAUrC,CAAC"}
1
+ {"version":3,"file":"MessageComposerContext.d.ts","sourceRoot":"","sources":["../../../../src/contexts/messageComposerContext/MessageComposerContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAO3C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIpE,MAAM,MAAM,2BAA2B,GAAG;IACxC,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;IACjC,MAAM,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACrC,cAAc,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IACrD;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,sBAAsB,4CAElC,CAAC;AAEF,KAAK,KAAK,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACnC,KAAK,EAAE,IAAI,CAAC,2BAA2B,EAAE,SAAS,GAAG,gBAAgB,GAAG,QAAQ,CAAC,CAAC;CACnF,CAAC,CAAC;AAEH,eAAO,MAAM,uBAAuB,GAAI,qBAAqB,KAAK,sBAiCjE,CAAC;AAEF,eAAO,MAAM,yBAAyB,mCAUrC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { MessageComposer } from 'stream-chat';
2
+ import { MessageComposerContextValue } from '../../messageComposerContext/MessageComposerContext';
3
+ export declare const useCreateMessageComposer: ({ editing: editedMessage, thread: parentMessage, threadInstance, channel, }: Pick<MessageComposerContextValue, "channel" | "threadInstance" | "thread" | "editing">) => MessageComposer;
4
+ //# sourceMappingURL=useCreateMessageComposer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCreateMessageComposer.d.ts","sourceRoot":"","sources":["../../../../../src/contexts/messageInputContext/hooks/useCreateMessageComposer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,qDAAqD,CAAC;AAIlG,eAAO,MAAM,wBAAwB,GAAI,6EAKtC,IAAI,CAAC,2BAA2B,EAAE,SAAS,GAAG,gBAAgB,GAAG,QAAQ,GAAG,SAAS,CAAC,oBAyExF,CAAC"}
@@ -1,5 +1,2 @@
1
- import { MessageComposer } from 'stream-chat';
2
- import { MessageComposerContextValue } from '../../messageComposerContext/MessageComposerContext';
3
- export declare const useMessageComposer: () => MessageComposer;
4
- export declare const useCreateMessageComposer: ({ editing: editedMessage, thread: parentMessage, threadInstance, channel, }: Pick<MessageComposerContextValue, "channel" | "threadInstance" | "thread" | "editing">) => MessageComposer;
1
+ export declare const useMessageComposer: () => import("stream-chat").MessageComposer;
5
2
  //# sourceMappingURL=useMessageComposer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMessageComposer.d.ts","sourceRoot":"","sources":["../../../../../src/contexts/messageInputContext/hooks/useMessageComposer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnE,OAAO,EACL,2BAA2B,EAE5B,MAAM,qDAAqD,CAAC;AAI7D,eAAO,MAAM,kBAAkB,uBAI9B,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,6EAKtC,IAAI,CAAC,2BAA2B,EAAE,SAAS,GAAG,gBAAgB,GAAG,QAAQ,GAAG,SAAS,CAAC,oBAyExF,CAAC"}
1
+ {"version":3,"file":"useMessageComposer.d.ts","sourceRoot":"","sources":["../../../../../src/contexts/messageInputContext/hooks/useMessageComposer.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,6CAI9B,CAAC"}
@@ -1,17 +1,7 @@
1
1
  import React from 'react';
2
- import Dayjs from 'dayjs';
3
- import type { TFunction } from 'i18next';
4
- import type { Moment } from 'moment-timezone';
5
2
  import type { TranslationLanguages } from 'stream-chat';
3
+ import { TranslatorFunctions } from './types';
6
4
  export declare const DEFAULT_USER_LANGUAGE: TranslationLanguages;
7
- export declare const isDayOrMoment: (output: TDateTimeParserOutput) => output is Dayjs.Dayjs | Moment;
8
- export type TDateTimeParserInput = string | number | Date;
9
- export type TDateTimeParserOutput = string | number | Date | Dayjs.Dayjs | Moment;
10
- export type TDateTimeParser = (input?: TDateTimeParserInput) => TDateTimeParserOutput;
11
- export type TranslatorFunctions = {
12
- t: TFunction;
13
- tDateTimeParser: TDateTimeParser;
14
- };
15
5
  export type TranslationContextValue = TranslatorFunctions & {
16
6
  userLanguage: TranslationLanguages;
17
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TranslationContext.d.ts","sourceRoot":"","sources":["../../../../src/contexts/translationContext/TranslationContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAKxD,eAAO,MAAM,qBAAqB,EAAE,oBAA2B,CAAC;AAEhE,eAAO,MAAM,aAAa,GAAI,QAAQ,qBAAqB,KAAG,MAAM,IAAI,KAAK,CAAC,KAAK,GAAG,MACrC,CAAC;AAElD,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAE1D,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC;AAElF,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,CAAC,EAAE,oBAAoB,KAAK,qBAAqB,CAAC;AAEtF,MAAM,MAAM,mBAAmB,GAAG;IAChC,CAAC,EAAE,SAAS,CAAC;IACb,eAAe,EAAE,eAAe,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,mBAAmB,GAAG;IAC1D,YAAY,EAAE,oBAAoB,CAAC;CACpC,CAAC;AAQF,eAAO,MAAM,kBAAkB,wCAE9B,CAAC;AAEF,KAAK,KAAK,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACnC,KAAK,EAAE,uBAAuB,CAAC;CAChC,CAAC,CAAC;AAEH,eAAO,MAAM,mBAAmB,GAAI,qBAAqB,KAAK,sBAE7D,CAAC;AAEF,eAAO,MAAM,qBAAqB,+BAUjC,CAAC"}
1
+ {"version":3,"file":"TranslationContext.d.ts","sourceRoot":"","sources":["../../../../src/contexts/translationContext/TranslationContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAK9C,eAAO,MAAM,qBAAqB,EAAE,oBAA2B,CAAC;AAEhE,MAAM,MAAM,uBAAuB,GAAG,mBAAmB,GAAG;IAC1D,YAAY,EAAE,oBAAoB,CAAC;CACpC,CAAC;AAQF,eAAO,MAAM,kBAAkB,wCAE9B,CAAC;AAEF,KAAK,KAAK,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACnC,KAAK,EAAE,uBAAuB,CAAC;CAChC,CAAC,CAAC;AAEH,eAAO,MAAM,mBAAmB,GAAI,qBAAqB,KAAK,sBAE7D,CAAC;AAEF,eAAO,MAAM,qBAAqB,+BAUjC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './TranslationContext';
2
+ export * from './types';
3
+ export * from './isDayOrMoment';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/contexts/translationContext/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import Dayjs from 'dayjs';
2
+ import type { Moment } from 'moment-timezone';
3
+ import { TDateTimeParserOutput } from './types';
4
+ export declare const isDayOrMoment: (output: TDateTimeParserOutput) => output is Dayjs.Dayjs | Moment;
5
+ //# sourceMappingURL=isDayOrMoment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isDayOrMoment.d.ts","sourceRoot":"","sources":["../../../../src/contexts/translationContext/isDayOrMoment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,aAAa,GAAI,QAAQ,qBAAqB,KAAG,MAAM,IAAI,KAAK,CAAC,KAAK,GAAG,MACrC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import Dayjs from 'dayjs';
2
+ import type { TFunction } from 'i18next';
3
+ import type { Moment } from 'moment-timezone';
4
+ export type TDateTimeParserInput = string | number | Date;
5
+ export type TDateTimeParserOutput = string | number | Date | Dayjs.Dayjs | Moment;
6
+ export type TDateTimeParser = (input?: TDateTimeParserInput) => TDateTimeParserOutput;
7
+ export type TranslatorFunctions = {
8
+ t: TFunction;
9
+ tDateTimeParser: TDateTimeParser;
10
+ };
11
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/contexts/translationContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAE1D,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC;AAElF,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,CAAC,EAAE,oBAAoB,KAAK,qBAAqB,CAAC;AAEtF,MAAM,MAAM,mBAAmB,GAAG;IAChC,CAAC,EAAE,SAAS,CAAC;IACb,eAAe,EAAE,eAAe,CAAC;CAClC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { TranslatorFunctions } from '../contexts/translationContext/TranslationContext';
1
+ import type { TranslatorFunctions } from '../contexts/translationContext/types';
2
2
  import { Streami18n } from '../utils/i18n/Streami18n';
3
3
  export declare const useStreami18n: (i18nInstance?: Streami18n) => TranslatorFunctions;
4
4
  //# sourceMappingURL=useStreami18n.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useStreami18n.d.ts","sourceRoot":"","sources":["../../../src/hooks/useStreami18n.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AAC7F,OAAO,EAA6B,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEjF,eAAO,MAAM,aAAa,GAAI,eAAe,UAAU,wBA4CtD,CAAC"}
1
+ {"version":3,"file":"useStreami18n.d.ts","sourceRoot":"","sources":["../../../src/hooks/useStreami18n.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAA6B,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEjF,eAAO,MAAM,aAAa,GAAI,eAAe,UAAU,wBA4CtD,CAAC"}
@@ -4,4 +4,5 @@ export declare const defaultMentionAllAppUsersQuery: {
4
4
  options: {};
5
5
  sort: {};
6
6
  };
7
+ export declare const POLL_OPTION_HEIGHT = 71;
7
8
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mCAAmC,KAAK,CAAC;AACtD,eAAO,MAAM,8BAA8B;;;;CAI1C,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mCAAmC,KAAK,CAAC;AACtD,eAAO,MAAM,8BAA8B;;;;CAI1C,CAAC;AACF,eAAO,MAAM,kBAAkB,KAAK,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import Dayjs from 'dayjs';
2
2
  import { FallbackLng, TFunction } from 'i18next';
3
3
  import type momentTimezone from 'moment-timezone';
4
- import { CustomFormatters, PredefinedFormatters } from './predefinedFormatters';
5
- import type { TDateTimeParser } from '../../contexts/translationContext/TranslationContext';
4
+ import { CustomFormatters, PredefinedFormatters } from './types';
5
+ import type { TDateTimeParser } from '../../contexts/translationContext/types';
6
6
  import enTranslations from '../../i18n/en.json';
7
7
  import 'dayjs/locale/es';
8
8
  import 'dayjs/locale/fr';
@@ -1 +1 @@
1
- {"version":3,"file":"Streami18n.d.ts","sourceRoot":"","sources":["../../../../src/utils/i18n/Streami18n.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAa,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEvD,OAAO,KAAK,cAAc,MAAM,iBAAiB,CAAC;AAGlD,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EAErB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sDAAsD,CAAC;AAC5F,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAahD,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,oBAAoB,CAAC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GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC;IASvD;;;OAGG;IACG,WAAW,CAAC,QAAQ,EAAE,MAAM;IAsBlC,2BAA2B,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI;;;IAW5D,8BAA8B,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI;;;IAW/D,iBAAiB,CAAC,SAAS,EAAE,SAAS;CAQvC"}
@@ -1,5 +1,5 @@
1
- import type { TimestampFormatterOptions } from './predefinedFormatters';
2
- import { TranslatorFunctions } from '../../contexts/translationContext/TranslationContext';
1
+ import { TimestampFormatterOptions } from './types';
2
+ import { TranslatorFunctions } from '../../contexts/translationContext';
3
3
  type DateFormatterOptions = TimestampFormatterOptions & Partial<TranslatorFunctions> & {
4
4
  /**
5
5
  * The timestamp to be formatted.
@@ -1 +1 @@
1
- {"version":3,"file":"getDateString.d.ts","sourceRoot":"","sources":["../../../../src/utils/i18n/getDateString.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAExE,OAAO,EAEL,mBAAmB,EACpB,MAAM,sDAAsD,CAAC;AAE9D,KAAK,oBAAoB,GAAG,yBAAyB,GACnD,OAAO,CAAC,mBAAmB,CAAC,GAAG;IAC7B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAIrB,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC,CAAC;AAEJ,eAAO,MAAM,wBAAwB,oFAC8C,CAAC;AAEpF;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,eAAe,EACf,IAAI,EACJ,MAAM,EACN,CAAC,EACD,eAAe,EACf,uBAAuB,GACxB,EAAE,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CA4CpD"}
1
+ {"version":3,"file":"getDateString.d.ts","sourceRoot":"","sources":["../../../../src/utils/i18n/getDateString.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAGxE,KAAK,oBAAoB,GAAG,yBAAyB,GACnD,OAAO,CAAC,mBAAmB,CAAC,GAAG;IAC7B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAIrB,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC,CAAC;AAEJ,eAAO,MAAM,wBAAwB,oFAC8C,CAAC;AAEpF;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,eAAe,EACf,IAAI,EACJ,MAAM,EACN,CAAC,EACD,eAAe,EACf,uBAAuB,GACxB,EAAE,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CA4CpD"}
@@ -1,13 +1,3 @@
1
- import { Streami18n } from './Streami18n';
2
- export type TimestampFormatterOptions = {
3
- calendar?: boolean | null;
4
- calendarFormats?: Record<string, string>;
5
- format?: string;
6
- };
7
- export type FormatterFactory<V> = (streamI18n: Streami18n) => (value: V, lng: string | undefined, options: Record<string, unknown>) => string;
8
- export type CustomFormatters = Record<string, FormatterFactory<any>>;
9
- export type PredefinedFormatters = {
10
- timestampFormatter: FormatterFactory<string | Date>;
11
- };
1
+ import { PredefinedFormatters } from './types';
12
2
  export declare const predefinedFormatters: PredefinedFormatters;
13
3
  //# sourceMappingURL=predefinedFormatters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"predefinedFormatters.d.ts","sourceRoot":"","sources":["../../../../src/utils/i18n/predefinedFormatters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,MAAM,yBAAyB,GAAG;IAEtC,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAE1B,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEzC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,CAChC,UAAU,EAAE,UAAU,KACnB,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC;AAKrF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;AAErE,MAAM,MAAM,oBAAoB,GAAG;IACjC,kBAAkB,EAAE,gBAAgB,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACrD,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,oBAqClC,CAAC"}
1
+ {"version":3,"file":"predefinedFormatters.d.ts","sourceRoot":"","sources":["../../../../src/utils/i18n/predefinedFormatters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAA6B,MAAM,SAAS,CAAC;AAE1E,eAAO,MAAM,oBAAoB,EAAE,oBAqClC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { Streami18n } from './Streami18n';
2
+ export type FormatterFactory<V> = (streamI18n: Streami18n) => (value: V, lng: string | undefined, options: Record<string, unknown>) => string;
3
+ export type CustomFormatters = Record<string, FormatterFactory<any>>;
4
+ export type TimestampFormatterOptions = {
5
+ calendar?: boolean | null;
6
+ calendarFormats?: Record<string, string>;
7
+ format?: string;
8
+ };
9
+ export type PredefinedFormatters = {
10
+ timestampFormatter: FormatterFactory<string | Date>;
11
+ };
12
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/utils/i18n/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,CAChC,UAAU,EAAE,UAAU,KACnB,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC;AAKrF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;AAErE,MAAM,MAAM,yBAAyB,GAAG;IAEtC,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAE1B,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEzC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,kBAAkB,EAAE,gBAAgB,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACrD,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stream-chat-react-native-core",
3
3
  "description": "The official React Native and Expo components for Stream Chat, a service for building chat applications",
4
- "version": "8.0.0-rc.8",
4
+ "version": "8.0.0",
5
5
  "author": {
6
6
  "company": "Stream.io Inc",
7
7
  "name": "Stream.io Inc"
@@ -82,14 +82,14 @@
82
82
  "use-sync-external-store": "^1.5.0"
83
83
  },
84
84
  "peerDependencies": {
85
- "@emoji-mart/data": "^1.1.0",
86
- "@op-engineering/op-sqlite": ">=9.3.0",
85
+ "@emoji-mart/data": ">=1.1.0",
86
+ "@op-engineering/op-sqlite": ">=14.0.0",
87
87
  "@react-native-community/netinfo": ">=11.3.1",
88
- "emoji-mart": "^5.4.0",
89
- "react-native": ">=0.71.0",
90
- "react-native-gesture-handler": ">=2.16.1",
88
+ "emoji-mart": ">=5.4.0",
89
+ "react-native": ">=0.73.0",
90
+ "react-native-gesture-handler": ">=2.18.0",
91
91
  "react-native-reanimated": ">=3.16.0",
92
- "react-native-svg": ">=13.6.0"
92
+ "react-native-svg": ">=15.8.0"
93
93
  },
94
94
  "peerDependenciesMeta": {
95
95
  "@op-engineering/op-sqlite": {
@@ -21,6 +21,10 @@ import {
21
21
 
22
22
  import { KeyboardProvider } from '../../contexts/keyboardContext/KeyboardContext';
23
23
 
24
+ type State = {
25
+ bottom: number;
26
+ };
27
+
24
28
  /**
25
29
  * View that moves out of the way when the keyboard appears by automatically
26
30
  * adjusting its height, position, or bottom padding.
@@ -46,6 +50,8 @@ export class KeyboardCompatibleView extends React.Component<
46
50
  _appStateSubscription: NativeEventSubscription | null = null;
47
51
  viewRef: React.RefObject<View | null>;
48
52
  _initialFrameHeight = 0;
53
+ _bottom: number = 0;
54
+
49
55
  constructor(props: KeyboardAvoidingViewProps) {
50
56
  super(props);
51
57
  this.state = {
@@ -93,28 +99,49 @@ export class KeyboardCompatibleView extends React.Component<
93
99
  };
94
100
 
95
101
  _onLayout: (event: LayoutChangeEvent) => void = (event) => {
102
+ event.persist();
103
+
104
+ const oldFrame = this._frame;
96
105
  this._frame = event.nativeEvent.layout;
97
106
  if (!this._initialFrameHeight) {
98
107
  // save the initial frame height, before the keyboard is visible
99
108
  this._initialFrameHeight = this._frame.height;
100
109
  }
101
110
 
102
- this._updateBottomIfNecessary();
111
+ // update bottom height for the first time or when the height is changed
112
+ if (!oldFrame || oldFrame.height !== this._frame.height) {
113
+ this._updateBottomIfNecessary();
114
+ }
115
+
116
+ if (this.props.onLayout) {
117
+ this.props.onLayout(event);
118
+ }
119
+ };
120
+
121
+ // Avoid unnecessary renders if the KeyboardAvoidingView is disabled.
122
+ _setBottom = (value: number) => {
123
+ const enabled = this.props.enabled ?? true;
124
+ this._bottom = value;
125
+ if (enabled) {
126
+ this.setState({ bottom: value });
127
+ }
103
128
  };
104
129
 
105
130
  _updateBottomIfNecessary = () => {
106
- if (this._keyboardEvent === null) {
107
- this.setState({ bottom: 0 });
131
+ if (this._keyboardEvent == null) {
132
+ this._setBottom(0);
108
133
  return;
109
134
  }
110
135
 
111
136
  const { duration, easing, endCoordinates } = this._keyboardEvent;
112
137
  const height = this._relativeKeyboardHeight(endCoordinates);
113
138
 
114
- if (this.state.bottom === height) {
139
+ if (this._bottom === height) {
115
140
  return;
116
141
  }
117
142
 
143
+ this._setBottom(height);
144
+
118
145
  if (duration && easing) {
119
146
  LayoutAnimation.configureNext({
120
147
  // We have to pass the duration equal to minimal accepted duration defined here: RCTLayoutAnimation.m
@@ -125,7 +152,6 @@ export class KeyboardCompatibleView extends React.Component<
125
152
  },
126
153
  });
127
154
  }
128
- this.setState({ bottom: height });
129
155
  };
130
156
 
131
157
  _handleAppStateChange = (nextAppState: AppStateStatus) => {
@@ -184,6 +210,13 @@ export class KeyboardCompatibleView extends React.Component<
184
210
  });
185
211
  };
186
212
 
213
+ componentDidUpdate(_: KeyboardAvoidingViewProps, prevState: State): void {
214
+ const enabled = this.props.enabled ?? true;
215
+ if (enabled && this._bottom !== prevState.bottom) {
216
+ this.setState({ bottom: this._bottom });
217
+ }
218
+ }
219
+
187
220
  componentDidMount() {
188
221
  this._appStateSubscription = AppState.addEventListener('change', this._handleAppStateChange);
189
222
  this.setKeyboardListeners();
@@ -335,12 +335,14 @@ const MessageListWithContext = (props: MessageListPropsWithContext) => {
335
335
 
336
336
  const [autoscrollToRecent, setAutoscrollToRecent] = useState(false);
337
337
 
338
+ const minIndexForVisible = Math.min(1, processedMessageList.length);
339
+
338
340
  const maintainVisibleContentPosition = useMemo(
339
341
  () => ({
340
342
  autoscrollToTopThreshold: autoscrollToRecent ? 10 : undefined,
341
- minIndexForVisible: 1,
343
+ minIndexForVisible,
342
344
  }),
343
- [autoscrollToRecent],
345
+ [autoscrollToRecent, minIndexForVisible],
344
346
  );
345
347
 
346
348
  /**
@@ -620,7 +622,7 @@ const MessageListWithContext = (props: MessageListPropsWithContext) => {
620
622
  }, [threadList, messageListLengthAfterUpdate, topMessageAfterUpdate?.id]);
621
623
 
622
624
  useEffect(() => {
623
- if (!rawMessageList.length) {
625
+ if (!processedMessageList.length) {
624
626
  return;
625
627
  }
626
628
  if (threadList) {
@@ -637,7 +639,7 @@ const MessageListWithContext = (props: MessageListPropsWithContext) => {
637
639
  }
638
640
  const latestNonCurrentMessageBeforeUpdate = latestNonCurrentMessageBeforeUpdateRef.current;
639
641
  latestNonCurrentMessageBeforeUpdateRef.current = undefined;
640
- const latestCurrentMessageAfterUpdate = rawMessageList[rawMessageList.length - 1];
642
+ const latestCurrentMessageAfterUpdate = processedMessageList[0];
641
643
  if (!latestCurrentMessageAfterUpdate) {
642
644
  setAutoscrollToRecent(true);
643
645
  return;
@@ -662,7 +664,7 @@ const MessageListWithContext = (props: MessageListPropsWithContext) => {
662
664
  }
663
665
  }
664
666
  // eslint-disable-next-line react-hooks/exhaustive-deps
665
- }, [channel, rawMessageList, threadList]);
667
+ }, [channel, processedMessageList, threadList]);
666
668
 
667
669
  const goToMessage = useStableCallback(async (messageId: string) => {
668
670
  const indexOfParentInMessageList = processedMessageList.findIndex(
@@ -22,13 +22,12 @@ import {
22
22
  } from '../../contexts';
23
23
  import { useMessageComposer } from '../../contexts/messageInputContext/hooks/useMessageComposer';
24
24
  import { useStateStore } from '../../hooks/useStateStore';
25
+ import { POLL_OPTION_HEIGHT } from '../../utils/constants';
25
26
 
26
27
  const pollComposerStateSelector = (state: PollComposerState) => ({
27
28
  options: state.data.options,
28
29
  });
29
30
 
30
- export const POLL_OPTION_HEIGHT = 71;
31
-
32
31
  export const CreatePollContent = () => {
33
32
  const [isAnonymousPoll, setIsAnonymousPoll] = useState<boolean>(false);
34
33
  const [allowUserSuggestedOptions, setAllowUserSuggestedOptions] = useState<boolean>(false);
@@ -20,7 +20,7 @@ import { useCreatePollContentContext, useTheme, useTranslationContext } from '..
20
20
  import { useMessageComposer } from '../../../contexts/messageInputContext/hooks/useMessageComposer';
21
21
  import { useStateStore } from '../../../hooks/useStateStore';
22
22
  import { DragHandle } from '../../../icons';
23
- import { POLL_OPTION_HEIGHT } from '../CreatePollContent';
23
+ import { POLL_OPTION_HEIGHT } from '../../../utils/constants';
24
24
 
25
25
  export type CurrentOptionPositionsCache = {
26
26
  inverseIndexCache: {
@@ -22,7 +22,7 @@ export * from './themeContext/utils/theme';
22
22
  export * from './threadContext/ThreadContext';
23
23
  export * from './threadsContext/ThreadsContext';
24
24
  export * from './threadsContext/ThreadListItemContext';
25
- export * from './translationContext/TranslationContext';
25
+ export * from './translationContext';
26
26
  export * from './typingContext/TypingContext';
27
27
  export * from './utils/getDisplayName';
28
28
  export * from './pollContext';
@@ -1,9 +1,7 @@
1
- import React, { useContext, useMemo } from 'react';
1
+ import React, { useContext } from 'react';
2
2
 
3
3
  import { LocalMessage, type MessageComposer } from 'stream-chat';
4
4
 
5
- import { useStableCallback } from '../../hooks';
6
- import { useMessageComposer } from '../messageInputContext/hooks/useMessageComposer';
7
5
  import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
8
6
  import { isTestEnvironment } from '../utils/isTestEnvironment';
9
7
 
@@ -18,20 +16,12 @@ export const MessageComposerAPIContext = React.createContext(
18
16
  );
19
17
 
20
18
  type Props = React.PropsWithChildren<{
21
- value: Pick<MessageComposerAPIContextValue, 'setEditingState' | 'clearEditingState'>;
19
+ value: MessageComposerAPIContextValue;
22
20
  }>;
23
21
 
24
22
  export const MessageComposerAPIProvider = ({ children, value }: Props) => {
25
- const messageComposer = useMessageComposer();
26
-
27
- const setQuotedMessage = useStableCallback((message: LocalMessage | null) =>
28
- messageComposer.setQuotedMessage(message),
29
- );
30
-
31
- const contextValue = useMemo(() => ({ setQuotedMessage, ...value }), [setQuotedMessage, value]);
32
-
33
23
  return (
34
- <MessageComposerAPIContext.Provider value={contextValue}>
24
+ <MessageComposerAPIContext.Provider value={value}>
35
25
  {children}
36
26
  </MessageComposerAPIContext.Provider>
37
27
  );
@@ -9,6 +9,7 @@ import {
9
9
 
10
10
  import { ChannelProps } from '../../components';
11
11
  import { useStableCallback } from '../../hooks';
12
+ import { useCreateMessageComposer } from '../messageInputContext/hooks/useCreateMessageComposer';
12
13
  import { ThreadContextValue } from '../threadContext/ThreadContext';
13
14
  import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
14
15
  import { isTestEnvironment } from '../utils/isTestEnvironment';
@@ -47,9 +48,15 @@ export const MessageComposerProvider = ({ children, value }: Props) => {
47
48
 
48
49
  const messageComposerContextValue = useMemo(() => ({ editing, ...value }), [editing, value]);
49
50
 
51
+ const messageComposer = useCreateMessageComposer(messageComposerContextValue);
52
+
53
+ const setQuotedMessage = useStableCallback((message: LocalMessage | null) =>
54
+ messageComposer.setQuotedMessage(message),
55
+ );
56
+
50
57
  const messageComposerAPIContextValue = useMemo(
51
- () => ({ clearEditingState, setEditingState }),
52
- [clearEditingState, setEditingState],
58
+ () => ({ clearEditingState, setEditingState, setQuotedMessage }),
59
+ [clearEditingState, setEditingState, setQuotedMessage],
53
60
  );
54
61
 
55
62
  return (