stream-chat-react-native-core 5.24.1-beta.1 → 5.25.0-beta.2

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 (133) hide show
  1. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
  2. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -1
  3. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +1 -1
  4. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
  5. package/lib/commonjs/components/Channel/Channel.js +16 -13
  6. package/lib/commonjs/components/Channel/Channel.js.map +1 -1
  7. package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js +2 -0
  8. package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
  9. package/lib/commonjs/components/MessageInput/SendButton.js +3 -1
  10. package/lib/commonjs/components/MessageInput/SendButton.js.map +1 -1
  11. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +13 -11
  12. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  13. package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +2 -0
  14. package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
  15. package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
  16. package/lib/commonjs/emoji-data/compile.js +63 -11
  17. package/lib/commonjs/emoji-data/compile.js.map +1 -1
  18. package/lib/commonjs/emoji-data/index.js +9843 -37
  19. package/lib/commonjs/emoji-data/index.js.map +1 -1
  20. package/lib/commonjs/i18n/en.json +1 -1
  21. package/lib/commonjs/i18n/es.json +34 -34
  22. package/lib/commonjs/i18n/fr.json +36 -36
  23. package/lib/commonjs/i18n/he.json +36 -36
  24. package/lib/commonjs/i18n/hi.json +36 -36
  25. package/lib/commonjs/i18n/it.json +36 -36
  26. package/lib/commonjs/i18n/ja.json +36 -36
  27. package/lib/commonjs/i18n/ko.json +36 -36
  28. package/lib/commonjs/i18n/nl.json +36 -36
  29. package/lib/commonjs/i18n/ru.json +35 -35
  30. package/lib/commonjs/i18n/tr.json +36 -36
  31. package/lib/commonjs/index.js +4 -4
  32. package/lib/commonjs/index.js.map +1 -1
  33. package/lib/commonjs/utils/utils.js +84 -31
  34. package/lib/commonjs/utils/utils.js.map +1 -1
  35. package/lib/commonjs/version.json +1 -1
  36. package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
  37. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -1
  38. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +1 -1
  39. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
  40. package/lib/module/components/Channel/Channel.js +16 -13
  41. package/lib/module/components/Channel/Channel.js.map +1 -1
  42. package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js +2 -0
  43. package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
  44. package/lib/module/components/MessageInput/SendButton.js +3 -1
  45. package/lib/module/components/MessageInput/SendButton.js.map +1 -1
  46. package/lib/module/contexts/messageInputContext/MessageInputContext.js +13 -11
  47. package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  48. package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +2 -0
  49. package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
  50. package/lib/module/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
  51. package/lib/module/emoji-data/compile.js +63 -11
  52. package/lib/module/emoji-data/compile.js.map +1 -1
  53. package/lib/module/emoji-data/index.js +9843 -37
  54. package/lib/module/emoji-data/index.js.map +1 -1
  55. package/lib/module/i18n/en.json +1 -1
  56. package/lib/module/i18n/es.json +34 -34
  57. package/lib/module/i18n/fr.json +36 -36
  58. package/lib/module/i18n/he.json +36 -36
  59. package/lib/module/i18n/hi.json +36 -36
  60. package/lib/module/i18n/it.json +36 -36
  61. package/lib/module/i18n/ja.json +36 -36
  62. package/lib/module/i18n/ko.json +36 -36
  63. package/lib/module/i18n/nl.json +36 -36
  64. package/lib/module/i18n/ru.json +35 -35
  65. package/lib/module/i18n/tr.json +36 -36
  66. package/lib/module/index.js +4 -4
  67. package/lib/module/index.js.map +1 -1
  68. package/lib/module/utils/utils.js +84 -31
  69. package/lib/module/utils/utils.js.map +1 -1
  70. package/lib/module/version.json +1 -1
  71. package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +1 -1
  72. package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +11 -3
  73. package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts +1 -1
  74. package/lib/typescript/contexts/suggestionsContext/SuggestionsContext.d.ts +1 -1
  75. package/lib/typescript/emoji-data/index.d.ts +9 -0
  76. package/lib/typescript/i18n/en.json +1 -1
  77. package/lib/typescript/i18n/es.json +34 -34
  78. package/lib/typescript/i18n/fr.json +36 -36
  79. package/lib/typescript/i18n/he.json +36 -36
  80. package/lib/typescript/i18n/hi.json +36 -36
  81. package/lib/typescript/i18n/it.json +36 -36
  82. package/lib/typescript/i18n/ja.json +36 -36
  83. package/lib/typescript/i18n/ko.json +36 -36
  84. package/lib/typescript/i18n/nl.json +36 -36
  85. package/lib/typescript/i18n/ru.json +35 -35
  86. package/lib/typescript/i18n/tr.json +36 -36
  87. package/lib/typescript/index.d.ts +1 -1
  88. package/lib/typescript/utils/utils.d.ts +9 -4
  89. package/package.json +3 -2
  90. package/src/components/AutoCompleteInput/AutoCompleteInput.tsx +1 -1
  91. package/src/components/AutoCompleteInput/AutoCompleteSuggestionItem.tsx +1 -1
  92. package/src/components/AutoCompleteInput/AutoCompleteSuggestionList.tsx +1 -1
  93. package/src/components/Channel/Channel.tsx +3 -0
  94. package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +2 -0
  95. package/src/components/MessageInput/SendButton.tsx +1 -1
  96. package/src/contexts/messageInputContext/MessageInputContext.tsx +17 -2
  97. package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +2 -0
  98. package/src/contexts/suggestionsContext/SuggestionsContext.tsx +1 -1
  99. package/src/emoji-data/compile.js +56 -36
  100. package/src/emoji-data/index.ts +5178 -0
  101. package/src/i18n/en.json +1 -1
  102. package/src/i18n/es.json +34 -34
  103. package/src/i18n/fr.json +36 -36
  104. package/src/i18n/he.json +36 -36
  105. package/src/i18n/hi.json +36 -36
  106. package/src/i18n/it.json +36 -36
  107. package/src/i18n/ja.json +36 -36
  108. package/src/i18n/ko.json +36 -36
  109. package/src/i18n/nl.json +36 -36
  110. package/src/i18n/ru.json +35 -35
  111. package/src/i18n/tr.json +36 -36
  112. package/src/index.ts +1 -1
  113. package/src/utils/utils.ts +47 -33
  114. package/src/version.json +1 -1
  115. package/lib/commonjs/emoji-data/compiled.js +0 -15587
  116. package/lib/commonjs/emoji-data/compiled.js.map +0 -1
  117. package/lib/commonjs/emoji-data/emojiNames.js +0 -4913
  118. package/lib/commonjs/emoji-data/emojiNames.js.map +0 -1
  119. package/lib/commonjs/emoji-data/emojis.js +0 -13155
  120. package/lib/commonjs/emoji-data/emojis.js.map +0 -1
  121. package/lib/module/emoji-data/compiled.js +0 -15587
  122. package/lib/module/emoji-data/compiled.js.map +0 -1
  123. package/lib/module/emoji-data/emojiNames.js +0 -4913
  124. package/lib/module/emoji-data/emojiNames.js.map +0 -1
  125. package/lib/module/emoji-data/emojis.js +0 -13155
  126. package/lib/module/emoji-data/emojis.js.map +0 -1
  127. package/lib/typescript/emoji-data/compiled.d.ts +0 -20
  128. package/lib/typescript/emoji-data/emojiNames.d.ts +0 -0
  129. package/lib/typescript/emoji-data/emojis.d.ts +0 -0
  130. package/src/emoji-data/compiled.ts +0 -8930
  131. package/src/emoji-data/emojiNames.ts +0 -6960
  132. package/src/emoji-data/emojis.ts +0 -14893
  133. package/src/emoji-data/index.js +0 -38
