@uzum-tech/ui 2.4.6 → 2.4.8
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 +320 -91
- package/dist/index.mjs +320 -91
- package/dist/index.prod.js +2 -2
- package/dist/index.prod.mjs +3 -3
- package/es/chat/src/styles/index.cssr.mjs +1 -1
- package/es/components.d.ts +99 -10
- package/es/dynamic-tags/index.d.ts +3 -3
- package/es/dynamic-tags/index.mjs +2 -1
- package/es/dynamic-tags/src/DynamicTags.d.ts +74 -1177
- package/es/dynamic-tags/src/DynamicTags.mjs +150 -107
- package/es/dynamic-tags/src/interface.d.ts +1146 -6
- package/es/dynamic-tags/src/interface.mjs +34 -1
- package/es/dynamic-tags/src/styles/index.cssr.mjs +35 -3
- package/es/dynamic-tags/styles/dark.mjs +4 -2
- package/es/dynamic-tags/styles/light.d.ts +2 -0
- package/es/dynamic-tags/styles/light.mjs +4 -2
- package/es/editor/index.d.ts +1 -1
- package/es/editor/src/Editor.d.ts +21 -0
- package/es/editor/src/Editor.mjs +5 -2
- package/es/editor/src/EditorParts/EditorContent/EditorContent.d.ts +27 -0
- package/es/editor/src/EditorParts/EditorContent/EditorContent.mjs +37 -3
- package/es/editor/src/EditorParts/EditorContent/interface.d.ts +11 -0
- package/es/editor/src/EditorParts/EditorContent/interface.mjs +2 -0
- package/es/editor/src/EditorParts/EditorToolbar/EditorToolbar.d.ts +18 -0
- package/es/editor/src/EditorParts/EditorToolbar/interface.d.ts +9 -0
- package/es/editor/src/composables/use-editor-css-vars.mjs +8 -2
- package/es/editor/src/extensions.d.ts +2 -1
- package/es/editor/src/extensions.mjs +34 -4
- package/es/editor/src/interface.d.ts +22 -2
- package/es/editor/src/interface.mjs +1 -0
- package/es/editor/src/styles/index.cssr.mjs +21 -4
- package/es/editor/styles/dark.d.ts +3 -0
- package/es/editor/styles/light.d.ts +6 -0
- package/es/editor/styles/light.mjs +6 -1
- package/es/message-bubble/src/styles/index.cssr.mjs +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/lib/chat/src/styles/index.cssr.js +1 -1
- package/lib/components.d.ts +99 -10
- package/lib/dynamic-tags/index.d.ts +3 -3
- package/lib/dynamic-tags/index.js +3 -2
- package/lib/dynamic-tags/src/DynamicTags.d.ts +74 -1177
- package/lib/dynamic-tags/src/DynamicTags.js +142 -77
- package/lib/dynamic-tags/src/interface.d.ts +1146 -6
- package/lib/dynamic-tags/src/interface.js +24 -0
- package/lib/dynamic-tags/src/styles/index.cssr.js +34 -2
- package/lib/dynamic-tags/styles/dark.js +4 -2
- package/lib/dynamic-tags/styles/light.d.ts +2 -0
- package/lib/dynamic-tags/styles/light.js +4 -2
- package/lib/editor/index.d.ts +1 -1
- package/lib/editor/src/Editor.d.ts +21 -0
- package/lib/editor/src/Editor.js +4 -2
- package/lib/editor/src/EditorParts/EditorContent/EditorContent.d.ts +27 -0
- package/lib/editor/src/EditorParts/EditorContent/EditorContent.js +30 -3
- package/lib/editor/src/EditorParts/EditorContent/interface.d.ts +11 -0
- package/lib/editor/src/EditorParts/EditorContent/interface.js +1 -1
- package/lib/editor/src/EditorParts/EditorToolbar/EditorToolbar.d.ts +18 -0
- package/lib/editor/src/EditorParts/EditorToolbar/interface.d.ts +9 -0
- package/lib/editor/src/composables/use-editor-css-vars.js +5 -2
- package/lib/editor/src/extensions.d.ts +2 -1
- package/lib/editor/src/extensions.js +41 -5
- package/lib/editor/src/interface.d.ts +22 -2
- package/lib/editor/src/interface.js +1 -1
- package/lib/editor/src/styles/index.cssr.js +21 -4
- package/lib/editor/styles/dark.d.ts +3 -0
- package/lib/editor/styles/light.d.ts +6 -0
- package/lib/editor/styles/light.js +5 -2
- package/lib/message-bubble/src/styles/index.cssr.js +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +31 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Extensions } from '@tiptap/core';
|
|
2
2
|
import type { Editor } from '@tiptap/vue-3';
|
|
3
3
|
import type { MarkdownSerializer, MarkdownSerializerState } from 'prosemirror-markdown';
|
|
4
|
-
import type { HTMLAttributes, PropType, Ref, UnwrapRef, VNodeChild } from 'vue';
|
|
4
|
+
import type { HTMLAttributes, PropType, Ref, UnwrapRef, VNode, VNodeChild } from 'vue';
|
|
5
5
|
import type { MergedTheme } from '../../_mixins/use-theme';
|
|
6
6
|
import type { ExtractPublicPropTypes, MaybeArray } from '../../_utils';
|
|
7
7
|
import type { MarkdownOptions } from '../../_utils/markdown';
|
|
@@ -18,12 +18,15 @@ export interface CreateEditorExtensionsOptions {
|
|
|
18
18
|
markdownOptions?: MarkdownOptions;
|
|
19
19
|
extensions?: Extensions;
|
|
20
20
|
nodeProps?: EditorNodeProps;
|
|
21
|
-
maxLength?: number;
|
|
21
|
+
maxLength?: number | (() => number | undefined);
|
|
22
22
|
onSendShortcut?: VoidFunction;
|
|
23
23
|
}
|
|
24
24
|
export interface SendShortcutOptions {
|
|
25
25
|
onSend: VoidFunction | null;
|
|
26
26
|
}
|
|
27
|
+
export interface CharacterLimitOptions {
|
|
28
|
+
getLimit: () => number | undefined;
|
|
29
|
+
}
|
|
27
30
|
export interface MarkdownPasteOptions {
|
|
28
31
|
markdownOptions?: MarkdownOptions;
|
|
29
32
|
}
|
|
@@ -31,6 +34,11 @@ export interface EditorSlots {
|
|
|
31
34
|
toolbar?: () => VNodeChild;
|
|
32
35
|
content?: () => VNodeChild;
|
|
33
36
|
sendIcon?: () => VNodeChild;
|
|
37
|
+
count?: (props: EditorCountSlotProps) => VNode[];
|
|
38
|
+
}
|
|
39
|
+
export interface EditorCountSlotProps {
|
|
40
|
+
count: number;
|
|
41
|
+
maxLength: number | undefined;
|
|
34
42
|
}
|
|
35
43
|
export interface MarkdownSerializerStateOptions {
|
|
36
44
|
tightLists?: boolean;
|
|
@@ -82,6 +90,8 @@ export declare const editorInjectionKey: import("vue").InjectionKey<{
|
|
|
82
90
|
contentPropsRef: Ref<HTMLAttributes | undefined>;
|
|
83
91
|
maxRowsRef: Ref<number | undefined>;
|
|
84
92
|
showSendButtonRef: Ref<boolean>;
|
|
93
|
+
showCountRef: Ref<boolean>;
|
|
94
|
+
maxLengthRef: Ref<number | undefined>;
|
|
85
95
|
sendDisabledRef: Ref<boolean>;
|
|
86
96
|
sendTooltipRef: Ref<string>;
|
|
87
97
|
disabledRef: Ref<boolean>;
|
|
@@ -122,6 +132,7 @@ export declare const editorProps: {
|
|
|
122
132
|
readonly autofocus: BooleanConstructor;
|
|
123
133
|
readonly maxLength: NumberConstructor;
|
|
124
134
|
readonly maxRows: NumberConstructor;
|
|
135
|
+
readonly showCount: BooleanConstructor;
|
|
125
136
|
readonly toolbarButtonProps: PropType<Partial<ButtonProps>>;
|
|
126
137
|
readonly toolbarIconProps: PropType<Partial<IconProps>>;
|
|
127
138
|
readonly toolbarDropdownProps: PropType<Partial<SelectProps>>;
|
|
@@ -186,6 +197,9 @@ export declare const editorProps: {
|
|
|
186
197
|
markdownH2LineHeight: string;
|
|
187
198
|
markdownH3LineHeight: string;
|
|
188
199
|
markdownTextLineHeight: string;
|
|
200
|
+
countTextColor: string;
|
|
201
|
+
countFontSize: string;
|
|
202
|
+
countLineHeight: string;
|
|
189
203
|
}, {
|
|
190
204
|
Button: import("../../_mixins").Theme<"Button", {
|
|
191
205
|
heightTiny: string;
|
|
@@ -821,6 +835,9 @@ export declare const editorProps: {
|
|
|
821
835
|
markdownH2LineHeight: string;
|
|
822
836
|
markdownH3LineHeight: string;
|
|
823
837
|
markdownTextLineHeight: string;
|
|
838
|
+
countTextColor: string;
|
|
839
|
+
countFontSize: string;
|
|
840
|
+
countLineHeight: string;
|
|
824
841
|
}, {
|
|
825
842
|
Button: import("../../_mixins").Theme<"Button", {
|
|
826
843
|
heightTiny: string;
|
|
@@ -1456,6 +1473,9 @@ export declare const editorProps: {
|
|
|
1456
1473
|
markdownH2LineHeight: string;
|
|
1457
1474
|
markdownH3LineHeight: string;
|
|
1458
1475
|
markdownTextLineHeight: string;
|
|
1476
|
+
countTextColor: string;
|
|
1477
|
+
countFontSize: string;
|
|
1478
|
+
countLineHeight: string;
|
|
1459
1479
|
}, {
|
|
1460
1480
|
Button: import("../../_mixins").Theme<"Button", {
|
|
1461
1481
|
heightTiny: string;
|
|
@@ -16,7 +16,7 @@ exports.editorProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props),
|
|
|
16
16
|
}, sendOnEnter: {
|
|
17
17
|
type: Boolean,
|
|
18
18
|
default: true
|
|
19
|
-
}, disabled: Boolean, readonly: Boolean, autofocus: Boolean, maxLength: Number, maxRows: Number, toolbarButtonProps: Object, toolbarIconProps: Object, toolbarDropdownProps: Object, sendButtonProps: Object, sendIconProps: Object, contentProps: Object, extensions: {
|
|
19
|
+
}, disabled: Boolean, readonly: Boolean, autofocus: Boolean, maxLength: Number, maxRows: Number, showCount: Boolean, toolbarButtonProps: Object, toolbarIconProps: Object, toolbarDropdownProps: Object, sendButtonProps: Object, sendIconProps: Object, contentProps: Object, extensions: {
|
|
20
20
|
type: Array,
|
|
21
21
|
default: () => []
|
|
22
22
|
}, nodeProps: Object, onSend: [Function, Array], onFocus: [Function, Array], onBlur: [Function, Array], 'onUpdate:value': [Function, Array], onUpdateValue: [Function, Array] });
|
|
@@ -44,6 +44,9 @@ const cssr_1 = require("../../../_utils/cssr");
|
|
|
44
44
|
// --u-editor-markdown-h2-line-height
|
|
45
45
|
// --u-editor-markdown-h3-line-height
|
|
46
46
|
// --u-editor-markdown-text-line-height
|
|
47
|
+
// --u-editor-count-text-color
|
|
48
|
+
// --u-editor-count-font-size
|
|
49
|
+
// --u-editor-count-line-height
|
|
47
50
|
exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('editor', `
|
|
48
51
|
box-sizing: border-box;
|
|
49
52
|
display: flex;
|
|
@@ -61,7 +64,11 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('editor', `
|
|
|
61
64
|
margin: 0;
|
|
62
65
|
`), (0, cssr_1.cE)('toolbar-block-type', `
|
|
63
66
|
width: 71px;
|
|
64
|
-
`)]), (0, cssr_1.cE)('
|
|
67
|
+
`)]), (0, cssr_1.cE)('body', `
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
gap: 4px;
|
|
71
|
+
`), (0, cssr_1.cE)('content-wrapper', `
|
|
65
72
|
position: relative;
|
|
66
73
|
box-sizing: border-box;
|
|
67
74
|
display: flex;
|
|
@@ -83,7 +90,14 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('editor', `
|
|
|
83
90
|
right: 6px;
|
|
84
91
|
top: 6px;
|
|
85
92
|
flex-shrink: 0;
|
|
86
|
-
`)]), (0, cssr_1.cE)('
|
|
93
|
+
`)]), (0, cssr_1.cE)('count', `
|
|
94
|
+
align-self: flex-end;
|
|
95
|
+
font-size: var(--u-editor-count-font-size);
|
|
96
|
+
line-height: var(--u-editor-count-line-height);
|
|
97
|
+
color: var(--u-editor-count-text-color);
|
|
98
|
+
white-space: nowrap;
|
|
99
|
+
padding-right: 10px;
|
|
100
|
+
`), (0, cssr_1.cE)('content', `
|
|
87
101
|
white-space: normal;
|
|
88
102
|
width: 100%;
|
|
89
103
|
min-width: 0;
|
|
@@ -91,7 +105,7 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('editor', `
|
|
|
91
105
|
color: var(--u-editor-content-text-color);
|
|
92
106
|
font-size: var(--u-editor-markdown-text-font-size);
|
|
93
107
|
line-height: var(--u-editor-markdown-text-line-height);
|
|
94
|
-
|
|
108
|
+
overflow-wrap: anywhere;
|
|
95
109
|
`, [(0, cssr_1.cM)('scrollable', `
|
|
96
110
|
overflow-y: auto;
|
|
97
111
|
scrollbar-width: none;
|
|
@@ -99,7 +113,10 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('editor', `
|
|
|
99
113
|
width: 0;
|
|
100
114
|
height: 0;
|
|
101
115
|
display: none;
|
|
102
|
-
`)]), (0, cssr_1.cE)('editable',
|
|
116
|
+
`)]), (0, cssr_1.cE)('editable', `
|
|
117
|
+
outline: none;
|
|
118
|
+
overflow-wrap: anywhere;
|
|
119
|
+
`, [(0, cssr_1.c)('.is-editor-empty:first-child::before', `
|
|
103
120
|
content: attr(data-placeholder);
|
|
104
121
|
float: left;
|
|
105
122
|
height: 0;
|
|
@@ -46,6 +46,9 @@ declare const editorDark: import("../../_mixins").Theme<"Editor", {
|
|
|
46
46
|
markdownH2LineHeight: string;
|
|
47
47
|
markdownH3LineHeight: string;
|
|
48
48
|
markdownTextLineHeight: string;
|
|
49
|
+
countTextColor: string;
|
|
50
|
+
countFontSize: string;
|
|
51
|
+
countLineHeight: string;
|
|
49
52
|
}, {
|
|
50
53
|
Button: import("../../_mixins").Theme<"Button", {
|
|
51
54
|
heightTiny: string;
|
|
@@ -47,6 +47,9 @@ export declare function self(vars: ThemeCommonVars): {
|
|
|
47
47
|
markdownH2LineHeight: string;
|
|
48
48
|
markdownH3LineHeight: string;
|
|
49
49
|
markdownTextLineHeight: string;
|
|
50
|
+
countTextColor: string;
|
|
51
|
+
countFontSize: string;
|
|
52
|
+
countLineHeight: string;
|
|
50
53
|
};
|
|
51
54
|
declare const editorLight: import("../../_mixins").Theme<"Editor", {
|
|
52
55
|
backgroundColor: string;
|
|
@@ -96,6 +99,9 @@ declare const editorLight: import("../../_mixins").Theme<"Editor", {
|
|
|
96
99
|
markdownH2LineHeight: string;
|
|
97
100
|
markdownH3LineHeight: string;
|
|
98
101
|
markdownTextLineHeight: string;
|
|
102
|
+
countTextColor: string;
|
|
103
|
+
countFontSize: string;
|
|
104
|
+
countLineHeight: string;
|
|
99
105
|
}, {
|
|
100
106
|
Button: import("../../_mixins").Theme<"Button", {
|
|
101
107
|
heightTiny: string;
|
|
@@ -9,7 +9,7 @@ const styles_3 = require("../../icon/styles");
|
|
|
9
9
|
const styles_4 = require("../../select/styles");
|
|
10
10
|
const styles_5 = require("../../tooltip/styles");
|
|
11
11
|
function self(vars) {
|
|
12
|
-
const { borderRadiusLarge, containerSecondary, fontBodyMedium, heightMini, iconMedium, iconSmall, lineHeightTitleMedium, lineHeightTitleSmall, lineHeightBodyLarge, lineHeightBodyMedium, surfacePrimary, elementsQuaternary, elementsQuinary, textPrimary, textTertiary, brandPrimary100, brandPrimary400, brandPrimary500 } = vars;
|
|
12
|
+
const { borderRadiusLarge, containerSecondary, fontBodyMedium, heightMini, iconMedium, iconSmall, lineHeightTitleMedium, lineHeightTitleSmall, lineHeightBodyLarge, lineHeightBodyMedium, fontBodySmall, lineHeightBodySmall, surfacePrimary, elementsQuaternary, elementsQuinary, textPrimary, textTertiary, brandPrimary100, brandPrimary400, brandPrimary500 } = vars;
|
|
13
13
|
return {
|
|
14
14
|
backgroundColor: surfacePrimary,
|
|
15
15
|
borderColor: elementsQuaternary,
|
|
@@ -57,7 +57,10 @@ function self(vars) {
|
|
|
57
57
|
markdownH1LineHeight: lineHeightTitleMedium,
|
|
58
58
|
markdownH2LineHeight: lineHeightTitleSmall,
|
|
59
59
|
markdownH3LineHeight: lineHeightBodyLarge,
|
|
60
|
-
markdownTextLineHeight: lineHeightBodyMedium
|
|
60
|
+
markdownTextLineHeight: lineHeightBodyMedium,
|
|
61
|
+
countTextColor: textTertiary,
|
|
62
|
+
countFontSize: fontBodySmall,
|
|
63
|
+
countLineHeight: lineHeightBodySmall
|
|
61
64
|
};
|
|
62
65
|
}
|
|
63
66
|
const editorLight = (0, _mixins_1.createTheme)({
|
|
@@ -60,7 +60,7 @@ exports.default = (0, cssr_1.cB)('message-bubble', `
|
|
|
60
60
|
border-radius: var(--u-message-bubble-border-radius);
|
|
61
61
|
font-size: 14px;
|
|
62
62
|
line-height: 20px;
|
|
63
|
-
|
|
63
|
+
overflow-wrap: anywhere;
|
|
64
64
|
background-color: var(--u-message-bubble-background-color-other);
|
|
65
65
|
color: var(--u-message-bubble-text-color-other);
|
|
66
66
|
border-bottom-left-radius: 6px;
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "2.4.
|
|
1
|
+
declare const _default: "2.4.8";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
package/web-types.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
4
|
"name": "@uzum-tech/ui",
|
|
5
|
-
"version": "2.4.
|
|
5
|
+
"version": "2.4.8",
|
|
6
6
|
"js-types-syntax": "typescript",
|
|
7
7
|
"contributions": {
|
|
8
8
|
"html": {
|
|
@@ -5397,6 +5397,16 @@
|
|
|
5397
5397
|
"description": "Whether the tag is disabled.",
|
|
5398
5398
|
"default": "false"
|
|
5399
5399
|
},
|
|
5400
|
+
{
|
|
5401
|
+
"name": "draggable",
|
|
5402
|
+
"doc-url": "https://uzum-ui.kapitalbank.uz/en-US/os-theme/components/dynamic-tags",
|
|
5403
|
+
"type": "boolean",
|
|
5404
|
+
"description": "Whether tags can be reordered by drag and drop. Doesn't work when `disabled`. With `render-tag`, each custom tag is wrapped in a `div` that receives the drag handlers.",
|
|
5405
|
+
"default": "false",
|
|
5406
|
+
"description-sections": {
|
|
5407
|
+
"since": "2.4.8"
|
|
5408
|
+
}
|
|
5409
|
+
},
|
|
5400
5410
|
{
|
|
5401
5411
|
"name": "input-props",
|
|
5402
5412
|
"doc-url": "https://uzum-ui.kapitalbank.uz/en-US/os-theme/components/dynamic-tags",
|
|
@@ -5540,6 +5550,15 @@
|
|
|
5540
5550
|
"description-sections": {
|
|
5541
5551
|
"since": "2.4.0"
|
|
5542
5552
|
}
|
|
5553
|
+
},
|
|
5554
|
+
{
|
|
5555
|
+
"name": "count",
|
|
5556
|
+
"doc-url": "https://uzum-ui.kapitalbank.uz/en-US/os-theme/components/editor",
|
|
5557
|
+
"type": "{ count: number, maxLength: number | undefined }",
|
|
5558
|
+
"description": "Replaces the content of the counter shown by `show-count`.",
|
|
5559
|
+
"description-sections": {
|
|
5560
|
+
"since": "2.4.7"
|
|
5561
|
+
}
|
|
5543
5562
|
}
|
|
5544
5563
|
],
|
|
5545
5564
|
"attributes": [],
|
|
@@ -5608,7 +5627,7 @@
|
|
|
5608
5627
|
"name": "max-length",
|
|
5609
5628
|
"doc-url": "https://uzum-ui.kapitalbank.uz/en-US/os-theme/components/editor",
|
|
5610
5629
|
"type": "number",
|
|
5611
|
-
"description": "Caps the **visible text**, not the Markdown
|
|
5630
|
+
"description": "Caps the **visible text**, not the Markdown, the same way `u-input` does: typing past it is blocked and a paste is cut to fit, while a `value` set from the outside is kept as is even if it is longer.",
|
|
5612
5631
|
"default": "undefined",
|
|
5613
5632
|
"description-sections": {
|
|
5614
5633
|
"since": "2.4.0"
|
|
@@ -5624,6 +5643,16 @@
|
|
|
5624
5643
|
"since": "2.4.0"
|
|
5625
5644
|
}
|
|
5626
5645
|
},
|
|
5646
|
+
{
|
|
5647
|
+
"name": "show-count",
|
|
5648
|
+
"doc-url": "https://uzum-ui.kapitalbank.uz/en-US/os-theme/components/editor",
|
|
5649
|
+
"type": "boolean",
|
|
5650
|
+
"description": "Shows a character counter of the **visible text**, not the Markdown, under the input area. Renders as `count / max-length` when `max-length` is set.",
|
|
5651
|
+
"default": "false",
|
|
5652
|
+
"description-sections": {
|
|
5653
|
+
"since": "2.4.7"
|
|
5654
|
+
}
|
|
5655
|
+
},
|
|
5627
5656
|
{
|
|
5628
5657
|
"name": "show-send-button",
|
|
5629
5658
|
"doc-url": "https://uzum-ui.kapitalbank.uz/en-US/os-theme/components/editor",
|