@uzum-tech/ui 2.3.8 → 2.4.1

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 (335) hide show
  1. package/dist/index.js +63596 -32483
  2. package/dist/index.mjs +64978 -33874
  3. package/dist/index.prod.js +3 -3
  4. package/dist/index.prod.mjs +3 -3
  5. package/es/_internal/icons/Bold.d.ts +2 -0
  6. package/es/_internal/icons/Bold.mjs +29 -0
  7. package/es/_internal/icons/BulletList.d.ts +2 -0
  8. package/es/_internal/icons/BulletList.mjs +23 -0
  9. package/es/_internal/icons/HorizontalRule.d.ts +2 -0
  10. package/es/_internal/icons/HorizontalRule.mjs +14 -0
  11. package/es/_internal/icons/Italic.d.ts +2 -0
  12. package/es/_internal/icons/Italic.mjs +19 -0
  13. package/es/_internal/icons/NumberedList.d.ts +2 -0
  14. package/es/_internal/icons/NumberedList.mjs +23 -0
  15. package/es/_internal/icons/Quote.d.ts +2 -0
  16. package/es/_internal/icons/Quote.mjs +23 -0
  17. package/es/_internal/icons/SettingsLine.d.ts +2 -0
  18. package/es/_internal/icons/SettingsLine.mjs +19 -0
  19. package/es/_internal/icons/Strikethrough.d.ts +2 -0
  20. package/es/_internal/icons/Strikethrough.mjs +14 -0
  21. package/es/_internal/icons/index.d.ts +8 -0
  22. package/es/_internal/icons/index.mjs +8 -0
  23. package/es/_styles/markdown/markdown-content.cssr.d.ts +6 -0
  24. package/es/_styles/markdown/markdown-content.cssr.mjs +22 -0
  25. package/es/_utils/markdown/index.d.ts +3 -2
  26. package/es/_utils/markdown/index.mjs +2 -1
  27. package/es/_utils/markdown/render-markdown.d.ts +2 -1
  28. package/es/_utils/markdown/render-markdown.mjs +1 -1
  29. package/es/chat/src/Chat.d.ts +261 -24
  30. package/es/chat/src/Chat.mjs +2 -0
  31. package/es/chat/src/ChatMainArea.d.ts +81 -8
  32. package/es/chat/src/ChatMainArea.mjs +111 -355
  33. package/es/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.d.ts +9084 -0
  34. package/es/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.mjs +70 -0
  35. package/es/chat/src/ChatParts/ChatAttachmentButton/interface.d.ts +2645 -0
  36. package/es/chat/src/ChatParts/ChatAttachmentButton/interface.mjs +19 -0
  37. package/es/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.d.ts +9070 -0
  38. package/es/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.mjs +78 -0
  39. package/es/chat/src/ChatParts/ChatEditingBlock/interface.d.ts +2637 -0
  40. package/es/chat/src/ChatParts/ChatEditingBlock/interface.mjs +15 -0
  41. package/es/chat/src/ChatParts/ChatEditorInput/ChatEditorInput.d.ts +89 -0
  42. package/es/chat/src/ChatParts/ChatEditorInput/ChatEditorInput.mjs +63 -0
  43. package/es/chat/src/ChatParts/ChatEditorInput/interface.d.ts +42 -0
  44. package/es/chat/src/ChatParts/ChatEditorInput/interface.mjs +34 -0
  45. package/es/chat/src/ChatParts/ChatFooter/ChatFooter.d.ts +115 -0
  46. package/es/chat/src/ChatParts/ChatFooter/ChatFooter.mjs +99 -0
  47. package/es/chat/src/ChatParts/ChatFooter/interface.d.ts +56 -0
  48. package/es/chat/src/ChatParts/ChatFooter/interface.mjs +46 -0
  49. package/es/chat/src/ChatParts/ChatHeader/ChatHeader.d.ts +9205 -0
  50. package/es/chat/src/ChatParts/ChatHeader/ChatHeader.mjs +219 -0
  51. package/es/chat/src/ChatParts/ChatHeader/interface.d.ts +2694 -0
  52. package/es/chat/src/ChatParts/ChatHeader/interface.mjs +67 -0
  53. package/es/chat/src/ChatParts/ChatLegacyInput/ChatLegacyInput.d.ts +9142 -0
  54. package/es/chat/src/ChatParts/ChatLegacyInput/ChatLegacyInput.mjs +130 -0
  55. package/es/chat/src/ChatParts/ChatLegacyInput/interface.d.ts +2654 -0
  56. package/es/chat/src/ChatParts/ChatLegacyInput/interface.mjs +27 -0
  57. package/es/chat/src/ChatParts/ChatMessagesArea/ChatMessagesArea.d.ts +148 -0
  58. package/es/chat/src/ChatParts/ChatMessagesArea/ChatMessagesArea.mjs +92 -0
  59. package/es/chat/src/ChatParts/ChatMessagesArea/interface.d.ts +72 -0
  60. package/es/chat/src/ChatParts/ChatMessagesArea/interface.mjs +58 -0
  61. package/es/chat/src/interface.d.ts +7 -0
  62. package/es/chat/src/interface.mjs +4 -0
  63. package/es/chat/src/styles/index.cssr.mjs +11 -12
  64. package/es/chat/styles/light.d.ts +4 -0
  65. package/es/chat/styles/light.mjs +20 -1
  66. package/es/components.d.ts +13087 -103
  67. package/es/components.mjs +5 -0
  68. package/es/config-provider/src/ConfigProvider.mjs +6 -2
  69. package/es/config-provider/src/internal-interface.d.ts +2 -0
  70. package/es/data-table/index.d.ts +1 -1
  71. package/es/data-table/src/ColumnSettings/ColumnSettingsDrawer.d.ts +156 -0
  72. package/es/data-table/src/ColumnSettings/ColumnSettingsDrawer.mjs +220 -0
  73. package/es/data-table/src/ColumnSettings/styles.cssr.d.ts +2 -0
  74. package/es/data-table/src/ColumnSettings/styles.cssr.mjs +25 -0
  75. package/es/data-table/src/DataTable.d.ts +60 -2
  76. package/es/data-table/src/DataTable.mjs +99 -23
  77. package/es/data-table/src/HeaderButton/FilterMenu.d.ts +14 -0
  78. package/es/data-table/src/interface.d.ts +53 -1
  79. package/es/data-table/src/interface.mjs +18 -1
  80. package/es/data-table/src/styles/index.cssr.mjs +17 -1
  81. package/es/data-table/src/use-column-settings.d.ts +2 -0
  82. package/es/data-table/src/use-column-settings.mjs +124 -0
  83. package/es/data-table/src/utils/column-utils.d.ts +2 -1
  84. package/es/data-table/src/utils/column-utils.mjs +6 -0
  85. package/es/editor/index.d.ts +10 -0
  86. package/es/editor/index.mjs +5 -0
  87. package/es/editor/src/Editor.d.ts +3922 -0
  88. package/es/editor/src/Editor.mjs +230 -0
  89. package/es/editor/src/EditorParts/BlockTypeSelect/BlockTypeSelect.d.ts +37 -0
  90. package/es/editor/src/EditorParts/BlockTypeSelect/BlockTypeSelect.mjs +63 -0
  91. package/es/editor/src/EditorParts/BlockTypeSelect/interface.d.ts +21 -0
  92. package/es/editor/src/EditorParts/BlockTypeSelect/interface.mjs +14 -0
  93. package/es/editor/src/EditorParts/EditorContent/EditorContent.d.ts +4102 -0
  94. package/es/editor/src/EditorParts/EditorContent/EditorContent.mjs +154 -0
  95. package/es/editor/src/EditorParts/EditorContent/index.d.ts +2 -0
  96. package/es/editor/src/EditorParts/EditorContent/index.mjs +2 -0
  97. package/es/editor/src/EditorParts/EditorContent/interface.d.ts +1918 -0
  98. package/es/editor/src/EditorParts/EditorContent/interface.mjs +17 -0
  99. package/es/editor/src/EditorParts/EditorToolbar/EditorToolbar.d.ts +4606 -0
  100. package/es/editor/src/EditorParts/EditorToolbar/EditorToolbar.mjs +170 -0
  101. package/es/editor/src/EditorParts/EditorToolbar/composables/use-editor-toolbar-customization.d.ts +11 -0
  102. package/es/editor/src/EditorParts/EditorToolbar/composables/use-editor-toolbar-customization.mjs +56 -0
  103. package/es/editor/src/EditorParts/EditorToolbar/index.d.ts +2 -0
  104. package/es/editor/src/EditorParts/EditorToolbar/index.mjs +2 -0
  105. package/es/editor/src/EditorParts/EditorToolbar/interface.d.ts +1924 -0
  106. package/es/editor/src/EditorParts/EditorToolbar/interface.mjs +18 -0
  107. package/es/editor/src/EditorParts/SendButton/SendButton.d.ts +23 -0
  108. package/es/editor/src/EditorParts/SendButton/SendButton.mjs +44 -0
  109. package/es/editor/src/EditorParts/SendButton/interface.d.ts +18 -0
  110. package/es/editor/src/EditorParts/SendButton/interface.mjs +8 -0
  111. package/es/editor/src/EditorParts/ToolbarButton/ToolbarButton.d.ts +32 -0
  112. package/es/editor/src/EditorParts/ToolbarButton/ToolbarButton.mjs +44 -0
  113. package/es/editor/src/EditorParts/ToolbarButton/interface.d.ts +20 -0
  114. package/es/editor/src/EditorParts/ToolbarButton/interface.mjs +13 -0
  115. package/es/editor/src/composables/use-editor-commands.d.ts +8 -0
  116. package/es/editor/src/composables/use-editor-commands.mjs +69 -0
  117. package/es/editor/src/composables/use-editor-css-vars.d.ts +4 -0
  118. package/es/editor/src/composables/use-editor-css-vars.mjs +89 -0
  119. package/es/editor/src/constants.d.ts +12 -0
  120. package/es/editor/src/constants.mjs +25 -0
  121. package/es/editor/src/extensions.d.ts +7 -0
  122. package/es/editor/src/extensions.mjs +135 -0
  123. package/es/editor/src/interface.d.ts +2037 -0
  124. package/es/editor/src/interface.mjs +53 -0
  125. package/es/editor/src/markdown/constants.d.ts +8 -0
  126. package/es/editor/src/markdown/constants.mjs +206 -0
  127. package/es/editor/src/markdown/editor-serializer.d.ts +9 -0
  128. package/es/editor/src/markdown/editor-serializer.mjs +18 -0
  129. package/es/editor/src/markdown/escape.d.ts +2 -0
  130. package/es/editor/src/markdown/escape.mjs +24 -0
  131. package/es/editor/src/markdown/html.d.ts +1 -0
  132. package/es/editor/src/markdown/html.mjs +4 -0
  133. package/es/editor/src/markdown/parser.d.ts +4 -0
  134. package/es/editor/src/markdown/parser.mjs +36 -0
  135. package/es/editor/src/markdown/serializer-state.d.ts +10 -0
  136. package/es/editor/src/markdown/serializer-state.mjs +12 -0
  137. package/es/editor/src/markdown/serializer.d.ts +3 -0
  138. package/es/editor/src/markdown/serializer.mjs +8 -0
  139. package/es/editor/src/styles/index.cssr.d.ts +2 -0
  140. package/es/editor/src/styles/index.cssr.mjs +131 -0
  141. package/es/editor/styles/dark.d.ts +634 -0
  142. package/es/editor/styles/dark.mjs +21 -0
  143. package/es/editor/styles/index.d.ts +3 -0
  144. package/es/editor/styles/index.mjs +2 -0
  145. package/es/editor/styles/light.d.ts +685 -0
  146. package/es/editor/styles/light.mjs +91 -0
  147. package/es/editor/tests/fixtures/round-trip.d.ts +12 -0
  148. package/es/editor/tests/fixtures/round-trip.mjs +98 -0
  149. package/es/editor/tests/utils.d.ts +7 -0
  150. package/es/editor/tests/utils.mjs +27 -0
  151. package/es/locales/common/enUS.d.ts +22 -0
  152. package/es/locales/common/enUS.mjs +23 -1
  153. package/es/locales/common/ruRU.mjs +28 -8
  154. package/es/locales/common/uzUZ.mjs +23 -1
  155. package/es/locales/common/zhCN.mjs +23 -1
  156. package/es/locales/utils/date-locale.d.ts +2 -0
  157. package/es/locales/utils/date-locale.mjs +8 -0
  158. package/es/message-bubble/src/MessageBubble.d.ts +9 -0
  159. package/es/message-bubble/src/MessageBubble.mjs +9 -8
  160. package/es/message-bubble/src/interface.d.ts +5 -1
  161. package/es/message-bubble/src/interface.mjs +4 -0
  162. package/es/message-bubble/src/styles/index.cssr.mjs +4 -17
  163. package/es/styles.d.ts +1 -0
  164. package/es/styles.mjs +1 -0
  165. package/es/themes/dark.mjs +2 -0
  166. package/es/themes/light.mjs +2 -0
  167. package/es/version.d.ts +1 -1
  168. package/es/version.mjs +1 -1
  169. package/lib/_internal/icons/Bold.d.ts +2 -0
  170. package/lib/_internal/icons/Bold.js +13 -0
  171. package/lib/_internal/icons/BulletList.d.ts +2 -0
  172. package/lib/_internal/icons/BulletList.js +13 -0
  173. package/lib/_internal/icons/HorizontalRule.d.ts +2 -0
  174. package/lib/_internal/icons/HorizontalRule.js +10 -0
  175. package/lib/_internal/icons/Italic.d.ts +2 -0
  176. package/lib/_internal/icons/Italic.js +11 -0
  177. package/lib/_internal/icons/NumberedList.d.ts +2 -0
  178. package/lib/_internal/icons/NumberedList.js +13 -0
  179. package/lib/_internal/icons/Quote.d.ts +2 -0
  180. package/lib/_internal/icons/Quote.js +13 -0
  181. package/lib/_internal/icons/SettingsLine.d.ts +2 -0
  182. package/lib/_internal/icons/SettingsLine.js +11 -0
  183. package/lib/_internal/icons/Strikethrough.d.ts +2 -0
  184. package/lib/_internal/icons/Strikethrough.js +10 -0
  185. package/lib/_internal/icons/index.d.ts +8 -0
  186. package/lib/_internal/icons/index.js +18 -2
  187. package/lib/_styles/markdown/markdown-content.cssr.d.ts +6 -0
  188. package/lib/_styles/markdown/markdown-content.cssr.js +28 -0
  189. package/lib/_utils/markdown/index.d.ts +3 -2
  190. package/lib/_utils/markdown/index.js +4 -1
  191. package/lib/_utils/markdown/render-markdown.d.ts +2 -1
  192. package/lib/_utils/markdown/render-markdown.js +1 -0
  193. package/lib/chat/src/Chat.d.ts +261 -24
  194. package/lib/chat/src/Chat.js +2 -0
  195. package/lib/chat/src/ChatMainArea.d.ts +81 -8
  196. package/lib/chat/src/ChatMainArea.js +93 -223
  197. package/lib/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.d.ts +9084 -0
  198. package/lib/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.js +52 -0
  199. package/lib/chat/src/ChatParts/ChatAttachmentButton/interface.d.ts +2645 -0
  200. package/lib/chat/src/ChatParts/ChatAttachmentButton/interface.js +17 -0
  201. package/lib/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.d.ts +9070 -0
  202. package/lib/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.js +55 -0
  203. package/lib/chat/src/ChatParts/ChatEditingBlock/interface.d.ts +2637 -0
  204. package/lib/chat/src/ChatParts/ChatEditingBlock/interface.js +14 -0
  205. package/lib/chat/src/ChatParts/ChatEditorInput/ChatEditorInput.d.ts +89 -0
  206. package/lib/chat/src/ChatParts/ChatEditorInput/ChatEditorInput.js +45 -0
  207. package/lib/chat/src/ChatParts/ChatEditorInput/interface.d.ts +42 -0
  208. package/lib/chat/src/ChatParts/ChatEditorInput/interface.js +37 -0
  209. package/lib/chat/src/ChatParts/ChatFooter/ChatFooter.d.ts +115 -0
  210. package/lib/chat/src/ChatParts/ChatFooter/ChatFooter.js +66 -0
  211. package/lib/chat/src/ChatParts/ChatFooter/interface.d.ts +56 -0
  212. package/lib/chat/src/ChatParts/ChatFooter/interface.js +49 -0
  213. package/lib/chat/src/ChatParts/ChatHeader/ChatHeader.d.ts +9205 -0
  214. package/lib/chat/src/ChatParts/ChatHeader/ChatHeader.js +164 -0
  215. package/lib/chat/src/ChatParts/ChatHeader/interface.d.ts +2694 -0
  216. package/lib/chat/src/ChatParts/ChatHeader/interface.js +53 -0
  217. package/lib/chat/src/ChatParts/ChatLegacyInput/ChatLegacyInput.d.ts +9142 -0
  218. package/lib/chat/src/ChatParts/ChatLegacyInput/ChatLegacyInput.js +98 -0
  219. package/lib/chat/src/ChatParts/ChatLegacyInput/interface.d.ts +2654 -0
  220. package/lib/chat/src/ChatParts/ChatLegacyInput/interface.js +23 -0
  221. package/lib/chat/src/ChatParts/ChatMessagesArea/ChatMessagesArea.d.ts +148 -0
  222. package/lib/chat/src/ChatParts/ChatMessagesArea/ChatMessagesArea.js +49 -0
  223. package/lib/chat/src/ChatParts/ChatMessagesArea/interface.d.ts +72 -0
  224. package/lib/chat/src/ChatParts/ChatMessagesArea/interface.js +61 -0
  225. package/lib/chat/src/interface.d.ts +7 -0
  226. package/lib/chat/src/interface.js +3 -0
  227. package/lib/chat/src/styles/index.cssr.js +11 -12
  228. package/lib/chat/styles/light.d.ts +4 -0
  229. package/lib/chat/styles/light.js +22 -1
  230. package/lib/components.d.ts +13087 -103
  231. package/lib/components.js +17 -7
  232. package/lib/config-provider/src/ConfigProvider.js +7 -4
  233. package/lib/config-provider/src/internal-interface.d.ts +2 -0
  234. package/lib/data-table/index.d.ts +1 -1
  235. package/lib/data-table/src/ColumnSettings/ColumnSettingsDrawer.d.ts +156 -0
  236. package/lib/data-table/src/ColumnSettings/ColumnSettingsDrawer.js +181 -0
  237. package/lib/data-table/src/ColumnSettings/styles.cssr.d.ts +2 -0
  238. package/lib/data-table/src/ColumnSettings/styles.cssr.js +30 -0
  239. package/lib/data-table/src/DataTable.d.ts +60 -2
  240. package/lib/data-table/src/DataTable.js +65 -23
  241. package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +14 -0
  242. package/lib/data-table/src/interface.d.ts +53 -1
  243. package/lib/data-table/src/interface.js +17 -2
  244. package/lib/data-table/src/styles/index.cssr.js +17 -1
  245. package/lib/data-table/src/use-column-settings.d.ts +2 -0
  246. package/lib/data-table/src/use-column-settings.js +144 -0
  247. package/lib/data-table/src/utils/column-utils.d.ts +2 -1
  248. package/lib/data-table/src/utils/column-utils.js +5 -0
  249. package/lib/editor/index.d.ts +10 -0
  250. package/lib/editor/index.js +19 -0
  251. package/lib/editor/src/Editor.d.ts +3922 -0
  252. package/lib/editor/src/Editor.js +224 -0
  253. package/lib/editor/src/EditorParts/BlockTypeSelect/BlockTypeSelect.d.ts +37 -0
  254. package/lib/editor/src/EditorParts/BlockTypeSelect/BlockTypeSelect.js +47 -0
  255. package/lib/editor/src/EditorParts/BlockTypeSelect/interface.d.ts +21 -0
  256. package/lib/editor/src/EditorParts/BlockTypeSelect/interface.js +17 -0
  257. package/lib/editor/src/EditorParts/EditorContent/EditorContent.d.ts +4102 -0
  258. package/lib/editor/src/EditorParts/EditorContent/EditorContent.js +121 -0
  259. package/lib/editor/src/EditorParts/EditorContent/index.d.ts +2 -0
  260. package/lib/editor/src/EditorParts/EditorContent/index.js +10 -0
  261. package/lib/editor/src/EditorParts/EditorContent/interface.d.ts +1918 -0
  262. package/lib/editor/src/EditorParts/EditorContent/interface.js +8 -0
  263. package/lib/editor/src/EditorParts/EditorToolbar/EditorToolbar.d.ts +4606 -0
  264. package/lib/editor/src/EditorParts/EditorToolbar/EditorToolbar.js +126 -0
  265. package/lib/editor/src/EditorParts/EditorToolbar/composables/use-editor-toolbar-customization.d.ts +11 -0
  266. package/lib/editor/src/EditorParts/EditorToolbar/composables/use-editor-toolbar-customization.js +52 -0
  267. package/lib/editor/src/EditorParts/EditorToolbar/index.d.ts +2 -0
  268. package/lib/editor/src/EditorParts/EditorToolbar/index.js +10 -0
  269. package/lib/editor/src/EditorParts/EditorToolbar/interface.d.ts +1924 -0
  270. package/lib/editor/src/EditorParts/EditorToolbar/interface.js +11 -0
  271. package/lib/editor/src/EditorParts/SendButton/SendButton.d.ts +23 -0
  272. package/lib/editor/src/EditorParts/SendButton/SendButton.js +31 -0
  273. package/lib/editor/src/EditorParts/SendButton/interface.d.ts +18 -0
  274. package/lib/editor/src/EditorParts/SendButton/interface.js +11 -0
  275. package/lib/editor/src/EditorParts/ToolbarButton/ToolbarButton.d.ts +32 -0
  276. package/lib/editor/src/EditorParts/ToolbarButton/ToolbarButton.js +34 -0
  277. package/lib/editor/src/EditorParts/ToolbarButton/interface.d.ts +20 -0
  278. package/lib/editor/src/EditorParts/ToolbarButton/interface.js +16 -0
  279. package/lib/editor/src/composables/use-editor-commands.d.ts +8 -0
  280. package/lib/editor/src/composables/use-editor-commands.js +70 -0
  281. package/lib/editor/src/composables/use-editor-css-vars.d.ts +4 -0
  282. package/lib/editor/src/composables/use-editor-css-vars.js +50 -0
  283. package/lib/editor/src/constants.d.ts +12 -0
  284. package/lib/editor/src/constants.js +56 -0
  285. package/lib/editor/src/extensions.d.ts +7 -0
  286. package/lib/editor/src/extensions.js +141 -0
  287. package/lib/editor/src/interface.d.ts +2037 -0
  288. package/lib/editor/src/interface.js +22 -0
  289. package/lib/editor/src/markdown/constants.d.ts +8 -0
  290. package/lib/editor/src/markdown/constants.js +201 -0
  291. package/lib/editor/src/markdown/editor-serializer.d.ts +9 -0
  292. package/lib/editor/src/markdown/editor-serializer.js +20 -0
  293. package/lib/editor/src/markdown/escape.d.ts +2 -0
  294. package/lib/editor/src/markdown/escape.js +31 -0
  295. package/lib/editor/src/markdown/html.d.ts +1 -0
  296. package/lib/editor/src/markdown/html.js +9 -0
  297. package/lib/editor/src/markdown/parser.d.ts +4 -0
  298. package/lib/editor/src/markdown/parser.js +42 -0
  299. package/lib/editor/src/markdown/serializer-state.d.ts +10 -0
  300. package/lib/editor/src/markdown/serializer-state.js +16 -0
  301. package/lib/editor/src/markdown/serializer.d.ts +3 -0
  302. package/lib/editor/src/markdown/serializer.js +9 -0
  303. package/lib/editor/src/styles/index.cssr.d.ts +2 -0
  304. package/lib/editor/src/styles/index.cssr.js +136 -0
  305. package/lib/editor/styles/dark.d.ts +634 -0
  306. package/lib/editor/styles/dark.js +23 -0
  307. package/lib/editor/styles/index.d.ts +3 -0
  308. package/lib/editor/styles/index.js +10 -0
  309. package/lib/editor/styles/light.d.ts +685 -0
  310. package/lib/editor/styles/light.js +75 -0
  311. package/lib/editor/tests/fixtures/round-trip.d.ts +12 -0
  312. package/lib/editor/tests/fixtures/round-trip.js +125 -0
  313. package/lib/editor/tests/utils.d.ts +7 -0
  314. package/lib/editor/tests/utils.js +26 -0
  315. package/lib/locales/common/enUS.d.ts +22 -0
  316. package/lib/locales/common/enUS.js +23 -1
  317. package/lib/locales/common/ruRU.js +28 -8
  318. package/lib/locales/common/uzUZ.js +23 -1
  319. package/lib/locales/common/zhCN.js +23 -1
  320. package/lib/locales/utils/date-locale.d.ts +2 -0
  321. package/lib/locales/utils/date-locale.js +14 -0
  322. package/lib/message-bubble/src/MessageBubble.d.ts +9 -0
  323. package/lib/message-bubble/src/MessageBubble.js +12 -7
  324. package/lib/message-bubble/src/interface.d.ts +5 -1
  325. package/lib/message-bubble/src/interface.js +3 -0
  326. package/lib/message-bubble/src/styles/index.cssr.js +4 -17
  327. package/lib/styles.d.ts +1 -0
  328. package/lib/styles.js +127 -125
  329. package/lib/themes/dark.js +136 -134
  330. package/lib/themes/light.js +136 -134
  331. package/lib/version.d.ts +1 -1
  332. package/lib/version.js +1 -1
  333. package/package.json +8 -1
  334. package/volar.d.ts +3 -0
  335. package/web-types.json +454 -2
