@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.
- package/dist/index.js +63596 -32483
- package/dist/index.mjs +64978 -33874
- package/dist/index.prod.js +3 -3
- package/dist/index.prod.mjs +3 -3
- package/es/_internal/icons/Bold.d.ts +2 -0
- package/es/_internal/icons/Bold.mjs +29 -0
- package/es/_internal/icons/BulletList.d.ts +2 -0
- package/es/_internal/icons/BulletList.mjs +23 -0
- package/es/_internal/icons/HorizontalRule.d.ts +2 -0
- package/es/_internal/icons/HorizontalRule.mjs +14 -0
- package/es/_internal/icons/Italic.d.ts +2 -0
- package/es/_internal/icons/Italic.mjs +19 -0
- package/es/_internal/icons/NumberedList.d.ts +2 -0
- package/es/_internal/icons/NumberedList.mjs +23 -0
- package/es/_internal/icons/Quote.d.ts +2 -0
- package/es/_internal/icons/Quote.mjs +23 -0
- package/es/_internal/icons/SettingsLine.d.ts +2 -0
- package/es/_internal/icons/SettingsLine.mjs +19 -0
- package/es/_internal/icons/Strikethrough.d.ts +2 -0
- package/es/_internal/icons/Strikethrough.mjs +14 -0
- package/es/_internal/icons/index.d.ts +8 -0
- package/es/_internal/icons/index.mjs +8 -0
- package/es/_styles/markdown/markdown-content.cssr.d.ts +6 -0
- package/es/_styles/markdown/markdown-content.cssr.mjs +22 -0
- package/es/_utils/markdown/index.d.ts +3 -2
- package/es/_utils/markdown/index.mjs +2 -1
- package/es/_utils/markdown/render-markdown.d.ts +2 -1
- package/es/_utils/markdown/render-markdown.mjs +1 -1
- package/es/chat/src/Chat.d.ts +261 -24
- package/es/chat/src/Chat.mjs +2 -0
- package/es/chat/src/ChatMainArea.d.ts +81 -8
- package/es/chat/src/ChatMainArea.mjs +111 -355
- package/es/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.d.ts +9084 -0
- package/es/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.mjs +70 -0
- package/es/chat/src/ChatParts/ChatAttachmentButton/interface.d.ts +2645 -0
- package/es/chat/src/ChatParts/ChatAttachmentButton/interface.mjs +19 -0
- package/es/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.d.ts +9070 -0
- package/es/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.mjs +78 -0
- package/es/chat/src/ChatParts/ChatEditingBlock/interface.d.ts +2637 -0
- package/es/chat/src/ChatParts/ChatEditingBlock/interface.mjs +15 -0
- package/es/chat/src/ChatParts/ChatEditorInput/ChatEditorInput.d.ts +89 -0
- package/es/chat/src/ChatParts/ChatEditorInput/ChatEditorInput.mjs +63 -0
- package/es/chat/src/ChatParts/ChatEditorInput/interface.d.ts +42 -0
- package/es/chat/src/ChatParts/ChatEditorInput/interface.mjs +34 -0
- package/es/chat/src/ChatParts/ChatFooter/ChatFooter.d.ts +115 -0
- package/es/chat/src/ChatParts/ChatFooter/ChatFooter.mjs +99 -0
- package/es/chat/src/ChatParts/ChatFooter/interface.d.ts +56 -0
- package/es/chat/src/ChatParts/ChatFooter/interface.mjs +46 -0
- package/es/chat/src/ChatParts/ChatHeader/ChatHeader.d.ts +9205 -0
- package/es/chat/src/ChatParts/ChatHeader/ChatHeader.mjs +219 -0
- package/es/chat/src/ChatParts/ChatHeader/interface.d.ts +2694 -0
- package/es/chat/src/ChatParts/ChatHeader/interface.mjs +67 -0
- package/es/chat/src/ChatParts/ChatLegacyInput/ChatLegacyInput.d.ts +9142 -0
- package/es/chat/src/ChatParts/ChatLegacyInput/ChatLegacyInput.mjs +130 -0
- package/es/chat/src/ChatParts/ChatLegacyInput/interface.d.ts +2654 -0
- package/es/chat/src/ChatParts/ChatLegacyInput/interface.mjs +27 -0
- package/es/chat/src/ChatParts/ChatMessagesArea/ChatMessagesArea.d.ts +148 -0
- package/es/chat/src/ChatParts/ChatMessagesArea/ChatMessagesArea.mjs +92 -0
- package/es/chat/src/ChatParts/ChatMessagesArea/interface.d.ts +72 -0
- package/es/chat/src/ChatParts/ChatMessagesArea/interface.mjs +58 -0
- package/es/chat/src/interface.d.ts +7 -0
- package/es/chat/src/interface.mjs +4 -0
- package/es/chat/src/styles/index.cssr.mjs +11 -12
- package/es/chat/styles/light.d.ts +4 -0
- package/es/chat/styles/light.mjs +20 -1
- package/es/components.d.ts +13087 -103
- package/es/components.mjs +5 -0
- package/es/config-provider/src/ConfigProvider.mjs +6 -2
- package/es/config-provider/src/internal-interface.d.ts +2 -0
- package/es/data-table/index.d.ts +1 -1
- package/es/data-table/src/ColumnSettings/ColumnSettingsDrawer.d.ts +156 -0
- package/es/data-table/src/ColumnSettings/ColumnSettingsDrawer.mjs +220 -0
- package/es/data-table/src/ColumnSettings/styles.cssr.d.ts +2 -0
- package/es/data-table/src/ColumnSettings/styles.cssr.mjs +25 -0
- package/es/data-table/src/DataTable.d.ts +60 -2
- package/es/data-table/src/DataTable.mjs +99 -23
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +14 -0
- package/es/data-table/src/interface.d.ts +53 -1
- package/es/data-table/src/interface.mjs +18 -1
- package/es/data-table/src/styles/index.cssr.mjs +17 -1
- package/es/data-table/src/use-column-settings.d.ts +2 -0
- package/es/data-table/src/use-column-settings.mjs +124 -0
- package/es/data-table/src/utils/column-utils.d.ts +2 -1
- package/es/data-table/src/utils/column-utils.mjs +6 -0
- package/es/editor/index.d.ts +10 -0
- package/es/editor/index.mjs +5 -0
- package/es/editor/src/Editor.d.ts +3922 -0
- package/es/editor/src/Editor.mjs +230 -0
- package/es/editor/src/EditorParts/BlockTypeSelect/BlockTypeSelect.d.ts +37 -0
- package/es/editor/src/EditorParts/BlockTypeSelect/BlockTypeSelect.mjs +63 -0
- package/es/editor/src/EditorParts/BlockTypeSelect/interface.d.ts +21 -0
- package/es/editor/src/EditorParts/BlockTypeSelect/interface.mjs +14 -0
- package/es/editor/src/EditorParts/EditorContent/EditorContent.d.ts +4102 -0
- package/es/editor/src/EditorParts/EditorContent/EditorContent.mjs +154 -0
- package/es/editor/src/EditorParts/EditorContent/index.d.ts +2 -0
- package/es/editor/src/EditorParts/EditorContent/index.mjs +2 -0
- package/es/editor/src/EditorParts/EditorContent/interface.d.ts +1918 -0
- package/es/editor/src/EditorParts/EditorContent/interface.mjs +17 -0
- package/es/editor/src/EditorParts/EditorToolbar/EditorToolbar.d.ts +4606 -0
- package/es/editor/src/EditorParts/EditorToolbar/EditorToolbar.mjs +170 -0
- package/es/editor/src/EditorParts/EditorToolbar/composables/use-editor-toolbar-customization.d.ts +11 -0
- package/es/editor/src/EditorParts/EditorToolbar/composables/use-editor-toolbar-customization.mjs +56 -0
- package/es/editor/src/EditorParts/EditorToolbar/index.d.ts +2 -0
- package/es/editor/src/EditorParts/EditorToolbar/index.mjs +2 -0
- package/es/editor/src/EditorParts/EditorToolbar/interface.d.ts +1924 -0
- package/es/editor/src/EditorParts/EditorToolbar/interface.mjs +18 -0
- package/es/editor/src/EditorParts/SendButton/SendButton.d.ts +23 -0
- package/es/editor/src/EditorParts/SendButton/SendButton.mjs +44 -0
- package/es/editor/src/EditorParts/SendButton/interface.d.ts +18 -0
- package/es/editor/src/EditorParts/SendButton/interface.mjs +8 -0
- package/es/editor/src/EditorParts/ToolbarButton/ToolbarButton.d.ts +32 -0
- package/es/editor/src/EditorParts/ToolbarButton/ToolbarButton.mjs +44 -0
- package/es/editor/src/EditorParts/ToolbarButton/interface.d.ts +20 -0
- package/es/editor/src/EditorParts/ToolbarButton/interface.mjs +13 -0
- package/es/editor/src/composables/use-editor-commands.d.ts +8 -0
- package/es/editor/src/composables/use-editor-commands.mjs +69 -0
- package/es/editor/src/composables/use-editor-css-vars.d.ts +4 -0
- package/es/editor/src/composables/use-editor-css-vars.mjs +89 -0
- package/es/editor/src/constants.d.ts +12 -0
- package/es/editor/src/constants.mjs +25 -0
- package/es/editor/src/extensions.d.ts +7 -0
- package/es/editor/src/extensions.mjs +135 -0
- package/es/editor/src/interface.d.ts +2037 -0
- package/es/editor/src/interface.mjs +53 -0
- package/es/editor/src/markdown/constants.d.ts +8 -0
- package/es/editor/src/markdown/constants.mjs +206 -0
- package/es/editor/src/markdown/editor-serializer.d.ts +9 -0
- package/es/editor/src/markdown/editor-serializer.mjs +18 -0
- package/es/editor/src/markdown/escape.d.ts +2 -0
- package/es/editor/src/markdown/escape.mjs +24 -0
- package/es/editor/src/markdown/html.d.ts +1 -0
- package/es/editor/src/markdown/html.mjs +4 -0
- package/es/editor/src/markdown/parser.d.ts +4 -0
- package/es/editor/src/markdown/parser.mjs +36 -0
- package/es/editor/src/markdown/serializer-state.d.ts +10 -0
- package/es/editor/src/markdown/serializer-state.mjs +12 -0
- package/es/editor/src/markdown/serializer.d.ts +3 -0
- package/es/editor/src/markdown/serializer.mjs +8 -0
- package/es/editor/src/styles/index.cssr.d.ts +2 -0
- package/es/editor/src/styles/index.cssr.mjs +131 -0
- package/es/editor/styles/dark.d.ts +634 -0
- package/es/editor/styles/dark.mjs +21 -0
- package/es/editor/styles/index.d.ts +3 -0
- package/es/editor/styles/index.mjs +2 -0
- package/es/editor/styles/light.d.ts +685 -0
- package/es/editor/styles/light.mjs +91 -0
- package/es/editor/tests/fixtures/round-trip.d.ts +12 -0
- package/es/editor/tests/fixtures/round-trip.mjs +98 -0
- package/es/editor/tests/utils.d.ts +7 -0
- package/es/editor/tests/utils.mjs +27 -0
- package/es/locales/common/enUS.d.ts +22 -0
- package/es/locales/common/enUS.mjs +23 -1
- package/es/locales/common/ruRU.mjs +28 -8
- package/es/locales/common/uzUZ.mjs +23 -1
- package/es/locales/common/zhCN.mjs +23 -1
- package/es/locales/utils/date-locale.d.ts +2 -0
- package/es/locales/utils/date-locale.mjs +8 -0
- package/es/message-bubble/src/MessageBubble.d.ts +9 -0
- package/es/message-bubble/src/MessageBubble.mjs +9 -8
- package/es/message-bubble/src/interface.d.ts +5 -1
- package/es/message-bubble/src/interface.mjs +4 -0
- package/es/message-bubble/src/styles/index.cssr.mjs +4 -17
- package/es/styles.d.ts +1 -0
- package/es/styles.mjs +1 -0
- package/es/themes/dark.mjs +2 -0
- package/es/themes/light.mjs +2 -0
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/lib/_internal/icons/Bold.d.ts +2 -0
- package/lib/_internal/icons/Bold.js +13 -0
- package/lib/_internal/icons/BulletList.d.ts +2 -0
- package/lib/_internal/icons/BulletList.js +13 -0
- package/lib/_internal/icons/HorizontalRule.d.ts +2 -0
- package/lib/_internal/icons/HorizontalRule.js +10 -0
- package/lib/_internal/icons/Italic.d.ts +2 -0
- package/lib/_internal/icons/Italic.js +11 -0
- package/lib/_internal/icons/NumberedList.d.ts +2 -0
- package/lib/_internal/icons/NumberedList.js +13 -0
- package/lib/_internal/icons/Quote.d.ts +2 -0
- package/lib/_internal/icons/Quote.js +13 -0
- package/lib/_internal/icons/SettingsLine.d.ts +2 -0
- package/lib/_internal/icons/SettingsLine.js +11 -0
- package/lib/_internal/icons/Strikethrough.d.ts +2 -0
- package/lib/_internal/icons/Strikethrough.js +10 -0
- package/lib/_internal/icons/index.d.ts +8 -0
- package/lib/_internal/icons/index.js +18 -2
- package/lib/_styles/markdown/markdown-content.cssr.d.ts +6 -0
- package/lib/_styles/markdown/markdown-content.cssr.js +28 -0
- package/lib/_utils/markdown/index.d.ts +3 -2
- package/lib/_utils/markdown/index.js +4 -1
- package/lib/_utils/markdown/render-markdown.d.ts +2 -1
- package/lib/_utils/markdown/render-markdown.js +1 -0
- package/lib/chat/src/Chat.d.ts +261 -24
- package/lib/chat/src/Chat.js +2 -0
- package/lib/chat/src/ChatMainArea.d.ts +81 -8
- package/lib/chat/src/ChatMainArea.js +93 -223
- package/lib/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.d.ts +9084 -0
- package/lib/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.js +52 -0
- package/lib/chat/src/ChatParts/ChatAttachmentButton/interface.d.ts +2645 -0
- package/lib/chat/src/ChatParts/ChatAttachmentButton/interface.js +17 -0
- package/lib/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.d.ts +9070 -0
- package/lib/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.js +55 -0
- package/lib/chat/src/ChatParts/ChatEditingBlock/interface.d.ts +2637 -0
- package/lib/chat/src/ChatParts/ChatEditingBlock/interface.js +14 -0
- package/lib/chat/src/ChatParts/ChatEditorInput/ChatEditorInput.d.ts +89 -0
- package/lib/chat/src/ChatParts/ChatEditorInput/ChatEditorInput.js +45 -0
- package/lib/chat/src/ChatParts/ChatEditorInput/interface.d.ts +42 -0
- package/lib/chat/src/ChatParts/ChatEditorInput/interface.js +37 -0
- package/lib/chat/src/ChatParts/ChatFooter/ChatFooter.d.ts +115 -0
- package/lib/chat/src/ChatParts/ChatFooter/ChatFooter.js +66 -0
- package/lib/chat/src/ChatParts/ChatFooter/interface.d.ts +56 -0
- package/lib/chat/src/ChatParts/ChatFooter/interface.js +49 -0
- package/lib/chat/src/ChatParts/ChatHeader/ChatHeader.d.ts +9205 -0
- package/lib/chat/src/ChatParts/ChatHeader/ChatHeader.js +164 -0
- package/lib/chat/src/ChatParts/ChatHeader/interface.d.ts +2694 -0
- package/lib/chat/src/ChatParts/ChatHeader/interface.js +53 -0
- package/lib/chat/src/ChatParts/ChatLegacyInput/ChatLegacyInput.d.ts +9142 -0
- package/lib/chat/src/ChatParts/ChatLegacyInput/ChatLegacyInput.js +98 -0
- package/lib/chat/src/ChatParts/ChatLegacyInput/interface.d.ts +2654 -0
- package/lib/chat/src/ChatParts/ChatLegacyInput/interface.js +23 -0
- package/lib/chat/src/ChatParts/ChatMessagesArea/ChatMessagesArea.d.ts +148 -0
- package/lib/chat/src/ChatParts/ChatMessagesArea/ChatMessagesArea.js +49 -0
- package/lib/chat/src/ChatParts/ChatMessagesArea/interface.d.ts +72 -0
- package/lib/chat/src/ChatParts/ChatMessagesArea/interface.js +61 -0
- package/lib/chat/src/interface.d.ts +7 -0
- package/lib/chat/src/interface.js +3 -0
- package/lib/chat/src/styles/index.cssr.js +11 -12
- package/lib/chat/styles/light.d.ts +4 -0
- package/lib/chat/styles/light.js +22 -1
- package/lib/components.d.ts +13087 -103
- package/lib/components.js +17 -7
- package/lib/config-provider/src/ConfigProvider.js +7 -4
- package/lib/config-provider/src/internal-interface.d.ts +2 -0
- package/lib/data-table/index.d.ts +1 -1
- package/lib/data-table/src/ColumnSettings/ColumnSettingsDrawer.d.ts +156 -0
- package/lib/data-table/src/ColumnSettings/ColumnSettingsDrawer.js +181 -0
- package/lib/data-table/src/ColumnSettings/styles.cssr.d.ts +2 -0
- package/lib/data-table/src/ColumnSettings/styles.cssr.js +30 -0
- package/lib/data-table/src/DataTable.d.ts +60 -2
- package/lib/data-table/src/DataTable.js +65 -23
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +14 -0
- package/lib/data-table/src/interface.d.ts +53 -1
- package/lib/data-table/src/interface.js +17 -2
- package/lib/data-table/src/styles/index.cssr.js +17 -1
- package/lib/data-table/src/use-column-settings.d.ts +2 -0
- package/lib/data-table/src/use-column-settings.js +144 -0
- package/lib/data-table/src/utils/column-utils.d.ts +2 -1
- package/lib/data-table/src/utils/column-utils.js +5 -0
- package/lib/editor/index.d.ts +10 -0
- package/lib/editor/index.js +19 -0
- package/lib/editor/src/Editor.d.ts +3922 -0
- package/lib/editor/src/Editor.js +224 -0
- package/lib/editor/src/EditorParts/BlockTypeSelect/BlockTypeSelect.d.ts +37 -0
- package/lib/editor/src/EditorParts/BlockTypeSelect/BlockTypeSelect.js +47 -0
- package/lib/editor/src/EditorParts/BlockTypeSelect/interface.d.ts +21 -0
- package/lib/editor/src/EditorParts/BlockTypeSelect/interface.js +17 -0
- package/lib/editor/src/EditorParts/EditorContent/EditorContent.d.ts +4102 -0
- package/lib/editor/src/EditorParts/EditorContent/EditorContent.js +121 -0
- package/lib/editor/src/EditorParts/EditorContent/index.d.ts +2 -0
- package/lib/editor/src/EditorParts/EditorContent/index.js +10 -0
- package/lib/editor/src/EditorParts/EditorContent/interface.d.ts +1918 -0
- package/lib/editor/src/EditorParts/EditorContent/interface.js +8 -0
- package/lib/editor/src/EditorParts/EditorToolbar/EditorToolbar.d.ts +4606 -0
- package/lib/editor/src/EditorParts/EditorToolbar/EditorToolbar.js +126 -0
- package/lib/editor/src/EditorParts/EditorToolbar/composables/use-editor-toolbar-customization.d.ts +11 -0
- package/lib/editor/src/EditorParts/EditorToolbar/composables/use-editor-toolbar-customization.js +52 -0
- package/lib/editor/src/EditorParts/EditorToolbar/index.d.ts +2 -0
- package/lib/editor/src/EditorParts/EditorToolbar/index.js +10 -0
- package/lib/editor/src/EditorParts/EditorToolbar/interface.d.ts +1924 -0
- package/lib/editor/src/EditorParts/EditorToolbar/interface.js +11 -0
- package/lib/editor/src/EditorParts/SendButton/SendButton.d.ts +23 -0
- package/lib/editor/src/EditorParts/SendButton/SendButton.js +31 -0
- package/lib/editor/src/EditorParts/SendButton/interface.d.ts +18 -0
- package/lib/editor/src/EditorParts/SendButton/interface.js +11 -0
- package/lib/editor/src/EditorParts/ToolbarButton/ToolbarButton.d.ts +32 -0
- package/lib/editor/src/EditorParts/ToolbarButton/ToolbarButton.js +34 -0
- package/lib/editor/src/EditorParts/ToolbarButton/interface.d.ts +20 -0
- package/lib/editor/src/EditorParts/ToolbarButton/interface.js +16 -0
- package/lib/editor/src/composables/use-editor-commands.d.ts +8 -0
- package/lib/editor/src/composables/use-editor-commands.js +70 -0
- package/lib/editor/src/composables/use-editor-css-vars.d.ts +4 -0
- package/lib/editor/src/composables/use-editor-css-vars.js +50 -0
- package/lib/editor/src/constants.d.ts +12 -0
- package/lib/editor/src/constants.js +56 -0
- package/lib/editor/src/extensions.d.ts +7 -0
- package/lib/editor/src/extensions.js +141 -0
- package/lib/editor/src/interface.d.ts +2037 -0
- package/lib/editor/src/interface.js +22 -0
- package/lib/editor/src/markdown/constants.d.ts +8 -0
- package/lib/editor/src/markdown/constants.js +201 -0
- package/lib/editor/src/markdown/editor-serializer.d.ts +9 -0
- package/lib/editor/src/markdown/editor-serializer.js +20 -0
- package/lib/editor/src/markdown/escape.d.ts +2 -0
- package/lib/editor/src/markdown/escape.js +31 -0
- package/lib/editor/src/markdown/html.d.ts +1 -0
- package/lib/editor/src/markdown/html.js +9 -0
- package/lib/editor/src/markdown/parser.d.ts +4 -0
- package/lib/editor/src/markdown/parser.js +42 -0
- package/lib/editor/src/markdown/serializer-state.d.ts +10 -0
- package/lib/editor/src/markdown/serializer-state.js +16 -0
- package/lib/editor/src/markdown/serializer.d.ts +3 -0
- package/lib/editor/src/markdown/serializer.js +9 -0
- package/lib/editor/src/styles/index.cssr.d.ts +2 -0
- package/lib/editor/src/styles/index.cssr.js +136 -0
- package/lib/editor/styles/dark.d.ts +634 -0
- package/lib/editor/styles/dark.js +23 -0
- package/lib/editor/styles/index.d.ts +3 -0
- package/lib/editor/styles/index.js +10 -0
- package/lib/editor/styles/light.d.ts +685 -0
- package/lib/editor/styles/light.js +75 -0
- package/lib/editor/tests/fixtures/round-trip.d.ts +12 -0
- package/lib/editor/tests/fixtures/round-trip.js +125 -0
- package/lib/editor/tests/utils.d.ts +7 -0
- package/lib/editor/tests/utils.js +26 -0
- package/lib/locales/common/enUS.d.ts +22 -0
- package/lib/locales/common/enUS.js +23 -1
- package/lib/locales/common/ruRU.js +28 -8
- package/lib/locales/common/uzUZ.js +23 -1
- package/lib/locales/common/zhCN.js +23 -1
- package/lib/locales/utils/date-locale.d.ts +2 -0
- package/lib/locales/utils/date-locale.js +14 -0
- package/lib/message-bubble/src/MessageBubble.d.ts +9 -0
- package/lib/message-bubble/src/MessageBubble.js +12 -7
- package/lib/message-bubble/src/interface.d.ts +5 -1
- package/lib/message-bubble/src/interface.js +3 -0
- package/lib/message-bubble/src/styles/index.cssr.js +4 -17
- package/lib/styles.d.ts +1 -0
- package/lib/styles.js +127 -125
- package/lib/themes/dark.js +136 -134
- package/lib/themes/light.js +136 -134
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +8 -1
- package/volar.d.ts +3 -0
- 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,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: '',
|
|
56
|
+
expected: ''
|
|
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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
weekPlaceholder: 'Select Week',
|
|
40
|
+
yearPlaceholder: 'Выберите год',
|
|
41
|
+
quarterPlaceholder: 'Выберите квартал',
|
|
42
|
+
weekPlaceholder: 'Выберите неделю',
|
|
44
43
|
startDatePlaceholder: 'Дата начала',
|
|
45
44
|
endDatePlaceholder: 'Дата окончания',
|
|
46
45
|
startDatetimePlaceholder: 'Дата и время начала',
|
|
47
46
|
endDatetimePlaceholder: 'Дата и время окончания',
|
|
48
|
-
|
|
49
|
-
|
|
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,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
|
-
}, (
|
|
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
|
-
`,
|
|
84
|
-
|
|
85
|
-
|
|
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";
|
package/es/themes/dark.mjs
CHANGED
|
@@ -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,
|
package/es/themes/light.mjs
CHANGED
|
@@ -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,
|