@uzum-tech/ui 2.3.5 → 2.3.7

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 (108) hide show
  1. package/dist/index.js +5997 -65
  2. package/dist/index.mjs +5997 -65
  3. package/dist/index.prod.js +4 -2
  4. package/dist/index.prod.mjs +4 -2
  5. package/es/_utils/markdown/constants.d.ts +27 -0
  6. package/es/_utils/markdown/constants.mjs +26 -0
  7. package/es/_utils/markdown/create-markdown-renderer.d.ts +3 -0
  8. package/es/_utils/markdown/create-markdown-renderer.mjs +65 -0
  9. package/es/_utils/markdown/index.d.ts +2 -0
  10. package/es/_utils/markdown/index.mjs +1 -0
  11. package/es/_utils/markdown/interface.d.ts +14 -0
  12. package/es/_utils/markdown/interface.mjs +7 -0
  13. package/es/_utils/markdown/render-markdown.d.ts +3 -0
  14. package/es/_utils/markdown/render-markdown.mjs +31 -0
  15. package/es/_utils/markdown/rulers/clamp-heading.d.ts +2 -0
  16. package/es/_utils/markdown/rulers/clamp-heading.mjs +25 -0
  17. package/es/_utils/markdown/rulers/equals-divider.d.ts +2 -0
  18. package/es/_utils/markdown/rulers/equals-divider.mjs +19 -0
  19. package/es/_utils/markdown/rulers/prune-empty-blocks.d.ts +2 -0
  20. package/es/_utils/markdown/rulers/prune-empty-blocks.mjs +31 -0
  21. package/es/_utils/markdown/rulers/strikethrough.d.ts +3 -0
  22. package/es/_utils/markdown/rulers/strikethrough.mjs +38 -0
  23. package/es/_utils/markdown/rulers/strip-html.d.ts +2 -0
  24. package/es/_utils/markdown/rulers/strip-html.mjs +7 -0
  25. package/es/chat/src/Chat.d.ts +639 -23
  26. package/es/chat/src/Chat.mjs +2 -0
  27. package/es/chat/src/ChatListItems.d.ts +220 -4
  28. package/es/chat/src/ChatListItems.mjs +3 -2
  29. package/es/chat/src/ChatMainArea.d.ts +248 -5
  30. package/es/chat/src/ChatMainArea.mjs +27 -13
  31. package/es/chat/src/ChatMessages.d.ts +246 -3
  32. package/es/chat/src/ChatMessages.mjs +22 -2
  33. package/es/chat/src/ChatParts/Sidebar.d.ts +36 -0
  34. package/es/chat/src/interface.d.ts +68 -0
  35. package/es/chat/src/interface.mjs +8 -0
  36. package/es/chat/styles/dark.d.ts +18 -0
  37. package/es/chat/styles/light.d.ts +25 -0
  38. package/es/chat/styles/light.mjs +9 -1
  39. package/es/components.d.ts +1640 -418
  40. package/es/data-table/src/HeaderButton/FilterButton.d.ts +1 -1
  41. package/es/data-table/src/TableParts/Header.mjs +1 -1
  42. package/es/data-table/src/use-sorter.d.ts +2 -5
  43. package/es/data-table/src/use-table-data.d.ts +1 -4
  44. package/es/layout/src/LayoutSider.d.ts +1 -1
  45. package/es/message-bubble/index.d.ts +1 -0
  46. package/es/message-bubble/src/MessageBubble.d.ts +90 -6
  47. package/es/message-bubble/src/MessageBubble.mjs +53 -7
  48. package/es/message-bubble/src/interface.d.ts +42 -0
  49. package/es/message-bubble/src/interface.mjs +8 -0
  50. package/es/message-bubble/src/styles/index.cssr.mjs +35 -1
  51. package/es/message-bubble/styles/dark.d.ts +11 -0
  52. package/es/message-bubble/styles/light.d.ts +22 -0
  53. package/es/message-bubble/styles/light.mjs +14 -1
  54. package/es/version.d.ts +1 -1
  55. package/es/version.mjs +1 -1
  56. package/lib/_utils/markdown/constants.d.ts +27 -0
  57. package/lib/_utils/markdown/constants.js +55 -0
  58. package/lib/_utils/markdown/create-markdown-renderer.d.ts +3 -0
  59. package/lib/_utils/markdown/create-markdown-renderer.js +84 -0
  60. package/lib/_utils/markdown/index.d.ts +2 -0
  61. package/lib/_utils/markdown/index.js +6 -0
  62. package/lib/_utils/markdown/interface.d.ts +14 -0
  63. package/lib/_utils/markdown/interface.js +10 -0
  64. package/lib/_utils/markdown/render-markdown.d.ts +3 -0
  65. package/lib/_utils/markdown/render-markdown.js +38 -0
  66. package/lib/_utils/markdown/rulers/clamp-heading.d.ts +2 -0
  67. package/lib/_utils/markdown/rulers/clamp-heading.js +30 -0
  68. package/lib/_utils/markdown/rulers/equals-divider.d.ts +2 -0
  69. package/lib/_utils/markdown/rulers/equals-divider.js +28 -0
  70. package/lib/_utils/markdown/rulers/prune-empty-blocks.d.ts +2 -0
  71. package/lib/_utils/markdown/rulers/prune-empty-blocks.js +40 -0
  72. package/lib/_utils/markdown/rulers/strikethrough.d.ts +3 -0
  73. package/lib/_utils/markdown/rulers/strikethrough.js +43 -0
  74. package/lib/_utils/markdown/rulers/strip-html.d.ts +2 -0
  75. package/lib/_utils/markdown/rulers/strip-html.js +15 -0
  76. package/lib/chat/src/Chat.d.ts +639 -23
  77. package/lib/chat/src/Chat.js +2 -0
  78. package/lib/chat/src/ChatListItems.d.ts +220 -4
  79. package/lib/chat/src/ChatListItems.js +7 -2
  80. package/lib/chat/src/ChatMainArea.d.ts +248 -5
  81. package/lib/chat/src/ChatMainArea.js +26 -14
  82. package/lib/chat/src/ChatMessages.d.ts +246 -3
  83. package/lib/chat/src/ChatMessages.js +11 -4
  84. package/lib/chat/src/ChatParts/Sidebar.d.ts +36 -0
  85. package/lib/chat/src/interface.d.ts +68 -0
  86. package/lib/chat/src/interface.js +6 -0
  87. package/lib/chat/styles/dark.d.ts +18 -0
  88. package/lib/chat/styles/light.d.ts +25 -0
  89. package/lib/chat/styles/light.js +8 -1
  90. package/lib/components.d.ts +1258 -36
  91. package/lib/data-table/src/HeaderButton/FilterButton.d.ts +1 -1
  92. package/lib/data-table/src/TableParts/Header.js +1 -1
  93. package/lib/data-table/src/use-sorter.d.ts +2 -5
  94. package/lib/data-table/src/use-table-data.d.ts +1 -4
  95. package/lib/layout/src/LayoutSider.d.ts +1 -1
  96. package/lib/message-bubble/index.d.ts +1 -0
  97. package/lib/message-bubble/src/MessageBubble.d.ts +90 -6
  98. package/lib/message-bubble/src/MessageBubble.js +41 -7
  99. package/lib/message-bubble/src/interface.d.ts +42 -0
  100. package/lib/message-bubble/src/interface.js +6 -0
  101. package/lib/message-bubble/src/styles/index.cssr.js +35 -1
  102. package/lib/message-bubble/styles/dark.d.ts +11 -0
  103. package/lib/message-bubble/styles/light.d.ts +22 -0
  104. package/lib/message-bubble/styles/light.js +13 -2
  105. package/lib/version.d.ts +1 -1
  106. package/lib/version.js +1 -1
  107. package/package.json +2 -1
  108. package/web-types.json +29 -1
