vue-editify 0.1.19 → 0.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/README.md +3 -3
  2. package/examples/App.vue +62 -62
  3. package/examples/main.ts +4 -4
  4. package/lib/components/button/button.vue.d.ts +11 -11
  5. package/lib/components/checkbox/checkbox.vue.d.ts +8 -8
  6. package/lib/components/colors/colors.vue.d.ts +4 -4
  7. package/lib/components/icon/icon.vue.d.ts +1 -1
  8. package/lib/components/insertImage/insertImage.vue.d.ts +9 -9
  9. package/lib/components/insertLink/insertLink.vue.d.ts +2 -2
  10. package/lib/components/insertTable/insertTable.vue.d.ts +2 -2
  11. package/lib/components/insertVideo/insertVideo.vue.d.ts +9 -9
  12. package/lib/components/layer/layer.vue.d.ts +9 -9
  13. package/lib/components/menu/menu.vue.d.ts +4 -4
  14. package/lib/components/toolbar/toolbar.vue.d.ts +9 -9
  15. package/lib/components/tooltip/tooltip.vue.d.ts +1 -1
  16. package/lib/components/triangle/triangle.vue.d.ts +4 -4
  17. package/lib/editify/editify.vue.d.ts +68 -68
  18. package/lib/editify.es.js +35 -24
  19. package/lib/editify.umd.js +1 -1
  20. package/lib/index.d.ts +1 -1
  21. package/lib/style.css +1 -1
  22. package/package.json +45 -45
  23. package/src/components/button/button.less +145 -145
  24. package/src/components/button/button.vue +197 -197
  25. package/src/components/button/props.ts +95 -95
  26. package/src/components/checkbox/checkbox.less +84 -84
  27. package/src/components/checkbox/checkbox.vue +68 -68
  28. package/src/components/checkbox/props.ts +49 -49
  29. package/src/components/colors/colors.less +75 -75
  30. package/src/components/colors/colors.vue +36 -36
  31. package/src/components/colors/props.ts +29 -29
  32. package/src/components/icon/icon.less +14 -14
  33. package/src/components/icon/icon.vue +12 -12
  34. package/src/components/icon/props.ts +11 -11
  35. package/src/components/insertImage/insertImage.less +135 -135
  36. package/src/components/insertImage/insertImage.vue +146 -146
  37. package/src/components/insertImage/props.ts +43 -43
  38. package/src/components/insertLink/insertLink.less +64 -64
  39. package/src/components/insertLink/insertLink.vue +58 -58
  40. package/src/components/insertLink/props.ts +16 -16
  41. package/src/components/insertTable/insertTable.less +54 -54
  42. package/src/components/insertTable/insertTable.vue +85 -85
  43. package/src/components/insertTable/props.ts +27 -27
  44. package/src/components/insertVideo/insertVideo.less +135 -135
  45. package/src/components/insertVideo/insertVideo.vue +146 -146
  46. package/src/components/insertVideo/props.ts +43 -43
  47. package/src/components/layer/layer.less +49 -49
  48. package/src/components/layer/layer.vue +598 -598
  49. package/src/components/layer/props.ts +71 -71
  50. package/src/components/menu/menu.less +63 -63
  51. package/src/components/menu/menu.vue +1569 -1569
  52. package/src/components/menu/props.ts +17 -17
  53. package/src/components/toolbar/props.ts +35 -35
  54. package/src/components/toolbar/toolbar.less +89 -89
  55. package/src/components/toolbar/toolbar.vue +1101 -1101
  56. package/src/components/tooltip/props.ts +21 -21
  57. package/src/components/tooltip/tooltip.less +23 -23
  58. package/src/components/tooltip/tooltip.vue +37 -37
  59. package/src/components/triangle/props.ts +26 -26
  60. package/src/components/triangle/triangle.less +79 -79
  61. package/src/components/triangle/triangle.vue +65 -65
  62. package/src/core/function.ts +1150 -1144
  63. package/src/core/rule.ts +259 -259
  64. package/src/core/tool.ts +1137 -1137
  65. package/src/css/base.less +30 -30
  66. package/src/css/hljs.less +54 -54
  67. package/src/editify/editify.less +404 -404
  68. package/src/editify/editify.vue +810 -803
  69. package/src/editify/props.ts +156 -156
  70. package/src/hljs/index.ts +197 -197
  71. package/src/icon/iconfont.css +219 -219
  72. package/src/index.ts +32 -32
  73. package/src/locale/en_US.ts +88 -88
  74. package/src/locale/index.ts +12 -12
  75. package/src/locale/zh_CN.ts +88 -88
  76. package/tsconfig.json +27 -27
  77. package/tsconfig.node.json +11 -11
  78. package/vite-env.d.ts +1 -1
  79. package/vite.config.ts +42 -42