@@ -1,14 +1,66 @@
1
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
2
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
3
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
4
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
1
5
  var fs = require('fs');
2
- var _require = require("./index.js"),
3
- emojiArray = _require.emojiArray,
4
- emojiLib = _require.emojiLib;
5
- var stingified = JSON.stringify({
6
- emojiArray: emojiArray,
7
- emojiLib: emojiLib
8
- }).replace(/(["'])require(?:(?=(\\?))\2.)*?\1/g, function (value) {
9
- return value.replace(/"/g, '');
10
- });
11
- fs.writeFile('compiled.ts', "export type EmojiArrayItem = {\n name: string;\n names: string[];\n }\n \n export type EmojiArray = EmojiArrayItem[];\n \n export type Emoji = {\n name: string;\n names: string[];\n sort_order: number;\n unicode: string;\n skin_variations?: string[];\n };\n \n export type EmojiLib = {\n [key: string]: Emoji;\n };\n \n export type CompiledEmojis = {\n emojiArray: EmojiArray;\n emojiLib: EmojiLib;\n };\n \n export const compiledEmojis: CompiledEmojis = " + stingified, function (err) {
12
- if (err) throw err;
6
+ var getEmojis = function () {
7
+ var _ref = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee() {
8
+ var response, emojis, emojiLib;
9
+ return _regenerator["default"].wrap(function _callee$(_context) {
10
+ while (1) switch (_context.prev = _context.next) {
11
+ case 0:
12
+ _context.prev = 0;
13
+ _context.next = 3;
14
+ return fetch('https://raw.githubusercontent.com/iamcal/emoji-data/master/emoji.json');
15
+ case 3:
16
+ response = _context.sent;
17
+ _context.next = 6;
18
+ return response.json();
19
+ case 6:
20
+ emojis = _context.sent;
21
+ emojiLib = emojis.map(function (emoji) {
22
+ return (0, _extends2["default"])({
23
+ id: emoji.short_name,
24
+ name: emoji.short_name,
25
+ names: emoji.short_names
26
+ }, emoji.skin_variations ? {
27
+ skins: Object.values(emoji.skin_variations).map(function (skin) {
28
+ return String.fromCodePoint.apply(null, skin.unified.split('-').map(function (unicode) {
29
+ return "0x" + unicode;
30
+ }));
31
+ })
32
+ } : {}, {
33
+ unicode: String.fromCodePoint.apply(null, emoji.unified.split('-').map(function (unicode) {
34
+ return "0x" + unicode;
35
+ }))
36
+ });
37
+ }).sort(function (a, b) {
38
+ return a.name < b.name ? -1 : 1;
39
+ });
40
+ return _context.abrupt("return", {
41
+ emojiLib: emojiLib
42
+ });
43
+ case 11:
44
+ _context.prev = 11;
45
+ _context.t0 = _context["catch"](0);
46
+ console.log(_context.t0);
47
+ case 14:
48
+ case "end":
49
+ return _context.stop();
50
+ }
51
+ }, _callee, null, [[0, 11]]);
52
+ }));
53
+ return function getEmojis() {
54
+ return _ref.apply(this, arguments);
55
+ };
56
+ }();
57
+ getEmojis().then(function (_ref2) {
58
+ var emojiLib = _ref2.emojiLib;
59
+ var stingified = JSON.stringify(emojiLib).replace(/(["'])require(?:(?=(\\?))\2.)*?\1/g, function (value) {
60
+ return value.replace(/"/g, '');
61
+ });
62
+ fs.writeFile('src/emoji-data/index.ts', "export type Emoji = {\n id: string;\n name: string;\n names: string[];\n unicode: string;\n skins?: string[];\n };\n\n export type Emojis = Emoji[];\n\n export const compiledEmojis: Emojis = " + stingified, function (err) {
63
+ if (err) throw err;
64
+ });
13
65
  });
14
66
  //# sourceMappingURL=compile.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["fs","require","_require","emojiArray","emojiLib","stingified","JSON","stringify","replace","value","writeFile","err"],"sources":["compile.js"],"sourcesContent":["/* eslint-disable no-undef */\nconst fs = require('fs');\n\nconst { emojiArray, emojiLib } = require('./index.js');\n\nconst stingified = JSON.stringify({\n emojiArray,\n emojiLib,\n}).replace(/([\"'])require(?:(?=(\\\\?))\\2.)*?\\1/g, (value) => value.replace(/\"/g, ''));\n\nfs.writeFile(\n 'compiled.ts',\n `export type EmojiArrayItem = {\n name: string;\n names: string[];\n }\n \n export type EmojiArray = EmojiArrayItem[];\n \n export type Emoji = {\n name: string;\n names: string[];\n sort_order: number;\n unicode: string;\n skin_variations?: string[];\n };\n \n export type EmojiLib = {\n [key: string]: Emoji;\n };\n \n export type CompiledEmojis = {\n emojiArray: EmojiArray;\n emojiLib: EmojiLib;\n };\n \n export const compiledEmojis: CompiledEmojis = ${stingified}`,\n (err) => {\n if (err) throw err;\n },\n);\n"],"mappings":"AACA,IAAMA,EAAE,GAAGC,OAAO,CAAC,IAAI,CAAC;AAExB,IAAAC,QAAA,GAAiCD,OAAO,aAAa,CAAC;EAA9CE,UAAU,GAAAD,QAAA,CAAVC,UAAU;EAAEC,QAAQ,GAAAF,QAAA,CAARE,QAAQ;AAE5B,IAAMC,UAAU,GAAGC,IAAI,CAACC,SAAS,CAAC;EAChCJ,UAAU,EAAVA,UAAU;EACVC,QAAQ,EAARA;AACF,CAAC,CAAC,CAACI,OAAO,CAAC,oCAAoC,EAAE,UAACC,KAAK;EAAA,OAAKA,KAAK,CAACD,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;AAAA,EAAC;AAEpFR,EAAE,CAACU,SAAS,CACV,aAAa,0fAyBmCL,UAAU,EAC1D,UAACM,GAAG,EAAK;EACP,IAAIA,GAAG,EAAE,MAAMA,GAAG;AACpB,CACF,CAAC"}
1
+ {"version":3,"names":["fs","require","getEmojis","_ref","_asyncToGenerator2","_regenerator","mark","_callee","response","emojis","emojiLib","wrap","_callee$","_context","prev","next","fetch","sent","json","map","emoji","_extends2","id","short_name","name","names","short_names","skin_variations","skins","Object","values","skin","String","fromCodePoint","apply","unified","split","unicode","sort","a","b","abrupt","t0","console","log","stop","arguments","then","_ref2","stingified","JSON","stringify","replace","value","writeFile","err"],"sources":["compile.js"],"sourcesContent":["/* eslint-disable no-undef */\nconst fs = require('fs');\n\nconst getEmojis = async () => {\n try {\n const response = await fetch(\n 'https://raw.githubusercontent.com/iamcal/emoji-data/master/emoji.json',\n );\n const emojis = await response.json();\n const emojiLib = emojis\n .map((emoji) => ({\n id: emoji.short_name,\n name: emoji.short_name,\n names: emoji.short_names,\n ...(emoji.skin_variations\n ? {\n skins: Object.values(emoji.skin_variations).map((skin) =>\n String.fromCodePoint.apply(\n null,\n skin.unified.split('-').map((unicode) => `0x${unicode}`),\n ),\n ),\n }\n : {}),\n unicode: String.fromCodePoint.apply(\n null,\n emoji.unified.split('-').map((unicode) => `0x${unicode}`),\n ),\n }))\n .sort((a, b) => (a.name < b.name ? -1 : 1));\n\n return { emojiLib };\n } catch (error) {\n console.log(error);\n }\n};\n\ngetEmojis().then(({ emojiLib }) => {\n const stingified = JSON.stringify(emojiLib).replace(\n /([\"'])require(?:(?=(\\\\?))\\2.)*?\\1/g,\n (value) => value.replace(/\"/g, ''),\n );\n\n fs.writeFile(\n 'src/emoji-data/index.ts',\n `export type Emoji = {\n id: string;\n name: string;\n names: string[];\n unicode: string;\n skins?: string[];\n };\n\n export type Emojis = Emoji[];\n\n export const compiledEmojis: Emojis = ${stingified}`,\n (err) => {\n if (err) throw err;\n },\n );\n});\n"],"mappings":";;;;AACA,IAAMA,EAAE,GAAGC,OAAO,CAAC,IAAI,CAAC;AAExB,IAAMC,SAAS;EAAA,IAAAC,IAAA,OAAAC,kBAAA,aAAAC,YAAA,YAAAC,IAAA,CAAG,SAAAC,QAAA;IAAA,IAAAC,QAAA,EAAAC,MAAA,EAAAC,QAAA;IAAA,OAAAL,YAAA,YAAAM,IAAA,UAAAC,SAAAC,QAAA;MAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;QAAA;UAAAF,QAAA,CAAAC,IAAA;UAAAD,QAAA,CAAAE,IAAA;UAAA,OAESC,KAAK,CAC1B,uEACF,CAAC;QAAA;UAFKR,QAAQ,GAAAK,QAAA,CAAAI,IAAA;UAAAJ,QAAA,CAAAE,IAAA;UAAA,OAGOP,QAAQ,CAACU,IAAI,CAAC,CAAC;QAAA;UAA9BT,MAAM,GAAAI,QAAA,CAAAI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