3
3
<div :style =" colorsToCSSVariable(colors)" class =" vuestic-devtools" >
4
4
<Overlay
5
5
@click =" onHoveredElementClick"
6
- @wheel =" onWheel"
7
- @mousemove =" onMouseMove"
8
- @mousedown =" onMouseDown"
9
- @mouseup =" onMouseUp"
6
+ v-on =" appTransformListeners"
10
7
/>
11
- <Outline :node =" element" :thickness =" 1" background =" outlinePrimaryBackground" />
12
- <Outline :node =" hoveredElement" :thickness =" 1" dashed />
8
+ <Outline :node =" hoveredElement" :thickness =" 1" dashed />
13
9
<Outline v-for =" element in elementsWithTargetVNode" :node =" element" :thickness =" 1" color =" outlineSecondary" background =" outlineSecondaryBackground" />
10
+ <Outline :node =" element" :thickness =" 1" background =" outlinePrimaryBackground" />
11
+
12
+ <!-- Removed for now -->
13
+ <!-- <Toolbar :node="element">
14
+ <VaCard>
15
+ <VaDropdown placement="top-start">
16
+ <template #anchor>
17
+ <VaButton icon="auto_awesome" size="small" preset="primary" />
18
+ </template>
19
+
20
+ <VaDropdownContent>
21
+ <VaInput placeholder="Change label to email" label="AI prompt" />
22
+ </VaDropdownContent>
23
+ </VaDropdown>
24
+ </VaCard>
25
+ </Toolbar> -->
26
+
27
+ <DraggableWindow default-position =" top-left" >
28
+ <VaCard outlined >
29
+ <AppToolbar />
30
+ </VaCard >
31
+ </DraggableWindow >
14
32
15
- <DraggableWindow default-position =" bottom -left" >
16
- <VaCard class =" vuestic-devtools__left-sidebar" >
33
+ <DraggableWindow default-position =" top -left" :offset-y = " 45 " >
34
+ <VaCard class =" vuestic-devtools__left-sidebar" outlined >
17
35
<VaScrollContainer vertical horizontal >
18
36
<AppTree />
19
37
</VaScrollContainer >
20
38
</VaCard >
21
39
</DraggableWindow >
22
40
23
41
<DraggableWindow default-position =" top-right" v-if =" element" >
24
- <VaCard class =" vuestic-devtools__right-sidebar" >
42
+ <VaCard class =" vuestic-devtools__right-sidebar" outlined >
25
43
<ComponentView />
26
44
</VaCard >
27
45
</DraggableWindow >
@@ -36,6 +54,8 @@ import Overlay from './components/base/Overlay.vue'
36
54
import ComponentView from ' ./components/ComponentView.vue'
37
55
import DraggableWindow from ' ./components/base/DraggableWindow.vue'
38
56
import AppTree from ' ./components/AppTree.vue'
57
+ import AppToolbar from ' ./components/AppToolbar.vue'
58
+ import Toolbar from ' ./components/base/Toolbar.vue'
39
59
40
60
import { VaCard , useToast , useColors , VaScrollContainer } from ' vuestic-ui'
41
61
@@ -45,18 +65,17 @@ import { useOutlines } from './composables/useOutlines'
45
65
import { EDIT_MODE_CLASS } from ' ../../shared/CONST'
46
66
import { useEvent } from ' ./composables/base/useEvent'
47
67
import { useComponent } from ' ./composables/useComponent'
48
- import { useAppTree , useSelectedAppTreeItem } from ' ./composables/useAppTree/index'
68
+ import { useAppTree } from ' ./composables/useAppTree/index'
49
69
50
- useAppTree ()
70
+ const { selectAppTreeItem, selectedAppTreeItem } = useAppTree ()
51
71
52
72
const isEditMode = ref (false )
53
73
54
74
const { notify } = useToast ()
55
75
56
76
const { colorsToCSSVariable, colors } = useColors ()
57
- const { zoom, translate, onWheel, onMouseDown, onMouseMove, onMouseUp } = useAppTransform ()
77
+ const { zoom, translate, listeners : appTransformListeners } = useAppTransform ()
58
78
59
- const { selectAppTreeItem, selectedAppTreeItem } = useSelectedAppTreeItem ()
60
79
61
80
watchEffect (() => {
62
81
if (isEditMode .value ) {
@@ -110,7 +129,7 @@ const recalculateOutlines = useOutlines()
110
129
watch (isEditMode , () => {
111
130
if (isEditMode .value ) {
112
131
const LEFT_SIDEBAR_WIDTH = 300
113
- const RIGHT_SIDEBAR_WIDTH = 500
132
+ const RIGHT_SIDEBAR_WIDTH = 400
114
133
const PADDING = 50
115
134
116
135
zoom .value = ((window .innerWidth - ((LEFT_SIDEBAR_WIDTH + RIGHT_SIDEBAR_WIDTH + PADDING ))) * 100 / window .innerWidth ) / 100
@@ -145,16 +164,63 @@ const elementsWithTargetVNode = computed(() => {
145
164
})
146
165
</script >
147
166
148
- <style lang="scss" scoped>
167
+ <style lang="scss">
168
+ body {
169
+ position : relative ;
170
+ }
171
+
149
172
.vuestic-devtools {
150
173
& __right-sidebar {
151
- max- width : 600 px ;
174
+ width : 400 px ;
152
175
box-sizing : border-box ;
176
+ height : calc (100vh - 1rem );
153
177
}
154
178
155
179
& __left-sidebar {
156
180
width : 300px ;
157
181
box-sizing : border-box ;
182
+ // 45 px offset from toolbar
183
+ height : calc (100vh - 45px - 1rem );
184
+ }
185
+
186
+ .va-card {
187
+ background : none !important ;
188
+ position : relative ;
189
+ z-index : 1 ;
190
+ backdrop-filter : blur (20px );
191
+
192
+ & ::before {
193
+ content : ' ' ;
194
+ position : absolute ;
195
+ top : 0 ;
196
+ left : 0 ;
197
+ right : 0 ;
198
+ bottom : 0 ;
199
+ z-index : -1 ;
200
+ background : var (--va-background-secondary );
201
+ pointer-events : none ;
202
+ opacity : 0.5 ;
203
+ }
204
+ }
205
+ }
206
+
207
+ .vuestic-devtools__dropdown_content {
208
+ background : none !important ;
209
+ position : relative ;
210
+ z-index : 1 ;
211
+ backdrop-filter : blur (5px );
212
+
213
+ & ::before {
214
+ content : ' ' ;
215
+ position : absolute ;
216
+ top : 0 ;
217
+ left : 0 ;
218
+ right : 0 ;
219
+ bottom : 0 ;
220
+ z-index : -1 ;
221
+ background : var (--va-background-secondary );
222
+ pointer-events : none ;
223
+ opacity : 0.5 ;
158
224
}
159
225
}
160
226
</style >
0 commit comments