@@ -1,17 +1,17 @@
1
- import { ExtractPublicPropTypes, PropType } from 'vue'
2
- import { MenuConfigType } from '../../core/tool'
3
-
4
- export const MenuProps = {
5
- //菜单栏配置
6
- config: {
7
- type: Object as PropType<MenuConfigType>,
8
- default: null
9
- },
10
- //主题色
11
- color: {
12
- type: String,
13
- default: ''
14
- }
15
- }
16
-
17
- export type MenuPropsType = ExtractPublicPropTypes<typeof MenuProps>
1
+ import { ExtractPublicPropTypes, PropType } from 'vue'
2
+ import { MenuConfigType } from '../../core/tool'
3
+
4
+ export const MenuProps = {
5
+ //菜单栏配置
6
+ config: {
7
+ type: Object as PropType<MenuConfigType>,
8
+ default: null
9
+ },
10
+ //主题色
11
+ color: {
12
+ type: String,
13
+ default: ''
14
+ }
15
+ }
16
+
17
+ export type MenuPropsType = ExtractPublicPropTypes<typeof MenuProps>
@@ -1,35 +1,35 @@
1
- import { ExtractPublicPropTypes, PropType } from 'vue'
2
- import { ToolbarConfigType } from '../../core/tool'
3
-
4
- export const ToolbarProps = {
5
- //是否显示
6
- modelValue: {
7
- type: Boolean,
8
- default: false
9
- },
10
- //关联元素
11
- node: {
12
- type: [String, Node] as PropType<string | HTMLElement>,
13
- default: null
14
- },
15
- //类型
16
- type: {
17
- type: String as PropType<'text' | 'table' | 'link' | 'codeBlock' | 'image' | 'video'>,
18
- default: 'text',
19
- validator(value: any) {
20
- return ['text', 'table', 'link', 'codeBlock', 'image', 'video'].includes(value)
21
- }
22
- },
23
- //工具条配置
24
- config: {
25
- type: Object as PropType<ToolbarConfigType>,
26
- default: null
27
- },
28
- //主题色
29
- color: {
30
- type: String,
31
- default: ''
32
- }
33
- }
34
-
35
- export type ToolbarPropsType = ExtractPublicPropTypes<typeof ToolbarProps>
1
+ import { ExtractPublicPropTypes, PropType } from 'vue'
2
+ import { ToolbarConfigType } from '../../core/tool'
3
+
4
+ export const ToolbarProps = {
5
+ //是否显示
6
+ modelValue: {
7
+ type: Boolean,
8
+ default: false
9
+ },
10
+ //关联元素
11
+ node: {
12
+ type: [String, Node] as PropType<string | HTMLElement>,
13
+ default: null
14
+ },
15
+ //类型
16
+ type: {
17
+ type: String as PropType<'text' | 'table' | 'link' | 'codeBlock' | 'image' | 'video'>,
18
+ default: 'text',
19
+ validator(value: any) {
20
+ return ['text', 'table', 'link', 'codeBlock', 'image', 'video'].includes(value)
21
+ }
22
+ },
23
+ //工具条配置
24
+ config: {
25
+ type: Object as PropType<ToolbarConfigType>,
26
+ default: null
27
+ },
28
+ //主题色
29
+ color: {
30
+ type: String,
31
+ default: ''
32
+ }
33
+ }
34
+
35
+ export type ToolbarPropsType = ExtractPublicPropTypes<typeof ToolbarProps>
@@ -1,89 +1,89 @@
1
- .editify-toolbar {
2
- display: flex;
3
- justify-content: flex-start;
4
- align-items: center;
5
- padding: 6px 10px;
6
-
7
- .editify-icon-rotate {
8
- transform: rotate(180deg);
9
- }
10
- }
11
-
12
- .editify-toolbar-link {
13
- display: block;
14
- width: 280px;
15
- padding: 4px;
16
-
17
- .editify-toolbar-link-label {
18
- display: block;
19
- text-align: left;
20
- margin-bottom: 10px;
21
- font-size: @font-size;
22
- color: @font-color;
23
- }
24
-
25
- input {
26
- appearance: none;
27
- -webkit-appearance: none;
28
- -moz-appearance: none;
29
- display: block;
30
- width: 100%;
31
- margin: 0 0 10px 0;
32
- padding: 4px 2px;
33
- border: none;
34
- font-size: @font-size;
35
- color: @font-color;
36
- border-bottom: 1px solid @border-color;
37
- line-height: 1.5;
38
- transition: all 500ms;
39
- background-color: transparent;
40
- outline: none;
41
-
42
- &::-webkit-input-placeholder,
43
- &::placeholder {
44
- color: @font-color-disabled;
45
- font-family: inherit;
46
- font-size: inherit;
47
- vertical-align: middle;
48
- }
49
-
50
- &[disabled] {
51
- background-color: transparent;
52
- opacity: 0.6;
53
- }
54
- }
55
-
56
- .editify-toolbar-link-footer {
57
- display: flex;
58
- justify-content: space-between;
59
- align-items: center;
60
- width: 100%;
61
- font-size: @font-size;
62
- color: @font-color-light;
63
-
64
- .editify-toolbar-link-operations {
65
- display: flex;
66
- justify-content: flex-start;
67
- align-items: center;
68
-
69
- & > span,
70
- & > a {
71
- cursor: pointer;
72
- opacity: 0.8;
73
- transition: all 200ms;
74
-
75
- &:hover {
76
- opacity: 1;
77
- }
78
- }
79
-
80
- & > span {
81
- margin-right: 15px;
82
- }
83
-
84
- & > a {
85
- text-decoration: none;
86
- }
87
- }
88
- }
89
- }
1
+ .editify-toolbar {
2
+ display: flex;
3
+ justify-content: flex-start;
4
+ align-items: center;
5
+ padding: 6px 10px;
6
+
7
+ .editify-icon-rotate {
8
+ transform: rotate(180deg);
9
+ }
10
+ }
11
+
12
+ .editify-toolbar-link {
13
+ display: block;
14
+ width: 280px;
15
+ padding: 4px;
16
+
17
+ .editify-toolbar-link-label {
18
+ display: block;
19
+ text-align: left;
20
+ margin-bottom: 10px;
21
+ font-size: @font-size;
22
+ color: @font-color;
23
+ }
24
+
25
+ input {
26
+ appearance: none;
27
+ -webkit-appearance: none;
28
+ -moz-appearance: none;
29
+ display: block;
30
+ width: 100%;
31
+ margin: 0 0 10px 0;
32
+ padding: 4px 2px;
33
+ border: none;
34
+ font-size: @font-size;
35
+ color: @font-color;
36
+ border-bottom: 1px solid @border-color;
37
+ line-height: 1.5;
38
+ transition: all 500ms;
39
+ background-color: transparent;
40
+ outline: none;
41
+
42
+ &::-webkit-input-placeholder,
43
+ &::placeholder {
44
+ color: @font-color-disabled;
45
+ font-family: inherit;
46
+ font-size: inherit;
47
+ vertical-align: middle;
48
+ }
49
+
50
+ &[disabled] {
51
+ background-color: transparent;
52
+ opacity: 0.6;
53
+ }
54
+ }
55
+
56
+ .editify-toolbar-link-footer {
57
+ display: flex;
58
+ justify-content: space-between;
59
+ align-items: center;
60
+ width: 100%;
61
+ font-size: @font-size;
62
+ color: @font-color-light;
63
+
64
+ .editify-toolbar-link-operations {
65
+ display: flex;
66
+ justify-content: flex-start;
67
+ align-items: center;
68
+
69
+ & > span,
70
+ & > a {
71
+ cursor: pointer;
72
+ opacity: 0.8;
73
+ transition: all 200ms;
74
+
75
+ &:hover {
76
+ opacity: 1;
77
+ }
78
+ }
79
+
80
+ & > span {
81
+ margin-right: 15px;
82
+ }
83
+
84
+ & > a {
85
+ text-decoration: none;
86
+ }
87
+ }
88
+ }
89
+ }