@@ -3794,7 +3794,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
3794
3794
  showPopover: import("vue").Ref<boolean, boolean>;
3795
3795
  mergedRenderFilter: import("vue").ComputedRef<import("../interface").RenderFilter | undefined>;
3796
3796
  filterMultiple: import("vue").ComputedRef<boolean>;
3797
- mergedFilterValue: import("vue").ComputedRef<FilterOptionValue | FilterOptionValue[] | null>;
3797
+ mergedFilterValue: import("vue").ComputedRef<FilterOptionValue[] | FilterOptionValue | null>;
3798
3798
  filterMenuCssVars: import("vue").Ref<import("vue").CSSProperties, import("vue").CSSProperties>;
3799
3799
  handleFilterChange: (mergedFilterValue: FilterOptionValue | FilterOptionValue[] | null) => void;
3800
3800
  handleFilterMenuConfirm: () => void;
@@ -208,7 +208,7 @@ exports.default = (0, vue_1.defineComponent)({
208
208
  const { handleTableHeaderScroll, scrollX } = this;
209
209
  return ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-data-table-base-table-header`, onScroll: handleTableHeaderScroll },
210
210
  (0, vue_1.h)("table", { ref: "body", class: `${mergedClsPrefix}-data-table-table`, style: {
211
- minWidth: (0, _utils_1.formatLength)(scrollX),
211
+ minWidth: fixedResizableTableWidth || (0, _utils_1.formatLength)(scrollX),
212
212
  width: fixedResizableTableWidth,
213
213
  tableLayout: mergedTableLayout
214
214
  } },
@@ -1,4 +1,4 @@
1
- import type { ColumnKey, CompareFn, DataTableSetupProps, InternalRowData, SortOrder, SortState, TmNode, UseSorterDeps } from './interface';
1
+ import type { ColumnKey, DataTableSetupProps, InternalRowData, SortOrder, SortState, TmNode, UseSorterDeps } from './interface';
2
2
  export declare function useSorter(props: DataTableSetupProps, { dataRelatedColsRef, filteredDataRef }: UseSorterDeps): {
3
3
  clearSorter: () => void;
4
4
  sort: (columnKey: ColumnKey, order?: SortOrder) => void;
@@ -6,10 +6,7 @@ export declare function useSorter(props: DataTableSetupProps, { dataRelatedColsR
6
6
  mergedSortStateRef: import("vue").ComputedRef<{
7
7
  columnKey: ColumnKey;
8
8
  order: SortOrder;
9
- sorter: boolean | "default" | CompareFn<InternalRowData> | {
10
- multiple: number;
11
- compare?: "default" | CompareFn<InternalRowData> | undefined;
12
- };
9
+ sorter: boolean | "default" | import("./interface").Sorter<InternalRowData>;
13
10
  }[]>;
14
11
  deriveNextSorter: (sortState: SortState | null) => void;
15
12
  doUpdateSorter: (sortState: SortState | SortState[] | null) => void;
@@ -10,10 +10,7 @@ export declare function useTableData(props: DataTableSetupProps, { dataRelatedCo
10
10
  mergedSortStateRef: import("vue").ComputedRef<{
11
11
  columnKey: ColumnKey;
12
12
  order: import("./interface").SortOrder;
13
- sorter: boolean | "default" | import("./interface").CompareFn<InternalRowData> | {
14
- multiple: number;
15
- compare?: "default" | import("./interface").CompareFn<InternalRowData> | undefined;
16
- };
13
+ sorter: boolean | "default" | import("./interface").Sorter<InternalRowData>;
17
14
  }[]>;
18
15
  hoverKeyRef: import("vue").Ref<RowKey | null, RowKey | null>;
19
16
  selectionColumnRef: import("vue").ComputedRef<TableSelectionColumn | null>;
@@ -506,7 +506,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
506
506
  nativeScrollbar: boolean;
507
507
  inverted: boolean;
508
508
  collapsedWidth: number;
509
- showTrigger: boolean | "bar" | "sidebar" | "arrow-circle";
509
+ showTrigger: boolean | "bar" | "arrow-circle" | "sidebar";
510
510
  collapseMode: "width" | "transform";
511
511
  defaultCollapsed: boolean;
512
512
  showCollapsedContent: boolean;
@@ -1,3 +1,4 @@
1
+ export type { MarkdownFeature, MarkdownOptions } from '../_utils/markdown';
1
2
  export type { MessageBubbleAction, MessageBubbleAttachment, MessageBubbleId, MessageBubbleMessagePayload, MessageBubbleProps, MessageBubbleRenderContent, MessageBubbleSlots } from './src/interface';
2
3
  export { MessageBubbleAttachmentStatus, messageBubbleProps, MessageBubbleServiceVariant, MessageBubbleStatus, MessageBubbleType } from './src/interface';
3
4
  export { default as UMessageBubble } from './src/MessageBubble';
@@ -1,14 +1,14 @@
1
1
  import type { SlotsType, VNodeChild } from 'vue';
2
2
  import type { MessageBubbleAttachment, MessageBubbleMessagePayload, MessageBubbleRenderContent, MessageBubbleSlots } from './interface';
3
- import { MessageBubbleStatus, MessageBubbleType } from './interface';
3
+ import { MessageBubbleServiceVariant, MessageBubbleStatus, MessageBubbleType } from './interface';
4
4
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
5
  readonly type: {
6
6
  readonly type: import("vue").PropType<MessageBubbleType>;
7
7
  readonly default: MessageBubbleType.MESSAGE;
8
8
  };
9
9
  readonly serviceVariant: {
10
- readonly type: import("vue").PropType<import("./interface").MessageBubbleServiceVariant>;
11
- readonly default: import("./interface").MessageBubbleServiceVariant.SYSTEM;
10
+ readonly type: import("vue").PropType<MessageBubbleServiceVariant>;
11
+ readonly default: MessageBubbleServiceVariant.SYSTEM;
12
12
  };
13
13
  readonly id: {
14
14
  readonly type: import("vue").PropType<import("./interface").MessageBubbleId>;
@@ -26,6 +26,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
26
26
  readonly type: import("vue").PropType<MessageBubbleRenderContent>;
27
27
  readonly default: undefined;
28
28
  };
29
+ readonly markdown: {
30
+ readonly type: BooleanConstructor;
31
+ readonly default: false;
32
+ };
33
+ readonly markdownOptions: {
34
+ readonly type: import("vue").PropType<import("../../_utils/markdown").MarkdownOptions>;
35
+ readonly default: undefined;
36
+ };
29
37
  readonly timestamp: {
30
38
  readonly type: import("vue").PropType<string | number | Date | (() => VNodeChild)>;
31
39
  readonly default: undefined;
@@ -75,6 +83,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
75
83
  serviceMessageTextColor: string;
76
84
  serviceMessageBackgroundColor: string;
77
85
  messageTitleColor: string;
86
+ markdownQuoteBorderColorOwn: string;
87
+ markdownQuoteBorderColorOther: string;
88
+ markdownQuoteTextColor: string;
89
+ markdownQuoteBackgroundColor: string;
90
+ markdownQuoteMarkerColor: string;
91
+ markdownDividerColorOwn: string;
92
+ markdownDividerColorOther: string;
93
+ markdownH1FontSize: string;
94
+ markdownH2FontSize: string;
95
+ markdownH3FontSize: string;
96
+ markdownTextFontSize: string;
78
97
  }, {
79
98
  StatusIcon: import("../../_mixins").Theme<"Icon", {
80
99
  color: string;
@@ -102,6 +121,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
102
121
  serviceMessageTextColor: string;
103
122
  serviceMessageBackgroundColor: string;
104
123
  messageTitleColor: string;
124
+ markdownQuoteBorderColorOwn: string;
125
+ markdownQuoteBorderColorOther: string;
126
+ markdownQuoteTextColor: string;
127
+ markdownQuoteBackgroundColor: string;
128
+ markdownQuoteMarkerColor: string;
129
+ markdownDividerColorOwn: string;
130
+ markdownDividerColorOther: string;
131
+ markdownH1FontSize: string;
132
+ markdownH2FontSize: string;
133
+ markdownH3FontSize: string;
134
+ markdownTextFontSize: string;
105
135
  }, {
106
136
  StatusIcon: import("../../_mixins").Theme<"Icon", {
107
137
  color: string;
@@ -129,6 +159,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
129
159
  serviceMessageTextColor: string;
130
160
  serviceMessageBackgroundColor: string;
131
161
  messageTitleColor: string;
162
+ markdownQuoteBorderColorOwn: string;
163
+ markdownQuoteBorderColorOther: string;
164
+ markdownQuoteTextColor: string;
165
+ markdownQuoteBackgroundColor: string;
166
+ markdownQuoteMarkerColor: string;
167
+ markdownDividerColorOwn: string;
168
+ markdownDividerColorOther: string;
169
+ markdownH1FontSize: string;
170
+ markdownH2FontSize: string;
171
+ markdownH3FontSize: string;
172
+ markdownTextFontSize: string;
132
173
  }, {
133
174
  StatusIcon: import("../../_mixins").Theme<"Icon", {
134
175
  color: string;
@@ -153,8 +194,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
153
194
  readonly default: MessageBubbleType.MESSAGE;
154
195
  };
155
196
  readonly serviceVariant: {
156
- readonly type: import("vue").PropType<import("./interface").MessageBubbleServiceVariant>;
157
- readonly default: import("./interface").MessageBubbleServiceVariant.SYSTEM;
197
+ readonly type: import("vue").PropType<MessageBubbleServiceVariant>;
198
+ readonly default: MessageBubbleServiceVariant.SYSTEM;
158
199
  };
159
200
  readonly id: {
160
201
  readonly type: import("vue").PropType<import("./interface").MessageBubbleId>;
@@ -172,6 +213,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
172
213
  readonly type: import("vue").PropType<MessageBubbleRenderContent>;
173
214
  readonly default: undefined;
174
215
  };
216
+ readonly markdown: {
217
+ readonly type: BooleanConstructor;
218
+ readonly default: false;
219
+ };
220
+ readonly markdownOptions: {
221
+ readonly type: import("vue").PropType<import("../../_utils/markdown").MarkdownOptions>;
222
+ readonly default: undefined;
223
+ };
175
224
  readonly timestamp: {
176
225
  readonly type: import("vue").PropType<string | number | Date | (() => VNodeChild)>;
177
226
  readonly default: undefined;
@@ -221,6 +270,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
221
270
  serviceMessageTextColor: string;
222
271
  serviceMessageBackgroundColor: string;
223
272
  messageTitleColor: string;
273
+ markdownQuoteBorderColorOwn: string;
274
+ markdownQuoteBorderColorOther: string;
275
+ markdownQuoteTextColor: string;
276
+ markdownQuoteBackgroundColor: string;
277
+ markdownQuoteMarkerColor: string;
278
+ markdownDividerColorOwn: string;
279
+ markdownDividerColorOther: string;
280
+ markdownH1FontSize: string;
281
+ markdownH2FontSize: string;
282
+ markdownH3FontSize: string;
283
+ markdownTextFontSize: string;
224
284
  }, {
225
285
  StatusIcon: import("../../_mixins").Theme<"Icon", {
226
286
  color: string;
@@ -248,6 +308,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
248
308
  serviceMessageTextColor: string;
249
309
  serviceMessageBackgroundColor: string;
250
310
  messageTitleColor: string;
311
+ markdownQuoteBorderColorOwn: string;
312
+ markdownQuoteBorderColorOther: string;
313
+ markdownQuoteTextColor: string;
314
+ markdownQuoteBackgroundColor: string;
315
+ markdownQuoteMarkerColor: string;
316
+ markdownDividerColorOwn: string;
317
+ markdownDividerColorOther: string;
318
+ markdownH1FontSize: string;
319
+ markdownH2FontSize: string;
320
+ markdownH3FontSize: string;
321
+ markdownTextFontSize: string;
251
322
  }, {
252
323
  StatusIcon: import("../../_mixins").Theme<"Icon", {
253
324
  color: string;
@@ -275,6 +346,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
275
346
  serviceMessageTextColor: string;
276
347
  serviceMessageBackgroundColor: string;
277
348
  messageTitleColor: string;
349
+ markdownQuoteBorderColorOwn: string;
350
+ markdownQuoteBorderColorOther: string;
351
+ markdownQuoteTextColor: string;
352
+ markdownQuoteBackgroundColor: string;
353
+ markdownQuoteMarkerColor: string;
354
+ markdownDividerColorOwn: string;
355
+ markdownDividerColorOther: string;
356
+ markdownH1FontSize: string;
357
+ markdownH2FontSize: string;
358
+ markdownH3FontSize: string;
359
+ markdownTextFontSize: string;
278
360
  }, {
279
361
  StatusIcon: import("../../_mixins").Theme<"Icon", {
280
362
  color: string;
@@ -293,9 +375,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
293
375
  readonly status: MessageBubbleStatus;
294
376
  readonly actions: import("./interface").MessageBubbleAction[];
295
377
  readonly onRetry: (message: MessageBubbleMessagePayload) => void;
296
- readonly serviceVariant: import("./interface").MessageBubbleServiceVariant;
378
+ readonly serviceVariant: MessageBubbleServiceVariant;
297
379
  readonly id: import("./interface").MessageBubbleId;
298
380
  readonly isOwn: boolean;
381
+ readonly markdown: boolean;
382
+ readonly markdownOptions: import("../../_utils/markdown").MarkdownOptions;
299
383
  readonly timestamp: string | number | Date | (() => VNodeChild);
300
384
  readonly attachments: MessageBubbleAttachment | MessageBubbleAttachment[];
301
385
  readonly uploadProps: Partial<import("../../upload").UploadProps>;
@@ -14,6 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const vue_1 = require("vue");
16
16
  const _mixins_1 = require("../../_mixins");
17
+ const markdown_1 = require("../../_utils/markdown");
17
18
  const dropdown_1 = require("../../dropdown");
18
19
  const icon_1 = require("../../icon");
19
20
  const typography_1 = require("../../typography");
@@ -46,8 +47,20 @@ exports.default = (0, vue_1.defineComponent)({
46
47
  status: props.status,
47
48
  attachments: normalizedAttachmentsRef.value
48
49
  }));
50
+ const markdownContent = (0, vue_1.computed)(() => {
51
+ const content = props.content;
52
+ return props.markdown && typeof content === 'string' ? content : null;
53
+ });
54
+ const markdownActive = (0, vue_1.computed)(() => markdownContent.value !== null);
55
+ const markdownHtmlRef = (0, vue_1.computed)(() => {
56
+ if (!markdownContent.value) {
57
+ return null;
58
+ }
59
+ const html = (0, markdown_1.renderMarkdown)(markdownContent.value, props.markdownOptions);
60
+ return html.length > 0 ? html : null;
61
+ });
49
62
  const cssVarsRef = (0, vue_1.computed)(() => {
50
- const { common: { cubicBezierEaseInOut }, self: { messageBubbleBackgroundColorOwn, messageBubbleBackgroundColorOther, messageBubbleTextColorOwn, messageBubbleTextColorOther, messageTimeColor, messageStatusReadColor, messageStatusSuccessColor, attachmentBackgroundColorOwn, attachmentBackgroundColorOther, messageErrorColor, messageBorderRadius, unreadNotificationBackgroundColor, unreadNotificationTextColor, serviceMessageTextColor, serviceMessageBackgroundColor, messageTitleColor } } = themeRef.value;
63
+ const { common: { cubicBezierEaseInOut }, self: { messageBubbleBackgroundColorOwn, messageBubbleBackgroundColorOther, messageBubbleTextColorOwn, messageBubbleTextColorOther, messageTimeColor, messageStatusReadColor, messageStatusSuccessColor, attachmentBackgroundColorOwn, attachmentBackgroundColorOther, messageErrorColor, messageBorderRadius, unreadNotificationBackgroundColor, unreadNotificationTextColor, serviceMessageTextColor, serviceMessageBackgroundColor, messageTitleColor, markdownQuoteBorderColorOwn, markdownQuoteBorderColorOther, markdownQuoteTextColor, markdownQuoteBackgroundColor, markdownQuoteMarkerColor, markdownDividerColorOwn, markdownDividerColorOther, markdownH1FontSize, markdownH2FontSize, markdownH3FontSize, markdownTextFontSize } } = themeRef.value;
51
64
  return {
52
65
  '--u-bezier': cubicBezierEaseInOut,
53
66
  '--u-message-bubble-background-color-own': messageBubbleBackgroundColorOwn,
@@ -65,7 +78,18 @@ exports.default = (0, vue_1.defineComponent)({
65
78
  '--u-message-bubble-unread-text-color': unreadNotificationTextColor,
66
79
  '--u-message-bubble-service-text-color': serviceMessageTextColor,
67
80
  '--u-message-bubble-service-background-color': serviceMessageBackgroundColor,
68
- '--u-message-bubble-title-color': messageTitleColor
81
+ '--u-message-bubble-title-color': messageTitleColor,
82
+ '--u-message-bubble-markdown-quote-border-color-own': markdownQuoteBorderColorOwn,
83
+ '--u-message-bubble-markdown-quote-border-color-other': markdownQuoteBorderColorOther,
84
+ '--u-message-bubble-markdown-quote-text-color': markdownQuoteTextColor,
85
+ '--u-message-bubble-markdown-quote-background-color': markdownQuoteBackgroundColor,
86
+ '--u-message-bubble-markdown-quote-marker-color': markdownQuoteMarkerColor,
87
+ '--u-message-bubble-markdown-divider-color-own': markdownDividerColorOwn,
88
+ '--u-message-bubble-markdown-divider-color-other': markdownDividerColorOther,
89
+ '--u-message-bubble-markdown-h1-font-size': markdownH1FontSize,
90
+ '--u-message-bubble-markdown-h2-font-size': markdownH2FontSize,
91
+ '--u-message-bubble-markdown-h3-font-size': markdownH3FontSize,
92
+ '--u-message-bubble-markdown-text-font-size': markdownTextFontSize
69
93
  };
70
94
  });
71
95
  const themeClassHandle = inlineThemeDisabled
@@ -189,7 +213,10 @@ exports.default = (0, vue_1.defineComponent)({
189
213
  const hasTitle = Boolean(props.title || slots.title);
190
214
  const afterContentSlot = slots.afterContent || slots['after-content'];
191
215
  const hasAfterContent = Boolean(afterContentSlot);
192
- const hasContentInsideBubble = Boolean(props.content
216
+ const hasVisibleTextContent = markdownActive.value
217
+ ? markdownHtmlRef.value !== null
218
+ : Boolean(props.content);
219
+ const hasContentInsideBubble = Boolean(hasVisibleTextContent
193
220
  || slots.default
194
221
  || hasAfterContent
195
222
  || hasTitle
@@ -204,9 +231,11 @@ exports.default = (0, vue_1.defineComponent)({
204
231
  ? slots.title(messagePayloadRef.value)
205
232
  : resolveRenderContent(props.title))),
206
233
  normalizedAttachmentsRef.value.length > 0 && renderAttachment(true),
207
- (props.content || slots.default) && ((0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-message-bubble__text` }, slots.default
208
- ? slots.default(messagePayloadRef.value)
209
- : resolveRenderContent(props.content))),
234
+ (hasVisibleTextContent || slots.default)
235
+ && (slots.default ? ((0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-message-bubble__text` }, slots.default(messagePayloadRef.value))) : markdownHtmlRef.value !== null ? ((0, vue_1.h)("div", { class: [
236
+ `${mergedClsPrefixRef.value}-message-bubble__text`,
237
+ `${mergedClsPrefixRef.value}-message-bubble__markdown`
238
+ ], innerHTML: markdownHtmlRef.value })) : ((0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-message-bubble__text` }, resolveRenderContent(props.content)))),
210
239
  hasAfterContent && ((0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-message-bubble__after-content` }, afterContentSlot === null || afterContentSlot === void 0 ? void 0 : afterContentSlot(messagePayloadRef.value))))) : normalizedAttachmentsRef.value.length === 1 ? (renderAttachment()) : null;
211
240
  return ((0, vue_1.h)("div", { class: [
212
241
  `${mergedClsPrefixRef.value}-message-bubble__message`,
@@ -261,10 +290,15 @@ exports.default = (0, vue_1.defineComponent)({
261
290
  if (slots.service) {
262
291
  return slots.service(props.serviceVariant);
263
292
  }
293
+ const isMarkdownEligibleVariant = props.serviceVariant === interface_1.MessageBubbleServiceVariant.SYSTEM
294
+ || props.serviceVariant === interface_1.MessageBubbleServiceVariant.EVENT;
295
+ const displayMarkdown = markdownActive.value && isMarkdownEligibleVariant;
264
296
  return ((0, vue_1.h)("div", { class: [
265
297
  `${mergedClsPrefixRef.value}-message-bubble__service`,
266
298
  `${mergedClsPrefixRef.value}-message-bubble__service--${props.serviceVariant}`
267
- ] }, props.content && (0, vue_1.h)("span", null, resolveRenderContent(props.content))));
299
+ ] }, displayMarkdown
300
+ ? markdownHtmlRef.value && ((0, vue_1.h)("span", { class: `${mergedClsPrefixRef.value}-message-bubble__markdown`, innerHTML: markdownHtmlRef.value }))
301
+ : props.content && ((0, vue_1.h)("span", null, resolveRenderContent(props.content)))));
268
302
  };
269
303
  return {
270
304
  mergedClsPrefixRef,
@@ -1,5 +1,6 @@
1
1
  import type { Component, PropType, VNodeChild } from 'vue';
2
2
  import type { ExtractPublicPropTypes } from '../../_utils';
3
+ import type { MarkdownOptions } from '../../_utils/markdown';
3
4
  import type { UploadFileInfo, UploadProps } from '../../upload';
4
5
  export declare enum MessageBubbleType {
5
6
  MESSAGE = "message",
@@ -90,6 +91,14 @@ export declare const messageBubbleProps: {
90
91
  readonly type: PropType<MessageBubbleRenderContent>;
91
92
  readonly default: undefined;
92
93
  };
94
+ readonly markdown: {
95
+ readonly type: BooleanConstructor;
96
+ readonly default: false;
97
+ };
98
+ readonly markdownOptions: {
99
+ readonly type: PropType<MarkdownOptions>;
100
+ readonly default: undefined;
101
+ };
93
102
  readonly timestamp: {
94
103
  readonly type: PropType<string | number | Date | (() => VNodeChild)>;
95
104
  readonly default: undefined;
@@ -139,6 +148,17 @@ export declare const messageBubbleProps: {
139
148
  serviceMessageTextColor: string;
140
149
  serviceMessageBackgroundColor: string;
141
150
  messageTitleColor: string;
151
+ markdownQuoteBorderColorOwn: string;
152
+ markdownQuoteBorderColorOther: string;
153
+ markdownQuoteTextColor: string;
154
+ markdownQuoteBackgroundColor: string;
155
+ markdownQuoteMarkerColor: string;
156
+ markdownDividerColorOwn: string;
157
+ markdownDividerColorOther: string;
158
+ markdownH1FontSize: string;
159
+ markdownH2FontSize: string;
160
+ markdownH3FontSize: string;
161
+ markdownTextFontSize: string;
142
162
  }, {
143
163
  StatusIcon: import("../../_mixins").Theme<"Icon", {
144
164
  color: string;
@@ -166,6 +186,17 @@ export declare const messageBubbleProps: {
166
186
  serviceMessageTextColor: string;
167
187
  serviceMessageBackgroundColor: string;
168
188
  messageTitleColor: string;
189
+ markdownQuoteBorderColorOwn: string;
190
+ markdownQuoteBorderColorOther: string;
191
+ markdownQuoteTextColor: string;
192
+ markdownQuoteBackgroundColor: string;
193
+ markdownQuoteMarkerColor: string;
194
+ markdownDividerColorOwn: string;
195
+ markdownDividerColorOther: string;
196
+ markdownH1FontSize: string;
197
+ markdownH2FontSize: string;
198
+ markdownH3FontSize: string;
199
+ markdownTextFontSize: string;
169
200
  }, {
170
201
  StatusIcon: import("../../_mixins").Theme<"Icon", {
171
202
  color: string;
@@ -193,6 +224,17 @@ export declare const messageBubbleProps: {
193
224
  serviceMessageTextColor: string;
194
225
  serviceMessageBackgroundColor: string;
195
226
  messageTitleColor: string;
227
+ markdownQuoteBorderColorOwn: string;
228
+ markdownQuoteBorderColorOther: string;
229
+ markdownQuoteTextColor: string;
230
+ markdownQuoteBackgroundColor: string;
231
+ markdownQuoteMarkerColor: string;
232
+ markdownDividerColorOwn: string;
233
+ markdownDividerColorOther: string;
234
+ markdownH1FontSize: string;
235
+ markdownH2FontSize: string;
236
+ markdownH3FontSize: string;
237
+ markdownTextFontSize: string;
196
238
  }, {
197
239
  StatusIcon: import("../../_mixins").Theme<"Icon", {
198
240
  color: string;
@@ -53,6 +53,12 @@ exports.messageBubbleProps = Object.assign(Object.assign({}, _mixins_1.useTheme.
53
53
  }, content: {
54
54
  type: [String, Function],
55
55
  default: undefined
56
+ }, markdown: {
57
+ type: Boolean,
58
+ default: false
59
+ }, markdownOptions: {
60
+ type: Object,
61
+ default: undefined
56
62
  }, timestamp: {
57
63
  type: [String, Number, Date, Function],
58
64
  default: undefined
@@ -22,6 +22,17 @@ const cssr_1 = require("../../../_utils/cssr");
22
22
  // --u-message-bubble-service-text-color
23
23
  // --u-message-bubble-service-background-color
24
24
  // --u-message-bubble-title-color
25
+ // --u-message-bubble-markdown-quote-border-color-own
26
+ // --u-message-bubble-markdown-quote-border-color-other
27
+ // --u-message-bubble-markdown-quote-text-color
28
+ // --u-message-bubble-markdown-quote-background-color
29
+ // --u-message-bubble-markdown-quote-marker-color
30
+ // --u-message-bubble-markdown-divider-color-own
31
+ // --u-message-bubble-markdown-divider-color-other
32
+ // --u-message-bubble-markdown-h1-font-size
33
+ // --u-message-bubble-markdown-h2-font-size
34
+ // --u-message-bubble-markdown-h3-font-size
35
+ // --u-message-bubble-markdown-text-font-size
25
36
  exports.default = (0, cssr_1.cB)('message-bubble', `
26
37
  box-sizing: border-box;
27
38
  width: 100%;
@@ -57,17 +68,40 @@ exports.default = (0, cssr_1.cB)('message-bubble', `
57
68
  flex-direction: column;
58
69
  padding: 12px;
59
70
  gap: 12px;
71
+ --u-message-bubble-markdown-quote-border-color: var(--u-message-bubble-markdown-quote-border-color-other);
72
+ --u-message-bubble-markdown-divider-color: var(--u-message-bubble-markdown-divider-color-other);
60
73
  `, [(0, cssr_1.cM)('own', `
61
74
  background-color: var(--u-message-bubble-background-color-own);
62
75
  color: var(--u-message-bubble-text-color-own);
63
76
  border-bottom-left-radius: var(--u-message-bubble-border-radius);
64
77
  border-bottom-right-radius: 6px;
78
+ --u-message-bubble-markdown-quote-border-color: var(--u-message-bubble-markdown-quote-border-color-own);
79
+ --u-message-bubble-markdown-divider-color: var(--u-message-bubble-markdown-divider-color-own);
65
80
  `)]), (0, cssr_1.cE)('title', `
66
81
  color: var(--u-message-bubble-title-color);
67
82
  white-space: pre-wrap;
68
83
  `), (0, cssr_1.cE)('text', `
69
84
  white-space: pre-wrap;
70
- `), (0, cssr_1.cE)('after-content', `
85
+ `), (0, cssr_1.cE)('markdown', `
86
+ white-space: normal;
87
+ font-size: var(--u-message-bubble-markdown-text-font-size);
88
+ `, [(0, cssr_1.c)('h1', 'font-size: var(--u-message-bubble-markdown-h1-font-size);'), (0, cssr_1.c)('h2', 'font-size: var(--u-message-bubble-markdown-h2-font-size);'), (0, cssr_1.c)('h3', 'font-size: var(--u-message-bubble-markdown-h3-font-size);'), (0, cssr_1.c)('ul, ol', 'list-style-position: inside;'), (0, cssr_1.c)('blockquote', `
89
+ position: relative;
90
+ border-radius: 4px;
91
+ padding: 0 8px;
92
+ margin: 0;
93
+ background-color: var(--u-message-bubble-markdown-quote-background-color);
94
+ color: var(--u-message-bubble-markdown-quote-text-color);
95
+ `, [(0, cssr_1.c)('&::before', `
96
+ content: "";
97
+ width: 2px;
98
+ position: absolute;
99
+ left: 2px;
100
+ top: 2px;
101
+ bottom: 2px;
102
+ border-radius: 30px;
103
+ background-color: var(--u-message-bubble-markdown-quote-marker-color);
104
+ `)]), (0, cssr_1.c)('& > *:first-child', 'margin-top: 0;'), (0, cssr_1.c)('& > *:last-child', 'margin-bottom: 0;')]), (0, cssr_1.cE)('after-content', `
71
105
  white-space: normal;
72
106
  `), (0, cssr_1.cE)('meta', `
73
107
  display: flex;
@@ -15,6 +15,17 @@ declare const messageBubbleDark: import("../../_mixins").Theme<"MessageBubble",
15
15
  serviceMessageTextColor: string;
16
16
  serviceMessageBackgroundColor: string;
17
17
  messageTitleColor: string;
18
+ markdownQuoteBorderColorOwn: string;
19
+ markdownQuoteBorderColorOther: string;
20
+ markdownQuoteTextColor: string;
21
+ markdownQuoteBackgroundColor: string;
22
+ markdownQuoteMarkerColor: string;
23
+ markdownDividerColorOwn: string;
24
+ markdownDividerColorOther: string;
25
+ markdownH1FontSize: string;
26
+ markdownH2FontSize: string;
27
+ markdownH3FontSize: string;
28
+ markdownTextFontSize: string;
18
29
  }, {
19
30
  StatusIcon: import("../../_mixins").Theme<"Icon", {
20
31
  color: string;
@@ -16,6 +16,17 @@ export declare function self(vars: ThemeCommonVars): {
16
16
  serviceMessageTextColor: string;
17
17
  serviceMessageBackgroundColor: string;
18
18
  messageTitleColor: string;
19
+ markdownQuoteBorderColorOwn: string;
20
+ markdownQuoteBorderColorOther: string;
21
+ markdownQuoteTextColor: string;
22
+ markdownQuoteBackgroundColor: string;
23
+ markdownQuoteMarkerColor: string;
24
+ markdownDividerColorOwn: string;
25
+ markdownDividerColorOther: string;
26
+ markdownH1FontSize: string;
27
+ markdownH2FontSize: string;
28
+ markdownH3FontSize: string;
29
+ markdownTextFontSize: string;
19
30
  };
20
31
  declare const messageBubbleLight: import("../../_mixins").Theme<"MessageBubble", {
21
32
  messageBubbleBackgroundColorOwn: string;
@@ -34,6 +45,17 @@ declare const messageBubbleLight: import("../../_mixins").Theme<"MessageBubble",
34
45
  serviceMessageTextColor: string;
35
46
  serviceMessageBackgroundColor: string;
36
47
  messageTitleColor: string;
48
+ markdownQuoteBorderColorOwn: string;
49
+ markdownQuoteBorderColorOther: string;
50
+ markdownQuoteTextColor: string;
51
+ markdownQuoteBackgroundColor: string;
52
+ markdownQuoteMarkerColor: string;
53
+ markdownDividerColorOwn: string;
54
+ markdownDividerColorOther: string;
55
+ markdownH1FontSize: string;
56
+ markdownH2FontSize: string;
57
+ markdownH3FontSize: string;
58
+ markdownTextFontSize: string;
37
59
  }, {
38
60
  StatusIcon: import("../../_mixins").Theme<"Icon", {
39
61
  color: string;
@@ -5,7 +5,7 @@ const _mixins_1 = require("../../_mixins");
5
5
  const common_1 = require("../../_styles/common");
6
6
  const styles_1 = require("../../icon/styles");
7
7
  function self(vars) {
8
- const { borderRadiusLarge, elementsSecondary, elementsTertiary, textPrimary, textSecondary, textTertiary, brandPrimary400, staticGreen, staticRed, staticWhite } = vars;
8
+ const { borderRadiusLarge, elementsSecondary, elementsTertiary, textPrimary, textSecondary, textTertiary, brandPrimary100, brandPrimary400, brandPrimary500, staticGreen, staticRed, staticWhite } = vars;
9
9
  return {
10
10
  messageBubbleBackgroundColorOwn: elementsTertiary,
11
11
  messageBubbleBackgroundColorOther: elementsTertiary,
@@ -22,7 +22,18 @@ function self(vars) {
22
22
  unreadNotificationTextColor: elementsSecondary,
23
23
  serviceMessageTextColor: textSecondary,
24
24
  serviceMessageBackgroundColor: 'transparent',
25
- messageTitleColor: textPrimary
25
+ messageTitleColor: textPrimary,
26
+ markdownQuoteBorderColorOwn: textPrimary,
27
+ markdownQuoteBorderColorOther: textPrimary,
28
+ markdownQuoteTextColor: textPrimary,
29
+ markdownQuoteBackgroundColor: brandPrimary100,
30
+ markdownQuoteMarkerColor: brandPrimary500,
31
+ markdownDividerColorOwn: textPrimary,
32
+ markdownDividerColorOther: textPrimary,
33
+ markdownH1FontSize: '20px',
34
+ markdownH2FontSize: '18px',
35
+ markdownH3FontSize: '16px',
36
+ markdownTextFontSize: '14px'
26
37
  };
27
38
  }
28
39
  const messageBubbleLight = (0, _mixins_1.createTheme)({
package/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "2.3.5";
1
+ declare const _default: "2.3.7";
2
2
  export default _default;
package/lib/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = '2.3.5';
3
+ exports.default = '2.3.7';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uzum-tech/ui",
3
- "version": "2.3.5",
3
+ "version": "2.3.7",
4
4
  "packageManager": "pnpm@10.33.0",
5
5
  "description": "A Vue 3 Component Library. Fairly Complete, Theme Customizable, Uses TypeScript, Fast",
6
6
  "author": {
@@ -116,6 +116,7 @@
116
116
  "highlight.js": "11.11.1",
117
117
  "lodash": "4.18.1",
118
118
  "lodash-es": "4.18.1",
119
+ "markdown-it": "15.0.0",
119
120
  "seemly": "0.3.10",
120
121
  "treemate": "0.3.11",
121
122
  "vdirs": "0.1.8",