@layers-app/shared 0.4.4 → 0.4.6

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 (256) hide show
  1. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +13 -13
  2. package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
  3. package/dist/components/AppContainer/AppContainer.js +72 -79
  4. package/dist/components/AppContainer/AppContainer.module.css.js +6 -6
  5. package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
  6. package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +24 -22
  7. package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
  8. package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +46 -37
  9. package/dist/components/AppContainer/components/Header.d.ts.map +1 -1
  10. package/dist/components/AppContainer/components/Header.js +6 -5
  11. package/dist/components/AppContainer/components/Main.js +4 -4
  12. package/dist/components/AppContainer/components/SidebarToggleButton.d.ts.map +1 -1
  13. package/dist/components/AppContainer/components/SidebarToggleButton.js +25 -16
  14. package/dist/components/AppContainer/components/SlideAnimation.js +4 -4
  15. package/dist/components/AppContainer/components/ToolSidebar.d.ts.map +1 -1
  16. package/dist/components/AppContainer/components/ToolSidebar.js +161 -128
  17. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
  18. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +131 -121
  19. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +1 -1
  20. package/dist/components/AppContainer/hooks/useAppContainer.d.ts +1 -1
  21. package/dist/components/AppContainer/hooks/useAppContainer.d.ts.map +1 -1
  22. package/dist/components/AppContainer/hooks/useAppContainer.js +59 -56
  23. package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
  24. package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +4 -3
  25. package/dist/components/AppContainer/types.d.ts +1 -0
  26. package/dist/components/AppContainer/types.d.ts.map +1 -1
  27. package/dist/components/AppShell/AppShell.module.css.js +5 -5
  28. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts.map +1 -1
  29. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +33 -33
  30. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
  31. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.js +37 -37
  32. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts.map +1 -1
  33. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.js +54 -36
  34. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
  35. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts +2 -0
  36. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts.map +1 -1
  37. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.js +84 -37
  38. package/dist/components/AttachmentsGalleryModal/helpers.d.ts +8 -0
  39. package/dist/components/AttachmentsGalleryModal/helpers.d.ts.map +1 -1
  40. package/dist/components/AttachmentsGalleryModal/helpers.js +22 -17
  41. package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.d.ts.map +1 -1
  42. package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.js +28 -25
  43. package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts.map +1 -1
  44. package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.js +36 -41
  45. package/dist/components/AttachmentsGalleryModal/styles.module.css.js +7 -7
  46. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
  47. package/dist/components/AttachmentsPreview/AttachmentsPreview.js +138 -84
  48. package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +24 -14
  49. package/dist/components/BouncingLogo/BouncingLogo.d.ts +1 -3
  50. package/dist/components/BouncingLogo/BouncingLogo.d.ts.map +1 -1
  51. package/dist/components/BouncingLogo/BouncingLogo.js +14 -20
  52. package/dist/components/BouncingLogo/BouncingLogo.module.css.js +4 -8
  53. package/dist/components/Chat/CallMessage/CallMessage.module.css.js +15 -0
  54. package/dist/components/Chat/CallMessage/index.d.ts +21 -0
  55. package/dist/components/Chat/CallMessage/index.d.ts.map +1 -0
  56. package/dist/components/Chat/CallMessage/index.js +49 -0
  57. package/dist/components/Chat/ChatBubble/ChatBubble.module.css.js +9 -0
  58. package/dist/components/Chat/ChatBubble/index.d.ts +14 -0
  59. package/dist/components/Chat/ChatBubble/index.d.ts.map +1 -0
  60. package/dist/components/Chat/ChatBubble/index.js +32 -0
  61. package/dist/components/Chat/ChatHeader/ChatHeader.module.css.js +17 -0
  62. package/dist/components/Chat/ChatHeader/index.d.ts +42 -0
  63. package/dist/components/Chat/ChatHeader/index.d.ts.map +1 -0
  64. package/dist/components/Chat/ChatHeader/index.js +78 -0
  65. package/dist/components/Chat/ChatInput/ChatInput.module.css.js +49 -0
  66. package/dist/components/Chat/ChatInput/index.d.ts +74 -0
  67. package/dist/components/Chat/ChatInput/index.d.ts.map +1 -0
  68. package/dist/components/Chat/ChatInput/index.js +288 -0
  69. package/dist/components/Chat/ChatInput/smilePlusIcon.d.ts +3 -0
  70. package/dist/components/Chat/ChatInput/smilePlusIcon.d.ts.map +1 -0
  71. package/dist/components/Chat/ChatInput/smilePlusIcon.js +49 -0
  72. package/dist/components/Chat/ChatLayout/ChatLayout.module.css.js +15 -0
  73. package/dist/components/Chat/ChatLayout/index.d.ts +17 -0
  74. package/dist/components/Chat/ChatLayout/index.d.ts.map +1 -0
  75. package/dist/components/Chat/ChatLayout/index.js +43 -0
  76. package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +21 -0
  77. package/dist/components/Chat/ChatMessage/index.d.ts +47 -0
  78. package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -0
  79. package/dist/components/Chat/ChatMessage/index.js +206 -0
  80. package/dist/components/Chat/ChatPill/ChatPill.module.css.js +11 -0
  81. package/dist/components/Chat/ChatPill/index.d.ts +12 -0
  82. package/dist/components/Chat/ChatPill/index.d.ts.map +1 -0
  83. package/dist/components/Chat/ChatPill/index.js +21 -0
  84. package/dist/components/Chat/DayMeta/index.d.ts +11 -0
  85. package/dist/components/Chat/DayMeta/index.d.ts.map +1 -0
  86. package/dist/components/Chat/DayMeta/index.js +9 -0
  87. package/dist/components/Chat/DialogItem/DialogItem.module.css.js +17 -0
  88. package/dist/components/Chat/DialogItem/index.d.ts +41 -0
  89. package/dist/components/Chat/DialogItem/index.d.ts.map +1 -0
  90. package/dist/components/Chat/DialogItem/index.js +107 -0
  91. package/dist/components/Chat/DialogList/DialogList.module.css.js +7 -0
  92. package/dist/components/Chat/DialogList/index.d.ts +11 -0
  93. package/dist/components/Chat/DialogList/index.d.ts.map +1 -0
  94. package/dist/components/Chat/DialogList/index.js +19 -0
  95. package/dist/components/Chat/MediaDocument/MediaDocument.module.css.js +13 -0
  96. package/dist/components/Chat/MediaDocument/index.d.ts +15 -0
  97. package/dist/components/Chat/MediaDocument/index.d.ts.map +1 -0
  98. package/dist/components/Chat/MediaDocument/index.js +73 -0
  99. package/dist/components/Chat/MessageActions/MessageActions.module.css.js +7 -0
  100. package/dist/components/Chat/MessageActions/index.d.ts +23 -0
  101. package/dist/components/Chat/MessageActions/index.d.ts.map +1 -0
  102. package/dist/components/Chat/MessageActions/index.js +68 -0
  103. package/dist/components/Chat/MessageAuthor/index.d.ts +20 -0
  104. package/dist/components/Chat/MessageAuthor/index.d.ts.map +1 -0
  105. package/dist/components/Chat/MessageAuthor/index.js +36 -0
  106. package/dist/components/Chat/MessageForward/MessageForward.module.css.js +7 -0
  107. package/dist/components/Chat/MessageForward/index.d.ts +13 -0
  108. package/dist/components/Chat/MessageForward/index.d.ts.map +1 -0
  109. package/dist/components/Chat/MessageForward/index.js +30 -0
  110. package/dist/components/Chat/MessageList/MessageList.module.css.js +21 -0
  111. package/dist/components/Chat/MessageList/index.d.ts +39 -0
  112. package/dist/components/Chat/MessageList/index.d.ts.map +1 -0
  113. package/dist/components/Chat/MessageList/index.js +159 -0
  114. package/dist/components/Chat/MessageMeta/MessageMeta.module.css.js +13 -0
  115. package/dist/components/Chat/MessageMeta/index.d.ts +16 -0
  116. package/dist/components/Chat/MessageMeta/index.d.ts.map +1 -0
  117. package/dist/components/Chat/MessageMeta/index.js +33 -0
  118. package/dist/components/Chat/MessageReactions/MessageReactions.module.css.js +15 -0
  119. package/dist/components/Chat/MessageReactions/index.d.ts +32 -0
  120. package/dist/components/Chat/MessageReactions/index.d.ts.map +1 -0
  121. package/dist/components/Chat/MessageReactions/index.js +72 -0
  122. package/dist/components/Chat/MessageReply/MessageReply.module.css.js +15 -0
  123. package/dist/components/Chat/MessageReply/index.d.ts +15 -0
  124. package/dist/components/Chat/MessageReply/index.d.ts.map +1 -0
  125. package/dist/components/Chat/MessageReply/index.js +40 -0
  126. package/dist/components/Chat/MessageStatus/MessageStatus.module.css.js +11 -0
  127. package/dist/components/Chat/MessageStatus/index.d.ts +14 -0
  128. package/dist/components/Chat/MessageStatus/index.d.ts.map +1 -0
  129. package/dist/components/Chat/MessageStatus/index.js +68 -0
  130. package/dist/components/Chat/ServiceMessage/ServiceMessage.module.css.js +11 -0
  131. package/dist/components/Chat/ServiceMessage/index.d.ts +13 -0
  132. package/dist/components/Chat/ServiceMessage/index.d.ts.map +1 -0
  133. package/dist/components/Chat/ServiceMessage/index.js +21 -0
  134. package/dist/components/Chat/UnreadSeparator/index.d.ts +11 -0
  135. package/dist/components/Chat/UnreadSeparator/index.d.ts.map +1 -0
  136. package/dist/components/Chat/UnreadSeparator/index.js +13 -0
  137. package/dist/components/Chat/colors.d.ts +7 -0
  138. package/dist/components/Chat/colors.d.ts.map +1 -0
  139. package/dist/components/Chat/colors.js +30 -0
  140. package/dist/components/Chat/icons.d.ts +9 -0
  141. package/dist/components/Chat/icons.d.ts.map +1 -0
  142. package/dist/components/Chat/icons.js +49 -0
  143. package/dist/components/Chat/index.d.ts +24 -0
  144. package/dist/components/Chat/index.d.ts.map +1 -0
  145. package/dist/components/Chat/mock-data.d.ts +32 -0
  146. package/dist/components/Chat/mock-data.d.ts.map +1 -0
  147. package/dist/components/Chat/types.d.ts +159 -0
  148. package/dist/components/Chat/types.d.ts.map +1 -0
  149. package/dist/components/CircleColorPicker/CircleColorPicker.d.ts.map +1 -1
  150. package/dist/components/CircleColorPicker/CircleColorPicker.js +17 -15
  151. package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
  152. package/dist/components/ColorPicker/ColorPicker.module.css.js +32 -26
  153. package/dist/components/ColorPicker/ColorPickerList.d.ts.map +1 -1
  154. package/dist/components/ColorPicker/ColorPickerList.js +81 -68
  155. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -1
  156. package/dist/components/ColorPicker/ColorPickerToolbar.js +75 -70
  157. package/dist/components/ColorPicker/icons.js +5 -5
  158. package/dist/components/ColorPicker/types.d.ts +6 -0
  159. package/dist/components/ColorPicker/types.d.ts.map +1 -1
  160. package/dist/components/ColorPicker/types.js +53 -11
  161. package/dist/components/ColorPicker/useRecentColors.d.ts +3 -1
  162. package/dist/components/ColorPicker/useRecentColors.d.ts.map +1 -1
  163. package/dist/components/ColorPicker/useRecentColors.js +43 -20
  164. package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
  165. package/dist/components/CommentComposer/types.js +9 -0
  166. package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
  167. package/dist/components/Copyright/Copyright.module.css.js +1 -1
  168. package/dist/components/CustomKBD/CustomKBD.module.css.js +1 -1
  169. package/dist/components/EmojiPicker/EmojiPanel.d.ts +2 -1
  170. package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
  171. package/dist/components/EmojiPicker/EmojiPanel.js +73 -72
  172. package/dist/components/EmojiPicker/EmojiPicker.d.ts +23 -1
  173. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  174. package/dist/components/EmojiPicker/EmojiPicker.js +126 -88
  175. package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
  176. package/dist/components/EmojiPicker/IconsPanel.d.ts.map +1 -1
  177. package/dist/components/EmojiPicker/IconsPanel.js +28 -25
  178. package/dist/components/EntityIcon.d.ts +1 -0
  179. package/dist/components/EntityIcon.d.ts.map +1 -1
  180. package/dist/components/EntityIcon.js +90 -33
  181. package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
  182. package/dist/components/ErrorPage/components/Error403.d.ts +5 -1
  183. package/dist/components/ErrorPage/components/Error403.d.ts.map +1 -1
  184. package/dist/components/ErrorPage/components/Error403.js +25 -21
  185. package/dist/components/ErrorPage/components/Error404.d.ts.map +1 -1
  186. package/dist/components/ErrorPage/index.d.ts +5 -1
  187. package/dist/components/ErrorPage/index.d.ts.map +1 -1
  188. package/dist/components/ErrorPage/index.js +17 -10
  189. package/dist/components/FeatureProgress/FeatureProgress.module.css.js +49 -49
  190. package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
  191. package/dist/components/FilePicker/FilePicker.js +135 -161
  192. package/dist/components/FilePicker/FilePicker.module.css.js +8 -12
  193. package/dist/components/FilePicker/FilePickerGallery.js +13 -13
  194. package/dist/components/FilePicker/FilePickerGiphy.js +4 -4
  195. package/dist/components/FilePicker/FilePickerGoogleDrive.js +3 -3
  196. package/dist/components/FilePicker/FilePickerUnsplash.js +18 -18
  197. package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
  198. package/dist/components/FilePicker/FilePickerUpload.js +55 -47
  199. package/dist/components/FormViewer/FormViewer.module.css.js +20 -20
  200. package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
  201. package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.module.css.js +1 -1
  202. package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.module.css.js +1 -1
  203. package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.module.css.js +8 -8
  204. package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +4 -4
  205. package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
  206. package/dist/components/ImageCropper/ImageCropper.module.css.js +38 -38
  207. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +11 -11
  208. package/dist/components/LanguagePicker/LanguagePicker.module.css.js +1 -1
  209. package/dist/components/Loaders/styles.module.css.js +6 -6
  210. package/dist/components/MediaLibrary/MediaLibrary.module.css.js +2 -2
  211. package/dist/components/MusicPlayerBar/MusicPlayerBar.module.css.js +23 -23
  212. package/dist/components/MusicPlayerBar/components/HoverActions.js +28 -28
  213. package/dist/components/NavMenu/NavMenu.d.ts +7 -1
  214. package/dist/components/NavMenu/NavMenu.d.ts.map +1 -1
  215. package/dist/components/NavMenu/NavMenu.js +54 -44
  216. package/dist/components/NavMenu/NavMenu.module.css.js +12 -12
  217. package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
  218. package/dist/components/NavMenu/components/NavMenuItem.js +84 -84
  219. package/dist/components/NavMenu/types.d.ts +4 -0
  220. package/dist/components/NavMenu/types.d.ts.map +1 -1
  221. package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
  222. package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
  223. package/dist/components/Notification/Notification.module.css.js +1 -1
  224. package/dist/components/PillTabs/PillTabs.d.ts +19 -0
  225. package/dist/components/PillTabs/PillTabs.d.ts.map +1 -0
  226. package/dist/components/PillTabs/PillTabs.js +50 -0
  227. package/dist/components/PillTabs/PillTabs.module.css.js +11 -0
  228. package/dist/components/SearchFilters/SearchFilters.module.css.js +1 -1
  229. package/dist/components/SettingsSection/styles.module.css.js +1 -1
  230. package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +1 -1
  231. package/dist/components/TreeIndent/TreeIndent.module.css.js +4 -4
  232. package/dist/components/WorkspaceMenu/WorkspaceItem.d.ts.map +1 -1
  233. package/dist/components/WorkspaceMenu/WorkspaceItem.js +16 -14
  234. package/dist/components/modals/RemoveConfirmModal.js +1 -1
  235. package/dist/components/table/FrontTable.d.ts.map +1 -1
  236. package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
  237. package/dist/config/envConfig.d.ts +2 -0
  238. package/dist/config/envConfig.d.ts.map +1 -1
  239. package/dist/config/envConfig.js +41 -37
  240. package/dist/helpers/showFeatureFeedback.module.css.js +4 -4
  241. package/dist/helpers/showNotifications.d.ts +15 -0
  242. package/dist/helpers/showNotifications.d.ts.map +1 -1
  243. package/dist/helpers/showNotifications.js +114 -72
  244. package/dist/helpers/showNotifications.module.css.js +16 -4
  245. package/dist/hooks/useUiPref.d.ts +2 -0
  246. package/dist/hooks/useUiPref.d.ts.map +1 -0
  247. package/dist/hooks/useUiPref.js +80 -0
  248. package/dist/index.css +1 -1
  249. package/dist/index.d.ts +4 -0
  250. package/dist/index.d.ts.map +1 -1
  251. package/dist/index.js +588 -527
  252. package/dist/lang/locales/ui_en.json.js +5 -5
  253. package/dist/lang/locales/ui_es.json.js +1 -1
  254. package/dist/lang/locales/ui_ru.json.js +1 -1
  255. package/docs/README.md +499 -499
  256. package/package.json +78 -75
