vue-editify 0.1.17 → 0.1.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. package/README.md +3 -3
  2. package/examples/App.vue +62 -53
  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 +88 -70
  18. package/lib/editify/props.d.ts +11 -3
  19. package/lib/editify.es.js +65 -46
  20. package/lib/editify.umd.js +1 -1
  21. package/lib/index.d.ts +1 -1
  22. package/lib/style.css +1 -1
  23. package/package.json +45 -45
  24. package/src/components/button/button.less +145 -145
  25. package/src/components/button/button.vue +197 -197
  26. package/src/components/button/props.ts +95 -95
  27. package/src/components/checkbox/checkbox.less +84 -84
  28. package/src/components/checkbox/checkbox.vue +68 -68
  29. package/src/components/checkbox/props.ts +49 -49
  30. package/src/components/colors/colors.less +75 -75
  31. package/src/components/colors/colors.vue +36 -36
  32. package/src/components/colors/props.ts +29 -29
  33. package/src/components/icon/icon.less +14 -14
  34. package/src/components/icon/icon.vue +12 -12
  35. package/src/components/icon/props.ts +11 -11
  36. package/src/components/insertImage/insertImage.less +135 -135
  37. package/src/components/insertImage/insertImage.vue +146 -146
  38. package/src/components/insertImage/props.ts +43 -43
  39. package/src/components/insertLink/insertLink.less +64 -64
  40. package/src/components/insertLink/insertLink.vue +58 -58
  41. package/src/components/insertLink/props.ts +16 -16
  42. package/src/components/insertTable/insertTable.less +54 -54
  43. package/src/components/insertTable/insertTable.vue +85 -85
  44. package/src/components/insertTable/props.ts +27 -27
  45. package/src/components/insertVideo/insertVideo.less +135 -135
  46. package/src/components/insertVideo/insertVideo.vue +146 -146
  47. package/src/components/insertVideo/props.ts +43 -43
  48. package/src/components/layer/layer.less +49 -49
  49. package/src/components/layer/layer.vue +598 -598
  50. package/src/components/layer/props.ts +71 -71
  51. package/src/components/menu/menu.less +63 -63
  52. package/src/components/menu/menu.vue +1569 -1569
  53. package/src/components/menu/props.ts +17 -17
  54. package/src/components/toolbar/props.ts +35 -35
  55. package/src/components/toolbar/toolbar.less +89 -89
  56. package/src/components/toolbar/toolbar.vue +1101 -1101
  57. package/src/components/tooltip/props.ts +21 -21
  58. package/src/components/tooltip/tooltip.less +23 -23
  59. package/src/components/tooltip/tooltip.vue +37 -37
  60. package/src/components/triangle/props.ts +26 -26
  61. package/src/components/triangle/triangle.less +79 -79
  62. package/src/components/triangle/triangle.vue +65 -65
  63. package/src/core/function.ts +1144 -1144
  64. package/src/core/rule.ts +259 -259
  65. package/src/core/tool.ts +1137 -1137
  66. package/src/css/base.less +30 -30
  67. package/src/css/hljs.less +54 -54
  68. package/src/editify/editify.less +404 -403
  69. package/src/editify/editify.vue +803 -792
  70. package/src/editify/props.ts +156 -146
  71. package/src/hljs/index.ts +197 -197
  72. package/src/icon/iconfont.css +219 -219
  73. package/src/index.ts +32 -32
  74. package/src/locale/en_US.ts +88 -88
  75. package/src/locale/index.ts +12 -12
  76. package/src/locale/zh_CN.ts +88 -88
  77. package/tsconfig.json +27 -27
  78. package/tsconfig.node.json +11 -11
  79. package/vite-env.d.ts +1 -1
  80. package/vite.config.ts +42 -42
