@cloudron/pankow 3.6.3 → 3.6.5

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.
@@ -166,9 +166,9 @@ defineExpose({ open, close });
166
166
 
167
167
  .pankow-dialog-x-close {
168
168
  position: absolute;
169
- font-size: 20px;
170
- top: 15px;
171
- right: 15px;
169
+ font-size: 14px;
170
+ top: 10px;
171
+ right: 10px;
172
172
  }
173
173
 
174
174
  .pankow-dialog-center {
@@ -205,4 +205,4 @@ defineExpose({ open, close });
205
205
  text-align: right;
206
206
  }
207
207
 
208
- </style>
208
+ </style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudron/pankow",
3
3
  "private": false,
4
- "version": "3.6.3",
4
+ "version": "3.6.5",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "types": "types/index.d.ts",
@@ -29,9 +29,12 @@
29
29
  "online-3d-viewer": "^0.18.0"
30
30
  },
31
31
  "devDependencies": {
32
+ "@highlightjs/vue-plugin": "^2.1.0",
32
33
  "@vitejs/plugin-vue": "^6.0.3",
34
+ "highlight.js": "^11.11.1",
33
35
  "typescript": "^5.9.3",
34
36
  "vite": "^7.3.1",
35
- "vue": "^3.5.26"
37
+ "vue": "^3.5.27",
38
+ "vue-router": "^5.0.2"
36
39
  }
37
40
  }
package/tooltip.js CHANGED
@@ -25,6 +25,8 @@ const padding = 10;
25
25
  const tooltips = {};
26
26
  const intervals = {};
27
27
 
28
+ let id = 0;
29
+
28
30
  function isElementHidden(element) {
29
31
  if (!element) return true;
30
32
 
@@ -38,6 +40,8 @@ function isElementHidden(element) {
38
40
  }
39
41
 
40
42
  function remove(key, target) {
43
+ if (!tooltips[key]) return;
44
+
41
45
  if (tooltips[key].element) tooltips[key].element.remove();
42
46
 
43
47
  tooltips[key].element = null;
@@ -70,13 +74,17 @@ function update(target, modifiers, key) {
70
74
  }
71
75
 
72
76
  function mounted(el, binding, vnode) {
73
- const key = vnode.ctx.uid;
77
+ // generate running unique id
78
+ vnode.__pankow_id = id++;
79
+
80
+ const key = vnode.__pankow_id;
74
81
  tooltips[key] = {
75
82
  element: null,
76
83
  value: binding.value
77
84
  };
78
85
 
79
86
  el.addEventListener('mouseenter', () => {
87
+ if (!tooltips[key]) return;
80
88
  if (!tooltips[key].value) return;
81
89
 
82
90
  const element = document.createElement('div');
@@ -105,18 +113,19 @@ function mounted(el, binding, vnode) {
105
113
  }
106
114
 
107
115
  function updated(el, binding, vnode) {
108
- if (!binding.value) remove(vnode.ctx.uid, el);
116
+ if (!tooltips[vnode.__pankow_id]) return;
117
+ if (!binding.value) return remove(vnode.__pankow_id, el);
109
118
 
110
- tooltips[vnode.ctx.uid].value = binding.value;
119
+ tooltips[vnode.__pankow_id].value = binding.value;
111
120
 
112
- update(el, binding.modifiers, vnode.ctx.uid);
121
+ update(el, binding.modifiers, vnode.__pankow_id);
113
122
  }
114
123
 
115
124
  function beforeUnmount(el, binding, vnode) {
116
- if (!tooltips[vnode.ctx.uid]) return;
125
+ if (!tooltips[vnode.__pankow_id]) return;
117
126
 
118
- remove(vnode.ctx.uid, el);
119
- delete tooltips[vnode.ctx.uid];
127
+ remove(vnode.__pankow_id, el);
128
+ delete tooltips[vnode.__pankow_id];
120
129
  }
121
130
 
122
131
  const tooltip = {