@@ -0,0 +1,224 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const vue_3_1 = require("@tiptap/vue-3");
7
+ const vooks_1 = require("vooks");
8
+ const vue_1 = require("vue");
9
+ const _mixins_1 = require("../../_mixins");
10
+ const _utils_1 = require("../../_utils");
11
+ const styles_1 = require("../styles");
12
+ const use_editor_css_vars_1 = __importDefault(require("./composables/use-editor-css-vars"));
13
+ const EditorContent_1 = __importDefault(require("./EditorParts/EditorContent/EditorContent"));
14
+ const EditorToolbar_1 = __importDefault(require("./EditorParts/EditorToolbar/EditorToolbar"));
15
+ const extensions_1 = require("./extensions");
16
+ const interface_1 = require("./interface");
17
+ const html_1 = require("./markdown/html");
18
+ const parser_1 = require("./markdown/parser");
19
+ const serializer_1 = require("./markdown/serializer");
20
+ const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
21
+ exports.default = (0, vue_1.defineComponent)({
22
+ name: 'Editor',
23
+ props: interface_1.editorProps,
24
+ slots: Object,
25
+ setup(props) {
26
+ var _a;
27
+ const { mergedClsPrefixRef, inlineThemeDisabled } = (0, _mixins_1.useConfig)(props);
28
+ const { localeRef } = (0, _mixins_1.useLocale)('Editor');
29
+ const themeRef = (0, _mixins_1.useTheme)('Editor', '-editor', index_cssr_1.default, styles_1.editorLight, props, mergedClsPrefixRef);
30
+ const uncontrolledValueRef = (0, vue_1.ref)(props.defaultValue);
31
+ const mergedValueRef = (0, vooks_1.useMergedState)((0, vue_1.toRef)(props, 'value'), uncontrolledValueRef);
32
+ const serializer = (0, serializer_1.createMarkdownSerializer)(props.markdownOptions);
33
+ const sourceMarkdownRef = (0, vue_1.ref)((_a = mergedValueRef.value) !== null && _a !== void 0 ? _a : '');
34
+ const loadedDocumentRef = (0, vue_1.ref)(null);
35
+ const editableRef = (0, vue_1.computed)(() => !props.disabled && !props.readonly);
36
+ const mergedPlaceholderRef = (0, vue_1.computed)(() => { var _a; return (_a = props.placeholder) !== null && _a !== void 0 ? _a : localeRef.value.placeholder; });
37
+ const editorRef = (0, vue_3_1.useEditor)({
38
+ extensions: (0, extensions_1.createEditorExtensions)({
39
+ placeholder: () => mergedPlaceholderRef.value,
40
+ markdownOptions: props.markdownOptions,
41
+ extensions: props.extensions,
42
+ nodeProps: props.nodeProps,
43
+ maxLength: props.maxLength,
44
+ onSendShortcut: props.sendOnEnter ? handleSend : undefined
45
+ }),
46
+ editable: editableRef.value,
47
+ autofocus: props.autofocus,
48
+ editorProps: {
49
+ attributes: {
50
+ class: `${mergedClsPrefixRef.value}-editor__editable`
51
+ }
52
+ },
53
+ onFocus: ({ event }) => {
54
+ if (props.onFocus)
55
+ (0, _utils_1.call)(props.onFocus, event);
56
+ },
57
+ onBlur: ({ event }) => {
58
+ if (props.onBlur)
59
+ (0, _utils_1.call)(props.onBlur, event);
60
+ },
61
+ onCreate: ({ editor }) => {
62
+ setMarkdown(sourceMarkdownRef.value, editor, false);
63
+ },
64
+ onUpdate: ({ editor }) => {
65
+ const markdown = serializer.serialize(editor.state.doc).trim();
66
+ if (markdown === mergedValueRef.value)
67
+ return;
68
+ sourceMarkdownRef.value = markdown;
69
+ loadedDocumentRef.value = editor.state.doc;
70
+ doUpdateValue(markdown);
71
+ }
72
+ });
73
+ function doUpdateValue(value) {
74
+ uncontrolledValueRef.value = value;
75
+ if (props.onUpdateValue)
76
+ (0, _utils_1.call)(props.onUpdateValue, value);
77
+ if (props['onUpdate:value'])
78
+ (0, _utils_1.call)(props['onUpdate:value'], value);
79
+ }
80
+ function setMarkdown(markdown, instance = editorRef.value, addToHistory = true) {
81
+ if (!instance)
82
+ return;
83
+ const document = (0, parser_1.createMarkdownParser)(instance.schema, props.markdownOptions).parse(markdown);
84
+ sourceMarkdownRef.value = markdown;
85
+ loadedDocumentRef.value = document;
86
+ instance
87
+ .chain()
88
+ .setMeta('addToHistory', addToHistory)
89
+ .setContent(document.toJSON(), { emitUpdate: false })
90
+ .run();
91
+ }
92
+ const sendDisabledRef = (0, vue_1.computed)(() => { var _a; return !((_a = mergedValueRef.value) === null || _a === void 0 ? void 0 : _a.trim()); });
93
+ function handleSend() {
94
+ if (sendDisabledRef.value)
95
+ return;
96
+ const markdown = getMarkdown();
97
+ if (props.onSend)
98
+ (0, _utils_1.call)(props.onSend, markdown);
99
+ setMarkdown('');
100
+ doUpdateValue('');
101
+ }
102
+ function getMarkdown() {
103
+ var _a;
104
+ const editor = editorRef.value;
105
+ if (!editor)
106
+ return sourceMarkdownRef.value;
107
+ if ((_a = loadedDocumentRef.value) === null || _a === void 0 ? void 0 : _a.eq(editor.state.doc))
108
+ return sourceMarkdownRef.value;
109
+ return serializer.serialize(editor.state.doc).trim();
110
+ }
111
+ (0, vue_1.watch)(mergedValueRef, (value) => {
112
+ if ((value !== null && value !== void 0 ? value : '') !== getMarkdown())
113
+ setMarkdown(value !== null && value !== void 0 ? value : '');
114
+ });
115
+ (0, vue_1.watch)(editableRef, (editable) => {
116
+ var _a;
117
+ (_a = editorRef.value) === null || _a === void 0 ? void 0 : _a.setEditable(editable);
118
+ });
119
+ (0, vue_1.watch)(mergedPlaceholderRef, () => {
120
+ const editor = editorRef.value;
121
+ if (!editor)
122
+ return;
123
+ editor.view.dispatch(editor.state.tr.setMeta('addToHistory', false));
124
+ });
125
+ function focus() {
126
+ var _a;
127
+ (_a = editorRef.value) === null || _a === void 0 ? void 0 : _a.commands.focus();
128
+ }
129
+ function blur() {
130
+ var _a;
131
+ (_a = editorRef.value) === null || _a === void 0 ? void 0 : _a.commands.blur();
132
+ }
133
+ function clear() {
134
+ setMarkdown('');
135
+ doUpdateValue('');
136
+ }
137
+ function getHTML() {
138
+ var _a;
139
+ const html = (_a = editorRef.value) === null || _a === void 0 ? void 0 : _a.getHTML();
140
+ return html ? (0, html_1.unwrapListParagraphs)(html) : '';
141
+ }
142
+ function insertText(text) {
143
+ var _a;
144
+ (_a = editorRef.value) === null || _a === void 0 ? void 0 : _a.commands.insertContent(text);
145
+ }
146
+ function undo() {
147
+ var _a;
148
+ (_a = editorRef.value) === null || _a === void 0 ? void 0 : _a.commands.undo();
149
+ }
150
+ function redo() {
151
+ var _a;
152
+ (_a = editorRef.value) === null || _a === void 0 ? void 0 : _a.commands.redo();
153
+ }
154
+ function canUndo() {
155
+ var _a, _b;
156
+ return (_b = (_a = editorRef.value) === null || _a === void 0 ? void 0 : _a.can().undo()) !== null && _b !== void 0 ? _b : false;
157
+ }
158
+ function canRedo() {
159
+ var _a, _b;
160
+ return (_b = (_a = editorRef.value) === null || _a === void 0 ? void 0 : _a.can().redo()) !== null && _b !== void 0 ? _b : false;
161
+ }
162
+ const themeVarsRef = (0, vue_1.computed)(() => themeRef.value.self);
163
+ const cssVarsRef = (0, use_editor_css_vars_1.default)(themeRef, themeVarsRef);
164
+ const themeClassHandle = inlineThemeDisabled
165
+ ? (0, _mixins_1.useThemeClass)('editor', undefined, cssVarsRef, props)
166
+ : undefined;
167
+ const toolbarTooltipsRef = (0, vue_1.computed)(() => ({
168
+ bold: props.boldTooltip,
169
+ strikethrough: props.strikethroughTooltip,
170
+ italic: props.italicTooltip,
171
+ blockquote: props.blockquoteTooltip,
172
+ divider: props.dividerTooltip,
173
+ bulletList: props.bulletListTooltip,
174
+ orderedList: props.orderedListTooltip
175
+ }));
176
+ const mergedSendTooltipRef = (0, vue_1.computed)(() => { var _a; return (_a = props.sendTooltip) !== null && _a !== void 0 ? _a : localeRef.value.sendTooltip; });
177
+ (0, vue_1.provide)(interface_1.editorInjectionKey, {
178
+ mergedClsPrefixRef,
179
+ mergedThemeRef: themeRef,
180
+ themeVarsRef,
181
+ editorRef,
182
+ markdownOptionsRef: (0, vue_1.toRef)(props, 'markdownOptions'),
183
+ toolbarRef: (0, vue_1.toRef)(props, 'toolbar'),
184
+ toolbarTooltipsRef,
185
+ toolbarButtonPropsRef: (0, vue_1.toRef)(props, 'toolbarButtonProps'),
186
+ toolbarIconPropsRef: (0, vue_1.toRef)(props, 'toolbarIconProps'),
187
+ toolbarDropdownPropsRef: (0, vue_1.toRef)(props, 'toolbarDropdownProps'),
188
+ sendButtonPropsRef: (0, vue_1.toRef)(props, 'sendButtonProps'),
189
+ sendIconPropsRef: (0, vue_1.toRef)(props, 'sendIconProps'),
190
+ contentPropsRef: (0, vue_1.toRef)(props, 'contentProps'),
191
+ maxRowsRef: (0, vue_1.toRef)(props, 'maxRows'),
192
+ showSendButtonRef: (0, vue_1.toRef)(props, 'showSendButton'),
193
+ sendDisabledRef,
194
+ sendTooltipRef: mergedSendTooltipRef,
195
+ disabledRef: (0, vue_1.toRef)(props, 'disabled'),
196
+ readonlyRef: (0, vue_1.toRef)(props, 'readonly'),
197
+ handleSend
198
+ });
199
+ return {
200
+ editor: editorRef,
201
+ focus,
202
+ blur,
203
+ clear,
204
+ getMarkdown,
205
+ setMarkdown,
206
+ getHTML,
207
+ insertText,
208
+ undo,
209
+ redo,
210
+ canUndo,
211
+ canRedo,
212
+ mergedClsPrefix: mergedClsPrefixRef,
213
+ inlineThemeDisabled,
214
+ cssVars: cssVarsRef,
215
+ themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
216
+ onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
217
+ };
218
+ },
219
+ render() {
220
+ var _a, _b, _c, _d, _e, _f, _g;
221
+ (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
222
+ return ((0, vue_1.h)("div", { class: [`${this.mergedClsPrefix}-editor`, this.themeClass], style: this.inlineThemeDisabled ? undefined : this.cssVars }, (_d = (_c = (_b = this.$slots).toolbar) === null || _c === void 0 ? void 0 : _c.call(_b)) !== null && _d !== void 0 ? _d : (0, vue_1.h)(EditorToolbar_1.default, null), (_g = (_f = (_e = this.$slots).content) === null || _f === void 0 ? void 0 : _f.call(_e)) !== null && _g !== void 0 ? _g : ((0, vue_1.h)(EditorContent_1.default, null, { sendIcon: this.$slots.sendIcon }))));
223
+ }
224
+ });
@@ -0,0 +1,37 @@
1
+ import type { SelectOption } from '../../../../select';
2
+ import type { EditorBlockTypeKey } from '../../interface';
3
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ readonly value: {
5
+ readonly type: import("vue").PropType<EditorBlockTypeKey>;
6
+ readonly required: true;
7
+ };
8
+ readonly maxHeadingLevel: {
9
+ readonly type: NumberConstructor;
10
+ readonly required: true;
11
+ };
12
+ readonly selectThemeOverrides: import("vue").PropType<import("../../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../../select/styles").SelectTheme>>;
13
+ readonly selectProps: import("vue").PropType<Partial<import("../../../../select").SelectProps>>;
14
+ readonly disabled: BooleanConstructor;
15
+ readonly onSelect: import("vue").PropType<(key: EditorBlockTypeKey) => void>;
16
+ }>, {
17
+ mergedClsPrefix: import("vue").Ref<string, string>;
18
+ labels: import("vue").ComputedRef<Record<EditorBlockTypeKey, string>>;
19
+ options: import("vue").ComputedRef<SelectOption[]>;
20
+ handleUpdateValue: (value: string | number) => void;
21
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
22
+ readonly value: {
23
+ readonly type: import("vue").PropType<EditorBlockTypeKey>;
24
+ readonly required: true;
25
+ };
26
+ readonly maxHeadingLevel: {
27
+ readonly type: NumberConstructor;
28
+ readonly required: true;
29
+ };
30
+ readonly selectThemeOverrides: import("vue").PropType<import("../../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../../select/styles").SelectTheme>>;
31
+ readonly selectProps: import("vue").PropType<Partial<import("../../../../select").SelectProps>>;
32
+ readonly disabled: BooleanConstructor;
33
+ readonly onSelect: import("vue").PropType<(key: EditorBlockTypeKey) => void>;
34
+ }>> & Readonly<{}>, {
35
+ readonly disabled: boolean;
36
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
37
+ export default _default;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const vue_1 = require("vue");
4
+ const _mixins_1 = require("../../../../_mixins");
5
+ const select_1 = require("../../../../select");
6
+ const constants_1 = require("../../constants");
7
+ const interface_1 = require("./interface");
8
+ exports.default = (0, vue_1.defineComponent)({
9
+ name: 'EditorBlockTypeSelect',
10
+ props: interface_1.blockTypeSelectProps,
11
+ setup(props) {
12
+ const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)();
13
+ const { localeRef } = (0, _mixins_1.useLocale)('Editor');
14
+ const labelsRef = (0, vue_1.computed)(() => ({
15
+ paragraph: localeRef.value.paragraphText,
16
+ heading1: localeRef.value.heading1Text,
17
+ heading2: localeRef.value.heading2Text,
18
+ heading3: localeRef.value.heading3Text
19
+ }));
20
+ const optionsRef = (0, vue_1.computed)(() => {
21
+ const clsPrefix = mergedClsPrefixRef.value;
22
+ return constants_1.EDITOR_BLOCK_TYPES.filter((key) => {
23
+ const level = constants_1.EDITOR_BLOCK_TYPE_LEVELS[key];
24
+ return level === null || level <= props.maxHeadingLevel;
25
+ }).map(key => ({
26
+ value: key,
27
+ label: labelsRef.value[key],
28
+ class: `${clsPrefix}-editor-block-type-option ${clsPrefix}-editor-block-type-option--${key}`
29
+ }));
30
+ });
31
+ function handleUpdateValue(value) {
32
+ var _a;
33
+ const selected = value;
34
+ if (constants_1.EDITOR_BLOCK_TYPES.includes(selected))
35
+ (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, selected);
36
+ }
37
+ return {
38
+ mergedClsPrefix: mergedClsPrefixRef,
39
+ labels: labelsRef,
40
+ options: optionsRef,
41
+ handleUpdateValue
42
+ };
43
+ },
44
+ render() {
45
+ return ((0, vue_1.h)(select_1.USelect, Object.assign({ class: `${this.mergedClsPrefix}-editor__toolbar-block-type`, size: "tiny", bordered: false, builtinThemeOverrides: this.selectThemeOverrides, value: this.value, options: this.options, to: false, placement: "bottom-start", consistentMenuWidth: false, menuProps: { class: `${this.mergedClsPrefix}-editor-block-type-menu` }, disabled: this.disabled, onUpdateValue: this.handleUpdateValue }, this.selectProps)));
46
+ }
47
+ });
@@ -0,0 +1,21 @@
1
+ import type { PropType } from 'vue';
2
+ import type { ExtractThemeOverrides } from '../../../../_mixins/use-theme';
3
+ import type { ExtractPublicPropTypes } from '../../../../_utils';
4
+ import type { SelectProps } from '../../../../select';
5
+ import type { SelectTheme } from '../../../../select/styles';
6
+ import type { EditorBlockTypeKey } from '../../interface';
7
+ export type BlockTypeSelectProps = ExtractPublicPropTypes<typeof blockTypeSelectProps>;
8
+ export declare const blockTypeSelectProps: {
9
+ readonly value: {
10
+ readonly type: PropType<EditorBlockTypeKey>;
11
+ readonly required: true;
12
+ };
13
+ readonly maxHeadingLevel: {
14
+ readonly type: NumberConstructor;
15
+ readonly required: true;
16
+ };
17
+ readonly selectThemeOverrides: PropType<ExtractThemeOverrides<SelectTheme>>;
18
+ readonly selectProps: PropType<Partial<SelectProps>>;
19
+ readonly disabled: BooleanConstructor;
20
+ readonly onSelect: PropType<(key: EditorBlockTypeKey) => void>;
21
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.blockTypeSelectProps = void 0;
4
+ exports.blockTypeSelectProps = {
5
+ value: {
6
+ type: String,
7
+ required: true
8
+ },
9
+ maxHeadingLevel: {
10
+ type: Number,
11
+ required: true
12
+ },
13
+ selectThemeOverrides: Object,
14
+ selectProps: Object,
15
+ disabled: Boolean,
16
+ onSelect: Function
17
+ };