goodteditor-ui 1.0.21 → 1.0.24

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 CHANGED
@@ -1,17 +1,14 @@
1
1
  {
2
2
  "name": "goodteditor-ui",
3
- "version": "1.0.21",
3
+ "version": "1.0.24",
4
4
  "main": "index.js",
5
5
  "homepage": "https://goodt-ui.netlify.app/",
6
6
  "scripts": {
7
- "serve": "vue-cli-service serve",
8
- "build": "vue-cli-service build",
9
- "lint": "vue-cli-service lint",
10
- "dev": "vue-styleguidist server",
11
- "docs:build": "set NODE_ENV=development && vue-styleguidist build",
12
- "docs:deploy": "npx netlify deploy --dir=docs --prod",
13
- "notify": "node ./ci/teams-notify.js",
14
- "publish": "npm run docs:build && npm run docs:deploy && npm run notify"
7
+ "serve": "npx vue-styleguidist server",
8
+ "build": "npx vue-styleguidist build",
9
+ "dev": "vue-cli-service serve",
10
+ "docs:build": "set NODE_ENV=development && npm run build",
11
+ "docs:deploy": "npx netlify deploy --dir=docs --prod"
15
12
  },
16
13
  "dependencies": {
17
14
  "@popperjs/core": "2.11.2",
@@ -151,8 +151,11 @@ export default {
151
151
  },
152
152
  },
153
153
  watch: {
154
- src() {
155
- this.state = State.LOADING;
154
+ src: {
155
+ handler(val) {
156
+ this.state = val ? State.LOADING : State.ERROR;
157
+ },
158
+ immediate: true,
156
159
  },
157
160
  },
158
161
  methods: {
@@ -52,63 +52,3 @@ export default {
52
52
  };
53
53
  </script>
54
54
  ```
55
-
56
- Advanced example. Using cursor tracking
57
-
58
- ```vue
59
- <template>
60
- <div class="pos-rel pad-l5">
61
- <ui-tooltip v-bind="options">
62
- <template #target="{ binds }">
63
- <div
64
- ref="target"
65
- class="pad-l2 bg-green color-white radius text-center"
66
- v-bind="binds"
67
- >
68
- hover me
69
- </div>
70
- </template>
71
- <div>
72
- I follow the cursor everywhere
73
- </div>
74
- </ui-tooltip>
75
- </div>
76
- </template>
77
- <script>
78
- import UiTooltip from './Tooltip.vue';
79
- export default {
80
- components: { UiTooltip },
81
- data() {
82
- return {
83
- options: {
84
- show: false,
85
- shouldFollowCursor: true,
86
- cursorCoordinates: [0, 0]
87
- }
88
- };
89
- },
90
- mounted() {
91
- this.$refs.target.addEventListener('mouseover', this.showTooltip);
92
- this.$refs.target.addEventListener('mousemove', this.changeTooltipCoords);
93
- this.$refs.target.addEventListener('mouseleave', this.hideTooltip);
94
- },
95
- beforeDestroy() {
96
- this.$refs.target.removeEventListener('mouseover', this.showTooltip);
97
- this.$refs.target.removeEventListener('mousemove', this.changeTooltipCoords);
98
- this.$refs.target.removeEventListener('mouseleave', this.hideTooltip);
99
-
100
- },
101
- methods: {
102
- showTooltip() {
103
- this.options.show = true;
104
- },
105
- hideTooltip() {
106
- this.options.show = false;
107
- },
108
- changeTooltipCoords({ clientX: x, clientY: y }) {
109
- this.options.cursorCoordinates = [x, y];
110
- }
111
- }
112
- };
113
- </script>
114
- ```
@@ -5,7 +5,7 @@ export const BulletList = BulletListToExtend.extend({
5
5
  return {
6
6
  ...this.parent?.(),
7
7
  class: {
8
- default: null
8
+ default: 'list-outside'
9
9
  },
10
10
  style: {
11
11
  default: null
@@ -5,7 +5,7 @@ export const OrderedList = OrderedListToExtend.extend({
5
5
  return {
6
6
  ...this.parent?.(),
7
7
  class: {
8
- default: null
8
+ default: 'list-outside'
9
9
  },
10
10
  style: {
11
11
  default: null
@@ -262,10 +262,5 @@ export default {
262
262
  & .ProseMirror-selectednode {
263
263
  outline: 2px solid var(--color-focus);
264
264
  }
265
-
266
- li > p {
267
- display: inline-block;
268
- margin: 0;
269
- }
270
265
  }
271
266
  </style>
@@ -42,20 +42,6 @@ export default {
42
42
  autoWidth: {
43
43
  type: Boolean,
44
44
  default: false,
45
- },
46
- /**
47
- * Should follow the cursor
48
- */
49
- shouldFollowCursor: {
50
- type: Boolean,
51
- default: false
52
- },
53
- /**
54
- * Cursor coordinates [ x, y ]
55
- */
56
- cursorCoordinates: {
57
- type: Array,
58
- default: () => [0, 0]
59
45
  }
60
46
  },
61
47
  data() {
@@ -75,9 +61,7 @@ export default {
75
61
  position,
76
62
  positionOffset,
77
63
  autoWidth,
78
- popoverTarget: target,
79
- shouldFollowCursor,
80
- cursorCoordinates
64
+ popoverTarget: target
81
65
  } = this;
82
66
  return {
83
67
  zIndex,
@@ -85,9 +69,7 @@ export default {
85
69
  position,
86
70
  positionOffset,
87
71
  autoWidth,
88
- target,
89
- shouldFollowCursor,
90
- cursorCoordinates
72
+ target
91
73
  };
92
74
  },
93
75
  },