@sabrenski/spire-ui-vue 0.3.24 → 0.3.26
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/components/Chat/Chat.vue.d.ts +20 -0
- package/dist/components/Chat/ChatInput.vue.d.ts +4 -0
- package/dist/components/Dropdown/DropdownMenu.vue.d.ts +1 -0
- package/dist/components/Dropdown/DropdownSubmenu.vue.d.ts +1 -0
- package/dist/components/Dropdown/types.d.ts +4 -0
- package/dist/components/RichTextEditor/RichTextEditorToolbar.vue.d.ts +7 -2
- package/dist/components/RichTextEditor/extensions.d.ts +8 -0
- package/dist/components/RichTextEditor/index.d.ts +2 -2
- package/dist/components/RichTextEditor/toolbar/FontFamilySelect.vue.d.ts +2 -0
- package/dist/components/RichTextEditor/toolbar/FontSizeSelect.vue.d.ts +2 -0
- package/dist/components/RichTextEditor/toolbar/HighlightColorSelect.vue.d.ts +115 -0
- package/dist/components/RichTextEditor/toolbar/TextColorSelect.vue.d.ts +115 -0
- package/dist/components/RichTextEditor/toolbar/index.d.ts +4 -0
- package/dist/components/RichTextEditor/types.d.ts +17 -1
- package/dist/composables/useLabels/index.d.ts +4 -0
- package/dist/spire-ui.cjs +32 -32
- package/dist/spire-ui.js +19047 -18234
- package/package.json +6 -2
|
@@ -123,6 +123,7 @@ declare function __VLS_template(): {
|
|
|
123
123
|
readonly minHeight?: string | undefined;
|
|
124
124
|
readonly maxHeight?: string | undefined;
|
|
125
125
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
126
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
126
127
|
readonly hideToolbar?: boolean | undefined;
|
|
127
128
|
readonly bubbleMenu?: boolean | undefined;
|
|
128
129
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -253,6 +254,7 @@ declare function __VLS_template(): {
|
|
|
253
254
|
readonly minHeight?: string | undefined;
|
|
254
255
|
readonly maxHeight?: string | undefined;
|
|
255
256
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
257
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
256
258
|
readonly hideToolbar?: boolean | undefined;
|
|
257
259
|
readonly bubbleMenu?: boolean | undefined;
|
|
258
260
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -364,6 +366,7 @@ declare function __VLS_template(): {
|
|
|
364
366
|
readonly minHeight?: string | undefined;
|
|
365
367
|
readonly maxHeight?: string | undefined;
|
|
366
368
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
369
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
367
370
|
readonly hideToolbar?: boolean | undefined;
|
|
368
371
|
readonly bubbleMenu?: boolean | undefined;
|
|
369
372
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -524,6 +527,7 @@ declare function __VLS_template(): {
|
|
|
524
527
|
readonly minHeight?: string | undefined;
|
|
525
528
|
readonly maxHeight?: string | undefined;
|
|
526
529
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
530
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
527
531
|
readonly hideToolbar?: boolean | undefined;
|
|
528
532
|
readonly bubbleMenu?: boolean | undefined;
|
|
529
533
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -635,6 +639,7 @@ declare function __VLS_template(): {
|
|
|
635
639
|
readonly minHeight?: string | undefined;
|
|
636
640
|
readonly maxHeight?: string | undefined;
|
|
637
641
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
642
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
638
643
|
readonly hideToolbar?: boolean | undefined;
|
|
639
644
|
readonly bubbleMenu?: boolean | undefined;
|
|
640
645
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -928,6 +933,7 @@ declare const __VLS_component: import('vue').DefineComponent<ChatProps, {
|
|
|
928
933
|
readonly minHeight?: string | undefined;
|
|
929
934
|
readonly maxHeight?: string | undefined;
|
|
930
935
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
936
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
931
937
|
readonly hideToolbar?: boolean | undefined;
|
|
932
938
|
readonly bubbleMenu?: boolean | undefined;
|
|
933
939
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -1058,6 +1064,7 @@ declare const __VLS_component: import('vue').DefineComponent<ChatProps, {
|
|
|
1058
1064
|
readonly minHeight?: string | undefined;
|
|
1059
1065
|
readonly maxHeight?: string | undefined;
|
|
1060
1066
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
1067
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
1061
1068
|
readonly hideToolbar?: boolean | undefined;
|
|
1062
1069
|
readonly bubbleMenu?: boolean | undefined;
|
|
1063
1070
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -1169,6 +1176,7 @@ declare const __VLS_component: import('vue').DefineComponent<ChatProps, {
|
|
|
1169
1176
|
readonly minHeight?: string | undefined;
|
|
1170
1177
|
readonly maxHeight?: string | undefined;
|
|
1171
1178
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
1179
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
1172
1180
|
readonly hideToolbar?: boolean | undefined;
|
|
1173
1181
|
readonly bubbleMenu?: boolean | undefined;
|
|
1174
1182
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -1329,6 +1337,7 @@ declare const __VLS_component: import('vue').DefineComponent<ChatProps, {
|
|
|
1329
1337
|
readonly minHeight?: string | undefined;
|
|
1330
1338
|
readonly maxHeight?: string | undefined;
|
|
1331
1339
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
1340
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
1332
1341
|
readonly hideToolbar?: boolean | undefined;
|
|
1333
1342
|
readonly bubbleMenu?: boolean | undefined;
|
|
1334
1343
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -1440,6 +1449,7 @@ declare const __VLS_component: import('vue').DefineComponent<ChatProps, {
|
|
|
1440
1449
|
readonly minHeight?: string | undefined;
|
|
1441
1450
|
readonly maxHeight?: string | undefined;
|
|
1442
1451
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
1452
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
1443
1453
|
readonly hideToolbar?: boolean | undefined;
|
|
1444
1454
|
readonly bubbleMenu?: boolean | undefined;
|
|
1445
1455
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -1579,6 +1589,7 @@ declare const __VLS_component: import('vue').DefineComponent<ChatProps, {
|
|
|
1579
1589
|
readonly minHeight?: string | undefined;
|
|
1580
1590
|
readonly maxHeight?: string | undefined;
|
|
1581
1591
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
1592
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
1582
1593
|
readonly hideToolbar?: boolean | undefined;
|
|
1583
1594
|
readonly bubbleMenu?: boolean | undefined;
|
|
1584
1595
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -1709,6 +1720,7 @@ declare const __VLS_component: import('vue').DefineComponent<ChatProps, {
|
|
|
1709
1720
|
readonly minHeight?: string | undefined;
|
|
1710
1721
|
readonly maxHeight?: string | undefined;
|
|
1711
1722
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
1723
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
1712
1724
|
readonly hideToolbar?: boolean | undefined;
|
|
1713
1725
|
readonly bubbleMenu?: boolean | undefined;
|
|
1714
1726
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -1820,6 +1832,7 @@ declare const __VLS_component: import('vue').DefineComponent<ChatProps, {
|
|
|
1820
1832
|
readonly minHeight?: string | undefined;
|
|
1821
1833
|
readonly maxHeight?: string | undefined;
|
|
1822
1834
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
1835
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
1823
1836
|
readonly hideToolbar?: boolean | undefined;
|
|
1824
1837
|
readonly bubbleMenu?: boolean | undefined;
|
|
1825
1838
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -1980,6 +1993,7 @@ declare const __VLS_component: import('vue').DefineComponent<ChatProps, {
|
|
|
1980
1993
|
readonly minHeight?: string | undefined;
|
|
1981
1994
|
readonly maxHeight?: string | undefined;
|
|
1982
1995
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
1996
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
1983
1997
|
readonly hideToolbar?: boolean | undefined;
|
|
1984
1998
|
readonly bubbleMenu?: boolean | undefined;
|
|
1985
1999
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -2091,6 +2105,7 @@ declare const __VLS_component: import('vue').DefineComponent<ChatProps, {
|
|
|
2091
2105
|
readonly minHeight?: string | undefined;
|
|
2092
2106
|
readonly maxHeight?: string | undefined;
|
|
2093
2107
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
2108
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
2094
2109
|
readonly hideToolbar?: boolean | undefined;
|
|
2095
2110
|
readonly bubbleMenu?: boolean | undefined;
|
|
2096
2111
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -2332,6 +2347,7 @@ declare const __VLS_component: import('vue').DefineComponent<ChatProps, {
|
|
|
2332
2347
|
readonly minHeight?: string | undefined;
|
|
2333
2348
|
readonly maxHeight?: string | undefined;
|
|
2334
2349
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
2350
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
2335
2351
|
readonly hideToolbar?: boolean | undefined;
|
|
2336
2352
|
readonly bubbleMenu?: boolean | undefined;
|
|
2337
2353
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -2462,6 +2478,7 @@ declare const __VLS_component: import('vue').DefineComponent<ChatProps, {
|
|
|
2462
2478
|
readonly minHeight?: string | undefined;
|
|
2463
2479
|
readonly maxHeight?: string | undefined;
|
|
2464
2480
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
2481
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
2465
2482
|
readonly hideToolbar?: boolean | undefined;
|
|
2466
2483
|
readonly bubbleMenu?: boolean | undefined;
|
|
2467
2484
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -2573,6 +2590,7 @@ declare const __VLS_component: import('vue').DefineComponent<ChatProps, {
|
|
|
2573
2590
|
readonly minHeight?: string | undefined;
|
|
2574
2591
|
readonly maxHeight?: string | undefined;
|
|
2575
2592
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
2593
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
2576
2594
|
readonly hideToolbar?: boolean | undefined;
|
|
2577
2595
|
readonly bubbleMenu?: boolean | undefined;
|
|
2578
2596
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -2733,6 +2751,7 @@ declare const __VLS_component: import('vue').DefineComponent<ChatProps, {
|
|
|
2733
2751
|
readonly minHeight?: string | undefined;
|
|
2734
2752
|
readonly maxHeight?: string | undefined;
|
|
2735
2753
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
2754
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
2736
2755
|
readonly hideToolbar?: boolean | undefined;
|
|
2737
2756
|
readonly bubbleMenu?: boolean | undefined;
|
|
2738
2757
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -2844,6 +2863,7 @@ declare const __VLS_component: import('vue').DefineComponent<ChatProps, {
|
|
|
2844
2863
|
readonly minHeight?: string | undefined;
|
|
2845
2864
|
readonly maxHeight?: string | undefined;
|
|
2846
2865
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
2866
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
2847
2867
|
readonly hideToolbar?: boolean | undefined;
|
|
2848
2868
|
readonly bubbleMenu?: boolean | undefined;
|
|
2849
2869
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -25,6 +25,7 @@ declare function __VLS_template(): {
|
|
|
25
25
|
readonly minHeight?: string | undefined;
|
|
26
26
|
readonly maxHeight?: string | undefined;
|
|
27
27
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
28
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
28
29
|
readonly hideToolbar?: boolean | undefined;
|
|
29
30
|
readonly bubbleMenu?: boolean | undefined;
|
|
30
31
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -145,6 +146,7 @@ declare const __VLS_component: import('vue').DefineComponent<ChatInputProps, {
|
|
|
145
146
|
readonly minHeight?: string | undefined;
|
|
146
147
|
readonly maxHeight?: string | undefined;
|
|
147
148
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
149
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
148
150
|
readonly hideToolbar?: boolean | undefined;
|
|
149
151
|
readonly bubbleMenu?: boolean | undefined;
|
|
150
152
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -256,6 +258,7 @@ declare const __VLS_component: import('vue').DefineComponent<ChatInputProps, {
|
|
|
256
258
|
readonly minHeight?: string | undefined;
|
|
257
259
|
readonly maxHeight?: string | undefined;
|
|
258
260
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
261
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
259
262
|
readonly hideToolbar?: boolean | undefined;
|
|
260
263
|
readonly bubbleMenu?: boolean | undefined;
|
|
261
264
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -386,6 +389,7 @@ declare const __VLS_component: import('vue').DefineComponent<ChatInputProps, {
|
|
|
386
389
|
readonly minHeight?: string | undefined;
|
|
387
390
|
readonly maxHeight?: string | undefined;
|
|
388
391
|
readonly preset?: import('..').ToolbarPreset | undefined;
|
|
392
|
+
readonly toolbar?: import('..').CustomToolbar | undefined;
|
|
389
393
|
readonly hideToolbar?: boolean | undefined;
|
|
390
394
|
readonly bubbleMenu?: boolean | undefined;
|
|
391
395
|
readonly characterCount?: (import('..').CharacterCountConfig | boolean) | undefined;
|
|
@@ -132,6 +132,7 @@ declare const __VLS_component: import('vue').DefineComponent<DropdownMenuProps,
|
|
|
132
132
|
}>, {
|
|
133
133
|
variant: DropdownMenuVariant;
|
|
134
134
|
color: DropdownMenuColor;
|
|
135
|
+
maxHeight: string;
|
|
135
136
|
selectionMode: import('./types').DropdownSelectionMode;
|
|
136
137
|
hideSelectedIcon: boolean;
|
|
137
138
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
@@ -12,6 +12,7 @@ declare function __VLS_template(): {
|
|
|
12
12
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
13
|
declare const __VLS_component: import('vue').DefineComponent<DropdownSubmenuProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<DropdownSubmenuProps> & Readonly<{}>, {
|
|
14
14
|
isDisabled: boolean;
|
|
15
|
+
maxHeight: string;
|
|
15
16
|
openDelay: number;
|
|
16
17
|
closeDelay: number;
|
|
17
18
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
@@ -30,6 +30,8 @@ export interface DropdownSubmenuProps {
|
|
|
30
30
|
openDelay?: number;
|
|
31
31
|
/** Delay before closing on mouse leave (ms) */
|
|
32
32
|
closeDelay?: number;
|
|
33
|
+
/** Maximum height of the submenu content area (e.g., '300px', '20rem') */
|
|
34
|
+
maxHeight?: string;
|
|
33
35
|
}
|
|
34
36
|
export interface DropdownProps {
|
|
35
37
|
/** Semantic type affecting ARIA roles */
|
|
@@ -64,6 +66,8 @@ export interface DropdownMenuProps {
|
|
|
64
66
|
hideSelectedIcon?: boolean;
|
|
65
67
|
/** Override parent closeOnSelect */
|
|
66
68
|
closeOnSelect?: boolean;
|
|
69
|
+
/** Maximum height of the menu content area (e.g., '300px', '20rem') */
|
|
70
|
+
maxHeight?: string;
|
|
67
71
|
}
|
|
68
72
|
export interface DropdownSectionProps {
|
|
69
73
|
/** Section title displayed above items */
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { ToolbarPreset } from './types';
|
|
1
|
+
import { ToolbarPreset, CustomToolbar } from './types';
|
|
2
2
|
export interface RichTextEditorToolbarProps {
|
|
3
|
-
/** Toolbar preset configuration */
|
|
3
|
+
/** Toolbar preset configuration (ignored if toolbar prop is provided) */
|
|
4
4
|
preset?: ToolbarPreset;
|
|
5
|
+
/**
|
|
6
|
+
* Custom toolbar items array. Overrides preset when provided.
|
|
7
|
+
* Each inner array creates a button group separated by dividers.
|
|
8
|
+
*/
|
|
9
|
+
toolbar?: CustomToolbar;
|
|
5
10
|
}
|
|
6
11
|
declare const _default: import('vue').DefineComponent<RichTextEditorToolbarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<RichTextEditorToolbarProps> & Readonly<{}>, {
|
|
7
12
|
preset: ToolbarPreset;
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { AnyExtension } from '@tiptap/vue-3';
|
|
2
2
|
import { RichTextEditorProps } from './types';
|
|
3
|
+
declare module '@tiptap/core' {
|
|
4
|
+
interface Commands<ReturnType> {
|
|
5
|
+
fontSize: {
|
|
6
|
+
setFontSize: (fontSize: string) => ReturnType;
|
|
7
|
+
unsetFontSize: () => ReturnType;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
}
|
|
3
11
|
/**
|
|
4
12
|
* Creates the TipTap extensions array based on component props.
|
|
5
13
|
*/
|
|
@@ -2,9 +2,9 @@ export { default as RichTextEditor } from './RichTextEditor.vue';
|
|
|
2
2
|
export { default as RichTextEditorToolbar } from './RichTextEditorToolbar.vue';
|
|
3
3
|
export { default as RichTextEditorBubbleMenu } from './RichTextEditorBubbleMenu.vue';
|
|
4
4
|
export { default as RichTextEditorCharacterCount } from './RichTextEditorCharacterCount.vue';
|
|
5
|
-
export type { RichTextEditorProps, RichTextEditorSize, RichTextEditorVariant, ToolbarPreset, CharacterCountConfig, ImageUploadHandler, RichTextEditorContext, ToolbarButtonProps, CharacterCountProps, LinkModalProps, ImageModalProps, } from './types';
|
|
5
|
+
export type { RichTextEditorProps, RichTextEditorSize, RichTextEditorVariant, ToolbarPreset, ToolbarItemId, CustomToolbar, CharacterCountConfig, ImageUploadHandler, RichTextEditorContext, ToolbarButtonProps, CharacterCountProps, LinkModalProps, ImageModalProps, } from './types';
|
|
6
6
|
export { RICH_TEXT_EDITOR_KEY } from './types';
|
|
7
7
|
export { TOOLBAR_PRESETS, getToolbarPreset, type ToolbarItem } from './presets';
|
|
8
8
|
export { createExtensions } from './extensions';
|
|
9
9
|
export { useRichTextEditor } from './composables';
|
|
10
|
-
export { ToolbarButton, ToolbarDivider, ToolbarGroup, BoldButton, ItalicButton, UnderlineButton, StrikeButton, CodeButton, HeadingSelect, TextAlignSelect, BulletListButton, OrderedListButton, TaskListButton, BlockquoteButton, CodeBlockButton, HorizontalRuleButton, LinkButton, ImageButton, TableButton, UndoButton, RedoButton, ClearFormattingButton, } from './toolbar';
|
|
10
|
+
export { ToolbarButton, ToolbarDivider, ToolbarGroup, BoldButton, ItalicButton, UnderlineButton, StrikeButton, CodeButton, HeadingSelect, TextAlignSelect, BulletListButton, OrderedListButton, TaskListButton, BlockquoteButton, CodeBlockButton, HorizontalRuleButton, LinkButton, ImageButton, TableButton, UndoButton, RedoButton, ClearFormattingButton, FontFamilySelect, FontSizeSelect, TextColorSelect, HighlightColorSelect, } from './toolbar';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLSpanElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLSpanElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
2
|
+
popoverRef: ({
|
|
3
|
+
$: import('vue').ComponentInternalInstance;
|
|
4
|
+
$data: {};
|
|
5
|
+
$props: {
|
|
6
|
+
readonly modelValue?: boolean | undefined;
|
|
7
|
+
readonly trigger?: (import('../..').PopoverTrigger | import('../..').PopoverTrigger[]) | undefined;
|
|
8
|
+
readonly placement?: import('../../..').Placement | undefined;
|
|
9
|
+
readonly showDelay?: number | undefined;
|
|
10
|
+
readonly hideDelay?: number | undefined;
|
|
11
|
+
readonly strategy?: import('../..').PopoverStrategy | undefined;
|
|
12
|
+
readonly disabled?: boolean | undefined;
|
|
13
|
+
readonly closeOnClickOutside?: boolean | undefined;
|
|
14
|
+
readonly closeOnEscape?: boolean | undefined;
|
|
15
|
+
readonly onClose?: (() => any) | undefined;
|
|
16
|
+
readonly "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
17
|
+
readonly onOpen?: (() => any) | undefined;
|
|
18
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
19
|
+
$attrs: {
|
|
20
|
+
[x: string]: unknown;
|
|
21
|
+
};
|
|
22
|
+
$refs: {
|
|
23
|
+
[x: string]: unknown;
|
|
24
|
+
} & {
|
|
25
|
+
dialogRef: HTMLDialogElement;
|
|
26
|
+
};
|
|
27
|
+
$slots: Readonly<{
|
|
28
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
29
|
+
}>;
|
|
30
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
31
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
32
|
+
$host: Element | null;
|
|
33
|
+
$emit: ((event: "close") => void) & ((event: "update:modelValue", value: boolean) => void) & ((event: "open") => void);
|
|
34
|
+
$el: any;
|
|
35
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('../..').PopoverProps> & Readonly<{
|
|
36
|
+
onClose?: (() => any) | undefined;
|
|
37
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
38
|
+
onOpen?: (() => any) | undefined;
|
|
39
|
+
}>, {
|
|
40
|
+
open: () => void;
|
|
41
|
+
close: () => void;
|
|
42
|
+
toggle: () => void;
|
|
43
|
+
isOpen: import('vue').Ref<boolean, boolean>;
|
|
44
|
+
triggerRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
45
|
+
contentRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
46
|
+
dialogRef: import('vue').Ref<HTMLDialogElement | null, HTMLDialogElement | null>;
|
|
47
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
48
|
+
close: () => any;
|
|
49
|
+
"update:modelValue": (value: boolean) => any;
|
|
50
|
+
open: () => any;
|
|
51
|
+
}, string, {
|
|
52
|
+
disabled: boolean;
|
|
53
|
+
placement: import('../../..').Placement;
|
|
54
|
+
trigger: import('../..').PopoverTrigger | import('../..').PopoverTrigger[];
|
|
55
|
+
showDelay: number;
|
|
56
|
+
hideDelay: number;
|
|
57
|
+
closeOnEscape: boolean;
|
|
58
|
+
strategy: import('../..').PopoverStrategy;
|
|
59
|
+
closeOnClickOutside: boolean;
|
|
60
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
61
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
62
|
+
created?: (() => void) | (() => void)[];
|
|
63
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
64
|
+
mounted?: (() => void) | (() => void)[];
|
|
65
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
66
|
+
updated?: (() => void) | (() => void)[];
|
|
67
|
+
activated?: (() => void) | (() => void)[];
|
|
68
|
+
deactivated?: (() => void) | (() => void)[];
|
|
69
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
70
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
71
|
+
destroyed?: (() => void) | (() => void)[];
|
|
72
|
+
unmounted?: (() => void) | (() => void)[];
|
|
73
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
74
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
75
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
76
|
+
};
|
|
77
|
+
$forceUpdate: () => void;
|
|
78
|
+
$nextTick: typeof import('vue').nextTick;
|
|
79
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
80
|
+
} & Readonly<{
|
|
81
|
+
disabled: boolean;
|
|
82
|
+
placement: import('../../..').Placement;
|
|
83
|
+
trigger: import('../..').PopoverTrigger | import('../..').PopoverTrigger[];
|
|
84
|
+
showDelay: number;
|
|
85
|
+
hideDelay: number;
|
|
86
|
+
closeOnEscape: boolean;
|
|
87
|
+
strategy: import('../..').PopoverStrategy;
|
|
88
|
+
closeOnClickOutside: boolean;
|
|
89
|
+
}> & Omit<Readonly<import('../..').PopoverProps> & Readonly<{
|
|
90
|
+
onClose?: (() => any) | undefined;
|
|
91
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
92
|
+
onOpen?: (() => any) | undefined;
|
|
93
|
+
}>, "close" | "isOpen" | "open" | "toggle" | "dialogRef" | "triggerRef" | "contentRef" | ("disabled" | "placement" | "trigger" | "showDelay" | "hideDelay" | "closeOnEscape" | "strategy" | "closeOnClickOutside")> & import('vue').ShallowUnwrapRef<{
|
|
94
|
+
open: () => void;
|
|
95
|
+
close: () => void;
|
|
96
|
+
toggle: () => void;
|
|
97
|
+
isOpen: import('vue').Ref<boolean, boolean>;
|
|
98
|
+
triggerRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
99
|
+
contentRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
100
|
+
dialogRef: import('vue').Ref<HTMLDialogElement | null, HTMLDialogElement | null>;
|
|
101
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
102
|
+
$slots: {
|
|
103
|
+
default?(_: {}): any;
|
|
104
|
+
content?(_: {
|
|
105
|
+
close: () => void;
|
|
106
|
+
isOpen: boolean;
|
|
107
|
+
}): any;
|
|
108
|
+
content?(_: {
|
|
109
|
+
close: () => void;
|
|
110
|
+
isOpen: boolean;
|
|
111
|
+
}): any;
|
|
112
|
+
};
|
|
113
|
+
}) | null;
|
|
114
|
+
}, any>;
|
|
115
|
+
export default _default;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
2
|
+
popoverRef: ({
|
|
3
|
+
$: import('vue').ComponentInternalInstance;
|
|
4
|
+
$data: {};
|
|
5
|
+
$props: {
|
|
6
|
+
readonly modelValue?: boolean | undefined;
|
|
7
|
+
readonly trigger?: (import('../..').PopoverTrigger | import('../..').PopoverTrigger[]) | undefined;
|
|
8
|
+
readonly placement?: import('../../..').Placement | undefined;
|
|
9
|
+
readonly showDelay?: number | undefined;
|
|
10
|
+
readonly hideDelay?: number | undefined;
|
|
11
|
+
readonly strategy?: import('../..').PopoverStrategy | undefined;
|
|
12
|
+
readonly disabled?: boolean | undefined;
|
|
13
|
+
readonly closeOnClickOutside?: boolean | undefined;
|
|
14
|
+
readonly closeOnEscape?: boolean | undefined;
|
|
15
|
+
readonly onClose?: (() => any) | undefined;
|
|
16
|
+
readonly "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
17
|
+
readonly onOpen?: (() => any) | undefined;
|
|
18
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
19
|
+
$attrs: {
|
|
20
|
+
[x: string]: unknown;
|
|
21
|
+
};
|
|
22
|
+
$refs: {
|
|
23
|
+
[x: string]: unknown;
|
|
24
|
+
} & {
|
|
25
|
+
dialogRef: HTMLDialogElement;
|
|
26
|
+
};
|
|
27
|
+
$slots: Readonly<{
|
|
28
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
29
|
+
}>;
|
|
30
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
31
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
32
|
+
$host: Element | null;
|
|
33
|
+
$emit: ((event: "close") => void) & ((event: "update:modelValue", value: boolean) => void) & ((event: "open") => void);
|
|
34
|
+
$el: any;
|
|
35
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('../..').PopoverProps> & Readonly<{
|
|
36
|
+
onClose?: (() => any) | undefined;
|
|
37
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
38
|
+
onOpen?: (() => any) | undefined;
|
|
39
|
+
}>, {
|
|
40
|
+
open: () => void;
|
|
41
|
+
close: () => void;
|
|
42
|
+
toggle: () => void;
|
|
43
|
+
isOpen: import('vue').Ref<boolean, boolean>;
|
|
44
|
+
triggerRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
45
|
+
contentRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
46
|
+
dialogRef: import('vue').Ref<HTMLDialogElement | null, HTMLDialogElement | null>;
|
|
47
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
48
|
+
close: () => any;
|
|
49
|
+
"update:modelValue": (value: boolean) => any;
|
|
50
|
+
open: () => any;
|
|
51
|
+
}, string, {
|
|
52
|
+
disabled: boolean;
|
|
53
|
+
placement: import('../../..').Placement;
|
|
54
|
+
trigger: import('../..').PopoverTrigger | import('../..').PopoverTrigger[];
|
|
55
|
+
showDelay: number;
|
|
56
|
+
hideDelay: number;
|
|
57
|
+
closeOnEscape: boolean;
|
|
58
|
+
strategy: import('../..').PopoverStrategy;
|
|
59
|
+
closeOnClickOutside: boolean;
|
|
60
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
61
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
62
|
+
created?: (() => void) | (() => void)[];
|
|
63
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
64
|
+
mounted?: (() => void) | (() => void)[];
|
|
65
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
66
|
+
updated?: (() => void) | (() => void)[];
|
|
67
|
+
activated?: (() => void) | (() => void)[];
|
|
68
|
+
deactivated?: (() => void) | (() => void)[];
|
|
69
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
70
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
71
|
+
destroyed?: (() => void) | (() => void)[];
|
|
72
|
+
unmounted?: (() => void) | (() => void)[];
|
|
73
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
74
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
75
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
76
|
+
};
|
|
77
|
+
$forceUpdate: () => void;
|
|
78
|
+
$nextTick: typeof import('vue').nextTick;
|
|
79
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
80
|
+
} & Readonly<{
|
|
81
|
+
disabled: boolean;
|
|
82
|
+
placement: import('../../..').Placement;
|
|
83
|
+
trigger: import('../..').PopoverTrigger | import('../..').PopoverTrigger[];
|
|
84
|
+
showDelay: number;
|
|
85
|
+
hideDelay: number;
|
|
86
|
+
closeOnEscape: boolean;
|
|
87
|
+
strategy: import('../..').PopoverStrategy;
|
|
88
|
+
closeOnClickOutside: boolean;
|
|
89
|
+
}> & Omit<Readonly<import('../..').PopoverProps> & Readonly<{
|
|
90
|
+
onClose?: (() => any) | undefined;
|
|
91
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
92
|
+
onOpen?: (() => any) | undefined;
|
|
93
|
+
}>, "close" | "isOpen" | "open" | "toggle" | "dialogRef" | "triggerRef" | "contentRef" | ("disabled" | "placement" | "trigger" | "showDelay" | "hideDelay" | "closeOnEscape" | "strategy" | "closeOnClickOutside")> & import('vue').ShallowUnwrapRef<{
|
|
94
|
+
open: () => void;
|
|
95
|
+
close: () => void;
|
|
96
|
+
toggle: () => void;
|
|
97
|
+
isOpen: import('vue').Ref<boolean, boolean>;
|
|
98
|
+
triggerRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
99
|
+
contentRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
100
|
+
dialogRef: import('vue').Ref<HTMLDialogElement | null, HTMLDialogElement | null>;
|
|
101
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
102
|
+
$slots: {
|
|
103
|
+
default?(_: {}): any;
|
|
104
|
+
content?(_: {
|
|
105
|
+
close: () => void;
|
|
106
|
+
isOpen: boolean;
|
|
107
|
+
}): any;
|
|
108
|
+
content?(_: {
|
|
109
|
+
close: () => void;
|
|
110
|
+
isOpen: boolean;
|
|
111
|
+
}): any;
|
|
112
|
+
};
|
|
113
|
+
}) | null;
|
|
114
|
+
}, any>;
|
|
115
|
+
export default _default;
|
|
@@ -20,3 +20,7 @@ export { default as TableButton } from './TableButton.vue';
|
|
|
20
20
|
export { default as UndoButton } from './UndoButton.vue';
|
|
21
21
|
export { default as RedoButton } from './RedoButton.vue';
|
|
22
22
|
export { default as ClearFormattingButton } from './ClearFormattingButton.vue';
|
|
23
|
+
export { default as FontFamilySelect } from './FontFamilySelect.vue';
|
|
24
|
+
export { default as FontSizeSelect } from './FontSizeSelect.vue';
|
|
25
|
+
export { default as TextColorSelect } from './TextColorSelect.vue';
|
|
26
|
+
export { default as HighlightColorSelect } from './HighlightColorSelect.vue';
|
|
@@ -3,6 +3,16 @@ import { Editor, AnyExtension } from '@tiptap/vue-3';
|
|
|
3
3
|
export type RichTextEditorSize = 'sm' | 'md' | 'lg';
|
|
4
4
|
export type RichTextEditorVariant = 'outline' | 'filled';
|
|
5
5
|
export type ToolbarPreset = 'minimal' | 'standard' | 'full';
|
|
6
|
+
/**
|
|
7
|
+
* Toolbar item identifiers for custom toolbar configuration.
|
|
8
|
+
* Each string corresponds to a toolbar component.
|
|
9
|
+
*/
|
|
10
|
+
export type ToolbarItemId = 'bold' | 'italic' | 'underline' | 'strike' | 'code' | 'heading' | 'textAlign' | 'bulletList' | 'orderedList' | 'taskList' | 'blockquote' | 'codeBlock' | 'horizontalRule' | 'link' | 'image' | 'table' | 'undo' | 'redo' | 'clearFormatting' | 'fontFamily' | 'fontSize' | 'textColor' | 'highlightColor';
|
|
11
|
+
/**
|
|
12
|
+
* Custom toolbar configuration.
|
|
13
|
+
* Each inner array represents a group of buttons separated by dividers.
|
|
14
|
+
*/
|
|
15
|
+
export type CustomToolbar = ToolbarItemId[][];
|
|
6
16
|
/**
|
|
7
17
|
* Image upload handler function type.
|
|
8
18
|
* Receives a File object and should return a Promise resolving to the uploaded image URL.
|
|
@@ -45,8 +55,14 @@ export interface RichTextEditorProps {
|
|
|
45
55
|
minHeight?: string;
|
|
46
56
|
/** Maximum height (enables scrolling when exceeded) */
|
|
47
57
|
maxHeight?: string;
|
|
48
|
-
/** Toolbar preset configuration */
|
|
58
|
+
/** Toolbar preset configuration (ignored if toolbar prop is provided) */
|
|
49
59
|
preset?: ToolbarPreset;
|
|
60
|
+
/**
|
|
61
|
+
* Custom toolbar items array. Overrides preset when provided.
|
|
62
|
+
* Each inner array creates a button group separated by dividers.
|
|
63
|
+
* @example [['bold', 'italic'], ['fontFamily', 'fontSize'], ['link']]
|
|
64
|
+
*/
|
|
65
|
+
toolbar?: CustomToolbar;
|
|
50
66
|
/** Hide the toolbar entirely */
|
|
51
67
|
hideToolbar?: boolean;
|
|
52
68
|
/** Enable selection-based bubble menu */
|
|
@@ -173,6 +173,10 @@ export interface SpireLabels {
|
|
|
173
173
|
tableOptions: string;
|
|
174
174
|
headingLevel: string;
|
|
175
175
|
textAlignment: string;
|
|
176
|
+
fontFamily: string;
|
|
177
|
+
fontSize: string;
|
|
178
|
+
textColor: string;
|
|
179
|
+
highlightColor: string;
|
|
176
180
|
};
|
|
177
181
|
/** SearchInput component labels */
|
|
178
182
|
searchInput: {
|