flameresttable 1.0.106 → 1.0.108
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/package.json +22 -20
- package/src/App.vue +3 -1
- package/src/Table/FlameTable.ts +2 -0
- package/src/Table/Table.vue +48 -8
- package/src/components/default/Modal.vue +1 -1
- package/src/components/editor/EditorPopup.vue +104 -0
- package/src/components/editor/LinkDialog.vue +106 -0
- package/src/components/editor/SelectImage.vue +53 -0
- package/src/components/editor/TextEditor.ts +129 -0
- package/src/components/editor/TextEditorConstants.ts +145 -0
- package/src/components/editor/styles/github.scss +1135 -0
- package/src/components/editor/styles/maidragon.scss +746 -0
- package/src/main.ts +25 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import type { NodeTypeMenu } from 'vuetify-pro-tiptap/lib/extensions/components/bubble'
|
|
2
|
+
|
|
3
|
+
export const DEFAULT_LANG_VALUE = 'en' as const
|
|
4
|
+
|
|
5
|
+
/** Throttle time for editor input (milliseconds) */
|
|
6
|
+
export const EDITOR_UPDATE_THROTTLE_WAIT_TIME = 200 as const
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* watch throttling time must be less than the update time
|
|
10
|
+
* otherwise the cursor position will reach the end
|
|
11
|
+
*/
|
|
12
|
+
export const EDITOR_UPDATE_WATCH_THROTTLE_WAIT_TIME = EDITOR_UPDATE_THROTTLE_WAIT_TIME - 80
|
|
13
|
+
|
|
14
|
+
/** Minimum size for image adjustments */
|
|
15
|
+
export const IMAGE_MIN_SIZE = 20 as const
|
|
16
|
+
/** Maximum size for image adjustments */
|
|
17
|
+
export const IMAGE_MAX_SIZE = 100000 as const
|
|
18
|
+
/** Throttle time during adjustments for images (milliseconds) */
|
|
19
|
+
export const IMAGE_THROTTLE_WAIT_TIME = 16 as const
|
|
20
|
+
|
|
21
|
+
/** Default number of rows and columns for grids when creating a table */
|
|
22
|
+
export const TABLE_INIT_GRID_SIZE = 6 as const
|
|
23
|
+
/** Maximum number of rows and columns for grids when creating a table */
|
|
24
|
+
export const TABLE_MAX_GRID_SIZE = 10 as const
|
|
25
|
+
/** Minimum number of rows and columns for grids when creating a table */
|
|
26
|
+
export const TABLE_DEFAULT_SELECTED_GRID_SIZE = 2 as const
|
|
27
|
+
|
|
28
|
+
/** Default color list for text color and text highlight */
|
|
29
|
+
export const COLORS_LIST = [
|
|
30
|
+
'#f44336',
|
|
31
|
+
'#e91e63',
|
|
32
|
+
'#9c27b0',
|
|
33
|
+
'#673ab7',
|
|
34
|
+
'#3f51b5',
|
|
35
|
+
'#2196f3',
|
|
36
|
+
'#03a9f4',
|
|
37
|
+
'#00bcd4',
|
|
38
|
+
'#009688',
|
|
39
|
+
'#4caf50',
|
|
40
|
+
'#8bc34a',
|
|
41
|
+
'#cddc39',
|
|
42
|
+
'#ffeb3b',
|
|
43
|
+
'#ffc107',
|
|
44
|
+
'#ff9800',
|
|
45
|
+
'#ff5722',
|
|
46
|
+
'#000000',
|
|
47
|
+
'#333333',
|
|
48
|
+
'#666666',
|
|
49
|
+
'#999999',
|
|
50
|
+
'#CCCCCC',
|
|
51
|
+
'#D5D5D4',
|
|
52
|
+
'#E8E8E8',
|
|
53
|
+
'#EEEEEE'
|
|
54
|
+
] as const
|
|
55
|
+
|
|
56
|
+
export interface FontFamilyProps {
|
|
57
|
+
title: string
|
|
58
|
+
value: string
|
|
59
|
+
divider?: boolean
|
|
60
|
+
default?: boolean
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** Default font family value used */
|
|
64
|
+
export const DEFAULT_FONT_FAMILY_VALUE = 'Roboto' as const
|
|
65
|
+
|
|
66
|
+
/** Default font family list */
|
|
67
|
+
export const DEFAULT_FONT_FAMILY_LIST: FontFamilyProps[] = [
|
|
68
|
+
{ title: 'editor.default', value: DEFAULT_FONT_FAMILY_VALUE, divider: true, default: true },
|
|
69
|
+
{ title: 'Arial', value: 'Arial' },
|
|
70
|
+
{ title: 'Arial Black', value: 'Arial Black' },
|
|
71
|
+
{ title: 'Georgia', value: 'Georgia' },
|
|
72
|
+
{ title: 'Impact', value: 'Impact' },
|
|
73
|
+
{ title: 'Helvetica', value: 'Helvetica' },
|
|
74
|
+
{ title: 'Tahoma', value: 'Tahoma' },
|
|
75
|
+
{ title: 'Times New Roman', value: 'Times New Roman' },
|
|
76
|
+
{ title: 'Verdana', value: 'Verdana' },
|
|
77
|
+
{ title: 'Courier New', value: 'Courier New', divider: true },
|
|
78
|
+
{ title: 'Monaco', value: 'Monaco' },
|
|
79
|
+
{ title: 'Monospace', value: 'monospace' }
|
|
80
|
+
]
|
|
81
|
+
|
|
82
|
+
export type MarkdownThemeProps = FontFamilyProps
|
|
83
|
+
|
|
84
|
+
/** Default Markdown theme value */
|
|
85
|
+
export const DEFAULT_MARKDOWN_THEME_VALUE = 'default' as const
|
|
86
|
+
|
|
87
|
+
/** Default list of Markdown themes */
|
|
88
|
+
export const DEFAULT_MARKDOWN_THEME_LIST: FontFamilyProps[] = [
|
|
89
|
+
{ title: 'editor.default', value: DEFAULT_MARKDOWN_THEME_VALUE, default: true }
|
|
90
|
+
]
|
|
91
|
+
|
|
92
|
+
/** Default font size list */
|
|
93
|
+
export const DEFAULT_FONT_SIZE_LIST = [8, 10, 12, 14, 16, 18, 20, 24, 30, 36, 48, 60, 72] as const
|
|
94
|
+
|
|
95
|
+
/** Default font size value */
|
|
96
|
+
export const DEFAULT_FONT_SIZE_VALUUE = 'default' as const
|
|
97
|
+
|
|
98
|
+
/** Options for setting image size in the bubble menu */
|
|
99
|
+
export enum IMAGE_SIZE {
|
|
100
|
+
'size-small' = 200,
|
|
101
|
+
'size-medium' = 500,
|
|
102
|
+
'size-large' = '100%'
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** Options for setting video size in the bubble menu */
|
|
106
|
+
export enum VIDEO_SIZE {
|
|
107
|
+
'size-small' = 480,
|
|
108
|
+
'size-medium' = 640,
|
|
109
|
+
'size-large' = '100%'
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** Actions displayed in the bubble menu */
|
|
113
|
+
export const NODE_TYPE_MENU: NodeTypeMenu = {
|
|
114
|
+
image: [
|
|
115
|
+
'float-left',
|
|
116
|
+
'float-none',
|
|
117
|
+
'float-right',
|
|
118
|
+
'divider',
|
|
119
|
+
'image-size-small',
|
|
120
|
+
'image-size-medium',
|
|
121
|
+
'image-size-large',
|
|
122
|
+
'divider',
|
|
123
|
+
'textAlign',
|
|
124
|
+
'divider',
|
|
125
|
+
'image',
|
|
126
|
+
'image-aspect-ratio',
|
|
127
|
+
'remove'
|
|
128
|
+
],
|
|
129
|
+
text: ['bold', 'italic', 'underline', 'strike', 'divider', 'color', 'highlight', 'textAlign', 'divider', 'link'],
|
|
130
|
+
link: [
|
|
131
|
+
'bold',
|
|
132
|
+
'italic',
|
|
133
|
+
'underline',
|
|
134
|
+
'strike',
|
|
135
|
+
'divider',
|
|
136
|
+
'color',
|
|
137
|
+
'highlight',
|
|
138
|
+
'textAlign',
|
|
139
|
+
'divider',
|
|
140
|
+
'link',
|
|
141
|
+
'unlink',
|
|
142
|
+
'link-open'
|
|
143
|
+
],
|
|
144
|
+
video: ['video-size-small', 'video-size-medium', 'video-size-large', 'divider', 'video', 'remove']
|
|
145
|
+
}
|