@cloudron/pankow 3.6.4 → 3.6.6

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>
@@ -3,6 +3,13 @@
3
3
  import { ref, useTemplateRef, onMounted } from 'vue';
4
4
  import { onSwipe } from '../gestures.js';
5
5
 
6
+ defineProps({
7
+ showOpenAction: {
8
+ type: Boolean,
9
+ default: true
10
+ },
11
+ });
12
+
6
13
  const sideBar = useTemplateRef('sideBar');
7
14
  const isVisible = ref(false);
8
15
 
@@ -25,23 +32,33 @@ defineExpose({ open, close });
25
32
  </script>
26
33
 
27
34
  <template>
28
- <div class="pankow-sidebar" ref="sideBar" :class="{ 'pankow-sidebar-closed': !isVisible }">
29
- <Transition name="pankow-scale">
30
- <div class="pankow-sidebar-close-action" v-if="isVisible" @click="close()"><i class="fa-solid fa-xmark"></i></div>
31
- <div class="pankow-sidebar-open-action" v-else @click="open()"><i class="fa-solid fa-bars"></i></div>
35
+ <div class="pankow-sidebar-container" :class="{ 'pankow-sidebar-open': isVisible }">
36
+ <Transition name="pankow-fade">
37
+ <div class="pankow-sidebar-backdrop" @click="close"></div>
32
38
  </Transition>
33
- <div class="pankow-sidebar-inner">
34
- <slot></slot>
39
+ <div class="pankow-sidebar" ref="sideBar" :class="{ 'pankow-sidebar-closed': !isVisible }">
40
+ <Transition name="pankow-scale">
41
+ <div class="pankow-sidebar-close-action" v-if="isVisible" @click="close()"><i class="fa-solid fa-xmark"></i></div>
42
+ <div class="pankow-sidebar-open-action" v-else-if="showOpenAction" @click="open()"><i class="fa-solid fa-bars"></i></div>
43
+ </Transition>
44
+ <div class="pankow-sidebar-inner">
45
+ <slot></slot>
46
+ </div>
35
47
  </div>
36
48
  </div>
37
49
  </template>
38
50
 
39
51
  <style>
40
52
 
41
- .pankow-sidebar {
53
+ .pankow-sidebar-container {
42
54
  display: block;
43
55
  height: 100%;
44
56
  min-width: 220px;
57
+ }
58
+
59
+ .pankow-sidebar {
60
+ display: block;
61
+ height: 100%;
45
62
  overflow: auto;
46
63
  }
47
64
 
@@ -72,17 +89,42 @@ defineExpose({ open, close });
72
89
  cursor: pointer;
73
90
  }
74
91
 
92
+ .pankow-sidebar-backdrop {
93
+ display: none;
94
+ position: absolute;
95
+ top: 0;
96
+ bottom: 0;
97
+ left: 0;
98
+ right: 0;
99
+ background-color: #000000aa;
100
+ }
101
+
75
102
  @media (max-width: 576px) {
76
- .pankow-sidebar {
103
+ .pankow-sidebar-container {
77
104
  position: fixed;
78
105
  left: 0;
79
106
  top: 0;
80
- width: 100%;
107
+ width: 0;
108
+ min-width: 0;
81
109
  height: 100%;
82
110
  z-index: 2000;
111
+ }
112
+
113
+ .pankow-sidebar-open {
114
+ width: 100%;
115
+ }
116
+
117
+ .pankow-sidebar {
118
+ position: absolute;
119
+ width: calc(70%);
120
+ left: 0;
83
121
  transition: left 250ms ease-in-out;
84
122
  }
85
123
 
124
+ .pankow-sidebar-open .pankow-sidebar-backdrop {
125
+ display: block;
126
+ }
127
+
86
128
  .pankow-sidebar-closed {
87
129
  position: fixed;
88
130
  left: -600px; /* depends on media query */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudron/pankow",
3
3
  "private": false,
4
- "version": "3.6.4",
4
+ "version": "3.6.6",
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
- "@vitejs/plugin-vue": "^6.0.3",
32
+ "@highlightjs/vue-plugin": "^2.1.0",
33
+ "@vitejs/plugin-vue": "^6.0.4",
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
 
@@ -72,7 +74,10 @@ function update(target, modifiers, key) {
72
74
  }
73
75
 
74
76
  function mounted(el, binding, vnode) {
75
- const key = vnode.ctx.uid;
77
+ // generate running unique id
78
+ el.__pankow_id = id++;
79
+
80
+ const key = el.__pankow_id;
76
81
  tooltips[key] = {
77
82
  element: null,
78
83
  value: binding.value
@@ -108,19 +113,21 @@ function mounted(el, binding, vnode) {
108
113
  }
109
114
 
110
115
  function updated(el, binding, vnode) {
111
- if (!tooltips[vnode.ctx.uid]) return;
112
- if (!binding.value) return remove(vnode.ctx.uid, el);
116
+ if (!tooltips[el.__pankow_id]) return;
117
+
118
+ // still have to update the value of the tooltip in case it is cleared
119
+ tooltips[el.__pankow_id].value = binding.value;
113
120
 
114
- tooltips[vnode.ctx.uid].value = binding.value;
121
+ if (!binding.value) return remove(el.__pankow_id, el);
115
122
 
116
- update(el, binding.modifiers, vnode.ctx.uid);
123
+ update(el, binding.modifiers, el.__pankow_id);
117
124
  }
118
125
 
119
126
  function beforeUnmount(el, binding, vnode) {
120
- if (!tooltips[vnode.ctx.uid]) return;
127
+ if (!tooltips[el.__pankow_id]) return;
121
128
 
122
- remove(vnode.ctx.uid, el);
123
- delete tooltips[vnode.ctx.uid];
129
+ remove(el.__pankow_id, el);
130
+ delete tooltips[el.__pankow_id];
124
131
  }
125
132
 
126
133
  const tooltip = {