@@ -1,29 +1,29 @@
1
- import { ExtractPublicPropTypes, PropType } from 'vue'
2
- import { ButtonOptionsItemType } from '../button/props'
3
-
4
- export const ColorsProps = {
5
- //颜色数组
6
- data: {
7
- type: Array as PropType<ButtonOptionsItemType[]>,
8
- default: function () {
9
- return []
10
- }
11
- },
12
- //选中的颜色
13
- value: {
14
- type: String,
15
- default: null
16
- },
17
- //激活状态颜色
18
- color: {
19
- type: String,
20
- default: ''
21
- },
22
- //是否使用工具提示
23
- tooltip: {
24
- type: Boolean,
25
- default: false
26
- }
27
- }
28
-
29
- export type ColorsPropsType = ExtractPublicPropTypes<typeof ColorsProps>
1
+ import { ExtractPublicPropTypes, PropType } from 'vue'
2
+ import { ButtonOptionsItemType } from '../button/props'
3
+
4
+ export const ColorsProps = {
5
+ //颜色数组
6
+ data: {
7
+ type: Array as PropType<ButtonOptionsItemType[]>,
8
+ default: function () {
9
+ return []
10
+ }
11
+ },
12
+ //选中的颜色
13
+ value: {
14
+ type: String,
15
+ default: null
16
+ },
17
+ //激活状态颜色
18
+ color: {
19
+ type: String,
20
+ default: ''
21
+ },
22
+ //是否使用工具提示
23
+ tooltip: {
24
+ type: Boolean,
25
+ default: false
26
+ }
27
+ }
28
+
29
+ export type ColorsPropsType = ExtractPublicPropTypes<typeof ColorsProps>
@@ -1,14 +1,14 @@
1
- @font-face {
2
- font-family: 'editify-icon';
3
- src: url('../../icon/iconfont.woff?t=1699274556400') format('woff'), url('../../icon/iconfont.ttf?t=1699274556400') format('truetype');
4
- }
5
-
6
- .editify-icon {
7
- font-family: 'editify-icon' !important;
8
- font-size: inherit;
9
- font-style: normal;
10
- -webkit-font-smoothing: antialiased;
11
- -moz-osx-font-smoothing: grayscale;
12
- line-height: 1;
13
- vertical-align: middle;
14
- }
1
+ @font-face {
2
+ font-family: 'editify-icon';
3
+ src: url('../../icon/iconfont.woff?t=1699274556400') format('woff'), url('../../icon/iconfont.ttf?t=1699274556400') format('truetype');
4
+ }
5
+
6
+ .editify-icon {
7
+ font-family: 'editify-icon' !important;
8
+ font-size: inherit;
9
+ font-style: normal;
10
+ -webkit-font-smoothing: antialiased;
11
+ -moz-osx-font-smoothing: grayscale;
12
+ line-height: 1;
13
+ vertical-align: middle;
14
+ }
@@ -1,12 +1,12 @@
1
- <template>
2
- <i class="editify-icon" :class="'editify-icon-' + value"></i>
3
- </template>
4
- <script setup lang="ts">
5
- import { IconProps } from './props'
6
-
7
- defineOptions({
8
- name: 'Icon'
9
- })
10
- defineProps(IconProps)
11
- </script>
12
- <style scoped src="./icon.less"></style>
1
+ <template>
2
+ <i class="editify-icon" :class="'editify-icon-' + value"></i>
3
+ </template>
4
+ <script setup lang="ts">
5
+ import { IconProps } from './props'
6
+
7
+ defineOptions({
8
+ name: 'Icon'
9
+ })
10
+ defineProps(IconProps)
11
+ </script>
12
+ <style scoped src="./icon.less"></style>
@@ -1,11 +1,11 @@
1
- import { ExtractPublicPropTypes } from 'vue'
2
-
3
- export const IconProps = {
4
- //图标值
5
- value: {
6
- type: String,
7
- default: ''
8
- }
9
- }
10
-
11
- export type IconPropsType = ExtractPublicPropTypes<typeof IconProps>
1
+ import { ExtractPublicPropTypes } from 'vue'
2
+
3
+ export const IconProps = {
4
+ //图标值
5
+ value: {
6
+ type: String,
7
+ default: ''
8
+ }
9
+ }
10
+
11
+ export type IconPropsType = ExtractPublicPropTypes<typeof IconProps>
@@ -1,135 +1,135 @@
1
- .editify-image {
2
- display: block;
3
- width: 280px;
4
- padding: 10px 14px;
5
-
6
- .editify-image-header {
7
- display: flex;
8
- justify-content: flex-start;
9
- align-items: center;
10
- width: 100%;
11
- margin-bottom: 20px;
12
- position: relative;
13
- padding-bottom: 6px;
14
-
15
- .editify-image-header-slider {
16
- position: absolute;
17
- width: 50px;
18
- height: 2px;
19
- border-radius: 2px;
20
- left: 0;
21
- bottom: 0;
22
- transition: left 200ms;
23
-
24
- &.upload {
25
- left: 5px;
26
- }
27
-
28
- &.remote {
29
- left: 85px;
30
- }
31
- }
32
-
33
- .editify-image-header-item {
34
- display: block;
35
- text-align: center;
36
- font-size: @font-size;
37
- color: @font-color;
38
- opacity: 0.8;
39
- transition: all 200ms;
40
- width: 60px;
41
- overflow: hidden;
42
- white-space: nowrap;
43
- text-overflow: ellipsis;
44
-
45
- &:hover {
46
- opacity: 1;
47
- cursor: pointer;
48
- }
49
-
50
- &:first-child {
51
- margin-right: 20px;
52
- }
53
-
54
- &.active {
55
- opacity: 1;
56
- color: @font-color-dark;
57
- }
58
- }
59
- }
60
-
61
- .editify-image-remote {
62
- display: block;
63
- width: 100%;
64
-
65
- input {
66
- appearance: none;
67
- -webkit-appearance: none;
68
- -moz-appearance: none;
69
- display: block;
70
- width: 100%;
71
- margin: 0 0 10px 0;
72
- padding: 4px 2px;
73
- border: none;
74
- font-size: @font-size;
75
- color: @font-color;
76
- border-bottom: 1px solid @border-color;
77
- line-height: 1.5;
78
- transition: border-color 500ms;
79
- background-color: transparent;
80
- outline: none;
81
- box-sizing: border-box;
82
-
83
- &::-webkit-input-placeholder,
84
- &::placeholder {
85
- color: @font-color-disabled;
86
- font-family: inherit;
87
- font-size: inherit;
88
- vertical-align: middle;
89
- }
90
- }
91
-
92
- .editify-image-remote-footer {
93
- display: flex;
94
- justify-content: flex-end;
95
- align-items: center;
96
- width: 100%;
97
- font-size: @font-size;
98
- opacity: 0.8;
99
- transition: all 200ms;
100
-
101
- &:hover {
102
- cursor: pointer;
103
- opacity: 1;
104
- }
105
- }
106
- }
107
-
108
- .editify-image-upload {
109
- display: flex;
110
- justify-content: center;
111
- align-items: center;
112
- width: 100%;
113
- padding: 15px 0;
114
- font-size: 36px;
115
- opacity: 0.8;
116
- transition: all 200ms;
117
- position: relative;
118
-
119
- &:hover {
120
- cursor: pointer;
121
- opacity: 1;
122
- }
123
-
124
- input {
125
- opacity: 0;
126
- position: absolute;
127
- left: 0;
128
- top: 0;
129
- width: 100%;
130
- height: 100%;
131
- z-index: 1;
132
- cursor: pointer;
133
- }
134
- }
135
- }
1
+ .editify-image {
2
+ display: block;
3
+ width: 280px;
4
+ padding: 10px 14px;
5
+
6
+ .editify-image-header {
7
+ display: flex;
8
+ justify-content: flex-start;
9
+ align-items: center;
10
+ width: 100%;
11
+ margin-bottom: 20px;
12
+ position: relative;
13
+ padding-bottom: 6px;
14
+
15
+ .editify-image-header-slider {
16
+ position: absolute;
17
+ width: 50px;
18
+ height: 2px;
19
+ border-radius: 2px;
20
+ left: 0;
21
+ bottom: 0;
22
+ transition: left 200ms;
23
+
24
+ &.upload {
25
+ left: 5px;
26
+ }
27
+
28
+ &.remote {
29
+ left: 85px;
30
+ }
31
+ }
32
+
33
+ .editify-image-header-item {
34
+ display: block;
35
+ text-align: center;
36
+ font-size: @font-size;
37
+ color: @font-color;
38
+ opacity: 0.8;
39
+ transition: all 200ms;
40
+ width: 60px;
41
+ overflow: hidden;
42
+ white-space: nowrap;
43
+ text-overflow: ellipsis;
44
+
45
+ &:hover {
46
+ opacity: 1;
47
+ cursor: pointer;
48
+ }
49
+
50
+ &:first-child {
51
+ margin-right: 20px;
52
+ }
53
+
54
+ &.active {
55
+ opacity: 1;
56
+ color: @font-color-dark;
57
+ }
58
+ }
59
+ }
60
+
61
+ .editify-image-remote {
62
+ display: block;
63
+ width: 100%;
64
+
65
+ input {
66
+ appearance: none;
67
+ -webkit-appearance: none;
68
+ -moz-appearance: none;
69
+ display: block;
70
+ width: 100%;
71
+ margin: 0 0 10px 0;
72
+ padding: 4px 2px;
73
+ border: none;
74
+ font-size: @font-size;
75
+ color: @font-color;
76
+ border-bottom: 1px solid @border-color;
77
+ line-height: 1.5;
78
+ transition: border-color 500ms;
79
+ background-color: transparent;
80
+ outline: none;
81
+ box-sizing: border-box;
82
+
83
+ &::-webkit-input-placeholder,
84
+ &::placeholder {
85
+ color: @font-color-disabled;
86
+ font-family: inherit;
87
+ font-size: inherit;
88
+ vertical-align: middle;
89
+ }
90
+ }
91
+
92
+ .editify-image-remote-footer {
93
+ display: flex;
94
+ justify-content: flex-end;
95
+ align-items: center;
96
+ width: 100%;
97
+ font-size: @font-size;
98
+ opacity: 0.8;
99
+ transition: all 200ms;
100
+
101
+ &:hover {
102
+ cursor: pointer;
103
+ opacity: 1;
104
+ }
105
+ }
106
+ }
107
+
108
+ .editify-image-upload {
109
+ display: flex;
110
+ justify-content: center;
111
+ align-items: center;
112
+ width: 100%;
113
+ padding: 15px 0;
114
+ font-size: 36px;
115
+ opacity: 0.8;
116
+ transition: all 200ms;
117
+ position: relative;
118
+
119
+ &:hover {
120
+ cursor: pointer;
121
+ opacity: 1;
122
+ }
123
+
124
+ input {
125
+ opacity: 0;
126
+ position: absolute;
127
+ left: 0;
128
+ top: 0;
129
+ width: 100%;
130
+ height: 100%;
131
+ z-index: 1;
132
+ cursor: pointer;
133
+ }
134
+ }
135
+ }