@uzum-tech/ui 2.4.6 → 2.4.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.
- package/dist/index.js +109 -19
- package/dist/index.mjs +109 -19
- package/dist/index.prod.js +2 -2
- package/dist/index.prod.mjs +2 -2
- package/es/chat/src/styles/index.cssr.mjs +1 -1
- package/es/components.d.ts +66 -0
- 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 +66 -0
- 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 +21 -2
|
@@ -240,7 +240,7 @@ export default cB('chat', `
|
|
|
240
240
|
border-radius: 18px;
|
|
241
241
|
font-size: 14px;
|
|
242
242
|
line-height: 20px;
|
|
243
|
-
|
|
243
|
+
overflow-wrap: anywhere;
|
|
244
244
|
background-color: var(--u-message-bubble-background-color-other);
|
|
245
245
|
color: var(--u-message-bubble-text-color-other);
|
|
246
246
|
border-bottom-left-radius: 6px;
|
package/es/components.d.ts
CHANGED
|
@@ -106685,6 +106685,7 @@ export declare const UEditor: import("vue").DefineComponent<import("vue").Extrac
|
|
|
106685
106685
|
readonly autofocus: BooleanConstructor;
|
|
106686
106686
|
readonly maxLength: NumberConstructor;
|
|
106687
106687
|
readonly maxRows: NumberConstructor;
|
|
106688
|
+
readonly showCount: BooleanConstructor;
|
|
106688
106689
|
readonly toolbarButtonProps: import("vue").PropType<Partial<import("./button").ButtonProps>>;
|
|
106689
106690
|
readonly toolbarIconProps: import("vue").PropType<Partial<import("./icon").IconProps>>;
|
|
106690
106691
|
readonly toolbarDropdownProps: import("vue").PropType<Partial<import(".").SelectProps>>;
|
|
@@ -106749,6 +106750,9 @@ export declare const UEditor: import("vue").DefineComponent<import("vue").Extrac
|
|
|
106749
106750
|
markdownH2LineHeight: string;
|
|
106750
106751
|
markdownH3LineHeight: string;
|
|
106751
106752
|
markdownTextLineHeight: string;
|
|
106753
|
+
countTextColor: string;
|
|
106754
|
+
countFontSize: string;
|
|
106755
|
+
countLineHeight: string;
|
|
106752
106756
|
}, {
|
|
106753
106757
|
Button: import("./_mixins").Theme<"Button", {
|
|
106754
106758
|
heightTiny: string;
|
|
@@ -107384,6 +107388,9 @@ export declare const UEditor: import("vue").DefineComponent<import("vue").Extrac
|
|
|
107384
107388
|
markdownH2LineHeight: string;
|
|
107385
107389
|
markdownH3LineHeight: string;
|
|
107386
107390
|
markdownTextLineHeight: string;
|
|
107391
|
+
countTextColor: string;
|
|
107392
|
+
countFontSize: string;
|
|
107393
|
+
countLineHeight: string;
|
|
107387
107394
|
}, {
|
|
107388
107395
|
Button: import("./_mixins").Theme<"Button", {
|
|
107389
107396
|
heightTiny: string;
|
|
@@ -108019,6 +108026,9 @@ export declare const UEditor: import("vue").DefineComponent<import("vue").Extrac
|
|
|
108019
108026
|
markdownH2LineHeight: string;
|
|
108020
108027
|
markdownH3LineHeight: string;
|
|
108021
108028
|
markdownTextLineHeight: string;
|
|
108029
|
+
countTextColor: string;
|
|
108030
|
+
countFontSize: string;
|
|
108031
|
+
countLineHeight: string;
|
|
108022
108032
|
}, {
|
|
108023
108033
|
Button: import("./_mixins").Theme<"Button", {
|
|
108024
108034
|
heightTiny: string;
|
|
@@ -108657,6 +108667,7 @@ export declare const UEditor: import("vue").DefineComponent<import("vue").Extrac
|
|
|
108657
108667
|
readonly autofocus: BooleanConstructor;
|
|
108658
108668
|
readonly maxLength: NumberConstructor;
|
|
108659
108669
|
readonly maxRows: NumberConstructor;
|
|
108670
|
+
readonly showCount: BooleanConstructor;
|
|
108660
108671
|
readonly toolbarButtonProps: import("vue").PropType<Partial<import("./button").ButtonProps>>;
|
|
108661
108672
|
readonly toolbarIconProps: import("vue").PropType<Partial<import("./icon").IconProps>>;
|
|
108662
108673
|
readonly toolbarDropdownProps: import("vue").PropType<Partial<import(".").SelectProps>>;
|
|
@@ -108721,6 +108732,9 @@ export declare const UEditor: import("vue").DefineComponent<import("vue").Extrac
|
|
|
108721
108732
|
markdownH2LineHeight: string;
|
|
108722
108733
|
markdownH3LineHeight: string;
|
|
108723
108734
|
markdownTextLineHeight: string;
|
|
108735
|
+
countTextColor: string;
|
|
108736
|
+
countFontSize: string;
|
|
108737
|
+
countLineHeight: string;
|
|
108724
108738
|
}, {
|
|
108725
108739
|
Button: import("./_mixins").Theme<"Button", {
|
|
108726
108740
|
heightTiny: string;
|
|
@@ -109356,6 +109370,9 @@ export declare const UEditor: import("vue").DefineComponent<import("vue").Extrac
|
|
|
109356
109370
|
markdownH2LineHeight: string;
|
|
109357
109371
|
markdownH3LineHeight: string;
|
|
109358
109372
|
markdownTextLineHeight: string;
|
|
109373
|
+
countTextColor: string;
|
|
109374
|
+
countFontSize: string;
|
|
109375
|
+
countLineHeight: string;
|
|
109359
109376
|
}, {
|
|
109360
109377
|
Button: import("./_mixins").Theme<"Button", {
|
|
109361
109378
|
heightTiny: string;
|
|
@@ -109991,6 +110008,9 @@ export declare const UEditor: import("vue").DefineComponent<import("vue").Extrac
|
|
|
109991
110008
|
markdownH2LineHeight: string;
|
|
109992
110009
|
markdownH3LineHeight: string;
|
|
109993
110010
|
markdownTextLineHeight: string;
|
|
110011
|
+
countTextColor: string;
|
|
110012
|
+
countFontSize: string;
|
|
110013
|
+
countLineHeight: string;
|
|
109994
110014
|
}, {
|
|
109995
110015
|
Button: import("./_mixins").Theme<"Button", {
|
|
109996
110016
|
heightTiny: string;
|
|
@@ -110583,6 +110603,7 @@ export declare const UEditor: import("vue").DefineComponent<import("vue").Extrac
|
|
|
110583
110603
|
readonly disabled: boolean;
|
|
110584
110604
|
readonly readonly: boolean;
|
|
110585
110605
|
readonly autofocus: boolean;
|
|
110606
|
+
readonly showCount: boolean;
|
|
110586
110607
|
readonly toolbar: import(".").EditorToolbar;
|
|
110587
110608
|
readonly showSendButton: boolean;
|
|
110588
110609
|
readonly sendOnEnter: boolean;
|
|
@@ -110652,6 +110673,9 @@ export declare const UEditorToolbar: import("vue").DefineComponent<import("vue")
|
|
|
110652
110673
|
markdownH2LineHeight: string;
|
|
110653
110674
|
markdownH3LineHeight: string;
|
|
110654
110675
|
markdownTextLineHeight: string;
|
|
110676
|
+
countTextColor: string;
|
|
110677
|
+
countFontSize: string;
|
|
110678
|
+
countLineHeight: string;
|
|
110655
110679
|
}, {
|
|
110656
110680
|
Button: import("./_mixins").Theme<"Button", {
|
|
110657
110681
|
heightTiny: string;
|
|
@@ -111287,6 +111311,9 @@ export declare const UEditorToolbar: import("vue").DefineComponent<import("vue")
|
|
|
111287
111311
|
markdownH2LineHeight: string;
|
|
111288
111312
|
markdownH3LineHeight: string;
|
|
111289
111313
|
markdownTextLineHeight: string;
|
|
111314
|
+
countTextColor: string;
|
|
111315
|
+
countFontSize: string;
|
|
111316
|
+
countLineHeight: string;
|
|
111290
111317
|
}, {
|
|
111291
111318
|
Button: import("./_mixins").Theme<"Button", {
|
|
111292
111319
|
heightTiny: string;
|
|
@@ -111922,6 +111949,9 @@ export declare const UEditorToolbar: import("vue").DefineComponent<import("vue")
|
|
|
111922
111949
|
markdownH2LineHeight: string;
|
|
111923
111950
|
markdownH3LineHeight: string;
|
|
111924
111951
|
markdownTextLineHeight: string;
|
|
111952
|
+
countTextColor: string;
|
|
111953
|
+
countFontSize: string;
|
|
111954
|
+
countLineHeight: string;
|
|
111925
111955
|
}, {
|
|
111926
111956
|
Button: import("./_mixins").Theme<"Button", {
|
|
111927
111957
|
heightTiny: string;
|
|
@@ -113347,6 +113377,9 @@ export declare const UEditorToolbar: import("vue").DefineComponent<import("vue")
|
|
|
113347
113377
|
markdownH2LineHeight: string;
|
|
113348
113378
|
markdownH3LineHeight: string;
|
|
113349
113379
|
markdownTextLineHeight: string;
|
|
113380
|
+
countTextColor: string;
|
|
113381
|
+
countFontSize: string;
|
|
113382
|
+
countLineHeight: string;
|
|
113350
113383
|
}, {
|
|
113351
113384
|
Button: import("./_mixins").Theme<"Button", {
|
|
113352
113385
|
heightTiny: string;
|
|
@@ -113982,6 +114015,9 @@ export declare const UEditorToolbar: import("vue").DefineComponent<import("vue")
|
|
|
113982
114015
|
markdownH2LineHeight: string;
|
|
113983
114016
|
markdownH3LineHeight: string;
|
|
113984
114017
|
markdownTextLineHeight: string;
|
|
114018
|
+
countTextColor: string;
|
|
114019
|
+
countFontSize: string;
|
|
114020
|
+
countLineHeight: string;
|
|
113985
114021
|
}, {
|
|
113986
114022
|
Button: import("./_mixins").Theme<"Button", {
|
|
113987
114023
|
heightTiny: string;
|
|
@@ -114617,6 +114653,9 @@ export declare const UEditorToolbar: import("vue").DefineComponent<import("vue")
|
|
|
114617
114653
|
markdownH2LineHeight: string;
|
|
114618
114654
|
markdownH3LineHeight: string;
|
|
114619
114655
|
markdownTextLineHeight: string;
|
|
114656
|
+
countTextColor: string;
|
|
114657
|
+
countFontSize: string;
|
|
114658
|
+
countLineHeight: string;
|
|
114620
114659
|
}, {
|
|
114621
114660
|
Button: import("./_mixins").Theme<"Button", {
|
|
114622
114661
|
heightTiny: string;
|
|
@@ -115218,6 +115257,8 @@ export declare const UEditorContent: import("vue").DefineComponent<import("vue")
|
|
|
115218
115257
|
};
|
|
115219
115258
|
readonly sendDisabled: BooleanConstructor;
|
|
115220
115259
|
readonly maxRows: NumberConstructor;
|
|
115260
|
+
readonly showCount: BooleanConstructor;
|
|
115261
|
+
readonly maxLength: NumberConstructor;
|
|
115221
115262
|
readonly sendTooltip: StringConstructor;
|
|
115222
115263
|
readonly disabled: BooleanConstructor;
|
|
115223
115264
|
readonly sendButtonProps: import("vue").PropType<Partial<import("./button").ButtonProps>>;
|
|
@@ -115272,6 +115313,9 @@ export declare const UEditorContent: import("vue").DefineComponent<import("vue")
|
|
|
115272
115313
|
markdownH2LineHeight: string;
|
|
115273
115314
|
markdownH3LineHeight: string;
|
|
115274
115315
|
markdownTextLineHeight: string;
|
|
115316
|
+
countTextColor: string;
|
|
115317
|
+
countFontSize: string;
|
|
115318
|
+
countLineHeight: string;
|
|
115275
115319
|
}, {
|
|
115276
115320
|
Button: import("./_mixins").Theme<"Button", {
|
|
115277
115321
|
heightTiny: string;
|
|
@@ -115907,6 +115951,9 @@ export declare const UEditorContent: import("vue").DefineComponent<import("vue")
|
|
|
115907
115951
|
markdownH2LineHeight: string;
|
|
115908
115952
|
markdownH3LineHeight: string;
|
|
115909
115953
|
markdownTextLineHeight: string;
|
|
115954
|
+
countTextColor: string;
|
|
115955
|
+
countFontSize: string;
|
|
115956
|
+
countLineHeight: string;
|
|
115910
115957
|
}, {
|
|
115911
115958
|
Button: import("./_mixins").Theme<"Button", {
|
|
115912
115959
|
heightTiny: string;
|
|
@@ -116542,6 +116589,9 @@ export declare const UEditorContent: import("vue").DefineComponent<import("vue")
|
|
|
116542
116589
|
markdownH2LineHeight: string;
|
|
116543
116590
|
markdownH3LineHeight: string;
|
|
116544
116591
|
markdownTextLineHeight: string;
|
|
116592
|
+
countTextColor: string;
|
|
116593
|
+
countFontSize: string;
|
|
116594
|
+
countLineHeight: string;
|
|
116545
116595
|
}, {
|
|
116546
116596
|
Button: import("./_mixins").Theme<"Button", {
|
|
116547
116597
|
heightTiny: string;
|
|
@@ -117362,6 +117412,10 @@ export declare const UEditorContent: import("vue").DefineComponent<import("vue")
|
|
|
117362
117412
|
mergedSendButtonProps: import("vue").ComputedRef<Partial<import("./button").ButtonProps> | undefined>;
|
|
117363
117413
|
mergedSendIconProps: import("vue").ComputedRef<Partial<import("./icon").IconProps> | undefined>;
|
|
117364
117414
|
mergedContentProps: import("vue").ComputedRef<import("vue").HTMLAttributes | undefined>;
|
|
117415
|
+
mergedShowCount: import("vue").ComputedRef<boolean>;
|
|
117416
|
+
mergedMaxLength: import("vue").ComputedRef<number | undefined>;
|
|
117417
|
+
countAvailable: import("vue").ComputedRef<boolean>;
|
|
117418
|
+
characterCount: import("vue").Ref<number, number>;
|
|
117365
117419
|
scrollbarInstRef: import("vue").Ref<{
|
|
117366
117420
|
$el: HTMLElement;
|
|
117367
117421
|
containerRef: HTMLElement | null;
|
|
@@ -117408,6 +117462,8 @@ export declare const UEditorContent: import("vue").DefineComponent<import("vue")
|
|
|
117408
117462
|
};
|
|
117409
117463
|
readonly sendDisabled: BooleanConstructor;
|
|
117410
117464
|
readonly maxRows: NumberConstructor;
|
|
117465
|
+
readonly showCount: BooleanConstructor;
|
|
117466
|
+
readonly maxLength: NumberConstructor;
|
|
117411
117467
|
readonly sendTooltip: StringConstructor;
|
|
117412
117468
|
readonly disabled: BooleanConstructor;
|
|
117413
117469
|
readonly sendButtonProps: import("vue").PropType<Partial<import("./button").ButtonProps>>;
|
|
@@ -117462,6 +117518,9 @@ export declare const UEditorContent: import("vue").DefineComponent<import("vue")
|
|
|
117462
117518
|
markdownH2LineHeight: string;
|
|
117463
117519
|
markdownH3LineHeight: string;
|
|
117464
117520
|
markdownTextLineHeight: string;
|
|
117521
|
+
countTextColor: string;
|
|
117522
|
+
countFontSize: string;
|
|
117523
|
+
countLineHeight: string;
|
|
117465
117524
|
}, {
|
|
117466
117525
|
Button: import("./_mixins").Theme<"Button", {
|
|
117467
117526
|
heightTiny: string;
|
|
@@ -118097,6 +118156,9 @@ export declare const UEditorContent: import("vue").DefineComponent<import("vue")
|
|
|
118097
118156
|
markdownH2LineHeight: string;
|
|
118098
118157
|
markdownH3LineHeight: string;
|
|
118099
118158
|
markdownTextLineHeight: string;
|
|
118159
|
+
countTextColor: string;
|
|
118160
|
+
countFontSize: string;
|
|
118161
|
+
countLineHeight: string;
|
|
118100
118162
|
}, {
|
|
118101
118163
|
Button: import("./_mixins").Theme<"Button", {
|
|
118102
118164
|
heightTiny: string;
|
|
@@ -118732,6 +118794,9 @@ export declare const UEditorContent: import("vue").DefineComponent<import("vue")
|
|
|
118732
118794
|
markdownH2LineHeight: string;
|
|
118733
118795
|
markdownH3LineHeight: string;
|
|
118734
118796
|
markdownTextLineHeight: string;
|
|
118797
|
+
countTextColor: string;
|
|
118798
|
+
countFontSize: string;
|
|
118799
|
+
countLineHeight: string;
|
|
118735
118800
|
}, {
|
|
118736
118801
|
Button: import("./_mixins").Theme<"Button", {
|
|
118737
118802
|
heightTiny: string;
|
|
@@ -119321,6 +119386,7 @@ export declare const UEditorContent: import("vue").DefineComponent<import("vue")
|
|
|
119321
119386
|
}>>>;
|
|
119322
119387
|
}>> & Readonly<{}>, {
|
|
119323
119388
|
readonly disabled: boolean;
|
|
119389
|
+
readonly showCount: boolean;
|
|
119324
119390
|
readonly showSendButton: boolean;
|
|
119325
119391
|
readonly sendDisabled: boolean;
|
|
119326
119392
|
}, import("vue").SlotsType<import(".").EditorSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/es/editor/index.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export type { SendButtonProps } from './src/EditorParts/SendButton/interface';
|
|
|
6
6
|
export type { ToolbarButtonProps } from './src/EditorParts/ToolbarButton/interface';
|
|
7
7
|
export { createEditorExtensions } from './src/extensions';
|
|
8
8
|
export { editorInjectionKey, editorProps } from './src/interface';
|
|
9
|
-
export type { EditorInst, EditorNodeProps, EditorProps, EditorSlots, EditorToolbar, EditorToolbarItemKey } from './src/interface';
|
|
9
|
+
export type { EditorCountSlotProps, EditorInst, EditorNodeProps, EditorProps, EditorSlots, EditorToolbar, EditorToolbarItemKey } from './src/interface';
|
|
10
10
|
export type { Editor } from '@tiptap/vue-3';
|
|
@@ -34,6 +34,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
34
34
|
readonly autofocus: BooleanConstructor;
|
|
35
35
|
readonly maxLength: NumberConstructor;
|
|
36
36
|
readonly maxRows: NumberConstructor;
|
|
37
|
+
readonly showCount: BooleanConstructor;
|
|
37
38
|
readonly toolbarButtonProps: import("vue").PropType<Partial<import("../..").ButtonProps>>;
|
|
38
39
|
readonly toolbarIconProps: import("vue").PropType<Partial<import("../..").IconProps>>;
|
|
39
40
|
readonly toolbarDropdownProps: import("vue").PropType<Partial<import("../..").SelectProps>>;
|
|
@@ -98,6 +99,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
98
99
|
markdownH2LineHeight: string;
|
|
99
100
|
markdownH3LineHeight: string;
|
|
100
101
|
markdownTextLineHeight: string;
|
|
102
|
+
countTextColor: string;
|
|
103
|
+
countFontSize: string;
|
|
104
|
+
countLineHeight: string;
|
|
101
105
|
}, {
|
|
102
106
|
Button: import("../../_mixins").Theme<"Button", {
|
|
103
107
|
heightTiny: string;
|
|
@@ -733,6 +737,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
733
737
|
markdownH2LineHeight: string;
|
|
734
738
|
markdownH3LineHeight: string;
|
|
735
739
|
markdownTextLineHeight: string;
|
|
740
|
+
countTextColor: string;
|
|
741
|
+
countFontSize: string;
|
|
742
|
+
countLineHeight: string;
|
|
736
743
|
}, {
|
|
737
744
|
Button: import("../../_mixins").Theme<"Button", {
|
|
738
745
|
heightTiny: string;
|
|
@@ -1368,6 +1375,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1368
1375
|
markdownH2LineHeight: string;
|
|
1369
1376
|
markdownH3LineHeight: string;
|
|
1370
1377
|
markdownTextLineHeight: string;
|
|
1378
|
+
countTextColor: string;
|
|
1379
|
+
countFontSize: string;
|
|
1380
|
+
countLineHeight: string;
|
|
1371
1381
|
}, {
|
|
1372
1382
|
Button: import("../../_mixins").Theme<"Button", {
|
|
1373
1383
|
heightTiny: string;
|
|
@@ -2006,6 +2016,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
2006
2016
|
readonly autofocus: BooleanConstructor;
|
|
2007
2017
|
readonly maxLength: NumberConstructor;
|
|
2008
2018
|
readonly maxRows: NumberConstructor;
|
|
2019
|
+
readonly showCount: BooleanConstructor;
|
|
2009
2020
|
readonly toolbarButtonProps: import("vue").PropType<Partial<import("../..").ButtonProps>>;
|
|
2010
2021
|
readonly toolbarIconProps: import("vue").PropType<Partial<import("../..").IconProps>>;
|
|
2011
2022
|
readonly toolbarDropdownProps: import("vue").PropType<Partial<import("../..").SelectProps>>;
|
|
@@ -2070,6 +2081,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
2070
2081
|
markdownH2LineHeight: string;
|
|
2071
2082
|
markdownH3LineHeight: string;
|
|
2072
2083
|
markdownTextLineHeight: string;
|
|
2084
|
+
countTextColor: string;
|
|
2085
|
+
countFontSize: string;
|
|
2086
|
+
countLineHeight: string;
|
|
2073
2087
|
}, {
|
|
2074
2088
|
Button: import("../../_mixins").Theme<"Button", {
|
|
2075
2089
|
heightTiny: string;
|
|
@@ -2705,6 +2719,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
2705
2719
|
markdownH2LineHeight: string;
|
|
2706
2720
|
markdownH3LineHeight: string;
|
|
2707
2721
|
markdownTextLineHeight: string;
|
|
2722
|
+
countTextColor: string;
|
|
2723
|
+
countFontSize: string;
|
|
2724
|
+
countLineHeight: string;
|
|
2708
2725
|
}, {
|
|
2709
2726
|
Button: import("../../_mixins").Theme<"Button", {
|
|
2710
2727
|
heightTiny: string;
|
|
@@ -3340,6 +3357,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
3340
3357
|
markdownH2LineHeight: string;
|
|
3341
3358
|
markdownH3LineHeight: string;
|
|
3342
3359
|
markdownTextLineHeight: string;
|
|
3360
|
+
countTextColor: string;
|
|
3361
|
+
countFontSize: string;
|
|
3362
|
+
countLineHeight: string;
|
|
3343
3363
|
}, {
|
|
3344
3364
|
Button: import("../../_mixins").Theme<"Button", {
|
|
3345
3365
|
heightTiny: string;
|
|
@@ -3932,6 +3952,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
3932
3952
|
readonly disabled: boolean;
|
|
3933
3953
|
readonly readonly: boolean;
|
|
3934
3954
|
readonly autofocus: boolean;
|
|
3955
|
+
readonly showCount: boolean;
|
|
3935
3956
|
readonly toolbar: import("./interface").EditorToolbar;
|
|
3936
3957
|
readonly showSendButton: boolean;
|
|
3937
3958
|
readonly sendOnEnter: boolean;
|
package/es/editor/src/Editor.mjs
CHANGED
|
@@ -46,7 +46,7 @@ export default defineComponent({
|
|
|
46
46
|
markdownOptions: props.markdownOptions,
|
|
47
47
|
extensions: props.extensions,
|
|
48
48
|
nodeProps: props.nodeProps,
|
|
49
|
-
maxLength: props.maxLength,
|
|
49
|
+
maxLength: () => props.maxLength,
|
|
50
50
|
onSendShortcut: props.sendOnEnter ? handleSend : undefined
|
|
51
51
|
}),
|
|
52
52
|
editable: editableRef.value,
|
|
@@ -203,6 +203,8 @@ export default defineComponent({
|
|
|
203
203
|
contentPropsRef: toRef(props, 'contentProps'),
|
|
204
204
|
maxRowsRef: toRef(props, 'maxRows'),
|
|
205
205
|
showSendButtonRef: toRef(props, 'showSendButton'),
|
|
206
|
+
showCountRef: toRef(props, 'showCount'),
|
|
207
|
+
maxLengthRef: toRef(props, 'maxLength'),
|
|
206
208
|
sendDisabledRef,
|
|
207
209
|
sendTooltipRef: mergedSendTooltipRef,
|
|
208
210
|
disabledRef: toRef(props, 'disabled'),
|
|
@@ -236,7 +238,8 @@ export default defineComponent({
|
|
|
236
238
|
class: [`${this.mergedClsPrefix}-editor`, this.themeClass],
|
|
237
239
|
style: this.inlineThemeDisabled ? undefined : this.cssVars
|
|
238
240
|
}, (_d = (_c = (_b = this.$slots).toolbar) === null || _c === void 0 ? void 0 : _c.call(_b)) !== null && _d !== void 0 ? _d : h(EditorToolbar, null), (_g = (_f = (_e = this.$slots).content) === null || _f === void 0 ? void 0 : _f.call(_e)) !== null && _g !== void 0 ? _g : h(EditorContent, null, {
|
|
239
|
-
sendIcon: this.$slots.sendIcon
|
|
241
|
+
sendIcon: this.$slots.sendIcon,
|
|
242
|
+
count: this.$slots.count
|
|
240
243
|
}));
|
|
241
244
|
}
|
|
242
245
|
});
|
|
@@ -13,6 +13,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
13
13
|
};
|
|
14
14
|
readonly sendDisabled: BooleanConstructor;
|
|
15
15
|
readonly maxRows: NumberConstructor;
|
|
16
|
+
readonly showCount: BooleanConstructor;
|
|
17
|
+
readonly maxLength: NumberConstructor;
|
|
16
18
|
readonly sendTooltip: StringConstructor;
|
|
17
19
|
readonly disabled: BooleanConstructor;
|
|
18
20
|
readonly sendButtonProps: import("vue").PropType<Partial<import("../../../..").ButtonProps>>;
|
|
@@ -67,6 +69,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
67
69
|
markdownH2LineHeight: string;
|
|
68
70
|
markdownH3LineHeight: string;
|
|
69
71
|
markdownTextLineHeight: string;
|
|
72
|
+
countTextColor: string;
|
|
73
|
+
countFontSize: string;
|
|
74
|
+
countLineHeight: string;
|
|
70
75
|
}, {
|
|
71
76
|
Button: import("../../../../_mixins").Theme<"Button", {
|
|
72
77
|
heightTiny: string;
|
|
@@ -702,6 +707,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
702
707
|
markdownH2LineHeight: string;
|
|
703
708
|
markdownH3LineHeight: string;
|
|
704
709
|
markdownTextLineHeight: string;
|
|
710
|
+
countTextColor: string;
|
|
711
|
+
countFontSize: string;
|
|
712
|
+
countLineHeight: string;
|
|
705
713
|
}, {
|
|
706
714
|
Button: import("../../../../_mixins").Theme<"Button", {
|
|
707
715
|
heightTiny: string;
|
|
@@ -1337,6 +1345,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1337
1345
|
markdownH2LineHeight: string;
|
|
1338
1346
|
markdownH3LineHeight: string;
|
|
1339
1347
|
markdownTextLineHeight: string;
|
|
1348
|
+
countTextColor: string;
|
|
1349
|
+
countFontSize: string;
|
|
1350
|
+
countLineHeight: string;
|
|
1340
1351
|
}, {
|
|
1341
1352
|
Button: import("../../../../_mixins").Theme<"Button", {
|
|
1342
1353
|
heightTiny: string;
|
|
@@ -2157,6 +2168,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
2157
2168
|
mergedSendButtonProps: import("vue").ComputedRef<Partial<import("../../../..").ButtonProps> | undefined>;
|
|
2158
2169
|
mergedSendIconProps: import("vue").ComputedRef<Partial<import("../../../..").IconProps> | undefined>;
|
|
2159
2170
|
mergedContentProps: import("vue").ComputedRef<import("vue").HTMLAttributes | undefined>;
|
|
2171
|
+
mergedShowCount: import("vue").ComputedRef<boolean>;
|
|
2172
|
+
mergedMaxLength: import("vue").ComputedRef<number | undefined>;
|
|
2173
|
+
countAvailable: import("vue").ComputedRef<boolean>;
|
|
2174
|
+
characterCount: import("vue").Ref<number, number>;
|
|
2160
2175
|
scrollbarInstRef: import("vue").Ref<{
|
|
2161
2176
|
$el: HTMLElement;
|
|
2162
2177
|
containerRef: HTMLElement | null;
|
|
@@ -2203,6 +2218,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
2203
2218
|
};
|
|
2204
2219
|
readonly sendDisabled: BooleanConstructor;
|
|
2205
2220
|
readonly maxRows: NumberConstructor;
|
|
2221
|
+
readonly showCount: BooleanConstructor;
|
|
2222
|
+
readonly maxLength: NumberConstructor;
|
|
2206
2223
|
readonly sendTooltip: StringConstructor;
|
|
2207
2224
|
readonly disabled: BooleanConstructor;
|
|
2208
2225
|
readonly sendButtonProps: import("vue").PropType<Partial<import("../../../..").ButtonProps>>;
|
|
@@ -2257,6 +2274,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
2257
2274
|
markdownH2LineHeight: string;
|
|
2258
2275
|
markdownH3LineHeight: string;
|
|
2259
2276
|
markdownTextLineHeight: string;
|
|
2277
|
+
countTextColor: string;
|
|
2278
|
+
countFontSize: string;
|
|
2279
|
+
countLineHeight: string;
|
|
2260
2280
|
}, {
|
|
2261
2281
|
Button: import("../../../../_mixins").Theme<"Button", {
|
|
2262
2282
|
heightTiny: string;
|
|
@@ -2892,6 +2912,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
2892
2912
|
markdownH2LineHeight: string;
|
|
2893
2913
|
markdownH3LineHeight: string;
|
|
2894
2914
|
markdownTextLineHeight: string;
|
|
2915
|
+
countTextColor: string;
|
|
2916
|
+
countFontSize: string;
|
|
2917
|
+
countLineHeight: string;
|
|
2895
2918
|
}, {
|
|
2896
2919
|
Button: import("../../../../_mixins").Theme<"Button", {
|
|
2897
2920
|
heightTiny: string;
|
|
@@ -3527,6 +3550,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
3527
3550
|
markdownH2LineHeight: string;
|
|
3528
3551
|
markdownH3LineHeight: string;
|
|
3529
3552
|
markdownTextLineHeight: string;
|
|
3553
|
+
countTextColor: string;
|
|
3554
|
+
countFontSize: string;
|
|
3555
|
+
countLineHeight: string;
|
|
3530
3556
|
}, {
|
|
3531
3557
|
Button: import("../../../../_mixins").Theme<"Button", {
|
|
3532
3558
|
heightTiny: string;
|
|
@@ -4116,6 +4142,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
4116
4142
|
}>>>;
|
|
4117
4143
|
}>> & Readonly<{}>, {
|
|
4118
4144
|
readonly disabled: boolean;
|
|
4145
|
+
readonly showCount: boolean;
|
|
4119
4146
|
readonly showSendButton: boolean;
|
|
4120
4147
|
readonly sendDisabled: boolean;
|
|
4121
4148
|
}, SlotsType<EditorSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -2,6 +2,7 @@ import { EditorContent } from '@tiptap/vue-3';
|
|
|
2
2
|
import { computed, defineComponent, h, inject, onBeforeUnmount, ref, watch } from 'vue';
|
|
3
3
|
import { UScrollbar } from "../../../../_internal/index.mjs";
|
|
4
4
|
import { useConfig, useTheme, useThemeClass } from "../../../../_mixins/index.mjs";
|
|
5
|
+
import { resolveSlotWithProps } from "../../../../_utils/index.mjs";
|
|
5
6
|
import { createSendButtonThemeOverrides } from "../../../../chat/styles/light.mjs";
|
|
6
7
|
import { editorLight } from "../../../styles/index.mjs";
|
|
7
8
|
import useEditorCssVars from "../../composables/use-editor-css-vars.mjs";
|
|
@@ -34,6 +35,7 @@ export default defineComponent({
|
|
|
34
35
|
const sendButtonThemeOverridesRef = computed(() => createSendButtonThemeOverrides(themeVarsRef.value));
|
|
35
36
|
const scrollbarInstRef = ref(null);
|
|
36
37
|
const contentInstRef = ref(null);
|
|
38
|
+
const characterCountRef = ref(0);
|
|
37
39
|
const mergedMaxRowsRef = computed(() => {
|
|
38
40
|
var _a;
|
|
39
41
|
return (_a = UEditor === null || UEditor === void 0 ? void 0 : UEditor.maxRowsRef.value) !== null && _a !== void 0 ? _a : props.maxRows;
|
|
@@ -54,15 +56,26 @@ export default defineComponent({
|
|
|
54
56
|
var _a;
|
|
55
57
|
(_a = scrollbarInstRef.value) === null || _a === void 0 ? void 0 : _a.syncUnifiedContainer();
|
|
56
58
|
}
|
|
59
|
+
function syncCharacterCount() {
|
|
60
|
+
var _a, _b, _c;
|
|
61
|
+
characterCountRef.value = (_c = (_b = (_a = editorInstanceRef.value) === null || _a === void 0 ? void 0 : _a.storage.characterCount) === null || _b === void 0 ? void 0 : _b.characters()) !== null && _c !== void 0 ? _c : 0;
|
|
62
|
+
}
|
|
63
|
+
function handleTransaction({
|
|
64
|
+
transaction
|
|
65
|
+
}) {
|
|
66
|
+
syncScrollbar();
|
|
67
|
+
if (transaction.docChanged) syncCharacterCount();
|
|
68
|
+
}
|
|
57
69
|
function unsubscribe() {
|
|
58
|
-
subscribed === null || subscribed === void 0 ? void 0 : subscribed.off('transaction',
|
|
70
|
+
subscribed === null || subscribed === void 0 ? void 0 : subscribed.off('transaction', handleTransaction);
|
|
59
71
|
subscribed = undefined;
|
|
60
72
|
}
|
|
61
73
|
watch(editorInstanceRef, editor => {
|
|
62
74
|
unsubscribe();
|
|
75
|
+
syncCharacterCount();
|
|
63
76
|
if (!editor) return;
|
|
64
77
|
subscribed = editor;
|
|
65
|
-
editor.on('transaction',
|
|
78
|
+
editor.on('transaction', handleTransaction);
|
|
66
79
|
}, {
|
|
67
80
|
immediate: true
|
|
68
81
|
});
|
|
@@ -108,6 +121,19 @@ export default defineComponent({
|
|
|
108
121
|
var _a;
|
|
109
122
|
return (_a = UEditor === null || UEditor === void 0 ? void 0 : UEditor.contentPropsRef.value) !== null && _a !== void 0 ? _a : props.contentProps;
|
|
110
123
|
}),
|
|
124
|
+
mergedShowCount: computed(() => {
|
|
125
|
+
var _a;
|
|
126
|
+
return (_a = UEditor === null || UEditor === void 0 ? void 0 : UEditor.showCountRef.value) !== null && _a !== void 0 ? _a : props.showCount;
|
|
127
|
+
}),
|
|
128
|
+
mergedMaxLength: computed(() => {
|
|
129
|
+
var _a;
|
|
130
|
+
return (_a = UEditor === null || UEditor === void 0 ? void 0 : UEditor.maxLengthRef.value) !== null && _a !== void 0 ? _a : props.maxLength;
|
|
131
|
+
}),
|
|
132
|
+
countAvailable: computed(() => {
|
|
133
|
+
var _a;
|
|
134
|
+
return !!((_a = editorInstanceRef.value) === null || _a === void 0 ? void 0 : _a.storage.characterCount);
|
|
135
|
+
}),
|
|
136
|
+
characterCount: characterCountRef,
|
|
111
137
|
scrollbarInstRef,
|
|
112
138
|
contentInstRef,
|
|
113
139
|
mergedMaxRows: mergedMaxRowsRef,
|
|
@@ -120,7 +146,7 @@ export default defineComponent({
|
|
|
120
146
|
render() {
|
|
121
147
|
var _a;
|
|
122
148
|
(_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
123
|
-
const
|
|
149
|
+
const contentWrapper = h("div", {
|
|
124
150
|
class: [`${this.mergedClsPrefix}-editor__content-wrapper`, this.isStandalone && `${this.mergedClsPrefix}-editor__content-wrapper--standalone`]
|
|
125
151
|
}, h(UScrollbar, {
|
|
126
152
|
ref: "scrollbarInstRef",
|
|
@@ -145,6 +171,14 @@ export default defineComponent({
|
|
|
145
171
|
}, {
|
|
146
172
|
icon: this.$slots.sendIcon
|
|
147
173
|
}));
|
|
174
|
+
const content = this.mergedShowCount ? h("div", {
|
|
175
|
+
class: `${this.mergedClsPrefix}-editor__body`
|
|
176
|
+
}, contentWrapper, this.countAvailable && h("span", {
|
|
177
|
+
class: `${this.mergedClsPrefix}-editor__count`
|
|
178
|
+
}, resolveSlotWithProps(this.$slots.count, {
|
|
179
|
+
count: this.characterCount,
|
|
180
|
+
maxLength: this.mergedMaxLength
|
|
181
|
+
}, () => [this.mergedMaxLength === undefined ? this.characterCount : `${this.characterCount} / ${this.mergedMaxLength}`]))) : contentWrapper;
|
|
148
182
|
if (!this.isStandalone) return content;
|
|
149
183
|
return h("div", {
|
|
150
184
|
class: [`${this.mergedClsPrefix}-editor`, this.themeClass],
|
|
@@ -13,6 +13,8 @@ export declare const editorContentProps: {
|
|
|
13
13
|
};
|
|
14
14
|
readonly sendDisabled: BooleanConstructor;
|
|
15
15
|
readonly maxRows: NumberConstructor;
|
|
16
|
+
readonly showCount: BooleanConstructor;
|
|
17
|
+
readonly maxLength: NumberConstructor;
|
|
16
18
|
readonly sendTooltip: StringConstructor;
|
|
17
19
|
readonly disabled: BooleanConstructor;
|
|
18
20
|
readonly sendButtonProps: PropType<Partial<ButtonProps>>;
|
|
@@ -67,6 +69,9 @@ export declare const editorContentProps: {
|
|
|
67
69
|
markdownH2LineHeight: string;
|
|
68
70
|
markdownH3LineHeight: string;
|
|
69
71
|
markdownTextLineHeight: string;
|
|
72
|
+
countTextColor: string;
|
|
73
|
+
countFontSize: string;
|
|
74
|
+
countLineHeight: string;
|
|
70
75
|
}, {
|
|
71
76
|
Button: import("../../../../_mixins").Theme<"Button", {
|
|
72
77
|
heightTiny: string;
|
|
@@ -702,6 +707,9 @@ export declare const editorContentProps: {
|
|
|
702
707
|
markdownH2LineHeight: string;
|
|
703
708
|
markdownH3LineHeight: string;
|
|
704
709
|
markdownTextLineHeight: string;
|
|
710
|
+
countTextColor: string;
|
|
711
|
+
countFontSize: string;
|
|
712
|
+
countLineHeight: string;
|
|
705
713
|
}, {
|
|
706
714
|
Button: import("../../../../_mixins").Theme<"Button", {
|
|
707
715
|
heightTiny: string;
|
|
@@ -1337,6 +1345,9 @@ export declare const editorContentProps: {
|
|
|
1337
1345
|
markdownH2LineHeight: string;
|
|
1338
1346
|
markdownH3LineHeight: string;
|
|
1339
1347
|
markdownTextLineHeight: string;
|
|
1348
|
+
countTextColor: string;
|
|
1349
|
+
countFontSize: string;
|
|
1350
|
+
countLineHeight: string;
|
|
1340
1351
|
}, {
|
|
1341
1352
|
Button: import("../../../../_mixins").Theme<"Button", {
|
|
1342
1353
|
heightTiny: string;
|
|
@@ -67,6 +67,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
67
67
|
markdownH2LineHeight: string;
|
|
68
68
|
markdownH3LineHeight: string;
|
|
69
69
|
markdownTextLineHeight: string;
|
|
70
|
+
countTextColor: string;
|
|
71
|
+
countFontSize: string;
|
|
72
|
+
countLineHeight: string;
|
|
70
73
|
}, {
|
|
71
74
|
Button: import("../../../../_mixins").Theme<"Button", {
|
|
72
75
|
heightTiny: string;
|
|
@@ -702,6 +705,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
702
705
|
markdownH2LineHeight: string;
|
|
703
706
|
markdownH3LineHeight: string;
|
|
704
707
|
markdownTextLineHeight: string;
|
|
708
|
+
countTextColor: string;
|
|
709
|
+
countFontSize: string;
|
|
710
|
+
countLineHeight: string;
|
|
705
711
|
}, {
|
|
706
712
|
Button: import("../../../../_mixins").Theme<"Button", {
|
|
707
713
|
heightTiny: string;
|
|
@@ -1337,6 +1343,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1337
1343
|
markdownH2LineHeight: string;
|
|
1338
1344
|
markdownH3LineHeight: string;
|
|
1339
1345
|
markdownTextLineHeight: string;
|
|
1346
|
+
countTextColor: string;
|
|
1347
|
+
countFontSize: string;
|
|
1348
|
+
countLineHeight: string;
|
|
1340
1349
|
}, {
|
|
1341
1350
|
Button: import("../../../../_mixins").Theme<"Button", {
|
|
1342
1351
|
heightTiny: string;
|
|
@@ -2762,6 +2771,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
2762
2771
|
markdownH2LineHeight: string;
|
|
2763
2772
|
markdownH3LineHeight: string;
|
|
2764
2773
|
markdownTextLineHeight: string;
|
|
2774
|
+
countTextColor: string;
|
|
2775
|
+
countFontSize: string;
|
|
2776
|
+
countLineHeight: string;
|
|
2765
2777
|
}, {
|
|
2766
2778
|
Button: import("../../../../_mixins").Theme<"Button", {
|
|
2767
2779
|
heightTiny: string;
|
|
@@ -3397,6 +3409,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
3397
3409
|
markdownH2LineHeight: string;
|
|
3398
3410
|
markdownH3LineHeight: string;
|
|
3399
3411
|
markdownTextLineHeight: string;
|
|
3412
|
+
countTextColor: string;
|
|
3413
|
+
countFontSize: string;
|
|
3414
|
+
countLineHeight: string;
|
|
3400
3415
|
}, {
|
|
3401
3416
|
Button: import("../../../../_mixins").Theme<"Button", {
|
|
3402
3417
|
heightTiny: string;
|
|
@@ -4032,6 +4047,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
4032
4047
|
markdownH2LineHeight: string;
|
|
4033
4048
|
markdownH3LineHeight: string;
|
|
4034
4049
|
markdownTextLineHeight: string;
|
|
4050
|
+
countTextColor: string;
|
|
4051
|
+
countFontSize: string;
|
|
4052
|
+
countLineHeight: string;
|
|
4035
4053
|
}, {
|
|
4036
4054
|
Button: import("../../../../_mixins").Theme<"Button", {
|
|
4037
4055
|
heightTiny: string;
|