@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,91 @@
1
+ import { createTheme } from "../../_mixins/index.mjs";
2
+ import { commonLight } from "../../_styles/common/index.mjs";
3
+ import { buttonLight } from "../../button/styles/index.mjs";
4
+ import { dividerLight } from "../../divider/styles/index.mjs";
5
+ import { iconLight } from "../../icon/styles/index.mjs";
6
+ import { selectLight } from "../../select/styles/index.mjs";
7
+ import { tooltipLight } from "../../tooltip/styles/index.mjs";
8
+ export function self(vars) {
9
+ const {
10
+ borderRadiusLarge,
11
+ containerSecondary,
12
+ fontBodyMedium,
13
+ heightMini,
14
+ iconMedium,
15
+ iconSmall,
16
+ lineHeightTitleMedium,
17
+ lineHeightTitleSmall,
18
+ lineHeightBodyLarge,
19
+ lineHeightBodyMedium,
20
+ surfacePrimary,
21
+ elementsQuaternary,
22
+ elementsQuinary,
23
+ textPrimary,
24
+ textTertiary,
25
+ brandPrimary100,
26
+ brandPrimary400,
27
+ brandPrimary500
28
+ } = vars;
29
+ return {
30
+ backgroundColor: surfacePrimary,
31
+ borderColor: elementsQuaternary,
32
+ borderRadius: borderRadiusLarge,
33
+ toolbarBackgroundColor: containerSecondary,
34
+ toolbarDividerColor: elementsQuaternary,
35
+ toolbarButtonColorActive: elementsQuaternary,
36
+ toolbarButtonColorHover: elementsQuaternary,
37
+ toolbarButtonRippleColor: elementsQuaternary,
38
+ toolbarButtonWaveOpacity: '0.6',
39
+ toolbarIconColorDisabled: elementsQuinary,
40
+ toolbarIconColorActive: brandPrimary500,
41
+ toolbarIconColorHover: textPrimary,
42
+ toolbarIconColor: textPrimary,
43
+ contentBackgroundColor: surfacePrimary,
44
+ contentTextColor: textPrimary,
45
+ placeholderColor: textTertiary,
46
+ sendButtonColor: brandPrimary400,
47
+ sendButtonColorDisabled: elementsQuinary,
48
+ sendButtonRippleColor: brandPrimary400,
49
+ sendButtonWaveOpacity: '0.6',
50
+ sendButtonIconSize: iconMedium,
51
+ blockTypeTriggerHeight: heightMini,
52
+ blockTypeTriggerPadding: '0 8px 0 0',
53
+ blockTypeTriggerColor: 'transparent',
54
+ blockTypeTriggerTextColor: textPrimary,
55
+ blockTypeTriggerFontSize: fontBodyMedium,
56
+ blockTypeTriggerLineHeight: lineHeightBodyMedium,
57
+ blockTypeTriggerArrowSize: iconSmall,
58
+ blockTypeTriggerArrowColor: textPrimary,
59
+ blockTypeMenuWidth: '210px',
60
+ blockTypeMenuColor: surfacePrimary,
61
+ blockTypeMenuBorderColor: elementsQuaternary,
62
+ blockTypeMenuBorderRadius: borderRadiusLarge,
63
+ blockTypeMenuBoxShadow: '0 4px 8px 0 rgba(68, 83, 113, 0.05), 0 0 16px 0 rgba(68, 83, 113, 0.1)',
64
+ markdownQuoteBorderColor: textPrimary,
65
+ markdownQuoteTextColor: textPrimary,
66
+ markdownQuoteBackgroundColor: brandPrimary100,
67
+ markdownQuoteMarkerColor: brandPrimary500,
68
+ markdownDividerColor: textPrimary,
69
+ markdownH1FontSize: '20px',
70
+ markdownH2FontSize: '18px',
71
+ markdownH3FontSize: '16px',
72
+ markdownTextFontSize: '14px',
73
+ markdownH1LineHeight: lineHeightTitleMedium,
74
+ markdownH2LineHeight: lineHeightTitleSmall,
75
+ markdownH3LineHeight: lineHeightBodyLarge,
76
+ markdownTextLineHeight: lineHeightBodyMedium
77
+ };
78
+ }
79
+ const editorLight = createTheme({
80
+ name: 'Editor',
81
+ common: commonLight,
82
+ peers: {
83
+ Button: buttonLight,
84
+ Icon: iconLight,
85
+ Select: selectLight,
86
+ Tooltip: tooltipLight,
87
+ Divider: dividerLight
88
+ },
89
+ self
90
+ });
91
+ export default editorLight;
@@ -0,0 +1,12 @@
1
+ declare const _default: ({
2
+ name: string;
3
+ input: string;
4
+ expected: string;
5
+ skip?: undefined;
6
+ } | {
7
+ name: string;
8
+ input: string;
9
+ expected: string;
10
+ skip: string;
11
+ })[];
12
+ export default _default;
@@ -0,0 +1,98 @@
1
+ export default [{
2
+ name: 'single tilde keeps its form',
3
+ input: '~текст~',
4
+ expected: '~текст~'
5
+ }, {
6
+ name: 'double tilde keeps its form',
7
+ input: '~~текст~~',
8
+ expected: '~~текст~~'
9
+ }, {
10
+ name: 'equals divider keeps its char and length',
11
+ input: '===',
12
+ expected: '==='
13
+ }, {
14
+ name: 'long equals divider keeps its length',
15
+ input: '=====',
16
+ expected: '====='
17
+ }, {
18
+ name: 'dash divider keeps its form',
19
+ input: '---',
20
+ expected: '---'
21
+ }, {
22
+ name: 'asterisk divider keeps its form',
23
+ input: '***',
24
+ expected: '***'
25
+ }, {
26
+ name: 'underscore bold is not rewritten to asterisks',
27
+ input: '__жирный__',
28
+ expected: '__жирный__'
29
+ }, {
30
+ name: 'underscore italic is not rewritten to asterisks',
31
+ input: '_курсив_',
32
+ expected: '_курсив_'
33
+ }, {
34
+ name: 'paren ordered list keeps its delimiter',
35
+ input: '1) пункт',
36
+ expected: '1) пункт'
37
+ }, {
38
+ name: 'dot ordered list keeps its delimiter',
39
+ input: '1. пункт',
40
+ expected: '1. пункт'
41
+ }, {
42
+ name: 'asterisk bullet marker is not rewritten to a dash',
43
+ input: '* пункт',
44
+ expected: '* пункт'
45
+ }, {
46
+ name: 'plus bullet marker is not rewritten to a dash',
47
+ input: '+ пункт',
48
+ expected: '+ пункт'
49
+ }, {
50
+ name: 'link address survives the round trip',
51
+ input: '[текст](https://example.com)',
52
+ expected: '[текст](https://example.com)'
53
+ }, {
54
+ name: 'image survives the round trip as literal text',
55
+ input: '![alt](https://example.com/a.png)',
56
+ expected: '![alt](https://example.com/a.png)'
57
+ }, {
58
+ name: 'headings keep their level',
59
+ input: '# H1',
60
+ expected: '# H1'
61
+ }, {
62
+ name: 'third level heading keeps its level',
63
+ input: '### H3',
64
+ expected: '### H3'
65
+ }, {
66
+ name: 'clamped heading stays a paragraph without extra escaping',
67
+ input: '#### H4',
68
+ expected: '#### H4'
69
+ }, {
70
+ name: 'blockquote keeps its marker',
71
+ input: '> цитата',
72
+ expected: '> цитата'
73
+ }, {
74
+ name: 'tables are unsupported and survive as text',
75
+ input: '| a | b |',
76
+ expected: '| a | b |'
77
+ }, {
78
+ name: 'backticks are unsupported and survive as text',
79
+ input: '`код`',
80
+ expected: '`код`'
81
+ }, {
82
+ name: 'asterisk in the middle of a line gets no escaping',
83
+ input: '5 * 3 = 15',
84
+ expected: '5 * 3 = 15'
85
+ }, {
86
+ name: 'underscore in the middle of a word gets no escaping',
87
+ input: 'snake_case_name',
88
+ expected: 'snake_case_name'
89
+ }, {
90
+ name: 'dash line is parsed as a list and keeps its marker',
91
+ input: '- дефис',
92
+ expected: '- дефис'
93
+ }, {
94
+ name: 'nested marks inside single tildes',
95
+ input: '~a **b**~',
96
+ expected: '~a **b**~',
97
+ skip: 'u_strikethrough не разбирает вложенную разметку внутри одинарных тильд; включить после исправления бага'
98
+ }];
@@ -0,0 +1,7 @@
1
+ import type { Extensions } from '@tiptap/core';
2
+ import type { ComponentMountingOptions, VueWrapper } from '@vue/test-utils';
3
+ import { Editor } from '@tiptap/vue-3';
4
+ import { UEditor } from '../index';
5
+ export declare function setupProseMirrorRects(): void;
6
+ export declare function mountEditor(props?: Record<string, unknown>, options?: ComponentMountingOptions<typeof UEditor>): VueWrapper<InstanceType<typeof UEditor>>;
7
+ export declare function createStandaloneEditor(content?: string, extensions?: Extensions): Editor;
@@ -0,0 +1,27 @@
1
+ import { Editor } from '@tiptap/vue-3';
2
+ import { mount } from '@vue/test-utils';
3
+ import { UEditor } from "../index.mjs";
4
+ import { createEditorExtensions } from "../src/extensions.mjs";
5
+ export function setupProseMirrorRects() {
6
+ var _a, _b;
7
+ var _c, _d;
8
+ const emptyRects = () => ({
9
+ length: 0,
10
+ item: () => null
11
+ });
12
+ const emptyRect = () => new DOMRect();
13
+ (_a = (_c = Range.prototype).getClientRects) !== null && _a !== void 0 ? _a : _c.getClientRects = emptyRects;
14
+ (_b = (_d = Range.prototype).getBoundingClientRect) !== null && _b !== void 0 ? _b : _d.getBoundingClientRect = emptyRect;
15
+ }
16
+ export function mountEditor(props = {}, options = {}) {
17
+ return mount(UEditor, Object.assign({
18
+ props,
19
+ attachTo: document.body
20
+ }, options));
21
+ }
22
+ export function createStandaloneEditor(content, extensions) {
23
+ return new Editor({
24
+ extensions: extensions !== null && extensions !== void 0 ? extensions : createEditorExtensions(),
25
+ content
26
+ });
27
+ }
@@ -55,6 +55,13 @@ declare const enUS: {
55
55
  uncheckTableAll: string;
56
56
  confirm: string;
57
57
  clear: string;
58
+ columnSettingsTitle: string;
59
+ columnSettingsButton: string;
60
+ columnSettingsSubtitle: string;
61
+ columnSettingsSelectAll: string;
62
+ columnSettingsReset: string;
63
+ columnSettingsCancel: string;
64
+ columnSettingsApply: string;
58
65
  };