@@ -1,16 +1,58 @@
1
- function f(r) {
2
- return typeof r == "string" ? { value: r } : r;
1
+ function f(t) {
2
+ return t === "textColor" || t === "color";
3
3
  }
4
- function e(r) {
5
- return r === "inherit" || r === "" || r === "default";
4
+ function g(t) {
5
+ return f(t) ? "text" : "highlight";
6
6
  }
7
- const s = (r, o, n) => {
8
- if (n) return n;
9
- const t = !o || e(o) ? "standard" : o;
10
- return r(`colorPicker.colors.${t}`, { defaultValue: o || "" });
7
+ const h = typeof navigator < "u" && /Mac|iPhone|iPod|iPad/i.test(navigator.platform || navigator.userAgent), d = h ? "⌘⇧H" : "Ctrl+Shift+H";
8
+ function $(t) {
9
+ return typeof t == "string" ? { value: t } : t;
10
+ }
11
+ function p(t) {
12
+ return t === "inherit" || t === "" || t === "default";
13
+ }
14
+ function c(t) {
15
+ if (!t) return null;
16
+ const r = t.trim().toLowerCase();
17
+ if (r === "" || r === "inherit" || r === "default" || r === "transparent")
18
+ return "default";
19
+ const o = r.match(/^#([0-9a-f]{3,8})$/);
20
+ if (o) {
21
+ let n = o[1];
22
+ if ((n.length === 3 || n.length === 4) && (n = n.split("").map((e) => e + e).join("")), n.length === 6 || n.length === 8) {
23
+ const e = parseInt(n.slice(0, 2), 16), a = parseInt(n.slice(2, 4), 16), i = parseInt(n.slice(4, 6), 16), l = n.length === 8 ? parseInt(n.slice(6, 8), 16) / 255 : 1;
24
+ return `${e},${a},${i},${Math.round(l * 1e3) / 1e3}`;
25
+ }
26
+ }
27
+ const s = r.match(/^rgba?\(([^)]+)\)$/);
28
+ if (s) {
29
+ const n = s[1].split(",").map((e) => e.trim());
30
+ if (n.length >= 3) {
31
+ const e = parseInt(n[0], 10), a = parseInt(n[1], 10), i = parseInt(n[2], 10), l = n[3] !== void 0 ? parseFloat(n[3]) : 1;
32
+ if (![e, a, i].some(Number.isNaN)) {
33
+ const u = Number.isNaN(l) ? 1 : l;
34
+ return `${e},${a},${i},${Math.round(u * 1e3) / 1e3}`;
35
+ }
36
+ }
37
+ }
38
+ return r;
39
+ }
40
+ function m(t, r) {
41
+ const o = c(t), s = c(r);
42
+ return o !== null && s !== null && o === s;
43
+ }
44
+ const C = (t, r, o) => {
45
+ if (o) return o;
46
+ const s = !r || p(r) ? "standard" : r;
47
+ return t(`colorPicker.colors.${s}`, { defaultValue: r || "" });
11
48
  };
12
49
  export {
13
- e as isDefaultColor,
14
- f as normalizeColorItem,
15
- s as resolveColorLabel
50
+ h as IS_APPLE,
51
+ d as RECENT_COLOR_HOTKEY,
52
+ m as colorsEqual,
53
+ p as isDefaultColor,
54
+ f as isTextSectionKey,
55
+ $ as normalizeColorItem,
56
+ C as resolveColorLabel,
57
+ g as resolveRecentKind
16
58
  };
@@ -1,7 +1,9 @@
1
- import type { RecentColorEntry } from './types';
1
+ import type { RecentColorEntry, RecentColorKind } from './types';
2
2
  interface UseRecentColorsOptions {
3
3
  storageKey?: string;
4
4
  maxItems?: number;
5
+ onApplyShortcut?: (color: string, kind: RecentColorKind) => void;
6
+ shortcutScoped?: boolean;
5
7
  }
6
8
  export declare function useRecentColors(options?: UseRecentColorsOptions): {
7
9
  recentColors: RecentColorEntry[];
@@ -1 +1 @@
1
- {"version":3,"file":"useRecentColors.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/useRecentColors.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAKhD,UAAU,sBAAsB;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAmBD,wBAAgB,eAAe,CAAC,OAAO,CAAC,EAAE,sBAAsB;;uBAYpD,MAAM,eAAe,MAAM,WAAW,MAAM;;;EAsBvD"}
1
+ {"version":3,"file":"useRecentColors.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/useRecentColors.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAQjE,UAAU,sBAAsB;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IACjE,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AA2BD,wBAAgB,eAAe,CAAC,OAAO,CAAC,EAAE,sBAAsB;;uBAepD,MAAM,eAAe,MAAM,WAAW,MAAM;;;EAkDvD"}
@@ -1,6 +1,8 @@
1
- import { useState as I, useCallback as c } from "react";
2
- const d = "color-picker-recent", p = 11;
3
- function n(e) {
1
+ import { useState as R, useCallback as f, useRef as A, useEffect as w } from "react";
2
+ import { resolveRecentKind as I, IS_APPLE as C } from "./types.js";
3
+ const k = "color-picker-recent", L = 11;
4
+ let i = 0;
5
+ function a(e) {
4
6
  try {
5
7
  const t = localStorage.getItem(e);
6
8
  return t ? JSON.parse(t) : [];
@@ -8,32 +10,53 @@ function n(e) {
8
10
  return [];
9
11
  }
10
12
  }
11
- function E(e, t, o) {
13
+ function T(e, t, r) {
12
14
  try {
13
- localStorage.setItem(e, JSON.stringify(t.slice(0, o)));
15
+ localStorage.setItem(e, JSON.stringify(t.slice(0, r)));
14
16
  } catch {
15
17
  }
16
18
  }
17
- function v(e) {
18
- const t = e?.storageKey ?? d, o = e?.maxItems ?? p, [i, r] = I(() => n(t)), S = c(() => {
19
- r(n(t));
20
- }, [t]), g = c(
21
- (s, a, f) => {
22
- const y = n(t).filter(
23
- (m) => !(m.value === s && m.sectionKey === a)
24
- ), l = [{ value: s, sectionKey: a, border: f }, ...y].slice(0, o);
25
- E(t, l, o), r(l);
19
+ function _(e) {
20
+ return e.code !== "KeyH" || !e.shiftKey || e.altKey ? !1 : C ? e.metaKey && !e.ctrlKey : e.ctrlKey && !e.metaKey;
21
+ }
22
+ function F(e) {
23
+ const t = e?.storageKey ?? k, r = e?.maxItems ?? L, l = e?.onApplyShortcut, s = e?.shortcutScoped ?? !1, [p, u] = R(
24
+ () => a(t)
25
+ ), h = f(() => {
26
+ u(a(t));
27
+ }, [t]), K = f(
28
+ (o, c, n) => {
29
+ const g = a(t).filter(
30
+ (S) => !(S.value === o && S.sectionKey === c)
31
+ ), m = [{ value: o, sectionKey: c, border: n }, ...g].slice(
32
+ 0,
33
+ r
34
+ );
35
+ T(t, m, r), u(m);
26
36
  },
27
- [t, o]
28
- ), u = c(() => {
37
+ [t, r]
38
+ ), E = f(() => {
29
39
  try {
30
40
  localStorage.removeItem(t);
31
41
  } catch {
32
42
  }
33
- r([]);
34
- }, [t]);
35
- return { recentColors: i, addRecent: g, clearRecent: u, reload: S };
43
+ u([]);
44
+ }, [t]), y = A(l);
45
+ y.current = l;
46
+ const d = !!l;
47
+ return w(() => {
48
+ if (!d) return;
49
+ s && (i += 1);
50
+ const o = (c) => {
51
+ if (!_(c) || !s && i > 0) return;
52
+ const n = a(t)[0];
53
+ n && (c.preventDefault(), y.current?.(n.value, I(n.sectionKey)));
54
+ };
55
+ return window.addEventListener("keydown", o), () => {
56
+ window.removeEventListener("keydown", o), s && (i -= 1);
57
+ };
58
+ }, [d, s, t]), { recentColors: p, addRecent: K, clearRecent: E, reload: h };
36
59
  }
37
60
  export {
38
- v as useRecentColors
61
+ F as useRecentColors
39
62
  };
@@ -1,15 +1,15 @@
1
- const o = "_commentComposerWrapper_17oei_1", e = "_commentComposerFloat_17oei_68", r = "_composerContainer_17oei_97", t = "_editorWrapper_17oei_113", p = "_editMode_17oei_192", m = {
1
+ const o = "_commentComposerWrapper_jn3k1_1", e = "_commentComposerFloat_jn3k1_135", r = "_composerContainer_jn3k1_193", t = "_editorWrapper_jn3k1_225", n = "_editMode_jn3k1_383", p = {
2
2
  commentComposerWrapper: o,
3
3
  commentComposerFloat: e,
4
4
  composerContainer: r,
5
5
  editorWrapper: t,
6
- editMode: p
6
+ editMode: n
7
7
  };
8
8
  export {
9
9
  e as commentComposerFloat,
10
10
  o as commentComposerWrapper,
11
11
  r as composerContainer,
12
- m as default,
13
- p as editMode,
12
+ p as default,
13
+ n as editMode,
14
14
  t as editorWrapper
15
15
  };
@@ -0,0 +1,9 @@
1
+ var o;
2
+ ((T) => {
3
+ ((e) => {
4
+ e.None = "NONE", e.Project = "PROJECT", e.Sprint = "SPRINT", e.Folder = "FOLDER", e.Workspace = "WORKSPACE", e.Page = "PAGE", e.Task = "PROJECTTASK", e.Form = "FORM", e.Attachment = "ATTACHMENT", e.User = "USER", e.Comment = "COMMENT", e.Flow = "FLOW";
5
+ })(T.Entity || (T.Entity = {}));
6
+ })(o || (o = {}));
7
+ export {
8
+ o as CommentComposerTypes
9
+ };
@@ -1,4 +1,4 @@
1
- const s = "_section_s7rqu_1", t = {
1
+ const s = "_section_6nzxb_1", t = {
2
2
  section: s
3
3
  };
4
4
  export {
@@ -1,4 +1,4 @@
1
- const r = "_brandingWrapper_vvk0o_1", a = {
1
+ const r = "_brandingWrapper_ag0no_1", a = {
2
2
  brandingWrapper: r
3
3
  };
4
4
  export {
@@ -1,4 +1,4 @@
1
- const o = "_root_195do_1", t = {
1
+ const o = "_root_122b9_1", t = {
2
2
  root: o
3
3
  };
4
4
  export {
@@ -1,6 +1,7 @@
1
1
  import { EmojiPickerProps } from './EmojiPicker';
2
- export declare const EmojiPanel: ({ locales, onChange, onClose, setRandomIcon, querySearch, }: Pick<EmojiPickerProps, "locales" | "value" | "onChange" | "querySearch"> & {
2
+ export declare const EmojiPanel: ({ locales, onChange, onClose, setRandomIcon, querySearch, showRandomButton, }: Pick<EmojiPickerProps, "locales" | "value" | "onChange" | "querySearch"> & {
3
3
  onClose: () => void;
4
4
  setRandomIcon: (icon: string) => void;
5
+ showRandomButton?: boolean;
5
6
  }) => import("react/jsx-runtime").JSX.Element;
6
7
  //# sourceMappingURL=EmojiPanel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmojiPanel.d.ts","sourceRoot":"","sources":["../../../src/components/EmojiPicker/EmojiPanel.tsx"],"names":[],"mappings":"AAyCA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAsBjD,eAAO,MAAM,UAAU,GAAI,6DAMxB,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,aAAa,CAAC,GAAG;IAC5E,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC,4CAiTA,CAAC"}
1
+ {"version":3,"file":"EmojiPanel.d.ts","sourceRoot":"","sources":["../../../src/components/EmojiPicker/EmojiPanel.tsx"],"names":[],"mappings":"AAyCA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAsBjD,eAAO,MAAM,UAAU,GAAI,+EAOxB,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,aAAa,CAAC,GAAG;IAC5E,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,4CAqTA,CAAC"}
@@ -1,61 +1,62 @@
1
1
  import { jsxs as y, jsx as t } from "react/jsx-runtime";
2
- import { useState as d, useRef as p, useEffect as R, useCallback as K } from "react";
3
- import { useTranslation as L } from "react-i18next";
4
- import { Search01Icon as U, ShuffleIcon as V, Clock01Icon as W, SmileIcon as X, Pizza01Icon as Z, FootballIcon as _, Airplane01Icon as ee, BulbIcon as te, Asterisk02Icon as oe, Flag02Icon as re } from "@hugeicons/core-free-icons";
2
+ import { useState as d, useRef as p, useEffect as A, useCallback as L } from "react";
3
+ import { useTranslation as U } from "react-i18next";
4
+ import { Search01Icon as V, ShuffleIcon as W, Clock01Icon as X, SmileIcon as Z, Pizza01Icon as _, FootballIcon as ee, Airplane01Icon as te, BulbIcon as oe, Asterisk02Icon as re, Flag02Icon as ne } from "@hugeicons/core-free-icons";
5
5
  import { HugeiconsIcon as c } from "@hugeicons/react";
6
- import { useEvent as ne } from "@layers-app/draggable-ui";
7
- import { Stack as v, FocusTrap as ie, Flex as z, TextInput as ce, Tooltip as se, ActionIcon as A, Paper as F, Text as q, SimpleGrid as N } from "@mantine/core";
8
- import ae from "fuse.js";
9
- import le from "../../assets/svg/dog.svg.js";
10
- import { pickRandomEmoji as fe } from "../../helpers/pickRandomEmoji.js";
11
- import { NoData as ue } from "../NoData/NoData.js";
12
- import { IconEntity as de } from "../ProjectIcon/ProjectIcon.js";
13
- import { frequentEmoji as pe } from "./constants.js";
14
- import { getEmojis as me } from "./utils.js";
6
+ import { useEvent as ie } from "@layers-app/draggable-ui";
7
+ import { Stack as v, FocusTrap as ce, Flex as z, TextInput as se, Tooltip as ae, ActionIcon as F, Paper as q, Text as N, SimpleGrid as M } from "@mantine/core";
8
+ import le from "fuse.js";
9
+ import fe from "../../assets/svg/dog.svg.js";
10
+ import { pickRandomEmoji as ue } from "../../helpers/pickRandomEmoji.js";
11
+ import { NoData as de } from "../NoData/NoData.js";
12
+ import { IconEntity as pe } from "../ProjectIcon/ProjectIcon.js";
13
+ import { frequentEmoji as me } from "./constants.js";
14
+ import { getEmojis as he } from "./utils.js";
15
15
  import T from "./EmojiPicker.module.css.js";
16
- const he = [
17
- { i: "frequent", icon: /* @__PURE__ */ t(c, { size: 20, icon: W }) },
18
- { i: "people", icon: /* @__PURE__ */ t(c, { size: 20, icon: X }) },
16
+ const ge = [
17
+ { i: "frequent", icon: /* @__PURE__ */ t(c, { size: 20, icon: X }) },
18
+ { i: "people", icon: /* @__PURE__ */ t(c, { size: 20, icon: Z }) },
19
19
  {
20
20
  i: "nature",
21
- icon: /* @__PURE__ */ t(le, { width: 20, height: 20 })
21
+ icon: /* @__PURE__ */ t(fe, { width: 20, height: 20 })
22
22
  },
23
- { i: "foods", icon: /* @__PURE__ */ t(c, { size: 20, icon: Z }) },
24
- { i: "activity", icon: /* @__PURE__ */ t(c, { size: 20, icon: _ }) },
25
- { i: "places", icon: /* @__PURE__ */ t(c, { size: 20, icon: ee }) },
26
- { i: "objects", icon: /* @__PURE__ */ t(c, { size: 20, icon: te }) },
27
- { i: "symbols", icon: /* @__PURE__ */ t(c, { size: 20, icon: oe }) },
28
- { i: "flags", icon: /* @__PURE__ */ t(c, { size: 20, icon: re }) }
29
- ], Re = ({
23
+ { i: "foods", icon: /* @__PURE__ */ t(c, { size: 20, icon: _ }) },
24
+ { i: "activity", icon: /* @__PURE__ */ t(c, { size: 20, icon: ee }) },
25
+ { i: "places", icon: /* @__PURE__ */ t(c, { size: 20, icon: te }) },
26
+ { i: "objects", icon: /* @__PURE__ */ t(c, { size: 20, icon: oe }) },
27
+ { i: "symbols", icon: /* @__PURE__ */ t(c, { size: 20, icon: re }) },
28
+ { i: "flags", icon: /* @__PURE__ */ t(c, { size: 20, icon: ne }) }
29
+ ], Ae = ({
30
30
  locales: u,
31
31
  onChange: C,
32
- onClose: M,
33
- setRandomIcon: P,
34
- querySearch: m
32
+ onClose: P,
33
+ setRandomIcon: Q,
34
+ querySearch: m,
35
+ showRandomButton: w = !0
35
36
  }) => {
36
- const [b, k] = d("frequent"), x = p("frequent"), h = p({}), I = p(null), [S, w] = d(""), [Q, O] = d([]), [a, B] = d(null), [E, j] = d([]), { t: G } = L(), g = p(!1), l = p(null);
37
- R(() => {
37
+ const [b, k] = d("frequent"), x = p("frequent"), h = p({}), I = p(null), [S, E] = d(""), [O, G] = d([]), [a, H] = d(null), [j, D] = d([]), { t: Y } = U(), g = p(!1), l = p(null);
38
+ A(() => {
38
39
  if (typeof m == "string") {
39
40
  const e = m.slice(1);
40
- if (w(e), a) {
41
+ if (E(e), a) {
41
42
  const o = a.search(e);
42
- j(o.map((r) => r.item.e));
43
+ D(o.map((r) => r.item.e));
43
44
  }
44
45
  }
45
- }, [m, a]), R(() => {
46
+ }, [m, a]), A(() => {
46
47
  (async () => {
47
- const o = await me(), r = o.flatMap(
48
+ const o = await he(), r = o.flatMap(
48
49
  (i) => i.e.map((n) => ({
49
50
  e: n.e,
50
51
  n: n.n,
51
52
  k: n.k
52
53
  // категория
53
54
  }))
54
- ), s = pe.map(
55
+ ), s = me.map(
55
56
  (i) => r.find((n) => n.e === i)
56
57
  );
57
- O([{ i: "frequent", e: s }, ...o]);
58
- const f = new ae(
58
+ G([{ i: "frequent", e: s }, ...o]);
59
+ const f = new le(
59
60
  o.flatMap(
60
61
  (i) => i.e.map((n) => ({
61
62
  e: n.e,
@@ -68,32 +69,32 @@ const he = [
68
69
  threshold: 0.3
69
70
  }
70
71
  );
71
- B(f);
72
+ H(f);
72
73
  })();
73
74
  }, []);
74
- const H = K(
75
+ const $ = L(
75
76
  (e) => {
76
77
  const o = e.currentTarget.value;
77
- if (w(o), a) {
78
+ if (E(o), a) {
78
79
  const r = a.search(o);
79
- j(r.map((s) => s.item.e));
80
+ D(r.map((s) => s.item.e));
80
81
  }
81
82
  },
82
83
  [a]
83
- ), D = ne((e) => {
84
+ ), R = ie((e) => {
84
85
  const o = e.currentTarget.getAttribute("data-icon");
85
86
  o && (C?.(
86
- de.stringify({
87
+ pe.stringify({
87
88
  emoji: o.replace("e:", "")
88
89
  })
89
- ), M());
90
- }), Y = (e) => {
90
+ ), P());
91
+ }), B = (e) => {
91
92
  const o = I.current, r = h.current[e.i];
92
93
  if (!o || !r) return;
93
94
  g.current = !0, l.current = e.i, k(e.i);
94
95
  const s = r.offsetTop - o.offsetTop;
95
96
  o.scrollTo({ top: s, behavior: "smooth" });
96
- }, $ = () => {
97
+ }, J = () => {
97
98
  const e = I.current;
98
99
  if (!e) return;
99
100
  const o = e.scrollTop;
@@ -112,9 +113,9 @@ const he = [
112
113
  n < s && (s = n, r = f);
113
114
  }
114
115
  }), r !== x.current && (x.current = r, k(r));
115
- }, J = typeof m == "string";
116
+ }, K = typeof m == "string";
116
117
  return /* @__PURE__ */ y(v, { gap: 0, h: "100%", children: [
117
- /* @__PURE__ */ t(ie, { active: !0, children: /* @__PURE__ */ y(
118
+ /* @__PURE__ */ t(ce, { active: !0, children: /* @__PURE__ */ y(
118
119
  z,
119
120
  {
120
121
  my: "sm",
@@ -125,9 +126,9 @@ const he = [
125
126
  h: 38,
126
127
  children: [
127
128
  /* @__PURE__ */ t(
128
- ce,
129
+ se,
129
130
  {
130
- leftSection: /* @__PURE__ */ t(c, { size: 16, icon: U }),
131
+ leftSection: /* @__PURE__ */ t(c, { size: 16, icon: V }),
131
132
  value: S,
132
133
  placeholder: `${u?.search}...`,
133
134
  "data-autofocus": !0,
@@ -137,26 +138,26 @@ const he = [
137
138
  borderRadius: "var(--mantine-radius-default)"
138
139
  }
139
140
  },
140
- w: 320,
141
- onChange: H,
141
+ w: w ? 320 : "100%",
142
+ onChange: $,
142
143
  radius: "var(--mantine-radius-default)"
143
144
  }
144
145
  ),
145
- /* @__PURE__ */ t(se, { withArrow: !0, label: u?.random || G("random"), children: /* @__PURE__ */ t(
146
- A,
146
+ w && /* @__PURE__ */ t(ae, { withArrow: !0, label: u?.random || Y("random"), children: /* @__PURE__ */ t(
147
+ F,
147
148
  {
148
149
  h: 36,
149
150
  w: 36,
150
151
  variant: "outline",
151
152
  color: "var(--mantine-color-default-border)",
152
- onClick: () => fe(P, C),
153
+ onClick: () => ue(Q, C),
153
154
  className: T.randomIcon,
154
155
  children: /* @__PURE__ */ t(
155
156
  c,
156
157
  {
157
158
  color: "var(--mantine-color-default-color)",
158
159
  size: 20,
159
- icon: V
160
+ icon: W
160
161
  }
161
162
  )
162
163
  }
@@ -174,10 +175,10 @@ const he = [
174
175
  overflowY: "auto"
175
176
  },
176
177
  ref: I,
177
- onScroll: $,
178
- children: S ? /* @__PURE__ */ y(v, { flex: 1, align: "stretch", children: [
179
- !J && /* @__PURE__ */ t(
180
- F,
178
+ onScroll: J,
179
+ children: S ? /* @__PURE__ */ y(v, { flex: 1, align: "stretch", gap: 0, children: [
180
+ !K && /* @__PURE__ */ t(
181
+ q,
181
182
  {
182
183
  py: 6,
183
184
  px: 6,
@@ -185,20 +186,20 @@ const he = [
185
186
  top: -1,
186
187
  style: { zIndex: 1 },
187
188
  bg: "light-dark(var(--mantine-color-white), var(--mantine-color-dark-6))",
188
- children: /* @__PURE__ */ t(q, { fz: "sm", c: "dimmed", children: u?.searchResults })
189
+ children: /* @__PURE__ */ t(N, { fz: "xs", fw: 500, lh: "140%", c: "dimmed", children: u?.searchResults })
189
190
  }
190
191
  ),
191
- E.length ? /* @__PURE__ */ t(N, { cols: 10, spacing: 0, children: E.map((e) => /* @__PURE__ */ t(
192
+ j.length ? /* @__PURE__ */ t(M, { cols: 10, spacing: 0, children: j.map((e) => /* @__PURE__ */ t(
192
193
  "div",
193
194
  {
194
195
  className: T.item,
195
196
  "data-icon": e,
196
- onClick: D,
197
+ onClick: R,
197
198
  children: e
198
199
  },
199
200
  e
200
201
  )) }) : /* @__PURE__ */ t(z, { flex: 1, justify: "center", align: "stretch", children: /* @__PURE__ */ t(
201
- ue,
202
+ de,
202
203
  {
203
204
  size: 100,
204
205
  description: u?.searchNoResults,
@@ -207,7 +208,7 @@ const he = [
207
208
  }
208
209
  }
209
210
  ) })
210
- ] }) : Q.map((e) => /* @__PURE__ */ y(
211
+ ] }) : O.map((e) => /* @__PURE__ */ y(
211
212
  "div",
212
213
  {
213
214
  ref: (o) => {
@@ -215,24 +216,24 @@ const he = [
215
216
  },
216
217
  children: [
217
218
  /* @__PURE__ */ t(
218
- F,
219
+ q,
219
220
  {
220
- bg: "transparent",
221
+ bg: "light-dark(var(--mantine-color-white), var(--mantine-color-dark-6))",
221
222
  py: 2,
222
223
  px: 6,
223
224
  pos: "sticky",
224
225
  top: -1,
225
226
  h: 23,
226
227
  style: { zIndex: 1 },
227
- children: /* @__PURE__ */ t(q, { fz: "xs", c: "dimmed", children: u?.emojiCategory?.[e.i] })
228
+ children: /* @__PURE__ */ t(N, { fz: "xs", fw: 500, lh: "140%", c: "dimmed", children: u?.emojiCategory?.[e.i] })
228
229
  }
229
230
  ),
230
- /* @__PURE__ */ t(N, { cols: 10, spacing: 0, children: e.e.map((o) => /* @__PURE__ */ t(
231
+ /* @__PURE__ */ t(M, { cols: 10, spacing: 0, children: e.e.map((o) => /* @__PURE__ */ t(
231
232
  "div",
232
233
  {
233
234
  className: T.item,
234
235
  "data-icon": o.e,
235
- onClick: D,
236
+ onClick: R,
236
237
  children: o.e
237
238
  },
238
239
  o.e
@@ -252,14 +253,14 @@ const he = [
252
253
  justify: "space-between",
253
254
  h: "56px",
254
255
  px: 8,
255
- children: he.map((e) => /* @__PURE__ */ t(
256
- A,
256
+ children: ge.map((e) => /* @__PURE__ */ t(
257
+ F,
257
258
  {
258
259
  variant: b === e.i ? "light" : "subtle",
259
260
  color: b === e.i ? "var(--mantine-color-default-color)" : "var(--mantine-color-dimmed)",
260
261
  radius: "default",
261
262
  size: 32,
262
- onClick: () => Y(e),
263
+ onClick: () => B(e),
263
264
  "data-active": b === e.i,
264
265
  children: e.icon
265
266
  },
@@ -270,5 +271,5 @@ const he = [
270
271
  ] });
271
272
  };
272
273
  export {
273
- Re as EmojiPanel
274
+ Ae as EmojiPanel
274
275
  };
@@ -12,6 +12,14 @@ export type EmojiPickerProps = {
12
12
  showIcons?: boolean;
13
13
  showColors?: boolean;
14
14
  showEmojis?: boolean;
15
+ showGifs?: boolean;
16
+ /**
17
+ * Called when a GIF is picked from the GIF tab. Receives the GIF's URL.
18
+ * Distinct from {@link onChange} because hosts treat a GIF differently from
19
+ * an emoji/icon — chat composers send it as a message rather than inserting
20
+ * it into the text.
21
+ */
22
+ onSelectGif?: (url: string) => void;
15
23
  querySearch?: string;
16
24
  defaultActiveTab?: string | null;
17
25
  /** Controls how the popover opens. 'click' preserves current behavior; 'realtime' opens only when typing matches triggerRegex. */
@@ -22,6 +30,19 @@ export type EmojiPickerProps = {
22
30
  typingSeq?: number;
23
31
  /** If true, clicking the random icon button will not close the popover. Default: false */
24
32
  keepOpenOnRandom?: boolean;
33
+ /**
34
+ * Show the "Random" (shuffle) button next to the search field. Default: true.
35
+ * Connect chat composer + message reactions pass false — a random emoji is
36
+ * meaningless there.
37
+ */
38
+ showRandomButton?: boolean;
39
+ /**
40
+ * If false, picking an emoji does NOT close the popover — useful for chat
41
+ * composers where users typically want to insert several emoji at once.
42
+ * Click-outside still closes. Default: true (preserves legacy behavior of
43
+ * one-shot icon pickers in Pages/Projects).
44
+ */
45
+ closeOnSelect?: boolean;
25
46
  };
26
47
  export type EmojiPickerLocales = {
27
48
  emojis?: string;
@@ -32,7 +53,8 @@ export type EmojiPickerLocales = {
32
53
  remove?: string;
33
54
  random?: string;
34
55
  icons?: string;
56
+ gifs?: string;
35
57
  emojiCategory?: Record<string, string>;
36
58
  };
37
- export declare const EmojiPicker: ({ project, value, querySearch, children, onChange, position, popoverProps, showIcons, showColors, defaultActiveTab, showEmojis, withinPortal, locales: _locales, openWhen, triggerRegex, typingSeq, showRemoveButton, keepOpenOnRandom, }: PropsWithChildren<EmojiPickerProps>) => import("react/jsx-runtime").JSX.Element;
59
+ export declare const EmojiPicker: ({ project, value, querySearch, children, onChange, position, popoverProps, showIcons, showColors, showGifs, onSelectGif, defaultActiveTab, showEmojis, withinPortal, locales: _locales, openWhen, triggerRegex, typingSeq, showRemoveButton, keepOpenOnRandom, showRandomButton, closeOnSelect, }: PropsWithChildren<EmojiPickerProps>) => import("react/jsx-runtime").JSX.Element;
38
60
  //# sourceMappingURL=EmojiPicker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmojiPicker.d.ts","sourceRoot":"","sources":["../../../src/components/EmojiPicker/EmojiPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAgC,MAAM,OAAO,CAAC;AAGxE,OAAO,EAIL,gBAAgB,EAEhB,YAAY,EAEb,MAAM,eAAe,CAAC;AAQvB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,kIAAkI;IAClI,QAAQ,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAChC,2GAA2G;IAC3G,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gHAAgH;IAChH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0FAA0F;IAC1F,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,2OAmBzB,iBAAiB,CAAC,gBAAgB,CAAC,4CAiNrC,CAAC"}
1
+ {"version":3,"file":"EmojiPicker.d.ts","sourceRoot":"","sources":["../../../src/components/EmojiPicker/EmojiPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAgC,MAAM,OAAO,CAAC;AAGxE,OAAO,EAIL,gBAAgB,EAEhB,YAAY,EAEb,MAAM,eAAe,CAAC;AAWvB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,kIAAkI;IAClI,QAAQ,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAChC,2GAA2G;IAC3G,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gHAAgH;IAChH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0FAA0F;IAC1F,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,mSAuBzB,iBAAiB,CAAC,gBAAgB,CAAC,4CA2PrC,CAAC"}