59
66
  LegacyTransfer: {
60
67
  sourceTitle: string;
@@ -128,6 +135,21 @@ declare const enUS: {
128
135
  subtitle: string;
129
136
  uploading: string;
130
137
  };
138
+ Editor: {
139
+ placeholder: string;
140
+ sendTooltip: string;
141
+ boldTooltip: string;
142
+ strikethroughTooltip: string;
143
+ italicTooltip: string;
144
+ blockquoteTooltip: string;
145
+ dividerTooltip: string;
146
+ bulletListTooltip: string;
147
+ orderedListTooltip: string;
148
+ paragraphText: string;
149
+ heading1Text: string;
150
+ heading2Text: string;
151
+ heading3Text: string;
152
+ };
131
153
  Chat: {
132
154
  inputPlaceholder: string;
133
155
  typingText: string;
@@ -54,7 +54,14 @@ const enUS = {
54
54
  checkTableAll: 'Select all in the table',
55
55
  uncheckTableAll: 'Unselect all in the table',
56
56
  confirm: 'Confirm',
57
- clear: 'Clear'
57
+ clear: 'Clear',
58
+ columnSettingsTitle: 'Table settings',
59
+ columnSettingsButton: 'Table settings',
60
+ columnSettingsSubtitle: 'Select columns and change their order',
61
+ columnSettingsSelectAll: 'Select all',
62
+ columnSettingsReset: 'Reset',
63
+ columnSettingsCancel: 'Cancel',
64
+ columnSettingsApply: 'Apply'
58
65
  },
59
66
  LegacyTransfer: {
60
67
  sourceTitle: 'Source',
@@ -129,6 +136,21 @@ const enUS = {
129
136
  subtitle: 'PDF, PNG, JPEG no more than 100 MB',
130
137
  uploading: 'Uploading'
131
138
  },
139
+ Editor: {
140
+ placeholder: 'Type a message...',
141
+ sendTooltip: 'Send',
142
+ boldTooltip: 'Bold',
143
+ strikethroughTooltip: 'Strikethrough',
144
+ italicTooltip: 'Italic',
145
+ blockquoteTooltip: 'Quote',
146
+ dividerTooltip: 'Divider',
147
+ bulletListTooltip: 'Bulleted list',
148
+ orderedListTooltip: 'Numbered list',
149
+ paragraphText: 'Text',
150
+ heading1Text: 'Heading 1',
151
+ heading2Text: 'Heading 2',
152
+ heading3Text: 'Heading 3'
153
+ },
132
154
  Chat: {
133
155
  inputPlaceholder: 'Type a message...',
134
156
  typingText: 'Typing...',
@@ -37,17 +37,15 @@ const ruRu = {
37
37
  datePlaceholder: 'Выбрать дату',
38
38
  datetimePlaceholder: 'Выбрать дату и время',
39
39
  monthPlaceholder: 'Выберите месяц',
40
- // FIXME: translation needed
41
- yearPlaceholder: 'Select Year',
42
- quarterPlaceholder: 'Select Quarter',
43
- weekPlaceholder: 'Select Week',
40
+ yearPlaceholder: 'Выберите год',
41
+ quarterPlaceholder: 'Выберите квартал',
42
+ weekPlaceholder: 'Выберите неделю',
44
43
  startDatePlaceholder: 'Дата начала',
45
44
  endDatePlaceholder: 'Дата окончания',
46
45
  startDatetimePlaceholder: 'Дата и время начала',
47
46
  endDatetimePlaceholder: 'Дата и время окончания',
48
- // FIXME: translation needed
49
- startMonthPlaceholder: 'Start Month',
50
- endMonthPlaceholder: 'End Month',
47
+ startMonthPlaceholder: 'Месяц начала',
48
+ endMonthPlaceholder: 'Месяц окончания',
51
49
  monthBeforeYear: true,
52
50
  firstDayOfWeek: 0,
53
51
  today: 'Сегодня'
@@ -56,7 +54,14 @@ const ruRu = {
56
54
  checkTableAll: 'Выбрать все в таблице',
57
55
  uncheckTableAll: 'Отменить все в таблице',
58
56
  confirm: 'Подтвердить',
59
- clear: 'Очистить'
57
+ clear: 'Очистить',
58
+ columnSettingsTitle: 'Настройки таблицы',
59
+ columnSettingsButton: 'Настройка таблицы',
60
+ columnSettingsSubtitle: 'Выберите колонки и измените их порядок',
61
+ columnSettingsSelectAll: 'Выбрать все',
62
+ columnSettingsReset: 'Сбросить',
63
+ columnSettingsCancel: 'Отмена',
64
+ columnSettingsApply: 'Применить'
60
65
  },
61
66
  LegacyTransfer: {
62
67
  sourceTitle: 'Источник',
@@ -133,6 +138,21 @@ const ruRu = {
133
138
  subtitle: 'PDF, PNG, JPEG не более 100 MB',
134
139
  uploading: 'Загружается'
135
140
  },
141
+ Editor: {
142
+ placeholder: 'Написать сообщение...',
143
+ sendTooltip: 'Отправить',
144
+ boldTooltip: 'Жирный',
145
+ strikethroughTooltip: 'Зачёркнутый',
146
+ italicTooltip: 'Курсив',
147
+ blockquoteTooltip: 'Цитата',
148
+ dividerTooltip: 'Разделитель',
149
+ bulletListTooltip: 'Маркированный список',
150
+ orderedListTooltip: 'Нумерованный список',
151
+ paragraphText: 'Текст',
152
+ heading1Text: 'Заголовок 1',
153
+ heading2Text: 'Заголовок 2',
154
+ heading3Text: 'Заголовок 3'
155
+ },
136
156
  Chat: {
137
157
  inputPlaceholder: 'Написать сообщение...',
138
158
  typingText: 'Печатает...',
@@ -54,7 +54,14 @@ const uzUZ = {
54
54
  checkTableAll: 'Jadvaldagi barchasini tanlash',
55
55
  uncheckTableAll: 'Jadvaldagi barcha tanlovni bekor qilish',
56
56
  confirm: 'Tasdiqlash',
57
- clear: 'Tozalash'
57
+ clear: 'Tozalash',
58
+ columnSettingsTitle: 'Jadval sozlamalari',
59
+ columnSettingsButton: 'Jadval sozlamalari',
60
+ columnSettingsSubtitle: 'Ustunlarni tanlang va tartibini o‘zgartiring',
61
+ columnSettingsSelectAll: 'Barchasini tanlash',
62
+ columnSettingsReset: 'Qayta o‘rnatish',
63
+ columnSettingsCancel: 'Bekor qilish',
64
+ columnSettingsApply: 'Qo‘llash'
58
65
  },
59
66
  LegacyTransfer: {
60
67
  sourceTitle: 'Manba',
@@ -128,6 +135,21 @@ const uzUZ = {
128
135
  subtitle: 'PDF, PNG, JPEG, 100 MB dan oshmasin',
129
136
  uploading: 'Yuklanmoqda'
130
137
  },
138
+ Editor: {
139
+ placeholder: 'Xabar yozing...',
140
+ sendTooltip: 'Yuborish',
141
+ boldTooltip: 'Qalin',
142
+ strikethroughTooltip: 'Chizib o\'tilgan',
143
+ italicTooltip: 'Kursiv',
144
+ blockquoteTooltip: 'Iqtibos',
145
+ dividerTooltip: 'Ajratuvchi',
146
+ bulletListTooltip: 'Belgili ro\'yxat',
147
+ orderedListTooltip: 'Raqamli ro\'yxat',
148
+ paragraphText: 'Matn',
149
+ heading1Text: '1-sarlavha',
150
+ heading2Text: '2-sarlavha',
151
+ heading3Text: '3-sarlavha'
152
+ },
131
153
  Chat: {
132
154
  inputPlaceholder: 'Xabar yozing...',
133
155
  typingText: 'Yozmoqda...',
@@ -54,7 +54,14 @@ const zhCN = {
54
54
  checkTableAll: '选择全部表格数据',
55
55
  uncheckTableAll: '取消选择全部表格数据',
56
56
  confirm: '确认',
57
- clear: '重置'
57
+ clear: '重置',
58
+ columnSettingsTitle: '表格设置',
59
+ columnSettingsButton: '表格设置',
60
+ columnSettingsSubtitle: '选择列并调整顺序',
61
+ columnSettingsSelectAll: '全选',
62
+ columnSettingsReset: '重置',
63
+ columnSettingsCancel: '取消',
64
+ columnSettingsApply: '应用'
58
65
  },
59
66
  LegacyTransfer: {
60
67
  sourceTitle: '源项',
@@ -128,6 +135,21 @@ const zhCN = {
128
135
  subtitle: 'PDF、PNG、JPEG,不超过 100 MB',
129
136
  uploading: '上传中'
130
137
  },
138
+ Editor: {
139
+ placeholder: '输入消息...',
140
+ sendTooltip: '发送',
141
+ boldTooltip: '加粗',
142
+ strikethroughTooltip: '删除线',
143
+ italicTooltip: '斜体',
144
+ blockquoteTooltip: '引用',
145
+ dividerTooltip: '分割线',
146
+ bulletListTooltip: '无序列表',
147
+ orderedListTooltip: '有序列表',
148
+ paragraphText: '正文',
149
+ heading1Text: '标题 1',
150
+ heading2Text: '标题 2',
151
+ heading3Text: '标题 3'
152
+ },
131
153
  Chat: {
132
154
  inputPlaceholder: '输入消息...',
133
155
  typingText: '正在输入...',
@@ -0,0 +1,2 @@
1
+ import type { UDateLocale } from '../date/enUS';
2
+ export declare function resolveDateLocale(name?: string): UDateLocale | undefined;
@@ -0,0 +1,8 @@
1
+ import dateEnUS from "../date/enUS.mjs";
2
+ import dateRuRU from "../date/ruRU.mjs";
3
+ import dateUzUZ from "../date/uzUZ.mjs";
4
+ import dateZhCN from "../date/zhCN.mjs";
5
+ const dateLocales = [dateEnUS, dateRuRU, dateUzUZ, dateZhCN];
6
+ export function resolveDateLocale(name) {
7
+ return dateLocales.find(dateLocale => dateLocale.name === name);
8
+ }
@@ -34,6 +34,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
34
34
  readonly type: import("vue").PropType<import("..").MarkdownOptions>;
35
35
  readonly default: undefined;
36
36
  };
37
+ readonly markdownProps: {
38
+ readonly type: import("vue").PropType<import("vue").HTMLAttributes>;
39
+ readonly default: undefined;
40
+ };
37
41
  readonly timestamp: {
38
42
  readonly type: import("vue").PropType<string | number | Date | (() => VNodeChild)>;
39
43
  readonly default: undefined;
@@ -221,6 +225,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
221
225
  readonly type: import("vue").PropType<import("..").MarkdownOptions>;
222
226
  readonly default: undefined;
223
227
  };
228
+ readonly markdownProps: {
229
+ readonly type: import("vue").PropType<import("vue").HTMLAttributes>;
230
+ readonly default: undefined;
231
+ };
224
232
  readonly timestamp: {
225
233
  readonly type: import("vue").PropType<string | number | Date | (() => VNodeChild)>;
226
234
  readonly default: undefined;
@@ -380,6 +388,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
380
388
  readonly isOwn: boolean;
381
389
  readonly markdown: boolean;
382
390
  readonly markdownOptions: import("..").MarkdownOptions;
391
+ readonly markdownProps: import("vue").HTMLAttributes;
383
392
  readonly timestamp: string | number | Date | (() => VNodeChild);
384
393
  readonly attachments: MessageBubbleAttachment | MessageBubbleAttachment[];
385
394
  readonly uploadProps: Partial<import("../..").UploadProps>;
@@ -277,7 +277,7 @@ export default defineComponent({
277
277
  return uploadComponent;
278
278
  };
279
279
  const renderMessage = () => {
280
- var _a;
280
+ var _a, _b;
281
281
  const hasBubbleActionsSlot = slots.bubbleActions !== undefined;
282
282
  const hasBubbleActionsConfig = Boolean(props.actions && props.actions.length > 0);
283
283
  const hasTitle = Boolean(props.title || slots.title);
@@ -292,10 +292,10 @@ export default defineComponent({
292
292
  variant: "body-l-semi-bold"
293
293
  }, slots.title ? slots.title(messagePayloadRef.value) : resolveRenderContent(props.title)), normalizedAttachmentsRef.value.length > 0 && renderAttachment(true), (hasVisibleTextContent || slots.default) && (slots.default ? h("div", {
294
294
  class: `${mergedClsPrefixRef.value}-message-bubble__text`
295
- }, slots.default(messagePayloadRef.value)) : markdownHtmlRef.value !== null ? h("div", {
296
- class: [`${mergedClsPrefixRef.value}-message-bubble__text`, `${mergedClsPrefixRef.value}-message-bubble__markdown`],
295
+ }, slots.default(messagePayloadRef.value)) : markdownHtmlRef.value !== null ? h("div", Object.assign({}, props.markdownProps, {
296
+ class: [`${mergedClsPrefixRef.value}-message-bubble__text`, `${mergedClsPrefixRef.value}-message-bubble__markdown`, (_a = props.markdownProps) === null || _a === void 0 ? void 0 : _a.class],
297
297
  innerHTML: markdownHtmlRef.value
298
- }) : h("div", {
298
+ })) : h("div", {
299
299
  class: `${mergedClsPrefixRef.value}-message-bubble__text`
300
300
  }, resolveRenderContent(props.content))), hasAfterContent && h("div", {
301
301
  class: `${mergedClsPrefixRef.value}-message-bubble__after-content`
@@ -312,7 +312,7 @@ export default defineComponent({
312
312
  contextMenuShow.value = true;
313
313
  });
314
314
  }
315
- }, (_a = slots.bubbleActions) === null || _a === void 0 ? void 0 : _a.call(slots, messagePayloadRef.value), messageBubbleContent) : hasBubbleActionsConfig ? h(UDropdown, {
315
+ }, (_b = slots.bubbleActions) === null || _b === void 0 ? void 0 : _b.call(slots, messagePayloadRef.value), messageBubbleContent) : hasBubbleActionsConfig ? h(UDropdown, {
316
316
  show: contextMenuShow.value,
317
317
  trigger: "manual",
318
318
  placement: "bottom-start",
@@ -360,6 +360,7 @@ export default defineComponent({
360
360
  }))))));
361
361
  };
362
362
  const renderService = () => {
363
+ var _a;
363
364
  if (slots.service) {
364
365
  return slots.service(props.serviceVariant);
365
366
  }
@@ -367,10 +368,10 @@ export default defineComponent({
367
368
  const displayMarkdown = markdownActive.value && isMarkdownEligibleVariant;
368
369
  return h("div", {
369
370
  class: [`${mergedClsPrefixRef.value}-message-bubble__service`, `${mergedClsPrefixRef.value}-message-bubble__service--${props.serviceVariant}`]
370
- }, displayMarkdown ? markdownHtmlRef.value && h("span", {
371
- class: `${mergedClsPrefixRef.value}-message-bubble__markdown`,
371
+ }, displayMarkdown ? markdownHtmlRef.value && h("span", Object.assign({}, props.markdownProps, {
372
+ class: [`${mergedClsPrefixRef.value}-message-bubble__markdown`, (_a = props.markdownProps) === null || _a === void 0 ? void 0 : _a.class],
372
373
  innerHTML: markdownHtmlRef.value
373
- }) : props.content && h("span", null, resolveRenderContent(props.content)));
374
+ })) : props.content && h("span", null, resolveRenderContent(props.content)));
374
375
  };
375
376
  return {
376
377
  mergedClsPrefixRef,
@@ -1,4 +1,4 @@
1
- import type { Component, PropType, VNodeChild } from 'vue';
1
+ import type { Component, HTMLAttributes, PropType, VNodeChild } from 'vue';
2
2
  import type { ExtractPublicPropTypes } from '../../_utils';
3
3
  import type { MarkdownOptions } from '../../_utils/markdown';
4
4
  import type { UploadFileInfo, UploadProps } from '../../upload';
@@ -99,6 +99,10 @@ export declare const messageBubbleProps: {
99
99
  readonly type: PropType<MarkdownOptions>;
100
100
  readonly default: undefined;
101
101
  };
102
+ readonly markdownProps: {
103
+ readonly type: PropType<HTMLAttributes>;
104
+ readonly default: undefined;
105
+ };
102
106
  readonly timestamp: {
103
107
  readonly type: PropType<string | number | Date | (() => VNodeChild)>;
104
108
  readonly default: undefined;
@@ -65,6 +65,10 @@ export const messageBubbleProps = Object.assign(Object.assign({}, useTheme.props
65
65
  type: Object,
66
66
  default: undefined
67
67
  },
68
+ markdownProps: {
69
+ type: Object,
70
+ default: undefined
71
+ },
68
72
  timestamp: {
69
73
  type: [String, Number, Date, Function],
70
74
  default: undefined
@@ -1,3 +1,4 @@
1
+ import { markdownContentStyle } from "../../../_styles/markdown/markdown-content.cssr.mjs";
1
2
  import { c, cB, cE, cM } from "../../../_utils/cssr/index.mjs";
2
3
  // vars:
3
4
  // --u-bezier
@@ -80,23 +81,9 @@ export default cB('message-bubble', `
80
81
  `), cE('markdown', `
81
82
  white-space: normal;
82
83
  font-size: var(--u-message-bubble-markdown-text-font-size);
83
- `, [c('h1', 'font-size: var(--u-message-bubble-markdown-h1-font-size);'), c('h2', 'font-size: var(--u-message-bubble-markdown-h2-font-size);'), c('h3', 'font-size: var(--u-message-bubble-markdown-h3-font-size);'), c('ul, ol', 'list-style-position: inside;'), c('blockquote', `
84
- position: relative;
85
- border-radius: 4px;
86
- padding: 0 8px;
87
- margin: 0;
88
- background-color: var(--u-message-bubble-markdown-quote-background-color);
89
- color: var(--u-message-bubble-markdown-quote-text-color);
90
- `, [c('&::before', `
91
- content: "";
92
- width: 2px;
93
- position: absolute;
94
- left: 2px;
95
- top: 2px;
96
- bottom: 2px;
97
- border-radius: 30px;
98
- background-color: var(--u-message-bubble-markdown-quote-marker-color);
99
- `)]), c('& > *:first-child', 'margin-top: 0;'), c('& > *:last-child', 'margin-bottom: 0;')]), cE('after-content', `
84
+ `, markdownContentStyle({
85
+ cssVarPrefix: '--u-message-bubble-markdown'
86
+ })), cE('after-content', `
100
87
  white-space: normal;
101
88
  `), cE('meta', `
102
89
  display: flex;
package/es/styles.d.ts CHANGED
@@ -29,6 +29,7 @@ export { drawerDark, drawerRtl as unstableDrawerRtl } from './drawer/styles';
29
29
  export { dropdownDark } from './dropdown/styles';
30
30
  export { dynamicInputDark, dynamicInputRtl as unstableDynamicInputRtl } from './dynamic-input/styles';
31
31
  export { dynamicTagsDark } from './dynamic-tags/styles';
32
+ export { editorDark } from './editor/styles';
32
33
  export { elementDark } from './element/styles';
33
34
  export { emptyDark } from './empty/styles';
34
35
  export { floatButtonGroupDark } from './float-button-group/styles';
package/es/styles.mjs CHANGED
@@ -30,6 +30,7 @@ export { drawerDark, drawerRtl as unstableDrawerRtl } from "./drawer/styles/inde
30
30
  export { dropdownDark } from "./dropdown/styles/index.mjs";
31
31
  export { dynamicInputDark, dynamicInputRtl as unstableDynamicInputRtl } from "./dynamic-input/styles/index.mjs";
32
32
  export { dynamicTagsDark } from "./dynamic-tags/styles/index.mjs";
33
+ export { editorDark } from "./editor/styles/index.mjs";
33
34
  export { elementDark } from "./element/styles/index.mjs";
34
35
  export { emptyDark } from "./empty/styles/index.mjs";
35
36
  export { floatButtonGroupDark } from "./float-button-group/styles/index.mjs";
@@ -35,6 +35,7 @@ import { drawerDark } from "../drawer/styles/index.mjs";
35
35
  import { dropdownDark } from "../dropdown/styles/index.mjs";
36
36
  import { dynamicInputDark } from "../dynamic-input/styles/index.mjs";
37
37
  import { dynamicTagsDark } from "../dynamic-tags/styles/index.mjs";
38
+ import { editorDark } from "../editor/styles/index.mjs";
38
39
  import { elementDark } from "../element/styles/index.mjs";
39
40
  import { ellipsisDark } from "../ellipsis/styles/index.mjs";
40
41
  import { emptyDark } from "../empty/styles/index.mjs";
@@ -139,6 +140,7 @@ export const darkTheme = {
139
140
  Dropdown: dropdownDark,
140
141
  DynamicInput: dynamicInputDark,
141
142
  DynamicTags: dynamicTagsDark,
143
+ Editor: editorDark,
142
144
  Element: elementDark,
143
145
  Empty: emptyDark,
144
146
  Ellipsis: ellipsisDark,
@@ -37,6 +37,7 @@ import { drawerLight } from "../drawer/styles/index.mjs";
37
37
  import { dropdownLight } from "../dropdown/styles/index.mjs";
38
38
  import { dynamicInputLight } from "../dynamic-input/styles/index.mjs";
39
39
  import { dynamicTagsLight } from "../dynamic-tags/styles/index.mjs";
40
+ import { editorLight } from "../editor/styles/index.mjs";
40
41
  import { elementLight } from "../element/styles/index.mjs";
41
42
  import { ellipsisLight } from "../ellipsis/styles/index.mjs";
42
43
  import { emptyLight } from "../empty/styles/index.mjs";
@@ -141,6 +142,7 @@ export const lightTheme = {
141
142
  Dropdown: dropdownLight,
142
143
  DynamicInput: dynamicInputLight,
143
144
  DynamicTags: dynamicTagsLight,
145
+ Editor: editorLight,
144
146
  Element: elementLight,
145
147
  Empty: emptyLight,
146
148
  Equation: equationLight,